# Maxwell construction

The black curve is an isotherm in the pressure-volume phase diagram of a model for a real gas that can undergo a phase transition to a liquid. The oscillating middle part of it is in reality replaced by a horizontal line. The two monotonically decreasing parts that are removed describe metastable states (overheated liquid, undercooled gas), while the rising part in the middle is absolutely unstable. The height of the horizontal line is such that the two shaded areas are equal.

In thermodynamic equilibrium, a necessary condition for stability is that pressure ${\displaystyle P}$ does not increase with volume ${\displaystyle V}$. This basic consistency requirement—and similar ones for other conjugate pairs of variables—are sometimes violated in analytic models for first order phase transitions. The most famous case is the Van der Waals equation for real gases, see Fig. 1 where a typical isotherm is drawn (black curve). The Maxwell construction is a way of correcting this deficiency. The decreasing right hand part of the curve in Fig. 1 describes a diluted gas, while its left part describes a liquid. The intermediate (rising) part of the curve in Fig. 1 would be correct, if these two parts were to be joined smoothly—meaning in particular that the system would remain also in this region spatially uniform with a well defined density. But this is not what happens. If the volume of a vessel containing a fixed amount of liquid is expanded at constant temperature, there comes a point where some of the liquid boils and the system consists of two well separated phases. While this two-phase coexistence holds as the volume continues to increase, the pressure remains constant. It decreases again, after all liquid is evaporated and the gas expands. Thus the sinusoidal part of the isotherm is replaced by a horizontal line (red line in Fig. 1). According to the Maxwell construction (or "equal area rule"), the height of the horizontal line is such that the two green areas in Fig. 1 are equal.

The direct quote from Clerk-Maxwell which became the Maxwell construction: “Now let us suppose the medium to pass from B to F along the hypothetical curve BCDEF in a state always homogeneous, and to return along the straight line path FB in the form of a mixture of liquid and vapour. Since the temperature has been constant throughout, no heat can have been transformed into work. Now the heat transformed into work is represented by the excess of the area FDE over BCD. hence the condition which determine the maximum pressure of the vapour at given temperature is that the line BF cuts off equal areas from the curve above and below.”

This is rendition of a figure in the James Clerk-Maxwell paper in Nature explaining what we now call the Maxwell construction for the van der Waals gas

The van der Waals gas equation (using reduced variables) can be expanded [1] to

${\displaystyle v_{R}^{3}-\left({\frac {8T_{R}}{p_{R}}}+1\right){\frac {v_{R}^{2}}{3}}+{\frac {9v_{R}}{3p_{R}}}-{\frac {1}{p_{R}}}=0}$

which is of the form

${\displaystyle v_{r}^{3}+a_{1}v_{r}^{2}+a_{2}v_{r}+a_{3}=0}$

To solve this Cubic function one defines several precursor terms :

${\displaystyle a_{1}(T_{R},p_{R})=-{\frac {{\frac {8T_{R}}{p_{R}}}+1}{3}}}$
${\displaystyle a_{2}(p_{R})={\frac {3}{p_{R}}}}$

and

${\displaystyle a_{3}(p_{R})=-{\frac {1}{p_{R}}}}$

so that the following become defined

${\displaystyle \eta =a_{2}-{\frac {a_{1}^{2}}{3}}}$

and

${\displaystyle q=-\left(+{\frac {2}{27}}a_{1}^{3}-{\frac {a_{1}a_{2}}{3}}+a_{3}\right)}$

The first root’s precursor form is:

${\displaystyle z_{1}={\sqrt {\frac {4\eta }{-3}}}\cos \left[{\frac {1}{3}}\cos ^{-1}\left(-{\frac {3q}{2\eta }}{\sqrt {\frac {-3}{\eta }}}\right)\right]}$

${\displaystyle v_{r_{1}}={\sqrt {\frac {4\eta }{-3}}}\cos \left[{\frac {1}{3}}\cos ^{-1}\left({\frac {3q}{2\eta }}{\sqrt {\frac {-3}{\eta }}}\right)\right]-{\frac {a_{1}}{3}}}$

and

${\displaystyle v_{r_{2}}={\frac {-z_{1}+{\sqrt {z_{1}^{2}-4(\eta +z_{1}^{2})}}}{2}}-{\frac {a_{1}}{3}}}$

and finally

${\displaystyle v_{r_{3}}={\frac {-z_{1}-{\sqrt {z_{1}^{2}-4(\eta +z_{1}^{2})}}}{2}}-{\frac {a_{1}}{3}}}$

These last four equations depend on two variables, the temperature which is chosen when one determines which isotherm one is working on, and the pressure. One starts with a arbitrary (but reasonable) chosen value and adjust its values as one solves the equation (below) ultimately been obtaining ${\displaystyle p=p_{V}}$ or ${\displaystyle p=p_{\mathrm {eq} }}$ through the Maxwell construction (see below) at that temperature. With these two variables in hand, one can re-substitute the pressure value obtained into the root equations (above) to obtain the three roots. A complete example with spreadsheet can be found at.[2]

The Maxwell construction requires solution of the equation (obtained by making the areas under the two loops equal and opposite in value from each other):

${\displaystyle {\frac {8T_{r}}{3}}\ell n\left({\frac {3v_{r_{\ell }}-1}{3v_{r_{g}}-1}}\right)-8T_{r}\left({\frac {v_{r_{\ell }}}{3v_{r_{\ell }}-1}}-{\frac {v_{r_{g}}}{3v_{r_{g}}-1}}\right)+{\frac {6}{v_{r_{\ell }}}}-{\frac {6}{v_{r_{g}}}}=0}$

with a fixed reduced temperature and the solution depending then on the chosen variable reduced pressure, which becomes the reduced vapor pressure. Unfortunately, this equation can not be solved analytically, and requires numerical evaluation. The subscripts in this equation are ${\displaystyle \ell \equiv smallest}$ and ${\displaystyle g\equiv largest}$ have been changed to make clear which two roots of the cubic are to be employed; these roots themselves depend on the equations which precede them (above), and contain the reduced pressure and temperature which are treated as above.

The Maxwell construction

Maxwell construction for van der Waals fluid

(a new diagram showing details of the construct is at [3]) is rarely derived from the condition that the Gibbs free energies of the gas and the liquid must be equal when they coexist. However, it can be shown that this condition is fulfilled.[4] Essentially the same applies to any other thermodynamic system, where ${\displaystyle P}$ and ${\displaystyle V}$ are replaced by a different pair of conjugate variables, e.g. magnetic field and magnetization or chemical potential and number of particles.