You are on page 1of 31

5

The Flow Equations

CONTENTS
1

INTRODUCTION

THE SINGLE PHASE PRESSURE EQUATION


2.1
The Physics of Single Phase Compressible
Systems
2.2. The Single Phase Pressure Equation
2.3
The Simplified Compressible Pressure
Equation
2.4
Extension of the Single Phase Pressure
Equation to 2D and 3D
2.5
Mathematical Shorthand for the 3D SinglePhase Pressure Equation

THE TWO-PHASE FLOW EQUATIONS


3.1
Review of Two-Phase Flow Concepts
3.2
Derivation of the Two-Phase Conservation
Equations
3.3
The Two-Phase Pressure Equation
3.4
Schematic Strategy for Solving the TwoPhase Pressure and Saturation Equation
3.5
The Simplified Pressure and Saturation
Equations

CLOSING REMARKS

The Flow Equations

BRIEF DESCRIPTION OF CHAPTER 5


The central activity of reservoir simulation is the numerical solution of the multiphase flow equations in real reservoir systems. This module introduces the underlying
equations of flow through porous media which are solved in a reservoir simulation
code. We start with the single phase flow equation for a compressible fluid and go on
to develop the two-phase flow equations. The same principle is used in the derivation
of these equations viz. the application of mass (material) balance between flow and
accumulation and then the application of Darcys Law.
We show that the flow equations are non-linear partial differential equations
(PDEs) which can usually not be solved analytically. However, some simplified
cases of the equations are considered in order to establish some important physical
insights into these equations.

1. INTRODUCTION
In the course so far, we have used many of the concepts of day to day numerical
simulation as it is applied in reservoir engineering. However, we have not yet
studied the mathematical equations which underpin the whole subject of reservoir
simulation. This section will introduce you to these equations in a step-by step manner.
You should be able to follow all the details of the derivations of these equations since
only elementary undergraduate mathematics is involved.
The general approach to the flow equations is basically the same for both single and
two-phase flow. We first derive a mass balance between the flows and the accumulation
(local mass build up or decline) in a local control volume. A control volume can be
thought of as a typical isolated grid block in the system, as will be evident below.
We note that the mass balance equation that we will set up must be correct. That is,
it is simply a mathematical way of expressing something that is a fact. Mass balance
simply states that over a given time period (say, t), then the sum of all the mass that
flows into (+) the system and out of it (-) is the change of mass in that block. Once
we have set up the mass balance between the flows and the accumulations, we then
need some expressions to describe these mass flows. We do not usually think of fluid
flow laws as being mass flow laws. Within a porous medium, the principal flow law
is Darcys law (either for one or two phases) which is a volumetric flow law. That
is, in Darcys law, the volumetric flow rate, usually denoted Q, is proportional to the

Q~

dP

pressure gradient;
dx for a single one dimensional system oriented along the
x- direction. (Note the minus sign here since fluids flow down the pressure gradient,
from high P to low P). So, to derive the flow equations we simply use mass balance
+ Darcys law. This is shown schematically for single phase fluid flow in Figure 1.

Institute of Petroleum Engineering, Heriot-Watt University

Mass in block (i,j) = ..x.y.z

i,j+l

Change in mass over t

m = (.Q) m .t
m =1

Qj+l/2
Qi-l/2

i,j

where m counts over the 4 neighbours.


And Darcy's law is:

Qi+l/2

i-1,j

i+1,j
Qj-l/2
i,j-l

Qi 1/ 2

kA
( Pi , j Pi 1, j ) in x direction
=
.
i1/ 2
x

Therefore:

t (xyz) = (.Q)m .t
m=1

where we then substitute Darcy's law

In Section 2, we start by deriving the single-phase flow equation for a compressible


system. This is essentially a pressure equation since this is the only quantity
we need to find.
The pressure distribution in space is the main unknown in the system and we need to
find this as a function of time as the system evolves; pressure is denoted, P(x,y,z;t),
for a three-dimensional (3D) system. If we have a way of finding P(x,y,z;t),
we can then find the flow rates from the gradient of this quantity i.e. we use
Darcys law. This sort of completes the circle since we use Darcys law to
derive the pressure equation and, once we solve for the pressure, we find the
flows from Darcys law etc.
Although we can obtain the single-phase pressure equation for a compressible fluid/
rock system in 1D, it turns out to be a non-linear partial differential equation (PDE).
There is no known analytical solution to this equation for the general case. That is,
even the apparently simple single phase pressure equation cannot be solved using
well known mathematical functions. You may remember that we discussed the
idea of an analytical model in the opening section of this course (Chapter 1 Section
1). If we are faced with this difficult non-linear PDE for the pressure there are two
things we might do to solve it as follows: (i) we could possibly use a numerical
method to solve it; or (ii) we may be able to simplify the equation by making various
assumptions that then allow us to solve the equation analytically. In fact, we will take
the latter course of action at this point. (We return to the topic of numerical solution
of the flow equation in Chapter 6). Section 2 describes how we simplify the full
equation for a compressible fluid in order to obtain an equation that we can solve.
Indeed, the simplified equation that arises is none other than the main equation used
in single phase well testing.
In Section 3, we go on to derive the equations of two-phase flow in their complete
form i.e. for a compressible fluid/rock system. Clearly, if the single-phase pressure
equation is not analytically soluble in general, then the two-phase equivalent
will certainly not be soluble since it is even more complicated (again, except
for some special simple cases).

Figure 1
The basic principles of
Mass Balance + Darcys
Law as the basis for all
equations for flow through
porous media; the Qs are
volumetric fluid flows.

The Flow Equations

In the two-phase equations, we also have a pressure equation but, in addition, there
is also a saturation equation. Other features are also different from single phase flow,
such as the capillary pressure, Pc (Sw), leading to two different phase pressures,
Po and Pw (where Pc (Sw) = Po-Pw). The two-phase Darcy law also introduces the
concept of relative permeability into the flow equations. These concepts have been
fully reviewed in Section 2 and they are also explained in the Glossary.

2. THE SINGLE PHASE PRESSURE EQUATION


2.1 The Physics of Single Phase Compressible Systems

Before deriving the single phase pressure equation, consider first the physics of
what is happening in a compressible single-phase system. Figure 2 shows a long thin
reservoir containing compressible fluid and rock, which we can consider as being
essentially one-dimensional (1D). The fluid and the rock have compressibilities, cf
and cr (where cf >> cr; see Glossary). Imagine the reservoir is horizontal and has
two wells in it at either end as shown in Figure 2a. We take the location of Well 1
as being at x = 0, and Well 2 is located at x = d. If the wells are both shut-in and the
reservoir is left to achieve steady-state, then clearly the pressure in the system will
reach a constant value, Po (ignoring the gravitational potential since the reservoir is
also thin in the z-direction). The bottom hole pressure also equalises in both wells
and will also be Po. This is shown as the dashed line (at t = 0) in Figure 2b where the
pressure profile through the reservoir, P(x)=Po, is also shown.
Injector Well

(a)

Producer Well
Long thin (1D) reservoir

Figure 2
(a) Schematic of a long
thin reservoir containing
compressible fluid and rock,
which we can consider as
being essentially
one-dimensional (1D); (b)
pressure profile along the
system at various times
from t = 0, t1 , t2 etc.
- this shows the pressure
disturbance travelling
(diffusing) along the
system.

t=t1

(b)
Pin

t=t2

t=t3

P
Po

Pout = Po
0

t=0

Now consider what happens to the pressure profile if we cause the pressure
to rise suddenly at Well 1, say by injecting fluid (identical to that already
in the reservoir).

Institute of Petroleum Engineering, Heriot-Watt University

Is this pressure disturbance immediately felt at Well 2 at x = d? The answer is of


course no since the pressure wave will take some time to transmit from Well 1 to
Well 2. At a short time after this disturbance, at Well 1 say at t = t1, the pressure
profile, P(x,t1), is shown schematically in Figure 2b. Likewise, at a later time, t2, it
is shown as, P(x,t2).
But what happens at Well 2? This depends on what we do at Well 2: Suppose, we
leave it shut-in, what will eventually happen? If we were injecting a volumetric
flow rate, q1(t), into Well 1 such that it maintained a constant pressure, P1(x = 0,t);
i.e. we would be varying (reducing) q1 with time, the outcome is quite predictable.
We would keep pumping in at (decreasing) rate q1(t) until we had blown-up the
pressure in the reservoir like pumping up a car tyre to pressure P1. Hence, the
q1 value would reduce to q1 = 0 and the reservoir pressure and the pressure in both
wells would settle to P(x,t) = P1.
On the other hand, suppose we simply pumped into Well 1 at constant rate
q1(now fixed) and we held the bottom hole pressure of Well 2 to be constant
at P(x =L) = Po (the original reservoir pressure). What would happen for this
case? With a little thought, Im sure you can visualise that the sequence of
events would be as follows:
Firstly, at early times up to t2 and a little later, nothing would happen at Well 2.
It would still have pressure Po and would not be flowing;
The pressure wave would propagate or diffuse through the reservoir as shown
in Figure 2b; the speed of this wave is governed by the diffusivity which is
quantified by k/(cf) as we will show later in this chapter. Note that the larger the
fluid compressibility (cf) or porosity (), the slower the wave propagates.
At a certain time, denoted, t3, the pressure disturbance just reaches the produced
Well 2 as shown in Figure 2b;
At t = t3, Well 2 must start to flow in order to maintain the pressure at P = Po (this
works like a back-pressure regulator);
As time proceeds (t ), the pressure wave starts to be felt all across
the reservoir such that the flowrate at Well 1 is (still fixed) at q1 and the pressure
settles to a constant value P1;
Likewise, as t , Well 2 (still at fixed pressure Po) will go to steady-state flow
exactly at flowrate, q1;
At t , the pressure profile P(x,t ) will tend to a straight line as shown by
the dashed line in Figure 2b.
This thought experiment is extremely useful to appreciate the physics of flow
in a compressible system. It also introduces the ideas of boundary conditions.
That is, not only do we need a way of modelling the development of pressure in
our reservoir (i.e. finding an equation for P(x,t)), we also need to appreciate what
boundary conditions to apply in a given situation. We have been quite explicit here
6

The Flow Equations

in identifying the boundary conditions with different well constraints. For example,
for the main case considered above, Well 1 is a rate-constrained injector and Well 2
is a pressureconstrained producer.
EXERCISE 1.
Can you explain the sequence of events that would occur in the simple 1D system
of Figure 2 if both wells were pressure constrained to Pin (Well 1) and Po (Well 2)
with Pin > Po?

2.2 The Single Phase Pressure Equation

We now return to the task of deriving the single-phase flow equations for a compressible
system. Throughout this derivation we refer to the control volume shown as block i
in Figure 3 where certain terminology is also explained. In Figure 3, we have divided
up the x-axis into increments of (constant) size, x, and constant cross-sectional area,
A. Flow is considered to be in the positive x-direction (i increasing). The fluid has
density, , which may depend on pressure i.e. (P). The porosity is denoted as and
it too may depend on pressure, (P); in block i, the porosity is, i. The volumetric
flows across the boundaries of block i are given by: qi-1/2 and qi+1/2 as shown in Figure
3; the dimensions of these quantities are volume/time and typical units might be
STB/day, m3/sec etc.
Let us now apply the mass conservation conditions as identical in the introductory
section of this chapter. Mass conservation states that:
The mass accumulation
(increase or decrease)
in block i over a
time step, t

The mass that


flows IN over
time t

The mass that


flows OUT
over time t

(1)

We can easily write mathematical expressions for each of the terms in equation
1 as follows:
Volumetric rate
flowing IN to block i = of in flow to

block i
over time t

The mass of fluid

density of
x
x t = (q.)i- 1 2 .t (2a)
the fluid

And, likewise:

Institute of Petroleum Engineering, Heriot-Watt University

The mass of fluid = (q)i+1/2.t


flowing OUT of
block i over time t

(2b)

Boundary
i-1/2
Boundary
i+1/2

i-1

Blo

ck

i-1

/2

i+1

i+1

Figure 3
Control volume grid block
for application of material
balance for the single phase

/2

x x
x

flow equation; notation is


given below.

Notation:
1 The boundaries of block i are denoted
(i-1/2) between blocks (i-1)and i
(i+1/2) between blocks i and i+1
2 q(i-1/2) denotes the volumetric flow rates across the (i-1/2) boundary
q(i+1/2) denotes the volumetric flow rates across the (i+1/2) boundary
Note units bbl/day, m3/s etc
3 The porosity of block i = i, the permeability is ki etc..
Therefore, the change in mass of fluid in block i over time t is given by:
Change in mass

(q)i - 12 .t - (q)i + 12 .t

[(q)
= [(q)

over t in block i =

]
]t

i 12

(q)i+ 1 .t

i + 12

(q)i - 1

(3)

Thus, equation 3 expresses the change in mass due to flow that occurs in block i
using quantities volumetric flow rates and densities defined on the boundaries.
Note that we have changed the signs consistently in the final step of equation 3 for
convenience below. Which quantity do you think we mean when we refer to i-1/2 :
the density on the boundary, i-1/2? This seems a bit strange. However, you can
think of i-1/2 being some sort of average density between i-1 and i, the densities
in blocks (i-1) and i, respectively. It turns out we dont really need to worry about
this issue as we will find out soon.
We now turn to the alternative way of expressing the mass of fluid in a grid block
i at the different times, t and t+t. This is shown in Figure 4 where we denote the
8

The Flow Equations

mass of fluid in grid block i at times t and (t + t) by (xA)t and (xA)t+t ,


respectively. Therefore:
The change of mass of fluid
in block i over the time from
t to t+t

The mass at
(t + t)

=
=

The mass
- at t

[()t+T - ()t].xA

(4)

where we have used the fact that x and A are constants in equation 4.

Ro

Figure 4
Expressions for the mass of
single-phase fluid in a grid
block

ck
P
Spore
ac
e
x

Area = A

The mass of fluid in block i


=

(Pore volume of block i) x density

(Volume of block x porosity) x density

(x.A..)

.x.A

We now apply the material balance condition (equation 1) by equating the


expressions in equations 3 and 4 as follows:

[( )

t + t

( )t .xA = (q )i+ 1 (q )i- 1 .t


2

(5)

Now divide through equation 5 by the (constant) x.At to obtain:

[( )

t + t

- ( )t

A i+ 1 2 A i 1 2
=
x

(6)

where we have taken the (constant) area, A, to the inner parenthesis on the
RHS of equation 6.
As it stands, equation 6 is exactly true since it is simply a statement of mass balance.
There are no assumptions in this equation. Indeed, we can simplify equation 6 a little
more by noting that q/A is the Darcy velocity, u. This becomes:

Institute of Petroleum Engineering, Heriot-Watt University

[()

t + t

- ()t

] = [(u.)

i+ 1 2

- ( u.)i- 1

(7)

which is still an exact statement of fact. We can take the limits of the difference
equation 7 at t 0 and x 0 to obtain the equivalent differential equation.
Clearly:

Lim.
t 0

[( )

t + t

- ( )t

( )
t

(8)

and

(u. )i+ 12 - (u. )i 12


( u. )
Lim.

=
x
x 0
x

(9)

and therefore:

()
( u.)
=
t
x

(10)

Equation 10 is the differential form of the conservation equation and again, it is


exact in the sense discussed above. Before going on to use Darcys law (for u),
look at the structure of equation 10; in particular look at the symmetry between
and . These two quantities appear in an almost identical manner in this equation.
Hence, if the mass in a grid block stayed the same with time, i.e. ()/t = 0, then
this could be because the fluid density went down (the fluid expands) and the rock
porosity went up (the rock contracts or compresses).
We now assume Darcys law for u, that is:

u=-

k P
.
x

(11)

(as given in the Glossary etc.). We may substitute this form of the Darcy law directly
into equation 10 (taking care with the signs) to obtain:

()
k P
=

t
x x

(12)

This equation is now inexact, in that its validity depends on whether Darcys law
is or is not a good assumption. However, it was necessary to use a flow law such as
Darcys law since pressure (i.e. P(x,t)) does not appear in equation 10. Thus, Darcys
law is our link between fluid velocities and pressure (gradients). Equation 12 still
does not have pressure (P(x,t)) explicitly shown on the LHS; it simply has a term
()/t. However, we know that and depend locally only on pressure i.e. they

10

The Flow Equations

can be written (P) and (P). We therefore manipulate the LHS of equation 12 as
follows using the chain rule of differentiation:

() () P
=
.
t
P t

(13)

Thus, substituting equation 13 back into equation 12 we obtain a true single


phase pressure equation as follows:

( ) P k P
.

. =
P t x x

(14)

where we can consider the term ()/P as a generalised fluid and rock compressibility,
term, C(P). Equation 14 would then become:

P k P
.
C( P ). =
t x x

(15)

Some points should be noted about equation 15, as follows:


(i) It is a non-linear partial differential equation (PDE). By non-linear we mean
that the coefficients in the equation the input, if you like- depend on the quantity
we are trying to find, the unknown pressure, P(x,t). In other words, quantities such
as C(P), (P), (P) etc. depend on the answer. We will not go into mathematical
detail but such problems are notoriously difficult to solve analytically for general
cases.
(ii) Following on from point (i) above, such equations can only usually be
solved by one or two approaches:
By solving them numerically where we can handle the non-linearities
using certain types of iterative methods (see Chapter 6).
We may simplify the equation to the extent that it becomes soluble.
Clearly, by its nature, a numerical solution will be approximate although it is an
approximation to the full equation (equation 15, in this case). With a simplified
equation, we may have an exact solution, but the simplifications may have
thrown away some of the important physics. In fact, in the following section,
we will take the second approach.
(iii) Going back to equation 10, we could include gravity effects by taking the
Darcy equation with gravity as follows:

u=

z
k P
g

x
x

(16)

(instead of equation 11). If the 1D system is at constant incline, z(x), then (z/x) =

Institute of Petroleum Engineering, Heriot-Watt University

11

cos where is the angle of incline, therefore, we obtain equation 17 below:

u=

k P

g cos

(17)

This could simply lead to the generalised single phase equation as follows:

( ) k

g cos

. =

x x
P t

(18)

but this is fairly straight forward.

2.3 The Simplified Compressible Pressure Equation

In this section, we will take equation 15 as our starting point and introduce some
simplifying assumptions. Our hope is to get to a simpler equation which will have
analytical solutions for given boundary conditions. Indeed, for this to be the case,
we would normally aim to derive a simplified linear PDE.
In fact, to make clear what is happening to the LHS of the equation we start from
equation 14, which is repeated below:

( ) P k P
.

. =
P t x x

(14)

We first list the assumptions which we will make in the above equation and then we
will go on to examining their consequences.
Simplifying Assumptions
1
2
is
3

Viscosity, , is constant (with x and P);


Permeability and porosity, k and , are constant, (with x and P), i.e. the system
homogeneous and the rock is incompressible;
That pressure gradients, (P/x), are small such that:
2

P
0
x

4 The fluid has a constant compressibility, cf, i.e. cf =

1
cons tan t .
P

Assumption 1 is probably quite reasonable since viscosity does not vary greatly for
most oils (or water) over small pressure ranges. Assumption 2 is quite drastic since
it says that permeability (k) is constant through the reservoir i.e. that the system
is homogeneous in k (and ). For a real system, this is indeed a very simplifying
assumption. However, we will indicate below how we can turn this assumption round,
in a sense. The second part of Assumption 2 is that the rock is incompressible and
this is quite reasonable (usually, cf >> crock). Assumption 3 is rather odd: it is clearly
designed to get rid of difficult terms with terms like (P/x)2 in them. Assumption
4 fluid compressibility, cf, does not vary with pressure, is again quite reasonable
12

The Flow Equations

for most (non-critical) reservoir oils.


Applying Assumptions 1 and 2 results in the following simplification of equation
14:

P k P
. =

P t x x

(19)

which rearranges quite simply to:

. P = . P


k P t x x

(20)

Now expand the RHS of equation 20 as follows using the product rule:

2 P
P P
= . + 2
x
x x x x

(21)

and use the fact that is a function of pressure only, i.e. (P), to further expand the
(/P) in equation 21 as follows:

2 P
P P P

=
.
.
+

2
x
x x P x x

(22)

Equation 22 can be then simplified as follows:


2

2 P
P P

=
.
+



2
x
x x P x

(23)

Now use Assumption 3 to eliminate the first term on the RHS of equation 23 above
2

P
(i.e. 0 ) to obtain:
x

2
P = P

2
k P t
x

(24)

Note that we can divide both sides of 24 by and use the fact that the fluid has
constant compressibility, cf (assumption 4), to obtain:
2
c f P = P

k t x 2

(25)

where the coefficient (cf/k) is a constant.


This is more commonly written with the constant on the RHS as follows:
2
P k P
.
=
t (c f ) x 2

Institute of Petroleum Engineering, Heriot-Watt University

(26)

13

where the constant in this form is normally referred to as the hydraulic diffusivity,
Dh=k/(cf).
Equation 26 is now a linear PDE and has the form of a linear diffusion equation as
follows:

2 P
P
= Dh 2
t
x

(27)

Note the following about the above equations (26 or 27):


(i) It is the simplified (slightly) compressible 1D flow equation in a linear
porous media i.e. in Cartesian form.
(ii) Analytical solutions are available for a range of boundary conditions
(see Crank, The Mathematics of Diffusion, 2nd edition, Oxford Clarendon
Press, 1975).
(iii) In its radial form (i.e. in radial coordinates, r, rather than x) equation 27 becomes
the following:

P D h P
=
r
t
r r r

(28)

which is a well known equation of well testing (Stanislav and Kabir, 1990). Likewise,
this equation has a number of well known analytical solutions for various boundary
conditions.
(iv) The reason these equations have many ready-made analytical solutions
available is because these diffusion equations are well-known and are identical
in form to the equations of heat conduction which have been studied for many
years (Carslaw and Jaeger, 1959).

2.4 Extension of the Single Phase Pressure Equation to 2D and 3D

For the 2D case, the control volume is now grid block (i,j), as shown in Figure 5.
The flows are shown at the boundaries as before and are labelled as (i- 1/2) for flow
from (i-1) i in the x-direction, (j + 1/2) for the flow from block (i,j) (i,j + 1)
etc. as listed on Figure 5. The flow areas in the x- and y-directions are given by, Ax
= (y.h) and Ay = (x.h), respectively, as shown in Figure 5. In addition, we show
a source/sink term due to a (single phase) well. This well again injects or produces
exactly the same fluid as is in the reservoir already. The well flow rate into block (i,j)
is described by q ij which is the volumetric flow rate per unit volume of block (i,j);
possible units for Mij are m3/ s or bbl/day etc. For this definition the volume rate of
flow into (sign +) or out of (sign -) the well in block (i,j) is as follows:

14

The Flow Equations

density of injected or
Mass rate of flow into or out of block (i, j) = q ij
volume block (i, j)
produced fluid, ij
= q ij ij xy.h

(29)
We now apply the material balance equation as follows:
NOTATION
i, j control volume
i - 1/2 = (i-1) i
i + 1/2 = i (i+1)
j - 1/2 = (j-1) j
j + 1/2 = j(j+1)

Well
Mij

y (j)

x (i)

i-1

i,j+
1

,j
i,j

i,j-1

i+1

Thickness = h

,j

Note for the control volume, block (i,j), the flow areas in the x and y directions,
Ax and Ay are given by:

Figure 5
The 2D x/y Grid Showing
the Control Volume, Block
(i,j)

Ay
a,

x.h
=

Are

a,

Are

x=

y.

Change in mass in block (i,j) over time t due to flows across boundaries and the
well

] [

= (q )i 1 (q )i + 1 .t (q ) j 1 (q ) j + 1 t + q ij ij xy.h.t
2

(the x - flows)

(the y - flows)

(well source / sink term)


(30)

The accumulation term is the same as previously (Figure 4) as follows:


Change in mass in block (i,j) between time t and t+t

= ( xy.h )t + t ( xyh )t = ( )t + t ( )t xyh (31)


We then equate expressions in equations 30 and 31 to obtain:

Institute of Petroleum Engineering, Heriot-Watt University

15

[( )

t + t

( )t xy.h

] [

= (q )i + 1 (q )i 1 .t (q ) j + 1 (q ) j 1 .t + q ij ij xy.ht
2

(32)
where we note that the signs have been adjusted slightly on the RHS. Dividing through
by x.y.h.t and cancelling gives the following:

[()

t + t

()t

] = [(q)

(q)i 1

i + 12

x.A x

] [(q)

j+ 12

(q) j 1

y.A y

] + (q )

ij

(33)
where we have used the fact that xyh = xAx and xyh = y.Ay. The flow
areas, Ax and Ay, may then be divided into the qs to give Darcy velocity terms (e.g.

q
) as follows:

Ax i+ 1

(u)i + 12 =

[()

] = [(u.)
2

t + t

()t

( u.)i 1

i + 12

] [(u.)

j+ 12

( u.) j 1
y

+ (q )ij
(34)

Again, taking limits as t, x, y and 0, gives:

( )

u y (q )
( u x)
()

+
=
t
x
y

(35)

This is the 2D mass conservation equation is still exact in that no approximations


have yet been made. Clearly, we can easily generalise this to 3D by simply adding
a z-flow term (for vertical flows, uz) to give:

( )

u y
()
=
t
x

u y .
y

( u z .)
+ (q )
z

(36)

As before, the pressure P(x,y;t) (in 2D) or P(x,y,z;t) (in 3D) does not yet appear. We
must manipulate the LHS of equation 35 (or 36) to yield, exactly as before:

() () P
=
.
t
P t

(37)

And on the RHS of equation 35 (or 36) we must use Darcys law.
Darcys law in each of the 3 directions, x, y, and z, is given as follows, where we
choose z as the vertical direction (of gravity):
16

The Flow Equations

ux =

z
k x P
g
x
x

(38a)

uy =

k y P
z
g

y
y

(38b)

uz =

k z P

(38c)

where we note that the permeability may be anisotropic i.e. kx ky kz. Using the
above expressions (equations 38a-c) for the Darcy velocity along with equation 37
for the LHS in the 3D equations 36 gives:

() P k x P
z
k y P
z
. =
g
g +

x
P t x x
y y
y
+

k z P

g + (q )

z y

(39)

Equation 39 is the 3D generalisation of equation 14 including gravity and also a


well (source/sink) term. Again, this is a 3D non-linear partial differential equation
(PDE) which cannot generally be solved analytically. Note also that the equation is
rather lengthy and it would be useful if there was a more shorthand way of writing
this equation. This is dealt with in the following section.

2.5 Mathematical Shorthand for the 3D Single-Phase Pressure Equation

In order to write equation 39 in a more compact form we must use the notation of vector
calculus. Before doing this, review the following mathematical concepts:
Mathematical Concepts Review: Review the meaning of:
(i)

The divergence operator, ., on a vector V:

.V =

V
Vx
V
+ y + x
x
y
z

Vx
where vector V = Vy


Vz
(ii) The gradient operator, , on a scalar, such as pressure, P

P P P
P = i + j + k
x y z

Institute of Petroleum Engineering, Heriot-Watt University

17

.V =

V
Vx
V
+ y + x
x
y
z

Vx
where vector V = Vy


Vz
P P P
P = i + j + k
x y z
where i, j and k are the unit vectors in the x-, y- and z-directions.
(iii) see also operations on a tensor (Chapter 2, Section 3.2).
Using this notation, equation 35 (the exact conservation equation) becomes:

()
= .(u) + (q )
t

(40)

or expanding the LHS of equation 40 as before:

() P

= .(u) + (q )
P t

(41)

After the Darcy law has been used as in equation 38 the vector calculus
version of this equation becomes:

() P

. = . k.(P gz) + (q )
P t

(42)

We will not expand on equation 42 here but it can be seen that it does give a compact
way of writing the 3D pressure equation. This approach can also be used to write the
3D multi-phase flow equations, as we will develop below.
Exercise 2
The following equation is the full 2D equation for a compressible fluid (in the absence
of gravity and with no well terms):

() P k x P k y P
. +
=

P t x x y y
Simplify this equation as far as possible by making all the Assumptions (1) - (4) in
Section 2.3 but keep kx ky (although both are constant).

18

The Flow Equations

3. THE TWO-PHASE FLOW EQUATIONS


3.1 Review of Two-Phase Flow Concepts

We now consider the equations which govern the flow of two phases through a porous
medium e.g. oil-water, gas-oil, air-water. In certain respects, the approach is very
similar to that used for single-phase flow in Section 2. We apply the mass conservation
equation to each of the phases separately. However, there is a little more two-phase
physics that we must be aware of before proceeding. For this reason, we first review
some of the key concepts from two-phase flow (see Chapter 2 or the Glossary).
Key Concepts: Ensure you are familiar with the following main ideas on two-phase
flow (where we assume oil/water in the examples below):
Phase saturations, So and Sw; where So + Sw = 1
Formation volume factors, Bo and Bw (units RB/STB)
The two-phase Darcy Law (with gravity) and relative permeability, krw(Sw)
and kro(So)

uo = -

k k ro
o

Po
z
x o g x

uw = -

k k rw
w

Pw
z
x w g x

Phase pressures, Po and Pw, and the concept of capillary pressure, Pc (Sw) = PoPw,
as a constraint of the phase pressure difference at various saturations, Sw.
Exercise 3
Calculate the mass of oil and water phases for the control volume (grid block)
shown using the usual notation.

Ans:
Mass oil =
Volume of oil x density of oil
= (xyz So) x o

Ro

ck
Oil
,S
o
Wa
ter
,S

Mass oil = xyz (Soo)

Likewise:
Mass water = xyz (Sww)

3.2 Derivation of the Two-Phase Conservation Equations

As for the single phase case, we will use the material balance in a control volume
as shown in Figures 6 and 7.
Definition: A very useful quantity to define is the oil flux, Jo, and the water flux, Jw.
Institute of Petroleum Engineering, Heriot-Watt University

19

The oil (water) flux is the mass rate of flow of oil (water) per unit cross sectional area.
Dimensions are M.L-2.T-1 and possible units would be kg.m-2.s-1 or lbs.ft-2.day-1.
The oil flux, Jo (and Jw) can easily be related to other more familiar quantities as
follows: consider the flow area across the block area shown below.
Oil Flux:

a,
Are

qo

.q

z
y.

.u o

Jo= oA o = osc
Bo

il
ic Oe
r
t
e at
lum R
Vo Flow

Figure 6
Definition of oil (water)
flux, Jo .

The volumetric flow rate of oil, qo, can be used to obtain an expression for the flux,
Jo. Clearly:

y
z

i-1
Are
=A a
=
z.

i
i+1

Oil

Wa
ter

Bo

un
(i-1 dary
/2)

Oil
Wa
te

x r
un
(i+ dary
1/2
)

Bo

Flu
id
()

Pe
r
Po mea
ros bili
ity ty =
= k

Mass flow rate of oil volumetric flow rate density of


=
x
= Q o .o (43)
Across area, A
of oil across A oil, o
u
q
Mass flow rate of oil per unit area = o o = u oo = o osc (44)
A
Bo
But, by definition the above quantity is the flux, Jo (Figure 6). (Where we note that
qo/A = uo, the Darcy velocity of oil). Thus, the flux expressions are:
20

Figure 7
Control Volume (block i) for
Two-Phase Flow

The Flow Equations

J o = ( u o o )

J w = ( u w w )

(45)

However, we wish to work with reference to standard conditions (sc standard


conditions; 60F and 14.7 psia; ~15.6C and 1 bar). Therefore, introducing the densities
of oil and water at standard conditions, osc and wsc, we obtain (by definition):

u
J o = o osc
Bo

(46)

u
J w = w wsc
Bw

Now use the flux expression to perform the mass balance on control block i in
Figure 7.
The flow terms are as follows:

Mass of oil flowing out of block i over time step t


Flux of

=
.Area.t = ( J o .A.t )i- 1 2
oil
i- 1 2

(47)

Mass of oil flowing out of block i over time step t = ( J o .A.t )i+ 1

(48)

Change in mass of oil in block over t due to flow = ( J o )i+ 1 - ( J o )i- 1 A.t (49)
2

(where we note in Figure 7 that A = yz)


The accumulation - i.e. change in static mass of oil in block i - is calculated. The
expression for this is given in the Exercise above:
Change of mass in block over t (accumulation) = Mass in block at t+t Mass in
block at t

= ( xyzSo o )t + t ( xyzSo o )t = (So o )t + t (So o )t xyz


(50)
Equate the expressions in equations 49 and 50 to obtain

[(S )

o o t + t

(Soo )t xyz = - ( J o )i + 1 ( J o )i- 1 A.t (51)


2

Divide through the above equation by xyzt to obtain:

[(S )

o o t + t

(Soo )t

] = - [(J )

o i+1
2

( J o )i- 1

Institute of Petroleum Engineering, Heriot-Watt University

(52)
21

Taking limits as t, x 0, we obtain the differential form of the mass conservation


equation:

(Soo )
J
= - o
x
t
Using the fact that o =

(53)

osc
in the LHS of the above equation gives:
Bo

(Soosc ) J o

= -
t Bo x

(54)

u oosc
gives:
Bo

Substituting for J o =

Soosc
u oosc

t Bo
x Bo

(55)

However, osc is a constant reference density (at standard conditions) which cancels
to yield:

So
uo

=
t Bo
x Bo

(56)

Likewise,

Sw
uw

=
t Bw
x Bw

(57)

The above equations are the (exact) differential forms of the oil and water mass
conservation equations. They involve no assumptions; they simply arise as a result
of the definition of the various terms. However, the equations are of little practical
use in this form since they do not mention pressure, and it is this that we measure
most directly in a reservoir not local (spatially distributed) velocities, uo and uw.
Clearly, it is now time to introduce Darcys Law.
The expressions for the two phase Darcy Law are reviewed at the start of this subsection. Substituting for uo and uw in equations 56 and 57 above gives:

So k k ro

=
t Bo x o Bo

z
Po
x o g x

Sw k k rw

=
t Bw x w Bw

22

z
Pw
x w g x

(58)
(59)

The Flow Equations

These equations now express mass conservation of oil and water, on the assumption
that the 2-phase Darcy Law applies. These are our working equations for the two
phase flow (in their 1D form).
At a first glance, it appears that equations 58 and 59 present us with two equations
in four unknowns. So, Sw, Po and Pw. But, as we have noted above in the review
of key concepts, there are two constraints on these quantities; viz So + Sw = 1 and
Pc(Sw) = Po Pw. Thus, only two of these quantities e.g. Po, Sw or So, Pw etc. are truly
independent.
The above equations still require some manipulation since we would like to have a
pressure equation which was free of terms of the type (So/t) and (Sw/t). This is
derived in the next section.

3.3 The Two-Phase Pressure Equation


In order to eliminate the saturation derivatives with respect to time in equations 58
and 59 above, we proceed as follows. Firstly, we decide to retain the oil pressure,
Po, (P = Po) as our reference pressure (this is arbitrary).
Next we expand the LHS of the oil equations as follows (equation 58):

So
1 So So

= So +
t Bo
t Bo Bo t Bo t
= So
=

1 Po So So Po
.
.
+
+

.
.
Po Bo t Bo t Bo Po t

(60)

So
1 So Po

+ So


Bo t
Po Bo Bo Po t

where the underlined term is the one we wish to eliminate. Likewise, for the LHS
of the water equation (equation 59):

Sw
Sw
1 Sw Po

+ Sw

=
+

t Bw Bw t
Po Bw Bw Po t

(61)

Note that the first (underlined) terms are to be eliminated and the following terms
are essentially compressibility terms x (P/t).
To eliminate the time derivative terms of the saturations above, then note that

Sw So

+
= 0
t t
by definition (since Sw + So = 1

(62)

Sw So
+
= 0)
t
t

Institute of Petroleum Engineering, Heriot-Watt University

23

Therefore, multiply equation 60 (oil) by Bo/ on both sides and multiply 61 (water)
by Bw/ on both sides to obtain:

and

Bo So So
1 So Po
+ BoSo .

=
+
t Bo
t
Po Bo Po t

(63)

Bw Sw Sw
1 Sw Po
+ BwSw .

=
+
t Bw
t
Po Bw Po t

(64)

Now ADDING the above equations 63 and 64, we see that the S/t terms vanish
(equation 62) as follows:
Bo So Bw Sw
1
1 So Sw Po

= BoSo .
+ BwSw .
+
+

t Bo t Bw
Po Bo
Po Bw Po Po t

1
1 1 Po
= BoSo .
+ BwSw .
+

Po Bo
Po Bw Po t

(65)

where we have used So + Sw = 1 on the RHS in the last simplification in


equation 65.
The expression above (equation 65) is now equal to the RHS of equation 58 multiplied
by Bo/ and RHS of equation 61 multiplied by Bw/. First, we simplify a little by
denoting all of the compressibility terms above by, (So,Po) - that is:

1
1 1
(So ;Po ) = BoSo .

+ BwSw .
+
P
B
P

Bw Po
o
o
o

(66)

Therefore:

P B k k ro Po
z B k k rw Pw
z
(So ;Po ) o = o

o g + w

w g

t x o Bo x
x x w Bw x
x

(67)
Now use capillary pressure, Pc(Sw)=Po-Pw, to eliminate the water pressure
as follows:

Pc (Sw ) Po Pw
P P P
=

i.e. w = o c
x x
x x x
x
Substituting this expression from (Pw/x) into equation 67, we obtain

24

(68)

The Flow Equations

P B k k ro Po
z
(So ;Po ) o = o

o g

t x o Bo x
x
+

Bw k k rw Po Pc
z

w g

x
x w Bw x x

(69)

This is the 1D pressure equation for a two-phase compressible (fluids and rock)
system. Each of the terms is physically interpretable and we expand this out to see
each of the contributions more clearly.

k k P
k k rw Po
P
(So ;Po ) o = Bo . ro o + Bw .

t
x o Bo x
x w Bw x
OIL FLOW
Bo .

WATER FLOW

k k roo g z
k k g z
Bw . rw w

x o Bo x
x w Bw x (70)
GRAVITY TERMS

Bw .

k k rw Pc

x w Bw x

CAPILLARY PRESSURE TERM


Notes on equation 70
(i)

The two-phase pressure equation for the fully compressible system is clearly
very complex. Again, it is a non-linear partial differential equation (PDE)
which cannot be solved analytically for the general case;

(ii) Despite its complexity, all of the terms in equation 70 have a clear physical
interpretation in terms of viscous, gravity and capillary forces;
(iii) Following from (i) above, our two alternatives are either to use numerical
methods to solve equation 70 or to simplify it greatly such that an analytical
solution may be possible. We will consider the simplified pressure equation
in the next section;
(iv) Recall that in two-phase flow, the dependent variables (the unknown we
want to find) were chosen to be:
Po(x,t) and So(x,t)
Therefore, once we solve the pressure equation 70, we must then calculate the
saturation. In fact, ideally we would like to solve the pressure equation at the same
time as solving for the saturation. Where is our saturation equation in any case? In
fact, we have already met this as equation 59 above.

Institute of Petroleum Engineering, Heriot-Watt University

25

3.4 Schematic Strategy for Solving the Two-Phase Pressure and Saturation
Equations
In fact, we can write the two equations for pressure and saturation in the
following schematic way:

P
k k ro Po

+ gravity terms + cap. terms etc.


= Bo .
t
x o Bo x

PRESSURE (So ;Po )

(70)
SATURATION

So k k ro

=
t Bo x o Bo

z
Po

o
x
x

(58)

Clearly, these two equations are coupled. That is, the coefficients in the pressure
equation e.g. ko, etc. depend on So which is the unknown we are trying to find.
Likewise, in the saturation equation, flow terms appear with (Po/x) in them we
are also trying to find Po. Hence, if we solve these equations one at a time, we
face the problem that there are unknowns which we dont (yet) know. We will go
into more detail in Chapter 6 where we discuss the numerical solution of the flow
equations. However, we will just think in general terms about how we may go about
solving the pair of pressure/saturation equations above.
Think of the unknowns in our grid block i, Poi and Soi. We imagine the time
levels n meaning time = t or now where we know Poi and Soi. We denote
this as follows:
n

n
P
Poi
oi

Time
Time level
level nn (time
(time =
= t)
t) (KNOWN)
(KNOWN)

n
S
Soi
oi

We are trying to find Poi and Soi at the next time, t = t +t or n + 1 denoted
n+1

n+1
P
Poi
oi

Time
Time level
level n+1
n+1 (time
(time =
= t+t)
t+t) (UNKNOWN)
(UNKNOWN)

n+1

n+1
S
Soi
oi

The problem is shown schematically if Figure 8 below as follows:

26

The Flow Equations

GRID BLOCK i
At time = t
(time step n)

Figure 8
Schematic showing update
of the pressure and
saturation in a grid block (i)
over a time step, t.

Time step, t

Rock
n
S oi
n
(S wi

n
P oi
n
(Pwi

GRID BLOCK i
At time = t+t
(time step n+1)

Rock
Solve equations 70
and 59 to find

n+1
S oi
n+1
(S wi )

n+1

P oi

n+1

(Pwi )

Now the pressure equation has lots of terms that depend on So, so strictly we need to
n +1
know Soi to solve the pressure. BUT suppose we try the following strategy:
(a) Use Snoi i.e. the known saturation value to calculate all the coefficients in the
pressure equation
(b) Solve the pressure equation to get a first estimate of Pn+1oi
(c) Now solve the saturation equation using the latest Pn+1oi for the pressure
dependent flow terms, to get Sn+1oi
(d) We now have Pn+1oi and Sn+1oi as we required but we may be able to
do a bit better than this by going back to step a and using our (from this
step) to get a better solution to the pressure equation, and hence an
improved Pn+1oi
(e) Clearly, we could iterate through steps d a until our process converges
i.e. the newly calculated Sn+1oi and Pn+1oi dont change any more (or change
only by a tiny amount). We would then accept these as our accurate new
time level values and then go on to the next time level.
The description above outlines in words an algorithm or numerical strategy
for solving the pressure and saturation equations that arise in two-phase flow.
We used no mathematics since it is just the basic idea that we want to get
across just at this point.

3.5 The Simplified Two-Phase Pressure and Saturation Equations

In the case of single phase flow, we found it quite useful to simplify the (analytically
insoluble) compressible flow equation. This allowed us to see its structure
quite clearly and it turned out that the simplified single phase equation was
a diffusion equation. This diffusive process underlay how pressure waves
spread across an oil reservoir.
For the two-phase flow case, we will make some slightly different assumptions
when we simplify the equations as follows.
Assumptions:

Institute of Petroleum Engineering, Heriot-Watt University

27

1 The viscosity of the oil and water are constant o and w (with x and P);
2 Both the rock and the fluids are incompressible ( constant; Bo = Bw = 1);
3 We neglect both capillary pressure (Pc = 0; Po = Pw = P) and gravity (g = 0).
It is easiest to see the consequences of the above assumptions by going back to
the conservation equations 58 and 59. In the absence of gravity and capillarity
(Assumption 3), these become as follows:

So k k ro P

=
t Bo x o Bo x

Sw k k rw P

=
t Bw x w Bw x

(71)
(72)

Now using Assumptions 1 and 2, we obtain:

S k k ro P
o =

t x o x

(73)

S k k rw P
w =

t x w x

(74)

Clearly, it is now very simple to eliminate the (S/t) terms since we simply need to
add the above two equations to obtain the simplified pressure equation:

k k ro P k k rw P
+
=0
x o x x w x

(75)

which simplifies to:


P
o + w ) = 0
(

x
x

(76)

where o and w are the phase mobilities given by:

o =

k k ro
k k rw
and w =
o
w

(77)

These phase mobilities are strong functions of the saturation So (So = 1 Sw) through
the relative permeabilities i.e. o(So); w(So). Indeed, we can define the total mobility,
T(S0), as:

T ( So ) = w + o
thus simplifying the pressure equation to:

28

(78)

The Flow Equations


P
T ( So ) = 0

x
x

(79)

The simplified saturation equation is simply equation 73 above which, in the


above notation, becomes:

So

P
=

S
(
)
o
o
t
x
x

(80)

In summary, the simplified (incompressibility no Pc, no gravity) two-phase pressure


and saturation equations are as follows:


P
T ( So ) = 0

x
x

(81)

P
S
o =
o ( So )

t x
x

(82)

It is probably clearer for these equations how we would apply our schematic
strategy (Section 3.4) to these two equations. We illustrate this to a flowchart
in Figure 9.
n

Time level n KNOW Soi P i


Calculate mobilities at these
n
n
n
T( So )=o(So )+w(So )

n+1

n+1

Set the latest P i


S oi
to "current" values and
ITERATE through
calculation again

Solve PRESSURE equation with


P

"current"
T (Sno ) = 0
x
x
obtain Pin +1

Keep them and


set to "current" values.
Take next time step

Use Pin +1 and o(So )


To solve SATURATION equation
P n+1

S
o = o (Sno )
t x
x
obtain Soin +1

NO

Figure 9
Schematic Strategy for the
Iterative Solution of the
(simplified) Pressure and
Saturation Equations for
Two-Phase Flow

n+1

n+1

Are these P i ; S oi
satisfactory?
(i.e. converged)

YES

Institute of Petroleum Engineering, Heriot-Watt University

29

4. CLOSING REMARKS
The purpose of this module is to familiarise the student with the fundamental
flow equations of single- and two-phase flow. We have shown that these can be
derived in a unified way by applying:
MATERIAL BALANCE + DARCYS LAW
FLOW EQUATIONS
In the two-phase case, the mass conservation equation was applied to each of the two
phases oil and water, in the example here. There is also a little more two-phase
physics to be dealt with due to capillary pressure and relative permeability.
For both single- and two-phase flow, the resulting full equations for the compressible
system were non-linear PDEs (indeed, 2 non-linear, completed PDEs for two-phase
flow). These could not be solved analytically but, in simplified form, they illustrate
some interesting features of the processes. The numerical solution of these equations
is discussed in some detail in Chapter 6.
Solution to Exercise 2:

( )

=
P
( )
P
Expand the LHS
(
constant)

( )

P
P

=
P
P
) k P k y P
( )
( ) = (
= x

The RHSbecomes =(using


assumptions)

PP k P P xP k x P y y
P

y
x
k x P k y x Px + y y

and
form
so we justneed to expand
The x- and y-RHS
in
up one
xare
identical
x terms

P
k

P
ky x PyP y P P
kother
beP very
x similar).
2 P
x will
of these (the

=
+
=

2
2

x x x yxP
xx y x2xyP yPxyyx 2xP x

2 P x Px = x 2 2+Px x = x 2
P
=

+ = 2
2x 2 P 2P 2 P
x x x2 2P x2PP
x

P = P =+PPP2P+

P

2=2 =P 2= 2
=
+
=

xxxx yx2 x x
x x x x xxxPxxyx 2yP

Likewise
2
P y y = y 2
P

=

y y y2 2P 2PP 2 P
k y 2 P
P
P
k x 2 P
P

=
+
2 =
2
y y y y 2y y yyP P ky t2 P k yx22 P y 2
x
2
+
2
k 2 P k =
P
P
y 2
= x 2 P+ ty 2 x
P t
2 2
2
x2
y2
kk.x P
2PP= + k xk ykPx kP+y k1yP
P k PP
22 k = 2 2
= x 2 += y where

= cf
P t P.xt P ktykxx k y 1xzy yP2
= cf
k k
.
1where
k =
P
where k = x y k = c f z
P
z
k
kx ky 1k 2 P k y 2 P
k xk

. sides by . kwhere
1k. =where

y c 1
xky
multiply both
Pthat
== c x = c+f to obtain:
where k =
ckf f=note
= and
kc PzP k k zPt 2P kfkPx22P k y 2
k z
k
2 f =
x
2
+ y
c f P = k x Pk + ky t P k x 2 k y 2

k t k x2 2 k y22 2 k 2 2 k
30
z P y 2 P
P
c f k yxk=P
+k kx yy/ P
kcxf P

c f P
k
x
= = + +
+

=
k t kk xt2 k k t yx22 k k x2 y2 k y 2

k 2 P
k 2 P
P
P = k xx 2 P2 + k yy 2 P2
P t = x 2 + y 2
P t
x
y

The Flow Equations

kxky
.
. where k = k x k y
k where k = z
z
k

1
1 = c f
P = c f
P

c f P k x 22 P k y 22 P

k P + k y P
c f P =
t = kx x 22 + k y 22
k
k t k x k y

((

))

= k introduced
+ k / z k = (kx+ky)/z to retain the general form of the simplified
We haveksimply
k = k xx + k yy / z
pressure equation. The hydraulic diffusivity in this case is therefore given by:
k
Dh = k
D h = ( c f )
( cf )
The coefficients on the RHS of the simplified pressure equation here are kx/ k and
k x /reflect
k
ky/ k which
the anisotropy of the problem. Obviously, if kx = ky then these
kx / k
terms would be unity.

ky / k
ky / k

Institute of Petroleum Engineering, Heriot-Watt University

31

You might also like