Remove ambiance dependency from OpenAeroStruct wing mass example#1216
Merged
Conversation
The OAStructures analysis component used the external ambiance package purely to compute speed of sound, density, and dynamic viscosity at a couple of altitudes. Aviary already ships an Atmosphere subsystem that provides the same properties from the same underlying atmosphere model, so pulling in a separate package for this was unnecessary. Replace the ambiance usage with a small helper that runs Aviary's Atmosphere group in a throwaway Problem to get the needed values, and drop ambiance from pyproject.toml, the installation guide, and the OpenAeroStruct example doc.
jkirk5
approved these changes
Jul 6, 2026
Kenneth-T-Moore
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
OAStructuresanalysis component (used by the OpenAeroStruct external subsystem example) depended on the externalambiancepackage solely to compute speed of sound, density, and dynamic viscosity at two altitudes (cruise and sea level). Aviary already has its ownAtmospheresubsystem built on the same underlying atmosphere model, so this dependency was unnecessary.This PR replaces the
ambiance.Atmosphereusage with a small helper that runs Aviary'sAtmospheregroup inside a throwawayom.Problem, following the same pattern already used elsewhere in Aviary (e.g.aviary/utils/engine_deck_conversion.py) for one-off atmosphere property lookups outside of a mission ODE.ambianceis removed frompyproject.toml'sdevextra, the installation guide, and the OpenAeroStruct example notebook.I verified the two implementations agree closely at the test case's cruise altitude (11303.68 m) and sea level:
ambiance->[295.069, 340.294]m/s, Aviary ->[295.041, 340.261]m/sambiance->[0.348, 1.225]kg/m^3, Aviary ->[0.348, 1.225]kg/m^3Related Issues
Backwards incompatibilities
None. This only affects the internals of the OpenAeroStruct wing mass example subsystem; its inputs/outputs are unchanged.
ambianceis no longer required to run this example or its tests.AI Usage
None