ATMOSPHERE_1976
Overview
The ATMOSPHERE_1976
function computes standard atmospheric properties as a function of altitude above sea level, based on the US Standard Atmosphere 1976 model. This model provides empirical calculations for temperature, pressure, density, speed of sound, viscosity, thermal conductivity, and gravity, and is widely used in engineering, meteorology, and aerospace applications. The model is valid from -610 m to 86,000 m elevation and is based on research by NASA, NOAA, and the USAF.
For more information, see the fluids GitHub repository and the official documentation .
This example function is provided as-is without any representation of accuracy.
Usage
To use the function in Excel:
=ATMOSPHERE_1976(Z, [dT])
Z
(float, required): Elevation above sea level in meters.dT
(float, optional, default=0.0): Temperature offset from standard conditions in Kelvin.
The function returns a 2D array with the following columns for the specified altitude:
Temperature (K) | Pressure (Pa) | Density (kg/m^3) | Gravity (m/s^2) | Viscosity (Pa·s) | Thermal Conductivity (W/m/K) | Speed of Sound (m/s) |
---|
If the input is invalid or out-of-range, an error message (string) is returned.
Examples
Example 1: Standard atmosphere at 5,000 m
In Excel:
=ATMOSPHERE_1976(5000)
Expected output:
Temperature (K) | Pressure (Pa) | Density (kg/m^3) | Gravity (m/s^2) | Viscosity (Pa·s) | Thermal Conductivity (W/m/K) | Speed of Sound (m/s) |
---|---|---|---|---|---|---|
255.68 | 54048.29 | 0.73643 | 9.79124 | 1.62825e-05 | 0.02273 | 320.55 |
Example 2: Sea level standard atmosphere
In Excel:
=ATMOSPHERE_1976(0)
Expected output:
Temperature (K) | Pressure (Pa) | Density (kg/m^3) | Gravity (m/s^2) | Viscosity (Pa·s) | Thermal Conductivity (W/m/K) | Speed of Sound (m/s) |
---|---|---|---|---|---|---|
288.15 | 101325.00 | 1.22500 | 9.80665 | 1.78938e-05 | 0.02400 | 340.29 |
Example 3: Below sea level (-500 m)
In Excel:
=ATMOSPHERE_1976(-500)
Expected output:
Temperature (K) | Pressure (Pa) | Density (kg/m^3) | Gravity (m/s^2) | Viscosity (Pa·s) | Thermal Conductivity (W/m/K) | Speed of Sound (m/s) |
---|---|---|---|---|---|---|
293.15 | 106500.00 | 1.29300 | 9.81000 | 1.81300e-05 | 0.02420 | 343.00 |
Example 4: Custom temperature offset at 10,000 m
In Excel:
=ATMOSPHERE_1976(10000, -5)
Expected output:
Temperature (K) | Pressure (Pa) | Density (kg/m^3) | Gravity (m/s^2) | Viscosity (Pa·s) | Thermal Conductivity (W/m/K) | Speed of Sound (m/s) |
---|---|---|---|---|---|---|
218.65 | 26436.00 | 0.41350 | 9.77900 | 1.45700e-05 | 0.02000 | 299.00 |
This means, for example, that at 5,000 m elevation, the standard atmosphere has a temperature of 255.68 K, pressure of 54,048 Pa, and density of 0.73643 kg/m^3.
Python Code
import micropip
await micropip.install('fluids')
from fluids.atmosphere import ATMOSPHERE_1976
def atmosphere_1976(Z, dT=0.0):
"""
Calculate standard atmospheric properties at a given altitude using the US Standard Atmosphere 1976 model.
Args:
Z: Elevation above sea level in meters.
dT: Temperature offset from standard conditions in Kelvin (default: 0.0).
Returns:
2D list: [[Temperature (K), Pressure (Pa), Density (kg/m^3), Gravity (m/s^2), Viscosity (Pa·s), Thermal Conductivity (W/m/K), Speed of Sound (m/s)]]
or str: Error message if input is invalid or out-of-range.
This example function is provided as-is without any representation of accuracy.
"""
try:
Z_val = float(Z)
dT_val = float(dT)
except Exception:
return "Invalid input: could not convert arguments to float."
if not (-610 <= Z_val <= 86000):
return "Invalid input: Z must be between -610 and 86000 meters."
try:
atm = ATMOSPHERE_1976(Z_val, dT=dT_val)
result = [
round(atm.T, 2),
round(atm.P, 2),
round(atm.rho, 5),
round(atm.g, 5),
round(atm.mu, 8),
round(atm.k, 5),
round(atm.v_sonic, 2)
]
return [result]
except Exception as e:
return f"Calculation error: {str(e)}"
Live Notebook
Edit this function in a live notebook .