# Maxwell construction

In statistical physics and thermodynamics, the Maxwell construction is a method for addressing the physically unrealistic aspects of certain models of phase transitions. Named for physicist James Clerk Maxwell, it considers areas of regions on phase diagrams.

## Stability criteria

In thermodynamic equilibrium, a necessary condition for stability is that pressure, $p$, does not increase with volume, or molar volume, $v=V/N$; this is expressed mathematically as $\partial _{v}p|_{T}<0$, where $T$ is the temperature. This basic stability requirement, and similar ones for other conjugate pairs of variables, is violated in analytic models of first order phase transitions. The most famous case is the van der Waals equation, $p=RT/(v-b)-a/v^{2}$ where $a,b,R$ are dimensional constants. This violation is not a defect, rather it is the origin of the observed discontinuity in properties that distinguish liquid from vapor, and defines a first order phase transition.
Figure 1 shows an isotherm drawn, for $v>b$, as a continuously differentiable solid black, dotted black, and dashed gray curve. The decreasing part of the curve to the right of point C in Fig. 1 describes a gas, while the decreasing part to the left of point E describes a liquid. These two parts are separated by a region between the local minimum and local maximum on the curve with positive slope that violates the stability criterion. This mathematical criterion expresses a physical condition which Epstein described as follows: "It is obvious that this middle part, dotted in our curves [dashed in Fig.1 here], can have no physical reality. In fact, let us imagine the fluid in a state corresponding to this part of the curve contained in a heat conducting vertical cylinder whose top is formed by a piston. The piston can slide up and down in the cylinder, and we put on it a load exactly balancing the pressure of the gas. If we take a little weight off the piston, there will no longer be equilibrium and it will begin to move upward. However, as it moves the volume of the gas increases and with it its pressure. The resultant force on the piston gets larger, retaining its upward direction. The piston will, therefore, continue to move and the gas to expand until it reaches the state represented by the maximum of the isotherm. Vice versa, if we add ever so little to the load of the balanced piston, the gas will collapse to the state corresponding to the minimum of the isotherm."
This situation is similar to a body exactly balanced at the top of a smooth surface that, with the slightest disturbance will depart from its equilibrium position and continue until it reaches a local minimum. As they are described such states are dynamically unstable, and consequently they are not observed. The gap $v_{\rm {min}}\leq v\leq v_{\rm {max}}$ is a precursor of the actual phase change from liquid to vapor. The points E $(p_{\rm {min}},v_{\rm {min}})$ and C $(p_{\rm {max}},v_{\rm {max}})$, where $\partial _{v}p|_{T}=0$, that delimit the largest possible liquid and smallest possible vapor states are called spinodal points. Their locus forms a spinodal curve which bounds a region where no homogeneous stable states can exist.
Experiments show that if the volume of a vessel containing a fixed amount of liquid is heated and expands at constant temperature, at a certain pressure, $p_{s}(T)$, vapor, (denoted by dots at points $f$ and $g$ in Fig. 1) bubbles nucleate so the fluid is no longer homogeneous, but rather it has become a heterogeneous mixture of boiling liquid and condensing vapor. Gravity separates the boiling (saturated) liquid, $v_{f}=V_{f}/N_{f}$, from the less dense condensing (saturated) vapor, $v_{\text{g}}=V_{\text{g}}/N_{\text{g}}>v_{f},$ that coexist at the same saturation temperature and pressure. As the heating continues the amount of vapor, $N_{\text{g}}$ increases and that of the liquid, $N_{f}=N-N_{\text{g}}$, decreases. All the while the pressure, $p_{s}$ and temperature, $T$, remain constant and the volume $V=V_{f}+V_{\text{g}}$ increases. In this situation the molar volume of the mixture is a weighted average of its components $v=V/N=(V_{f}/N_{f})(N-N_{\text{g}})/N+(V_{\text{g}}/N_{\text{g}})(N_{\text{g}}/N)=v_{f}(1-x)+v_{\text{g}}x$ where $x=N_{\text{g}}/N$, the mole fraction of the vapor, $0\leq x\leq 1$, increases continuously; however, the molar volume of the substance itself has only the largest possible stable value for its liquid state, and smallest possible stable value for its vapor state at the given $p(T)$. To repeat, although the mixture molar volume passes continuously from $v_{f}$ to $v_{\text{g}}$ (denoted by the dashed line in Fig. 1), the underlying fluid has a discontinuity in this property, and others as well. This equation of state of the mixture is called the lever rule.
The dotted parts of the curve in Fig. 1 are metastable states. For many years such states were an academic curiosity; Callen gave as an example, "water that has been cooled below 0°C at a pressure of 1 atm. A tap on a beaker of water in this condition precipitates a sudden dramatic crystallization of the system." However, studies of boiling heat transfer have made clear that metastable states occur routinely as an integral part of this process. In it the heating surface temperature is higher than the saturation temperature, often significantly so, hence the adjacent liquid must be superheated. Further the advent of devices that operate with very high heat fluxes has created interest in the metastable states, and the thermodynamic properties associated with them, in particular the superheated liquid states. Moreover, the fact that they are predicted by the van der Waals equation, and cubic equations in general, is compelling evidence of its efficacy in describing phase transitions; Sommerfeld described this as follows:
   It is very remarkable that the theory due to van der Waals is in a position to predict, at least qualitatively, the existence of the unstable [called metastable here] states along the branches AA′ or BB′ [BC and FE in Fig. 1 here].

## Equal area rule

The discontinuity in $v$, and other properties, e.g. internal energy, $u$, and entropy,$s$, of the substance, is called a first order phase transition. In order to specify the unique experimentally observed pressure, $p_{s}(T)$, at which it occurs another thermodynamic condition is required, for from Fig.1 it could clearly occur for any pressure in the range $p_{\rm {min}}\leq p\leq p_{\rm {max}}$. Such a condition was first enunciated in a clever thermodynamic argument by Maxwell at a lecture he delivered to the British Chemical Society on Feb 18, 1875 (Fig.1, including the letters B C D E F, is the curve he described):
   The portion of the curve from C to E represents points which are essentially unstable, and which cannot therefore be realized.
   Now let us suppose the medium to pass from B to F along the hypothetical curve B C D E F in a state always homogeneous, and to return along the straight line path F B in the form of a mixture of liquid and vapor. 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 F D E over B C D. Hence the condition which determines the maximum pressure of the vapor at given temperature is that the line B F cuts off equal areas from the curve above and below.
On a temperature—molar entropy plane, the area under any curve is the heat transfer to the substance per mole, positive going from left to right and negative from right to left; moreover, in a cyclic process the net heat transfer to the substance is the area enclosed by the cycle's closed curve. Since the cycle Maxwell considered is composed of the two gray dashed isothermals at the same temperature, one proceeding from B to F (through C D and E), and the other directly back from F to B, the two lines are identical, just traversed in reverse; there is zero area enclosed, and hence $q=0$.
Furthermore, the area under these curves when plotted on a pressure—molar volume, see Fig. 1, are the work done by the substance, positive going from left to right, and negative from right to left. Likewise the net work done in a cycle is the area enclosed by the closed curve. Since the first law of thermodynamics yields in the special case of a cycle $w=q$, for the cycle envisioned by Maxwell $w=q=0$; then since the area enclosed is I + II = 0, see Fig.1, with I positive and II negative, the transition pressure must be such that the two areas are equal.
Written as a mathematical equation in terms of the work done in each process this is $\int _{v_{\text{g}}}^{v_{f}}\,p\,dv+\int _{v_{f}}^{v_{\text{g}}}\,p_{s}\,dv=-\int _{v_{f}}^{v_{\text{g}}}\,p\,dv+p_{s}(v_{\text{g}}-v_{f})=0\quad {\mbox{for}}\quad T={\mbox{constant}}$
This equation together with the equation of state written for each of the states $f$ and $g$ $p_{s}=p(v_{f},T)\qquad p_{s}=p(v_{\text{g}},T)$ are three equations for the four variables, $p_{s},T,v_{f},v_{\text{g}}$, so given any one of them, say $T$, the other three are determined. In other words, there is a unique value of $p_{s}(T)$, as well as $v_{f}(T)$ and $v_{\text{g}}(T)$, at which the phase transition can occur.

## Gibbs criterion

At the end of his lecture, after complimenting van der Waals by referring to his work as "an exceedingly ingenious thesis", Maxwell finished it by saying:
   I must not, however, omit to mention a most important American contribution to this part of thermodynamics by Prof. Willard Gibbs of Yale College U.S., who has given us a remarkably simple and thoroughly satisfactory method of representing the relations of the different states of matter by means of a model. By means of this model, problems which had long resisted the efforts of myself and others may be solved at once.
This remark proved prescient because in 1876-1878 Gibbs published his definitive work on thermodynamics in which he showed that thermodynamic equilibrium of a heterogeneous substance requires that, in addition to mechanical equilibrium (the same pressure for each component) and thermal equilibrium (the same temperature for each component), there must also be material equilibrium (the same chemical potential for each component). In the present instance of one substance and two phases in addition to $p_{f}=p_{\text{g}}=p_{s}$ and $T_{f}=T_{\text{g}}=T$, material equilibrium requires $g_{f}=g_{\text{g}}$ (for the special case of one substance its chemical potential is the molar Gibbs function, $\mu =g\equiv G/N$ where $g=u+pv-Ts$). This condition can be deduced by a simple physical argument as follows: the energy required to vaporize a mole is from the second law at constant temperature $q_{\rm {vap}}=T(s_{\text{g}}-s_{f})$, and from the first law at constant pressure $q_{\rm {vap}}=h_{\text{g}}-h_{f}$, then equating these two and rearranging produces the result since $h=u+pv$. The conditions of material equilibrium lead to the famous Gibbs phase rule, $D=n-r+2$, where $n$ is the number of substances, $r$ the number of phases, and $D$ the number of independent intensive variables required to specify the state. In the case of one substance and two phases discussed here this gives, $D=1$, the experimentally observed number.
Now $g(p,T)$ is a thermodynamic potential function, its differential is $dg=\partial _{p}g|_{T}\,dp+\partial _{T}g|_{p}\,dT=v\,dp-s\,dT$
Integrating this at constant temperature produces $g(p,T)=g_{A}(T)+\int _{p_{A}}^{p}\,v({\bar {p}},T)\,d{\bar {p}}$ here $g_{A}$ is a constant of integration, but the constant is different for each isotherm hence it is written as a function of $T$. In order to evaluate $g$ one must invert $p=p(v,T)$ to obtain $v=v(p,T)$. However, it is the nature of the phase transition phenomenon that this inversion is not unique; for example the van der Waals quation written for $v$ is, $pv^{3}-(pb+RT)v^{2}+av-ab=0,$
a cubic with either 1 or, in this case, 3 real roots. Thus there are three curves, as seen in Fig. 2, consisting of stable (shown solid black), metastable (shown dotted black), and unstable (shown dashed gray) states.
Actually, the figure was not produced by solving the cubic and integrating, rather $g(v,T)$ was obtained from its definition by first obtaining $u(v,T)$ and $s(v,T)$, which is easily done analytically for the van der Waals equation, and plotting it parametrically with $p(v,T)$, using $v$ as the parameter. Considering only its stable states $g(p,T)$ is continuous with discontinuous partial derivatives, $\partial _{p}g|_{T}=v$ and $\partial _{T}g|_{p}=-s$, at the phase transition point. In the Ehrenfest classification, a first order phase transition refers to the discontinuity of the first partial derivatives of $g$ while a second order phase transition would involve discontinuities of the second partial derivatives.

### Relationship between the Gibbs and Maxwell criteria

Evaluating the integral expression for $g(p,T)$ given previously between the saturated liquid and vapor states and applying the Gibbs criterion of material equilibrium to this phase change process requires writing it as $g_{\text{g}}-g_{f}=\int _{p_{s}}^{p_{\rm {min}}}\,v_{l}\,dp+\int _{p_{\rm {min}}}^{p_{\rm {max}}}\,v_{u}\,dp+\int _{p_{\rm {max}}}^{p_{s}}\,v_{v}\,dp=0$
Here the integral has been split into three parts using the three real roots of the cubic corresponding to the liquid, $v_{l}$, unstable, $v_{u}$, and vapor, $v_{v}$, states respectively. These integrals can best be visualized by viewing Fig. 1 rotated $90^{\circ }$ counterclockwise in the paper plane then $180^{\circ }$ about the $v$ axis so that $v$ appears on the leftside ordinate of the curve as shown in the accompanying graph. In this view the function $v(p,T)$ clearly is multi-valued; this is the reason it requires three real functions to describe its behavior between $p_{\rm {min}}$ and $p_{\rm {max}}$. Now on splitting the middle integral into two $g_{\text{g}}-g_{f}=\int _{p_{s}}^{p_{\rm {min}}}\,v_{l}\,dp+\int _{p_{\rm {min}}}^{p_{s}}\,v_{u}\,dp+\int _{p_{s}}^{p_{\rm {max}}}\,v_{u}\,dp+\int _{p_{\rm {max}}}^{p_{s}}\,v_{v}\,dp=0$
The first two integrals here are area I while the second two are the negative of area II. The two areas add to zero hence their magnitudes are equal according to this Gibbs criterion. This is again the equal area rule of Maxwell, the Maxwell construction, and it can also be shown analytically. Since $d(pv)=pdv+vdp$,
$dg=v\,dp-s\,dT=-p\,dv+d(pv)-s\,dT.$
Integrating this for constant temperature from state $f$ to $g$ with the Gibbs condition produces $g_{\text{g}}-g_{f}=-\int _{v_{f}}^{v_{\text{g}}}\,p(v,T)\,dv+p_{s}(v_{\text{g}}-v_{f})=0$ which is Maxwell's result. This equal area rule can also be derived by making use of the Helmholtz free energy. In any event the Maxwell construction derives from the Gibbs condition of material equilibrium. However, even though $g_{f}=g_{\text{g}}$ is more fundamental it is more abstract than the equal area rule, which is understood geometrically.

### Common tangent construction

Another method to determine the coexistence points is based on the Helmholtz potential minimum principle, which states that in a system in diathermal contact with a heat reservoir $T=T_{R}$, $DF=0$ and $D^{2}F>0$, namely at equilibrium the Helmholtz potential is a minimum. Since, like $g(p,T)$, the molar Helmholtz function $f(v,T)$ is also a potential function whose differential is, $df=\partial _{v}f|_{T}\,dv+\partial _{T}f|_{v}\,dT=-p\,dv-s\,dT,$
this minimum principle leads to the stability condition $\partial ^{2}f/\partial v^{2}|_{T}=-\partial p/\partial v|_{T}>0$. This condition requires that at any stable state of the system the function $f$ is strictly convex, namely that in its vicinity the curve lies on or above its tangent. Moreover, for those states the previous stability condition for the pressure is necessarily satisfied as well.
A plot of this function for the same subcritical isotherm of the vdW equation as Figs. 1 and 2 is shown in Fig. 3. Included in this figure is the (dashed/solid) straight line that has a double (common) tangent with the curve of the function $f$ at B and F. This straight line is, $f=f_{0}+\partial _{v}f_{T}v=f_{0}-pv$, with $p$ constant, which can be written as $f_{0}=f+pv=g$. The last equality follows from the relation $f=u-Ts$, together with $g=u-Ts+pv$. All this means that every point on the line has the same values of $g,p,T$, in particular the points B and F, which produces the Gibbs condition for material equilibrium $g_{f}=g_{\text{g}}$ as well as eqality of temperature and pressure. Therefore this construction is equivalent to both the Gibbs conditions and the Maxwell construction.
This construction, based on $f(v,T)$ defined earlier by Gibbs, was originally used by van der Waals (he called it both a double and common tangent), because it could be easily extended to include binary fluid mixtures for which an isotherm of $f(v,x,T)$, with $x=N_{1}/(N_{1}+N_{2})$ a composition variable, forms a surface that can have a common tangent plane. It has subsequently become a popular way to treat phase change problems in mixtures.

## Application to the van der Waals equation

From the van der Waals equation applied to the saturated liquid, $v_{f}<v_{\rm {min}}$, and vapor, $v_{\text{g}}>v_{\rm {max}}$, states $p_{s}={\frac {RT_{s}}{v_{f}-b}}-{\frac {a}{v_{f}^{2}}}\qquad p_{s}={\frac {RT_{s}}{v_{\text{g}}-b}}-{\frac {a}{{v_{\text{g}}}^{2}}}$
These two equations specify 4 variables so they can be solved for $p_{s},T_{s}$ in terms of $v_{f},v_{\text{g}}$. This results in $p_{s}=p^{*}{\frac {v^{*2}[v_{f}v_{\text{g}}-v^{*}(v_{f}+v_{\text{g}})]}{v_{f}^{2}{v_{\text{g}}}^{2}}}\qquad T_{s}=T^{*}{\frac {v^{*}(v_{f}+v_{\text{g}})(v_{f}-v^{*})(v_{\text{g}}-v^{*})}{v_{f}^{2}{v_{\text{g}}}^{2}}}$ where $p^{*}=a/b^{2}$, $v^{*}=b$, and $T^{*}=a/(Rb)$ are a characteristic pressure, molar volume, and temperature defined by the constants (note that $p^{*}v^{*}/T^{*}=R$). Applying the Maxwell construction to the van der Waals equation gives $-T_{s}\ln \left({\frac {v_{\text{g}}-v^{*}}{v_{f}-v^{*}}}\right)+T^{*}{\frac {v^{*}(v_{\text{g}}-v_{f})}{v_{f}v_{\text{g}}}}+p_{s}(v_{\text{g}}-v_{f})/R=0$
These three equations can be solved numerically. This has been done given a value for either $T_{s}$ or $p_{s}$, and tabular results presented; however, the equations also admit an analytic parametric solution that, according to Lenkner, was obtained by Gibbs. Lenkner himself devised a simple, elegant, method to obtain this solution, by eliminating $p_{s}$ and $T_{s}$ from the equations, and writing them in terms of a stretched dimensionless density, $\varrho =v^{*}/(v-v^{*})$, that varies between $\infty$ and 0 as $v$ varies from $v^{*}$ to $\infty$; this produces $\ln \left({\frac {\varrho _{f}}{\varrho _{\text{g}}}}\right)={\frac {(\varrho _{f}-\varrho _{\text{g}})(\varrho _{\text{g}}+\varrho _{f}+2)}{\varrho _{f}+\varrho _{\text{g}}+2\varrho _{f}\varrho _{\text{g}}}}$
Although transcendental, this equation has a simple analytic, parametric solution obtained by writing the left side of the equation, which is just $(s_{\text{g}}-s_{f})/R$, as $\ln \left({\frac {\varrho _{f}}{\varrho _{\text{g}}}}\right)={\frac {s_{\text{g}}-s_{f}}{R}}=\delta =2y$
Then $\varrho _{f}=e^{\delta }\varrho _{\text{g}}$ and when used to eliminate $\varrho _{f}$ from the right hand side a linear equation for $\varrho _{\text{g}}$ is obtained, whose solution is $\varrho _{\text{g}}(y)=f(y)e^{-y}\quad {\mbox{and}}\quad \varrho _{f}(y)=f(y)e^{y}\quad {\mbox{where}}\quad f(y)={\frac {y\cosh y-\sinh y}{\sinh y\cosh y-y}}$
Accordingly, the fundamental variable that specifies all the others in this phase transition process is $(s_{\text{g}}-s_{f})/(2R)=y$. This solution to the saturation problem is easily extended to encompass all its variables $T_{s}(y)=T^{*}{\frac {2f(y)[\cosh y+f(y)]}{g(y)^{2}}}\qquad p_{s}(y)=p^{*}{\frac {f(y)^{2}[1-f(y)^{2}]}{g(y)^{2}}}$ $v_{f}(y)=v^{*}{\frac {1+f(y)e^{y}}{f(y)e^{y}}}\quad \quad \quad \quad \quad \quad v_{g}(y)=v^{*}{\frac {1+f(y)e^{-y}}{f(y)e^{-y}}}$ where $g(y)=[1+\varrho _{\text{g}}(y)][1+\varrho _{f}(y)]=1+2f(y)\cosh y+f(y)^{2}$.
The values of all other property discontinuities across the saturation curve also follow from this solution.
These functions define the coexistence curve which is the locus of the saturated liquid and saturated vapor states of the van der Waals fluid. In Fig. 4 this curve is plotted in blue together with the spinodal curve in black, calculated from $T=T^{*}({\tilde {v}}-1)^{2}/{\tilde {v}}^{3}\quad \quad p=p^{*}({\tilde {v}}-2)/{\tilde {v}}^{3}$ where ${\tilde {v}}=v/v^{*}$ is a parameter. The variables used in making these plots are the reduced (dimensionless) variables, $p_{r}=p/p_{c}$, $v_{r}=v/v_{c}$, and $T_{r}=T/T_{c}$ where the $c$ subscripted quantities are the critical point values. They are defined by, $\partial p/\partial v|_{T}=0$, and $\partial ^{2}p/\partial _{v^{2}}|_{T}=0$ at the critical point, and are measurable quantities. The relations $p^{*}/p_{c}=27$, $v^{*}/v_{c}=1/3$, $T^{*}/T_{c}=27/8$ are used to convert the star quantities in the solution to the $c$ quantities used in the figures. The curve agrees completely with the numerical results referenced earlier. In the region inside the spinodal curve there are two states at each point, one stable and one metastable, either superheated liquid to the right of the blue curve, or subcooled vapor to the left, while outside the spinodal curve there is one stable state at each point. In Fig. 5 the region under the (dot dash black) spinodal curve contains no homogeneous stable states while between the (dot dash red) coexistence and spinodal curves there is one metastable state at every point, and outside the coexistence curve there is one stable state at each point. The two blue and two green circles denote the saturated liquid and vapor states on their respective isotherms. There are also observed heterogeneous states everywhere under the coexistence curve that satisfy the lever rule; however, they are not homogeneous states of the van der Waals equation, so their existence, indicated by horizontal lines connecting the saturation points on each subcritical isotherm, is not displayed. Also the abscissa in this figure is logarithmic, not linear, in order to show more of the vapor region at large $v_{r}$ without excessively compressing the liquid and unstable regions at small $v_{r}$; however, this device distorts areas, so the two areas I and II in Fig.1 would not appear equal here.
Over the parameter range $0\leq y<\infty$, $f(y)$ decreases monotonically from $f(0)=1$ and approaches 0 as$f(y)\sim 2(y-1)e^{-y}$ in the limit $y\rightarrow \infty$. Therefore $\varrho _{f}(0)=\varrho _{\text{g}}(0)=1/2$ and in the limit $y\rightarrow \infty$, $\varrho _{f}(y)\sim 2(y-1)$ and $\varrho _{\text{g}}(y)\sim 2(y-1)e^{-2y}$. The behavior of $p_{s}(y)$ and $T_{s}(y)$ follow from the equations. Both these properties also decrease monotonically from $p_{s}(0)=p^{*}/27$ and $T_{s}(0)=8T^{*}/27$, and approach 0 as $p_{s}\sim p^{*}\varrho _{\text{g}}/\varrho _{f}$ and $T_{s}\sim T^{*}/\varrho _{f}$ in the limit $y\rightarrow \infty$. Note from these that $p_{s}\sim (p^{*}/T^{*})T_{s}\varrho _{\text{g}}\sim (p^{*}v^{*}/T^{*})T_{s}\rho _{\text{g}}=\rho _{\text{g}}RT_{s}$; the van der Waals saturated vapor is an ideal gas in this limit. To paraphrase Sommerfeld, it is remarkable that the theory due to van der Waals is able to predict that when $s_{\text{g}}-s_{f}\gg 2R$ the saturated vapor behaves like an ideal gas; the saturated vapor of real gases behave exactly this way.
In addition for $T_{r}<27/32=0.84375$ the liquid spinodal point occurs at a negative pressure, and the isotherm $T_{r}=0.8$ is included in Fig. 4 to illustrate this point. This means that some part of those liquid metastable states are in tension, and the lower the temperature the greater the tensile stress. Although this seems counterintuitive it is known that under some circumstances liquids can support tension. Tien and Lienhard noted this and wrote:
   The van der Waals equation predicts that at low temperatures liquids sustain enormous tension – a fact that has led some authors to take the equation lightly. In recent years measurements have been made that reveal this to be entirely correct. Liquids that are clean and free of dissolved gas can be subjected to tensions greater in magnitude than $p_{\text{c}}$.
This is another interesting feature of the van der Waals theory.