.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/EXAMPLE_MODEL_USAGE.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_EXAMPLE_MODEL_USAGE.py: Example: Load and run Paroto system from STONE configuration. This example demonstrates how to load a complete system architecture from a STONE format YAML file and run a simulation. .. GENERATED FROM PYTHON SOURCE LINES 6-57 .. code-block:: Python import os from paroto.io.stone_loader import create_problem_from_stone def main(): """Load architecture from STONE config and run simulation.""" print("\n" + "=" * 60) print(" Paroto - STONE Configuration Example") print("=" * 60) script_dir = os.path.dirname(os.path.abspath(__file__)) config_path = os.path.join(script_dir, "config_example.yml") print(f"\nLoading configuration from: {os.path.basename(config_path)}") print("-" * 60) # Create problem from STONE configuration prob = create_problem_from_stone(config_path) prob.run_model() # Display results print("\nSimulation Results:") print("-" * 60) print(f"Breakdown Voltage: {prob.get_val('breakdown_voltage')[0]:.2f} V") print(f"Arc Current: {prob.get_val('arc_current')[0]:.2f} A") print(f"Power to Gas: {prob.get_val('power_to_gas')[0]:.2f} W") print(f"Ablation Rate: {prob.get_val('ablation_rate')[0]:.6f} kg/s") print(f"Flow Velocity: {prob.get_val('flow_velocity')[0]:.2f} m/s") print(f"Outlet Temperature: {prob.get_val('outlet_temperature')[0]:.2f} K") print(f"Temperature Homogeneity: {prob.get_val('temperature_homogeneity_index')[0]:.3f}") print("\n" + "=" * 60) print("SUCCESS: Simulation completed") print("=" * 60) print("\nNext steps:") print(" 1. Edit config_example.yml to customize the system") print(" 2. Try config_low_fidelity.yml or config_high_fidelity.yml") print(" 3. Run optimization: paroto-optimize --config config_example.yml") print() if __name__ == "__main__": try: main() except Exception as e: print(f"\nError: {e}") import traceback traceback.print_exc() .. _sphx_glr_download_auto_examples_EXAMPLE_MODEL_USAGE.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: EXAMPLE_MODEL_USAGE.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: EXAMPLE_MODEL_USAGE.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: EXAMPLE_MODEL_USAGE.zip `