Etienne MOREAU
General Overview
Solving
Equations
Equations
Equations
Solutions
General Overview
IMPES Scheme
Implicit Schemes
Numerical
General Overview
Diffusivity Equation
Transport Equation
General Equations
Numerical
General Overview
Diffusivity Equation
Transport Equation
General Equations
Mathematical
Outline
22
33
Mathematical Equations
General Overview
Mathematical Equations
44
55
Mathematical Equations
Diffusivity Equation
c = Fluid compressibility
= Fluid Density
P = Fluid Pressure
Hypothesis
X=0
1 d
c=
= Cte
dP
X=L
66
{Q(x ) Q(x + dx )} dt
= d( A dx )
t = Time
= Fluid Density
x = Distance along the flow line
= Reservoir Porosity
k A dP
Q(x) =
dx
77
Diffusivity Equation
dt
) dP A dx dt
k 2P
P
= (c p + c f )
x 2
t
d ( A dx ) = ( c p + c f
d
d
+ A dx dt
d ( A dx ) =
dt
dt
dP
d d dP
dP
d d dP
;
=
= cp
=
= cf
dt
dt dP dt
dt
dt dP dt
Accumulation Term
k A 2P
Q
{Q(x ) Q(x + dx )} dt =
dx dt =
dx dt
x
x 2
Flow Term
88
2 P P
=0
x 2 t
;
K=
k
= Hydraulic Diffusivity
c
2 P c P
=0
k t
x 2
, k = Reservoir Porosity & Permeability
= Fluid Viscosity , c = total Compressibility (pores + fluid)
----------
Hypothesis
99
2 P P
=0
x 2 t
;
K=
K
2D Flow (rectangular coordinates)
2 P 1 P P
K
+
=0
2
r r t
r
2 P 2 P P
K
+
=0
2
y 2 t
x
k
= Hydraulic Diffusivity
c
110
111
P
=0
t
Semi Steady State Solution
P
= Cte
t
Transient Solution
2P
= Cte
K
x 2
2 P P
=
x 2 t
Initial conditions
Boundary conditions
P
Cte
t
2P
=0
x 2
112
P
2P
=K
=0
t
x 2
Boundary Conditions
P (0, t ) = a
;
P
(0, t ) = b
x
P
(1, t ) = b
x
P (1, t ) = a + b
P (x, t ) = a + b x
113
114
115
Boundary Conditions
P
(0, t ) = b
x
P (0, t ) = a + c t
P
c
(
1, t ) = b +
x
K
c
+ct
2K
P (1, t ) = a + b +
P
2P
P
c
=K 2 =c
= b + x + f (t )
t
x
x
K
c 2
P (x, t ) = a + b x +
x +ct
2K
116
117
118
Example 1
P
(
0, t ) = Cte ; P(L, t ) = Pi
x
Example 2
119
220
221
222
Transport Equation
Mathematical Equations
223
224
Hypothesis
X=0
o = Oil Density
o = Cte
w = Water Density
w = Cte
X=L
225
= w A d(Sw dx )
w {Q w (x ) Q w (x + dx )} dt
Q w (x ) = Water Flow
f w (x ) = Water Fractional flow
f o (x ) = Oil Fractional flow
= Reservoir Porosity
w , Sw = Water Density & Saturation
Q (x )
f (x ) = w
w
Q
f o (x ) = 1 f w (x )
226
Flow Term
Sw
dx dt
t
f w f w Sw
=
x Sw x
w {Q w (x ) Q w (x + dx )} dt = w Q
Accumulation Term
w d(A Sw dx ) = w A
Transport Equation
Sw
Q f w Sw
=0
A Sw x
t
EP Reservoir Simulation Main Equations - E.M
f w
dx dt
x
227
Sw
Q f w Sw
=0
A Sw x
t
Hypothesis
228
Pc
M
kA
z
w,
o
w
fw =
+
Mw
+ (w o ) g
Mw + Mo Q
x
x
Fractional Flow
z
P
Q = k A M o g
o
o
o
x
x
P Pc o,w
z
Q = k A M o
g
w
x
x
x
Flow Equations
229
Mw
=
Mw + Mo
w,m
Pcw,o
kA
Mw
Q
x
kA
z
Mw (w o ) g
Q
x
f w,p =
f w,g =
Gravity term
Capillary term
Mobility term
330
331
332
333
S (x, t ) = Cte
w
Q df w U df w
Sw
=
=
x A dSw dSw
dx
Sw
=
t
dt
Sw
S
dx + w dt = 0
x
t
Sw
Q f w Sw
=0
t
A Sw x
334
1
0.8
0.6
0.4
0.2
0
Injector
Front
Residual oil
Producer
336
2,5
1,5
0,5
0
0,2
0,6
W/O Mobilities
0,4
Mw
Water Saturation
Mow
0,8
ratio
M = Mw / Mo
M = 0,500 / 2,286
M = 0,22
Mobility
Sw = 1 -Sorw = 75%
Mw = 0,500 cP-1
So = 1 - Swc = 78%
Mo = 2,286 cP-1
335
Water saturation
Injector
Mixed zone
Front
Producer
1
0.8
0.6
0.4
0.2
0
f (S )
df w
= w w,f
dSw Sw,f Sw,c
dx U df w U f w (Sw,f )
=
=
dt dSw Sw,f Sw,c
1
dx Water Velocity at front U f w (Sw,f )
=
=
Sw,f Sw,c
Oil Displaced at front
dt
338
337
Water saturation
2,5
1,5
0,5
0
0
0,2
0,6
W/O Mobilities
0,4
Mow
0,8
Mw
water saturation
oil saturation
ratio
M = Mw / Mo
M = 0,500 / 2,286
M = 0,22
Mobility
Sorw = 25%
Mw = 0,500 cP-1
Residual
Swc = 22%
Mo = 2,286 cP-1
Connate
339
0,8
0,6
0,4
0,2
Krw
0,6
Fw
Water Saturation
0,4
0,2
Krow
0,8
Welge
So = 1 - Swc = 78%
Mo = 2,286 cP-1
recovery @ front
ratio @ front
M* = (Mw*+Mo*) / Mo
M* = 0,261 / 2,286
M* = 0,11
Mobility
Microscopic
Swf = 66%
Mw* = 0,232 cP-1
Mo* = 0,029 cP-1
Oil
440
1 Swc Sorw
1 Swc
kr
Mo = o
o
fw =
1 Swc So min
1 Swc
E' m =
Mw
Mw + Mo
kr
Mw = w
w
Em =
441
442
General Equations
Mathematical Equations
443
444
445
Oil Saturation
Gas Pressure
Pg = Po + Pc g,o (Sg )
Pw = Po Pc w,o (Sw )
Water Pressure
S o = 1 S w Sg
446
ab
g
ab
w
= m oa
= m aw
+ Q g,abd ) = m ga + m g,a d
(Q
ab
o
447
448
Oil Saturation
Gas Pressure
Pg = Po + Pc g,o (Sg )
Pw = Po Pc w,o (Sw )
Water Pressure
S o = 1 S w Sg
449
i =1
i =1
x = y
ab
p,o
=1 ;
+ Q
ab
p,g
x =
p
(S
+ Sg ) z p
So + Sg K p
= m ap,o + m ap,g
ab
w
= m aw
Q
b
yp = K p x p
p = 1 to N
550
551
Numerical Equations
General Overview
Space Discretisation
Space Discretisation
First Derivative
f
f
x
x
2f
f
i + 12 x i 12 f i +1 2f i + f i 1
(
xi ) =
=
(x i ) x
x 2
x x
x
x 2
Second Derivative
f
f (x i +1 ) f (x i )
f
f (x i ) f (x i-1 )
(
(
xi ) =
or
x
i)=
x
x
x
x
552
Time Discretisation
Time Discretisation
First Derivative
;
implicit schema
explicit schema
Diffusivity Equation
Numerical Equations
f
f (t ) f (t n )
(
t n ) = n +1
t
t
f (t ) f (t n )
f
(
t n +1 ) = n +1
t
t
553
554
2 P c P
=0
k t
x 2
Space Discretisation
555
Space Discretisation
2 P c P
=0
k t
x 2
P
P
x 1
P
2P
x i+ 2 x
(
x )=
(x i )
i
x x
x
x 2
P i P i 1 P i + 1
2P
1 P Pi
(
xi)
i +1
=
x
x
x
x 2
2P i + P i 1
x 2
i 12
556
Explicit: k=n
with k = n or k = n + 1
Pi (n +1) Pi(n)
K
Pi(n+1+1) 2Pi(n +1) + Pi(n1+1) = 0
t
x 2
K t (n +1) K t (n +1)
K t
Pi 1 = Pi(n)
P (n +1) + 1 + 2
Pi
i
1
+
x 2
x 2
x 2
Implicit: k=n+1
Pi(n +1) =
+ Pi(n)
Pi(n)
+1 2Pi
1 = 0
t
x 2
K t
K t
K t
(n)
Pi(n)
Pi(n)
Pi +
+1 + 1 2
1
x 2
x 2
x 2
557
Explicit Scheme
2 P (n) P
i
K
= i (t n )
t
x 2
=P
(n)
i
n +1
n
Pi
(t ) Pi Pi
n
t
t
t
(n)
+K
Pi(n)
+ Pi(n)
+1 2Pi
1
x 2
(n +1)
i
Stability condition :
t x 1 2K
Reminder
558
Implicit Scheme
2 Pi(n +1) Pi
(t n )
K
=
t
x 2
Diffusivity equation becomes :
n +1
n
Pi
(t ) Pi Pi
n
t
t
Always Stable
t
t
t
(n
1)
+
K
P (n +1) + 1 + 2K
K
Pi(n+1+1) = Pi(n)
Pi
i
1
x 2
x 2
x 2
Reminder
559
t
K 2
x
t
1 + 2K 2
x
t
K 2
x
t
1 + 2K 2
x
t
K 2
x
*
t
K 2
x
*
t
x 2
*
t
1 + 2K 2
x
t
x 2
K
1 + K x 2
t
K 2
x
Pn
2 n 1
t
P2 K
G (t n )
P3
P3n 1
Pn =
Pin 1
K
P n 1
x 2 n
N
2
t PN 2
1 + 2K 2
t
n 1
x
n PN 1 + K (x )2 PD (t n )
PN 1
660
661
Numerical Equations
Transport Equation
f
S
S
U w w = w
Sw x
t
Space Discretisation
662
Space Discretisation
S (x ) Sw (x i 1 )
S
w
(
x )= w i
i
x
x
S
f Sw
U
= w
Sw x
t
663
Explicit Scheme
f w,(n)i
x
S
t
=S
(n)
w,i
S (nw,+i 1) S (n)
w,i
w,i
(
tn )
U t
+
f w,(n)i f w,(n)i-1
x
(n +1)
w,i
w,i
(
tn )
664
f w,(ni+1)
x
Implicit Scheme
S
w,i
(
tn )
S
t
S (nw,+i 1) S (n)
w,i
w,i
(
tn )
U t
f w,(ni+1) f w,(ni+-11) = S (n)
w,i
x
General Equations
Numerical Equations
(n +1)
w,i
665
666
I , J-1, K
I-1, J , K
I , J , K+1
I , J , K-1
I+1, J , K
I , J+1 , K
667
Bf
b =1
b =1
6
6
Kr ab
Q fa = Q fab = T ab f Pfb Pfa + f g z ab
f
ab
f
Krab
Q = f,s Tab f Pfb Pfa + f g zab
f
668
b =1
Q
Explicit Schema
t = m a = m a (t n +1 ) m a (t n )
n +1
ab
b =1
ab
m (t ) = m (t ) + Q (t ) t
b =1
n +1
b =1
t = m ap = m ap (t n +1 ) m ap (t n )
m (t ) Q (t ) t = m (t )
n +1
Implicit schema
ab
669
ab
p
770
Flow Term
6
Qoab = o s
Bo
6
Kr ab
T ab o Pob Poa + o g z ab
o
b =1
b =1
ab
o
Krab
Q = os Tab o Pob Poa + o g zab
Bo
o
771
of cell a
ma = Va Sa a
+ a o Pa + a a Sa
o
o
o
o
o
P
P
Accumulation Term
Va = volume
a = porosity
oa = oil density
Soa = oil saturation
moa = Va a oa Soa
772
Flow Term
6
Q = os
Bo
ab
o
= m oa
6
Kr ab
T ab o Pob Poa + o g z ab
o
b =1
b =1
Q
EP Reservoir Simulation Main Equations - E.M
ab
o
Accumulation Term
b =1
773
Flow Term
6
Qabw = w s
Bw
b =1
b =1
Accumulation Term
= m aw
Pw = Po Pc w,o
b =1
ab
w
6
Kr ab
T ab w Pob Pc bw,o Pwa + Pcaw,o + w g z ab
w
774
Free gas
Bg
T
ab
b
o
(P
Solution gas
))
ab
ab Kro
Pob Poa + o g zab = mga
o
ab
g
Kr
b=1
Rs T
b=1
g,s
( (
General Overview
Numerical Solutions
a
R
g
s
Pga
= Va ga Sga + gs R s Soa a + Va a Sga
+ Soa gs
P
P
+ Va aga Sga + Va ags Rs Soa
g,s
775
776
Centred difference
U U i 1
U = i +1
+R ;
2 x i
'
i
U i +1
U =
2U i + U i 1
+R
2i
'
i
x 2
i
U i(4)
12
x i2 '''
Ui
6
M (n +1) M (n)
M
w
w
w
avec M w = w,s V S w /B w
t
t
(k)
(k)
(k)
Fw Ti +1/2 (h)
Ti 1/2 (h)
Pi(k)
w,i +1/2 Pi +1 Pi
w,i 1/2 Pi
-1
Mathematical Expression
M w
Fw =
t
Flow term: Approximation by forward difference, at 1st order
777
Second Derivative
First Derivative
Derivative Approximation
78
U i +1
x
i
U i''
2
x i ''
Ui
2
U i +1 U i
+R
x i
U i 1 = U i x i U i' +
Forward difference
U i' =
Backward difference
U U i 1
U = i
+R
x i
1st order trun cation error
EP Reservoir Simulation Main Equations - E.M
'
i
x i2 '' x i3 '''
= U i + x i U i' +
U i + ...
U
i +
3!
2
x i2 '' x 3i '''
U
U i + ...
i
2
3!
779
Numerical Dispersion
1D analysis
Reduced in IMPES especially if time step lower than maximum time step.
Maximal for linear problem (Mt=1)
Decrease with the problem non-linearity; examples in 1D
homogeneous
880
S v
S
+ f' (S)
=0
t
x
S v
S
2S
+ f' (S)
+ D num
=0
t
x
x2
2S
v
v
E=
f' (S) x f' t
+ 0(( 2 ) + 0(( 2 )
2
Transport equation:
Numerical Dispersion
881
D num
v
v
=
f' (S) x + f' t
D num = 0 t =
num
Implicit Scheme
v
v
=
f' (S) x f' t
2
x
= t lim
vf'
882
EXPLICIT:
Time Schemes
For the pressure equation the stability conditions are too strong,
we always use
FIM
G(Pn,Pn+1,Sn,Sn+1)=0
an explicit scheme
Time Schemes
883
IMPLICIT:
For the pressure equation the stability conditions are too strong,
we always use
an explicit scheme
an implicit scheme
884
885
Numerical Solutions
IMPES Scheme
Oil Equation
E w = Vi
( So / Bo )
t
( Sw / Bw )
t
(n+1)
(n+1)
Fo = Ti+1/2 (n)
Ti1/2 o,(n)i-1 (Pi Pi1 )
= Eo
o,i (Pi +1 Pi )
(n)
( So / Bo ) (n+1)
Eo = Vi
(n+1)
(n+1)
Ti1/2 (n)
= Ew
Fw = Ti+1/2 (n)
w,i (Pi +1 Pi )
w,i-1 (Pi Pi 1 )
(n)
( Sw / Bw ) (n+1)
Water Equation
Assumptions
886
(n)
w,i
(P
i +1
(P
i +1
P )
P )
i
(n+1)
(n+1)
(n)
w,i-1
(n)
o,i-1
i 1
V S(n+1) S(n)
w
= i x w
t
Bw
V S(n+1) + S(n)
w
= i x w
Bo
t
(P P ) (n+1)
i
i 1
(P P ) (n+1)
i
i 1/2
i 1/2
(n)
o,i
(n)
Ti+1/2 ( w Bw + o Bo )i
i +1/2
Oil Equation
i +1/2
Water Equation
Assumption
887
B t
(n+1)
(n+1)
=S + w
Ti+1/2 (n)
Ti1/2 (n)
w,i (Pi +1 Pi )
w,i-1 (Pi Pi 1 )
Vi
(n)
w
(n+1)
w
Assumption
888
n
n
S in +1 S in
vt
n S i +1 S i
=
f
'
(
S
i )
t
889
x
t
v t (max f' (S) )
lim
x
=
us
Stability condition states that one cell cant be swept by more than one
VP during one time-step
us =
Reminder:
990
we get:
Solution:
991
coning problems
gas displacements
The IMPES scheme is fine when the saturation gradients are large:
The stability limit is related to the cell pore volume and the front
propagation velocity
992
993
Numerical Solutions
Implicit Schemes
(S wbw )n+1
(S wbw )
=
t
n +1
n +1
n +1
n +1
(
w i +1 w i ) Ti 1/ 2 w i 1 ( w i w i 1 )
(S b )
o
o
=
t
(Sobo )n+1
Ti +1/ 2 w i
water
oil
V
i
o = Po + o g Z
n +1
n +1
n +1
n +1
(
o i +1 o i ) Ti 1/ 2 o i 1 ( o i o i 1 )
Ti +1/ 2 o i
w = Po - Pcow + w g Z
994
dM
c
R c (X) =
+ Fc + q c = 0 c = h, w, v
dt
X = Po , S w , S g /Rs
995
Method:
996
Advantages
Stable and possibility to use large time steps
Disadvantages
Dispersive; Longer calculations per time step
Usual Practices (E100 default method)
Should be used for difficult problems with high throughput ratios
FIM
Advantages
Faster calculations per time step (only one equation) and less
dispersive
Disadvantages
Potentially unstable limited time step
Usual Practices
May be used on easy problems or in cases where time steps are
small. (e.g. History match)
IMPES
IMPES or FIM ?
997
IMPES or FIM ?
IMPES
Compositional
AIM
Forecasts
G/O , W/G or three phase systems
Stability problems with IMPES
FIM
998
General Overview
Solving Equations
Wells:
Gridded Aquifer
water entry calculated explicit ly
Analytical Aquifer:
Water entry computed from tabulated functions and added to the
water equation aquifer connected cells
Aquifers
999
1100
In IMPES: N quations in P
Equation Solution
dM
c
R c (X) =
+ Fc + q c = 0 c = h, w, v
dt
X = Po , S w , S g /Rs
1101
Newton Method
with
x n -1 = g' (x n -1 ) / g(x n -1 )
x 0 = g' (x 0 ) / g(x 0 )
x 0 = g' (x 0 ) / g(x 0 )
x 1 = x 0 + x 0
with
x n = x n -1 + x n -1
g (x 0 + x 0 ) 0
g (x 0 + x ) g(x 0 ) + x g' (x 0 )
It is possible to write
1102
;
L
x 0 - x L = g(x 0 )/ g' ( 0 )
0
x 1 =equation
x 0 + x 0 can
with
x 0 = g' (x 0 )by
/ g (x 0 )
Solution of the
be approximated
x n = x n -1 + x n -1
with
x n -1 = g' (x n -1 ) / g(x n -1 )
x1 - x L < x 0 - x L
1
1
x - x = g(x )
g' (x 0 ) g' ( 0 )
x 0 - x 1 = g(x 0 )/ g' (x 0 )
It is possible to write
Newton Method
1103
Newton Method
1104
k=1)
P0
(lets say
P = P0
P = P1
Solve g(P) = 0
Iteration #k
* k-1=0:
* k =1:
P1 = P0 - g(P0) / g(P0)
g(P0) (P1 - P0) = - g(P0)
P1 - P0 = - (g(P0))-1 x g(P0)
* iterations are stopped when
|| g(pk) || <
EP Reservoir Simulation Main Equations - E.M
P2 P1
Newton Method
1105
g(P)
1106
k +1
][
] [
X k R' (X k ) = R(X k )
[X
dM
c
R c (X) =
+ Fc + q c = 0 c = o, w, g
dt
X = Po , S w , S g /Rs
107
1108
1109
A simulation
A report time step
A time step
A non-linear iteration
Time
one/more report time steps
one/more time steps
one/more non-linear iterations
one/more linear iterations
and
< 2
max i R i < 1
Convergence criteria
Maximum number of iterations
Convergence Criteria
1110
1111
tn+1 = tn
Time-Step Managment
Rt =
S S n +1 S n
t
t
) (
Pmax ou Rtmax;
S limit in IMPES
truncation error limit in time (Rt) defined by:
accus 0 accus n Np Ni n
B=
accus 0
if troubles, < 1