Applied Mathematics in Reservoir Engineering
Applied Mathematics in Reservoir Engineering
Applied Mathematics in Reservoir Engineering
ENGINEERING
Rosalind Archer
Stanford University
Spring 2000
Chapter 1
Introduction
1.1
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
(1.1)
(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)
y
x
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)
(1.9)
c(ppsc )
= sc e
(1.10)
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)
.
t
(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)
2 p p
ct p
+
=
2
x
x x
k t
(1.16)
=
=
x x
x p x
p
p
x
!2
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)
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)
1.3.2
(1.24)
Radial Problem
ct p
k t
(1.25)
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)
pD = (pi pi ) = 0,
t = 0, r
(1.31)
r
rw
(1.32)
tD =
t
t
(1.33)
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)
ct pD
kt tD
ct rw2
k
!
pD
pD
rD
=
rD
tD
t =
1
rD rD
(1.35)
(1.36)
(1.37)
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
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)
q1
q2
t1
=
q
q1
+
t1
t
-(q1-q2)
x
Figure 1.3: Well configuration
closed boundary
reservoir
image
producer
well
producer
reservoir
image
injector
well
producer
10
1.4.1
11
Chapter 2
The Laplace Transform
The Laplace Transform is defined by:
L{f (t)} =
(2.1)
Example:
f (t) = t
(2.2)
dv
dt = uv|ba
dt
du
dt
dt
(2.3)
(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)
(2.7)
(2.8)
(2.9)
2.1
2.1.1
= c1
st
f1 dt + c2
est f2 dt
2.1.2
(2.10)
(2.11)
(2.12)
(2.13)
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
(2.14)
(2.17)
(2.18)
2.1.3
= s L{f (t)}
n1
X
si f ni1(0)
(2.19)
i=0
2.1.4
(2.20)
t0
Proof:
Begin from Theorem 2
L{f 0 (t)} = sL{f (t)} f (0+ )
(2.21)
(2.22)
(2.23)
|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)
2.1.5
(2.28)
(2.29)
(2.30)
s0
Proof:
Begin from Theorem 2
s0
s0 0
st 0
f (t)dt =
st
f (t)lims0 e
dt =
f 0 (t)dt
(2.31)
(2.32)
s0
2.1.6
(2.33)
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)
(2.36)
(2.37)
(2.38)
(2.39)
(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)
2.1.7
sin at
= cos at
t a
(2.44)
Proof:
L
Z
t
0
Z
1
=
s
f (t )dt
1
+
s
f (t)dt =
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)
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)
2.1.8
Proof:
L{eat f (t)} =
2.1.9
+ a)
e(s+a) f (t)dt = f(s
(2.51)
(2.52)
(2.53)
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)
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)
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}
(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)
(2.76)
g()
(2.77)
g()
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)
2.2
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
Solve:
y 00 + 2y 0 + y = tet
(2.82)
y(t = 0) = 1
(2.83)
y 0 (t = 0) = 2
(2.84)
where
(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)
n!
(2.92)
sn+1
1
(s + 1)4
et t3
3!
(2.93)
2
2
(s + 1)
(s + 1)
s + 1 (s + 1)2
(2.94)
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)
y=e
2.3
t3
t+1
3!
(2.98)
21
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
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)
2kh p
r
r
(3.2)
r
23
(3.3)
r, t = 0
(3.4)
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)
24
3.1.1
(3.15)
y = c1 Jn (x) + c2 Yn (x)
(3.16)
(3.17)
y = c1 In (x) + c2 Kn (x)
(3.18)
3.1.2
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) =
pD = c2 K0 (rD s)
25
(3.22)
(3.23)
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)
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)
Z
1
f (t)dt = L{f (t)}
s
26
(3.34)
2
rD
1
s)} =
exp
2tD
4tD
tD
2
1
rD
exp
dtD
2tD
4tD
(3.35)
(3.36)
u=
tD =
dtD =
(3.37)
2
rD
4u
(3.38)
2
rD
du
4u2
(3.39)
r2
D
4tD
2
4u
rD
1
exp(u)
du =
2
2
2rD
4u
2
r2
D
4tD
exp(u)
du
u
(3.40)
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)
(3.43)
3.1.3
1
pD (s) = K0 (rD s)
s
(3.44)
lim K0 (x) = ln
x0
(3.45)
(3.46)
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)
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)
2 pD
1 pD
+
s
pD = 0
2
rD
rD rD
pD = c1 I0 (rD s) + c2 K0 (rD s)
(3.52)
(3.53)
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)
K0 (rD s)
pD = 3
s 2 K1 ( s)
3.2.1
(3.58)
x
1 ( 1)( 9)
e (1 +
+
+ ....
2x
8x
2!(8x)2
(3.59)
K0 (rD s) =
29
erD s
2rD s
(3.60)
K1 ( s) =
e s
2 s
(3.61)
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)
x0
(3.66)
(3.67)
1 1
1
lim K1 (x) = ( x)1 =
x0
2 2
x
(3.68)
where (x + 1) = x!
K0 (rD s)
pD = 3
s 2 K1 ( s)
30
(3.69)
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)
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
pD = c1 I0 (rD s) + c2 K0 (rD s)
(3.75)
(3.76)
(3.77)
1
pD (rD = 1) = c2 K0 ( s) =
s
31
(3.78)
(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
(3.81)
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
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
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)
rD (rD4t1)2
D
qD =
e
tD
(3.88)
(3.89)
(3.90)
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
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
pD = c1 I0 (rD s) + c2 K0 (rD s)
33
(3.94)
(3.95)
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)
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)
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)
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
3.5
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
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)
Vw
Vw p
p
=
= cw V w
t
p t
t
(3.110)
3.6.2
(3.111)
3.6.3
Aw
g
(3.112)
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)
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
3.8
3.9
Heat Transfer
Te
t
(3.120)
The second energy balance governs the fluid in the pipe which is flowing
37
Surroundings, T
o
Burial medium, Te
Pipe, Tp
ri
ro
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)
T
s
2k
s
To
i
o
e
Tp (x, s) =
exp(( +
)x) +
(3.123)
s
U
ri p cp U
s
where
e ce
ke
(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
3.10
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)
3.11
Summary
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)
f (x) =
F (s)ei2xs ds
(4.2)
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)
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)
(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)
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
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
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
43
4.1
4.1.1
4.1.2
(4.21)
If
F (f (x)) = F (s)
(4.22)
(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)
If
F (f (x)) = F (s)
F (f (ax)) =
4.1.4
1
F
|a|
(4.28)
s
a
(4.29)
If
F (f (x)) = F (s)
(4.30)
F (g(x)) = G(s)
(4.31)
(4.32)
and
then
44
4.1.5
4.1.6
|f (x)|2dx =
|F (s)|2ds
(4.33)
Theorem 6 - Derivatives
F (f n (x)) = (i2s)n F (s)
(4.34)
4.2
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)
(4.38)
(4.39)
Now take account of the way products of even and odd functions behave:
fe (x)ge (x) = he (x)
(4.40)
(4.41)
45
(4.42)
fo (x)dx = 0
(4.43)
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)) =
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
4.3
(4.52)
pD (xD = 0, tD ) = 1
(4.53)
pD (xD , tD ) = 0
(4.54)
pD (xD , tD =) = 0
(4.55)
Since the pressure and not the pressure derivative is set on the boundary use
the sine transform. The choice of transform is made according to equations
(4.48) and (4.51) which relate the transform of the second derivative to the
boundary conditions.
First transform the differential equation (in space):
s
2
pD
pD (xD = 0, tD ) s2 pD =
tD
s
pD
2
+ s2 pD =
tD
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)
= 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)
(4.67)
(4.69)
(4.70)
1
1
= f (x)eisx |
2
2
48
eisx f 0 (x)dx
(is)f (x)eisx dx
(4.71)
(4.72)
(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)
1 isx is
2
e
e
T0 ()e(s) t dds
T =
2
Z
Z
1
2
T0 ()
eis(x)(s) t dsd
=
2
T =
4.5
1
42 t
T0 ()e
(x)2
42 t
(4.80)
(4.81)
(4.82)
(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)
(4.92)
Fs (p(x, y = a)) = 0
(4.93)
(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)
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) =
(4.101)
Jv (r)Hv ()d
(4.102)
4.7
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
xk = k,
k = 0, 1, 2, ..., N 1
(4.103)
n
N
(4.104)
f (x)e2ixsn dx
N
1
X
fk e2isn xk =
k=0
N
1
X
k=0
fk e2ikn/N
(4.105)
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
1.5
1
0.5
20
40
60
80
100
-0.5
-1
-1.5
-2
4.9
5
4
3
2
1
20
40
60
80
100
1
2
1
2
Figure 4.5: Aliasing effect (from Numerical Recipes in C, Cambridge University Press
54
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)
55
Chapter 5
Hartley Transforms and Hankel
Transforms
5.1
Hartley Transforms
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:
(5.1)
(5.2)
(5.3)
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
5.2
Hankel Transforms
Fv () =
f (r) =
(5.6)
Jv (r)Fv ()d
(5.7)
5.2.1
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)
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:
=
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
1 p
,
r r
are an
(5.15)
58
z=h
line sink
z
porous media
z=0
r
5.2.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)
cosh(z0 )
J0 ()
cosh((z 1))
,
sinh()
2
59
z[z0 , 1]
(5.18)
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
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 =
61
uL v dx
(6.3)
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)
(6.6)
i.e.
What is L ?
A=
00
vau dx = vau
Z
vbu dx = uvb
u(va)00 dx
u(vb)0 dx
(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)
62
k=3
3/2
k=2
1/2
-1
-1/2 -1/3
k=1
1/3 1/2
6.1.2
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)
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)
(x) =
0, x 6= 0
, x = 0
63
(6.20)
H(x-a)
x=a
(x)h(x)dx = h(0)
(6.21)
(x a)h(x)dx = h(a)
(6.22)
0 (x)h(x)dx = (x)h(x)|
=
More generally:
Z
(x)h0 (x) dx
(x)h0 (x) dx
(6.23)
(6.24)
(6.25)
H (x a)h(x) dx = H(x
a)h(x)|
64
= h()
h0 (x)dx
(6.28)
(x a)h(x) dx
(6.29)
(6.30)
H (x a) = (x a)
6.1.3
(6.27)
(6.31)
Greens Functions
(6.32)
(6.33)
(6.34)
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)
(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)
6.2
6.2.1
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
Gu0|10
uG0 |10
i.e.
L =
u0G0 dxi
uG00 dxi
d2
dx2
(6.41)
(6.42)
(6.43)
(6.44)
(6.45)
(6.46)
G(x, 0) = 0
(6.47)
66
dG
= H(xi x) + Axi
dxi
(6.48)
(6.49)
(6.50)
(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)
(6.56)
(6.57)
(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
6.2.2
x[0, 1]
(6.60)
u(1) = 2u(0)
(6.61)
u (1) = a
(6.62)
Step 1: Find L
Z
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)
(6.66)
(6.67)
G(x, 0) = 0
(6.68)
(6.69)
uL Gdxi =
Gf dxi
(6.70)
(6.71)
0 xi < x
(6.72)
dG
d2 G
3
+ 2G = 0,
2
dxi
dxi
x < xi 1
(6.73)
0 xi < x
(6.74)
G = Cexi + De2xi ,
x < xi 1
(6.75)
(6.76)
A+B =0
(6.77)
(6.78)
(6.79)
(6.80)
(6.81)
x+0
x0
00
G 3G + 2Gdxi =
69
x+0
x0
(xi x)dxi
(6.82)
(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
(6.88)
(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
dy
n
i
6.3.1
Adjoint Operator
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
(6.92)
(vA)xx udx dy
ZZ
(vA)xx ud
(6.93)
(6.94)
(6.95)
ZZ
(vA)xx ud
(6.96)
vLu d =
ZZ
uL v d
(6.97)
where
L v = (Av)xx + 2(Bv)xy + (Cv)yy (Dv)x (Ev)y + F v
(6.98)
(6.99)
(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)
6.3.2
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)
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 ) = (x xi )(y yi )
6.3.3
(6.108)
(6.109)
(6.110)
(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)
e
x,y
yi
xi
=
r
r
Gf = Alnr + B
(6.114)
where
r=
(6.115)
(6.116)
(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)
ZZ
2 Gf d =
=
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)
u 2 u
2
t
x
(6.126)
2
2
t x
(6.127)
Gf
2 Gf
+
= (xi x)( t)
x2i
(6.128)
75
(6.129)
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,
>t
(6.131)
<t
(6.132)
2
Gf = Aes ,
>t
(6.133)
2
Gf = Bes ,
<t
(6.134)
t+0
t0
dGf
d s2
d
t+0
t0
1
Gf d =
2
t+0
t0
( t)eixs d
(6.135)
76
>t
(6.139)
Gf =
e
2
(6.140)
6.4
(6.141)
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)
(6.146)
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)
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)
(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
6.5
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
y
x
x = xw
y
x
xf
x = xw
80
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=
X
2 X
2n
f (n) =
F
(6.163)
n=
81
f (x)eixs dx
(6.164)
+ve
+ve
-ve
-ve
+ve
-2x e+xw -x
w
xw
x=0
xe
2x e-x w
2x e +x w
F e
and
F e
(xxw 2nxe )2
4t
(6.165)
(x+xw 2nxe )2
4t
(6.166)
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)
(xxw 2nxe )2
4t
n=
n=
2 q
2
2teis(xxw ) es t
2xe
(6.172)
(6.173)
2xe
xe
s=
(6.174)
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)
n=1
2 n2 t
x2
e
nx
nxw
sin(
)sin(
)
xe
xe
83
(6.180)
x=0
y
w
y=0
6.5.2
6.5.3
(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
6.6
1
c
q( )S(t )d
(6.183)
(6.184)
Gf (xi , )d
(6.185)
G(x, xi , t, )Lu(xi , )d =
ZZ
ZZ
u(xi , )L Gd
(6.186)
(6.187)
ZZ
(6.188)
Chapter 7
Numerical Methods
7.1
7.1.1
(7.1)
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
1
ln(1/r)
2
(7.2)
(7.3)
(7.4)
(7.5)
(p G G p)d =
p
G
G d
n
n
(7.6)
ZZ
(p2 G G2 p)d =
+e
G
p
G d
n
n
(7.7)
G
p
G d +
n
n
G
p
G d
n
n
(7.8)
87
(7.9)
(7.10)
(7.11)
node
linear element
1
(2p) = p(xi , yi)
2
(7.12)
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)
7.1.2
Boundary Discretisation
=1
=+1
x=x 1
x=x 2
(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)
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)
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
(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
(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
q
p
q
p
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
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
q
p p
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
(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
(7.40)
(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)
(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
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
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)
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
7.2
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
7.2.1
(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)
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)
Ap Bq = (AP B Q)
(7.53)
7.2.2
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)
p G G pd =
G
p
G d
n
n
(7.55)
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)
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
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)
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
7.2.3
(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