Professional Documents
Culture Documents
Nghiem 1984
Nghiem 1984
(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.
INTRODUCTION
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
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
Ki, = Yij/Yir
i= 1,. ..$Q;j= 1 ,*-*, nP (5)
79
&-l=O (9)
/=I
and
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)
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.
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
Stability analysis
(21)
-In (22)
or
(23)
(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
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
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
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
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
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
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
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-
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
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
Subscripts
i,k components
.Lm,p,q,s phases
r reference phase
r!
Superscripts
WI iteration level k
T transpose
Special notation
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.