P — kPa V — L T from KE(KE) — K

Speed distribution

Speciesvp / m s⁻¹v̄ / m s⁻¹vrms / m s⁻¹measured vrms

Law plot

The kinetic model of a gas

The kinetic theory explains the gas laws with a few assumptions: the gas is made of a huge number of molecules in random motion; their own volume is negligible compared with the container; they exert no forces on each other except during brief, perfectly elastic collisions; and the time between collisions is much longer than the collisions themselves.

Where pressure comes from

Intuition first: pressure is the push of countless molecules drumming on the walls. More hits per second, or harder hits, mean more pressure. A molecule of mass $m$ hitting a wall with velocity component $v_x$ bounces back with $-v_x$, so it transfers momentum $2mv_x$. Adding up the collisions per unit time and per unit area for $N$ molecules in a volume $V$ gives ($\langle v^2\rangle$ means the average of the squared speed over all molecules, and $\langle E_k\rangle$ the average kinetic energy):

$$P = \frac{1}{3}\,\frac{N m\langle v^2\rangle}{V}\qquad\Longleftrightarrow\qquad PV = \tfrac{2}{3}\,N\,\langle E_k\rangle$$

The simulator measures pressure in exactly this way: it adds up $2mv_\perp$ for every collision with the six walls and divides by the wall area and the averaging time. That is the "P measured" readout.

Temperature is average kinetic energy

$$\langle E_k\rangle = \tfrac12 m\langle v^2\rangle = \tfrac32 k_B T\qquad\Rightarrow\qquad PV = N k_B T = nRT$$

with the Boltzmann constant $k_B = 1.380\,649\times10^{-23}\ \mathrm{J\,K^{-1}}$, $R = N_A k_B = 8.314\ \mathrm{J\,mol^{-1}\,K^{-1}}$ (the gas constant; $N_A$ is Avogadro's number, $6.022\times10^{23}$ per mole). So temperature is simply a measure of how fast the molecules are moving on average. At the same temperature, all gases have the same average kinetic energy, so lighter molecules move faster.

The gas laws

Each classic law is just $PV = nRT$ with $n$ and one other quantity held fixed. Why they work: halve the volume and every molecule reaches a wall twice as often, so pressure doubles (Boyle); heat the gas and molecules hit harder and more often, so either the pressure rises in a rigid box (Gay-Lussac) or the gas pushes a free piston outwards until the pressure is back to normal (Charles). The Experiment buttons in the lab lock the right quantities for each law.

$$\textbf{Boyle}\ (T\text{ const}):\ PV = \text{const}$$
$$\textbf{Charles}\ (P\text{ const}):\ \frac{V}{T} = \text{const}$$
$$\textbf{Gay-Lussac}\ (V\text{ const}):\ \frac{P}{T} = \text{const}$$

For a fixed amount of gas the three combine into the combined gas law, $P_1V_1/T_1 = P_2V_2/T_2$. One mole of an ideal gas occupies 22.7 L at 273.15 K and 100 kPa (22.4 L at 101.325 kPa), and 24.8 L at 298 K and 100 kPa.

Temperatures must be in kelvin. Extrapolating a Charles's law plot to zero volume gives absolute zero, −273.15 °C. Dalton's law: in a mixture each gas contributes a partial pressure $p_i = n_i RT/V$, and $P = \sum p_i$. This lab always has two species, so you can check it.

The Maxwell–Boltzmann distribution

Collisions constantly redistribute energy, and the speeds settle into the Maxwell–Boltzmann distribution:

$$f(v) = 4\pi\left(\frac{m}{2\pi k_B T}\right)^{3/2} v^2\, e^{-mv^2/2k_BT}$$
$$\begin{gathered}v_p = \sqrt{\frac{2RT}{M}}\\ \bar v = \sqrt{\frac{8RT}{\pi M}}\\ v_\text{rms} = \sqrt{\frac{3RT}{M}}\\ (v_p < \bar v < v_\text{rms})\end{gathered}$$

Here $M$ is the molar mass in kg mol⁻¹. Raising $T$ or lowering $M$ shifts the peak to higher speed and flattens it; the area under the curve is always 1.

Graham's law of effusion

Effusion is the escape of gas through a tiny hole, smaller than the mean free path (the average distance a molecule travels between collisions), so molecules leave one at a time without jostling. The rate is proportional to the mean speed, so at equal temperature and pressure

$$\frac{\text{rate}_A}{\text{rate}_B} = \sqrt{\frac{M_B}{M_A}}$$

About this model

The particles move in a three-dimensional box (depth is shown by size and brightness) with real molecular speeds in m s⁻¹, slowed down on screen so you can follow them. Volumes and amounts are scaled: each particle stands for 5.0 mmol. The pressure readout is computed from the actual wall impulses and converted to kPa with the same scale factors, so it scatters around $nRT/V$ by up to about 7 %, just as a real, very small sample would; read the average over several seconds. The heater acts as a thermostat by re-thermalising molecules at random, as if they had just bounced off the hot wall. With insulated walls this stops, and moving the piston changes the temperature (adiabatic compression or expansion). While the piston moves, the gas is fast-forwarded so the compression is slow compared with molecular motion, as in a real cylinder. Particle–particle collisions use a small molecular diameter, so the excluded-volume correction is only about 1 %. Every particle is a point mass with translational energy only, so diatomic N₂ behaves like a monatomic gas here ($\gamma = 5/3$); real N₂ also stores rotational energy ($\gamma \approx 1.4$, $TV^{0.4}$ = const) and warms less on the same compression.

Example 1: Pressure of the default mixture

100 He + 100 N₂ particles = 1.00 mol at 300 K in 25.0 L (the default state).

  1. $P = \dfrac{nRT}{V} = \dfrac{1.00\times8.314\times300}{25.0\times10^{-3}} = 9.98\times10^{4}\ \mathrm{Pa} = $ 99.8 kPa, about one atmosphere.
  2. Dalton: each gas has $n = 0.500$ mol, so each partial pressure is 49.9 kPa.
  3. Check the "P measured" readout: averaged over several seconds it should sit close to 99.8 kPa, though single readings can stray by several per cent.

Example 2: Molecular speeds of helium at 300 K

  1. $M = 4.00\times10^{-3}$ kg mol⁻¹, $RT = 8.314\times300 = 2494$ J mol⁻¹.
  2. $v_p = \sqrt{2RT/M} = \sqrt{2\times2494/0.004} = $ 1117 m s⁻¹.
  3. $\bar v = \sqrt{8RT/\pi M} = $ 1260 m s⁻¹; $v_\text{rms} = \sqrt{3RT/M} = $ 1368 m s⁻¹.
  4. For N₂ ($M = 0.028$): 422, 476 and 517 m s⁻¹. The ratio is $\sqrt{28/4} = 2.65$ for every one of them.

Example 3: Boyle's law

At constant temperature a gas at 99.8 kPa in 25.0 L is compressed to 10.0 L: $P_2 = P_1V_1/V_2 = 99.8\times25.0/10.0 = $ 250 kPa. Try it in Boyle mode.

Example 4: Charles's law

At a constant 100 kPa, 1.00 mol occupies $V = nRT/P = 24.9$ L at 300 K. Heating to 450 K gives $V_2 = V_1 T_2/T_1 = 24.9\times450/300 = $ 37.4 L. In Charles mode, set the load to 100 kPa and the heater to 450 K.

Example 5: Graham's law

Helium and nitrogen effuse through the same hole: $\text{rate(He)}/\text{rate(N}_2) = \sqrt{28.0/4.00} = $ 2.65. In Effusion mode count how many of each have crossed after the first few seconds.

Example 6: van der Waals CO₂

1.00 mol CO₂ in 0.500 L at 300 K ($a = 0.364\ \mathrm{Pa\,m^6\,mol^{-2}}$, $b = 4.27\times10^{-5}\ \mathrm{m^3\,mol^{-1}}$): $P = \dfrac{nRT}{V-nb} - \dfrac{an^2}{V^2} = \dfrac{2494}{4.573\times10^{-4}} - \dfrac{0.364}{2.5\times10^{-7}} = 5.45 - 1.46 = $ 4.00 MPa, compared with 4.99 MPa for an ideal gas ($Z = 0.80$). Attractions dominate at this density.

Challenges (checked automatically)

    Guided experiments

    1. Boyle. In Boyle mode record points at 10, 15, 20, 30, 40 and 50 L. Switch to "P vs 1/V": the points should lie on a straight line through the origin with gradient $nRT$. Keep the temperature and particle numbers fixed; for the default 1.00 mol at 300 K expect a gradient of $1.00\times8.314\times300 = 2494$ kPa L, and expect single points to scatter by a few per cent, so average each reading.
    2. Charles. Set the load to 100 kPa and record V at five temperatures from 150 K to 900 K. Extend the line back to V = 0: where does it cut the temperature axis? Expect a straight line through 0 K (−273 °C), with V rising by $nR/P = 0.0831$ L for every kelvin, because at constant pressure $V \propto T$ on the absolute scale.
    3. Adiabatic heating. Turn on insulated walls in Free mode and push the piston quickly from 50 L to 10 L. Why does T rise even though the heater is off? Compare with $TV^{2/3}$ = const for a monatomic gas. Starting at 300 K, expect a final temperature near $300\times(50/10)^{2/3} \approx 880$ K: the piston does work on the gas and, with no heat able to leave, all of it raises the kinetic energy of the particles.
    4. Speed and mass. Put He and Xe in the box at the same temperature. Compare their histograms and the ratio of their $v_\text{rms}$ with $\sqrt{131/4}$. Expect a narrow, slow Xe peak and a broad, fast He one, with $v_\text{rms}$ about 1370 and 240 m s⁻¹ at 300 K, a ratio of 5.7: the same average kinetic energy shared by masses 33 times apart.
    5. Where does the distribution come from? Turn on insulated walls, turn particle collisions off and press Reset: every molecule starts with the same speed and the histogram stays a spike. Now allow collisions and watch it relax to the Maxwell–Boltzmann shape.

    When the ideal gas law fails

    Real molecules have a finite size and attract each other. Van der Waals corrected the ideal gas equation for both effects:

    $$\left(P + \frac{a n^2}{V^2}\right)\left(V - nb\right) = nRT$$

    $b$ is the excluded volume per mole; $a$ measures the attraction. For CO₂, $a = 3.640\ \mathrm{L^2\,bar\,mol^{-2}}$ and $b = 0.04267\ \mathrm{L\,mol^{-1}}$. The compressibility factor $Z = PV/nRT$ tells you how far from ideal a gas is: $Z<1$ when attractions dominate, $Z>1$ when repulsion (molecular size) dominates.

    300 K
    Below the critical temperature of CO₂ ($T_c = 304$ K from experiment; the van der Waals constants give $T_c = 8a/27Rb = 304$ K), the van der Waals curve develops a loop where the gas would actually condense to a liquid. The real isotherm is flat across the loop (Maxwell equal-area construction).

    Ideal behaviour is a good approximation at low pressure and high temperature, when molecules are far apart and moving fast enough that attractions hardly matter.