You are on page 1of 100

PE 281 - APPLIED MATHEMATICS IN RESERVOIR

ENGINEERING
Rosalind Archer
Stanford University
Spring 2000
PE281 - Applied Mathematics in Reservoir Engineering
These notes were to developed accompany the lecture material for PE281.
Ive tried hard to avoid losing negative signs etc. but some typos may have
snuck through. If you do nd errors please contact me.
Rosalind Archer
rosalind@pangea
2
Chapter 1
Introduction
1.1 The Diusion Equation
This course considers slightly compressible uid ow in porous media. The
dierential equation governing the ow can be derived by performing a mass
balance on the uid within in a control volume.
1.1.1 One-dimensional Case
First consider a one-dimensional case as shown in Figure 1.1:
(mass in) (mass out) = (mass accumulation) (1.1)
tq|
x
tq|
x+x
= V |
t+t
V |
t
(1.2)
where V = xA and q =
kA

p
x
Dividing (1.2) through by x and t and taking limits as x 0 and
t 0 gives:
lim
x0
q|
x
q|
x+x
x
= lim
to
A|
t+t
A|
t
t
(1.3)


x
(q) =

t
(A) (1.4)
Substituting Darcys law into (1.4) gives:

x
_
kA


p
x
_
=

t
(A) (1.5)
3
PE281 - Applied Mathematics in Reservoir Engineering
A
x
z
y
x
Figure 1.1: One-dimensional control volume
Now assume (for simplicity) that k, and A are constant:


x
_

p
x
_
=

k

t
(1.6)
Now account for the dependence of on pressure by introducing the isother-
mal compressibility:
c =
1

p
_
T
(1.7)
where T denotes that the derivative is taken at constant temperature.
Equation (1.7) denes and EOS (equation of state):
_
p
psc
cdP =
_

sc
d

(1.8)
c(p p
sc
) = ln ln
sc
(1.9)
=
sc
e
c(ppsc)
(1.10)
Now substitute (p) (equation 1.10) into equation 1.6):

x
_

sc
e
c(ppsc)
p
x
_
=

k
_

sc
e
c(ppsc)

t
+

t
_

sc
e
c(ppsc)
_
_
(1.11)
The right hand side terms in equation 1.11 require further attention. First
consider the nal term,

t
:

t
=
sc
e
c(ppsc)
c
p
t
(1.12)
4
PE281 - Applied Mathematics in Reservoir Engineering
Now consider

t
. First dene the rock compressibility as:
c
r
=
1

p
_
T
(1.13)


t
= c
r
p
t
(1.14)
Substitute equation 1.12 and 1.14 into 1.11:

x
_

p
x
_
=

k
(c
r
+ c)
p
t
(1.15)
Let c
t
= c
r
+ c. Now expand the spatial derivative in equation 1.15:

2
p
x
2
+
p
x

x
=
c
t
k

p
t
(1.16)
Now consider the second term in equation 1.16:
p
x

x
=
p
x

p
p
x
=

p
_
p
x
_
2
(1.17)
This term is expected to be small so it is usually neglected.
Finally we have:

2
p
x
2
=
c
t
k
p
t
(1.18)
1.2 Three-dimensional Case
The diusion equation can be expressed using the notation of vector calculus
for a general coordinate system as:

2
p =
c
t
k
p
t
(1.19)
For the case of the radial coordinates the diusion equation is:
1
r

r
_
r
p
r
_
+
1
r
2

2
p

2
+

2
p
z
2
=
c
t
k
p
t
(1.20)
5
PE281 - Applied Mathematics in Reservoir Engineering
1.3 Dimensionless Form
1.3.1 One Dimensional Problem
The pressure equation for one dimensional ow (equation 1.18) can be written
in dimensionless form by choosing the following dimensionless variables:
p
D
=
p
i
p
p
i
(1.21)
x
D
=
x
L
(1.22)
where L is a length scale in the problem.
t
D
=
kt
c
t
L
2
(1.23)
With this choice of dimensionless variables the ow equation becomes:

2
p
D
x
2
D
=
p
D
t
D
(1.24)
1.3.2 Radial Problem
The radial form of the pressure equation is usually written in nondimensional
form taking account of the boundary conditions. When only radial variations
of pressure are considered the pressure equation is:
1
r

r
_
r
p
r
_
=
c
t
k
p
t
(1.25)
Boundary and initial conditions:
q =
2kh

r
p
r
, r = r
w
(1.26)
p = p
i
, r , t (1.27)
p = p
i
, t = 0, r (1.28)
Begin by setting:
p
D
= (p
i
p) (1.29)
6
PE281 - Applied Mathematics in Reservoir Engineering
where alpha must still be determined. The innite acting boundary condition
becomes:
p
D
= (p
i
p
i
) = 0, r , t (1.30)
The initial condition becomes:
p
D
= (p
i
p
i
) = 0, t = 0, r (1.31)
Set the dimensionless length, r
D
as:
r
D
=
r
r
w
(1.32)
Set dimensionless time, t
D
as:
t
D
=
t
t

(1.33)
where t

must still be determined. Now substitute p


D
and r
D
into the pressure
equation:
1
r
D
r
w

r
D
r
w
_
r
D
r
w

r
D
r
w
_

p
D

+ p
i
_
_
=
c
t
k

p
D

+ p
i
_
t
D
t

(1.34)
Simplifying (1.34) gives:
1
r
2
w

1
r
D

r
D
_
r
D
p
D
r
D
_
=
c
t
kt

p
D
t
D
(1.35)
t

=
c
t
r
2
w
k
(1.36)
1
r
D

r
D
_
r
D
p
D
r
D
_
=
p
D
t
D
(1.37)
Finally determine from the inner boundary condition:
q =
2kh

r
p
r
(1.38)
(No negative sign is required here because the ow is in the negative r direc-
tion)
q
2kh
= r
D
r
w

r
D
r
w
_

p
D

+ p
i
_
(1.39)
7
PE281 - Applied Mathematics in Reservoir Engineering
=
2kh
q
(1.40)
Nondimensionalise inner boundary condition:
p
D
r
D
|
r
D
=1
= 1 (1.41)
1.4 Superposition
Solutions to complex problems can be found by adding simple solutions rep-
resenting the pressure distribution due to wells producing at constant rate
at various locations and times. This concept is known as superposition. It is
only applicable to linear problems.
Superposition in Time
Assume we have an analytical solution, p
const
(q, r, t), to the problem of a well
producing at a constant rate in a given reservoir. Using superposition in time
this solution can be extended to handle a well with a variable ow rate. If
a well begins producing at rate q
1
then at time t
1
the rate changes to q
2
the
ow rate can be represented as shown in Figure 1.2.
The analytical solution for the pressure distribution caused by the well
producing at variable rate is:
p
var
(r, t) = p
const
(q
1
, r, t) + p
const
(q
2
q
1
, r, t t
1
) (1.42)
Superposition in Space
Production from multiple wells can be handled using superposition also. Sup-
pose again we have a solution p
const
(q, r, t) for the pressure distribution due
to a well located at the origin, owing at rate q. The solution for a a reservoir
containing two wells as shown in Figure 1.3 can be generated by summing
this solution as follows:
p(r, t) = p
const
(q1, r1, t) + p
const
(q2, r2, t) (1.43)
where
r1 =
_
(x x1)
2
+ (y y1)
2
(1.44)
r2 =
_
(x x2)
2
+ (y y2)
2
(1.45)
8
PE281 - Applied Mathematics in Reservoir Engineering
q2
q1 q
t1
t
=
q
t
q1 q
t
+
t1
-(q1-q2)
Figure 1.2: Flow rate variation
y
x
Figure 1.3: Well conguration
9
PE281 - Applied Mathematics in Reservoir Engineering
closed boundary
producer
reservoir
image
producer
well
Figure 1.4: Closed boundary
constant pressure boundary
producer
reservoir
image
injector
well
Figure 1.5: Constant pressure boundary
Using Superposition to Handle Boundary Conditions
Superposition in space can be used to impose constant pressure and/or closed
boundary conditions. To do so ctitious wells known as image wells are placed
in the reservoir in such a way that their eect on the pressure distribution
creates the boundary condition. If multiple boundary conditions are involved
this can lead to an array of images wells whose contribution to the reservoir
pressure distribution is summed.
Examples of the use of image wells are shown in Figures 1.4 and 1.5.
10
PE281 - Applied Mathematics in Reservoir Engineering
1.4.1 Well Boundary Conditions when Superposition
is Applied
The superposition theorem guarantees the pressure distribution obtaining by
summing simple solutions will satisfy the pressure equation. The boundary
condition at the well however requires careful consideration.
Wells Controlled by Bottom Hole Pressure
If a reservoir contains two wells with specied bottom hole pressures p
1
and p
2
a pressure solution can be obtained by summing two solutions for a single well
at specied well pressure. This solution will satisfy the pressure equation.
However this solution will not satisfy the required bottom hole pressures at
the wells. If both wells are producers then there will be additional drawdowns
at each well due to production in the other well. However if the wells are far
apart this eect is likely to be small.
Wells with a Specied Flow Rate
A solution for a reservoir with multiple wells with specied ow rates can
be generated from solutions for a single well. Unlike the case of bottom hole
pressure controlled wells this solution will satisfy the ow rate boundary
condition at each well. This is possible because each superposed solution
conserves mass locally so it does not add any extra ow at the well locations.
11
Chapter 2
The Laplace Transform
The Laplace Transform is dened by:
L{f(t)} =
_

0
e
st
f(t)dt =

f(s) (2.1)
Example:
f(t) = t (2.2)
Use integration by parts, recall:
_
b
a
u
dv
dt
dt = uv|
b
a

_
b
a
v
du
dt
dt (2.3)
Choose u = t and v =
1
s
e
st
L{f(t)} =
t
s
e
st
|

0
+
_

0
1
s
e
st
dt (2.4)
= 0 +
_

1
s
2
e
st
_

0
=
1
s
2
(2.5)
For the Laplace transform to exist the following requirements must hold:
a) f(t) have a nite number of maxima, minima and discontinuities
b) there exist constants , M, T such that
e
t
|f(t)| < M, t > T (2.6)
Functions satisfying this requirement are known as functions of exponential
order. For t > 0 there is
1
> such that:
e

1
t
|f(t)| < M (2.7)
12
PE281 - Applied Mathematics in Reservoir Engineering
When this just holds is known as the abscissa of covergence.
Example:
f(t) = e
2t
(2.8)
e
t
e
2t
= e
(2)t
(2.9)
(2.9) remains bounded for 2, therefore the abscissa of convergence for
this f(t) is 2.
2.1 Properties of Laplace Transforms
2.1.1 Theorem 1 - Linearity of the Laplace Transform
Operator
L{c
1
f
1
(t) + c
2
f
2
(t)} = c
1
L{f
1
(t)} + c
2
L{f
2
(t)} (2.10)
the Laplace Transform is a linear operator.
Proof:
L{c
1
f
1
+ c
2
f
2
} =
_

0
e
st
c
1
f
1
+ c
2
f
2
dt (2.11)
= c
1
_

0
e
st
f
1
dt + c
2
_

0
e
st
f
2
dt (2.12)
= c
1
L{f
1
(t)} + c
2
L{f
2
(t)} (2.13)
2.1.2 Theorem 2 - Laplace Transform of a Time Deriv-
ative
L{f

(t)} = sL{f(t)} f(0) (2.14)


Proof:
L{f

(t)} =
_

0
e
st
f

(t)dt (2.15)
Integrate by parts
= e
st
f(t)|

0

_

0
f(t)(se
st
)dt (2.16)
= f(0) +s
_

0
e
st
f(t)dt (2.17)
= sL{f(t)} f(0) (2.18)
13
PE281 - Applied Mathematics in Reservoir Engineering
2.1.3 Theorem 3 - Laplace Transform of a Derivative
L
_

n
f
t
n
_
= s
n
L{f(t)}
n1

i=0
s
i
f
ni1
(0) (2.19)
This can be proved by repeated application of Theorem 2.
2.1.4 Theorem 4 - Early Time Behaviour
lim
s
sL{f(t)} = lim
t0
+
f(t) = f(0
+
) (2.20)
Proof:
Begin from Theorem 2
L{f

(t)} = sL{f(t)} f(0


+
) (2.21)
Now take limits:
lim
s
L{f

(t)} = lim
s
sL{f(t)} f(0
+
) (2.22)
If f

(t) is of exponential order:


lim
s
e
st
f

(t)dt 0 (2.23)

|f

(t)| < Me
t
, t > 0 (2.24)
I(b) =
_
b
0
|f

(t)|e
st
dt <
_
b
0
Me
t
e
st
dt =
Me
(s)t
(s )

b
0
(2.25)
s > as b

lim
b
I(b) =
M
s
(2.26)
then as s , I(b) 0
Therefore the left hand side of (2.21) tends to zero, i.e.:
0 = lim
s
sL{f(t)} f(0
+
) (2.27)
proving theorem 4.
14
PE281 - Applied Mathematics in Reservoir Engineering
2.1.5 Theorem 5 - Late Time Behaviour
lim
s0
sL{f(t)} = lim
t
f(t) (2.28)
Proof:
Begin from Theorem 2
L{f

(t)} = sL{f(t)} f(0


+
) (2.29)
Now take limits:
lim
s0
L{f

(t)} = lim
s0
sL{f(t)} f(0
+
) (2.30)
Expand the left hand side term:
lim
s0
_

0
e
st
f

(t)dt =
_

0
f

(t)lim
s0
e
st
dt =
_

0
f

(t)dt (2.31)
= lim
t
f(t) f(0) (2.32)
Substituting (2.32) into (2.29) gives:
lim
s0
sL{f(t)} = lim
t
f(t) (2.33)
2.1.6 Theorem 6 - Multiplication of a Transform by s
If L{f(t)} = s(s) then f(t) =

t
L
1
{(s)}
Proof:
F(t) = L
1
{(s)} (2.34)
Use Theorem 2:
L{F

(t)} = sL{F(t)} F(0) (2.35)


and use Theorem 4:
F(0) = lim
s
sL{F(t)} = lim
s
s(s) (2.36)
= lim
s
L{f(t)} = 0 (2.37)
Now consider F

(t) by returning to Theorem 2:


L{F

(t)} = sL{F(t)} = s(s) = L{f(t)} (2.38)


15
PE281 - Applied Mathematics in Reservoir Engineering
Taking inverse Laplace Transforms of this gives:
L
1
{L{F

(t)}} = L
1
{s(s)} = L
1
{L{f(t)}} (2.39)

(t) = L
1
{s(s)} = f(t) (2.40)


t
L{(s)} = f(t) (2.41)
Example: Suppose we want to nd the inverse transform of:
L{f(t)} =
s
s
2
+ a
2
(2.42)
We know can use the following transform relationship to help us:
L{
sinat
a
} =
1
s
2
+ a
2
(2.43)
Using theorem 6 we know:
f(t) =

t
sin at
a
= cos at (2.44)
2.1.7 Theorem 7 - Division of a Transform by s
L
__
t
0
f(t)dt
_
=
1
s
L{f(t)} (2.45)
Proof:
L
__
t
0
f(t)dt
_
=
_

0
e
st
__
t
0
f(t

)dt

_
dt (2.46)
Use integration by parts:
=
_
1
s
_
t
0
f(t

)dt

0
+
1
s
_

0
e
st
f(t)dt =
1
s
L{f(t)} (2.47)
Example: Suppose we require the inverse transform of:
L{f(t)} =
1
s
3
+ 4s
=
1
s
1
s
2
+ 4
(2.48)
We know:
L
_
1
s
2
+ 4
_
=
1
2
sin 2t (2.49)
f(t) =
_
t
0
1
2
sin 2tdt =
1
4
(1 cos 2t) (2.50)
16
PE281 - Applied Mathematics in Reservoir Engineering
2.1.8 Theorem 8 - First Shift Theorem
L{e
at
f(t)} =

f(s + a) (2.51)
Proof:
L{e
at
f(t)} =
_

0
e
at
e
st
f(t)dt =
_

0
e
(s+a)
f(t)dt =

f(s + a) (2.52)
2.1.9 Theorem 9 - Second Shift Theorem
L{f(t a)u(t a)} = e
as
L{f(t)} (2.53)
where u(t a) is a unit step function.
u(t a) = 1, t a > 0 (2.54)
= 0, otherwise (2.55)
(2.56)
Proof:
L{f(t a)u(t a)} =
_

0
f(t a)u(t a)e
st
dt (2.57)
=
_

a
f(t a)e
st
dt (2.58)
=
_

0
f()e
s(+a)
d (2.59)
where = t a Apply Theorem 8:
= e
sa
_

0
f()e
s
d (2.60)
= e
sa
Lf(t)dt (2.61)
2.1.10 Theorem 10 - Multiplication by t
L{tf(t)} =

(s) (2.62)
Proof:

(s) =
d
ds
_

0
e
st
f(t)dt (2.63)
=
_

0
te
st
f(t)dt (2.64)
= L{tf(t)} (2.65)
17
PE281 - Applied Mathematics in Reservoir Engineering
2.1.11 Theorem 11 - Division by t
L
_
f(t)
t
_
=
_

s

f(s)ds (2.66)
Proof: _

s

f(s)ds =
_

s
_

0
e
st
f(t)dtds (2.67)
=
_

0
_

s
e
st
f(t)dsdt (2.68)
=
_

0
f(t)
_
e
st
t
_

s
dt (2.69)
=
_

0
f(t)
t
e
st
dt (2.70)
= L
_
f(t)
t
_
(2.71)
2.1.12 Theorem 12 - Convolution
L{f(t)}L{g(t)} = L{
_
t
0
f(t )g()d} (2.72)
= L{
_
t
0
f()g(t )d} (2.73)
= L{f(t) g(t)} (2.74)
Proof:
First use the denition of the Laplace transform:
L{
_
t
0
f(t )g()d} =
_

0
_
t
0
f(t )g()e
st
ddt (2.75)
Change limits on the integral by introducing a step function:
=
_

0
_

0
u(t )f(t )g()e
st
ddt (2.76)
(See Figure 2.1 for the step function.)
Change the order of integration:
=
_

0
g()
_

0
u(t )f(t )e
st
dtd (2.77)
18
PE281 - Applied Mathematics in Reservoir Engineering
1
u
t

Figure 2.1: Step function as a function of
1

Figure 2.2: Step function as a function of t


(See Figure 2.2 for the step function.)
Take account of step function:
=
_

0
g()
_

f(t )e
st
dtd (2.78)
Apply rst shift theorem:
=
_

0
g()
__

0
f()e
s(+)
d
_
d (2.79)
=
_

0
g()e
s
d
_

0
f()e
s
d (2.80)
= L{g(t)}L{f(t)} (2.81)
where = t
19
PE281 - Applied Mathematics in Reservoir Engineering
2.2 Solving Dierential Equations with Laplace
Transforms
Laplace transforms can be used as a powerful tool to solve dierential equa-
tions. The general procedure is:
- transform both side of the equation
- solve the transformed equation to get an expression for the Laplace trans-
form of the solution
- invert to nd the solution in real space
This approach turns an ordinary dierential equation into an alegbraic
equation and a partial dierential equation in x and t into an ordinary dif-
ferential equation in x or t.
2.2.1 Ordinary Dierential Equation Example
Solve:
y

+ 2y

+ y = te
t
(2.82)
where
y(t = 0) = 1 (2.83)
y

(t = 0) = 2 (2.84)
L{y

} = s
2
y sy(0) y

(0) (2.85)
L{y

} = s y y(0) (2.86)
L{te
t
} =
1
(s + 1)
2
(2.87)
s
2
y s + 2 + 2s y 2 + y =
1
(s + 1)
2
(2.88)
Solve for y:
(s
2
+ 2s + 1) y s =
1
(s + 1)
2
(2.89)
(s + 1) y =
1
(s + 1)
2
+ s (2.90)
y =
1
(s + 1)
4
+
s
(s + 1)
2
(2.91)
20
PE281 - Applied Mathematics in Reservoir Engineering
Now invert to nd y. Consider the rst term, we know (from tables):
L{t
(
n)} =
n!
s
n+1
(2.92)
Combining this transform with the rst shift theorem gives:
L
1
_
1
(s + 1)
4
_
=
e
t
t
3
3!
(2.93)
Now consider the second term:
s
(s + 1)
2
=
s + 1 1
(s + 1)
2
=
1
s + 1

1
(s + 1)
2
(2.94)
We can use the known transforms:
L{1} =
1
s
(2.95)
and
L{t} =
1
s
2
(2.96)
Combining this with the rst shift theorem again gives:
L
1
_
s
(s + 1)
2
_
= e
t
e
t
t (2.97)
The nal solution for y is:
y = e
t
_
t
3
3!
t + 1
_
(2.98)
2.3 Computing Laplace Transforms in Math-
ematica
Laplace transforms can be computed using Mathematica using the Laplace
Transform Calculus package. On wasson the example given in Equation (2.5)
can be computed using:
21
PE281 - Applied Mathematics in Reservoir Engineering
In[1]:= Needs["CalculusLaplaceTransform"]
In[2]:= LaplaceTransform[t,t,s]
-2
Out[2]= s
The inverse transform can be computed using:
In[4]:= InverseLaplaceTransform[s^-2,s,t]
Out[4]= t
If youre using the Mathematica version available on WinDD there is no
need to load the CalculusLaplaceTransform package.
Note: For problem sets please work out any transforms required by hand
and show working, unless otherwise specied. Feel free to check your work
against Mathematica output however.
22
Chapter 3
Petroleum Engineering
Applications of Laplace
Transforms
This chapter outlines how Laplace transforms can be used to solve problems
of interest to petroleum engineers. The solutions presented consider dierent
treatments of the well and dierent boundary conditions.
3.1 Line Source Solution
This section considers innite acting radial ow in a reservoir where the
well is modelled as a line source. The dierential equation and boundary
conditions involved are:
1
r

r
_
r
p
r
_
=
c
t
k
p
t
(3.1)
A constant rate boundary condition is specied at r = 0.
q =
2kh

r
p
r
(3.2)
The outer boundary condition is:
p = p
i
, r (3.3)
23
PE281 - Applied Mathematics in Reservoir Engineering
The initial condition is:
p = p
i
, r, t = 0 (3.4)
This can be written in dimensionless form as:
p
D
=
2kh
q
(p
i
p) (3.5)
r
D
=
r
r
w
(3.6)
t
D
=
kt
c
t
r
2
w
(3.7)
1
r
D

r
D
_
r
D
p
D
r
D
_
=
p
D
t
D
(3.8)
p
D
(r
D
, t
D
= 0) = 0 (3.9)
p
D
(r
D
, t
D
) = 0 (3.10)
r
D
p
D
t
D
|
r
D
0
= 1 (3.11)
The solution procedure begins by Laplace transforming both sides of the
pressure equation:
L
_
1
r
D

r
D
_
r
D
p
D
r
D
__
= L
_
p
D
t
D
_
(3.12)
1
r
D

r
D
_
r
D
p
D
r
D
_
= s p
D
p
D
(r
D
, t
D
= 0) (3.13)


2
p
D
r
2
D
+
1
r
D
p
D
r
D
s p
D
= 0 (3.14)
A solution to this dierential equation can be found by noting that it is an
example of a modied Bessel equation.
24
PE281 - Applied Mathematics in Reservoir Engineering
3.1.1 Bessel and Modied Bessel Equations
The Bessel equation is:
x
2
y

+ xy

+ (x
2
n
2
)y = 0 (3.15)
y = c
1
J
n
(x) + c
2
Y
n
(x) (3.16)
where J
n
is a Bessel function of the rst kind of order n and Y
n
is a Bessel
function of the second kind or order n.
The modied Bessel equation is:
x
2
y

+ xy

(x
2
+ n
2
)y = 0 (3.17)
y = c
1
I
n
(x) + c
2
K
n
(x) (3.18)
where I
n
and K
n
are modied Bessel functions of order n.
3.1.2 Laplace Space Solution for p
D
The transformed pressure equation can be written as:
r
2
D

2
p
D
r
2
D
+ r
D
p
D
r
D
r
2
D
s p
D
= 0 (3.19)
Substitute = r
D

s:

2
p
D

2
+
p
D


2
p
D
= 0 (3.20)
Solve for p
D
:
p
D
= c
1
I
0
(r
D

s) + c
2
K
0
(r
D

s) (3.21)
Now consider the boundary conditions. First consider the innite acting
condition. As r
D
, p
D
must remain bounded, however:
lim
x
I
0
(x) = (3.22)
To prevent p
D
from going to innity we set c
1
= 0.
p
D
= c
2
K
0
(r
D

s) (3.23)
25
PE281 - Applied Mathematics in Reservoir Engineering
The inner boundary condition is:
lim
r
D
0
r
D
p
D
r
D
= 1 (3.24)
lim
r
D
0
L
_
r
D
p
D
r
D
_
= lim
r
D
0
r
D
p
D
r
D
= L{1} =
1
s
(3.25)
To dierentiate the Bessel function we need the following recurrence rela-
tionship:
d
dx
_
x
n
K
n
(x)
_
= x
n
K
n+1
(x) (3.26)
Substituting (3.26) into (3.25) gives:
lim
r
D
0
r
D

r
D
_
c
2
K
0
(r
D

s)
_
=
1
s
(3.27)
lim
r
D
0
_
c
2
r
D

sK
1
(r
D

s)
_
=
1
s
(3.28)
To evaluate the limit we can use the following limiting form of K
v
for small
arguments:
K
v
(z)
1
2
(v)(
1
2
z)
v
(3.29)
lim
r
D
0
K
1
(r
D

s) =
1
r
D

s
(3.30)
c
2
lim
r
D
0
_
r
D

s
1
r
D

s
_
=
1
s
(3.31)
c
2
=
1
s
(3.32)
Finally we have the complete solution for p
D
:
p
D
(r
D
, s) =
1
s
K
0
(r
D

s) (3.33)
Now invert p
D
to nd p
D
. This can be achieved by recalling theorem 7:
L
__
t
0
f(t)dt
_
=
1
s
L{f(t)} (3.34)
26
PE281 - Applied Mathematics in Reservoir Engineering
To proceed the inverse transform of K
0
(r
S

s) is required. Transform pair


117 from the handout gives the following:
L
1
{K
0
(r
D

s)} =
1
2t
D
exp
_
r
2
D
4t
D
_
(3.35)
p
D
=
_
t
D
0
1
2t
D
exp
_
r
2
D
4t
D
_
dt
D
(3.36)
This integral can be evaluated by using substitution:
u =
r
2
D
4t
D
(3.37)
t
D
=
r
2
D
4u
(3.38)
dt
D
=
r
2
D
4u
2
du (3.39)
Equation (3.36) becomes:
p
D
=
_
r
2
D
4t
D

4u
2r
2
D
exp(u)
r
2
D
4u
2
du =
1
2
_

r
2
D
4t
D
exp(u)
u
du (3.40)
Now introduce the exponential integral, Ei(x):
Ei(x) =
_

x
e
u
u
du (3.41)
(This denition follows Abramowitz and Stegun, Handbook of Mathemati-
cal Functions, Dover, 1970. Note that in some references Ei(x) is denoted
by E
1
(x) - be careful!)
p
D
=
1
2
Ei
_

r
2
D
4t
D
_
(3.42)
Finally the answer is written in dimensional terms:
p = p
i
+
q
4kh
Ei
_

r
2
c
t
4kt
_
(3.43)
27
PE281 - Applied Mathematics in Reservoir Engineering
3.1.3 Late Time Behaviour of p
D
We can consider the late time behaviour of p
D
by recalling theorem 5 and
taking the limit of p
D
as s 0.
p
D
(s) =
1
s
K
0
(r
D

s) (3.44)
The limit can be handled by using a series expansion for K
0
:
K
0
(x) = (ln
x
2
+ )I
0
(x) +
1
4
z
2
(1!)
2
+ (1 +
1
2
)
(
1
4
z
2
)
2
(2!)
2
+ ... (3.45)
lim
x0
K
0
(x) = ln
_
x
2
_
(3.46)
where = Eulers constant, 0.5772.
lim
s0
p
D
=
1
s
_
ln r
D
+ ln

s ln 2 +
_
(3.47)
lim
t
p
D
= L
1
_

1
s
(ln r
D
+ ln

s ln 2 +)
_
(3.48)
Using transform pair 95 from the handout to invert the ln

s term gives:
= ln r
D
+ ln 2 +
1
2
( + ln t
D
) (3.49)
=
1
2
_
ln
t
D
r
2
D
+ 0.80907
_
(3.50)
3.2 Finite Well Radius Solution
The line source solution applies the constant ow rate condition as r tends
to zero. This simplies the solution process. However an analytical solution
can also be obtained when the ow rate condition is applied at r = r
w
. The
governing equation and boundary conditions remain the same as the line
source solution, except for the inner boundary condition which is now:
r
D
p
D
r
D
|
r
D
=1
= 1 (3.51)
28
PE281 - Applied Mathematics in Reservoir Engineering
As before when the dierential equation is written in Laplace space we have:


2
p
D
r
2
D
+
1
r
D
p
D
r
D
s p
D
= 0 (3.52)
As before the general solution to the problem is:
p
D
= c
1
I
0
(r
D

s) + c
2
K
0
(r
D

s) (3.53)
The solution must remain bounded as r tends to innity so as before we set
c
1
= 0:
p
D
= c
2
K
0
(r
D

s) (3.54)
Now consider the inner boundary condition. It requires that:

r
D
(c
2
K
0
(r
D

s) =
1
s
(3.55)
c
2

sK
1
(r
D

s) =
1
s
r
D
= 1 (3.56)
c
2
=
1
s
3
2
K
1
(

s)
(3.57)
The nal solution for p
D
is:
p
D
=
K
0
(r
D

s)
s
3
2
K
1
(

s)
(3.58)
3.2.1 Early Time Behaviour of p
D
The early time behaviour of p
D
can be examined by considering the limit of
p
D
as s . To do so the behaviour of the Bessel functions is required for
large arguments.
K
v
(x)
_

2x
e
x
(1 +
1
8x
+
( 1)( 9)
2!(8x)
2
+ .... (3.59)
where x is large and = 4v
2
.
K
0
(r
D

s) =


2r
D

s
e
r
D

s
(3.60)
29
PE281 - Applied Mathematics in Reservoir Engineering
and
K
1
(

s) =

s
e

s
(3.61)
So at late time p
D
is:
p
D
=
1
s
3
2


2r
D

s
e
r
D

s
(3.62)
=
1
s
3
2
1

r
D
e

s(r
D
1)
(3.63)
The solution for p
D
can be found using transform pair number 85 from the
handout:
p
D
(r
D
, t
D
) =
1

r
D
_
_
_
2

t
D

(r
D
1)
2
4t
D
(r
D
1)erfc
_
r
D
1
2

t
D
_
_
_
_
(3.64)
p
D
(r
D
= 1, t
D
) = 2

t
D

(3.65)
3.2.2 Late Time Behaviour of p
D
To nd the late time behaviour of p
D
consider the limit of p
D
at s 0. First
consider the behaviour of the Bessel functions. As before:
lim
x0
K
0
(x) = [ln(
1
2
x) + ] (3.66)
For small arguments K
v
(x) can be approximated by:
K
v
(x) =
1
2
(x)(
1
2
x)
v
(3.67)
where (x + 1) = x!
lim
x0
K
1
(x) =
1
2
(
1
2
x)
1
=
1
x
(3.68)
Recall the solution for p
D
:
p
D
=
K
0
(r
D

s)
s
3
2
K
1
(

s)
(3.69)
30
PE281 - Applied Mathematics in Reservoir Engineering
The late time behaviour of p
D
can be found by performing the following
inverse transform:
p
D
= L
1
_
_
_
1
s
3
2
[ln(
1
2
r
D

s) + ]
1

s
_
_
_
= L
1

1
s
(ln r
D
+ln

sln 2+) (3.70)


=
1
2
_
ln
t
D
r
2
D
+ 0.80907
_
(3.71)
This is the same late time behaviour as the line source solution.
3.3 Constant Pressure Inner Boundary Con-
dition
The previous two solutions have considered constant rate boundary condi-
tions at the well. It is also possible to consider constant pressure boundary
conditions. It becomes more convenient to dene the dimensionless pressure,
p
D
, in terms of both the initial reservoir pressure, p
i
, and the well pressure,
p
w
:
p
D
=
p
i
p
p
i
p
w
(3.72)
The dimensionless form of the pressure equation is as before:
1
r
D

r
D
_
r
D
p
D
r
D
_
=
p
D
t
D
(3.73)
For an innite acting reservoir the boundary and initial conditions in dimen-
sionless form are:
p
D
(r
D
, t
D
) = 1 r
D
= 1 (3.74)
p
D
(r
D
, t
D
) = 0 (3.75)
p
D
(r
D
, t
D
= 0) = 0 (3.76)
As before the general solution to this problem is:
p
D
= c
1
I
0
(r
D

s) + c
2
K
0
(r
D

s) (3.77)
Again c
1
is set to zero to ensure the pressure remains nite as r . The
inner boundary condition is used to solve for c
2
:
p
D
(r
D
= 1) = c
2
K
0
(

s) =
1
s
(3.78)
31
PE281 - Applied Mathematics in Reservoir Engineering
c
2
=
1
sK
0
(

s)
(3.79)
p
D
(r
D
) =
K
0
(r
D

s)
sK
0
(

s)
(3.80)
The inverse transform to solve this problem was provided by Van Everdin-
gen and Hurst, The Application of the Laplace Transformation to Flow
Problems in Reservoirs, Petroleum Transactions AIME, 305-324, 1949 (see
equation VI-26):
p
D
(r
D
, t
D
) =
2

_

0
(1 e
u
2
t
D
)[J
0
(u)Y
0
(ur
D
) Y
0
(u)J
0
(ur
D
)]
u
2
[J
2
0
(u) + Y
2
0
(u)]
du (3.81)
3.3.1 Early Time Behaviour of the Flow Rates
Just as the early time behaviour of the pressure could be considered in the
constant ow rate case, the behaviour of the ow rate can be examined for
the constant pressure case:
q
D
= r
D
p
D
r
D
(3.82)
q
D
= r
D
p
D
r
D
= r
D

r
D
_
K
0
(r
D

s)
sK
0
(

s)
_
(3.83)
Using the previously established expression for the derivative of K
0
gives:
q
D
=
r
D

s
K
1
(r
D

s)
K
0
(

s)
(3.84)
The cumulative recovery is dened by:
Q
D
=
_
t
d
0
q
D
dt
D
(3.85)
The Laplace transform of Q
D
can be found readily by recalling theorem 7:

Q
D
=
1
s
q
D
=
r
D
s
3
2
K
1
(r
D

s)
K
0
(

s)
(3.86)
To consider the early time behaviour of the ow rates consider the limit of
q
D
as s . The early time behaviour of the Bessel functions have already
been established:
K
1
(r
D

s)

sr
D
e
r
D

s
(3.87)
32
PE281 - Applied Mathematics in Reservoir Engineering
K
0
(

s)

s
e

s
(3.88)
q
D
=
r
D

sr
D
e
r
D

s
=

r
D

s
e

s(r
D
1)
(3.89)
q
D
can now be found by using transform pair 84 from the tables:
q
D
=

r
D

t
D
e

(r
D
1)
2
4t
D
(3.90)
Q
D
(at early time) can be found by using transform pair 85:
Q
D
= r
D
_
_
_
2

t
D

(r
D
1)
2
4t
D
(r
D
1)erfc
_
r
D
1
2

t
D
_
_
_
_
(3.91)
Note the similarity between this and Equation (3.64) (early time behaviour
of the pressure for constant rate, nite radius well).
3.4 Bounded Reservoir Example
The previous examples have considered ow in innite acting reservoirs. Lin-
ear boundaries in reservoirs with either constant pressure or constant ow
rate wells can be created using superposition as discussed in Chapter 1. Con-
sider a case with a constant ow rate and the well and a constant pressure
at the outer boundary (at radius r
e
). The boundary and initial conditions in
dimensionless form are:
r
D
p
D
r
D
= 1 r
D
= 1 (3.92)
p
D
= 0 r
D
=
r
e
r
w
= r
De
(3.93)
p
D
= 0 t
D
= 0, r
D
(3.94)
As before the general solution to this problem is:
p
D
= c
1
I
0
(r
D

s) + c
2
K
0
(r
D

s) (3.95)
33
PE281 - Applied Mathematics in Reservoir Engineering
However in this example the reservoir is bounded so c
1
can not be set to zero
by arguing that p
D
must remain bounded as r
D
tends to innity. Instead the
outer boundary condition requires:
c
1
I
0
(r
De

s) + c
2
K
0
(r
De

s) = 0 (3.96)
The inner boundary conditions requires:

r
D
[c
1
I
0
(r
D

s) + c
2
K
0
(r
D

s)] =
1
s
r
D
= 1 (3.97)
The derivatives of the Bessel functions can be found from:
d
dx
[x
n
K
n
(x)] = x
n
K
n+1
(x) (3.98)
d
dx
[x
n
I
n
(x)] = x
n
I
n+1
(x) (3.99)
Using these derivatives (3.97) becomes:
c
1

sI
1
(

s) c
2

sK
1
(

s) =
1
s
(3.100)
c
1
I
1
(

s) c
2
K
1
(

s) =
1
s
3
2
(3.101)
The outer boundary condition requires:
c
1
I
0
(r
De

s) + c
2
K
0
(r
De

s) = 0 (3.102)
Equations (3.101) and (3.102) can be solved for c
1
and c
2
to give:
c
1
=
1
s
3
2
K
0
(r
De

s)
K
0
(r
De

s)I
1
(

s) + K
1
(

s)I
0
(r
De

s)
(3.103)
c
2
=
1
s
3
2
I
0
(r
De

s)
K
0
(r
De

s)I
1
(

s) + K
1
(

s)I
0
(r
De

s)
(3.104)
p
D
=
1
s
3
2
I
0
(r
De

s)K
0
(r
D

s) K
0
(r
De

s)I
0
(r
D

s)
K
0
(r
De

s)I
1
(

s) + K
1
(

s)I
0
(r
De

s)
(3.105)
The late time (steady state) behaviour of p
D
can be determined by taking
the limit of p
D
as s tends to innity:
p
D
= ln
r
D
r
De
(3.106)
34
PE281 - Applied Mathematics in Reservoir Engineering
3.5 Van Everdingen and Hurst
Van Everdingen and Hursts 1949 paper was one of the rst applications of
Laplace transforms in petroleum reservoir engineering. One of the interesting
results they proved was the following relationship between the pressure at a
well (operating at constant ow rate) and the cumulative production (from
a well operating at constant pressure):
s p
D

Q
D
=
1
s
2
r
D
= 1 (3.107)
Van Everdingen and Hurst also demonstrated how to add wellbore storage
to a problem:
p
D
=
s p
Dxx
s(1 +sc
D
s p
Dxx
)
(3.108)
3.6 Incorporating Storage and Skin
Wellbore storage means that even if a well is produced at constant ow rate
the ow from the reservoir into the wellbore may be transient. The additional
ow can come from either the expansion of uid in the wellbore or a changing
liquid level in the tubing.
3.6.1 Fluid Expansion
q
total
= q
reservoir
+ q
expansion
(3.109)
The amount of ow from uid expansion is dened by:
q
expansion
=
V
w
t
=
V
w
p
p
t
= c
w
V
w
p
t
(3.110)
The relevant storage coecient, C is dened by:
C = c
w
V
w
(3.111)
3.6.2 Falling Liquid Level
If a well is completed without a packer there may be liquid in the annulus.
This uid may be produced when the bottom hole pressure is lowered. The
35
PE281 - Applied Mathematics in Reservoir Engineering
relevant storage coecient, C is dened by:
C =
A
w
g
(3.112)
3.6.3 Laplace Space Solution
If the Laplace space solution for a problem which has no storage and no skin
is given by p
Dxx
then solution for a problem with a skin, S, and storage, c
D
is:
p
D
=
s p
Dxx
+ S
s[1 +sc
D
(s p
Dxx
+ S)]
(3.113)
The dimensionless storage c
D
is dened by:
C
D
=
5.615C
2c
t
hr
2
w
(3.114)
3.7 Incorporating Dual Porosity
In dual porosity reservoirs ow occurs in both the matrix and in the fractures.
Their are two important parameters in dual porosity reservoirs:
=

f
c
tf

f
c
tf
+
m
c
tm
0 < < 1 (3.115)
=
k
m
k
f
r
2
w
10
10
< < 10
3
(3.116)
where depends on the fracture conguration e.g. sugar cube model
The governing equation in Laplace space for a dual porosity reservoir is:
1
r
D

r
D
_
r
D
p
D
t
D
_
sf(s) p = 0 (3.117)
where
f(s) =
s(1 ) +
s(1 ) +
(3.118)
For the case of an innite acting reservoir with a nite radius the solution
for p
D
is:
p
D
=
K
0
(
_
sf(s))
s
_
sf(s)K
1
(
_
sf(s))
(3.119)
36
PE281 - Applied Mathematics in Reservoir Engineering
(for more details see Well Test Analysis, Rajagopal Raghavan, Englewood
Clis, 1993)
3.8 Bourgeois and Horne
Marcel Bourgeois completed an MS degree in the Department of Petroleum
Engineering in 1992 (Well Test Interpretation Using Laplace Space Type
Curves). This was a key contribution to the use of Laplace transforms in well
testing. The solutions to many well testing problems (beyond the examples
presented here) are known in Laplace space. As part of his study Bourgeois
dened a quantity known as the Laplace pressure, s p. When plotted against
1/s this has similar behaviour as the real pressure
Bourgeois showed that instead of performing parameter estimation using
nonlinear regression in real space the matching could be achieved eciently
and eectively in Laplace space. The eciency lies in the removal of the
need for a numerical inverse transform to evaluate the performance of set
of paramter estimates. In Bourgeois examples fewer iterations were needed
when matching in Laplace space than in real space.
3.9 Heat Transfer
Laplace transforms are also useful in other petroleum engineering engineering
problems. During my undergraduate research project I studied heat transfer
from a buried pipeline which connects an oshore platform to onshore pro-
duction facilities. Heat transfer was a particular concern because the uids
could form solid hydrates if the temperature fell below a critical level.
The pipe is buried below the sea oor. This makes the computational
domain semi-innite. However in the part of the study that used Laplace
transforms an eective cylinder conguration was used as shown in Figure
3.1.
Two energy balance equations are required in this problem. The rst
governs the temperature distribution in the pipe surrounds:
k
e

2
T
e
=
e
c
e
T
e
t
(3.120)
The second energy balance governs the uid in the pipe which is owing
37
PE281 - Applied Mathematics in Reservoir Engineering
Surroundings, T
r
o
r
i
Burial medium, T
Pipe, T
p
e
o
Figure 3.1: Conguration of pipe and surrounds
at velocity, U:

p
c
p
T
p
t
+
p
c
p
U
T
p
x
=
2
r
i
q (3.121)
where q is the ux of heat through the pipe wall:
q = k
e
T
e
r
|
r=r
i
(3.122)
The solution procedure involved solving for the Laplace transform of T
e
in
terms of T
p
. This expression was then substituted into the equation governing
the Laplace transform of T
p
. Finally the

T
p
was solved for.
An example of this solution given below for the case of the pipeline heating
up at start-up:

T
p
(x, s) =
T
i
T
o
s
exp((
s
U
+
2k
e

s
r
i

p
c
p
U
)x) +
T
o
s
(3.123)
where
= K
0
(

sr
i
)I
0
(

sr
o
) K
o
(

sr
o
)I
0
(

sr
i
) (3.124)
=

e
c
e
k
e
(3.125)
= K
0
(

sr
0
)I
1
(

sr
i
) + K
1
(

sr
i
)I
0
(

sr
o
) (3.126)
The transient pipeline temperature distribution could be found by nu-
merically inverting the expression for

T
p
. The results from this approach
38
PE281 - Applied Mathematics in Reservoir Engineering
were much closer to eld test results than results from a large nite dier-
ence simulation. Since the numerical inverse can be computed very quickly
many more cases could be considered to assess the sensitivities to various
parameters in the model.
3.10 Numerical Inversion of Laplace Trans-
forms
The inverse Laplace transform can also be written as an integral:
f(t) = L
1
{F(s)} =
1
2i
_
+
i
e
st
F(s)ds (3.127)
where is chosen in such away that any singularities in F(s) are avoided. The
contour the integral is performed over is known as the Bromwich contour.
When an inverse transform is required that cant be found from tables this
integral is usually evaluated numerically.
The most commonly used algorithm for numerical inversion of Laplace
transforms is the Stehfest algorithm (Communications of the Association for
Computing Machinery, algorithm 368). To invert

f(s) the following summa-
tion is performed:
f(t) =
ln 2
t
N

i=1
V
i

f
_
ln 2
t
i
_
(3.128)
where
V
i
= (1)
N
2+i
min(i,N/2)

k=(
i+1
2
)
k
N
2
(2k)!
(N/2 k)!k!(k 1)!(i k)!(2k i)!
(3.129)
Theoretically the accuracy of f(t) increases as N increases. However in
practice the V
i
grow quickly in magnitude with N and round-os errors are
amplied. Usually N = 8 is used in numerical inversions. This means that
for every value of f(t) required 8 values of

f(s) are required.
The Stehfest algorithm works well for smooth functions but has dicul-
ties for oscillatory functions and functions with discontinuities. Oscillatory
functions can be inverted if their wavelength is large with respect to half
the width of the peaks. Stehfest tested his algorithm on 50 functions and
reported errors of only 0.1%.
39
PE281 - Applied Mathematics in Reservoir Engineering
There are other algorithms available for the numerical inversion of Laplace
transforms. The Talbot algorithm (J. Inst. Math. Appl., Jan. 1979, pg 97-
120) is one of the most accurate and widely applicable. Other algorithm seek
to reuse previously evaluated

f(s) values in the evaluation of subsequent f(t)
values.
3.11 Summary
This chapter has outlined several petroleum engineering applications of Laplace
transforms including:
- the line source solution
- the nite well radius solution
- constant well pressure solution
- bounded reservoir solution
Laplace transforms are attractive for these problems because storage, skin
and dual porosity behaviour can be added readily to the solutions in Laplace
space. The Laplace space solution can also be eciently incorporated into
nonlinear regression routines.
A heat transfer case study was discussed to demonstrate how the use of
Laplace space solutions can complement numerical methods. The solution
that study developed approximated the physics and the geometry of the
problem but ran very quickly and could be used for sensitivity analyses. It
ultimately reproduced the eld results more accurately than the numerical
model results.
40
Chapter 4
Fourier Transforms
Like the Laplace transform the Fourier transform is also an integral trans-
form. When viewed in the context of signal processing the application of the
Fourier transform takes a function from real-space to frequency-space (see
later examples). The Fourier transform is dened by:
F(s) =
_

f(x)e
i2xs
dx (4.1)
The inverse transform is dened in a similar manner:
f(x) =
_

F(s)e
i2xs
ds (4.2)
We will also use the notation

f(s) for F(s). The Fourier transform exists if
f(x) and f

(x) are at least piecewise continuous and the following integral


exists: _

|f(x)|dx (4.3)
There are also some alternative denitions:
F(s) =
_

f(x)e
ixs
dx (4.4)
f(x) =
1
2
_

F(s)e
ixs
ds (4.5)
and
F(s) =
1

2
_

f(x)e
ixs
dx (4.6)
41
PE281 - Applied Mathematics in Reservoir Engineering
f(x) =
1

2
_

F(s)e
ixs
ds (4.7)
Example:
f(x) = e
x
2
(4.8)
F(s) =
_

e
x
2
e
i2sx
dx (4.9)
=
_

e
(x
2
+i2xs)
dx (4.10)
=
_

e
(x
2
+i2xss
2
+s
2
)
dx (4.11)
=
_

e
(x+is)
2
s
2
dx (4.12)
= e
s
2
_

e
(x+is)
2
dx (4.13)
= e
s
2
_

2
dx (4.14)
where = x + is The integral in (4.14) is known to be 1.0 so we have:
F(s) = e
s
2
(4.15)
The Fourier transform relates a function in real space (either time or distance)
to a function in frequency space. This can be seen by recalling:
e
i2xs
= cos(2xs) + i sin(2xs) (4.16)
Now consider the inverse transform:
f(x) =
_

F(s)e
i2xs
ds (4.17)
This integral shows that the Fourier transform breaks a function f(x) into a
sum of sines and cosines with frequency s. (Recall the frequency of f(kx) is
|k|
2
). The ammplitude associated with any given frequency is given by F(s).
Example:
Consider f = cos(x). The Fourier transform of f is:
F(s) =
1
2
( + 2s) +
1
2
( + 2s) (4.18)
i.e.
f(x) =
1
2
(cos(x) + i sin(x) + cos(x) + i sin(x)) (4.19)
=
1
2
(cos(x) + cos(x)) = cos(x) (4.20)
42
PE281 - Applied Mathematics in Reservoir Engineering
-1.0
-0.8
-0.6
-0.4
-0.2
0.0
0.2
0.4
0.6
0.8
1.0
c
o
s
(
x
)
-3 -2 -1 0 1 2 3
x

Figure 4.1: f(x) = cos(x)
-1.0
-0.8
-0.6
-0.4
-0.2
0.0
0.2
0.4
0.6
0.8
1.0
A
m
p
l
i
t
u
d
e
-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0
Frequency
Frequency spectrum
Figure 4.2: Frequency spectrum of f(x) = cos(x)
43
PE281 - Applied Mathematics in Reservoir Engineering
4.1 Fourier Transform Theorems
4.1.1 Theorem 1 - Linearity
F(f(x) + g(x)) = F(f(x)) +F(g(x)) (4.21)
4.1.2 Theorem 2 - Shift Theorem
If
F(f(x)) = F(s) (4.22)
then
F(f(x a)) = e
i2sa
F(s) (4.23)
Proof:
F(f(x a)) =
_

f(x a)e
i2sx
dx (4.24)
=
_

f(x a)e
i2s(xa)i2sa
d(x a) (4.25)
= e
i2sa
_

f(x a)e
i2s(xa)
d(x a) (4.26)
= e
i2sa
F(s) (4.27)
4.1.3 Theorem 3 - Similarity Theorem
If
F(f(x)) = F(s) (4.28)
F(f(ax)) =
1
|a|
F
_
s
a
_
(4.29)
4.1.4 Theorem 4 - Convolution Theorem
If
F(f(x)) = F(s) (4.30)
and
F(g(x)) = G(s) (4.31)
then
F(f(x) g(x)) = F(s)G(s) (4.32)
44
PE281 - Applied Mathematics in Reservoir Engineering
4.1.5 Theorem 5 - Parsevals theorem
_

|f(x)|
2
dx =
_

|F(s)|
2
ds (4.33)
4.1.6 Theorem 6 - Derivatives
F(f
n
(x)) = (i2s)
n
F(s) (4.34)
Note that this assumes the values of the derivatives vanish at .
4.2 Fourier Sine and Cosine Transforms
The Fourier transform is dened as:
F(f(x)) =
_

f(x)e
i2sx
dx (4.35)
=
_

f(x)[cos(2sx) + i sin(2sx)]dx (4.36)


Now consider a case where f(x) is the sum of an even and an odd function,
f
e
(x) and f
o
(x).
Recall for an odd function:
f
o
(x) = f
o
(x) (4.37)
sin(x) is an example of an odd function.
For an even function:
f
e
(x) = f
e
(x) (4.38)
cos(x) is an example of an even function.
With f(x) dened as the sum of an even and odd function the Fourier trans-
form of f(x) becomes:
F(f(x)) =
_

(f
e
(x)+f
o
(x))cos(2sx)dxi
_

(f
e
(x)+f
o
(x))sin(2sx)dx
(4.39)
Now take account of the way products of even and odd functions behave:
f
e
(x)g
e
(x) = h
e
(x) (4.40)
f
o
(x)g
o
(x) = h
e
(x) (4.41)
45
PE281 - Applied Mathematics in Reservoir Engineering
f
o
(x)g
e
(x) = h
o
(x) (4.42)
Also note the following integral:
_

f
o
(x)dx = 0 (4.43)
Now substitute these relationships into (4.39):
F(f(x)) =
_

f
e
(x) cos(2sx)dx i
_

f
o
(x) sin(2sx)dx (4.44)
= 2
_

0
f
e
(x) cos(2sx)dx 2i
_

0
f
o
(x) sin(2sx)dx (4.45)
The fact that the Fourier transform splits into two terms (sine and cosine)
motivates the denition of the sine and cosine transforms:
F
c
(f(x)) =

_

0
f(x)cos(xs)dx = F
c
(s) (4.46)
F
1
c
(F
c
(s)) =

_

0
F
c
(s)cos(xs)ds = f(x) (4.47)
F
c
(f

) = s

(0) s
2
F
c
(s) (4.48)
F
s
(f(x)) =

_

0
f(x)sin(xs)dx = F
s
(s) (4.49)
F
1
s
(F
s
(s)) =

_

0
F
s
(s)sin(xs)ds = f(x) (4.50)
F
s
(f

) = s

f(0) s
2
F
s
(s) (4.51)
Use of sine and cosine transforms simplies the transform procedure when
transforming even and odd functions. The sine and cosines transforms can
be used in place of the full Fourier transform for problems with:
- semi-innite domains
- dierential equation that have even orders of derivatives
- either f of f

specied at the boundary


46
PE281 - Applied Mathematics in Reservoir Engineering
4.3 Example 1: 1D Pressure Diusion
Consider a one dimensional problem governed by:

2
p
D
x
2
D
=
p
D
t
D
(4.52)
The boundary conditions are:
p
D
(x
D
= 0, t
D
) = 1 (4.53)
p
D
(x
D
, t
D
) = 0 (4.54)
p
D
(x
D
, t
D
=) = 0 (4.55)
Since the pressure and not the pressure derivative is set on the boundary use
the sine transform. The choice of transform is made according to equations
(4.48) and (4.51) which relate the transform of the second derivative to the
boundary conditions.
First transform the dierential equation (in space):
s

p
D
(x
D
= 0, t
D
) s
2
p
D
=
p
D
t
D
(4.56)

p
D
t
D
+ s
2
p
D
=

(4.57)
This equation can be solved using the integrating factor method:
dy
dx
+ P(x)y = Q(x) (4.58)
ye
_
Pdx
=
_
Qe
_
Pdx
dx + C (4.59)
p
D
e
s
2
t
D
=
_
t
D
0

se
s
2

d + C (4.60)
p
D
=
_
t
D
0

se
s
2
(t
D
)
d (4.61)
=

1
s
(1 e
s
2
t
D
) (4.62)
47
PE281 - Applied Mathematics in Reservoir Engineering
Now invert to nd p
D
:
F
1
s
( p
D
) =

_

0
p
D
sin(sx
D
)ds (4.63)
=
2

_

0

1
s
(1 e
s
2
t
D
) sin(sx
D
)ds (4.64)
= 1 Erf
_
x
D

4t
D
_
= Erfc
_
x
D

4t
D
_
(4.65)
where Erf(z) and Erfc(z) are the error function and the complimentary
error function dened by:
Erf(z) =
2

=
_
z
0
e
t
2
dt (4.66)
Erfc(z) = 1 Erf(z) (4.67)
4.4 Example 2: Heat Equation
Consider the diusion of heat in a one-dimensional bar. Well consider an
innitely long bar so the full Fourier transform is required. The governing
equation is:

2
T
x
2
=
T
t
(4.68)
The boundary conditions are:
T(x , t) = T

(x ) = 0 (4.69)
The initial condition is a prescribed temperature that varies in space:
T(x, t = 0) = T
0
(x) (4.70)
First consider the Fourier transform of the spatial derivatives:
F(f

(x)) =
1

2
_

e
isx
f

(x)dx (4.71)
=
1

2
f(x)e
isx
|

2
_

(is)f(x)e
isx
dx (4.72)
48
PE281 - Applied Mathematics in Reservoir Engineering
Since f(x) vanishes at
= (is)F(f(x)) (4.73)
Similar arguments require f

(x) vanishes at . The transformed dieren-


tial equation is:


T
t
+
2
s
2

T = 0 (4.74)


T = c
1
e
(s)
2
t
(4.75)
Now consider the initial condition:

T(t = 0) =

T
0
= c
1
(4.76)


T =

T
0
e
(s)
2
t
(4.77)
Now invert to nd T:
T =
1

2
_

e
isx

T
0
e
(s)
2
t
ds (4.78)
The transform of T
0
is:

T
0
=
1

2
_

T
0
()e
is
d (4.79)
T =
1
2
_

e
isx
_

e
is
T
0
()e
(s)
2
t
dds (4.80)
=
1
2
_

T
0
()
_

e
is(x)(s)
2
t
dsd (4.81)
Finally we have an expression for T in terms of T
0
:
T =
1

4
2
t
_

T
0
()e

(x)
2
4
2
t
d (4.82)
4.5 Example 3: Elliptic Problem
Consider a steady-state problem in a two-dimensional semi-innite domain
governed by:

2
p = 0 (4.83)
49
PE281 - Applied Mathematics in Reservoir Engineering
The boundary conditions are:
p(0, y) = 0 (4.84)
p(x , y) = 0 (4.85)
p(x, 0) = f(x) (4.86)
p(x, a) = 0 (4.87)
Since the domain is semi-innite and the pressure is specied on the boundary
we will use the sine transform to transform the dierential equation:
F
s
_

2
p
x
2
+

2
p
y
2
_
= 0 (4.88)
s

p(0, y) s
2
p +

2
p
y
2
= 0 (4.89)


2
p
y
2
s
2
p = 0 (4.90)
This equation can be solved for

T to give:

T = c
1
cos(isy) + c
2
sin(isy) (4.91)
Now use the boundary conditions to determine c
1
and c
2
:
F
s
(p(x, y = 0)) = F
s
(f(x)) = F
1
(4.92)
F
s
(p(x, y = a)) = 0 (4.93)
After some algebra we can show:
p = F
1
sinh(s(a y))
sinh(sa)
(4.94)
where
sinh(z) = isin(iz) (4.95)
Now invert to nd p:
p =

_

0
F
1
sinh(s(a y))
sinh(sa)
sin(xs)ds (4.96)
50
PE281 - Applied Mathematics in Reservoir Engineering
where
F
1
=

_

0
f()sin(s)d (4.97)
Substituting F
1
into the expression for p gives:
2

_

0
_

0
f()
sinh(s(a y))
sinh(sa)
sin(s)sin(sx)dds (4.98)
=
y

_

0
f()
_
1
y
2
+ (x )
2

1
y
2
+ (x + )
2
_
d (4.99)
4.6 Radial Problems
All the examples presented have been for linear problems. Radial problems
are often of more interest to petroleum engineers. Is the Fourier transform
helpful in these cases?

2
p
D
r
2
D
+
1
r
D
p
D
r
D
=
p
D
t
D
(4.100)
- The sine and cosine transforms wont work because the pressure equation
in radial coordinates includes both even and odd orders of derivatives.
- The full Fourier transform is a candidate - consider applying it in space.
When transforming the spatial derivatives we will require the behaviour of
the pressure at . Ideally the pressure and its rst derivative would van-
ish at . This may be the case at r = + however it much harder to
make that claim at r = . Applying the full Fourier transform in time
is another option. However transforming the time derivative requires the
behaviour of the pressure at t = . This is not such a problem since it
is likely p = p
i
would be suitable. However now the boundary conditions
become time dependent if the ow begins at t = 0.
The Hankel transform is better suited to radial problems.
H
v
() =
_

0
rJ
v
(r)f(r)dr (4.101)
f(r) =
_

0
J
v
(r)H
v
()d (4.102)
Well discuss this in a later section.
51
PE281 - Applied Mathematics in Reservoir Engineering
4.7 Inverting Fourier Transforms Numerically
Unlike the Laplace transform there is no special algorithm (like the Stehfest
algorithm) required to invert Fourier transforms numerically. Since the limits
of the inversion integral are real standard numerical integration routines can
be used to evaluate the integral. The Stehfest routine required eight evalu-
ations of the integrand to determine a numerical inverse Laplace transform
at a given time. Many more evaluations of the integrand may be required
when inverting a Fourier transform. If the Fourier transform is being applied
to discrete data (discrete Fourier transform) instead of a function there are
formal algorithms that can be used to perform the inversion.
4.8 Discrete Fourier Transforms
Instead of considering the Fourier transform of a continuous function consider
a set of sampled points:
f
k
= f(x
k
), x
k
= k, k = 0, 1, 2, ..., N 1 (4.103)
We will seek estimates of the Fourier transform at discrete values of s:
s
n
=
n
N
(4.104)
The Fourier transform at s
n
is:
F(s
n
) =
_

f(x)e
2ixsn
dx
N1

k=0
f
k
e
2isnx
k
=
N1

k=0
f
k
e
2ikn/N
(4.105)
Similarly the inverse transform is:
f
k
=
1
N
N1

n=0
F(s
n
)e
2ikn/N
(4.106)
For instance if we have 100 data points sampled from the following function
over x[0,1]:
f(x) = sin(20x) + noise (4.107)
The function f(x), shown in Figure 4.3, is quite noisey. However by taking
the Fourier transform, (Figure 4.4) we can extract the original sine wave
52
PE281 - Applied Mathematics in Reservoir Engineering
20 40 60 80 100
-2
-1.5
-1
-0.5
0.5
1
1.5
Figure 4.3: Noisy signal
quite easily. The Fourier transform shows two distinct spikes, one at the
n = 10 and one at n = 90. These correspond to frequencies of 10 i.e.
the frequency of the original sine wave. The rst N/2 values of the Fourier
transform correspond to frequencies of 0 < f < f
max
. The second N/2 values
of the Fourier transform correspond to the frequencies f
max
< f < 0. Note
that the value at n = N/2 corresponds to both f = f
max
and f
max
.
Note the discrete Fourier transform (DFT) only considers a nite range
of frequencies because it uses a nite number of s
n
. If there are frequencies
beyond this present in the true Fourier transform and eect known as alias-
ing occurs. As shown in Figure 4.5 aliasing occurs when frequencies beyond
the range of the chosen set of s
n
are present. Aliasing folds these frequen-
cies back into the computed Fourier transform. Aliasing can be avoided by
ltering the function before it is sampled.
4.9 Fast Fourier Transforms
The discrete Fourier transform, as it was presented in the previous section,
requires O(N
2
) operations to compute. In fact the discrete Fourier transform
can be computed much more eciently than that (O(Nlog
2
N) operations)
by using the fast Fourier transform (FFT).
The concept of the FFT is outlined below (based on Numerical Recipes
in C). A more specialized text should be consulted for details of the im-
plementation. The FFT arises by noting that a DFT of length N can be
53
PE281 - Applied Mathematics in Reservoir Engineering
20 40 60 80 100
1
2
3
4
5
Figure 4.4: Fourier transform
f
aliased Fourier transform
true Fourier transform
0
H( f )
1
2
1
2

Figure 4.5: Aliasing eect (from Numerical Recipes in C, Cambridge Uni-


versity Press
54
PE281 - Applied Mathematics in Reservoir Engineering
written as the sum of two Fourier transforms each of length N/2. One of
these transforms is formed from the even-numbered points of the original N,
the other from the odd-numbered points.
F(s
k
) =
N1

j=0
e
2ijk/N
f
j
(4.108)
=
N/21

j=0
e
2ik(2j)/N
f
2j
+
N/21

j=0
e
2ik(2j+1)/N
f
2j+1
(4.109)
=
N/21

j=0
e
2ikj/(N/2)
f
2j
+ W
k
N/21

j=0
e
2ikj/(N/2)
f
2j+1
(4.110)
where
W = e
2i/N
(4.111)
= F
e
(s
k
) + W
k
F
o
(s
k
) (4.112)
This expansion can be performed recursively i.e. a transform a length N/2
can be written as the sum of two transforms of length N/4 etc.
55
Chapter 5
Hartley Transforms and Hankel
Transforms
5.1 Hartley Transforms
The Hartley transform was rst described by Bracewell in 1984 (Bracewell,
R.N. The Fast Hartley Transform, Proceedings of the IEEE, v 72, n 8, p
1010, 1984 ). It is an alternative to the Fourier transform. The transform is
dened by:
F(s) =
1

2
_

f(t)[cos(2st) + sin(2st)]dt (5.1)


f(t) =
1

2
_

F(s)[cos(2st) + sin(2st)]ds (5.2)


The notation cas(2st) is sometimes used:
cas(2st) = cos(2st) + sin(2st) (5.3)
Like the Fourier transform alternative denitions are possible:
F(s) =
1
2
_

f(t)[cos(2st) + sin(2st)]dt (5.4)


f(t) =
_

F(s)[cos(2st) + sin(2st)]ds (5.5)


Like the Fourier transform the Hartley transform maps a real signal into a
function of frequency. Unlike the Fourier transform this function of frequency
56
PE281 - Applied Mathematics in Reservoir Engineering
is real not complex. If the transform is being computed analytically this
may make the algebra involved easier. If the transform is being performed
numerically there is a considerable decrease in the amount of computation
required. A complex multiplication or division requires four operations and
a complex addition or subtraction requires a two operations. Also real data
arrays require only half the storage of complex data arrays. So the Fast
Hartley transform (FHT) requires considerably less memory and CPU time
than the Fast Fourier Transform (FFT). Another attractive feature of the
Hartley transform is that the transform and its inverse are symmetrical so
the same piece of code can be used to compute the transform and the inverse.
5.2 Hankel Transforms
As we discussed in an earlier chapter the Fourier transform is not particulary
appropriate for the spatial domain of semi innite (or bounded) radial prob-
lems because we must make assumptions about the behaviour of the pressure
at . The Hankel transform is a more suitable choice:
F
v
() =
_

0
rJ
v
(r)f(r)dr (5.6)
f(r) =
_

0
J
v
(r)F
v
()d (5.7)
The Hankel transform is in fact a family of transforms, depending on the
order v of the Bessel function involved. For our applications we will consider
Bessel functions of order zero.
5.2.1 Properties of Hankel Transforms
Parsevals Theorem
There is no direct analogue to the convolution theorem for Hankel transforms
however the following theorem can be readily proved:
_

0
F
v
()G
v
()d =
_

0
f(x)g(x)xdx (5.8)
57
PE281 - Applied Mathematics in Reservoir Engineering
Derivatives
Consider the Hankel transform of g(x) = f

(x).
G
v
() =
_

0
f

(x)J
v
(x)xdx (5.9)
= [xf(x)J
v
(x)]

0

_

0
f(x)
d
dx
[xJ
v
(x)]dx (5.10)
Assume that f(x) is such that the rst term is zero. Now consider the
derivatives of the Bessel functions:
d
dx
[xJ
v
(x)] =
x
2v
[(v + 1)J
v1
(x) (v 1)J
v+1
(x)] (5.11)
G
v
() = [
v + 1
2v
F
v1
()
v 1
2v
F
v+1
()] (5.12)
Note that v = 0 is a special case.
Bessels Equation
One of the most useful features of the Hankel transform is what happens when
it is applied to Bessels equation. If f(x) is an arbitrary function consider
the transform of:
g(x) =
d
2
dx
2
f(x) +
1
x
d
dx
f(x)
v
2
x
2
f(x) (5.13)
G
v
() =
2
F
v
() (5.14)
Note that the terms in the radial diusivity equation,

2
p
r
2
+
1
r
p
r
, are an
instance of Bessels equations so in radial (no , z) coordinates:
F
0
(
2
p) =
2
F
0
() (5.15)
For more information on Hankel transforms see: Integral Transforms and
their Applications, Brian Davies, Springer-Verlag, 1978.
58
PE281 - Applied Mathematics in Reservoir Engineering
r
line sink
z=h
z=0
porous media
z
Figure 5.1: Source/sink conguration
5.2.2 Hankel Transform Example
Barry, Aldis and Mercer, Injection of Fluid into a Layer of Deformable
Porous Medium, Applied Mechanics Reviews, v48, n10, 1995, pg 722, con-
sider uid injection into a porous medium in the context of biological tissue.
They note though that their solution is also relevant to subsurface uid ow.
The conguration they considered has a point source and a line sink as shown
in Figure 5.1.
Barry et al. solve equations for both pressure and stress, however we will
consider only the pressure equation. The pressure is governed by:

2
p
r
2
+
1
r
p
r
+

2
p
z
2
=
_
(r )
r

(r)
r
(z z
o
)
_
(5.16)
The Dirac delta terms are used to impose the rate boundary conditions at
the source and sink. When this equation is Hankel transformed it becomes:

2
p
z
2

2
p = ((z z
0
) J
0
(p)) (5.17)
where p is the Hankel transform of p;
The solution for p is:
p =
cosh(z
0
)
sinh()
cosh((z 1))
J
0
()

2
, z[z
0
, 1] (5.18)
59
PE281 - Applied Mathematics in Reservoir Engineering
p =
cosh((z
0
1))
sinh()
cosh((z))
J
0
()

2
, z[0, z
0
] (5.19)
These expressions were inverted by Barry et al. using a routine from the
NAG library.
60
Chapter 6
Greens Functions
6.1 Theoretical Concepts
a.) adjoint operators
b.) Dirac delta function
c.) Greens function
Greens Functions, G.F. Roach, Cambridge University Press, 1967
Application of Greens Functions in Science and Engineering, Michael
Greenberg, Prentice-Hall, 1971
6.1.1 Adjoint Operator
We will work in terms of a dierential operator, L (note this is not the same
as L for the Laplace transform). L operates on a function, u for example e.g.
L =
d
2
dx
2
+
d
dx
(6.1)
Lu =
d
2
u
dx
2
+
du
dx
(6.2)
The adjoint of L is written L

. It is dened by multiplying Lu by another


(arbitrary) function v and integrating:
_
vLu dx = boundary terms +
_
uL

v dx (6.3)
61
PE281 - Applied Mathematics in Reservoir Engineering
Example:
L = a(x)
d
2
dx
2
+ b(x)
d
dx
+ c(x) (6.4)
i.e.
Lu = a(x)
d
2
u
dx
2
+ b(x)
du
dx
+ c(x)u (6.5)
What is L

?
A =
_
v[au

+ bu

+ cu]dx (6.6)
Integrate by parts (term by term):
_
vau

dx = vau

_
u

(va)

dx = vau

(va)

u +
_
u(va)

dx (6.7)
_
vbu

dx = uvb
_
u(vb)

dx (6.8)
A = vau

(va)

u +uvb +
_
u[(va)

(vb)

+vc] dx =
_
uL

v dx (6.9)
Now consider L

v a little more:
L

v = (va)

(vb)

+ vc = (v

a + a

b b

v + vc (6.10)
= v

a+a

+a

v+a

bb

v+vc = av

+(2a

b)v

+(a

+c)v (6.11)
L

= a(x)
d
dx
2
+ (2a

(x) b(x))
d
dx
+ (a

(x) b

(x) + c(x)) (6.12)


Self-Adjointness
If L = L

and the boundary terms vanish, the operator L is known as a


self-adjoint operator. In the example above, L is self-adjoint if:
2a

b = b (6.13)
a

+ c = c (6.14)
b = a

(6.15)
i.e. if b = a

then L is self adjoint. The importance of self adjoint operators


will become clearer we discuss Greens functions.
62
PE281 - Applied Mathematics in Reservoir Engineering
-1
-1/2 -1/3
0
k=1
1/3 1/2 1
1/2
1
3/2
k=3
k=2
Figure 6.1: W
k
function
6.1.2 The Dirac Delta Function
The Dirac delta function is written as (x) and is used to describe point
source. Begin by considering a function, W
k
:
W
k
=
k
2
, |x| <
1
k
0, otherwise
(6.16)
Now think about what happens as k . The area under W
k
is:
lim
k
_ 1
k

1
k
k
2
dx =
k
2
_ 1
k

1
k
dx (6.17)
=
k
2
_
1
k
+
1
k
_
= 1 (6.18)
Dene (x) = lim
k
W
k

(x) = 1.0 (6.19)


(x) = 0, x = 0
, x = 0
(6.20)
63
PE281 - Applied Mathematics in Reservoir Engineering
H(x-a)
1
x=a
Figure 6.2: Heavisde function
Integrals Involving (x)
_

(x)h(x)dx = h(0) (6.21)


i.e. multiplying by (x) and integrating gives h(0). Similarly:
_

(x a)h(x)dx = h(a) (6.22)


Derivatives Involving (x)
This is easier to consider in integral form.
_

(x)h(x)dx = (x)h(x)|

(x)h

(x) dx (6.23)
=
_

(x)h

(x) dx (6.24)
More generally:
_

n
(x a)h(x)dx = (1)
n
h
n
(a) (6.25)
Heaviside Step Functions and the Dirac Delta Function
The Heaviside step function is written H(x a).
Consider:
_

(x a)h(x) dx = H(x a)h(x)|

H(x a)h

(x) dx (6.26)
64
PE281 - Applied Mathematics in Reservoir Engineering
= h()
_

H(x a)h

(x)dx (6.27)
= h()
_

a
h

(x)dx (6.28)
= h() (h() h(a)) = h(a) (6.29)
_

(x a)h(x) dx (6.30)
H

(x a) = (x a) (6.31)
6.1.3 Greens Functions
Consider a dierential equation written in operator form on a domain :
Lu = f (6.32)
where u is the unknown function and f is a forcing function. We will assume
(initially) that L is self-adjoint, however this assumption will ultimately be
relaxed. Using operator notation:
u = L
1
f (6.33)
Since L is a dierential operator we expect L
1
to be an integral operator.
L
1
must satisfy the usual properties of an inverse:
LL
1
= L
1
L = I (6.34)
Now dene the inverse operator as:
L
1
f =
_

G(x, x
i
)f(x
i
)dx
i
(6.35)
To nd the Greens function G(x, x
i
) for the problem consider what happens
when Lu = f is multiplied by G and integrated over the domain:
_

GLu(x
i
)dx
i
=
_

uL

Gdx
i
=
_

Gf(x
i
)dx
i
(6.36)
This equation shows that (6.35) is an appropriate denition of L
1
if:
L

G(x, x
i
) = LG(x, xi) = (x
i
x) (6.37)
The boundary conditions for this problem can be found by setting the bound-
ary terms to zero.
u =
_

G(x, x
i
)f(x
i
)dx
i
(6.38)
This derivation assumes L is a self adjoint operator, we will return to the
non-self adjoint case in another section.
65
PE281 - Applied Mathematics in Reservoir Engineering
6.2 Greens Function Examples
6.2.1 Self Adjoint Problem
Use Greens functions to solve:
u

(x) = (x), x[0, 1] (6.39)


u(0) = u(1) = 0 (6.40)
Step 1: Find L

Note we are working with u(x


i
) not u(x).
_
1
0
Gu

dx
i
= Gu

|
1
0

_
1
0
u

dx
i
(6.41)
= Gu

|
1
0
uG

|
1
0
+
_
1
0
uG

dx
i
(6.42)
i.e.
L

=
d
2
dx
2
(6.43)
Step 2: Consider Boundary Terms
To ensure the problem is self-adjoint we will zero the boundary terms by
imposing boundary conditions on G:
G(x, 1)u

(1) G(x, 0)u

(0) = 0 (6.44)
G

(x, 1)u(1) G

(x, 0)u(0) = 0 (6.45)


Since u(1) = u(0) = 0 we require:
G(x, 1) = 0 (6.46)
G(x, 0) = 0 (6.47)
66
PE281 - Applied Mathematics in Reservoir Engineering
Step 3: Solve for G
d
2
G
dx
2
i
= (x
i
x) (6.48)

dG
dx
i
= H(x
i
x) + Ax
i
(6.49)
G = (x
i
x)H(x
i
x) + Ax
i
+ B (6.50)
Now use boundary conditions to solve for A and B:
G(x, 0) = 0 (6.51)
B = xH(x) = 0 (6.52)
G(x, 1) = 0 (6.53)
(1 x)H(1 x) + A = 0 (6.54)
A = (1 x) (6.55)
Substitute A and B back into G:
G = (x
i
x)H(x
i
x) + (x 1)x
i
(6.56)
Step 4: Solve for u
u(x) =
_
1
0
[(x
i
x)H(x
i
x) + (x 1)x
i
](x
i
)dx
i
(6.57)
Symmetry and Interpretation of G
Note the symmetry in G.
When x
i
< x:
G = (x 1)x
i
(6.58)
When x
i
> x:
G = (x
i
1)x (6.59)
This symmetry is something that should be expected for self adjoint prob-
lems. Physically G can be interpreted as the deection of a beam in response
to an incremental load (x
i
)dx
i
at point x
i
.
67
PE281 - Applied Mathematics in Reservoir Engineering
6.2.2 Non-Self Adjoint Problem
Use Greens functions to solve:
u

(x) + 3u

(x) + 2u = f, x[0, 1] (6.60)


u(1) = 2u(0) (6.61)
u

(1) = a (6.62)
Step 1: Find L

_
1
0
GLudx
i
= Gu

|
1
0

_
1
0
u

dx
i
+3Gu|
1
0
3
_
1
0
uG

dx
i
+2
_
1
0
uGdx
i
(6.63)
= Gu

|
1
0
G

u|
1
0
+
_
1
0
uG

dx
i
+ 3Gu|
1
0
3
_
1
0
uG

dx
i
+ 2
_
1
0
uGdx
i
(6.64)
L

=
d
2
dx
2
3
d
dx
+ 2 (6.65)
The problem is not self adjoint.
Step 2: Consider Boundary Terms
G(x, 1)u

(1) G

(x, 1)u(1) + 3G(x, 1)u(1)


G(x, 0)u

(0) +G

(x, 0)u(0) 3G(x, 0)u(0) = 0 (6.66)


Substitute in the boundary conditions for u:
aG(x, 1) +u(0)[2G

(x, 1) + 6G(x, 1) +G

(x, 0)] = 0 (6.67)


G(x, 0) = 0 (6.68)
We can only specify two boundary conditions on G. The mixed boundary
condition in this problem means that this is not enough to zero all the boud-
nary terms. We will choose to carry aG(x, 1) through the problem and set:
2G

(x, 1) + 6G(x, 1) +G

(0, x) = 0 (6.69)
As in the self adjoint problem we will multiply Lu by G and integrate
over .
_
1
0
GLudx
i
= boundary terms +
_
1
0
uL

Gdx
i
=
_
1
0
Gfdx
i
(6.70)
68
PE281 - Applied Mathematics in Reservoir Engineering
By zeroing out as many boundary terms as possible and choosing L

G =
(x
i
x) this becomes:
_
1
0
Gfdx
i
= aG(x, 1) +u(x) (6.71)
Step 3: Solve for G
It is convenient to solve the problem in two parts.
d
2
G
dx
2
i
3
dG
dx
i
+ 2G = 0, 0 x
i
< x (6.72)
d
2
G
dx
2
i
3
dG
dx
i
+ 2G = 0, x < x
i
1 (6.73)
The singularity at x
i
= x will be handled by imposing conditions on the
constants of integration. The general solution to this problem is:
G = Ae
x
i
+ Be
2x
i
, 0 x
i
< x (6.74)
G = Ce
x
i
+ De
2x
i
, x < x
i
1 (6.75)
The constants A, B, C and D can be solved for using the boundary
conditions and some additional conditions to handle the singularity:
G(x, 0) = 0 (6.76)
A+ B = 0 (6.77)
2G

(x, 1) + 6G(x, 1) +G

(0, x) = 0 (6.78)
2(Ce + 2De
2
) + 6(Ce + De
2
) + (A + 2B) = 0 (6.79)
A+ 2B + 4Ce + 2De
2
= 0 (6.80)
We will require that G is continuous at x
i
= x:
Ae
x
+ Be
2x
= Ce
x
+ De
2x
(6.81)
Finally we will consider what happens when we integrate past x
i
= x:
_
x+0
x0
G

3G

+ 2Gdx
i
=
_
x+0
x0
(x
i
x)dx
i
(6.82)
69
PE281 - Applied Mathematics in Reservoir Engineering

dG
dx
i
|
x+0
x0
3G|
x+0
x0
+ 2
_
x+0
x0
Gdx
i
= 1 (6.83)
Because we have required G to be continuous the second and third terms in
this equation are zero so we have:
(Ce
x
+ 2De
2x
) (Ae
x
+ 2Be
2x
) = 1 (6.84)
We now have four equations to solve for the constants. The nal solution for
G is:
G =
1
k
(2e
2(1x)
4e
1x
)(e
x
i
e
2x
i
), 0 x
i
x (6.85)
G =
1
k
(2e
2x
2e
2
1)e
x
i
x
+(4e4e
1x
+e
x
)e
2x
i
x
, x x
i
<= 1 (6.86)
where
k = 1 4e + 2e
2
(6.87)
Step 4: Solve for u
u(x) = aG(x, 1) +
_
1
0
G(x, x
i
)f(x
i
)dx
i
(6.88)
6.3 Partial Dierential Equations
Consider a general second order partial dierential equation, on a domain :
Lu = Au
xx
+ 2Bu
xy
+ Cu
yy
+ Du
x
+ Eu
y
+ Fu = f (6.89)
This assumes the independent variables are x and y but x are t are also
possible. This equation can be classied according to A,B and C.
B
2
AC < 0, elliptic
B
2
AC = 0, parabolic
B
2
AC > 0, hyperbolic
70
PE281 - Applied Mathematics in Reservoir Engineering
dy

i
d

n
Figure 6.3: Relationship of dy to d
6.3.1 Adjoint Operator
As before the adjoint operator is dened in terms of the following integral:
_ _

vLu d = boundary terms +


_ _
uL

v d (6.90)
We will work out the rst term in the general case for the adjoint operator:
_ _
vAu
xx
d =
_
y
2
y
1
_
_
x
2
x
1
vAu
xx
dx
_
dy (6.91)
=
_
y
2
y
1
_
vAu
x
|
x
2
x
1

_
x
2
x
1
(vA)
x
u
x
dx
_
dy (6.92)
=
_
y
2
y
1
_
[vAu
x
(vA)
x
u]
x
2
x
1
+
_
x
2
x
1
(vA)
xx
udx
_
dy (6.93)
=
_
y
2
y
1
[vAu
x
(vA)
x
u]
x
2
x
1
dy +
_ _
(vA)
xx
ud (6.94)
Now consider the boundary integration more carefully. The boundary () is
an arbitrary function of x and y.
dy = dcos =

i nd (6.95)
Therefore the integral being evaluated is:
_

[vAu
x
(vA)
x
u]

i nd +
_ _

(vA)
xx
ud (6.96)
71
PE281 - Applied Mathematics in Reservoir Engineering
Treating all terms in this manner gives the following relationship between
L nand L

:
_ _
vLu d =
_

(M

i + N

j) nd +
_ _

uL

v d (6.97)
where
L

v = (Av)
xx
+ 2(Bv)
xy
+ (Cv)
yy
(Dv)
x
(Ev)
y
+ Fv (6.98)
M = Avu
x
u(Av)
x
+ 2vBu
y
+ Duv (6.99)
N = 2u(Bv)
x
+ Cvu
y
u(Cv)
y
+ Euv (6.100)
Common Operators
Equation Lu L

v
Laplace
2
u
2
v
Helmholtz
2
u + k
2
u
2
v + k
2
v
Diusion u
t
u
xx
v
t
v
xx
Wave c
2
u
xx
u
tt
c
2
v
xx
v
tt
Of these four the diusion equation is the only one that is not self-adjoint.
It can be proven that:
A
x
+ B
y
= D (6.101)
and
B
x
+ C
y
= E (6.102)
are necessary and sucient conditions for L = L

.
6.3.2 The Delta Function is Two Dimensions
Like (x), (x, y) can be seen as the limit of a sequence of other functions.
(x x
i
, y y
i
) = lim
k
W
k
(r) (6.103)
where
r =
_
(x x
i
)
2
+ (y y
i
)
2
(6.104)
72
PE281 - Applied Mathematics in Reservoir Engineering
and
W
k
=
k
2

, r
1
k
(6.105)
= 0, r >
1
k
(6.106)
and/or
W
k
(r) =
ke
kr
2

(6.107)
The two dimensional delta function has similar properties to the one dimen-
sional delta function:
_ _
d
(x x
i
, y y
i
)h(x, y)d = h(x
i
, y
i
) (6.108)
(x x
i
, y y
i
) = (x x
i
)(y y
i
) (6.109)
6.3.3 Constructing Greens Functions
When working in two dimensions is usually easier to construct the Greens
function for a given problem as the sum of two Greens functions:
G = G
f
+ G
b
(6.110)
where G
f
satisifes L

G
f
= (x
i
x, y
i
y) without taking account of any
particular boundary conditions on G or G
f
. The function G
f
is known as a
free-space Greens function. The function G
b
takes account of the boundary
terms for a particular problem.
Example: Two-Dimensional Laplace Equation
L

G
f
=
G
f
= (x
i
x, y
i
y) (6.111)
As before we will begin by solving the problem away from the singularity
where the delta function is zero, then will consider the singularity separately.

2
G
f
=
1
r

r
(r
G
f
r
) = 0 (6.112)
r
G
f
r
= A (6.113)
73
PE281 - Applied Mathematics in Reservoir Engineering
x,y

y
x
i
i

Figure 6.4: Integration around singularity

G
f
r
=
A
r
(6.114)

G
f
r
=
A
r
(6.115)
G
f
= Alnr + B (6.116)
where
r =
_
(x
i
x)
2
+ (y
i
y)
2
(6.117)
Now consider the singularity by integrating over a disc surrounding the sin-
gularity as shown in Figure 6.4.
_ _
e

2
G
f
d =
_ _
e
(x
i
x, y
i
y)d (6.118)
Use Greens second identity to convert the domain integral on the left to a
boundary integral. In general for two function f and g Green proved:
_ _

(f
2
g g
2
f)d =
_

_
f
g
n
g
f
n
_
d (6.119)
74
PE281 - Applied Mathematics in Reservoir Engineering

_ _
e

2
G
f
d =
_
e
G
f
r
dr (6.120)
=
_
2
0
G
f
r
rd (6.121)
Now substitute G
f
= Alnr + B:
= A
_
2
0
1
r
rd (6.122)
Recalling the left hand side of Equation 6.118 must equal 1 we have:
2A = 1 (6.123)
i.e.
A = 1 (6.124)
Since we are not considering any boundary conditions we can not solve for
B explicity so we will set it (arbitrarily) to zero, i.e.:
G
f
=
1
2
lnr (6.125)
Example: One-Dimensional Diusion Equation
The diusion equation is:
Lu =
u
t


2
u
x
2
(6.126)
Referring to the general expression for L and L

we have the following L

:
L

=

t


2
x
2
(6.127)
To nd the (free-space) Greens function we will solve:
L

G
f
=
G
f

+

2
G
f
x
2
i
= (x
i
x)( t) (6.128)
Well use a Fourier transform to do this, specically:
F(s) =
1

2
_

f(x
i
)e
ix
i
s
dx
i
(6.129)
75
PE281 - Applied Mathematics in Reservoir Engineering


G
f

s
2

G
f
= ( t)
1

2
e
ixs
(6.130)
As before consider solving two problems, one on each side of the singularity
(where the delta function is zero):


G
f

s
2

G
f
= 0, > t (6.131)


G
f

s
2

G
f
= 0, < t (6.132)
This equation can be readily solved for

G
f
:

G
f
= Ae
s
2

, > t (6.133)

G
f
= Be
s
2

, < t (6.134)
Now take account of the singularity by integrating past it:

_
t+0
t0
d

G
f
d
d s
2
_
t+0
t0

G
f
d =
1

2
_
t+0
t0
( t)e
ixs
d (6.135)
We require

G
f
to be continuous so the second integral in the above equation
vanishes to give:
(Ae
s
2

Be
s
2

) =
1

2
e
ixs
(6.136)
To solve for A and B we need one more equation. This time we will consider a
physical argument. The Greens function represent the response of a system
to a unit input applied at time and location x
i
. So before time we do
not expect change in the system i.e G will be zero for t < . Therefore the
constant A is zero.
Now solve for B:
B =
1

2
e
ixs
e
s
2
t

(6.137)

G
f
= 0, > t (6.138)

G
f
=
1

2
e
ixs
s
2
t

+
s
2

> t (6.139)
76
PE281 - Applied Mathematics in Reservoir Engineering

G
f
can be written more compactly as:

G
f
=
H(t )

2
e
ixs
s
2
t

+
s
2

(6.140)
The Fourier transform can be inverted to give:
G
f
=
H(t )
_
4(t )
e
(x
i
x)
2
4(t)
(6.141)
6.4 The Newman Product Theorem
This theorem is not specic to the solution of the dierential equations that
give rise to Greens functions (L

G = (x
i
x) etc). The theorem allows us to
nd solutions to dierential equations in multiple dimensions from solutions
to one-dimensional problems. We will consider the diusion equation in three
dimensions:

2
u
x
2
+

2
u
y
2
+

2
u
z
2
=
1

u
t
(6.142)
on the domain
a
1
x b
1
(6.143)
a
2
y b
2
(6.144)
a
3
z b
3
(6.145)
with initial conditions
u(x, y, z, 0) = U(x)V (y)W(z) (6.146)
Note being able to express the initial condition in this product form is
essential.
The boundary conditions can be constant u, constant ux or mixed on each
edge.
Now consider solving three one-dimensional problems:

2
u
1
x
2
=
1

u
1
t
, a
1
x b
1
(6.147)
77
PE281 - Applied Mathematics in Reservoir Engineering

2
u
2
y
2
=
1

u
2
t
, a
2
y b
2
(6.148)

2
u
3
z
2
=
1

u
3
t
, a
3
y b
3
(6.149)
The initial conditions for this set of equations are:
u
1
(x, 0) = U(x) (6.150)
u
2
(y, 0) = V (y) (6.151)
u
3
(z, 0) = W(z) (6.152)
and the boundary conditions are taken from the original problem. The solu-
tion for u is:
u(x, y, x, t) = u
1
(x, t)u
2
(y, t)u
3
(z, t) (6.153)
Proof: Substitute (6.153) into the diusion equation (6.142):

2
u
x
2
+

2
u
y
2
+

2
u
z
2
=

2
u
1
u
2
u
3
x
2
+

2
u
1
u
2
u
3
y
2
+

2
u
1
u
2
u
3
z
2
(6.154)
Expanding the derivatives gives:
= u
2
u
3

2
u
1
x
2
+ u
1
u
3

2
u
2
y
2
+ u
1
u
2

2
u
3
z
2
(6.155)
Now substitute in (6.147):
= u
2
u
3
1

u
1
t
+ u
1
u
3
1

u
2
t
+ u
1
u
2
1

u
3
t
(6.156)
=
1

u
t
(6.157)
For an example involving radial coordinates see Carslaw and Jaegar, page
33.
78
PE281 - Applied Mathematics in Reservoir Engineering
6.5 Gringarten and Ramey
Gringarten and Ramey, The Use of Source and Greens Functions in Solv-
ing Unsteady-Flow Problems in Reservoirs. SPEJ, October 1973, pg 285,
applied Greens functions and the Newman product theorem to reservoir en-
gineering problems. Gringarten and Ramey derived both free-space Greens
functions and Greens functions satisfying boundary conditions for rectangu-
lar, homogeneous, anisotropic reservoirs. Gringarten and Ramey dene both
Greens functions and source functions. Source functions act over a region
while Greens functions act a given point in one, two or three dimensions.
Source functions can be determined by integrating Greens functions over an
appropriate region (corresponding to a well or fracture).
The basic result that Gringarten and Ramey use is the Green functions
for a point source in a one dimensional reservoir:
G =
1

4t
e

(xxw)
2
4t
(6.158)
where

2
p
p
t
= 0 (6.159)
Note that this one dimensional source corresponds to an innite planar
source in three dimensions (see Figure 6.5). This source can be integrated
over a region of width x
f
to produce a slab source as shown in Figure 6.6:
S =
1
2
_
erf
_
x (x
w
x
f
/2)

4t
_
erf
_
x (x
w
+ x
f
/2)

4t
__
(6.160)
The product of the ininite plan source and the innite line source gives
the point source solution (see Figure 6.7).
The set of free-space solutions Gringarten and Ramey generated is given
by I(x) to VI in Table 1 of their paper.
6.5.1 Adding Boundaries
Gringarten and Ramey added boundary conditions to the solutions for in-
nite plane and innte slab sources by using the method of images (which we
discussed at the start of the course. These solutions are VII(x) to XII(x) in
Table 2 of their paper. For instance consider constant pressure boundaries
79
PE281 - Applied Mathematics in Reservoir Engineering
x
y
z
x = x
w
Figure 6.5: Planar source
x
y
z
x
f
x = x
w
Figure 6.6: Slab source
80
PE281 - Applied Mathematics in Reservoir Engineering
Figure 6.7: 3D Point source as a product of a line source and a plane source
at x = 0 and x = x
e
. To ensure the pressure in the nal solution is zero we
will require that G = 0 on these boundaries (since G represent the eect of a
unit ow rate at the well at any location in space). The sequence of images
is shown in Figure 6.8.
The sequence extends innitely in both directions. The Greens function that
corresponds with this sequence is:
G =
1

4t
_
e

(xxw)
2
4t
e

(x+xw)
2
4t
e

(x2xe+xw)
2
4t
+ e

(x+2xexw)
2
4t
+ ...
_
(6.161)
G =
1

4t
_

n=
e

(xxw2nxe)
2
4t
e

(x+xw2nxe)
2
4t
_
(6.162)
This series can have convergence problems. It is better to expand it using
Poissons summation formula, which is:

f(n) =

n=
F
_
2n

_
(6.163)
where F is the Fourier transform of f.
F(s) =
1

2
_

f(x)e
ixs
dx (6.164)
81
PE281 - Applied Mathematics in Reservoir Engineering
x
w
x
e
2x
e
-x
w
2x
e
+ve
+x
w
+ve
-ve
x=0 -x
w
-2x
e
+x
w
-ve
+ve
Figure 6.8: Sequence of image wells
We will need
F
_
e

(xxw2nxe)
2
4t
_
(6.165)
and
F
_
e

(x+xw2nxe)
2
4t
_
(6.166)
Begin by dening a new variable, x = 2nx
e
. We will do the Fourier transform
in terms of this variable. The rst shift theorem can be applied to give:
F
_
e

(xxw2nxe)
2
4t
_
= e
is(xxw)
F
_
e

(2nxe)
2
4t
_
(6.167)
= e
is(xxw)
F
_
e

x
2
4t
_
(6.168)
= e
is(xxw)
1

2
_

e
is x
e

x
2
4t
d x (6.169)
We will evaluate this integral by completing the square in the exponent. The
exponent is:

_
x
2
4t
+ is x
_
=
_
(
x

4t
+

4tis
2
)
2
+ ts
2
_
(6.170)
Recall the following useful integral which will help us evaluate the integral
we require for the Fourier transform:
_

e
z
2
A
2
dz =

A (6.171)
82
PE281 - Applied Mathematics in Reservoir Engineering
Using this result the Fourier transform we need is:
e
is(xxw)
1

_
4te
s
2
t
=
_
2te
is(xxw)
e
s
2
t
(6.172)
Now return to the summation:

n=
e

(xxw2nxe)
2
4t
=

n=

2
2x
e
_
2te
is(xxw)
e
s
2
t
(6.173)
where we have replace the in Poissions summation formula by 2x
e
. We
still need to consider the s.
s =
2n

=
2n
2x
e
=
n
x
e
(6.174)
So the summation for the Greens function is:
G =
1

4t
_

n=
e

(xxw2nxe)
2
4t
e

(x+xw2nxe)
2
4t
_
(6.175)
=
1

4t

4t
2x
e
_

n=
e

in(xxw)
xe
e

2
n
2
t
x
2
e
e

in(x+xw)
xe
e

2
n
2
t
x
2
e
_
(6.176)
=
1
2x
e
_

n=
e

2
n
2
t
x
2
e
_
e

in(xxw)
xe
e

in(x+xw)
xe
_
_
(6.177)
The terms in square brackets can be expanded in terms of sines and cosines
to give:
_
e

in(xxw)
xe
e

in(x+xw)
xe
_
=
_
cos(
nx
x
e
) isin(
nx
x
e
)
_
2isin(
nx
w
x
e
)
(6.178)
The product of the cosine and sine terms is zero when summed (recall the
integral of an even function times an odd function is also zero), so only the
sine terms remain. Finally when we substitute back into G we have:
G =
1
x
e
_

n=
e

2
n
2
t
x
2
e
sin(
nx
x
e
)sin(
nx
w
x
e
)
_
(6.179)
Because of the symmetry in the sine terms we have
G =
2
x
e
_

n=1
e

2
n
2
t
x
2
e
sin(
nx
x
e
)sin(
nx
w
x
e
)
_
(6.180)
83
PE281 - Applied Mathematics in Reservoir Engineering
w
y
w
y=0
x=0 x
Figure 6.9: Well/boundary geometry
6.5.2 General Rectangular Reservoirs
The appropriate source functions for bounded rectangular reservoirs can be
generated by applying Newmanss product theorem and using suitable one-
dimensional solutions e.g. consider a fully completed well in a reservoir that
is innite in the y direction and has constant ux boundaries in x.
The appropriate source function is I(y).V II(x)
6.5.3 Recovering the Pressure
The pressure equation is:
k

2
p c
p
t
= q (6.181)
where q represent sources and sinks caused by wells. This can be rearranged
to give:

2
p
p
t
=
1
c
q (6.182)
84
PE281 - Applied Mathematics in Reservoir Engineering
Once the appropriate source function has been determined the drawdown
can be found by evaluating the following integral:
p(t) =
1
c
_
t
0
q()S(t )d (6.183)
6.6 Greens Function Summary
- Trying to solve a dierential equation of the form Lu(x, t) = f(x, t) where
u is an unknown function and f is a known forcing function.
- The rst step is to determine the adjoint operator, L

:
_ _

vLud = boundary terms +


_
uL

vd (6.184)
- Determine specic boundary conditions for G by zeroing the boundary
terms arising from L

. If you only want a free-space Greens function dont


worry about the boundary conditions.
- Solve for G: Multiply Lu = f by G and integrate. Work in terms of dummy
variables x
i
and .
_ _

G(x, x
i
, t, )Lu(x
i
, )d =
_ _

Gf(x
i
, )d (6.185)
Now refer back to the adjoint equation:
_ _

G(x, x
i
, t, )Lu(x
i
, )d = boundary terms +
_ _

u(x
i
, )L

Gd
(6.186)
This equation implies that setting:
L

G = (x
i
x, t) (6.187)
will allow us to solve for u(x, t)
u(x, t) =
_ _

Gf(x
i
, )d boundary terms (6.188)
- Wheres the singularity?
While we are solving for G the domain of the problem is x
i
, so the singu-
larity is at a point x, t, but ...
... once we have G and are thinking about what it means physically G is the
eect on u (in the domain x, t) of a singularity at x
i
, .
85
Chapter 7
Numerical Methods
7.1 Boundary Element Method
The boundary element method (BEM) is a numerical method which solves
a dierential equation (Lu = f) in an integral form. Well begin by con-
sidering the Laplace equation, however other equations (including transient
equations) ca be considered:

2
p
x
2
+

2
p
y
2
= 0 (7.1)
7.1.1 Derivation of the Boundary Integral Equation
The derivation of BEM begins from Greens second identity. For two arbi-
trary functions f and g Green proved the following:
_ _

(f
2
g g
2
f)d =
_

f
g
n
g
f
n
d (7.2)
where n is the normal to the boundary.
In our case we will take:
f = p (7.3)
g = G =
1
2
ln(1/r) (7.4)
where
r =
_
(x
i
x)
2
+ (y
i
y)
2
(7.5)
86
PE281 - Applied Mathematics in Reservoir Engineering

Figure 7.1: Location of singularity


and G is the free-space Greens function for the problem.

_ _

(p
2
GG
2
p)d =
_

p
G
n
G
p
n
d (7.6)
This equation is key to the derivation of BEM. It shows how we can
convert domain integrals into boundary integrals for the same problem. To
proceed further well break up the domain into the sume of a circle sur-
rounding the singularity (
e
) and the remainder,
e
. First consider the
remainder:

_ _
e
(p
2
GG
2
p)d =
_
+e
p
G
n
G
p
n
d (7.7)
Within this domain both
2
G = 0 and
2
p = 0.
0 =
_

p
G
n
G
p
n
d +
_
e
p
G
n
G
p
n
d (7.8)
Now consider the integral over
e
further, noting that d = rd:
G
n
=
G
r
r
n
=
1
2
1
r
(1) =
1
2r
(7.9)
_
e
p
G
n
G
p
n
d =
1
2
_
2
0
[p
1
r
ln
1
r
p
n
]rd (7.10)
=
1
2
_
2
0
(p + rln(r)
p
n
)d (7.11)
87
PE281 - Applied Mathematics in Reservoir Engineering
node
linear element
Figure 7.2: Boundary Discretisation
Consider the limit as r 0:
=
1
2
(2p) = p(x
i
, y
i
) (7.12)
Now substitute this result back into equation 7.8:
p(x
i
, y
i
) +
_

p
G
n
d =
_

G
p
n
d (7.13)
If the point (x
i
, y
i
) is on the boundary this equation must be modied to:

2
p(x
i
, y
i
) +
_

p
G
n
d =
_

G
p
n
d (7.14)
where is the boundary angle (pi at smooth boundaries, pi/2 at right
angle etc).
Note that at this stage no approximations have been introduced. The
dierential equation has been converted to an equivalent integral represen-
tation.
7.1.2 Boundary Discretisation
To obtain a numerical solution to the problem the boundary is divided into
nodes and elements.
The geometry of the boundary and the variation of the unknown (pres-
sure) is interpolated over the elements in terms of nodal values and shape
88
PE281 - Applied Mathematics in Reservoir Engineering
x=x x=x
=+1
1 2
=1
Figure 7.3: Local coordinate
functions (N
j
). Figure 7.2 shows a linear element i.e. the boundary geometry
is approximated by a straight line connecting the nodes. Higher order ele-
ments are also possible. To improve the accuracy of the solution the elements
can either be rened into smaller elements, or higher order interpolation e.g.
quadratic can be used.
The shape functions are dened in terms of a local coordinate that runs
from -1 to 1 along the element.
The linear shape functions are:
x() = N
1
x
1
+ N
2
x
2
(7.15)
y() = N
1
y
1
+ N
2
y
2
(7.16)
p() = N
1
p
1
+ N
2
p
2
(7.17)
where
N
1
=
1
2
(1 ) (7.18)
N
2
=
1
2
(1 +) (7.19)
The quadratic shape functions are:
x() = N
1
x
1
+ N
2
x
2
+ N
3
x
3
(7.20)
N
1
=

2
(1 ) (7.21)
N
2
= (1 +)(1 ) (7.22)
N
3
=

2
(1 +) (7.23)
89
PE281 - Applied Mathematics in Reservoir Engineering
By breaking the boundary integral in equation 7.14 into the sum of inte-
grals over elements, and writing the expression for the pressure and geometry
of the elements in terms of shape functions we have:

2
p(x
i
, y
i
)+
M

m=1
2

j=1
p
j
_
1
1
G(r
i
)
n
N
j
()J()d =
M

m=1
2

j=1
p
j
n
_
1
1
G(r
i
)N
j
()J()d
(7.24)
where M is the number of elements and J() is a Jacobian which takes
account of the integral being performed over .
J() =
d
d
=

_
_
dx()
d
_
2
+
_
dy()
d
_
2
(7.25)
The discretised integral equation can be written in matrix form as:
Ap = B
p
n
(7.26)
Each row of this matrix equation arises from placing the source node
of the Greens function at a given node i on the boundary. The terms in
matrices A and B are usually too dicult to evaluate analytically.
A
ij
=
_
1
1
G(r
i
)
n
N
j
()J()d +

2

ij
(7.27)
B
ij
=
_
1
1
G(r
i
)N
j
()J()d (7.28)
7.1.3 Gauss Quadrature
The following integral can be evaluated (approximately) using Gauss quadra-
ture if f() is not singular:
_
1
1
f()d =
N

n=1
f(
n
)W
n
(7.29)
The integral is evaluated as the weighted (weights, W
n
) sum of function
values at a set of special points known as Gauss points (
n
). The integral
becomes more accurate as N increases.
N = 2

n
= 0.5773 (7.30)
90
PE281 - Applied Mathematics in Reservoir Engineering
W
n
= 1.0 (7.31)
N = 3

n
= 0, 0.7745 (7.32)
W
n
= 0.8888, 0.5555 (7.33)
N = 4

n
= 0.8611, 0.3399 (7.34)
W
n
= 0.3478, 0.6521 (7.35)
If i = j the integrals are singular special qaudratures can be used, how-
ever these may be computationally intensive or problem specic. Luckily a
physical arguement can be used to evaluate these diagonal terms once the o-
diagonals have been evaluated. For this problem if p is constant everywhere
we expect
p
n
at every node to be zero i.e.
Ap
const
= B
p
n
= 0 (7.36)
A
ii
=
N

j=1,j=i
A
ij
(7.37)
7.1.4 Boundary Conditions
The solution is not uniquely determined until boundary conditions have been
imposed. At every node pressure, pressure derivative or mixed boundary
conditions must be imposed. Note that for the problem being considered at
least one node must have a specied pressure. Once boundary conditions
have been set half the unknown p and
p
n
values can be eliminated from the
matrix equation to give:
A

x = b (7.38)
where x is a vector containing the unknown p and
p
n
values.
At smooth boundaries either p or q =
p
n
is set as a boundary condition:
At corners there are two values of q however. either
- specify both q values and solve for p
- specify one q value and p, then solve for the other q
- specify p and solve for both q values
91
PE281 - Applied Mathematics in Reservoir Engineering
q
p
Figure 7.4: Boundary conditions at a smooth boundary
q
p
q
Figure 7.5: Boundary conditions at a corner
If the last option is being used and extra equation is required. This can
be generated from the physics of the problem, or by breaking the boundary
up.
7.1.5 Matrix Solution
The matrix A

is fully populated and has the same dimension as the number


of boundary nodes. Direct solvers are usually used. The reduced size of the
matrix involved in BEM is one of its chief advantages. For instance, consider
solving a problem one a 100 by 100 grid. If nite dierences were being used
the matrix would be 10,000 by 10,000. The matrix would be sparse. If BEM
is used only the boundary nodes are required in the matrix problem so the
matrix is 400 by 400, however this matrix would be dense.
7.1.6 Calculating Internal Solutions
The pressure can be calculated at any internal point (note there is no internal
mesh) by placing the source point (x
i
, y
i
) of the Greens function at the point
92
PE281 - Applied Mathematics in Reservoir Engineering
q
p p
q
Figure 7.6: Broken boundary
of interest and revaluating the boundary integral equation.

2
p(x
i
, y
i
) =
M

m=1
2

j=1
p
j
_
1
1
G(r
i
)
n
N
j
()J()d+
M

m=1
2

j=1
p
j
n
_
1
1
G(r
i
)N
j
()J()d
(7.39)
Since we are considering internal points = 2. All the p
j
and
p
j
n
are known
since they are located on the boundary and have already been determined.
G is a function of (x
i
, y
i
) so the integrals must be revaluated.
Calculating the pressure at the internal points does not require a matrix
solve, only revaluation of the element integrals. The internal solutions can
be calculated sequentially, and only need to be calculated at the points of
interest.
7.1.7 Transient Problems
Suppose we wanted to solve:

2
p
x
2
+

2
p
y
2
=
p
t
(7.40)
If we begin from Greens second identity as before:
_ _

(f
2
g g
2
f)d =
_

f
g
n
g
f
n
d (7.41)
Well start by considering what happens when we divide into a small circle
surrounding the singularity and the remainder:

_ _
e
G
p
t
d =
_
+e
p
G
n
G
p
n
d (7.42)
93
PE281 - Applied Mathematics in Reservoir Engineering
since
p
=
p
t
. Were using the steady state Greens function used in the
previous section.
We could approximate
p
t
with a nite dierence i.e.:
p
t
=
p
t2
p
t1
t
(7.43)
however a domain integral is still required so the problem has lost its bound-
ary only character.
To handle transient problems in a boundary only manner alternative ap-
proaches are require. Well consider two - transient Greens functions and
solving the problem in Laplace space.
7.1.8 Transient Problems - Transient Greens Func-
tions
Weve already discussed how to nd Greens functions for equations of the
form:

2
p
x
2
+

2
p
y
2
=
p
t
(7.44)
.
If we have the correct Greens functions we can build a boundary only
solution method of the form:
Ap = Bq (7.45)
The procedure to do so involves multiplying the governing dierential by
G and integrating by parts. The A
ij
and B
ij
terms are now time dependent so
the element integrals must be reevaluated each time step. Computationally
ecient ways to do so are an ongoing research topic.
7.1.9 Transient Problems - Laplace Transform
If the initial pressure is zero then the Laplace transform of the dierential
equation is:

2
p
x
2
+

2
p
y
2
= s p (7.46)
The Greens function is available (in Laplace space) for this problem:
G =
1
2
K
o
(

sr) (7.47)
94
PE281 - Applied Mathematics in Reservoir Engineering
Using this Greens function a BEM scheme can be built which will solve
for p. To get p at any time of interest we can numerically invert this solution.
This removes the need to begin the solution procedure from t = 0 and march
forward in time.
7.1.10 Advantages of BEM
- No internal grid. The only discretisation errors come from the boundary
discretisation. Internal solutions are actually more accurate than the bound-
ary solutions. No grid orientation eect.
- Flexible geometry. Good boundary conformance.
- Reduction of dimensionality i.e. one dimensional grid required for a two
dimensional problem, two dimensional grid required for a three dimensional
problem. Smaller matrix to solve.
7.1.11 Disadvantages of BEM
- Only applicable to problems with a
2
operator e.g. diusion equation,
wave equation. Problems with convective terms can not be handled. For
reservoir engineering problems only applicable to single phase ow in homo-
geneous media.
- Transient problems are more complicated than steady-state.
- Dense matrix problem.
7.2 Alternatives to the Boundary Element Method
BEM is only applicable to problems we can nd the Greens function for. This
limits its applicability. The theory can be extended to a wider class of prob-
lems by considering alternative boundary element based methods including
the Dual Reciprocity Boundary Element Method (DRBEM) and the Green
Element Method (GEM). DRBEM is the more commonly used approach
however my Ph.D. research suggests GEM has some attractive properties for
reservoir engineering problems. The two approaches will be introduced in
the following sections.
95
PE281 - Applied Mathematics in Reservoir Engineering
7.2.1 Dual Reciprocity Boundary Element Method
Suppose we want to solve a problem of the form:

2
p = b(x, y) (7.48)
The function b is arbitrary so the Greens function for this problem is not
neccessarily available. The essence of the DRBEM approach is the following
expansion:
b
N

j=1

j
f
j
(7.49)
where the
j
are weights and the f
j
are a set of approximating functions. The
only restriction on the approximating functions is that they are the Laplacian
of some other function:

2
p
j
= f
j
(7.50)
One of the simplest functions satisfying this requirement is f = 1 + r.
The equation we are trying to solve can now be expressed as:

2
p =
N

j=1

j
f
j
=
N

j=1

2
p
j
(7.51)
This introduces a
2
operator on each side of equation so well can apply
the same procedure we used for the
2
p = 0 problem to derive a boundary
integral equation:

2
p(x
i
, y
i
)+
_

G
n
pd
_

G
p
n
=
N

j=1

j
(

2
p
j
(x
i
, y
i
)+
_

G
n
p
j

G
p
j
n
)
(7.52)
This can be written in matrix form as:
Ap Bq = (A

P B

Q) (7.53)
where

P and

Q are matrices whose columns contain the functions p
j
and q
j
evaluated at each node i.
Computational issues:
- internal nodes must be included in the matrix problem if the solution is
required at internal points. So the matrix problem is larger than it would be
for BEM and it remains dense.
96
PE281 - Applied Mathematics in Reservoir Engineering
- the weighting vector may require a signicant amount of calculation. In
transient problems this vector must be updated at each timstep.
- DRBEM does extend the theory of BEM to arbitrary problems (as long
as they include a
2
operator somewhere. Convective problems, such as the
convection-diusion equation can be considered using DRBEM.
7.2.2 The Green Element Method
The Green Element was derived by Professor Akpofure Taigbenu and is fully
explained is his book The Green Element Method. Its chief attraction is
its exibility and the fact that it generates a sparse matrix problem. The
matrix problem is however large.
Suppose we want to solve:

2
p = b(x, y) (7.54)
Again we will start from Greens second identity:
_ _

p
2
GG
2
pd =
_

p
G
n
G
p
n
d (7.55)
Substituing
2
p = b and splitting the domain into a circle surrounding the
singularity and the remainder (as before) gives:


2
p(x
i
, y
i
) +
_

p
G
n
G
p
n
d =
_ _

Gbd (7.56)
Note that no approximations have been made at this stage. Now GEM
departs from BEM:
- both the boundary and the domain are discretised.
- the boundary integral can be seen as the sum of integrals over the element
boundaries.
If both the boundary and the domain integrals are broken into the sum of
element integrals we have:


2
p(x
i
, y
i
) +
M

e=1
_
e
p
G
n
G
p
n
d =
M

e=1
_ _
e
Gbd (7.57)
Now shape functions are introduced to interpolate the pressure and q =
p
n
over the elements in terms of nodal values. In the case of linear shape
97
PE281 - Applied Mathematics in Reservoir Engineering
Figure 7.7: Overall boundary is equivalent to the sum of the element bound-
aries
functions:
p =
4

j=1
N
j
p
j
(7.58)
q =
4

j=1
N
j
q
j
(7.59)
b =
4

j=1
N
j
b
j
(7.60)
When these shape functions are substituted into (7.57) we have:


2
p(x
i
, y
i
)+
M

e=1
4

j=1
_
e
p
j
N
j
G
n
Gq
j
N
j
d =
M

e=1
4

j=1
_ _
e
Gb
j
N
j
d (7.61)
A matrix equation can be formed from this:
M

e=1
R
e
ij
p
j
+ L
e
ij
q
j
+ V
ij
b
j
= 0 (7.62)
where
R
e
ij
=
_
e
G
n
N
j
d (7.63)
L
e
ij
=
_
e
G
i
N
j
d (7.64)
V
e
ij
=
_ _
e
G
i
N
j
d (7.65)
98
PE281 - Applied Mathematics in Reservoir Engineering
7.2.3 Dealing with Heterogeneity
Single phase ow in heterogeneous reservoirs is governed by:
(
k

p) = c
t
p
t
(7.66)
This is not in a form suitable for solution with any BEM based method.
However a
2
operator can be extract by rearranging the equation in the
following manner:

2
p = lnk p +
c
t
k
p
t
(7.67)
99
Chapter 8
Errata
The following is a list of typos that were found after the original handout
was produced. There are inevitably even more. If you nd them please let
me know.
Eqn 2.20 should read lims sLf(t), the rst = sign is incorrect
Eqn 2.22 should have lims as the second limit
Eqn 2.63 should not have the rst negative sign
Eqn 2.66 should have limits of integration from s to innity
Eqn 2.81 should have limt on the right hand side
Eqn 3.48 should be limt
Eqn 3.73 should be pd = (pi-p)/(pi-pw)
Eqn 3.74 should be rd=1
Eqn 6.82 should nish with (x
i
x)dx
i
Eqn 6.84 should have 2B exp(2x) not B exp(2x)
Eqn 6.86 should nish with x xi 1
Eqn 6.171 should have z
2
/A
2
as the exponent
100

You might also like