# Variation of air density with height

• B
brotherbobby
TL;DR Summary
Is there a way to determine how air density varies with height? We all know that it falls, but what is the relation. I am looking for a function like ##\rho_{\text{air}}(x)## where ##x## is the height from the earth's surface.
Using the ideal gas equation ##PV = nRT\Rightarrow PV = \frac{m}{M} RT## where ##m,M## are the mass and molecular weights of the gas respectively.

This yields ##\frac{m}{V} = \frac{PM}{RT} = \rho##, the density of the gas at a point with pressure ##P##.

If only we can obtain the variation of pressure with height from the Earth's surface : ##P(x) = ?##, we could use it to find ##\rho(x)##.

Does anyone know?

Delta2

brotherbobby

Thank you and sorry to bother. Actually I found the wikipedia page a bit confusing. It's better explained on here : Barometric formula .

vanhees71
Gold Member
2022 Award
Caveat: That's for an isothermal atmosphere!

brotherbobby
Caveat: That's for an isothermal atmosphere!

Yes, I noticed, thank you. This means that the variation of density of air with height, ##\rho (x)## is dependent both on pressure and temperature of air with height. Is there a resource besides wikipedia on how to derive the temperature dependence? Wikipedia only gives the results.

Gold Member
2022 Award
For the derivation of the isothermal barometric formula assuming an ideal gas you have two posibilities.

(1) Thermodynamics

The phase-space distribution function is the Maxwell-Boltzmann function
$$f(\vec{x},\vec{p})=\exp\{[-\beta (H(\vec{x},\vec{p})-\mu \}.$$
$$H=\frac{\vec{p}^2}{2m} + m g z.$$
Integrating over ##\vec{p}## gives the density. We need it not with the absolute norm but just relative to ##z=0## and thus get
$$\rho(\vec{x})=\rho_0 \exp(-\beta m g z)$$
with ##\beta=1/(k_{\text{T}} T)## and ##m## is the mass of the gas molecules.

(2) Hydrostatic equation

$$\vec{\nabla} P=\rho \vec{g}.$$
For an isothermal change of state you have
$$P=\rho k_{\text{B}} T/m$$
and thus the equation gets
$$\vec{\nabla} \rho = -\frac{\rho}{k_{\text{B}} T} m g \vec{e}_z$$
and thus through integration
$$\rho=\rho_{0} \exp \left (-\frac{m g z}{k_{\text{B}} t} \right).$$
Of course the isothermal atmosphere is only a good approximation for not too large changes of height.

For a realistic barometric formula you need an empirical equation of state. E.g., the pressure as function of height. For details see

https://en.wikipedia.org/wiki/Barometric_formula

etotheipi
Gold Member
vanhees71
Homework Helper
From what I recall, the atmosphere is split into 3 or 4 regions, each region with it's own curve, for ballistic missile and space craft.

vanhees71
DrStupid
This means that the variation of density of air with height, ##\rho (x)## is dependent both on pressure and temperature of air with height. Is there a resource besides wikipedia on how to derive the temperature dependence?

The derivation is similar to the derivation for the isothermal case as demonstrated by @vanhees71 in #6. It also starts with the hydrostatic equation

##p' = - \rho \cdot g##

but assuming isententropic processes instead of isothermal changes:

##p \cdot V^\kappa = const.##

Together with the density

##\rho = \frac{m}{V} = \frac{{M \cdot n}}{V}##

and the ideal gas equation

##p \cdot V = n \cdot R \cdot T##

this results in the differential equation

##p' = - \frac{{M \cdot g \cdot p_0^{\frac{{\kappa - 1}}{\kappa }} }}{{R \cdot T_0 }}p^{\frac{1}{\kappa }} ##

with the solution

##p = p_0 \cdot \left[ {1 - \left( {1 - \frac{1}{\kappa }} \right) \cdot \frac{{M \cdot g}}{{R \cdot T_0 }} \cdot z} \right]^{\frac{\kappa }{{\kappa - 1}}} ##

and

##T = T_0 - \left( {1 - \frac{1}{\kappa }} \right) \cdot \frac{{M \cdot g}}{R} \cdot z##

But that only works within the troposphere because it is convection dominated. It fails in the stratosphere (which is radiation dominated).

vanhees71