Van der Waals liquid-gas coexistence (source code)

= Van der Waals liquid-gas coexistence
{c}

Below $T_c$, the equilibrium <liquid> and <gas> have the same <temperature>, <pressure> $p_*$, and per-particle <chemical potential>. For macroscopic bulk <thermodynamic phases>, neglect interface contributions. The <Maxwell equal-area construction> determines $v_l$ and $v_g$ by
$$
p(v_l,T)=p(v_g,T)=p_*,\qquad
\int_{v_l}^{v_g}[p(v,T)-p_*]\,dv=0.
$$
It expresses equality of <chemical potentials>, since $d\mu=v\,dp$ at fixed <temperature>. Equivalently, the equilibrium <Helmholtz free energy> per particle follows a common <tangent line> between the two endpoint states, lying below the homogeneous continuation between them. The construction uses that mathematical continuation to compare endpoints; it is not a physical compression path through negative <isothermal compressibility> states.<Statistical Physics by David Tong>[§5.1.1, equation 5.5, Maxwell Construction and figures 36–37: chemical-potential equality and flat coexistence intervals]{ref}

Here is a reproducible calculated example at $t=0.9$. With $q_*=p_*/p_c$, the homogeneous intersections solve the <cubic equation>
$$
3q_*x^3-(q_*+8t)x^2+9x-3=0.
$$
The <Maxwell construction> gives
$$
q_*\simeq0.646998352,\qquad
(x_l,x_m,x_g)\simeq(0.603401903,\ 1.090526633,\ 2.348842376).
$$
All three <roots of a polynomial> satisfy $x>1/3$. Only the smallest and largest are the <phase coexistence> endpoints; the middle one has negative <isothermal compressibility>. Equal <pressures> at three admissible values of <volume (thermodynamics)> therefore do not imply three stable <thermodynamic phases>. An analytic area check is
$$
\frac{8t}{3}\ln\frac{3x_g-1}{3x_l-1}
+3\left(\frac1{x_g}-\frac1{x_l}\right)-q_*(x_g-x_l)=0.
$$
At full numerical precision, the residual is below $10^{-11}$ in reduced units; independent numerical integration gives the same cancellation. At $t=0.9$, the <spinodal points> are instead $x\simeq0.718597189$ and $1.528504964$.

\Image[/van-der-waals-critical-coexistence.png]
{title=<Phase coexistence> and <spinodal> curves meet at the <Van der Waals critical point>}
{id=van-der-waals-critical-coexistence}
{description=The horizontal coordinate is reduced <number density> $n/n_c=1/x$, not <molar volume>. The green region is equilibrium <liquid>–<gas> coexistence, bounded by the <binodal>. Hatching marks unstable homogeneous states, and the strips between solid and dashed boundaries mark homogeneous <metastability>. This is a model <phase diagram>, not measured data.}

The equilibrium plateau changes the <phase fraction> rather than the endpoint densities. For a gas particle fraction $f_g=N_g/N$ and mean particle <volume (thermodynamics)> $\bar v=V/N$, the <lever rule> reads
$$
\bar v=(1-f_g)v_l+f_gv_g,\qquad
f_g=\frac{\bar v-v_l}{v_g-v_l}.
$$
Thus $\bar v=v_c$ at $t=0.9$ gives $f_g\simeq0.227219$: this is a particle fraction, not the <volume fraction> occupied by <gas>. Differentiating equality of <chemical potentials> along this model's <phase coexistence curve> yields the same <Clapeyron equation> explained below, $dp_*/dT=\ell/[T(v_g-v_l)]$, with <latent heat> $\ell$ per particle. Both endpoint differences vanish as the <Van der Waals critical point> is approached; the equation's critical limit must be taken as a ratio.