You are on page 1of 122

Basic Reservoir Simulation

Lateef Akanji (Ph.D., D.I.C.)


Petroleum and Gas Engineering
University of Salford
l.t.akanji@salford.ac.uk
February 21, 2012
2
Contents
1 Introduction 11
1.1 The meaning of simulation . . . . . . . . . . . . . . . . . . . . . 12
1.2 The need for reservoir simulation . . . . . . . . . . . . . . . . . . 12
1.3 Steps in a simulation study . . . . . . . . . . . . . . . . . . . . . 13
1.3.1 Setting the objectives . . . . . . . . . . . . . . . . . . . . 13
1.3.2 Choosing the proper simulation approach . . . . . . . . . 13
1.3.3 Gathering, collecting and preparing the input data . . . . . 13
1.3.4 Planning simulation runs . . . . . . . . . . . . . . . . . . 14
1.3.5 Analyzing, interpreting and reporting the results . . . . . 14
1.4 Reservoir simulation approach . . . . . . . . . . . . . . . . . . . 14
2 Mathematical concepts 19
2.1 Elementary vector analysis . . . . . . . . . . . . . . . . . . . . . 19
2.2 Vector gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3 Divergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.3.1 Divergence of gradient . . . . . . . . . . . . . . . . . . . 22
2.3.2 Divergence theorem and the continuity equation . . . . . . 22
2.4 Matrix methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.4.1 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.4.2 Order of a matrix . . . . . . . . . . . . . . . . . . . . . . 24
2.5 Matrix operations . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.5.1 Addition . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.5.1.1 Subtraction . . . . . . . . . . . . . . . . . . . . 26
2.5.2 Multiplication . . . . . . . . . . . . . . . . . . . . . . . . 26
2.6 Determinants . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.7 Matrix inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.8 Matrix Eigenvalue problem . . . . . . . . . . . . . . . . . . . . . 27
2.9 Solution of simultaneous linear algebraic equations . . . . . . . . 28
2.9.1 Gaussian elimination . . . . . . . . . . . . . . . . . . . . 28
2.9.1.1 Gaussian elimination - worked example . . . . 28
2.9.2 Gauss-Jordan method - worked example . . . . . . . . . . 31
3
4 CONTENTS
2.9.3 LU decomposition - worked example . . . . . . . . . . . 32
2.10 Iterative methods . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.10.1 Iterative methods - worked example . . . . . . . . . . . . 33
3 Fundamental equations of ow through porous media 35
3.1 Laminar viscous ow . . . . . . . . . . . . . . . . . . . . . . . . 36
3.1.1 Viscous forces . . . . . . . . . . . . . . . . . . . . . . . 36
3.1.2 External forces . . . . . . . . . . . . . . . . . . . . . . . 36
3.1.3 Force of gravity . . . . . . . . . . . . . . . . . . . . . . . 37
3.2 Darcys equation for liquids . . . . . . . . . . . . . . . . . . . . . 37
3.3 Darcys equation for gases . . . . . . . . . . . . . . . . . . . . . 37
3.3.1 Turbulent ow . . . . . . . . . . . . . . . . . . . . . . . 38
3.4 Differential form of Darcys equation . . . . . . . . . . . . . . . 38
3.4.1 Darcys law for anisotropic porous media . . . . . . . . . 39
3.5 Equations of state for uids . . . . . . . . . . . . . . . . . . . . . 39
3.6 Equations of state for gases . . . . . . . . . . . . . . . . . . . . . 40
3.7 Continuity Equation . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.7.1 Single-phase incompressible ow . . . . . . . . . . . . . 40
3.7.2 Compressible uids . . . . . . . . . . . . . . . . . . . . . 43
3.7.3 Ideal gas ow . . . . . . . . . . . . . . . . . . . . . . . . 44
3.7.4 Real gas ow . . . . . . . . . . . . . . . . . . . . . . . . 44
3.8 Generalized multiphase ow equation . . . . . . . . . . . . . . . 46
3.9 Black-oil reservoir simulator . . . . . . . . . . . . . . . . . . . . 48
4 Reservoir ow geometries and dimensions 51
4.1 Tank models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.2 1D models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.3 2D models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.3.1 2D cross-sectional and radial models . . . . . . . . . . . 53
4.4 3D models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.4.1 Spherical ow geometry . . . . . . . . . . . . . . . . . . 56
4.4.2 Elliptical-cylindrical ow geometry . . . . . . . . . . . . 58
5 Finite difference methods 59
5.1 Reservoir grids and boundary conditions . . . . . . . . . . . . . . 62
5.1.1 Structured grids . . . . . . . . . . . . . . . . . . . . . . . 62
5.1.1.1 Rectilinear grids . . . . . . . . . . . . . . . . . 64
5.1.1.2 Curvilinear grids . . . . . . . . . . . . . . . . . 64
5.1.2 Unstructured grids . . . . . . . . . . . . . . . . . . . . . 65
5.2 Boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . 65
5.2.1 Dirichlet boundary conditions . . . . . . . . . . . . . . . 65
CONTENTS 5
5.2.2 Neumann boundary conditions . . . . . . . . . . . . . . . 69
5.2.3 Discretization of Boundary Conditions . . . . . . . . . . 71
5.2.4 Initial Conditions . . . . . . . . . . . . . . . . . . . . . . 71
5.2.5 Treatment of individual wells . . . . . . . . . . . . . . . 72
5.3 Application to single-phase ow in 1D . . . . . . . . . . . . . . . 73
5.3.1 Example: one-dimensional ow system . . . . . . . . . . 76
5.3.2 Truncation error . . . . . . . . . . . . . . . . . . . . . . 78
5.3.3 Truncation error in boundary conditions . . . . . . . . . . 79
5.4 Application to single-phase ow in 2D . . . . . . . . . . . . . . . 80
5.4.1 Explicit form of the difference equation . . . . . . . . . . 82
5.4.2 Implicit form of the difference equation . . . . . . . . . . 82
5.4.3 Matrix form . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.4.4 Example: two-dimensional ow system . . . . . . . . . . 84
5.5 Multiphase ow in 3D . . . . . . . . . . . . . . . . . . . . . . . 85
5.5.1 Implicit Pressure-Explicit Saturation (IMPES) solution method 91
5.5.2 Simultaneous Solution (SS) method . . . . . . . . . . . . 92
5.5.3 Example: three-dimensional ow system . . . . . . . . . 94
5.6 Solution methods . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.6.1 Direct methods . . . . . . . . . . . . . . . . . . . . . . . 95
5.6.1.1 Gaussian elimination . . . . . . . . . . . . . . 95
5.6.1.2 Band matrix equations . . . . . . . . . . . . . . 96
5.6.2 Ordering schemes . . . . . . . . . . . . . . . . . . . . . . 97
5.6.2.1 Standard ordering . . . . . . . . . . . . . . . . 97
5.6.2.2 A3 and D4 ordering . . . . . . . . . . . . . . . 99
5.6.3 Iterative methods . . . . . . . . . . . . . . . . . . . . . . 99
5.6.3.1 Point relaxation . . . . . . . . . . . . . . . . . 99
5.6.4 Alternating Direction Implicit Procedure (ADIP) . . . . . 100
5.6.5 Factorization and minimization methods . . . . . . . . . . 101
5.6.5.1 Strongly Implicit Procedure (SIP) . . . . . . . . 102
5.7 Comparison of direct and iterative methods . . . . . . . . . . . . 103
6 Compositional simulation models 107
6.1 Phase behaviour and equations of state . . . . . . . . . . . . . . 108
6.1.1 Reservoir uid characterization . . . . . . . . . . . . . . 108
6.1.2 Equations of State (EOS) . . . . . . . . . . . . . . . . . . 110
6.1.3 Equation of state for perfect and real gases . . . . . . . . 112
6.1.4 Cubic equation of state . . . . . . . . . . . . . . . . . . . 112
6.1.4.1 Redlich-Kwong . . . . . . . . . . . . . . . . . 114
6.1.4.2 Soave . . . . . . . . . . . . . . . . . . . . . . 115
6.1.4.3 Peng-Robinson . . . . . . . . . . . . . . . . . 115
6.1.4.4 Multicomponents and mixing rules . . . . . . . 116
6 CONTENTS
6.1.4.5 Virial . . . . . . . . . . . . . . . . . . . . . . . 117
6.2 Dening reservoir composition . . . . . . . . . . . . . . . . . . . 118
6.2.1 Compositional initialisation in a single-phase reservoir . . 118
6.2.2 Compositional initialisation in a reservoir with GOC . . . 119
6.2.3 Original uid in place . . . . . . . . . . . . . . . . . . . 119
6.2.4 Black oil and compositional models . . . . . . . . . . . . 120
List of Figures
1.1 Stages in carrying out reservoir simulation studies . . . . . . . . . 15
1.2 Workow for building a simulation model . . . . . . . . . . . . . 17
2.1 Cartesian coordiante . . . . . . . . . . . . . . . . . . . . . . . . 20
2.2 (a) Four neighbouring triangles and quadrilaterals share node C around
which nite volume is built using nite-element barycenters and mid-
points of faces. Finite-elements are subdivided into sectors delimited by
nite-volume facets, f, with outward pointing normals, n. (b) 3D nite
volume composed of six pyramid nite elements. . . . . . . . . . . . 23
3.1 Elemental volume in a region of uid ow . . . . . . . . . . . . . 41
4.1 A tank model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.2 A one-dimensional model . . . . . . . . . . . . . . . . . . . . . . 52
4.3 A two-dimensional model . . . . . . . . . . . . . . . . . . . . . . 53
4.4 A cross-section of a two-dimensional model . . . . . . . . . . . . 54
4.5 A cross-section of a radial r, z coordinate system . . . . . . . . . . 54
4.6 Areal model in cartesian coordinate system . . . . . . . . . . . . 55
4.7 Areal model in radial r, coordinate system . . . . . . . . . . . . 55
4.8 Areal model in curvilinear coordinate system . . . . . . . . . . . 55
4.9 A three-dimensional model in cartesian coordinate system . . . . 56
4.10 A three-dimensional radial model grid. r
e
is the reservoir external
radius and r
w
is the well-bore radius . . . . . . . . . . . . . . . . 57
4.11 A spherical geometry . . . . . . . . . . . . . . . . . . . . . . . . 57
4.12 (a) An ellipse (b) Flow prole (confocal hyperbolas) in a sys-
tem of equipotential contours (confocal ellipses) passing through
a high conductivity fracture . . . . . . . . . . . . . . . . . . . . . 58
5.1 One-dimensional discretization into blocks . . . . . . . . . . . . . 61
5.2 Mesh-intersection grid points . . . . . . . . . . . . . . . . . . . . 63
5.3 Block-centered grid points . . . . . . . . . . . . . . . . . . . . . 63
5.4 Irregular block-centered grid . . . . . . . . . . . . . . . . . . . . 64
7
8 LIST OF FIGURES
5.5 Three common types of meshes include: (a) rectilinear; (b) curvi-
linear; (c) unstructured grid with varying element size; and (d)
hybrid nite-element mesh showing featureless regions consisting
of hexahedra, constrained ones of tetrahedral, and transitions cov-
ered by pyramid and prism elements interfacing tetrahedra with
hexahedra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.6 (a) Dirichlet boundary condition for a mesh intersection grid (b)
Dirichlet boundary condition for block-centered grid (c) Neumann
boundary condition for a mesh intersection grid (d) Neumann bound-
ary condition for a block-centered grid . . . . . . . . . . . . . . . 67
5.7 Dirichlet boundary condition in a mesh intersection grid system . 68
5.8 Finite-element mesh of a 30m10m channel geometry show-
ing a Dirichlet boundary conditions at the inlet and outlet of the
model, a reference slit, the nodes and the velocity elds com-
puted at the barycenter of each of the nite-elements (Akanji and
Matthai, 2010). . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.9 Boundaries for r z systems with a single well of radius r
w
. . . . 70
5.10 A typical boundary grid-block in a cross-sectional model . . . . . 71
5.11 A typical grid-block hosting a vertical well of radius r
w
and height h 72
5.12 Finite difference mesh for two independent variables x and t . . . 74
5.13 Finite difference mesh for three independent variables x, y and t . 74
5.14 A simple block-centered one-dimensional system composed of
ve blocks with Dirichlet boundary conditions specied at the rst
and fth blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.15 Nomenclature for pressure coefcients . . . . . . . . . . . . . . . 82
5.16 A simple block-centered two-dimensional system composed of
nine blocks with Dirichlet boundary conditions specied at the
blocks 1, 2 and 3. The grids are numbered using normal grid or-
dering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.17 A simple block-centered three-dimensional system composed of
twenty-seven blocks with Dirichlet boundary conditions specied
at the blocks 1, 2, 3, 10, 11, 12, 19, 20 and 21. The grids are num-
bered using normal grid ordering. . . . . . . . . . . . . . . . . . 95
5.18 Standard ordering of model gridblocks (a) 42 and (b) 24 . . . 98
5.19 Coefcient matrices of (a) 42 and (b) 24 . . . . . . . . . . . 98
5.20 Ordering of gridblocks (a) A3 and (b) D4 . . . . . . . . . . . . . 99
5.21 Guidelines for selecting a solution method . . . . . . . . . . . . . 105
6.1 The Van Der Waals isotherms near the critical point . . . . . . . . 113
List of Tables
3.1 Number of unknowns in the multiphase equation . . . . . . . . . 47
3.2 Number of auxilliary relations required to solve the equation . . . 47
3.3 Description of the mass fractions in black oil simulator . . . . . . 48
3.4 Description of the volume-related parameters in black oil simulator 49
9
10 LIST OF TABLES
Recommended texts
The books that cover much of the material in the class are:
1. Petroleum Reservoir Simulation by Aziz and Settari (1979)
2. Principles of Hydrocarbon Reservoir Simulation by Thomas (1981)
3. Reservoir Simulation by Mattax and Dalton (1990)
4. Modern Reservoir Engineering - ASimulation Approach by Crichlow(1976)
Chapter 1
Introduction
The primary objective in a reservoir management study is to determine the op-
timum conditions needed to maximize the economic recovery of hydrocarbons
from a prudently operated eld. Reservoir simulation is the most sophisticated
method of achieving the primary reservoir management objective. There are sev-
eral reasons for carrying out reservoir studies. These include:
1. cash ow prediction
economic forecast of hydrocarbon price is needed in acieving corporate
goals
2. coordinate reservoir management activities
3. evaluate project performance in order to interpret and understand reservoir
behaviour
4. determination of model sensitivity to estimated data and to identify need for
additional data
5. estimation of project life
6. prediction of hydrocarbon recovery with time
7. comparison of different recovery processes
8. plan developmental or operational changes
9. selection and optimization of project design in order to maximize economic
recovery
11
12 CHAPTER 1. INTRODUCTION
1.1 The meaning of simulation
Simulation involves the application of computer model(s) to understand the be-
haviour of a physical process. It is used in carrying out an extensive study of a
particular problem or in conrming an hypothesis. In petroleum engineering, sim-
ulation is used to describe the hydrodynamics of ow of hydrocarbon uid from
the reservoir through the well-bore and the surface facilities. In reservoir sim-
ulation, the basic ow model consists of the partial differential equations which
govern the unsteady-state ow of all uid phases in the medium. The input data
into the reservoir simulator is prepared by many different disciplines and all algo-
rithms needed to solve the equations are incorporated into the model.
A simulation exercise is an evolutionary process involving continuous rene-
ment based on our conceptual understanding of the entire system. While the im-
portance of an accurate reservoir description in a good reservoir simulation study
is so pertinent, we do need to acknowledge the fact that data availability is always
a challenge. A better understanding of the system is therefore achieved through
renement of the initial data. The outcome of a reservoir simulator would there-
fore strongly depend on the quality of the input data.
1.2 The need for reservoir simulation
The number of variables that an engineer is faced with, in order to adequately
capture the whole system is usually enormous. These variables may not be de-
ned in an easily denable form but they do exist. Although analytical tools have
been used in proferring exact solution to approximate problems; they become less
effective as the complexity of the problems increase. In petroleum engineering
discipline, complexity in physical processes is more the rule than exception. The
engineer today is expected not only to determine the best performance based on
physical behaviour, but also to be conversant with the increasing level of inter-
action between the economic, regulatory, legal and environmental impact of his
decisions. The level of complexity in reservoir engineering therefore requires a
reasonable amount of data to be incorporated into the simulator.
A reservoir simulation exercise can then provide answers to several intriguing
questions bothering on effective exploitation mechanisms, optimum performance
and improved recovery techniques.
1.3. STEPS IN A SIMULATION STUDY 13
1.3 Steps in a simulation study
There are ve basic steps in conducting a reservoir simulation study:
1.3.1 Setting the objectives
The major objectives of reservoir simulation are in two-folds: one is investigative
and the other is substantive. Investigative objective involves carrying out simu-
lation in order to identify specic cause of a problem in a system. For instance,
a simulation study that matches well test data for the purpose of determining the
damaged zone around a wellbore is investigative. Substantive objective involves
developing a number of plausible scenarios for a process (e.g., waterooding) and
studying the system response in an attempt to determine the optimum scenario. In
this case, a number of numerical exercises must be carefully developed to avoid
waste of time on exercises that may not signicantly contribute toward the goal.
1.3.2 Choosing the proper simulation approach
The approach to adopt in any simulation study would depend on the reservoir
complexity, the uid type and the scope of the study. Depending on the complex-
ity of the reservoir system and the scope of study, we can choose to conduct the
simulation in 1, 2 or 3-dimensions. Further, the type of uid(s) involved in the
simulation would determine whether a black oil, compositional, thermal (steam
and in situ combustion), chemical (surfactant and polymer), hydrocarbon misci-
ble, or CO2 ooding would be appropriate.
1.3.3 Gathering, collecting and preparing the input data
In reservoir simulation, one of the most tedious exercise is data gathering, col-
lection and preparation. Most times, this requires collaboration among technical
personnel with varying levels of expertise. For instance, geological and geophysi-
cal data are extremely crucial and needed to be processed in the form that is useful
for reservoir description. In situations where data are sparse or incomplete, statis-
tics or other tools can prove quite helpful. Due to the large volume of data needed
to be processed and the likelihood of internal inconsistencies in the data, the en-
gineer must have strong organizational skills and sound judgment.
The time spent in adequately preparing and ensuring internal consistency in
input data can be worthwhile since a great deal of problems can be avoided in the
process. The engineer should ensure that all inconsistencies are resolved at the
14 CHAPTER 1. INTRODUCTION
data preparation stage as the presence of inconsistencies can lead to severe sim-
ulation problems. Ill-posed problems due to data inconsistency can prevent the
simulator from running. However, when the inconsistencies are burried within the
system, the simulator may run but yield erroneous solutions. Modern simulators
and compilers/debuggers have internal checks to detect and ag any inconsisten-
cies in the data.
1.3.4 Planning simulation runs
An engineer must carefully map out the type and number of computer runs that
will achieve the set objectives at a minimum cost. The number of parameters
to be examined as well as the duration of prediction and the type of information
needed to answer the pertinent questions should be carefully considered. Care-
ful planning of computer runs includes not only determining their order, but also
establishing a systematic labelling procedure for them. This is particularly im-
portant because of the large number of runs usually required and the voluminous
amount of information invariably generated for analysis.
1.3.5 Analyzing, interpreting and reporting the results
The analysis of results caps all the steps in simulation studies. The mode of anal-
ysis and the presentation of results will depend very largely on the audience for
whom they are meant and the post-processing capability available. Judgement as
to how realistic the simulation results are comes with experience and can largely
be based on comparison with laboratory and/or analytic results. The graphics
capabilities currently available on most computers now make it easier to visual-
ize information in three-dimension. In addition, graphics features, such as image
rotation and animation, enhance our interpretation and inferential ability.
The stages in carrying out reservoir simulation studies is shown in Figure 1.1.
First is setting the objectives, then choosing the simulation approach followed by
preparation of input data; since the computer program, based on the mathematical
model needs input. Then we need to plan the computer runs, analyse the results
and make necessary inferences.
1.4 Reservoir simulation approach
In order to understand uid ow, evaluate the behaviour and predict the perfor-
mance of oil and gas reservoirs, the petroleum engineer models the relevant phys-
ical and chemical processes by systems of partial differential equations. This
1.4. RESERVOIR SIMULATION APPROACH 15
Figure 1.1: Stages in carrying out reservoir simulation studies
16 CHAPTER 1. INTRODUCTION
equations account for mass and heat transfer. They include terms for gravity, cap-
illary and viscous forces. Thermodynamic equilibrium conditions determine the
number of existing phases, their composition and properties. Reservoir simula-
tion therefore involves the numerical solution of such systems with a computer,
together with appropriate boundary and essential conditions as supplementary re-
lationships. A reservoir is a three-dimensional, heterogeneous, anisotropic rock
body, lled up inhomogenously with uids of different composition. It is evident
that a reservoir model can only be constructed mathematically.
The mathematical model consists of constitutive equations (e.g., Darcy equa-
tion), balance equations, property functions and constraints. The balance equa-
tions combined with Darcys law yield highly non-linear, partial differential equa-
tions of mixed hyperbolic-parabolic type. In general, those equations cannot be
solved analytically, but can be solved numerically by replacing the differential
equations with difference equations. This process is called discretization (Figure
1.2).
The discretization must start with the construction of an appropriate grid or
mesh followed by the setting up of proper algebraic equations. There are two
methods available of discretization: the nite difference and the nite element
method. When dealing with mass transfer both methods need a denition of a
control volume around a grid point. Consequently, they are called the Control Vol-
ume Finite Difference (CVFD) and the Control Volume Finite Element (CVFE)
method. Both methods reduce the differential equations to a nite-dimensional
system of algebraic equations. The discretization method can be based on Taylor
series, leading to nite difference method (FDM), on integral formulation, lead-
ing to control volume difference method (CVDE) or on variational formulation
resulting in nite element method (FEM). A special variant of FEM is the control
volume nite element method (CVFE).
The major requirements in discretization is that the discrete solution has to be
a good approximation to the exact solution and the structure of the matrix equa-
tion must be such that the solution can be obtained economically.
1.4. RESERVOIR SIMULATION APPROACH 17
Figure 1.2: Workow for building a simulation model
18 CHAPTER 1. INTRODUCTION
Chapter 2
Mathematical concepts
In order to grasp the concepts involved in the formulation and use of reservoir
simulators, it is necessary that we have an adequate knowledge of some basic
mathematical tools, particularly the vector analysis and matrix theory.
2.1 Elementary vector analysis
From high school physics, we know that a vector is a quantity having both mag-
nitude and direction. If we denote a vector by v, then its magnitude is denoted
by |v|; also called the modulus or norm of v. Thus, the velocity of a particle P of
uid at a point M in a reservoir R is a vector in contrast to reservoir temperature
and density which are scalar quantities and thus, not characterized by directional
property (see also Thomas (1981)).
The direction of a vector v in 3dimensional space is specied by its com-
ponents in the x, y and z directions. Vector v is then the resultant of its vector
components, thus:
v = v
1
+ v
2
+ v
3
(2.1)
In terms of unit vector, equation 2.1 can be further expressed in terms of unit
vectors (

i,

j,

k) each with moduli unity and having directions that are parallel to
the x, y and z coordinate axes, respectively.
v = v
1

i +v
2

j +v
3

k, (2.2)
where | v
1
| = v
1
, | v
2
| = v
2
, | v
3
| = v
3
and v
1
, v
2
, v
3
are the scalar components
of v.
19
20 CHAPTER 2. MATHEMATICAL CONCEPTS
Figure 2.1: Cartesian coordiante
Regardless of the positionv occupies in space, its representation would still be
given by its scalar component as given by equation 2.2. A vector can therefore be
dened simply as an ordered triple of numbers thus;
v = (v
1
, v
2
, v
3
) (2.3)
The collection of all such vectors is referred to as 3dimensional Euclidean
space, E
3
, if for vectors x = (x
1
, x
2
, ..., x
n
) and x = (y
1
, y
2
, ..., y
n
), the following
vector addition and subtraction are also true:
1. commutativity
x +y =y +x (2.4)
2. associativity
x +(y +z) = (x +y) +z (2.5)
3. nullity
x +(y) =

0
x +

0 =x
(2.6)
This concept can be generalized to a collection of ndimensional Euclidean
(E
n
) space vectors (where n >3); which is an abstract one. It is not possible to dis-
play pictorially. The dimension of a Euclidean space should not be confused with
the dimensionality of a reservoir which modelled at most in 3dimensions. In or-
der words, a Euclidean space is not the spatial conguration we assign to a reser-
voir. Rather, it is a mathematical entity that provides us a framework within which
we can discuss the numerical solution of a reservoir engineering problems. Thus,
the computation of pressure at nordered points in a reservoir can be thought of
as nding the solution vector (p
1
, p
2
, p
3
, ..., p
n
).
2.2. VECTOR GRADIENT 21
Scalar multiplication of a vector can also be considered thus: if is a scalar
and a = (a
1
, a
2
, ..., a
n
) then, a = (a
1
, a
2
, ..., a
n
). Furthermore, a =a,
(a +

b) = a +

b and ( +)a = a +a, for another scalar . All vectors


in a Euclidean space satisfying these properties of scalar multiplication constitute
a vector space.
The dot or inner product of two vectors a and

b is given by:
a

b = (a
1
b
1
+a
2
b
2
+... +a
n
b
n
), (2.7)
a

b =|a||b|cos, (2.8)
where is the angle between a and

b. Notice that the dot products of vectors


results in a scalar quantity (i.e. scalar product). If a

b = 0 then we saya and

b are
orthogonal. The cross-product or vector product on the other hand can be dened
such that a vector rather than a scalar quantity is obtained. It is particularly useful
in describing those processes characterized by rotational ow. Such regimes are
generally negligible in global reservoir problems.
The length or norm of a vector is given by
|a| = (aa)
(1/2)
, (2.9)
2.2 Vector gradient
Let (x, y, z) be a scalar function such that

x
,

y
,

z
are continuous at some
point M in R. Physically, these represent rates of change with respect to distance
in each of the coordinate directions x, y and z. The gradient of is given by
=

x

i +

y

j +

z

k (2.10)
The scalar eld whose gradient is is referred to as the potential of the
vector eld . The corresponding surfaces S
c
are equipotential surfaces. Simu-
lation engineers are often confronted with the determination of potential distribu-
tions or the potential gradients, throughout the system. The potential gradient
has the following important properties: (1) It is a vector function, (2) Its direc-
tion is in the direction of maximum increase of , (3) It is always perpendicular
to the equipotential surface, S
c
, dened by (x, y, z) = c (4) It remains invariant
under a coordinate transformation.
22 CHAPTER 2. MATHEMATICAL CONCEPTS
2.3 Divergence
The divergence of a velocity vector v(x, y, z) at a point M in 3space is given by:
div|v| =v =
_

x

i +

y

j +

z

k
_
(v
1

i +v
2

j +v
3

k), (2.11)
v =
v
1
x
+
v
2
y
+
v
3
z
(2.12)
The divergence of a vector is a scalar quantity and remains invariant under a
coordinate transformation.
2.3.1 Divergence of gradient
The divergence of the gradient of can be written as:
div(grad ) =
=
_

x

i +

y

j +

z

k
_

i +

y

j +

z

k
_
=

2

x
2
+

2

y
2
+

2

z
2

2
, (2.13)
where
2
=

2
x
2
+

2
y
2
+

2
z
2
is the Laplacian operator.
2.3.2 Divergence theorem and the continuity equation
The divergence theorem, also known as Gausss theorem is a theorem in vector
calculus that relates an integral over a volume V to an integral dened on its sur-
face, S, thus
_
V
vdV =
_
S
v d
=
_
S
v ndS (2.14)
where v is a velocity vector in V, dV is a differential element of volume in V, d
is a directed element of surface =ndS and n is an outward unit vector normal to
the scalar surface element, dS, see Figure 2.2. Considering the uid ux q = v
at a point C, then
2.3. DIVERGENCE 23
_
V
(v) dV =
_
S
v d
=
_
S
v ndS (2.15)
Figure 2.2: (a) Four neighbouring triangles and quadrilaterals share node Caround which
nite volume is built using nite-element barycenters and midpoints of faces. Finite-
elements are subdivided into sectors delimited by nite-volume facets, f, with outward
pointing normals, n. (b) 3D nite volume composed of six pyramid nite elements.
Since vn dS =|v| |n dS|cos =dS |v| cos, where is the angle between
vectorsn andv, then vn dS physically represents the component of the uid ux
escaping fromV through the element of surface dS in the direction of the outward
normal. Therefore the integral of this quantity over the entire surface of V can be
written as
_
S
v n dS =
_
V

t
()dV, (2.16)
or combining Equation 2.15 and 2.16, we can write
_
V
(v) dV =
_
V

t
()dV, (2.17)
Since V is an arbitrary volume, it follows that
(v) =

t
(), (2.18)
which is known as the continuity equation and basically depicts the law of con-
servation of mass at a point C in V.
24 CHAPTER 2. MATHEMATICAL CONCEPTS
2.4 Matrix methods
A matrix is simply a rectangular array of elements arranged in horizontal rows
and vertical columns.
2.4.1 Matrices
Examples of matrices are:
X =
_
_
1 4 1
2 0 2
3 2 3
_
_
, Y =
_
_
1 3
0 0
5 2
_
_
, Z =
_
1
0
_
(2.19)
2.4.2 Order of a matrix
We say a matrix is of order mn if it consists of m rows and n columns. A matrix
is said to be a square matrix of n
th
-order if m = n. In general, an mn matrix will
be denoted by
X =
_

_
a
11
a
11
... a
1n
a
21
a
22
... a
2n
. . .
. . .
. . .
a
m1
a
m2
... a
mn
_

_
(2.20)
which be simply written as X = [x
i j
]; meaning X is a collection of elements with
row index i and column j.
The collection of elements X = [x
i j
] is called the main diagonal of the matrix.
If all the elements of X are zero with the exception of the diagonal matrix, then X
is called a diagonal matrix i.e.
X =
_

_
x
11
0
.
.
.
0 x
nn
_

_
(2.21)
If x
ii
= , a constant for all i then X is called a scalar matrix and a scalar identity
matrix I results when = 1.
2.5. MATRIX OPERATIONS 25
A lower triangular matrix, L, is a square matrix where x
i j
= 0, for i < j, while
an upper triangular matrix, U, has elements x
i j
= 0 for i > j
The transpose of a matrix X = [x
i j
] is denoted by X
T
= [x
ji
], e.g.
X =
_

_
x
11
x
11
... x
1m
x
21
x
22
... x
2m
. . .
. . .
. . .
x
m1
x
m2
... x
mm
_

_
, X
T
=
_

_
x
11
x
21
... x
m1
x
12
x
22
... x
m2
. . .
. . .
. . .
x
1m
x
2m
... x
mm
_

_
(2.22)
A square matrix X is said to be symmetric if X = X
T
. If X = X
T
, then it is
skew symmetric. It should be noted that the vector v = (v
1
, v
2
, ..., v
n
) is a 1 n
(i.e. row matrix). Similarly, v
T
its transpose,
v
T
=
_

_
v
1
v
2
.
.
.
v
n
_

_
(2.23)
is an n 1 column matrix. Further, the rows and columns of an n n matrix X
are are known as the row vectors and column vectors respectively, since each is
an ordered ntuple of elements.
2.5 Matrix operations
Given two matrices
X =
_
2 0
1 1
_
, Y =
_
3 1
0 2
_
(2.24)
we can dene some essential operations involving matrices thus;
2.5.1 Addition
X+Y =
_
2+3 0+1
1+0 1+(2)
_
=
_
5 1
1 3
_
(2.25)
26 CHAPTER 2. MATHEMATICAL CONCEPTS
2.5.1.1 Subtraction
XY =
_
23 01
10 1(2)
_
=
_
1 1
1 1
_
(2.26)
2.5.2 Multiplication
XY =
_
2 0
1 1
__
3 1
0 2
_
=
_
2(3) +0(0) 2(1) +0(2)
1(3) +1(0) 1(1) +1(2)
_
=
_
6 2
3 3
_
(2.27)
2.6 Determinants
A determinant is a single number that we associate with a square matrix X:
det(X) =

x
11
x
21
... x
m1
x
12
x
22
... x
m2
. . .
. . .
. . .
x
1m
x
2m
... x
mm

=|X|. (2.28)
To compute the |X|, we consider the minor and the cofactors. The minor of a
square matrix X is the determinant of any square submatrix of X obtained by
removal of equal number of rows and columns. The cofactor of the element x
i j
is a scalar obtained by multiplying together the term (1)
i+j
and the minor M
ij
obtained by eliminating the i
th
row and the j
th
column. A general determinant for
a matrix X has a value
|X| =
k

i=1
x
i j
=
k

i=1
x
i j
C
i j
(2.29)
with no implied summation over j and where C
i j
is the cofactor of x
i j
dened by
C
ij
(1)
i+j
M
ij
(2.30)
2.7 Matrix inverse
The inverse of an nn matrix is a square matrix B satisfying
XX
1
= X
1
X = I (2.31)
2.8. MATRIX EIGENVALUE PROBLEM 27
If |X| = 0 then X
1
exists and X is said to be invertible or nonsingular. If, on the
other hand, |X| = 0, then X
1
will not exist and X is singular. This is particu-
larly useful when solving simultaneous algebraic equations for instance, given the
following set of simultaneous equations;
5x 3y +2z = 14
x +y 4z = 7
7x 3z = 1, (2.32)
we can solve for x, y, and z in terms of a matrix equation Ax = b, where A is the
coefcient of the matrix.
A =
_
_
5 3 2
1 1 4
7 0 3
_
_
x =
_
_
x
y
z
_
_
b =
_
_
14
7
1
_
_
(2.33)
Since |A| = 0, A is nonsingular and the solution vector x can be found by premul-
tiplying the matrix equation by A
1
, i.e.
A
1
Ax = A
1
b
Ix = A
1
b
x = A
1
b (2.34)
2.8 Matrix Eigenvalue problem
Most times we are faced with a problem of the form
Ax = x (2.35)
where A is n
th
order matrix, x is a nonzero vector and is a scalar. For a given
matrix A, we want to nd those numbers such that a matrix multiplication of a
vector x yields the same thing as the scalar multiplication x. This is known as an
eigenvalue problem where is an eigenvalue and x is its associated eigenvector.
This can also be written as:
(AI)x = 0 (2.36)
This corresponds to a homogeneous set of n algebraic equations in n unknowns.
The trivial solution x = 0 is excluded since x is restricted to the nonzero values. It
can be shown that nontrivial solution solutions will exist if and only if |AI| =
0. The expansion of this determinant yields a polynomial of degree n called the
characteristic polynomial, p(), whose roots
n
i=1
are the eigen values we seek.
28 CHAPTER 2. MATHEMATICAL CONCEPTS
2.9 Solution of simultaneous linear algebraic equa-
tions
There are two methods of solving linear algebraic equations in a reservoir simu-
lator: (1) direct e.g. Gaussian elimination (2) iterative methods.
2.9.1 Gaussian elimination
Given a system of simultaneous algebraic equations of the form
a
11
x
1
+a
12
x
2
+... +a
1m
x
m
= b
1
a
21
x
1
+a
22
x
2
+... +a
2m
x
m
= b
2
... = .
... = .
... = .
a
m1
x
1
+a
m2
x
2
+... +a
mm
x
m
= b
m
;
(2.37)
derived from the reservoir uid ow equations, we can apply the Gaussian elimi-
nation method by reducing the system of n equations in n unknowns to a system
of n 1 equations in n 1 unknowns. The system of n 1 equations in n 1
unknowns is further reduced to a system of n 2 equations in n 2 unknowns.
The process continues until one equation in one unknown is obtained. The one
unknown is determined while the others are found by back-substitution.
2.9.1.1 Gaussian elimination - worked example
Example 1
x
1
+x
2
+x
3
= 2
2x
1
+x
2
+x
3
= 3
2x
1
+x
2
= 0, (2.38)
step 1
Subtract twice the rst row from the second row and add twice the rst row to
the third;
2.9. SOLUTIONOF SIMULTANEOUS LINEARALGEBRAICEQUATIONS29
x
1
+x
2
+x
3
= 2
x
2
x
3
= 1
+3x
2
+2x
3
= 4, (2.39)
step 2
Multiply the second row by 3 and add the result to the third row;
x
1
+x
2
+x
3
= 2
x
2
+x
3
= 1
x
3
= 1, (2.40)
Hence, the value of x
3
= 1. Back substituting, we have x
2
= 2 and x
1
= 1.
This method involves a triangulation of A to yield an upper triangular matrix U
followed by a back solution for the vector x. This was achieved by eliminating all
the elements below the main diagonal A.
When dealing with large sets of reservoir simulator equations, they are usu-
ally difcult to discuss and virtually impossible to manipulate unless they are
expressed as matrices. An example of a typical small set of linear equations is
given below.
Example 2
a
11
P
1
+a
12
P
2
+a
13
P
3
= b
1
a
21
P
1
+a
22
P
2
+a
23
P
3
= b
2
a
31
P
1
+a
32
P
2
+a
33
P
3
= b
3
(2.41)
There are three unknowns: P
1
, P
2
and P
3
; all other quantities are known.
step 1
Re-write the equations in matrix form thus:
_
_
a
11
a
12
a
13
a
21
a
22
a
23
a
31
a
32
a
33
_
_
_
_
P
1
P
2
P
3
_
_
=
_
_
b
1
b
2
b
3
_
_
(2.42)
or symbolically, AP = b.
30 CHAPTER 2. MATHEMATICAL CONCEPTS
step 2
Working forward, eliminate a
21
by multiplying row 1 (the rst equation) by
a
21
/a
11
and subtracting the result from row 2 (the second equation). Eliminate
a
31
in a similar manner. The result is
_
_
a
11
a
12
a
13
0 a
22

a
12
a
21
a
11
a
23

a
13
a
21
a
11
0 a
32

a
12
a
31
a
11
a
33

a
13
a
31
a
11
_
_
_
_
P
1
P
2
P
3
_
_
=
_
_
b
1
b
2
b
1
a
21
a
11
b
3
b
1
a
31
a
11
_
_
(2.43)
or
_
_
a
11
a
12
a
13
0 a

22
a

23
0 a

32
a

33
_
_
_
_
P
1
P
2
P
3
_
_
=
_
_
b
1
b

2
b

3
_
_
(2.44)
where the primed letters are shorthand symbols for the corresponding elements in
Equation 2.43
step 3
Eliminate a

32
by multiplying row 2 by a

32
/a

22
and subtracting the result from
row 3:
_
_
a
11
a
12
a
13
0 a

22
a

23
0 0 a

33
_
_
_
_
P
1
P
2
P
3
_
_
=
_
_
b
1
b

2
b

3
_
_
(2.45)
Equation 2.45 can be solved explicitly for P
3
= b

3
/a

3
and subesequently for P
2
and P
1
.
Note that the coefcient matrix is converted to a triangular matrix with only
one element in the last row. All terms to the left of the diagonal are zero, so this is
an upper triangular matrix. Also, note that even with this small set of equations,
large amounts of arithmetic and storage are required for direct solution. The appli-
cation of the direct solution method in solving discretized reservoir ow equations
would be further discussed in Chapter 5.
Exercise
Solve the following set of equations using Gaussian elimination method
2.9. SOLUTIONOF SIMULTANEOUS LINEARALGEBRAICEQUATIONS31
P
1
+P
2
+P
3
+P
4
= 10
2P
1
+P
2
+3P
3
+2P
4
= 21
P
1
+3P
2
+2P
3
+P
4
= 17
3P
1
+3P
2
+P
3
+P
4
= 14
(2.46)
Hints:
Divide the arithmetic operation in the Gaussian elimination method into two:
1. Normalization step - in which the diagonal elements are converted to one
2. Reduction step - in which the off-diagonal elements are converted to zero
2.9.2 Gauss-Jordan method - worked example
The Gauss-Jordan method is similar to the Gaussian elimination method but avoids
the back back-substitution step.
step 1
Subtract twice the rst row from the second row and add twice the rst row to
the third;
x
1
+x
2
+x
3
= 2
x
2
x
3
= 1
+3x
2
+2x
3
= 4, (2.47)
step 2
Multiply the second row of equation 2.47 by 3 and 1 and add the result to the
third and rst row, respectively;
x
1
+0x
2
+0x
3
= 1
0x
1
x
2
x
3
= 1
0x
1
+0x
2
x
3
= 1. (2.48)
32 CHAPTER 2. MATHEMATICAL CONCEPTS
step 3
Add (1) times the third row to the second row, hence
x
1
+0x
2
+0x
3
= 1
0x
1
x
2
0x
3
= 2
0x
1
+0x
2
x
3
= 1. (2.49)
Therefore, x
3
=1, x
2
= 2 and x
1
= 1
2.9.3 LU decomposition - worked example
Matrix A can also be factored into lower and upper triangular matrices L and
U. Thus, for Ax = b, LUx = b where A = LU, we can set Ux = y, and solve
the problem by nding L = [l
i j
] and U = [u
i j
]; l
i j
= 0, i < j and u
i j
= 0, i > j.
Ly = b can then be solved for y (i.e. forward solution) and then Ux = y for x (i.e.
backward solution) U would be unit upper triangular, i.e. with ones on the main
diagonal.
The LU factors of A are
L =
_
_
1 0 0
2 1 0
2 3 1
_
_
; U =
_
_
1 1 1
0 1 1
0 0 1
_
_
. (2.50)
The forward solution involves
_
_
1 0 0
2 1 0
2 3 1
_
_
_
_
y
1
y
2
y
3
_
_
=
_
_
2
3
0
_
_
(2.51)
Thus,
y
1
= 2
2y
1
y
2
= 3
2y
1
+3y
2
y
3
= 0. (2.52)
and the backward solution is
_
_
1 1 1
0 1 1
0 0 1
_
_
_
_
x
1
x
2
x
3
_
_
=
_
_
2
1
1
_
_
(2.53)
Therefore, x
3
=1, x
2
= 2 and x
1
= 1.
2.10. ITERATIVE METHODS 33
2.10 Iterative methods
The solution of the matrix equation Ax = b where A is n n can be found iter-
atively; by dividing each row of A by its diagonal element (assuming a
ii
= 0 for
every i), thus
D Ax = (I B)x = Db c, (2.54)
where D is a diagonal matrix with d
ii
=1/a
ii
, i =1, 2, ..., n and B is an nn matrix
consisting of zeros on the diagonal and the off-diagonals are a
i j
/a
ii
, i = j, i =
1, 2, 3, ..., n. We can then write
x = Bx+c. (2.55)
A method of successive approximations is given by
x
(l+1)
= Bx
(l)
+c, (2.56)
where l is an iteration level (x
(0)
is arbitrary). Equation 2.56 denes a convergent
process if for any given x
(0)
, {x
(l)
|l = 1, 2, 3, ...} converges. If the spectra radius
of B is less than one, then convergence is guaranteed for most iterative processes.
2.10.1 Iterative methods - worked example
In order to ensure that the diagonals are all nonzero, we re-write problem 2.38 by
simply interchanging the rst and the last columns, thus;
x
3
+x
2
+x
1
= 2
x
3
+x
2
+2x
1
= 3
x
2
2x
1
= 0, (2.57)
The iteration matrix, B, is
B =
_
_
0 1 1
1 0 2
0 1/2 0
_
_
(2.58)
and
c =
_
_
1 0 0
0 1 0
0 0 1/2
_
_
_
_
2
3
0
_
_
=
_
_
2
3
0
_
_
. (2.59)
34 CHAPTER 2. MATHEMATICAL CONCEPTS
If we take a rst guess, x
(0)
=
_
_
1
1
1
_
_
we get after 10 iterations,
x
(10)
=
_
_
0.875
1.75
0.9375
_
_
. (2.60)
Chapter 3
Fundamental equations of ow
through porous media
In order to arrive at the basic equatios governing reservoir uid ow, we need to
combine the continuity equation, an expression for the supercial ow velocity
in a porous medium (e.g. Darcys law), description of the ow potential and
appropriate equations of state. Basic assumptions involved the derivation of of
the ow equations include:
ow is laminar and viscous
ow is irrotational
diffusion effects are negligible
ow is isothermal
electrokinetic effects are negligible
For a steady laminar ow of uid through porous media, the most important
forces that must be in equilibrium are the following:
viscous (frictional) forces (acting on surfaces)
force of compression (acting on surface)
Convective and local acceleration are mostly so small in case of ltra-
tion
force of gravity (acting on body)
forces of inertia (acting on body)
35
36CHAPTER3. FUNDAMENTAL EQUATIONS OF FLOWTHROUGHPOROUS MEDIA
forces of inertia may be neglected for steady and non-steady state l-
tration as well
capillary forces (acting on surfaces)
3.1 Laminar viscous ow
Laminar ow of a uid is characterized by a xed set of streamlines. The viscosity
of a uid is a measure of the internal resistance associated with laminar ow and
it is equal and opposite to the drag force on the solid.
3.1.1 Viscous forces
For a at plate, the shear force per unit area between the solid surface and a uid
tangent to it is given by Newtons equation
F = (
dv
dz
)
solid
, (3.1)
where is uid viscosity, v is uid velocity which is a function of position above
the plate, and z is the distance from the surface into the uid. For laminar ow,
the relative distribution of v is independent of |v|; v and hence
dv
dz
(evaluated at
the surface of the solid) must be every where proportional to q/A, where q is
volumetric owrate
F

= BqL, (3.2)
B is a constant which is characteristic of pore geometry.
3.1.2 External forces
The external forces acting on the uid contained within the porous sample can be
expressed in terms of the pressures P
a
and P
b
at the ends of the sample. Since the
pore cross-sectional area available for uid ow is given by A, the net upward
force on the uid due to these pressures is:
F
p
= (P
b
P
a
)A (3.3)
where is the porosity of the medium.
3.2. DARCYS EQUATION FOR LIQUIDS 37
3.1.3 Force of gravity
The body force on the uid is simply the weight of the uid in the sample. This
corresponds to a downward force:
F
g
= (AL)g (3.4)
where is the density of the uid and g is the acceleration due to gravity
3.2 Darcys equation for liquids
For steady ow, the forces F

, F
p
and F
g
must be in equilibrium. Thus:
BqL+(AL)g = (P
b
P
a
)A (3.5)
q =
KA
L
[(P
a
P
b
) +gL] (3.6)
3.3 Darcys equation for gases
Darcys law of laminar ow in the form of the Eq. 3.6 is also valid for gases
provided the ow rate, q, is taken as the volumetric ow rate as measured at the
mean pressure, (P
a
+P
b
)/2, and provided this mean pressure is sufciently large.
q
P
a
+P
b
2
= q
a
P
a
(3.7)
Thus Darcys law can be written as
q
a
P
a
=
KA
L
[
(P
2
a
P
2
b
)
2
+(
P
a
+P
b
2
)
2
M
RT
gL] (3.8)
Where the density , is obtained from the ideal gas law:
=
M
RT
P =
M
RT
P
a
+P
b
2
(3.9)
In the case of gas ow, a phenomenon known as molecular slippage prevents
the sticking of gas molecules to the walls of the pores as required by Darcys law.
This is known as Klinkenberg effect and it shows the dependence of permeability
on pressure:
K = K

(1+
b
P
), (3.10)
38CHAPTER3. FUNDAMENTAL EQUATIONS OF FLOWTHROUGHPOROUS MEDIA
where K

is the permeability as observed for incompressible uids (liquids), P is


the mean owing pressure and b is a constant characteristic of both the gas and
the porous medium. When K is not sufciently large, the ow is slip ow and
Darcys equation becomes:
q
a
P
a
=
K

(
P
2
a
P
2
b
2L
)(1+
2b
P
a
+P
b
) (3.11)
3.3.1 Turbulent ow
When the ow rate becomes sufciently large the laminar ow regime breaks
down and Darcys law is no longer valid. The transition from laminar to turbulent
is dened by Reynolds number R
e
. Discussions on turbulent ow is beyond the
scope of this course.
3.4 Differential form of Darcys equation
For steady ow, the viscous force, the force due to applied pressure and the force
due to the weight of the uid must all be in equilibrium, thus:
(P+
B

v + ng)

sA = 0 (3.12)
or
v =

B
(P+ng) (3.13)
where K =

B
v =
K

(P+

ig) (3.14)
=
K

i
1
P
x
1
+

i
2
P
x
2
+

i
3
(
P
x
3
+g)], (3.15)
which can be written in a more compact form as:
v =
K

(3.16)
Introducing a so called potential function instead of pressure we have:
=
_
b
a
dP
(P)
+gx
3
. (3.17)
3.5. EQUATIONS OF STATE FOR FLUIDS 39
Differentiation of Equation 3.17 yields
=P+g

i
3
(3.18)
3.4.1 Darcys law for anisotropic porous media
Considering a rotational transformation of a symmetric matrix, the rotation of
the axes to a particular orientation will produce a diagonal matrix i.e.
(

matrix) =
_
_

1
0 0
0
2
0
0 0
3
_
_
(3.19)
The particular directions of the set of coordinate axis to which the matrix cor-
responds are the principal axes of the porous medium having orthogonal principal
axes, the matrix is symmetric for any orientation of the coordinate system and
is diagonal for a coordinate system congruent with the principal axes.
3.5 Equations of state for uids
In order to derive the law governing uid ow in porous media, the dependence
of the uid density, on P must be established. We will investigate the following
cases
Incompressible uids:
d
dP
= 0 (3.20)
which gives = constant
Constant compressibility:
c
f
=
1
V
f
dV
f
dP
, (3.21)
for a unit mass V
f
= 1/
c
f
=
d(
1

)
dP
c
f
=
1

d
dP
(3.22)
40CHAPTER3. FUNDAMENTAL EQUATIONS OF FLOWTHROUGHPOROUS MEDIA
Integrating within reservoir pressure P and P
o
with corresponding uid density
and
o
gives:
=
o
e
c(PP
o
)
(3.23)
Applying Taylors rule and neglecting higher order terms of the expansion
series, we get the following approximation:

o
[1+c(PP
o
)] (3.24)
This EoS applies rather well to most liquids, though the presence of large
quantities of dissolved gases causes deviations.
3.6 Equations of state for gases
For isothermal variations in pressure, the ideal gas EoS is given by:
PV =
m
M
RT (3.25)
c =
1

d
dP
=
1
P
(3.26)
where V is the volume occupied by the mass, m, of gas of molecular weight M,
R is the gas constant and T is the absolute temperature. For real gases the gas
deviation from ideal gas law are taken into account through the Z f actor thus:
=
M
RT
P
Z(P)
(3.27)
3.7 Continuity Equation
The continuity equation can be generally written as given in Equation 2.18 thus:
(v) g =

t
(), (3.28)
3.7.1 Single-phase incompressible ow
For single-phase incompressible ow, the volume of an element of uid is not
altered by changes in pressure and hence the density is a constant. Equation 2.18
therefore reduces to
3.7. CONTINUITY EQUATION 41
Figure 3.1: Elemental volume in a region of uid ow
v = g S (3.29)
substituting Equation 3.16 into 3.28, we have

_
P+g

i
3
_
_
= S (3.30)
where S is the source or sink term and the potential function is dened by
Equation 3.17. For anisotropic, heterogeneous porous media in cartesian coordi-
nate (x, y, z)

x
1
(

P
x
1
) +

x
2
(

P
x
2
) +

x
3
_

_
P
x
3
+g

i
3
__
= S (3.31)
The uid viscosity is usually considered constant but the permeability could
vary depending on the pore geometry. For a homogeneous system, and are
constant and neglecting gravitational effects; the differential equation becomes:

2
P
x
2
1
+

2
P
x
2
2
+

2
P
x
2
3
= S

, (3.32)
which is Poissons equation and S

S/.
42CHAPTER3. FUNDAMENTAL EQUATIONS OF FLOWTHROUGHPOROUS MEDIA
In an isotropic porous medium, the permeability is a scalar, but in an anisotropic
medium is a tensor. Thus,
u =

(3.33)
which can also be written as:
_
_
u
1
u
2
u
3
_
_
=

11

12

13

21

22

23

31

32

33
_

_
_

x
1

x
2

x
3
_

_
(3.34)
If the matrix is symmetrical (i.e.
i j
=
ji
) the coordinate system can be trans-
formed so that all values apart from the main diagonal become zero. Directions
parallel to these coordinate axes are called principal directions (axis) of the porous
medium. These principal directions are orthogonal to each other as described ear-
lier in section 3.4.1. We can then write the Darcys law for for a coordinate system
with axis parallel to the principal directions of the porous medium as:
_
_
u

1
u

2
u

3
_
_
=

_
_

11
0 0
0
22
0
0 0
33
_
_
_

3
_

_
(3.35)
where

=
_
P
P
o
dP
(P)
+g
3

i=1
x

i
cos
i
(3.36)
and
i
, i = 1, 2, 3 are the angles between the respective axes and the vertical.
Differentiating Equation 3.36, we have,

= P+
2
g
3

i=1

i
i
cos
i
(3.37)
If the 3
rd
coordinate direction is vertical then Equation 3.37 becomes simpler

= P+
2
g

i
3
(3.38)
Substituting Equation 3.38 into Equation 3.30, yields

_
P+g

i
3
_
_
=

t
() (3.39)
Neglecting gravity and assuming constant porosity, we can simply write:
3.7. CONTINUITY EQUATION 43

P
_
=

t
(3.40)
Considering a slightly compressible uid and substituting the expression for
the density (Equation 3.24), the single-phase ow equation becomes

P
_
=c
P
t
(3.41)
If there are no uid sources or sinks within the region of ow, or if uid and
porous media are incompressible and the reservoir has reached steady state, then
the divergence of the volumetric ux density becomes zero resulting in Laplaces
equation.

2
P = 0 (3.42)
3.7.2 Compressible uids
Based on Equation 3.23 the following transformation can be made:
P =
o
e
c(PP
o
)
P
=
1
c

o
e
c(PP
o
)
_
=
1
c
(3.43)
Substituting Equation 3.43 into Equation 3.39 becomes:

_

c
_
+
2
cg

i
3
_
_
=

t
(3.44)
for a system with constant porosity. In cartesian coordinates, we have

x
_

c

x
_
+

y
_

c

y
_
+

z
_

c
_

z
+cg
__
=

t
(3.45)
Neglecting gravity effects and if the medium is homogeneous and isotropic
and is constant, the equation reduces to

2
=
c

t
=
1

t
(3.46)
44CHAPTER3. FUNDAMENTAL EQUATIONS OF FLOWTHROUGHPOROUS MEDIA
where


c
. (3.47)
This is known as the Fouriers equation or the diffusivity equation.
3.7.3 Ideal gas ow
For ideal gases, = PM/RT, = (/P) P
2
/t and P = P
2
; where
M/2 RT. Substituting in Equation 3.40,

P
2
_
=

P
P
2
t
(3.48)
For an isotropic, homogeneous medium with constant viscosity, we have

2
P
2
=

P
P
2
t
, (3.49)
which is non-linear.
3.7.4 Real gas ow
The equation of state for real gas is dened by Equation 3.27 and the compress-
ibilty is
c
g
=
1

P
, (3.50)
Substituting Equation 3.27 into Equation 3.40 and taking the porosity as con-
stant since the rock compressibility is several orders of magnitude less than the
gas compressibility, the right side of the Equation 3.27 can be developed in the
following way:

t
() =

t
=
1

P
_

P
t
_
= c
g
MP
RT
P
t
=
M
2RT
c
g
2P
Z
P
t
(3.51)
3.7. CONTINUITY EQUATION 45
Thus, Equation 3.27 becomes:

MP
RTZ
P
_
=
M
2RT
c
g
2P
Z
P
t
, (3.52)
and after simplication, we have

_

2P
Z
P
_
= c
g
2P
Z
P
t
, (3.53)
The real gas pseudo pressure function was introduced by Al-Hussainy, Ramey,
Crawford:
m(P) = 2
_
P
P
b
PdP
Z
, (3.54)
This function enabled the following derivations:
m(P) =
dm(P)
dP
P
=
2P
Z
P, (3.55)
and
m(P)
t
=
dm(P)
dP
P
t
=
2P
Z
P
t
, (3.56)
Substitution of Equations 3.54 and 3.56 into 3.53 results in:
[ m(P)] = c
g
m(P)
t
. (3.57)
Assuming that the porous medium is isotropic and homogeneous, Equation
3.57 becomes

2
m(P) =
c
g

m(P)
t
(3.58)
46CHAPTER3. FUNDAMENTAL EQUATIONS OF FLOWTHROUGHPOROUS MEDIA
3.8 Generalized multiphase ow equation
We consider the ow of a single component i, present in all three uid phases; oil,
water and gas. Let C
io
, C
iw
and C
ig
represent the mass fractions of component i in
the three phases, then,
3

i=1
C
il

l
v
l
=the mass f lux density of component i (3.59)

i=1
C
il

l
S
l
=the mass of component i per unit pore volume (3.60)
The continuity equation then becomes

_
3

i=1
C
il

l
v
l
_

i=1
C
il
g
l
=

t
_

i=1
C
il

l
S
l
_
(3.61)
In the presence of two or more uids owing in the reservoir, the absolute ,
effective
l
and relative permeability
rl
can be dened as

l
=
rl
(3.62)
and the modied Darcys law for multiphase ow can be written as
v
l
=
[]
rl

l
, l = 1, 2, 3. (3.63)
where the Hubbert ow potential is dened as

l
=
_
P
P
0
d

l
()
(
g
g
c
)d (3.64)
where the negative sign on the gravity term denotes that the positive direction is
downward. The general multiphase ow equation can then be written by combin-
ing Equations 3.61-3.64:

_
3

i=1
C
il

l
[]
rl

l
(P
l

l
d)
_

i=1
C
il
g
l
=

t
_

i=1
C
il

l
S
l
_
(3.65)
For a system with N components, there will be 3N +15 unknowns and 3N +15
auxilliary relations would be required to solve them.
Considering a system with minimal hydrocarbon phase changes involving wa-
ter (i.e. all of the water phase is the water component), and N hydrocarbon com-
ponents in the oil and gas phases, then, the total number of components is N +1;
3.8. GENERALIZED MULTIPHASE FLOW EQUATION 47
Table 3.1: Number of unknowns in the multiphase equation
Unknown Number
C
il
3N

l
3

rl
3

l
3
P
l
3
S
l
3
Total 3N + 15
Table 3.2: Number of auxilliary relations required to solve the equation
Equations Number Comments
3

i=1
C
il
= 1, l = 1, 2, 3 3 i-component mass fraction

l
= (T, P
l
) 3 density of phase l

rl
=
r
(S
o
, S
w
, S
g
) 3 rel-perm of phase l

l
= (T, P
l
) 3 viscosity of phase l
P
cwo
= P
o
Pw 1 capillary pressure (ow)
P
cgo
= P
g
Po 1 capillary pressure (go)
3

i=1
S
l
= 1, l = 1, 2, 3 1 total phase saturation
C
ig
C
io
= K
igo
(T, P
g
, P
o
,C
ig
,C
io
) N equilibrium constants
C
ig
C
iw
= K
igw
(T, P
g
, P
w
,C
iw
,C
ig
) N equilibrium constants
Mass balances N
Total 3N + 15
where the (N+1)
st
component is water. In Equation 3.65 we set C
iw
=0 for i <N
and C
(N+1),w
=1. If we further express the mass fraction in terms of the mole frac-
tions (x
i
, y
i
) in liquid and vapour phases, thus: C
ig
/M
i
= y
i
n
t
and C
io
/M
i
= x
i
n
t
,
Equation 3.65 can be written as

o
x
i
[]
ro

o
(P
o

o
d) +
g
y
i
[]
rg

g
(P
g

g
d)
_
(x
i
g
o
+y
i
g
g
)
=

t
_
(x
i

o
S
o
+y
i

g
S
g
)
_
, i = 1, 2, ..., N
(3.66)
48CHAPTER3. FUNDAMENTAL EQUATIONS OF FLOWTHROUGHPOROUS MEDIA
Table 3.3: Description of the mass fractions in black oil simulator
Mass fractions Value Comments
C
ww
1
C
gg
1
C
wo
0
C
wg
0
C
ow
0
C
gw
0
C
og
0
C
oo
m
o
m
o
+m
g
m
o
- mass fraction of oil
C
go
m
g
m
o
+m
g
m
g
- mass fraction of gas

w
[]
rw

w
(P
w

w
d)
_
g
w
=

t
(
w
S
w
) (3.67)
3.9 Black-oil reservoir simulator
In a black oil reservoir simulator, the basic underlying assumption is that there
is no signicant interphase mass transfer between the water-oil and water-gas
phases. A one-way phase transfer may however occur between the gas and oil;
in which case gas moves in and out of the oil, but the oil does not vaporize into
the gas phase.
Substituting the relations given in Tables 3.3 and 3.4 into Equation 3.65 gives
Oil equation:

_
[]
ro

o
B
o
(P
o

o
d)
_
Q
o
=

t
_
S
o
B
o
_
(3.68)
Water equation:

_
[]
rw

w
B
w
(P
w

w
d)
_
Q
w
=

t
_
S
w
B
w
_
(3.69)
Gas equation:

_
[]
ro
R
s

o
B
o
(P
o

o
d)
_
+
_
[]
rg

g
B
g
(P
g

g
d)
_

(R
s
Q
o
+Q
g
) =

t
_
S
g
B
g
+
S
o
R
s
B
o
_
(3.70)
3.9. BLACK-OIL RESERVOIR SIMULATOR 49
Table 3.4: Description of the volume-related parameters in black oil simulator
Parameter Description Comments
V
o
_
m
o
(res)
+m
g
(res)
_

o
(res)
V
g
m
g

g
B
o
V
o
(res)
V
o
(sur f )
=
V
o
(res)

o
(sur f )
m
o
_
m
o
(res)
+m
g
(res)
_

o
(sur f )
m
o
(res)

o
(res)
C
oo

o
(sur f )

o
(res)
B
o
R
s
V
g
(sur f )
V
o
(sur f )
=
m
g
(res)

g
(sur f )
/
m
o
(res)

o
(sur f )
C
go
R
s

g
(sur f )

o
(res)
B
o
B
g

g
(sur f )

g
(res)
B
w

w
(sur f )

w
(res)
If we dene

o
= P
o

o
d

w
= P
w

w
d

g
= P
g

g
d
(3.71)
Then, we can re-write Equations 3.68 - 3.70 as
Oil equation:

ro

o
B
o

o
_
Q
o
=

t
_
S
o
B
o
_
(3.72)
Water equation:

rw

w
B
w

w
_
Q
w
=

t
_
S
w
B
w
_
(3.73)
50CHAPTER3. FUNDAMENTAL EQUATIONS OF FLOWTHROUGHPOROUS MEDIA
Gas equation:

ro

o
R
s

o
B
o

o
_
+
_

rg

g
B
g

o
_

(R
s
Q
o
+Q
g
) =

t
_
S
g
B
g
+
S
o
R
s
B
o
_
(3.74)
Chapter 4
Reservoir ow geometries and
dimensions
The choice of the dimensions to assign to a particular reservoir engineering prob-
lem is to a large extent dependent on the physical system that is being modelled,
the level of detail required and the computational resources available in carrying
out such simulation exercise.
The types of models are: tank models (zero dimension), 1D models, 2D areal
(x, y; r, ; curvilinear) models, 2D cross-sectional (x, z) or radial (r, z) models,
multilayer (stacks of 2D areal) models and 3D models.
4.1 Tank models
Tank models (e.g. Craft and Hawkins (1959); Lutes (1977)) are mostly used when
rapid answers are needed and average reservoir pressure behaviour is considered
the only important factor in making operating or investment decisions. Pressure
gradients in the reservoir should be small or else their impact should not be con-
sidered signicant (4.1).
Figure 4.1: A tank model
51
52 CHAPTER 4. RESERVOIR FLOW GEOMETRIES AND DIMENSIONS
Figure 4.2: A one-dimensional model
4.2 1D models
In one-dimensional models, there basically no property variation along other di-
rections (i.e. y and z directions). Hence, if a section is taken perpendicular to the
indicated ow direction (4.2), there will be no property variation across the plane.
Also, any cross-section taken in the x z or x y planes will show a uniformity
of the ow structure. More explicitly, the pressure proles of ow paths will be
similar.
1D models can be used in evaluating the inuence of heterogeneity in the di-
rection of ow. McCulloch et al. (1968) found that natural depletion and crestal
gas injection for a high-relief (reef) reservoir could be predicted reliably using a
1D vertical model. Hirasaki (1975) used a 1D model to study the sensitivity of oil
recovery to changes in displaceable oil volume, mobility ratio, permeability level
and shape of the relative permeability curves. However, 1D models usually can-
not calculate realistic displacement efciencies in invaded regions because they
cannot represent gravity effects perpendicular to the direction of ow.
4.3 2D models
2D models in cartesian coordinate systems are mostly used in reservoir simula-
tion studies particularly when areal ow patterns dominate reservoir performance.
Figure 4.3 illustrates a two-dimensional owstructure along the x and y directions.
No property variation (such as porosity, permeability and saturations) exists
when a slice is taken parallel to the x y plane. A 2D model allows us to account
for variations in directional permeability and lateral well distributions. Further-
more, a two-dimensional approach allows the representation of various well com-
pletion strategies (e.g., vertical wells, horizontal wells, stimulated wells). Hen-
derson et al. (1968) used a 2D areal model to determine the optimal placement
4.3. 2D MODELS 53
Figure 4.3: A two-dimensional model
of wells in a gas-storage reservoir. A two-dimensional model can also be used to
describe a thin but laterally extensive reservoir formation.
Areal models normally use Cartesian (x, y) coordinate system (e.g. Figures
4.3 and 4.4), but there are some applications for which radial (r, ) coordinate
(e.g. Figure 4.7) or curvilinear coordinate systems (Figure 4.8) is more suitable.
A curvilinear ow geometry provides a more accurate representation of the ow
geometry. Grid orientation do not necessarily affect the results obtained with a
curvilinear coordinate system as is often the case with other coordinate systems.
A signicantly lesser amount of grid-blocks may just be sufcient to obtain the
same level of accuracy.
Radial and curvilinear systems provide better denition near wells than do x
y areal models. In certain cases, curvilinear coordinates may reduce the number
of gridblocks needed in areal or 3D models.
4.3.1 2D cross-sectional and radial models
2Dcross-sectional and radial models are used to develop well functions or pseudo-
functions for use in 2D areal or 3D models. They are also used to simulate pe-
ripheral water injection, crestal gas injection or other physical processes in which
frontal velocities toward producers are largely uniform. When vertical effects
dominate performance, 2D cross-sectional and radial models can also be used to
evaluate well behaviour.
The interaction of gravity, capillary and viscous forces and the resultant ef-
fect on vertical sweep and displacement efciencies can be evaluated using cross-
sectional models although application in estimating overall eld performance is
54 CHAPTER 4. RESERVOIR FLOW GEOMETRIES AND DIMENSIONS
Figure 4.4: A cross-section of a two-dimensional model
Figure 4.5: A cross-section of a radial r, z coordinate system
limited if areal sweep efciency is an important consideration.
2D radial (r, z) (Figure 4.5) models are especially useful in studies of the be-
haviour of wells in bottom-water drive, gas-cap drive reservoirs or reservoirs hav-
ing a thin oil rims ovelain by gas and underlain by large aquifer. For these types
of reservoirs, selection of initial completion intervals and recognition of opportu-
nities for recompletion are very critical in eld development planning and perfor-
mance optimization.
4.3. 2D MODELS 55
Figure 4.6: Areal model in cartesian coordinate system
Figure 4.7: Areal model in radial r, coordinate system
Figure 4.8: Areal model in curvilinear coordinate system
56 CHAPTER 4. RESERVOIR FLOW GEOMETRIES AND DIMENSIONS
Figure 4.9: A three-dimensional model in cartesian coordinate system
4.4 3D models
3D models are particularly useful when reservoir geometry is too complex to re-
duce to a combination of cross-sectional and areal models. For instance, reservoirs
having shales and other ow barriers that are continuous over large areas but with
permeable regions where cross-ow occurs are difcult to model in 2D. Further,
when vertical ow dominates particularly near well-bore where cusping and con-
ing may occur, combination of both areal and verical details which can only be
obtained in 3D models.
Layered and multi-layered reservoirs (with or without crossow), partially
penetrating wells, and thick reservoirs where gravitational forces could be signif-
icant are also easily modelled in 3D. Although factors such as as computational
resources, costs, data availability and marginal utility may prevent full application
of the 3D models. Figure 4.9 is a three-dimensional model in cartesian coordinate
system.
3D radial-cylindrical coordinate system is used for single-well studies. Cylin-
drical grids are used in the reservoir (see Figure 4.10). The gridblock size in-
creases logarithmically in size outward from the well. Small grids near the well-
bore can effectively simulate the well behaviour.
4.4.1 Spherical ow geometry
The spherical coordinate system (r, , ) is used in special cases reservoir engi-
neering problems. Two examples are partial penetration to a thick formation by a
production well, and ow around perforations.
4.4. 3D MODELS 57
Figure 4.10: A three-dimensional radial model grid. r
e
is the reservoir external
radius and r
w
is the well-bore radius
Figure 4.11: A spherical geometry
58 CHAPTER 4. RESERVOIR FLOW GEOMETRIES AND DIMENSIONS
Figure 4.12: (a) An ellipse (b) Flow prole (confocal hyperbolas) in a system
of equipotential contours (confocal ellipses) passing through a high conductivity
fracture
4.4.2 Elliptical-cylindrical ow geometry
Elliptical-cylindrical owgeometry is commonly used in single-well studies when
a strong permeability contrast exists in two principal directions on the lateral
plane. Also, elliptical-cylindrical geometry can be used to model systems in which
a vertical well is intercepted by a vertical, high conductivity fracture.
In these cases, the normally concentric equipotential contours degenerate into
confocal ellipses in the sense that there is a unique ellipse passing through each
point in the plane. Similarly, the streamlines become distorted into confocal hy-
perbolas in the sense that there is a unique hyperbola passing through each point
in the plane (Figure 4.12).
Chapter 5
Finite difference methods
The nite difference techniques are based upon the approximations that permit
replacing differential equations by nite difference equations. These nite differ-
ence approximations are algebraic in form, and the solutions are related to grid
points.
If we dene a function P(x) of class C
n
on an interval (a, b) S, then we can
represent P(x) by its Taylor polynomial thus:
P(x) = P(x
o
) +xP

(x
o
) +
x
2
2!
P

(x
o
) +
x
3
3!
P

(x
o
) +... +
x
n
n!
P
n
(x
o
). (5.1)
Denoting P(x
o
) by P
o
and P
x
by P
1
, Equation 5.1 becomes
P
1
= P
o
+xP

o
+
x
2
2!
P

o
+
x
3
3!
P

o
+... +
x
n
n!
P
n
o
. (5.2)
This is the forward expansion. The backward expansion can be written as:
P
1
= P
o
xP

o
+
x
2
2!
P

o

x
3
3!
P

o
+... (5.3)
If x is small and terms of degree two and above are ignored, Equation 5.3
can be re-arranged as:
P

P
1
P
o
x
+(x) (5.4)
which is a nite difference form of dP/dx at point x
o
. Subtraction of Equation
5.4 from 5.3 gives
P

P
1
P
1
x
+(x
2
) (5.5)
59
60 CHAPTER 5. FINITE DIFFERENCE METHODS
which is another difference form of dP/dx. Comparison of Equations 5.4 and
5.5 shows that the truncation error (which is the error incurred by ignoring higher
order terms in the series expansion) is of the order of x in Equation 5.4 and x
2
in
Equation 5.5. Thus, the latter is a more accurate representation of the rst deriva-
tive than the former.
Addition of Equations 5.2 and 5.3 gives a nite difference form of the second
derivative
P

o

P
1
2P
o
+P
1
x
2
+(x
2
) (5.6)
In summary,
P
x

P
i+1
P
i
x

P
i
P
i+1
x

P
i+1
P
i1
2x
(5.7)

2
P
x
2

P
i+1
2P
i
+P
i1
x
2
, (5.8)
where,
P
i
= P(ix). Another approximation to the rst derivative is given by
P
x

P
i+1/2
P
i1/2
x
.
This formis useful in expressing in difference form, the term
2
P/xt or

x
_
(x)
P
x
_
which appears in reservoir simulation equation.
For heterogeneous systems where properties vary spatially, the second-order
derivative

x
_
(x)
P
x
_
(5.9)
takes the form:
_

x
(x)
P
x
_
i

1
(x)
2
_

i+1/2
(P
i+1
P
i
)
i1/2
(P
i
P
i1
)

(5.10)
61
Figure 5.1: One-dimensional discretization into blocks
Figure 5.1 is the discretization of a one-dimensional geometry into blocks. In
Equation 5.10, the dependent variable P is computed at the nodal points, whereas
the variable (x) is computed at the block boundaries, mid-way between the nodes
i and i +1 and i and i 1. The subscripts i +1/2 and i 1/2 simply indicate the
need to calculate the variables using some averaging technique at the correspond-
ing boundaries.
Some of the ow properties that are usually computed at the block boundaries
include mobility, (
f
=

f

f
), where f is the owing uid (oil, water or gas); trans-
missibility (T); effective permeability or relative permeability etc. In expressing
any of these terms at the interface of two neighbouring blocks, we need to estab-
lish the direction of ow and use an appropriate averaging, upstream or down-
stream weighting procedure. If the variable that is being computed is a constant,
harmonic averaging can be used; for weakly non-linear components, arithmetic
averaging can be used while a strongly non-linear components (e.g. relative per-
meability term is a strong function of saturation) can be obtained using upstream
averaging.
Note

P
x
_
i+1/2
=
i+1/2
P
i+1
P
i
x

P
x
_
i1/2
=
i1/2
P
i
P
i1
x

P
x
_
i
=
i
P
i+1
P
i1
2x
62 CHAPTER 5. FINITE DIFFERENCE METHODS
Exercise: Write the nite difference form of the following equations:


2
P
xt


x
_
(x)

P
x
_
5.1 Reservoir grids and boundary conditions
In reservoir simulation problems, we are usually concerned with one or more de-
pendent variables, typically pressure (P), temperature (T), concentration (C), sat-
uration (S). Generally, a variable f is a function of the independent spatial vari-
ables x, y, z and t i.e.
f = f (x, y, z, t) (5.11)
The position of the variable in space is a grid point (x
i
, y
j
, z
k
) in the reservoir.
Two common types of grids employed in reservoir simulation include
structured (regular) grid
cartesian; mesh-intersection (Figure 5.2) or block-centered grid points
(Figure 5.3)
rectilinear
curvilinear
unstructured (irregular) grid (Figures 5.4, 5.5).
The choice of the grid type depends upon the spatial complexity of the reserv-
ior as well as the associated boundary conditions.
5.1.1 Structured grids
The Cartesian grid is the simplest example of structured grids. The solution points
are located at the intersection of the grid lines, while the elements are unit squares
or unit cubes, and the vertices are integer points. This type of mesh is extremely
simple and quick to generate.
However, if the problemto be solved has curved internal and/or external bound-
aries, solving on a structured Cartesian grid requires one to modify the numerical
scheme near these boundaries.
5.1. RESERVOIR GRIDS AND BOUNDARY CONDITIONS 63
Figure 5.2: Mesh-intersection grid points
Figure 5.3: Block-centered grid points
64 CHAPTER 5. FINITE DIFFERENCE METHODS
Figure 5.4: Irregular block-centered grid
Grids of this type appear on graph paper and may be used in nite element
analysis as well as nite volume methods and nite difference methods. Since the
derivatives of eld variables can be conveniently expressed as nite differences,
structured grids mainly appear in nite difference methods.
5.1.1.1 Rectilinear grids
Rectilinear grids are tessellation by rectangles or parallelepipeds that are not, in
general, all congruent to each other. The cells may still be indexed by integers as
in cartesian, but the mapping from indexes to vertex coordinates is less uniform
than in a cartesian grid.
Rectilinear grids have a xed resolution. The renement they require in order
to track material interfaces (i.e. interfaces between different geometric entities)
that are not aligned with the coordinate axes is prohibitively high, especially if
these interfaces are curved. Accurate resolution of these material properties is
very important because they can vary by several orders of magnitude across a
given geometry.
5.1.1.2 Curvilinear grids
Curvilinear and unstructured grids can provide a more adaptive resolution. Struc-
tured curvilinear grids (Figure 5.5b), also known as O-grids, are able to capture
free-form objects by mapping curves and surfaces to topologically cubic blocks
in parametric space. They have the same combinatorial structure as cartesian and
5.2. BOUNDARY CONDITIONS 65
rectilinear grids, but the cells are quadrilaterals or cuboids rather than rectangles
or rectangular parallelepipeds.
However, even for geometrically simple models, this subdivision requires sig-
nicant manual intervention. Therefore, curvilinear grids are ill-suited for the
discretization of complex geometric models Owen (1998).
5.1.2 Unstructured grids
Unstructured grids (Figure 5.5c) offer more exibility than structured grids and
hence are very useful in nite element and nite volume methods. They can t
free-form geometrical entities, such as NURBS with spatially variable renement,
and they can also be generated automatically. The disadvantage of unstructured
grids is that mesh coordinates cannot be calculated from indices. They therefore
must be stored. However, in practice, this does not signicantly increase memory
requirements because the majority of storage is taken up by the discretized phys-
ical variables. Unstructured grids also allow hybrid of different element types to
be used (Figure 5.5d) in the discretization.
5.2 Boundary conditions
Boundary conditions are the set of conditions specied for the behaviour of the
solution to a set of differential equations at the boundary of its domain. The
boundary conditions are required at wells (inner boundaries) and at the exterior
boundary of the reservoir. The nite difference representation of a system of par-
tial differential equations is independent of the grid system employed; i.e. they are
identical for both block-centered and mesh-intersection. In reservoir simulation
problems, two types of boundary conditions can be specied on the boundary of
the geometries: (a) Dirichlet (b) Neumann
5.2.1 Dirichlet boundary conditions
When dirichlet boundary conditions (e.g. Figure 5.6a,b) are imposed on an ordi-
nary or a partial differential equation governing pressure behaviour in a reservoir
system, the values of the pressure on the reservoir boundaries are specied; for
instance, a value of P
0
= c
1
was specied at the boundary in Figure 5.6a. The
66 CHAPTER 5. FINITE DIFFERENCE METHODS
Figure 5.5: Three common types of meshes include: (a) rectilinear; (b) curvilin-
ear; (c) unstructured grid with varying element size; and (d) hybrid nite-element
mesh showing featureless regions consisting of hexahedra, constrained ones of
tetrahedral, and transitions covered by pyramid and prism elements interfacing
tetrahedra with hexahedra
5.2. BOUNDARY CONDITIONS 67
Figure 5.6: (a) Dirichlet boundary condition for a mesh intersection grid (b)
Dirichlet boundary condition for block-centered grid (c) Neumann boundary con-
dition for a mesh intersection grid (d) Neumann boundary condition for a block-
centered grid
68 CHAPTER 5. FINITE DIFFERENCE METHODS
Figure 5.7: Dirichlet boundary condition in a mesh intersection grid system
mesh-intersection grid (Figure 5.2) as well as unstructured grid are easily em-
ployed in Dirichlet type problem.
Figure 5.7 shows a Dirichlet boundary condition in a two-dimensional mesh-
intersection grid system. Mathematically, this boundary condition can be written
as
P
i,J
= P
t
P
i,1
= P
b
_

_
for i = 1, ..., I (5.12)
P
1, j
= P
l
P
I, j
= P
r
_

_
for j = 1, ..., J (5.13)
where I and J represent the maximum number of nodes along the x and
ydirections, respectively.
Figure 5.6b, shows a Dirichlet boundary condition in a block-centered grid
system. The implementation basically follows the same logic. The value of the
dependent variable (e.g. pressure) is specied at the center along the portion of
the boundary affected; for instance, a value of P
0
= c
1
was specied at center of
the left-boundary block in Figure 5.6b. In order words, we neglect the fact that
the block centers are not actually coincident with the reservoir boundaries. This
5.2. BOUNDARY CONDITIONS 69
Figure 5.8: Finite-element mesh of a 30m10m channel geometry showing
a Dirichlet boundary conditions at the inlet and outlet of the model, a reference
slit, the nodes and the velocity elds computed at the barycenter of each of the
nite-elements (Akanji and Matthai, 2010).
approximation is improved if we use smaller grid spacings, (i.e. rened grid). A
typical application of Dirichlet boundary condition in unstructured nite-element
grid in 2D ow geometry is shown in Figure 5.8.
5.2.2 Neumann boundary conditions
When Neumann boundary conditions (e.g. Figure 5.6c,d) are imposed on an or-
dinary or a partial differential equation, the values of the pressure derivative on
the reservoir boundaries are specied. The block-centered grid (Figure 5.3) has
an advantage in the Neumann problem where boundary conditions specify ux or
ow across the reservoir boundaries (Figure 5.9).
When some ow rate across a boundary is specied (e.g.
1
and
3
in Figure
5.9), the normal component of the velocity vector at the boundary must equal this
ow rate thus:

(Ph) n = q(), (5.14)


and the total ow rate across a boundary is the integrated value of q over the
boundary. For instance, over the boundary
3
of Figure 5.9 the total ow rate is
70 CHAPTER 5. FINITE DIFFERENCE METHODS
Figure 5.9: Boundaries for r z systems with a single well of radius r
w
q
T
=
_

3
q()d() (5.15)
When there is no ow across a boundary (e.g.
1
in Figure 5.9), the com-
ponent of the velocity vector normal to the boundary surface must be zero. This
is obtained by taking the dot (vector) product of Darcy velocity with the normal
vector n thus:

(Ph) n = 0. (5.16)
For x y areal model, we can write

_
P
x

h
x
_
= 0, (5.17)
for all boundaries which are normal to the x-direction and

_
P
y

h
y
_
= 0, (5.18)
for all boundaries which are normal to the y-direction.
Figures 5.6c,d show a Neumann boundary conditions for a mesh-intersection
and block-centered grid systems.
5.2. BOUNDARY CONDITIONS 71
Figure 5.10: A typical boundary grid-block in a cross-sectional model
5.2.3 Discretization of Boundary Conditions
Figure 5.10 is a typical boundary grid-block in a cross-sectional model. If the ow
across the boundary is zero, then
P
x
=0 can be approximated by using the second
order expression
P
i+1
P
i1
2(x
i+1
x
i
)
= 0. (5.19)
This approach assumes a a complete symmetry of properties about x
i
and the
method is known as the reection technique. In order to create a reection node,
we simply need to treat the boundary as a mirror showing the images of the actual
nodes that are adjacent to the boundary. This technique preserves the symme-
try and the order of approximation of the nite-difference equations because the
image nodes are assigned the same properties as the actual nodes that they reect .
5.2.4 Initial Conditions
For newly discovered elds, it is reasonable to assume that pressure gradient in
the reservoir is due to the hydrostatic head of the uid:
dP
dh
= (5.20)
72 CHAPTER 5. FINITE DIFFERENCE METHODS
Figure 5.11: A typical grid-block hosting a vertical well of radius r
w
and height h
The simulation of single-phase ow in a reservoir is possible from any given
initial pressure distribution.
5.2.5 Treatment of individual wells
Since typical wells in reservoirs have small diameters compared to the size of
the simulation cells (e.g. Figure 5.11), it is common to employ a well index WI
(or productivity index, PI) to relate the local ow rate q to the difference in well
pressure P
w
and numerically computed pressure P
E
in the perforated grid-cell by
q =
t
PI (P
E
P
w
) (5.21)
where
t
is the total mobility and the commonly used Peacemans (Peaceman,
1983) productivity index PI for a vertical well in a Cartesian cell with dimensions
x y z is given as
PI =
2z
ln(
r
o
r
w
)
. (5.22)
The effective well-cell radius, r
o
; which can be interpreted as the radius at
which the actual pressure equals the numerically computed pressure can be written
as:
r
o
= 0.28
_
_
(x)
2
_

x
_
+
_
(y)
2
_

y
_
4
_

x
+
4
_

y
(5.23)
For isotropic media, we have:
r
o
= 0.14
_
(x)
2
+(y)
2
(5.24)
The validity of the Peaceman well-index decreases rapidly with increasing
near-well heterogeneity and grid skewness. Furthermore, it was developed for the
two-point ux-approximation (TPFA) method (see e.g., Aziz and Settari (1979))
5.3. APPLICATION TO SINGLE-PHASE FLOW IN 1D 73
and as such, it is not valid for other methods (such as mixed nite-element meth-
ods (MFEM) with exact integration or mimetic nite-difference methods (MFDM,
Brezzi et al. (2005)) in general).
If Neumann boundary condition is specied (i.e. specied ow rate), the value
is substituted into the ow equation and only written for the block(s) hosting the
well. For blocks with no wells, the ow rate values are set to zero.
For Dirichlet boundary conditions (i.e. specied boundary pressure) Equation
5.21 is substituted into the ow equation (replacing the q
i, j,k
) term. The ow rate
can then be calculated by back-substitution.
5.3 Application to single-phase ow in 1D
To illustrate nite difference techniques in one-dimensional geometry, we will
consider a homogeneous and isotropic 1D cartesian system where the viscosity
is assumed constant and the uid is slightly compressible.
Recall the homogeneous and isotropic form of the ow Equation 3.41 in one-
dimension,

2
P
x
2
=
P
t
, (5.25)
where
=
c

, (5.26)
presumed to hold in some region 0 < x < X and 0 < t represented by grid
x = ix, 0 < i < I where X = Ix and t = nt; x and t are selected spatial and
time increment respectively.
The nite difference representation of Equation 5.25 at the point (i, n) can be
written as
P
n
i+1
2P
n
i
+P
n
i1
x
2
=
_
P
n+1
i
P
n
i
t
_
, (5.27)
where the term P
n
i
represents the value P(ix, nt). Equation 5.27 is termed an
explicit difference represenation of Equation 5.25 because at each time step, only
one unknown appears (i.e. P
n+1
i
) and this unknown can therefore be solved for
explicitly. Thus, re-arranging Equation 5.27 gives
P
n+1
i
= P
n
i1
(2 1)P
n
i
+P
n
i+1
, (5.28)
74 CHAPTER 5. FINITE DIFFERENCE METHODS
Figure 5.12: Finite difference mesh for two independent variables x and t
Figure 5.13: Finite difference mesh for three independent variables x, y and t
5.3. APPLICATION TO SINGLE-PHASE FLOW IN 1D 75
where
=
t
x
2
. (5.29)
At zero time (i.e. n = 0) all P
2
i
for 0 < i < I are known from the initial condition
and P
1
i
can be calculated explicitly for all i from Equation 5.28. Knowledge of
P
i,1
then allows calculations of P
i,2
and so on.
An implicit representation of Equation 5.25 at the point (i, n) can be written as
P
n+1
i1
2P
n+1
i
+P
n+1
i+1
x
2
=
_
P
n+1
i
P
n
i
t
_
. (5.30)
Note that the spatial derivative

2
P
x
2
is replaced by a difference form evaluated at
(n+1)t rather than nt and at each time-step the result contains three unknown
values of the dependent variable P. Re-arranging Equation 5.30 we have
P
n+1
i1
(2+)P
n+1
i
+P
n+1
i+1
=P
n
i
, (5.31)
where,
=
x
2
t
=
1

. (5.32)
Thus, at each timestep, a set of simultaneous equations which form a tri-diagonal
matrix is obtained. The term implicit refers to the fact that the unknowns are
implicitly related to one another through the set of simultaneous equations. The
implicit scheme is unconditionally stable but requires extra computing time, the
explicit scheme on the other hand is only stable under some restrictions.
Another scheme combines implicit and explicit scheme:

_
P
n
i+1
2P
n
i
+P
n
i1
x
2
_
+(1)
_
P
n+1
i+1
2P
n+1
i
+P
n+1
i1
x
2
_
=
_
P
n+1
i
P
n
i
t
_
,
(5.33)
where 0 < < 1; when = 1/2, we have the Crank-Nicolson scheme.
76 CHAPTER 5. FINITE DIFFERENCE METHODS
Figure 5.14: A simple block-centered one-dimensional system composed of ve
blocks with Dirichlet boundary conditions specied at the rst and fth blocks.
5.3.1 Example: one-dimensional ow system
We demonstrate the application of nite difference discretization in single-phase
ow by using a simple one-dimensional regular block-centered grid system com-
posed of ve blocks Figure 5.14.
A Dirichlet boundary condition i.e. pressure values (P) are specied on the
boundaries of Equation 5.28 thus:
P
n
0
= c
1
,
P
n
N+1
= c
2
, (5.34)
Recall the implicit pressure Equation 5.31:
P
n+1
i1
(2+)P
n+1
i
+P
n+1
i+1
=P
n
i
,
which represents the characteristic equation for any block i = 1, 2, ..., 5 in Fig-
ure 5.14. We need to write this pressure equation for each of the blocks in the
geometry. For example, when i = 0, in Equation 5.31 we have
(2+)P
1
0
+P
1
1
=P
0
0
(5.35)
Writing Equation 5.31 at i =1, 2, ..., N yields the following general form of matrix
equation:
5.3. APPLICATION TO SINGLE-PHASE FLOW IN 1D 77
i = 1 (2+)P
1
+P
2
= d
1
c
1
i = 2 P
1
(2+)P
2
+P
3
= d
2
i = 3 P
2
(2+)P
3
+P
4
= d
3
. =
. =
. =
i = N P
n1
(2+)P
N
= d
N
c
2
(5.36)
The above equation reduces to a matrix of 3 bands
_

_
(2+) 1 0
1 (2+) 1
1 (2+) 1
.
.
.
0 (2+)
_

_
_

_
P
1
P
2
P
3
.
.
.
P
N
_

_
=
_

_
d
1
c
1
d
2
d
3
.
.
.
d
N
c
2
_

_
(5.37)
For the system of ve grid-blocks shown in Figure 5.14, we have:
i = 1 (2+)P
1
+P
2
= d
1
c
1
i = 2 P
1
(2+)P
2
+P
3
= d
2
i = 3 P
2
(2+)P
3
+P
4
= d
3
i = 4 P
3
(2+)P
4
+P
5
= d
4
i = 5 P
4
(2+)P
5
= d
5
c
2
(5.38)
A matrix of 3 bands is formed
_

_
(2+) 1 0
1 (2+) 1
1 (2+) 1
1 (2+) 1
0 1 (2+)
_

_
_

_
P
1
P
2
P
3
P
4
P
5
_

_
=
_

_
d
1
c
1
d
2
d
3
d
4
d
5
c
2
_

_
(5.39)
78 CHAPTER 5. FINITE DIFFERENCE METHODS
which leads to a tri-diagonal coefcient matrix equations which are sparse
and are all band matrices of bandwidth three. The solution of the Equations 5.38
gives the reservoir pressure distribution. The equations can be easily solved by
Gaussian elimination.
5.3.2 Truncation error
Truncation error is the error incurred by replacing a differential equation by a
difference equation. The exact solution (i.e. no round-off error) of a difference
equation differs from the solution of the corresponding differential equation due
to this error. The truncation error in a nite difference approximation is dened
by
T = L
D
p(L
p
)
nt
ix
(5.40)
where,
T = truncation error
L
D
p = difference form
L
p
= differential form
Example
Determine the truncation error of the explicit difference approximation Equa-
tion 5.27.
Solution
L
D
p =
P
n
i+1
2P
n
i
+P
n
i1
x
2

_
P
n+1
i
P
n
i
t
_
, (5.41)
L
p
=

2
P
x
2

P
t
, (5.42)
Following from Equations 5.2 and 5.3 we can write the following:
5.3. APPLICATION TO SINGLE-PHASE FLOW IN 1D 79
P
n+1
i
= P
n
i
+tP
t
+
t
2
2
P
tt
+
t
3
6
P
ttt
+...
P
n1
i
= P
n
i
tP
t
+
t
2
2
P
tt

t
3
6
P
ttt
+...
P
n
i+1
= P
n
i
+xP
x
+
x
2
2
P
xx
+
x
3
6
P
xxx
+
x
4
24
P
xxxx
+...
P
n
i1
= P
n
i
xP
x
+
x
2
2
P
xx

x
3
6
P
xxx
+
x
4
24
P
xxxx
+... (5.43)
Therefore,
P
n
i+1
2P
n
i
+P
n
i1
x
2
=

2
P
x
2
|
i,n
+
x
2
12

4
P
x
4
+...

_
P
n+1
i
P
n
i
t
_
=
P
t
|
i,n
+
t
2

2
P
t
2
+... (5.44)
Substituting 5.44 into 5.41 and then subtracting 5.42, we obtain
T =
x
2
12

4
P
x
4

t
2

2
P
t
2
, (5.45)
which can ordinarily be written as
T = (x
2
) +(t) (5.46)
5.3.3 Truncation error in boundary conditions
Consider the mixed boundary condition

P
x
+P = (5.47)
applying along the boundary x = 0 of a rectangular reservoir. If = 0 then values
of pressure are specied at points on the boundary (Figures 5.3 and 5.6b). If
= 0, then
P
x
|
x=0
=
P
2, j
P
0, j
2x
, (5.48)
which is an approximation of the order (x)
2
to P/x at x = 0. Whereas,
P
x
|
x=0
=
P
2, j
P
1, j
x
, (5.49)
has a truncation error of order x at x = 0 and (x)
2
at x =x/2.
80 CHAPTER 5. FINITE DIFFERENCE METHODS
5.4 Application to single-phase ow in 2D
Recall the two-dimensional single-phase ow equation in anisotropic, heteroge-
neous media containing source (or sink) terms:

x
_

P
x
_
+

y
_

P
y
_
+ f (x, y, t) = c
P
t
, (5.50)
where for a block centered grid system, we have
x
i
= 1/2(x
i1/2
+x
i+1/2
); x
i
= x
i+1/2
x
i1/2
, i = 1, 2, ..., N
x
y
j
= 1/2(y
j1/2
+y
j+1/2
); y
j
= y
j+1/2
y
j1/2
, j = 1, 2, ..., N
y
(5.51)
A second order approximation for the derivatives in Equation 5.50 is

s
_
a
s
P
s
_
=
(2a
s
)
k+1/2
(P
k+1
P
k
)
s
k
(s
k+1
+s
k
)

(2a
s
)
k1/2
(P
k
P
k1
)
s
k
(s
k
+s
k1
)
(5.52)
where s = x or y, k = i or j and a
s
=
x
/ or
y
/.
If we dene
(A
s
)
k1/2

(2a
s
)
k+1/2
(s
k
+s
k1
)
(5.53)
then,

s
_
a
s
P
s
_
=
(A
s
)
k+1/2
(P
k+1
P
k
) (A
s
)
k1/2
(P
k
P
k1
)
s
k


s
A
s

s
P
s
k
. (5.54)
Using this difference notation, we can write the nite difference equation form of
Equation 5.50 as

x
A
x

x
P
x
i
+

y
A
y

y
P
y
j
+ f (x, y, t) =
c
t
(P
n+1
i j
P
n
i j
) (5.55)
Multiplying Equation 5.55 by x
i
y
j
, we have

x
T
x

x
P+
y
T
y

y
Pq
i j
=

t
(P
n+1
i j
P
n
i j
) (5.56)
where cx
i
y
j
and q
i j
x
i
y
j
f (x, y, t). For instance
5.4. APPLICATION TO SINGLE-PHASE FLOW IN 2D 81

x
T
x

x
P (T
x
)
i+1/2
(P
i+1, j
P
i j
) (T
x
)
i1/2
(P
i j
P
i1, j
)

y
T
y

y
P (T
y
)
j+1/2
(P
i, j+1
P
i j
) (T
y
)
j1/2
(P
i j
P
i, j1
)
(T
x
)
i+1/2
(A
x
)
i+1/2
y
j
(T
y
)
j1/2
(A
y
)
j1/2
x
i
(T
x
)
i+1/2

2(
x
/)
i+1/2
y
j
x
i
+x
i+1
(T
y
)
j1/2

2(
y
/)
j1/2
x
i
y
j
+y
j1
(5.57)
Considering a steady state system and substituting expressions 5.57 into 5.56,
we have,
(T
x
)
i+1/2
P
i+1, j
(T
x
)
i+1/2
P
i j
(T
x
)
i1/2
P
i j
+(T
x
)
i1/2
P
i1, j
+
(T
y
)
j+1/2
P
i, j+1
(T
y
)
j+1/2
P
i j
(T
y
)
j1/2
P
i j
+(T
y
)
j1/2
P
i, j1


t
P
i j
=

t
P
n
i, j
q
i, j
(5.58)
which can be written in expanded form as
(T
x
)
i+1/2
P
i+1, j

_
(T
x
)
i+1/2
+(T
x
)
i1/2
+(T
y
)
j+1/2
+(T
y
)
j1/2
+

t
_
P
i j
+
(T
x
)
i1/2
P
i1, j
+(T
y
)
j+1/2
P
i, j+1
+(T
y
)
j1/2
P
i, j1
=

t
P
n
i, j
q
i, j
(5.59)
Equation 5.59 can be written in general form as
F
i, j
P
i+1, j
D
i, j
P
i1, j
+E
i, j
P
i j
H
i, j
P
i, j+1
B
i, j
P
i, j1
q
i, j
= d
i, j
, (5.60)
where d
i, j
=

t
P
n
i, j
q
i, j
, P is the pressure in the gridblock identied by the two
subscripts i, j and the Ts in the above expressions are called transmissibilities and
the difference operators
x


x
,
y


y
. q
i, j
is source or sink term (in block i, j)
representing injection or production wells respectively. Note that that the time su-
perscript (n+1) on pressure on the left-hand side of the above equations has been
surpressed to avoid clumsiness. The nomenclature for pressure coefcients are
shown in Figure 5.15. The coefcients A, C, G, and I do not appear in Equation
5.60 because diagonal ow between blocks are not considered.
82 CHAPTER 5. FINITE DIFFERENCE METHODS
Figure 5.15: Nomenclature for pressure coefcients
5.4.1 Explicit form of the difference equation
Considering the homogeneous and isotropic 2D ow equation

2
P
x
2
+

2
P
y
2
=
P
t
, (5.61)
the explicit difference form can be written as
P
n
i+1, j
2P
n
i, j
+P
n
i1, j
x
2
+
P
n
i, j+1
2P
n
i, j
+P
n
i, j1
y
2
=
P
n+1
i, j
P
n
i, j
t
(5.62)
re-arranging,
P
n
i1, j
+P
n
i, j1
(4+)P
n
i, j
+P
n
i+1, j
+P
n
i, j+1
=P
n+1
i, j
, (5.63)
5.4.2 Implicit form of the difference equation
The implicit form of Equation 5.61 can be written as
P
n+1
i+1, j
2P
n+1
i, j
+P
n+1
i1, j
x
2
+
P
n+1
i, j+1
2P
n+1
i, j
+P
n+1
i, j1
y
2
=
P
n+1
i, j
P
n
i, j
t
(5.64)
Assuming y =x Equation 5.64 can be re-arranged thus
P
n+1
i1, j
+P
n+1
i, j1
(4+)P
n+1
i, j
+P
n+1
i+1, j
+P
n+1
i, j+1
=P
n
i, j
, (5.65)
Equation 5.65 written at i = 1, 2, ..., I and j = 1, 2, ..., J constitutes I J equa-
tions in the I J unknowns P
i, j
.
5.4. APPLICATION TO SINGLE-PHASE FLOW IN 2D 83
In matrix form, Equations 5.63 and 5.65 can be written as
A

P =

b, (5.66)
where

P and

b are column vectors (I J long) and A is a penta-diagonal matrix.


We recall that the 1D Equation 5.31 gave rise to a tri-diagonal matrix.
5.4.3 Matrix form
The relation
k = [( j 1) I] +i (5.67)
assigns a unique linear subscript k to each grid point (i, j). For example, if the
number of blocks in the xdirection, I, is 10 then P
3,4
in the original indexing
mode becomes P
33
in the linear subscript mode. In this linear subscript, Equation
5.63 becomes,
P
k+1
+P
k1
(4+)P
k
+P
k+I
+P
kI
= b
k
(5.68)
A=
_

_
(4+) 1 0 0 1 0
1 (4+) 1 0 0 1 0
0 1 (4+) 1 0 1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0 1 0 1 (4+) 1 0
0 1 0 1 (4+) 1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0 1 0
_

_
(5.69)
84 CHAPTER 5. FINITE DIFFERENCE METHODS
Figure 5.16: A simple block-centered two-dimensional system composed of nine
blocks with Dirichlet boundary conditions specied at the blocks 1, 2 and 3. The
grids are numbered using normal grid ordering.

P =
_

_
P
1
P
2

P
IJ
_

b =
_

_
b
1
b
2

b
IJ
_

_
(5.70)
5.4.4 Example: two-dimensional ow system
We demonstrate the application of nite difference discretization in single-phase
ow by using a simple two-dimensional regular block-centered grid system com-
posed of nine blocks Figure 5.16. The grids have been numbered using normal
grid ordering. When a grid is located on the boundary, then some of the terms in
Equation 5.60 refer to pressures in the blocks not included in the system. In these
cases, the boundary conditions will be specied such that they can be deleted from
the system of equations. This can be achieved by setting the coefcients multiply-
ing those terms to zero. Thus:
B
i,1
= 0, for i = 1, 2, 3
D
1, j
= 0, for j = 1, 2, 3
F
3, j
= 0, for j = 1, 2, 3
H
i,3
= 0, for i = 1, 2, 3
(5.71)
Implementing the aforementioned and representing the block index corre-
sponding to (i, j) as c we have:
5.5. MULTIPHASE FLOW IN 3D 85
c=1: E
1
P
1
F
1
P
2
H
1
P
4
c=2: D
2
P
1
E
2
P
2
F
2
P
3
H
2
P
5
c=3: D
3
P
2
E
3
P
3
H
3
P
6
c=4: B
4
P
1
E
4
P
4
F
4
P
5
H
4
P
7
c=5: B
5
P
2
D
5
P
4
E
5
P
5
F
5
P
6
H
5
P
8
c=6: B
6
P
3
D
6
P
5
E
6
P
6
H
6
P
9
c=7: B
7
P
4
E
7
P
7
F
7
P
8
c=8: B
8
P
5
D
8
P
7
E
8
P
8
F
8
P
9
c=9: B
9
P
6
D
9
P
8
E
9
P
9
=d
1
=d
2
=d
3
=d
4
=d
5
=d
6
=d
7
=d
8
=d
9
(5.72)
There are three dirichlet (pressure) specication on the boundary blocks 1, 2
and 3 and a producing well is located in block 5; at which bottom-hole owing
pressure is specied as P
wf
(see Figure 5.16).
P
i,1
= c
1
, for i = 1, 2, 3
P
2,2
= P
wf
(5.73)
Hence, only six blocks have unknown pressures and we can write Equation
5.60 for these six blocks as:
c=4: B
4
P
1
E
4
P
4
H
4
P
7
c=5: B
5
P
2
D
5
P
4
F
5
P
6
H
5
P
8
c=6: B
6
P
3
E
6
P
6
H
6
P
9
c=7: B
7
P
4
E
7
P
7
F
7
P
8
c=8: D
8
P
7
E
8
P
8
F
8
P
9
c=9: B
9
P
6
D
9
P
8
E
9
P
9
= d
4
+F
4
P
wf
= d
5
E
5
P
wf
= d
6
+D
6
P
wf
= d
7
= d
8
+B
8
P
wf
= d
9
(5.74)
which leads to a penta-diagonal coefcient matrix equations which are sparse and
are all band matrices of bandwidth ve. The solution of the equations gives the
reservoir pressure distribution.
5.5 Multiphase ow in 3D
Multiphase multidimensional ow problems involves solving a system of coupled
nonlinear partial differential equations. The principles applied in the previous
sections; whereby the partial differential equations are discretized, linearized and
solved, can be readily extended to multiphase multidimensional systems. How-
ever, the various solution techniques differ with Multiphase ow respect to how
the governing partial differential equations are handled. We will discuss two-
phase incompressible ow and three-phase incompressible ow in heterogeneous
and anisotropic porous media in three-dimensional geometry.
86 CHAPTER 5. FINITE DIFFERENCE METHODS
Recall the general form of the black oil reservoir simulation equations (Equa-
tions 3.72 - 3.74) in three-dimensional ow geometry
Oil equation:

ro

o
B
o
P
o
_
Q
o
=

t
_
S
o
B
o
_
Water equation:

rw

w
B
w
P
w
_
Q
w
=

t
_
S
w
B
w
_
Gas equation:

ro

o
R
s

o
B
o
P
o
_
+
_

rg

g
B
g
P
g
_

(R
s
Q
o
+Q
g
) =

t
_
S
g
B
g
+
S
o
R
s
B
o
_
The oil equation can be written as

x
_

ro

o
B
o
P
o
x
_
+

y
_

ro

o
B
o
P
o
y
_
+

z
_

ro

o
B
o
P
o
z
_
q
vo
=

t
_

S
o
B
o
_
(5.75)
Employing the standard central-difference approximation for the spatial deriva-
tives and backward time difference for the temporal derivatives, we have:
oil:
5.5. MULTIPHASE FLOW IN 3D 87
_
_
_
_
_

ro

o
B
o
_
i+
1
2
, j,k
_
P
o
i+1, j,k
P
o
i, j,k
_

ro

o
B
o
_
i
1
2
, j,k
_
P
o
i, j,k
P
o
i1, j,k
_
x
2
_
_
_
_
+
_
_
_
_
_

ro

o
B
o
_
i, j+
1
2
,k
_
P
o
i, j+1,k
P
o
i, j,k
_

ro

o
B
o
_
i, j
1
2
,k
_
P
o
i, j,k
P
o
i, j1,k
_
y
2
_
_
_
_
+
_
_
_
_
_

ro

o
B
o
_
i, j,k+
1
2
_
P
o
i, j,k+1
P
o
i, j,k
_

ro

o
B
o
_
i, j,k
1
2
_
P
o
i, j,k
P
o
i, j,k1
_
z
2
_
_
_
_

q
vo

_
_
_
_
S
o
B
o
_
n+1

_
S
o
B
o
_
n
t
_
_
_
(5.76)
water:
_
_
_
_
_

rw

w
B
w
_
i+
1
2
, j,k
_
P
w
i+1, j,k
P
w
i, j,k
_

rw

w
B
w
_
i
1
2
, j,k
_
P
w
i, j,k
P
w
i1, j,k
_
x
2
_
_
_
_
+
_
_
_
_
_

rw

w
B
w
_
i, j+
1
2
,k
_
P
w
i, j+1,k
P
w
i, j,k
_

rw

w
B
w
_
i, j
1
2
,k
_
P
w
i, j,k
P
w
i, j1,k
_
y
2
_
_
_
_
+
_
_
_
_
_

rw

w
B
w
_
i, j,k+
1
2
_
P
w
i, j,k+1
P
w
i, j,k
_

rw

w
B
w
_
i, j,k
1
2
_
P
w
i, j,k
P
w
i, j,k1
_
z
2
_
_
_
_

q
vw

_
_
_
_
S
w
B
w
_
n+1

_
S
w
B
w
_
n
t
_
_
_
(5.77)
gas:
88 CHAPTER 5. FINITE DIFFERENCE METHODS
_
_
_
_
_

ro
R
s

o
B
o
_
i+
1
2
, j,k
_
P
o
i+1, j,k
P
o
i, j,k
_

ro
R
s

o
B
o
_
i
1
2
, j,k
_
P
o
i, j,k
P
o
i1, j,k
_
x
2
_
_
_
_
+
_
_
_
_
_

rg

g
B
g
_
i+
1
2
, j,k
_
P
g
i+1, j,k
P
g
i, j,k
_

rg

g
B
g
_
i
1
2
, j,k
_
P
g
i, j,k
P
g
i1, j,k
_
x
2
_
_
_
_
+
_
_
_
_
_

ro
R
s

o
B
o
_
i, j+
1
2
,k
_
P
o
i, j+1,k
P
o
i, j,k
_

ro
R
s

o
B
o
_
i, j
1
2
,k
_
P
o
i, j,k
P
o
i, j1,k
_
y
2
_
_
_
_
+
_
_
_
_
_

rg

g
B
g
_
i, j+
1
2
,k
_
P
g
i, j+1,k
P
g
i, j,k
_

rg

g
B
g
_
i, j
1
2
,k
_
P
g
i, j,k
P
g
i, j1,k
_
y
2
_
_
_
_
+
_
_
_
_
_

ro
R
s

o
B
o
_
i, j,k+
1
2
_
P
o
i, j,k+1
P
o
i, j,k
_

ro
R
s

o
B
o
_
i, j,k
1
2
_
P
o
i, j,k
P
o
i, j,k1
_
z
2
_
_
_
_
+
_
_
_
_
_

rg

g
B
g
_
i, j,k+
1
2
_
P
g
i, j,k+1
P
g
i, j,k
_

rg

g
B
g
_
i, j,k
1
2
_
P
g
i, j,k
P
g
i, j,k1
_
z
2
_
_
_
_

(q
vg
+q
vo
R
s
)
_
_
_
_
S
g
B
g
+
S
o
R
s
B
o
_
n+1

_
S
g
B
g
+
S
o
R
s
B
o
_
n
t
_
_
_
(5.78)
Multiplying each term in the Equations 5.76 - 5.78 by x y z gives
oil:
5.5. MULTIPHASE FLOW IN 3D 89
_
(T
o
x
)
i+
1
2
, j,k
_
P
o
i+1, j,k
P
o
i, j,k
_
(T
o
x
)
i
1
2
, j,k
_
P
o
i, j,k
P
o
i1, j,k
_
_
+
_
_
T
o
y
_
i, j+
1
2
,k
_
P
o
i, j+1,k
P
o
i, j,k
_

_
T
o
y
_
i, j
1
2
,k
_
P
o
i
, j,k
P
o
i, j1,k
_
_
+
_
_
T
o
z
_
i, j,k+
1
2
_
P
o
i, j,k+1
P
o
i, j,k
_

_
T
o
z
_
i, j,k
1
2
_
P
o
i, j,k
P
o
i, j,k1
_
_

q
vo

xyz
t
_
_
S
o
B
o
_
n+1

_
S
o
B
o
_
n
_
(5.79)
water:
_
(T
w
x
)
i+
1
2
, j,k
_
P
w
i+1, j,k
P
w
i, j,k
_
(T
w
x
)
i
1
2
, j,k
_
P
w
i, j,k
P
w
i1, j,k
_
_
+
_
_
T
w
y
_
i, j+
1
2
,k
_
P
w
i, j+1,k
P
w
i, j,k
_

_
T
w
y
_
i, j
1
2
,k
_
P
w
i
, j,k
P
w
i, j1,k
_
_
+
_
_
T
w
z
_
i, j,k+
1
2
_
P
w
i, j,k+1
P
w
i, j,k
_

_
T
w
z
_
i, j,k
1
2
_
P
w
i, j,k
P
w
i, j,k1
_
_

q
vo

xyz
t
_
_
S
w
B
w
_
n+1

_
S
w
B
w
_
n
_
(5.80)
gas:
90 CHAPTER 5. FINITE DIFFERENCE METHODS
_
(T
o
x
R
s
x
)
i+
1
2
, j,k
_
P
o
i+1, j,k
P
o
i, j,k
_
(T
o
x
R
s
x
)
i
1
2
, j,k
_
P
o
i, j,k
P
o
i1, j,k
_
_
+
_
_
T
o
y
R
s
y
_
i, j+
1
2
,k
_
P
o
i, j+1,k
P
o
i, j,k
_

_
T
o
y
R
s
y
_
i, j
1
2
,k
_
P
o
i
, j,k
P
o
i, j1,k
_
_
+
_
_
T
o
z
R
s
z
_
i, j,k+
1
2
_
P
o
i, j,k+1
P
o
i, j,k
_

_
T
o
z
R
s
z
_
i, j,k
1
2
_
P
o
i, j,k
P
o
i, j,k1
_
_
+
_
(T
g
x
)
i+
1
2
, j,k
_
P
g
i+1, j,k
P
g
i, j,k
_
(T
g
x
)
i
1
2
, j,k
_
P
g
i, j,k
P
g
i1, j,k
_
_
+
_
_
T
g
y
_
i, j+
1
2
,k
_
P
g
i, j+1,k
P
g
i, j,k
_

_
T
g
y
_
i, j
1
2
,k
_
P
g
i
, j,k
P
g
i, j1,k
_
_
+
_
_
T
g
z
_
i, j,k+
1
2
_
P
o
i, j,k+1
P
o
i, j,k
_

_
T
o
z
_
i, j,k
1
2
_
P
g
i, j,k
P
g
i, j,k1
_
_

(q
vg
+q
vo
R
s
)
xyz
t
_
_
S
g
B
g
+
S
o
R
s
B
o
_
n+1

_
S
g
B
g
+
S
o
R
s
B
o
_
n
_
(5.81)
where
(T
o
x
)
i+
1
2
, j,k
=
_

ro
yz

o
B
o
x
_
i+
1
2
, j,k
(T
o
x
)
i
1
2
, j,k
=
_

ro
yz

o
B
o
x
_
i
1
2
, j,k
_
T
o
y
_
i, j+
1
2
,k
=
_

ro
xz

o
B
o
y
_
i, j+
1
2
,k
_
T
o
y
_
i, j
1
2
,k
=
_

ro
xz

o
B
o
y
_
i, j
1
2
,k
_
T
o
z
_
i, j,k+
1
2
=
_

ro
xy

o
B
o
z
_
i, j,k+
1
2
_
T
o
z
_
i, j,k
1
2
=
_

ro
xy

o
B
o
z
_
i, j,k
1
2
(5.82)
5.5. MULTIPHASE FLOW IN 3D 91
are the oil-phase transmissibility for x, y and zdirecions ow between
blocks indicated. Similar expression can be written for the water and gas.
5.79 - 5.81 are three equations in six unknowns: P
o
, P
w
, P
g
, S
w
, S
o
and S
g
.
Three additional equations are
S
w
+S
o
+S
g
= 1
P
cgo
(S
g
) = P
g
P
o
P
cwo
(S
w
) = P
o
P
w
(5.83)
Equations 5.79 - 5.81 can be expanded, linearized and put in a simplied form
as
Z
i, j,k
P
i, j,k1
+B
i, j,k
P
i, j1,k
+D
i, j,k
P
i1, j,k
+E
i, j,k
P
i, j,k
+F
i, j,k
P
i+1, j,k
+H
i, j,k
P
i, j+1,k
+S
i, j,k
P
i, j,k+1
= d
i, j,k
(5.84)
5.5.1 Implicit Pressure-Explicit Saturation (IMPES) solution
method
The implicit pressure-explicit saturation (IMPES) method (Stone and Jr., 1961;
Sheldon et al., 1960) involves solving for pressure implicitly by eliminating the
saturation terms from the ow equations. The saturation is then computed explic-
itly by referring back to one of the ow equations. Capillary pressure is assumed
to be constant during any iteration step and as such computation is generally faster.
The coefcients in the system of equations are functions of pressures and satura-
tions; therefore are estimated using the information available at the previous time
level.
During a particular iteration level, a phase pressure (e.g., P
w
) distribution is
obtained, and the corresponding saturation (e.g. S
w
) distribution computed ex-
plicitly. The other phase (e.g. oil) pressure distribution can then be calculated
using the capillary pressure relationship between the phases (e.g. oil-water) and
saturation distribution computed. The computed values of So and Sw, can then be
used to determine the gas satuation (i.e. Sg = 1S
o
S
w
).
The capillary pressure relationship between the oil and gas phases, can be used
to obtain the gas phase pressure (P
g
) distribution. This completes one iteration and
92 CHAPTER 5. FINITE DIFFERENCE METHODS
the whole procedure is repeated until convergence is achieved. At the beginning
of each iteration, all the pressure and saturation dependent terms are updated using
the most recent information available from the previous time-step.
5.5.2 Simultaneous Solution (SS) method
In the simultaneous solution (SS) method, the saturation derivatives that appear
on the right-hand-side of the ow equations are converted to pressure derivatives
using the capillary pressure relationships. At each grid node there are three un-
knowns and three equations with signicantly large coefcient matrix.
We seek solution of the right hand sides of Equations 5.79 - 5.81 in the form
V
t

t
_
S
w
B
w
_
=C
11

t
P
w
+C
12

t
P
o
+C
13

t
P
g
V
t

t
_
S
o
B
o
_
=C
21

t
P
w
+C
22

t
P
o
+C
23

t
P
g
V
t

t
_
S
o
R
o
B
o
+
S
g
B
g
_
=C
31

t
P
w
+C
32

t
P
o
+C
33

t
P
g
(5.85)
Insertion of Equations 5.85 into Equations 5.79 - 5.81 yields three equations
in the three unknowns (P
n+1
w
, P
n+1
o
and P
n+1
g
) for which they can be solved simul-
taneously.
The coefcients C
i j
can be obtained by expanding the term
t
_
S
o
B
o
_
thus
V
t

t
_
S
o
B
o
_
=
_

B
o
_
n+1

t
S
o
+
_

n+1
S
n
o
_

t
1
B
o
+S
n
o
_
1
B
o
_
n

t
(5.86)
Using the denition of capillary pressures Equations 5.83, we can dene

t
S
o
=
t
S
w
+
t
S
g
= S

t
P
c
ow
S

t
P
c
go
= S

w
(
t
P
o

t
P
w
) S

g
(
t
P
g

t
P
o
)
(5.87)
where
5.5. MULTIPHASE FLOW IN 3D 93
S

w
=
S
n+1
w
S
n
w
P
n+1
c
ow
P
n
c
ow
S

g
=
S
n+1
g
S
n
g
P
n+1
c
go
P
n
c
go
(5.88)
Also,

t
=
b
c
f

t
P
w
(5.89)

t
1
B
o
=
_
1
B
o
_
n+1

_
1
B
o
_
n
P
n+1
o
P
n
o

t
P
o
(5.90)
Substituting Equations 5.87 - 5.90 into Equation 5.86 gives
V
t

t
_
S
o
B
o
_
=
_
_

B
o
_
n+1
S

w
+S
n
o

b
c
f
_
1
B
o
_
n
_

t
P
w
+
_
S
n
o

n+1
_
1
B
o
_

(S

w
S

g
)
_

1
B
o
_
n+1
_

t
P
o

_
S

g
_

1
B
o
_
n+1
_

t
P
g
(5.91)
Similar expressions can be written for the water and gas equations.
Substitution of Equations 5.85 into Equations 5.79 - 5.81 then gives
(T
o
P
n+1
o
) q
o
=C
11

t
P
w
+C
12

t
P
o
+C
13

t
P
g
(T
w
P
n+1
w
) q
w
=C
21

t
P
w
+C
22

t
P
o
+C
23

t
P
g
(T
o
R
s
P
n+1
o
) +(T
g
P
n+1
g
) (q
g
+R
s
q
o
) =C
31

t
P
w
+C
32

t
P
o
+C
33

t
P
g
(5.92)
which can be written as a single matrix equation as
94 CHAPTER 5. FINITE DIFFERENCE METHODS
(TP
n+1
i jk
) q
i jk
=C
i jk

t
P
i jk
(5.93)
Equation 5.93 applies at each grid point in the reservoir and is implicit in both
pressure and saturation. This implies that there is no need for explicit updating
of capillary pressure at the old time level as in the IMPES method. The changes
in pressure over the time-step automatically account for the changes in satura-
tion through the Equations 5.87. Equation 5.93 can be solved iteratively by the
alternating-direction procedure (e.g. Douglas and A. H. Rachford (1956)).
5.5.3 Example: three-dimensional ow system
We demonstrate the application of nite difference discretization in single-phase
ow by using a simple three-dimensional regular block-centered grid system com-
posed of twenty-seven blocks Figure 5.17. The grids have been numbered using
normal grid ordering. When a grid is located on the boundary, then some of the
terms in Equation 5.75 refer to pressures in the blocks not included in the system.
In these cases, the boundary conditions; similar to the two-dimensional geometry,
will be specied such that they can be deleted from the system of equations. This
can be achieved by setting the coefcients multiplying those terms to zero. Thus:
Z
i, j,1
= 0, for i = 1, 2, 3; j = 1, 2, 3
B
i,1,k
= 0, for i = 1, 2, 3; k = 1, 2, 3
D
1, j,k
= 0, for j = 1, 2, 3; k = 1, 2, 3
F
3, j,k
= 0, for j = 1, 2, 3; k = 1, 2, 3
H
i,3,k
= 0, for i = 1, 2, 3; k = 1, 2, 3
S
i, j,3
= 0, for i = 1, 2, 3; k = 1, 2, 3
(5.94)
This equation can be written for every block in the reservoir model at which
the pressure is unknown,
c=1: E
1
P
1
F
1
P
2
H
1
P
4
S
1
P
10
c=2: D
2
P
1
E
2
P
2
F
2
P
3
H
2
P
5
S
2
P
11
c=3: D
3
P
2
E
3
P
3
H
3
P
6
S
3
P
12
.
.
.
=d
1
=d
2
=d
3
.
.
.
(5.95)
which leads to a hepta-diagonal coefcient matrix equations which are sparse and
are band matrix of bandwidth seven. The additional diagonals are equally spaced
on both sides of the main diagonal at distances that are related to the number of
5.6. SOLUTION METHODS 95
Figure 5.17: A simple block-centered three-dimensional system composed of
twenty-seven blocks with Dirichlet boundary conditions specied at the blocks
1, 2, 3, 10, 11, 12, 19, 20 and 21. The grids are numbered using normal grid order-
ing.
blocks in a row of a 3D problem and the number of blocks in a plane in a 3D
problem. The solution of the equations gives the reservoir pressure distribution.
In all cases, we can derive the ow rate from the productivity index equation using
the computed pressure values.
5.6 Solution methods
To select the best method for solving a particular ow equation, it is not neces-
sary to know in detail how the available solvers work. It is however useful to
understand the underlying principles of the various solution methods not only to
be able to discern their strengths and weaknesses, but also to be able to follow the
literature.
5.6.1 Direct methods
5.6.1.1 Gaussian elimination
The application of Gaussian elimination (see section 2.9.1) to the matrix A in
Equation 5.69 requires a total of about 2I
3
J arithmetic operations. More specif-
ically, about I
3
J multiplications and I
3
J additions are required to render the ma-
trix in upper triangular form (all zeroes below the main diagonal); about I
2
J
96 CHAPTER 5. FINITE DIFFERENCE METHODS
multiplications and IJ are then necessary to solve for P values. This results in
a total of I
2
J(I +1) multiplications and I
2
J(I +1) additions. Note that for a
square grid (I=J=N) this is N
4
multiplications compared to N
6
/3 multiplications
[(number o f unknowns)/3] required to solve a full matrix problem with N
2
un-
knowns.
5.6.1.2 Band matrix equations
As we have seen earlier (e.g. in section 5.3.1), the coefcient matrices in reservoir
simulation problems are band matrices. The concept of factorization as discussed
in section 2.9.1, can exploit the sparseness of the matrix; i.e. the zeros outside
the band. For small band matrices, direct solution by factorization is an efcient
method.
Example
_
_
a
11
a
12
0
a
21
a
22
a
23
0 a
32
a
33
_
_
_
_
P
1
P
2
P
3
_
_
=
_
_
b
1
b
2
b
3
_
_
(5.96)
A P = b
Step 1
Matrix A will be factored into upper and lower triangular matrices; chosen
such that the upper triangular matrix contains only ones on its main diagonal.
_
_
l
11
0 0
l
21
l
22
0
l
31
l
32
l
33
_
_
_
_
1 u
12
u
13
0 1 u
23
0 0 1
_
_
=
_
_
a
11
a
12
0
a
21
a
22
a
23
0 a
32
a
33
_
_
(5.97)
L U = A
The product LU equals
_
_
l
11
+0+0 l
11
u
12
+0+0 l
11
u
13
+0+0
l
21
+0+0 l
21
u
12
+l
22
+0 l
21
u
13
+l
22
u
23
+0
l
31
+0+0 l
31
u
12
+l
32
+0 l
31
u
13
+l
32
u
23
+l
33
_
_
(5.98)
Step 2
Set corresponding elements in LU and A equal
5.6. SOLUTION METHODS 97
l
11
= a
11
l
11
u
12
= a
12
l
11
u
13
= 0
l
21
= a
21
l
21
u
12
+l
22
= a
22
l
22
u
23
= a
23
l
31
= 0 l
32
= a
32
l
32
u
23
+l
33
= a
33
(5.99)
Step 3
Solve all elements in L and U in terms of elements of A
_
_
a
11
0 0
a
21
a
22

a
12
a
21
a
11
0
0 a
32
a
33
a
32
a
11
a
23
a
11
a
22
a
12
a
21
_
_

_
_
1
a
12
a
11
0
0 1
a
11
a
23
a
11
a
22
a
12
a
21
0 0 1
_
_
(5.100)
L U
5.6.2 Ordering schemes
In the Gaussian elimination, an upper triangular matrix U was created from the
original matrix A. This involves eliminating nonzeros belowthe main diagonal and
processing other rows one at a time. In so doing, we sometimes create nonzeros
below the current row being processed, where there are zero elements originally.
By reordering the equations, it may be possible to reduce both storage and
work requirements. This is possible by exploiting the matrix sparsity and reducing
the number of ll elements created. Fill elements are elements which must be
stored and eventually eliminated themselves.
5.6.2.1 Standard ordering
In standard ordering, blocks in an (N
x
) (N
y
) model (N
x
blocks in each row and
N
y
blocks in each column) are numbered row by row in sequence within a row
from rows 1 through N
y
. For example, 4 2 and 2 4 models can be numbered
as shown in Figure 5.18. The pressure equation for (see Equation 5.60) block 3 of
the 42 and 24 models are
F
3
P
4
+D
3
P
2
+E
3
P
3
+H
3
P
7
= q
3
F
3
P
4
+H
3
P
5
+E
3
P
3
+B
3
P
1
= q
3
,
(5.101)
98 CHAPTER 5. FINITE DIFFERENCE METHODS
Figure 5.18: Standard ordering of model gridblocks (a) 42 and (b) 24
Figure 5.19: Coefcient matrices of (a) 42 and (b) 24
respectively, where the subscripts refer to the gridblock numbers. The equations
involve only four pressures because block 3 communicates with blocks 2, 4 and 7
for the 42 model and 1, 4 and 5 for the 24 model. The map of the coefcient
matrices for the two models are shown in Figure 5.19
The total number of equations, N
x
N
y
= 8, is basically the same for the two
cases, but the distribution of terms within the the two models differs. The co-
efcient matrix for a the 4 2 model is a band matrix of bandwidth 9; i.e., the
matrix spans nine diagonals even though the upper and lower diagonals 3 and 4
are empty. The bandwidth for the 24 model is 5.
The work done in solving a set of band matrix equations using the factorization
method is a function of the bandwidth and the number of equations. The solution
of the 42 model would take more than twice as much work as the 24 model.
Hence, if a standard ordering of the equations is used, numbering should be in
sequence in the short direction.
5.6. SOLUTION METHODS 99
Figure 5.20: Ordering of gridblocks (a) A3 and (b) D4
5.6.2.2 A3 and D4 ordering
A3 and D4 orderings are illustrated in Figure 5.20. A3 ordering is also known as
red/black or checkered board ordering. In D4 ordering, numbering is order along
alternate diagonals. Further discussions on A3 and D4 orderings can be found in
Price and Coats (1974).
5.6.3 Iterative methods
An iterative method involves a systematic repeated approximaton procedure to
generate the true answers from the computed answers; which are contin-
uously rened and updated until a specied tolerance (convergence criteria) is
achieved. This is usually applicable in large areal and 3D models.
5.6.3.1 Point relaxation
Recall the general form of the pressure Equation 5.60; which consists of ve un-
known pressure P at each gridblock. One way to solve for P
n
i, j
is to guess the
values of all the other pressures:
P
i, j
=
1
E
i, j
(q
i, j
+B
i, j
P
i, j1
+D
i, j
P
i1, j
+F
i, j
P
i+1, j
+H
i, j
P
i, j+1
). (5.102)
A new pressure array is then created when this calculation is carried out for all
equations in the system. This array is then checked to see if the values satisfy the
gridblock equations. This is done by dening a residual r
i, j
for each equation by
rearranging the terms in the original equation:
100 CHAPTER 5. FINITE DIFFERENCE METHODS
r
i, j
= (q
i, j
+
_
B
i, j
P
i, j1
+D
i, j
P
i1, j
+F
i, j
P
i+1, j
+H
i, j
P
i, j+1
_
(5.103)
If the new values satisfy the, then all the residuals will be zero or very small. If
not the process is repeated with updated P values that are based on the previous
iteration. This process is repeated until all the residuals are acceptably close to
zero. This type of iteration method is called a point iterative method because it
does not involve the simultaneous solution of coupled equations.
The Gauss-Seidel method is a variation of the point point iterative method.
It uses the most recent estimates of pressures in the neighbouring blocks in the
evaluation of the right side of the original equation. Other relaxation methods use
the values of P
k
i, j
calculated in the most recent iteration to adjust values calculated
in the next (k +1) iteration. This is aimed at improving the convergence rate of
the iterative scheme.
(P
k+1
i, j
)
new
= P
k
i, j
+
_
P
k+1
i, j
P
k
i, j
_
(5.104)
(P
k+1
i, j
)
new
is then used instead of (P
k+1
i, j
) in the subsequent calculations for other
gridblocks. This procedure is called overrelaxation if the value of is greater
than one.
Other relaxation method includes line and block relaxation methods. In line
relaxation, equations for a row or column are solved simultaneously while the
contributions of adjacent columns or rows are kept at their most recent estimates.
Block relaxation is a natural extension of the line relaxation in which more than
one line is included in the implicit portion of the overall procedure.
5.6.4 Alternating Direction Implicit Procedure (ADIP)
Recall the general form of the ow equation (Equation 5.60)
F
i, j
P
i+1, j
D
i, j
P
i1, j
+E
i, j
P
i j
H
i, j
P
i, j+1
B
i, j
P
i, j1
q
i, j
= d
i, j
The ADI formulation of this equation can be written as
x sweep :
x
T
x

x
P
n+1/2
+
y
T
y

y
P
n
+q
n
=
2
t
(P
n+1/2
P
n
) (5.105)
y sweep :
x
T
x

x
P
n+1/2
+
y
T
y

y
P
n+1
+q
n
=
2
t
(P
n+1
P
n+1/2
) (5.106)
5.6. SOLUTION METHODS 101
Equation 5.105 can be written as
a
i
P
n+1/2
i1
+b
i
P
n+1/2
i
c
i
P
n+1/2
i+1
= d
i
(5.107)
where,
a
i
= (T
x
)
i1/2
b
i
=
_
(T
x
)
i1/2
+(T
x
)
i+1/2
+
2
t
_
c
i
= (T
x
)
i+1/2
d
i
= (T
y
)
j1/2
P
n
j1

_
(T
y
)
j1/2
+(T
y
)
j+1/2

2
t
_
P
n
i, j
+(T
y
)
j+1/2
P
n
j+1
+q
n
i, j
(5.108)
Equation 5.106 becomes
a
j
P
n+1
j1
+

b
j
P
n+1
i, j
c
j
P
n+1
j+1
=

d
j
(5.109)
where,
a
j
= (T
y
)
j1/2

b
j
=
_
(T
y
)
j1/2
+(T
y
)
j+1/2
+
2
t
_
c
j
= (T
y
)
j+1/2

d
j
= (T
x
)
i1/2
P
n+1/2
j1

_
(T
x
)
i1/2
+(T
x
)
i+1/2

2
t
_
P
n+1/2
i, j
+(T
x
)
i+1/2
P
n+1/2
i+1
+q
n+1/2
i, j
(5.110)
Both Equations 5.107 and 5.109 lead to tridiagonal matrix problems for each
sweep although the matrix coefcients are not constants but are space dependent
functions. The ADIP of Peaceman and Rachford (1955) is unconditionally stable.
However, truncation errors can become prohibitive for large t which severely
restricts the time-step size in many practical applications. Furthermore, when
the transmissibilities are strongly contrasting in each of the coordinate directions,
convergence is difcult if not impossible to achieve.
5.6.5 Factorization and minimization methods
In the direct elimination method described earlier in section 5.6.1, the coefcient
matrix is factored into triangular matrices with a series of arithmetic operations
102 CHAPTER 5. FINITE DIFFERENCE METHODS
on the coefcient matrix. Although the procedures are rigorous and the factors are
exact, it becomes prohibitively expensive to create the factors when dealing with
large problems. In an approximate-factorization scheme, the work of rigorous
factorization is avoided by using factors whose product is similar but not identical
to the original matrix. However, the disadvantage is that iteration is required to
obtain a satisfactory solution.
5.6.5.1 Strongly Implicit Procedure (SIP)
Strongly Implicit Procedure (SIP), also known as the Stones method, is an algo-
rithm for solving a sparse linear system of equations. The method uses an incom-
plete LU decomposition, which approximates the exact LU decomposition, to get
an iterative solution of the problem. The method is named after Stone (1968), who
proposed it in 1968. The LU decomposition is an excellent general purpose linear
equation solver.
The biggest disadvantage is that it fails to take advantage of coefcient matrix
to be a sparse matrix. The LU decomposition of a sparse matrix is usually not
sparse, thus, for large system of equations, LU decomposition may require a pro-
hibitive amount of memory and arithmetical operations.
The pressure equations written with subscripts referring to the gridblock num-
bers assigned to the model, are
_

_
E
1
F
1
H
1
D
2
E
2
F
2
H
2
D
3
E
3
H
3
B
4
E
4
F
4
H
4
B
5
D
5
E
5
F
5
H
5
B
6
D
6
E
6
H
6
B
7
E
7
F
7
B
8
D
8
E
8
F
8
B
9
D
9
E
9
_

_
P
1
P
2
P
3
P
4
P
5
P
6
P
7
P
8
P
9
_

_
=
_

_
q
1
q
2
q
3
q
4
q
5
q
6
q
7
q
8
q
9
_

_
(5.111)
A P = q
The appropriate positive or negative signs have been embedded in the coefcients.
If L and U can be found, they will contain terms at the following positions
5.7. COMPARISON OF DIRECT AND ITERATIVE METHODS 103
_

_
e
1
d
2
e
2
d
3
e
3
b
4
e
4
b
5
d
5
e
5
b
6
d
6
e
6
b
7
e
7
b
8
d
8
e
8
b
9
d
9
e
9
_

_
1 f
1
h
1
1 f
2
h
2
1 h
3
1 f
4
h
4
1 f
5
h
5
1 h
6
1 f
7
1 f
8
1
_

_
L U (5.112)
If we dene A

to be the product of L and U then A

becomes:
_

_
E

1
F

1
H

1
D

2
E

2
F

2
H

2
D

3
E

3
H

3
B

4
E

4
F

4
H

4
B

5
D

5
E

5
F

5
H

5
B

6
D

6
E

6
H

6
B

7
E

7
F

7
B

8
D

8
E

8
F

8
B

9
D

9
E

9
_

_
(5.113)
A

If L and U were exact factors of A, then A

would be identical to A. Although


they are structurally similar, A and A

are not identical; A

contains terms on C

and
G

diagonals whose elements are all zero in A. This inexactness can be corrected
by multiplying by an arbitrary parameter whose value can be changed, if necessary
at each iteration.
5.7 Comparison of direct and iterative methods
The choice of a technique for solving the ow equations may be inuenced by a
number of factors including the availability of a particular method, relative dif-
culty of nding optimal iteration parameters and the characteristics of the specic
problem being solved. The most important factors to consider are the model size
and reservoir heterogeneity.
104 CHAPTER 5. FINITE DIFFERENCE METHODS
A general guideline developed from experience which takes into consideration
the cost, ease of use and overall reliability is shown in Figure 5.21
In practice Mattax and Dalton (1990) have shown that direct methods can be
used efciently on models having fewer than about 40 blocks in the smallest plane.
On models having fewer than 15 blocks in the smallest plane, nested dissection is
a better ordering scheme than either standard or alternate-diagonal ordering if the
equations are solved by direct solution method.
If the vertical to horizontal permeability ratio of the rock is low or if the cross
sectional ow is non-radial or in 3D models where block dimensions will gen-
erally cause transmissibility to be highest in the vertical direction, LSOR is an
effective solution technique.
5.7. COMPARISON OF DIRECT AND ITERATIVE METHODS 105
F
i
g
u
r
e
5
.
2
1
:
G
u
i
d
e
l
i
n
e
s
f
o
r
s
e
l
e
c
t
i
n
g
a
s
o
l
u
t
i
o
n
m
e
t
h
o
d
106 CHAPTER 5. FINITE DIFFERENCE METHODS
Chapter 6
Compositional simulation models
A reservoir contains a mixture of hydrocarbon components, forming phases un-
der the actual pressure and temperature. A component can be a single chemi-
cal compound or a pseudo-component, which is a mixture of compounds (e.g.
C
3
C
5
= C
3
, iC
4
, nC
4
, iC
5
, nC
5
) or lumped components (e.g. C
+
9
).
In order to describe the ow of this mixture, balance equations must be writ-
ten; such that the number of the balance equations is always equal to the number
of the components in the actual model. From this point of view there is no dif-
ference between a compositional and a black oil model. Black oil type models
mostly use 3 pseudo-components, water, oil and gas, forming three phases: water,
oil and gas. Some models could however contain a water phase which will consist
of two or three components: water, salt and chemicals (e.g. polymer). This does
not really change the principle. The main difference between a black oil and a
compositional model is not in the number of components, but the description of
the uid behaviour. Black oil models are not suitable for any gas injection opera-
tion, because the properties of the injected gas are always different to the original
dissolved or free gas. The reservoir can originally contain non-hydrocarbon com-
ponents, such as CO2, N2 and H2S. CO2 and N2 will be often injected as an
Enhanced Oil Recovery (EOR) agent.
A two pseudo-component characterization of an oil reservoir would be appli-
cable if there is no gas injection and the oil properties do not exceed the following
limits:
reservoir oil density, > 825kg/m
3
or
o
API < 30
initial oil formation volume factor, Bo
i
< 1.3
initial gas-oil-ratio, < 750sc f /stb
107
108 CHAPTER 6. COMPOSITIONAL SIMULATION MODELS
Further, black oil type models can be used for gas reservoirs if no hydrocarbon
liquid phase will be formed during the depletion process. Compositional models
can be used in the following cases:
Volatile (high shrinkage) oil reservoir
Gas condensate reservoir
Gas injection operations
6.1 Phase behaviour and equations of state
In black oil model, the uid properties are dened by simple functions, given in
tables. In compositional model a cubic equation must be solved and the phase
behaviour and physical properties of the phases calculated for a given interval
of temperature T, pressure P and composition Z. This is called reservoir uid
characterization.
6.1.1 Reservoir uid characterization
Reservoir uid characterization involves the determination of the following:
the equations of state to be used in the reservoir simulation
the number of components to be considered
the physical components that can be lumped to pseudo-components
the heavy fraction (C
+
7
, C
+
9
) that can be split into pseudocomponents
the properties to be assigned to the pseudo-components
Steps involved in reservoir uid characterization includes the following:
determination of the uid composition
performing PVT and displacement measurements
Constant Composition Expansion (CCE)
Differential Liberation Experiment (DLE)
Constant Volume Depletion (CVD)
Separator Test (SEP)
6.1. PHASE BEHAVIOUR AND EQUATIONS OF STATE 109
Saturation Pressure Test (SAT)
Determination of the Minimum Miscibility Pressure (MMP) by slim
tube displacement
Laboratory displacements on cores
Simulation of all those experiments under different assumptions and match-
ing the parameters
the heavy fraction (C
+
7
, C
+
9
) that can be split into pseudocomponents
the properties to be assigned to the pseudo-components
The best solution is the one, which matches the experimental data best. The
number of components necessary are generally 6 8, but with increasing com-
puter power the industry tends to consider more and more components of up to
25.
The input data that must be specied in the uid characterization process, will
be the following:
Molecular weight
Molar mass, which is dened as the mass per mole of a given substance
Specic gravity
The ratio of the density of the mixture and the density of a reference material
(air, water)
Normal boiling point temperature
which implies that the boiling point is measured at normal or atmospheric
pressure.
Acentric factor
which is a measure for the size and the shape of the component
Binary interaction coefcients
which are accounts for the polar forces between pairs of molecules
Dimensionless shift parameter
which is used for improving the volume prediction capabilities of the equa-
tions of state
Parachor
which is a temperature-independent parameter and can be determined from
the structure of the molecules. It is used for the calculation of the surface
tensions
110 CHAPTER 6. COMPOSITIONAL SIMULATION MODELS
Critical properties
comprise of the pressure, temperature and volume of the components at
critical state. For pure components, such as Methane or Nitrogen, these pa-
rameters are considered xed. Thus, the remaining component parameters
must be altered so that the resulting calculated phase behaviour matches the
experimental data
6.1.2 Equations of State (EOS)
The following equations of state are widely used in reservoir engineering due to
their general acceptance in the oil industry:
Redlich-Kwong (RK)
Soave-Redlich-Kwong (SRK)
Zudkevitch-Joffe-Redlich-Kwong (ZJRK)
Peng-Robinson (PR)
For a chemically homogeneous phase: V =V(P, T); where V is the volume of
one mole (intensive property). For a two-phase system:
n = n
liq
+n
vap
nV
t
= n
liq
V
liq
+n
vap
V
vap
(6.1)
V
t
: mole volume of the system
V
liq
: mole volume of the liquid phase
V
vap
: mole volume of the vapor phase
n: number of moles in the system
n
liq
: number of moles in the liquid phase
n
vap
: number of moles in the vapor phase
If phase equilibrium is given, the phases can be regarded as separate thermo-
dynamic systems. If a phase - may be the liquid - phase consists of k components,
the corresponding equation of state may be written as follows:
6.1. PHASE BEHAVIOUR AND EQUATIONS OF STATE 111
F(P,V, T, x
1
, x
2
, x
3
, ..., x
p
) = 0, or
V = V(P,V, T, x
1
, x
2
, x
3
, ..., x
k
)
(6.2)
where
k

i=1
x
i
= 1 (6.3)
In most cases of even practical interests, a multi-component phase behaves as
an ideal mixture and the volumes are strictly additive. If V
i
is dened as the mole
volume of component i in the phase, the mole volume of the phase will result in
k

i=1
x
i
V
i
.
This implies that the enthalpy of the system must be generally considered ad-
ditive and is equal to the sum of the enthalpies of individual components. In this
case, no thermal effect will take place during the mixing procedure and the mixing
energy will therefore be zero.
The general equation of state for a homogeneous uid of constant composition
can be written in a Taylor-Series expansion as:
V(P, T) =V(P
o
, T
o
) +(
V
P
)
T
(PP
o
) +
1
2
(

2
V
P
2
)
T
(PP
o
)
2
+(
V
T
)
P
(T T
o
) +
1
2
(

2
V
T
2
)
T
(T T
o
)
2
+......
(6.4)
Neglecting higher order derivatives and re-writing V
o
=V(P
o
, T
o
) we have:
V(P, T) =V
o
[1+
1
V
o
(
V
P
)
T
(PP
o
) +
1
V
o
(
V
T
)
P
(T T
o
)] (6.5)
which can also be written as:
V(P, T) =V
o
[1(PP
o
) +(T T
o
)] (6.6)
where is isothermal compressibility and is cubic expansion coefcient. This
equation can be best applied for uids in a single-phase state. Experience and
practice have shown that the cubic equations of state are most sufcient and ben-
ecial for calculating the state of gases and of two-phase systems.
112 CHAPTER 6. COMPOSITIONAL SIMULATION MODELS
6.1.3 Equation of state for perfect and real gases
A gas is considered perfect, if the intermolecular forces are negligible. For real
gas, the compressibility factor Z describes the deviation from perfect behaviour
and depends on the P, T and composition. Thus:
PV = ZnRT, (6.7)
where the universal gas constant R = 8.31434J/moleK. For ideal gases, the
factor Z equals 1.
6.1.4 Cubic equation of state
The ideal gas equation is sufcient in describing the volumetric behaviour pro-
vided the pressure of a gaseous system is low. The rst equation of state to de-
scribe the continuity from gaseous to liquid state was proposed by van der Waals
(1873).
(P+
a
V
2
)(V b) = RT, (6.8)
where a and b are substance specic constants. b can be described as the inher-
ent volume of the molecules which is not available for the thermal motion of the
molecules. The term
a
V
2
regards the pressure reduction in consequence of inter-
molecular attraction.
Figure 6.1 illustrates the van der Waals isotherms in the vicinity of the critical
point. The dotted section of the isotherms represents the data which are predicted
by using the van der Waals equation. Obviously, the van der Waals equation
cannot predict the real behaviour of the system during the vaporization and con-
densation respectively. The real behaviour is shown by the straight full line BD
inside the 2-phase region.
Going by the aforementioned limitation in the use of the van der Waals equa-
tion, other cubic equations of state have been formulated to achieve better results.
These include: Redlich and Kwong (1949), Soave (1972), and Peng and Robinson
(1976).
P =
RT
V b

a
V(V +b)
(6.9)
where a is a function of temperature a = a

f (T) and a

, b are substance specic


constants. f (T) = T
0.5
. Multiplying by V(V +b)(V b)/P and simplifying:
V
3

RT
P
+(
a
P

bRT
P
b
2
)V
ab
P
= 0. (6.10)
6.1. PHASE BEHAVIOUR AND EQUATIONS OF STATE 113
Figure 6.1: The Van Der Waals isotherms near the critical point
114 CHAPTER 6. COMPOSITIONAL SIMULATION MODELS
This is the general cubic equation of state (EoS). At the critical point V =V
c
(V V
c
)
3
=V
3
3V
c
V
2
+3V
2
c
V V
3
c
= 0. (6.11)
Comparing the last two equations and solving for b and a
c
we have
b =
(2
1/3
1)RT
c
3P
c
=
b
RT
c
P
c
and
a
c
=
(RT
c
)
2
9(2
1/3
1)P
c
=
a
(RT
c
)
2
P
c
(6.12)
where
b
= 0.08664 and
a
= 0.42748
6.1.4.1 Redlich-Kwong
Substituting V = ZRT/P into the general cubic equation of state and making Z
the subject we have
(
ZRT
P
)
3

RT
P
(
ZRT
P
)
2
+(
a
P

bRT
P
b
2
)(
ZRT
P
)
ab
P
= 0 (6.13)
Which gives:
Z
3
Z
2
+[(
aP
(RT)
2

bP
RT

b
2
P
2
(RT)
2
)]Z
aP
(RT)
2
bP
RT
= 0 (6.14)
or
Z
3
Z
2
+(ABB
2
)Z AB = 0 (6.15)
where
A =
aP
(RT)
2
= 4.2748(
P
r
T
2
r
) (6.16)
and
B =
bP
RT
= 0.8664
P
r
T
r
(6.17)
In the original Redlich-Kwong equation, f (T) = T
0.5
and so
= T
0.5
r
(6.18)
6.1. PHASE BEHAVIOUR AND EQUATIONS OF STATE 115
The ideal gas equation contains no substance-specic parameters. Since
the Redlich-Kwong cubic equations of state consider these two substance-
specic parameters, it has improved the calculation of PVT-properties in a
fundamental way.
However, several practical experimental data have indicated that the be-
haviour of many liquids with a non-spherical molecule structure deviates
greatly from the predicted one. This has necessitated the introduction of a
third factor.
6.1.4.2 Soave
Meissner and Seferian (1951), and several other researchers have proposed a third
parameter known as acentric factor:
=(lgP
s
r
+1) (6.19)
at T
r
= 0.7, where P
s
r
= P
s
/P
c
is the reduced boiling point pressure. The equation
of state from Soave (1972) only differs from the Redlich-Kwong equation in the
denition of the factor:

0.5
= 1+(0.48+1.57 0.176
2
)(1T
0.5
r
) (6.20)
The weakness of the original Redlich-Kwong equation and all its modication
(e.g. Soave ) is the fact of universal unrealistic Z
c
factor of 1/3. Moreover, the
prediction of liquid density is combined with large errors.
6.1.4.3 Peng-Robinson
Improved approximation to the equation of state has been achieved with the Peng-
Robinson equation
P =
RT
V b

a
V(V +b) +b(V b)
, (6.21)
where a and b are as dened earlier. The following terms and equations can be
obtained just as in the case of Redlich-Kwong:
V
3
(
RT
P
b)V
2
+(
a
b

2bRT
P
3b
2
)V (b
a
P

RT
P
bb
2
) = 0, (6.22)
where:
116 CHAPTER 6. COMPOSITIONAL SIMULATION MODELS
V
c
= 0.307
RT
c
P
c
;
b = 0.7796
RT
c
P
c
;
a = a
c
;
a
c
= 0.457235
(RT
c
)
2
P
c
(6.23)
Z
3
(1B)Z
2
+(A2B3B
2
)Z ABB
2
B
3
= 0, (6.24)
where:
A = 0.457325(
P
r
T
2
r
);
B = 0.07796
P
r
T
r
;

0.5
= 1+(0.3676+1.54226 0.26992
4
)(1T
1/2
r
)
(6.25)
The universal critical Z f actor of the Peng-Robinson equation results in
0.307 which is much better than 1/3 but still far away from reality. However, the
calculated uid densities are much more accurate than those calculated from the
equations of state previously discussed.
6.1.4.4 Multicomponents and mixing rules
All the aforementioned equations of states (EoS) (Van Der Waals, Redlich-Kwong
and Peng-Robinson) have been established for pure substances. The extension for
multi-component systems requires the calculation of the respective data of the
pure components and mixing rules in order to get the parameters of the mixture.
The mixing rule for the parameter b, which is included in the equations of
Redlich-Kwong, Soave and Peng-Robinson is universally dened as an arithmetic
average by using:
b =
k

i=1
x
i
b
i
(6.26)
6.1. PHASE BEHAVIOUR AND EQUATIONS OF STATE 117
For the temperature-dependent coefcient a , different mixing rules exist:
Redlich-Kwong:
a =
_
k

i=1
x
i
a
0.5
i
_
2
(6.27)
Soave:
a =
k

i=1
k

j=1
x
i
x
j
(a
i
a
j
)
0.5
(1k
i j
) (6.28)
Peng-Robinson:
a =
k

i=1
k

j=1
x
i
x
j
(a
i
a
j
)
0.5
(1k
i j
) (6.29)
The mixing rules used by Soave and Peng-Robinson consider the binary inter-
action between the molecules of the components i and j. In the above equations
the terms k
i j
are binary interaction coefcients which are assumed to be indepen-
dent of pressure and temperature.
Values of the binary interaction coefcients must be obtained by tting the
equation of state to gas-liquid equilibria data for each binary mixture. They have
different values for each binary pair and also take on different values for each
EoS. Obviously, if all binary interaction coefcients are zero, Soave and Peng-
Robinson simplies to Redlich-Kwong.
Another possibility of obtaining this coefcient - if no data are available - is
by mean of matching the phase behavior of multi-component systems.
6.1.4.5 Virial
All cubic equation of state mentioned above are more or less empirical or at best
semi-theoretical. However, they are obviously qualied for practical application.
In contrast, the virial equation of state has some theoretical background in statis-
tical mechanics. However, the form of an innite series concerning the volume is
not very appropriate for practical application. The pressure is expressed as:
P = RT(
1
V
+
B
V
2
+
C
V
3
+...) (6.30)
118 CHAPTER 6. COMPOSITIONAL SIMULATION MODELS
The virial coefcients B, C etc. are solely a function of temperature. Substi-
tuting for V = ZRT/p :
Z = 1+
BP
ZRT
+
CP
2
(ZRT)
2
+... (6.31)
The coefcient B can be shown to be the slope of isotherms on a plot of Z =
Z(P) at P = 0 . When P approaches zero, the third term in the above equation
may be neglected so that the pressure can be expressed as:
B = ZRT lim
P0
(
Z 1
P
) (6.32)
Since also Z becomes zero as P goes to zero, de lHospitals rule can be applied
resulting at constant T in
B = RT lim
P0
(
Z
P
)
T
Z = 1+
BP
ZRT
+
CP
2
(ZRT)
2
+...
(6.33)
This implies that the Virial coefcient vanishes at the Boyle-temperature. The
Boyle-temperature is dened as the temperature above which Z values become
greater than 1 for all pressures.
6.2 Dening reservoir composition
In a black oil model, the vertical distribution of following properties can be de-
ned: Oil gravity, (API); Bubble point pressure (P
b
); Solution gas (GOR); Tem-
perature (T); Salinity The vertical distributions will be always dened by the user,
which means they are input values for dened depths. Between two reference
points in the model, the values will be linearly interpolated. In doing so, all phase
densities must not decrease with depth; the bubble point pressure must be every-
where less than or equal to the initial pressure and the pressure at the oil-gas
contact (GOC) must be equal to the bubble point pressure.
6.2.1 Compositional initialisation in a single-phase reservoir
If the reservoir initially contains single hydrocarbon phase only (such as conden-
sates above the dew-point or oils above the bubble point), then no gas-oil phase
6.2. DEFINING RESERVOIR COMPOSITION 119
contact exists and it is enough to dene the initial composition, the pressure at
a reference depth, and the geothermal gradient. If the vertical extension of the
reservoir is limited and the temperature difference between the pools is not more
than 3
o
C, then it is satisfactory to assume uniform reservoir temperature. The
gas-oil contact may be set above or below the reservoir if the single phase hydro-
carbon is oil or gas. For a condensate eld the oil-gas contact depth is set to the
oil-water contact depth. If the composition distribution is explicitly given, which
is appropriate in most of the cases, then a simple interpolation follows.
6.2.2 Compositional initialisation in a reservoir with GOC
If the reservoir consists of a gas-oil contact (GOC) and the vapour-liquid compo-
sition is known: the initial vapour (or liquid) composition has to be dened and
a retrograde dew-point (or bubble point) pressure calculation is performed and
the pressure at the GOC set to this saturation pressure. If this pressure does not
t to the measured pressure, then the uid characterization (EOS) must be revised.
The composition of the liquid (or vapor) in equilibrium with the saturated
vapor (or liquid) is used below (or above) the GOC respectively. The liquid com-
position will be normally be dened by the vertical distribution. If this is not given
then a homogeneous liquid composition will be assumed. As pressure increases
with depth, the liquid becomes undersaturated. It is also more practical to assume
a uniform gas composition above GOC, the one which was determined for the
GOC, and to ash it for a lower pressure above the GOC. If liquid drop out will
be manifested, then the gas composition from the ash calculation should be used
as initial hydrocarbon composition.
Equilibration methods as described above are the normal method of initializ-
ing a study. The aim is to set up a static initial conguration: one in which phases
present are in equilibrium and in which the interblock ows are zero. In some
cases however, it may be necessary to start a study from a point in existing pro-
duction. As ow patterns have developed, this cannot be done by equilibration
and the initial pressure, saturations and compositions must be dened.
6.2.3 Original uid in place
The original oil and gas in place (OOIP and OGIP) originate from the classical
black oil uid description. In a compositional model the following denition of
the separator conditions must be specied:
number of separator stages and
120 CHAPTER 6. COMPOSITIONAL SIMULATION MODELS
the temperature and pressure of every stage
The calculation is a multi-level ash calculation, using the same cubic equa-
tion of states as for the reservoir. It is therefore important that separator tests are
available for the uid characterization.
6.2.4 Black oil and compositional models
A black oil uid description is always adequate if only one hydrocarbon phase
exists. However, it is often the case that the pressure drops below the dew-point
in a gas reservoir or below the bubble-point in an oil reservoir after a long period
of production. In this case, it is computationally economical to run the rst period
of the simulation using the black-oil model and then convert to a compositional
model when the pressure-volume and temperature dictate the use of it.
The fully compositional simulation run would also yield the required results,
however, it would lead to an increased CPU time needed for the calculation of
the cubic equations of state. Therefore, in the so-called Mixed Model, the basic
formulation of the black-oil model will be sustained wherever and whenever it is
sufcient to approximate the uid behaviour by the black-oil description. Only in
certain areas or time periods of interest, would the compositional model formu-
lation be coupled to the basic black-oil formulation. This will save considerable
CPU time and storage requirements. This is easy to achieve because the compo-
sition of the uid does not change during the one-phase depletion.
In order to convert a black-oil region into compositional, the following black-
oil uid description are required:
black-oil functions: gas-oil ratio, (Rs); oil formation volume factor, (Bo);
that described the volumetric behaviour of the uid until the time of conver-
sion
appropriate molecular weights for the pseudo-components oil and gas, nec-
essary to minimize the errors of conversion
The molecular weight does not affect the results when a black-oil formulation
is used throughout the entire simulation model, since its effect is only to change
the internal number of moles. In a mixed model, this is not the case. Therefore
the actual value of the molecular weight for the pseudo components oil and gas in
the black-oil model must be realistic. These values can be dened in the black-oil
PVT table.
Bibliography
L. T. Akanji and S. K. Matthai. Finite element-based characterization of pore-
scale geometry and its impact on uid ow. Transport in Porous Media, 81(2):
241259, 2010.
K. Aziz and A. Settari. Petroleum reservoir simulation Computational Mathemat-
ics. Springer Verlag, New York., 1979.
F. Brezzi, K. Lipnikov, and V. Simoncini. A family of mimetic nite difference
methods on polygonal and polyhedral meshes. Math. Mod. Meth. Appl. S., 15
(10):15331551, 2005.
B. C. Craft and M. F. Hawkins. Applied Petroleum Reservoir Engineering.
Prentice-Hall Inc. Englewood Cliffs, NJ, 1959.
Henry B. Crichlow. Modern Reservoir Engineering - A Simulation Approach.
Prentice Hall Englewood Cliffs, New Jersey, 1976.
J. Douglas and Jr. A. H. Rachford. On the numerical solution of heat conduction
problems in two or three space variables. Trans. AMer. Math. Soc., 82:421439,
1956.
J. H. Henderson, J. R. Dempsey, and J. C. Tyler. Use of numerical models to
develop and operate gas storage reservoirs. JPT, pages 12391246, 1968.
G. J. Hirasaki. Sensitivity coefcient for history matching oil displacement pro-
cesses. SPEJ, pages 3949, 1975.
P.K. Link. Basic Petroleum Geology. OGCI Publications, Tulsa Oklahoma USA,
1983.
J. L. Lutes. Accelerated blowdown of a strong water-drivve gas reservoir. Journal
of Petroleum Technology, (JPT), pages 15331539, 1977.
C. C. Mattax and R. L. Dalton. Reservoir Simulation. SPE Inc., 1990.
121
122 BIBLIOGRAPHY
R. C. McCulloch, J. R. Langton, and A. Spivak. Reservoir simulation of high relief
reservoirs, raiboweld, alberta, canada. In SPE Annual Meeting, Houston, page
2237, 1968.
H. P. Meissner and R. Seferian. P-v-t relation of gases. Chem. Eng. Prog., page
579, 1951.
S.J. Owen. A survey of unstructured mesh generation technology. In Proceedings,
7th International Meshing Roundtable, Dearborn, MI, USA., page 239267,
1998.
D. W. Peaceman. Interpretation of well-block pressures in numerical reservoir
simulation with non-square grid blocks and anisotrpoic permeability. SPE,
Trans. AIME, 275:1022, 1983.
D. W. Peaceman and H. H. Rachford. The numerical solution of parabolic and
elliptical differential equations. SIAM J. Numerical Analysis, 3:2841, 1955.
D.Y. Peng and D.B. Robinson. New two-constant equation of state. Ind. Eng.
Chem. Fund., pages 5964, 1976.
H. S. Price and K. H. Coats. Direct methods in reservoir simulation. SPEJ, 257:
295308, 1974.
O. Redlich and J. N. S. Kwong. On the thermodynamics of solutions. v. an equa-
tion of state. fugacities of gaseous solutions. Chemical Reviews, 44(1):233,
1949.
J. W. Sheldon, C. D. Harris, and D. Bavly. A method for general reservoir be-
haviour simulation on digital computers. SPE, Denver, 1521, 1960.
G. Soave. Equilibrium constants from a modied redlich-kwong equation of state.
Chem. Eng. Sci., pages 11971203, 1972.
H. L. Stone. Iterative solution of implicit approximations of multidimensional
partial differential equations. SIAM J. Numerical Analysis, 5:530558, 1968.
H. L. Stone and A. O. Garder Jr. Analysis of gas-cap or dissolved gas drive
reservoirs. Trans. AIME, 222:92, 1961.
G. W. Thomas. Principles of Hydrocarbon Reservoir Simulation. IHRDC, 1981.
J. D. van der Waals. ver de Continuiteit van den Gas- en Vloeistoftoestand (on the
continuity of the gas and liquid state). PhD thesis, Leiden, The Netherlands,
1873.

You might also like