An interactive demo created by Claude Opus 5.5, based on the lecture notes by Sang Hoon Lee (Statistical Physics 1, Chapter 5, Free Energy and Chemical Thermodynamics, Sections 5.1 and 5.2)

Free Energy

Real systems are rarely isolated: their temperature, and often their pressure, are fixed by their surroundings. For them, entropy alone is not the guide. The free energies are.

Free energy as available work

Chemical reactions and phase transformations usually happen in systems that interact with their surroundings, thermally and often mechanically: the temperature is held fixed by the environment, and often the pressure rather than the volume. We already met the enthalpy \(H \equiv U + PV\), the energy needed to create a system out of nothing and put it into an environment at constant pressure, making room for its volume. Two more quantities complete the set:

\( \displaystyle F \equiv U - TS, \)\( \displaystyle G \equiv U - TS + PV = F + PV = H - TS \)

In an environment at temperature \(T\), you can get heat \(T\Delta S = TS\) for free while creating the system, so you need only supply the Helmholtz free energy \(F\) as work. Conversely, if you annihilate the system, \(F\) is the most work you can recover, since you must dump heat \(TS\) to get rid of its entropy. At constant pressure too, the work needed (or recoverable) is the Gibbs free energy \(G\): a magician pulling a rabbit out of nothing need not summon the whole enthalpy, because \(TS\) flows in spontaneously as heat. These four are the thermodynamic potentials.

→ −TS
↓ +PV
U–
F–
H–
G–
\(G/N\)
–
\(\mu\) from Section 3.5
–

For a monatomic ideal gas, from the Sackur–Tetrode entropy. Here \(TS\) is so large that \(F\) and \(G\) are negative: annihilating the gas would yield work. (Strictly, \(F\) should be called the “costly” energy when creating a system; the name comes from the reverse process.)

How much work can you really get?

At constant temperature, \(\Delta F = \Delta U - T\Delta S = Q + W - T\Delta S\). If no new entropy is created, \(Q = T\Delta S\) and \(\Delta F = W\); otherwise \(T\Delta S > Q\). At constant \(T\) and \(P\), split the work into the part done automatically by the environment, \(-P\Delta V\), and any other work, such as electrical:

\( \displaystyle \Delta F \le W \quad (\text{constant } T), \)\( \displaystyle \Delta G \le W_{\text{other}} \quad (\text{constant } T, P) \)

(A sharper, modern statement for processes pulled far from equilibrium is the Jarzynski equality, \(\overline{e^{-W/k_{\mathrm{B}}T}} = e^{-\Delta F/k_{\mathrm{B}}T}\), averaged over all realizations of a process taking the system from equilibrium state A toward the conditions of equilibrium state B, with \(\Delta F = F_B - F_A\): C. Jarzynski, “Nonequilibrium Equality for Free Energy Differences,” Physical Review Letters 78, 2690 (1997).) For chemical reactions, \(\Delta H\) is measured as heat at constant pressure, \(\Delta S\) from heat-capacity data, \(\Delta S = \int (C/T)\,dT\), and \(\Delta G = \Delta H - T\Delta S\) is tabulated at 298 K and 1 bar. Take water, \(\mathrm{H_2O} \to \mathrm{H_2} + \tfrac12\mathrm{O_2}\):

Run it

Thermodynamic identities and Maxwell relations

Starting from \(dU = T\,dS - P\,dV + \mu\,dN\) (Chapter 3) and differentiating each definition gives an identity for every potential, which shows its natural variables: \(U(S,V,N)\), \(H(S,P,N)\), \(F(T,V,N)\), \(G(T,P,N)\). Switching from \(V\) to \(P\), or \(S\) to \(T\), is a Legendre transformation. Each identity yields partial-derivative formulas, and because mixed second derivatives don’t depend on order, each also yields a Maxwell relation (Problem 5.12). The thermodynamic square, “Very Fat Ugly SHeeP” (or “Good Physicists Have Studied Under Very Fine Teachers”), packs them all in: each potential sits between its natural variables, and the diagonal arrows give the signs.

Potential

Why \(C_P\) exceeds \(C_V\)

Problem 5.14. With \(C_V = T(\partial S/\partial T)_V\) and \(C_P = T(\partial S/\partial T)_P\), expanding \(dS\) in \(T\) and \(V\), then \(dV\) in \(T\) and \(P\), and using a Maxwell relation with the isothermal compressibility \(\kappa_T = -\tfrac1V(\partial V/\partial P)_T\) and thermal expansion coefficient \(\beta = \tfrac1V(\partial V/\partial T)_P\):

\( \displaystyle C_P - C_V = \frac{TV\beta^2}{\kappa_T} \)

always positive, since \(\kappa_T > 0\). For an ideal gas, \(\beta = 1/T\) and \(\kappa_T = 1/P\), giving \(C_P - C_V = PV/T = Nk_{\mathrm{B}}\), as found in Chapter 1. For solids \(\beta\) behaves much like the heat capacity, small at low temperature, so \(C_P\) and \(C_V\) agree there and diverge as \(T\) rises.

One mole of

At room temperature, with the textbook’s data for water and mercury (Problem 1.46).

Free energy as a force toward equilibrium

An isolated system’s entropy tends to increase. A system in contact with a reservoir at temperature \(T\) (large enough to absorb any energy without changing temperature) can give energy away, so look at the total entropy: \(dS_{\text{total}} = dS + dU_R/T_R\). With \(T_R = T\), \(dU_R = -dU\), and fixed \(V\) and \(N\),

\( \displaystyle dS_{\text{total}} = dS - \frac{dU}{T} \)\( \displaystyle = -\frac1T\,(dU - T\,dS) \)\( \displaystyle = -\frac1T\,dF \)

So an increase in the total entropy of the universe is a decrease in the system’s Helmholtz free energy: we can forget the reservoir and just remember that the system will do whatever it can to minimize \(F\). If the volume can change at fixed pressure, the same argument gives \(dS_{\text{total}} = -dG/T\). In summary, with \(N\) fixed: at constant \(U\) and \(V\), \(S\) tends to increase; at constant \(T\) and \(V\), \(F\) tends to decrease; at constant \(T\) and \(P\), \(G\) tends to decrease.

\(F = U - TS\) decreases either by lowering \(U\) (giving energy to the reservoir, raising its entropy) or by raising \(S\), and the temperature sets which matters more: at low \(T\), lowering the energy wins; at high \(T\), raising the entropy wins. Below, \(N = 100\) particles each have a ground state and an excited state of energy \(\varepsilon\); \(n\) of them are excited.

\(U = n\varepsilon\) \(-TS\) \(F = U - TS\)

\(F\) is smallest at \(n\) =
–
\(N/(e^{\varepsilon/k_{\mathrm{B}}T} + 1)\)
–

\(S = k_{\mathrm{B}}\ln\binom{N}{n}\), exactly. As \(T\) grows, the minimum moves from \(n = 0\) toward \(n = N/2\), where the entropy is largest.

Extensive and intensive

Double a system (two identical rabbits side by side) and some quantities double, the extensive ones, while others stay the same, the intensive ones. Extensive times intensive is extensive, and extensive divided by extensive is intensive; adding an extensive quantity to an intensive one, such as \(G + \mu\), is wrong even when the units match. An exponential of an extensive quantity is multiplicative, like \(\Omega = e^{S/k_{\mathrm{B}}}\). Sort these:

Gibbs free energy and chemical potential

From \(dG = -S\,dT + V\,dP + \mu\,dN\), \(\mu = (\partial G/\partial N)_{T,P}\): adding one particle at fixed \(T\) and \(P\) raises \(G\) by \(\mu\). Since \(G\) is extensive and \(T\) and \(P\) are intensive, each added particle must add exactly the same amount, so

\( \displaystyle G = N\mu, \)\( \displaystyle G = \sum_i N_i\mu_i \)

for one species and for a mixture. (By contrast, \(\mu = (\partial F/\partial N)_{T,V}\) cannot be constant as particles are added at fixed volume, since the system grows denser.) For an ideal gas, \((\partial\mu/\partial P)_T = V/N = k_{\mathrm{B}}T/P\), so relative to a reference pressure \(P^\circ\) (usually 1 bar),

\( \displaystyle \mu(T,P) = \mu^\circ(T) + k_{\mathrm{B}}T\ln(P/P^\circ) \)

with \(\mu^\circ\) from tables of Gibbs free energies, in agreement with the explicit formula of Section 3.5 (Problem 5.22). For a mixture of ideal gases, use each species’ partial pressure.

\(\mu^\circ + k_{\mathrm{B}}T\ln(P/P^\circ)\) \(-k_{\mathrm{B}}T\ln[(V/N)(2\pi mk_{\mathrm{B}}T/h^2)^{3/2}]\)
\(\mu^\circ\) for helium at 1 bar
–
Slope, \(k_{\mathrm{B}}T\ln 10\) per decade
–

The two curves lie exactly on top of each other.

The grand free energy

Problem 5.23. Subtracting \(\mu N\) gives the grand free energy (grand potential), \(\Phi \equiv U - TS - \mu N\), with \(d\Phi = -S\,dT - P\,dV - N\,d\mu\). For a system exchanging both energy and particles with a reservoir, \(dS_{\text{total}} = -d\Phi/T\) at fixed \(T\) and \(\mu\), so \(\Phi\) tends to decrease. By the same extensivity argument as for \(G = N\mu\), \(\Phi = -PV\).

Apply it to a single proton in the Sun’s atmosphere (5800 K, about \(2 \times 10^{19}\) electrons per cubic meter), either bare (\(\Phi = 0\)) or holding an electron as a hydrogen atom, with energy \(-13.6\) eV and the electrons’ chemical potential \(\mu = -k_{\mathrm{B}}T\ln[(V/N)(2\pi m_ek_{\mathrm{B}}T/h^2)^{3/2}]\):

\( \displaystyle \Phi_{\text{occupied}} = -13.6\ \mathrm{eV} - \mu \)\( \displaystyle = -13.6\ \mathrm{eV} \)\( \displaystyle +\, k_{\mathrm{B}}T\ln\!\left[\frac{1}{n}\left(\frac{2\pi m_ek_{\mathrm{B}}T}{h^2}\right)^{3/2}\right] \)

\(\Phi_{\text{occupied}}\)
–
\(\Phi_{\text{unoccupied}}\)
0 eV
Equally stable at
–

The lecture estimates about 8800 K by holding the \(T\) inside the logarithm at 5800 K; solving exactly gives about 8600 K. For a single proton, this is only a probabilistic prediction.

Next, in Section 5.3: phase transformations, discontinuous changes in a substance’s properties as its environment changes only infinitesimally, where these free energies decide which phase wins.