From 4156dab0a3f7f952567a46ebbe611fe5f80cee0f Mon Sep 17 00:00:00 2001 From: Guilherme Date: Fri, 26 May 2023 14:56:36 +0200 Subject: [PATCH] BUG: geopotential and geometric heights were confused --- rocketpy/Environment.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rocketpy/Environment.py b/rocketpy/Environment.py index 27143bb67..2fe907140 100644 --- a/rocketpy/Environment.py +++ b/rocketpy/Environment.py @@ -2903,7 +2903,6 @@ def loadInternationalStandardAtmosphere(self): # Convert geopotential height to geometric height ER = self.earthRadius height = [ER * H / (ER - H) for H in geopotential_height] - height = geopotential_height # Save international standard atmosphere temperature profile self.temperatureISA = Function( @@ -2917,12 +2916,12 @@ def loadInternationalStandardAtmosphere(self): g = self.standard_g R = self.airGasConstant - # Create function to compute pressure profile + # Create function to compute pressure at a given geometric height def pressure_function(h): # Convert geometric to geopotential height H = ER * h / (ER + h) - H = h + # Check if height is within bounds, return extrapolated value if not if H < -2000: return pressure[0] elif H > 80000: @@ -3019,6 +3018,8 @@ def calculateDynamicViscosity(self): """Compute the dynamic viscosity of the atmosphere as a function of height by using the formula given in ISO 2533 u = B*T^(1.5)/(T+S). This function is automatically called whenever a new atmospheric model is set. + Warning: This equation is invalid for very high or very low temperatures + and under conditions occurring at altitudes above 90 km. Parameters ----------