Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions aviary/docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ parts:
- file: user_guide_unreviewed/UI_levels
# - file: user_guide/user_interface
# - file: new file with recommended examples to view next
- file: user_guide/included_aircraft_models
- file: user_guide_unreviewed/onboarding_level2
- file: user_guide_unreviewed/examples_of_the_same_mission_at_different_UI_levels
- file: user_guide_unreviewed/aviary_commands
Expand Down
2 changes: 1 addition & 1 deletion aviary/docs/developer_guide/doctape_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
"\n",
"command = \"\"\"\n",
" aviary run_mission --optimizer IPOPT\n",
" validation_cases/benchmark_tests/test_aircraft/aircraft_for_bench_FwFm.csv\n",
" validation_cases/validation_data/test_models/aircraft_for_bench_FwFm.csv\n",
" --max_iter 0\n",
"\"\"\"\n",
"run_command_no_file_error(command)"
Expand Down
4 changes: 3 additions & 1 deletion aviary/docs/examples/custom_optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
"prob = av.AviaryProblem(verbosity=0)\n",
"\n",
"# Load aircraft and options data from provided sources\n",
"prob.load_inputs('models/aircraft/test_aircraft/aircraft_for_bench_FwFm.csv', phase_info)\n",
"prob.load_inputs(\n",
" 'validation_cases/validation_data/test_models/aircraft_for_bench_FwFm.csv', phase_info\n",
")\n",
"\n",
"# Sanity check inputs and guess initial conditions for mission phases\n",
"prob.check_and_preprocess_inputs()\n",
Expand Down
4 changes: 2 additions & 2 deletions aviary/docs/examples_unreviewed/OAS_subsystem.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"source": [
"## Analysis Model Details\n",
"\n",
"This analysis is based on the Aviary benchmark [aircraft_for_bench_FwFm](https://github.com/OpenMDAO/Aviary/blob/main/aviary/models/aircraft/test_aircraft/aircraft_for_bench_FwFm.csv) input data representing a typical large single aisle class transport aircraft.\n",
"This analysis is based on the Aviary benchmark [aircraft_for_bench_FwFm](https://github.com/OpenMDAO/Aviary/blob/main/aviary/validation_cases/validation_data/test_models/aircraft_for_bench_FwFm.csv) input data representing a typical large single aisle class transport aircraft.\n",
"The analysis code [OAS_wing_mass_analysis](https://github.com/OpenMDAO/Aviary/blob/main/aviary/models/external_subsystems/open_aero_struct/OAS_wing_mass_analysis.py) contains the {glue:md}`OAStructures` class which performs a structural analysis of the wing. The image below shows a simplified XDSM diagram of the pre-mission data flow in this example.\n",
"\n",
"![OAS XDSM](./images/OAS_xdsm.PNG)\n",
Expand Down Expand Up @@ -217,7 +217,7 @@
"## Test Case\n",
"\n",
"A simple Aviary mission is defined to test the inclusion of the OpenAeroStruct wing mass subsystem during the pre-mission phase.\n",
"The test mission is defined in [run_simple_OAS_mission](https://github.com/OpenMDAO/Aviary/blob/main/aviary/models/external_subsystems/open_aero_struct/run_OAS_wing_mass_example.py) and is a mission based on input data read from the benchmark data file [aircraft_for_bench_FwFm](https://github.com/OpenMDAO/Aviary/blob/main/aviary/models/aircraft/test_aircraft/aircraft_for_bench_FwFm.csv).\n",
"The test mission is defined in [run_simple_OAS_mission](https://github.com/OpenMDAO/Aviary/blob/main/aviary/models/external_subsystems/open_aero_struct/run_OAS_wing_mass_example.py) and is a mission based on input data read from the benchmark data file [aircraft_for_bench_FwFm](https://github.com/OpenMDAO/Aviary/blob/main/aviary/validation_cases/validation_data/test_models/aircraft_for_bench_FwFm.csv).\n",
"\n",
"The OpenAeroStruct subsystem is used to compute an optimum wing mass which will override the Aviary computed wing mass value.\n",
"The value of the Aviary variable {glue:md}`Aircraft.Wing.MASS` is printed at the conclusion of the mission to verify that the wing mass from the subsystem is overriding the Aviary computed wing mass."
Expand Down
25 changes: 14 additions & 11 deletions aviary/docs/examples_unreviewed/deconstructed_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,12 @@
"from aviary.validation_cases.validation_tests import get_flops_inputs\n",
"\n",
"glue_variable(get_flops_inputs.__name__ + '()')\n",
"glue_variable(get_path('advanced_single_aisle_data.py').relative_to(av.top_dir), md_code=True)"
"glue_variable(\n",
" get_path(\n",
" 'validation_cases/validation_data/test_data/advanced_single_aisle_data.py'\n",
" ).relative_to(av.top_dir),\n",
" md_code=True,\n",
")"
]
},
{
Expand All @@ -872,7 +877,7 @@
"source": [
"This model demonstrates the flexibility of a custom Python script. For example, we do not load the aircraft model from a `.csv` file but from a Python file using the {glue:md}`get_flops_inputs()` method.\n",
"\n",
"This function not only reads Aviary and mission variables but also builds the engine. More information can be found in {glue:md}`models/aircraft/advanced_single_aisle/advanced_single_aisle_data.py`.\n",
"This function not only reads Aviary and mission variables but also builds the engine. More information can be found in {glue:md}`validation_cases/validation_data/test_data/advanced_single_aisle_data.py`.\n",
"\n",
"Note that we can read large single aisle aircraft inputs this way as well:"
]
Expand All @@ -891,7 +896,7 @@
"# Testing Cell\n",
"from aviary.utils.functions import get_model\n",
"\n",
"get_model('advanced_single_aisle/advanced_single_aisle_data.py')"
"get_path('validation_cases/validation_data/test_data/advanced_single_aisle_data.py')"
]
},
{
Expand Down Expand Up @@ -937,15 +942,13 @@
"# Testing Cell\n",
"import os\n",
"\n",
"from aviary.utils.functions import get_model\n",
"from aviary.utils.functions import get_path\n",
"\n",
"all_files = {\n",
" 'large_single_aisle_1': [''],\n",
" 'large_single_aisle_2': ['', '_detailwing', '_altwt'],\n",
"}\n",
"for folder, files in all_files.items():\n",
" for file in files:\n",
" get_model(os.path.join(folder, folder + file + '_FLOPS_data.py'))"
"base_path = 'validation_cases/validation_data/test_data/'\n",
"get_path(base_path + 'large_single_aisle_1_FLOPS_data.py')\n",
"get_path(base_path + 'large_single_aisle_2_FLOPS_data.py')\n",
"get_path(base_path + 'large_single_aisle_2_detailwing_FLOPS_data.py')\n",
"get_path(base_path + 'large_single_aisle_2_altwt_FLOPS_data.py')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,9 @@
"\n",
"# Load aircraft and options data from user\n",
"# Allow for user overrides here\n",
"prob.load_inputs('models/aircraft/test_aircraft/aircraft_for_bench_solved2dof.csv', phase_info)\n",
"prob.load_inputs(\n",
" 'validation_cases/validation_data/test_models/aircraft_for_bench_solved2dof.csv', phase_info\n",
")\n",
"\n",
"prob.check_and_preprocess_inputs()\n",
"\n",
Expand Down Expand Up @@ -677,7 +679,9 @@
"\n",
"# Load aircraft and options data from user\n",
"# Allow for user overrides here\n",
"prob.load_inputs('models/aircraft/test_aircraft/aircraft_for_bench_solved2dof.csv', phase_info)\n",
"prob.load_inputs(\n",
" 'validation_cases/validation_data/test_models/aircraft_for_bench_solved2dof.csv', phase_info\n",
")\n",
"\n",
"prob.check_and_preprocess_inputs()\n",
"\n",
Expand Down
10 changes: 7 additions & 3 deletions aviary/docs/examples_unreviewed/more_advanced_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@
"source": [
"import aviary.api as av\n",
"\n",
"prob = av.run_aviary('models/aircraft/test_aircraft/aircraft_for_bench_FwFm.csv', phase_info)"
"prob = av.run_aviary(\n",
" 'validation_cases/validation_data/test_models/aircraft_for_bench_FwFm.csv', phase_info\n",
")"
]
},
{
Expand Down Expand Up @@ -263,7 +265,7 @@
"source": [
"import csv\n",
"\n",
"filename = 'models/aircraft/test_aircraft/aircraft_for_bench_FwFm.csv'\n",
"filename = 'validation_cases/validation_data/test_models/aircraft_for_bench_FwFm.csv'\n",
"filename = av.get_path(filename)\n",
"\n",
"# Read the file\n",
Expand Down Expand Up @@ -391,7 +393,9 @@
"phase_info['descent_1']['user_options']['mach_polynomial_order'] = 3\n",
"phase_info['descent_1']['user_options']['altitude_polynomial_order'] = 3\n",
"\n",
"prob = av.run_aviary('models/aircraft/test_aircraft/aircraft_for_bench_FwFm.csv', phase_info)"
"prob = av.run_aviary(\n",
" 'validation_cases/validation_data/test_models/aircraft_for_bench_FwFm.csv', phase_info\n",
")"
]
},
{
Expand Down
8 changes: 6 additions & 2 deletions aviary/docs/misc_resources/phase_info_conversion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@
"\n",
"prob = AviaryProblem()\n",
"\n",
"prob.load_inputs('models/aircraft/test_aircraft/aircraft_for_bench_FwFm.csv', new_phase_info)\n",
"prob.load_inputs(\n",
" 'validation_cases/validation_data/test_models/aircraft_for_bench_FwFm.csv', new_phase_info\n",
")\n",
"\n",
"prob.check_and_preprocess_inputs()\n",
"prob.add_pre_mission_systems()\n",
Expand Down Expand Up @@ -883,7 +885,9 @@
"\n",
"prob = AviaryProblem()\n",
"\n",
"prob.load_inputs('models/aircraft/test_aircraft/aircraft_for_bench_GwGm.csv', new_phase_info)\n",
"prob.load_inputs(\n",
" 'validation_cases/validation_data/test_models/aircraft_for_bench_GwGm.csv', new_phase_info\n",
")\n",
"\n",
"prob.check_and_preprocess_inputs()\n",
"prob.add_pre_mission_systems()\n",
Expand Down
77 changes: 77 additions & 0 deletions aviary/docs/user_guide/included_aircraft_models.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "69f9128f",
"metadata": {},
"source": [
"# Aircraft Models Included With Aviary\n",
"Aviary includes a number of example aircraft input files (in the format previously described [here](fundamentals/aircraft_definition.ipynb)). These aircraft represent a mix of conventional aircraft and some more exotic configurations, such as blended-wing-bodies. These aircraft models are intended to be a starting point for users to create their own aircraft models, or to directly use without modification."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2e71514c",
"metadata": {
"tags": [
"remove-input"
]
},
"outputs": [],
"source": [
"from IPython.display import Markdown, display\n",
"\n",
"from aviary.utils.functions import get_path\n",
"\n",
"models_dir = get_path('models/aircraft')\n",
"\n",
"base_url = 'https://github.com/OpenMDAO/Aviary/tree/main/aviary/'\n",
"\n",
"# Exclude 'aerodynamics_tables' folders\n",
"csv_files = [path for path in models_dir.rglob('*.csv') if 'aerodynamics_tables' not in path.parts]\n",
"\n",
"# Format as a Markdown list of hyperlinks\n",
"if csv_files:\n",
" md_content = '## Available Aircraft Models\\n'\n",
" md_content += \"Below is a list of aircraft models included with Aviary, which link to the file's location in the Aviary repository.\\n\"\n",
" for file in sorted(csv_files):\n",
" # Extract just the parts of the path from \"models\" onwards\n",
" # e.g., transforms ('..', 'models', 'folder', 'data.csv') into 'models/folder/data.csv'\n",
" if 'models' in file.parts:\n",
" start_idx = file.parts.index('models')\n",
" url_path = '/'.join(file.parts[start_idx:])\n",
" else:\n",
" url_path = file.as_posix() # Fallback just in case\n",
"\n",
" url = f'{base_url}{url_path}'\n",
" md_content += f'- [{file.name}]({url})\\n'\n",
"else:\n",
" raise FileNotFoundError(\"No aircraft models found in 'models/aircraft'\")\n",
"\n",
"display(Markdown(md_content))"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "aviary",
"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.13.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"source": [
"import aviary.api as av\n",
"from aviary.api import Dynamic, Mission\n",
"from aviary.models.aircraft.advanced_single_aisle.advanced_single_aisle_data import inputs\n",
"from aviary.validation_cases.validation_data.test_data.advanced_single_aisle_data import inputs\n",
"from aviary.utils.preprocessors import preprocess_options\n",
"\n",
"aviary_options = inputs.deepcopy()\n",
Expand Down Expand Up @@ -342,7 +342,7 @@
"import dymos as dm\n",
"import openmdao.api as om\n",
"\n",
"from aviary.models.aircraft.advanced_single_aisle.advanced_single_aisle_data import (\n",
"from aviary.validation_cases.validation_data.test_data.advanced_single_aisle_data import (\n",
" takeoff_decision_speed_builder,\n",
" takeoff_engine_cutback_builder,\n",
" takeoff_engine_cutback_to_mic_p1_builder,\n",
Expand Down Expand Up @@ -710,7 +710,7 @@
"metadata": {},
"outputs": [],
"source": [
"from aviary.models.aircraft.advanced_single_aisle.advanced_single_aisle_data import (\n",
"from aviary.validation_cases.validation_data.test_data.advanced_single_aisle_data import (\n",
" landing_flare_builder,\n",
" landing_fullstop_builder,\n",
" landing_fullstop_user_options,\n",
Expand Down Expand Up @@ -783,7 +783,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "aviary",
"language": "python",
"name": "python3"
},
Expand All @@ -797,7 +797,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.13.12"
}
},
"nbformat": 4,
Expand Down
24 changes: 12 additions & 12 deletions aviary/docs/user_guide_unreviewed/aviary_commands.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@
"from aviary.utils.doctape import run_command_no_file_error\n",
"\n",
"commands = [\n",
" 'utils/test/data/turbofan_23k_1.eng turbofan_23k_1.csv -f GASP',\n",
" 'utils/test/data/turbofan_22k.txt turbofan_22k.csv -f FLOPS',\n",
" 'utils/test/data/turboshaft_4465hp.eng turboshaft_4465hp.csv -f GASP_TS',\n",
" 'validation_cases/validation_data/legacy_files/turbofan_23k_1.eng turbofan_23k_1.csv -f GASP',\n",
" 'validation_cases/validation_data/legacy_files/turbofan_22k.txt turbofan_22k.csv -f FLOPS',\n",
" 'validation_cases/validation_data/legacy_files/turboshaft_4465hp.eng turboshaft_4465hp.csv -f GASP_TS',\n",
"]\n",
"for command in commands:\n",
" run_command_no_file_error('aviary convert engine_deck ' + command)"
Expand Down Expand Up @@ -451,11 +451,11 @@
"Example usage:\n",
"```\n",
"# Converts a GASP based aero table \n",
"aviary convert aero_table -f GASP_ALT utils/test/data/aero_free_GASP.txt large_single_aisle_1_aero_flaps.csv\n",
"aviary convert aero_table -f GASP_ALT validation_cases/validation_data/legacy_files/aero_free_GASP.txt large_single_aisle_1_aero_flaps.csv\n",
"# Converts a GASP based alternative aero table \n",
"aviary convert aero_table -f GASP utils/test/data/aero_BWB_modified_GASP.txt generic_BWB_GASP_aero.csv\n",
"aviary convert aero_table -f GASP validation_cases/validation_data/legacy_files/aero_BWB_modified_GASP.txt generic_BWB_GASP_aero.csv\n",
"# Converts a FLOPS based aero table\n",
"aviary convert aero_table -f FLOPS utils/test/data/flops_test_polar.txt aviary_flops_polar.txt\n",
"aviary convert aero_table -f FLOPS validation_cases/validation_data/legacy_files/flops_test_polar.txt aviary_flops_polar.txt\n",
"```"
]
},
Expand All @@ -473,9 +473,9 @@
"from aviary.utils.doctape import run_command_no_file_error\n",
"\n",
"commands = [\n",
" '-f GASP_ALT utils/test/data/aero_free_GASP.txt large_single_aisle_1_aero_flaps.csv',\n",
" '-f GASP utils/test/data/aero_BWB_modified_GASP.txt',\n",
" '-f FLOPS utils/test/data/flops_test_polar.txt aviary_flops_polar.txt',\n",
" '-f GASP_ALT validation_cases/validation_data/legacy_files/aero_free_GASP.txt large_single_aisle_1_aero_flaps.csv',\n",
" '-f GASP validation_cases/validation_data/legacy_files/aero_BWB_modified_GASP.txt',\n",
" '-f FLOPS validation_cases/validation_data/legacy_files/flops_test_polar.txt aviary_flops_polar.txt',\n",
"]\n",
"for command in commands:\n",
" run_command_no_file_error('aviary convert aero_table ' + command)"
Expand Down Expand Up @@ -553,9 +553,9 @@
"from aviary.utils.doctape import run_command_no_file_error\n",
"\n",
"commands = [\n",
" 'models/engines/propellers/PropFan.map PropFan.csv',\n",
" 'models/engines/propellers/general_aviation.map general_aviation.csv',\n",
" 'models/engines/propellers/general_aviation.map',\n",
" 'validation_cases/validation_data/legacy_files/PropFan.map PropFan.csv',\n",
" 'validation_cases/validation_data/legacy_files/general_aviation.map general_aviation.csv',\n",
" 'validation_cases/validation_data/legacy_files/general_aviation.map',\n",
"]\n",
"for command in commands:\n",
" run_command_no_file_error('aviary convert propeller_table ' + command)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@
"Here we use a benchmark case as the inputted .csv file, though you can use any Aviary .csv here that defines an aircraft.\n",
"\n",
"```bash\n",
"aviary run_mission --phase_info outputted_phase_info.py validation_cases/benchmark_tests/test_aircraft/aircraft_for_bench_FwFm.csv\n",
"aviary run_mission --phase_info outputted_phase_info.py validation_cases/benchmark_tests/test_models/aircraft_for_bench_FwFm.csv\n",
"```\n",
"\n",
"You can also supply an optimizer, otherwise the default (SLSQP) will be used.\n",
"Here is how you'd run the mission with the IPOPT optimizer:\n",
"\n",
"```bash\n",
"aviary run_mission --optimizer IPOPT --phase_info outputted_phase_info.py validation_cases/benchmark_tests/test_aircraft/aircraft_for_bench_FwFm.csv\n",
"aviary run_mission --optimizer IPOPT --phase_info outputted_phase_info.py validation_cases/benchmark_tests/test_models/aircraft_for_bench_FwFm.csv\n",
"```\n",
"\n",
"```{note}\n",
Expand All @@ -217,7 +217,7 @@
"\n",
"command = (\n",
" 'aviary run_mission --optimizer IPOPT '\n",
" 'validation_cases/benchmark_tests/test_aircraft/aircraft_for_bench_FwFm.csv'\n",
" 'validation_cases/validation_data/test_models/aircraft_for_bench_FwFm.csv'\n",
")\n",
"command += ' --max_iter 0'\n",
"run_command_no_file_error(command)"
Expand Down
Loading
Loading