An interactive demo created by Claude Opus 5.5, based on the lecture notes by Sang Hoon Lee (Statistical Physics 1, Chapter 3, Interactions and Implications, Sections 3.4 to 3.6)

Pressure and Chemical Potential

Temperature governs the exchange of energy. Let systems also trade volume, or particles, and two more quantities appear from the same entropy: pressure and the chemical potential.

Mechanical equilibrium and pressure

Let two gases share not only energy but volume, through a movable partition, with \(U_A + U_B\) and \(V_A + V_B\) fixed. At equilibrium the total entropy \(S_{\text{total}} = S_A + S_B\) is at its maximum in both directions, \(\nabla S_{\text{total}} = 0\) in \((U_A, V_A)\). The energy derivative gives \(T_A = T_B\) as before; with \(dV_A = -dV_B\), the volume derivative gives

\[ \frac{\partial S_A}{\partial V_A} = \frac{\partial S_B}{\partial V_B} \]

with the energies and particle numbers held fixed. Experience says their pressures must also be equal, so pressure must be some function of \(\partial S/\partial V\). Its units are \((\mathrm{J/K})/\mathrm{m^3} = \mathrm{Pa/K}\), so multiplying by \(T\) gives units of pressure. A system that gains a lot of entropy by expanding just a little “wants” to expand, which is a large pressure:

\( \displaystyle P = T\left(\frac{\partial S}{\partial V}\right)_{U,N} \)

For a monatomic ideal gas, \(\Omega = f(N)V^NU^{3N/2}\), so \(S = Nk_{\mathrm{B}}\ln V + \tfrac32 Nk_{\mathrm{B}}\ln U + k_{\mathrm{B}}\ln f(N)\) and \(P = TNk_{\mathrm{B}}/V\): we have just derived the ideal gas law, \(PV = Nk_{\mathrm{B}}T\). Release the partition below and watch the system climb the entropy surface to its peak.

\(S_{\text{total}}\) over every way of sharing the energy and the volume. Drag to rotate, or focus the picture and use the arrow keys.

Out of 200 in all.
\(T_A,\ T_B\)
–
\(P_A,\ P_B\)
–
\(S_{\text{total}}/k_{\mathrm{B}}\), relative to the peak
–

Temperatures and pressures relative to their common equilibrium values. The partition moves toward the lower pressure and heat flows toward the lower temperature, each step raising \(S_{\text{total}}\).

The thermodynamic identity

Change \(U\) and \(V\) together in two small steps and the entropy changes by \(dS = (\partial S/\partial U)_V\,dU + (\partial S/\partial V)_U\,dV = dU/T + P\,dV/T\), or

\( \displaystyle dU = T\,dS - P\,dV \)

the thermodynamic identity, true for any infinitesimal change. Everything above follows from it: at fixed \(V\), \(1/T = (\partial S/\partial U)_V\); at fixed \(U\), \(P = T(\partial S/\partial V)_U\). It also gives \(C_V = T(\partial S/\partial T)_V\) and, from \(dH = T\,dS + V\,dP\), \(C_P = T(\partial S/\partial T)_P\) (Problem 3.33). It is tempting to match it with \(dU = Q + W\), with \(Q = T\,dS\) and \(W = -P\,dV\), but that holds only if the volume changes quasistatically (so the pressure is uniform throughout), no other work is done, and nothing else changes. Then

\( \displaystyle Q = T\,dS \quad(\text{quasistatic}), \)\( \displaystyle (\Delta S)_P = \int_{T_i}^{T_f}\frac{C_P}{T}\,dT \)

so \(\Delta S = Q/T\) even when work is being done, and a quasistatic adiabatic process (\(Q = 0\)) has no entropy change at all: it is isentropic.

When a process is not quasistatic

Push a piston in very fast and molecules build up in front of it, pushing back hard: the work done exceeds \(-P\,dV\), so \(Q < T\,dS\), and \(dS > Q/T\). Extra entropy is created. Pull it out faster than the molecules can follow and you get free expansion: no work, no heat, \(\Delta U = 0\), yet \(T\,dS = P\,dV > 0\). In both cases a mechanical process creates entropy over and above any that flows in with heat, and once created it can never be made to disappear. Below, a one-dimensional gas (molecules bouncing back and forth, \(\Omega \propto L^NU^{N/2}\)) is squeezed to half its length, or pulled to twice it, at any speed.

Move the piston
In units of the molecules’ typical speed.
Energy change, \(\Delta U/U_i\)
–
Quasistatic (isentropic)
–
Entropy created, \(\Delta S/Nk_{\mathrm{B}}\)
–

No heat flows, so \(\Delta U = W\). \(\Delta S\) is computed from the final length and energy, as if the gas then settled into equilibrium.

Diffusive equilibrium and chemical potential

Now let two systems of the same species exchange both energy and particles (with volumes fixed, for simplicity). Maximizing \(S_{\text{total}}\) with \(dN_B = -dN_A\) gives \(T_A = T_B\) and \(\partial S_A/\partial N_A = \partial S_B/\partial N_B\). Multiplying by \(-T\) gives a quantity with units of energy, the chemical potential:

\( \displaystyle \mu \equiv -T\left(\frac{\partial S}{\partial N}\right)_{U,V} \)

with \(\mu_A = \mu_B\) in diffusive equilibrium. Out of equilibrium, the system with the larger \(\partial S/\partial N\), the smaller \(\mu\), gains particles, since it gains more entropy than the other loses. Particles flow from high \(\mu\) to low, like something running downhill, which is why the minus sign is the convention. Including \(N\) in the thermodynamic identity,

\( \displaystyle dS = \frac1T\,dU + \frac PT\,dV - \frac\mu T\,dN, \)\( \displaystyle dU = T\,dS - P\,dV + \mu\,dN \)

where \(-P\,dV\) is mechanical work and \(\mu\,dN\) chemical work. At fixed \(S\) and \(V\), \(\mu = (\partial U/\partial N)_{S,V}\): the energy change when one particle is added with the entropy and volume held fixed. Usually some energy must be removed to keep the multiplicity fixed, so \(\mu\) is negative; any potential energy the particle needs to enter the system adds to it.

The smallest example

An Einstein solid with \(N = 3\) and \(q = 3\) has \(\Omega = \binom{5}{3} = 10\). Adding an oscillator without changing \(q\) would raise it to \(\binom{6}{3} = 20\). To keep the entropy fixed, one unit of energy must go: \(N = 4\), \(q = 2\), \(\Omega = \binom{5}{2} = 10\). So \(\mu = (\Delta U/\Delta N)_S = -\varepsilon\), not quite a derivative and not quite realistic, but the idea is right.

N = 3, q = 3, Ω = 10
→
N = 4, q = 2, Ω = 10

The chemical potential of an ideal gas

From the Sackur–Tetrode equation, with \(U = \tfrac32 Nk_{\mathrm{B}}T\),

\( \displaystyle \mu = -k_{\mathrm{B}}T\ln\!\left[\frac VN\left(\frac{2\pi mk_{\mathrm{B}}T}{h^2}\right)^{3/2}\right] \)

For helium at room temperature and atmospheric pressure, \(\mu \approx -0.32\) eV. Raising the concentration \(N/V\) at fixed temperature makes \(\mu\) less negative: the gas becomes more willing to give up particles to its neighbors.

–

chemical potential per molecule

Per mole, \(N_A\mu\)
–

Chemists usually quote \(\mu\) per mole, \(-T(\partial S/\partial n)_{U,V}\) with \(n = N/N_A\), which is \(N_A\) times the physicist’s per-particle value.

Particles flow from high μ to low

Two chambers of the same gas at the same temperature, joined by a small opening. At fixed \(T\), \(\mu = k_{\mathrm{B}}T\ln(N/V) + \text{constant}\), so the more crowded side has the higher \(\mu\) and loses particles until the concentrations, and the chemical potentials, are equal: \(\mu_A - \mu_B = k_{\mathrm{B}}T\ln[(N_A/V_A)/(N_B/V_B)]\).

\(\mu_A\) \(\mu_B\)
\(N_A,\ N_B\)
–
\((\mu_A - \mu_B)/k_{\mathrm{B}}T\)
–

Noninteracting molecules at one temperature; the curves are smoothed over a short time.

The atmosphere, once more

Problem 3.37. A gas at height \(z\) has potential energy \(mgz\) per molecule, which adds to its chemical potential: \(\mu(z) = -k_{\mathrm{B}}T\ln[(V/N)(2\pi mk_{\mathrm{B}}T/h^2)^{3/2}] + mgz\). For two chunks at the same temperature and volume in diffusive equilibrium, \(\mu(z) = \mu(0)\) gives \(\ln[N(z)/N(0)] = -mgz/k_{\mathrm{B}}T\):

\[ N(z) = N(0)\,e^{-mgz/k_{\mathrm{B}}T} \]

the exponential atmosphere of Problem 1.16, now from the chemical potential. Higher up, each molecule has more potential energy, so the gas must be thinner there to keep \(\mu\) the same.

Total \(\mu\), the same at every height \(mgz\) The concentration part
\(mgz\)
–
\(N(z)/N(0)\)
–

At a uniform 280 K. Light helium thins out far more slowly.

A system with several species has a chemical potential for each, \(\mu_i = -T(\partial S/\partial N_i)_{U,V,N_{j\ne i}}\), so \(dU = T\,dS - P\,dV + \sum_i\mu_i\,dN_i\), and in diffusive equilibrium each species’ \(\mu\) is separately equal. The chemical potential is central to equilibrium in chemical reactions and phase transformations, the subject of Chapter 5, and it plays a central role in quantum statistics, in Chapter 7.

Summary of classical thermodynamics

\( \displaystyle dU = T\,dS - P\,dV + \mu\,dN \)
Type of interactionExchanged quantityGoverning variableFormula
ThermalEnergyTemperature\( \displaystyle \frac1T = \left(\frac{\partial S}{\partial U}\right)_{V,N} \)
MechanicalVolumePressure\( \displaystyle \frac PT = \left(\frac{\partial S}{\partial V}\right)_{U,N} \)
DiffusiveParticlesChemical potential\( \displaystyle \frac\mu T = -\left(\frac{\partial S}{\partial N}\right)_{U,V} \)

For three model systems, the two-state paramagnet, the Einstein solid, and the monatomic ideal gas, the laws of microscopic physics give explicit formulas for the multiplicity \(\Omega\) and entropy \(k_{\mathrm{B}}\ln\Omega\), and from them heat capacities and a variety of other measurable quantities. That program is statistical mechanics.