Skip to content

BUG: fix standard atmosphere #369

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

Merged
merged 1 commit into from
May 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions rocketpy/Environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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:
Expand Down Expand Up @@ -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
----------
Expand Down