PK 1|X[{k k " plot_coupling_study_analysis.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n# Generate an N2 from an Excel description of the coupling problem\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"from __future__ import annotations\n\nfrom gemseo import configure_logger\nfrom gemseo.utils.study_analyses.coupling_study_analysis import CouplingStudyAnalysis\n\nconfigure_logger()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Describe your coupling problem in an Excel file\n\n\n\n\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Visualize this study\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"study = CouplingStudyAnalysis(\"coupling_study.xlsx\")\nstudy.generate_n2(save=False, show=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Visualize this study from the command line\n\nWe can create the same figures using command line inputs:\n\n.. code::\n\n gemseo-study coupling_study.xlsx -t coupling -o outputs --height 5 --width 5\n\nwhere ``gemseo-study`` is an executable provided by |g|\nand the Excel file path ``coupling_study.xlsx`` is the specification\nof the coupling study.\nHere, we set some options of ``gemseo-study``:\n\n- ``-t coupling`` is the type of study (default: ``mdo``),\n- ``-o outputs`` is the output directory,\n- ``--height 5`` is the height of the N2 chart in inches,\n- ``--width 5`` is the width of the N2 chart in inches.\n\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
}
},
"nbformat": 4,
"nbformat_minor": 0
}PK 1|X| plot_mdo_study_analysis.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n# Generate N2 and XDSM diagrams from an Excel description of the MDO problem\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"from __future__ import annotations\n\nfrom gemseo import configure_logger\nfrom gemseo.utils.study_analyses.mdo_study_analysis import MDOStudyAnalysis\n\nconfigure_logger()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Describe your MDO problem in an Excel file\n\n\n\n\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Visualize this study\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"study = MDOStudyAnalysis(\"mdo_study.xlsx\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Generate the N2 chart\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"study.generate_n2(save=False, show=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Generate the XDSM\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"study.generate_xdsm(\".\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Visualize this study from command line\n\nWe can create the same figures using command line inputs:\n\n.. code::\n\n gemseo-study mdo_study.xlsx -o outputs -h 5 -w 5 -x -p\n\nwhere ``gemseo-study`` is an executable provided by |g|\nand the Excel file path ``mdo_study.xlsx`` is the specification of the MDO study.\nHere, we set some options of ``gemseo-study``:\n\n- ``-o outputs`` is the output directory,\n- ``-h 5`` is the height of the N2 chart in inches,\n- ``-w 5`` is the width of the N2 chart in inches,\n- ``-x`` is an option to create of the XDSM\n (compatible only with the study type 'mdo'),\n- ``-p`` is an option to create a PDF file with the creation of the XDSM.\n\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
}
},
"nbformat": 4,
"nbformat_minor": 0
}PK 1|X[{k k " plot_coupling_study_analysis.ipynbPK 1|X| plot_mdo_study_analysis.ipynbPK