-
Notifications
You must be signed in to change notification settings - Fork 110
Atmosphere Incorporation: USatm1976, MIL_SPEC_210A Hot/Cold/Polar/Tropical, and Offsets #950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… 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
… atmosphere user guide doc
…plines for tropical
jphorton
left a comment
There was a problem hiding this 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.
The 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. |
… as those value changes were small
…e values in the engine model because original source data is not complete and needed to be extrapolated
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_dhas an output. This is now always provided. This is only used by solved 2DOF ODE.Removed
drhos_dhoutput 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