Skip to content

Conversation

@ehariton
Copy link
Contributor

@ehariton ehariton commented Jan 5, 2026

Summary

Incorporates USATM1976 directly into aviary as the default atmosphere so we no longer need to rely on the dymos atmo library.

Incorporates open-source MIL_SPEC_210A atmospheres (hot/cold/polar/tropical) which the user can switch to via options.

Individual atmosphere data is now separated into it's own file, while the core component that imports the data and does the calculations has been named atmosphere.py.

Adds an temperature offset option, allowing the user to shift an atmosphere profile by a specific number of degrees kelvin to mimic hotter / colder days.

Geometric vs. Geopotential input option is preserved.

Removed option to add dsos_dh as an output. This is now always provided. This is only used by solved 2DOF ODE.

Removed drhos_dh output as it was not used in Aviary.

Many tests that relied on atmosphere, including some engine conversion tests, referenced the atmosphere model. Because the original dymos atmosphere model was based on English units and used an English akima spline, the values changed slightly when converted to the SI units and the new akima splines. SI units is what the original 1976 atm standard was published in. There were noticeable small differences, rounding etc, between the dymos atmosphere implementation in imperial units and the values published in SI units in the original standard.

Related Issues

Backwards incompatibilities

None

New Dependencies

None

… files for raw MIL_SPEC_210A data in its original units for easy comparison. changed references to USATM to just atmosphere.py and moved atmosphere group, and atmospherecomp, and akima generator into atmosphere. Removed unused reference to usatm in GASP comments
… of drhos_dh and dsos_dh which were used for calculating MaxQ for spacecraft, reverted density to be computed based on raw density plus a correction factor, reverted speed of sound and dynamic viscosity to be calculated from equations instead of akima since raw data was calculated from equations for USatm1976 and for MIL_SPEC_210A did not have any of that info
…a extractor out of individual raw atmosphere files and consolidated into one call inside of _build_akima_coefs
…ecause the raw data could be in different units.
…d partials to match updated compute, added (int,float) option to to delta_T_Kelvin to allow for user typing in 15 without a decimal point
…e values in init, tested outputs against source data manually and good match. requres inHg60 unit conversion which was added to OM lib
jphorton

This comment was marked as resolved.

@ehariton

This comment was marked as resolved.

@@ -1,4 +1,4 @@
# created 06/06/25
# created 01/08/26 at 14:09 by omdao
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# created 01/08/26 at 14:09 by omdao
# created 01/08/26

self.options.declare(
'delta_T_Kelvin',
default=0.0,
desc='Temperature delta from International Standard Atmosphere (ISA) standard day conditions (degrees Kelvine)',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
desc='Temperature delta from International Standard Atmosphere (ISA) standard day conditions (degrees Kelvine)',
desc='Temperature delta from International Standard Atmosphere (ISA) standard day conditions (degrees Kelvin)',

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deg C and K have the same magnitude so it might be more natural language to state that the delta is in Celsius

self.options.declare(
'data_source',
default='USatm1976',
desc='The atmospheric model used. Chose one of USatm1976, tropical, polar, hot, cold.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we simply call it "standard"? It is much simpler to remember than a very specific shortening of "1967 standard atmosphere", and we are using generic terms for the milspec atmospheres anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me.

desc='Temperature delta from International Standard Atmosphere (ISA) standard day conditions (degrees Kelvine)',
)

self.options.declare(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should get updated to use a new Enum that is linked to a new Aviary variable, so users can set this from the csv. Maybe in Mission?. Adding a types argument here pointing to that Enum will also catch incorrect options getting passed - see the speed type option for an example

"You will need to make a new `_raw_data` dictionary inside your new file. Look at the example `_raw_data` contained in `StandardAtm1976` for reference. \n",
"\n",
"## Converting Raw data Proper Units\n",
"From here on our we need to be especially mindful of units. We are going to use a non-openmdao helper function `_build_akima_coefs` to help create the akima coefficients. \n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"From here on our we need to be especially mindful of units. We are going to use a non-openmdao helper function `_build_akima_coefs` to help create the akima coefficients. \n",
"From here on our we need to be especially mindful of units. We are going to use a helper function `_build_akima_coefs` to help create the akima coefficients. \n",

I don't think specifying non-openmdao adds any useful info. It's also not a dymos, numpy, pyoptsparse, etc. helper function so why single out OM?

partials['dsos_dh', 'h'] *= dz_dh**2


def _build_akima_coefs(out_stream, raw_data, units):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably get moved to a util folder, it feels odd to have here. Maybe an atmosphere/utils.py file?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also just noticed it probably shouldn't be a private function if we want it to be used by users

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move all the atmosphere data files to an atmosphere/data folder?

"cell_type": "markdown",
"metadata": {},
"source": [
"# Adding your own Atmosphere Model\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is developer guide atmosphere info. I'm starting to think we need to completely re-organize how we organize the docs anyway though, splitting up the subsystems into different places doesn't seem useful...

Density in kg/m^3.
"""

# turn off ruff linting
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically formatting, linting is when actual code besides whitespace gets touched

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.

Add ability to use hot day (non standard atmosphere)

4 participants