View
217
Download
0
Category
Preview:
Citation preview
8/10/2019 7.1 Finite Difference-Taylor Formulae
1/23
UNIVERSITI TEKNOLOGI PETRONAS
PAB4233
ADVANCED RESERVOIR SIMULATION
JANUARY 2013
Principles of Finite Difference (1)
Petroleum Engineering Department (GPED)
8/10/2019 7.1 Finite Difference-Taylor Formulae
2/23
8/10/2019 7.1 Finite Difference-Taylor Formulae
3/23
Outline of the class
Principles of finite difference
Introduction
Overview of the big picture
Taylor series expansion
Discretization methods Reservoir Discretization
Discretization in spatial domain Constant grid block sizes
Variable grid block sizes
Grid Types
Time discretization
Time Derivatives
Numerical formulation
Explicit, Implicit, and Cranck-Nicholson
8/10/2019 7.1 Finite Difference-Taylor Formulae
4/23
Introduction
The following exposition has two purposes:
(1) to define the terminology, and
(2) to summarize the basic facts which will be required later for thedevelopment of special techniques
The basic idea of any approximate method is to replace the original problem
by another problem that is easier to solve and whose solution is in some sense
close to the solution of the original problem
8/10/2019 7.1 Finite Difference-Taylor Formulae
5/23
Introduction, cont,
Definition
The numerical solution of partial differential equations by finite differences
refers to the process of replacing the partial derivatives by finite difference
quotients, and then obtaining solutions of the resulting system of algebraic
equations
8/10/2019 7.1 Finite Difference-Taylor Formulae
6/23
Three types of questions may be asked at this stage:
(a) How can a given differential equation be discretized?
(b) How can we ascertain that the finite-difference solution piis close to Pi in some sense,
and what is the magnitude of the difference?
(c) what is the best method of solving the resulting system of algebraic equations?
The first two questions are discussed in this lecture and the next one. The third
question is extremely important from the practical point of view, and involves two
steps.
First, whenever the finite-difference equations are nonlinear they must be linearized.
The second step involves the solution of resulting matrix equations, and this important
problem will be considered later
Introduction, cont,
8/10/2019 7.1 Finite Difference-Taylor Formulae
7/23
Finite-Difference Methods
Replace derivatives by differences
j j+1 j+2j-1j-2
1j 2jj
1j2j
1 jx 2 jxjx1 jx
8/10/2019 7.1 Finite Difference-Taylor Formulae
8/23
Overview
Overview of the computational solution procedures
Governing
Equations
ICs/BCs
DiscretizationSystem of
Algebraic
Equations
Equation
(Matrix)
Solver
Approximate
Solution
Continuous
Solutions
Finite-Difference
Finite-Volume
Finite-Element
Spectral
Boundary Element
Discrete
Nodal Values
Tridiagonal
ADI
SOR
Gauss-Seidel
Gaussian
elimination
Ui (x,y,z,t)
p (x,y,z,t)
T (x,y,z,t)
8/10/2019 7.1 Finite Difference-Taylor Formulae
9/23
Reservoir Simulation Process
Geological
Model
Simulation
Model
8/10/2019 7.1 Finite Difference-Taylor Formulae
10/23
m
o
m
o
mm
o
m
m
o
m
momom
m
o
oo
ooo
oooooo
xxm
xfxxaxf
mxfaxxaxxmmamxf
xfaaxf
xfaxxaaxf
xfaxxaxxaaxf
xfaxxaxxaxxaaxf
)(!
)()()(
!/)()(2)()1()!()(
!3/)(6)(
!2/)()(62)(
)()(3)(2)()()()()()(
0
)(
0
)(
1
)(
33
232
1
2
321
3
3
2
21
Taylor series expansion
Construction of finite-difference formula Numerical accuracy: discretization error
xo x
8/10/2019 7.1 Finite Difference-Taylor Formulae
11/23
Introduction to Finite Differences
A partial derivative replaced with a suitable algebraic difference quotient is called finite difference. Most
finite-difference representations of derivatives are based on Taylorsseries expansion.
Taylorsseries expansion:
Consider a continuous function of x, namely, f(x), with all derivatives defined at x. Then, the value of f at a
location can be estimated from a Taylor series expanded about point x, that is,
In general, to obtain more accuracy, additional higher-order terms must be included.
xx
...)(!1
...!3
1
!2
1
)()(3
3
32
2
2
n
n
n
xx
f
nxx
f
xx
f
xx
f
xfxxf
Any continuous differentiable function, in the vicinity of xi, can be expressed as a Taylor
series.
8/10/2019 7.1 Finite Difference-Taylor Formulae
12/23
Introduction to Finite Differences
Forward, Backward and Central Differences:
(1) Forward difference:
Neglecting higher-order terms, we can get
...)(
!
)(...)(
!3)(
!2
)()()()()( 1
3
33
1
2
22
111
in
nn
iii
iii
iiiiiii
x
f
n
xx
x
fxx
x
fxxxx
x
fxfxf
iii
i
ii
ii
iii xxx
x
xfxf
xx
xfxf
x
f
11
1
1
1
1 ;)()()()(
)(
(a)
8/10/2019 7.1 Finite Difference-Taylor Formulae
13/23
Introduction to Finite Differences
(2) Backward difference:
Neglecting higher-order terms, we can get
(3) Central difference:
(a)-(b) and neglecting higher-order terms, we can get
...)(
!
)()1(...)(
!3)(
!2
)()()()()( 1
3
33
1
2
22
111
in
nn
iin
iii
iii
iiiiix
f
n
xx
x
fxx
x
fxxxx
x
fxfxf
11
1
1 ;)()()()(
)(
iii
i
ii
ii
iii xxx
x
xfxf
xx
xfxf
x
f
(b)
11
11 )()()(
ii
iii
xx
xfxf
x
f
(c)
8/10/2019 7.1 Finite Difference-Taylor Formulae
14/23
Introduction to Finite Differences
(4) If , then (a), (b), (c) can be expressed as
Forward:
Backward:
Central:
Note:
xxx ii 1
x
ff
x
f iii
1)(
x
ff
x
f iii
1)(
x
ff
x
f iii
2)( 11
)(
)(
)(
11
11
ii
ii
ii
xff
xff
xff
(d)
(e)
(f)
8/10/2019 7.1 Finite Difference-Taylor Formulae
15/23
This is why we studied mass
conservation!!!
8/10/2019 7.1 Finite Difference-Taylor Formulae
16/23
Discretization
Discretization:
The word comes from discrete and is defined as constituting a separate thing;
individual; distinct; consisting of unconnected distinctparts.
Converts continuous PDE into difference form
Replaces original problem with other problem, which can be solved easily
The reservoir domain is presented by spatially distributed, interconnected discrete
elements (grid blocks)
Temporal (time) domain is also discretized
The reservoir parameters are calculated over these constitutive elements at discretetime steps
8/10/2019 7.1 Finite Difference-Taylor Formulae
17/23
Recap on previous slides
2
2
x
P
c
k
t
P
t
Diffusivity equation:
0
x
Pk
x Steady state:
Homogeneous: 02
2
x
P
x
P
x
8/10/2019 7.1 Finite Difference-Taylor Formulae
18/23
Discretization, Finite Difference Process
Divide the reservoir into numerous blocks and represents it with amesh of points or grid blocks.
8/10/2019 7.1 Finite Difference-Taylor Formulae
19/23
Discretization, cont,
Solve mathematical equations for each cell by numerical methods toobtain pressure, production and saturation changes with time.
The diffusivity equation (single phase, 1-D flow)
k2
2
x
P
c
k
t
P
t
Accuracy ofdata input
Impacts accuracy ofsimulator calculations
Finite Difference 3 Step Process
8/10/2019 7.1 Finite Difference-Taylor Formulae
20/23
Discretization, cont,
t
P
k
c
x
P t
2
2
Continuous system: Discrete system:
Most flow problems encountered in reservoir engineering applications are too complex to be solved
by analytical methods.
Unlike analytic methods which give continuous solution in time and space (if an analytic solution
can be found), numerical approaches find solutions at discrete points in time and space.
The spatial domain is divided into a number of grids (also called cells or blocks) and the timedomain discretized to a number of time steps.
Continuous partial differential equation is then transformed to an equivalent discrete form of the
equation by finite-difference.
8/10/2019 7.1 Finite Difference-Taylor Formulae
21/23
Discretization, cont,
The discretization of the differential equation yields a set of algebraic equations
whose solution gives an approximate response at discrete points in the domain.
The discretization technique most commonly used in reservoir simulation is the finite
difference method.
There are several ways of discretizing the fluid flow equations using finite difference
approximation. Common approaches are based on:
Taylor ser ies expansion,
variational approach, or
integral formulation
8/10/2019 7.1 Finite Difference-Taylor Formulae
22/23
Reservoir Discretization
Definition: The reservoir is described by a set of gridblocks (or gridpoints) whoseproperties, dimensions, boundaries, and locations in the reservoir are well defined.
The reservoir domain is presented by spatially distributed, interconnected discrete elements (grid
blocks)
Temporal (time) domain is also discretized
The reservoir parameters are calculated over these constitutive elements at discrete time steps
the grid system is defined with Nx gridblocks for a one dimensional model, with Nx
by Ny gridblocks for a two-dimensional model, and by by Nx Ny Nz for a three-
dimensional model.
The index is referred to the center and the unknowns such as pressure are calculated at
the center of a gridblock. This type of gridding systems is called the block centered
grid. The grid systems presented in the previous Figure have a uniform gridblock for
each of them.
8/10/2019 7.1 Finite Difference-Taylor Formulae
23/23
One dimensional grid system
Two dimensional grid system
Discretization in spatial domain
Three dimensional grid system
The grids in the numerical model are usually rectangular in form. Radial grids
are sometimes used in single-well modeling or local hybrid gridding system.
Recommended