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
Copy link
Contributor

@jphorton jphorton left a comment

Choose a reason for hiding this comment

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

Did the expected_density values in AtmDeltaTKelvinTestCase1 come from the atmosphere model itself? They appear to deviate from an online resource I checked on the order of e-6 or so (for kg/m^3). It could be due an error in the density formula in `atmosphere.py'. When I replace line 215:

outputs['rho'] = corrected_density = (raw_density ** (-1) + self._R_air * self._dt * pressure ** (-1)) ** (-1)

with:

outputs['rho'] = corrected_density = raw_density * ((temp - self._dt) / temp)

I get a complete match with the online data. Not saying one or the other is correct, but we should look into this. The second formula makes sense to me but I don't recall how the first one was derived.

@ehariton
Copy link
Contributor Author

ehariton commented Jan 7, 2026

Did the expected_density values in AtmDeltaTKelvinTestCase1 come from the atmosphere model itself? They appear to deviate from an online resource I checked on the order of e-6 or so (for kg/m^3). It could be due an error in the density formula in `atmosphere.py'. When I replace line 215:

outputs['rho'] = corrected_density = (raw_density ** (-1) + self._R_air * self._dt * pressure ** (-1)) ** (-1)

with:

outputs['rho'] = corrected_density = raw_density * ((temp - self._dt) / temp)

I get a complete match with the online data. Not saying one or the other is correct, but we should look into this. The second formula makes sense to me but I don't recall how the first one was derived.

The expected_density values for the AtmDeltaTKelvinTestCase1 were based on the calculations from the component itself. As there are no source tables that describe the effects of the delta_T on density or pressure for us to reference. As such, they serve as "checking against a reference value" incase some one comes along later and modifies the calculations.

Corrected density equation you referenced scales the density multiplicatively based on the difference in size of the original temp vs. the change in temperature. The equation I am using adds a correction factor instead. I suspect both methods are within the error tolerance of "estimating a standard atmosphere" since the atmosphere has a great deal of variability.

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)

3 participants