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

Fluid Phase Equilibria, 17 (1984) 77-95 77

Elsevier Science Publishers B.V.. Amsterdam - Printed in The Netherlands

COMPUTATION OF MULTIPI-IASE EQUILIBRIUM PHENOMENA


WITH AN EQUATION OF STATE

LONG X. NGHIEM and YAU-KUN LI


Computer Modelling Group, 3512 - 33 Street N. W., Calgary, Alberta T2L 2A6 (Canada)

(Received July 12, 1983; accepted in final form January 16, 1984)

ABSTRACT

Nghiem, L.X. and Li, Y.-K., 1984. Computation of multiphase equilibrium phenomena with
an equation of state. Fluid Phase Equilibria, 17: 77-95.

This paper presents a general approach to multiphase equilibrium computations using an


equation of state. Various types of cakulations are described: flash calculations, saturation-
pressure and saturation-temperature calculations, and calculations of the feed composition
corresponding to a given saturation pressure and temperature.
A stagewise procedure for flash calculations using the QNSS method allows efficient
computation of phase equilibria for systems with any number of phases. The initial guess of
the composition of an extra phase which is required to start the iteration is obtained from an
analysis of the Gibbs-energy surface.
Newton’s method is used to construct multiphase boundaries on various types of diagrams
(pressure-temperature, pressure-composition and temperature-composition). Multiphase
critical points on these boundaries <arealso estimated by interpolation.
The algorithms developed are tested for a typical reservoir-oil-CO, mixture which exhibits
three-phase liquid l-liquid 2-vapor (L,L,V) separation. The predictions obtained using the
Peng-Robinson equation of state are satisfactory.

INTRODUCTION

Multiphase equilibrium phenomena are common in gas processes. The


presence of three hydrocarbon phases, liquid l-liquid 2-vapor (L1L2V),
occurs frequently during rich-gas or CO, injection into low-temperature
(T ( 50°C or 122’F) reservoirs (Shelton and Yarborough, 1977; Turek et al.,
1980; Orr et al., 1981; Gardner et al., 1981; Orr and Jensen, 1982) and in
cryogenic systems (Luks et al., 1983).
This paper presents a general approach to multiphase equilibrium calcula-
tions with particular application to L,L2V systems by using some recently
developed concepts in phase-behavior computations (Michelsen, 1982a, b;
Nghiem and Heidemann, 1982; Heidemann, 1983). The techniques discussed

0378-3812/84/$03.00 0 1984 Elsevier Science Publishers B.V.


78

are more general than previous work on L,L,V equilibria (Fussell, 1979;
Mehra et al., 1982; R_isnes and Dalen, 1982) and use rigorous Gibbs-energy
analysis to generate initial guesses. Most aspects of multiphase computations
are addressed, and efficient schemes for solving the nonlinear equations are
described. The construction of multiphase boundaries on various types of
diagrams (p ressure- temperature, pressure-composition and
temperature-composition) is also considered. Critical points on the multi-
phase boundaries are also estimated during diagram construction.

MULTIPHASE EQUILIBRIA

Phase equilibrium equations

The molar Gibbs energy G of a closed system of n,, phases and n,


components is given by

where I;; is the mole fraction of phase j, fij the fugacity of component i in
phase j, yii the mole fraction of component i in phase j, zi the global mole
fraction of component i, G,? the molar Gibbs energy of component i in the
standard state, R the universal gas constant, and T is absolute temperature.
The mole fractions zi and yji satisfy the condition

5 Zi = z _)Iij= 1 (2)
i-l i=l

and the material-balance constraint


nP
zi = c q.yii (3)
j=l

Since G is minimized at equilibrium, the following necessary but not suffi-


cient conditions can be derived:

Wj/AJ = 0 i=l ,._., n,;j=l,..., n,;jfr (4)

where the subscript r denotes a reference phase which is selected arbitrarily.


If the multiphase equilibrium ratios (K values) are defined as by Nghiem
and Heidemann (1982), i.e.,

Ki, = Yij/Yir
i= 1,. ..$Q;j= 1 ,*-*, nP (5)
79

eqn. (4) can be rewritten as


In Kji + In Gii - In c/J;~
= 0 i=l,.._, n,;j=l,.*., n,;j#r (6)

G,, = hi/( YiiP ) (7)


The fugacity coefficient $I;, can be computed readily from an equation of
state and is a function of p, T and yij.
The following relationship can also be derived from the definition of K,i
and the material-balance equation (eqn. (3)):

y;, = Kijz;/ 5 FmKi, i := 1,. ..,nc;j= 1 ,***, nP (8)


WI=1

where K;,=l (i=l,.._, n,) by definition. A given set of K,i completely


determines the composition and mole fraction of each phase.” Indeed, the
phase mole fractions I;; can be obtained by solving the equations

&-l=O (9)
/=I

and

hj = 5 ( yjj - y;,) = 0 j= l,...,n,;jf r


i=l
Substitution of eqn. (8) into eqn. (10) yields
n, r nP 1
hi= c (Kij- l)z;/ 1 F,K;, =0 j= l,...,n,;jfr (11)
i=l I m=l 1
Usually Fr is taken as a dependent variable by using eqn. (9), and eqn. (11) is
solved for the remaining F,‘s by Newton’s method. The compositions of the
phases are then evaluated from eqn. (8).
The primary unknowns are K,,, T,p, I;; and { (i= l,..., n,;j= l,..., n,;
j + r). The variable { is used to define the feed composition as follows:
Zi=(l-oZ;,*+SZ;,B i-1 ,...,nc (12)
where zi A and z;,~ are the compositions (mole fractions) of two given
mixtures A and B, respectively. Computation of the feed composition
according to eqn. (12) is useful in petroleum-reservoir engineering, since the
variable 5 can be used to define the fractions of an oil A and a gas B in a
mixture.
It is easy to verify that the above variables define the system completely.
The total number of unknowns is (n, + l)(n, ‘- 1) + 3. The equilibrium
equations (eqn. (6)) and the algebraic equations (eqn. (11)) represent a
80

system of (n, + l)( nP - 1) equations. Hence, three variables have to be fixed


before the equations can be solved.

Flash calculations

In this case, p, T and l are fixed and eqns. (6) and (11) are solved for Kij
andE;;(i=l,..., n,;j=l,..., n,, * j f r). An efficient method which does not
require a good initial estimate is the quasi-Newton successive-substitution
(QNSS) method, as discussed by Nghiem and Heidemann (1982). The
method is a generalization of the iterative procedure used previously by
Mehra et al. (1983), and belongs to a class of quasi-Newton methods
described by Nghiem (1983) and here summarized in Appendix I. The
following scheme for flash calculations can be obtained from these quasi-
Newton formulae.
For notational convenience, let the reference phase be phase 1, and let
T
OL= lnK,, ,..., lnK,C,z ,.,., lnKl,n, ,,,., In KnC., P] (13)
i

g= [ln(f,,/f,,)~..-~ln(~~,,/f,~.,]?...~~n(f~,~~/f,,~....~lnjf,~,,~/f,‘.,)]T 04)

where fjj is the fugacity of component i in phase j. The following recursive


equations are used to obtain the (k + 1)th iterate of QL:
A,-,+&’e &+I) _ ,.,$k)= _D(k) (kj 05)
g
(k-l)rg’k-l’ Aa(k-l)TA
b(k)= -[Aa /
g (k-l) ] (J(k-l)
(16)

Aftera(k+1)hasbeendetermined,eqn.(11)issolvedforE;(k+‘)(j=2,...,np)
by using Newton’s method. The whole process is repeated until convergence
is achieved. The algorithm is initiated with o(O)= 1, and a periodic restart
C- reset ack) = 1) after a fixed number of iterations (say 10) is recom-
kI;lded. If uCk) m . eqn. (16) is negative, its absolute value is used, and utk) is
reduced if necessary to maintain max lAol,l< 6 (i = 1,. . . ,( nep - l)n,>.
There are well-known cases (see Heidemann, 1978) in which the specifica-
tion of p, T and { is inadequate to determine the sizes of the coexisting
phases: e.g., for a pure fluid at its vapor pressure, or for a multicomponent
azeotrope. These systems are characterized by identical compositions in two
distinct coexisting phases which make the functions hj in eqn. (11) for these
two phases identical.

Saturation-pressure, saturation-temperature and saturation-feed caIcuIations

The computation of saturation pressure, saturation temperature or satura-


tion feed involves the determination of either p, T or 2 while keeping the
81

other two constant such that one of the phase mole fractions (say F,) is zero.
Newton’s method can be used to solve the equations. A good initial estimate
can be obtained by using QNSS flash calculations to find the conditions
where F, is close to zero.
A summary of the fixed and primary variables for different types of
calculations is presented in Table 1. The primary variables are obtained by
solving the equilibrium equations (eqn. (6)) and the algebraic equations (11).
The use of natural logarithms of some variables instead of the variables
themselves renders the magnitudes of the variables comparable, as discussed
by Michelsen (1980). The selection of primary variables in Table 1 shows
that only a slight rearrangement of variables is required for different types of
calculations. This feature is very desirable, since it simplifies the program-
ming of Newton’s method considerably.
Because F, is a dependent variable in eqn. (ll), it cannot be set equal to
zero. Therefore, to comput.e a saturation pressure, temperature or feed
corresponding to F, = 0, it is necessary to redefine a new reference phase r’
and a new set of K values Ki; with respect to that phase. Indeed, suppose
that a saturation pressure is computed, and that the actual solution corre-
sponds to J$ = 0. Even if F$ (s f r) is set equal to zero, convergence will be
achieved provided that a good initial guess is available, and the resulting
phase s is actually the original phase r. This identity-switching between
phases r and s is discussed further in the section on multiphase boundary
construction. The above restriction regarding F, will not apply if all 5’s
(j= l,... , n,,) are treated as independent variables and the set of ( nP - 1)
equations (eqn. (11)) is replaced by the system of nr, equations 2:~ry,, - 1 = 0
(j= l,... , M,), where yji is given by eqn. (8) (Michelsen, 1983).
The computation is also not restricted to a value of F, = 0. For example, it
is possible to find the pressure which gives a nonzero F, (0 < F, < 1) at a
given temperature and feed composition, provided that the solution exists.

TABLE 1

Variable alignment for different types of phase equilibrium computations

Type of calculation Fixed variables Primary variables


-
Flash ~,P,S In K,j, F, (.i + 0
Saturation pressure T, 3, F, In K,j, Fq, Inp (j# r;
(I+ r,s>
Saturation temperature I’, P, F, In K,,, Fq, In T(j f r;
17f r, 3)
Saturation feed T,p,F, In K,j> Fq, S (j f r;
4 # r, s>
82

Stability analysis

Stability analysis provides a means of determining whether the results


from phase equilibrium calculations yield stable systems. It is usually used in
conjunction with flash calculations to introduce an additional phase into a
system which will lower the Gibbs energy of the system.
As shown by Nghiem and Heidemann (1982), QNSS is a generalized
method for Gibbs-energy minimization, and the system obtained using this
method corresponds to a local minimum on the Gibbs-energy surface.
Therefore, the system is at least metastable. A stability analysis as described
in the following will establish whether this local minimum is also the global
minimum (resulting in a globally stable system). If another system exists at a
lower Gibbs energy, the technique will provide initial estimates of Kij for a
new flash calculation which will converge to this lower minimum.
The stability analysis is based on the stability test algorithm of Nghiem
and Heidemann (1982), which uses the tangent-plane criterion (Baker et al.,
1982). Some of the concepts used are due to Michelsen (1982a,b), but the
algorithm is different.
Suppose that the results from a flash calculation yield a system of np - 1
phases, and the existence of a system with np phases in equilibrium at the
same conditions is sought. Let yj be the composition vector corresponding to
phasej (j= l,..., np - 1). The molar-Gibbs-energy surface has the same
tangent plane at each of the points y,, and the distance between the
molar-Gibbs-energy surface and this tangent plane at a composition x is

D(x) = RT? xi ln[f,Cx)/f,r(Yr)] (17)


i=l

Sincef;j=f;,(j= l,...,n, - l), any f, j can be used instead of A, in eqn. (17).


The tangent-plane criterion states that the (n p - l)-phase system is stable if
and only if

D(x) > 0 for all x (18)


Inequality (18) must be true at any x. Hence it must be true at any stationary
point W of D(x). The equation which describes the stationary point (Michel-
sen, 1982a) is

di (u) = In 24;+ In Gi (Z) - In y,, - In Gir (y,) = 0 i= l,...,n, (19)


where
“c
zj = Ui/ c Uk (20)
k=l
83

At a stationary point, the distance D(g) is

(21)

and inequality (18) implies that

-In (22)

or

(23)

for all u which satisfy eqn. (19).


Introducing the definitions

Kip = 'JYir i= l,...,n C (24)


eqns. (19) and (23) can be rewritten as
lnKi,+ln+j(l)-ln~j,(y~)=O i= l,...,n C (25)

(26)
i=l

If u is renamed yP, eqn. (25) is identical to the equilibrium equation (eqn. (6))
with j = p, and the left-hand side of inequality (26) is just h, as defined in
eqn. (10). Hence, the stability test consists of solving eqn. (6) with j =p
without the constraint h, = 0. After convergence has been achieved, the
system is unstable if Ey~iu, :> 1.
Solution of eqn. (19) provides a method for exploring the Gibbs-energy
surface for additional local minima. If no such minimum exists, the proce-
dure will converge to the composition of one of the existing phases. The
stationary point will provide a good initial estimate to start flash calculations
with an extra phase if the present system is unstable.
Nghiem and Heidemann (1982) showed that eqn. (19) can be solved using
the QNSS method as follows:
AU(k) = _ ,.,(k)d(k)
(27)
a(k)= -[Au{ k-l)Td(k-l)/Au(k-l)TAd(k-l)] &k-i)
(28)
When the stability of multiphase systems is investigated, the initial guesses
for u(O)are the same as those suggested by Michelsen (1982a) in his iteration
scheme.
84

If the (np - l)-phase system is unstable, all phases will be unstable.


Therefore, it is necessary to check only the stability of one of the phases. For
convenience let that phase be phase r, although the following discussion
applies to any other phase. The condition Zy21~i > 1 can be rewritten as
n,
c J&Y,, ’
i=l
1 (29)
The set of KiP thus determined will allow the splitting of phase r into two
phases, say r’ and r”, provided that

Equations (29) and (30) are the necessary and sufficient conditions under
which a set of K values will split a mixture into two phases (Rachford and
Rice, 1952; Nghiem et al., 1983). If inequality (30) is not satisfied, a factor q
(0 < 77< 1) can always be found such that the new set of K values defined as
qK,, will allow the splitting of phase r. The rate of convergence to the
solution is quite insensitive to the value of 17chosen. Note that if 17is selected
such that
“c

C 7) KipYjr = l + ’ (31)
i=l

where 6 is a very small positive number (0 < e < 10m4), qKtp will split phase r
into a phase r’ having essentially the same size and composition as phase r,
and an infinitesimal amount of phase r” with composition %.
Once phase r has been split into phases r’ and r”, a new reference phase is
selected among the 12~ phases that are present. A new n,-phase set of K
values is then defined which forms the initial K-values vector for the
n ,-phase flash calculations.
The above procedure provides a method for initiating an n,-phase flash
calculation from the results of an ( nP - l)-phase flash calculation. It is used
only to initialize the n,-phase K values and guarantees at the outset a split of
the system into nP phases when eqns. (9) and (11) are solved for the t”J‘s, i.e.,
q> 0 (j= l,..., np). This approach results in a stagewise technique for
multiphase flash calculations where the number of phases is increased by one
after each stability test, which is conceptually similar to the approach of
Michelsen (1982b). The n,-phase flash calculation is then carried out by
updating the n,-phase K-values according to eqns. (15) and (16) and solving
eqns. (9) and (11) for 4 (j = 1,. . , ,np).
Note that a phase may disappear during an n,-phase flash calculation.
This occurs when the previous ( nP - l)-phase flash calculation does not
85

yield a globally stable system. The stability test introduces a new phase
which will gear the convergence to a new ( np - 1)-phase stable system.

Phase-boundary construction

In petroleum-reservoir fluid studies, it is desirable to construct multiphase


boundaries on various types of diagrams, i.e., pressure-temperature ( p - T),
pressure-composition (p-z) and temperature-composition (T-z). The tech-
niques described by Michelsen (1980) and Li and Nghiem (1982) can readily
be extended to solving the multiphase governing equations (eqns. (6) and
(11)) for the points on the boundaries. Michelsen’s extrapolation and inter-
polation methods (Michelsen, 1980) are used to obtain initial guesses of the
primary variables for each point on the phase boundaries, and to estimate
extrema as well as multiphase critical points, as described later.
For example, in p-z-diagram generation, T is fixed and one of the 5’s
(say F,) is set equal to zero. A point on the phase boundary is obtained by
specifyingoneof thevariableslnKjj,F,,{orlnp(i=l,...,n,;j#r; q#r,
s), and solving eqns. (6) and. (11) for the remaining variables by Newton’s
method. A good initial guess to start the computation can be obtained from
a QNSS flash calculation near the boundary. Since no restrictions are
imposed on the Fj’s, some may become negative or greater than 1 during
envelope generation. The points corresponding to those 5’s are discarded.
The Jacobian of Newton’s method is obtained by analytical differentiation
as follows. The terms In +ij I(i = I,. . . ,n,; j = 1,. . . , n ?) are computed from
an equation of state and can readily be differentiated analytically with
respect to p, T and yij. Note that Z:: Iyji = 1 only when convergence has
been achieved; hence, y,, should be treated as mole numbers in the differ-
entiation. From eqns. (8) and (12), it is easy to obtain the analytical
derivatives of Y,~ with respect to K,,, q. and {. Using chain rules, the
analytical derivatives of eqns. (6) and (11) with respect to the primary
variables can be calculated in a straightforward manner.
A useful characteristic of the multiphase boundary-construction algorithm
described here is the estimation of multiphase critical points. A critical point
on the boundary corresponds to the conditions where two phases become
identical. Rigorous methods for direct computations of two-phase critical
points (Peng and Robinson, 1977; Baker and Luks, 1980; Heidemann and
Khalil, 1980; Michelsen and Heidemann, 1981) can be extended to systems
with more than two phases. Michelsen (1982b) recently reported such a
procedure for critical points on the three-phase boundary. The method
discussed in the following is only approximate but gives acceptable results
for practical purposes.
Our experience with two-phase boundary construction shows that the
reference phase changes its identity as the construction goes through a
critical point. For example, the reference phase is oil on the bubble-point
curve, and gas on the dew-point curve. This identity-switching is inherent to
the method, since it provides continuity of all variables across a critical
point. This results in a change of the signs of the logarithms of all K values
as the construction goes through a critical point, and hence provides a means
for critical-point detection. Once a critical point has been bracketed, it can
be estimated from interpolation using the conditions that all In Ki’s are zero
at a critical point.
The above method can be extended to the estimation of critical points on
multiphase boundaries as follows. Suppose the n,-phase boundary corre-
sponding to Fs = 0 is being constructed. Since it is not usually known a priori
which phases will become identical at a critical point, all the following values
of In Kij have to be monitored:
In K,‘i = ln( y,i/v,,) i=l,..., n,;q=l,..., n,-l;j=q+l,..., HP (32)
If all the values of In Ki:, (i = 1,. . . ,n,) exhibit a change in sign, a critical
point corresponding to m = q is detected, and phases m and q switch their
identity across that critical point. Interpolation is then performed to obtain
the conditions where ln Kg!, = 0.
It should be noted that the K values defined in eqn. (32) are for
critical-point detection only, and may not belong to the primary-variable set.

L,L,V EQUILIBRIUM CALCULATIONS

The methods described in the previous section are here used to predict
L,L,V equilibrium phenomena for a typical reservoir-oil-CO, mixture using
the Peng-Robinson equation of state (Peng and Robinson, 1976). When the
cubic equation yields more than one root in the compressibility factor 2, the
root which yields the lowest Gibbs energy is selected (Evelein et al., 1976).
Calculations were performed for the recombined oil B described by Shelton
and Yarborough (1977). The oil is represented by a U-component system
shown in Table 2.
Table 3 gives the experimental and computed equilibrium phase composi-
tions for a mixture of CO, with the recombined oil B at 94°F (34.4”C) and
1184 psia (8163.4 kPa). The phase-composition predictions are quite satisfac-
tory. Some solid precipitate was observed in the experiment but was ignored
in the calculations.
Flash calculations were performed for the mixture shown in Table 3 at a
temperature of 94°F (34.4”C) and pressures between 1150 psia (7929.0 kPa)
and 1220 psia (8411.6 kPa). The calculated phase mole and volume per-
centages are shown in Fig. 1. The lower saturation pressure (lower consolute
87

TABLE 2
Recombined oil B composition

Component Mole percent

co* 0.11
N2 0.48
Cl 16.30
G 4.03
c3 2.97
iC, 0.36
flC4 3.29
iC, 1.58
nC5 2.15
C6 3.32
C,-C,, 26.15
cl,-Cl6 15.71
cl,-c22 10.78
c23 429 6.50
C 30+ 6.27

pressure) is at 1166 psia (8039.3 kPa), and the upper saturation pressure
(upper consolute pressure) is at 1191 psia (8211.7 kPa).
Table 4 reports the numbers of QNSS iterations for a few points in L,L,V

TABLE 3
Equilibrium phase compositions for a mixture of CO, with recombined oil B at 94°F and
1184 psia

Component Mole percent


Global Liquid 1 Liquid 2 Vapor
Exp. a Calc. Exp. a Calc. Exp. a Calc.
co2 78.95 59.45 61.62 87.97 91.92 89.87 92.03
N, 0.10 0.00 0.05 0.10 0.12 0.25 0.17
C, 3.44 3.01 2.17 3.82 4.03 6.98 5.01
C, 0.85 1.46 0.86 1.25 0.83 1.19 0.86
C, 0.63 0.96 0.80 0.66 0.51 0.42 0.46
iC, 0.08 0.11 0.11 0.09 0.05 0.05 0.04
nC, 0.69 1.07 1.05 0.61 0.46 0.30 0.36
iC, 0.33 0.49 0.55 0.25 0.19 0.11 0.13
nC, 0.45 0.57 0.77 0.33 0.24 0.12 0.17
C 6+ 14.48 32.90 32.02 4.92 1.65 0.71 0.77

a From Shelton and Yarborough (1977).


80 - - MOLE Co/o1
---- VOLUME( %)

,&O 1160 1170 1180 1190 1200 1210 1221


PRESSURE (psi01

Fig. 1. Calculated phase mole and volume percentages for a recombined oil B-CO, mixture at
94°F (34.4”C).

TABLE 4
Typical numbers of QNSS iterations in the L,L2V region

Pressure Stage 1 Stage 2 Stage 3 Stage 4 A” Ba


(psia) (stability (2P-flash) (stability (3P-flash)
test) test)
1170 6 20 21 19
1172 6 18 22 22 18 4
1174 6 26 22 22 32 4
1176 7 30 22 26 21 4
117x 7 31 12 43 18 4
1180 7 36 16 28 18 4
1182 7 47 16 34 19 4
1184 7 23 16 27 19 4
1186 7 32 16 32 22 4
1188 7 32 16 26 21 4
1190 7 21 21 31 56 4

a A, QNSS method with K values from previous calculation as initial guesses; B, Newton’s
method with K values from previous calculation as initial guesses.
89

regions. The L,L2V flash calculations were performed in a stagewise manner.


(1) Firstly, a stability test was performed on the single-phase system to
obtain estimates for the two-phase K values, since no good correlations of K
values were available. (2) Secondly, two-phase flash calculations were carried
out. (3) Thirdly, a stability test was made on one of the phases obtained in
stage (2) to obtain initial estimates of the L,L2V K values. (4) Fourthly,
L,L*V flash calculations were performed. The penultimate column (A) in
Table 4 shows the numbers of iterations when L,L2V K values from a
previous flash calculation were used to initiate calculations at a new pres-
sure. Stages (l)-(3) were not required in this case. The convergence tolerance
is IZ:,g,”< 10-12, where gj are the components of g defined in eqn. (14). For
the final column (B) of Table 4, Newton’s method was used to solve the
nonlinear equations (eqns. (6) and (11)). The initial K values used to start the
iterations were the same as those in column A. The Jacobian for Newton’s
method was obtained by analytical differentiation. For the ten three-phase
flash calculations in columns A and B, the execution-time ratio between
QNSS and Newton’s method is 0.76. QNSS may occasionally overshoot the
solution and may yield a larger number of iterations than expected. This
occurs in column A at 1174 psia and 1190 psia, where it was expected that
the numbers of iterations should be less than those in stage (4) with initial K
values from the stability tests.

t
3500 _ 0 ,EEP_E3Rd!dNENT 2P
s- , o”e=3.cO) T=94O F
A (“N”P_\MNENT 3P LZ a
s- , Bye= 3.44)
3000 - 0 CALC. CRITICAL POINT

$ 2500-
Q
;;
5 2000-
z 0
b-L2
kz
& 1500-

+YY=v 1- 2-

L,-v

5oo0 .lI .2I 1


.3 1
.4 .5I I
.6 .7I I
.8 .9I 1
MOLE FRACTION OF COP

Fig. 2. Recombined oil B-CO, p- z diagram.


90

A. El.
(N,=36;N,,,=3.441 (N,=14;N,,,=3.71)
1280,p 120,
T=94- F p=l191 psi0

.-
1240

I
B
110

1
B
- 1160-
:

i 1120-

k
a IOEO-

0.7 0.8 0.9 1.0 .55 .65 .75 .85


MOLE FRACTION MOLE FRACTION TEMPERATUREf’F)
OF CO, OF CO,

Fig. 3. Calculated L,L,V boundaries for recombined oil B-CO, mixture.

The calculatedp-z diagram for the recombined reservoir oil B with CO, is
shown in Fig. 2 together with the experimental data points from Shelton and
Yarborough (1977). For convenience, the mole fraction of CO, in the feed is
shown instead of S on one of the axes. The predicted three-phase region is at
the same location as the experimental one, but is smaller. Some discrepancies
also exist between the computed and experimental two-phase boundaries.
Considering the complexity of the system, it is felt that the Peng-Robinson
equation of state predicts quite adequately the phase behavior of recombined
oil B-CO, mixtures. Also reported in Fig. 2 are the numbers of points (N,)
on the two-phase (2P) and three-phase (3P) boundaries generated by the
algorithm, and the average number of Newtonian iterations (N,,,,) per point
on the boundaries.
The L,L2V region is replotted on a larger scale in Fig. 3(a). Let the
temperature be the third coordinate, with axis normal to the p-z diagram of
Fig. 3(a). The three-phase regions in the planes AA’ and BB’ are shown in
Fig. 3(b) (T-z diagram) and Fig. 3(c) (p-T diagram), respectively. All
critical points were estimated by interpolation.

CONCLUSIONS

This paper has described some efficient techniques for multiphase equi-
librium computations. Multiphase flash calculations are performed in a
91

stagewise manner with QNSS. All initial guesses are generated internally by
the algorithm from stability tests. A method for constructing multiphase
boundaries on various types of diagrams has been described. Techniques for
estimating multiphase critical points during construction have also been
given.
The above methods have been applied to the computation of L,L2V
equilibrium phenomena using the Peng-Robinson equation of state. Their
performance is very satisfactory. Although some discrepancies exist between
calculated and experimental results, it is felt that the Peng-Robinson equa-
tion of state (or other similar equations of state) is quite adequate to
reproduce the multiphase behavior of reservoir-oil-CO, systems.

ACKNOWLEDGMENTS

This work was supported by the Department of Energy, Mines and


Resources of Canada under Contract OlSG.23294-2-0627. The authors thank
Dr. R.A. Heidemann for very helpful discussions and Dr. A.D. Au for his
comments on this work.

LIST OF SYMBOLS

di
defined in eqn. (19)
D(x) distance between molar-Gibbs-energy surface and tangent plane
f(x) nonlinear function of x
f;j fugacity of component i in phase j
5 mole fraction of phase j
g defined in eqn. (14)
G molar Gibbs energy
Gp molar Gibbs energy of component i in the standard state
hj defined in eqn. (10)
H approximate inverse of Jacobian
I identity matrix
Kij equilibrium ratio (K value) of component i in phase j
*c number of components
*P number of phases
P pressure
R universal gas constant
T temperature
U stationary point of D(x)
W vector in QNSS method
xi
composition (mole fraction)
zi composition at a stationary point of D(x)
92

composition of component i in phase j


global or feed composition
compressibility factor
defined in eqn. .( 13)
defined in eqn. (12)
factor multiplying K;,
step lengths in QNSS method
fugacity coefficient of component i in phasej

Subscripts

i,k components
.Lm,p,q,s phases
r reference phase
r!
Superscripts

WI iteration level k
T transpose

Special notation

A,Ck) = OL(k+l)_ a(k)

APPENDIX I: QUASI-NEWTON SUCCESSIVE-SUBSTITUTION METHODS

A class of quasi-Newton methods for solving nonlinear equations, termed


quasi-Newton successive substitution (QNSS), is summarized in the follow-
ing. Details of the derivation of QNSS can be found in Nghiem (1983).
Consider a system of nonlinear equations
f(x) = 0 (Al)
and let
h(k) = X(k+r) _ X(k)
(A21
Af’k’= f(k+r) _ f(k)
(A3)
where the superscript (k) denotes the iteration level. To solve eqn. (Al),
Nghiem (1983) proposed the following QNSS schemes:
ax(“) = _a(k)H(“)f(k)
(A4
a(k), - Wck-l,Tf’k-” (WTAf(k-U] ,,(k-1)
W4
[ /w
93

u(O) !!!z 1
w4
where H(O) is an approximation to the inverse of the Jacobian (af/ax) at
iteration level 0, uck) is a scalar, and wCk-‘) is a vector which is used to
generate different QNSS schemes. Nghiem (1983) suggested the following
values for wCk-l):
Scheme 1:
W(k-r) = a(k-l)H(0)TAx(k-r)
(A6)
Scheme 2:
W(+l) = Af’k-”
(A7)
Scheme 3:
W(k--7)= b(k-1)
(A8)
To promote rapid convergence to the solution, H(O) should be a good
approximation to the inverse of the Jacobian, and a periodic restart of the
scheme after a fixed number of iterations is desirable. Restarting QNSS
consists of resetting 0 (k) = 1 and computing a new approximate inverse Hck),
The scaling of variables and functions is also important for good conver-
gence.
QNSS does not require computation and inversion of the Jacobian at
every iteration, and is therefore very attractive for large systems of nonlinear
equations. When QNSS is used in the minimization context with f being the
gradient of a functional F (i.e., f = VP’), and H (“) being a positive definite
matrix uCk) should be replaced by its absolute value if a negative value is
obtained.
When Scheme 1 is used (eqn. (A6)), uCk)can be computed more efficiently
as follows:

Gw
Experience with QNSS shows that all three schemes proposed perform
similarly.
The iterative schemes for flash calculations (eqns. (15) and (16)) and for
stability tests (eqns. (27) and (28)) are obtained by putting H(O)= I, the
identity matrix, in eqns. (A6) and (A8). For H(O)= I, Schemes 1 and 3 are
identical, and the first QNSS step is equivalent to a conventional successive-
substitution step.
Application of QNSS to the solution of the large, sparse system of
equations which arises from discretization of the equations for multiphase
multicomponent flow in porous media with interphase mass transfer has
been described by Nghiem (1983).
94

REFERENCES

Baker, L.E. and Luks, K.D., 1980. Critical point and saturation pressure calculations for
multicomponent systems. Sot. Petrol. Eng. J., 20: 15-24.
Baker. L.E., Pierce, A.C. and Luks, K.D., 1982. Gibbs energy analysis of phase equilibria.
Sot. Petrol. Eng. J., 22: 731-742.
Evelein, K.A., Moore, R.G. and Heidemann, R.A., 1976. Correlation of phase behavior in the
systems hydrogen sulfide-water and carbon dioxide-water. Ind. Eng. Chem., Process.
Des. Dev., 15: 423-428.
Fussell, L.T., 1979. A technique for calculating multiphase equilibria. Sot. Petrol. Eng. J., 19:
203-210.
Gardner, J.W., Orr, F.M., Jr. and Patel, P.D., 1981. The effect of phase behavior on
CO,-flood displacement efficiency. J. Petrol. Technol., 33: 2067-2081.
Heidemann, R.A., 1978. Non-uniqueness in phase and reaction equilibrium computations.
Chem. Eng. Sci., 33: 1517-1528.
Heidemann, R.A., 1983. Computation of high pressure phase equilibria. Fluid Phase Equi-
libria, 14: 55-78.
Heidemann, R.A. and Khalil, A.M., 1980. The calculation of critical points. Am. Inst. Chem.
Eng. J., 20: 769-779.
Li, Y.-K. and Nghiem, L.X., 1982. The development of a general phase envelope construction
algorithm for reservoir fluid studies. 57th Annu. Fall Meet., Sot. Petrol. Eng., September
26th-29th, 1982, New Orleans, LA, Pap. SPE 11198.
Luks, K.D., Merrill, R.C. and Kohn, J.P., 1983. Partial miscibility behaviour in cryogenic
natural gas systems. Fluid Phase Equilibria, 14: l93-201.
Mehra, R.K. Heidemann, R.A. and Aziz, K., 1982. Computation of multiphase equilibrium
for compositional simulation. Sot. Petrol. Eng. J., 22: 61-68.
Mehra, R.K., Heidemann, R.A. and Aziz, K., 1983. An accelerated successive substitution
algorithm. Can. J. Chem. Eng., 61: 590-596.
Michelsen, M.L., 1980. Calculation of phase envelopes and critical points for multicomponent
mixtures. Fluid Phase Equilibria, 4: l-10.
Michelsen, M.L., 1982a. The isothermal flash problem. 1. Stability. Fluid Phase Equilibria, 9:
l-19.
Michelsen, M.L., 1982b. The isothermal flash problem. II. Phase-split calculation. Fluid
Phase Equilibria, 9: 21-40.
Michelsen, M.L., 1983. Private communication.
Michelsen, M.L. and Heidemann, R.A., 1981. Calculation of critical points from cubic
two-constant equations of state. Am. Inst. Chem. Eng. J., 27: 521-523.
Nghiem, L.X., 1983. A new approach to quasi-Newton methods with application to composi-
tional modeling. 7th Sot. Petrol. Eng. Reservoir Simulation Symp., November I5th-18th,
1983, San Francisco, CA, Pap. SPE 12242.
Nghiem, L.X. and Heidemann, R.A., 1982. General acceleration procedure for multiphase
flash calculation with application to oil-gas-water systems. Proc. 2nd Eur. Symp. on
Enhanced Oil Recovery, November 8th-lOth, 1982, Paris, Editions Technip, Paris, pp.
303-316.
Nghiem, L.X., Aziz, K. and Li, Y.-K., 1983. A robust iterative method for flash calculations
using the Soave-Redlich-Kwong or Peng-Robinson equation of state. Sot. Petrol. Eng.
J., 23: 521-530.
Orr, F.M., Jr. and Jensen, C.M., 1982. Interpretation of pressure-composition phase dia-
grams for CO,-crude oil systems. 57th Annu. Fall Meet., Sot. Petrol. Eng.-Am. Inst.
95

Mech. Eng., September 26th-29th, 1982, New Orleans, LA. Pap. SPE 11125.
Orr, F.M., Jr., Yu, A.D. and Lien, C.L., 1981. Phase behavior of CO, and crude oil in
low-temperature reservoirs. Sot. Petrol. Eng. J., 21: 480-492.
Peng, D.Y. and Robinson, D.B., 1976. A new two-constant equation of state. Ind. Eng. Chem.
Fundam., 15: 59-64.
Peng, D.Y. and Robinson, D.B., 1977. A rigorous method for predicting the critical properties
of multicomponent systems from an equation of state. Am. Inst. Chem. Eng. J., 23:
137-144.
Rachford, H.H., Jr. and Rice, J.D., 1952. Procedure for use of electronic digital computers in
calculating flash vaporization hydrocarbon equilibrium. Trans. Sot. Petrol. Eng., 195:
327-328.
Risnes, R. and Dalen, V., 1982. Equilibrium calculations for coexisting liquid phases. 57th
Annu. Fall Meet., Sot. Petrol. Eng., September 26th-29th. 1982, New Orleans, LA, Pap.
SPE 11126.
Shelton, J.L. and Yarborough, L., 1977. Multiple phase behavior in porous media during CO,
or rich-gas flooding. J. Petrol. Technol:, 29: 1171-1178.
Turek, E.A., Metcalfe, R.S., Yarborough, L. and Robinson, R.L., Jr., 1980. Phase equilibria in
carbon dioxide-multicomponent hydrocarbon systems: experimental data and an im-
proved prediction technique. 55th Annu. Fall Meet., Sot. Petrol. Eng., September
21st-24th, 1980, Dallas, TX, Pap. SPE 9231.

You might also like