Sie sind auf Seite 1von 10

A Robust Iterative Method for Flash Calculations

Using the Soave-Redlich-Kwong or the


Peng-Robinson Equation of State
L.X. Nghiem, SPE, Computer Modelling Group
K. Aziz, * SPE, Computer Modelling Group
Y.K. Li, SPE, Computer Modelling Group

Abstract
A robust algorithm for flash calculations that uses an guess is required before convergence can be achieved.
equation of state (EOS) is presented. It first uses a The single-phase region usually is determined by com-
special version of the successive substitution (SS) puting the saturation pressure and comparing it with the
method and switches to Powell's method if poor con- pressure of the system. This requires additional work,
vergence is observed. Criteria are established for an effi- and it is sometimes difficult to decide whether a dew-
cient switch from one method to the other. Experience point or bubblepoint pressure, which involve different
shows that this method converges near the critical point equations, should be computed.
and also detects the single-phase region without com- This paper presents a robust iterative method for flash
puting the saturation pressure. The Soave-Redlich- calculations using either the SRK or the PR EOS, both of
Kwong 1 (SRK) and the Peng-Robinson 2 (PR) EOS's are which have received much interest in recent years. The
used in this work, but the method is general and applies proposed method combines SS with Powell's iteration,
to any EOS. which is a hybrid algorithm consisting of a quasi-Newton
method and a steepest-descent method. 4 The SS method
Introduction is used initially and is replaced by Powell's method if it
The calculation of vaporlliquid equilibrium using an demonstrates poor convergence, thus taking advantage
EOS in multi component systems yields a system of of the simplicity of the former method and the robustness
nonlinear equations that must be solved iteratively. The of the latter. The SS method has been modified so that
SS method is commonly used, but it exhibits poor rate of the single-phase region can be detected without having to
convergence near the critical point. To overcome con- compute the saturation pressure.
vergence problems, Newton's method has been used by The nonlinear equations to be solved by an iteration
Fussell and Yanosik 3 to solve the equations. The scheme could behave differently, depending on their
drawback of Newton's method is the necessity of com- form and the variables for which they are solved. In this
puting a complicated Jacobian matrix and its inverse at paper three different approaches are considered with
every iteration. Hence, for systems removed from their Powell's method. One of the three approaches is based
critical point it involves more work to arrive at the solu- on the minimization of the Gibbs free energy.
tion than the SS method. Furthermore, the radius of con- The convergence properties of the proposed schemes
vergence of Newton's method is relatively small when are demonstrated by three example problems.
compared to that of the SS method; hence, a good initial
Equations in Flash Calculations
At a given pressure and temperature, flash calculations
• Now with Stanford u. yield the number of moles of component i in the liquid
0197·7520/83/0006·8285$00.25
phase, NiL, and in the vapor phase, N w , given that N i ,
Copyright 1983 Society of Petroleum Engineers of AIME i = 1 ... n c represents the number of moles of each com-
JUNE 1983 521
ponent in the feed. The thermodynamic criterion of The equilibrium-phase compositions also can be ob-
vaporlliquid equilibrium is that the Gibbs free energy, tained by minimizing the Gibbs free energy. It is shown
G, be minimized, which gives the following necessary below how Powell's method readily can be used to ob-
conditions. tain the solution from this approach.
aG aG Since niL =NiLIN and niV=NiVIN, we obtain from
- - = - - = 0 , i=1...ne· ................ (1) Eqs. 2 and 3:
aN iL aN iV
I aG I aG fiL
Since NiL + NiV = N i , it easily can be shown 5 that - - = - - - = I n - ......... (8)
NRT an iL NRT an iV fiV
aG aG
- - = - - - = G iL -G iV , i=l. .. ne'
aN iL aN iV We see from Eq. 8 that In(jiLlfiV) is equal to the gra-
............................. (2) dient of GINRT with respect to niL and the gradient of
-GINRT with respect to niV. Hence, by applying
where GiL is the partial molar Gibbs free energy of com- Powell's method to solve Eq. 4 instead of Eq. 5, we are
ponent i in the liquid phase. When an EOS is used to minimizing GINRT by using the quasi-Newton method.
compute_the pa.Itial molar Gibbs free energy, the dif- However, in doing so, we do not take advantage of the
ference GiL - G iV is related to the fugacities fiL and fiV fact that In(IiLlfiV), i= 1...n e , form the gradient of
as follows. GINRT(-GINRT) with respect to niL(niV), i=1...ne
- - fiL. since we merely were trying to reduce the values of
GiL -GiV=RT In-- , 1= 1...ne' .......... (3) In(fiLlfiV) to O. Hence, the refinements that could be ob-
fiV tained from this additional information 6 were not in-
The expressions for the fugacities using the SRK and troduced. We define the iterations on niL and niV,
PR EOS's are given in Appendix A. i = 1...n e, as NLM iteration and NVM iteration, respec-
The equilibrium conditions of Eq. I yield tively. NLM iteration will be used for predominantly
vapor systems and NVM iteration for predominantly liq-
InfiL =0, i=1...nc ....................... (4) uid systems.
fiV In practice, the equilibrium ratios K i = Y /x i,
or i= 1...ne> are introduced. The following equations can
be derived.
Fi -I =0, i= 1...ne> ....................... (5)
xi=Z/[I+fv(Ki-l)], i=1...ne' ......... (9)
where Fi is the fugacity ratio,fiLlfiV' Eq. 5 represents a
system of ne nonlinear equations that must be solved
iteratively for NiL or N iV . Yi=Kiz/[I+fv(Ki-l)], i=1...ne' ...... (10)
Instead of solving directly for NiL or N iV , it is often ne
more convenient to solve for mole fractions, which are zi(K i -I)
g(fv)= ~ =0. . ............ (11)
combinations of N i , NiL, and N iV . i=i I +fv(K i -I)
The definitions of mole fractions are given in Appen-
dix B. We also define moles of component i in liquid Eq. 5 also can be solved iteratively for K i , i=1...ne'
Once a set of K values has been determined, fv is ob-
phase per mole of feed as
tained by solving Eq. II, and x i and Yi are obtained
from Eqs. 9 and 10. The SS method usually is used in
niL =/LXi =NiLIN, ........................ (6)
this case and is described in the next section.
and moles of component i in vapor phase per mole of Method of Successive Substitution
feed as
It can be shown that K values are related to the fugacity
niV=fvYi =N/N . ......................... (7)
coefficients ¢iL and ¢iV as follows.

K,
'= ¢iL = fiLI(XiP) F,.~ .......... (12)
Eq. 5 can be solved for one of the following sets of ¢iV fiV1(YiP) Xi
variables.
In this solution, estimated K values are used to flash
/L,x i, i = 1...n c - I (LX iteration).
the mixture at the specified pressure and temperature.
The liquid and vapor fugacities then are determined from
/v,Yi, i= 1...ne -I (VY iteration).
the phase compositions, and new estimates for K values
are obtained from Eq. 12. The procedure is assumed
converged when
niL, i=1...nc (NLiteration).

niV, i= 1...ne (NV iteration).


~ (Fi _1)2 <E. . ....................... (13)

It easily can be shown that the variables in each of As initial estimates for K values, the following em-
these sets are independent and completely define the pirical relationship 7 is used.
system. Later in this paper, we will show how Powell's
method is used to solve Eq. 5 for these sets of variables. exp[5.37(1 +Wi) (I-~) ]
LX or NL iterations will be used for predominantly liq- ,
K.= Tn .......... (14)
uid systems. Pri
522 SOCIETY OF PETROLEUM ENGINEERS JOURNAL
Solution of g(fv) = 0 CASE CASE
1 3
Every time K values are determined, Eq. 11 has to be
solved for Iv(O:5lv:5 1). g(O is a monotonically
decreasing function of ~ (dgld~ <0 for any 0 with
asymptotes at ~ = I/(1-K i ), i=1...ne' Let Ke be the
largest and K s the smallest K values. A necessary but not
sufficient condition for the existence of a root of g(O in
[0,1] is that [0,1] is included in the interval [l/(1-Ke),
1/(1- Ks)]. Three cases are depicted in Fig. 1. For Case
1, g(O) ~ 0 and g(1):5 0, the root is in [0,1]; in Case 2,
g(O)<O, the root is negative; and in Case 3, g(I»O,
the root is greater than unity.
In Case 1, Iv is obtained by usin~ either the false-
position method or Newton iteration. In Case 2, Iv is
set to 0.5 at the first iteration and to 0.0 at subsequent
iterations. In Case 3, Iv is set to 0.5 at the first iteration
and to 1.0 at subsequent iterations.
In practice we find that the procedure just described
yields a root of g(~) in [0,1] for a two-phase system, and
for a single-phase system the fugacity ratios liLlfiV'
i = I ... n e' converge to a constant value that could be dif-
ferent from unity. This scheme has been tested exten-
sively and has predicted the single-phase region correct-
fig. 1-Conditions for the existence of solution of g(~) in [0,1].
ly. It was recently shown 9,10 that this procedure is
equivalent to testing the stability of a phase based on the
tangent-plane criterion. 11

Powell's Method NL Iteration or NLM Iteration


If the SS method demonstrates poor convergence, we can
~i=niLlliiL ,i=1. .. ne .
switch to another, more powerful method of solution.
We selected Powell's hybrid method,4 which is sum-
NV Iteration or NVM Iteration
marized in Appendix C. The Jacobian matrix and its in-
verse are computed numerically at the beginning of the ~i=niVlliiV, i=1...ne'
iteration and updated subsequently using rank-one
matrices according to Broyden. 12 This way the variables are properly scaled, andfL and
Let the initial estimate of the solution (obtained from Iv remain in the interval [0,1] for - 00 < ~ n < + 00. Ex-
the SS method) be: perience has shown that better convergenc~ is obtained
if the n e - 1 components used in LX iteration correspond
LX iteration-fL' xi, i=1...n e -I ; to the n e - 1 smallest value Xi, and those used in VY
iteration correspond to the n e - 1 smallest values y i'
VY iteration-fv, Yi ,i=1...n e -I ; The results from the SS method determine whether the
system is predominantly liquid or vapor. If Iv> fL
NL iteration or NLM iteration-Ii iL , i = 1...n e ; (predominantly vapor system), LX, NL, or NLM itera-
tion is used; otherwise we use VY, NV, or NVM
and iteration.
In the single-phase region around the critical point,
NV iteration or NVM iteration-Ii iV , i = I ... n e .
Powell's method will yield identical compositions for the
liquid and vapor phases. Hence, if the K values from the
We define the iteration variables ~ i, i = 1.. .ne for solution are such that IKi -II<IO- 3 , with i=l...ne, a
Powell's method as follows. single-phase system is assumed. For convenience, this
single phase is called vapor if fv > fL' and liquid
LX Iteration otherwise.
Criteria for Switching From SS
to Powell's Method
~ nc =In(2..-I)=lnlv
fL fL
. The important step of the proposed algorithm is the
switch from SS to Powell's method. This should lead to
a decrease in execution time; otherwise the switch is not
VY Iteration necessary. The criteria for an efficient switch from one
method to another were determined using a ternary
~i=y;lYi ,i=1...n e -I system and were then tested on 10- and IS-component
mixtures.
~ =In(2.. -1) =In IL . The ternary system used was C0 2 /nC 5 /nC I6 . Fig. 2
nc Iv Iv shows the calculated phase envelope at 1,500 psia (10.3
JUNE 1983 523
2
\ 11% nC5
\

-1

-2
N
..-
I -3
u..
1-'1'-
-4
52
01
.2
-5

-6

-7
85 a Calculafed 15

-8

_9L--L__L--L__L--L__L--L__L--L__~
o 5 10 15 20 25 30 35 40 45 50
mole % nC 16 No. of SST
Fig. 2-Phase envelope of C0 2 /nC s/nC 16 system at 1,500 psia Fig. 3-Convergence rate of 55 for different mixtures of
and 122°F. Flash calculations in Table 1 are for points C0 2/nC s/nC 16 at 1,500 psia and 122°F.
on Line A.

MPa) and 122°F (SO°C). To determine the convergence two-phase region (2 % nC 5), a mixture near the critical
behavior of the SS method for mixtures with different point (8 % nC s), and a single-phase mixture (11 % nC 5)'
compositions, a series of flash calculations was per- For a two-phase mixture, ~(Fi _1)2 decreases, andlv
1
formed for mixtures containing 88% CO 2 and various reaches its ultimate value rapidly. For a mixture near the
mole percents of nC 5 and nC 16. These mixtures lie critical point, the change of ~(Fi _1)2 and Iv is slow.
1
along Line A in Fig. 2 and for notational convenience For a single-phase mixture, the change of Iv is very
will be referred to using only their mole percent of nC 5. rapid and a value for Iv outside [0,1] is obtained after a
This line contains mixtures in the fully developed two- few iterations. In this case, we set Iv to either zero or
phase region (e.g., 0% nC 5), mixtures near the critical unity and proceed with the SS method as discussed
point (e.g., 8% nC 5 ), and mixtures in single-phase earlier.
region (e.g., 12% nC s ). Based on extensive testing of the flash program, the
Plots of log ~(Fi -1)2 vs. the number of SS iterations following criteria are proposed to switch from the SS
(SSI) for diffelrent mixtures are shown in Fig. 3. The method to Powell's method.
following can be observed.
1. The convergence of the SS method deteriorates as ~[Flk)-IF/~[Flk-1)-IF>ER' ......... (lSa)
the critical point is approached. 1 1

2. After a few iterations the slope of each curve re-


mains almost constant for a lar~e number of iterations. Ilv(k) -lv(k-1) 1< E V , . . . . . . . . . . . . . . . . . . . . . (ISb)

This implies that the ratio ~[Fl ) -IF/~[Flk-1) -IF


1 1 EL<~[F,.<k)-IF<Eu, .................. (lSc)
is also almost constant during that period and can be 1

used as an indication of the rate of convergence of the SS and


method for a particular mixture.
3. For the 8% nC s mixture, ~(Fi _1)2 increases after o<Iv(k) < 1 ............................ (ISd)
44 iterations and then decrease~ again after S6 iterations
(not shown). This type of behavior of the SS method oc- All four criteria must be satisfied before switching to
curs frequently in the critical region. Powell's method. Eqs. ISa and ISb indicate that the con-
4. For the 11 % nC 5 mixture, the single-phase region vergence of the SS method is slow. Experience shows
is detected after 2S iterations. that Eqs. ISa and ISb are more representative of the con-
Fig. 4 shows the change of ~(Fi _1)2 and Iv with vergence rate than ISa alone. Eq. ISc contains the op-
the number of SSI for a mixturb in the fully developed timal range of values of ~(Flk) -1)2 where the switch
1

524 SOCIETY OF PETROLEUM ENGINEERS JOURNAL


TABLE 1-FLASH CALCULATIONS FOR A THREE-COMPONENT SYSTEM USING THE PR EOS

Vapor-Phase SS Plus Powell


Composition Mole Fraction Method 1 Method 2 Method 3
(% nC s) tv SSI SSI Plus FE SSI Plus FE SSI Plus FE
0 0.527 14 (0.157) NA NA NA
1 0.532 14 (0.157) NA NA NA
2 0.537 14 (0.160) NA NA NA
3 0.544 18 (0.172) NA NA NA
4 0.553 22 (0.198) NA NA NA
5 0.565 27 (0.213) 11 + 8 (0.191) 11 + 9 (0.185) 11 + 7 (0.194)
6 0.583 34 (0.250) 9+ 17 (0.235) 9+ 14 (0.213) 9+ 14 (0.217)
7 0.613 44 (0.293) 11 + 17 (0.251) 11 + 16 (0.237) 11 + 14 (0.228)
8 0.688 85 (0.484) 13+21 (0.263) 13+20 (0.273) 13+21 (0.280)
9 0 141 (0.682) 20+21 (0.322) 20+21 (0.247) 20+24 (0.321)
10 0 49 (0.281) NA NA NA
11 0 25 (0.177) NA NA NA
12 0 12 (0.129) NA NA NA

to Powell's method is economical. The upper bound, TABLE 2-1 O-COMPONENT SYSTEM COMPOSITION
C u, avoids the switch too far from the solution. Although
the convergence of the SS method slows down as the Mole
Component Fraction
solution is approached, it is not economical to change
C1 0.6436
methods near the solution. This is prevented by the lower C2 0.0752
bound, CL, in Eq. I5c. Eq. I5d prevents the switch to C3 0.0474
Powell's method when Iv is equal to zero or unity. nC 4 0.0412
Usually we set cv=1O- 2 , cu=1O- 3 , and cL=10- 5 , nC s 0.0297
nC 6 0.0138
and C R is chosen by trial and error. Its value increases
nC 7 0.0303
with the number of components. Typical values for CR nC a 0.0371
are 0.5 and 0.75 for 3- and lO-component systems, nC g 0.0415
respectively. For practical purposes, any value of C R nC 10 0.0402
around 0.6 works reasonably well.
Examples
The combination method (SS plus Powell) was used to 2 1.1
flash a 3-, 10-, and I5-component system. For nota-
11% nCs
tional convenience, we group the different iterations by 1.0
using Powell's method as: Method I-LX or VY itera-
tion, Method 2-NL or NY iteration, and Method 0 0.9
3-NLM or NVM iteration.
The number of SSl's and function evaluations (FE's) -1 0.8 I"
in Powell's method are reported along with the execution I
..!..
time in central processing unit (CPU) seconds for dif- -2 z
0.7
ferent methods of solution. FE corresponds to the 8%nC s 0
number of times the nc functions in Eqs. 4 or 5 are I -3 ---- ---
------
0.6 ~
f=
u
evaluated. The execution time is for the CDC CYBER
.
OJ
~ u...
I72TM computer and includes input and output of infor-
-4 0.5 ~
mation. A variation of up to ±0.03 CPU seconds for the w·- 0
same problem has been observed. ::!:
0
,;; -5
8% nC 5
0.4 a:
.2 0
Three-Component System \
\ <t
a..
Results of the flash calculations using the PR EOS for -6 \
\ 0.3 >
\
mixtures along Line A in Fig. 2 are summarized in Table \
I
1. The execution times are enclosed in parentheses. A -7 I 0.2
I
value of 0.5 was used for CR in Eq. I5a. "NA" in the I
-8 I
SS-plus-Powell column means that the switch to I 0.1
Powell's method was not necessary. SSI decreases for ~ 11% nCs
\
the detection of the single-phase region as we leave the -9 00
0 5 10 15 20
critical region. The convergence criterion is ~(Fi _1)2 No. of 55I
< 10 -8 except for Method 3, where the ~riterion is Fig. 4-Behavior of SS for mixtures in the fully developed two-
~(in Fi)2 < 10- 8 . phase region (2% nC s), in the critical region (8% nC s),
I
and in the single-phase region (11 % nC s).
Ten-Component System
Consider the volatile oil shown in Table 2. The critical
point of this mixture, computed by the method of Peng
JUNE 1983 525
TABLE3-FLASH CALCULATIONS FOR A 10-COMPONENT SYSTEM USING THE SRK EOS

Vapor-Phase SS Plus Powell


Pressure Mole Fraction Method 1 Method 2 Method 3
(psia) tv SSI SSI Plus FE SSI Plus FE SSI Plus FE
2,700 0.575 89 (1.010) 16 + 19 (0.637) 16+ 18 (0.581) 16+ 18 (0.596)
2,710 0.572 96 (1.106) 16+21 (0.643) 16+ 18 (0.569) 16+20 (0.638)
2,720 0.568 103 (1.170) 17 + 17 (0.613) 17+18 (0.584) 17+20 (0.658)
2,730 0.565 112 (1.239) 17+ 17 (0.589) 17 + 17 (0.598) 17 + 19 (0.644)
2,740 0.559 123 (1.371) 17+36 (0.871) 17+17 (0.587) 17+19 (0.641)
2,750 0.556 137 (1.491) 18+28 (0.784) 18+ 17 (0.597) 18+ 19 (0.637)
2,760 0.552 154 (1.669) 18+ 18 (0.625) 18 + 19 (0.622) 18 + 21 (0.676)
2,770 0.548 183 (1.937) 18 + 18 (0.627) 18+ 18 (0.634) 18+24 (0.734)
2,780 0.541 214 (2.247) 19 + 19 (0.670) 19+ 18 (0.645) 19+28 (0.813)
2,790 0.536 263 (2.698) 19 + 19 (0.657) 19+19 (0.654) 19+29 (0.888)
2,800 0.530 354 (3.631) 19+20 (0.712) 19+19 (0.664) 19+27 (0.809)
2,810 0.519 NC 20+21 (0.764) 20+20 (0.712) 20+20 (0.716)

and Robinson \3 and the SRK EOS, is at 2,813 psia (19.4 included in Case A to provide a fair comparison. Recent
MPa) and 324°F (I62.2°C). developments on accelerated successive substitution 9
Table 3 shows the results of flash calculations using yield only 39% of the computing time of Newton's
the SRK EOS for this mixture at 324°F (162.2°C) and method when Eq. 14 was used as the initial guess for all
different pressures from 2,700 to 2,810 psia (18.6 to calculations.
19.4 MPa). The convergence tolerance used in Eq. 13 The results show that Powell's method is quite effi-
was 10 - 8 , and the value used for ERin Eq. 15a was cient and usually takes less time than Newton's method.
0.75. The SS method did not converge at 2,810 psia For this example, the work involved in each Newton's
(19.4 MPa) ("NC" in the SSI column). iteration is about 15 FE's plus an inversion of a 15 x 15
For the above two examples, Method 2 (NL or NV matrix.
iteration) appears to be slightly better than the other two Our experience shows that the SS method is very
methods investigated. stable, although its convergence deteriorates near the
critical point. From a poor initial guess, Wilson's equa-
Fifteen-Component Reservoir Oil System tion in this example, it takes us to a region reasonably
The method presented here was also tested using the close to the solution so that Powell's method can take
reservoir oil described in Ref. 3, the composition of over efficiently. The straightforward use of Newton's
which is shown in Table 4. The critical properties and method, on the other hand, does not always converge
acentricities of the C 7 + fractions were estimated using with a poor initial guess.
Bergman's method 14 together with the data given in The convergence characteristics of Powell's method
Katz and Firoozabadi. 15 The interaction coefficients be- are illustrated in Fig. 5 atp=4,875 and 4,750 psia (33.6
tween C 1 and the C 7 + fractions were adjusted to match and 32.8 MPa). The first 15 FE's in Powell's method
the bubblepoint pressure of 4,952 psia (34.4 MPa) at a were used to compute numerically the Jacobian, so only
temperature of 235°F (I 12.78°C) using the SRK EOS. the characteristics after the 16th FE are shown. At both
Because a different EOS and a different characterization pressures, the initial step was steepest descent (0=0). At
method for the C 7 + fractions were used, the predictions the lower pressure [4,750 psia (32.8 MPa)], 0 increased
obtained were slightly different from those given in rapidly to unity (quasi-Newton step) and stayed there for
Ref. 3. the remaining iterations. At the higher pressure, which is
The performance of the present algorithm was com- closer to the saturation pressure, oscillations in the value
pared with that of Newton's method as formulated by of 0 were observed. This type behavior occurs frequently
Fussell and Yanosik. 3 However, the Jacobian matrix for difficult cases.
was obtained by numerical rather than analytical dif-
ferentiation. This may not be as effective as in Fussell Conclusions
and Yanosik's approach. VY iteration was used for all This paper presents a modification to the conventional
calculations with a convergence tolerance E= 10 -12 and SS method that allows the detection of the single-phase
ER=0.6 (Eq. 15a). The performances for two SS and region without computing the saturation pressure and a
Powell's approaches and Newton's method are reported combination of the SS method and Powell's method that
in Table 5. In Col. 3, Eq. 14 was used as the initial guess yields a reliable and efficient algorithm for flash calcula-
for all calculations using the present algorithm. In Cols. tions. Criteria for an efficient switch from SS to Powell's
4 and 5, a bubblepoint calculation was performed first, method are given. The success of the combination
and the results obtained were used as initial estimates in method is due to the stability of SS and the robustness of
the flash calculations at 4,950 psia (34.1 MPa). For each Powell's method. The algorithm is quite flexible, and
subsequent pressure the initial iteration variables are the any other quasi-Newton method or Newton's method
value of these variables at the previous pressure. The may also be used instead of Powell's method. 16
total execution times for all calculations in Cases A and Although the iteration scheme proposed was tested using
B are, respectively, 91 and 65 % ofthat corresponding to the SRK and PR EOS's, it is applicable to any other
Newton's method. A bubblepoint calculation was also EOS.
526 SOCIETY OF PETROLEUM ENGINEERS JOURNAL
TABLE 4-RESERVOIR OIL COMPOSITION TABLE 5-FLASH CALCULATIONS FOR THE RESERVOIR OIL

Mole Pressure SS Plus Powell Newton


Component Fraction
0.00808
(psia) _'_v_ SSI Plus FE SSI Plus FE Iterations
N2 4,950 0.0116 22 + 111 2+55 2
C1 0.56990 4,925 0.1144 21 + 56 2+53 4
CO 2 0.01501 4,900 0.1770 21 + 49 2+30 4
C2 0.12714 4,875 0.2206 20+ 33 2+28 3
C3 0.07596 4,850 0.2536 20+ 30 2+27 3
iC 4 0.01075 4,800 0.3016 19+ 28 2+27 4
nC 4 0.03055 4,750 0.3358 18+ 26 2+25 4
iC s 0.00849 4,700 0.3623 18+ 26 2+26 3
nC s 0.01074 4,650 0.3838 17+ 25 2+25 3
Cs 0.01272 4,600 0.4019 16+ 25 2+24 3
180 BP' 0.01716 4,550 0.4175 16+ 25 2+24 3
230 BP 0.01764 4,500 0.4313 15+ 25 2+24 3
280 BP 0.01416
330 BP 0.01115
380 BP 0.07055
• BP represents boiling-point fractions of the c7•.

Nomenclature -2
,{O 4875 psio 8 {e 4875 psio
1.2
A = parameter in cubic EOS fIR, -1) t:J. 4750 psio ... 4750 PSiO

B = parameter in cubic EOS


1.0
fiL = fugacity of component i in liquid phase -4
fL = mole fraction of liquid phase
fv = mole fraction of vapor phase
C\I 0.8
Fi = fugacity ratio of component i, Fi =fiLlfiV ~
.,....
I -6
G = Gibbs free energy
LL
GiL = partial molar Gibbs free energy of compo-
nent i in liquid phase "".- ~
0.6 (t)

H = inverse of Jacobian matrix c> -8


0
J = Jacobian matrix 0.4
Ki = equilibrium ratio, Ki =Y/Xi
nc = number of components
-10
niL = moles of component i in liquid phase per 0.2
mole of feed, niL =NiL IN
N = total number of moles in feed
Ni = moles of component i in feed ~2~~~~~~~~~~~~~~~~0

NiL = moles of component i in liquid phase 16 20 24 28 32 36


No. of FE
p = pressure, psia (kPa)
R = gas constant Fig. 5-Convergence characteristics of Powell's method.

T = absolute temperature
v = molar volume
Xi = mole fraction of component i in liquid Subscripts
phase c = critical
Y i = mole fraction of component i in vapor phase i,j,k = component number
z = compressibility factor £ = subscript of largest equilibrium ratio
Zi = global mole fraction of component i L = liquid
a = Newton's step r = reduced
~ = steepest -descent step s = subscript of smallest equilibrium ratio
o = correction vector V = vapor
oij = interaction coefficient between components i
and j Superscripts
d = maximum norm allowed for 0 (k) = iteration level k
E = tolerance
T = transpose
~ i = iteration variables for Powell's method
- = results from SS method
rf> i = fugacity coefficient of component i in liquid Acknowledgments
phase This research is supported by the general members of
Wi = acentric factor of component i Computer Modelling Group and the Alberta/Canada
JUNE 1983 527
Energy Resources Research Fund administered by the R2T2c
Dept. of Energy and Natural Resources of the Province a(Tc) =0.42747-_-
of Alberta. We thank R.A. Heidemann and P.K.W. Vin- Pc
some for their helpful comments on this work. The ver-
sions of the SRK and PR equations used are from the
Hyprotech fluid properties program, HYPROP.
and
References
1. Soave, G.: "Equilibrium Constants from a Modified Redlich- m =0.480 + 1.574w -0.176w 2 .
Kwong Equation of State," Chern. Eng. Sci. (1972) 27,
1197-1203. PR
2. Peng, D.Y. and Robinson, D.B.: "A New Two-Constant Equa-
tion of State," Ind. Eng. Chern. Fund. (1976) 59-64. RT a(T)
3. Fussell, D.D. and Yanosik, J.L.: "An Iterative Sequence for p=---
Phase-Equilibria Calculations Incorporating the Redlich-Kwong v-b v(v+b)+b(v-b)
Equation of State," Soc. Pet. Eng. J. (June 1978) 173-82.
4. Powell, M.J.D.: "A Hybrid Method for Nonlinear Equations," RTc
Numerical Methods for Nonlinear Algebraic Equations, P.
b=0.07780-
Rabinowitz (ed.), Gordon and Breach, London (1970). Pc
5. Sandler, S.I.: Chemical and Engineering Thermodynamics, John
Wiley & Sons Inc., New York City (1977) 300-04.
6. Broyden, C.G.: "Quasi-Newton Methods and their Application to
Function Minimization," Math. Compo (1967) 368-81.
7. Wilson, G.: "A Modified Redlich-Kwong Equation of State, Ap- R2Tl
plication to General Physical Data Calculations," paper 15C a(Tc )=0.45724--
presented at the 1968 AIChE National Meeting, Cleveland, OH, Pc
May 4-7.
8. Jarrat, P.: "A Review of Methods for Solving Non-linear
Algebraic Equations in One Variable," Numerical Methods for
Nonlinear Algebraic Equations, P. Rabinowitz (ed.), Gordon and
Breach, London (1970). and
9. Nghiem, L.X. and Heidemann, R.A.: "General Acceleration Pro-
cedure for Multiphase Flash Calculation with Application to Oil- m=0.37464+ 1.54226w-0.26992w 2 .
Gas-Water Systems," paper presented at the 1982 European Sym-
posium on Enhanced Oil Recovery, Paris, Nov. 8-10.
10. Michelsen, M.L.: "The Isothermal Flash Problem, Parts I and If the compressibility factor, Z (=pvIR1), is intro-
II," Fluid Phase Equilibria (1982) 1-40. duced, the following cubic equations are obtained. For
11. Baker, L.E., Pierce, A.C., and Luks, K.D.: "Gibbs Energy SRK,
Analysis of Phase Equilibria," Soc. Pet. Eng. J. (Oct. 1982)
731-42.
12. Broyden, C.G.: "A Class of Methods for Solving Nonlinear Z3 -Z2 +(A -B-B 2)z-AB=0. . .......... (A-1a)
Simultaneous Equations," Math. Camp. (1965) 577-93.
13. Peng, D.Y. and Robinson, D.B.: "A Rigorous Method for Pre- For PR,
dicting the Critical Properties of Multicomponent Systems from an
Equation of State," AIChE J. (1977) 23, 137-44.
14. Bergman, D.F.: "Predicting the Phase Behavior of Natural Gas in
Z3 _(1-B)Z2 +(A -3B 2 -2B)z-(AB-B 2 -B3)=0 ,
Pipelines," PhD dissertation, U. of Michigan, Ann Arbor (1976).
15. Katz, D.L. and Firoozabadi, A.: "Predicting Phase Behavior of
. ........................ (A-1b)
Condensate/Crude-Oil Systems Using Methane Interaction Coeffi-
cients," J. Pet. Tech. (Nov. 1978) 1649-55.
16. Young, L.C. and Stephenson, R.E.: "A Generalized Composi- where A=apIR 2 T 2 and B=bpIRT.
tional Approach for Reservoir Simulation," paper SPE 10516 Eqs. A-1 a and A-1 b yield one or three real roots
presented at the 1982 SPE Symposium on Reservoir Simulation, depending on the number of phases in the system. In the
New Orleans, Feb. 1-3. two-phase region, the largest root is the compressibility
factor of the vapor, while the smallest positive root cor-
APPENDIX A responds to that of the liquid.
For mixtures, the following mixing rules are
The SRK and PR EOS's recommended. 2
The details of the development of the SRK and PR
EOS's are given in Refs. 1 and 2. The final results are b= 2.'>ibi, ......................... (A-2)
the following.

SRK a= ~ ~XiXjaij , .................... (A-3)


i
RT a(T)
P=---
v-b v(v+b) and

RTc
b=0.08664-
Pc
where 0 ij are binary interaction coefficients obtained by
fitting the predicted binary bubblepoint pressures to ex-
perimental data.
528 SOCIETY OF PETROLEUM ENGINEERS JOURNAL
The fugacity coefficient of component k in a mixture and
can be calculated from the following equations.
2: Zi= 2:Xi= 2:Yi=1 .
i i
.......................... (B-8)

APPENDIX C
Powell's Hybrid Method
Consider the problems of finding the root x* of a system
of n nonlinear equations in n unknowns .
. . . . . . . . . . . . . . . . . . . . . . (A-5a)
f(x)=O ................................ (C-l)

given a starting iterate x (0) .


For PR,
Various methods have been studied and shown to be
bk quadratically or superlinearly convergent if x (0) is close
In ¢k=-(z-I)-ln(z-B)
b enough to x*. For many problems, however, a good in-

~ [2
__2~B
_ 2:,. Xiaik itial estimate is not available and therefore a more robust
algorithm is needed.
a - :kJ Two well-known methods for solving Eq. C-l are
Newton's method and the steepest-descent method .
Newton's method is based on a linear approximation
. In(Z+2.414B) , .............. (A-5b)
z-0.414B
of f around the kth iterate x(k) .

f[X(k) +a(k)] =f[x(k)] +J(k)a(k) ,


................................ (C-2)
where
APPENDIX B
Mole Fractions Definitions J(k)= -
af )(k)
( ax
Let
is the Jacobian matrix of f at x(k).
The Newton's step, a(k) =x(k + I) -x(k), is obtained
by setting the left side of Eq. C-2 to 0 and solving for
a(k) .
The mole fractions are defined as follows.
Global mole fraction of component i, a(k) = -J -I(k)f(k) , ..................... (C-3)

Zi =N;lN. . ............................ (B-1) where f (k) denotes f [x (k)] for convenience. Newton's
method is quadratically convergent if x (k) is close to x*.
Liquid mole fraction of component i, If x(k) is not close to x*, there is no guarantee that
x(k+ I) will be any better than x (k) and Newton's method
xi=NiLINL . ........................... (B-2) need not converge. A method that guarantees that

Vapor mole fraction of component i,


is the steepest-descent method where 11'11 denotes the
Yi =NiVIN v . ........................... (B-3)
Euclidian norm.
Consider the functional equation
Liquid mole fraction of the system,
F(x) = vzr T (x )f(x). . .................... (C-4)
fL =NLIN. . ............................ (B-4)
The steepest-descent direction g is
Vapor mole fraction of the system,
g= - \l F(x) = -JTf(x). . ................ (C-5)
fv=NvIN. . ........................... (B-5)
Given the kth iterate x (k) , the steepest -descent step p(k)
= x(k+I) - x(k) is defined by
From these definitions we obtain
p(k) =J1.(k)g(k) , •...........••.•..•...... (C-6)
Zi =fLXi +fVYi, ...................... (B-6)
with J1. (k) chosen so that the functional C-4 with f(x)
fL = f v = 1 , ........................... (B-7) replaced by f(k) + J(k)p(k) is minimized.
JUNE 1983 529
It can be shown that the value of p, (k) that minimizes H(k+I) =H(k)

F[X(k)] = 1/2 [f(k) + p, (k) J(k)p(k)] T [&(k+ 1) _ H(k)[f(k+ I) -f(k)Jj& T(k)Hlk)


+------~~~--~--~-------
&T(k)H(k)[f(k+I) _flk)]
. [f(k) +p,(k)J(k)P(k)] ............ (C-7) ........................ (C-ll)

is given by A method using this updating scheme is called quasi-


Newton, and the final convergence is superlinear rather
than quadratic .
. . . . . . . . . . . . . . . . . . . . . (C-8)
e
The computation of in Eq. C-9 is given in the follow-
ing. Let ~ be the maximum norm of the correction vector
Although the steepest-descent method avoids &. Therefore, if
divergence, it converges very slowly near the solution.
Powell's hybrid method is a combination of a Newton- Ila(k)II~~, ........................... (C-12)
like method and the steepest-descent method. It has the
divergence-avoiding characteristic of steepest-descent e(k) is set to unity (a quasi-Newton step). Otherwise a
method and the rapidly converging property of the multiple of p is included in & in order to satisfy
Newton-like method near the solution.
Powell's algorithm computes a scalar e(k), o~e(k) Ilea+(l-e)PII=~· ..................... (C-13)
~ 1, that is used to define the step &(k) =x(k+ 1) -x(k) as
follows. Straightforward algebra gives for (j the expression

e=~ 2-IIPI1 2/[ra-p) Tp + [(a Tp _~2)2


+(llaI1 2_~2)(~2 -IIPI12)]'12). . ....... (C-14)
where elk) = 1 corresponds to the Newton-like method
and elk) =0 corresponds to the steepest-descent method. The ~ = 5 in all examples.
The Jacobian matrix J and its inverse H are computed
numerically at the beginning of the iteration and updated SI Metric Conversion Factors
at each step using rank-one matrices according to OF (OF-32)/1.8 °C
Broyden. I2
psi x 6.894 757 E+OO = kPa
f(k+I) _f(k) _J(k)&(k)&T(k)
J(k+I) =J(k) + [
. * Conversion factor is exact SPEJ
&T(k)&(k) Original manuscript received in Society of Petroleum Engineers office July 31,1979
Paper accepted for publication Aug. 19, 1982. Revised manuscripl received Feb. 7,
1983. Paper (SPE 8285) first presented at the 1979 SPE Annual Technical Can·
........................ (C-IO) ference and Exhibition held in Las Vegas, Sept. 23-26.

530 SOCIETY OF PETROLEUM ENGINEERS JOURNAL

Das könnte Ihnen auch gefallen