CHEM-271 · Lesson 2 of 12 · 24 min
Gases: ideal behaviour, real gases and the van der Waals equation
▶ Video coming soon A video version of this lesson is on the way.
Gases are the simplest state of matter and the natural place to begin physical chemistry. Their molecules are far apart, so to a first approximation they move independently, and the relation between pressure, volume, temperature and amount takes a simple universal form. The ideal gas law describes every gas at low enough pressure, whatever its chemistry, and it is the reference against which all real behaviour is measured. Real gases depart from it at high pressure and low temperature, and those departures carry information about the forces between molecules. This lesson builds the ideal gas law from its history and from molecular motion, then introduces the compression factor, the virial equation and the van der Waals equation, and ends with the critical point and the principle of corresponding states.
The gas laws
Robert Boyle, working with his assistant Robert Hooke, trapped air in the closed short arm of a J-shaped glass tube and added mercury to the long arm. In 1662 he reported that the volume of the trapped air was inversely proportional to the pressure: at constant temperature, \(PV\) is constant. In France the same law was found independently by Edme Mariotte in 1676 and is still called the Boyle–Mariotte law there.
The effect of temperature came later. Jacques Charles, a balloonist, found around 1787 that several gases expanded by the same fraction when heated through the same range, but he did not publish. Joseph Louis Gay-Lussac published precise measurements in 1802 and credited Charles; he also found that the pressure of a gas held at constant volume rises linearly with temperature. Extrapolated, both lines reach zero volume or zero pressure at about −273 °C, the first hint of an absolute zero of temperature. In modern form, \(V \propto T\) at constant pressure and \(P \propto T\) at constant volume, with T in kelvin.
Amedeo Avogadro proposed in 1811 that equal volumes of gases at the same temperature and pressure contain equal numbers of molecules, so that \(V \propto n\). Émile Clapeyron combined the three laws in 1834 into what we now write as the ideal gas equation, \(PV = nRT\). John Dalton had already observed in 1801 that in a mixture of gases each component exerts the pressure it would exert alone, so that the total pressure is the sum of partial pressures, \(P = \sum_i p_i\) with \(p_i = x_i P\), where \(x_i\) is the mole fraction.
Why the ideal gas law works: kinetic theory
The kinetic theory of gases, developed by Daniel Bernoulli in 1738 and put on a firm footing by Rudolf Clausius in 1857 and James Clerk Maxwell in 1860, explains the ideal gas law from molecular motion. Imagine N molecules of mass m in a box, moving randomly and colliding elastically with the walls. Each collision with a wall reverses one component of momentum, and the rate of such collisions is proportional to the speed. Adding up the momentum transferred per unit time per unit area gives \(PV = \tfrac{1}{3}Nm\langle v^2\rangle\). Comparing with \(PV = nRT = Nk_\mathrm{B}T\) shows that the mean translational kinetic energy per molecule is \(\tfrac{1}{2}m\langle v^2\rangle = \tfrac{3}{2}k_\mathrm{B}T\). Temperature is therefore a measure of the average kinetic energy of molecular motion.
The root-mean-square speed is \(v_\mathrm{rms} = \sqrt{3RT/M}\), where M is the molar mass in kilograms per mole. For nitrogen at 298 K it is about 515 m/s; for hydrogen it is 1920 m/s. The full distribution of speeds is the Maxwell–Boltzmann distribution, treated in PHYS-261. Two assumptions underlie the ideal gas law: the molecules occupy negligible volume compared with the container, and they exert no forces on each other except during collisions. Both fail when the gas is compressed. At high density the molecules' own volume is no longer small, and the attractive forces between them, which are always present, begin to matter.
Real gases and the compression factor
The simplest measure of non-ideality is the compression factor, \(Z = PV_\mathrm{m}/RT\), where \(V_\mathrm{m}\) is the molar volume. For an ideal gas Z = 1 at every pressure. For a real gas Z depends on pressure and temperature. At moderate pressure most gases have Z < 1, because attractions pull molecules together and make the gas easier to compress than an ideal gas. At high pressure every gas has Z > 1, because the molecules' finite size makes the gas harder to compress. Hydrogen and helium at room temperature have Z > 1 even at low pressure, because their attractions are so weak that the size effect dominates from the start.
Heike Kamerlingh Onnes, who later liquefied helium in 1908 and received the 1913 Nobel Prize in Physics, proposed in 1901 to express real-gas behaviour as a power series in the reciprocal molar volume: \(Z = 1 + B/V_\mathrm{m} + C/V_\mathrm{m}^2 + \cdots\). This is the virial equation, and B and C are the second and third virial coefficients. They depend on temperature, and statistical mechanics relates them exactly to the forces between pairs and triples of molecules. The second virial coefficient is negative at low temperature, where attractions dominate, and positive at high temperature. The temperature at which B = 0 is the Boyle temperature; there the gas obeys Boyle's law over an unusually wide range of pressure. For nitrogen the Boyle temperature is about 327 K.
The van der Waals equation
In his doctoral thesis of 1873, Johannes Diderik van der Waals proposed a simple equation that captures both kinds of non-ideality. He reasoned that the volume available to the molecules is not V but V − nb, where b is the volume excluded per mole by the molecules themselves. He also reasoned that attractions reduce the pressure on the walls, because a molecule about to strike the wall is pulled back by its neighbours; the reduction is proportional to the square of the density, so it is written \(a(n/V)^2\). The result is
\[\Bigl(P + \frac{an^2}{V^2}\Bigr)(V - nb) = nRT, \quad\text{or}\quad P = \frac{RT}{V_\mathrm{m} - b} - \frac{a}{V_\mathrm{m}^2}.\]
The constant a measures the strength of attraction and b the size of the molecules. Both are found by fitting experimental data, most often the critical constants. Van der Waals received the Nobel Prize in Physics in 1910 for this work. The equation was the first to explain why gases condense to liquids, and it showed that the same equation of state could describe both phases. Typical constants are listed below. The value of a is largest for polar or polarizable molecules such as water and carbon dioxide; b is roughly four times the actual volume of a mole of molecules.
| Gas | a (L² bar/mol²) | b (L/mol) | Tc measured (K) | Pc measured (bar) |
|---|---|---|---|---|
| He | 0.0346 | 0.0238 | 5.2 | 2.3 |
| H₂ | 0.2476 | 0.02661 | 33.2 | 13.0 |
| N₂ | 1.370 | 0.0387 | 126.2 | 33.9 |
| CH₄ | 2.283 | 0.04278 | 190.6 | 46.0 |
| CO₂ | 3.640 | 0.04267 | 304.1 | 73.8 |
| NH₃ | 4.225 | 0.0371 | 405.4 | 113.3 |
| H₂O | 5.536 | 0.03049 | 647.1 | 220.6 |
Because a and b are chosen to match the critical point, the table tells you nothing new about Tc and Pc for a given gas. What the equation adds is the shape of the isotherms everywhere else, and a qualitative explanation of condensation.
Isotherms, condensation and the critical point
Thomas Andrews, working in Belfast, measured the isotherms of carbon dioxide in 1869. Above 31 °C the isotherms were smooth curves, flattening as the temperature fell. Below 31 °C each isotherm had a horizontal section: as the gas was compressed, liquid appeared, and the pressure stayed constant while gas turned to liquid, until all the gas had condensed and the pressure rose steeply. The horizontal sections shrank as the temperature rose and vanished at a single point, the critical point, where liquid and gas become identical. Andrews named it and measured its temperature as about 31 °C.
The van der Waals equation reproduces this picture. Below the critical temperature its isotherms have an S-shaped loop, a region where pressure would increase with volume, which is mechanically unstable. James Clerk Maxwell showed in 1875 that the real isotherm replaces the loop with a horizontal line drawn so that the two areas it cuts off are equal; this equal-area construction gives the vapour pressure. At the critical temperature the loop shrinks to a point of inflection where both \((\partial P/\partial V)_T\) and \((\partial^2 P/\partial V^2)_T\) are zero. Solving these two conditions together with the equation gives
\[V_\mathrm{c} = 3b, \qquad P_\mathrm{c} = \frac{a}{27b^2}, \qquad T_\mathrm{c} = \frac{8a}{27Rb}, \qquad Z_\mathrm{c} = \frac{P_\mathrm{c}V_\mathrm{c}}{RT_\mathrm{c}} = \frac{3}{8}.\]
The measured critical compression factor is smaller than 3/8 = 0.375 for most real gases: about 0.29 for nitrogen and methane, 0.27 for carbon dioxide and 0.23 for water. The van der Waals equation is therefore only semi-quantitative near the critical point. Many better equations of state have been developed since, such as the Redlich–Kwong equation of 1949 and the Peng–Robinson equation of 1976, developed at the University of Alberta and still used throughout the chemical and petroleum industries. They keep the van der Waals idea of a repulsive term plus an attractive term but change the form of the attractive term.
Corresponding states
If pressure, volume and temperature are measured in units of their critical values, the reduced variables \(P_\mathrm{r} = P/P_\mathrm{c}\), \(V_\mathrm{r} = V_\mathrm{m}/V_\mathrm{c}\) and \(T_\mathrm{r} = T/T_\mathrm{c}\), the van der Waals equation loses its constants altogether: \(P_\mathrm{r} = 8T_\mathrm{r}/(3V_\mathrm{r} - 1) - 3/V_\mathrm{r}^2\). Van der Waals concluded that all gases should obey the same reduced equation of state, the principle of corresponding states. Real gases follow it surprisingly well, especially when their molecules are roughly spherical and nonpolar. Engineers use generalized charts of Z against reduced pressure at several reduced temperatures to estimate the behaviour of gases for which no detailed data exist.
The Joule–Thomson effect
When a real gas expands through a valve or porous plug from high to low pressure, with no heat exchanged, its temperature usually changes. James Joule and William Thomson measured this effect in 1852. Most gases cool at room temperature, because energy is used to pull molecules apart against their attractions, and this cooling is the basis of refrigeration and of the Linde process for liquefying air. Hydrogen and helium warm on expansion at room temperature; they cool only below their inversion temperatures, about 200 K for hydrogen and about 40 K for helium, which is why they must be precooled before they can be liquefied this way. In the van der Waals model the inversion temperature at low pressure is \(2a/Rb\), twice the Boyle temperature. PHYS-261 derives the Joule–Thomson coefficient with the help of the Maxwell relations that lesson 8 introduces here.
A worked example: ideal versus van der Waals
Worked problem
Pressure of compressed carbon dioxide
Calculate the pressure of 1.00 mol of CO₂ in a 0.500 L vessel at 300 K from the ideal gas law and from the van der Waals equation (a = 3.640 L² bar/mol², b = 0.04267 L/mol). Find Z for the van der Waals result.
Show solution
- Ideal: P = RT/Vm = (0.08314 × 300)/0.500 = 24.94/0.500 = 49.9 bar.
- Repulsive term: RT/(Vm − b) = 24.94/(0.500 − 0.04267) = 24.94/0.45733 = 54.5 bar.
- Attractive term: a/Vm² = 3.640/0.250 = 14.6 bar.
- Van der Waals: P = 54.5 − 14.6 = 40.0 bar.
- Z = PVm/RT = 40.0 × 0.500/24.94 = 0.80.
Answer: About 49.9 bar if ideal and 40.0 bar from the van der Waals equation; attractions dominate, so Z is about 0.80.
Attractions reduce the pressure by about 15 bar while the excluded volume raises it by about 5 bar, so the net effect at this density is a pressure about one fifth lower than the ideal value.
A program: van der Waals pressure, Z and critical constants
The program computes van der Waals critical constants for several gases and compares them with measured values, then finds the compression factor of nitrogen, methane and carbon dioxide at 320 K, just above the critical temperature of carbon dioxide, over a range of pressures. To find the molar volume at a given pressure it solves the cubic equation numerically, taking the largest root, which is the gas-like one.
R = 0.08314462618 # L bar/(K mol)
gases = { # a (L^2 bar/mol^2), b (L/mol), measured Tc (K), measured Pc (bar)
'H2': (0.2476, 0.02661, 33.2, 13.0),
'N2': (1.370, 0.0387, 126.2, 33.9),
'CH4': (2.283, 0.04278, 190.6, 46.0),
'CO2': (3.640, 0.04267, 304.1, 73.8),
'H2O': (5.536, 0.03049, 647.1, 220.6),
}
def p_vdw(V, T, a, b):
return R * T / (V - b) - a / V ** 2
def v_gas(P, T, a, b):
"""Largest real root of the van der Waals cubic, by bisection from the ideal side."""
hi = 2 * R * T / P + b
lo = b * 1.0001
# step down from hi until the pressure first exceeds P, so we bracket the gas-like root
V = hi
while p_vdw(V, T, a, b) < P and V > lo:
V *= 0.995
lo, hi = V, V / 0.995
for _ in range(100):
mid = 0.5 * (lo + hi)
if p_vdw(mid, T, a, b) > P: lo = mid
else: hi = mid
return 0.5 * (lo + hi)
print('gas Tc vdW Tc meas Pc vdW Pc meas Boyle T (vdW)')
for g, (a, b, Tc, Pc) in gases.items():
print(f'{g:4s} {8 * a / (27 * R * b):7.1f} {Tc:8.1f} {a / (27 * b * b):8.1f} {Pc:8.1f} {a / (R * b):10.0f} K')
print()
print('Z at 320 K P = 1 50 100 200 400 bar')
for g in ('N2', 'CH4', 'CO2'):
a, b = gases[g][:2]
zs = [P * v_gas(P, 320.0, a, b) / (R * 320.0) for P in (1, 50, 100, 200, 400)]
print(f'{g:12s}' + ''.join(f'{z:8.3f}' for z in zs))gas Tc vdW Tc meas Pc vdW Pc meas Boyle T (vdW) H2 33.2 33.2 13.0 13.0 112 K N2 126.2 126.2 33.9 33.9 426 K CH4 190.2 190.6 46.2 46.0 642 K CO2 304.0 304.1 74.0 73.8 1026 K H2O 647.0 647.1 220.6 220.6 2184 K Z at 320 K P = 1 50 100 200 400 bar N2 1.000 0.981 0.977 1.020 1.251 CH4 0.998 0.921 0.854 0.850 1.149 CO2 0.996 0.787 0.376 0.545 0.944
The van der Waals critical temperatures and pressures agree with the measured ones because a and b were fitted to them. The Boyle temperatures are less successful: the equation gives 426 K for nitrogen against the measured 327 K. The compression factors show the expected pattern. Nitrogen at 320 K is close to ideal up to a few hundred bar. Carbon dioxide, only just above its critical temperature, falls far below Z = 1 near 100 bar, where it is dense enough to behave almost like a liquid; this supercritical CO₂ is used as a solvent for decaffeinating coffee and extracting flavours.
Common mistakes
MistakeReal gases always have Z < 1.
InsteadAttractions make Z < 1 at moderate pressure; repulsions make Z > 1 at high pressure, and H₂ and He have Z > 1 at room temperature.
MistakeThe van der Waals b is the actual volume of a mole of molecules.
Insteadb is an excluded volume, roughly four times the volume of the molecules themselves.
MistakeA gas above its critical temperature can be liquefied by enough pressure.
InsteadAbove Tc there is no separate liquid phase; compression gives a dense supercritical fluid.
MistakeCharles published the law of volumes in 1787.
InsteadCharles did not publish; Gay-Lussac published the measurements in 1802 and credited him.
MistakeAll gases cool when they expand through a valve.
InsteadHydrogen and helium warm at room temperature; they cool only below their inversion temperatures.
MistakeThe van der Waals equation predicts Zc correctly.
InsteadIt predicts 3/8 = 0.375; real gases have Zc of about 0.23 to 0.29.
Summary and key terms
- The ideal gas law PV = nRT combines the laws of Boyle (1662), Charles and Gay-Lussac (1802) and Avogadro (1811).
- Kinetic theory gives PV = (1/3)Nm⟨v²⟩, so the mean translational energy per molecule is (3/2)kT.
- The compression factor Z = PVm/RT measures non-ideality; attractions lower Z and repulsions raise it.
- The van der Waals equation (1873) adds an excluded volume b and an attraction term a/Vm² to the ideal gas law.
- At the critical point Vc = 3b, Pc = a/27b² and Tc = 8a/27Rb; above Tc no liquid forms.
- In reduced variables all gases approximately obey the same equation of state.
- Partial pressure
- The pressure a component of a gas mixture would exert alone; pᵢ = xᵢP.
- Compression factor
- Z = PVm/RT, equal to 1 for an ideal gas.
- Virial equation
- Z = 1 + B/Vm + C/Vm² + ⋯, with temperature-dependent virial coefficients.
- Boyle temperature
- The temperature at which the second virial coefficient is zero.
- Critical point
- The temperature and pressure at which liquid and vapour become identical.
- Reduced variables
- Pressure, volume and temperature divided by their critical values.
- Joule–Thomson effect
- The temperature change of a real gas expanding through a throttle at constant enthalpy.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Calculate the rms speed of O₂ (M = 0.032 kg/mol) at 300 K.
Show answer
v = √(3 × 8.314 × 300/0.032) = 484 m/s.
Air is 78 parts in 100 N₂ by moles. What is the partial pressure of N₂ when the total pressure is 0.95 bar?
Show answer
p = 0.78 × 0.95 = 0.74 bar.
Use the van der Waals constants for N₂ to estimate its critical temperature.
Show answer
Tc = 8a/(27Rb) = 8 × 1.370/(27 × 0.08314 × 0.0387) = 126 K.
A gas has Z = 0.90 at 50 bar and 300 K. What is its molar volume?
Show answer
Vm = ZRT/P = 0.90 × 0.08314 × 300/50 = 0.449 L/mol.
Why is the a constant of water so much larger than that of nitrogen?
Show answer
Water molecules attract each other strongly through hydrogen bonds and dipole forces.
Write the van der Waals equation in reduced variables.
Show answer
Pr = 8Tr/(3Vr − 1) − 3/Vr².
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.