You are on page 1of 8

Approximate Flash Calculations for

Equatlon-of-State Compositional Models


Lon. x. H.M..... SPE, and Y.u-Kun U. SPE, Computer Modelling Group

..........". An approximate flash-calculation (AFC) method with an equation of state (BOS) is presented. The equations for AFC
are obtained by linearizing the thermodynamic equilibrium equations at an equilibrium condition called the reference condition. The
AFC equations are much simpler than the actual equations for flash calculations and yet give almost the same results. A procedure
for generating new reference conditions to keep the AFC results close to the true flash-calculation (TFC) results is described. AFC
is compared with TFC in the calculation of standard laboratory tests and in the simulation of gas-injection processes with a composi-
tional model. Bxcellent results are obtained with AFC in less than balf the original execution time.

Introcluotlon
Flash calculations with an BOS provide the most accurate and Because by definition
reliable method for phase~brium predictions in compositional ftc ftc
simulations. The high cost associated with BOS flash calculations,
however, can render compositional simulation prohibitive for E Ya.= E Yw=l, ............................ (4)
i-I i=l
systems with a large number of components.
As an alternative to direct BOS flash calculations, K-value tables let YrL and YTY be the dependent variables in ~e fugacity calcu-
can be generated from an BOS and table look-up is used during lations. Bxpanding InJiy in Taylor's series and keeping only the
the simulation. This method requires tedious data preparation as first-order terms yields
well as large storage requirements and usually cannot cover the
entire composition and pressure ranges encountered during a com- InJiy(yy,p,T)=InJiy(y~,p*,T*)
positional simulation.
This paper proposes a method for performing AFC in an BOS
context. The AFC method consists of solving a system of equations
+.E
n
c
(
aInJ..y
__ 1-)* (YjY-Y!y)
~=l ltyjy ytv,p*,T*
that are much simpler than the original equations for TFC. These }¢r I;¢j,r
equations can be readily obtained by linearizing the equations for
fugacities at an equilibrium condition called the reference condition.
Because-no additional correlation besides the BOS is involved, no 8 InJiY)*
+( - - (In p-Inp*)
further data matching is required after the BOS has been fitted to 8 Inp ytv,T*
experimental data.
The AFC method is tested against the TFC method in the calcu-
lations of standard laboratory tests and in the simulation of gas- 8 InJiY)* .
injection processes involving a reservoir oil and a gas condensate. +( - - (In T-In 1*), ,=1. .. nc . ........... (5)
The gas~ondensate example is taken from the Third SPB Com- 8 In T ytv,P*
parative Solution Project. I
Note that the expansion is in terms of In p and In T rather than p
AFC and T as in previous work on phase-behavior computation. 2-4
As shown in Appendix A, Eq. 5 can be more conveniently re-
Formulation and Equations. The equation for thermodynamic written as
equilibrium for a two-phase vaporlliquid system at a pressure p and
temperature T is
In fw(YY,p, T) =In Jiy(y~,p*, T*)
In/w(yy,p,T)-In/a.(YL,P,T)=O, ;=1. . .nc , •.•.•.... (I)
where lim = fugacity of Component ; in Phase m(m=L,V) andYL
and yy=compositions (in mole fraction) of the liquid and vapor
+ E
n
c 8 InJiy
( N y- - )* YiV
j=l 8Njy Ntv,p*,T*
phases, respectively. The fugacities lim can readily be obtained I;¢j
from an BOS. Eq. 1 is also valid for liquidlliquid equilibrium
systems .. In this case,lw denotes the fugacity of Component; in
the second liquid phase. 8 InJiY)*
+( - - (lnp-Inp*)
The global mole fraction Zi is related to Ya. and YiV through 8lnp N*kV' T*
zi=FLYa. +FJ/Yw, j = 1. . . nc, ....................... (2)
with FL and Fy=the liquid- and vapor-phase mole fractions, re- 8 InJiY)*
spectively. By definition, +( - - (In T-ln T*) . ..................... (6)
8 In T Ntv,p*
FL +Fy=1. ...................................... (3)
The AFC concept corresponds to determining Ya., Yw. FL. and In Eq. 6, the differentiation was carried out with respect to the mole
Fy given Zi' p. and T, knowing the equilibrium results of a TFC numbers Njy rather than the composition YjY as in Eq. 5. As shown
at a reference condition denoted by a superscript asterisk; i.e., Y/! in Appendix A, the mole numbers Njy and the total mole number
and yfy, zt p*, and T*. The equations for AFC are obtained by in the vapor phase, Ny, are irrelevant as long as they give the same
a local expansion of Eq. 1 around Y/!, yfy, p*, and T*, as shown vapor compositionYjY' Note that Yj*v is no longer required in Eq.
in the following. 6. This equation can be viewed as a simplified model for fugacity,
which is linear in YjY, In p, and In T. A similar expression can be
derived for the expansion of In/a. with respect to YjL' In p, and
Copyright 11190 Society of Petroleum Engineers In T.

SPE Reservoir Engineering, February 1990 107


Substituting the expansions of In/;y and In/a. in Eq. 1, and derivatives of gj with respect to nkY take a relatively simple form:
taking into account that
In/;y(y~,p*,T*)-In/a.(Yl,p*,T*)=O, ; =1 .. . nc ...... (7)
agj )
( --
a In/;Y)* -
=1- [(Ny--- ~
i.J
a In/;Y)*YjY
( Ny--- J
onkY n,v Fy aNky j=1 aNjy
s~k

nc
E ( aIn/a.)*YjL,]
NL--
aNjL
[( aalnp (a j=1
+ -In/;Y)*
- - -In/a.)*]
- (lnp-Inp*)
alnp ;=1. .. ne; k=l. .. nc' ........................... (14)

Withnw known, all the variablesya., Yw, FL, andFycan bedeter-


+ [( aaIn/;Y)*
In T
(a In/a.)l(In T-In T*)=O, ;=1. . .nc·
- a In T mined in a straightforward manner from Eqs. 9 through 11.
Alternatively, the na. can be taken as the independent variables
and nw as the dependent variables. It can easily be shown that
..................................... (8)
(agj/an/rL) nsL =-(agj/ankY) naY' .................. (15)
For notational convenience, all the symbols denoting the variables s~k s~k
that are held constant in the partial differentiations have been
dropped. Eq. 8 represents the equilibrium equation for APC. Other variables, such as FL and Ya. (;=1. . .n c -l) or Fy and
Together with Eqs. 2 through 4, it allows the determination ofya., Yw (;=1. .. nc -l), in the Newton's method of Fussell and
Yw, FL , and Fy given Zj, p, and T. Yanosik7 can also be used to solve Eq. 8.
The APC method proposed in this report is related to the extrap- An alternative formulation of APC's that corresponds to the
olation procedures of Michelsen2 and Mehra et aI. S APC is for- linearization of the EOS K values is described in Appendix B. br
mulated quite differently from these methods, however, and is used this paper, all APC's are performed by solving Eq. 13 for nw with
to achieve a different objective. Michelsen and Mehra et al. used Newton's method.
extrapolation to estimate the initial guesses for a new calculation
from the results of a previous calculation. The extrapolated variables Reference Conditions. Let Ya. and YiV be the phase composition
are still quite different from the actual solution, and the extrapo- from an APC at a pressure p and temperature T. If an APC is per-
lation may not apply for large variations in pressure, temperature, formed at the same p and T but at any global composition that
and composition. satisfies
In the APC method, Eq. 8 is intended to replace Eq. I in flash
calcuIations rather than to be just an extrapolation equation. As will
zj=(I-f)ya. +lYw, O<t< 1; ;=1. .. nc , ............. (16)
be demonstrated later, the results obtained match the exact flash we obtain the same Ya. and Yw for phase compositions and F y= t
calculation results very well, even for large changes in pressure, for vapor mole fraction. Hence, APC gives consistent results along
temperature, and composition. any tie-line. Furthermore, if the phase compositions in Eq. 16 are
at reference conditions (i.e., yit and yty), the APC results and the
Solution Method. Given Zj, p, and T, Eqs. 2 through 4 and 8 rep- TFC results are identical.
resent a system of (2n e +2) equations with (2n c +2) unknownsYa., The primary application of APC is in compositional simulation
Yw, FL, and Fy. However, only the nc equations (Sq. 8) need to where a large number of phase-behavior calculations are required.
be solved simultaneously, as shown below. Following Ref. 6, we During a simulation, one reference condition may not be able to
introduce the variables cover the whole range of pressure, temperature, and composition
that will be encountered. The following procedure is therefore used
na.-FLYa., ;=1 .. . ne ........................... (9)
to generate new reference conditions to enhance the accuracy of
and nW-Fyyw, i=l. .. n e , .......................... (10) the APC method.
First, the components are grouped into pseudocomponents.
which are the moles of Component; in the liquid and vapor phases Usually, three pseudocomponents are used-e.g., Cit C2 through
per mole of feed, respectively. By definition, we have C s, and C6+ for a hydrocarbon-gas injection process or CO2, C 1
through C s , and C 6 + for a C02 injection process. Let
Zj=na.+nw, ;=1 .. . ne ........................... (11) ik (k=I,2,3) be the global composition of these pseudocom-
ponents. A new reference condition is created by performing a TFC
nc at Zj. p, and T whenever one of the following conditions is
and Yim =nim IE njm,; = 1 ... nc: m =L, V. .. ......... (12) satisfied:
j=1
'ik-if'>~imax' k=I,2,3, ........................ (17)
Insertion of Eq. 12 into Eq. 8 gives ,p-p*, >~max' ................................. (18)
~ ( Ny -
gj- i.J a In/;y)*(njY)
-- -- -
~
i.J
(N -
L
0 In/a.)*
--
and 'T-T*'>~Tmax' ............................... (19)
j=1 aNjy Fy j=1 aNjL ~imax' ~max' and .:1Tmax correspond, respectively, to the al-
lowable variations in composition, pressure, and temperature from
reference conditions, the values of which will be discussed later.
x ( -njL) + [(a-In/;Y)*
- - (a-In/a.)*]
- (lnp-Inp*) The storage requirement for each reference condition with
FL alnp aInp ; =1 .. . nc' j=I ... n e, and m=L,Vis
N:,(a In/;m1aNjm)* nc(ne+1) elements
aIn/;y aIn/a.
+ [( a In T )* ( - a In T )*] (In T-In T*)=O, ;=1. . .nc· (a In/imla In p)*
(0 In/;m1a In T)*
2nc elements
2ne elements
.................................... (13) if, k=I,2,3 3 elements
p* 1 element
Eq. 11 enables the na. to be treated as the dependent variables so
that Eq. 13 can be solved for the nw with Newton's method. The T* 1 element

108 SPE Reservoir Engineering, February 1990


TABLE 1-01L F COMPOSITION AND COMPONENT PROPERTIES

CompOSition Pc Va Ta Acentric Molecular


Component (mol%) (atm) (cm 3 /mol) K Factor Weight
---
C 1 • N2 42.28 45.31 99 190.1 0.0082 16.136
C 2 • CO 2 11.66 52.85 134 305.1 0.1300 33.585
C3 • C4 10.06 39.81 225 391.3 0.1666 49.870
Cs 2.66 33.35 305 465.4 0.2401 72.151
C e through C 12 19.09 27.27 463 594.5 0.3708 123.160
C 13 through C 21 10.25 17.63 820 739.7 0.6151 225.880
C 22 + 4.00 10.34 1416 886.2 1.0501 515.650

TABLE 2-COMPARISON OF FLASH CALCULATION RESULTS FOR OIL F AT 90°C

Volume Percent of Liquid Phase


AFC With Various Reference Conditions
Pressure TFC 20 MPa 20 MPa 20 MPa 20 MPa 20 MPa 16 MPa 18 MPa
(MPa) at 90°C and 60°C and 75°C and 90°C and 105°C and 120°C and 90°C and 90°C
10.0
---
53.86 53.84 53.09 52.39 51.66 50.87 53.14 52.85
12.0 63.18 63.83 62.93 62.25 61.55 60.79 62.84 62.55
15.0 75.58 76.08 75.65 75.22 74.70 74.03 74.56 75.42
18.0 86.44 86.51 86.49 86.38 86.12 85.65 86.34 86.44
20.0 93.11 92.73 93.00 93.11 92.99 92.60 92.72 93.04
21.0 96.36 95.69 96.12 96.34 96.29 95.94 95.73 96.18
22.0 99.58 98.61 99.19 99.52 99.53 99.21 98.65 99.25
22.1 99.91 98.89 99.50 99.84 99.85 99.54 98.93 99.56
22.2 100.00 99.18 99.80 100.00 100.00 99.86 99.22 99.86
23.0 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00
Calculated saturation
pressure. MPa 22.129 22.475 22.253 22.149 22.137 22.231 22.462 22.235

The total storage required for each reference condition is therefore Example.
n c (n c +5)+5. Note that the symmetry of the partial derivatives on F-Constant-Composition Expamion. Table 1 gives the com-
N:,(a Infim/aNjm)* (Eq. A-12) has been used in evaluating the position and component properties of a reservoir oil referred to as
storage requirement. In compositional simulation, the reservoir tem- Oil F. The properties of the first two components are slightly
perature is usually constant. Hence, (3 lnJim/a In T)* and T* need different from the data for C and C reported in the literature
1 2
not be stored, and the storage requirement per reference condition (e.g., Ref. 9) because traces ofN2 and CO have been respectively
2
reduces to nc (nc + 3) +4 elements. lumped into these components in a separate study. The interaction
In a simulation run, storage for 20 reference conditions is usually coefficients, d jj , between Components i andj of Oil F are com-
reserved. These reference conditions are generated during the simu- puted from
lation whenever one of the conditions in Eqs. 17 through 19 is
satisfied. When the number of reference conditions has reached the d jj =1-[2V}VCJ~/(V J+ Vc1)] 6, ........••..•.•...•. (20)
maximum value (i.e., 20), and a new reference condition is required,
the reference condition that has not been used for the longest time where a value of 0 = 1.5102 was found to match the experimental
will be replaced by the new condition. This can easily be achieved bubblepoint pressure of 22.233 MPa at 92.2°C [3,225 psia at
by having an integer flag for each reference condition. If any par- 198°F].
ticular reference condition is used, its flag is set equal to the current The ability of AFC to predict saturation conditions and to cross
timestep number. The reference condition that has the lowest flag phase boundaries was first tested by performing a series of flash
value will be replaced when the number of reference conditions calculations with Oil F at different pressures and 90°C [194°F].
reaches the maximum value. In this approach, reference conditions Different reference conditions were also used to study their effect
are carried over many timesteps. All the simulation runs described on the results. Those conditions were obtained by flashing Oil F
in the next section use this method. We also tried another approach at the pressures and temperatures indicated in Table 2, which shows
in which reference conditions for a particular timestep are generated the change in volume percent ofliquid with pressure in a constant-
during the iteration of that timestep. However, we have found no composition expansion. Also shown are the calculated bubblepoint
advantage to this second approach in our test runs. pressures under the various reference conditions. The extension of
For any set of Zj. p, and T that do not satisfy Eqs. 17 through the AFC concept to saturation-pressure/temperature computations
19, the reference condition that yields the minimum value of the sum is described in Appendix C. Below the bubblepoint pressure in the
nc

k~l 1:i~ 1+1 :;:~ 1+1 :;:~ 1


two-phase region, AFC yields Fv=E niV between zero and unity,
i=1
whereas above the bubblepoint pressure, a value for F v < 0 is ob-
tained. The same reasoning applies to dewpoint fluids where F v
will be selected for the AFC. This test for selecting the reference lies between zero and unity in the two-phase region and F v> 1
conditions is performed only once for each gridblock per timestep. above the upper dewpoint (Le., single-phase gas). The results in
During the iteration of any particular timestep, each gridblock will Table 2 show that AFC yields accurate bubblepoint pressure pre-
access the reference condition that has been assigned to it previously. dictions for Oil F even for reference pressures and temperatures
The AFC method will be demonstrated in the examples that quite remote from the saturation conditions.
follow. In these examples, AFC is compared with TFC in standard To study the sensitivity of the results to changes in reference con-
laboratory experiments and compositional simulations. The Peng- ditions further, flash calculations were performed with Oil Fat 18.0
Robinson EOS8 is used in all calculations. MPa and 90°C [2,611 psia and 194°F] while the reference pressures

SPE Reservoir Engineering. February 1990 109


Reference pressures for AFC2
REFERENCE TEMPERATURE (OC) 200 --TFC
~0r-___~~__~100~__~1T~~~2,OOr-__~2~r-__~~
o o AFC1
~
It:
- - - - AFC2

90 ...J;)
OE
Il!
Q ~~100
5ao (!)E
o Zog
:J 0-
t="!!
lL. ~
070 ...J
o
!z (/)

'"ffi60
o
5 10 15 20 25
Q.
PRESSURE (MPa)
--p-
'"~~ ---T- Fig. 2-011 F-solutlon GOR from differential liberation at
90°C•
g ••••• TFC

The solid curve shows that excellent agreement was obtained be-
40
tween the APC and TFC runs. In Run AFCl, no gas evolved when
the pressure dropped from 2.859 to 1.377 MPa [414.6 to 199.7
psia) in the differential-liberation process, which shows that with
5 W ~ ~ ~ 30 an single reference condition at 12.0 MPa [l,74Opsia], APC could
not predict the very low pressure conditions in the differentialliber-
REFERENCE PRESSURE (M Po)
atioo adequately. For pressures higher than 2.859 MPa [414.6 psia],
Fig. 1-Effect of reference conditions on the calculated liq-
however, the AFCI results are excellent. Because new reference
uid volume percents for 011 F at 18 MPa and 90·C. conditions were used, no problem was encountered with Run APC2
at 2.859 MPa [414.6 psia].
and temperatures were varied. The calculated liquid volume percent Oil F-ID Simulation. The AFC method was implemented in an
is depicted in Fig. 1. The dotted curve corresponds to the TFC re- BOS compositional model described in Refs. 10 and 11. A simu-
sults of 86.44 %. The solid curve represents the changes in liquid lation of a CO2 displacement with Oil F was carried out. A 10
volume percents obtained by keeping T*=90°C [l94°F] and reservoir was selected to allow an accurate comparison between
varyingp*. The dashed curve, on the other hand, shows the changes TFC and APC methods. The porous medium has the same charac-
in liquid volume percents resulting from keeping p*=18.0 MPa teristics as the slim tube used in Ref. 12 except for the permea-
[2,611 psia) and varying T*. The results again show that p and bility, which was assigned a value of 101 md to create a sizable
T can be appreciably different from p* and T* without affecting pressure drop. The properties of C02 are taken from Ref. 9, and
the accuracy of the calculations much. the interaction coefficients between C02 and Oil F components
shown in Table 1 are, respectively, 0.100, 0.130, 0.139, 0.125,
on F-DUrerential Liberation. A differential-liberation test at 0.120, 0.120, and 0.121.
90°C [194°F] was performed with Oil F by use of both the TFC The porous medium was initially at 20.0 MPa and 92.2°C [2,901
and APC methods. The computed solution GOR's, Rs, are psia and 198°F]. The bubblepoint pressure at this temperature is
depicted in Fig. 2. In Run APC1, represented by the circles, a 22.233 MPa [3,225 psia], as mentioned earlier. C02 was injected
reference condition was created by flashing Oil F at 12.0 MPa and at a constant rate of 120.29 cm3 /d and the fluids were produced
9O·C [l,740 psia and 194 oF] and was used for the entire differential- at a constant pressure of 20.0 MPa [2,901 psia]. The values of
liberation calculation. In Run APC2, an initial reference condition .:1imax and 4pmax in Eqs. 17 and 18 are 0.10 and 300 kPa [43.5
was generated by flashing Oil Ii at 20.0 MPa [2,901 psia). As the psia], respectively. The pseudocomponents used to evaluate ilc are
pressure decreased in the depletion process, new reference con- CO 2, C 1 through C4 , and CS+'
ditions were formed at the pressures marked by the downward The simulation was carried out for 100 fixed timesteps of 0.01
arrows with the corresponding feed compositions. days. Figs. 3 and 4 show the gas saturation profiles and the C02

1.0r~~-,,--:.....
::::-:::_ __ 100 666~~OO6>O60~6~
........
. . ,'tI.
o
z 0.8 Z
~

I.LI
(.)
80
,
~

fi 0.6
It:
I.LI °
\
'\
It:
a.. 60
~ 014
(I)
0
I.LI
...J
40 AFC TFC " \
~
\
\\
~ - - TFC :::E Vapour
"
C) 0.2 ---- AFC 0
N
(.)
20 Liquid 0
\
\
.
0.0 0

Fig. 3-011 F-gaa aaturatlon profile at 81.93% PV CO 2 In- Fig. 4-011 F-C0 2 vapor and liquid composition at 81.93%
Jected. PV CO 2 Injected.

110 SPE Reservoir Engineering. February 1990


TABLE 3-GAS CONDENSATE SPE-3 COMPOSITION AND COMPONENT PROPERTIES

Composition Pc Vc Tc· Acentric Molecular


(cm 3 /mol) ~
Component (mol%) (atm)
-Factor
-- Weight
C t , N2 67.93 40.00 99 194.4 0.0130 16.043
C 2 , CO 2 9.90 48.20 148 305.4 0.0986 30.070
C3 5.91 42.01 200 369.9 0.1524 44.097
C4 5.17 37.47 255 425.2 0.2010 58.124
Cs 2.69 33.31 311 469.6 0.2539 72.151
Cs 1.81 29.92 368 507.9 0.3007 86.178
C 7 through C 9 3.99 26.25 466 573.4 0.3613 114.430
C to through C tt 1.22 23.18 569 637.8 0.4501 144.830
C t2 through C t4 0.80 19.99 690 685.8 0.5339 177.780
C ts + 0.58 12.55 965 748.3 0.7244 253.630
Interaction coefficient between 0, and 0'5+ -0.247. all others zero.

liquid and vapor composition profiles, respectively, at Timestep Gas Condensate SPE-3-Simulation of a Cycling Process. The
100. This timestep corresponds to 81.93% PV of C02 injected. simulation of a cycling process corresponding to Case 1 of the Third
An excellent match between AFC and TFC results was obtained, SPE Comparative Solution Project was carried out with both TFC
as Figs. 3 and 4 show. This result occurred throughout the simu- and APC methods. A 9x9x4 grid was used to model the reservoir.
lation. For the entire simulation, the execution time ratio between For the AFC run, the values of 4imax and Apmax in Eqs. 17 and
the TFC and AFC runs is 3.25. 18 are 0.1 and 344.7 kPa [50 psia], respectively. The pseudocom-
ponents used to evaluate ik are C l, C 2 through C s , and C6+' To
Gas Condensate SPE-3-Constant-Volume Depletion. The
enhance the accuracy of the AFC run, TFC was always performed
second fluid used to test the AFC method is the gas condensate de-
in the wellblocks during the simulation.
scribed in the Third SPE Comparative Solution Project, referred
Figs. 6 and 7, respectively, show the stock-tank oil rate and cu-
to as Gas Condensate SPE-3. Table 3 shows model fluid compo-
mulative production vs. time. The differences in oil rate for both
sition and component properties of the gas condensate. Small
methods are small, and the cumulative oil productions are almost
amounts of N2 and CO2 in the real fluid analysisl have been
identical (the error is < 1 % throughout the simulation).
lumped into C l and C2, respectively.
The average oil saturation of Layer 3 is depicted in Fig. 8. The
The measured dewpoint pressure of Gas Condensate SPE-3 is
AFC and TFC results agree well except for the second year, where
23.74 MPa at 93.3°C [3,442.7 psia at 200°F]. A constant-volume-
the AFC result is slightly higher. Similar results were obtained for
depletion experiment was carried out with intermediate pressure
the other layers.
levels of 20.79, 16.65, 12.51, 8.38, and 4.93 MPa [3,014.7,
For the IS-year simulation, the TFC and AFC runs took 200
2,414.7, 1,814.7, 1,214.7, and 714.7 psia].
timesteps with an execution time ratio of 2.4: 1.0. The increase in
Fig. 5 depicts the retrograde condensation with different methods.
speed is a result of the smaller execution time for AFC compared
The predicted dewpoint pressure is 23.69 MPa [3,436.4 psia]. In
with TFC. J10r a lO-component syslem, AFC is about twice as fast
Run AFCl, a single reference condition was used for the entire
as TFC because no fugacity calculations are required.
process. This reference condition is obtained by flashing the gas
condensate at 20.79 MPa and 93.3°C [3,014.7 psia and 200°F],
which correspond to the ftrst step of the constant-volume-depletion Remarks. The simulation runs corresponding to a CO 2 injection
process. In Run AFC2, an extra TFC was carried out at 12.51 MPa into an oil reservoir and the cycling of a gas-condensate reservoir
[1814.7 psia] during the depletion process to create a new reference show that the APC method yields results that are close to the TFC
condition. All AFC's below that pressure used this latter reference results in 31 and 42% of the TFC execution time, respectively.
condition. These runs correspond to an 8- and lO-component system, respec-
The results show that the use of one single reference condition tively.
at 20.79 MPa [3,014.7 psia] does not reproduce the TFC results The advantages of the APC method lie in the adequacy of the
accurately. An intermediate reference condition at 12.51 MPa method to predict good saturation pressures and in its compatibility
[1,814.7 psia] greatly improves the predictions. Note that Run APCl with TFC. This latter property is extremely important if AFC and
also gives a retrograde condensation behavior, and although it is TFC are to be used simultaneously. If the AFC results are not close
not as good as Run AFC2, the predictions are still acceptable. to the TFC results, convergence difficulties and oscillations will

30 1200
TFC
AFC

;e
e..
20 0
...... 800
-..
>•
II)
~
f/)

...... I.LI

>
'0
10 --TFC
~
0:
400
-.-.- AFC1 ..J
......... AFC2 0
o Reference conditions for AFC2

o 1000 2000 3000 4000 o 8 16


PRESSURE (psia) TIME (years)
Fig. 5-Gas Condensate SPE-3-mrograde condensation dur-
Ing constant-volume depletion at 200°F. Fig. 6-Gas Condensate SPE-3-stock-tank 011 rate.

SPE Reservoir Engineering, February 1990 111


0.2
3X106 TFC

-
III
~
0
TFC
AFC
AFC

en z
...J
0
(5 ~
!oJ
a::
~
> 0.1
!;i
~
...J
en
...J
~
2; (5
~
0

o 8 12 16
o 4 8 12 16 TIME (years)
TIME (years)
Fig. 8-Gas Condensate SPE-3-average 011 saturation of lay-
Fig. 7-Gas Condensate SPE-3-stock-tank 011 produced. er 3.

occur when we switch from TPC to APC during the iteration of processes. The use of AFC in a compositional simulator reduces
the pressure equation in a compositional simulation. the execution time by more than 50%.
It has been found that the differences between TFC and AFC re-
sults are more pronounced in the retrograde regions of gas con- Nomenclature
densates. Prom experience, we suggest a value of ~imax == 0.10 dij = interaction coefficient between Components i and j
and J1pmax == 350 kPa [== 50 psia] for the generation of new .tim = fugacity of Component i in Phase m (m=L,V)
reference conditions in a simulation. Although aTmax is not used Fm = mole fraction of Phase m (m=L,v)
in this study, a value of 30°C [86°F] is recommended for other gj = defined in Eq. 13
applications where temperature is not constant. Whenever a mixture
is in the single phase, it is preferable to apply the stability test
g = defined in Eq. B-7
Gv = total Gibbs free energy of vapor phase
procedure in Ref. 3 or 13 to determine whether the single-phase
K j = K value for Component i
mixture is stable. This procedure will reduce ripples in the satu-
ration proftles.
L = length of ID reservoir
It can happen that some nkV are negative or greater than Zk after nc = number of components
an AFC, while F v is between zero and unity. This situation occurs nim = mole number of Component i in Phase m per mole
when the TFC gives very small phase compositions for those com- of feed (m=L, V)
ponents or when the reference condition is remote from the flash N im = mole number of Component i in Phase m (m=L,V)
conditions. If nkV< 0, nkV and nkL are set to zero and Zh respec- N m = total mole number in Phase m (m=L,V)
tively, in Eq. 13 and gk is removed from the equation set. The re- p = pressure
duced system of equations is then solved to convergence for the J1pmax = maximum pressure change allowed from a reference
remaining niV (ij1tk). The whole procedure is repeated until all niV condition
are. between zero and Zj (two-phase results) or until Fv<O or R = universal gas constant
F v:> 1 (single-phase results). If nkV> Zk, nkV and nkL are set to Zk Rs = solution GOR
and zero, respectively, in Eq. 13 and the same process is carried out. T = temperature
The AFC method is based on the first-degree expansion of the ~Tmax = maximum temperature change allowed from a
logarithms of the component fugacities. The accurate results ob- reference condition
tained with APC suggest that the errors introduced by replacing Vcj = critical volume of Component i
In.tivand lnfiL by their respective series (Eq. 5) cancel each other x = gridblock coordinate
when the series are substituted in the equilibrium equation (Eq. 1). Yim = mole fraction of Component i in Phase m (m=L,v)
Note that in the APC method, only the logarithms of the fugacities Ym = composition of Phase m, mole fraction (m=L, V)
are linearized, whereas in Michelsen's2 and Mehra et al. 's5 ex-
Zj = global mole fraction of Component i
trapolation procedures, all equations for equilibrium calculations
are linearized. As mentioned earlier, the APC approach is equivalent
ik = global mole fraction of Pseudocomponent k used to
generate new reference conditions
to replacing the EOS fugacity expressions by simpler equations.
~imax = maximum composition change allowed from a
reference condition
Conclusions
~ij = Kronecker delta (=0 if jj1tj; =1 if i=j)
This paper presents a method for performing AFC with an EOS.
The AFC equations are obtained by linearizing the equilibrium
r
= defmed in Eq. 16
8 = parameter used in Eq. 20 to calculate interaction
equations at a reference point. A linearized form that is efficient
coefficients
from both computation and storage aspects is proposed.
rPim = fugacity coefficient of Component i in Phase
The AFC equations are much simpler than the TFC equations
m (m=L,v) .
and yield results that match TPC results very closely. A procedure
is given to generate new reference conditions so that the AFC and
TFC results are close at all times. The AFC method is fully com- Subscripts
patible with TFC and does not require additional matching once c = critical
the EOS has been fitted to experimental data. Appendix C shows iJ,k,
that the APC concept can be extended to calculating bubblepoint r,s = indices for components
and dewpoint pressures (or temperature). L = liquid
The results obtained show excellent agreement between AFC and m = index for phases
TFC in the simulation of standard laboratory tests and gas-injection V = vapor
112 SPE Reservoir Engineering, February 1990
Supenctlpt Taking into account Sq. 4, the above equation can be rearranged
* .. reference condition to give

AoIcno......1MIIt "c (a-InJjy)


E - (YjY-YJY)
This work was supported by the Members of CMG. ~-1 8yjY 'fy,p*,T*
)'Ilr Ic'llj,r
.........0 ••

- -)*
1. KmyoD. D.B. IIId BdIie, A.: "Tbird SPE Comparative Solution Project: c a InJjy
au Cyq of Retrograde CODdeDaate Reservoirs," JPT(Aug. 1987) =.E /I [( (YjY-YJY). . ............ (A-3)
981-97; Thmr., AIMB, '1Jf1. )-1 8yJY ,fy,p*,T*
2. MicbeIIeo, M.L.: "C.JenJatjon ofPbue Bnvelopes IIId Critical Points," k'llj
Fluid Phase Equilibria (1980) 4, 1-10.
3. NgbiIm, L.X.1IId Li; Y.K.: "Computation ofMultipbue Equilibrium The right side of Sq. A-3 corresponds to the second form of the
PbIIIomeaa With In Equation of State," Fluid Phase EqIIilibria (1984) expansion of In Jjy with respect to composition. It shows that, be-
17,77-95. cause of the summation, all YlcY (k= 1 ... ne) can be treated as in-
4. NgbiIm, L.X., Li, Y.K., IIId Heidemann, R.A.: "Application of dependent variables in the differentiation.
TIIIpIIl PIIDe Criterion to SIturItion Pressure and TeDlpClIItIn Com- Another equivalent expansion, which is more efficient, is de-
putItiona," Fluid Phase Equilibria (1985) 21, 39-60. scn"bed in the following. Let N;y be the moles of Component i in
5. MdIra, R.K., Heidemann, R.A., and Aziz, K.: "Computation ofMul- the vapor phase and Ny be the total moles of vapor-i.e.,
tipbae Bquilibrium for CompoaitionIl Simulation," SPEl (Feb. 1982)
61-68. "c
6. NaJUem, L.X., Aziz, K., and Li, Y.K.: "A Robust Iterative Method Ny= E N iy . . ................................ (A-4)
for Flash CIlcuIItions Using the Soave-Redlich-Kwong or Peng- i-I
RobiDson Equation of State," SPEl (June 1983) 521-28.
7. Fus8eIl, D.D. and YIIlOIIik, J.L.: "An Iterative Sequence for Pbase- By definition, we have
Bquilibria Calculations IncorporatiDg the Redlich-Kwong Equation of
State," SPEl (June 1978) 173-82.
Ysy=NsylNy, $=1 .. . ne' ........••............... (A-5)
8. Peng, D. Y. and RobiDson, D.D.: "A New Two-CODStIDt Equation of
State," hrd. cI Eng. Oaem. Fund. (1976) 15, 59-54. Differentiating Sq. A-5 with respect to Njy gives
9. Reid, R.C., Prausnitz, J.M.,and Sherwood, T.K.: '1'M Properties of
Gases tllldLiquids, third edition, McGraw-Hill Book Co., New York 8yav) 1
( -- =-(8sj-Ysv), $=1. . . ne; j=l. .. ne, .. (A-6)
City, 629-65.
10. NgbiIm, L.X., Fong, D.K.,and Aziz, K.: "Compositional Modeling aNJv /ltY Ny
With In Equation of State," SPEl (Dec. 1981) 687-98. k'llj
ll. NgbiIm, L.X.: "A New ApproIch to Quasi-Newton Methods W"rth Ap- where 8 . is the Kronecker delta.
plicltion to Compositional ModeliDg," paper SPB 12242 presented It
the 1983 SPB Symposium on Rcaervoir SimuIItion, San FI'IIICisco, Nov.
Acco~g to chain-rule properties, the partial derivatives of
16-18. In Jjv with respect to Njv are

_ E(a In/;v)
12. Nghlem, L.X. and Li, Y.K.: "Effect of PbIse Behavior of CO2 Dis-
pIIcement Bfticiency It Low Temperatures: Simulation Studies With
(
a In/;y) (8ySy)
In Equation of State," SPERE (July 1986) 414-22.
13. Michelsen, M.L.: "The Isothermal Flash Problem I. Stability," Fluid aNjy Nty,p,T a-I 8ysv 'ty,p,T aNjv Nty
Phase Equilibria (1982) 9, 1-19. Ic'llj Ic'lls Ic'llj
14. Modell, M. and Reid, R.C.: '1'Mrmodynomics and Its Applications, ................................... (A-7)
Prentk:e-HIll Inc., BDglewood Cliffs, NJ (1974) 124.
App.ndIx A-.cpdv...... 1Ixt........ of Fu....... Substituting Sq. A-6 into Sq. A-7 gives
By using chain-rule properties and Sq. 4, we can write

(a In/;v) =(aIn/;v) _(a In/,v)


N~ aInhY)
aNjy Nty,p,T
=c In/;v) 8yjY 'ty,p,T
8yjV 'ty,p,T 8yjy Yty,p,T 8yrV 'ty,p,T Ic'llj Ic'llj
Ic'llj,r Ic'llj Ic'llr.
"c
- E YsV - -
(a In/;v)
....................... (A-8)
................................... (A-I) s-l 8ysv 'ty,p,T
Ic'lls
Note that in the left side of Sq. A-I, Yr is the dependent variable,
Note that the right side of Sq. A-8 depends only on the compo-
whereas in the right side, all YlcY (k= I .. .ne ) are taken as in-
sition YlcV (k = 1. .. ne) and not on the mole numbers
dependent variables.
Nlcv (k=1. .. ne ) and Ny. Therefore, these mole numbers are ir-
The summation in Sq. 5 can therefore be rewritten as (first form
relevant as long as they yield the same composition YkV'
of the expansion of Infw with respect to composition)
If Sq. A-8 is evaluated at reference conditions (Ntv, ytv, p*,
"c
E (a-;:-
In/;v) (YjY-YJY)
and T*), multiplying both sides of the equation by (YjV-Y!v) and
summing over all components give
j-l "JjV ,fy,p*,T*
j'llr Ic'llj,r

_( a In/;y
8yrv
Y ,fy,p*,T*
](YjY-YJY) • .................. (A-2) .•...... (A-9)

Ic'llr
SPB Reservoir Engineering, Febl'WlrY 1990 113
Because YjV and Yj" are mole fractions, it follows that ~j •
YiL= .1=1. .. ne • .................. (B-5)
"C lie lie [1 +(Kj-I)Fv ]
E (YjV-ylv)= E YjV- E Ylv=O . .......... (A-lO)
j-I j-I j-I KjZ j
and Yw • i=1. . . ne' ................ (B-6)
Let Gv be the total Gibbs free energy of the vapor phase. It can [1 +(Kj-I)Fv]
be shown that
Proceeding as before, the following alternative form of the ap-

(
a lnfiv)* ra [aGvl(RT)] 1* proximate equilibrium equation can be derived.

aNjv Ntv,p*,r* =t aNjv aNw N,v,p,r J Ntv,p*,r*


Kj-In K;-In Kt+
tIc
E (
Nv
a In <f>'V)*
I YjV
Ic~j s~j Ic=j
j=1 aNjv
............•.....•............... (A-II)

+ ~
LJ
( NL a In <f>iL)*YjL+ [(a In <f>iV)*
Reversing the order of differentiation in the right side of Eq. A-II
gives j=1 aNjL a In p

( a lnfiv)* =(a In.fjv)* ........... (A-12) - ( a In <f>iL)*] (In p-In p*)+ [(a In <f>w)*
aNjv Ntv,p*,T* aNw Ntv,p*,T* alnp aInT
Ic~j Ic~j

Furthermore, from the Gibbs-Duhem equation,14 we have


a In <f>iL
-( a In T) *] (In T-ln T*)=O. ;=1 .. . nc • ......... (B-7)

tIc
E Yj
*~a-lnfiv)*
- =0 ................... (A-13)
jzl aNjv Nlv,p.,T. where the. Kt are the K values at the reference condition-Le .•
lcJ4j K{ayfvly£. i=1. .. nc . .......................... (B-8)
Eq. A-9 can then be simplified with Eqs. A-IO, A-I2, and A-13 Eq. B-7 can be viewed as a simplified K-value model that is linear
to the final expression in YjL. Yjv. In P. and In T. Together with Eqs. B-4 through B-6,
it provides an alternative set of equations for AFC.
" (N v-
E
c

j=1
-)*
a lnfiv
aNjv Ntv,p.,T*
YjV Appendix C-Exten.lon of AFC Concept to
SaturaUon.Pre••urelTemperature Computation
lcJ4j
The extension of the AFC concept to saturation-pressure/temper-
tIc (a lnJw)* ature computations is straightforward. For instance, in bubblepoint
=.E -- (Yjv-ylv) . ............. (A-I4)
J =I UyjV Ntv,p·,T· pressure calculations, the YiL are set equal to Zj, and Eq. 8 is solved
together with
Ic~j
tIc
The left side of Eq. A-14 represents the third form of the ex-
pansion of In JiV with respect to Yjv. This expansion is the most E Y;v=1 .................................... (C-I)
;=1
efficient from both computation and storage aspects. Because of
the symmetry of the differentiation in Eq. A-I2, we differentiate foryw andp. As an alternative, Eqs. B-4 and B-7 with Fv=O can
In fiv analytically with respect to Njv directly rather than using the also be solved for these unknowns. Any of the algorithms described
chain rule in Eq. A-8. Hence, only ne(n e + 1)12 elements are com- in the literature can be used to solve these equations.
puted and stored. Furthermore, Ylv need not be saved. Note that Eq. 13 is not dermed for either Fv=O or FL =0, and
Because all Ylcv are constant when all N1cV are kept constant, it therefore the variables nw or niL cannot be used for saturation-
follows that pressure/temperature calculations or for flash calculations right on
the saturation point. For conditions that are only slightly different
* * from a saturation condition, however, nw and niL behave properly.
( a lnfiv) =(a lnfiv) ............... (A-I5)
tIc
alnp NkV,T* alnp ylV,T.
The vapor mole fraction Fv= E nw is between zero and unity
j=1
and (a lnfiV)* =(a lnfiV)* ............. (A-I6) for pressures below the bubblepoint in the two-phase region, and
is less than zero for pressures above the bubblepoint. Similarly,
a In T NkV'P* a In T ylv,p.
All equations developed in this Appendix also apply in the ex- the liquid mole fraction FL = E niL is between zero and unity
pansion of lnJiL with respect to YjL' j=1
for pressures below the upper dewpoint pressure and less than zero
Appendix II-Altematlve Formulation for AFC for pressures above that dewpoint pressure. Note that FL <0 cor-
An alternative form of the equilibrium equation (Eq. 1) is responds to F v> 1 and vice versa.

In Kj+ln <f>w(Yv.p,T)-ln <f>iL(YL.P.T)=O, i=I .. . ne, .. (B-l) SI Metric Conver.lon Factor.


where K j , the equilibrium ratio, is dermed as atm x 1.013 250* E+05 = Pa
Kj=y;vIYiL. i =I ... ne ........................... (B-2) bbl x 1.589 873 E-OI = m3
OF (OF-32)/1.8 °C
and <f>jm. the fugacity of Component; in Phase m, is given by OF (OF +459.67)/1.8 =K
<f>im=fim/(YjmP). i=1. .. ne; m=L.V. ............... (B-3) md x 9.869 233 E-04 = I'm2
psi x 6.894 757 E+OO = kPa
The following equations also hold 3 :
·Conversion factor is exact. SPERE
tIc [ (Kj-I)zj ] . Original SPE manuscript received for review Feb. 28, 1985. Paper accepted for publication
j~1 l+F (K -l) =0, ........................ (B-4) Sept. 7, 1989. Revised manuscript received July 26, 1989. Paper (SPE 13517) first presented
v j at the 1985 SPE Reservoir Simulation Symposium held in Dallas. Feb. 10-13.

114 SPE Reservoir Engineering, February 1990

You might also like