diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 5b2a47efe..aa6e97d44 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: true contact_links: - name: Discussion Board - url: https://github.com/OpenMDAO/om-Aviary/discussions + url: https://github.com/OpenMDAO/Aviary/discussions about: "If you have questions or need support, please check the discussion board and create a \"New Discussion\" if necessary." diff --git a/.github/workflows/test_workflow.yml b/.github/workflows/test_workflow.yml index b1328c9da..b90198918 100644 --- a/.github/workflows/test_workflow.yml +++ b/.github/workflows/test_workflow.yml @@ -245,7 +245,7 @@ jobs: if: matrix.MAKE_DOCS shell: bash -l {0} run: | - cd $HOME/work/om-Aviary/om-Aviary/aviary/docs + cd $HOME/work/Aviary/Aviary/aviary/docs find _build/html/reports/ -type f -name '*.log' \ -exec echo "#################################################################" \; \ -exec echo {} \; \ @@ -262,7 +262,7 @@ jobs: echo "Publishing Docs to github.io" echo "=============================================================" pip install ghp-import - cd $HOME/work/om-Aviary/om-Aviary/aviary + cd $HOME/work/Aviary/Aviary/aviary ghp-import -n -p -f docs/_build/html - name: Scan for security issues diff --git a/aviary/docs/developer_guide/contributing_guidelines.md b/aviary/docs/developer_guide/contributing_guidelines.md index 11ad8b384..523cbc8be 100755 --- a/aviary/docs/developer_guide/contributing_guidelines.md +++ b/aviary/docs/developer_guide/contributing_guidelines.md @@ -15,7 +15,7 @@ Documentation is the backbone of the Aviary team's support for our user communit The Aviary codebase is currently under active development and cleanup, including the addition of docstrings. Thus, not every function and class currently includes a docstring, however, we are slowly adding them. In order to move forwards instead of backwards we require that all added functions and classes include a docstring in the numpy format. ## Benchmark Tests -The Aviary codebase has several benchmark tests which test some of the baseline models included in Aviary. These tests supplement the unit test capability, and are tested frequently by the Aviary team. We encourage you to run these tests using our test runner located [here](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/run_all_benchmarks.py). +The Aviary codebase has several benchmark tests which test some of the baseline models included in Aviary. These tests supplement the unit test capability, and are tested frequently by the Aviary team. We encourage you to run these tests using our test runner located [here](https://github.com/OpenMDAO/Aviary/blob/main/aviary/run_all_benchmarks.py). ## Use of Issue Backlog -The Aviary team would like a chance to interact with and get community engagement in feature changes to the codebase. The primary place that this engagement happens is in the [issue backlog](https://github.com/OpenMDAO/om-Aviary/issues/new/choose) using the "feature or change request" section. In addition, we would like to be able to track bug fixes that come through the code. To support these goals we encourage users to create issues, and we encourage code contributors to link issues to their pull requests. \ No newline at end of file +The Aviary team would like a chance to interact with and get community engagement in feature changes to the codebase. The primary place that this engagement happens is in the [issue backlog](https://github.com/OpenMDAO/Aviary/issues/new/choose) using the "feature or change request" section. In addition, we would like to be able to track bug fixes that come through the code. To support these goals we encourage users to create issues, and we encourage code contributors to link issues to their pull requests. \ No newline at end of file diff --git a/aviary/docs/examples/OAS_subsystem.ipynb b/aviary/docs/examples/OAS_subsystem.ipynb index af46777e2..c36d6ea2e 100644 --- a/aviary/docs/examples/OAS_subsystem.ipynb +++ b/aviary/docs/examples/OAS_subsystem.ipynb @@ -30,11 +30,11 @@ "The subsystem builder uses the Aviary external subsystem builder template to connect the analysis tool to Aviary as either a pre-mission, mission or post-mission subsystem.\n", "\n", "For this case, the analysis tool will compute a wing weight in the pre-mission portion of the Aviary analysis and return its value to Aviary to override the empirical wing weight value.\n", - "Fuel weight is passed in from Aviary as the only input currently, but other inputs may also be passed in through the subsystem builder, [OAS_wing_weight_builder](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/OAS_weight/OAS_wing_weight_builder.py), by the `promotes_inputs` parameter.\n", + "Fuel weight is passed in from Aviary as the only input currently, but other inputs may also be passed in through the subsystem builder, [OAS_wing_weight_builder](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/OAS_weight/OAS_wing_weight_builder.py), by the `promotes_inputs` parameter.\n", "Other Aviary variables can also be added as additional inputs based on user needs.\n", "\n", "```{note}\n", - "Some modifications of the [OAS_wing_weight_analysis](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/OAS_weight/OAS_wing_weight_analysis.py) code will be necessary to add new inputs not already defined.\n", + "Some modifications of the [OAS_wing_weight_analysis](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/OAS_weight/OAS_wing_weight_analysis.py) code will be necessary to add new inputs not already defined.\n", "```\n", "\n", "Here is the builder object for the OAS wing weight analysis example:" @@ -95,8 +95,8 @@ "source": [ "## Analysis Model Details\n", "\n", - "This analysis is based on the Aviary benchmark [aircraft_for_bench_FwFm](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/models/test_aircraft/aircraft_for_bench_FwFm.csv) input data representing a typical large single aisle class transport aircraft.\n", - "The analysis code [OAS_wing_weight_analysis](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/OAS_weight/OAS_wing_weight_analysis.py) contains the `OAStructures` class which performs a structural analysis of the wing.\n", + "This analysis is based on the Aviary benchmark [aircraft_for_bench_FwFm](https://github.com/OpenMDAO/Aviary/blob/main/aviary/models/test_aircraft/aircraft_for_bench_FwFm.csv) input data representing a typical large single aisle class transport aircraft.\n", + "The analysis code [OAS_wing_weight_analysis](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/OAS_weight/OAS_wing_weight_analysis.py) contains the `OAStructures` class which performs a structural analysis of the wing.\n", "\n", "We'll now discuss this code in more detail.\n", "\n", @@ -111,7 +111,7 @@ "Results of the structural optimization determine the optimum wing skin thickness, spar cap thickness, wing twist, wing t/c and maneuver angle of attack that satisfies strength constraints while minimizing wing weight.\n", "The 'OAStructures' class returns the optimized wing mass and the fuel mass burned but currently only the wing mass is used to override the Aviary variable 'Aircraft.Wing.MASS'.\n", "\n", - "The [OAS_wing_weight_analysis](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/OAS_weight/OAS_wing_weight_analysis.py) code may be executed in Python to test the OpenAeroStruct analysis outside of the Aviary subsystem interface.\n", + "The [OAS_wing_weight_analysis](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/OAS_weight/OAS_wing_weight_analysis.py) code may be executed in Python to test the OpenAeroStruct analysis outside of the Aviary subsystem interface.\n", "Default values for each of the inputs and options are included at the bottom of the analysis code file.\n", "This can be a useful test to demonstrate that the OpenAeroStruct analysis model has been properly defined and the model returns reasonable results.\n", "\n", @@ -175,29 +175,29 @@ "- wing_weight\n", "- fuel_burn\n", "\n", - "See [OAS_wing_weight_analysis](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/OAS_weight/OAS_wing_weight_analysis.py) and the [OpenAeroStruct aerostructural optimization with wingbox](https://mdolab-openaerostruct.readthedocs-hosted.com/en/latest/aerostructural_wingbox_walkthrough.html) documentation for descriptions of these variables.\n", + "See [OAS_wing_weight_analysis](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/OAS_weight/OAS_wing_weight_analysis.py) and the [OpenAeroStruct aerostructural optimization with wingbox](https://mdolab-openaerostruct.readthedocs-hosted.com/en/latest/aerostructural_wingbox_walkthrough.html) documentation for descriptions of these variables.\n", "\n", "## Test Case\n", "\n", "A simple Aviary mission is defined to test the inclusion of the OpenAeroStruct wing weight subsystem during the pre-mission phase.\n", - "The test mission is defined in [run_simple_OAS_mission](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/OAS/run_simple_OAS_mission.py) and is a mission based on input data read from the benchmark data file [aircraft_for_bench_FwFm](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/models/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/external_subsystems/OAS/run_simple_OAS_mission.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/test_aircraft/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 `Aircraft.Wing.MASS` is printed at the conclusion of the mission to verify that the wing weight from the subsystem is overriding the Aviary computed wing weight.\n", "\n", - "A variable in the [run_simple_OAS_mission](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/OAS/run_simple_OAS_mission.py) file named `use_OAS` may be set by the user to `True` or `False` to run the simple mission with or without the OpenAeroStruct subsystem included.\n", + "A variable in the [run_simple_OAS_mission](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/OAS/run_simple_OAS_mission.py) file named `use_OAS` may be set by the user to `True` or `False` to run the simple mission with or without the OpenAeroStruct subsystem included.\n", "This will allow the mission to be flown either using the Aviary empirical wing weight estimation (`use_OAS=False`) or with the OpenAeroStruct subsystem (`use_OAS=True`).\n", "\n", "Wing weight optimization of this type usually does not have knowledge of non-optimum wing mass values such as leading and training edge structure, actuators, stiffeners, etc.\n", "The optimum wing mass computed by the `OAStructures` class can be scaled using the option `wing_weight_ratio` to better match either the Aviary empirical wing weight value or a known fly-away weight estimate for your wing model.\n", - "One method to determine the wing_weight_ratio would be to run the mission to calculate the Aviary empirical wing weight and then run [OAS_wing_weight_analysis](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/OAS_weight/OAS_wing_weight_analysis.py) by itself using its default input values and compare wing weights. The `wing_weight_ratio` value may then be set to calibrate the OpenAeroStruct wing weight to the expected fly-away weight.\n", + "One method to determine the wing_weight_ratio would be to run the mission to calculate the Aviary empirical wing weight and then run [OAS_wing_weight_analysis](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/OAS_weight/OAS_wing_weight_analysis.py) by itself using its default input values and compare wing weights. The `wing_weight_ratio` value may then be set to calibrate the OpenAeroStruct wing weight to the expected fly-away weight.\n", "\n", "This calibration step has already been performed for this model, so the user may run the simple mission with or without the OpenAeroStruct subsystem active and compare the results.\n", "\n", "## Example Run Script\n", "\n", "Here is the full run script used to run the simple mission with the OpenAeroStruct subsystem active.\n", - "This run script is also available in the [run_simple_OAS_mission file.](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/OAS/run_simple_OAS_mission.py)\n", + "This run script is also available in the [run_simple_OAS_mission file.](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/OAS/run_simple_OAS_mission.py)\n", "\n", "\n", "```{note}\n", diff --git a/aviary/docs/examples/intro.md b/aviary/docs/examples/intro.md index 2af40c2d9..abc285ef1 100644 --- a/aviary/docs/examples/intro.md +++ b/aviary/docs/examples/intro.md @@ -4,7 +4,7 @@ Aviary provides a range of built-in examples that serve as both regression tests and demonstrations of the tool's capabilities. These examples showcase various full mission analysis and optimization problems, incorporating different subsystem analyses from FLOPS and GASP. -You can find these examples [here](https://github.com/OpenMDAO/om-Aviary/tree/main/aviary/validation_cases/benchmark_tests), especially the files that start `test_swap`. +You can find these examples [here](https://github.com/OpenMDAO/Aviary/tree/main/aviary/validation_cases/benchmark_tests), especially the files that start `test_swap`. These cases highlight Aviary's ability to replicate GASP and FLOPS capabilities, as well as use both code's methods in a single analysis. In addition to the examples for core Aviary, we also provide some examples for using external subsystems. diff --git a/aviary/docs/getting_started/input_csv_phase_info.md b/aviary/docs/getting_started/input_csv_phase_info.md index 68400e9c2..f0d4c0d8a 100644 --- a/aviary/docs/getting_started/input_csv_phase_info.md +++ b/aviary/docs/getting_started/input_csv_phase_info.md @@ -89,7 +89,7 @@ We will now discuss the meaning of the keys within the `phase_info` objects. - `fix_duration`: default to `False`. ```{note} -Not all the keys apply to all phases. The users should select the right keys for each phase of interest. The required keys for each phase are defined in [check_phase_info](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/interface/utils.py) function. Currently, this function does the check only for `FLOPS` and `GASP` missions. +Not all the keys apply to all phases. The users should select the right keys for each phase of interest. The required keys for each phase are defined in [check_phase_info](https://github.com/OpenMDAO/Aviary/blob/main/aviary/interface/utils.py) function. Currently, this function does the check only for `FLOPS` and `GASP` missions. ``` Users can add their own keys as needed. diff --git a/aviary/docs/getting_started/installation.md b/aviary/docs/getting_started/installation.md index 50e79246b..4691430a9 100644 --- a/aviary/docs/getting_started/installation.md +++ b/aviary/docs/getting_started/installation.md @@ -218,7 +218,7 @@ Successfully installed pyoptsparse-2.10.1 ### Installing Aviary and Running Tests -Now, we are ready to install Aviary. Assuming that you will become a contributor sooner or later, we want to install a copy from the main source. (You will need a GitHub account for this) Let us open `https://github.com/openMDAO/om-aviary/` in a web browser and click [fork](https://github.com/OpenMDAO/om-Aviary/fork) on the top-right corner. You then have created your own copy of Aviary on GitHub website. Now we create a copy on your local drive (supposing `USER_ID` is your GitHub account ID): +Now, we are ready to install Aviary. Assuming that you will become a contributor sooner or later, we want to install a copy from the main source. (You will need a GitHub account for this) Let us open `https://github.com/openMDAO/om-aviary/` in a web browser and click [fork](https://github.com/OpenMDAO/Aviary/fork) on the top-right corner. You then have created your own copy of Aviary on GitHub website. Now we create a copy on your local drive (supposing `USER_ID` is your GitHub account ID): ``` $ cd ~/workspace diff --git a/aviary/docs/getting_started/onboarding_ext_subsystem.ipynb b/aviary/docs/getting_started/onboarding_ext_subsystem.ipynb index 7d6d6df6e..852c6c9c1 100644 --- a/aviary/docs/getting_started/onboarding_ext_subsystem.ipynb +++ b/aviary/docs/getting_started/onboarding_ext_subsystem.ipynb @@ -240,7 +240,7 @@ "metadata": {}, "source": [ "\n", - "In the battery subsystem, the type of battery cell we use is `18650`. The option is not set in `input_file`, instead is is controlled by importing the correct battery map [here](https://github.com/OpenMDAO/om-Aviary/blob/1fca1c03cb2e1d6387442162e8d7dabf83eee197/aviary/examples/external_subsystems/battery/model/reg_thevenin_interp_group.py#L5)." + "In the battery subsystem, the type of battery cell we use is `18650`. The option is not set in `input_file`, instead is is controlled by importing the correct battery map [here](https://github.com/OpenMDAO/Aviary/blob/1fca1c03cb2e1d6387442162e8d7dabf83eee197/aviary/examples/external_subsystems/battery/model/reg_thevenin_interp_group.py#L5)." ] }, { diff --git a/aviary/docs/getting_started/what_aviary_does.md b/aviary/docs/getting_started/what_aviary_does.md index 880887397..acf630706 100644 --- a/aviary/docs/getting_started/what_aviary_does.md +++ b/aviary/docs/getting_started/what_aviary_does.md @@ -17,7 +17,7 @@ Let's discuss what Aviary does in more detail. ```{warning} Aviary is under active development! If you're using it, know that we are working to update Aviary to make it more user-friendly and capable. -If you have suggestions or comments please let the Aviary team know by [submitting an issue on GitHub](https://github.com/OpenMDAO/om-Aviary/issues/new/choose). +If you have suggestions or comments please let the Aviary team know by [submitting an issue on GitHub](https://github.com/OpenMDAO/Aviary/issues/new/choose). ``` ## Core functionalities @@ -77,7 +77,7 @@ We've touched on some of these already, but let's discuss them more. ### Benefits -- Open-source: Aviary is open-source and available on [GitHub](https://github.com/OpenMDAO/om-Aviary) +- Open-source: Aviary is open-source and available on [GitHub](https://github.com/OpenMDAO/Aviary) - Flexible: Aviary is intended to be flexible enough to design a variety of aircraft and missions - Customizable: Aviary allows users to add their own subsystems to the problem - Optimization: Aviary is designed to be used effectively with gradient-based optimization diff --git a/aviary/docs/intro.md b/aviary/docs/intro.md index f085b0f58..0904749a4 100644 --- a/aviary/docs/intro.md +++ b/aviary/docs/intro.md @@ -4,7 +4,7 @@ This is the landing page for all of Aviary's documentation, including a user's g ## What Aviary is -[Aviary](https://github.com/OpenMDAO/om-Aviary) is an aircraft analysis, design, and optimization tool built on top of the Python-based optimization framework [OpenMDAO](https://github.com/OpenMDAO/OpenMDAO). +[Aviary](https://github.com/OpenMDAO/Aviary) is an aircraft analysis, design, and optimization tool built on top of the Python-based optimization framework [OpenMDAO](https://github.com/OpenMDAO/OpenMDAO). Aviary provides a flexible and user-friendly optimization platform that allows the beginning aircraft modeler to build a useful model, the intermediate aircraft modeler to build an advanced model, and the advanced aircraft modeler to build any model they can imagine. Features of Aviary include: diff --git a/aviary/docs/user_guide/battery_subsystem_example.ipynb b/aviary/docs/user_guide/battery_subsystem_example.ipynb index 8b4732435..21faef03d 100644 --- a/aviary/docs/user_guide/battery_subsystem_example.ipynb +++ b/aviary/docs/user_guide/battery_subsystem_example.ipynb @@ -13,7 +13,7 @@ "\n", "We'll show you how to define the builder object, how to specify the pre-mission and mission models, and how to implement the interface methods.\n", "In each of these methods, we've removed the initial docstring to increase readability on this page.\n", - "The [`battery_builder.py`](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/examples/external_subsystems/battery/battery_builder.py) file contains the original methods and docstrings.\n", + "The [`battery_builder.py`](https://github.com/OpenMDAO/Aviary/blob/main/aviary/examples/external_subsystems/battery/battery_builder.py) file contains the original methods and docstrings.\n", "Please see that file if you want to examine this example builder in its entirety as one file.\n", "\n", "You can define these methods in any order you want within your subsystem builder and Aviary will use them at the appropriate times during analysis and optimization.\n", @@ -475,7 +475,7 @@ "In the `get_constraints` method, a constraint was added to the dictionary but did not include a `type` key, which is required as stated by the error message.\n", "\n", "If you encounter an error when using your subsystem, but the test here did not find it, please let the Aviary dev team know!\n", - "We'd love to hear from you on the [GitHub issues page](https://github.com/OpenMDAO/om-Aviary/issues) so we can help everyone write great external subsystems." + "We'd love to hear from you on the [GitHub issues page](https://github.com/OpenMDAO/Aviary/issues) so we can help everyone write great external subsystems." ] } ], diff --git a/aviary/docs/user_guide/propulsion.md b/aviary/docs/user_guide/propulsion.md index 74a438c08..a4611cdeb 100644 --- a/aviary/docs/user_guide/propulsion.md +++ b/aviary/docs/user_guide/propulsion.md @@ -13,7 +13,7 @@ Each unique type of engine is referred to as an engine model. Engine decks are a type of engine model - they use the same basic interface, but have additional functionality to handle reading and processing data files. ### Formatting -An engine deck data file requires specific formatting for Aviary to correctly interpret. These files must follow the [Aviary data file format](input_files).An example of a properly-formatted engine deck can be found [here](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/models/engines/turbofan_22k.deck). +An engine deck data file requires specific formatting for Aviary to correctly interpret. These files must follow the [Aviary data file format](input_files).An example of a properly-formatted engine deck can be found [here](https://github.com/OpenMDAO/Aviary/blob/main/aviary/models/engines/turbofan_22k.deck). ### Variables diff --git a/aviary/docs/user_guide/step_by_step_external_guide.md b/aviary/docs/user_guide/step_by_step_external_guide.md index 9ebc812d2..7556873d0 100644 --- a/aviary/docs/user_guide/step_by_step_external_guide.md +++ b/aviary/docs/user_guide/step_by_step_external_guide.md @@ -27,13 +27,13 @@ If your subsystem does not need to tell Aviary about any new variables (i.e. all -1. First, view the [battery_variables.py file](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/battery/battery_variables.py) to see an example of the variable hierarchy we use in Aviary. You can also look at the [core Aviary variables](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/variable_info/variables.py) to see what's available already. You can add any arbitrary system as a subclass within here. Items that define aircraft properties should go within `Aircraft` whereas any variables pertaining to the `Mission` should exist there. +1. First, view the [battery_variables.py file](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/battery/battery_variables.py) to see an example of the variable hierarchy we use in Aviary. You can also look at the [core Aviary variables](https://github.com/OpenMDAO/Aviary/blob/main/aviary/variable_info/variables.py) to see what's available already. You can add any arbitrary system as a subclass within here. Items that define aircraft properties should go within `Aircraft` whereas any variables pertaining to the `Mission` should exist there. These variable names are what's used within the OpenMDAO system that Aviary uses. This sort of hierarchy is a purposeful design choice to make it clear what values live where, which subsystem they belong to, and that they are named the same between different systems. Additionally, we recommend including the legacy name of any variable you add that so that users of your builder will know how the variable names map to existing analyses. -2. Now, with the variable names defined, we need to define variable metadata. Variable metadata helps Aviary understand your system. It also helps humans understand what units, defaults, and other values your variables use. Check out the [battery metadata example](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/battery/battery_variable_meta_data.py) as well as the [core Aviary metadata](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/variable_info/variable_meta_data.py). +2. Now, with the variable names defined, we need to define variable metadata. Variable metadata helps Aviary understand your system. It also helps humans understand what units, defaults, and other values your variables use. Check out the [battery metadata example](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/battery/battery_variable_meta_data.py) as well as the [core Aviary metadata](https://github.com/OpenMDAO/Aviary/blob/main/aviary/variable_info/variable_meta_data.py). When you define your variable metadata, you'll use the same names you just defined. With those names, you'll provide units, a brief description, and default values. You're not locking yourself into specific units here, but by providing units then Aviary can convert the values behind-the-scenes to whatever units are actually used in the code. Users can input variables in any units that can be converted to those units prescribed in the metadata. @@ -67,7 +67,7 @@ The methods you should implement depend on what type of subsystem you're buildin ## Testing your builder and ensuring it's behaving as intended -Okay, now we should test your subsystem builder to make sure it's providing the correct outputs to Aviary. You don't have to put it into Aviary (yet!) to do this. Look at the [`test_battery_builder.py` file](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/battery/test_battery_builder.py) to see how to test your subsystem. This is also detailed in the [battery subsystem example](battery_subsystem_example) doc page. +Okay, now we should test your subsystem builder to make sure it's providing the correct outputs to Aviary. You don't have to put it into Aviary (yet!) to do this. Look at the [`test_battery_builder.py` file](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/battery/test_battery_builder.py) to see how to test your subsystem. This is also detailed in the [battery subsystem example](battery_subsystem_example) doc page. If everything goes well then those tests passed. If they didn't, you should get some info about your builder that you can use to fix any bugs or errors. @@ -75,7 +75,7 @@ This test probably won't catch *everything* that could go wrong when interfacing ## Using your builder within Aviary -Awesome. Let's keep going and start to discuss using these subsystems within Aviary. The overarching idea is that now that you have a subsystem builder, you can pass an instantiation of this builder object to Aviary via the `phase_info` dictionary. Take a look at [`run_cruise.py`](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/battery/run_cruise.py) and [`run_multiphase_mission.py`](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/battery/run_multiphase_mission.py) to see how we do this for the battery model. Specifically, here are the relevant lines of code from the `run_cruise.py` file: +Awesome. Let's keep going and start to discuss using these subsystems within Aviary. The overarching idea is that now that you have a subsystem builder, you can pass an instantiation of this builder object to Aviary via the `phase_info` dictionary. Take a look at [`run_cruise.py`](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/battery/run_cruise.py) and [`run_multiphase_mission.py`](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/battery/run_multiphase_mission.py) to see how we do this for the battery model. Specifically, here are the relevant lines of code from the `run_cruise.py` file: ```python battery_builder = BatteryBuilder() @@ -101,7 +101,7 @@ Those additional `'external_subsystems'` entires are where you add your subsyste 2. **Add any `external_subsystems` to your pre- and post-mission phases too.** If you have pre- or post-mission analyses in your subsystem, make sure to add the `external_subsystems` list to the `pre_mission` and `post_mission` sub-dicts within the `phase_info` dict. This means that Aviary will build and use those systems before or after the mission; otherwise Aviary won't know to put the systems there. -3. **Start with a simple mission in Aviary.** To begin, try adapting the [`run_cruise.py`](https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/external_subsystems/battery/run_cruise.py) script to use your subsystem. Replace the `BatteryBuilder()` instance with your subsystem, for example. You might need other setup or inputs based on the complexity of your model. But in general, it helps to start with the simplest mission you can. In this case, that's probably a steady level cruise flight. +3. **Start with a simple mission in Aviary.** To begin, try adapting the [`run_cruise.py`](https://github.com/OpenMDAO/Aviary/blob/main/aviary/external_subsystems/battery/run_cruise.py) script to use your subsystem. Replace the `BatteryBuilder()` instance with your subsystem, for example. You might need other setup or inputs based on the complexity of your model. But in general, it helps to start with the simplest mission you can. In this case, that's probably a steady level cruise flight. Even though this is a "simple" mission, there's still a lot that can go wrong. It turns out that designing an aircraft is challenging sometimes. I don't expect your mission optimization to converge well your first try; it often takes some debugging and digging to get your subsystem integrated well. It's really challenging to write docs to help you do this without knowing more about your system, what it's trying to do while the aircraft is flying, and what you've already checked. That being said, make sure to reach out if you're encountering problems here.