on two flash methods for compositional reservoir...
TRANSCRIPT
-
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
32nd IEA EOR Annual Symposium & Workshop
-
2
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
-
3
� “Blind” calculations without a priori information
� Two steps
� Stability analysis: whether the feed splits into two phases?
� 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
The phase of composition z is stable at the specified (T,P) if and only if the tangent plane distance (TPD)
Conventional flash
Michelsen, M. L. (1982a & b) Fluid Phase Equilibria 9: 1–19 & 21-40.
Michelsen and Mollerup (2007) Thermodynamic models: Fundamentals and Computational Aspects
( )( )( ) ln ln ( ) ln ln 0i i i i ii
tpd w w zϕ ϕ= + − − ≥∑w w z
-
4
� Compositional simulations where information from previous calculations may be utilized (NF, x, tpd, …)
� Distinction between different regions by TPD
Shadow region method
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
Shadow region
Rasmussen et al. (2006) SPE Res Eval & Eng 9: 32 – 38.
Michelsen and Mollerup (2007) Thermodynamic models: Fundamentals and Computational Aspects.
-
5
� CSP/CST/CSAT
� inspired by the 1D analytical solution of gas injection—a 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
Compositional Space Adaptive Tabulation (CSAT) method
Voskov and Tchelepi (2007) SPE 106029
Voskov and Tchelepi (2008) Transport in Porous Media 75: 111–128.
2( (1 ) )k ki i i
i
z y xβ β ε − + −
-
6
� Only for phase split step to approximate flash results in two-phase region
� A unique distance for each tie-line
� Shortest distance ( ) from the feed z to tie-line k
� The corresponding β is readily obtained as
� 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.
Tie-line Table Look-up (TTL)—our implementation of CSAT
( )( )( )β β= = − + −∑ 22( ) min 1k k k ki i ii
e d z y x dk tie-line distance
( ) ( )( ) ( )
Tk k k
Tk k k kβ
− −=
− −
z x y x
y x y x
=k kd e
Eq.(5)
-
7
Gas injection systems tested
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*
T (K) 375.00 358.15 358.15 358.15
P (atm) 300 140 200 230
EoS used SRK PR PR PR
* 12-component fluid description from Jessen (2000) Ph.D. thesis or Orr (2007) Gas Injection Processes.
� Tested with 1-D slimtube simulation with 500 cells
-
8
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
� Larger M increases simulation time and %skips� Smaller ε increases simulation time but decreases %skips� Sorting tie-lines gives limited help
ε =10-4 ε =10-5 ε =10-6 ε =10-7
M = 100 Time (sec) 4.2 7.0 7.1 7.1
% skips 41% 0.1% 0.0% 0.0%
M = 500 Time (sec) 2.0 18.1 21.2 21.5
% skips 99.9% 10% 0.3% 0.2%
M = 1000 Time (sec) 2.0 28.8 37.3 38.3
% skips 99.9% 18% 0.9% 0.4%
M = 5000 Time (sec) 2.0 66.4 134.8 157.2
% skips 99.9% 64.7% 25.8% 7%
Decreasing ε
Incr
easi
ng M
-
9
Analysis of CSAT using System 1
� ε=10-4 not accurate; ε =10-6 or 10-7 too few skips.� Higher M requires even smaller ε
ε =10-4 ε =10-5 ε =10-6 ε =10-7
M = 1000 Time (sec) 2.0 28.8 37.3 38.3% skips 99.9% 18% 0.9% 0.4%
0
0.2
0.4
0.6
0.8
1
0 50 100 150 200 250 300 350 400 450 500
Ga
s sa
tura
tio
n
Cell number
Accurate solution
CSAT M=1000 eps=1E-4
CSAT M=1000 eps=1E-5
CSAT M=1000 eps=1E-6
CSAT M=1000 eps=1E-7
-
10
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
0
0.2
0.4
0.6
0.8
1
0 50 100 150 200 250 300 350 400 450 500
Ga
s sa
tura
tio
n
Cell number
Accurate solution
CSAT-PRE eps=1E-4
CSAT-PRE eps=1E-5
CSAT-PRE eps=1E-6
CSAT-PRE eps=1E-7
0
10
20
30
40
50
60
70
80
90
100
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Re
cov
ery
(%
)
PVI
Accurate solution
CSAT-PRE eps=1E-4
CSAT-PRE eps=1E-5
CSAT-PRE eps=1E-6
CSAT-PRE eps=1E-7
Gas saturation Recovery
-
11
System 1: simulation times
PVI=0.5 PVI=1.2Time(sec)
Directapproximation in
two-phase*
Time(sec)
Directapproximation in two-phase*
Conventional/Full stability
47.4 163.3
TTLM=100, ε =10-5 7.0 0.1% 28.0 0.02%M=500, ε =10-6 21.2 0.3% 91.6 0.06%M=1000, ε =10-6 37.3 0.9% 166.0 0.18%M=5000, ε =10-7 157.2 7% 731.5 1.5%
TTL-PRE(three tielines)
ε =10-4 2.5 49% 6.4 63%ε =10-5 2.6 46% 6.5 61%ε =10-6 2.7 45% 8.5 60%ε =10-7 2.8 37% 10.1 22%
Shadow region 3.2 10.9* Reported numbers are percentages of total flashes in two-phase region
-
12
� Just compare one tie-line in the same cell from a previous rigorous flash using tie-line distance.
� Procedure
Tie-line Distance Based Approximation (TDBA)—an alternative and simpler
� Calculate ek as before (only one)
� If e>ε, do new flash, and update the tie-line if it is two-phase
� If ee>10-4ε, use the previous results with adjustment
( )1i
ii i old
y
y x
βθβ β
= + − ,i i new iv z θ= ( ), 1i i new il z θ= −
� Option 1 (TDBA1): use old K values to solve Rachford-Rice Eq.
� Option 2 (TDBA2): use vapor split factors θi to adjust directly
-
13
System 1: simulation times
* Reported numbers are percentages of total flashes in two-phase region
PVI=0.5 PVI=1.2Time(sec)
Approx. with adjustment
in two-phase*
Directapproximation in two-phase*
Time(sec)
Approx. with adjustment
in two-phase*
Directapproximation in two-phase*
Conventional/Full stability
47.4 163.3
TTL-PRE(three tielines)
ε =10-4 2.5 49% 6.4 63%ε =10-7 2.8 37% 10.1 22%TDBA1ε =10-4 1.5 84% 11% 3.5 86% 12%ε =10-5 1.7 76% 11% 3.9 84% 11%ε =10-6 2.0 68% 8% 4.7 79% 10%ε =10-7 2.3 58% 7% 5.6 72% 10%TDBA2ε =10-4 1.4 84% 11% 3.2 85% 13%ε =10-5 1.7 77% 10% 3.7 83% 11%ε =10-6 2.0 67% 9% 4.4 78% 11%ε =10-7 2.3 59% 6% 5.3 73% 9%
Shadow region 3.2 10.9
-
14
0
0.2
0.4
0.6
0.8
1
0 50 100 150 200 250 300 350 400 450 500
Ga
s sa
tura
tio
n
Cell number
Accurate solution
TDBA1 eps=1E-4
TDBA1 eps=1E-5
TDBA1 eps=1E-6
TDBA1 eps=1E-7
0
10
20
30
40
50
60
70
80
90
100
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Re
cov
ery
(%
)
PVI
Accurate solution
TDBA1 eps=1E-4
TDBA1 eps=1E-5
TDBA1 eps=1E-6
TDBA1 eps=1E-7
Accurate solution
TDBA1 ε=10-6
TDBA1 ε=10-4
TDBA1 ε=10-5
TDBA1 ε=10-7
Accurate solution
TDBA1 ε=10-6
TDBA1 ε=10-4
TDBA1 ε=10-5
TDBA1 ε=10-7
Cell#
Gas saturation
PVI
Recovery (%)
TDBA1 results for System 1
-
15
� 6-component gas injection simulated by PC-SAFT and SRK
� Speed-up 1: SPE 142995 (solid�dashed )
� Speed-up 2: TDBA1 (dashed�dash-dot)
TDBA’s potential : speeding up complicated EoS’s
0.0
1.0
2.0
3.0
4.0
5.0
6.0
7.0
8.0
0 5 10 15 20 25 30
Sim
ula
tio
n t
ime
ra
tio
Number of components
CPA
PC-SAFT
CPA new
PC-SAFT new
CPA+TDBA w.r.t. SRK+TDBA
PC-SAFT+TDBA w.r.t. SRK+TDBA
CPA+TDBA w.r.t. SRK
PC-SAFT+TDBA w.r.t. SRK
0
20
40
60
80
100
120
140
160
180
0 5 10 15 20 25 30
Sim
ula
tio
n t
ime
(se
c)
Number of components
SRK
CPA
PC-SAFT
CPA new
PC-SAFT new
SRK+TDBA
CPA+TDBA
PC-SAFT+TDBA
-
16
Summary on approximation methods
� CSAT/TTL saves the time for rigorous flash but managing the tie-line 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 EoS’s.
-
17
Reduced variables methods—basics
� Solution procedure for equilibrium calculations with a cubic EoSwhere the matrix of BIP’s is of low rank
If all BIPs are zero, and
Consequently, the vector of can be written as a linear combination of 3 pre-calculated vectors, with i’th elements 1, and bi. Same applies to the lnKi.
( )
nRT AP
V B V V B= −
− +C
i ii
B b n=∑C C
ij i ji j
A a n n=∑∑ (1 )ij ii jj ija a a k= −
ˆln i n a i b iC C A C bϕ = + +
2C
i ii ij jj
A a a n= ∑
2C
i ij jji
AA a n
n
∂= =∂ ∑
*ˆln i n a ii b iC C a C bϕ = + +
ˆln iϕiia
-
18
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)
-
19
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 Michelsen’s existing code without extensive modifications!
-
20
Reduced variables by spectral decomposition
� Consider the matrix P with elements Pij=1-kij. We calculate the spectral decomposition
where is the k’th 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 >
-
21
Cont’d
� We then get and
and with
� Net results
� Vector of : Linear combination of 2m + 3 vectors
� Results identical to full approach
� Computational effort reduced from C2 to 2CM plus overhead!
� Successive substitution
� 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
1
MT
k k kk
λ=
=∑P u u1 1
M M
ij k ii ik jj jk k ik jkk k
a a u a u e eλ λ= =
= =∑ ∑
1 1 1 1
2 2C M C M
i ij j k ik jk j k ikk k j k
A a n e e n d eλ= = = =
= = =∑ ∑ ∑ ∑1
2C
k k jk jj
d e nλ=
= ∑
ˆln iϕ
-
22
Second order Gibbs energy minimization
� Independent variables c1, c2, …, and cM+2� Gradient
or
where is vapor moles i and (from Rachford-Rice equation)
� Hessian
Wij looks complex to calculate, but simple algebraic expressions for the elements can be derived.
iv
2
1
lnM
i l ill
K c e+
=
= ∑ , 1 1i Me + = , 2i M ie b+ =
1
Ci
ij i j
vG G
c v c=
∂∂ ∂=∂ ∂ ∂∑
c =g Wg
c T≈H WHW
/ij i jW v c= ∂ ∂
-
23
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?
-
24
Alternative simplification: sparse k
where
and
� Uses approximately 2mC multiplications.
1
(1 ) ( )C
ii jj ij j ii ij
a a k n a S S=
− = −∑
1
C
jj jj
S a n=
=∑
1
1
C
jj ij jj
i m
jj ij jj
a k n i m
S
a k n i m
=
=
≤= >
∑
∑
-
25
Test examples
� Example 1—Modified 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 2—Removal 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.
-
26
Test example 1
-
27
Test example 2
-
28
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
� 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.
-
29
Acknowledgment
Danish Council for Technology and Production Sciences