Documente Academic
Documente Profesional
Documente Cultură
Week 7/8
Rosalind Archer
1.2
1.3
1.4
Vocabulary
Petroleum engineering has a very
particular vocabulary and some peculiar
units.
In all problem we study I will try to
convert all the units to SI. In many
parts of the world however petroleum
engineers do not use SI.
1.5
What is a Reservoir?
An oil/gas reservoir is a permeable rock
formation that contains oil/gas. There
must be some kind of sealing
mechanism to prevent the oil from
escaping e.g. a impermeable rock
formation above.
Reservoirs may be as far as 5km below
the surface of the earth (under land or
under the sea.)
1.6
What is a Reservoir?
Oil
Water
Zone
Water
1.7
Reservoir Fluids
Gas may or may not co-exist with oil in
a reservoir. If present it will tend to exist
above the oil.
Water may be present below the oil.
As the reservoir pressure is reduced (by
production of oil) gas and water may
move into the oil zone.
1.8
Reservoir Fluids
One of the things that makes CFD for
petroleum reservoirs interesting/difficult
is that the properties (density, viscosity)
of the fluids can depend strongly on
both pressure and temperature.
As pressure is lowered gas may evolve
from the oil. This is the same process
that occurs when you take the cap of a
carbonated drink.
1.9
Rock Properties
There are three key rock properties we
will be interested in permeability,
porosity and compressibility.
Permeability (k) measures the ability of
fluid to flow through the rock. SI unit m 2,
field unit md.
Porosity () measures the fraction of the
total rock volume that is void space.
Dimensionless.
Compressibility (cf) measures the change
in the volume of the rock per unit change in
pressure. SI unit Pa-1, field unit psi-1.
1.10
Fluid Properties
The fluid properties we are interested in
are density, viscosity, compressibility,
solution gas-oil ratio and formation
volume factor.
Density ( is the mass of fluid per unit
volume. The SI unit is kg/m3 and the field
unit is lb/ft3.
Viscosity () is measured in Pa-s (SI) and
centipoise (abbreviated cp) in field units.
1.11
Fluid Properties
Compressibility (c) measures the change in
the volume of the fluid per unit change in
pressure. SI unit Pa-1, field unit psi-1.
Imagine you have a unit volume of oil (at
reservoir pressure) when this volume of oil
is bought to the surface it will liberate some
gas. The solution gas-oil ratio (Rs) is the
ratio of the gas volume (at surface) to the
oil volume (at surface).
Formation volume factor (B) is the ratio of
a unit volume of oil at surface conditions to
its volume at reservoir conditions.
1.12
Saturation
We keep track of what fraction of the
pore space is filled with oil, water or gas
in terms of phase saturation (volume oil,
water, or gas divided by total volume).
The symbols for these are:
So, Sw, Sg.
1.13
Rock-Fluid Properties
Relative permeability and capillary
pressure are quantities which govern
the interaction of the reservoir rock and
fluids.
Relative permeability (kr) measures the
reduction in permeability in a pore
space due the effects of multiphase
flow, i.e. a mixture of oil and water
needs a greater pressure drop for the
same flow-rate than pure oil or water
does.
1.14
Relative Permeability
Absolute permeability (k) is the
permeability of a porous medium to a
single phase.
If multiphase flow occurs the absolute
permeability must be modified into an
effective permeability (k*kr).
The relative permeability (kr) handles
multiphase flow effects.
Relative Permeability
1.15
krw
kro
1.16
Capillary Pressure
Difference in pressure across the
interface between two fluids
Function of saturation
pc p o p w
Capillary Pressure
1.17
40
30
Pc, psi20
Drainage
10
0
0.2
Imbibition
0.4
0.6
Sw
0.8
1.0
1.18
Standard Conditions
Oil is typically measured in barrels,
1 barrel = 5.615 ft3 = 0.1589 m3.
Volume however is not conserved
only mass is conserved. A volume
balance is appropriate if all volumes are
converted to standard conditions
(atmospheric pressure and
Vreservoir
temperature).
Vstandard
Bo
1.19
CFD Approach
Modelling of fluid flow in oil reservoirs in
based on one simple principle:
conservation of mass.
In some problems conservation of
energy is also considered but we will
treat all our examples as isothermal.
1.20
Domain
The problem
domain may be
highly irregular
and the rock
properties may
be very
heterogeneous.
This figures
shows porosity
values in a
200,000 cell grid
SPE 71596
1.21
Continuity Equation
The general equation for flow in a porous
medium is
u
t
where
is porosity , is density , u is velocity,
and t is time.
Derivation
1.22
u n
dS
1.23
Derivation
When u is not normal (perpendicular) to
the surface, we take the normal
component u.n so that:
rate of mass flow out of dS = ( u n)dS
To get the total mass flow rate out of the
element, we integrate over the entire
surface.
total mass flow rate out = ( u n)dS
1.24
Derivation
Now, take a small volume, dV, from
anywhere in the element:
( )
dV
t
( )
dV
t
V
1.25
( u n )dS u dV
S
( )
u dV
dV
t
V
V
1.26
This implies:
()
(u )
t
1.27
Alternative Viewpoint
This is not the only way to derive the
continuity equation. It can also be
derived by summing mass inflows and
outflows and setting this equal to the
mass accumulation in a volume.
The derivative appears in the limit as the
volume being considered shrinks to zero.
1.28
Alternate Derivation
Consider a block shaped volume of the
porous media with side lengths x, y
and z.
y
x
x+x
1.29
1.30
Inflow rate
volume of fluid entering the block
= velocity*area
(u ) |x (yz)
mass of fluid entering the block
(u ) |x (yz)
units = mass/time
1.31
Outflow rate
volume of fluid leaving the block
= velocity*area
(u ) |( x x ) (yz)
mass of fluid entering the block
(u ) |( x x ) (yz)
units = mass/time
1.32
(xyz)
(xyz)
t t () t
(xyz)
t
units = mass/time
1.33
Conservation of Mass
Conservation of mass requires the net
inflow rate i.e. (inflow - outflow), must
equal the accumulation rate.
(u ) x (u ) x x (yz)
() t t () t
(xyz)
t
1.34
(u ) x (u ) x x () t t () t
x
t
Letting x and t go to zero gives:
(u )
()
x
t
i.e. continuity equation for 1D flow.
1.35
Summary
This equation is very general. It can be
applied to any fluid flow situation. We
will customize the continuity equation to
represent oil and gas flows by
considering the representation of
density and velocity in more detail.
1.36
Diffusivity Equations
Basic equations of fluid flow in a porous
medium combine:
Continuity Equation u
t
k
Darcy' s Law
u p
Equation of State
f p, T
Compressibility
1.37
1 V
c
V p
1
cf
p
1 B
B p
m ,T
Derivation
1.38
k
p
t
Assume constant k,
p
k t
1.39
()
p () (p)
k t
( )
p ( ) (p)
k t
2
1.40
c (p ) (p )
We now have:
1 ( )
p
k t
2
1.41
Our goal now is to write the righthand side in terms of pressure not
density. First expand it:
1
p
k t
t
2
k dp t
dp t
2
1.42
p
p
(c c f )
k
t
2
ct p
p
k t
2
1.43
Linearity
If ct does not depend on p the
k
equation is linear.
ct
k does depend on p the
If
equation is nonlinear.
1.44
Coordinate Systems
Cartesian
2 p 2 p ct p
2
2
x
y
k t
Radial
2 p 1 p ct p
2
r
r r
k t
These equations are for 2D problems. To go to 3D
2
add p .
z 2
1.45
2
x
t
2
c t
where
0.00633k
Xi-1
xi
Xi+1
t t1 , t 2 , t 3 , ...
Xi+2
1.46
p i 1 2p i p i 1
p p
2
t
x
n
i
1.47
x i-1
xi
x i+1
n+1
1.48
n 1
i 1
n 1
i
2
2p p
x
n 1
i 1
n 1
i
p
t
n
i
1.49
Alternative Approach
We derived the finite difference form of
the diffusivity equation using by writing
expressions for the derivatives involved
in terms of finite differences.
The same equation can also be derived
by posing the problem as a volume
balance on a grid block.
1.50
Outflow
Inflow
Accumulation
Conservation of Mass
Rate of Inflow - Rate of Outflow = Rate of Accumulation
1.51
xi-1
xi
xi+1
k
dp
0.00633
(yz)
B
dx i 1
i-1/2 denotes
the boundary
between i-1 and i
n 1
n 1
pi 1 pi
k
0.00633
(yz)
B
x
1.52
n 1
i
p p
k
0.00633
(yz)
B
x
n 1
i 1
i+1/2 denotes
the boundary
between i+1 and i
Unit standard ft3/day
1.53
1 V
V p
1.54
V V p
t
p t
From the definition of compressibility we
V
have:
cV
p
V
p
cV
t
t
1.55
c t (xyz) dp
V
t
B
dt
Finally substituting a numerical
approximation for dp/dt gives us an
accumulation rate of:
n 1
i
c t (xyz) p p
V
t
B
t
n
i
1.56
Conservation of Mass
Conservation of mass (just as in the
derivation of the continuity equation)
requires
rate of inflow - rate of outflow + rate of
accumulation = 0
If the terms did not sum to zero mass
would be being created or destroyed in
the grid block.
1.57
Conservation of Mass
Combining the inflow, outflow and
accumulation terms gives:
n 1
n 1
n 1
n 1
pi 1 pi
pi pi 1
k
0.00633
(yz)
B
x
x
n 1
n
c t (xyz) pi pi
B
t
Conservation of Mass
1.58
k pi 1 2pi pi 1
0.00633
2
B
(x )
n 1
n
c t pi pi
B to the form
t derived
This is identical
using finite differences.
1.59
Wells
1.60
k pi 1 2 pi pi 1
0.00633
2
B
(x)
ct
p
qi
t
n 1
i
n
i
1.61
Wells
If the well flow-rate is not known then it
must be determined in terms on the well
pressure ... more detail than we require
right now!
1.62
(1D case)
Boundary conditions
Constant pressure at boundaries:
mass balance equation replaced by a
constraint equation.
p1 C1
pIMAX C2
1.63
No flow
boundary
xi
xi+1
1.64
pi 1 pi
pi pi 1
k
0.00633 (yz )
x
x
pin 1 pin
ct (xyz )
Delete
inflow term
1.65
k p p
0.00633
2
( x )
n 1
i 1
ct
n 1
i
n
i
n 1
i
Implicit Solution
1.66
System of equations
Left boundary (i = 1)
n 1
1
C1
(or no flow)
pi
2
2
2
t
x x t
x
(or no flow)
ct
0.00633k
Implicit Solution
1.67
Matrix Equation
b1
a
2
c1
b2
a3
c2
b3
.
c3
.
.
.
ai
.
bi
.
ci
.
.
.
.
aN
pin11
n 1
pi
di
p n 1
i 1
bN
1.68
Matrix Structure
System is tridiagonal
Size is (IMAX x IMAX)
Solved by the Thomas Algorithm
1.69
Implicit Solution
Advantage
Unconditionally stable
Disadvantage
Matrix solution
Explicit Solution
1.70
2p p
x
n
i
2
n
i 1
n 1
i
c
where
0.00633k
p
t
n
i
1.71
t
n
t
t
x i-1
xi
x i+1
1.72
1.73
Explicit Solution
Explicit equations
Left boundary (i = 1)
p1 C1
(or no flow)
pin1 2
n pin1
n 1
pi
pi
2
2
2
x x t
x t
(or no flow)
1.74
Disadvantage
Stability limited
We can explore this stability limit using
a spreadsheet example.
1.75
Explicit.xls
Try entering different dx and dt
values on the spreadsheet.
Each time you make an entry the
solution for u will update.
For some dx and dt values the
solution will go to the steady-state
solution we expect. For others it
wont.
What relationship is required
between dx and dt to maintain
stability?
Stability Limit
1.76
Explicit.xls solves the problem:
p p
2
x
t
2
t
x 2
1
2
Stability Limit
1.77
For the problem:
p 1 p
p 2
x
t
x 2
1
2