Element of Reservoir Simulation (PNG 506.2)
Element of Reservoir Simulation (PNG 506.2)
Element of Reservoir Simulation (PNG 506.2)
BY
&
• Two types of models used for reservoir simulation are physical and
mathematical models.
LIMITATIONS OF SIMULATORS
• The most common analog models are the electrical models in which
the similarities between electrical flow and fluid flow in petroleum
reservoir are utilized to develop electrical analogs of petroleum
reservoirs.
and
Reservoir Boundary
Data Processing
Seismic Interpretation
Petrophysical Evaluation
Geologic Model
Production Performance
Review BHP Analysis
Reservoir Engineering
Material Balance Pressure Data Review
Initialization
History Matching
Development Plan
Sources of Errors in Reservoir Simulators
Simulators are interesting to use, but it is important to know that
results from the simulator may not be correct because of the following
reasons:
Computer round-off errors resulting from the fact that a computer can
store a limited number of digits.
• For most simulators, the number of dimensions can range from one to
three.
SYSTEM
Dimensionality
Geometry
PHASES
18
Increasing Complexity and Expense
Uses of 1-D Horizontal Model
Gas
Oil
Water
USED FOR
Reservoir sections
Specialized studies
Line Drive behavior
Miscible flooding
Pilot Flood
Sensitivity
Effect of Heterogeneity in flow direction 19
Uses of 1-D Radial Model
1-D Radial
20
Uses of 1-D Dipping Model
gas
oil
Water
USED FOR
Reservoir sections
Specialized studies
Line Drive behavior
Miscible flooding
Pilot Flood
Sensitivity
Effect of Heterogeneity in flow direction
Laboratory studies
Significant gravity override
Up dip gas injection
Flank Injection of water
Uses of 2-D Horizontal Reservoir Dimension
Gas
Oil
Water
USED FOR:
Single or multiple well reservoirs
Cross-section analysis of reservoirs
Investigates: - gravity segregation
- effect of anisotropy
24
Uses of 3 Dimensional Layered Reservoir Model
26
Uses of 2-D Coning Model
USED FOR
Single Well Optimization Study
Location of Completion Interval
Maximum Efficient Rates
Deliverability Studies
Well Test Analysis
Reservoir Simulator Selection Implications
The commonly used coordinate systems are the cartesian and cylindrical
coordinates.
With the Cartesian coordinates, flow can be modeled in the x-y-z directions
while with cylindrical coordinate system, flow can occur in r-z-θ
direction.
Simulators that model flow in cylindrical systems are best suited for single
well studies.
Phases
Reservoir simulators can be classified on the basis of whether they can
model single, two or three phases.
The phases modeled are oil, water, and gas. With the development of
thermal simulator, the fourth phase (solid phase) is now being considered.
For example, with little or immobile gas phase, there is no need to include
the gas phase.
Rather than classify these Simulators based on dimensionality, geometry and fluid
phase, these Simulators are classified on the basis of the reservoir system they can
be used to model.
No single reservoir simulator can be used to effectively simulate all the reservoir
systems because of the variety of the processes going on in the reservoirs.
Gas Reservoir Simulator
The Simulators are used to model fluid flow in black oil reservoirs.
Water is the wetting phase while gas is the non-wetting phase. Oil has
intermediate wettability.
Water and oil are immiscible and there is no mass transfer between the phases.
For some of them, a fourth phase, the solid (coke) phase is also
Chemical Flood Simulators:
These Simulators model processes that occur in reservoirs
undergoing chemical flooding
such as
surfactant flooding,
carbon dioxide flooding, etc.
The major process modeled is the miscibility between the
injected fluid and in-situ reservoir fluids.
Assignment
Write a Term Paper on the uniqueness of the match between
The uses of reservoir Simulators Cont’d
(c) Optimization of Petroleum Systems
These parameters are required to design the size of the injection units,
water supply, water treatment, or gas processing plant size.
The uses of reservoir Simulators Cont’d
d) To monitor Fluid Movement in Reservoirs
In large reservoirs or reservoirs which are common to several
operators, it is possible that during the life of the project significant
quantities will move large distances from one lease to another.
Methods for analyzing well pressure data are discussed by Earlougher (1977).
Simulators are also used as educational tools with which the mechanics of
fluid flow in porous media can be investigate.
Equation of state
Equation of equilibrium.
These equations are discussed in details.
Conservation Equation:
The law of conservation simply states that mass, energy
and momentum can neither be created nor destroyed.
q x0 x qout Ax
Mass of fluid stored in the control volume = Ax
q x0 qin Ax q x0 x qout Ax Ax
t
To simplify the above Equation, Taylor’s Theorem. This theorem can
be used
f x
f x f x0 x x0 x0
x
By mere changing notation x x0 x the above
equation becomes
f x0
f x0 x f x0 x
x
q
qin qout A A
x t
But
q uA
For example, in a reservoir that contains volatile oil, some oil will be
in the gas phase while some will remain in the liquid phase.
Hence
STC
g and q gSTC qSTC
Bg
p
qSTC
g
x x t Bg
Where kg
g
g Bg
Porosity as a function of pressure is given as:
0 1 c r ( p p 0 )
p 0 1 cr ( p p0 )
g qSTC
x x t
Bg
p p d 1 0 c r
qSTC
x B
g 0
x t dp g Bg
p p
g c ( p ) qSTC
x x t
where
d 1 0 c r
C ( p ) 0
dp B Bg
g
Generally,
p
(p z ) c ( p ) qSTC
t
Other forms of the gas equation can be derived by substituting
pM
into the continuity equation
zRT
PM kp PM
x zRT x t zRT
MULTIPHASE FLOW EQUATIONS
Here, cases with more than one fluid phase flowing will be
considered.
That is, when there is water, oil and gas in the porous media.
Before that, there is need to briefly define some relevant fluid and
rock properties.
MULTIPHASE FLOW EQUATIONS cont’d
Definition of Rock and Fluid Properties
0 1 cr ( p p0 )
0 = is porosity at the reference pressure p0
Viscosity of Fluid: Viscosity is a measure of fluid resistance
to flow.
Mathematically, Viscosity is defined as: yx
yx = shearing stress d v x /d y
ML1T 1
Hence, viscosity has dimension of
In this case, there is always more than one fluid existing in this reservoir.
b
The relationship between kg and kL is k g k L 1
p
50
k ro 0.713
100 0.7
MULTIPHASE FLOW EQUATIONS cont’d
Drainage and Imbibition Relative Permeability
Some deductions that may be made about the effect of saturation history on
relative permeability include:
We can understand the manner in which different fluids are distributed in the porous
medium by considering a model of porous medium in Figure below published by Fat
1958.
The average flow path from one point to another is greater than the
straight-line distance between the points.
If only one fluid is present in the porous medium, all the flow areas
are open to flow for the fluid.
But if two different immiscible fluids are present, the flow area to
each is reduced and flow path length is increased.
Ai where
k ro f
l Ai = area open to flow for phase i
i li = path length for phase i
Water, the wetting phases, occupies the smaller pores while oil occupies
the bigger pores
MULTIPHASE FLOW EQUATIONS cont’d
This implies that immediately oil that occupies the bigger pores enters, the relative
permeability to water, drops drastically.
Although no water is mobile at the irreducible water saturation, the whole flow path
is not open to oil flow because water blocks some paths.
A sketch of the relative permeability curves is shown in the Figure below
MULTIPHASE FLOW EQUATIONS cont’d
The saturation of the wetting phase depends on the wetting phase
saturation.
The inferences made for the oil/water system may also be made for
the gas/liquid system with the liquid as the wetting phases.
There are also theoretical methods which show that porosity, capillary
pressure, and relative permeability are related.
These follow from the fact that non-wetting phase relative permeability
is dependent on non-wetting phase saturation only.
One of these models is the Stone’s (1973) model that is derived from
channel-flow considerations.
In this, the relative permeability to oil in an oil/gas/water system is
Where S L 1 S g S o S wc
k ro k rocw k row / k rocw k rw k rog / k rocw k rg k rw k rg
In the above equation, any of the base-permeability may be used to
define relative permeability.
MULTIPHASE FLOW EQUATIONS cont’d
Capillary Pressure
This is the pressure difference existing across the interface separating
two immiscible fluids, one of which wets the surface of the rock in
preference to the other.
Mathematically;
pc p nw p w
In oil/water system with water as the wetting phase;
pcow po p w
For oil/gas: system with oil as the wetting phase;
pcog pg po
MULTIPHASE FLOW EQUATIONS cont’d
Thus, capillary pressure can have either a positive or a negative value
depending upon the wettability preference of the rock.
4. Water and oil are immiscible and there is no mass transfer between the
phases.
For oil, o
1
Bo
oSTC Rs gSTC
For water, 1
w wSTC
Bw
For gas 1
g gSTC
Bb
Continuity Equation for Multiphase system
When there are more than one fluid in a system, the continuity
equation must be written for each of the fluids.
That is, each fluid in the system must be conserved irrespective of the
form or phase in which the fluid exist.
x i qi V iS i inSC qoutSC qinSC V
x t
Continuity Equation for Multiphase system
But
qi Aui
i u i iS i inSC qoutSC qinSC
x t
i ui iSi inSC qoutSC qinSC
t
Continuity Equation for Multiphase system
i ui iSi inSC qoutSC qinSC
t
The above equation applies to any types of reservoir as long as the
terms i ui and iS i are defined appropriately.
If the fluid in the system is oil, water, and gas, the continuity equation
will be
FOR OIL o u o oS o oSC q oiloutSC q oilinSC
t
FOR WATER w u w wS w wSC q wateroutSC q waterinSC
t
It implies that:
Continuity Equation for Multiphase system
The pressure gradient terms p in the above five equations refer to
the pressure gradient in each phase.
The pressures in each phase are not the same because of capillary
pressure.
The term is simply the mass flow rate of fluid i per unit area open to
flow.
gSTC uo gSTC S o
ug gSTC Rso S g gSTC Rso
Bg Bo t Bg Bo
gSC qgasoutSC qgasinSC
The above equation simplifies to:
ug
uo Sg So
Rso Rso qgSC
Bg t
Bo Bg Bo
Where qgSC qgasoutSC qgasinSC
Multiphase Flow Equation; Black Oil Reservoir
Substituting the general equations of Darcy Velocity for
fluid i (SLIDE 98) into the above equation, we have that:
kk rg Rso kk rg S g S o
pg gz po oz Rso qgSC
Bg g Bo o t Bg Bo
S w Fw p c
Then,
S o 1 S w 1 Fw pc
Function exists if is monotonically increasing or decreasing with
saturation
Fw
w po pc w z q w
t Bw
The new form of the formulation has two equations (the last two
equations) and two unknowns p and
o Fw
Formulation in po and Sw
Multiplying the equation for oil with Bo and the one for water with
Bw gives:
1 Sw
Bo o po o z Bo
Bo q o
t Bo
S w
Bw w po pc S w w z Bw Bw q w
t Bw
Formulation in po and S w
The above equation can be written
=
as:
S w
Bw w po oz pc S w w z oz Bw Bw qw
t Bw
By addition,
Bo o po oz Bw w po oz B w w pc S w z
1 Sw S w
Bo qo Bw qw
t Bo t Bw
Where
w o
,
Formulation in po and S w
In a finite difference, if the saturations in the last equation are taken
explicitly, the equation becomes:
Bo o po o z Bw w po o z
Bo 1 S w
B q o B S
w w
B q w
t o t w
o , w , pc , S w and / Bw
With saturation explicit, t are known and
po
may be taken as function of
For example,
2
d y dy 4.1
2
0
dx dx
dn y d y
n
60 4.5
dx dx
CLASSIFICATION OF DIFFERENTIAL EQUATIONS
AND BOUNDARY CONDITIONS Cont’d
Examples of non-linear equations are
2 p p 2
4.6
x 2
t
d2 y d y
y 2 6 0
dx dx 4.7
Homogeneity of a differential equation depends on the form of the
independent variable in the equation.
d2 y d y
For example 2
y0 4.8
dx dx
is homogenous while
2
4.9
d y dy
2
y f x is non- homogenous
dx dx
Discussion on Classification of Differential Equation
Elliptic, Parabolic and hyperbolic Differential Equations
The general solution will contain arbitrary constants, which are evaluated
by imposing the boundary conditions to produce a unique solution.
is
y 3 x Ax B
2
4.20
• For example, the Dirichlet boundary condition may be specified at one end while the
Neumann boundary condition is specified at another part of the boundary.
• For a stable solution, small changes in the boundary conditions produce small changes
in the solution.
• Unique and stable solutions of both elliptical and parabolic differential equations may
be obtained by using either dirichlet or Neumann boundary conditions.
• Understanding the physical processes modeled by the equations and the significance of
Boundary and Initial Conditions used with Fluid Flow
Equations in Petroleum Engineering
One of the fluid flow equations is the diffusivity equation for flow of
slight but constant compressibility fluid.
2 p 1 p ct p
r 2
r r k t
In Equation 4.21, flow in both angular and Z directions are neglected.
The well location is the inner boundary while the outer limit of the
reservoir constitutes the outer boundary.
Boundary and Initial Conditions used with Fluid Flow Equations in
Petroleum Engineering
The possible conditions that may be imposed on these boundaries are
discussed.
The mathematical representations of these conditions are also given
Boundary and Initial Conditions used with Fluid Flow Equations in
Petroleum Engineering
Boundary and Initial Conditions used with Fluid Flow Equations in Petroleum
Engineering
Boundary and Initial Conditions used with Fluid Flow Equations in
Petroleum Engineering
• Equation 4.31 is simply a mathematical expression used to represent
systems for which the outer boundary has not noticed the effect of
fluid withdrawal at the well.
• This is p r ,0 pi
4.32
Boundary and Initial Conditions used with Fluid Flow Equations in
Petroleum Engineering
2u
q x 5.1
x 2
2u u 5.2
q x , t
x 2
t
u u
x, u Cx,u qx, t 5.3
x x t
1 u u
r r , u C r , u q r , t
5.4
r r r t
FINITE DIFFERENCE APPROXIMATIONS (FDA)
But with the numerical solution the value of the dependent variable is
known only at chosen discrete points within the medium.
p x,0 pi
p 0, t p0
The numerical solution is an approximation to the correct solution of
the problem, which is usually given by the analytical solution.
Hence, at a given time and location, the numerical solution may not
be exactly the same as the analytical solution.
Analytical and Numerical Solutions
The objective of every problem solving technique is to simplify the
problem so that a solution can be obtained.
For example, to obtain the solution to the fluid flow equation in the reservoir
shown in Figure 5.2a, a grid system may be imposed on the reservoir as shown in
Figure 5.2b.
This is done for problems with time as one of the independent variables.
The chosen time steps may not be of the same size
The smaller the time steps and grid sizes, the more accurate the numerically
obtained solutions
FINITE DIFFERENCES
• Variational method
In this course, we shall use the Taylor’s series method to derive the
finite-difference approximations of derivatives
Discretization in Space
In this figure, the actual derivative du/dx, at point i is the slope of the tangent to the
curve FEBDG, at point i.
Using forward difference approximation, the derivative at point is taken as the slope
of the BDH
Backward Difference Approximation
Taylor’s series expansion
u x x u x x u ' x
x 2
u '' x
x u ''' x 5.10
2! 3!
u x u x x
u x
'
b 5.11
x
Where
x ''
u x
x 2
u ''' x 5.12
b
2! 3!
Ox 5.13
Backward Difference Approximation
The order of the error in this case is unity as shown by Equation 5.13.
the slope of the line IEB is used to approximate the derivative given
Central Difference Approximation
Subtracting Equation 5.10 from Equation 5.5 gives
u x x u x x 2x u ' x 2
x 3
u ''' x 2
x 5
u v x 5.15
3! 5!
u x x u x x
u ' x c 5.16
2x
where
c
x ''
2
u x
x v
4
u x
5.17
3! 5!
0x
2 5.18
Central Difference Approximation
This is so because the higher the order of the error the smaller the
Central Difference Approximation
Graphical interpretation of the central difference approximation is
also shown in Figure 5.4.
5.20
FINITE-DIFFERENCE APPROXIMATION OF SECOND DERIVATIVE
u x x 2u x u x x
u x
''
5.21
x 2
where
x iv
4
u x
x vi
6
u x 5.22
12 360
O x
2
5.23
FINITE-DIFFERENCE APPROXIMATION OF SECOND DERIVATIVE
d2 u u i 1 2u i u i 1
dx 2 i
x 2
5.24
d 2u du
5 0 E5.1
dx 2 dx
3 3
1 x i 1
u 2u i 1 x u i 1 5x 2
E5.3
2 2
FINITE-DIFFERENCE APPROXIMATION OF SECOND DERIVATIVE
If we define
3
A 1 x
2
3
B 1 x
2
and
C x
2
E5.4
Au i 1 2u i Bu i 1 5C
FINITE-DIFFERENCE APPROXIMATION OF SECOND DERIVATIVE
Au1 2u 2 Bu3 5C
Au 2 2u3 Bu 4 5C
FINITE-DIFFERENCE APPROXIMATION OF SECOND DERIVATIVE
,
Hence, using the finite difference method, the resulting system of
algebraic equations will be solved to obtain a numerical solution to
the differential equation at discrete points corresponding to i =1, 2 and
3.
Hence, we also need to discretize the time by choosing time steps and
obtaining solutions at various times.
n 1in
u n
2u u
n n
u u in
i 1 i i 1
i
x 2
t 5.29
If we define
t
5.30
x 2
Equation 5.29 then becomes
5.31
u n 1
i u 1 2 u u
n
i 1
n
i
n
i 1
• Equation 5.31 implies that the value of u at point i at time level i+1
can be calculated from values of u at old time level n.
u n 1
i 1 1 2 u n 1
i 1 u n 1
i 1 u n
i 3.33
Solution can only be obtained if the equations for all the points are written
and solved simultaneously.
Explicit and Implicit Formulations
u n 1
0 1 2 u n 1
1 u n 1
2 u n
1
n 1 n 1
u0 u4
and are specified boundary conditions.
1 2
n 1
0 u1 u1n u 0
1 2 u
2 u2 n
Also u n is known.
i
1 u
n 1 / 2 n 1 n
u 2 u
2
2 x 2 i
O x
2
5.37
x i
2
x i
Combining Equations 5.36 and 5.37 and dropping the truncation error term
5.39
ui 1 2uin1 uin11 uin1 2uin uin1 uin1 uin
n1
2
t
where
x 2
Equation 5.39 is the Crank-Nicolson method and it is an implicit
formation.
Crank-Nicolson Method
In this section, some problems and solutions to some of the cases are
given.
Problem 1: Discretize
2u 2u
q
x 2
t
Solution 1
Using the explicit formulation
u in1 2u in u in1 u in 1 u in
qin
x 2 t
Problem 11 discretize
2u 2u u
x 2 y 2 t
Solution 11
The problem is a two dimensional problem and the grid system to be
used is shown in Figure E.1
u in11, j 2u in, j 1 u in11, j u in, j 11 2u in, j 1 u in, j 11 u in, j 1 u in, j
x 2
y 2
t
x y
and define
t
x 2
The discretized equation becomes
• In Figure E.2, the dots represent the nodes where u’s are known while
u’s represent the boundary nodes.
0x 2
consistent
00 x consistent
0x 0
inconsistent
Convergence:
Convergence: Let e i be the error in the finite-difference
approximate solution at i, then
e i U i ui 6 .1
ei
The error is called the error of the solution or the global
discretization error.
can be discretized as
u 2u u
i 1 i i 1
q 0 6.3
i
x 2
Convergence cont’d
As the global error esatisfies
i Equation 6.3 with source term
q replaced by negative of the truncation error R , that implies,
i i
e i 1 2 e i e i 1
Ri 0 6.4
x 2
1
2 e i Ri 0 6.5
x 2
2u u
q 0 6.6
x 2 t
Convergence cont’d
the explicitly finite difference formulation is
i u in1 2u in u in1 u in 1 u in
qin 0 6.7
x 2
t
in1 2 in in1 in 1 in
Ri 0 6.8
x 2 t
Note that the truncation error Ri in Eqn. (6.8) is the truncation error
due to both space and time discretization
This is quite true for linear differential equations and not true for
some non-linear problems
Stability
Stability: A finite-difference scheme is stable if any error introduced
at some stage of computation do not amplify during subsequent
computations.
Rather the opposite is the case because smaller mesh sizes and time
steps imply an increase in the number of arithmetic operations and
thus an increase in the round-off error.
Stability cont’d
If we define the followings;
U i
n
true solution
u in* finite difference approximation that includes both
the discretization and round - off errors
u i finite difference solution that includes both discretization error ,
the total error at po int i will be given as
Tin U in u in*
U u i
n n
i u n
i u n*
i 6.9
Discretization Round-off
Numerical studies show that the rounding errors are smaller than
Stability cont’d
Eqn. (6.9) gives the total error at point i at time level n.
n 1
Ti u n 1
i u n 1
i 6.10
The mathematical expression of the stability criterion is
n 1
Ti
1 6.11
n
Ti
Eqn. (6.12) implies that the error cannot grow with time. For an
unstable scheme,
Tin 1
1 6.12
Tin
Stability cont’d
Fig. 6.1 shows the forms of a stable and an unstable
scheme.
But
e i cos i sin 6.15
Stability cont’d
Hence, a general finite Fourier series representation of the function
is
N
f x A e inx / L 6.16
n
n0
where
i 1
Using Eqn. (6.16), the error at point p (we are using p to avoid
conflict of nomenclature) can be written as
N inpx / L
E A e 6.17
p n
n0
Stability cont’d
The x in Eqn. 6.17 is now replaced by pΔx and p takes values 0, 1, 2,3
……..
Let us define
n
6.18
n L
N iB px
E A e n 6.19
p n
n0
As the error is additive, we can forget the summation sign and simply
express the error as
iB px
E A e n 6.20
p n
Stability cont’d
The error term we have developed so far is
independent on time.
We can drop the constant An in Eqn. 6.22 as it will eventually drop out
in our analysis.
N
P c inpx
n
6.23
Where is the amplification factor
If the scheme is to be stable, the error must not grow with time. Form
Eq 6.24, this implies that
1 6. 24
Stability cont’d
Examples on stability of some finite-difference scheme now follow
2u u
6.25
x 2
t
Using the implicit formulation establish the stability criterion for this
Scheme
u in11 2u in 1 u in11 u in 1 u in
6.26
x 2 t
Stability cont’d
Let us define
t
6.27
x 2
Hence
2 Cos n x 1 1
Stability cont’d
Also,
Z
1 Cos Z 2 sin 2
2
n x
On substitution yields 4 Sin 1
2
1
n x
Thus, 1 4 Sin 2
2
u n
i 1 2u
n
i u n
i 1 u n 1
i u n
i
np 1 2 np np 1 np1 np
substituting Eqn. (6.23)
iBnx 2 iBnx 1
2
For the scheme to be stable
1
This implies that
n x
1 1 4 Sin 2
1
2
Stability cont’d
The above Equation gives
n x
0 4 Sin 2
2
2
1
And hence
n x
2 Sin 2
2
n x
The maximum value Sin 2 can take is unity. Hence the criterion
2
1
2
Will guarantee the stability of the scheme.
Discretizing, we have
Therefore,
C iBnx 1 1
Therefore,
1
1
1 iBnx
Thus, 1
1
1 c iBnx
1 Cos i Sin 1
Stability cont’d