Fast and Robust Algorithm For Compositional Modeling: Part I-Stability Analysis Testing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Fast and Robust Algorithm for

Compositional Modeling: Part I—Stability


Analysis Testing
Abbas Firoozabadi, SPE, and Huanquan Pan, SPE, Reservoir Engineering Research Inst. (RERI)

Summary increase of about 27 in computational time when c is increased


Given pressure, temperature, and composition of a fluid, one de- from 4 to 12. The most important element of phase-behavior cal-
sires to determine whether the single phase state is stable. This culations in compositional modeling is, however, robustness of
problem is, in principle, much simpler than phase-behavior calcu- computations rather than speed. Robustness is the prime goal of
lations. For certain applications, such as compositional-reservoir our work.
modeling, stability testing can be the most important item for Despite remarkable progress in the period from 1980 to 1990 in
efficient phase-behavior calculations. phase-behavior computations,1,2 a comprehensive and unified
In this paper, we use the tangent-plane-distance (TPD) in the theoretical framework continues to be the primary goal in perform-
reduced space to perform stability analysis testing. The results ing the computations both robustly and efficiently for the five
reveal that there are major advantages in the reduced space. One items outlined above. There may be a direct link between all five,
interesting feature of the transformation is that the TPD surface though such a link has not yet been recognized.
becomes smooth and has one minimum. The combination of a One major difficulty in phase-behavior computations results
single minimum and the surface smoothness contributes to a re- from the ragged shape of the Gibbs free energy surface. To be
markable robustness in calculations. more specific, both the raggedness and the number of minima of
the TPD affects the complexity of phase-behavior calculations
very pronouncedly. Those issues will be discussed in detail in this
Introduction paper. Another difficulty arises from the nonlinear Rachford-Rice3
Phase-behavior computations are an important element of thermo- equation, especially near the critical region. A lesser complication
dynamics of phase equilibria in general, and of compositional is the number of nonlinear equations. In this work, we will dem-
modeling of hydrocarbon reservoirs and production facilities in onstrate how we can alleviate all the above complexities. This
particular. Compositional modeling in hydrocarbon reservoirs de- paper presents Part I of the work covering the stability analysis,
mands robustness for hundreds of millions of phase partitioning which is the key item for efficient flash computations in our work.
computations with varying conditions of pressure and composi- Part II will address flash computations.4
tion, including in the critical region. Our algorithm is based on the reduction of the dependent vari-
There are five basic requirements and desirable features for ables (that is, the composition at constant T and p) of the Gibbs
phase behavior-related computations in a compositional-reservoir free energy through transformation. In the following, after a brief
simulator. Given the temperature, T, the pressure, p, and the over- literature review on the reduction method, we first present a new
all composition vector, z⳱(z1,z2, . . . , zc,) one desires to: formulation of the reduction method based on the Spectral theory
1. Determine the phase stability. of linear algebra.5 Then we provide stability analysis formulation
2. Recognize the state of the phase (that is, gas or liquid). in terms of the reduction variables for the TPD,6 followed by
3. Perform flash computations. minimization of the TPD using the simple method of Lagrange
4. Calculate phase derivatives with respect to p and zi. multipliers. Next, we examine the TPD surface for three-
5. Use an adequate number of components/pseudocomponents component systems for both the conventional and the reduction
for certain accuracy. variables. The results for stability testing of four-multicomponent
Item 1 above determines the need for flash computations. When mixtures of various degrees of complexity are discussed, followed
it is determined that the fluid system is in single state from stability by concluding remarks.
testing, there will be no need for flash computations; flash com-
putations are more costly and complicated than stability testing Brief Literature Review
when one takes advantage of proper stability analysis testing. The
TPD from stability can also be used to perform flash computations In 1986, Michelsen7 introduced the reduction method to perform
efficiently, as will be discussed in the second part of this work. flash calculations, assuming all interaction coefficients to be zero.
In compositional-reservoir simulators, it is necessary to recog- With this assumption, the “a” parameter of an equation of state
nize the phase state; one needs to know whether the single phase (EOS) such as the Peng-Robinson8 (PR-EOS) can be simplified to
is a gas or a liquid phase. In Item 4 above, the total derivatives for a single sum from a double sum. That is, with zero interaction
the flow expressions are estimated. These derivatives are (⭸␳L/ coefficients ␦ij, one can write

冉兺 冊
⭸P)z,T , (⭸␳L/⭸ni)T,P,ni , and other similar derivatives; ␳L⳱the liquid
c c c 2
phase density, ni⳱the number of moles of component i in the feed,
ni=(ni , . . . , ni−1,ni+1, . . . , nc), and c⳱the number of components. a= 兺兺
i=1 j=1
xi xj ai1 Ⲑ 2aj1 Ⲑ 2 =
i=1
xi ai1 Ⲑ 2 . . . . . . . . . . . . . . . . . . (1)
Depending on the process, sufficient accuracy may require the use
of from 4 to 12 (or more) components. When the nonlinear equa-
As a result, the fugacity coefficient ␸i becomes a function of
tions in flash are performed using the Newton algorithm, the com-
a1/2 and b, where b⳱the covolume parameter of the EOS. The
putational time is proportional to c3. Therefore, there will be an
equilibrium ratio Ki then becomes a function of parameters a1/2
and b of either liquid or gas, and the vapor fraction V. Therefore,
the computations of vapor-liquid equilibria will be related to only
three nonlinear equations. The assumption of zero-interaction co-
Copyright © 2002 Society of Petroleum Engineers
efficients is restrictive for reservoir fluids and may not be com-
This paper (SPE 77299) was revised for publication from paper SPE 63083, first presented pensated by adjustment of parameters such as critical temperature
at the 2000 SPE Annual Technical Conference and Exhibition, Houston, 1–4 October.
Original manuscript received for review 27 November 2000. Revised manuscript received
Tc, critical pressure pc, or acentric factor ␻ as will be demonstrated
20 July 2001. Manuscript peer approved 1 August 2001. later. Jensen and Fredenslund9 extended the work of Michelsen to

78 March 2002 SPE Journal


include one set of binary interaction coefficients between one com- Then,
ponent and the rest. As a result of this extension, the dependent c c c
variables were reduced to five regardless of the number of com-
ponents. One of the five variables was the mole fraction of the a= 兺 兺
k=1
␭k
i=1
xi qki 兺 x q . . . . . . . . . . . . . . . . . . . . . . . . . . . (10)
j=1
j kj

component, for which its interaction coefficient with the other


components is nonzero. In 1988, Hendricks10 presented a general Let us define Qk as
approach and demonstrated that the number of variables in the c
fugacity coefficient can be reduced to a value less than the number
of components. He used the expression for the excess Gibbs free
Qk = 兺xq ,
i=1
i ki . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (11)
energy and its transformation to formulate chemical potentials in
terms of transformed variables. All the interaction coefficients were then
included in the work of Hendricks. Later, Hendricks and van Ber- c
gen11 applied the procedure outlined by Hendricks10 to perform flash
computations for two multicomponent mixtures. The simple New-
a= 兺␭Q,
k=1
k
2
k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (12)
ton-Raphson algorithm was used to solve the nonlinear equations.
and, therefore,
In a different approach, Kaul and Thrasher12 introduced a two-
stage minimization of the Gibbs free energy. In the first stage, the a = a共Q1, . . . , Qc兲. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (13)
ideal part of the Gibbs free energy is minimized, and in the second
stage, the excess part is minimized; the ideal part is a function of The compressibility factor Z and the fugacity coefficient ␸i are
composition, and the excess part is a function of EOS parameters. given by (see Appendix A)
In this approach, the number of dependent variables reduces to Z = Z共Q1, . . . , Qc,b兲 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (14)
three when the interaction coefficients are set to zero and to four
with nonzero interaction coefficients. Test results show that the ␸i = ␸i共Q1, . . . , Qc,b兲. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (15)
method is efficient with zero interaction coefficients, but ineffi- In general, only a few eigenvalues from ␭1, . . . , ␭c are significant;
cient with nonzero interaction coefficients. most of the eigenvalues in a multicomponent mixture with a large
In all the above work, the emphasis is mainly on two-phase number of components/pseudocomponents are very close to zero.
flash. Stability testing in the reduced space and its features have Suppose for k>m, ␭k’s become negligible. One may, therefore, write
not yet been exploited.
Z = Z共Q1, . . . , Qm ,b兲 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (16)
Theory of Reduction Method
␸i = ␸i共Q1, . . . , Qm ,b兲. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (17)
The expression for the energy parameter “a” of the PR-EOS and
other similar equations is given by In Eqs. 16 and 17, m can be much less than c. In the special case
of zero interaction coefficients, ␦ij⳱0, m⳱1, ␭⳱1, and Q⳱a1/2.
c c

a= 兺兺 x x a
i=1 j=1
1Ⲑ2 1Ⲑ2
i j i aj 共 1 − ␦ij兲. . . . . . . . . . . . . . . . . . . . . . . . . . (2) Stability Analysis Formulation
The stability of a given phase can be best described by the TPD.6
Let ␤ij⳱(1−␦ij); ␤⳱the matrix with elements ␤ij. Because ␤ is The TPD is simply the difference between the Gibbs free energies
a symmetric matrix, we can invoke the Spectral theory of linear of a system in a single phase and in two-phase, in which the
algebra5 for diagonalization to express it as amount of the second phase for the two-phase (that is, the trial
phase) is small. Because at constant T and p the more stable state
␤ = SDS −1 = SDST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3) has a lower Gibbs free energy, the single-phase state is stable if the
TPD is positive.
In the above equation, the diagonal matrix is given by
The expression for the TPD for a multicomponent fluid is given by6

冢 冣
␭1 c
␭2 0
D= 0 ..
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4) TPD共y兲 = 兺 y 关␮ 共y兲 − ␮ 共z兲兴.
i=1
i i i . . . . . . . . . . . . . . . . . . . . . . . . (18)
␭c
In Eq. 18, y⳱(y1,y2, . . . , yc) is the composition of the trial
and the orthogonal matrix S is given by phase, and z⳱(z1,z2, . . . , zc) is the composition of the phase for
which its stability is to be determined. An alternative form of Eq.
S = 共q⬘共1兲q⬘共2兲 . . . . . . q⬘共c兲兲. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5) 18 can be obtained from ␸i(z)⳱fi(z)/(zi p) and ␸i(y)⳱fi(y)/(yi p),
the relation between chemical potential and fugacity,6 and Eq. 18:
In Eq. 4, ␭ 1 , . . . , ␭ c are the eigenvalues of ␤ and
q⬘(1), . . . , q⬘(c) in Eq. 5 are the corresponding eigenvectors. Each c c
eigenvector q⬘(i) is given by D= 兺 y 关ln ␸ 共y兲 − ln ␸ 共z兲兴 + 兺 y 共ln y − ln z 兲. . . . . . . . (19)
i=1
i i i
i=1
i i i
共i兲 T
q⬘ = 共q⬘i1 q⬘i2 . . . . . . q⬘ic兲 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6)
In Eq. 19, the TPD is expressed in dimensionless form, D⳱
In Eqs. 3 and 6, T represents the transpose; in Eq. 3, ST=S−1 (TPD/RT). One can use Eq. 19 to examine the stability of the fluid
because S is an orthogonal matrix. In Eq. 5, q⬘i1, . . . , q⬘ic are the as the liquid phase or the stability of the fluid as the gas phase. If
entries of eigenvector q⬘(i). From Eq. 3, one readily obtains one is interested in testing the stability of the fluid phase with
composition z as a liquid, the trial phase with composition y will
c
be in gas state. On the other hand, when interested to test stability
␤ij = 共1 − ␦ij兲 = 兺 ␭ q⬘ q⬘ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7)
k=1
k ki kj of the fluid phase with composition z as the gas phase, the trial
phase with composition y will be in liquid state. In the process of
Combining Eqs. 2 and 7 provides testing the stability of a phase with composition z, one may find the
minimum (or minima) of D (the dependent variables of D are y).
c c c
If this minimum is negative, the fluid mixture with composition z
a= 兺 兺
k=1
␭k
i=1
ai1 Ⲑ 2xi q⬘ki 兺a
j=1
1Ⲑ2
kj .
j xj q⬘ . . . . . . . . . . . . . . . . . . . . (8) is not stable and will split into more than one phase. The above
procedure suggested by Michelsen1 is currently the basis for sta-
Let bility analysis with the conventional variables (that is, mole frac-
tion variables). Its implementation is not a trivial task. The method
qki = ai1 Ⲑ 2q⬘ki . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (9) is complicated because all the minima (say, two) must be found.

March 2002 SPE Journal 79


Even with one minimum, the shape of the TPD will influence the Let us denote the first two terms in Eq. 24 by DI, and the
search for the minimum, and the procedure may be sensitive to the remaining terms by DII. Taking the derivative of DII with respect
intial guess. to yj results in
Let us now proceed with the calculation of D with the reduction
variables followed by its minimization. In order to facilitate the ⭸D II
= ln Kj − ln Kc j = 1, . . . , c − 1. . . . . . . . . . . . . . . . (30)
derivations, we will examine the stability of the fluid mixture in ⭸yj
the liquid state. (The derivations for the stability of the gas state are
Because DII=DII (QV1 , . . . , QVM) (see Appendix B), one may
straightforward and follow the derivations for the stability of the
write by using Eq. 30:
liquid phase.) Eq. 19 can be rewritten for this purpose as

D=
i=1
c

兺 y 关ln i ␸iV − ln ␸iL兴 +


c

兺 y 共ln y − ln z 兲. . . . . . . . . . . . (20)
i=1
i i i
⭸D II
⭸yj
= 兺
M

␣=1
冉 冊冉 冊 兺冉 冊
⭸D II
⭸Q␣V
⭸Q␣V
⭸yj
=
M

␣=1
⭸D II
⭸Q␣V
共q␣i − q␣c兲. . . . . . (31)

Eqs. C-1, 30, and 31 provide the expression for the La-
In Eq. 20, yi denotes the composition of the trial vapor phase.
grange multipliers
For the purpose of finding the minimum of D, we will select the
dependent variables as QV1 , . . . , QVm,bV, and y1, . . . , yc. (We have
this choice: we can also assume D to be a function of QV1 , . . . ,
QVm,bV, only.) These variables have the following constraints:
␤␣ = 冉 冊⭸D II
⭸D␣V
␣ = 1, . . . , M. . . . . . . . . . . . . . . . . . . . . . . (32)

c Next we will discuss the algorithm to obtain the minimum of



i=1
q␣iyi = Q␣V ␣ = 1, . . . , m . . . . . . . . . . . . . . . . . . . . . . . (21) the TPD.
The dimensionless TPD can also be cast into the following form,
c
D = D共QV1 , . . . , QVM兲. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (33)

i=1
yibi = bV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (22)
The minimum of D is simply given by
c
ⵜD = 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (34)
兺 y = 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (23)
i=1
i
Using the Newton algorithm,
c−1 ⵜDk+1 = ⵜDk + ⵜ2Dk ⌬QV = 0. . . . . . . . . . . . . . . . . . . . . . . . . . (35)
From Eq. 23, yc=1− 兺
i=1
yi.
Eq. 35 is written in vector form; ⵜ2Dk is the Hessian matrix H
Let us assign Q V V
= Q =b , and qm+1,i=bi (see Eq. B-5) (that
m+1 M
V defined by
is, M=m+1).
Then, Eq. 20 can be written as H = ⭸2 D Ⲑ 共⭸QV兲2, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (36)
c c which is an M×M matrix.
The iterative expression for the estimation of ⌬QV reads
D= 兺 y ln
i=1
i ␸iV共QV1 , ..., QVM兲 − 兺 y ln
i=1
i ␸iL共QV1 , ..., QVM兲
H⌬QV =− ⭸D Ⲑ ⭸QV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (37)

+
c−1

兺 y 共ln y − ln z 兲 +
i=1
i i i 冉 1−
c−1

兺y
i=1
i 冊冋 冉 ln 1 −
c−1

兺y
i=1
i 冊 册
− ln zc .
Earlier we divided D into DI and DII. We can also divide the
Hessian matrix into the corresponding parts HI and HII given by
HI=⭸2DI/(⭸QV)2 and HII=⭸2DII/(⭸QV)2 . From Eq. 32 and the defi-
. . . . . . . . . . . . . . . . . . . . . . . . . . (24)
nition of HII above,
Eqs. 21, 22, and 23 can be represented by the following constraint:

冉 冊
⭸2 D II ⭸␤
c−1 c−1 HII = = , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (38)
共⭸QV兲2 ⭸QV
兺q y +q
i=1
␣i i ␣c 1− 兺y
i=1
i = q␣V ␣ = 1, . . . , M. . . . . . (25)
which can be approximated by
The variables of Eq. 24 are QV1 , . . . , QVm, and yi(i⳱1, . . . , c−
1), which are constrained by Eq. 25. We use the method of ⌬␤ ≈ H II ⌬QV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (39)
Lagrange multipliers to minimize D. One may write Combining Eqs. 37 and 39 provides the iterative expression for

ᐉ=D−
M

兺␤ 兺q y +q
␣=1
␣ 冋 c−1

i=1
␣i i ␣c 冉 1−
c−1

兺y
i=1
i 冊 册 − QV␣ , . . . . . (26)
the minimization of the TPD,
共I + HI关HII兴−1兲⌬␤ =− ⭸D Ⲑ ⭸QV. . . . . . . . . . . . . . . . . . . . . . . . . (40)
where ␤␣⳱the Lagrange multipliers. The elements of HI, [HII]−I, and the gradient vector ⭸D/⭸QV are
By using ⭸ᐉ/⭸yj⳱0 ( j⳱1, . . . , c−1), one obtains (see Ap- provided in Appendix D.
pendix C) The computational procedure for the calculation of the mini-

冉 兺 冋兺 册冊
mum of the TPD is provided in the following six steps.
c M M
1. All the eigenvalues and the coreesponding eigenvectors of
ln Kj =− ln
l=1
zl exp
␣=1
␤␣q␣l + 兺␤ q
␣=1
␣ ␣j the matrix ␤ with the entries (1−␦ij) are first calculated. The non-
zero eigenvalues are selected and are arranged in the order of the
j = 1, . . . , c. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (27) absolute values.
2. The initial equilibrium ratios (that is, Ki) are estimated using
The derivative of ᐉ (from Eq. 26) with respect to ␤␣ provides the Wilson correlation13 (one may use other correlations).

Q␥V = 兺
c−1

i=1
q␥iyi + q␥c 1 − 冉 兺y
c−1

i=1
i 冊 ␥ = 1, . . . , M. . . . . . (28)
3. The Lagrange multipliers ␤␣(␣⳱1, . . . , M) are obtained
from Eq. C-1 from the data in Steps 1 and 2 using the linear-least
squares for the first iteration.
4. The equilibrium ratios Ki are obtained from Eq. 27 in sub-
The derivative of the above expression with respect to yj( j⳱
sequent iterations.
1, . . . , c−1) gives
5. Then y are calculated from yi=Kizi, and QV␣(␣=1.…,M) are
c
⭸Q␥V
⭸yj
= q ␥j − q ␥c j = 1, . . . , c − 1; ␥ = 1, . . . , M. . . . . . . (29) calculated from Q␣V = 兺q
j=1
␣ jyj.

80 March 2002 SPE Journal


6. The convergence of the Lagrange multipliers ␤␣ is exam- resentation. Using the procedure outlined above, it takes only four
ined. If convergence criterion of, say, 㛳⌬␤㛳<10−6 is not met, Eq. 40 Newton iterations to calculate the minimum of –0.66 for TPD.
is used to update ␤␣, and one goes back to Step 4. Fig. 3 shows the plot of the dimensionless TPD vs. the reduc-
The eigenvalues and the eigenvectors in Step 1 are calculated tion variables a1/2 and b and the conventional variables xC1 and
by transforming the symmetric matrix ␤ into a tridiagonal matrix, xnC5, both of the vapor trial phase. We are interested in determining
and then computing the eigenvalues and eigenvectors of the tridi- the stability of the C1/nC5/nC10 system at 300 K and 100 bar with
agonal matrix. The Gaussian elimination is used without the pivot zC1⳱0.80, znC5⳱0.10, znC10⳱0.10 as a liquid. This time, there are
computation to solve the linear equations in Step 6. To our sur- two minima with the conventional variables for the TPD. These
prise, as will see next and in the results section, the simple Newton minima are −0.047 and −0.201. However, in the reduced space,
algorithm in conjunction with the above procedure with the reduc- there is only one minimum, which is −0.201. In the reduced space,
tion variables is extremely robust. Next we will examine the shape it takes only five iterations to obtain the minimum using the pro-
of the TPD surface. cedure outlined above. The negative minimum in both the con-
ventional space and in the reduced space implies that the assumed
TPD Surface. The shape and smoothness of the TPD surface af- liquid phase is not stable.
fects considerably the number of iterations and the robustness of Fig. 4 depicts the TPD surface vs. the reduction variables and
an iterative process for locating the minimum (minima). In the the conventional variables for a mixture of zC1⳱0.10, znC5⳱0.40,
course of this work, we were pleasantly surprised that the calcu- znC10⳱0.50 at T⳱300 K, and p⳱100 bar. The minimum is zero
lation of the minimum of the TPD with the reduction variables is for the assumed liquid state. This is the so-called trivial solution.
a simple task. This experience is completely different from the In the reduced space, it takes only three Newton iterations to
work of others who have found the calculation of the minima of establish that the trial vapor phase has the same composition as the
TPD with conventional variables (that is, mole fractions) to be assumed liquid phase. Note that in the conventional space, the
complicated. Perhaps the best way to appreciate the merit of our surface is not smooth for large values of TPD.
approach for stability testing is the visual examination of the TPD Fig. 5 shows the dimensionless TPD vs. the reduction variables
surface with the reduction and the conventional variables. This can and the conventional variables for the C1/nC5/nC10 system at 300
be done in a 3D space for ternary mixtures only; in a three- K and 100 bar for zC1⳱0.998, znC5⳱0.0012, znC10⳱0.0008. As
component mixture, one can examine the plot of TPD vs. mole with all the above ternary mixtures, we tested the stability for the
fraction of components 1 and 2 in the trial phase. The plot of the initial liquid state, and, therefore, the variables in Fig. 5 correspond
TPD vs. a1/2 and b of the trial phase (which are the reduction variables to the trial vapor phase. There is one minimum in both spaces; this
when ␦ij⳱0) also provides the desired surface for examination. minimum is zero, implying the trivial solution. Note that for the
Fig. 1 shows the TPD vs. mole fractions of the trial gas phase reduction variables, the TPD surface is very smooth in comparison
for the ternary mixture C1/nC10/CO2 with composition zC1⳱0.40, with the conventional variables. It took four Newton iterations to
znC10⳱0.30, and zCO2⳱0.30 at 350 K and 50 bar. The stability of calculate the minimum in the reduced space based on the proce-
the phase as liquid is desired to be tested. Both the left and the right dure outlined earlier. We also performed the stability of this ter-
figures show the same plot; the only difference is the rotation nary system assuming the initial gas state. A minimum TPD⳱
along the TPD axis. Note that there is a global minimum at around 0.078 was calculated in six iterations in the reduced space, imply-
–0.66. Due to the shape of the TPD surface, it may not be easy to ing that the initial state of gas is stable.
locate the minimum if the initial guess is not properly estimated.
The negative sign of the minimum implies that the assumed phase
Results
is not a stable liquid phase. Fig. 2 shows the TPD vs. the reduction
variables of the trial gas phase. The minimum is the same as We use four mixtures in our stability testing to demonstrate the
before, but the shape of the TPD surface is very different. This robustness and efficiency of our proposed method. The test mix-
time, there is clearly one minimum, and it will be straightforward tures include:
to calculate it. Note that the figures on the right and the left are the • Synthetic oil.14
same. One is shaded representation, and the other is meshed rep- • Synthetic oil/CO2 mixture.14

Fig. 1—Dimensionless TPD vs. xC1 and xnC10 for the C1/nC10/CO2 system at 350 K and 50 bar: zC1=0.40, znC10=0.30, and zCO2=0.30.

March 2002 SPE Journal 81


Fig. 2—Dimensionless TPD vs. a1/2 and b for the C1/nC10/CO2 system at 350 K and 50 bar: zC1=0.40, znC10=0.30, and zCO2=0.30.

• Billings crude/natural gas mixture.15 ponents/pseudocomponents. The interaction coefficients are ob-
• Kilgrin gas condensate (see Table 1). 16 tained from Katz and Firoozabadi18 and by matching the saturation
The critical properties of all the pseudocomponents are esti- pressure to estimate the interaction coefficient between C1 and the
mated using the Cavett correlations.17 The nonzero binary inter- residue. Table 5 lists the nonzero eigenvalues from the matrix ␤ for
action coefficients are listed in Tables 2 through 4. Tables 3 and all the mixtures. We use stability analysis to calculate the saturation
4 provide the critical properties and the acentric factor of all com- pressure by decreasing the pressure with an increment of 0.1 bar at

Fig. 3—Dimensionless TPD vs. the reduction and conventional variables for the C1/nC5/nC10 system at 300 K and 100 bar: zC1=0.80,
znC5=0.10, and znC10=0.10.

82 March 2002 SPE Journal


Fig. 4—Dimensionless TPD vs. the reduction and conventional variables for the C1/nC5/nC10 system at 300 K and 100 bar: zC1=0.10,
znC5=0.40, and znC10=0.50.

constant temperature until the mixture changes its state from single- in the figure). The figure shows that for m⳱2, with three variables,
phase to two-phase. The results are presented in the following. the stability testing provides a very good approximation for the
entire range; m⳱1, which has two variables in stability testing,
Synthetic Oil (Mixture I). First, the conventional method is used does not give reasonable prediction at temperatures below 540 K.
to calculate the saturation pressure with ten components. Then, the For ␦⳱0, the deviations at low temperatures are greater than for
stability testing from the reduction method is employed. There are m⳱1 in view of the fact that both methods have two variables. The
three nonzero eigenvalues (see Table 5); m⳱3, m⳱2, and m⳱1 adjustment of Tc for nC10 to match the bubblepoint pressure at 322
represent the number of eigenvalues in the descending order; m⳱ K increases the value of Tc from 617.9 to 745 K. The approach
3 represents the use of all three eigenvalues; and for m⳱1, the produces the worst results (see Fig. 6).
largest eigenvalue is used in stability calculations. The stability Table 6 provides the number of iterations at different saturation
testing with zero interaction coefficients is also performed with pressures. The convergence criterion of 1×1.0−6 was used in the
and without the adjustment of the critical temperature of nC10. The calculations (see Step 6 of the computation procedure). The results
measured bubblepoint pressure at 322 K is used to adjust the show that the number of iterations depends mainly on the distance
critical temperature of nC10. from the critical point (CP). The closer to the CP, the greater the
The saturation pressures are plotted in Fig. 6. The results for number of iterations. The number of iterations is two times higher
m⳱3 are identical to those of the conventional method (not shown in the critical region than outside the region.

Fig. 5—Dimensionless TPD vs. the reduction and conventional variables for the C1/nC5/nC10 system at 300 K and 100 bar: zC1=0.998,
znC5=0.00012, and znC10=0.0008.

March 2002 SPE Journal 83


TABLE 1—TEST MIXTURES TABLE 2—COMPOSITION AND δij FOR MIXTURES I AND II
Name Mixture Comp. mol % δ CO 2 -C i δ C1 -C i
Mixture I Synthetic Oil
CO2 — — —
Mixture II Synthetic Oil/CO2 mixture
C1 35 0.093 —
Mixture III Billings crude/natural gas mixture C2 3 0.128 0
Mixture IV Kilgrin gas condensate C3 4 0.123 0
n-C4 6 0.136 0.02
n-C5 4 0.125 0.02
Fig. 7 depicts the number of iterations vs. pressure at 572.5 K
for m⳱2 and m⳱1. The results further show that the number of n-C6 3 0.131 0.025
iterations is only two times higher in the near-critical point and n-C7 5 0.12 0.025
critical point than it is far away from the region. n-C8 5 0.12 0.035
We have made a number of tests to evaluate the execution time
n-C10 30 0.12 0.045
for m⳱1, m⳱2, and m⳱3. The results show about one-third of CPU
time is saved if m⳱2 is used rather than m⳱3; m⳱3 has four vari- n-C14 5 0.12 0.045
ables, and m⳱2 has three in the reduction method. Ten variables are
required to perform stability analysis in the conventional method.
ous pressures. The composition of liquid phase is used to compute
Synthetic Oil/CO2 Mixture (Mixture II). CO2 often complicates bubblepoint pressure from stability testing; therefore, the bubble-
the calculation of phase behavior of crude oils. The main reasons point pressure should be the same as flash pressure. As with the
are its molecular features and physical properties, which are dif- synthetic oil, there are three nonzero eigenvalues (see Table 5);
ferent from those of hydrocarbons. Therefore, the stability analysis m⳱3, m⳱2, and m⳱1 represent three, two, and one eigenvalues,
for CO2/crude mixtures should be examined. The complication for respectively. Fig. 9 plots the results, which are very similar to
two-phase region predictions in the reduction method may be those in the synthetic oil; m⳱3 and the conventional method are
mainly because of the interaction coefficients. There are five non- identical (not shown); m⳱2 provides an excellent approximation,
zero eigenvalues for the matrix ␤; the values are listed in Table 5. while m⳱1 gives a large deviation.
m⳱ 5, m⳱4, m⳱3, m⳱2, and m⳱1 represent the stability cal-
culations with five, four, three, two, and one eigenvalue(s), respec- Kilgrin Gas Condensate (Mixture IV). Mixture IV is a very
tively. Note that m⳱5 and the conventional method give the same complex gas condensate.16 It contains nonhydrocarbon compo-
results. As with the designation in the synthetic oil, ␦⳱0 repre- nents N2 and CO2. There are six nonzero eigenvalues for this
sents the calculations with zero-interaction coefficients. mixture. Fig. 10 plots the saturation pressure vs. temperature. The
Fig. 8 depicts the predicted saturation pressure vs. mole percent conventional method, and m⳱6, produce identical results as ex-
of CO2 at 322 K. Note that the results for m⳱4 are very close to pected; m⳱5 also produces excellent results (m⳱6 and m⳱5 are
the conventional method; m⳱3 (four variables) provides a good not shown); m⳱4 and m⳱3 provide very good approximation.
approximate, while m⳱2 (three variables) produces fair results. However, m⳱2 and m⳱1 give large deviations, and m⳱1 pro-
For m⳱1 (two variables), there is a large deviation implying that duces better results than ␦⳱0 (both have two independent variables).
the second eigenvalue in Table 5 cannot be neglected. The results
for ␦⳱0 are inaccurate. With ␦⳱0, when Tc of nC10 is adjusted to
match the saturation pressure at xCO2⳱0.60 and 322 K, a wrong Comparison of the Conventional and
trend is predicted (true value of Tc of nC10⳱617 K, adjusted Reduction Methods
value⳱930 K). Michelsen’s method for stability analysis,1 which is based on lo-
Table 7 lists the number of iterations at different CO2 concen- cating the stationary points of the TPD in the conventional space,
trations. As with the results for the synthetic oil, the number of can be used in conjunction with the successive substitution (SS),
iterations in the critical region is approximately twice what it is the Newton algorithm, or the combination of the SS and the New-
away from the CP. The number of iterations depends on the dis- ton algorithm. Unlike the reduction method of this study, the New-
tance from the CP; it is independent of the number of eigenvalues. ton algorithm for the conventional stability analysis has poor con-
vergence when Wilson’s correlation is used to initialize the itera-
Billings Crude/Natural Gas Mixture (Mixture III). First, C7+ is tions. In this work, we compare our reduction approach with the
characterized using the distillation data.15 Then, the conventional conventional method using the combined SS and Newton’s
method is used to perform flash calculations at 366.48 K for vari- method of solution. In the conventional method, the SS method is
used first. When the Euclidean norm of step-length vector is less
than 10−2, the iteration switches to Newton’s method. Analytical
TABLE 3—COMPOSITION, CRITICAL PROPERTIES, ω, AND
δ ij FOR MIXTURE III
Jacobian matrix is used for Newton’s method in the conventional
stability. Table 8 presents the performance of our reduction
Comp. mol (%) MW Tc (K) Pc (bar) ω δC1–Ci method and the conventional method for Mixtures III and IV. Note
that the Newton method always converges in our approach; for the
C1 81.107 16.04 190.6 45.4 0.008 0 conventional method, both the number of iterations and conver-
C2 3.914 30.07 305.4 48.2 0.098 0 gence depend on the switching criterion from the SS to the Newton
C3 1.958 44.1 369.8 41.9 0.152 0 method. For both methods, as the critical point is approached, the
number of iterations increases. Considering that the reduction
C4 1.628 58.12 419.6 37.0 0.187 0
method is very robust, that the number of variables in the conven-
C5 1.105 72.15 448.8 33.3 0.243 0 tional approach can be much more than the reduction approach,
C6 1.197 84 506.35 33.9 0.299 0.01 that the search for the second minimum in the conventional ap-
C7 -C9 2.73 107 554.13 29.7 0.428 0.01 proach is a nontrivial task, and, finally, that the total number of
iterations in the conventional method is higher than that of the
C10 -C12 2.2973 147 622.3 24.5 0.611 0.02
reduction method, one may readily conclude the superiority of our
C13 -C15 1.2491 190 679.0 20.3 0.776 0.02 proposed approach. (According to Abhvani and Beaumont,19 one
C16 -C18 0.8473 237 727.0 16.8 0.940 0.02 SS iteration ≈0.7 Newton iteration.)
C19+ 1.9673 385.08 809.0 10.0 1.668 0 We also compared our formulation with the results from the
formulation of Jensen and Fredenslund,9 in which in our approach

84 March 2002 SPE Journal


TABLE 4—COMPOSITION , CRITICAL PROPERTIES, ω AND δij FOR MIXTURE IV

Comp. mol (%) MW Tc (K) Pc (bar) ω δN2–Ci δCO2 –Ci δC1–Ci


N2 0.19 28.01 126.2 33.5 0.04
CO2 1.01 44.01 304.2 72.8 0.225 –0.02
C1 86.49 16.04 190.6 45.4 0.008 0.12 0.093
C2 2.48 30.07 305.4 48.2 0.098 0.12 0.128 0
C3 1.28 44.1 369.8 41.9 0.152 0.12 0.123 0
iC4 0.72 58.12 408.1 36.0 0.176 0.12 0.136 0.02
nC4 0.37 58.12 425.2 37.5 0.193 0.12 0.125 0.02
iC5 0.22 72.15 460.4 33.4 0.227 0.12 0.131 0.025
nC5 0.14 72.15 469.6 33.3 0.251 0.12 0.12 0.025
C6 -C9 0.9978 103.56 547.4 30.3 0.410 0.12 0.12 0.035
C10 -C14 1.259 161.99 643.8 22.9 0.670 0.12 0.12 0.038
C15 -C19 1.2321 233.97 724.2 17.0 0.930 0.12 0.12 0.038
C20 -C24 0.9024 302.66 777.4 13.4 1.160 0.12 0.12 0.038
C25+ 2.7087 437.75 849.6 9.9 1.604 0.12 0.12 0.038

m⳱3 was used. Because the transformation from Ref. 9 has four B ⳱ defined by Eq. A-3
variables for stability, then the comparison between ours and that c ⳱ number of components
of the Jensen-Fredenslund transformation is on the same basis. We C ⳱ matrix with elements Cjk
found our approach to be more accurate. The results for Mixture II D ⳱ dimensionless TPD
were only used in this comparison. D ⳱ diagonal matrix with diagonal elements
g ⳱ defined by Eqs. B-2 and B-6
Discussion and Concluding Remarks H ⳱ Hessian matrix
The algorithm presented in this paper for stability analysis has K ⳱ equilibrium ratio
several important merits. It is very flexible in terms of speed and m ⳱ number of significant eigenvalues
accuracy. One can truncate after a small eigenvalue; two eigen- M ⳱ m+1
values were used for the synthetic oil and the Billings crude/ p ⳱ pressure
natural gas mixture with good approximations. The zero-
q ⳱ eigenvector elements
interaction coefficient methodology cannot be recommended, as
was demonstrated with three examples. The speed and the conver- R ⳱ gas constant
gence in our procedure is independent of the value of the interac- S ⳱ diagonal matrix
tion coefficients. This experience is different from the work re- T ⳱ temperature
ported in Ref. 12, in which the efficiency of calculations strongly U ⳱ matrix with elements given by Eq. D-4
becomes a function of interaction coefficients. x ⳱ mole fraction
The most important feature of our proposed method for stabil- y ⳱ mole fraction
ity analysis is its robustness. Our numerical experience with the z ⳱ mole fraction
mixtures presented in this paper and a number of other complex Z ⳱ compressibility factor
mixtures reveals that the approach is very robust. After examina- ␥ ⳱ index for reduction variables
tion of Figs.1 through 5, one may conclude that the transformation
␮ ⳱ chemical potential
in the reduced space reduces considerably the raggedness of the
TPD surface. This feature, together with the property of only one ␸ ⳱ fugacity coefficient
minimum, gives huge advantage to our approach in comparison to ␭ ⳱ eigenvalues
the conventional approach. Another important feature of the pro- ␻ ⳱ acentric factor
posed approach is that one can include all the interaction coeffi- ␦ ⳱ Kronecker delta, also binary interaction coefficients
cients which are essential, especially for CO2-crude mixtures.

160
Nomenclature
a ⳱ energy parameter of the EOS 140

A ⳱ defined by Eq. A-2


120
b ⳱ covolume parameter
100
CP
p, bar

Measured Data
Conventional Method
TABLE 5—NONZERO EIGENVALUES FOR TEST MIXTURES 80
Reduction Method
No. Mixture I Mixture II Mixture III Mixture IV m =2
60 m =1
1 9.95735 10.7487 10.9783 13.562 δ =0
2 0.0706504 0.220662 0.05008 0.4177 40 δ =0, Tc adjusted
3 –0.0280032 0.0642569 –0.02837 0.07158
20
4 –0.0327679 –0.04311 250 300 350 400 450 500 550 600 650 700
T, K
5 –0.000864411 –0.01329
6 0.005196
Fig. 6—P-T diagram for Mixture I.

March 2002 SPE Journal 85


20
TABLE 6—NUMBER OF ITERATIONS FOR STABILITY
TESTING AT SATURATION PRESSURE FOR MIXTURE I
δ= 0 16
T (K) m=3 m=2 m=1

Number of Iterations
300 5 5 5 5 Reduction Method
322 5 5 5 5 12 m=2
m=1
339 5 5 5 5
370 5 5 5 5 8

400 6 6 6 5
430 6 6 6 6 4
460 6 6 6 6
490 7 7 7 7
0
520 8 8 7 7 0 50 100 150 200 250 300 350 400

540 8 8 8 8 p, bar

550 9 9 9 9
Fig. 7—Number of Newton’s iterations vs. pressure at 572.5 K
565 11 11 11 11 for Mixture I.
575 12 12 11 11
580 10 10 9 9
the data in Figs. 1 through 5 with remarkable skill. His help is
583* 8 8 much appreciated.
583** 7 7
583.6* 8 8 References
583.6** 7 7 1. Michelsen, M.: “The Isothermal Flash Problem. Part I. Stability,” Fluid
580 6 6 6 6 Phase Equilibria (1982) 9, 1.
575 6 6 6 6 2. Trangenstein, J.A.: “Customized Minimization Techniques for Phase
Equilibrium Computations in Reservoir Simulation,” Chem. Eng. Sci.
Tc = 571.82 K Tc = 571.43 K (1987) 42, 2847.
p c = 79.47 bar p c = 78.23 bar 3. Rachford Jr., H.H. and Rice, J.D.: “Procedure for Use of Electronic
* retrograde dewpoint Digital Computers in Calculating Flash Vaporization Hydrocarbon
** dewpoint Equilibrium,” Trans. Soc. Pet. Eng. (1952) 195, 327.
4. Pan, H. and Firoozabadi, A.: “Fast and Robust Algorithm for Compo-
sitional Modeling: Part II–Two-Phase Flash Computations,” paper SPE
Subscripts 71603 presented at the 2001 SPE Annual Technical Conference and
Exhibition, New Orleans, 30 September–3 October.
i,j,k,l ⳱ component index, also derivative index
5. Strang, G.: Linear Algebra and Its Applications, third edition, Sauders
College Publishing, New York City (1988).
Superscripts
6. Firoozabadi, A.: Thermodynamics of Hydrocarbon Reservoirs, Chap.
L ⳱ liquid phase index 4, McGraw-Hill, New York City (1998).
V ⳱ vapor phase index 7. Michelsen, M.: “Simplified Flash Calculations for Cubic Equations of
State,” Ind. Eng. Chem. Process Des. Dev. (1986) 25, 184.
Acknowledgments 8. Peng, D.Y. and Robinson, D.B.: “A Rigorous Method for Predicting
We thank Dr. Bret Beckner of Mobil Technology Corp. (now with the Critical Properties of Multicomponent Systems From an Equation
ExxonMobil Upstream Research Co.) for providing the opportu- of State,” AIChE J. (1977) 23, 137.
nity to work on this project. We also appreciate many interesting 9. Jensen, B.H. and Fredenslund, A.: “A Simplified Flash Procedure for
discussions and suggestions from Dr. Kenneth M. Brantferger of Multicomponent Mixtures Containing Hydrocarbons and One Non-
Mobil Technology Corp. (now with ExxonMobil Upstream Re-
search Co.). Dr. K. Ghorayeb of RERI performed the plotting of
TABLE 7—NUMBER OF ITERATIONS FOR STABILITY
150 TESTING AT SATURATION PRESSURE FOR MIXTURE II
m =4
m =3
AT 322 K
Reduction
140 Method m =2 CO2% (mole) m=3 m=2 m=1
m =1
δ= 0 0 5 5 5
130 δ= 0, Tc adjusted
20 5 5 5
120 40 6 6 5
p, bar

50 6 6 6
110
Conventional Method 60 6 7 7

100
70 8 9 8
75 9 10 8
90 80 12 15 15
85 13 16 16
80
0 10 20 30 40 50 60 70 80 90 100 90 17 17 15
CO2% (mole) in Mixture 93.3 8 8 8
95 8 8 8
Fig. 8—Saturation pressure vs. CO2 concentration at 322 K for 97.5 7 7 7
Mixture II.

86 March 2002 SPE Journal


800 1,400

1,300 Conventional Method


Reduction Method
1,200 m =4
m =3
700 1,100 m =2
m =1
1,000 δ= 0

p, bar
900
600
Saturation Pressure, bar

800

700

500 600

500
300 350 400 450 500 550 600
T, K
400
Fig. 10—Saturation pressure vs. temperature for Mixture IV.

300 Hydrocarbon Using Two-Parameter Cubic Equations of State,” Ind.


Conventional Method Eng. Chem. Res. (1987) 26, 2129.
Reduction Method 10. Hendricks, E.M.: “Reduction Theorem for Phase Equilibrium Prob-
200 m =2 lems,” Ind. Eng. Chem. Res. (1988) 27, 1728.
11. Hendricks, E.M. and van Bergen, A.R.D.: “Application of a Reduction
m =1 Method to Phase Equilibria Calculations,” Fluid Phase Equilibria
(1992) 74, 17.
100 12. Kaul, P. and Thrasher, R.L.: “A Parameter-Based Approach for Two-
100 200 300 400 500 600 700 800 Phase-Equilibrium Prediction With Cubic Equations of State,” SPERE
p , bar (November 1996) 273.
13. Wilson, G.M.: “A Modified Redlich-Kwong Equation of State, Appli-
Fig. 9—Saturation pressure based on equilibrium vs. pressure cation to General Physical Data Calculation,” paper No. 15C presented
of two-phase liquid composition for Mixture III at 366.48 K. at the 1969 AIChE National Meeting, Cleveland, 4–7 May.

TABLE 8—NUMBER OF ITERATIONS FOR STABILITY TESTING IN


THE REDUCTION AND CONVENTIONAL METHODS

Mixture III (T = 366.48 K) Mixture IV (T = 399.82 K)


Reduction Conventional Reduction Conventional
p (bar) Newton SSI Newton p (bar) Newton SSI Newton
3,000 2 * * 3,000 2 * *
2,000 6 11 1 2,000 2 * *
1,500 6 14 1 1,500 8 27 2
1,000 7 26 2 1,400 8 32 2
800 8 59 2 1,300 8 40 2
750 10 108 2 1,200 9 55 2
740 10 132 2 1,100 11 116 2
730 11 168 3 1,080 11 168 2
720 13 150 5 1,060 16 411 4
710 11 96 3 1,052 12 112 3
705 10 81 2 1,050 11 104 3
700 10 71 2 1,045 11 83 2
695 10 63 2 1,040 10 74 2
690 10 57 2 1,020 11 49 2
685 9 52 2 100 9 38 2
680 9 48 2 900 8 20 2
670 9 42 2 800 7 14 1
660 9 37 2 700 7 10 1
640 8 30 2 600 6 8 1
600 8 23 2 500 6 7 1
500 7 14 2 400 5 6 1
400 6 10 1 300 5 5 1
200 5 6 1 200 5 4 1
* does not converge

March 2002 SPE Journal 87


14. Metcalfe, R.S. and Yarborough, L.: “The Effect of Phase Equilibria on Note that according to the above expression,
the CO2 Displacement Mechanism,” SPEJ (August 1979) 242, Trans.,
AIME, 267. g V = g V共QV1 , . . . , QcV,bV兲 ≈ g V共QV1 , . . . , QVm,bV兲. . . . . . . . . . (B-4)
15. Roland, C.H.: “Vapor-Liquid Equilibria for Natural Gas-Crude Oil Let us denote the second term in Eq. B-1 by −gL
Mixtures,” Ind. Eng. Chem. (1945) 37, 930.
c
16. Kilgren, K.H.: “Phase Behavior of a High-Pressure Condensate Res-
ervoir Fluid,” JPT (August 1966) 1001, Trans., AIME, 237. gL = 兺 y ln  共z兲. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (B-5)
i=1
i
L
i
17. Cavett, R.H.: “Physical Data for Distillation Calculation, Vapor-Liquid
Equilibria,” 1964 Midyear Meeting, API Division of Refining, San Substitution of Eq. 5 A-5 into Eq. B-5 provides
Francisco, 15 May.
18. Katz, D.L. and Firoozabadi, A: “Predicting Phase Behavior of Con- bV
gL = 共ZL − 1兲 − ln共ZL − BL兲
densate/Crude-Oil Systems Using Methane Interaction Coefficients,” bL
JPT (November 1978) 1649, Trans., AIME, 265.

冤 冥
m
19. Abhvani, A.S. and Beaumont, D.N.: “Development of an Efficient
Algorithm for the Calculation of Two-Phase Flash Equilibria,” SPERE
AL
2 兺Q Q
k=1
k
L
k
V
k
ZL + 2.414BL
(November 1987) 695, Trans., AIME, 283. − ln . . . . . (B-6)
2公2B
L
L
a ZL − 0.414BL
Appendix A–Z and ␸i With the
Reduction Variables Note that according to Eq. B-6,
The PR-EOS in terms of Z can be written as g L = g L共QV1 , . . . , QcV,bV兲 ≈ g L共QV1 , . . . , QVm,bV兲. . . . . . . . . . (B-7)
Z 3 − 关1 − B兴Z 2 + 关A − 3B2 − 2B兴Z − 关AB − B2 − B3兴 = 0, DII (the second term of the TPD in Eq. 20) is only a function
. . . . . . . . . . . . . . . . . . . . . . . . (A-1) of y. Because Ki=Ki(QV1 , . . . , QVm,bV) (from Ki=Li /Vi ), one
readily finds
where
D II = D II共QV1 , . . . , QVm,bV兲. . . . . . . . . . . . . . . . . . . . . . . . . . . . (B-8)
ap
A= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (A-2)
共RT兲2
and Appendix C: Expression for K
From ᐉ/yj⳱0 and Eq. 26,
bp
B= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (A-3) M
共RT兲
Note that according to Eq. A-1, once A and B are provided, Z
ln Kj − ln Kc = 兺  共q
=1
j − q c 兲 j = 1, . . . , c − 1. . . . (C-1)

can be determined: Z⳱Z(A,B). Using Eq. 13, one can then readily The above equation can be also expressed as
derive Eq. 14 of the text.
The expression for fugacity coefficient of component i is given by8

ln i =
bi
共Z − 1兲 − ln共Z − B兲
yj = zj Kc exp 冋兺 M

=1

 共q j − q c兲 . . . . . . . . . . . . . . . . . . . . . (C-2)

b Kc can be expressed by

冤 冥 冉 冊冒
c
c−1

A
2 兺 xa
j=1
1Ⲑ2 1Ⲑ2
j i aj 共 1 − ij兲
bi Z + 2.414B Kc = 1− 兺y j zc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (C-3)
j=1
− − ln .
2公2B a b Z − 0.414B
Introducing yj from Eq. C-2 into Eq. C-3,

冋兺 冉 兺 冊册
. . . . . . . . . . . . . . . . . . . . . . . . (A-4) c M M
c

The term 兺 xj ai1 Ⲑ 2aj1 Ⲑ 2共1 − ij兲 can be expressed as ln Kc =− ln


l=1
zl exp
=1
 q l + 兺 q
=1
c. . . . . . (C-4)
j=1
c c m
From Eqs. C-1 and C-4,
兺 xj ai1 Ⲑ 2aj1 Ⲑ 2共1 − ij兲 = 兺 兺 Q q
冋兺 冉 兺 冊册
k Qk qki ≈ k k ki . . . . . . (A-5)
j=1 k=1 k=1 c M M

by combining Eqs. 7, 9, and 11. Eqs. A-4 and A-5 establish Eq. 17 ln Kj =− ln
l=1
zl exp
=1
 q l + 兺 q
=1
j

of the text.
j = 1, . . . , c − 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (C-5)
Appendix B: Expressions for DI and DII
Eq. 27 of the text is from Eqs. C-4 and C-5.
The first term of the TPD in Eq. 20 is denoted by DI and is given by
c Appendix D: Hessian Matrix H=HI+HII
D = I
兺 y 关ln
i=1
i iV共y兲 − ln iL共z兲兴. . . . . . . . . . . . . . . . . . . . . . . (B-1) The matrix HI is given by

冤 冥
2 D I 2 D I 2 D I
Let us further subdivide the two terms in Eq. B-1. The first term … …
in Eq. B-1 is denoted by gV and is expressed by 共QV1 兲2 QV1 QV2 QV1 QVM
c ⯗ ⯗ ⯗ ⯗ ⯗
HI = .
gV = 兺i=1
yi ln iV共y兲. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (B-2) ⯗ ⯗ ⯗ ⯗ ⯗
2 D I 2 D I 2 D I
Substitution of Eq. A-4 into Eq. B-2 provides the expression for … …
gV which reads QVM QV1 QVM QV2 共QVM兲2
. . . . . . . . . . . . . . . . . . . . . . . . (D-1)
V V V V
AV ZV + 2.414BV
g = 共Z − 1兲 − ln共Z − B 兲 − ln V . The entries in the above matrix are given by 2gV/Q VQ
V
2公2BV Z − 0.414B
V
( ,
=1, . . . , M) (see Eqs. B-3 and B-4). Note that  2 gL /
. . . . . . . . . . . . . . . . . . . . . . . . . (B-3) QVQ
V⳱0. The PR-EOS can be used to calculate these entries.

88 March 2002 SPE Journal


The matrix HII is defined as
关HII兴jk−1 = QjV Ⲑ k =
c−1

兺 ylCkl 冉 Cjl −
c−1

兺C y 冊
冤 冥
2 II 2 II 2 II
 D  D  D jp p
… … l=1 p=1
共QV1 兲2 QV1 QV2 QV1 QVM
j,k = 1, . . . , M. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (D-7)
⯗ ⯗ ⯗ ⯗ ⯗
HII = . The matrix [HII]−1 is symmetric.
⯗ ⯗ ⯗ ⯗ ⯗
Finally, the expression for the gradient vector is given by

冉 冊
2 D II 2 D II 2 D II
… … D g V g L
QVM QV1 QVM QV2 共QVM兲2 =  + − = 1, . . . , M. . . . . . . . . . . (D-8)
Q V Q V
QV
. . . . . . . . . . . . . . . . . . . . . . . . (D-2)
Eq. 32 is used in the derivation of the above equation. As was
We take the derivative of Eq. 25 with respect to yj(j⳱1, . . . , pointed out earlier, the second derivative (2gL/Q V
V)⳱0 (see
c−1), and define C j as Eq. B-6).
All the derivations in the paper are based on stability testing of
Q V
C j = = q j − q c = 1, . . . , M; j = 1, . . . , c − 1. liquid phase by examination of the trial gas phase. Similar deri-
yj vations for the stability testing of gas phase are obtained by fol-
. . . . . . . . . . . . . . . . . . . . . . . . (D-3) lowing our procedure.
Let us define matrix C with elements C j. The matrix CT has
elements ln(Kj /Kc)/ (from Eq. C-1).
We take the derivatives of DII with respect to yj and yk, and SI Metric Conversion Factors
define Ujk as bar × 1.0* E+05 ⳱ Pa
2 D II ln共Kj Ⲑ Kc兲 jk 1
Ujk = = = + j,k = 1, . . . , c − 1. Abbas Firoozabadi is a senior scientist and director at the Res-
yjyk yk yk yc ervoir Engineering Research Inst. (RERI) in Palo Alto, California,
. . . . . . . . . . . . . . . . . . . . . . . . (D-4) and a Professor at Imperial College London. e-mail:
[email protected]. His main research activities center on thermo-
Next, we define the matrix U with elements Ujk. One can show dynamics of hydrocarbon reservoirs and production and on
that the elements of U−1 are given by multiphase-multicomponent flow in fractured petroleum reser-
voirs. Firoozabadi holds a BS degree from Abadan Inst. of Tech-
关U兴jk−1 = yj共jk − yk兲. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (D-5) nology, Abadan, Iran, and MS and PhD degrees from the Illi-
From Eq. 38, one obtains nois Inst. of Technology, Chicago, all in gas engineering.
Firoozabadi is the recipient of the 2002 SPE Anthony Lucas
QV QV y lnK Gold Medal. Huanquan Pan is a software developer at Incyte
关HII兴−1 = = = CU−1CT, . . . . . . . . . . . . . (D-6) Genomics in Palo Alto, California. Previously, he was a scientist
 y lnK  with the Reservoir Engineering Research Inst., where he worked
on the modeling of asphaltene and wax precipitation and the
where lnK⳱(lnK1/Kc,lnK2/Kc, . . . , lnKc−1/Kc). development of efficient phase-equilibrium algorithms for
Combining Eqs. D-5 and D-6 provides the elements of [HII]−1 compositional reservoir simulation. Pan holds a PhD degree in
given by chemical engineering from Zhenjiang U. in Hangzhou, China.

March 2002 SPE Journal 89

You might also like