Professional Documents
Culture Documents
Multiphase Equilibria Calculation by Direct Minimization of Gibbs Free Energy With A Global Optimization Method
Multiphase Equilibria Calculation by Direct Minimization of Gibbs Free Energy With A Global Optimization Method
Multiphase Equilibria Calculation by Direct Minimization of Gibbs Free Energy With A Global Optimization Method
www.elsevier.com/locate/compchemeng
Received 23 May 2001; received in revised form 19 June 2002; accepted 1 July 2002
Abstract
This paper presents a new method for multiphase equilibria calculation by direct minimization of the Gibbs free energy of
multicomponent systems. The methods for multiphase equilibria calculation based on the equality of chemical potentials cannot
guarantee the convergence to the correct solution since the problem is non-convex (with several local minima), and they can find
only one for a given initial guess. The global optimization methods currently available are generally very expensive. A global
optimization method called Tunneling, able to escape from local minima and saddle points is used here, and has shown to be able to
find efficiently the global solution for all the hypothetical and real problems tested. The Tunneling method has two phases. In phase
one, a local bounded optimization method is used to minimize the objective function. In phase two (tunnelization), either global
optimality is ascertained, or a feasible initial estimate for a new minimization is generated. For the minimization step, a limited-
memory quasi-Newton method is used. The calculation of multiphase equilibria is organized in a stepwise manner, combining phase
stability analysis by minimization of the tangent plane distance function with phase splitting calculations. The problems addressed
here are the vapor /liquid and liquid /liquid two-phase equilibria, three-phase vapor /liquid /liquid equilibria, and three-phase
vapor /liquid /solid equilibria, for a variety of representative systems. The examples show the robustness of the proposed method
even in the most difficult situations. The Tunneling method is found to be more efficient than other global optimization methods.
The results showed the efficiency and reliability of the novel method for solving the multiphase equilibria and the global stability
problems. Although we have used here a cubic equation of state model for Gibbs free energy, any other approach can be used, as the
method is model independent.
# 2002 Elsevier Science Ltd. All rights reserved.
Keywords: Phase stability; Tangent plane distance; Multiphase equilibria; Global optimization; Equation of state
Nomenclature
B subspace of constraints in Rn defined by inequalities
D tangent plane distance function
/D̄/ dimensionless tangent plane distance function
E defined by Eq. (30)
epsmch machine precision
F mol of feed
f objective function
* Corresponding author. Present address: Div. Chimie et Physico-Chimie Appliquees, Inst. Francais du Petrole, 1 et 4 avenue du Bois-Preau Rucil-
Malmaison, 92852 Cedex, France. Tel.: /33-1-4752-6000; fax: /33-1-4752-7025
E-mail address: d-vladimir.nichita@ifp.fr (D.V. Nichita).
1
Currently with IFP.
2
Currently with University of Manchester.
0098-1354/02/$ - see front matter # 2002 Elsevier Science Ltd. All rights reserved.
PII: S 0 0 9 8 - 1 3 5 4 ( 0 2 ) 0 0 1 4 4 - 8
1704 D.V. Nichita et al. / Computers and Chemical Engineering 26 (2002) 1703 /1724
sense that it produces a monotonic sequence of im- 2. Statement of the phase equilibria problem
proved local minima (avoiding all the local solutions
above). It also has a stochastic element, as the initial
points to start the search for a point in another valley 2.1. Multiphase equilibria calculation by direct
(Tunneling phase) are taken in random directions, minimization of the Gibbs free energy
allowing the method to perform an intelligent space
search for more promising valleys. The Tunneling Consider that at given pressure and temperature
method is able to escape from local minima and saddle conditions, a mixture of nc, components of composition
points, and has shown to be able to find efficiently the z /(z1, z2, . . ., znc)T, may split into np phases. We
global solution for all the academic and industrial assume that we have np/1 condensed phases, and the
problems tested (Gomez and Romero, 1994; Gomez, np phase is the vapor phase. According to the second
Keeping & Pantelides, 1998; Gomez, Gosselin and law of thermodynamics, at the equilibrium state, the
Barker, 2001; Gomez, Solano, Castellanos & Quintana, system has the lowest possible Gibbs free energy from all
2001). possible states. The Gibbs free energy is expressed as:
The Tunneling method has two phases. In phase one, X
nc X
np
a local bounded optimization method is used to G(n) nji mji (nj ) (1)
minimize the objective function. In the second i1 j1
phase (tunnelization), either global optimality is ascer- where n/(n1, n2, . . ., nnp)T is a vector of nc /np
tained, or a feasible initial estimate for a new elements, and the nj /(nj 1, nj 2, . . ., nj nc)T; j/1, np
minimization is generated. For the minimization vector contains the component mol fractions in phase j.
step, a limited-memory quasi-Newton method is It is more convenient for EOS calculations to express
used (Zhu, Byrd, Lu & Nocedal, 1994; Byrd, Lu, the Gibbs free energy G in term of fugacities. Eq. (1) can
Nocedal & Zhu, 1995), but any favorite minimizer be rewritten as:
may be used.
The Tunneling method has proved its efficiency and G(n) X
nc X
np
G(n) nji ln fji (xj ) (2)
reliability on several highly difficult academic and RT i1 j1
industry. The method proposed here does not require
a priori the number of phases existing at equilibrium. where Ḡ is the reduced Gibbs free energy.
The calculation sequence is organized in a stepwise The constrained optimization problem is:
manner. Results from two-phase flash and stability G(n) 0 min (3)
analysis provide good initial guesses for the three-phase
such that the component material balance constraints:
equilibrium. Phase distribution is obtained by solving a
convex unconstrained optimization problem (Michelsen, X
np
and the results on a set of difficult problems will be n1i ni nji ; i 1; nc (7)
j2
reported and discussed in Section 4. A comparison
with other global methods will be presented in Section 5 and the optimization problem (3) becomes an uncon-
and some concluding remarks will be given toward the strained one, with only bounds on the remaining
end. nc(np/1) independent variables, n2, . . ., nnp.
D.V. Nichita et al. / Computers and Chemical Engineering 26 (2002) 1703 /1724 1707
The gradient of the objective function is: The expression of the reduced TPD in terms of
X nc fugacities is:
@G f @ ln fjk @ ln f1k
ln ji njk n1k ; X
nc
@nji f1i @nji @n1i (8) D(x)
k1 D(x) xi [ln fi (x)ln fi (z)] (14)
j 2; np; i 1; nc RT i1
According to the Gibbs /Duhem equation: If one of the mol fractions is eliminated:
X
nc X
nc1
@ ln fji xnc 1 xi (15)
nji 0; j 1; np (9)
i1 @njk;k"i i1
the sums in Eq. (8) vanish. Note that Eq. (9) is satisfied the optimization problem to be solved is:
for any mol fractions, not only for the equilibrium mol D(x) 0 min (16)
fractions. Therefore, it is not necessary to compute the
fugacity derivatives in order to compute the gradient of for nc/1 mol fractions as independent variables
the Gibbs free energy: bounded by:
0 5xi 5 1; i 1; nc1 (17)
@G f
ln ji ; j 2; np; i 1; nc (10)
@nji f1i This is an unconstrained optimization problem. The
elements of the gradient vector are:
In this work a Limited Memory Quasi-Newton
minimization technique is used (the L-BFGS-B routine, @D fi (x) fnc (x)
ln ln ; i 1; nc1 (18)
Zhu et al., 1994), that requires only the values of the @xi fi (z) fnc (z)
objective function and of the gradients. Any solver may
be used for minimization; if the elements of Hessian and elements of the Hessian matrix are given by:
matrix are required, there are given by: @2D @ ln fi (x) @ ln fnc (x)
Hik ;
@ G 2
@ ln fji @ ln f1i @xi @xk @xk @xk (19)
Hik dik ;
@nji @nlk @nli @n1k (11) i; k 1; nc1
i; k 1; nc(np1)
where d is the Kronecker delta.
X
np
bj 2.5. Convergence criteria
Ei ; i 1; nc (30)
j1 8 ij
There are two stopping criteria for the minimization
and the fugacity coefficients are calculated using routine. The first is given by:
mol fractions provided by two-phase flash, and the (f n f n1 )
mol fraction of the trial phase from stability analysis Bfactrepsmch (36)
of two-phase equilibrium liquid. max(½f n1 ½; ½f n ½; 1)
We have to solve an unconstrained optimization where epsmch is the machine precision (automatically
problem: generated by the code), factr is provided by the user to
Q(b) 0 min (31) get desired tolerance; here f denotes the objective
s:t: 05 bj 5 1 ; j 1; np (32) function.
The second criteria checks on the norm of projected
gradients:
The gradient vector is given by:
maxf½½projgri ½½; i 1; ng 5pgtol (37)
@Q X
nc
ni
1 ; j 1; np (33) We have set a high restrictive value for the tolerance
@bj i1 8 ij Ei pgtol (1.d-8) for all examples.
The Euclidean norm on fugacities is also recorded,
and a third additional criteria is set for flash calculations
The objective function is a convex function only
defined on the convex set b , therefore the minimum
of Q is unique. One can eliminate one variable from X
np X
nc 0:5
Eq. (22) and use np/1 independent variables in Eq. S (fji f1i )2 Bo (38)
(29), but it is more convenient to maintain the full j2 i1
3.1. The global optimization method To perform the minimization phase any algorithm
designed to solve local optimization problems with
The code that we are using in this work has recently bounds on the variables can be used. We use a
been developed (Castellanos & Gomez, 1998), and limited-memory Quasi-Newton method (Zhu et al.,
incorporates the numerical experience obtained in recent 1994; Byrd et al., 1995). Any favorite optimizer can
years (Gomez, Levy, & Calderon, 1987; Barron & also be used.
Gomez, 1991; Gomez & Romero, 1994). It has already
proven to be very efficient to solve highly difficult
problems, both academic and real (see for instance
3.2.2. Tunneling phase
Gomez et al., 1998; Gomez et al., 1999; Gomez et al.,
Once a local minimum has been obtained, we want to
2001).
find a point in another valley, that is we need to solve
The basic idea of these methods (see Fig. 1) is to
the following inequality problem:
‘tunnel’ from one valley of the objective function to
another, to be able to find a sequence of local minima Find xm B such that f (x)5
m f (xm ) (42)
with decreasing function values: To accomplish this goal using gradient-type methods
f (x1 )]f (x2 )]. . .]f (xG ) (40) (Newton-like iterative algorithms), it is necessary to
destroy the minimum, placing a pole at the minimum
where xG is the global minimum of f(x ), ignoring all the
point xm, and then to start Tunneling (solving inequality
local minima with larger objective function values than
Eq. (42)), from an initial point near the minimum.
the best already found. This characteristic of ‘ignoring’
As we are trying to find a point xm in another valley
minima makes the algorithm faster and more efficient
with less or equal value than fm , we first create the
than other general purpose methods, like SA, random
Tunneling function Tp(x ), such that, if f(x )5/fm then
search, clustering, and genetic algorithms (see Gomez et
Tp(x )5/0, for x "/xm.
al., 2001).
Tp (x) (f (x)f (xm ))P(x; lm ; xm ) if ½½xxm ½½51
Tp (x) f (x)f (xm ) if ½½xxm ½½]1
3.2. The Tunneling method
(43)
The Tunneling method has two phases. In the where, we have placed a pole P at xm using one of the
minimization phase, starting from an initial point x0, a following alternatives:
local minimum x1 is found with f1 /f (x1), using any
local bounded optimization method. From x1 in phase 2 1) Classical Tunneling function (Levy & Montalvo,
it obtains a feasible point x1 in another valley with 1985),
f(x1 )5/f1, which will be taken as the initial point for the
next minimization phase. P(x; lm ; xm )½½xxm ½½lm (44)
2) Exponential Tunneling function (Barron & Gomez,
3.2.1. Minimization phase 1991),
The problem here is to find a local bounded mini-
lm
mum: P(x; lm ; xm )exp (45)
½½x xm ½½
Find xm arg(min f (x)) (41)
xB where lm is the strength of the pole.
D.V. Nichita et al. / Computers and Chemical Engineering 26 (2002) 1703 /1724 1711
Solving problem Eq. (44) now consists of finding xm information. Then from this point, the local minimiza-
such that: tion code will generate descent directions and step
Tp (x)50 (46) lengths to force descend of the Tunneling function, until
m
it finds a point where inequality Eq. (46) is satisfied. It is
The role of lm is crucial for the algorithm. In the important to recall, that the random direction is only
classical method its value is an integer that depends on used to produce the initial point in the neighborhood of
the multiplicity of the minimum. In the exponential the local minimum xm, to be able to start from there, the
method a small real value is enough to place a pole local descent method.
destroying the minimum. However, if the minimum was If Tunneling is not successful from there, we generate
not computed exactly, for both methods in the direction a new initial point, until 2n (n being the dimension of
towards the exact minimum, a small value would not the problem) initial points have been tried. We then
create a pole, and a larger lm has to be used. Also, generate initial points at random in the entire feasible
increasing lm has the effect of smoothing the Tunneling region, until the maximum number of function evalua-
function, as it inherits the multimodality of the original tions (FE) given by the user, has been used. The
function f. Although in principle, it would be desirable Tunneling search is not successful when:
to take a large lm so that T does not have stationary
points, a large lm gives larger values of the Tunneling . A corner of admissible region has been reached.
function T further away from the solution to problem . The strength of the pole is greater than a maximum
Eq. (46). Thus, in practice, lm is computed just to value given, without having obtained a descent
destroy the minimum, that is the strength of the pole lm direction.
is computed so that a descent direction can be gener- . No further precision for x is possible.
ated, and mobile poles are used whenever a stationary . The maximum number of FE allowed for this phase
point of T is encountered, as will be described in Section has been reached.
3.4. The code TUNEL manages poles and mobile poles
automatically. For further details in the actual imple- 3.4. Stationary points of T (x )
mentation, the reader is referred to Castellanos and
Gomez (1998). The Tunneling function T inherits the non-convex
We need to take descent directions to solve the nature of the original objective function f. It is then
inequality Eq. (46), and thus we use the same algorithm possible that during Tunneling phase we reach station-
used to solve Eq. (41), with appropriate stopping ary points xs of the Tunneling function T (x ), that is
conditions to check convergence for Eq. (46). points where the gradient of T with respect to x is zero
As the original objective function f is a general (up to a tolerance). As we use a gradient type method to
nonlinear function only assumed to belong to C2 for find xm that satisfies Tp(xm)5/0, to be able to continue
x /B , it could have many local and global minima and the search we place mobile poles that we turn on and off,
convergence to minima at the same level is possible, that and the Tunneling function is modified multiplying by
is f (x1m*) /f(x2m*) /. . ./f (xtm*) as xtm* would be ac- the mobile pole:
ceptable solutions of Eq. (46). In order to avoid cycling
Tp (x) (f (x)
and going back to these minima at the same level
already found, it is important to preserve the poles used lm ls
f (xm ))exp exp (48)
to destroy them, until a better minimum xt1 m * with ½½x xm ½½ ½½x xs ½½
lower value of the objective function is found. To
achieve this goal it is necessary to modify the definition These poles are placed where the stationary point is
of the Tunneling function: detected and while needed and we turn it off when the
iterand is out of the zone of attraction of the stationary
Y t
lt point (making ls /0).
m
Te (x)(f (x)f (xm )) exp (47)
i1 ½½x xt
m ½½
and making t/1 as soon as an xm is found with smaller 3.5. General stopping conditions
value than fm.
To check for global optimality, either a lower bound
for the objective function is known and has been
3.3. Initial point for the Tunneling phase attained or the search for the solution T (x )5/0 has to
be exhaustive.
Once a local minimum xm has been found, we In general the value of the objective function at the
generate an initial point x0m to start the Tunneling global solution is not known, but when the global
process. This point is generated along a random solution has been found, there is not a point xm in
direction in a neighborhood of xm, to preserve local another valley with f(xm)5/f(xm). Consequently, the
1712 D.V. Nichita et al. / Computers and Chemical Engineering 26 (2002) 1703 /1724
algorithm has to spend some time checking for global nication allows the user even to save every iteration
optimality, by performing unsuccessful Tunneling points within the local minimization (if the local
searches, starting from all the initial points allowed. minimizer has also reverse communication).
The user decides then, how much computer effort he
wants to spend to check for global optimality through
the maximum number of initial points to start the 4. Results
Tunneling phase, or through the maximum number of
FE. This section presents the results of phase stability
The algorithm stops when any of the following global analysis and multiphase equilibria calculation for sev-
criteria is satisfied: eral representative systems. The problems addressed
here are vapor /liquid, liquid/liquid, vapor /liquid/
. In the Tunneling phase the given maximum number liquid, vapor /solid, liquid/solid, and vapor /liquid/
of initial points to start the search for xm has been solid calculations.
reached. The last minimum found is the putative
global minimum. 4.1. Stability analysis
. The given maximum number of FE has been reached.
. The lower bound of the objective function given by The reliability of the phase stability testing module of
the user has been attained. The last minimum found TUNPEQ is first investigated separately. We have
is the putative global minimum. chosen a set of five examples from the literature, for
. All the global minima at the same level required by binary and ternary mixtures. These simple mixtures
the user have been found. exhibit several stationary points of the TPD function,
among them local minima and saddle points that may
3.6. Features of the code attract the minimizer. TUNPEQ finds the global
minima of the TPD for all examples.
We have developed an in-house FORTRAN prototype For all examples considered, both kinds of initial
to perform the minimization iteration with calls to the estimates (V and L) are used. For some cases, initial
TUNPEQ code providing gradient information, calls to guesses other than those given by V or L initialization
the local optimizer and to the Tunneling module, in a are provided, in order to test the ability of our approach
way giving to the user flexibility to design the numerical to escape certain local minima that are not found with
experiments. Some of the options are: the V or L initializations.
The following test examples (Eqs. (1) /(5)) are ad-
1) The user can incorporate the local optimization dressed by Hua, Brennecke and Stadtherr (1998). For all
method more suitable for his problem. However, if cases results are consistent with their results. The
not decided otherwise, the Tunneling code uses a problem of stability testing will be also addressed in
Limited Memory Quasi-Newton Method. the next sections in a multiphase context.
2) The number of cycles min /tun /min, and/or the
maximum number of FE the user wants to spend in 4.1.1. Problem 1. Hydrogen sulfide /methane binary
the process. mixture
3) The tolerances to control: This is a mixture of methane and hydrogen sulfide at
. The precision for the local optimization (see Eqs. T /190 K and p /40.53 bar. Calculations are per-
(36) /(38)). formed using the SRK EOS, with the BIC 0.08. This
. the desired decrease in the objective function example is taken from Michelsen (1982a), and it
imposed to the Tunneling phase. This can help represents a very difficult problem. Sun and Seider
the user to force the code to search for another (1995); Hua, Brennecke and Stadtherr (1998) have also
valley with sufficiently lower objective function. tested their proposed methods for stability analysis on
. The precision to find minima at the same level. this example.
This can be interesting if a sufficiently good value The TPD function is plotted in Fig. 2a versus the trial
of the objective function has already been phase composition for an equimolar mixture. Fig. 2b
attained, and the user is interested in finding provide a detail of the region between z1 /0.9 and 1. A
alternative solutions within certain range (/ or third branch corresponding to the intermediate Z -factor
/) of this objective value. root of the EOS, with a local minimum at z1 /0.968 is
4) The number of tries from different initial points in disregarded here.
the Tunneling phase. There are four stationary points, three minima and a
5) The code is programmed to save all the files maximum corresponding to the trivial solution. The
containing partial results at every local minimum global minimum corresponds to 0.9254 methane, and
the method finds along the way. Reverse commu- has a negative value, indicating instability.
D.V. Nichita et al. / Computers and Chemical Engineering 26 (2002) 1703 /1724 1713
Table 1
Problem 1: C1/H2S SRK-EOS at p 40.53 bar and T 190 K
Feed composition Stationary points of the TPD function Objective function FE NT Initial guess
Table 2
Problem 2: C1/C3 SRKEOS at p 50 bar and T 277.6 K
Feed composition Stationary points of the TPD function Objective function FE NT Initial guess
4.1.2. Problem 2. Methane/propane binary mixture For z1 /0.80, the mixture is stable and close to the
This is a mixture of methane and propane at T / dewpoint locus. The minimizer avoids the trivial solu-
277.6 K. Calculations are performed with the SRK tion for both initial estimates. For z1 /0.57 the mixture
EOS at p/50 bar (Table 2) and p /100 bar (Table 3). is unstable and near the bubble point locus. For one of
The BIC is set at 0.029. initial estimates, two minimization phases are required.
Feeds 2 and 3 at 100 bar are difficult problems
because of the near-criticality. Note the low absolute 4.1.5. Problem 5. Methane, ethane, and nitrogen ternary
values of the TPD function at the global minimum. The mixture
method correctly predicts instability in both cases. This is a mixture of methane, ethane, and nitrogen at
T /270 K and p /76 bar. The PR EOS is used, with
4.1.3. Problem 3. Ethane /nitrogen binary mixture k12 /0.021, k13 /0.038, k23 /0.08. Four feeds are
This is a mixture of ethane and nitrogen at p /76 bar considered. Results are given in Table 6.
and T /270 K. The PR EOS with k12 /0.08 is used. Feed 1 is unstable, and close to the dewpoint locus.
Results are given in Table 4 for four feeds. Feed 2 is near With V initialization the method converge to global
the bubble point locus and feed 3 is near the dewpoint minimum. With L initialization it converge first to a
locus. With both L and V initial estimates, convergence stationary point (close to the trivial solution), then the
to the global minimum is observed. For the feed with second minimization converge to the global minimum.
z1 /0.56, an extra initial guess is provided; for this case, Feed 2 is in the two-phase region and close to the critical
two minimization steps are required (the first finds the point. The correct answer is given by the method for
trivial solution; after tunnelization, the second one both initial estimates. Feed 3 is at near-critical condi-
converge to the global minimum). tions, in the single-phase vapor region. Convergence of
the method to the trivial solution indicates stability.
4.1.4. Problem 4. Carbon dioxide/methane binary Feed 4 is also stable; convergence to the trivial solution
mixture is obtained.
This is a mixture of methane and carbon dioxide at For most of the problems considered in this section,
T /220 K and p/60.8 bar. The PR EOS is used with the number of FE is less then the number of root
k12 /0.095. Calculations are performed for five feeds. inclusion tests (Hua et al., 1998) for the constrained
For z1 /0.90 and 0.40 (see Table 5), the mixture is stable space plus monotonic interval extensions case (FCSM),
vapor and liquid, respectively. and up to one order of magnitude less than their F case.
Table 3
Problem 2: C1/C3 SRKEOS at p 100 bar and T 277.6 K
Feed composition Stationary points of the TPD function Objective function FE NT Initial guess
Table 4
Problem 3: C2/N2 PREOS at P 76 bar and T 270 K
Feed composition Stationary points of the TPD function Objective function FE NT Initial guess
The number of initial points in the Tunneling phase was using PX iterations for dewpoints, and PY iterations
set to 20 for all examples; same results would be for bubblepoints (Fussell & Yanosik, 1978). The critical
obtained with much less computer time for less initial point temperature (293.78 K) and pressure (210.668 bar)
points. Note that for Eqs. (2) /(5) results are also were calculated based on Heidemann and Khalil (1980)
consistent with results from Prausnitz, Lichtenthaler criteria, using a different solution procedure (Nichita,
and Gomez de Azevedo (1986). Minescu, & Cretu, 1996; Nichita, 1996).
To decide whether one or two phases exists at
4.2. Two-phase vapor /liquid equilibria equilibrium, one can perform stability analysis. If
TPD B/0 results from stability are used to initiate flash.
Two-phase vapor/liquid equilibria calculations were If flash calculations are carried out in the single-phase
carried out for two hydrocarbon mixtures, with empha- region, the two-phase code returns the trivial solution.
sis to the near-critical region. Intensive testing has shown that both approaches give
the correct answer, even for the most difficult points.
4.2.1. The Yarborough 8 mixture Equilibrium constants obtained from flash calcula-
Two-phase vapor/liquid equilibria calculation were tions on the critical isotherm are presented in Fig. 4. In
performed with the Tunneling method for a synthetic the immediate vicinity of the critical point (for pressures
mixture of six normal-alkanes (feed mol fractions: between about 210.66 bar and the critical pressure), our
0.8097 C1, 0.0566 C2, 0.0306 C3, 0.0457 nC5, 0.033 method has no problems in finding the correct solution.
nC7, 0.0244 nC10), referred in the literature as the Y8 For these conditions, the convergence radius of the
mixture (Yarborough, 1972). The Peng /Robinson EOS classical MVNR method is extremely small, therefore,
is used, with all BIC’s zero. the switch from SSI to MVNR iterations has to be
The phase envelope is given in Fig. 3. Saturation performed at very small values of the Euclidean norm of
pressures were calculated with the MVNR method, the error vector, otherwise divergence occurs.
Table 5
Problem 4: C1/CO2 PREOS at p 60.8 bar and T 220 K
Feed composition Stationary points of the TPD function Objective function FE NT Initial guess
Table 6
Problem 5 C1/C2/N2 PREOS at p 76 bar and T 270 K
Feed composition Stationary points of the TPD functiona Objective function FE NT Initial guessa
(0.10, 0.60, 0.30) (0.101617, 0.586727) 5.88659e6 3079 (1814) 2 L(0.118613, 0.380627)
/ (0.067797, 0.799168) 1.48288e2 / / /
/ / / 3474 (12) 1 V(0.055818, 0.853433)
(0.30, 0.55, 0.15) (0.245094, 0.658130) 0.011746 4831 (16) 1 L(0.373190, 0.360265)
/ / / 4779 (13) 1 V(0.181211, 0.766340)
(0.38, 0.54, 0.08) (0.38, 0.54) 0 2929 (18) 1 L(0.491972, 0.356744)
/ / 0 3006 (39) 1 V(0.242737, 0.725904)
(0.05, 0.90, 0.05) (0.05, 0.90) 0 4717 (19) 1 L(0.121698, 0.611101)
/ / 0 4727 (11) 1 V(0.045620, 0.912190)
a
x1, x2.
CO2 /0.100, and kCO2 C16 /0.125 (from Pan & Firoo-
/
Table 7
Stability testing and two-phase flash for the eight component mixture
Mol fractions of trial phase Vapor mol fraction Liquid mol fraction
a
Type V initialization Type L initialization
Fig. 5. Phase distribution of the ternary system CO2/C1/n C16 at T / Fig. 6. Detail of the p /z phase diagram of the ternary system CO2/C1/
294.3 K. n C16 at T/294.3 K.
Three-phase distribution calculated with Michelsen polation of TPD (for stability testing of liquid phase
(1994) procedure, using fugacities calculated for mol resulting from two-phase flash) from three-phase region
fractions from stability, is: V /0.2466, L1 /0.6105, gives a good approximation, then the exact pressure is
L2 /0.1429. Phase distribution from three-phase VLL refined to the desired accuracy.
flash is: V /0.2962, L1 /0.5645, L2 /0.1393.
A detail of the p /z phase envelope at T /294.3 K is 4.3.2. A sour gas system
presented in Fig. 6, showing lower and upper consolute The second example for VLLE is for the six compo-
pressures and critical points. Critical points are located nent synthetic mixture of Robinson et al. (1978), which
at 73.5 and 99.5% CO2. Construction of Fig. 6 does not exhibits a three-phase region at T /178.8 K for a wide
require three-phase VLLE calculations. For a given CO2 pressure range. Feed composition is given in Table 9.
mol fraction, once a phase boundary is located, extra- Peng /Robinson EOS is used, with BIC’s from Pan and
Table 8
Results for CO2/C1/n C16 system at p 67 bar and T 294.3 K
Table 12
BIC for the quaternary system
Table 11
Results for the sour gas system at p 35 bar and T 178.8 K
z x
y x x y x1 x2
Table 13
Results for the quaternary system at p 15 bar and T 175 K
z x
y x x y x1 x2
minimum found by Sun and Seider (1995), with the al. (1999) is used. BIC’s used with the PR EOS are given
phase distribution: V /0.4482, L1 /0.1002, L2 / in Table 15.
0.4516. The p /T phase diagram of this mixture is given in
At T /200 K and p/42.5 bar the system splits into Fig. 8, showing the vapor /liquid and vapor /solid phase
two phases, with L /0.6741. Stability analysis of the boundaries as well as the vapor/liquid /solid/vapor/
liquid phase finds TPD /0. Same results were obtained solid and vapor /liquid/solid/vapor/liquid phase
by Sun and Seider (1995). At slightly different condi- boundaries. Results are identical with the results ob-
tions (T/199 K and the same pressure), the equilibrium tained with the SA method (Nichita et al., 2001).
state is three-phase VLL. These are particularly difficult Construction of the phase envelope does not require
conditions for this system, in the vicinity of a two-phase carrying out three-phase VLS calculations.
liquid/liquid critical point located on the three-phase For a multisolid model, the condition of solid stability
boundary. The results are presented in Table 14. The as a pure phase is obtained from Eq. (12) (Firoozabadi,
extent of the three-phase region for p /42.5 bar is about 1998):
5 K.
S
fi (p; T; z)fpure; i ]0; i 1; ns (49)
4.4. Three-phase vapor /liquid /solid equilibria
where ns is the number of components that may
Wax precipitation from hydrocarbon mixtures is an precipitate.
important problem for the oil industry, which implies This relationship is used to locate the V/VS phase
vapor/liquid /solid equilibria calculations. Two exam- boundary (cloud point locus); it is also used to locate the
ples, including vapor/liquid /solid equilibria, vapor/ VL/VLS phase boundary, for z/x, where, x is the
solid, and liquid /solid equilibria for wax precipitation liquid mol fraction resulted from the two-phase VL
are presented, one for a synthetic gas-condensate, the flash.
other for a North Sea crude oil (at Stock-Tank and For several conditions, local minima are observed
reservoir conditions). near the VL/VLS and V/VS phase boundaries. Table 16
gives the results obtained with the Tunneling method for
some of the points considered for the construction of the
4.4.1. The SHF4 mixture phase diagram by Nichita, Goual and Firoozabadi,
The first example is a synthetic gas condensate fluid of 2001. The total number of FE is reported, including
Ungerer et al. (1995), designated by the acronym SHF4 those required by the tunnelization phases. The number
(Synthetic Hyperbaric Fluid), containing seven compo- of FE for the minimization step(s) is given in parenth-
nents. The thermodynamic multisolid model for wax esis. The computational effort required by the SA
precipitation from hydrocarbon mixtures of Nichita et algorithm is also given for comparison. For all points,
Table 14
Results for the quaternary system at p 42.5 bar and T 199 K
z x y x x y x1 x2
Table 15
BIC for the SHF4 mixture
Table 16
VLS equilibria for SHF4 mixture
T (K), p (bar) conditions Equilibrium state Gibbs free energy function FE SA FE TUNPEQ Tunneling phases
Table 17
Composition of crude oil 2
N2 / 0.00225
CO2 / 0.01365
C1 / 0.51283
C2 0.00087 0.07344
C3 0.00536 0.04430
i C4 0.00301 0.00755
n C4 0.01240 0.02037
i C5 0.01008 0.00772
n C5 0.01730 0.01097 Fig. 11. (a) Wax precipitation from Oil 2 at Stock-Tank conditions.
C6 0.03701 0.01967 (b) Wax precipitation from Oil 2 at reservoir conditions.
C7 0.08213 0.02524
C8 0.10623 0.03456
C9 0.06672 0.02101 bar, respectively. Results are given for both the multi-
C10 0.65888 0.20644 solid (MS) and ideal solid solution (SS) models.
The number of FE for TUNPEQ (including the
Tunneling phase for checking global optimality) is one
The retrograde solid behavior (reported by Nichita et order of magnitude less than for SA. The conditions for
al., 2001) may imply the increase in the amount of the this example are not difficult conditions, but what
precipitated solids with decreasing pressure at constant makes it interesting is that the mixture is described
temperature. Fig. 10 shows the calculated isothermal with a large components number (37). If only the
expansion of fluid SHF4. At T /330 K the amount of minimization step is used, only 15/47 FE were required
the precipitated solid decreases from about 13% (at the by L-BFGS-B to find the solution.
three-phase dewpoint) to 3% (at p /185 bar). With Wax precipitation is a major problem for the oil
further pressure decrease the precipitation increases at industry, because wax deposition may plug the flow
an increasing rate to over 15 wt.% at atmospheric lines. We believe such a code would be extremely
pressure. valuable for the industry. For wax precipitation from
crude oils, it is very important that the heavy fractions
distribution between species (paraffins, naphthenes, and
4.4.2. Wax precipitation from a north sea crude oil aromatics) is taken into account; this may lead to very
The second example deals with wax precipitation large number of components. The code has proved to be
from a crude oil. The composition of the Oil 2 (Stock- able to handle such problems.
Tank and reservoir fluid, see Table 17) as well as the
characterization of the plus fraction is given by Pan,
Firoozabadi and Fotland (1997). Again, the thermo- 5. Some considerations on computational efficiency
dynamic model, component properties, and BIC’s from
Nichita et al. (2001) are used. Whenever data were available in the literature or
Fig. 11a and b show the calculated amount of software was available for other methods, comparison is
precipitated wax versus temperature at p /1 and 120 given in terms of the number of FE. Some authors
1722 D.V. Nichita et al. / Computers and Chemical Engineering 26 (2002) 1703 /1724
reports CPU time, but a comparison cannot be made . The global optimization Tunneling method used here
because one should have the same hardware support. has shown to be a robust and efficient tool to solve
For the limited data we had, the Tunneling method has phase equilibrium problems even for extremely diffi-
shown to be faster than other global optimization cult cases, like calculations at critical points and in
methods reported in the literature, for similar test the vicinity of the phase boundaries.
problems. . The method checks global optimality, to be sure that
TUNPEQ is definitely more efficient than SA. For there is not a better solution and this checking is the
phase stability analysis, it is more efficient than the most expensive part of the algorithm. However, the
Enhanced-Newton-Interval method. It is expected to be user can decide on the CPU effort spent for this
more efficient than branch and bound and homotopy globality check.
continuation methods. It would be very useful to test . If only local optimization is performed, the results
TUNPEQ against MULPEQ, HOMPEQ, GLOPEQ, show that the efficiency is comparable with classical
etc. Further investigation of TUNPEQ efficiency is methods based on the equality of chemical potentials.
needed. . The method has shown to be faster than other global
A feature of our code is that the user may decide how optimization methods reported in the literature, for
much computer time is to be spent on checking similar test problems.
globality. This depends on the particular problem to . Our approach can be used as a powerful diagnostic
be solved, mainly on how far we are from difficult tool for reservoir compositional simulation and
regions of the phase envelope. More initial points for the process design models.
Tunneling phase means more confidence, but also more . The method is general and model independent
computer time. It is, however, essential to keep relia- although an EOS formulation is used here for the
bility by making meanwhile a particular run as efficient Gibbs free energy, any other thermodynamic model
as possible. can be used for various kinds of thermodynamic
We have already embarked, or intend to embark on equilibria.
the following directions:
Corana, A., Marchesi, M., Martini, C. & Ridella, S. (1987). Minimiz- Lucia, A., Guo, X., Richey, P. J. & Derebail, R. (1990). Simple process
ing multimodal functions of continuous variables with the ‘Simu- equations, fixed-point methods, and chaos. American Institue of
lated Annealing Algorithm’. ACM Transactions on Mathematical Chemical Engineering Journal 36 , 641 /654.
Software 13 , 265 /274. McDonald, C. M. & Floudas, C. A. (1995). Global optimization and
DeGance, A. E. (1993). Ab initio equation of state phase equilibria analysis for the Gibbs free energy function using the UNIFAC,
computations via path continuation. Fluid Phase Equilibria 89 , Wilson, and ASOG equations. Industrial Engineering and Chemical
303 /334. Research 34 , 1674 /1687.
Eubank, P. T., Elhassan, A. E., Barrufet, M. A. & Whiting, W. B. McDonald, C. M. & Floudas, C. A. (1995). Global optimization for
(1992). Area method for prediction of fluid phase equilibria. the phase and chemical equilibrium problem: application to the
Industrial Engineering and Chemical Research 31 , 942 /949. NRTL equation. Computers and Chemical Engineering 19 (11),
Firoozabadi, A. (1998). Thermodynamics of hydrocarbon reservoirs . 1111 /1139.
McGraw-Hill. McDonald, C. M. & Floudas, C. A. (1995). Global optimization for
Fussel, L. T. (1979). A technique for calculating multiphase equilibria , the phase stability problem. Thermodynamics 41 , 1798 /1814.
pp. 203 /210). SPE Journal . McDonald, C. M. & Floudas, C. A. (1997). GLOPEQ: a new
Fussell, D. D. & Yanosik, J. L. (1978). An iterative sequence for phase computational tool for the phase and chemical equilibrium
equilibria calculations incorporating the Redlich /Kwong equation problem. Computers and Chemical Engineering 21 (1), 1 /23.
of state , pp. 173 /182). SPE Jounal . Mehra, R. K., Heidemann, R. A. & Aziz, K. (1982). Computation of
Gibbs, J.W. (1873). A method of geometrical representation of the multiphase equilibrium for compositional simulation , pp. 61 /68).
thermodynamic properties of substances by mean of surfaces. SPE Journal .
Trans. Conn. Acad. 2. Michelsen, M. L. (1982). The isothermal flash problem. Part I.
Gomez, S. & Romero, D. (1994). Two global methods for molecular Stability. Fluid Phase Equilibria 9 , 1 /19.
geometry optimization. In Progress in mathematics , vol. 121, pp. Michelsen, M. L. (1982). The isothermal flash problem. Part II. Phase
503 /509). Birkhauser. splitting. Fluid Phase Equilibria 9 , 21 /40.
Gomez, S., Levy, A. V. & Calderon, A. (1987). A global zero residual Michelsen, M. L. (1986). Simplified flash calculations for cubic
least squares method. In Lecture notes in mathematics , vol. 1230, equations of state. Industrial Engineering and Chemical Process
pp. 1 /10). Springer. Design and Development 25 , 184 /188.
Gomez, S., Keeping, B. & Pantelides, C. (1998). Tunneling methods for Michelsen, M. L. (1994). Calculation of multiphase equilibrium.
the time optimal control of high dimensional systems, manuscript .
Computers and Chemical Engineering 18 (7), 545 /550.
London: Imperial College.
Nagarayan, N. R., Cullik, A. S. & Griewank, A. (1991). New strategy
Gomez, S., Gosselin, O. & Barker, J. W. (2001). Gradient-based
for phase equilibrium and critical point calculations by thermo-
history */matching with a global optimization method, paper SPE
dynamic energy analysis. Part I. Stability analysis and flash. Fluid
71307 , pp. 200 /208). SPE Journal .
Phase Equilibria 62 , 191 /210.
Gomez, S., Solano, J., Castellanos, L. & Quintana, M. I. (2001).
Nghiem, L. X. & Li, Y.-K. (1984). Computation of multiphase
Tunneling and genetic algorithms for global optimization, ad-
equilibrium phenomena with an equation of state. Fluid Phase
vances in convex analysis and global optimization . Kluwer
Equilibria 17 , 77 /95.
Academic Publishers.
Nichita, D.V. (1996). Ph.D. dissertation, University of Ploiesti.
Graboski, M.S., & Daubert, T.W. (1978). A modified Soave equation
Nichita, D. V., Minescu, F. & Cretu, I. (1996). A new algorithm for the
of state for phase equilibrium calculations IEC PDD, vol . 17, No.
calculation of mixtures critical point. Romanian Petroleum Journal
4, 1. Hydrocarbon Systems (pp. 443 /448); 2. Systems Containing
(Revista Româna de Petrol in Romanian) 3 , 197 /210.
CO2 , H2 S, N2 , and CO (pp. 448 /454).
Nichita, D.V., Goual, L., & Firoozabadi, A. (2001). Wax precipitation
Green, K. A., Zhou, S. & Luks, K. D. (1993). The fractal response of
robust solution techniques to the stationary point problem. Fluid in gas condensate mixtures. SPE Production and Facilities (pp.
Phase Equilibria 84 , 49 /78. 250 /259).
Han, G. & Rangaiah, G. P. (1997). A method for calculation of Orr, F.M., Jr, Yu, A.D., & Lien, C.L. (1980). Phase behavior of CO2
vapor /liquid and liquid /liquid equilibria. Computers and Chemi- and crude oil in low temperature reservoir, paper SPE 8813
cal Engineering 21 (8), 905 /913. presented at the first SPE/DOE symposium on enhanced oil
Heidemann, R. A. & Khalil, A. M. (1980). The calculation of critical recovery. Tulsa, OK.
points. American Institute of Chemical Engineering Journal 26 , Pan, H., & Firoozabadi, A. (1998). Complex multiphase equilibrium
770 /778. calculations by direct minimization of Gibbs free energy by use of
Hua, J. Z., Brennecke, J. F. & Stadtherr, M. A. (1996). Reliable simulated annealing. SPE Reservoir Evaluation and Engineering
prediction of phase stability using an interval Newton method. (pp. 36 /42).
Fluid Phase Equilibria 116 , 52 /59. Pan, H., Firoozabadi, A., & Fotland, P. (1997). Pressure and
Hua, J. Z., Brennecke, J. F. & Stadtherr, M. A. (1998). Enhanced composition effect on wax precipitation: experimental data and
interval analysis for phase stability: cubic equation of state models. model results. SPE Production and Facilities (pp. 250 /258).
Industrial Engineering and Chemical Research 37 , 1519 /1527. Peng, D. Y. & Robinson, D. B. (1976). A new two-constant equation
Hua, J. Z., Maier, R. W., Tessier, S. R., Brennecke, J. F. & Stadtherr, of state. I.&E.C. Fundamentals 15 (1), 59 /64.
M. A. (1999). Interval analysis for thermodynamic calculations in Prausnitz, J. M., Lichtenthaler, R. N. & Gomez de Azevedo, E. (1986).
process design: a novel and completely reliable approach. Fluid Molecular thermodynamics of fluid-phase equilibria . Englewood
Phase Equilibria 158 , 607 /615. Cliffs, NJ: Prentice-Hall.
Kohse, B. F. & Heidemann, R. A. (1992). Tricritical lines and Press, W. H., Flannery, B. P., Teukolski, S. A. & Vetterling, W. T.
multiphase equilibria in quaternary mixtures. Fluid Phase Equili- (1989). Numerical recipes */the art of scientific computing . Cam-
bria 75 , 11 /22. bridge University Press.
Levy, A. V. & Gomez, S. (1985). The Tunneling method applied to Risnes, R. & Dalen, V. (1984). Equilibrium calculations for coexisting
global optimization. In P. T. Boggs, R. H. Byrd & R. B. Schnabel liquid phases , pp. 87 /96). SPE Journal .
(Eds.), Numerical optimization , pp. 213 /244). SIAM. Robinson, D.B., Kalra, H. & Rempis, H. (1978). The equilibrium phase
Levy, A.V., & Montalvo, A. (1985). The Tunneling method for global properties of a synthetic sour gas mixture and a simulated natural gas
optimization. SIAM Science and Computers . mixture, GPA Research Report , No. RR-31, Tulsa.
1724 D.V. Nichita et al. / Computers and Chemical Engineering 26 (2002) 1703 /1724
Soave, G. (1972). Equilibrium constants from a modified Redlich / equilibrium in multicomponent mixtures. Industrial Engineering
Kwong equation of state. Chemical Engineering and Science 27 (6), and Chemical Research 35 , 1395 /1408.
1197 /1203. Wilson, G.A. (1969). Modified Redlich /Kwong equation of state,
Sun, A. C. & Seider, W. D. (1995). Homotopy-continuation method application to general physical data calculations, paper no. 15C
for stability analysis in the global minimization of the Gibbs free presented at the American Institute of Chemical Engineering 65th
energy. Fluid Phase Equilibria 103 , 213 /249. National Meeting, Cleveland, OH.
Trangenstein, J.A. (1985). Minimization of Gibbs free energy in Yarborough, L. (1972). Vapor /liquid equilibrium data for multi-
compositional reservoir simulation, paper SPE 13520, presented component mixtures containing hydrocarbon and non-hydrocar-
at the SPE 1985 Reservoir Simulation Symposium, Dallas, TX. bon components. Journal of Chemical Engineering Data 17 , 129 /
Ungerer, P., Faissat, B., Leibovici, C., Zhou, H., Behar, E., Mor- 133.
acchini, G. & Courcy, J. P. (1995). High pressure /high tempera- Zhu, Y. (2000). High pressure phase equilibrium through the simulated
ture reservoir fluids: investigation of synthetic condensate gases annealing algorithm: application to SRK and PR equations of
containing a solid hydrocarbon. Fluid Phase Equilibria 111 , 287 /
state, paper presented to the 2000 American Institute of Chemical
311.
Engineering Annual Meeting.
Vickery, D. J. & Taylor, R. (1986). Path-following approaches to the
Zhu, C., Byrd, R. H., Lu, P. & Nocedal, J. (1994). L-BFGS-B-
solution of multicomponent, multistage separation process pro-
FORTRAN subroutines for large-scale bound constrained optimiza-
blems. American Institute of Chemical Engineering Journal 32 (4),
547 /556. tion . Department of Electrical Engineering and Computer Science,
Wasylkiewicz, S. K., Sridhar, L. N., Doherty, M. F. & Malone, M. F. Northwestern University.
(1996). Global stability analysis and calculation of liquid /liquid