diff --git a/aviary/docs/user_guide_unreviewed/subsystems/atmosphere.ipynb b/aviary/docs/user_guide_unreviewed/subsystems/atmosphere.ipynb index 316464286f..7f53060583 100644 --- a/aviary/docs/user_guide_unreviewed/subsystems/atmosphere.ipynb +++ b/aviary/docs/user_guide_unreviewed/subsystems/atmosphere.ipynb @@ -48,7 +48,7 @@ "metadata": {}, "source": [ "# User options reference for AtmosphereComp and AtmosphereGroup\n", - "There are some critical options you can pass to atmosphere that you should know about. These options will allow you to change which source data you use, swap between geocentric or geodetic altitude inputs, and add a temperature offset. Changing the source data swaps the akima splines used to calculate temperature, pressure, and density as a function of altitude. \n", + "There are some critical options you can pass to atmosphere that you should know about. These options will allow you to change which source data you use, swap between geopotential or geometric altitude inputs, and add a temperature offset. Changing the source data swaps the akima splines used to calculate temperature, pressure, and density as a function of altitude. \n", "\n", "All the options and their defaults and functions are shown below." ] @@ -134,11 +134,11 @@ "\n", "Your units inside of `_raw_data` should be one of the following: \n", "English: [altitude (ft, ), temperature (degF), pressure (inHg at 60degF), density (lbm/ft**3)]\n", - "Altitude can be in either in geodetic or deocentric\n", + "Altitude can be in either in geometric or geopotential\n", "Pressure will only translate properly if given in inHg at 60degF. However, many data sets use inHg at 30degF. \n", "\n", "SI Units: [altitude (m), temperature (degK), pressure (millibar), density (kg/m^3)]\n", - "Altitude can be in either in geodetic or deocentric\n", + "Altitude can be in either in geometric or geopotential\n", "\n", "If your units do not match either English or SI as designated above, you will need to modify the `build_akima_coefs` function to properly translate your raw data into SI units. (All calculations inside of atmosphere.py are happening in SI units with SI akima splines)\n", "\n", diff --git a/aviary/subsystems/atmosphere/atmosphere.py b/aviary/subsystems/atmosphere/atmosphere.py index ce7fdc5274..c87a262135 100644 --- a/aviary/subsystems/atmosphere/atmosphere.py +++ b/aviary/subsystems/atmosphere/atmosphere.py @@ -25,10 +25,10 @@ def initialize(self): self.options.declare( 'h_def', - values=('geopotential', 'geodetic'), - default='geodetic', + values=('geopotential', 'geometric'), + default='geometric', desc='The definition of altitude provided as input to the component. If ' - '"geodetic", it will be converted to geopotential based on Equation 19 in ' + '"geometric", it will be converted to geopotential based on Equation 19 in ' 'the original standard.', ) @@ -83,9 +83,9 @@ def initialize(self): ) self.options.declare( 'h_def', - values=('geopotential', 'geodetic'), + values=('geopotential', 'geometric'), default='geopotential', - desc='The definition of altitude provided as input to the component. If "geodetic",' + desc='The definition of altitude provided as input to the component. If "geometric",' 'it will be converted to geopotential based on Equation 19 in the original standard.', ) add_aviary_option(self, Settings.ATMOSPHERE_MODEL) @@ -102,7 +102,7 @@ def setup(self): self._dt = self.options['delta_T_Celcius'] - self._geodetic = self.options['h_def'] == 'geodetic' + self._geometric = self.options['h_def'] == 'geometric' self._R0 = 6_356_766 # (meters) The effective Earth Radius # From the U.S. Standard Atmosphere 1976 publication located here # https://www.ngdc.noaa.gov/stp/space-weather/online-publications/miscellaneous/us-standard-atmosphere-1976/us-standard-atmosphere_st76-1562_noaa.pdf @@ -183,7 +183,7 @@ def compute(self, inputs, outputs): table_points = self.source_data.alt h = inputs[Dynamic.Mission.ALTITUDE] - if self._geodetic: + if self._geometric: h = ( h / (self._R0 + h) * self._R0 ) # Equation 19 from the U.S. Standard Atmosphere 1976 publication @@ -244,7 +244,7 @@ def compute_partials(self, inputs, partials): h = inputs[Dynamic.Mission.ALTITUDE] dz_dh = 1.0 - if self._geodetic: + if self._geometric: dz_dh = (self._R0 / (self._R0 + h)) ** 2 h = h / (self._R0 + h) * self._R0 # Equation 19 from the original standard. @@ -308,7 +308,7 @@ def compute_partials(self, inputs, partials): ) partials[Dynamic.Atmosphere.SPEED_OF_SOUND, Dynamic.Mission.ALTITUDE][...] = dsos_dh.ravel() - if self._geodetic: + if self._geometric: partials[Dynamic.Atmosphere.TEMPERATURE, Dynamic.Mission.ALTITUDE][...] *= dz_dh partials[Dynamic.Atmosphere.STATIC_PRESSURE, Dynamic.Mission.ALTITUDE][...] *= dz_dh partials[Dynamic.Atmosphere.DENSITY, Dynamic.Mission.ALTITUDE][...] *= dz_dh diff --git a/aviary/subsystems/atmosphere/test/test_atmosphere.py b/aviary/subsystems/atmosphere/test/test_atmosphere.py index 9cd524a96c..15751c8f12 100644 --- a/aviary/subsystems/atmosphere/test/test_atmosphere.py +++ b/aviary/subsystems/atmosphere/test/test_atmosphere.py @@ -53,7 +53,7 @@ class USatm1976TestCase1(unittest.TestCase): - def test_geocentric(self): + def test_geopotential(self): self.prob = om.Problem() self.prob.model.add_subsystem( @@ -95,7 +95,7 @@ def test_geocentric(self): assert_check_partials(partial_data) - def test_geocentric_delta_T(self): + def test_geopotential_delta_T(self): self.prob = om.Problem() self.prob.model.add_subsystem( @@ -177,12 +177,12 @@ def test_geocentric_delta_T(self): assert_check_partials(partial_data) - def test_geodetic(self): + def test_geometric(self): self.prob = om.Problem() self.prob.model.add_subsystem( 'atmo', - AtmosphereComp(delta_T_Celcius=0, num_nodes=7, h_def='geodetic'), + AtmosphereComp(delta_T_Celcius=0, num_nodes=7, h_def='geometric'), promotes=['*'], ) @@ -219,12 +219,12 @@ def test_geodetic(self): assert_check_partials(partial_data) - def test_geodetic_delta_T(self): + def test_geometric_delta_T(self): self.prob = om.Problem() self.prob.model.add_subsystem( 'atmo', - AtmosphereComp(delta_T_Celcius=15, num_nodes=7, h_def='geodetic'), + AtmosphereComp(delta_T_Celcius=15, num_nodes=7, h_def='geometric'), promotes=['*'], ) diff --git a/aviary/variable_info/variable_meta_data.py b/aviary/variable_info/variable_meta_data.py index 89847c0d2b..4291555e99 100644 --- a/aviary/variable_info/variable_meta_data.py +++ b/aviary/variable_info/variable_meta_data.py @@ -6373,7 +6373,7 @@ meta_data=_MetaData, historical_name={'GASP': None, 'FLOPS': None}, units='ft', - desc='Current altitude of the vehicle', + desc='Current geometric altitude of the vehicle', default_value=0.0, multivalue=True, )