Download as pdf or txt
Download as pdf or txt
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 find errors please contact me.
Rosalind Archer
rosalind@pangea

Chapter 1
Introduction
1.1

The Diffusion Equation

This course considers slightly compressible fluid flow in porous media. The
differential equation governing the flow can be derived by performing a mass
balance on the fluid 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)

p
where V = xA and q = kA
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
A|t+t A|t
= lim
to
x
t

(q) = (A)
x
t
Substituting Darcys law into (1.4) gives:

kA p

(A)
t

(1.3)
(1.4)

(1.5)

PE281 - Applied Mathematics in Reservoir Engineering

y
x

Figure 1.1: One-dimensional control volume


Now assume (for simplicity) that k, and A are constant:

x
x


k t

(1.6)

Now account for the dependence of on pressure by introducing the isothermal compressibility:
!
1
(1.7)
c=
p T
where T denotes that the derivative is taken at constant temperature.
Equation (1.7) defines and EOS (equation of state):
Z

psc

cdP =

sc

(1.8)

c(p psc ) = ln lnsc

(1.9)

c(ppsc )

= sc e

(1.10)

Now substitute (p) (equation 1.10) into equation 1.6):

p
sc ec(ppsc )
x
x


=
sc ec(ppsc )
+
sc ec(ppsc )
k
t
t

(1.11)

The right hand side terms in equation 1.11 require further attention. First
consider the final term,
:
t

p
= sc ec(ppsc) c
t
t
4

(1.12)

PE281 - Applied Mathematics in Reservoir Engineering


Now consider

.
t

First define the rock compressibility as:


1
cr =

(1.13)
T

p
= cr
t
t
Substitute equation 1.12 and 1.14 into 1.11:

x
x

(1.14)

p
(cr + c)
k
t

(1.15)

Let ct = cr + c. Now expand the spatial derivative in equation 1.15:

2 p p
ct p
+
=

2
x
x x
k t

(1.16)

Now consider the second term in equation 1.16:


p
p p

=
=
x x
x p x
p

p
x

!2

This term is expected to be small so it is usually neglected.


Finally we have:
2p
ct p
=
2
x
k t

1.2

(1.17)

(1.18)

Three-dimensional Case

The diffusion equation can be expressed using the notation of vector calculus
for a general coordinate system as:
2 p =

ct p
k t

(1.19)

For the case of the radial coordinates the diffusion equation is:
1
p
1 2p 2p
ct p
r
+ 2 2+ 2 =
r r
r
r
z
k t
!

(1.20)

PE281 - Applied Mathematics in Reservoir Engineering

1.3
1.3.1

Dimensionless Form
One Dimensional Problem

The pressure equation for one dimensional flow (equation 1.18) can be written
in dimensionless form by choosing the following dimensionless variables:
pD =

pi p
pi

(1.21)

x
L
where L is a length scale in the problem.

(1.22)

xD =

tD =

kt
ct L2

(1.23)

With this choice of dimensionless variables the flow equation becomes:


2 pD
pD
=
2
xD
tD

1.3.2

(1.24)

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
p
r
r r
r

ct p
k t

(1.25)

Boundary and initial conditions:


q=

2kh p
r ,
r

p = pi ,

r = rw

(1.26)

r , t

(1.27)

t = 0, r

(1.28)

p = pi ,
Begin by setting:

pD = (pi p)
6

(1.29)

PE281 - Applied Mathematics in Reservoir Engineering


where alpha must still be determined. The infinite acting boundary condition
becomes:
pD = (pi pi ) = 0,
r , t
(1.30)

The initial condition becomes:

pD = (pi pi ) = 0,

t = 0, r

(1.31)

Set the dimensionless length, rD as:


rD =

r
rw

(1.32)

tD =

t
t

(1.33)

Set dimensionless time, tD as:

where t must still be determined. Now substitute pD and rD into the pressure
equation:

pD
1
rD rw

+ pi
rD rw rD rw
rD rw

!

pD
ct + pi

tD t

(1.34)

Simplifying (1.34) gives:


1 1
pD
rD
2
rw rD rD
rD

ct pD
kt tD

ct rw2
k
!
pD
pD
rD
=
rD
tD

t =
1
rD rD

(1.35)
(1.36)
(1.37)

Finally determine from the inner boundary condition:


q=

2kh p
r
r

(1.38)

(No negative sign is required here because the flow is in the negative r direction)


q

pD
= rD rw

+ pi
(1.39)
2kh
rD rw

PE281 - Applied Mathematics in Reservoir Engineering


2kh
q
Nondimensionalise inner boundary condition:
=

pD
|r =1 = 1
rD D

1.4

(1.40)

(1.41)

Superposition

Solutions to complex problems can be found by adding simple solutions representing 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, pconst (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 flow rate. If
a well begins producing at rate q1 then at time t1 the rate changes to q2 the
flow 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:
pvar (r, t) = pconst (q1 , r, t) + pconst(q2 q1 , r, t t1 )

(1.42)

Superposition in Space
Production from multiple wells can be handled using superposition also. Suppose again we have a solution pconst (q, r, t) for the pressure distribution due
to a well located at the origin, flowing 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) = pconst (q1, r1, t) + pconst (q2, r2, t)
where
r1 =
r2 =

(1.43)

(x x1)2 + (y y1)2

(1.44)

(x x2)2 + (y y2)2

(1.45)

PE281 - Applied Mathematics in Reservoir Engineering

q1
q2

t1

=
q

q1

+
t1
t

-(q1-q2)

Figure 1.2: Flow rate variation

x
Figure 1.3: Well configuration

PE281 - Applied Mathematics in Reservoir Engineering

closed boundary

reservoir

image
producer
well

producer

Figure 1.4: Closed boundary


constant pressure boundary

reservoir

image
injector
well

producer

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 fictitious wells known as image wells are placed
in the reservoir in such a way that their effect 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 specified bottom hole pressures p1 and p2
a pressure solution can be obtained by summing two solutions for a single well
at specified 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 effect is likely to be small.
Wells with a Specified Flow Rate
A solution for a reservoir with multiple wells with specified flow rates can
be generated from solutions for a single well. Unlike the case of bottom hole
pressure controlled wells this solution will satisfy the flow rate boundary
condition at each well. This is possible because each superposed solution
conserves mass locally so it does not add any extra flow at the well locations.

11

Chapter 2
The Laplace Transform
The Laplace Transform is defined by:
L{f (t)} =

est f (t)dt = f(s)

(2.1)

Example:
f (t) = t

(2.2)

Use integration by parts, recall:


Z

dv
dt = uv|ba
dt

du
dt
dt

(2.3)

Choose u = t and v = 1s est


t st Z 1 st
e dt
L{f (t)} = e |0 +
s
s
0

(2.4)

1 st
1
= 0 + 2e
= 2
(2.5)
s
s
0
For the Laplace transform to exist the following requirements must hold:
a) f (t) have a finite number of maxima, minima and discontinuities
b) there exist constants , M, T such that


et |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:
e1 t |f (t)| < M
12

(2.7)

PE281 - Applied Mathematics in Reservoir Engineering


When this just holds is known as the abscissa of covergence.
Example:
f (t) = e2t
et e2t = e(2)t

(2.8)
(2.9)

(2.9) remains bounded for 2, therefore the abscissa of convergence for


this f (t) is 2.

2.1
2.1.1

Properties of Laplace Transforms


Theorem 1 - Linearity of the Laplace Transform
Operator
L{c1 f1 (t) + c2 f2 (t)} = c1 L{f1 (t)} + c2 L{f2 (t)}

the Laplace Transform is a linear operator.


Proof:
Z
L{c1 f1 + c2 f2 } =
est c1 f1 + c2 f2 dt
0

= c1

st

f1 dt + c2

est f2 dt

= c1 L{f1 (t)} + c2 L{f2 (t)}

2.1.2

(2.10)

(2.11)
(2.12)
(2.13)

Theorem 2 - Laplace Transform of a Time Derivative


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

Proof:
0

L{f (t)} =
Integrate by parts
st

=e

f (t)|
0

= f (0) + s

est f 0 (t)dt

(2.15)

f (t)(sest )dt

(2.16)

est f (t)dt

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


13

(2.14)

(2.17)
(2.18)

PE281 - Applied Mathematics in Reservoir Engineering

2.1.3

Theorem 3 - Laplace Transform of a Derivative


nf
L
tn
(

= s L{f (t)}

n1
X

si f ni1(0)

(2.19)

i=0

This can be proved by repeated application of Theorem 2.

2.1.4

Theorem 4 - Early Time Behaviour


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

(2.20)

t0

Proof:
Begin from Theorem 2
L{f 0 (t)} = sL{f (t)} f (0+ )

(2.21)

lim L{f 0 (t)} = lim sL{f (t)} f (0+ )

(2.22)

Now take limits:


s

If f 0 (t) is of exponential order:


lim est f 0 (t)dt 0

(2.23)

|f 0 (t)| < Met ,


I(b) =

|f 0 (t)|est dt <

s > as b

t > 0

Met est dt =

(2.24)
b
Me(s)t

(s )

(2.25)

lim 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 sL{f (t)} f (0+ )
s

proving theorem 4.

14

(2.27)

PE281 - Applied Mathematics in Reservoir Engineering

2.1.5

Theorem 5 - Late Time Behaviour


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

(2.28)

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

(2.29)

lim L{f 0 (t)} = lim sL{f (t)} f (0+ )

(2.30)

s0

Proof:
Begin from Theorem 2

Now take limits:


s0

s0

Expand the left hand side term:


lim

s0 0

st 0

f (t)dt =

st

f (t)lims0 e

dt =

f 0 (t)dt

= limt f (t) f (0)

(2.31)
(2.32)

Substituting (2.32) into (2.29) gives:


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

s0

2.1.6

(2.33)

Theorem 6 - Multiplication of a Transform by s

1
If L{f (t)} = s(s) then f (t) = t
L {(s)}
Proof:
F (t) = L1 {(s)}

(2.34)

Use Theorem 2:
L{F 0(t)} = sL{F (t)} F (0)

(2.35)

F (0) = lim sL{F (t)} = lim s(s)

(2.36)

= lim L{f (t)} = 0

(2.37)

and use Theorem 4:


s

Now consider F 0 (t) by returning to Theorem 2:


L{F 0 (t)} = sL{F (t)} = s(s) = L{f (t)}
15

(2.38)

PE281 - Applied Mathematics in Reservoir Engineering


Taking inverse Laplace Transforms of this gives:
L1 {L{F 0(t)}} = L1 {s(s)} = L1 {L{f (t)}}

(2.39)

F 0 (t) = L1 {s(s)} = f (t)

(2.40)

L{(s)} = f (t)
t
Example: Suppose we want to find the inverse transform of:
s
L{f (t)} = 2
s + a2
We know can use the following transform relationship to help us:
L{

sin at
1
}= 2
a
s + a2

(2.41)

(2.42)

(2.43)

Using theorem 6 we know:


f (t) =

2.1.7

sin at
= cos at
t a

(2.44)

Theorem 7 - Division of a Transform by s


L

Proof:
L

Z

t
0

Z

1
=
s

f (t )dt

1
+
s

f (t)dt =

Use integration by parts:




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

est

Z

(2.45)


f (t0 )dt0 dt

(2.46)

1
est f (t)dt = L{f (t)}
s

(2.47)

Example: Suppose we require the inverse transform of:


L{f (t)} =
We know:

s3

1
1 1
=
+ 4s
s s2 + 4

1
1
L 2
= sin 2t
s +4
2
Z t
1
1
f (t) =
sin 2tdt = (1 cos 2t)
4
0 2


16

(2.48)

(2.49)
(2.50)

PE281 - Applied Mathematics in Reservoir Engineering

2.1.8

Theorem 8 - First Shift Theorem


L{eat f (t)} = f(s + a)

Proof:
L{eat f (t)} =

2.1.9

eat est f (t)dt =

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

(2.51)

(2.52)

Theorem 9 - Second Shift Theorem


L{f (t a)u(t a)} = eas L{f (t)}

(2.53)

where u(t a) is a unit step function.

u(t a) = 1,
= 0,
Proof:
L{f (t a)u(t a)} =
=
=

a
Z
0

ta>0
otherwise

f (t a)u(t a)est dt

(2.54)
(2.55)
(2.56)
(2.57)

f (t a)est dt

(2.58)

f ( )es( +a) d

(2.59)

where = t a Apply Theorem 8:


= esa

0
sa

=e

2.1.10
Proof:

f ( )es d

(2.60)

Lf (t)dt

(2.61)

Theorem 10 - Multiplication by t
L{tf (t)} = f0 (s)

(2.62)

d Z st
0

f (s) =
e f (t)dt
ds 0

(2.63)

test f (t)dt

= L{tf (t)}
17

(2.64)
(2.65)

PE281 - Applied Mathematics in Reservoir Engineering

2.1.11

Theorem 11 - Division by t

Proof:

f (t)
L
t

f(s)ds =

f(s)ds

(2.66)

est f (t)dtds

(2.67)

est f (t)dsdt

est
f (t)
t
"

2.1.12

dt

(2.69)

f (t) st
e dt
t
0
(
)
f (t)
=L
t

(2.68)

(2.70)
(2.71)

Theorem 12 - Convolution
L{f (t)}L{g(t)} = L{
= L{

f (t )g()d}

f ()g(t )d}

= L{f (t) g(t)}

(2.72)
(2.73)
(2.74)

Proof:
First use the definition of the Laplace transform:
L{

f (t )g()d} =

f (t )g()estddt

(2.75)

Change limits on the integral by introducing a step function:


=

u(t )f (t )g()est ddt

(2.76)

(See Figure 2.1 for the step function.)


Change the order of integration:
=

g()

u(t )f (t )est dtd


18

(2.77)

PE281 - Applied Mathematics in Reservoir Engineering

Figure 2.1: Step function as a function of


u

Figure 2.2: Step function as a function of t


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

g()

Apply first shift theorem:


=

g()

Z

f (t )est dtd

s( +)

f ( )e

g()esd

19

d d

f ( )es d

= L{g(t)}L{f (t)}
where = t

(2.78)

(2.79)
(2.80)
(2.81)

PE281 - Applied Mathematics in Reservoir Engineering

2.2

Solving Differential Equations with Laplace


Transforms

Laplace transforms can be used as a powerful tool to solve differential equations. The general procedure is:
- transform both side of the equation
- solve the transformed equation to get an expression for the Laplace transform of the solution
- invert to find the solution in real space
This approach turns an ordinary differential equation into an alegbraic
equation and a partial differential equation in x and t into an ordinary differential equation in x or t.

2.2.1

Ordinary Differential Equation Example

Solve:
y 00 + 2y 0 + y = tet

(2.82)

y(t = 0) = 1

(2.83)

y 0 (t = 0) = 2

(2.84)

where

L{y 00} = s2 y sy(0) y 0(0)

(2.85)

L{y 0} = s
y y(0)

(2.86)

L{tet } =

(2.87)

1
(s + 1)2

s2 y s + 2 + 2s
y 2 + y =
Solve for y:
(s2 + 2s + 1)
ys=
(s + 1)
y=
y =

1
(s + 1)2

1
(s + 1)2

1
+s
(s + 1)2

1
s
+
4
(s + 1)
(s + 1)2
20

(2.88)

(2.89)
(2.90)
(2.91)

PE281 - Applied Mathematics in Reservoir Engineering


Now invert to find y. Consider the first term, we know (from tables):
L{t( n)} =

n!

(2.92)

sn+1

Combining this transform with the first shift theorem gives:


L

1
(s + 1)4

et t3
3!

(2.93)

Now consider the second term:


s
s+11
1
1
=
=

2
2
(s + 1)
(s + 1)
s + 1 (s + 1)2

(2.94)

We can use the known transforms:


L{1} =

1
s

(2.95)

and

1
s2
Combining this with the first shift theorem again gives:
L{t} =

s
(s + 1)2

= et et t

(2.96)

(2.97)

The final solution for y is:


t

y=e

2.3

t3
t+1
3!

(2.98)

Computing Laplace Transforms in Mathematica

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 specified. 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 different
treatments of the well and different boundary conditions.

3.1

Line Source Solution

This section considers infinite acting radial flow in a reservoir where the
well is modelled as a line source. The differential equation and boundary
conditions involved are:
1
p
r
r r
r

ct p
k t

(3.1)

A constant rate boundary condition is specified at r = 0.


q=

2kh p
r
r

(3.2)

The outer boundary condition is:


p = pi ,

r
23

(3.3)

PE281 - Applied Mathematics in Reservoir Engineering


The initial condition is:
p = pi ,

r, t = 0

(3.4)

This can be written in dimensionless form as:


pD =

2kh
(pi p)
q

(3.5)

r
rw
kt
tD =
ct rw2

(3.6)

rD =

1
pD
rD
rD rD
rD

(3.7)
pD
tD

(3.8)

pD (rD , tD = 0) = 0

(3.9)

pD (rD , tD ) = 0

(3.10)

pD
|r 0 = 1
(3.11)
tD D
The solution procedure begins by Laplace transforming both sides of the
pressure equation:
rD

1
pD
L
rD
rD rD
rD
1
rD rD

pD
rD
rD

!)

pD
=L
tD

= s
pD pD (rD , tD = 0)

2 pD
1 pD
+
s
pD = 0
2
rD
rD rD

(3.12)

(3.13)
(3.14)

A solution to this differential equation can be found by noting that it is an


example of a modified Bessel equation.

24

PE281 - Applied Mathematics in Reservoir Engineering

3.1.1

Bessel and Modified Bessel Equations

The Bessel equation is:


x2 y 00 + xy 0 + (x2 n2 )y = 0

(3.15)

y = c1 Jn (x) + c2 Yn (x)

(3.16)

where Jn is a Bessel function of the first kind of order n and Yn is a Bessel


function of the second kind or order n.
The modified Bessel equation is:
x2 y 00 + xy 0 (x2 + n2 )y = 0

(3.17)

y = c1 In (x) + c2 Kn (x)

(3.18)

where In and Kn are modified Bessel functions of order n.

3.1.2

Laplace Space Solution for pD

The transformed pressure equation can be written as:


2
rD

2 pD
pD
2
+ rD
rD
s
pD = 0
2
rD
rD

(3.19)

2 pD
pD
+
2 pD = 0
2

(3.20)

Substitute = rD s:
2
Solve for pD :

pD = c1 I0 (rD s) + c2 K0 (rD s)

(3.21)

Now consider the boundary conditions. First consider the infinite acting
condition. As rD , pD must remain bounded, however:
lim I0 (x) =

To prevent pD from going to infinity we set c1 = 0.

pD = c2 K0 (rD s)
25

(3.22)

(3.23)

PE281 - Applied Mathematics in Reservoir Engineering


The inner boundary condition is:
lim rD

rD 0

pD
lim L rD
rD 0
rD

pD
= 1
rD

= lim rD
rD 0

(3.24)

pD
1
= L{1} =
rD
s

(3.25)

To differentiate the Bessel function we need the following recurrence relationship:



d  n
x Kn (x) = xn Kn+1 (x)
(3.26)
dx
Substituting (3.26) into (3.25) gives:
lim rD

rD 0



1
c2 K0 (rD s) =
rD
s

(3.27)

h
i

1
(3.28)
lim c2 rD sK1 (rD s) =
rD 0
s
To evaluate the limit we can use the following limiting form of Kv for small
arguments:
1
1
(3.29)
Kv (z) (v)( z)v
2
2

1
lim K1 (rD s) =
(3.30)
rD 0
rD s

c2 lim

rD 0

rD s

rD s

1
s
Finally we have the complete solution for pD :
c2 =

1
pD (rD , s) = K0 (rD s)
s

1
s

(3.31)
(3.32)

(3.33)

Now invert pD to find pD . This can be achieved by recalling theorem 7:


L

Z

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


26

(3.34)

PE281 - Applied Mathematics in Reservoir Engineering

To proceed the inverse transform of K0 (rS s) is required. Transform pair


117 from the handout gives the following:
L1 {K0 (rD
pD =

2
rD
1
s)} =
exp
2tD
4tD

tD

2
1
rD
exp
dtD
2tD
4tD

(3.35)

(3.36)

This integral can be evaluated by using substitution:


2
rD
4tD

u=

tD =
dtD =

(3.37)

2
rD
4u

(3.38)

2
rD
du
4u2

(3.39)

Equation (3.36) becomes:


pD =

r2
D
4tD

2
4u
rD
1
exp(u)
du =
2
2
2rD
4u
2

r2
D
4tD

exp(u)
du
u

(3.40)

Now introduce the exponential integral, Ei(x):


Ei(x) =

eu
du
u

(3.41)

(This definition follows Abramowitz and Stegun, Handbook of Mathematical Functions, Dover, 1970. Note that in some references Ei(x) is denoted
by E1 (x) - be careful!)
1
r2
pD = Ei D
2
4tD

(3.42)

Finally the answer is written in dimensional terms:


q
r 2 ct
p = pi +
Ei
4kh
4kt
27

(3.43)

PE281 - Applied Mathematics in Reservoir Engineering

3.1.3

Late Time Behaviour of pD

We can consider the late time behaviour of pD by recalling theorem 5 and


taking the limit of pD as s 0.

1
pD (s) = K0 (rD s)
s

(3.44)

The limit can be handled by using a series expansion for K0 :


1 2
z
x
1 ( 14 z 2 )2
4
K0 (x) = (ln + )I0 (x) +
+ (1 + )
+ ...
2
(1!)2
2 (2!)2

lim K0 (x) = ln
x0

 

(3.45)
(3.46)

where = Eulers constant, 0.5772.


lim pD =

s0

1
ln rD + ln s ln 2 +
s

(3.47)

1
lim pD = L
(ln rD + ln s ln 2 + )
(3.48)
t
s

Using transform pair 95 from the handout to invert the ln s term gives:
1

1
= ln rD + ln 2 + ( + ln tD )
2
1
tD
ln 2 + 0.80907
=
2
rD

3.2

(3.49)
(3.50)

Finite Well Radius Solution

The line source solution applies the constant flow rate condition as r tends
to zero. This simplifies the solution process. However an analytical solution
can also be obtained when the flow rate condition is applied at r = rw . The
governing equation and boundary conditions remain the same as the line
source solution, except for the inner boundary condition which is now:
rD

pD
|r =1 = 1
rD D
28

(3.51)

PE281 - Applied Mathematics in Reservoir Engineering


As before when the differential equation is written in Laplace space we have:

2 pD
1 pD
+
s
pD = 0
2
rD
rD rD

As before the general solution to the problem is:

pD = c1 I0 (rD s) + c2 K0 (rD s)

(3.52)

(3.53)

The solution must remain bounded as r tends to infinity so as before we set


c1 = 0:

pD = c2 K0 (rD s)
(3.54)
Now consider the inner boundary condition. It requires that:

1
(c2 K0 (rD s) =
rD
s

1
c2 sK1 (rD s) =
s
1
c2 = 3

s 2 K1 ( s)

rD = 1

(3.55)
(3.56)
(3.57)

The final solution for pD is:

K0 (rD s)
pD = 3

s 2 K1 ( s)

3.2.1

(3.58)

Early Time Behaviour of pD

The early time behaviour of pD can be examined by considering the limit of


pD as s . To do so the behaviour of the Bessel functions is required for
large arguments.
Kv (x)

x
1 ( 1)( 9)
e (1 +
+
+ ....
2x
8x
2!(8x)2

(3.59)

where x is large and = 4v 2 .

K0 (rD s) =

29

erD s
2rD s

(3.60)

PE281 - Applied Mathematics in Reservoir Engineering


and

K1 ( s) =

e s
2 s

(3.61)

So at late time pD is:


1

pD =

s2

2 s s
erD s
e
2rD s

(3.62)

1
(3.63)
e s(rD 1)
rD
s
The solution for pD can be found using transform pair number 85 from the
handout:

3
2

!
1 tD (rD4t1)2
rD 1
D

2
e
(rD 1)erf c
pD (rD , tD ) =
rD

2 tD

pD (rD = 1, tD ) = 2

3.2.2

tD

(3.64)

(3.65)

Late Time Behaviour of pD

To find the late time behaviour of pD consider the limit of pD at s 0. First


consider the behaviour of the Bessel functions. As before:
1
lim K0 (x) = [ln( x) + ]
2

x0

(3.66)

For small arguments Kv (x) can be approximated by:


1
1
Kv (x) = (x)( x)v
2
2

(3.67)

1 1
1
lim K1 (x) = ( x)1 =
x0
2 2
x

(3.68)

where (x + 1) = x!

Recall the solution for pD :

K0 (rD s)
pD = 3

s 2 K1 ( s)
30

(3.69)

PE281 - Applied Mathematics in Reservoir Engineering


The late time behaviour of pD can be found by performing the following
inverse transform:

1 [ln( 1 r

s)
+
]
1
D
2
pD = L1
= L1 (ln rD +ln sln 2+) (3.70)
3
1
s2

s
s
!

1
tD
=
ln 2 + 0.80907
2
rD
This is the same late time behaviour as the line source solution.

3.3

(3.71)

Constant Pressure Inner Boundary Condition

The previous two solutions have considered constant rate boundary conditions at the well. It is also possible to consider constant pressure boundary
conditions. It becomes more convenient to define the dimensionless pressure,
pD , in terms of both the initial reservoir pressure, pi , and the well pressure,
pw :
pi p
(3.72)
pD =
pi pw
The dimensionless form of the pressure equation is as before:
1
pD
rD
rD rD
rD

pD
tD

(3.73)

For an infinite acting reservoir the boundary and initial conditions in dimensionless form are:
pD (rD , tD ) = 1 rD = 1
(3.74)
pD (rD , tD ) = 0
pD (rD , tD = 0) = 0

As before the general solution to this problem is:

pD = c1 I0 (rD s) + c2 K0 (rD s)

(3.75)
(3.76)
(3.77)

Again c1 is set to zero to ensure the pressure remains finite as r . The


inner boundary condition is used to solve for c2 :

1
pD (rD = 1) = c2 K0 ( s) =
s
31

(3.78)

PE281 - Applied Mathematics in Reservoir Engineering


1

(3.79)
sK0 ( s)

K0 (rD s)

pD (rD ) =
(3.80)
sK0 ( s)
The inverse transform to solve this problem was provided by Van Everdingen and Hurst, The Application of the Laplace Transformation to Flow
Problems in Reservoirs, Petroleum Transactions AIME, 305-324, 1949 (see
equation VI-26):
c2 =

2
pD (rD , tD ) =

3.3.1

(1 eu

2t
D

)[J0 (u)Y0 (urD ) Y0 (u)J0 (urD )]


du
u2 [J02 (u) + Y02 (u)]

(3.81)

Early Time Behaviour of the Flow Rates

Just as the early time behaviour of the pressure could be considered in the
constant flow rate case, the behaviour of the flow rate can be examined for
the constant pressure case:
pD
rD

(3.82)

qD dtD

(3.85)

qD = rD

!
pD

K0 (rD s)

qD = rD
= rD
(3.83)
rD
rD sK0 ( s)
Using the previously established expression for the derivative of K0 gives:

rD K1 (rD s)

qD =
(3.84)
s K0 ( s)
The cumulative recovery is defined by:
QD =

td

The Laplace transform of QD can be found readily by recalling theorem 7:

rD K1 (rD s)
1

QD = qD = 3
(3.86)
s
s 2 K0 ( s)
To consider the early time behaviour of the flow rates consider the limit of
qD as s . The early time behaviour of the Bessel functions have already
been established:
s

erD s
(3.87)
K1 (rD s)
2 srD
32

PE281 - Applied Mathematics in Reservoir Engineering

e s
2 s
s
s

rD
rD

rD s 2 s
s

qD =
e
e = e s(rD 1)
s 2 srD

K0 ( s)

qD can now be found by using transform pair 84 from the tables:

rD (rD4t1)2
D
qD =
e
tD

(3.88)
(3.89)

(3.90)

QD (at early time) can be found by using transform pair 85:


s

QD = rD 2

(r 1)2
D
4tD

!
rD 1

(rD 1)erf c
2 tD

(3.91)

Note the similarity between this and Equation (3.64) (early time behaviour
of the pressure for constant rate, finite radius well).

3.4

Bounded Reservoir Example

The previous examples have considered flow in infinite acting reservoirs. Linear boundaries in reservoirs with either constant pressure or constant flow
rate wells can be created using superposition as discussed in Chapter 1. Consider a case with a constant flow rate and the well and a constant pressure
at the outer boundary (at radius re ). The boundary and initial conditions in
dimensionless form are:
rD

pD
= 1
rD

pD = 0
pD = 0

rD =

rD = 1

(3.92)

re
= rDe
rw

(3.93)

tD = 0, rD

As before the general solution to this problem is:

pD = c1 I0 (rD s) + c2 K0 (rD s)

33

(3.94)

(3.95)

PE281 - Applied Mathematics in Reservoir Engineering


However in this example the reservoir is bounded so c1 can not be set to zero
by arguing that pD must remain bounded as rD tends to infinity. Instead the
outer boundary condition requires:

c1 I0 (rDe s) + c2 K0 (rDe s) = 0
(3.96)
The inner boundary conditions requires:

1
[c1 I0 (rD s) + c2 K0 (rD s)] =
rD
s

rD = 1

(3.97)

The derivatives of the Bessel functions can be found from:


d n
[x Kn (x)] = xn Kn+1 (x)
dx
d n
[x In (x)] = xn In+1 (x)
dx
Using these derivatives (3.97) becomes:

1
c1 sI1 ( s) c2 sK1 ( s) =
s

1
c1 I1 ( s) c2 K1 ( s) = 3
s2
The outer boundary condition requires:

c1 I0 (rDe s) + c2 K0 (rDe s) = 0

(3.98)
(3.99)

(3.100)
(3.101)

(3.102)

Equations (3.101) and (3.102) can be solved for c1 and c2 to give:

1
K0 (rDe s)

c1 = 3
(3.103)
s 2 K0 (rDe s)I1 ( s) + K1 ( s)I0 (rDe s)

1
I0 (rDe s)

c2 = 3
(3.104)
s 2 K0 (rDe s)I1 ( s) + K1 ( s)I0 (rDe s)

1 I0 (rDe s)K0 (rD s) K0 (rDe s)I0 (rD s)

pD = 3
(3.105)
s 2 K0 (rDe s)I1 ( s) + K1 ( s)I0 (rDe s)
The late time (steady state) behaviour of pD can be determined by taking
the limit of pD as s tends to infinity:
rD
pD = ln
(3.106)
rDe
34

PE281 - Applied Mathematics in Reservoir Engineering

3.5

Van Everdingen and Hurst

Van Everdingen and Hursts 1949 paper was one of the first 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 flow rate) and the cumulative production (from
a well operating at constant pressure):
1
spD QD = 2
s

rD = 1

(3.107)

Van Everdingen and Hurst also demonstrated how to add wellbore storage
to a problem:
s
pDxx
(3.108)
pD =
s(1 + scD s
pDxx )

3.6

Incorporating Storage and Skin

Wellbore storage means that even if a well is produced at constant flow rate
the flow from the reservoir into the wellbore may be transient. The additional
flow can come from either the expansion of fluid in the wellbore or a changing
liquid level in the tubing.

3.6.1

Fluid Expansion
qtotal = qreservoir + qexpansion

(3.109)

The amount of flow from fluid expansion is defined by:


qexpansion =

Vw
Vw p
p
=
= cw V w
t
p t
t

(3.110)

The relevant storage coefficient, C is defined by:


C = cw V w

3.6.2

(3.111)

Falling Liquid Level

If a well is completed without a packer there may be liquid in the annulus.


This fluid may be produced when the bottom hole pressure is lowered. The
35

PE281 - Applied Mathematics in Reservoir Engineering


relevant storage coefficient, C is defined by:
C=

3.6.3

Aw
g

(3.112)

Laplace Space Solution

If the Laplace space solution for a problem which has no storage and no skin
is given by pDxx then solution for a problem with a skin, S, and storage, cD
is:
s
pDxx + S
s[1 + scD (s
pDxx + S)]
The dimensionless storage cD is defined by:
pD =

CD =

3.7

5.615C
2ct hrw2

(3.113)

(3.114)

Incorporating Dual Porosity

In dual porosity reservoirs flow occurs in both the matrix and in the fractures.
Their are two important parameters in dual porosity reservoirs:
=

f ctf
f ctf + m ctm

0<<1

(3.115)

km 2
r
1010 < < 103
(3.116)
kf w
where depends on the fracture configuration e.g. sugar cube model
The governing equation in Laplace space for a dual porosity reservoir is:
=

1
pD
rD
rD rD
tD

where

sf (s)
p=0

(3.117)

s(1 ) +
(3.118)
s(1 ) +
For the case of an infinite acting reservoir with a finite radius the solution
for pD is:
q
K0 ( sf (s))
q
pD = q
(3.119)
s sf (s)K1 ( sf (s))
f (s) =

36

PE281 - Applied Mathematics in Reservoir Engineering


(for more details see Well Test Analysis, Rajagopal Raghavan, Englewood
Cliffs, 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
defined 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 efficiently
and effectively in Laplace space. The efficiency 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 offshore platform to onshore production facilities. Heat transfer was a particular concern because the fluids
could form solid hydrates if the temperature fell below a critical level.
The pipe is buried below the sea floor. This makes the computational
domain semi-infinite. However in the part of the study that used Laplace
transforms an effective cylinder configuration was used as shown in Figure
3.1.
Two energy balance equations are required in this problem. The first
governs the temperature distribution in the pipe surrounds:
ke 2 Te = e ce

Te
t

(3.120)

The second energy balance governs the fluid in the pipe which is flowing
37

PE281 - Applied Mathematics in Reservoir Engineering

Surroundings, T
o
Burial medium, Te

Pipe, Tp

ri
ro

Figure 3.1: Configuration of pipe and surrounds


at velocity, U:

Tp
Tp
2
+ p cp U
= q
t
x
ri
where q is the flux of heat through the pipe wall:
p cp

q = ke

Te
|r=ri
r

(3.121)

(3.122)

The solution procedure involved solving for the Laplace transform of Te in


terms of Tp . This expression was then substituted into the equation governing
the Laplace transform of Tp . Finally the Tp was solved for.
An example of this solution given below for the case of the pipeline heating
up at start-up:

T
s
2k
s
To
i
o
e
Tp (x, s) =
exp(( +
)x) +
(3.123)
s
U
ri p cp U
s
where

= K0 ( sri )I0 ( sro ) Ko ( sro )I0 ( sri )

e ce
ke

= K0 ( sr0 )I1 ( sri ) + K1 ( sri )I0 ( sro )


=

(3.124)
(3.125)
(3.126)

The transient pipeline temperature distribution could be found by numerically inverting the expression for Tp . The results from this approach
38

PE281 - Applied Mathematics in Reservoir Engineering


were much closer to field test results than results from a large finite difference 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 Transforms

The inverse Laplace transform can also be written as an integral:


f (t) = L1 {F (s)} =

1 Z + st
e F (s)ds
2i i

(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 summation is performed:
!
N
ln 2 X
ln 2

f (t) =
Vi f
i
(3.128)
t i=1
t
where

Vi = (1) 2+i

min(i,N/2)

k=(

i+1
2

k 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 Vi grow quickly in magnitude with N and round-offs errors are
amplified. Usually N = 8 is used in numerical inversions. This means that
are required.
for every value of f (t) required 8 values of f(s)
The Stehfest algorithm works well for smooth functions but has difficulties 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 97120) is one of the most accurate and widely applicable. Other algorithm seek
values in the evaluation of subsequent f (t)
to reuse previously evaluated f(s)
values.

3.11

Summary

This chapter has outlined several petroleum engineering applications of Laplace


transforms including:
- the line source solution
- the finite 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 efficiently 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 field results more accurately than the numerical
model results.

40

Chapter 4
Fourier Transforms
Like the Laplace transform the Fourier transform is also an integral transform. 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 defined by:

F (s) =

f (x)ei2xs dx

(4.1)

The inverse transform is defined in a similar manner:

f (x) =

F (s)ei2xs ds

(4.2)

for F (s). The Fourier transform exists if


We will also use the notation f(s)
f (x) and f 0 (x) are at least piecewise continuous and the following integral
exists:
Z
|f (x)|dx
(4.3)

There are also some alternative definitions:


Z

1
2

1
F (s) =
2

F (s) =
f (x) =
and

f (x)eixs dx

41

(4.4)

F (s)eixs ds

(4.5)

f (x)eixs dx

(4.6)

PE281 - Applied Mathematics in Reservoir Engineering


1
f (x) =
2
Example:

F (s)eixs ds

f (x) = ex
F (s) =
=
=

(4.8)

ex ei2sx dx

(x2 +i2xs)

e(x

= es

dx

2 +i2xss2 +s2 )

2 s2

e(x+is)
Z

= es

(4.7)

(4.10)
dx

dx
2

e(x+is) dx

Z
2

(4.9)

e dx

(4.11)
(4.12)
(4.13)
(4.14)

where = x + is The integral in (4.14) is known to be 1.0 so we have:


F (s) = es

(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:
ei2xs = cos(2xs) + i sin(2xs)

(4.16)

Now consider the inverse transform:


f (x) =

F (s)ei2xs 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|
). The ammplitude associated with any given frequency is given by F (s).
2
Example:
Consider f = cos(x). The Fourier transform of f is:
1
1
F (s) = ( + 2s) + ( + 2s)
(4.18)
2
2
i.e.
1
f (x) = (cos(x) + i sin(x) + cos(x) + i sin(x))
(4.19)
2
1
(4.20)
= (cos(x) + cos(x)) = cos(x)
2
42

PE281 - Applied Mathematics in Reservoir Engineering

1.0

0.8

0.6

0.4

cos(x)

0.2

0.0

-0.2

-0.4

-0.6

-0.8

-1.0
-3

-2

-1

Figure 4.1: f (x) = cos(x)

Frequency spectrum

1.0

0.8

0.6

0.4

Amplitude

0.2

0.0

-0.2

-0.4

-0.6

-0.8

-1.0
-1.0

-0.8

-0.6

-0.4

-0.2

0.0

0.2

0.4

0.6

0.8

1.0

Frequency

Figure 4.2: Frequency spectrum of f (x) = cos(x)

43

PE281 - Applied Mathematics in Reservoir Engineering

4.1
4.1.1

Fourier Transform Theorems


Theorem 1 - Linearity
F (f (x) + g(x)) = F (f (x)) + F (g(x))

4.1.2

(4.21)

Theorem 2 - Shift Theorem

If
F (f (x)) = F (s)

(4.22)

F (f (x a)) = ei2sa F (s)

(4.23)

then
Proof:
F (f (x a)) =
=

f (x a)ei2sx dx

f (x a)ei2s(xa)i2sa d(x a)

= ei2sa

4.1.3

(4.24)
(4.25)

f (x a)ei2s(xa) d(x a)

(4.26)

= ei2sa F (s)

(4.27)

Theorem 3 - Similarity Theorem

If
F (f (x)) = F (s)
F (f (ax)) =

4.1.4

1
F
|a|

(4.28)
s
a

 

(4.29)

Theorem 4 - Convolution Theorem

If
F (f (x)) = F (s)

(4.30)

F (g(x)) = G(s)

(4.31)

F (f (x) g(x)) = F (s)G(s)

(4.32)

and
then

44

PE281 - Applied Mathematics in Reservoir Engineering

4.1.5

Theorem 5 - Parsevals theorem


Z

4.1.6

|f (x)|2dx =

|F (s)|2ds

(4.33)

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 defined as:


F (f (x)) =
=

f (x)ei2sx dx

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

(4.35)
(4.36)

Now consider a case where f (x) is the sum of an even and an odd function,
fe (x) and fo (x).
Recall for an odd function:
fo (x) = fo (x)

(4.37)

sin(x) is an example of an odd function.


For an even function:
fe (x) = fe (x)

(4.38)

cos(x) is an example of an even function.


With f (x) defined as the sum of an even and odd function the Fourier transform of f (x) becomes:
F (f (x)) =

(fe (x) + fo (x))cos(2sx)dxi

(fe (x) + fo (x))sin(2sx)dx

(4.39)
Now take account of the way products of even and odd functions behave:
fe (x)ge (x) = he (x)

(4.40)

fo (x)go (x) = he (x)

(4.41)

45

PE281 - Applied Mathematics in Reservoir Engineering


fo (x)ge (x) = ho (x)

(4.42)

Also note the following integral:


Z

fo (x)dx = 0

(4.43)

Now substitute these relationships into (4.39):


F (f (x)) =
=2

fe (x) cos(2sx)dx i

fe (x) cos(2sx)dx 2i

fo (x) sin(2sx)dx

(4.44)

fo (x) sin(2sx)dx

(4.45)

The fact that the Fourier transform splits into two terms (sine and cosine)
motivates the definition of the sine and cosine transforms:
Fc (f (x)) =

Fc1 (Fc (s)) =

Fc (f ) = s
Fs (f (x)) =
Fs1 (Fs (s))

00

f (x)cos(xs)dx = Fc (s)

(4.47)

2 0
f (0) s2 Fc (s)

(4.48)

f (x)sin(xs)dx = Fs (s)

(4.49)

Fc (s)cos(xs)ds = f (x)

(4.46)

Fs (s)sin(xs)ds = f (x)

(4.50)

2
f (0) s2 Fs (s)
(4.51)

Use of sine and cosine transforms simplifies 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-infinite domains
- differential equation that have even orders of derivatives
- either f of f 0 specified at the boundary
Fs (f 00 ) = s

46

PE281 - Applied Mathematics in Reservoir Engineering

4.3

Example 1: 1D Pressure Diffusion

Consider a one dimensional problem governed by:


2 pD
pD
=
2
xD
tD

(4.52)

pD (xD = 0, tD ) = 1

(4.53)

pD (xD , tD ) = 0

(4.54)

pD (xD , tD =) = 0

(4.55)

The boundary conditions are:

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 differential equation (in space):
s

2
pD
pD (xD = 0, tD ) s2 pD =

tD
s

pD
2
+ s2 pD =

tD

This equation can be solved using the integrating factor method:


dy
+ P (x)y = Q(x)
dx
R

P dx

ye

tD

2 s2 (tD )
se
d

s2 tD

pD e

pD =
=

tD

Qe

P dx

(4.57)

(4.58)

dx + C

(4.59)

2 s2
se d + C

(4.60)

21
2
(1 es tD )
s
47

(4.56)

(4.61)
(4.62)

PE281 - Applied Mathematics in Reservoir Engineering


Now invert to find pD :
Fs1 (
pD )
2
=

= 1 Erf

2Z
pD sin(sxD )ds
0

(4.63)

21
2
(1 es tD ) sin(sxD )ds
s
x
D
4tD

xD
= Erf c
4tD

(4.64)
(4.65)

where Erf (z) and Erf c(z) are the error function and the complimentary
error function defined by:

4.4

Z z
2
2
Erf (z) = =
et dt

(4.66)

Erf c(z) = 1 Erf (z)

(4.67)

Example 2: Heat Equation

Consider the diffusion of heat in a one-dimensional bar. Well consider an


infinitely long bar so the full Fourier transform is required. The governing
equation is:
2T
T
2 2 =
(4.68)
x
t
The boundary conditions are:
T (x , t) = T 0 (x ) = 0

(4.69)

The initial condition is a prescribed temperature that varies in space:


T (x, t = 0) = T0 (x)

(4.70)

First consider the Fourier transform of the spatial derivatives:


1
F (f (x)) =
2
0

1
1
= f (x)eisx |

2
2
48

eisx f 0 (x)dx

(is)f (x)eisx dx

(4.71)
(4.72)

PE281 - Applied Mathematics in Reservoir Engineering


Since f (x) vanishes at
= (is)F (f (x))

(4.73)

Similar arguments require f 0 (x) vanishes at . The transformed differential equation is:
T
+ 2 s2 T = 0
(4.74)
t
2
T = c1 e(s) t
(4.75)
Now consider the initial condition:
T(t = 0) = T0 = c1

(4.76)

2
T = T0 e(s) t

(4.77)

1 Z isx (s)2 t
T =
e T0 e
ds
2

(4.78)

1 Z

T0 =
T0 ()eis d
2

(4.79)

Now invert to find T :

The transform of T0 is:

1 isx is
2
e
e
T0 ()e(s) t dds
T =
2

Z
Z
1
2
T0 ()
eis(x)(s) t dsd
=
2

Finally we have an expression for T in terms of T0 :


Z

T =

4.5

1
42 t

T0 ()e

(x)2
42 t

(4.80)
(4.81)

(4.82)

Example 3: Elliptic Problem

Consider a steady-state problem in a two-dimensional semi-infinite 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-infinite and the pressure is specified on the boundary
we will use the sine transform to transform the differential equation:
2p 2p
+
x2 y 2

Fs

=0

2
2 p
p(0, y) s2 p + 2 = 0

2 p
s2 p = 0
y 2
This equation can be solved for T to give:

T = c1 cos(isy) + c2 sin(isy)

(4.88)

(4.89)
(4.90)

(4.91)

Now use the boundary conditions to determine c1 and c2 :


Fs (p(x, y = 0)) = Fs (f (x)) = F1

(4.92)

Fs (p(x, y = a)) = 0

(4.93)

After some algebra we can show:


sinh(s(a y))
sinh(sa)

(4.94)

sinh(z) = isin(iz)

(4.95)

p = F1
where
Now invert to find p:
p=

F1

sinh(s(a y))
sin(xs)ds
sinh(sa)
50

(4.96)

PE281 - Applied Mathematics in Reservoir Engineering


where

2
f ()sin(s)d
0
Substituting F1 into the expression for p gives:
F1 =

y
=

4.6

f ()

(4.97)

sinh(s(a y))
sin(s)sin(sx)dds
sinh(sa)
!

1
1
f () 2
2
d
2
y + (x )
y + (x + )2

(4.98)
(4.99)

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 pD
1 pD
pD
+
=
2
rD
rD rD
tD

(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 first derivative would vanish 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 = pi would be suitable. However now the boundary conditions
become time dependent if the flow begins at t = 0.
The Hankel transform is better suited to radial problems.
Hv () =
f (r) =

rJv (r)f (r)dr

(4.101)

Jv (r)Hv ()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 evaluations 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:
fk = f (xk ),

xk = k,

k = 0, 1, 2, ..., N 1

(4.103)

We will seek estimates of the Fourier transform at discrete values of s:


sn =

n
N

(4.104)

The Fourier transform at sn is:


F (sn ) =

f (x)e2ixsn dx

N
1
X

fk e2isn xk =

k=0

N
1
X
k=0

fk e2ikn/N
(4.105)

Similarly the inverse transform is:


fk =

1
1 NX
F (sn )e2ikn/N
N n=0

(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

1.5
1
0.5
20

40

60

80

100

-0.5
-1
-1.5
-2

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 first N/2 values of the Fourier
transform correspond to frequencies of 0 < f < fmax . The second N/2 values
of the Fourier transform correspond to the frequencies fmax < f < 0. Note
that the value at n = N/2 corresponds to both f = fmax and fmax .
Note the discrete Fourier transform (DFT) only considers a finite range
of frequencies because it uses a finite number of sn . If there are frequencies
beyond this present in the true Fourier transform and effect known as aliasing occurs. As shown in Figure 4.5 aliasing occurs when frequencies beyond
the range of the chosen set of sn are present. Aliasing folds these frequencies back into the computed Fourier transform. Aliasing can be avoided by
filtering 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 efficiently than that (O(Nlog2 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 implementation. The FFT arises by noting that a DFT of length N can be
53

PE281 - Applied Mathematics in Reservoir Engineering

5
4
3
2
1
20

40

60

80

100

Figure 4.4: Fourier transform

aliased Fourier transform


H( f )

1
2

true Fourier transform

1
2

Figure 4.5: Aliasing effect (from Numerical Recipes in C, Cambridge University 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 (sk ) =

N
1
X

e2ijk/N fj

(4.108)

j=0

N/21

N/21
2ik(2j)/N

f2j +

j=0

j=0

(4.109)

e2ikj/(N/2) f2j+1

(4.110)

j=0

N/21

e2ik(2j+1)/N f2j+1

N/21
2ikj/(N/2)

f2j + W

j=0

where
W = e2i/N

(4.111)

= F e (sk ) + W k F o (sk )

(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 first 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
defined by:
1
F (s) =
2

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

1
f (t) =
F (s)[cos(2st) + sin(2st)]ds
2
The notation cas(2st) is sometimes used:

cas(2st) = cos(2st) + sin(2st)

(5.1)
(5.2)

(5.3)

Like the Fourier transform alternative definitions are possible:


F (s) =

1
2

f (t) =

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

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

(5.4)
(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 infinite (or bounded) radial problems because we must make assumptions about the behaviour of the pressure
at . The Hankel transform is a more suitable choice:
Z

Fv () =
f (r) =

rJv (r)f (r)dr

(5.6)

Jv (r)Fv ()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:
Z

Fv ()Gv ()d =

57

f (x)g(x)xdx

(5.8)

PE281 - Applied Mathematics in Reservoir Engineering


Derivatives
Consider the Hankel transform of g(x) = f 0 (x).
Gv () =

f 0 (x)Jv (x)xdx

(5.9)

d
[xJv (x)]dx
(5.10)
dx
0
Assume that f (x) is such that the first term is zero. Now consider the
derivatives of the Bessel functions:
=

[xf (x)Jv (x)]


0

f (x)

d
x
[xJv (x)] =
[(v + 1)Jv1 (x) (v 1)Jv+1 (x)]
dx
2v

(5.11)

v+1
v1
Fv1 ()
Fv+1 ()]
2v
2v
Note that v = 0 is a special case.
Gv () = [

(5.12)

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) =

1 d
v2
d2
f
(x)
+
f
(x)

f (x)
dx2
x dx
x2
Gv () = 2 Fv ()

(5.13)
(5.14)
2

Note that the terms in the radial diffusivity equation, rp2 +


instance of Bessels equations so in radial (no , z) coordinates:
F0 (2 p) = 2 F0 ()

1 p
,
r r

are an
(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

z=h

line sink

z
porous media

z=0
r

Figure 5.1: Source/sink configuration

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, consider fluid injection into a porous medium in the context of biological tissue.
They note though that their solution is also relevant to subsurface fluid flow.
The configuration 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:
(r ) (r)
2 p 1 p 2 p
+
+ 2 =

(z zo )
2
r
r r z
r
r
"

(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
2 p = ((z z0 ) J0 (p))
2
z

(5.17)

where p is the Hankel transform of p;


The solution for p is:
p =

cosh(z0 )
J0 ()
cosh((z 1))
,
sinh()
2
59

z[z0 , 1]

(5.18)

PE281 - Applied Mathematics in Reservoir Engineering

p =

cosh((z0 1))
J0 ()
cosh((z))
,
sinh()
2

z[0, z0 ]

(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 differential 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=

d2
d
+
2
dx
dx

(6.1)

d2 u du
+
(6.2)
dx2 dx
The adjoint of L is written L . It is defined by multiplying Lu by another
(arbitrary) function v and integrating:
Lu =

vLu dx = boundary terms +

61

uL v dx

(6.3)

PE281 - Applied Mathematics in Reservoir Engineering


Example:
L = a(x)

d2
d
+ b(x) + c(x)
2
dx
dx

(6.4)

Lu = a(x)

d2 u
du
+ b(x)
+ c(x)u
2
dx
dx

(6.5)

v[au00 + bu0 + cu]dx

(6.6)

i.e.
What is L ?
A=

Integrate by parts (term by term):


Z

00

vau dx = vau
Z

u (va) dx = vau (va) u +


0

vbu dx = uvb

A = vau0 (va)0 u + uvb +

u(va)00 dx

u(vb)0 dx

u[(va)00 (vb)0 + vc] dx =

Now consider L v a little more:

(6.7)
(6.8)

uL v dx (6.9)

L v = (va)00 (vb)0 + vc = (v 0 a + a0 v 0 )0 v 0 b b0 v + vc

(6.10)

= v 00 a+a0 v 0 +a00 v+a0 v 0 v 0 bb0 v+vc = av 00 +(2a0 b)v 0 +(a00 b0 +c)v (6.11)
L = a(x)

d
d
+ (2a0 (x) b(x)) + (a00 (x) b0 (x) + c(x))
2
dx
dx

(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:
2a0 b = b

(6.13)

a00 b0 + c = c

(6.14)

b = a0

(6.15)

i.e. if b = a0 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

k=3
3/2

k=2

1/2

-1

-1/2 -1/3

k=1

1/3 1/2

Figure 6.1: Wk 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, Wk :
k
,
2

Wk =

0,

|x| < k1
otherwise
(6.16)

Now think about what happens as k . The area under Wk is:


lim

1
k

k
k
dx =
2
2

k 1
k

1
k

k1

k 1 1
+
=1
2 k k

dx

(6.17)

(6.18)

(x) = 1.0

(6.19)

Define (x) = limk Wk

(x) =

0, x 6= 0
, x = 0
63

(6.20)

PE281 - Applied Mathematics in Reservoir Engineering

H(x-a)

x=a

Figure 6.2: Heavisde function


Integrals Involving (x)
Z

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

(6.21)

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


Z

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

(6.22)

Derivatives Involving (x)


This is easier to consider in integral form.
Z

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

=

More generally:
Z

(x)h0 (x) dx

(x)h0 (x) dx

(6.23)
(6.24)

n (x a)h(x)dx = (1)n hn (a)

(6.25)

Heaviside Step Functions and the Dirac Delta Function


The Heaviside step function is written H(x a).
Consider:
Z

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

a)h(x)|

64

H(x a)h0 (x) dx (6.26)

PE281 - Applied Mathematics in Reservoir Engineering


= h()

H(x a)h0 (x)dx

= h()

h0 (x)dx

(6.28)

= h() (h() h(a)) = h(a)


Z

(x a)h(x) dx

(6.29)
(6.30)

H (x a) = (x a)

6.1.3

(6.27)

(6.31)

Greens Functions

Consider a differential 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 = L1 f

(6.33)

Since L is a differential operator we expect L1 to be an integral operator.


L1 must satisfy the usual properties of an inverse:
LL1 = L1 L = I

(6.34)

Now define the inverse operator as:


L1 f =

G(x, xi )f (xi )dxi

uL Gdxi =

(6.35)

To find the Greens function G(x, xi ) for the problem consider what happens
when Lu = f is multiplied by G and integrated over the domain:
Z

GLu(xi )dxi =

Gf (xi )dxi

(6.36)

This equation shows that (6.35) is an appropriate definition of L1 if:


L G(x, xi ) = LG(x, xi) = (xi x)

(6.37)

The boundary conditions for this problem can be found by setting the boundary terms to zero.
Z
u = G(x, xi )f (xi )dxi
(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
6.2.1

Greens Function Examples


Self Adjoint Problem

Use Greens functions to solve:


u00 (x) = (x),

x[0, 1]

u(0) = u(1) = 0

(6.39)
(6.40)

Step 1: Find L
Note we are working with u(xi ) not u(x).
Z

1
0

Gu00dxi = Gu0 |10

Gu0|10

uG0 |10

i.e.
L =

u0G0 dxi

uG00 dxi

d2
dx2

(6.41)
(6.42)

(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)u0(1) G(x, 0)u0(0) = 0

(6.44)

G0 (x, 1)u(1) G0 (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
d2 G
= (xi x)
dx2i

dG
= H(xi x) + Axi
dxi

G = (xi x)H(xi x) + Axi + B

(6.48)
(6.49)
(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 = (xi x)H(xi x) + (x 1)xi

(6.56)

Step 4: Solve for u


u(x) =

[(xi x)H(xi x) + (x 1)xi ](xi )dxi

(6.57)

Symmetry and Interpretation of G


Note the symmetry in G.
When xi < x:
G = (x 1)xi

(6.58)

G = (xi 1)x

(6.59)

When xi > x:
This symmetry is something that should be expected for self adjoint problems. Physically G can be interpreted as the deflection of a beam in response
to an incremental load (xi )dxi at point xi .

67

PE281 - Applied Mathematics in Reservoir Engineering

6.2.2

Non-Self Adjoint Problem

Use Greens functions to solve:


u00 (x) + 3u0(x) + 2u = f,

x[0, 1]

(6.60)

u(1) = 2u(0)

(6.61)

u (1) = a

(6.62)

Step 1: Find L
Z

GLudxi = Gu0 |10


Gu0 |10

u|10

1
0

1
0

u0 G0 dxi + 3Gu|10 3
00

uG dxi +

3Gu|10

L =

0
1

uG0 dxi + 2
0

uG dxi + 2

d2
d
3 +2
2
dx
dx

0
1

uGdxi (6.63)

uGdxi (6.64)
(6.65)

The problem is not self adjoint.


Step 2: Consider Boundary Terms
G(x, 1)u0(1) G0 (x, 1)u(1) + 3G(x, 1)u(1)
G(x, 0)u0 (0) + G0 (x, 0)u(0) 3G(x, 0)u(0) = 0

(6.66)

aG(x, 1) + u(0)[2G0 (x, 1) + 6G(x, 1) + G0 (x, 0)] = 0

(6.67)

Substitute in the boundary conditions for u:

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 boudnary terms. We will choose to carry aG(x, 1) through the problem and set:
2G0 (x, 1) + 6G(x, 1) + G0 (0, x) = 0

(6.69)

As in the self adjoint problem we will multiply Lu by G and integrate


over .
Z

GLudxi = boundary terms +


68

uL Gdxi =

Gf dxi

(6.70)

PE281 - Applied Mathematics in Reservoir Engineering


By zeroing out as many boundary terms as possible and choosing L G =
(xi x) this becomes:
Z

Gf dxi = aG(x, 1) + u(x)

(6.71)

Step 3: Solve for G


It is convenient to solve the problem in two parts.
d2 G
dG
3
+ 2G = 0,
2
dxi
dxi

0 xi < x

(6.72)

dG
d2 G
3
+ 2G = 0,
2
dxi
dxi

x < xi 1

(6.73)

The singularity at xi = x will be handled by imposing conditions on the


constants of integration. The general solution to this problem is:
G = Aexi + Be2xi ,

0 xi < x

(6.74)

G = Cexi + De2xi ,

x < xi 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)

2G0 (x, 1) + 6G(x, 1) + G0 (0, x) = 0

2(Ce + 2De2 ) + 6(Ce + De2 ) + (A + 2B) = 0


A + 2B + 4Ce + 2De2 = 0

(6.78)
(6.79)
(6.80)

We will require that G is continuous at xi = x:


Aex + Be2x = Cex + De2x

(6.81)

Finally we will consider what happens when we integrate past xi = x:


Z

x+0

x0

00

G 3G + 2Gdxi =
69

x+0

x0

(xi x)dxi

(6.82)

PE281 - Applied Mathematics in Reservoir Engineering


x+0
dG x+0
|x0 3G|x+0
+
2
Gdxi = 1
(6.83)
x0
dxi
x0
Because we have required G to be continuous the second and third terms in
this equation are zero so we have:

(Cex + 2De2x ) (Aex + 2Be2x ) = 1

(6.84)

We now have four equations to solve for the constants. The final solution for
G is:
1
G = (2e2(1x) 4e1x )(exi e2xi ), 0 xi x
(6.85)
k
1
G = (2e2x 2e2 1)exi x + (4e4e1x + ex )e2xi x , x xi <= 1 (6.86)
k
where
k = 1 4e + 2e2
(6.87)
Step 4: Solve for u
u(x) = aG(x, 1) +

6.3

G(x, xi )f (xi )dxi

(6.88)

Partial Differential Equations

Consider a general second order partial differential equation, on a domain :


Lu = Auxx + 2Buxy + Cuyy + Dux + Euy + F u = f

(6.89)

This assumes the independent variables are x and y but x are t are also
possible. This equation can be classified 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

n
i

Figure 6.3: Relationship of dy to d

6.3.1

Adjoint Operator

As before the adjoint operator is defined in terms of the following integral:


ZZ

vLu d = boundary terms +

Z Z

uL v d

(6.90)

We will work out the first term in the general case for the adjoint operator:
Z Z

=
=

y2

y1

vAuxx d =

y2
y1

vAux |xx21

[vAux

y2

y1

y2

y1

(Z

x2

vAuxx dx dy

x1

x2

x1

(vA)x u]xx21

(6.91)

(vA)x ux dx dy

x2

x1

[vAux (vA)x u]xx21 dy +

(6.92)


(vA)xx udx dy

ZZ

(vA)xx ud

(6.93)
(6.94)

Now consider the boundary integration more carefully. The boundary () is


an arbitrary function of x and y.
dy = d cos = ~i ~nd

(6.95)

Therefore the integral being evaluated is:


Z

[vAux (vA)x u]~i ~nd +


71

ZZ

(vA)xx ud

(6.96)

PE281 - Applied Mathematics in Reservoir Engineering


Treating all terms in this manner gives the following relationship between
L nand L :
ZZ

vLu d =

(M~i + N~j) ~nd +

ZZ

uL v d

(6.97)

where
L v = (Av)xx + 2(Bv)xy + (Cv)yy (Dv)x (Ev)y + F v

(6.98)

M = Avux u(Av)x + 2vBuy + Duv

(6.99)

N = 2u(Bv)x + Cvuy u(Cv)y + Euv

(6.100)

Common Operators
Equation
Laplace
Helmholtz
Diffusion
Wave

Lu
2 u
2 u + k 2 u
ut uxx
c2 uxx utt

L v
2 v
2 v + k 2 v
vt vxx
c2 vxx vtt

Of these four the diffusion equation is the only one that is not self-adjoint.
It can be proven that:
Ax + By = D
(6.101)
and
Bx + Cy = E

(6.102)

are necessary and sufficient 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 xi , y yi ) = limk Wk (r)
where
r=

(x xi )2 + (y yi )2
72

(6.103)
(6.104)

PE281 - Applied Mathematics in Reservoir Engineering


and

k2
Wk = ,

= 0,

r
r>

1
k

1
k

(6.105)
(6.106)

and/or
2

kekr
(6.107)

The two dimensional delta function has similar properties to the one dimensional delta function:
Wk (r) =

ZZ

(x xi , y yi )h(x, y)d = h(xi , yi )

(x xi , y yi ) = (x xi )(y yi )

6.3.3

(6.108)
(6.109)

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 = Gf + Gb

(6.110)

where Gf satisifes L Gf = (xi x, yi y) without taking account of any


particular boundary conditions on G or Gf . The function Gf is known as a
free-space Greens function. The function Gb takes account of the boundary
terms for a particular problem.
Example: Two-Dimensional Laplace Equation
L Gf = G
f = (xi x, yi 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 Gf
(r
)=0
r r r

Gf
=A
r
73

(6.112)
(6.113)

PE281 - Applied Mathematics in Reservoir Engineering

e
x,y

yi
xi

Figure 6.4: Integration around singularity


A
Gf
=
r
r
Gf
A

=
r
r
Gf = Alnr + B

(6.114)

where
r=

(6.115)
(6.116)

(xi x)2 + (yi y)2

(6.117)

Now consider the singularity by integrating over a disc surrounding the singularity as shown in Figure 6.4.
ZZ

2 Gf d =

ZZ

(xi x, yi 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:
ZZ

(f g g f )d =
74

g
f
f
g
d
n
n

(6.119)

PE281 - Applied Mathematics in Reservoir Engineering

ZZ

2 Gf d =
=

Now substitute Gf = Alnr + B:

Gf
dr
r

Gf
rd
r

= A

1
rd
r

(6.120)
(6.121)

(6.122)

Recalling the left hand side of Equation 6.118 must equal 1 we have:
2A = 1

(6.123)

A=1

(6.124)

i.e.
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.:
1
lnr
2

Gf =

(6.125)

Example: One-Dimensional Diffusion Equation


The diffusion equation is:
Lu =

u 2 u
2
t
x

(6.126)

Referring to the general expression for L and L we have the following L :


L =

2
2
t x

(6.127)

To find the (free-space) Greens function we will solve:


L Gf =

Gf
2 Gf
+
= (xi x)( t)

x2i

(6.128)

Well use a Fourier transform to do this, specifically:


1
F (s) =
2

75

f (xi )eixi s dxi

(6.129)

PE281 - Applied Mathematics in Reservoir Engineering

1
Gf
s2 Gf = ( t) eixs

(6.130)

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

Gf
s2 Gf = 0,

Gf
s2 Gf = 0,

This equation can be readily solved for Gf :

>t

(6.131)

<t

(6.132)

2
Gf = Aes ,

>t

(6.133)

2
Gf = Bes ,

<t

(6.134)

Now take account of the singularity by integrating past it:

t+0

t0

dGf
d s2
d

t+0

t0

1
Gf d =
2

t+0
t0

( t)eixs d

(6.135)

We require Gf to be continuous so the second integral in the above equation


vanishes to give:
1
2
2
(6.136)
(Aes Bes ) = eixs
2
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 xi . 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:
s2 t
1
B = eixs e
(6.137)
2
Gf = 0, > t
(6.138)
s2 t
s2
1
Gf = eixs +
2

76

>t

(6.139)

PE281 - Applied Mathematics in Reservoir Engineering


Gf can be written more compactly as:
H(t ) ixs s2 t + s2

Gf =
e
2

(6.140)

The Fourier transform can be inverted to give:


2
i x)
H(t ) (x
Gf = q
e 4(t )
4(t )

6.4

(6.141)

The Newman Product Theorem

This theorem is not specific to the solution of the differential equations that
give rise to Greens functions (L G = (xi x) etc). The theorem allows us to
find solutions to differential equations in multiple dimensions from solutions
to one-dimensional problems. We will consider the diffusion equation in three
dimensions:
2u 2u 2u
1 u
+ 2+ 2 =
(6.142)
2
x
y
z
t
on the domain
a1 x b1

(6.143)

a2 y b2

(6.144)

a3 z b3

(6.145)

u(x, y, z, 0) = U(x)V (y)W (z)

(6.146)

with initial conditions

Note being able to express the initial condition in this product form is
essential.
The boundary conditions can be constant u, constant flux or mixed on each
edge.
Now consider solving three one-dimensional problems:
2 u1
1 u1
=
,
2
x
t
77

a1 x b1

(6.147)

PE281 - Applied Mathematics in Reservoir Engineering


1 u2
2 u2
=
,
y 2
t

a2 y b2

2 u3
1 u3
=
,
a3 y b3
2
z
t
The initial conditions for this set of equations are:

(6.148)
(6.149)

u1 (x, 0) = U(x)

(6.150)

u2 (y, 0) = V (y)

(6.151)

u3 (z, 0) = W (z)

(6.152)

and the boundary conditions are taken from the original problem. The solution for u is:
u(x, y, x, t) = u1 (x, t)u2 (y, t)u3(z, t)
(6.153)
Proof: Substitute (6.153) into the diffusion equation (6.142):
2 u1 u2 u3 2 u1 u2 u3 2 u1 u2 u3
2u 2u 2u
+
+
=
+
+
x2 y 2
z 2
x2
y 2
z 2

(6.154)

Expanding the derivatives gives:


2 u1
2 u2
2 u3
+
u
u
+
u
u
1
3
1
2
x2
y 2
z 2

(6.155)

1 u2
1 u3
1 u1
+ u1 u3
+ u1 u2
t
t
t

(6.156)

= u2 u3
Now substitute in (6.147):
= u2 u3

1 u
(6.157)
t
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 Solving Unsteady-Flow Problems in Reservoirs. SPEJ, October 1973, pg 285,
applied Greens functions and the Newman product theorem to reservoir engineering problems. Gringarten and Ramey derived both free-space Greens
functions and Greens functions satisfying boundary conditions for rectangular, homogeneous, anisotropic reservoirs. Gringarten and Ramey define 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=

(xxw )2
1
e 4t
4t

(6.158)

where

p
=0
(6.159)
t
Note that this one dimensional source corresponds to an infinite planar
source in three dimensions (see Figure 6.5). This source can be integrated
over a region of width xf to produce a slab source as shown in Figure 6.6:
2 p

"

1
S=
erf
2

x (xw xf /2)

erf
4t

x (xw + xf /2)

4t

!#

(6.160)

The product of the inifinite plan source and the infinite 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 infinite plane and infinte 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

y
x

x = xw

Figure 6.5: Planar source

y
x

xf

x = xw

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 = xe . To ensure the pressure in the final solution is zero we
will require that G = 0 on these boundaries (since G represent the effect of a
unit flow rate at the well at any location in space). The sequence of images
is shown in Figure 6.8.
The sequence extends infinitely in both directions. The Greens function that
corresponds with this sequence is:
(xxw )2
(x+xw )2
(x2xe +xw )2
(x+2xe xw )2
1
4t
4t
e 4t e 4t e
+ e
+ ...
4t
(6.161)
(
)
X (xxw 2nxe )2
(x+xw 2nxe )2
1
4t
4t
G=
e
e
(6.162)
4t n=

G=

This series can have convergence problems. It is better to expand it using


Poissons summation formula, which is:




X
2 X
2n
f (n) =
F
(6.163)
n=

where F is the Fourier transform of f .


1
F (s) =
2

81

f (x)eixs dx

(6.164)

PE281 - Applied Mathematics in Reservoir Engineering

+ve

+ve
-ve

-ve
+ve

-2x e+xw -x
w

xw

x=0

xe

2x e-x w

2x e +x w

Figure 6.8: Sequence of image wells


We will need

F e
and

F e

(xxw 2nxe )2
4t

(6.165)

(x+xw 2nxe )2
4t

(6.166)

Begin by defining a new variable, x = 2nxe . We will do the Fourier transform


in terms of this variable. The first shift theorem can be applied to give:


F e

(xxw 2nxe )2
4t

is(xxw)

=e

is(xxw)

=e

F e
2

4t

F e

(2nxe )2
4t

(6.167)
(6.168)

x
2
1 Z isx 4t
d
x
(6.169)
= eis(xxw)
e
e
2
We will evaluate this integral by completing the square in the exponent. The
exponent is:
!
!

x2
x
4tis 2
2

+ is
x = (
+
) + ts
(6.170)
4t
4t
2

Recall the following useful integral which will help us evaluate the integral
we require for the Fourier transform:
Z

z 2

e A2 dz =
82

(6.171)

PE281 - Applied Mathematics in Reservoir Engineering


Using this result the Fourier transform we need is:
q
1 q
2
2
eis(xxw )
4tes t = 2teis(xxw ) es t
2

Now return to the summation:

(xxw 2nxe )2
4t

n=

n=

2 q
2
2teis(xxw ) es t
2xe

(6.172)

(6.173)

where we have replace the in Poissions summation formula by 2xe . We


still need to consider the s.
2n
2n
n
=
=

2xe
xe

s=

(6.174)

So the summation for the Greens function is:

X
(xxw 2nxe )2
(x+xw 2nxe )2
1
4t
4t
e
e
G=
4t n=
(
)

2 2
2 2
in(xxw ) n t
in(x+xw ) n t
1
4t X
2
2

xe
xe
e
e xe e
e xe
=
4t 2xe
n=

1
=
2xe

2 n2 t
x2
e

n=

in(xxw )
xe

in(x+xw )
xe

)

(6.175)
(6.176)
(6.177)

The terms in square brackets can be expanded in terms of sines and cosines
to give:
nx
nxw
nx
) isin(
) 2isin(
)
xe
xe
xe
(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:


in(xxw )
xe

in(x+xw )
xe

1
G=
xe

= cos(

2 n2 t
x2
e

n=

nx
nxw
sin(
)sin(
)
xe
xe

(6.179)

Because of the symmetry in the sine terms we have


2
G=
xe

n=1

2 n2 t
x2
e

nx
nxw
sin(
)sin(
)
xe
xe

83

(6.180)

PE281 - Applied Mathematics in Reservoir Engineering

x=0

y
w

y=0

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 onedimensional solutions e.g. consider a fully completed well in a reservoir that
is infinite in the y direction and has constant flux 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
p c
=q

(6.181)

where q represent sources and sinks caused by wells. This can be rearranged
to give:
p
1
2 p
= q
(6.182)
t
c
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) =

6.6

1
c

q( )S(t )d

(6.183)

Greens Function Summary

- Trying to solve a differential equation of the form Lu(x, t) = f (x, t) where


u is an unknown function and f is a known forcing function.
- The first step is to determine the adjoint operator, L :
ZZ

(6.184)

Gf (xi , )d

(6.185)

vLud = boundary terms + uL vd

- Determine specific 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 xi and .
ZZ

G(x, xi , t, )Lu(xi , )d =

Now refer back to the adjoint equation:


ZZ

ZZ

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

ZZ

u(xi , )L Gd
(6.186)

This equation implies that setting:


L G = (xi x, t)

(6.187)

will allow us to solve for u(x, t)


u(x, t) =

ZZ

Gf (xi , )d boundary terms

(6.188)

- Wheres the singularity?


While we are solving for G the domain of the problem is xi , so the singularity is at a point x, t, but ...
... once we have G and are thinking about what it means physically G is the
effect on u (in the domain x, t) of a singularity at xi , .
85

Chapter 7
Numerical Methods
7.1

Boundary Element Method

The boundary element method (BEM) is a numerical method which solves


a differential equation (Lu = f ) in an integral form. Well begin by considering the Laplace equation, however other equations (including transient
equations) ca be considered:
2p 2p
+
=0
x2 y 2

7.1.1

(7.1)

Derivation of the Boundary Integral Equation

The derivation of BEM begins from Greens second identity. For two arbitrary functions f and g Green proved the following:
ZZ

(f 2 g g2 f )d =

g
f
g d
n
n

where n is the normal to the boundary.


In our case we will take:
f =p
g=G=
where
r=

1
ln(1/r)
2

(xi x)2 + (yi y)2


86

(7.2)

(7.3)
(7.4)
(7.5)

PE281 - Applied Mathematics in Reservoir Engineering

Figure 7.1: Location of singularity


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

(p G G p)d =

p
G
G d
n
n

(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 surrounding the singularity (e ) and the remainder, e . First consider the
remainder:

ZZ

(p2 G G2 p)d =

+e

G
p
G d
n
n

(7.7)

Within this domain both 2 G = 0 and 2 p = 0.


0=

G
p
G d +
n
n

G
p
G d
n
n

(7.8)

Now consider the integral over e further, noting that d = rd:


G r
1 1
1
G
=
=
(1) =
n
r n
2 r
2r
G
p
1 2 1
1 p
p
G d =
[p ln
]rd
n
2 0
r
r n
e n
Z
1 2
p
=
(p + rln(r) )d
2 0
n

87

(7.9)
(7.10)
(7.11)

PE281 - Applied Mathematics in Reservoir Engineering

node
linear element

Figure 7.2: Boundary Discretisation


Consider the limit as r 0:
=

1
(2p) = p(xi , yi)
2

(7.12)

Now substitute this result back into equation 7.8:


Z
p
G
d = G d
p(xi , yi) + p
n

n
Z

(7.13)

If the point (xi , yi) is on the boundary this equation must be modified to:
Z
Z

G
p
p(xi , yi ) + p
d = G d
2
n
n

(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
differential equation has been converted to an equivalent integral representation.

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 (pressure) is interpolated over the elements in terms of nodal values and shape
88

PE281 - Applied Mathematics in Reservoir Engineering

=1

=+1

x=x 1

x=x 2

Figure 7.3: Local coordinate


functions (Nj ). Figure 7.2 shows a linear element i.e. the boundary geometry
is approximated by a straight line connecting the nodes. Higher order elements are also possible. To improve the accuracy of the solution the elements
can either be refined into smaller elements, or higher order interpolation e.g.
quadratic can be used.
The shape functions are defined in terms of a local coordinate that runs
from -1 to 1 along the element.
The linear shape functions are:
x() = N1 x1 + N2 x2

(7.15)

y() = N1 y1 + N2 y2

(7.16)

p() = N1 p1 + N2 p2

(7.17)

where

1
N1 = (1 )
2
1
N2 = (1 + )
2
The quadratic shape functions are:
x() = N1 x1 + N2 x2 + N3 x3

(1 )
2
N2 = (1 + )(1 )
N1 =

N3 = (1 + )
2
89

(7.18)
(7.19)

(7.20)
(7.21)
(7.22)
(7.23)

PE281 - Applied Mathematics in Reservoir Engineering


By breaking the boundary integral in equation 7.14 into the sum of integrals over elements, and writing the expression for the pressure and geometry
of the elements in terms of shape functions we have:
Z 1
M X
2
M X
2
X
X

G(ri )
pj Z 1
p(xi , yi)+
pj
Nj ()J()d =
G(ri )Nj ()J()d
2
n
1
m=1 j=1
m=1 j=1 n 1
(7.24)
where M is the number of elements and J() is a Jacobian which takes
account of the integral being performed over .

d
J() =
=
d

v
u
u
t

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 difficult to evaluate analytically.
Aij =

G(ri )

Nj ()J()d +
ij
n
2

Bij =

7.1.3

1
1

G(ri )Nj ()J()d

(7.27)
(7.28)

Gauss Quadrature

The following integral can be evaluated (approximately) using Gauss quadrature if f () is not singular:
Z

f ()d =

N
X

f (n )Wn

(7.29)

n=1

The integral is evaluated as the weighted (weights, Wn ) 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


Wn = 1.0

(7.31)

n = 0, 0.7745

(7.32)

Wn = 0.8888, 0.5555

(7.33)

n = 0.8611, 0.3399

(7.34)

Wn = 0.3478, 0.6521

(7.35)

N =3

N =4

If i = j the integrals are singular special qaudratures can be used, however these may be computationally intensive or problem specific. Luckily a
physical arguement can be used to evaluate these diagonal terms once the offdiagonals have been evaluated. For this problem if p is constant everywhere
p
we expect n
at every node to be zero i.e.
Apconst = B
Aii =

7.1.4

p
=0
n

(7.36)

N
X

(7.37)

Aij

j=1,j6=i

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 specified pressure. Once boundary conditions
p
have been set half the unknown p and n
values can be eliminated from the
matrix equation to give:
A0 x = b
(7.38)
p
where x is a vector containing the unknown p and n
values.
p
At smooth boundaries either p or q = 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

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 A0 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 finite differences 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 (xi , yi) of the Greens function at the point
92

PE281 - Applied Mathematics in Reservoir Engineering

q
p p

Figure 7.6: Broken boundary


of interest and revaluating the boundary integral equation.
M X
2
X

p(xi , yi) =
pj
2
m=1 j=1

M X
2
X
G(ri )
pj
Nj ()J()d+
n
m=1 j=1 n

1
1

G(ri )Nj ()J()d

(7.39)
Since we are considering internal points = 2. All the pj and
are known
since they are located on the boundary and have already been determined.
G is a function of (xi , yi ) 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.
pj
n

7.1.7

Transient Problems

Suppose we wanted to solve:


2p 2p
p
+ 2 =
2
x
y
t

(7.40)

If we begin from Greens second identity as before:


ZZ

(f 2 g g2 f )d =

g
f
g d
n
n

(7.41)

Well start by considering what happens when we divide into a small circle
surrounding the singularity and the remainder:

p
G d =
t
e

ZZ

93

+e

G
p
G d
n
n

(7.42)

PE281 - Applied Mathematics in Reservoir Engineering


since p = p
. Were using the steady state Greens function used in the
t
previous section.
with a finite difference i.e.:
We could approximate p
t
p
pt2 pt1
=
t
t

(7.43)

however a domain integral is still required so the problem has lost its boundary only character.
To handle transient problems in a boundary only manner alternative approaches are require. Well consider two - transient Greens functions and
solving the problem in Laplace space.

7.1.8

Transient Problems - Transient Greens Functions

Weve already discussed how to find Greens functions for equations of the
form:
p
2p 2p
+ 2 =
(7.44)
2
x
y
t
.
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 differential by
G and integrating by parts. The Aij and Bij terms are now time dependent so
the element integrals must be reevaluated each time step. Computationally
efficient 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 differential
equation is:
2 p 2 p
+
= s
p
(7.46)
x2 y 2
The Greens function is available (in Laplace space) for this problem:
G=

1
Ko ( sr)
2
94

(7.47)

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 boundary solutions. No grid orientation effect.
- 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. diffusion equation,


wave equation. Problems with convective terms can not be handled. For
reservoir engineering problems only applicable to single phase flow in homogeneous 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 find the Greens function for. This
limits its applicability. The theory can be extended to a wider class of problems 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
X

j fj

(7.49)

j=1

where the j are weights and the fj are a set of approximating functions. The
only restriction on the approximating functions is that they are the Laplacian
of some other function:
2 pj = fj
(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
X

j fj =

j=1

N
X

j=1

j 2 pj

(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:

p(xi , yi) +
2

G
pd
n

N
p X

j ( pj (xi , yi ) +
G
=
n j=1
2

G
pj
n

pj
)
n
(7.52)

This can be written in matrix form as:

Ap Bq = (AP B Q)

(7.53)

are matrices whose columns contain the functions pj and qj


where P and Q
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 significant 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-diffusion 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 flexibility 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:


ZZ

p G G pd =

G
p
G d
n
n

(7.55)

Substituing 2 p = b and splitting the domain into a circle surrounding the


singularity and the remainder (as before) gives:

Z
ZZ

G
p
p(xi , yi) + p
G d =
Gbd
2
n
n

(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:
M
X

p(xi , yi) +
2
e=1

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

ZZ

Gbd

(7.57)

Now shape functions are introduced to interpolate the pressure and q =


p
over the elements in terms of nodal values. In the case of linear shape
n
97

PE281 - Applied Mathematics in Reservoir Engineering

Figure 7.7: Overall boundary is equivalent to the sum of the element boundaries
functions:
p=

4
X

Nj pj

(7.58)

4
X

Nj qj

(7.59)

4
X

Nj bj

(7.60)

j=1

q=

j=1

b=

j=1

When these shape functions are substituted into (7.57) we have:

M X
4
X

p(xi , yi )+
2
e=1 j=1

pj Nj

M X
4
X
G
Gqj Nj d =
n
e=1 j=1

ZZ

Gbj Nj d (7.61)

A matrix equation can be formed from this:


M
X

e
Rij
pj + Leij qj + Vij bj = 0

(7.62)

e=1

where
=

Leij =

e
Rij

Vije =

G
Nj d
n

(7.63)

Gi Nj d

(7.64)

Gi Nj d

(7.65)

ZZ

98

PE281 - Applied Mathematics in Reservoir Engineering

7.2.3

Dealing with Heterogeneity

Single phase flow in heterogeneous reservoirs is governed by:


k
p
( p) = ct

(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:
ct p
2 p = lnk p +
(7.67)
k t

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 find them please let
me know.
Eqn
Eqn
Eqn
Eqn
Eqn
Eqn
Eqn
Eqn
Eqn
Eqn
Eqn
Eqn

2.20 should read lim s sLf (t), the first = sign is incorrect
2.22 should have lim s as the second limit
2.63 should not have the first negative sign
2.66 should have limits of integration from s to infinity
2.81 should have lim t on the right hand side
3.48 should be lim t
3.73 should be pd = (pi-p)/(pi-pw)
3.74 should be rd=1
6.82 should finish with (xi x)dxi
6.84 should have 2B exp(2x) not B exp(2x)
6.86 should finish with x xi 1
6.171 should have z 2 /A2 as the exponent

100

You might also like