dT/dh = −Mg/R. For nitrogen (M = 28 g/mol) the temperature falls by about 33 K for every kilometre of height. With your numbers, dT/dh = − K/km (− K/m).
Problem statement
A tall cylindrical vessel with gaseous nitrogen stands in a uniform gravitational field with free-fall acceleration g. The temperature of the nitrogen changes along the height h so that its density is the same throughout the volume. Find the temperature gradient dT/dh.
We assume nitrogen has molar mass M = 28 g/mol and g = 9.81 m/s². This means the default answer is −33.0 K/km. Sliders let you change the gas and the gravity.
We assume sample values T0 = 300 K and p0 = 101.3 kPa at the bottom. This means the page can show real temperatures and pressures. They do not change the gradient.
We assume the gas is ideal and at rest. This means p = ρRT/M holds and the layers are in balance.
Symbols: h is height, T is temperature, p is pressure, ρ is density, M is molar mass, R = 8.314 J/(mol K) is the gas constant.
The big idea in plain words
Gas lower down must hold up the gas above it, so the pressure falls as you go up. If the temperature were the same everywhere, the density would fall with the pressure. Here the density must stay the same. A gas of fixed density has a pressure in proportion to its temperature. So to make the pressure fall by the right amount, the temperature must fall too. The weight of a thin layer decides how fast.
The solution in each frame
Lab frame
The vessel and the gas are at rest. The full solution is in the next section.
Other frames
No other frame is needed. Nothing moves, so one frame is enough.
The solution step by step
Take a thin layer of thickness dh at height h, with area S. The gas below pushes up with force pS. The gas above pushes down with (p + dp) S. The weight of the layer is ρ g S dh. The layer is at rest, so the forces balance:
Cancel pS and S:
For an ideal gas, p = ρRT/M. The density ρ is the same at every height, so only T changes:
Set the two expressions for dp equal: (ρR/M) dT = −ρ g dh. The ρ cancels, and
For nitrogen: M = 0.028 kg/mol, so dT/dh = −0.028 × 9.81 / 8.314 = −0.0330 K/m = −33.0 K/km. For the gas now on screen, dT/dh = − K/km.
A separate check does not use the formula for the gradient. It takes the temperature line from the page, integrates the balance equation dp/dh = −ρg step by step (fourth-order Runge-Kutta, 500 steps), and watches the density ρ = Mp/(RT) as it goes. The density changes by at most (relative), which is rounding error. So this gradient does keep the density the same.
Five methods
1. Force method
This is the method used above: balance the forces on a thin layer.
2. Energy method
Not needed. Only the balance of one layer matters.
3. Graph method
The temperature graph is a straight line with slope −Mg/R. The pressure graph is a straight line too, because p is in proportion to T. The density graph is flat.
4. Calculus method
Write p = ρ(R/M)T and differentiate with ρ constant: dp/dh = ρ(R/M) dT/dh. Equate this to −ρg.
5. Check method
Units: kg/mol × m/s² divided by J/(mol K) gives K/m. Limits: a heavier gas or stronger gravity gives a steeper fall. For very low gravity the gradient goes to zero, which matches a gas with the same temperature and density everywhere.
Fastest: the force method. Most reliable: the numerical integration of the balance equation.
What each slider changes
| Control | Changes the answer? | What it changes |
|---|---|---|
| Molar mass M | Yes | The gradient, the temperature line, the density and all graphs |
| Free-fall acceleration g | Yes | The gradient, the temperature line, the pressure step and all graphs |
| Bottom temperature T0 | No | Where the temperature line starts, the pressure, the density and the colours |
| Bottom pressure p0 | No | The pressure line and the density |
| Height of the layer | No | The layer position, T and p there, and the cyan dot |
| Given-answer mode | Sets M | The page finds the molar mass that gives the chosen gradient |
Parameters
| Quantity | Symbol | Value used |
|---|---|---|
| Molar mass | M | g/mol |
| Free-fall acceleration | g | m/s² |
| Bottom temperature | T0 | K |
| Density | ρ | kg/m³ |
| Temperature gradient | dT/dh | − K/km |
| Height where T reaches zero | km |
Exam traps
- Using M in grams per mole. The formula needs kilograms per mole, or the answer is 1000 times too big.
- Forgetting the minus sign. The temperature falls as height rises.
- Using the isothermal formula p = p0 e^(−Mgh/RT). That one keeps T fixed and lets the density fall. Here the density is fixed.
- Writing dp = +ρ g dh. The pressure drops with height, so dp is negative.
- Using M = 29 (air) for nitrogen. That gives 34.2 K/km instead of 33.0 K/km.