Professional Documents
Culture Documents
Increasing The Computational Speed of Flash Calculations With Applications For Compositional, Transient Simulations
Increasing The Computational Speed of Flash Calculations With Applications For Compositional, Transient Simulations
兺 a t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (1)
than that of a noncompositional table-based approach. The phase
amounts and properties must be evaluated in each cell or section in j = j i
i
i=0
each timestep. Furthermore, phase compositions are required to
calculate the interfacial mass transfer. Nevertheless, the increased
accuracy in the fluid description makes the compositional ap- In Eq. 1, j is composition, pressure, or temperature; aji are poly-
proach attractive to represent multiphase pipelines and reservoirs nomial coefficients; and t is the index for the timestep. The poly-
with large compositional variations. nomial coefficients describing the change in pressure and tempera-
ture for all timesteps (1 ⱕ t ⱕ 1,757) in the six-component, non-
Flash Equilibrium Calculations in Compositional, critical scenario, are given in Table 1a.
Transient Simulations The polynomial coefficients describing the change in compo-
The physical properties of a fluid in a cell or section depend on sition for timesteps above 944 in the six-component, noncritical
whether the fluid is present as a single phase or splits into several scenario are given in Table 1b.
equilibrium phases. A flash calculation is therefore required in In the initial part of the simulation (t < 944), the overall com-
each timestep to determine the number of equilibrium phases and position is constant and equal to the following:
their amounts and compositions. Even with relatively few mixture N2+CO2 : 3.6583 mol%
components, the computation time of a compositional, transient C1–C3 : 94.7852 mol%
C4 : 1.1024 mol%
C5–C6 : 0.3688 mol%
Copyright © 2006 Society of Petroleum Engineers C7 : 0.0758 mol%
This paper (SPE 84181) was first presented at the 2003 SPE Annual Technical Conference C8–C14 : 0.0095 mol%
and Exhibition, Denver, 5–8 October, and revised for publication. Original manuscript re-
ceived for review 29 October 2003. Revised manuscript received 6 October 2005. Paper
The critical pressures, critical temperatures, and acentric factors
peer approved 8 October 2005. of each component in the six-component fluid can be seen in
where yi and xi are the mole fractions of component i in the gas and
liquid phases, respectively. The Wilson K-factors are used to cal-
culate the first approximation to the phase split and the phase com-
positions x and y. Subsequent equilibrium factors are obtained from
li共p,T,x兲
Ki = . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4)
vi 共p,T,y兲
冉 冊
It should be noted that cubic equations of state with nonclas-
pci Tci sical mixing rules [such as that of Huron and Vidal (1979)] or new
ln KWilson
i = ln + 5.373共1 + i兲 1 − . . . . . . . . . . . . . . (2) equations of state [e.g., the Cubic-Plus-Association (CPA) equa-
p T
tion of state (Kontogeorgis et al. 1996)] are required for a satis-
In Eq. 2 pci, Tci, and i are critical pressure, critical temperature, factory description of multiphase flow in pipelines. In such sce-
and acentric factor, respectively, for component i. Ki is the equi- narios, both hydrocarbons and polar components, such as water
librium factor, and liquid hydrate inhibitors, are present.
冋 册
1. The phase is unstable [i.e., the mixture will form two phases
yi (Point A, Fig. 1)]. In this case, Eq. 7 will have one or two solutions
i = , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5)
yi + 共1 − 兲xi t−1 for which k is negative.
2. Exactly at the phase boundary (Point B). Here, one solution
and use these as initial estimates for the current timestep, t.
to Eq. 7 will be the trivial solution and the other a nontrivial
vi = ztii, li = zti共1 − i兲 , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6) solution (representing the composition of the incipient phase) with
a value of k equal to zero.
where vi and li are the molar amounts of component i in the vapor 3. In the single-phase region, but “close to” the phase boundary
and the liquid phase. With these initial estimates, successive sub- (Point C). One solution to Eq. 7 will be the trivial solution and the
stitution is skipped, and the simulation proceeds directly to second- other a nontrivial solution with a positive value of k. Increasing the
order Gibbs energy minimization. Most likely, convergence will distance from the phase boundary increases the value of k. This region
take place after one or two iterations. If this is not the case, or if will, in the following, be referred to as the “shadow-phase region.”
any “problems” arise (e.g., iterations leading to negative compo- 4. “Far from” the phase boundary (Point D). Only the trivial
sition variables), the calculation procedure reverts to the safe tra- solution is obtained.
ditional procedure described previously. Such problems are typi- The essential purpose of stability analysis is to distinguish between
cally encountered when crossing the phase boundary between the Case 1 and the other cases. A failure to determine a negative
two-phase region and the single-phase region. tangent plane distance means that a mixture is taken to be a single
Alternatively, the approach of Michelsen (1980) could be used, phase even though it would form two phases. The objective is to
in which initial estimates are generated by linearly extrapolating reduce the amount of computation time spent on stability analysis
the converged phase compositions of the previous timestep to the to the smallest period possible while ensuring that the correct
current timestep by use of the Jacobian matrix. The approach has result is obtained.
been investigated, but it was found to provide no significant re- In the standard flash procedure, the solutions in the single-
ductions in computation time. phase region are determined through a full, two-sided stability
Table 5 shows computation times for the six scenarios de- analysis, with two different sets of initial estimates for the trial
scribed previously using the revised approach for the two-phase phase w, a gas-like composition and a liquid-like composition,
region. By comparing with Table 4, it can be seen that the total calculated by means of the Wilson K-factors, as shown in Eq. 8.
simulation time can be reduced by an average of approximately 45%.
Yi
The Single-Phase Region Yi = KWilson zi, wvap =
兺Y
i i
If the fluid in a given timestep forms a single, stable phase, it is j
j
most likely that it will remain as a single phase in the following
timestep. The traditional approach involving stability analysis can zi Xi
Xi = , i =
wliq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (8)
determine whether the fluid at the current timestep still forms only
a single, stable phase or if two equilibrium phases have formed,
KWilson
i 兺Xj
j
References
Conclusions
Baker, L.E., Pierce, A.C., and Luks, K.D.: “Gibbs Energy Analysis of
Approaches for reducing the flash calculation computation time in Phase Equilibria,” SPEJ (October 1982) 22, No. 5, 731.
compositional, transient simulations on hydrocarbon systems have Bendiksen, K.H., Malnes, D., Moe, R., and Nuland, S.: “The Dynamic
been presented and discussed. The methodology is based on the Two-Fluid Model OLGA: Theory and Application,” SPEPE (May
assumption that in the majority of simulations, only small changes 1991) 6, No. 2, 171; Trans., AIME, 291.
in pressure, temperature, or composition will take place from one
Firoozabadi, A. and Pan, H.: “Fast and Robust Algorithm for Composi-
timestep to the next in a given section or cell of a pipeline or
tional Modeling: Part I—Stability Analysis Testing,” SPEJ (March
reservoir. In the two-phase region, results from the previous
2002) 7, No. 1, 78.
timestep are used as estimates of the solution in the current
Hendricks, E.M.: “Reduction Theorem for Phase Equilibrium Problems,”
timestep. In the single-phase region, a criterion has been estab-
Ind. Eng. Chem. Res. (1988) 27, 1728.
lished for evaluating whether a stability analysis is needed or can
Huron, M.J. and Vidal, J.: “New Mixing Rules in Simple Equations of
be bypassed. To prevent an erroneous single-phase prediction in
State Representing Vapor-Liquid Equilibria of Strongly Non-Ideal
the two-phase region resulting from bypassed stability analyses, a
Mixtures,” Fluid Phase Equilibria (1979) 3, 255.
buffer zone denoted as the shadow-phase region is used in the
vicinity of the phase boundary away from the critical point. An- Kontogeorgis, G.M., Voutsas, E.C., Yakoumis, I.V., and Tassios, D.P.:
other measure is used to predict the distance to the phase boundary “An Equation of State for Associating Fluids,” I&EC Research (1996)
in the near-critical region. These measures provide a safe proce- 35, 4310.
dure for bypassing stability analysis along the whole phase bound- Michelsen, M.L.: “Calculation of Phase Envelopes and Critical Points for
ary. For the test scenarios considered, these approaches reduce Multicomponent Mixtures,” Fluid Phase Equilibria (1980) 4, 1–10.
simulation time spent on flash calculations in a compositional, Michelsen, M.L.: “The Isothermal Flash Problem. Part I: Stability,” Fluid
transient-flow simulation by between approximately 85 and 90%. Phase Equilibria (1982) 9, 1–19.
For a six-component fluid, effectively 5 million flash calculations Michelsen, M.L.: “Calculation of Critical Points and Phase Boundaries in
can be carried out in approximately 1 minute when simulations are the Critical Region,” Fluid Phase Equilibria (1984) 16, 57.
performed on a computer with a Pentium IV 2.4 GHz processor Michelsen, M.L.: “Simplified Flash Calculations for Cubic Equations of
and 512 MB RAM. State,” Ind. Eng. Chem. Process Des. Dev. (1986) 25, 184.
Michelsen, M.L.: “Phase Equilibrium Calculations. What is Easy, and
Nomenclature What is Difficult?,” Comp. Chem. Eng. (1993) 17, 561.
Michelsen, M.L.: “Speeding up the Two-Phase TP-Flash, With Applica-
a ⳱ coefficients in sixth-degree polynomial tions for Calculation of Miscible Displacement,” Fluid Phase Equilib-
B ⳱ matrix of composition derivatives of fugacity ria (1998) 143, 1–12.
coefficients Michelsen, M.L. and Mollerup, J.M.: Thermodynamic Models: Fundamen-
Bij ⳱ composition derivative of the fugacity coefficient of tals & Computational Aspects, first edition, Tie-Line Publications,
component i with respect to component j Holte, Denmark (2004).
b ⳱ smallest eigenvalue in B Pan, H. and Firoozabadi, A.: “Fast and Robust Algorithm for Composi-
C ⳱ component number tional Modeling: Part II—Two-Phase Flash Computations,” SPEJ (De-
i ⳱ component or time index cember 2003) 8, No. 4, 380.
j ⳱ component or coefficient index Soave, G.: “Equilibrium Constants from a Modified Redlich-Kwong Equa-
k ⳱ defined in Eq. 7 tion of State,” Chem. Eng. Sci. (1972) 27, 1197.
K ⳱ equilibrium factor Xu, Z.G. and Shea, R.H.: “Important Tips for Setting up Simulation Mod-
els for Multiphase Flow in Pipelines,” Multiphase ’01 Proc., Cannes,
l ⳱ molar amount of component in liquid phase
France (2001) 315–328.
n ⳱ mole number
p ⳱ pressure, atm
pc ⳱ critical pressure, atm
t ⳱ time, seconds SI Metric Conversion Factors
T ⳱ temperature, K atm × 1.013250* E+05 ⳱ Pa
Tc ⳱ critical temperature, K °F (°F + 459.67)/1.8 ⳱K
v ⳱ molar amount of component in gas phase *Conversion factor is exact.
w ⳱ mole fraction in trial phase
w ⳱ vector of trial-phase mole fractions
x ⳱ mole fraction in liquid phase Claus P. Rasmussen works for Calsep A/S in the area of mod-
x ⳱ vector of liquid mole fractions eling of PVT and phase behavior of petroleum systems. e-mail:
X ⳱ mole fraction in liquid-like composition estimate cpr@calsep.com. His work areas currently include develop-
ment of the PVT simulation program PVTsim and development
y ⳱ mole fraction in gas phase of the flash engine for the compositional version of the tran-
y ⳱ vector of gas mole fractions sient-flow simulator OLGA. Rasmussen holds an MS degree in
Y ⳱ mole fraction in gas-like composition estimate chemical engineering from the Technical U. of Denmark. Kris-
z ⳱ mole fraction in feed tian Krejbjerg has been president of Calsep Inc. in Houston
since 2001. e-mail: kk@calsep.com. He previously worked for 2
z ⳱ vector of feed mole fractions years at Calsep A/S in Denmark developing the PVT simulation
 ⳱ gas-phase fraction program PVTsim. His work areas currently include development
␦ij ⳱ Kronecker delta, ␦ij⳱0 for i⫽ j and ␦ij⳱1 for i⳱j of a compositional hydrate-kinetics model. Krejbjerg holds an