Vous êtes sur la page 1sur 29

32nd IEA EOR Annual Symposium & Workshop

On Two Flash Methods for Compositional


Reservoir Simulations: Table Look-up and
Reduced Variables
Wei Yan, Michael L. Michelsen, Erling H. Stenby, Abdelkrim Belkadi
Center for Energy Resources Engineering (CERE)
Technical University of Denmark
October 18, 2011

Introduction


Flash: for a mixture of composition z, will it split into two (or more)
phases at specified T and P and what are the phase compositions
and phase amounts?

A summary of two recent studies:


 CSAT(table look-up):
Belkadi et al., Comparison of two methods for speeding up
flash calculations in compositional simulations, SPE 142132
 compared with the shadow region method


Reduced variables/reduction methods:


Michelsen, M.L., Reduced variables - revisited, CERE
Discussion Meeting 2011
 compared with the conventional flash

Conventional flash



Blind calculations without a priori information


Two steps
 Stability analysis: whether the feed splits into two phases?
The phase of composition z is stable at the specified (T,P)
if and only if the tangent plane distance (TPD)

tpd (w ) = wi ( ln wi + ln i ( w ) ln zi ln i ( z ) ) 0
i




Phase split: calculate the equilibrium compositions using the


initial estimates from the first step

Old but robust, virtually no convergence problems


More on safety than speed

Michelsen, M. L. (1982a & b) Fluid Phase Equilibria 9: 119 & 21-40.


Michelsen and Mollerup (2007) Thermodynamic models: Fundamentals and Computational Aspects
3

Shadow region method





Compositional simulations where information from previous


calculations may be utilized (NF, x, tpd, )
Distinction between different regions by TPD
Shadow
region

A. Unstable: one or two


negative TPD
B. Just stable: one trivial and
one non trivial TPD=0
C. Single phase: one trivial and
one non trivial TPD>0
D. Single phase: only trivial
solutions

Rasmussen et al. (2006) SPE Res Eval & Eng 9: 32 38.


Michelsen and Mollerup (2007) Thermodynamic models: Fundamentals and Computational Aspects.
4

Compositional Space Adaptive


Tabulation (CSAT) method


CSP/CST/CSAT
 inspired by the 1D analytical solution of gas injectiona
few key tie-lines in the solution path.
 CSP based table look-up approach to replace stability
test/phase split

Procedure
 Tie-line tables constructed either in advance or adaptively
 For a new feed z
Vapor fraction
Criterion

z j x kj

k tieline index
j component index arbitrarily chosen

y x
2
k
k

y
+
(1

)
x
)
i
i
i <
k
j

k
j

if one of the stored tie-lines satisfies these criteria for the composition of interest,
the table is used to look up the flash results. Otherwise, a standard EOS based
phase behavior procedure is employed.
Voskov and Tchelepi (2007) SPE 106029
Voskov and Tchelepi (2008) Transport in Porous Media 75: 111128.
5

Tie-line Table Look-up (TTL)


our implementation of CSAT


Only for phase split step to approximate flash results in twophase region

A unique distance for each tie-line


k
k
 Shortest distance ( d = e ) from the feed z to tie-line k

( (

e = (d ) = min zi y + (1 ) x
k

k 2

z x ) (y x )
(
=
(y x ) (y x )
k

k
i

))

dk tie-line distance

The corresponding is readily obtained as


k T

k
i

k T

Eq.(5)

If ek<, accept tie-line k as flash solution, and


calculated from Eq.(5)
If ek> for all the M tie-lines in the table, flash the
composition and update the tie-line table if it is two-phase.

Gas injection systems tested




Tested with 1-D slimtube simulation with 500 cells

System 1

System 2

System 3

System 4

Oil

13-component oil

Zick Oil 1*

Zick Oil 2*

Zick Oil 3*

Gas

0.8 CO2+ 0.2 C1

Zick Gas 1*

Zick Gas 2*

Zick Gas 3*

375.00

358.15

358.15

358.15

P (atm)

300

140

200

230

EoS used

SRK

PR

PR

PR

T (K)

* 12-component fluid description from Jessen (2000) Ph.D. thesis or Orr (2007) Gas
Injection Processes.

Analysis of CSAT using System 1




The influence of number of tie-lines M and the tolerance on


simulation time and %skips of flash calculations
Decreasing

M = 100

Increasing M

M = 500
M = 1000
M = 5000

Time (sec)
% skips
Time (sec)
% skips
Time (sec)
% skips
Time (sec)
% skips

=10-4
4.2
41%
2.0
99.9%
2.0
99.9%
2.0
99.9%

=10-5
7.0
0.1%
18.1
10%
28.8
18%
66.4
64.7%

=10-6
7.1
0.0%
21.2
0.3%
37.3
0.9%
134.8
25.8%

=10-7
7.1
0.0%
21.5
0.2%
38.3
0.4%
157.2
7%

 Larger M increases simulation time and %skips


 Smaller increases simulation time but decreases %skips
 Sorting tie-lines gives limited help
8

Analysis of CSAT using System 1


1
Accurate solution
CSAT M=1000 eps=1E-4

0.8

Gas saturation

CSAT M=1000 eps=1E-5


CSAT M=1000 eps=1E-6

0.6

CSAT M=1000 eps=1E-7

0.4

0.2

0
0

50

100

150

200

250

300

350

400

450

500

Cell number

M = 1000

Time (sec)
% skips

=10-4
2.0
99.9%

=10-5
28.8
18%

=10-6
37.3
0.9%

 =10-4 not accurate; =10-6 or 10-7 too few skips.


 Higher M requires even smaller
9

=10-7
38.3
0.4%

TTL with pre-calculated tie-lines


(TTL-PRE)
The tie-line table can be calculated in advance to reduce
simulation time
 Use M = 20000 and = 10-8 to find the most frequently
used tie-lines during the simulation.
 3 tie-lines are identified, accounting for 88% of hits

100

Gas saturation
0.8

Accurate solution

90

CSAT-PRE eps=1E-4

80
70

CSAT-PRE eps=1E-6

0.6

Recovery (%)

Gas saturation

CSAT-PRE eps=1E-5

Recovery

CSAT-PRE eps=1E-7

0.4

Accurate solution

60

CSAT-PRE eps=1E-4
50
CSAT-PRE eps=1E-5
40
CSAT-PRE eps=1E-6
30
CSAT-PRE eps=1E-7
20

0.2

10
0

0
0

50

100

150

200

250

Cell number

10

300

350

400

450

500

0.2

0.4

0.6

0.8

PVI

1.2

1.4

1.6

1.8

System 1: simulation times


PVI=0.5
Time
(sec)
Conventional/
Full stability
TTL
M=100, =10-5
M=500, =10-6
M=1000, =10-6
M=5000, =10-7
TTL-PRE
(three tielines)
=10-4
=10-5
=10-6
=10-7
Shadow region

PVI=1.2

Direct
approximation in
two-phase*

47.4

Time
(sec)
163.3

7.0
21.2
37.3
157.2

0.1%
0.3%
0.9%
7%

28.0
91.6
166.0
731.5

0.02%
0.06%
0.18%
1.5%

2.5
2.6
2.7
2.8
3.2

49%
46%
45%
37%

6.4
6.5
8.5
10.1
10.9

63%
61%
60%
22%

* Reported numbers are percentages of total flashes in two-phase region


11

Direct
approximation
in two-phase*

Tie-line Distance Based Approximation


(TDBA)an alternative and simpler


Just compare one tie-line in the same cell from a previous


rigorous flash using tie-line distance.

Procedure
 Calculate ek as before (only one)
 If e>, do new flash, and update the tie-line if it is two-phase
 If e<10-4, use the previous results as a solution without any
adjustment
 If >e>10-4, use the previous results with adjustment
 Option 1 (TDBA1): use old K values to solve Rachford-Rice Eq.
 Option 2 (TDBA2): use vapor split factors i to adjust directly

yi

vi = zi ,new i

+
1

y
x

(
)
i old
i

i =
12

li = zi ,new (1 i )

System 1: simulation times


Time
(sec)
Conventional/
Full stability
TTL-PRE
(three tielines)

47.4

=10-4
=10-7
TDBA1
=10-4
=10-5
=10-6
=10-7
TDBA2
=10-4
=10-5
=10-6
=10-7
Shadow region

2.5
2.8

PVI=0.5
Approx. with
adjustment
in two-phase*

Direct
approximation
in two-phase*

Time
(sec)

PVI=1.2
Approx. with
adjustment
in two-phase*

163.3

49%
37%

6.4
10.1

63%
22%

1.5
1.7
2.0
2.3

84%
76%
68%
58%

11%
11%
8%
7%

3.5
3.9
4.7
5.6

86%
84%
79%
72%

12%
11%
10%
10%

1.4
1.7
2.0
2.3
3.2

84%
77%
67%
59%

11%
10%
9%
6%

3.2
3.7
4.4
5.3
10.9

85%
83%
78%
73%

13%
11%
11%
9%

* Reported numbers are percentages of total flashes in two-phase region


13

Direct
approximation
in two-phase*

TDBA1 results for System 1

100

90

Accurate solution

Recovery
Recovery (%) (%)

Gas
saturation
Gas saturation

80

TDBA1 eps=1E-4

0.8

TDBA1 eps=1E-5
0.6

TDBA1 eps=1E-6

Accurate solution

TDBA1 eps=1E-7

TDBA1 =10-4
0.4

TDBA1

0.2

=10-5

70

Accurate solution
TDBA1 eps=1E-4
50

TDBA1 =10-4TDBA1 eps=1E-5


40

TDBA1 =10-5TDBA1 eps=1E-6

TDBA1 =10-6

30

=10-7

20

TDBA1

Accurate solution

60

TDBA1 =10-6

TDBA1 eps=1E-7

TDBA1 =10-7
10

0
0

50

100

150

200

250

Cell number

300

Cell#

14

350

400

450

500

0.2

0.4

0.6

0.8

PVI

PVI

1.2

1.4

1.6

1.8

TDBAs potential : speeding up


complicated EoSs


6-component gas injection simulated by PC-SAFT and SRK


CPA

180

SRK
CPA
PC-SAFT
CPA new
PC-SAFT new
SRK+TDBA
CPA+TDBA
PC-SAFT+TDBA

140
120
100
80

PC-SAFT
CPA new

7.0

Simulation time ratio

160

Simulation time (sec)

8.0

60

CPA+TDBA w.r.t. SRK+TDBA

6.0

PC-SAFT+TDBA w.r.t. SRK+TDBA


5.0

CPA+TDBA w.r.t. SRK


PC-SAFT+TDBA w.r.t. SRK

4.0
3.0

40

2.0

20

1.0

PC-SAFT new

0.0

10

15

20

25

30

Number of components



15

Speed-up 1: SPE 142995


Speed-up 2: TDBA1

10

15

20

Number of components

(soliddashed )
(dasheddash-dot)

25

30

Summary on approximation methods




CSAT/TTL saves the time for rigorous flash but managing the tieline table can be a significant overhead.
 The simulation time increases dramatically with the number
of tie-lines used. Big tolerances lead to inaccurate results.

TTL-PRE is better but gives limited speeding-up compared with


the shadow region algorithm.

TDBA is simpler and cuts the simulation time by 1/3 to 1/2.

The approximation methods may have potential to speed up


simulation with complicated EoSs.

16

Reduced variables methodsbasics




Solution procedure for equilibrium calculations with a cubic EoS


where the matrix of BIPs is of low rank

P=
C

B = bi ni

nRT
A

V B V (V + B)
C

A = aij ni n j

aij = aii a jj (1 kij )

C
A
= 2 aij n j
Ai =
ni
j

ln i = Cn + Ca Ai + Cb bi
C

If all BIPs are zero, Ai = 2 aii aij n j and


j

ln i = Cn + Ca* aii + Cbbi


Consequently, the vector of ln i can be written as a linear combination of
3 pre-calculated vectors, with ith elements a1,
and bi. Same
ii
applies to the lnKi.
17

A brief history


First - to our knowledge - used 30 years ago by Michelsen and


Heideman (1981) for critical point calculation

Suggested for flash calculations by Michelsen (1986)

Single nonzero BIP row/column, Jensen and Fredenslund (1987)

Generalized for nonzero BIPs by Hendriks (1992)

Extensively used in the generalized version for the last 20 years

Its advantages first questioned in public by Haugen and Beckner


in 2011 (SPE 141399)

18

Arguments against reduced variables








Essentially restricted to the cubic EOS


Difficult to be formulated as unconstrained minimization problems
consequently, less safe.
More cumbersome composition derivatives
The simple algebraic operations required to evaluate Ai are today very
inexpensive (SIMD)
Our experience: Effort of the conventional approach grows
approximately linearly with C , not proportionally with C2 or C3.

A fair comparison between minimization based reduced variables


method and conventional flash requires substantial coding (perhaps
modest potential for improvement)

But recent development by Nichita and Graciaa (2010) enabled an


adaption to Michelsens existing code without extensive modifications!

19

Reduced variables by spectral


decomposition


Consider the matrix P with elements Pij=1-kij. We calculate the


spectral decomposition
C

P = k u k u k T
k =1

where k is the kth eigenvalue of P and u the corresponding


eigenvector. The eigenvalues are numbered in decreasing
magnitude. Assume now that the eigenvalues are negligible for k
> M where M << C. For example:
All BIPs equal to zero: M=1
Upper triangle of BIPs zero except for a few rows, i.e.,

kij = 0 for i > m and j > i


In this case, M = 2m + 1 and the match is exact

20

Contd
M

We then get P = k u k u k

and

k =1

k =1

k =1

aij = k aii uik a jj u jk = k eik e jk


M

and Ai = 2 aij n j = 2 k eik e jk n j = d k eik


k =1

k =1

d k = 2k e jk n j
j =1

Vector of ln i : Linear combination of 2m + 3 vectors


Results identical to full approach
Computational effort reduced from C2 to 2CM plus overhead!

Successive substitution





21

j =1

with

Net results




k =1

Conventional implementation, where the reduction method is only


implemented to calculate Ai
Acceleration as usual
No effect on convergence behavior
Used for stability analysis, as well as for phase split

Second order Gibbs energy minimization


ln Ki =



M +2

ce
l =1

l il

ei , M +1 = 1

ei , M + 2 = bi

Independent variables c1, c2, , and cM+2


Gradient
G C G vi
or g c = Wg
=
c j i =1 vi c j

where vi is vapor moles i and Wij = vi / c j (from Rachford-Rice equation)




Hessian

Hc WHWT

Wij looks complex to calculate, but simple algebraic expressions for the
elements can be derived.

22

Procedure for the 2nd order minimization










Calculate the K-factors from c


Solve the Rachford-Rice equation to get vi
Calculate conventional gradient and Hessian
Calculate transformation matrix W
Calculate c-based gradient and Hessian
Calculate corrected c using trust-region approach
Similar procedure for Stability Analysis

How does it compare to the classic approach?

23

Alternative simplification: sparse k


C

j =1

where

aii a jj (1 kij )n j = aii ( S Si )


C

S = a jj n j
j =1

and

24

C
a jj kij n j
j =1
Si = m

a jj kij n j

j =1

im
i>m

Uses approximately 2mC multiplications.

Test examples


Example 1Modified SPE3 with 9 components. Modified such that


all kij = 0 for i > 3, j > 3. Non-zero interaction coefficients for N2,
CO2 and CH4.

Example 2Removal of N2 and CO2. Only CH4 has nonzero BIPs.


Phase diagram largely unmodified, as the content of the removed
species was small. Only 5 variables in the reduced case!

In both tests, the mixture was expanded to 27 or 25 components


by subdividing the last species.

One million flash calculations in an equidistant 1000 by 1000 grid in


T and P. All calculations are blind. About 60% two-phase.

25

Test example 1

26

Test example 2

27

Summary on reduced variables




Modest effect of increasing C: Linear, but less than proportional

No advantage of reduction methods over alternatives

Fastest result: utilize sparsity of BIP-matrix

Computing times are in general very implementation dependent





28

Other implementations of reduction methods might be more efficient


than the one used here.
To be convincing, they should be able to beat the current computing
times.

Acknowledgment

Danish Council for Technology


and Production Sciences

29

Vous aimerez peut-être aussi