You are on page 1of 13

An algorithm to identify vapor-liquid-liquid

equilibria of binary mixtures from vapor-liquid


equilibria
Ian H. Bell,∗,† Ulrich K. Deiters,‡ and Andreas Jäger¶
†Applied Chemicals and Materials Division, National Institute of Standards and
Technology, Boulder, CO 80305
‡Institute of Physical Chemistry, University of Cologne, 50939 Köln, Germany
¶Institute of Power Engineering, Faculty of Mechanical Science and Engineering,
Technische Universität Dresden, Helmholtzstraße 14, 01069 Dresden, Germany

E-mail: ian.bell@nist.gov

Abstract trouble increases. See for instance the crit-


icality plots in Ref. 1 for one example how
In this work we demonstrate that tracing the a more complicated (and accurate) model can
vapor-liquid equilibria for binary mixtures also cause challenges in calculating critical points.
includes all the information needed to obtain Therefore, it is desirable to develop algorithms
the three-phase-line if one is present. This that are extremely reliable, even if they might
simple observation serves as a launching point incur a computational speed penalty (though
for calculation of liquid-liquid equilibrium and this penalty is by no means guaranteed). For
three-phase equilibria, even when one compo- this reason the authors have been developing
nent is supercritical. We close with the demon- routines 2–6 for phase equilibria that have at
stration of the automatic construction of an their core the notion of starting at a well-
isothermal pressure-composition figure, a capa- characterized point (a pure component value
bility enabled by solving for the three-phase for instance), and then tracing along the phase
state. Examples in the Python programming equilibria surface from there, rather than car-
language demonstrate in detail how the method rying out a “blind” phase equilibrium calcula-
is applied. tion for which the algorithm must have a good
(sometimes very good) estimate of phase den-
sities and compositions in order to converge to
1 Introduction the correct phase equilibrium solution.
The calculation of multi-phase equilibria from The three-phase (vapor, liquid, liquid) solu-
a thermodynamic model appears at first glance tion obtained from the two-phase vapor-liquid
to be a straightforward task. One must “sim- equilibria is a good launching point for liquid-
ply” equate the chemical potentials of all com- liquid equilibria calculations. Therefore, the
ponents in all phases and the pressures in all focus of this paper is on how to obtain this
phases. Et voilà! On the contrary, reliable cal- three-phase equilibrium in a very reliable fash-
culations for phase equilibria are by no means ion. The algorithm we propose can be concisely
guaranteed, and as the model becomes increas- expressed, and implemented with the use of ex-
ingly mathematically involved (often positively isting computational tools. A key advantage of
correlated with its accuracy), the likelihood of the approach proposed here is that because of

1
the use of tracing we never solve for density at a three-phase bubble point calculation, see Ref.
a given temperature, pressure and composition, 19. Venkatarathnam 14 states that the proposed
a task that is challenging for some thermody- algorithm might fail in some special cases.
namic models, 7,8 and is not entirely foolproof Other publications propose algorithms for the
for cubic equations of state either. 9 three-phase flash problem 20–24 or methods for
While the construction of isothermal tracing the vapor-liquid-liquid equilibrium lines
pressure-composition diagrams including three- given a suitable starting point. 25 Based on their
phase curves is not novel (a few examples: Refs. previous work, 25 Cismondi and Michelsen 26
6,10–15), the literature is quiet on the details proposed a method to construct p-x and T-x
of the process. Some authors proposed algo- diagrams by first calculating critical points and
rithms for constructing isothermal pressure- three-phase lines and then subsequently con-
composition diagrams for rather special ap- structing all two phase regions. Many of the al-
plications, as for example the precipitation of gorithms proposed in the literature employ the
asphaltene phases 16 or multi-phase equilibria tangent plane distance criterion 27,28 in order to
including minerals in geosciences. 17 Michelsen test for phase stability. In the thermophysical
and Mollerup 18 (page 310-317) propose two property software TREND, 29 three-phase equi-
different methods for identifying three-phase libria of binary mixtures can currently only be
vapor-liquid-liquid equilibria (VLLE) when automatically calculated when choosing pres-
constructing p-x or T-x diagrams. The first sure and enthalpy or pressure and entropy as
method is tracing the vapor-liquid equilibrium input. The corresponding algorithms imple-
(VLE) to meta- and unstable conditions. In the mented in TREND are described in Ref. 22.
case that the binary mixture exhibits a three- The REFPROP software library is the in-
phase equilibrium, there will be a minimum dustry standard for high-accuracy thermophys-
and a maximum in the bubble line, which can ical property models and explicitly does not in-
be detected by the algorithm. Michelsen and clude the consideration of multiphase equilibria.
Mollerup 18 suggest to subsequently identify the The warning message when opening the REF-
same vapor phase which is in equilibrium with PROP user interface for the first time reads:
two different liquids in order to determine the “The present version is limited to vapor-liquid
three-phase equilibrium. The second method equilibrium (VLE) only and does not address
suggested by Michelsen and Mollerup 18 is a liquid-liquid equilibrium (LLE), vapor-liquid-
sophisticated method for finding the VLLE by liquid equilibrium (VLLE) or other complex
first generating a guess value for pressure (in forms of phase equilibrium.” The work in this
case of an isotherm in a p-x diagram). They paper begins the process of making REFPROP
state that the guess value for pressure is in most able to solve for multi-phase equilibria.
cases overestimated. Therefore, most likely, a Therefore, in this work we propose a repro-
liquid-liquid equilibrium (LLE) will be found ducible and robust approach for calculating
and subsequently the LLE is traced to lower three-phase equilibria by using the concept of
pressures until the VLLE can be determined. isochoric thermodynamics, 2–6 which can also be
Venkatarathnam 14 proposed a density march- used to automatically construct p-x diagrams
ing method to construct p-x and T-x diagrams for binary mixtures.
including the vapor-liquid-liquid equilibrium
line. The algorithm can pass through meta-
and unstable VLE and LLE solutions. From 2 Algorithm
the intersection of the stable liquid and the
Before getting into the details, the approach is
stable vapor branch, the VLLE can be located.
explained in words:
Alternatively, Venkatarathnam 14 proposes to
find the VLLE before constructing the diagram, ˆ Vapor-liquid-liquid equilibrium (VLLE)
similar to the approach discussed in Ref. 18. is the connection of two conventional
For this case, Venkatarathnam 14 suggests to do vapor-liquid-equilibrium (VLE) solutions.

2
So to obtain the VLLE solution, find the for the isothermal case: 5
two VLE solutions with the same vapor
(H ′ ρ′′ )⊺ dρ′
   
phase and different liquid phases. 1
= (4)
(H ′ ρ′ )⊺ dp T,σ
1
ˆ In order to obtain this VLLE solution, dρ′′ dρ′
first we look for vapor phase intersec- H ′′ = H′ (5)
dp T,σ dp T,σ
tions of the vapor-liquid phase equilibria
in pressure-composition coordinates along where the bracketed term in the left-hand-side
an isotherm. There should be one valid of Eq. (4) has dimensions of 2 × 2 and the ρ are
intersection if VLLE is present. considered to be column vectors. The matrix H
is the Hessian of the Helmholtz energy density
ˆ If the vapor phases obtained are close
with entries given by
to being identical, then VLLE has likely
been found. Polishing of the approximate 
1
 2 r
∂ Ψ
solution from intersection yields the equi-  ρ + ∂ρ2 if i = j


i i ρ
librium state for the three phases. Hij =  2 r  k̸ =i (6)
∂ Ψ
if i ̸= j



∂ρi ∂ρj
2.1 Isochoric Thermodynamics
Deriving a set of differential equations along
In the formalism of isochoric thermodynamics, the phase equilibrium surface is the first step.
the Helmholtz energy density Ψ is the indepen- The next step is to develop an algorithm for in-
dent variable and the dependent variables are tegrating the set of differential equations along
temperature T and the vector of molar concen- the phase envelope. In principle it is possible
trations of the components ρ to integrate these equations with temperature,
pressure, or a molar concentration of a compo-
Ψ(T, ρ) = a(T, ρ) × ρ (1)
nent as the tracing variable, 3–5 but it is difficult
and all derivatives are obtained from deriva- to know a priori which tracing approach is most
tives of this potential with respect to temper- appropriate for a particular case (curve of con-
ature and molar concentrations. The molar stant temperature, pressure, or molar composi-
Helmholtz energy a is obtained from the ther- tion), and not all will be able to yield a complete
modynamic model (which may be considered to trace due to local extrema in the tracing vari-
be arbitrary at this point). Conversion to the able curve. 6 A new approach eliminating the
more commonly used molar density and mole need to select the tracing variable is to trace in
fractions go like terms of an arclength variable. This paramet-
X ric tracing approach does not require any user
ρ= ρi (2) intervention to trace the isoline or selection of
i tracing variable. The arclength parameter (the
ρi parameter in parametric tracing) is not a mea-
xi = (3)
ρ sureable quantity, rather it is a mathematical
convenience. But this approach has proven its
The derivatives along the phase equilibrium reliability in tracing complex phase equilibria
surface along an isotherm can be defined analyt- behaviors as well as tracing critical curves by a
ically in terms of the Helmholtz energy density. similar approach. 30
A very similar process applies for derivatives The differential of the new parametric tracing
taken along isobars or isopleths (curves of con- variable t is defined based on the norm of the
stant mixture composition). For a binary mix- differentials of the concentration vectors:
ture, the derivatives of each phase are obtained q
from sequentially solving two linear problems dt = ± (dρ′ )2 + (dρ′′ )2 (7)

3
where the sign of the ± is selected such that the Tracing proceeds until a) the other pure fluid
tracing does not result in an abrupt change in has been obtained (a mole fraction less than
direction; phase envelopes tend to be smooth. zero is obtained) or b) when a critical point is
The sign may need to be updated during the approached. Heuristic metrics in the tracer are
course of integration, and needs to be specified used to stop when either of these cases are en-
at the beginning of the integration. The norm countered, as well as to handle some other cor-
operation is defined by ner cases (not relevant to the system of nitro-
X gen + ethane, which we will be using as an ex-
(dρχ )2 = (dρχi )2 , χ = ′ ,′′ (8) ample). An advantage of this approach is that
i azeotropy is not a hindrance to the tracing.
and dividing through by the differential of p
yields the derivative at constant temperature 2.2 Obtaining Approximate So-
v
u !2 !2 lution
dt u dρ′ dρ ′′
= ±t + (9) The advent of parametric tracing of phase equi-
dp dp T,σ dp T,σ libria 6 has resulted in a very reliable means of
obtaining contiguous portions of cross-sections
from which derivatives of the concentration vec- of the phase-equilibrium surface. In this case,
tors may be defined 6 we use the Python package isochoric to do the
tracing, and the results for a low-temperature
dρ′ dρ′ dp
= (10) isotherm of 120.3420 K for the mixture of nitro-
dt dp T,σ dt gen + ethane are presented in Figure 1. To gen-
dρ′′ dρ′′ dp erate this figure, one trace was initiated at pure
= (11)
dt dp T,σ dt nitrogen (x1 = 1 at a pressure of 2.55 MPa) and
another at pure ethane (x1 = 0 at a pressure of
and the pressure derivatives are as given above 370 Pa). Each portion of the isothermal phase
in Eq. (4) and Eq. (5). equilibria was traced with the parametric tracer
The integration of the above set of differen- until it terminated, yielding the curves shown
tial equations, for which an adaptive step size in the figure. Note that the right portion of the
algorithm should be used, traces away from a graph has a very different axis scale to improve
known state. In this work, we always start our the legibility. The calculated values are given
tracing from a pure fluid endpoint. That is, we in the tables in the supporting information for
carry out a pure fluid phase equilibrium calcula- verification purposes.
tion and the values for the co-existing densities In this figure, the three-phase pressure is
for a given temperature are obtained. From this highlighted, and the liquid-phase solutions are
pure fluid solution is obtained the values of ρ at rendered more subtly so that the focus is on
a pure fluid endpoint. Supposing the pure-fluid the vapor phase. The intersection of the va-
saturated liquid and vapor densities of compo- por phase solutions occurs at the three-phase
nent A are ρ′A and ρ′′A , respectively, the vector solution. The thermodynamic state can be
of molar densities would be ρ′ = [ρ′A , 0] for the fully specified by the temperature, pressure and
liquid phase ρ′′ = [ρ′′A , 0] for the vapor phase composition. The crossing of the vapor phase
for the mixture of A + B. If the temperature curves (crossing indicating that they are at the
is subcritical for both members of the binary same composition and pressure) implies that
mixture, the tracing can in principle be initi- the thermodynamic states must be identical.
ated at either pure fluid endpoint. There are While it is by no means guaranteed, in this
some additional numerical concerns in the case case the three-phase solution is in very good
of infinite dilution (one component density be- agreement with experimental data from the
ing zero), which are handled properly in the literature because the thermodynamic model
code, and described in the literature. 3 represents the experimental data well. The

4
3.0
2.5 2.3211 MPa
2.0
/ MPa

1.5
p

1.0
0.5
0.0
0.0 0.2 0.4 0.6 0.8 0.9982 0.9991 1.0000
x1 / mole frac.

Figure 1: Nitrogen(1) + ethane(2) tracing at a temperature of 120.3420 K. Open markers are


experimental values from Llave et al. 31 Thick lines are vapor phases, thin lines are liquid phases.

isotherm temperature was selected because it and B. Figure 2 shows the case of a Maclaurin
matches a temperature measured by Llave et trisectrix intersecting itself and intersecting a
al. 31 (after conversion to the ITS-90 tempera- line. The mathematically continuous curves are
ture scale 32 ) and is below the critical tempera- discretized, to highlight the fact that the same
ture for both fluids. discretized approach is needed in this work.
In this particular case, a single trace, started These two cases are identical to the self- and
at either of the pure components, marching in cross-intersections needed in this work.
ρ1 , would have also allowed for the full trace in
one shot, but that is not guaranteed, and the
parametric approach is more generally applica- 1.0
ble. The advantage of the parametric approach A
is that no control variables or human decisions 0.5
are needed; the algorithm stops when it hits a
critical point or a pure fluid. 0.0 B
y

While the human vision system is an ad-


vanced tool for identifying intersections of space 0.5
curves in two dimensions, computers struggle
with this task. Curve intersection algorithms 1.0
tend to be surprisingly slow, and there are many
numerical pitfalls that can be introduced (de- 2.0 1.5 1.0 0.5 0.0 0.5 1.0
x
generacy, etc.). Vectorization allows for a more
computationally efficient solution, as is neces- Figure 2: The Maclaurin trisectrix (curve A),
sary here. The intersection problem is dele- given by x = a(t2 − 3)/(t2 + 1), y = at(t2 −
gated to specialized routines, providing the ar- 3)/(t2 + 1), with t in [−3, 3] and a = 0.5, inter-
rays of points xA , yA in the search for self- secting itself (star) and intersecting the curve
intersection of space curve A, or xA , yA , xB , yB B given by the line y = 0.1x + 0.1 (squares)
for the case of intersection of the space curves A

5
The intersection routines return the indices for each of the k components (here k = 2 be-
of the array where the intersection occurred cause there are two components) in the three
and linearly interpolated values of x and y (′ ,′′ ,′′′ ) phases. For a binary mixture at fixed
at the intersection. Returned intersections temperature there are six independent variables
then are filtered to remove undesirable solu- (two molar concentrations per phase), and the
tions caused by numerical artifacts, mostly six equations to be forced to zero by a non-
in the self-intersection case, where spurious linear rootfinding algorithm are:
self-intersection is much more likely, especially  ′
p − p′′

around critical points and cusps. The fil-
 p′′ − p′′′ 
ter is that the two endpoints of each of the  ′ 
 µ0 − µ′′0 
line segments forming the intersection should r=  (14)
 µ′0 − µ′′′
be thermodynamically stable, which is guaran- 0 

 ′
 µ1 − µ′′1 
teed by λ1 (H) > 0.01 (λ1 being the minimum
eigenvalue of the Hessian matrix H defined by µ′1 − µ′′′
1
Eq. (6)).
Dropping portions of the chemical potential
Locating the vapor phase intersection yields
that are the same in each phase, the phase equi-
the pressure of the three-phase solution and
librium problem can be refactored 5 in terms of
the composition of the vapor phase. The next
residual properties only as
step is to backwards interpolate the liquid-
phase portions of the trace(s) to obtain the ap- 1
 r
∂Ψ
r
proximate molar concentrations for the liquid Ωk = + ln(ρk ) (15)
RT ∂ρk ρj̸=k ,T
phases. To do so, each of the space curves ρ′k (p)
is linearly interpolated for the three-phase pres- yielding
sure obtained from intersection to yield the es-
p′ − p′′
 
timated values at VLLE. This yields the molar
concentrations of each component in the liquid 
 p′′ − p′′′ 

phases that are in equilibrium with the paired  (Ω )0 − (Ωr )′′0
r ′ 
r=  (16)
vapor phase solution. While not especially ac- 
 (Ωr )′0 − (Ωr )′′′
0


curate in general, the error introduced by linear  (Ωr )′1 − (Ωr )′′1 
interpolation a) is very small because the curves (Ωr )′1 − (Ωr )′′′
1
are nearly linear near the intersections b) will
be removed by the phase equilibrium polishing The residua of chemical potentials could also
routine described next. A numerical example be expressed as differences in fugacities with no
of the procedure is provided below. loss in generality. The derivation is in Section
2 of the supporting information.
In this case, we know that the guess value
2.3 Polishing for the three-phase solution is very close to
Once an approximate three-phase solution de- the full solution, so standard multidimensional
fined by the molar concentration arrays in each rootfinding can be used. In this case we used
phase (ρ′ , ρ′′ , ρ′′′ ) has been identified for a given the root function from the scipy.optimize pack-
temperature, the next step is to polish the so- age which uses finite differentiation to build
lution to obtain the “true” thermodynamic so- the Jacobian matrix. If additional speed were
lution to numerical precision. The phase equi- needed for this rootfinding step, analytical
librium problem is expressed as derivatives of the residual functions could be
derived.
µ′k = µ′′k = µ′′′
k (12)
′ ′′ ′′′
p =p =p (13)

6
2.4 Supercritical Extension agnostic as to the particular equation of state
selected; all that is needed is an implementation
If the mixture is supercritical (is above the crit-
of αr and its thermodynamic derivatives.
ical temperature of at least one component), it
The entire codebase of the tracer is avail-
is no longer possible to initialize a trace from at
able at https://github.com/usnistgov/
least one of the pure fluids at its saturation tem-
isochoric, which is available in the python
perature because the pure fluid solution does
package index (PYPI). Version 0.10.2 of the
not exist. An alternative approach is there-
tracer was used to generate all the figures in
fore needed, following the approach used for
this paper. The scripts used to generate the fig-
the other phase equilibrium tracing: we express
ures in the paper as well as an environment file
the conditions of three-phase equilibrium alge-
for conda are included in the deposited data at
braically, take the differentials of these condi-
https://doi.org/10.18434/mds2-2487. The
tions, and develop systems of differential equa-
thermodynamic backend is the core thermody-
tions along the phase envelope. We then inte-
namic backend of CoolProp. 37
grate this system of differential equations from
In order to explain the procedure in some-
a subcritical temperature where the three-phase
what more detail, a worked example is provided
solution can be obtained (with the molar con-
here along with plenty of significant digits to
centrations ρ′ , ρ′′ , and ρ′′′ ) in order to obtain
ensure that the values are in agreement. Again
supercritical solutions. More precisely, we ob-
we select the 120.3420 K isotherm, matching
tain a set of derivatives dρα /dT for α corre-
the data from Llave et al., 31 which has the two
sponding to each of the three phases, and inte-
traces shown in Fig. 1. The numerical intersec-
grate this system of derivatives from a subcrit-
tion code yields the approximate solutions for
ical temperature to the supercritical tempera-
the molar concentrations of the three phases (in
ture of interest to obtain the molar concentra-
units of mol/m3 , for the pair nitrogen + ethane
tions in each phase. If temperature and mo-
in that order) of
lar concentrations are known in each phase, so
too is the pressure from p = f (T, ρ); the pres-
sure should be the same in each phase. The ρ′ = [5676.16238, 16112.5673] (20)
mathematics required for these derivatives are
ρ′′ = [19895.8089, 1659.22076] (21)
summarized in Fig. 3 and laid out in detail in
Section 1 of the supporting information. ρ′′′ = [3686.40274, 3.27912599] (22)

for which the calculated values of pressure (in


3 Results Pa) in the three phases are

In order to demonstrate the approach, we have p′,′′,′′′ = [2328534, 2323538, 2326234] (23)
selected the mixture nitrogen + ethane. This
non-polar and non-associating system has been After carrying out the complete phase equilib-
considered because three independent experi- rium, the pressures are equated to numerical
mental datasets from the literature exist for precision, and the molar concentrations of each
cross-comparison. In this work we use the of the phases (in units of mol/m3 , with the same
multi-fluid approach with the pure fluid EOS ordering as before) are equal to
from their respective reference equation of state
(nitrogen: Ref. 33, ethane: Ref. 34) and the
ρ′ = [5640.76015, 16141.2539] (24)
mixture model from GERG-2004. 35 This is
the default model used in REFPROP, 36 Cool- ρ′′ = [19890.1584, 1698.9167] (25)
Prop, 37 and TREND. 29 This system can also ρ′′′ = [3669.84793, 3.25894533] (26)
be reasonably modeled by a range of other less
accurate thermodynamic models (cubic EOS, Comparing these results with the approxi-
etc.). The approach employed in this work is mate solution above highlights that the pol-

7
    ′     ′  
∂µ′′ ∂µ ∂p′′
− ∂T ′′
·ρ − − ∂p
(Ψ′ (ρ′′ − ρ′ ))⊺ dρ′ 
 
∂T ∂T ∂T
ρ ρ ρ ρ

· = (17)
(Ψ′ (ρ′′′ − ρ′ ))⊺
     
dT ′′′
  ′
 ′′′
  ′
∂µ
− ∂µ · ρ′′′ − ∂p − ∂p
 
∂T ∂T ∂T ∂T
ρ ρ ρ ρ

"  #
′′ ′ ′′ ′
 
dρ dρ ∂µ ∂µ
Ψ′′ = Ψ′ − − (18)
dT dT ∂T ρ ∂T ρ
"  #
dρ′′′ dρ′ ∂µ′′′ ∂µ′
 
Ψ′′′ = Ψ′ − − (19)
dT dT ∂T ρ ∂T ρ

Figure 3: The set of equations to be sequentially solved in order to obtain the temperature deriva-
tives dρ′ /dT , dρ′′ /dT , and dρ′′′ /dT along the VLLE curve. In the first equation, the bracketed
term in the left-hand-side is of dimension 2 × 2 and µ and ρ are considered to be column vectors.

ishing is doing only a tiny modification to the 4.5 Yu et al. (1969)


phase equilibrium solution because the tracing 4.0 Gasem et al. (1981)
Llave et al. (1985)
+ intersection approach tracks so closely the 3.5
true thermodynamic solution. p / MPa 3.0
To begin, we consider the three-phase pres-
sure, as shown in Fig. 4. The critical temper-
2.5
ature of nitrogen, at 126.192 K, is the lower 2.0
of the two pure components, so for any tem- 1.5
peratures above 126 K, a full phase equilib- 1.0
rium solution was carried out at 120 K (low 2
0
100 × (pcalc/pexp 1)

enough to avoid numerical difficulties too close


to the critical point of nitrogen) and then the 2
system of differential equations shown in Fig. 3
was integrated from 120 K to the temperature
4
of interest, yielding an approximate (but very 6
good) VLLE solution at the temperature of in- 8
terest. A complete phase equilibrium solution 10
was then carried out at the target temperature 12
to obtain the exact solution. We plot the ob- 105 110 115 120 125 130 135 140
tained VLLE pressure according to the litera- T/K
ture sources 31,38,39 and the model values as a
Figure 4: Three phase pressure and deviations
function of temperature, as well as the relative
as a function of temperature for nitrogen +
deviations. Aside from the data of Yu et al., 38
ethane.
which we deem to be less reliable, the relative
deviations in pressure are all within 4%, with a
clear systematic bias of approximately -3%.

8
0.34 Yu et al. (1969)
0.98 Yu et al. (1969)
0.32 Llave et al. (1985) 0.97 Llave et al. (1985)
xN2, L1 / mole frac.

xN2, L2 / mole frac.


0.30
0.28 0.96
0.26 0.95
0.24 0.94
0.22
0.20 0.93
0.18 0.92
0.04 0.035
0.030
xN2, L1, exp xN2, L1, calc

xN2, L2, exp xN2, L2, calc


0.03 0.025
0.02 0.020
0.015
0.01 0.010
0.00 0.005
0.000
0.01 0.005
105 110 115 120 125 130 135 140 105 110 115 120 125 130 135 140
T/K T/K
Figure 5: Three phase mole fraction of nitrogen Figure 6: Three phase mole fraction of nitrogen
in the nitrogen-weak liquid phase L1 and model in the nitrogen-rich liquid phase L2 and model
deviations as a function of temperature for ni- deviations as a function of temperature for ni-
trogen + ethane. trogen + ethane.

On the other hand, the liquid phase compo-


sitions are less well predicted. Figure 5 and
Fig. 6 show the same figure for the mole frac-
tions of nitrogen in each liquid phase. While
the qualitative agreement is good, the quanti-
tative agreement is poor. The disagreement is
due to the thermodynamic model itself, not a
problem in the three-phase solving routines.

3.1 Automatic p-x Diagrams


A challenge when trying to automatically con-
struct isothermal pressure-composition dia-
grams for binary mixtures is that portions of
the phase equilibrium not attached to the pure
fluid are difficult to obtain. For instance, in
the case of nitrogen + ethane, at a tempera-
ture of 130 K, it is not possible to initialize the
tracing at pure nitrogen because we are above
the critical point of nitrogen. On the other
hand, if the three-phase curve has been ob-
tained from a calculation at lower temperature
followed by integration to higher temperature,

9
it is possible to initiate the three portions of Conclusions
the p-x phase boundary from the three solu-
tions: L1 +L2 , V +L1 , and V +L2 . In this way This method is able to find the three-phase so-
we can automatically build some p-x bound- lution if it exists, in a reliable fashion. Only
aries that are difficult to construct by other very minimal assistance from the user is needed
means. As a demonstration, taking inspiration to guide the algorithm, and this guidance is
from a similar figure for nitrogen + ethylene only needed when the temperature is outside
in Gasem et al., 39 we present in Fig. 7 the the range of allowed saturation temperatures of
pressure-composition diagram for nitrogen + the two pure component EOS.
ethane at 130 K. First the three-phase solution There is nothing special about constructing a
is obtained as described above, yielding the L1 , constant temperature cross-section of the phase
L2 , and V equilibrium phases. Then parametric equilibrium surface; constant pressure cross-
tracing is launched away from the three-phase sections could also be constructed, following the
solution, yielding the p-x plot of the isotherm. same procedure for parametric tracing, followed
This approach is identical to that used in Fig. by curve intersection, and obtaining the VLLE
8 of Ref. 6. The computational code is quite solution.
efficient; the entire diagram is plotted in less
than a second.
4 Data Availability
4.5
The scripts and data used to generate the fig-
4.0 ures in this paper have been deposited in the
NIST institutional repository at https://doi.
3.5 org/10.18434/mds2-2487

3.0 4.0
5 Supplementary Material
2.5 3.9
p / MPa

3.8 The supplementary material includes the


2.0 derivation of the three-phase temperature
3.7 derivatives
1.5 3.6
1.0 3.5 Acknowledgments
0.95 1.00
0.5 The authors thank Ivan Antolovic from TU
Berlin for provoking us to revisit this topic, and
0.0 Stefan Herrig for bringing this problem to our
0.0 0.2 0.4 0.6 0.8 1.0 attention in the first place.
xN2 / mole frac.

Figure 7: Pressure-composition plot for nitro- References


gen + ethane at 130 K constructed by ob-
taining the three-phase solution and paramet- (1) Bell, I. H.; Jäger, A. Calculation of criti-
rically tracing away from the three-phase so- cal points from Helmholtz-energy-explicit
lution. “Vapor” phases are thick curves (the mixture models. Fluid Phase Equilib.
other liquid phase for LLE portion), and “liq- 2017, 433, 159–173, DOI: 10.1016/j.
uid” phases are thin curves. The inset is in the fluid.2016.10.030.
same units as the main figure, and is indicated
(2) Deiters, U. K.; Kraska, T. In High-
by the shaded region.
Pressure Fluid Phase Equilibria: Phe-

10
nomenology and Computation; Kiran, E., (11) Gernert, J.; Span, R. EOS-CG: A
Ed.; Elsevier, 2012. Helmholtz energy mixture model for hu-
mid gases and CCS mixtures. J. Chem.
(3) Deiters, U. K. Differential equations for Thermodyn. 2016, 93, 274–293, DOI: 10.
the calculation of fluid phase equilibria. 1016/j.jct.2015.05.015.
Fluid Phase Equilib. 2016, 428, 164–173,
DOI: 10.1016/j.fluid.2016.04.014. (12) Aasen, A.; Hammer, M.; Müller, E. A.;
Wilhelmsen, Ø. Equation of state and
(4) Deiters, U. K. Differential equations for force fields for Feynman-Hibbs-corrected
the calculation of isopleths of multicom- Mie fluids. II. Application to mixtures of
ponent fluid mixtures. Fluid Phase Equi- helium, neon, hydrogen, and deuterium.
lib. 2017, 447, 72–83, DOI: 10.1016/j. J. Chem. Phys. 2020, 152, 074507, DOI:
fluid.2017.03.022. 10.1063/1.5136079.
(5) Bell, I. H.; Deiters, U. K. On the con- (13) Aasen, A.; Hammer, M.; Lasala, S.;
struction of binary mixture p-x and T - Jaubert, J.-N.; Wilhelmsen, Ø. Accu-
x diagrams from isochoric thermodynam- rate quantum-corrected cubic equations of
ics. AIChE J. 2018, 64, 2745–2757, DOI: state for helium, neon, hydrogen, deu-
10.1002/aic.16074. terium and their mixtures. Fluid Phase
(6) Deiters, U. K.; Bell, I. H. Calculation of Equilibria 2020, 524, 112790, DOI: 10.
phase envelopes of fluid mixtures through 1016/j.fluid.2020.112790.
parametric marching. AIChE J. 2019, 65, (14) Venkatarathnam, G. Density Marching
e16730, DOI: 10.1002/aic.16730. Method for Drawing Phase Envelopes. 3.
(7) Gernert, J.; Jäger, A.; Span, R. Cal- P-xy Diagrams of Binary Mixtures. Ind.
culation of phase equilibria for multi- Eng. Chem. Res. 2017, 56, 13894–13904,
component mixtures using highly accurate DOI: 10.1021/acs.iecr.7b03188.
Helmholtz energy equations of state. Fluid (15) Qian, J.-W.; Privat, R.; Jaubert, J.-
Phase Equilib. 2014, 375, 209–218, DOI: N.; Coquelet, C.; Ramjugernath, D.
10.1016/j.fluid.2014.05.012. Fluid-phase-equilibrium prediction of
(8) Bell, I. H.; Alpert, B. K. Exceptionally re- fluorocompound-containing binary sys-
liable density-solving algorithms for mul- tems with the predictive E-PPR78 model.
tiparameter mixture models from Cheby- Int. J. Refrig. 2017, 73, 65–90, DOI:
shev expansion rootfinding. Fluid Phase 10.1016/j.ijrefrig.2016.09.013.
Equilib. 2018, 476B, 89–102, DOI: 10. (16) Agger, C. S.; Sørensen, H. Algorithm
1016/j.fluid.2018.04.026. for Constructing Complete Asphaltene PT
(9) Bell, I. H.; Deiters, U. K. Superancillary and Px Phase Diagrams. Ind. Eng. Chem.
Equations for Cubic Equations of State. Res. 2017, 57, 392–400, DOI: 10.1021/
Ind. Eng. Chem. Res. 2021, 60, 9983– acs.iecr.7b04246.
9991, DOI: 10.1021/acs.iecr.1c00847. (17) Perkins, E.; Brown, T.; Berman, R.
(10) Privat, R.; Jaubert, J.-N. Classification PT-system, TX-system, PX-system:
of global fluid-phase equilibrium behaviors Three programs which calculate pressure-
in binary systems. Chem. Eng. Res. Des. temperature-composition phase diagrams.
2013, 91, 1807–1839, DOI: 10.1016/j. Comp. Geosci. 1986, 12, 749–755, DOI:
cherd.2013.06.026. 10.1016/0098-3004(86)90028-2.

(18) Michelsen, M. L.; Mollerup, J. M. Ther-


modynamic Models: Fundamentals &

11
Computational Aspects; Tie-Line Publica- (27) Baker, L.; Pierce, A.; Luks, K. Gibbs En-
tions, 2007. ergy Analysis of Phase Equilibria. Soc.
Petrol. Eng. J. 1982, 22, 731–742, DOI:
(19) Venkatarathnam, G. Density Marching 10.2118/9806-pa.
Method for Calculating Phase Envelopes.
2. Three-Phase Envelopes. Ind. Eng. (28) Michelsen, M. The isothermal flash prob-
Chem. Res. 2014, 53, 12122–12128, DOI: lem. Part I. Stability. Fluid Phase Equi-
10.1021/ie501838y. lib. 1982, 9, 1–19, DOI: 10.1016/
0378-3812(82)85001-2.
(20) Mokhatab, S. Three-Phase Flash Calcu-
lation for Hydrocarbon Systems Contain- (29) Span, R.; Beckmüller, R.; Hielscher, S.;
ing Water. Theor. Found. Chem. Eng. Jäger, A.; Mickoleit, E.; Neumann, T.;
2003, 37, 291–294, DOI: 10.1023/a: Pohl, S.; Semrau, B.; Thol, M. TREND.
1024043924225. Thermodynamic Reference and Engineer-
ing Data 5.0. 2020; http://www.thermo.
(21) Connolly, M.; Pan, H.; Tchelepi, H. Three- ruhr-uni-bochum.de/.
Phase Equilibrium Computations for Hy-
drocarbon–Water Mixtures Using a Re- (30) Deiters, U. K.; Bell, I. H. Calculation of
duced Variables Method. Ind. Eng. Chem. Critical Curves of Fluid Mixtures through
Res. 2019, 58, 14954–14974, DOI: 10. Solution of Differential Equations. Ind.
1021/acs.iecr.9b00695. Eng. Chem. Res. 2020, 59, 19062–19076,
DOI: 10.1021/acs.iecr.0c03667.
(22) Jäger, A. Complex Phase Equilibria of
Gas Hydrates and other Solid and Fluid (31) Llave, F. M.; Luks, K. D.; Kohn, J. P.
Phases Modeled With Highly Accurate Three-phase liquid-liquid-vapor equilibria
Equations of State. Ph.D. thesis, Ruhr- in the binary systems nitrogen + ethane
Universität Bochum, 2015. and nitrogen + propane. J. Chem. Eng.
Data. 1985, 30, 435–438, DOI: 10.1021/
(23) Hinojosa-Gómez, H.; Solares-Ramı́rez, J.; je00042a019.
Bazúa-Rueda, E. R. An improved algo-
(32) Harvey, A. H. What the Thermophysi-
rithm for the three-fluid-phase VLLE flash
cal Property Community Should Know
calculation. AIChE J. 2015, 61, 3081–
About Temperature Scales. Int. J. Ther-
3093, DOI: 10.1002/aic.14946.
mophys. 2021, 42, DOI: 10.1007/
(24) Wu, J.-S.; Bishnoi, P. An algorithm s10765-021-02915-9.
for three-phase equilibrium calculations.
(33) Span, R.; Lemmon, E. W.; Jacob-
Comput. Chem. Eng. 1986, 10, 269–276,
sen, R. T.; Wagner, W.; Yokozeki, A.
DOI: 10.1016/0098-1354(86)85008-6.
A Reference Equation of State for the
(25) Cismondi, M.; Michelsen, M. L. Global Thermodynamic Properties of Nitrogen
phase equilibrium calculations: Critical for Temperatures from 63.151 to 1000
lines, critical end points and liquid-liquid- K and Pressures to 2200 MPa. J. Phys.
vapour equilibrium in binary mixtures. J. Chem. Ref. Data 2000, 29, 1361–1433,
Supercrit. Fluids 2007, 39, 287–295, DOI: DOI: 10.1063/1.1349047.
10.1016/j.supflu.2006.03.011. (34) Buecker, D.; Wagner, W. A Reference
(26) Cismondi, M.; Michelsen, M. Automated Equation of State for the Thermodynamic
calculation of complete Pxy and Txy di- Properties of Ethane for Temperatures
agrams for binary systems. Fluid Phase from the Melting Line to 675 K and Pres-
Equilib. 2007, 259, 228–234, DOI: 10. sures up to 900 MPa. J. Phys. Chem. Ref.
1016/j.fluid.2007.07.019. Data 2006, 35, 205–266, DOI: 10.1063/
1.1859286.

12
(35) Kunz, O.; Klimeck, R.; Wagner, W.;
Jaeschke, M. The GERG-2004 Wide-
Range Equation of State for Natural Gases
and Other Mixtures; VDI Verlag GmbH,
2007.

(36) Lemmon, E. W.; Bell, I. H.; Hu-


ber, M. L.; McLinden, M. O. NIST Stan-
dard Reference Database 23: Reference
Fluid Thermodynamic and Transport
Properties-REFPROP, Version 10.0, Na-
tional Institute of Standards and Technol-
ogy. http://www.nist.gov/srd/nist23.cfm,
2018.

(37) Bell, I. H.; Wronski, J.; Quoilin, S.;


Lemort, V. Pure and Pseudo-pure Fluid
Thermophysical Property Evaluation and
the Open-Source Thermophysical Prop-
erty Library CoolProp. Ind. Eng. Chem.
Res. 2014, 53, 2498–2508, DOI: 10.1021/
ie4033999.

(38) Yu, P.; Elshayal, I. M.; Lu, B. C.-


Y. Liquid-liquid-vapor equilibria in the
nitrogen-methane-ethane system. Can. J.
Chem. Eng. 1969, 47, 495–498, DOI: 10.
1002/cjce.5450470516.

(39) Gasem, K.; Hiza, M.; Kidnay, A. Phase


behavior in the nitrogen + ethylene sys-
tem from 120 to 200 K. Fluid Phase Equi-
lib. 1981, 6, 181–189, DOI: 10.1016/
0378-3812(81)85003-0.

13

You might also like