This Demonstration shows a pressure–temperature (\(P\)–\(T\)) diagram for an ethane/heptane mixture in vapor–liquid equilibrium. For each ethane mole fraction \(x_1\), the liquid (bubble-point) curve is drawn in blue and the vapor (dew-point) curve in green. Curves are shown at six fixed mole fractions; use the slider to add a dashed curve at the selected value \(x_1\).
Along each curve the two phases are in equilibrium, so that
$$y_i\,P = x_i\,P_i^{\text{sat}}, \qquad x_1 + x_2 = 1, \qquad y_1 + y_2 = 1,$$where \(x_i\) and \(y_i\) are the liquid and vapor mole fractions of component \(i\) (\(i=1\) for ethane, \(i=2\) for heptane) and \(P_i^{\text{sat}}\) is the saturation pressure. The critical locus (black curve) connects the critical points \((T_c,\,P_c)\) of all ethane/heptane mixtures. Uncheck “show all curves” to display only the pure components and the selected mole fraction.
At equilibrium the partial pressures of each component in the vapor and liquid phases are equal, which for an ideal solution gives Raoult’s law:
\(y_i P = x_i P_i^{\mathrm{sat}}\)
\(x_1 + x_2 = 1\)
where \(x_i\) and \(y_i\) are the liquid and vapor mole fractions of component \(i\) (\(i = 1\) for ethane and \(i = 2\) for heptane) and \(P_i^{\mathrm{sat}}\) is the saturation pressure.
The saturation pressures are calculated using the Antoine equations:
\(P_i^{\mathrm{sat}} = 10^{\,A_i - \frac{B_i}{T + C_i}}\)
where \(A_i\), \(B_i\) and \(C_i\) are Antoine constants and \(T\) is temperature.
The Peng–Robinson equation of state for mixtures is used to determine the phase envelope and the critical locus. The critical point is where the bubble and dew curves meet; connecting these points is the critical locus. The K-values are calculated:
\(K_i = \frac{y_i}{x_i}\)
\(K_i = \frac{\phi_i^{\mathrm{L}}}{\phi_i^{\mathrm{V}}}\).
The fugacity coefficient \(\phi^{k}\) is calculated:
\(\ln\phi^{k} = \frac{B}{B^{k}}(Z^{k}-1) - \ln(Z^{k}-B^{k}) - \frac{A^{k}}{2\sqrt{2}B^{k}}\ln\!\left(\frac{Z^{k}+B^{k}(1+\sqrt{2})}{Z^{k}+B^{k}(1-\sqrt{2})}\right)\,(\frac{2\sum_j x_jA_j}{A^{k}} - \frac{B}{B^{k}})\)
\(A = \frac{a_{m}P}{R^{2}T^{2}},\qquad B = \frac{b_{m}P}{RT}\)
where \(Z\) is the compressibility factor, the superscript \(k=(L,V)\) is for liquid and vapor, \(A\) and \(B\) are constants, and \(P\) is pressure.
For a mixture:
\(a_{m} = \sum_i\sum_j x_i x_j a_{ij},\qquad a_{ij} = \sqrt{a_i a_j}\,(1-k_{ij}),\qquad b_{m} = \sum_i x_i b_i\)
\(a_i = 0.457\frac{R^{2}T_{c,i}^{2}}{P_{c,i}}\left(1+\kappa_i\left(1-\sqrt{\frac{T}{T_{c,i}}}\right)\right)^{2}\)
\(b_i = 0.0778\frac{R T_{c,i}}{P_{c,i}},\qquad \kappa_i = 0.37464 + 1.54226\,\omega_i - 0.26992\,\omega_i^{2}\)
where \(a_{m}\) and \(b_{m}\) are the attraction and repulsion factors for the mixture, \(a_i\) and \(b_i\) are the attraction and repulsion parameters for the pure component, \(k_{ij}=0\) is the binary interaction parameter, \(T_c\) and \(P_c\) are the critical temperature and pressure, \(\kappa\) is a simplification term, and \(\omega\) is the acentric factor.
The equation \(Z^{3}+\alpha_2 Z^{2}+\alpha_1 Z+\alpha_0=0\) is solved for the compressibility factor,
\(\alpha_2 = B-1,\qquad \alpha_1 = A - 3B^{2} - 2B,\qquad \alpha_0 = -AB + B^{2} + B^{3}\)
where \(\alpha_2\), \(\alpha_1\) and \(\alpha_0\) are constants.
This simulation was created in the Department of Chemical and Biological Engineering at University of Colorado Boulder for LearnChemE.com by John L. Falconer using Claude AI. It is a JavaScript/HTML5 implementation of a Mathematica simulation by Adam J. Johnston and Rachael L. Baumann. It was prepared with financial support from the National Science Foundation (DUE 2336987 and 2336988) in collaboration with Washington State University. Address any questions or comments to LearnChemE@gmail.com.