Sie sind auf Seite 1von 59

1

Numerical simulation of two phase


porous media flow models with
application to oil recovery
Roland Masson
IFP New energies
ENSG course 2011
18/04 - 19/04 -20/04 -21/04
2
Outline: 18-19/04
Discretization of single phase flows
Two Point Flux Finite Volume Approximation
of Darcy Fluxes
Homogeneous case
Heterogeneous case
Exercise: single phase incompressible Darcy
flow in 1D (using Scilab)
3
Outline: 19-20/04
Discretization of two phase immiscible
incompressible Darcy flows
Hyperbolic scalar conservation laws
IMPES discretization of water oil two phase flow
Exercise: Impes discretization of water oil two
phase flow in 1D (using Scilab)
4
Outline: 20-21/04
Discretization of wells
Exercise: Five spots water oil simulation
Description of the Research Project
5
Examination: 15/06
By binoms
Written report on the Project
Oral examination
Presentation of the report
Run tests of the prototype code
Questions on numerical methods used in the
simulation
6
Finite Volume Discretization of single
phase Darcy flows
Darcy law and conservation equation
Two Point Flux Discretization (TPFA) of diffusion
fluxes on admissible meshes
Exercice: single phase incompressible Darcy
flow in 1D
7
Moss conservofion equofions
Oil recovery by water injection
( )
( )

+ =
=
g S P P K
S k
V
g P K
S k
V
o w c w
o
o o r
o
w w
w
w w r
w

) (
) (
) (
,
,
( )
( )
( )
( )

= +

= +

0
0
o o
o o
w w
w w
V div
t
S
V div
t
S

Two phose Dorcy Iows


Pore voIume conservofion
1 = +
o w
S S
Capillary pressure Pc
Relative permeabilities k
r,w
and k
r,o
8
1D test case
Injection of water in a reservoir
prod
p p=
inj
w
p p
S
=
=1
9
Water injection in a 1D reservoir
10
Five Spots simulation in 2D
Injecfor weIIs
Producer weII
1000 m
1
0
0
0

m
Pressure
Water front
11
Heterogeneities
Water front
Pressure
Permeability
12
Heterogeneities
13
Coning: aquifer and vertical well
Pressure
Water front
1000 m
1
0
0

m
VerficoI
producer weII
5
0

m
Aquifer
14
Coning: stratified reservoir
Permeability
Water front
Pressure
15
SINGLE PHASE DARCY FLOW SINGLE PHASE DARCY FLOW
( )
( ) q V div
t
= +

) ( g P
K
V

=
Porosify of fhe porous medio
PermeobiIify of fhe porous medio (fensor)
Densify of fhe fIuid
Viscosify of fhe fIuid
Moss conservofion equofion
Dorcy Iow

16
Incompressible Darcy single
phase flow
Diffusion equation

=
=
=
N
D D
on g n p
K
on p p
on f p
K
div
.
) (

producfor weII: p~pw


g~0
injecfor weII: p ~pinj
17
Compressible Darcy single phase flow
Parabolic equation
(linearized)

=
=
=
= +
=
on p p
T on g n p
K
T on p p
T on p
K
div p
dp
d
t
N
D D
t
0 0
0
0 0
0
) , 0 ( .
) , 0 (
) , 0 ( 0 ) ( )
1
(

Ex: weII fesf


p
w
~ producer weII pressure
g~0
0 0
p p
t
=
=
18
NOTATIONS
object l geometrica
d-dimensionoI meosure of fhe
geomefricoI objecf of dimension d

CeII: voIume for d~3, surfoce for d~Z, Iengh for d~I

2 1
x x
Fuce: surfoce for d~Z, Iengh for d~I, I for o poinf
Segment: Iengh for d~I
19
Finite Volume Discretization
Finite volume mesh
Cells
Cell centers
Faces
Degrees of freedom:
Discrete conservation law
}

} }
= =
=


fdx ds n u dx u
'
'
.
'

x
'
x

u
'

n
20
Two Point Flux Approximation (TPFA)
TPFA
Flux Conservativity
Flux Consistency
) , ( .
' ' '

u u F ds n u
}

0 ) , ( ) , (
' ' ' '
= +

u u F u u F
( )
}
+ = =

) ( . ) , (
' '
'
' '
h O ds n u u u
x x
u u F
'
' '


x x
'
x

x
'
n
21
Two Point Flux Approximation
Boundary faces


x x
'
( )
}
+ = =

) ( . ) , ( h O ds n u u u
x x
u u F

x

n
22
Two Point Flux Approximation
Finite Volume Scheme
'
'
'

x x
T =
( ) ( )







f g u
x x
u u
x x
bord
= +

=
int
'
'
'
TronsmissibiIifies of
inferior ond boundory
foces

=
=
sur g u
sur f u

x x
T =
23
Exemples of admissible meshes
Voronoi
TriongIes: ongIes 2 /
Corfesion:
24
Corner Point Geometries and
TPFA
Assumption that the directions of the CPG
are aligned with the principal directions of
the permeability field
25
Corner Point Geometries
Stratigraphic grids with erosions
Examples of degenerate cells
(erosions)
Hexahedra
Topologicaly Cartesian
Dead cells
Erosions
Local Grid Refinement (LGR)
26
CPG faults
27
Cell Centered FV: MultiPoint Flux
Approximation (MPFA)
Example of the "O" scheme
Exact on piecewise linear functions
Account for discontinuous diffusion tensors
Account for anisotropic diffusion tensors
L
L
L
u T F

=
' '

'
L L
L
L
T T T
' ' '
, 0 = =

28
2D example

=
=
sur g u
sur f u
( )
y x
e u
+
= sin
UniformIy refined quodronguIor mesh
Smoofh soIufion
29
Comparison of MPFA "O" scheme and TPFA
order 2
Consisfency Error
Non convergent
30
Cell-Face data structure
List of cells: m=1,...,N
Volume(m)
Cell center X(m)
List of interior faces: i=1,...,Nint
cellint(i,1) = m1, cellint(i,2)=m2
surfaceint(i)
Xint(i)
List of boundary faces: i=1,...,Nbound
cellbound(i)
surfacebound(i)
Xbound(i)
'

31
Computation of interior and
boundary face transmissibilities
Interior faces: i=1,...,Nint
m1 = cellint(i,1)
m2 = cellint(i,2)
Tint(i) = surfaceint(i)/|X(m2)-X(m1)|
Boundary faces: i=1,...,Nbound
m = cellbound(i)
Tbound(i) = surfacebound(i)/|X(m)-Xbound(i)|
32
Computation of the Jacobian sparse
matrix and the right hand side JU = B
( ) ( )





f g u T u u T
bound
= +

=
int
'
' '
( )
( )

=
=

u u T line
u u T line
' '
' '
: '
:
Loop on inferior foces
( )

g u T line :
Loop on boundory foces
'
u

f line :
Loop on ceIIs
33
Computation of the Jacobian sparse
matrix and the right hand side: JU = B
( ) ( )





f g u T u u T
bound
= +

=
int
'
' '
Cell loop: m=1,...,N
B(m) = Volume(m)*f(X(m))
Interior face loop: i=1,...,Nint
m1 = cellint(i,1), m2 = cellint(i,2)
J(m1,m1) = J(m1,m1) +Tint(i)
J(m2,m2) = J(m2,m2) +Tint(i)
J(m1,m2) = J(m1,m2) -Tint(i)
J(m2,m1) = J(m2,m1) -Tint(i)
Boundary face loop: i=1,...,Nbound
m = cellbound(i)
J(m,m) = J(m,m) +Tbound(i)
B(m) = B(m) + Tbound(i)*g(Xbound(i))
34
TPFA
Isotropic Heterogeneous media
FV scheme
) ( ) (
'
) (
'
' ' '
'
' '





u u T u u
x x
K u u
x x
K F = = =
TronsmissibiIify:

=
=
sur g u
sur f u K div ) (
'
x

K
'
K

u
'
u

u
' '
1
'
'
'


K
x x
K
x x
T
+ =
35
TPFA
Isotropic heterogeneous permeability
TronsmissibiIify:

u
'
u

u
' '
1
'
'
'


K
x x
K
x x
T
+ =
'
'
'
'
'
'
'
' '


x x
K
x x
K
x x
K
x x
x x
T =
|
|
|
|
|
.
|

\
|
+
=
'
x

x

x

K
'
K
36
Well discretization
Radial stationary analytical solution for vertical wells in
homogeneous porous media
Numerical Peaceman well index for well discretization with
imposed pressure
Proof of Peaceman formula for uniform cartesian meshes
Pressure drop for vertical single phase wells
37
Stationary radial analytical solution
in homegeneous media

=
= =
> =
}
=
w
r r
w w
w w
w
q ds n p K
r r p p
r r p K
) . (
0
) / ln(
2
) (
w
w
w
r r
K
q
p r p

=
w
p
w
q
w
r r =
w
n
r
q
n r p K r q
w
r
2
). ( ) ( = =
) (r p
w
r r /
1
100
38
Numerical well index
Cartesian mesh
x,y >> r
w
( ) ( ) 0
int
'
' '
= + +

= =



w bord
w
w
q p p T p p T
Well w
Well cell
) / ln(
2
0 w
w
w
r r
K
q
p p
w

=
2 / 1 2 2
0
) ( 14 . 0 y x r +
y
x
Pressure Numerical computation with specified well flow rate and pressure
boundary condition given by the analytical solution
with
w

analytical solution
39
Well flow rate with specified pressure
( ) ( ) 0
) ( ,
,
'
' '
int
= +

= =



i i
i w i
p p WI p p T
Finife VoIume discrefi;ofion wifh weII specified
pressures
) (
) / ln(
2
0
w
w
w
p p
r r
K
q
w
=

) / ln(
2
0 w
r r
K
WI

=
Well index
40
Computation of the Jacobian matrix and
right hand side JU = B with wells
( ) ( ) 0
) ( ,
,
'
' '
int
= +

= =



i i
i w i
p p WI p p T
Loop on interior faces: i=1,...,Nint
m1 = cellint(i,1), m2 = cellint(i,2)
J(m1,m1) = J(m1,m1) +Tint(i)
J(m2,m2) = J(m2,m2) +Tint(i)
J(m1,m2) = J(m1,m2) -Tint(i)
J(m2,m1) = J(m2,m1) -Tint(i)
Loop on wells: i=1,...,Nwell
m = cellwell(i)
J(m,m) = J(m,m) + WI(i)
B(m) = B(m) + WI(i)*pw(i)
41
Exercice: convergence of the scheme
to an analytical well solution

+

=
1 1
2
1
1
1
1
) / ln(
2
) / ln(
2
) / ln(
2
) (
r r if r r
K
q
r r
K
q
r r r if r r
K
q
p r p
w
w
w
w w
w
w

r
q
n r p r K r q
w
r
2
). ( ) ( ) ( = =
) (r p
w
r r /
1
1000
) / ln(
2
) (
w
w
w
r r
K
q
p r p

=
r
q
n r p K r q
w
r
2
). ( ) ( = =
) (r p
w
r r /
1
1000
w
r
r
1
10 / ) (
1 2
K K r K = =
1
) ( K r K =
K
42
Proof of Peaceman well index: uniform
cartesian mesh, well at the center of the cell
)(wprp=pqr=npKrq)(=
w
r x y >> =

< =
> =
w
w
r r u
r r p p u
0
r u K = 0
p
}
=
=
w
r r
w w
ds n p K q .
w
p
specified weII pressure
Hypofhesis: p rodioI in
fhe weII ceII
unknown
Equofion in fhe weII
ceII
0 .
'
'
'
= +

}
=
w
q ds n p K

) / ln(
2
) (
w
w
w
r r
K
q
p r p

=
w
p
w
q
w
r r =
w
n
r
q
n r p K r q
w
r
2
). ( ) ( = =

'
w
p
43
Proof of Peaceman well index formula
} } }
= = =
+ =
'
'
'
'
'
'
.
2
. .

ds n n
r
q
ds n u K ds n p K
r
w
p nn
4
) ( .
'
' '
'
w
q
u u
x x
ds n p K +
}
=

4
)) / ln(
2
( 0 .
'
' '
'
w
w
w
w
q
r x
K
q
p p
x x
ds n p K +
|
.
|

\
|

}
=

( )
'
' '
'
.

p p
x x
ds n p K
}
=
seffing ( )
w
w
w
r x
K
q
p p / ) 2 / exp( ln
2
+ =

' w
p
'
n
r
n

44
Vertical well with hydrostatic pressure drop
( ) ) 1 ( ) ( ) 1 ( ) (
2 / 1
=

i Z i Z g i p i p
i w w

2 2
0
0
14 . 0 ), (
) / ln(
)) ( ( 2
) ( y x r i H
r r
i m K
i WI
w
+ = =

perforofions
i~I,...Mp
List of well perforations from bottom to top:
i=1,...,Np
m(i) = cell of perforation i
WI(i) = Well index of perforation i
pw(i) = pressure of perforation i
BHP w
p p = ) 1 (
H(i)
Z(i)
WeII boffom
perforofion i~I
Specified boffom hoIe
pressure
Hydrosfofic pressure
drop
45
Analysis of TPFA discretization
Discrete norms: on each cell
Discrete Poincar Inequality

u u
h
=
2 / 1
2
2
|
.
|

\
|
=

u u
l
h
2 / 1
2
) (
) (
2
'
'
'
) (
int
1
0
|
|
.
|

\
|
+ =

=






u
x x
u u
x x
u
bound
h
T h
h
1
0
2
) (
h
h
l
h
u D u
'
x

x
46
Analysis of TPFA discretization
A priori estimate:
2
1
0
) (
) (
l
h
T h
h
f D u
h

( ) ( )

=
|
|
.
|

\
|
+
=



u f u
x x
u u
x x
u
bound
0
'
'
'
( )
2 / 1
2
2 / 1
2
2 2
'
'
'
|
.
|

\
|
|
.
|

\
|
+

=







u f u
x x
u u
x x
bound
Uniqueness, exisfence, sfobiIify: weII
posed probIem

=
=
sur u
sur f u
0
47
Analysis of TPFA discretization
Error estimate

u x u e = ) (
0 ' ) (
'
'
' '
'
=
|
|
.
|

\
|
+

R e e
x x
ds n u
x x
x u x u
R
'
'
'
'
'
.
'
1 ) ( ) (

=
) ( ,
' ' '
h O R R R = =

( )



f u u
x x
=

= '
'
'

f ds n u =

}
= '
'
'
.
48
Analysis of TPFA discretization
Error estimate

u x u e = ) (
0 ' ) (
'
'
' '
'
=
|
|
.
|

\
|
+

R e e
x x
) ( ,
' ' '
h O R R R = =

Ch e
h
T h
h

) (
1
0
( )
' '
'
'
2
) (
' '
1
0

R e e R e e
h
T h
h
= =
h x x e C e
h h
T h
h
T h
h
|
.
|

\
|

'
) (
2
) (
'
1
0
1
0

49
TPFA discretization
Discrete linear system:
Coercivity:
Symmetry:
Monotonicity: ( A
h
=M-Matrice)
h h h
F U A =
T
h h
A A =
0
1

h
A
2
) (
min
1
0
) , (
h
T h
h h h h
u K U U A
50
M- Matrice monotonicity
0
1

>

>

j
j i
j
j i
i j i i i
A that such i
A
A A
0
0
0 , 0
,
,
, ,
0 = +

i
i j
j ij i ii
S U A U A
0 min
0
< =
i
i
i
U U if
0
0
0 0 0 0
) (
i
i j
j i j i i
j
j i
S U U A U A + =
|
|
.
|

\
|


Propogofe using neighboring ceIIs j from i
0
fo o
ceII i such fhof
0 >
|
|
.
|

\
|

j
ij
A
( )
( )






f g u
x x
u u
x x
bord
=
+


=
) (
) (
'
'
'
Proof:
0roph of A sfrongIy connex
51
Finite volume schemes
Parabolic Equations: time discretization
Implicit Euler integration in time
Stability analysis
52
Parabolic model

=
=
= +
=
on u u
T on n u K
T on f u K div u
t
t
0 0
) , 0 ( 0 .
) , 0 ( ) (
53
Finite volume space and time discretizations
( ) [ ] 0 ) (
1
=
} }
+ n
n
t
t
t
dxdt f t u K div u

0 ). ( ) ( ) ( ) (
1
'
'
1
=
(

+ +
}

} } }
+
=
+
dt ds n t u K t f dx t u dx t u
n
n
t
t
n n


) ( ) (
1
1
+

}
+
n
t
t
t tY dt t Y
n
n
Discrefe spoce ond fime conservofion Iow:
Forword EuIer fime infegrofion scheme
) (t Y
t t t t
n n
= =
+1 0
, 0
Consisfency of order f
54
Finite volume space and time
discretizations
( )




f u u T
t
u u
n n
n n
= +

=
+ +
+
'
1
'
1
'
1
55
Stability analysis: discrete energy
estimate
( ) ( )
(

= +


=
+ +
+
+

f u u T
t
u u
u
n n
n n
n
'
1
'
1
'
1
1
2 2
1
0
2 2 2
1
2
1
2
1
2 2
1
2
2
l
n
h
l
h
h
n
h
l
n
h
n
h
l
n
h
l
n
h
u f t
u t u u u u
+
+ + +

+ +
2 2 2
) ( ) ( 2 b a b a b a a + =
56
Stability: discrete energy estimate
2 2
1
2 2
1
2 2 2 2
l
h
l
n
h
n
h
l
n
h
l
n
h
f t u u u u +
+ +

2
2
0
2
2
2 2
l
h
N
l
h
l
N
h
f t u u +
UncondifionoIIy sfobIe scheme in L
2
norm
57
Stability analysis: discrete maximum principle
(f=0, zero flux BC)
n n n
u u T
t
T
t
u

=
|
|
.
|

\
|

+
+
= =
+

1
'
'
'
'
'
1
1

all for M u m
n

Then

all for M u m
n

+1
58
Stability analysis: discrete maximum principle
(f=0, zero flux BC)
M u u if
n n
> =
+ + 1 1
sup
0

Proof:
lead to a contradiction
( ) ( ) M u u u T
t
M u
n n n n
+

=
+ +
=
+

0 0
0
0 0
1 1
'
'
'
0
1


59
Exercize: well test with
compressible Darcy single phase flow
Parabolic equation
(linearized)

=
=
=
= +
=
on p p
T on g n p
K
T on p p
T on p
K
div p
dp
d
t
N
D D
t
0 0
0
0 0
0
) , 0 ( .
) , 0 (
) , 0 ( 0 ) ( )
1
(

Ex: weII fesf


p
w
~ producer weII pressure
g~0
0 0
p p
t
=
=

Das könnte Ihnen auch gefallen