-
Notifications
You must be signed in to change notification settings - Fork 131
Gravity update foundation #1219
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
Open
ehariton
wants to merge
15
commits into
OpenMDAO:main
Choose a base branch
from
ehariton:gravity
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+135
−59
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
64bab5d
gravity constants, enums added but some tests not passing
ehariton 7c177fd
removed enums as not necessary, test_fuselage.py is now running, but …
ehariton 86b0eca
ruff
ehariton ab3a672
removed constants import
ehariton 78f8cfe
Merge branch 'main' into gravity
ehariton c138311
reverted radius earth to old constant to separate out tests failing f…
ehariton b36ee43
merge main
ehariton 37ae334
added back in GRAV_METRIC_FLOPS definition accidentially removed too …
ehariton 91e7cbb
converted earth radius to tuple
ehariton 6dcf864
reverted mars radius as well
ehariton cd6e551
merge main
ehariton b407cff
merge main
ehariton b520a7f
Update the json test for the new variables.
Kenneth-T-Moore 2fd8a52
Update the json test for the new variables.
Kenneth-T-Moore ee7eb4b
Merge pull request #8 from Kenneth-T-Moore/jsonjson
ehariton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| from aviary.subsystems.atmosphere.data.MIL_SPEC_210A_Cold import atm_data as cold_210A | ||
| from aviary.subsystems.atmosphere.data.MIL_SPEC_210A_Hot import atm_data as hot_210A | ||
| from aviary.subsystems.atmosphere.data.MIL_SPEC_210A_Polar import atm_data as polar_210A | ||
| from aviary.subsystems.atmosphere.data.MIL_SPEC_210A_Tropical import atm_data as tropical_210A | ||
| from aviary.subsystems.atmosphere.data.StandardAtm1976 import atm_data as USatm1976 | ||
| from aviary.subsystems.atmosphere.data.MarsReference2024 import atm_data as MarsReference2024 | ||
| from aviary.subsystems.atmosphere.data.MarsHellasHot import atm_data as MarsHellasHot | ||
| from aviary.subsystems.atmosphere.data.MarsHellasCold import atm_data as MarsHellasCold | ||
| from aviary.subsystems.atmosphere.data.MarsEquatorHot import atm_data as MarsEquatorHot | ||
| from aviary.subsystems.atmosphere.data.MarsEquatorCold import atm_data as MarsEquatorCold | ||
| from aviary.subsystems.atmosphere.data.MarsPolarHot import atm_data as MarsPolarHot | ||
| from aviary.subsystems.atmosphere.data.MarsPolarCold import atm_data as MarsPolarCold | ||
| from aviary.subsystems.atmosphere.data.VenusReference2021 import atm_data as VenusReference2021 | ||
| from aviary.variable_info.enums import AtmosphereModel | ||
| from aviary.constants import ( | ||
| RADIUS_EARTH, | ||
| RADIUS_MARS, | ||
| RADIUS_VENUS, | ||
| GRAV_EARTH, | ||
| GRAV_MARS, | ||
| GRAV_VENUS, | ||
| ) | ||
|
|
||
|
|
||
| def get_atmosphere_data(atmosphere_model): | ||
| """ | ||
| Return the atmosphere source data, planet name, and gravitational constant | ||
| associated with the requested atmosphere model. | ||
|
|
||
| Parameters | ||
| ---------- | ||
| atmosphere_model : AtmosphereModel | ||
| Atmosphere model enum. | ||
|
|
||
| Returns | ||
| ------- | ||
| tuple | ||
| (source_data, planet, gravity) | ||
| """ | ||
| atmosphere_lookup = { | ||
| AtmosphereModel.STANDARD: (USatm1976, 'Earth', RADIUS_EARTH, GRAV_EARTH), | ||
| AtmosphereModel.TROPICAL: (tropical_210A, 'Earth', RADIUS_EARTH, GRAV_EARTH), | ||
| AtmosphereModel.POLAR: (polar_210A, 'Earth', RADIUS_EARTH, GRAV_EARTH), | ||
| AtmosphereModel.HOT: (hot_210A, 'Earth', RADIUS_EARTH, GRAV_EARTH), | ||
| AtmosphereModel.COLD: (cold_210A, 'Earth', RADIUS_EARTH, GRAV_EARTH), | ||
| AtmosphereModel.MARS_REFERENCE: (MarsReference2024, 'Mars', RADIUS_MARS, GRAV_MARS), | ||
| AtmosphereModel.MARS_HELLAS_HOT: (MarsHellasHot, 'Mars', RADIUS_MARS, GRAV_MARS), | ||
| AtmosphereModel.MARS_HELLAS_COLD: (MarsHellasCold, 'Mars', RADIUS_MARS, GRAV_MARS), | ||
| AtmosphereModel.MARS_EQUATOR_HOT: (MarsEquatorHot, 'Mars', RADIUS_MARS, GRAV_MARS), | ||
| AtmosphereModel.MARS_EQUATOR_COLD: (MarsEquatorCold, 'Mars', RADIUS_MARS, GRAV_MARS), | ||
| AtmosphereModel.MARS_POLAR_HOT: (MarsPolarHot, 'Mars', RADIUS_MARS, GRAV_MARS), | ||
| AtmosphereModel.MARS_POLAR_COLD: (MarsPolarCold, 'Mars', RADIUS_MARS, GRAV_MARS), | ||
| AtmosphereModel.VENUS_REFERENCE: (VenusReference2021, 'Venus', RADIUS_VENUS, GRAV_VENUS), | ||
| } | ||
|
|
||
| try: | ||
| return atmosphere_lookup[atmosphere_model] | ||
| except KeyError: | ||
| raise ValueError(f'Could not find {atmosphere_model} in get_atmosphere_data().') |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.