When you learn PV = nRT in high school, the equation is simply handed to you as “that’s just how it is.” Here we start from each individual molecule flying around in a box and build up, one step at a time, pressure, temperature, internal energy, enthalpy, entropy, and specific heat. All we will need along the way is mechanics and counting.
Suppose a box of volume V contains N molecules, each of mass m. When we call it an “ideal gas,” we have thrown away the following two things.
However, if we take “exert no forces on one another” literally, each molecule keeps its initial velocity forever and the gas can never reach an equilibrium state. The correct statement is that the molecules do collide very occasionally and exchange energy, but those collisions are so rare that they do not affect the equation of state.
Consider a cube of side L and focus on the right-hand wall, which is perpendicular to the x axis. When a molecule whose x component of velocity is vx bounces off this wall, the x component of its momentum changes from mvx to −mvx. By the law of action and reaction, the impulse that the wall receives is
Before this molecule can hit the same wall again, it has to make a round trip across the box, so it takes to come back. Hence the average force that this one molecule exerts on the wall is
Adding up the contributions of N molecules and dividing by the wall area L² gives the pressure. Using for the average, we can write
A gas has no preferred direction (it is isotropic), so and adding the three gives as the total. In other words, . Substituting this, we get
Here is the translational kinetic energy per molecule.
If we compare the experimentally known PV = NkBT with Eq. (2.1), we can read off what temperature is.
What a thermometer measures is a quantity proportional to the average translational kinetic energy per molecule. The 3 comes from the three directions x, y, z, and each degree of freedom receives (1/2)kBT. This is the equipartition theorem.
Eq. (3.1) speaks only of the average. How the speeds of individual molecules are scattered follows from the canonical distribution (a state of energy ε appears in proportion to e−ε/kBT). In velocity space, multiply by the area 4πv² of a spherical shell of radius v, and we get
Three representative speeds follow from this distribution. They are listed in increasing order.
| Name | Definition | Value | N₂ at 300 K |
|---|---|---|---|
| Most probable speed vp | The v at which f(v) is maximum | 422 m/s | |
| Mean speed v̄ | ∫v f(v)dv | 476 m/s | |
| Root-mean-square speed vrms | √⟨v²⟩ (this is the one that matters for pressure) | 517 m/s |
From here on, just by writing down a single function, U, S, and P all come out mechanically. For the states i (energy εi) that one molecule can take, define
as the molecular partition function. Since the molecules exert no forces on one another, the partition function of the whole system is a product of single-molecule ones. However, the molecules are indistinguishable, so we divide by N! to remove the overcounting of identical arrangements.
The Helmholtz free energy is A = −kBT ln Z. Using Stirling’s approximation ln N! ≈ N ln N − N, we get
The rest is just a matter of applying thermodynamic relations.
We construct the partition function for translational motion. The energy levels of a particle confined in a box of side L are, from quantum mechanics (a square-well potential), given by . The level spacing is extremely fine at room temperature, so the sum can be replaced by an integral. Multiplying the contributions of the three directions gives
Λ is the thermal de Broglie wavelength, “the quantum-mechanical spread of a molecule moving about at that temperature.” For N₂ at 300 K it is about 19 pm. ztrans = V/Λ³ can be read as a count of how many “places” for a molecule there are in the box.
The only place where V enters is ztrans (neither rotation nor vibration has anything to do with the size of the box). So if we obtain the pressure from Eqs. (4.3) and (4.4), we get
Molecules do not only move: they also rotate, and the atoms in them stretch and compress like springs. Since these motions are independent of one another, the partition function splits into a product.
Since ln z splits into a sum, both U in Eq. (4.4) and the specific heat become sums of the separate contributions. For the rotation of a linear molecule and the vibration of a single spring, we have
θr and θv are called characteristic temperatures and represent “the temperature needed to awaken that motion.” σ is the symmetry number, the number of ways of rotating the molecule so that it coincides with itself (2 for a homonuclear diatomic molecule such as N₂ or O₂).
If the temperature is much higher than the characteristic temperature, the sum can be replaced by an integral, which gives and hence Urot = NkBT (for 2 degrees of freedom). Conversely, if the temperature is much lower than the characteristic temperature, only the first term of the sum survives, z becomes a constant, and it no longer contributes to U. This is called freezing out.
Fig. 1. Temperature dependence of the molar heat capacity at constant volume, CV/R. From the bottom, the contributions of translation (always 3/2), rotation, and vibration are stacked up. The vertical dotted lines mark the characteristic temperatures θr and θv; check that the staircase rises by one step at each of them.
| Gas | θr [K] | θv [K] | CV/R at 298 K | γ | Motions awake at room temperature |
|---|---|---|---|---|---|
| He, Ne, Ar | — | — | 1.500 | 1.667 | Translation only (3 degrees of freedom) |
| H₂ | 85.4 | 5987 | 2.502 | 1.400 | Translation + rotation |
| N₂ | 2.86 | 3352 | 2.502 | 1.400 | Translation + rotation |
| O₂ | 2.07 | 2239 | 2.531 | 1.395 | Translation + rotation (a little vibration) |
| CO₂ | 0.56 | 960 (×2), 1918, 3380 | 3.467 | 1.288 | Translation + rotation + bending vibration |
The columns of CV/R and γ are not measured values but calculated values, obtained by putting this page’s spectroscopic constants into Eqs. (6.1)–(6.2) and then using Eq. (4.4). For H₂ alone there is a slight discrepancy from the measured value, as described in §10; working back from the measured CP = 28.84 J/(mol·K) gives CV/R ≈ 2.469 and γ ≈ 1.405.
CO₂ ends up with an in-between value, neither (5/2)R nor (7/2)R, because the characteristic temperature of its bending vibration is as low as 960 K, so that it is already about half awake at room temperature. It is a good example of a case where the classical way of counting specific heat by “the number of degrees of freedom” does not work.
Put ztrans = V/Λ³ and U = (3/2)NkBT into Eq. (4.4). For a monatomic gas there is no rotation or vibration, so that is all there is to it.
This is the Sackur–Tetrode equation. What is inside is V/(NΛ³) — that is, the logarithm of how many times larger the volume available to one molecule is than that molecule’s quantum-mechanical spread. The more sparsely the molecules are placed in a large room, the more states there are and the larger the entropy.
When there is rotation or vibration, the remaining factors of Eq. (6.1) are simply added.
The N! acts only on the N in ztrans/N. Rotation and vibration concern the inside of a molecule, so they receive no correction for “indistinguishability.”
From Eq. (7.1) the changes familiar from textbooks follow immediately as well. Holding T fixed and doubling only V gives
When only the temperature is changed, the temperature dependence of the quantity inside the logarithm, Λ³ ∝ T−3/2 (and, at constant pressure, additionally V ∝ T), gives first, for a monatomic gas, ΔS = n(3/2)R ln(T₂/T₁) (constant volume) and ΔS = n(5/2)R ln(T₂/T₁) (constant pressure). When there is rotation or vibration, the contribution from the internal-degree-of-freedom terms of Eq. (7.2) is added as well, and by using CV,m and CP,m that include that contribution we get the same form, ΔS = nCV,m ln(T₂/T₁) (constant volume) and ΔS = nCP,m ln(T₂/T₁) (constant pressure). The simulator’s ② calculates ΔS directly from Eq. (7.2), but in the range where CV,m does not depend on temperature, as for a monatomic gas, it agrees with these ln formulas to six decimal places. In the temperature range where rotation and vibration are awakening, however, CV,m itself varies with temperature, so the correct expressions are ΔS = n∫CV,mdT/T (constant volume) and ΔS = n∫CP,mdT/T (constant pressure). If a gas whose vibration is just beginning to awaken at room temperature, such as CO₂, is heated by a large amount, it deviates from the ln formulas, but the value obtained directly from Eq. (7.2) is always the correct one.
When we heat a gas, the heat required differs depending on whether we hold the volume fixed or hold the pressure fixed. Let us write the first law with W for the work done by the gas.
At constant volume, dV = 0, so W = 0. The heat added becomes internal energy as it is.
At constant pressure, heating makes the piston move out, and the gas does work W = PΔV. That much extra heat has to be supplied. The quantity that builds this “extra amount” into the equations from the start is the enthalpy.
Enthalpy is not so much “a kind of energy” as a quantity constructed as a ledger from which the heat flowing in or out at constant pressure can be read directly. We express the heat of a chemical reaction by ΔH because experiments are usually carried out under atmospheric pressure.
For an ideal gas PV = nRT, so H = U + nRT. Differentiating both sides with respect to T gives
The argument so far has stepped into the classical approximation at the point in Eq. (5.1) where we “replaced the sum by an integral.” That is allowed when the quantum-mechanical spread Λ of a molecule is much smaller than the spacing between molecules.
| Gas and state (1 atm) | Λ [pm] | Mean spacing [pm] | Λ/spacing | Verdict |
|---|---|---|---|---|
| N₂ 300 K (air at room temperature) | 19.0 | 3450 | 0.0055 | Classical approximation is sufficient |
| Ar 300 K | 15.9 | 3450 | 0.0046 | Classical approximation is sufficient |
| N₂ 77.4 K (boiling point) | 37.5 | 2190 | 0.017 | Still fine |
| H₂ 20.3 K (boiling point) | 273 | 1400 | 0.19 | Doubtful |
| He 4.22 K (boiling point) | 425 | 832 | 0.51 | Classical approximation breaks down |
At its boiling point, helium has a Λ that is as much as half the spacing between molecules. Here the molecules have to be counted afresh as “indistinguishable particles,” and indeed liquid helium shows superfluidity, a behavior that classical physics cannot explain.
Let us check whether the equations so far are really correct by comparing them with measured values. The “Calculated” columns below were obtained with exactly the same code that this page and the simulator use, from nothing but the mass of the molecule and the spectroscopic constants (the rotational constant B₀ and the normal-mode frequencies). The “Measured” values are those of the NIST-JANAF thermochemical tables. However, as noted in §7, the three monatomic rows are a circular comparison, and the rows of molecular species are the ones that amount to a real test.
| Gas | S°(298.15 K, 1 bar) [J/(mol·K)] | CP°(298.15 K) [J/(mol·K)] | ||||
|---|---|---|---|---|---|---|
| Calculated | Measured | Difference | Calculated | Measured | Difference | |
| He | 126.15 | 126.15 | 0.00 | 20.79 | 20.79 | 0.00 |
| Ne | 146.33 | 146.33 | 0.00 | 20.79 | 20.79 | 0.00 |
| Ar | 154.85 | 154.85 | 0.00 | 20.79 | 20.79 | 0.00 |
| N₂ | 191.60 | 191.61 | −0.01 | 29.11 | 29.12 | −0.01 |
| O₂ | 205.13 | 205.15 | −0.02 | 29.36 | 29.38 | −0.02 |
| CO₂ | 213.78 | 213.78 | 0.00 | 37.14 | 37.13 | +0.01 |
| H₂ | 130.54 | 130.68 | −0.14 | 29.12 | 28.84 | +0.28 |
Let us also check the equation of state itself. The standard molar volume is
| State | Calculated Vm = RT/P | Literature value |
|---|---|---|
| 273.15 K, 101325 Pa (old STP) | 22.4140 L/mol | 22.4140 L/mol |
| 273.15 K, 100000 Pa (current STP) | 22.7110 L/mol | 22.7110 L/mol |
And in ① of the simulator, without using nRT/V at all, the pressure is obtained by counting only the impulse on the wall. If the molecules are treated as points (collisions switched off), the two approach the same value as the time average proceeds (since only a finite number of collisions is averaged, the displayed value keeps fluctuating by a few percent), and if the molecules are given a size, the center of that fluctuation shifts to about 1 % higher. The latter shift is well explained by the correction coming from the second virial coefficient of hard spheres. The compressibility factor is (η is the packing fraction), so even a packing fraction of just 0.25 % or so produces a 1 % excess. Here Z is the compressibility factor PV/NkBT, a different quantity from the partition function Z of Section 4 (both are conventional symbols, so they overlap only here).
| Quantity | Form in statistical mechanics | Meaning |
|---|---|---|
| T | 2⟨εtrans⟩/(3kB) | A quantity proportional to the average translational kinetic energy per molecule |
| P | −(∂A/∂V)T | Impulse the wall receives per unit time and unit area |
| U | kBT²(∂lnZ/∂T)V | (1/2)kBT for each degree of freedom that is awake |
| S | NkB[ln(z/N) + 1] + U/T | Logarithm of the number of ways the state can be realized |
| H | U + PV | A ledger for reading directly the heat that flows in or out at constant pressure |
| CV | (∂U/∂T)V | A tool for measuring the number of degrees of freedom that are awake |
| CP | CV + nR | That plus the work nR of pushing back the surroundings per 1 K |
The physical constants used are the defined values of the 2019 SI (kB = 1.380649×10−23 J/K, h = 6.62607015×10−34 J·s, NA = 6.02214076×1023 mol−1), and the spectroscopic constants are the ground-vibrational-state values (B₀ and the fundamental frequency ν₀). The measured values used for comparison are from the NIST-JANAF thermochemical tables.