4.7.2. Conditions for Equilibrium and Stability#

This lesson covers the main ideas in Chapter 2 of Chandler, Introduction to Modern Statistical Mechanics.

The theme of the chapter is:

Equilibrium tells us where a thermodynamic state can sit. Stability tells us whether it will stay there.

4.7.2.1. Learning Goals#

After this lesson, students will be able to:

  1. Explain equilibrium as a variational principle.

  2. Distinguish conserved extensive variables from internal extensive variables.

  3. Derive the multiphase equilibrium conditions

(4.1055)#\[\begin{equation} T^{(\alpha)} = T^{(\beta)}, \qquad p^{(\alpha)} = p^{(\beta)}, \qquad \mu_i^{(\alpha)} = \mu_i^{(\beta)} \end{equation}\]
  1. Explain why the second derivative term determines stability.

  2. Connect stability to positive heat capacity and positive compressibility.

  3. Interpret phase coexistence as equality of chemical potentials.

  4. Derive the Clausius–Clapeyron equation.

  5. Describe, at a qualitative level, why interfaces introduce a surface tension term.

4.7.2.2. Coding Concepts#

The following coding concepts are used in this notebook:

  1. Variables

  2. Functions

  3. Arrays with NumPy

  4. Plotting with matplotlib

The code is intended to support thermodynamic intuition, not to introduce new programming techniques.

4.7.2.3. Review: Conserved and Internal Extensive Variables#

In Chapter 1, equilibrium was described as the result of maximizing entropy of minimizing internal energy over internal constraints (at constant \(V\) and \(N\)).

A useful way to organize the idea is:

(4.1056)#\[\begin{equation} E = E(S,V,n_1,\ldots,n_r;Y_1,Y_2,\ldots) \end{equation}\]

where \(S\), \(V\), and the total mole numbers \(n_i\) are conserved or externally fixed, while the \(Y_i\) are internal extensive variables.

Examples of internal extensive variables include:

  1. The entropy in phase 1, \(S^{(1)}\).

  2. The volume of phase 1, \(V^{(1)}\).

  3. The number of moles of species \(i\) in phase 1, \(n_i^{(1)}\).

  4. The extent of a chemical reaction.

  5. The fraction of a system in liquid versus vapor.

At equilibrium, the internal variables take the values that minimize \(E\) at fixed \(S\), \(V\), and \(n_i\).

(4.1057)#\[\begin{align} \Delta E &> 0 \quad \text{for displacements away from stable equilibrium} \\ \Delta E &= 0 \quad \text{at equilibrium to first order} \end{align}\]

4.7.2.4. Notation Note#

Chandler uses lower-case \(\delta\) to denote small variations away from equilibrium.

In these notes, we will often write small finite perturbations as \(\Delta Y\) to avoid confusing this with the thermodynamic notation \(\delta q\) and \(\delta w\) for path-dependent heat and work.

So, for example,

(4.1058)#\[\begin{equation} Y = Y_{\mathrm{eq}} + \Delta Y \end{equation}\]

means that \(Y\) has been displaced slightly from its equilibrium value.

4.7.2.5. The Fundamental Differential#

The starting point is the thermodynamic identity

(4.1059)#\[\begin{equation} dE = T dS - p dV + \sum_i \mu_i dn_i \end{equation}\]

For each homogeneous phase \(\alpha\),

(4.1060)#\[\begin{equation} dE^{(\alpha)} = T^{(\alpha)} dS^{(\alpha)} - p^{(\alpha)} dV^{(\alpha)} + \sum_i \mu_i^{(\alpha)} dn_i^{(\alpha)} \end{equation}\]

This equation tells us how the energy changes if entropy, volume, or composition are repartitioned among phases.

4.7.3. Part 1: Multiphase Equilibrium#

Consider a heterogeneous system with two phases, labeled \((1)\) and \((2)\).

The total extensive variables are fixed:

(4.1061)#\[\begin{align} S &= S^{(1)} + S^{(2)} \\ V &= V^{(1)} + V^{(2)} \\ n_i &= n_i^{(1)} + n_i^{(2)} \end{align}\]

The total energy is

(4.1062)#\[\begin{equation} E = E^{(1)} + E^{(2)} \end{equation}\]

The internal variables can be chosen as

(4.1063)#\[\begin{equation} S^{(1)}, \qquad V^{(1)}, \qquad n_i^{(1)} \end{equation}\]

because the corresponding variables in phase \((2)\) are determined by conservation.

4.7.3.1. Allowed Variations#

Because the total \(S\), \(V\), and \(n_i\) are fixed,

(4.1064)#\[\begin{align} \Delta S^{(2)} &= -\Delta S^{(1)} \\ \Delta V^{(2)} &= -\Delta V^{(1)} \\ \Delta n_i^{(2)} &= -\Delta n_i^{(1)} \end{align}\]

Now write the first-order change in total energy:

(4.1065)#\[\begin{equation} \Delta E = \Delta E^{(1)} + \Delta E^{(2)} \end{equation}\]

Using the fundamental differential for each phase,

(4.1066)#\[\begin{align} \Delta E &= T^{(1)}\Delta S^{(1)} - p^{(1)}\Delta V^{(1)} + \sum_i \mu_i^{(1)}\Delta n_i^{(1)} \\ &\quad+ T^{(2)}\Delta S^{(2)} - p^{(2)}\Delta V^{(2)} + \sum_i \mu_i^{(2)}\Delta n_i^{(2)} \end{align}\]

4.7.3.2. First-Order Equilibrium Condition#

Substitute the conservation constraints:

(4.1067)#\[\begin{align} \Delta E &= \left(T^{(1)}-T^{(2)}\right)\Delta S^{(1)} - \left(p^{(1)}-p^{(2)}\right)\Delta V^{(1)} + \sum_i \left(\mu_i^{(1)}-\mu_i^{(2)}\right) \Delta n_i^{(1)} \end{align}\]

At equilibrium, the first-order change in energy must vanish for arbitrary allowed variations:

(4.1068)#\[\begin{equation} \Delta E = 0 \end{equation}\]

Therefore,

(4.1069)#\[\begin{align} T^{(1)} &= T^{(2)} \\ p^{(1)} &= p^{(2)} \\ \mu_i^{(1)} &= \mu_i^{(2)} \end{align}\]

These are the conditions for thermal, mechanical, and material equilibrium between phases.

4.7.3.3. Discussion:#

For each quantity, identify the internal variable whose variation produces the equilibrium condition.

  1. Why does varying \(S^{(1)}\) lead to equality of temperature?

  2. Why does varying \(V^{(1)}\) lead to equality of pressure?

  3. Why does varying \(n_i^{(1)}\) lead to equality of chemical potential?

  4. What physical process would be blocked if the corresponding internal variable could not vary?

4.7.3.4. Chemical Potential as a Generalized Force#

The chemical potential difference drives transfer of material.

If species \(i\) can move between two phases and

(4.1070)#\[\begin{equation} \mu_i^{(1)} > \mu_i^{(2)} \end{equation}\]

then moving a small amount of species \(i\) from phase \((1)\) to phase \((2)\) lowers the energy at fixed \(S\), \(V\), and total \(n_i\).

At equilibrium, there can be no such driving force:

(4.1071)#\[\begin{equation} \mu_i^{(1)} = \mu_i^{(2)} \end{equation}\]

This is analogous to heat flow stopping when temperatures become equal.

4.7.3.5. Molecular Simulation Analogy#

Think of two conformational states of a protein as two “phases”:

  1. Open ATP-binding pocket.

  2. Closed ATP-binding pocket.

Let \(n_{\mathrm{open}}\) and \(n_{\mathrm{closed}}\) denote the number of molecules in each state in an ensemble.

The conserved quantity is

(4.1072)#\[\begin{equation} n = n_{\mathrm{open}} + n_{\mathrm{closed}} \end{equation}\]

The internal variable is \(n_{\mathrm{open}}\).

At equilibrium, the distribution between open and closed states is determined by the equality of the appropriate thermodynamic driving forces. In molecular simulation language, this is closely related to equality of free energy at coexistence or to population ratios determined by free energy differences.

4.7.4. Part 2: Stability#

The first-order condition tells us that we are at a stationary point.

But a stationary point may be a minimum, maximum, or saddle point.

For the energy minimum principle, stable equilibrium requires

(4.1073)#\[\begin{equation} \Delta^2 E > 0 \end{equation}\]

for all allowed small displacements from equilibrium.

This is the thermodynamic version of the ordinary calculus test:

(4.1074)#\[\begin{equation} f'(x_0)=0, \qquad f''(x_0)>0 \end{equation}\]

for a local minimum.

4.7.4.1. Visualizing Stability#

Suppose \(Y\) is one internal variable.

A stable equilibrium has

(4.1075)#\[\begin{equation} E(Y_{\mathrm{eq}}+\Delta Y) = E(Y_{\mathrm{eq}}) + \frac{1}{2} \left(\frac{\partial^2 E}{\partial Y^2}\right)_{\mathrm{eq}} (\Delta Y)^2 + \cdots \end{equation}\]

The first derivative term is absent because we are expanding around equilibrium.

If

(4.1076)#\[\begin{equation} \left(\frac{\partial^2 E}{\partial Y^2}\right)_{\mathrm{eq}} > 0 \end{equation}\]

then any small displacement raises the energy. The equilibrium is stable.

import numpy as np
import matplotlib.pyplot as plt

Y = np.linspace(-2, 2, 400)

E_stable = Y**2
E_unstable = -Y**2
E_flat = Y**4

plt.figure(figsize=(7, 4))
plt.plot(Y, E_stable, label="stable: positive curvature")
plt.plot(Y, E_unstable, label="unstable: negative curvature")
plt.plot(Y, E_flat, label="marginal to second order")
plt.xlabel("Internal variable displacement, $\\Delta Y$")
plt.ylabel("Energy change, $\\Delta E$")
plt.title("The second derivative determines local stability")
plt.legend()
plt.ylim(-2, 4)
plt.show()
../../_images/e1a7f3e2fdf40d317daa1893fe850a63fba831d6a7781524041e7e786bcdcedb.png

4.7.4.2. Discussion:#

Look at the three curves above.

  1. Which point is an equilibrium point for all three curves?

  2. Which equilibrium point is stable?

  3. Which equilibrium point is unstable?

  4. Why is the \(Y^4\) curve more subtle if we only examine the second derivative?

4.7.4.3. Stability and Heat Capacity#

Chandler derives stability conditions by considering arbitrary repartitions inside a system.

For example, divide a system into two parts and allow entropy to be repartitioned:

(4.1077)#\[\begin{align} \Delta S^{(1)} &= -\Delta S^{(2)} \\ \Delta V^{(1)} &= \Delta V^{(2)} = 0 \\ \Delta n^{(1)} &= \Delta n^{(2)} = 0 \end{align}\]

At equilibrium, the first-order term vanishes. The second-order term contains the curvature of \(E\) with respect to \(S\).

Since

(4.1078)#\[\begin{equation} T = \left(\frac{\partial E}{\partial S}\right)_{V,n} \end{equation}\]

we have

(4.1079)#\[\begin{equation} \left(\frac{\partial^2 E}{\partial S^2}\right)_{V,n} = \left(\frac{\partial T}{\partial S}\right)_{V,n} \end{equation}\]

4.7.4.4. Relating Curvature to Heat Capacity#

The constant-volume heat capacity is

(4.1080)#\[\begin{equation} C_V = T \left(\frac{\partial S}{\partial T}\right)_{V,n} \end{equation}\]

Invert this derivative:

(4.1081)#\[\begin{equation} \left(\frac{\partial T}{\partial S}\right)_{V,n} = \frac{T}{C_V} \end{equation}\]

Therefore,

(4.1082)#\[\begin{equation} \left(\frac{\partial^2 E}{\partial S^2}\right)_{V,n} = \frac{T}{C_V} \end{equation}\]

For stable equilibrium, this curvature must be positive. Since \(T>0\),

(4.1083)#\[\begin{equation} C_V > 0 \end{equation}\]

Thus positive heat capacity is not just an empirical fact. It is a stability condition.

4.7.4.5. Physical Interpretation of Positive Heat Capacity#

If \(C_V>0\), adding energy raises the temperature.

If a fluctuation makes one subsystem slightly hotter than another, heat flows from hot to cold, reducing the fluctuation.

If \(C_V<0\), adding energy would lower the temperature. Then a temperature fluctuation would grow rather than decay. The system would be unstable.

That is why ordinary stable macroscopic systems have positive heat capacities.

4.7.4.6. Stability and Compressibility#

A similar analysis applies to volume fluctuations.

The Helmholtz free energy is

(4.1084)#\[\begin{equation} A = E - TS \end{equation}\]

with differential

(4.1085)#\[\begin{equation} dA = -S dT - p dV + \sum_i \mu_i dn_i \end{equation}\]

At fixed \(T\) and \(n_i\), the curvature of \(A\) with respect to \(V\) controls mechanical stability.

Since

(4.1086)#\[\begin{equation} -p = \left(\frac{\partial A}{\partial V}\right)_{T,n} \end{equation}\]

we have

(4.1087)#\[\begin{equation} \left(\frac{\partial^2 A}{\partial V^2}\right)_{T,n} = -\left(\frac{\partial p}{\partial V}\right)_{T,n} \end{equation}\]

Stability requires

(4.1088)#\[\begin{equation} -\left(\frac{\partial p}{\partial V}\right)_{T,n} > 0 \end{equation}\]

or

(4.1089)#\[\begin{equation} \left(\frac{\partial p}{\partial V}\right)_{T,n} < 0 \end{equation}\]

4.7.4.7. Isothermal Compressibility#

The isothermal compressibility is

(4.1090)#\[\begin{equation} \kappa_T = -\frac{1}{V} \left(\frac{\partial V}{\partial p}\right)_{T,n} \end{equation}\]

For a stable system,

(4.1091)#\[\begin{equation} \kappa_T > 0 \end{equation}\]

This means that if pressure is increased, volume decreases.

A system with negative isothermal compressibility would be mechanically unstable. Small density fluctuations would grow rather than relax.

V = np.linspace(0.7, 3.0, 400)

# Ideal-like stable curve
p_stable = 1.0 / V

# A toy curve with an unstable region
p_unstable = 8/(3*V - 1) - 3/V**2

plt.figure(figsize=(7, 4))
plt.plot(V, p_stable, label="stable-like: $dp/dV < 0$")
plt.plot(V, p_unstable, label="toy nonideal curve")
plt.xlabel("Volume, $V$")
plt.ylabel("Pressure, $p$")
plt.title("Mechanical stability requires $dp/dV < 0$ at fixed $T$")
plt.legend()
plt.ylim(-2, 8)
plt.show()
../../_images/a051d33260c5f70c0ea1e13da355f91665035e76e9e6875516ccc79a76cb37a4.png

4.7.4.8. Discussion:#

In the toy nonideal curve above, identify regions where the slope is positive.

(4.1092)#\[\begin{equation} \left(\frac{\partial p}{\partial V}\right)_T > 0 \end{equation}\]

Those regions violate the stability condition and cannot represent a stable homogeneous phase.

This idea leads naturally to phase separation and the Maxwell construction.

4.7.5. Part 3: Application to Phase Equilibria#

For a one-component system, two phases \(\alpha\) and \(\beta\) coexist at fixed \(T\) and \(p\) when their chemical potentials are equal:

(4.1093)#\[\begin{equation} \mu^{(\alpha)}(T,p) = \mu^{(\beta)}(T,p) \end{equation}\]

This equation defines a line in the \(T\)-\(p\) phase diagram.

The chemical potential is the Gibbs free energy per mole for a one-component system:

(4.1094)#\[\begin{equation} \mu = G_m \end{equation}\]

or, equivalently,

(4.1095)#\[\begin{equation} G = n\mu \end{equation}\]

4.7.5.1. Deriving the Clausius–Clapeyron Equation#

Along the coexistence line,

(4.1096)#\[\begin{equation} \mu^{(\alpha)}(T,p) = \mu^{(\beta)}(T,p) \end{equation}\]

Differentiate both sides along the coexistence curve:

(4.1097)#\[\begin{equation} d\mu^{(\alpha)} = d\mu^{(\beta)} \end{equation}\]

For a one-component phase,

(4.1098)#\[\begin{equation} d\mu = -s\,dT + v\,dp \end{equation}\]

where \(s\) and \(v\) are the molar entropy and molar volume.

Substitute into the equality of differentials:

(4.1099)#\[\begin{equation} -s^{(\alpha)}dT + v^{(\alpha)}dp = -s^{(\beta)}dT + v^{(\beta)}dp \end{equation}\]

Rearrange:

(4.1100)#\[\begin{equation} \left(v^{(\beta)}-v^{(\alpha)}\right)dp = \left(s^{(\beta)}-s^{(\alpha)}\right)dT \end{equation}\]

Therefore,

(4.1101)#\[\begin{equation} \frac{dp}{dT} = \frac{s^{(\beta)}-s^{(\alpha)}}{v^{(\beta)}-v^{(\alpha)}} = \frac{\Delta s}{\Delta v} \end{equation}\]

This is the Clausius–Clapeyron equation.

4.7.5.2. Alternative Form#

Because the latent heat per mole is

(4.1102)#\[\begin{equation} \Delta h = T\Delta s \end{equation}\]

we can also write

(4.1103)#\[\begin{equation} \frac{dp}{dT} = \frac{\Delta h}{T\Delta v} \end{equation}\]

This form is often useful for liquid–vapor transitions, where \(\Delta h\) is the enthalpy of vaporization.

T = np.linspace(280, 380, 200)

# Toy coexistence curve based on integrated Clausius-Clapeyron form:
# ln p = -DeltaH/(R T) + constant
R = 8.314
DeltaH = 40_000.0
T0 = 373.15
p0 = 1.0

p = p0 * np.exp(-DeltaH/R * (1/T - 1/T0))

plt.figure(figsize=(7, 4))
plt.plot(T, p)
plt.xlabel("Temperature, $T$ / K")
plt.ylabel("Vapor pressure relative to 1 atm")
plt.title("Toy liquid-vapor coexistence curve")
plt.show()
../../_images/97bf52593151459760c1bf5dacaddf7ea13e110195e9821760dea5b53dd11745.png

4.7.5.3. Discussion: Why Does the Vapor Pressure Increase with Temperature?#

Use the Clausius–Clapeyron equation:

(4.1104)#\[\begin{equation} \frac{dp}{dT} = \frac{\Delta s}{\Delta v} \end{equation}\]

For liquid–vapor equilibrium,

(4.1105)#\[\begin{equation} \Delta s > 0 \end{equation}\]

and

(4.1106)#\[\begin{equation} \Delta v > 0 \end{equation}\]

so

(4.1107)#\[\begin{equation} \frac{dp}{dT} > 0 \end{equation}\]

The coexistence pressure increases as temperature increases.

4.7.5.4. Why Water/Ice Has an Unusual Slope#

For melting ice,

(4.1108)#\[\begin{equation} \Delta s = s_{\mathrm{liquid}} - s_{\mathrm{solid}} > 0 \end{equation}\]

but

(4.1109)#\[\begin{equation} \Delta v = v_{\mathrm{liquid}} - v_{\mathrm{solid}} < 0 \end{equation}\]

because liquid water is denser than ice near the melting point.

Therefore,

(4.1110)#\[\begin{equation} \frac{dp}{dT} < 0 \end{equation}\]

This is why increasing pressure can lower the melting temperature of ice.

4.7.5.5. Gibbs Phase Rule#

For a system with \(r\) components and \(\nu\) phases, the number of independent intensive variables is

(4.1111)#\[\begin{equation} f = r - \nu + 2 \end{equation}\]

For a one-component system:

  1. One phase: \(f=2\). We can vary \(T\) and \(p\) independently.

  2. Two phases: \(f=1\). Coexistence lies on a line.

  3. Three phases: \(f=0\). The triple point is a point.

The phase rule is a counting result. It tells us how many intensive variables can be chosen independently while preserving phase equilibrium.

4.7.6. Part 4: Plane Interfaces#

If two phases coexist, there is generally an interface between them.

Chandler introduces an additional energetic contribution from the interface:

(4.1112)#\[\begin{equation} dE = T dS - p dV + \mu dn + \gamma d\sigma \end{equation}\]

where

  1. \(\sigma\) is the interfacial area.

  2. \(\gamma\) is the surface tension.

The conjugate pair is

(4.1113)#\[\begin{equation} \gamma = \left(\frac{\partial E}{\partial \sigma}\right)_{S,V,n} \end{equation}\]

Surface tension is the energetic cost per unit area of creating interface.

4.7.6.1. Physical Interpretation of Surface Tension#

If \(\gamma>0\), increasing interfacial area costs energy.

This explains why droplets tend to become spherical: for a given volume, a sphere minimizes surface area.

At molecular length scales, the interface is not infinitely sharp. It has a finite width over which the density changes from one bulk phase value to the other.

This is the origin of the idea of a Gibbs dividing surface.

z = np.linspace(-5, 5, 400)
rho_liq = 1.0
rho_vap = 0.1
width = 0.8

rho = rho_vap + (rho_liq - rho_vap) * 0.5 * (1 - np.tanh(z / width))

plt.figure(figsize=(7, 4))
plt.plot(z, rho)
plt.xlabel("Position across interface, $z$")
plt.ylabel("Density, $\\rho(z)$")
plt.title("A smooth density profile across a liquid-vapor interface")
plt.show()
../../_images/da23b559000a71ee668e3d6258256cec37ae25a76aabe4ae0618bbabbb680d07.png

4.7.6.2. Optional Discussion: What Is the Dividing Surface?#

The actual density profile across an interface is smooth, not discontinuous.

To use bulk thermodynamics, we replace the smooth interface by two bulk phases plus an idealized dividing surface.

The location of this dividing surface is partly a convention, but physical quantities like the surface tension are well-defined.

This idea becomes important later when connecting thermodynamics to molecular descriptions of liquids and interfaces.

4.7.7. Summary#

Chapter 2 extends the variational principle from Chapter 1.

The central results are:

(4.1114)#\[\begin{align} \text{Equilibrium:} \qquad & \Delta E = 0 \\ \text{Stability:} \qquad & \Delta^2 E > 0 \end{align}\]

For multiphase equilibrium, this gives

(4.1115)#\[\begin{align} T^{(\alpha)} &= T^{(\beta)} \\ p^{(\alpha)} &= p^{(\beta)} \\ \mu_i^{(\alpha)} &= \mu_i^{(\beta)} \end{align}\]

For stability, it gives constraints on response functions:

(4.1116)#\[\begin{align} C_V &> 0 \\ \kappa_T &> 0 \end{align}\]

For phase coexistence, it gives

(4.1117)#\[\begin{equation} \mu^{(\alpha)}(T,p) = \mu^{(\beta)}(T,p) \end{equation}\]

and therefore

(4.1118)#\[\begin{equation} \frac{dp}{dT} = \frac{\Delta s}{\Delta v} \end{equation}\]

4.7.7.1. Suggested Homework Problems#

  1. Re-derive the multiphase equilibrium conditions for three phases.

  2. Starting from \(dA=-S\,dT-p\,dV+\mu\,dn\), show that mechanical stability requires \(\kappa_T>0\).

  3. Use the Clausius–Clapeyron equation to explain the sign of the melting-curve slope for water.

  4. Sketch a free energy curve that contains an unstable region and explain why a Maxwell construction is needed.

  5. Explain, in words, why surface tension should be positive for a stable interface.