Maxwell construction

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_vp|_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}\le v\le 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_vp|_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_g=V_g/N_g>v_f,$$ that coexist at the same saturation temperature and pressure. As the heating continues the amount of vapor, $$N_g$$ increases and that of the liquid, $$N_f=N-N_g$$, decreases. All the while the pressure, $$p_s$$ and temperature, $$T$$, remain constant and the volume $$V=V_f+V_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_g)/N+(V_g/N_g)(N_g/N)=v_f(1-x)+v_gx$$ where $$x=N_g/N$$, the mole fraction of the vapor, $$0\le x\le 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_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}\le p\le 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."

The easiest way to understand Maxwell's argument is to consider the cycle he suggested on a temperature—molar entropy plane. Every introductory thermodynamics text presents the fact that on such a 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 he 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$$.

Further the same texts describe the area under these curves when plotted on a pressure—molar volume, see Fig. 1, as being 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_g}^{v_f}\,p\,dv+\int_{v_f}^{v_g}\,p_s\,dv=-\int_{v_f}^{v_g}\,p\,dv+p_s(v_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_g,T)$$ are three equations for the four variables, $$p_s,T,v_f,v_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_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_g=p_s$$ and $$T_f=T_g=T$$, material equilibrium requires $$g_f=g_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_g-s_f)$$, and from the first law at constant pressure $$q_{\rm vap}=h_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_pg|_T\,dp+\partial_Tg|_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_pg|_T=v$$ and $$\partial_Tg|_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_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_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_g-g_f=-\int_{v_f}^{v_g}\,p(v,T)\,dv+p_s(v_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_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^2F>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_vf|_T\,dv+\partial_Tf|_v\,dT=-p\,dv-s\,dT,$$ this minimum principle leads to the stability condition $$\partial^2f/\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_vf_Tv=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_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.

Application to the van der Waals equation
From the van der Waals equation applied to the saturated liquid, $$v_fv_{\rm max}$$, states $$p_s=\frac{RT_s}{v_f-b}-\frac{a}{v_f^2}\qquad p_s=\frac{RT_s}{v_g-b}-\frac{a}{v_g^2}$$ These two equations specify 4 variables so they can be solved for $$p_s, T_s$$ in terms of $$v_f, v_g$$. This results in $$p_s=p^*\frac{v^{*2}[v_fv_g-v^*(v_f+v_g)]}{v_f^2v_g^2}\qquad T_s=T^*\frac{v^*(v_f+v_g)(v_f-v^*)(v_g-v^*)} {v_f^2v_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_g-v^*}{v_f-v^*}\right)+T^*\frac{v^*(v_g-v_f)}{v_fv_g}+p_s(v_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 number 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_g}\right)=\frac{(\varrho_f-\varrho_g)(\varrho_g+\varrho_f+2)}{\varrho_f+\varrho_g+2\varrho_f\varrho_g}$$ Although transcendental, this equation has a simple analytic, parametric solution obtained by writing the left side of the equation, which is just $$(s_g-s_f)/R$$, as $$\ln\left(\frac{\varrho_f}{\varrho_g}\right)=\frac{s_g-s_f}{R}=\delta=2y$$ Then $$\varrho_f=e^{\delta}\varrho_g$$ and when used to eliminate $$\varrho_f$$ from the right hand side a linear equation for $$\varrho_g$$ is obtained, whose solution is $$\varrho_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_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_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_vp|_T=0$$, and $$\partial^2_vp|_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\le 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_g(0)=1/2$$ and in the limit $$y \rightarrow\infty$$, $$\varrho_f(y)\sim 2(y-1)$$ and $$\varrho_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_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_g\sim (p^*v^*/T^*)T_s\rho_g=\rho_gRT_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_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_c$$. This is another interesting feature of the van der Waals theory.