When a partition is removed, the gases mix on their own and never return to their original state. And yet nobody has done anything. What decides this “direction in which things happen on their own” is the entropy, and the forms rewritten for convenient use in the laboratory are the Helmholtz free energy F and the Gibbs free energy G. Here we build the entropy of mixing from the partition function, settle Gibbs’ paradox, apply the very same argument to H2O, and calculate where ice, water, and water vapor trade places from literature values alone.
The partition function of an ideal gas consisting of N molecules of the same kind can be written, using the single-molecule partition function z = (V/Λ³)·zint, as
The N! in the denominator is the key point. Molecules of the same kind are indistinguishable, so arrangements that differ only in how the labels are swapped must not be counted again. Using Stirling’s approximation ln N! ≈ N ln N − N to go from F = −kBT ln Z to S = −(∂F/∂T)V, we obtain
Here φ(T) is a function of temperature only (determined by the translational, rotational, and vibrational partition functions) and c is a constant that depends on the kind of gas. For a monatomic ideal gas, Eq. (2) becomes exactly the Sackur–Tetrode equation.
Differentiating Eq. (2) with respect to temperature gives dφ/d lnT = cV/R (cV is the molar heat capacity at constant volume). So the difference in φ is exactly equal to (1/R)∫cV dT/T, and the simulator also checks this relation numerically.
Gas A, nA mol, occupies a volume VA, and gas B, nB mol, occupies a volume VB. The partition is removed. The container is rigid and adiabatic, that is, an isolated system.
An ideal gas has no intermolecular forces. So from A’s point of view, B might as well not exist, and A simply spreads from VA to V = VA + VB. The same goes for B. Applying Eq. (2) to each and adding the results gives
The argument of the ln is always greater than 1, so ΔS > 0. The process can go only in the direction of mixing.
In particular, if the gases start at the same temperature and the same pressure, VA/V = nA/n = xA, so Eq. (3) becomes the form familiar from textbooks.
This equation contains no trace of what kind of gas is involved. Whether it is H2 and CO2 or He and Ar, mixing 1 mol of each in a 1 : 1 ratio always gives 2R ln 2 = 11.53 J/K. Ideal gases have no interactions, so it does not matter who the partner is — obvious, you might say, but real mixtures are not so simple (a heat of mixing changes the result; this material does not treat that case).
Fig. 1: Entropy of mixing, Eq. (4). It is largest at 50 : 50 and becomes smaller the more the composition is skewed to either side, reaching 0 for a pure substance (xA = 0 or 1). This is because that composition has the largest “number of arrangements.” — Mixing is free, but this can also be read as saying that separating requires work of at least TΔS. That is why a factory that extracts nitrogen from air consumes electricity.
Now let us pose a nasty question: what if the gases on the left and right are the same?
If we use Eq. (3) as it stands, even identical gases give ΔS > 0. But if the gas on both sides is the same and at the same temperature and pressure, then removing the partition leaves the state completely unchanged. If we put the partition back, everything is exactly as it was, and the operation is reversible. The entropy cannot possibly have increased. This is Gibbs’ paradox.
The answer is already written in Eq. (2). What enters the entropy was V/n. For the same gas, the final state is “nA + nB mol in a volume V,” a single kind of state, so applying Eq. (2) straightforwardly gives
At the same temperature and pressure, VA/nA = VB/nB = V/n, so Eq. (5) is exactly 0. The paradox disappears. Conversely, if the same gas is at different pressures, Eq. (5) is positive — because in that case a truly irreversible expansion does take place.
When the temperatures on the left and right differ, the container is rigid and adiabatic, so the total internal energy is conserved. This determines the final temperature Tf.
In addition to Eq. (3), the entropy now includes the change in φ(T), that is, ∫CV dT/T. The hot side decreases and the cold side increases, but the total is always positive (because for the same amount of heat, δQ/T is larger when the heat is received on the low-temperature side).
So far it has all been formulas. In the simulator, the same value is obtained without using those formulas.
Divide the container into the original left chamber (volume VA) and right chamber (VB), and for each species count the fraction f of its molecules found in each chamber. The deviation from a uniformly scattered state is
At the start, with the partition in place, fAL = fBR = 1, so Eq. (7) is −nAR ln(V/VA) − nBR ln(V/VB), and when the gases are completely mixed, fAL = VA/V (and likewise for B), so it is 0. The difference is exactly Eq. (3). The same answer comes out just by counting molecules, without going through any formula — the same approach as “measuring the pressure from the impulse on the wall” in the ideal gas teaching material.
The law of increasing entropy, stated correctly, refers to the entire universe.
In the laboratory, however, it is a nuisance to count the entropy of the surroundings as well. We want to decide using quantities of the system alone. If we regard the surroundings as a large heat bath at temperature T, then when the system receives heat Q, the entropy of the surroundings changes by −Q/T, so
All that remains is to replace Q using the first law. If the volume is fixed, the work is zero and Q = ΔU; if the pressure is fixed, Q = ΔH. Substituting and multiplying by −T (the direction of the inequality reverses) gives
Let us apply this to mixing. For ideal gases at the same temperature, mixing changes neither U nor H (there are no intermolecular forces), so
The process proceeds even though not a single joule of energy is gained — a typical example of an entropy-driven change. Conversely, water freezes even though ΔS < 0. That is because ΔH is sufficiently negative, so the change is enthalpy-driven. The next section deals with exactly that.
For a pure substance, the Gibbs free energy per mole is itself the chemical potential.
If two phases are in contact, molecules move toward the one with the lower μ. So the phase with the lowest μ (= G/n) is the one that appears. The phase transition point is where the μ values become equal.
From Eq. (10), the slope of μ(T) is −s. The larger the entropy of a phase, the more steeply its line falls.
All that remains is to actually prepare h(T) and s(T), and then we can calculate. We simply integrate the heat capacity from a reference point.
The effect of pressure is the v dp term in Eq. (10). For ice and water the volume hardly changes, so v(p − p°) suffices, but for a gas v = RT/p, so
The last term is the deviation of a real gas from ideal behavior (the second virial coefficient), and comes from ∫0p(v − RT/p) dp = B(T)·p. Note that the CODATA value of S°(gas) is that of an ideal gas at 1 bar, so what is multiplied is p, not (p − p°). It is a small correction of about −49 J/mol near the boiling point (1 atm), but if (p − p°) is mistakenly multiplied instead, the vapor pressure at 0 °C is off by 8 % (dropping the B term altogether gives an error of 0.05 % at 0 °C and 1.6 % at the boiling point).
| Quantity | Value | Source |
|---|---|---|
| ΔfH°(liquid, 298.15 K) | −285.830 kJ/mol | CODATA |
| S°(liquid, 298.15 K) | 69.95 J/(mol·K) | CODATA |
| ΔfH°(gas, 298.15 K) | −241.826 kJ/mol | CODATA |
| S°(gas, 298.15 K) | 188.835 J/(mol·K) | CODATA (ideal gas) |
| ΔHfus(273.15 K) | 6.010 kJ/mol | Standard tables |
| cp (ice) | Quadratic (fitted over 100–273 K; within about 2 % over 250–273 K, and it comes out low, increasingly so at lower temperatures) | Giauque & Stout 1936 |
| cp (water) | Quadratic (273–373 K, maximum error 0.15 %) | Steam tables |
| cp (water vapor) | Shomate equation | NIST |
| Molar volume | Ice 19.65 (0 °C) / water 18.07 (25 °C) cm³/mol | Density tables |
| B(T) (water vapor) | a + b/T4.3 | From the saturated vapor in the steam tables |
Fig. 2: μ(T) of the three phases. The crossing points are the melting point and the boiling point. The slope is −s, so the phase with the larger entropy falls more steeply. When the pressure is lowered, because of the RT ln p term in Eq. (12), only the line of the gas drops, and the boiling point moves to the left. If it is lowered further and goes below the triple point (611.657 Pa), the line of water is no longer the lowest anywhere, and ice turns directly into water vapor — this is sublimation. The lines of ice and water hardly move (because the v of a condensed phase is small).
Nothing has been fitted. Only the melting point is used as the reference point for ice, but the boiling point, triple point, vapor pressure, and latent heats are all predictions of the model.
| Quantity | Model | Measured | Difference |
|---|---|---|---|
| Boiling point (1 atm) | 373.117 K | 373.124 K | −0.007 K |
| Triple point, temperature | 273.157 K | 273.16 K | −0.003 K |
| Triple point, pressure | 611.65 Pa | 611.657 Pa | −0.002 % |
| Vapor pressure (25 °C) | 3170.0 Pa | 3169.9 Pa | +0.003 % |
| Vapor pressure (80 °C) | 47431 Pa | 47414 Pa | +0.03 % |
| Sublimation pressure (−20 °C) | 103.29 Pa | 103.24 Pa | +0.05 % |
| Heat of vaporization (100 °C) | 40.607 kJ/mol | 40.657 kJ/mol | −0.12 % |
| Heat of sublimation (0 °C) | 51.062 kJ/mol | 51.06 kJ/mol | +0.00 % |
| Boiling point (summit of Mt. Fuji, 63.8 kPa) | 87.5 °C | about 87 °C | — |
| Melting point (100 MPa) | 265.65 K | 264.21 K | +1.44 K |
Each time we fix one pressure, one pair of melting point and boiling point is determined. If we repeat this for every pressure and plot the points, we get the phase diagram. The slope of a boundary line is obtained by differentiating the condition that the μ of the two phases are equal.
This is the Clausius–Clapeyron equation. For an ordinary substance the solid is denser, so Δv > 0, and the melting line slopes upward to the right. But ice floats on water — the volume decreases on melting (19.65 → 18.02 cm³/mol at 0 °C). Since Δv < 0,
The melting line leans to the left, and ice melts when it is put under pressure. Note, however, that the absolute value of the slope is large — it takes 135 bar (about 133 atm) to lower the melting point by 1 K.
This is the explanation page for the Mochizuki Research Group’s thermodynamics materials (entropy of mixing / stability of phases).