.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/study_analysis/plot_coupling_study_analysis.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_examples_study_analysis_plot_coupling_study_analysis.py: Generate an N2 from an Excel description of the coupling problem ================================================================ .. GENERATED FROM PYTHON SOURCE LINES 24-33 .. code-block:: Python from __future__ import annotations from gemseo import configure_logger from gemseo.utils.study_analyses.coupling_study_analysis import CouplingStudyAnalysis configure_logger() .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 34-39 Describe your coupling problem in an Excel file ----------------------------------------------- .. image:: /_images/study_analysis_example/coupling_study.png .. GENERATED FROM PYTHON SOURCE LINES 41-43 Visualize this study -------------------- .. GENERATED FROM PYTHON SOURCE LINES 43-46 .. code-block:: Python study = CouplingStudyAnalysis("coupling_study.xlsx") study.generate_n2(save=False, show=True) .. image-sg:: /examples/study_analysis/images/sphx_glr_plot_coupling_study_analysis_001.png :alt: plot coupling study analysis :srcset: /examples/study_analysis/images/sphx_glr_plot_coupling_study_analysis_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none INFO - 13:53:19: 2 disciplines detected INFO - 13:53:19: Discipline1 INFO - 13:53:19: Inputs: a, b, c INFO - 13:53:19: Outputs: d, e, g INFO - 13:53:19: Discipline2 INFO - 13:53:19: Inputs: d, g, x, z INFO - 13:53:19: Outputs: a, b, f .. GENERATED FROM PYTHON SOURCE LINES 47-65 Visualize this study from the command line ------------------------------------------ We can create the same figures using command line inputs: .. code:: gemseo-study coupling_study.xlsx -t coupling -o outputs --height 5 --width 5 where ``gemseo-study`` is an executable provided by |g| and the Excel file path ``coupling_study.xlsx`` is the specification of the coupling study. Here, we set some options of ``gemseo-study``: - ``-t coupling`` is the type of study (default: ``mdo``), - ``-o outputs`` is the output directory, - ``--height 5`` is the height of the N2 chart in inches, - ``--width 5`` is the width of the N2 chart in inches. .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.197 seconds) .. _sphx_glr_download_examples_study_analysis_plot_coupling_study_analysis.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_coupling_study_analysis.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_coupling_study_analysis.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_