.. _sphx_glr_auto_examples_VDEF_optim: VDEF MDAO Optimization Example =============================== This folder contains a comprehensive example of using the paroto library for **Voltage-gap-Distance-Energy-Frequency** (VDEF) optimization in plasma torch design, using **Multidisciplinary Analysis and Optimization (MDAO)** with OpenMDAO. Overview -------- The example demonstrates: - **Parameter sweep** of plasma torch operating conditions - **Constraint satisfaction** (25 kW power target, breakdown voltage limits) - **Parallel execution** using Python multiprocessing (Windows) or MPI (Linux) - **Data persistence** using SQLite databases - **Advanced visualization** with pairwise grid (corner plot) analysis Files ----- 1. example_vdef_mdao.py ~~~~~~~~~~~~~~~~~~~~~~~ Main parameter sweep script that explores the plasma torch design space. **Features:** - Uses OpenMDAO's ``TorchDesignGroup`` with physics-based models - Explores 3D parameter space: **V**\ oltage × gap-**D**\ istance × **F**\ requency - Computes **E**\ nergy per pulse as output (satisfying power constraint) - Implements power constraint (25 kW) via balance component - Tracks convergence status for all evaluations - Saves results to SQLite database (``parameter_sweep_cases.sql``) **Usage:** .. code-block:: bash # Run parameter sweep (default: multiprocessing) python example_vdef_mdao.py # Generate N2 diagram only python example_vdef_mdao.py --n2 **Parameters Explored (VDEF):** - **Voltage** (V): HV voltage: 5 - 80 kV (15 levels) - **gap** (D): Gap distance: 6 - 30 mm (8 levels) - **Energy** (E): Energy per pulse (computed output) - **Frequency** (F): Pulse frequency: 5 - 200 kHz (10 levels) - **Total evaluations**: 1,200 cases (15 × 8 × 10) **Outputs:** - ``parameter_sweep_cases.sql``: SQLite database with all results - ``parameter_space_visualization.png``: Standard 6-panel visualization - Console output with convergence statistics 2. analyze_vdef_pairwise.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Post-processing script that creates pairwise grid (corner plot) visualization. **Features:** - Loads results from SQLite database - Creates comprehensive pairwise grid showing: - All 2D parameter combinations - 1D marginal distributions (histograms) - Three-way classification: Feasible / Converged-Infeasible / Non-converged - Eliminates 2D projection ambiguity - Color-coded by energy per pulse **Usage:** .. code-block:: bash # Run after example_vdef_mdao.py has generated data python analyze_vdef_pairwise.py **Output:** - ``pairwise_grid_visualization.png``: Comprehensive corner plot 3. generate_n2_diagram.py ~~~~~~~~~~~~~~~~~~~~~~~~~~ Utility script to generate OpenMDAO N2 diagram showing system architecture. **Usage:** .. code-block:: bash python generate_n2_diagram.py **Output:** - ``n2.html``: Interactive N2 diagram 4. plot_generator_operating_window.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Demonstrates automatic constraint boundary exploration for the generator. **Usage:** .. code-block:: bash python plot_generator_operating_window.py .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /auto_examples/VDEF_optim/images/thumb/sphx_glr_analyze_vdef_pairwise_thumb.png :alt: :ref:`sphx_glr_auto_examples_VDEF_optim_analyze_vdef_pairwise.py` .. raw:: html
Analysis script: Pairwise grid visualization of parameter space.
.. raw:: html
.. only:: html .. image:: /auto_examples/VDEF_optim/images/thumb/sphx_glr_example_vdef_mdao_thumb.png :alt: :ref:`sphx_glr_auto_examples_VDEF_optim_example_vdef_mdao.py` .. raw:: html
Example: Direct MDAO problem setup for plasma torch parameter space exploration.
.. raw:: html
.. only:: html .. image:: /auto_examples/VDEF_optim/images/thumb/sphx_glr_generate_n2_diagram_thumb.png :alt: :ref:`sphx_glr_auto_examples_VDEF_optim_generate_n2_diagram.py` .. raw:: html
Generate N2 diagram for the VDEF MDAO example.
.. raw:: html
.. only:: html .. image:: /auto_examples/VDEF_optim/images/thumb/sphx_glr_plot_generator_operating_window_thumb.png :alt: :ref:`sphx_glr_auto_examples_VDEF_optim_plot_generator_operating_window.py` .. raw:: html
Plot Generator Operating Window from VDEF Parameter Sweep.
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /auto_examples/VDEF_optim/analyze_vdef_pairwise /auto_examples/VDEF_optim/example_vdef_mdao /auto_examples/VDEF_optim/generate_n2_diagram /auto_examples/VDEF_optim/plot_generator_operating_window