New reduced parameters for flash calculations based on two-parameter BIP formula

9
New reduced parameters for ash calculations based on two-parameter BIP formula Seyhan Emre Gorucu a,n , Russell Taylor Johns b,1 a Department of Energy and Mineral Engineering, The Pennsylvania State University,159 Hosler Building, State College, PA 16802, USA b Department of Energy and Mineral Engineering, The Pennsylvania State University,119 Hosler Building, State College, PA 16802, USA article info Article history: Received 11 July 2013 Accepted 17 February 2014 Available online 26 February 2014 Keywords: compositional simulation ash calculations reduced methods equation of state abstract Phase equilibrium calculations constitute a signicant percentage of computational time in composi- tional simulation, especially as the number of components and phases increase. Reduced methods address this problem by carrying out phase equilibrium calculations using a reduced number of independent parameters. These methods have shown to speed up ash calculations, decrease simulation times, and also improve convergence behavior. In this paper, we present new reduced parameters using the two-parameter binary interaction parameter formula originally proposed by Li and Johns (2006). The new reduced parameters are applied to solve two-phase ash calculations for ve different uid descriptions. The results show a signicant reduction in the number of iterations required to achieve convergence compared to the Li and Johns original approach. The improved method is also shown to converge more often than other ash calculation methods for the cases studied. We further compare computational times with the new reduced approach to conventional ash calculations based on the minimization of Gibbs energy using an optimized compiler. & 2014 Elsevier B.V. All rights reserved. 1. Introduction Gas injection achieves enhanced oil recovery by developing miscibility in situ through the interaction of phase behavior and ow. Compositional simulation of gas oods is an important tool for recovery estimation, but a signicant drawback is that compo- sitional simulation is time consuming when the number of components and phases is large. Thus, one approach is to lump components into several pseudocomponents and to limit the number of phases that can form. Reducing the number of compo- nents, however, decreases the accuracy of the phase behavior calculation in compositional simulation, and also the detailed compositional information required for better surface facility designs. Reduced methods are one approach to speed up ash and stability calculations so that more components and phases can be used. Michelsen (1986) reduced the number of independent parameters to three by setting all binary interaction parameters (k ij BIPs) to zero. Jensen and Fredenslund (1987) extended Michel- sen's research by the addition of two reduced parameters for every column of the BIP matrix with at least one nonzero element. Thus, for one column of nonzero BIPs their approach has ve reduced parameters. Some real uids, however, can have multiple columns of nonzero BIPs so these methods are not practical. Hendriks (1988) and Hendriks and van Bergen (1992) proposed a method based on spectral decomposition (SD) of the 1 k ij matrix. The number of reduced parameters depends on the number of eigenvalues retained; they suggested neglecting eigen- values less than 0.001. Thus, in their approach the phase behavior is altered depending on the magnitude of the eigenvalues neglected. Because the number of reduced parameters depends on the number of eigenvalues retained, the SD approach also requires that any computer code be written for an arbitrary number of eigenvalues. Thus, the code for SD requires several inner and outer loops, which may slow its efciency. Pan and Firoozabadi (2002) also considered the SD approach and showed that ash calculations with reduced parameters are more robust than conventional ash calculations. They showed that the tangent plane distance function (TPD) used in stability analysis is smoother in reduced space than in compositional space. Li and Johns (2006) introduced a new reduction method where there are six reduced parameters independent of the number of components. Their approach, denoted as LJ in this paper, is based on a specic two-parameter formulation of the BIP matrix, which in general must be tuned to PVT data. Okuno et al. (2010a) improved convergence of Li and Johns' method by adding a successive substitution (SS) step after each Contents lists available at ScienceDirect journal homepage: www.elsevier.com/locate/petrol Journal of Petroleum Science and Engineering http://dx.doi.org/10.1016/j.petrol.2014.02.015 0920-4105 & 2014 Elsevier B.V. All rights reserved. n Corresponding author. Tel.: +1 713 503 8235. E-mail addresses: [email protected] (S.E. Gorucu), [email protected] (R.T. Johns). 1 Tel.: þ1 814 865 0531. Journal of Petroleum Science and Engineering 116 (2014) 5058

Transcript of New reduced parameters for flash calculations based on two-parameter BIP formula

Page 1: New reduced parameters for flash calculations based on two-parameter BIP formula

New reduced parameters for flash calculations basedon two-parameter BIP formula

Seyhan Emre Gorucu a,n, Russell Taylor Johns b,1

a Department of Energy and Mineral Engineering, The Pennsylvania State University, 159 Hosler Building, State College, PA 16802, USAb Department of Energy and Mineral Engineering, The Pennsylvania State University, 119 Hosler Building, State College, PA 16802, USA

a r t i c l e i n f o

Article history:Received 11 July 2013Accepted 17 February 2014Available online 26 February 2014

Keywords:compositional simulationflash calculationsreduced methodsequation of state

a b s t r a c t

Phase equilibrium calculations constitute a significant percentage of computational time in composi-tional simulation, especially as the number of components and phases increase. Reduced methodsaddress this problem by carrying out phase equilibrium calculations using a reduced number ofindependent parameters. These methods have shown to speed up flash calculations, decrease simulationtimes, and also improve convergence behavior.

In this paper, we present new reduced parameters using the two-parameter binary interactionparameter formula originally proposed by Li and Johns (2006). The new reduced parameters are appliedto solve two-phase flash calculations for five different fluid descriptions. The results show a significantreduction in the number of iterations required to achieve convergence compared to the Li and Johnsoriginal approach. The improved method is also shown to converge more often than other flashcalculation methods for the cases studied. We further compare computational times with the newreduced approach to conventional flash calculations based on the minimization of Gibbs energy using anoptimized compiler.

& 2014 Elsevier B.V. All rights reserved.

1. Introduction

Gas injection achieves enhanced oil recovery by developingmiscibility in situ through the interaction of phase behavior andflow. Compositional simulation of gas floods is an important toolfor recovery estimation, but a significant drawback is that compo-sitional simulation is time consuming when the number ofcomponents and phases is large. Thus, one approach is to lumpcomponents into several pseudocomponents and to limit thenumber of phases that can form. Reducing the number of compo-nents, however, decreases the accuracy of the phase behaviorcalculation in compositional simulation, and also the detailedcompositional information required for better surface facilitydesigns.

Reduced methods are one approach to speed up flash andstability calculations so that more components and phases can beused. Michelsen (1986) reduced the number of independentparameters to three by setting all binary interaction parameters(kij–BIPs) to zero. Jensen and Fredenslund (1987) extended Michel-sen's research by the addition of two reduced parameters for everycolumn of the BIP matrix with at least one nonzero element. Thus,

for one column of nonzero BIPs their approach has five reducedparameters. Some real fluids, however, can have multiple columnsof nonzero BIPs so these methods are not practical.

Hendriks (1988) and Hendriks and van Bergen (1992) proposeda method based on spectral decomposition (SD) of the 1�kijmatrix. The number of reduced parameters depends on thenumber of eigenvalues retained; they suggested neglecting eigen-values less than 0.001. Thus, in their approach the phase behavioris altered depending on the magnitude of the eigenvaluesneglected. Because the number of reduced parameters dependson the number of eigenvalues retained, the SD approach alsorequires that any computer code be written for an arbitrarynumber of eigenvalues. Thus, the code for SD requires severalinner and outer loops, which may slow its efficiency.

Pan and Firoozabadi (2002) also considered the SD approachand showed that flash calculations with reduced parameters aremore robust than conventional flash calculations. They showedthat the tangent plane distance function (TPD) used in stabilityanalysis is smoother in reduced space than in compositional space.

Li and Johns (2006) introduced a new reduction method wherethere are six reduced parameters independent of the number ofcomponents. Their approach, denoted as LJ in this paper, is basedon a specific two-parameter formulation of the BIP matrix, whichin general must be tuned to PVT data.

Okuno et al. (2010a) improved convergence of Li and Johns'method by adding a successive substitution (SS) step after each

Contents lists available at ScienceDirect

journal homepage: www.elsevier.com/locate/petrol

Journal of Petroleum Science and Engineering

http://dx.doi.org/10.1016/j.petrol.2014.02.0150920-4105 & 2014 Elsevier B.V. All rights reserved.

n Corresponding author. Tel.: +1 713 503 8235.E-mail addresses: [email protected] (S.E. Gorucu),

[email protected] (R.T. Johns).1 Tel.: þ1 814 865 0531.

Journal of Petroleum Science and Engineering 116 (2014) 50–58

Page 2: New reduced parameters for flash calculations based on two-parameter BIP formula

Newton–Raphson (NR) iteration. Their approach is denoted as OJSin this paper. Their modification increased computational time perNR iteration, but decreased the number of iterations to conver-gence, and overall computational time.

Okuno et al. (2010b) showed that the OJS reduced methodcan also be applied to three-phase stability and flash calculations.More importantly, they implemented their approach inthe UTCOMP compositional simulator and showed significantcomputational time reductions, while preserving completeaccuracy in the simulation results. The OJS method implementedin the simulator was faster than the conventional minimiza-tion of Gibbs energy technique (MG) even for only sevencomponents.

Pan and Tchelepi (2010) applied the SD reduced method tocompositional simulation and concluded that reduced methodsare significantly faster than conventional methods. They reported10 times speed up for EOS calculations for a fluid with 13components when four eigenvalues are retained. However, theyneglected eigenvalues smaller than 0.07, which could substantiallyalter the phase behavior.

More recently, Nichita and Graciaa (2010) improved the spec-tral decomposition (SD) method by developing a new set ofreduced parameters that increased linearity in the residual func-tions. They showed a significant reduction in the number of NRiterations compared to the standard SD method.

Mohebbinia et al. (2012) applied the OJS reduced methodto four-phase equilibrium calculations, which is applicable forCO2/hydrocarbon/water systems. They also eliminated the addi-tional SS step within the NR loop by updating the K-values usingthe total derivative.

Haugen and Beckner (2013) compared the SD approach withthe conventional technique and stated that conventional methodswere faster than the SD method for less than 10 components.Gorucu (2013), however, shows that SD is slower than LJ becauseSD must be coded with an undetermined number of reducedparameters. The number of reduced parameters based on thenumber of eigenvalues are required to characterize the phasebehavior. Gorucu (2013) duplicates the results of Haugen andBeckner (2013) and shows that SD is slower than LJ and LJ is faster

than the conventional technique even for seven componentsor less.

In this paper, we apply the approach by Nichita and Graciaa(2010) to the BIP formula of Li and Johns (2006). The first sectionsummarizes the equations and approach for the various reducedmethods. The second section presents our new reduced para-meters and two-phase flash calculation algorithm. We thencompare and show the benefits of the new reduced flash withprevious reduced methods (LJ, OJS) and the conventional method(MG) for five fluid characterizations in the literature.

2. Background

Flash calculations solve for the equilibrium phase compositionsthat result from specifying the temperature, pressure, and overallcomposition. All flash calculation methods, whether reduced orconventional, require an initial set of K-values estimated eitherfrom a prior flash in simulation, stability analysis, or fromcorrelations (Wilson, 1969; Li and Firoozabadi, 2012).

Conventional flash calculations are based on either the solutionof nonlinear algebraic equations or the minimization of Gibbsenergy. For the former approach, NC nonlinear equations aresolved by successive substitution (SS) and/or Newton–Raphsoniteration (NR) to obtain equality of chemical potentials. For thelatter, Newton's minimization technique is applied where a sym-metric Hessian matrix is constructed and the gradient is calculatedfor each iteration. Modified Cholesky decomposition was used inthis paper to solve for the system of equations because it ensuresconvergence to a minimum (Perschke et al., 1989).

Stability analysis is often performed prior to solving thefugacity equations to determine if a phase is stable (Michelsen,1982a). If a phase is stable, the expensive flash calculations areavoided for that time step and grid block. Otherwise, flashcalculations are performed.

Both stability and flash calculations typically use NR iterations,where a NC�NC Jacobian matrix must be solved at each iteration.These calculations take a significant computational effort espe-cially as the number of components and phases increases.

Nomenclature

J Jacobian matrixNC number of componentsNp number of phasesQ DEM reduced parametersZ compressibility factore error functionhi, gi LJ vectorsh independent parameters for improved algorithmskij BIP matrixn number of eigenvalues consideredq0 eigenvectorx liquid molar compositiony vapor composition

Greek letters

δ1,δ2 EOS parametersϕ fugacity coefficientΘ LJ reduced parametersλ eigenvalueα reduced parameter index

Subscripts

i composition indexj composition or phase indexL liquidV vapor

Abbreviations

BIP binary interaction parametersEOS equation of stateLJ algorithm based on Li and Johns (2006)ISD improved SD methodILJ improved algorithm based on Li and Johns (2006)MG conventional method based on minimization of

Gibbs energyNR Newton–RaphsonOJS algorithm based on Okuno et al. (2010a)RMG reduced conventional methodSD algorithm based on spectral decompositionSS successive substitutionTLL tie-line lengthTPD tangent plane distance

S.E. Gorucu, R.T. Johns / Journal of Petroleum Science and Engineering 116 (2014) 50–58 51

Page 3: New reduced parameters for flash calculations based on two-parameter BIP formula

The idea behind reduced methods is that fugacity coefficientscan be expressed solely as a function of a few scalars, reducingthe size of the Jacobian matrix. That is, the BIP matrix ismanipulated so that the fugacity coefficients are only a functionof a few independent parameters. Such a transformation makesthe Jacobian calculation more linearly dependent on the numberof components resulting in a substantial reduction in computa-tional time. For a generalized cubic equation-of-state, the fugacitycoefficient equations can be written as a function of compositionby,

ln ϕi ¼ðZ�1Þ

BBi� lnðZ�BÞ� A

ðδ1�δ2ÞB

2 ∑Nc

j ¼ 1Aijxj

A�Bi

B

0BBB@

1CCCAln

Zþδ1BZþδ2B

� �;

i¼ 1;…;NC ð1Þwhere δ1 and δ2 are EOS-type specific coefficients.

The main difference in the reduced methods is how they treatparameter A and ∑NC

j ¼ 1Aijxj in Eq. (1). These two parameters aredefined by,

∑Nc

j ¼ 1Aijxj ¼

ffiffiffiffiffiAi

p∑Nc

j ¼ 1

ffiffiffiffiffiAj

qxjð1�kijÞ ð2Þ

and;

A¼ ∑NC

i ¼ 1∑NC

j ¼ 1Aijxixj ¼ ∑

NC

i ¼ 1∑NC

j ¼ 1

ffiffiffiffiffiffiffiffiffiAiAj

qxixjð1�kijÞ

¼ ∑NC

i ¼ 1

ffiffiffiffiffiAi

pxi ∑

NC

j ¼ 1

ffiffiffiffiffiAj

qxjð1�kijÞ

!: ð3Þ

Michelsen (1986) set the BIPs in Eqs. (2) and (3) to zero (kij¼0)and recognized that these equations can be expressed as afunction of the reduced parameter:

α¼ ∑NC

i ¼ 1

ffiffiffiffiffiAi

pxi: ð4Þ

Michelsen retained B as a second reduced parameter, and usedthe mole fraction of liquid as a third reduced parameter. Thefugacity coefficient in Eq. (1) can then be expressed as a functionof the first two reduced parameters, since the compressibilityfactor Z is also a function of A and B.

Newton–Raphson (NR) iterations are typically done after sev-eral successive substitution (SS) steps to ensure a good initialguess of the reduced parameters, which depend on equilibriumphase compositions. In Michelsen's approach, the following threeresidual functions were used to estimate the three reducedparameters from NR:

e1 ¼ ∑NC

i ¼ 1ðyi�xiÞ; e2 ¼ ∑

NC

i ¼ 1xi

ffiffiffiffiffiAi

p�

ffiffiffiA

p; e3 ¼ ∑

NC

i ¼ 1xiBi�B: ð5Þ

At convergence, the residual functions in Eq. (5) should be lessthan a small specified tolerance. Alternatively, one could calculatethe fugacities from the reduced parameters and use a componentfugacity convergence criterion.

Hendriks and van Bergen (1992) developed new reducedparameters to account for nonzero BIPs. They applied spectraldecomposition to the BIP matrix and obtained

ð1�kijÞ ¼ ∑NC

k ¼ 1λkq

0ki q

0kj ð6Þ

where q0k is the eigenvector corresponding to the kth eigenvalue.For n non-zero (or very small) eigenvalues, new reduced para-meters are defined as,

Qα ¼ ∑NC

i ¼ 1q0αi

ffiffiffiffiffiAi

pxi; α¼ 1;…;n: ð7Þ

Using Eq. (7), the EOS parameters can then be written as,

A� ∑n

α ¼ 1λαQ

2α ; ∑

NC

j ¼ 1Aijxj � ∑

n

α ¼ 1λαQα

ffiffiffiffiffiAi

pq0iα: ð8Þ

Eq. (8) is only approximate since small eigenvalues are set tozero, which change the BIP values. This method is referred to asthe spectral decomposition (SD) method, where the number ofreduced parameters depend on the number of eigenvalues (n)retained. In total, there are nþ2 reduced parameters when B andthe mole fraction of liquid are also included. The NR iterationsthen solve nþ2 error functions:

eα ¼ ∑NC

i ¼ 1xi

ffiffiffiffiffiAi

pq0iα�Qα; α¼ 1;…;n

enþ1 ¼ ∑NC

i ¼ 1xiBi�B; enþ2 ¼ ∑

NC

i ¼ 1ðyi�xiÞ: ð9Þ

Li and Johns (2006) took a different approach to develop newreduced parameters when BIPs are nonzero. They expressed theBIP matrix using two parameters through the function

kij ¼ ðhi�hjÞ2gigj ð10Þwhere hi and gi are component tuning parameters determinedfrom a best fit to PVT data (or in some cases by doing a best fit ofthe BIPs from prior tuned characterizations). Using Eq. (10), theyderived the following expressions:

A¼Θ21þ2Θ2

2�2Θ3Θ4; ∑NC

j ¼ 1Aijxj ¼ ∑

4

α ¼ 1Θαqiα ð11Þ

where the four reduced parameters are

Θα ¼ ∑NC

i ¼ 1xi

ffiffiffiffiffiAi

p(; ∑

NC

i ¼ 1xi

ffiffiffiffiffiAi

phigi; ∑

NC

i ¼ 1xi

ffiffiffiffiffiAi

phi

2gi ; ∑NC

i ¼ 1xi

ffiffiffiffiffiAi

pgi

)ð12Þ

and the vector of known parameters:

qiα ¼ffiffiffiffiffiAi

p;2

ffiffiffiffiffiAi

phigi; �

ffiffiffiffiffiAi

pgi; �

ffiffiffiffiffiAi

phi

2gin o

: ð13Þ

Together with the EOS parameter B and the mole fraction ofliquid, Li and Johns (LJ) used a total of six reduced parameters.Unlike the SD approach, the number of reduced parameters intheir approach is always six, eliminating the need to determinehow many eigenvalues to retain. For all reduced methods, thereduced parameters based on one of the phases are updated aftereach NR iteration. The reduced parameters for the second phaseare calculated by a simple material balance equation. The fugacitycoefficients are then calculated from the reduced parameters ateach iteration to update the K-values. Because the mole fraction ofliquid is known (it is a reduced parameter in the LJ approach), theliquid equilibrium phase compositions are then directly computedfrom the equation xi ¼ zi=½ð1�LÞKiþL�.

Because the equilibrium phase compositions are calculatedfrom the reduced parameters, the phase compositions exactlysatisfy ∑NC

i ¼ 1xi ¼∑NCi ¼ 1yi ¼ 1 only at convergence, but not during

the initial iterations. Further, the values of the residual functionsbased on equality of fugacities could increase in the first NRiteration even though the residual parameters are converging.Okuno et al. (2010a) corrected this mass balance error in the LJmethod by adding a SS step after each NR iteration of the reducedparameters. That is, after the equilibrium phase compositions arefirst calculated from the reduced parameters following NR, thereduced parameters are recalculated based on these equilibriumphase compositions. These reduced parameters are then used tosolve for new equilibrium phase compositions after calculation offugacity coefficients and K-values.

Although the SS step required additional computational time,Okuno et al. (2010a) showed that by calculating the fugacity

S.E. Gorucu, R.T. Johns / Journal of Petroleum Science and Engineering 116 (2014) 50–5852

Page 4: New reduced parameters for flash calculations based on two-parameter BIP formula

coefficients at the same iteration as the reduced parameters theyachieved faster convergence. In this paper, we denote theirapproach as OJS. Mohebbinia et al. (2012) eliminated the addi-tional SS step by calculating K-values using the total derivative inthe construction of the Jacobian matrix. Their approach is likelysomewhat slower as several additional partial derivatives mustthen be calculated.

Nichita and Graciaa (2010) recently introduced new reducedparameters for the SD method. In their novel approach, theyexpressed the fugacity coefficient for a given phase as a multi-linear function of the new reduced parameters:

ln ϕi ¼ ∑nþ2

α ¼ 1hαqiα; i¼ 1;…;NC ð14Þ

where hα are the reduced parameters and qiα are vectors of lengthNC with known elements. A significant advantage of this approachover the SD method is that the fugacity coefficients are easy tocalculate and the expression is linear with the reduced para-meters. Nichita and Graciaa showed that fewer iterations arerequired for convergence with their improved approach (ISD) overthe SD method. Further this approach naturally uses the equalityof fugacities as the convergence criterion and Rachford–Rice aresolved for the phase mole fractions after each iteration because thephase mole fractions are no longer reduced parameters. Thisavoids the need for any intermediate SS step as done by OJS.

3. New reduced parameters

In this section, we extend the Nichita and Graciaa approach tothe Li and Johns (2006) BIP formula and develop new reducedparameters that improve convergence. The improved LJ methoddeveloped in this paper is denoted as ILJ.

The fugacity coefficients can be written as a linear combinationof six reduced parameters. That is,

ln ϕi ¼ ∑6

α ¼ 1hαqiα ð15Þ

where for each phase:

hα ¼�2Θα

ΔBln

Zþδ1BZþδ2B

� �; α¼ 1;…;4 ð16Þ

h5 ¼ðZ�1Þ

Bþ A

ΔB2 lnZþδ1BZþδ2B

� �ð17Þ

h6 ¼ � lnðZ�BÞ ð18Þ

qiα ¼ffiffiffiffiffiAi

p;2

ffiffiffiffiffiAi

phigi; �

ffiffiffiffiffiAi

pgi; �

ffiffiffiffiffiAi

phi2gi ;Bi;1

n o: ð19Þ

Eq. (19) is very similar to Eq. (13), but the reduced parametersgiven by Eqs. (16)–(18) are completely different. The LJ reducedparameters defined in Eq. (12) are embedded in the new reducedparameters through Eq. (16), although they are not used asreduced parameters. Further, there is no direct relationship torelate hα from one phase to another phase. Thus, we solve for thedifference in the reduced parameters defined by,

hΔα ¼ hLα�hVα: ð20ÞThe residual functions to be minimized are then

eα ¼ hLα�hVα�hΔα; α¼ 1;…;6 ð21Þand the Jacobian matrix is given by,

Jαβ ¼∂eα∂hΔβ

¼ ∂hLα

∂hΔβ�∂hVα∂hΔβ

�δαβ; α¼ 1;…;6; β¼ 1…;6 ð22Þ

where δαβ¼1 when α¼β or zero otherwise.

As for all conventional and reduced methods, the procedure forthe new reduced method (ILJ) begins by making SS iterations usingthe conventional approach to get a good initial guess for theNewton–Raphson iterations. Unless otherwise noted, we use acriterion of max j lnðϕiLxi=ϕiV yiÞjo10�3 to switch from SS itera-tions to NR iterations.

The procedure for the subsequent two-phase Newton–Raphson(NR) iterations are

1. Calculate the LJ reduced parameters for the liquid phase usingEq. (12), and B¼∑Nc

i ¼ 1Bixi.2. Calculate the LJ reduced parameters for the vapor phase using

the linear relation,

ΘVα ¼Θzα�LΘLα

1�L; BV ¼ Bz�LBL

1�Lð23Þ

where z indicates that the overall composition zi is used in thecalculation of that parameter.

3. Calculate AL and AV from Eq. (11).4. Calculate compressibility factors ZL and ZV by solving the cubic

EOS equation. We used Peng and Robinson EOS in this paper(Peng and Robinson, 1976).

5. Calculate hLα and hVα from Eqs. (16)–(18). Also, calculate hΔαfrom Eq. (20).

6. Update the logarithm of the component fugacity coefficientsfor each phase by Eq. (15). Calculate the Jacobian matrix asshown in Appendix A.

7. Solve for hΔα using Newton–Raphson.8. Calculate K-values using,

ln Ki ¼ lnϕiL

ϕiV¼ ∑

6

α ¼ 1hΔαqiα: ð24Þ

9. Solve the Rachford–Rice equations to update the equilibriumphase compositions and liquid mole fraction.

10. Check for NR convergence when max j lnðϕiLxi=ϕiV yiÞjo10�10.Other criteria and tolerances can be used as needed. If notconverged, go to step 1.

The above procedure could be extended to three or morephases if needed. The Rachford–Rice procedure for multiphaseflash calculations by Okuno et al. (2010b) is used in this paper forrobustness and speed for all conventional and reduced methods.

4. Results

In this section, we compare our reduced method (ILJ) to twodifferent reduced methods (LJ and OJS) and the conventionalmethod using minimization of Gibbs energy (MG). MG is usedfor the conventional method since it is faster than solving a systemof nonlinear algebraic (fugacity) equations.

Five different fluids are used for the comparison that give agood range in the number of components, namely oil A (sevencomponents), B (12 components) and C (15 components) fromLi and Johns (2006); and mixture 1 (10 components) and mixture2 (11 components) from Pan and Firoozabadi (2003). Moreover, wesplit the heaviest pseudocomponent of oil C into 20 identicalpseudocomponents to obtain a 34 component mixture (C34). Thisnew fluid (C34) gives the same flash calculation results as for oil C,but allows for an estimate of the speed up for a larger number ofcomponents.

These five fluids together with oil C34 are flashed at a variety ofdifferent temperatures and pressures as shown in Table 1. Theseconditions were chosen to sample the composition space near andfar from the critical region as is evidenced by the calculation of the

S.E. Gorucu, R.T. Johns / Journal of Petroleum Science and Engineering 116 (2014) 50–58 53

Page 5: New reduced parameters for flash calculations based on two-parameter BIP formula

tie-line length (TLL), where TLL¼ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi∑NC

i ¼ 1ðyi�xiÞ2q

. Table 1 also

gives the variation in the overall CO2 mole percentage formixture 2.

4.1. Convergence behavior

Fig. 1 shows the residuals for each NR iteration for oil A nearthe critical region (484 1F, 1044.41 psia). The residuals for the LJreduced method increase for the first NR iteration owing to thematerial balance error discussed in the previous section. That is,the equilibrium phase compositions are not consistent with thefugacity coefficients and overall material balances. This materialbalance error eventually decays to zero as iterations converge.

The other three methods (OJS, ILJ, and MG) do not have thisproblem and converge in fewer iterations as shown in Fig. 1. Feweriterations are required with these methods compared to LJ for all45 flash calculations in Table 1.

Fig. 2 shows the number of iterations required to achieveconvergence for the 45 flash calculations as a function of thelength of the tie-line. The tie-line length approaches zero atthe critical point and therefore gives a good indication of howfar the tie-line is from the critical locus. As shown, the number ofiterations increases substantially as the flash approaches a criticalpoint. In general, the number of iterations is fairly independent ofthe number of components and hence the type of oil. Fig. 2 alsoshows that LJ converges in one more iteration away from thecritical region and in two more iterations near the critical region

Table 1Temperatures and pressures for flash calculations.

Case # Mixture 1 Case # Mixture 2

T P TLL T P CO2 TLL(1F) (psi) (1F) (psi) (mole%)

1 300 1000 1.28 14 500 1200 0.6 0.882 350 1000 1.21 15 500 1800 0.25 0.23 400 1000 1.11 16 520 1670 0.25 0.14 450 1000 0.98 17 520 1670 0.3 0.175 500 1000 0.8 18 400 1400 0.4 0.946 550 1000 0.53 19 400 1400 0.5 0.957 550 1100 0.44 20 400 1400 0.6 0.978 550 1200 0.33 21 400 1400 0.7 0.999 550 1290 0.18 22 400 1400 0.8 1.03

10 563 1200 0.111 563 1203 0.0812 565 1187 0.0713 568 1163 0.06

Case # Oil A Case # Oil B Case # Oil C and C34

T P TLL T P TLL T P TLL(1F) (psi) (1F) (psi) (1F) (psi)

23 484 500 0.85 32 400 1000 1.48 38 400 1400 1.0924 484 600 0.75 33 450 1500 1.32 39 400 1600 1.0425 484 700 0.65 34 300 3000 0.89 40 600 1600 0.7726 484 800 0.53 35 200 4000 0.67 41 700 1600 0.5827 484 900 0.39 36 200 5000 0.54 42 750 1750 0.3228 484 1000 0.21 37 180 5500 0.48 43 750 1850 0.2129 484 1040 0.07 44 780 1720 0.1730 484 1044 0.02 45 780 1725 0.1631 484 1044.41 0.01

1.E-10

1.E-8

1.E-6

1.E-4

1.E-2

0 2 4 6 8 10 12 14

Res

idua

l

Iterations

MG

OJS, ILJ

LJ

Fig. 1. Convergence of flash calculations for oil A near the critical point for fourdifferent methods. LJ (Li and Johns, 2006), OJS (Okuno et al., 2010a), MG (Pan andTchelepi, 2010).

0

2

4

6

8

10

12

0.0 0.5 1.0 1.5 2.0

NR

iter

atio

ns

Tie Line Length

LJ ILJ MG

Fig. 2. Number of iterations needed for convergence for three different methods LJ,ILJ, and MG.

S.E. Gorucu, R.T. Johns / Journal of Petroleum Science and Engineering 116 (2014) 50–5854

Page 6: New reduced parameters for flash calculations based on two-parameter BIP formula

with respect to the other methods. The other methods that wehave tested (MG, ILJ, OJS) converge in nearly the same number ofiterations. The fact that ILJ and OJS converge in the same numberof iterations shows that the new reduced parameters in this paper(ILJ) successfully eliminates the need for additional SS stepsimplemented in OJS.

Haugen and Beckner (2013) find that the number of iterationsare the same for the same phase behavior accuracy. As they taketheir residual functions as convergence criterion, they obtain thesame number of iterations for the different methods (SD, ISD andthe conventional technique). Instead, we use the equality offugacities as our convergence criterion for all methods tested.Therefore, the number of iterations to achieve convergence variesbetween different methods. The differences shown in the numberof iterations in Figs. 1 and 2 cannot be explained by phase behaviordifferences because LJ, ILJ and OJS have exactly the same phasebehavior (same binary interaction parameters).

4.2. Robustness

The primary advantage of the ILJ method compared to the othermethods is that it is more robust. Both LJ and OJS diverge moreoften for flash calculations near the phase envelope and criticalregion. For example, we repeated our flash calculations using lessstringent convergence criterion of 0.1 and 0.01 for switching fromthe SS iterations to NR iterations (instead of the typical value of0.001 used in simulation). All 45 flash calculations convergedwhen the SS switch criterion is 0.001 and 0.01. When the criterionis 0.1, MG and ILJ diverged for only two and one cases near thephase envelope, respectively, while LJ and OJS diverged for fiveand four cases near the critical region and phase envelope,respectively as shown in Table 2. Table 2 also shows the numberof iterations executed if convergence is achieved.

Gorucu and Johns (2013) also compared ILJ with other reducedand conventional algorithms in terms of robustness near the phaseenvelope of oil A. They showed that ILJ is the most robusttechnique for several hundreds of flash calculations. Gorucu andJohns (2013) showed that the other conventional and reducedalgorithms tend to fail near the critical point. However, ILJmaintains its robustness near the critical region even with smallerswitch criterion from SS iterations to NR iterations.

4.3. Computational time

An important factor that affects overall computational time isthe computational time per iteration. Fig. 3 compares the compu-tational time required per iteration for the reduced algorithms forall 53 flash calculations in Table 1, where oil C34 is now used toprovide additional flash calculations for 34 components at thesame conditions as oil C. The compositions in Figs. 3–8 arearranged from left to right in order of increasing number ofcomponents (oil A is a seven-component model, while oil C34 is34 components). The flash calculation times are computed with anIntel Xeon CPU with 3.06 GHz and 12 GB RAM using an optimized

Intel Fortran compiler. Every flash calculation is repeated 100,000times to reduce the uncertainty in computational time periteration.

EOS parameters in this paper, e.g. compressibility factor andfugacity coefficients, are computed using the same subroutines forLJ, ILJ, OJS and the conventional method. Therefore, the computa-tional time difference between these methods is solely due todifferences in constructing the Jacobian matrix and solving it. Weworked on minimizing the number of operations for the fugacityderivatives for every technique separately.

Fig. 3 shows that LJ is the fastest method per NR iteration, andis slightly faster than OJS. This occurs because of the additional SSstep included in OJS to reconcile the material balance error. ILJ is

Table 2Robustness of various methods and number of iterations required to convergence.

Case # Fluid MG OJS LJ ILJ

16 Mixture 2: 520 1F, 1670 psi, 25% CO2 8 Diverges Diverges 830 Oil A: 484 1F, 1044 psi 11 Diverges Diverges 1031 Oil A: 484 1F, 1044.41 psi 13 21 Diverges 1336 Oil B: 200 1F, 5000 psi Diverges Diverges Diverges 537 Oil B: 180 1F, 5500 psi Diverges Diverges Diverges Diverges

1.E-06

1.E-05

1.E-04

1.E-03

7 12 17 22 27 32C

ompu

tatio

nal S

peed

per

Iter

atio

n (s

)

Number of Components

ILJOJS

LJ

MG

Fig. 3. Comparison of computational time per iteration for all fluids for fourdifferent methods. The x-axis is in the order of increasing number of componentsfrom oil A (7 components) to oil C34 (34 components). Computational speed isaveraged per flash for each fluid.

5.E-06

5.E-05

5.E-04

5.E-03

7 12 17 22 27 32

Com

puta

tiona

l Tim

e (s

)

Number of Components

OJS

LJILJ

MG

Fig. 4. Comparison of NR computational time per flash for four different methods,and for all fluids. Computational speed is averaged per flash for each fluid.

S.E. Gorucu, R.T. Johns / Journal of Petroleum Science and Engineering 116 (2014) 50–58 55

Page 7: New reduced parameters for flash calculations based on two-parameter BIP formula

slightly slower than both OJS and LJ, but is faster than theconventional MG method even for seven components. Theseresults are similar to the findings of Okuno et al. (2010b). Oneshould note that the Jacobian matrix for ILJ, LJ, and OJS is always ofrank six, while the Hessian matrix for MG is of a rank equal to the

number of components. Therefore, the construction of the Hessianmatrix and the solution of the system of equations for MGbecomes more time consuming as the number of componentsincreases. As shown in Fig. 3, the computational times for thereduced methods are significantly less sensitive to the number ofcomponents.

The total average NR computational time for all flash calcula-tions to convergence is shown in Fig. 4. The convergence criterionfor all methods is identical as discussed previously. The resultsshow that the OJS reduced method per flash is slightly fasterthan the LJ method, largely because LJ requires more iterationsfor convergence. Although ILJ eliminates the SS step required inOJS, it is still somewhat slower than OJS because more time isspent in the construction of the Jacobian matrix. Moreover, itshould be noted that even though the Jacobian matrix for ILJ is six,the reference phase mole fraction is another independent para-meter that is solved using the Rachford–Rice equations. Allof these reduced methods are substantially faster than the con-ventional MG method especially as the number of componentsincreases.

Fig. 4 also shows that the computational time for NR calcula-tions per flash is lower for oil B (12 components) than for mixture1 (10 components). The reason is that oil B is not often tested nearthe critical region and hence converges in fewer iterations.

Fig. 5 shows the total computational time per flash calculationincluding the SS steps. SS steps dominate the computational timeespecially for the reduced methods. One of the reasons that the SStime in these cases is expensive is that most flash calculations areperformed near the critical region, and the initial guesses for theK-values in these stand-alone calculations are far from the con-verged values. For these calculations four to five SS iterations wereneeded away from the critical region, while up to 100 SS iterationswere required near the critical region (33 SS iterations on averagefor all flash calculations).

In general, NR iterations will dominate more when these flashcalculations are embedded into a compositional simulator. Com-positional simulation using IMPEC means that prior guesses aregenerally very good in a grid block from one time step to the next.Thus, in practice, one can often skip successive substitution stepsand only use Newton iterations. In fact, it can be shown that inmany cases it is sufficient not to do any SS iterations at all – if thenext NR step fails to converge one can backtrack and do a SSiteration or two until the guess is in the radius of convergence ofthe NR iteration. The time savings can be substantial by avoidingSS iterations for many time steps and grid blocks, even if in a fewcases one needs to backtrack.

0

0.00

050.

001

7 12 17 22 27 32

Com

puta

tiona

l tim

e pe

r fla

sh (s

)

Number of Components

MG

LJ, ILJ, and OJS

Fig. 5. Comparison of total computational time per flash for four different methods,and for all fluids. Computation of the SS steps dominates for the reduced methods.This shows NR computations are not costly for the reduced methods.

1

1.2

1.4

1.6

1.8

7 12 17 22 27 32

Tota

l Fla

sh ti

me/

SS ti

me

Number of Components

MG

ILJ

OJS

LJ

Fig. 6. Ratio of total flash execution time to SS execution time for different reducedmethods, and for all fluids. The figure shows reduced methods are dominated bythe SS calculations.

0

5

10

15

7 12 17 22 27 32

Spee

d up

com

pare

d to

MG

Number of Components

OJS

LJ

ILJ

Fig. 7. NR speed up of three reduced methods (LJ, ILJ, and OJS) with respect to MGfor six different fluids.

1

1.2

1.4

1.6

7 12 17 22 27 32

Spee

d up

com

pare

d to

MG

Number of Components

OJS

LJ

ILJ

Fig. 8. Total flash calculation speed up of three reduced methods (LJ, ILJ, and OJS)with respect to MG for six different fluids.

S.E. Gorucu, R.T. Johns / Journal of Petroleum Science and Engineering 116 (2014) 50–5856

Page 8: New reduced parameters for flash calculations based on two-parameter BIP formula

Fig. 6 gives the ratio of the total flash execution time to the SSexecution time. As this ratio increases the importance of the NRiterations increase. The figure shows that all reduced methodsbecome much less sensitive to the NR iterations as the number ofcomponents increases, while the conventional MG methodbecomes more dependent on the NR iterations.

SS computations take less time compared to NR iterations foroil B. The reason is that most flash calculations for oil B are furtherfrom the critical region. For example, the average number of SSiterations per flash for oil B is 14 whereas this number is about 35for the other fluids.

Fig. 7 shows the speed up of the NR iterations using reducedmethods compared to the conventional (MG) NR computations.OJS, LJ, and ILJ are 16, 13, and 9 times faster using oil C34,respectively. The speed ups for OJS, LJ, and ILJ are 4.9, 4.2, and3.5 for oil C (15 components), respectively. The results areconsistent with those of Okuno et al. (2010a) where OJS has aspeed up of 10–11 compared to MG for 35 components in theirsimulations.

The speed up for the total flash calculation time for NR and SSiterations using reduced methods are given in Fig. 8. We use theconventional SS steps for all methods. The three reduced methodsare about 26–28% faster than MG for oil C (15 components), andabout 49–51% faster for oil C34. Reduced methods give greaterspeed ups for oil B (12 components) than for oil C because oil B isless dominated by the SS iterations. Reduced methods are 36–45%faster than MG for oil B.

5. Conclusions

We extended the approach by Nichita and Graciaa (2010) todevelop new reduced parameters based on the Li and Johns (2006)two-parameter BIP formulation. The main conclusions are

1. The approach using new reduced parameters (ILJ) is morerobust compared to the Li and Johns original parameters andits derivatives (LJ and OJS). ILJ has similar robustness as theconventional Gibbs energy minimization method (MG).

2. The improved LJ method (ILJ) requires fewer iterations than thestandard LJ method.

3. LJ, ILJ and OJS are significantly faster than the conventionaltechnique. OJS is the fastest method tested, but ILJ is nearlyas fast.

Appendix A. Jacobian construction for Newton–Raphsoniterations

The elements of the Jacobian matrix are given by

∂hαj∂hΔβ

¼ ∑5

γ ¼ 1

∂hαj

∂Q γj

∂Q γj

∂hΔβα; β¼ 1;…;6; γ ¼ 1;…;5; and j¼ L;V:

ðA:1Þ

The derivatives on the right side of Eq. (A.1). are determined as,

∂hαj∂Q γj

¼ ∂hαj∂Q γj

� �Zj

þ ∂hαj∂Zj

� �Qj

∂Zj

∂Qαγ: ðA:2Þ

For liquid,

∂Q γj

∂hΔβ¼ ∑

NC

i ¼ 1θiγ

∂xidhΔβ

;

and for vapor,

∂Q γj

∂hΔβ¼ ∑

NC

i ¼ 1θiγ

∂yidhΔβ

; ðA:3Þ

where θiγ ¼ffiffiffiffiffiAi

p;ffiffiffiffiffiAi

phigi;

ffiffiffiffiffiAi

phi

2gi ;ffiffiffiffiffiAi

pgi;Bi

n o.

The analytical expression for Eq. (A.2) is

∂hαj∂Q γj

� �Zj

¼

hαjQ γjδαγ for α¼ 1;…;4; γ ¼ 1;…;4

∂Aj

∂Q γjln Zj þ δ1Bj

Zj þ δ2Bj

� �=ðΔB2

j Þ for α¼ 5; γ ¼ 1;…;4

� 1Bj

hαjþ2QαjZjπj

� �for α¼ 1;…;4; γ ¼ 5

1B2j

�2h5jBj�1þZj 1þAj

πj

� �� �for α¼ 5; γ ¼ 5

1Zj �Bj

for α¼ 6; γ ¼ 5

0 otherwise

8>>>>>>>>>>>>>><>>>>>>>>>>>>>>:

ðA:4Þ

∂hαj

∂Zj

� �Qj

¼

2Qαj

πjfor α¼ 1;…;4

1Bj

1�Aj

πj

� �for α¼ 5

� 1Zj �Bj

for α¼ 6

8>>>><>>>>:

ðA:5Þ

where πj ¼ ðZjþδ1BjÞðZjþδ2BjÞ

∂Zj

∂Q γj¼

∂Zj∂Aj

∂Aj

∂Q γjfor γ ¼ 1;…;4

∂ZjdBj

¼ 1ð∂Fj=dZjÞQj

�ðδ1þδ2�1ÞZ2j �

2Bjδ1δ2�ðδ1þδ2Þð2Bjþ1ÞZj� �þAjδ1δ2ð3Bjþ2ÞBj

2664

3775 for γ ¼ 5

8>>>>>><>>>>>>:

ðA:6Þ

where

∂Zj

dAj¼ � Zj�Bj

ð∂Fj=dZjÞQj

; ðA:7Þ

∂Aj

∂Q γj¼ ½2Q1j;4Q2j; �2Q3j; �2Q4j� ðA:8Þ

and∂FjdZj

� �Qj

¼ 3Z2j þ2½ðδ1þδ2�1ÞBj�1�Zjþ½Ajþδ1δ2B

2j �ðδ1þδ2ÞBjðBjþ1Þ�:

ðA:9ÞThe expressions for Eq. (A.3) are

∂xidhβ

¼ �di∂Ki

dhΔβVþ ∂V

dhΔβðKi�1Þ

and

∂yidhβ

¼ di∂Ki

dhβð1�VÞ� ∂V

dhβKiðKi�1Þ� �

ðA:10Þ

where,

∂V∂hβ

¼∑Nc

i ¼ 1dið∂Ki=∂hβÞ

∑Nc

i ¼ 1diðKi�1Þ2

ðA:11Þ

∂Ki

∂hβ¼ Kiqiβ ðA:12Þ

di ¼zi

ð1þVðKi�1ÞÞ2: ðA:13Þ

S.E. Gorucu, R.T. Johns / Journal of Petroleum Science and Engineering 116 (2014) 50–58 57

Page 9: New reduced parameters for flash calculations based on two-parameter BIP formula

References

Gorucu, S.E., 2013. Reduced Phase Equilibrium Calculations: New Reduced Para-meters, Critical Analysis and Fluid Characterization (Ph.D. dissertation). ThePennsylvania State University, State College, Pennsylvania.

Gorucu, S.E., Johns, R.T., 2013. Comparison of Reduced and Conventional PhaseEquilibrium Calculations. Paper Presented at the Reservoir Simulation Sympo-sium, The Woodlands. http://dx.doi.org/10.2118/163577-MS.

Haugen, K.B., Beckner, B.L., 2013. A critical comparison of reduced and conventionalEOS algorithms. SPE J. 18 (2), 378–388.

Hendriks, E.M., 1988. Reduction theorem for phase equilibrium problems. Ind. Eng.Chem. Res. 27 (9), 1728–1732, http://dx.doi.org/10.1021/ie00081a027.

Hendriks, E.M., van Bergen, A.R.D., 1992. Application of a reduction method tophase equilibria calculations. Fluid Phase Equilib. 74, 17–34.

Jensen, B.H., Fredenslund, A., 1987. A simplified flash procedure for multicompo-nent mixtures containing hydrocarbons and one non-hydrocarbon using two-parameter cubic equations of state. Ind. Eng. Chem. Res. 26 (10), 2129–2134,http://dx.doi.org/10.1021/ie00070a032.

Li, Y., Johns, R.T., 2006. Rapid flash calculations for compositional simulation. SPEReserv. Eval. Eng. 9 (5), 521–529, http://dx.doi.org/10.2118/95732-PA.

Li, Z., Firoozabadi, A., 2012. General strategy for stability testing and phase-splitcalculation in two and three phases. SPE J. 17 (4), 1096–1107, http://dx.doi.org/10.2118/129844-PA.

Michelsen, M.L., 1982a. The isothermal flash problem. Part I Stability. Fluid PhaseEquilib. 9 (1), 21–40.

Michelsen, M.L., 1986. Simplified flash calculations for cubic equations of state. Ind.Eng. Chem. Process Des. Dev. 25 (1), 184–188, http://dx.doi.org/10.1021/i200032a029.

Mohebbinia, S., Sepehrnoori, K., Johns, R.T., 2012. Four-Phase Equilibrium Calcula-tions of CO2/Hydrocarbon/Water Systems Using a Reduced Method. PaperPresented at the 18th SPE Improved Oil Recovery Symposium. http://dx.doi.org/10.2118/154218-MS.

Nichita, D.V., Graciaa, A., 2010. A new reduction method for phase equilibriumcalculations. Fluid Phase Equilib. 302 (1–2), 226–233, http://dx.doi.org/10.1016/j.fluid.2010.11.007.

Okuno, R., Johns, R.T., Sepehrnoori, K., 2010a. Application of a reduced method incompositional simulation. SPE J. 15 (1), 39–49, http://dx.doi.org/10.2118/119657-PA.

Okuno, R., Johns, R.T., Sepehrnoori, K., 2010b. Three-phase flash in compositionalsimulation using a reduced method. SPE J. 15 (3), 689–703, http://dx.doi.org/10.2118/125226-PA.

Pan, H., Firoozabadi, A., 2002. Fast and robust algorithm for compositionalmodeling: part I – stability analysis testing. SPE J. 7 (1), 78–89, http://dx.doi.org/10.2118/77299-PA.

Pan, H., Firoozabadi, A., 2003. Fast and robust algorithm for compositionalmodeling: part II – two-phase flash computations. SPE J. 8 (4), 380–391, http://dx.doi.org/10.2118/87335-PA.

Pan, H., Tchelepi, H.A., 2010. Reduced-variables method for general-purposecompositional reservoir simulation. Paper Presented at the CPS/SPE Interna-tional Oil & Gas Conference and Exhibition in China, Beijing.

Perschke, D.R., Chang, Y-.B., Pope, G.A., Sepehrnoori, K., 1989. Comparison of phasebehavior algorithms for an equation-of-state compositional simulator. SPE J.

Peng, D.-Y., Robinson, D.B., 1976. A new two-constant equation of state. Ind. Eng.Chem. Fundam. 15 (1), 59–64.

Wilson, G., 1969. A Modified Redlich–Kwong Equation of State, Application toGeneral Physical Data Calculations. Paper Presented at AlChe 65th NationalMeeting.

S.E. Gorucu, R.T. Johns / Journal of Petroleum Science and Engineering 116 (2014) 50–5858