Skip to content

Remove ambiance dependency from OpenAeroStruct wing mass example#1216

Merged
jkirk5 merged 1 commit into
OpenMDAO:mainfrom
zain-asif-dev:remove-ambiance-dependency
Jul 7, 2026
Merged

Remove ambiance dependency from OpenAeroStruct wing mass example#1216
jkirk5 merged 1 commit into
OpenMDAO:mainfrom
zain-asif-dev:remove-ambiance-dependency

Conversation

@zain-asif-dev

Copy link
Copy Markdown
Contributor

Summary

The OAStructures analysis component (used by the OpenAeroStruct external subsystem example) depended on the external ambiance package solely to compute speed of sound, density, and dynamic viscosity at two altitudes (cruise and sea level). Aviary already has its own Atmosphere subsystem built on the same underlying atmosphere model, so this dependency was unnecessary.

This PR replaces the ambiance.Atmosphere usage with a small helper that runs Aviary's Atmosphere group inside a throwaway om.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. ambiance is removed from pyproject.toml's dev extra, 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:

  • speed of sound: ambiance -> [295.069, 340.294] m/s, Aviary -> [295.041, 340.261] m/s
  • density: ambiance -> [0.348, 1.225] kg/m^3, Aviary -> [0.348, 1.225] kg/m^3
  • dynamic viscosity: identical to displayed precision

Related Issues

Backwards incompatibilities

None. This only affects the internals of the OpenAeroStruct wing mass example subsystem; its inputs/outputs are unchanged. ambiance is no longer required to run this example or its tests.

AI Usage

None

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 jkirk5 added this pull request to the merge queue Jul 7, 2026
Merged via the queue into OpenMDAO:main with commit 96584bf Jul 7, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove ambiance dependency

3 participants