Vous êtes sur la page 1sur 20

DISCRETIZATION OF

THE FLOW EQUATIONS


SIG4042 Reservoir Simulation
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Home
Handouts
(pdf file)
Contents
Explicit Formulation
Time Discretization
Crank-Nicholson Formulation
Implicit Formulation
Spatial Discretization
Questions
Constant grid block size
Variable grid block size
Boundary conditions
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Spatial Discretization
Constant grid block sizes

The approximation of the second derivative of pressure may be obtained by
forward and backward expansions of pressure:
( ) ( ) ( )
( )
( )
( )
( ) ... , ' ' '
! 3
, ' '
! 2
, '
! 1
, ,
3 2
+
A
+
A
+
A
+ = A + t x P
x
t x P
x
t x P
x
t x P t x x P
( ) ( )
( )
( )
( )
( )
( )
( ) ... , ' ' '
! 3
, ' '
! 2
, '
! 1
, ,
3 2
+
A
+
A
+
A
+ = A t x P
x
t x P
x
t x P
x
t x P t x x P
( )
( ) ( )
2
2
1 1
2
2
2
x O
x
P P P
x
P
t
i
t
i
t
i
t
i
A +
A
+
=
|
|
.
|

\
|
c
c
+
it yields:
This approximation applies to the following grid system:
i-1 i i+1
Ax
Introduction

Finite difference approximations of the partial derivatives appearing in the
flow equations may be obtained from Taylor series expansions. We shall
now proceed to derive approximations for all terms needed in reservoir
simulation.
Continue
More
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Spatial Discretization
Variable grid block sizes

A more realistic grid system is one of variable block lengths, which will be the
case in most simulations. Such a grid would enable finer description of
geometry, and better accuracy in areas of rapid changes in pressures and
saturations, such as in the neighborhood of production and injection wells.
For the simple one-dimensional system, a variable grid system would be:
it yields:
i-1 i i+1
Ax Ax
i+1
Ax
i-1

| | | |
...
! 3
2 / ) (
! 2
2 / ) (
! 1
2 / ) (
3
1
2
1 1
1 i
i i
i
i i
i
i i
i i
P
x x
P
x x
P
x x
P P ' ' '
A + A
+' '
A + A
+ '
A + A
+ =
+ + +
+
Continue
| | | |
...
! 3
2 / ) (
! 2
2 / ) (
! 1
2 / ) (
3
1
2
1 1
1 i
i i
i
i i
i
i i
i i
P
x x
P
x x
P
x x
P P ' ' '
A + A
+' '
A + A
+ '
A + A
+ =

The Taylor expansions become (dropping the time index):


' ' P
i
= 4
2
Ax
i
+ Ax
i1
2Ax
i
+ Ax
i+1
+ Ax
i 1
|
\

|
.
|
P
i+1
2P
i
+ 2
Ax
i
+Ax
i +1
2Ax
i
+ Ax
i +1
+ Ax
i1
|
\

|
.
|
P
i 1
(Ax
i
+ Ax
i +1
)(Ax
i
+ Ax
i1
)
+O(Ax)
An important difference is now that the error term is of only first order,
due to the different block sizes.
+
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Spatial Discretization
Normally the flow terms in our simulation equations will be of the type:
c
cx
f (x)
cP
cx



(

(
where f(x) includes permeability, mobility and flow area. Therefore, we will
instead derive a central approximation for the first derivative, and apply it
twice to this flow term:
... ) (
! 1
) 2 / (
) (
! 1
2 /
) ( ) (
2
2 2
2 / 1
+
(

c
c
c
c A
+
(

c
c
c
c A
+
(

c
c
=
(

c
c
+ i
i
i
i
i i
x
P
x f
x
x
x
P
x f
x
x
x
P
x f
x
P
x f
... ) (
! 1
) 2 / (
) (
! 1
2 /
) ( ) (
2
2 2
2 / 1
+
(

c
c
c
c A
+
(

c
c
c
c A
+
(

c
c
=
(

c
c
i
i
i
i
i i
x
P
x f
x
x
x
P
x f
x
x
x
P
x f
x
P
x f

( ) ( )
2
2 / 1 2 / 1
) ( ) (
) ( x O
x
x
P
x f
x
P
x f
x
P
x f
x
i
i i
i
A +
A
(

c
c

c
c
=
(

c
c
c
c
+
it yields:
Continue
Similarly, we may obtain the following expressions:
) (
) (
1 2
1
1
2 / 1
x O
x x
P P
x
P
i i
i i
i
A +
A + A

=
|
.
|

\
|
c
c
+
+
+
) (
) (
1 2
1
1
2 / 1
x O
x x
P P
x
P
i i
i i
i
A +
A + A

=
|
.
|

\
|
c
c

As we can see, due to the different block sizes, the error terms for the last
two approximations are again of first order only. By inserting these
expressions into the previous equation, we get the following
approximation for the flow term:
) (
) (
) (
) ( 2
) (
) (
) ( 2
) (
1
1
2 / 1
1
1
2 / 1
x O
x
x x
P P
x f
x x
P P
x f
x
P
x f
x
i
i i
i i
i
i i
i i
i
i
A +
A
A + A

A + A

=
(

c
c
c
c

+
+
+
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Spatial Discretization
Boundary conditions

We have seen earlier that we have two types of boundary conditions,
Dirichlet, or pressure condition, and Neumann, or rate condition. If we
first consider a pressure condition at the left side of our slab, as follows:
1 2
Ax
1
Ax
2

P
L

More
then we will have to modify our approximation of the first derivative at the left
face, i=1/2, to become a forward difference instead of a central difference:
) (
2 / ) (
1
1
2 / 1
x O
x
P P
x
P
L
A +
A

=
|
.
|

\
|
c
c
The flow term approximation thus becomes:
) (
) (
) (
) ( 2
) (
) (
) ( 2
) (
1
1
1
2 / 1
1 2
1 2
2 / 1 1
1
x O
x
x
P P
x f
x x
P P
x f
x
P
x f
x
L
A +
A
A

A + A

=
(

c
c
c
c
) (
) (
) (
) ( 2
) (
) (
) ( 2
) (
1
1
2 / 1 2 / 1
x O
x
x x
P P
x f
x
P P
x f
x
P
x f
x
N
N N
N N
N
N
N R
N
N
A +
A
A + A

=
(

c
c
c
c

+
With a pressure P
R
specified at
the right hand face, we get
a similar approximation for
block N:
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Spatial Discretization
For a flow rate specified at the left side (injection/production):
1 2
Ax
1
Ax
2

Q
L

More
we make use of Darcy's equation:
or:
Then, by substituting into the approximation, we get:
2
1
|
.
|

\
|
c
c
=
x
P
B
kA
Q
L

kA
B
Q
x
P
L

=
|
.
|

\
|
c
c
2 / 1
) (
) (
) (
) ( 2
) (
1
1 2
1 2
2 / 1 1
1
x O
x
kA
B
Q
x x
P P
x f
x
P
x f
x
L
A +
A
+
A + A

=
(

c
c
c
c

FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Spatial Discretization
With a rate Q
R
specified at the right hand face, we get a similar
approximation for block N:
More
For the case of a no-flow boundary between blocks i and i+1, the flow terms
for the two blocks become:
) (
) (
) (
) ( 2
) (
1
1
2 / 1
x O
x
x x
P P
x f
kA
B
Q
x
P
x f
x
N
N N
N N
N R
N
A +
A
A + A


=
(

c
c
c
c

) (
) (
) (
) ( 2 ) (
1
1
2 / 1
x O
x x x
P P
x f
x
P
x f
x
i i i
i i
i
i
A +
A + A A

=
(

c
c
c
c

) (
) (
) (
) ( 2 ) (
1 2 1
1 2
2 / 11
1
x O
x x x
P P
x f
x
P
x f
x
i i i
i i
i
i
A +
A + A A

=
(

c
c
c
c
+ + +
+ +
+
+
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Time discretization
Time discretization

We showed earlier that by expansion backward in time:
... ) , (
! 3
) (
) , (
! 2
) (
) , (
! 1
) , ( ) , (
3 2
+ A + ' ' '
A
+ A + ' '
A
+ A + '
A
+ A + = t t x P
t
t t x P
t
t t x P
t
t t x P t x P
the following backward difference approximation with first order error term is obtained:
An expansion forward in time:
... ) , (
! 3
) (
) , (
! 2
) (
) , (
! 1
) , ( ) , (
3 2
+ ' ' '
A
+ ' '
A
+ '
A
+ = A + t x P
t
t x P
t
t x P
t
t x P t t x P
yields a forward approximation, again with first order error term:
) ( t O
t
P P
t
P
t
i
t t
i
t t
i
A +
A

=
|
.
|

\
|
c
c
A +
A +
) ( t O
t
P P
t
P
t
i
t t
i
t
i
A +
A

=
|
.
|

\
|
c
c
A +
More
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Time discretization
Finally, expanding in both directions:
we get a central approximation, with a second order error term:
The time approximation used as great influence on the solutions of the equations.
Using the simple case of the flow equation and constant grid size as example, we
may write the difference form of the equation for the three cases above.
... ) , (
! 3
) (
) , (
! 2
) (
) , (
! 1
) , ( ) , (
2
3
2
2
2
2
2
2
2
+ + ' ' ' + + ' ' + + ' + + = A +
A
A
A
A
A
A
A t
t
t
t
t
t
t
t x P t x P t x P t x P t t x P
... ) , (
! 3
) (
) , (
! 2
) (
) , (
! 1
) , ( ) , (
2
3
2
2
2
2
2
2
2
+ + ' ' '

+ + ' '

+ + '

+ + =
A
A
A
A
A
A
A t
t
t
t
t
t
t
t x P t x P t x P t x P t x P
( ) ( )
2
2
t O
t
P P
t
P
t
i
t t
i
t
i
t
A +
A

=
|
.
|

\
|
c
c
A +
+
A
More
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Explicit Formulation
Explicit formulation

Here, we use the forward approximation of the time derivative at
time level t. Hence, the left hand side is also at time level t, and
we can solve for pressures explicitly:
This formulation has limited stability,
and is therefore seldom used.
( )
t
P P
k
c
x
P P P
t
i
t t
i
t
i
t
i
t
i
A

|
.
|

\
|
=
A
+
A +
+
|
2
1 1
2
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Implicit Formulation
Implicit formulation

Here, we use the backward approximation of the time derivative at
time level t+At, and thus left hand side is also at time level t+At :
We have a set of N equations with N unknowns, which must be solved
simultaneously, for instance using the Gaussian elimination method.
This formulation is unconditionally stable.
( )
t
P P
k
c
x
P P P
t
i
t t
i
t t
i
t t
i
t t
i
A

|
.
|

\
|
=
A
+
A + A +

A + A +
+
|
2
1 1
2
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Crank-Nicholson Formulation
Crank-Nicholson formulation

Finally, by using the central approximation of the time derivative at time
level t+At/2, and thus left hand side is also at time level t+At/2:
The resulting set of linear equations may be solved
simultaneously just as in the implicit case.
The formulation is unconditionally stable, but may
exhibit oscillatory behavior, and is seldom used.
( ) ( ) t
P P
k
c
x
P P P
x
P P P
t
i
t t
i
t t
i
t t
i
t t
i
t
i
t
i
t
i
A

|
.
|

\
|
=
(

A
+
+
A
+
A + A +

A + A +
+ +
|
2
1 1
2
1 1
2 2
2
1
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Questions
1) Use Taylor series to derive the following approximations
(include error terms):
a) Forward approximation of
b) Backward approximation of
c) Central approximation of (constant Ax)
d) Central approximation of (variable Ax)
Next
2) Modify the approximation for grid block 1, if the left side of the grid
block is maintained at a constant pressure, P
L
.
3) Modify the approximation for grid block 1, if grid block is subjected to
a constant flow rate, Q
L
.
4) Write the discretized equation on implicit and explicit forms.

t
P
c
c
2
2
x
P
c
c
t
P
c
c
2
2
x
P
c
c
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
A - area, m
2

B - formation volume factor
c - compressibility, 1/Pa
k - permeability, m
2

k
r
- relative permeability, m
2

L - lenght, m
N - number of grid blocks
O(...) - discretization error
P - pressure, Pa
P
c
- capillary pressure, Pa
Q, q - flow rate, Sm
3
/d
R
so
- solution gas-oil ratio
t - time, s
x - distance, m
x, y, z - spatial coordinate
Ax - lenght of grid block, m
At - time step, s
| - porosity
- viscosity, Pas

Subscripts:
0 - initiall value
i - block number
L - left side
R - right side
Nomenclature
Back to presentation
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
General information
About the author
Title:
Discretization of the Flow Equations
Teacher(s):
Jon Kleppe
Assistant(s):
Szczepan Polak
Abstract:
Derivation of finite difference approximations for all terms needed
in reservoir simulation.
Keywords:
discretization, spatial discretization, time discretization, explicit
formulation, implicit formulation, Crank-Nicholson formulation
Topic discipline:
Reservoir Engineering -> Reservoir Simulation
Level:
4
Prerequisites:
Good knowledge of reservoir engineering
Learning goals:
Learn basic principles of Reservoir Simulation
Size in megabytes:
0.7
Software requirements:
-
Estimated time to complete:
30 minutes
Copyright information:
The author has copyright to the module
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
FAQ
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
References
Aziz, K. and Settari, A.: Petroleum Reservoir Simulation, Applied Science
Publishers LTD, London (1979)

Mattax, C.C. and Kyte, R.L.: Reservoir Simulation, Monograph Series, SPE,
Richardson, TX (1990)

Skjveland, S.M. and Kleppe J.: Recent Advances in Improved Oil Recovery
Methods for North Sea Sandstone Reservoirs, SPOR Monograph, Norvegian
Petroleum Directoriate, Stavanger 1992
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
Summary
FAQ References Summary Info
Constant Grid
Block Size
Boundary Conditions
Spatial Discretization
Variable Grid
Block Size
Questions
Time Discretization
Explicit Formulation
Implicit Formulation
Crank-Nicholson
Formulation
Nomenclature
About the Author
Name
Jon Kleppe
Position
Professor at Department of
Petroleum Engineering and
Applied Geophysics at NTNU
Address:
NTNU
S.P. Andersensvei 15A
7491 Trondheim

E-mail:
kleppe@ipt.ntnu.no

Phone:
+47 73 59 49 33

Web:
http://iptibm3.ipt.ntnu.no/~kleppe/

Vous aimerez peut-être aussi