PE 281 - Applied Mathematics in Reservoir Engineering

download PE 281 - Applied Mathematics in Reservoir Engineering

of 100

Transcript of PE 281 - Applied Mathematics in Reservoir Engineering

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    1/100

    PE 281 - APPLIED MATHEMATICS IN RESERVOIR

    ENGINEERING

    Rosalind ArcherStanford University

    Spring 2000

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    2/100

    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 havesnuck through. If you do find errors please contact me.

    Rosalind Archerrosalind@pangea

    2

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    3/100

    Chapter 1

    Introduction

    1.1 The Diffusion Equation

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

    where V = xAand q= kA

    px

    Dividing (1.2) through by x and t and taking limits as x 0 andt 0 gives:

    limx0

    q|x q|x+xx

    = limto

    A|t+t A|tt

    (1.3)

    x

    (q) = t

    (A) (1.4)

    Substituting Darcys law into (1.4) gives:

    x

    kA

    p

    x

    =

    t(A) (1.5)

    3

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    4/100

    PE281 - Applied Mathematics in Reservoir Engineering

    A

    x

    zy

    x

    Figure 1.1: One-dimensional control volume

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

    x

    p

    x

    =

    k

    t (1.6)

    Now account for the dependence of on pressure by introducing the isother-mal compressibility:

    c=1

    p

    T

    (1.7)

    where Tdenotes that the derivative is taken at constant temperature.Equation (1.7) defines and EOS (equation of state): p

    psccdP =

    sc

    d

    (1.8)

    c(p psc) =ln lnsc (1.9) = scec(ppsc) (1.10)

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

    x

    scec(ppsc)p

    x

    =

    k

    scec(ppsc)

    t +

    t

    scec(ppsc)

    (1.11)

    The right hand side terms in equation 1.11 require further attention. Firstconsider the final term,

    t:

    t =sce

    c(ppsc)cp

    t (1.12)

    4

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    5/100

    PE281 - Applied Mathematics in Reservoir Engineering

    Now consider t

    . First define the rock compressibility as:

    cr = 1

    p

    T

    (1.13)

    t

    =crp

    t (1.14)

    Substitute equation 1.12 and 1.14 into 1.11:

    x

    p

    x

    =

    k(cr+c)

    p

    t (1.15)

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

    2p

    x2+

    p

    x

    x=

    ctk

    p

    t (1.16)

    Now consider the second term in equation 1.16:

    p

    x

    x=

    p

    x

    p

    p

    x=

    p

    p

    x

    2(1.17)

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

    Finally we have:2p

    x2 =

    ctk

    p

    t (1.18)

    1.2 Three-dimensional Case

    The diffusion equation can be expressed using the notation of vector calculusfor a general coordinate system as:

    2p=

    ct

    k

    p

    t

    (1.19)

    For the case of the radial coordinates the diffusion equation is:

    1

    r

    r

    r

    p

    r

    +

    1

    r22p

    2+

    2p

    z2 =

    ctk

    p

    t (1.20)

    5

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    6/100

    PE281 - Applied Mathematics in Reservoir Engineering

    1.3 Dimensionless Form

    1.3.1 One Dimensional Problem

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

    pD =pi p

    pi(1.21)

    xD = x

    L (1.22)

    where L is a length scale in the problem.

    tD = kt

    ctL2 (1.23)

    With this choice of dimensionless variables the flow equation becomes:

    2pDx2D

    =pDtD

    (1.24)

    1.3.2 Radial Problem

    The radial form of the pressure equation is usually written in nondimensionalform taking account of the boundary conditions. When only radial variationsof pressure are considered the pressure equation is:

    1

    r

    r

    r

    p

    r

    =

    ctk

    p

    t (1.25)

    Boundary and initial conditions:

    q= 2kh

    rp

    r, r= rw (1.26)

    p= pi, r , t (1.27)p= pi, t= 0, r (1.28)

    Begin by setting:pD =(pi p) (1.29)

    6

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    7/100

    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)

    Set dimensionless time, tD as:

    tD = t

    t (1.33)

    wheretmust still be determined. Now substitutepDand rDinto the pressureequation:

    1

    rDrw

    rDrw

    rDrw

    rDrw

    pD

    +pi

    =

    ctk

    pD

    +pi

    tDt

    (1.34)

    Simplifying (1.34) gives:

    1

    r2w

    1

    rD

    rD

    rD

    pDrD

    =

    ctkt

    pDtD

    (1.35)

    t = ctr2w

    k (1.36)

    1

    rD

    rD

    rD

    pDrD

    =

    pDtD

    (1.37)

    Finally determine from the inner boundary condition:

    q= 2kh

    r pr

    (1.38)

    (No negative sign is required here because the flow is in the negative r direc-tion)

    q

    2kh=rDrw

    rDrw

    pD

    +pi

    (1.39)

    7

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    8/100

    PE281 - Applied Mathematics in Reservoir Engineering

    =

    2kh

    q

    (1.40)

    Nondimensionalise inner boundary condition:

    pDrD

    |rD=1= 1 (1.41)

    1.4 Superposition

    Solutions to complex problems can be found by adding simple solutions rep-resenting the pressure distribution due to wells producing at constant rateat 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 wellproducing at a constant rate in a given reservoir. Using superposition in timethis solution can be extended to handle a well with a variable flow rate. Ifa well begins producing at rate q1 then at time t1 the rate changes to q2 theflow 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. Sup-pose again we have a solution pconst(q,r,t) for the pressure distribution dueto a well located at the origin, flowing at rateq. The solution for a a reservoircontaining two wells as shown in Figure 1.3 can be generated by summingthis solution as follows:

    p(r, t) =pconst(q1, r1, t) +pconst(q2, r2, t) (1.43)

    wherer1 =

    (x x1)2 + (y y1)2 (1.44)

    r2 =

    (x x2)2 + (y y2)2 (1.45)

    8

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    9/100

    PE281 - Applied Mathematics in Reservoir Engineering

    q2

    q1q

    t1 t

    =

    q

    t

    q1 q

    t

    +t1

    -(q1-q2)

    Figure 1.2: Flow rate variation

    y

    x

    Figure 1.3: Well configuration

    9

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    10/100

    PE281 - Applied Mathematics in Reservoir Engineering

    closed boundary

    producer

    reservoir

    imageproducerwell

    Figure 1.4: Closed boundary

    constant pressure boundary

    producer

    reservoir

    imageinjectorwell

    Figure 1.5: Constant pressure boundary

    Using Superposition to Handle Boundary Conditions

    Superposition in space can be used to impose constant pressure and/or closedboundary conditions. To do so fictitious wells known as image wells are placedin the reservoir in such a way that their effect on the pressure distributioncreates the boundary condition. If multiple boundary conditions are involvedthis 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

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    11/100

    PE281 - Applied Mathematics in Reservoir Engineering

    1.4.1 Well Boundary Conditions when Superposition

    is Applied

    The superposition theorem guarantees the pressure distribution obtaining bysumming simple solutions will satisfy the pressure equation. The boundarycondition at the well however requires careful consideration.

    Wells Controlled by Bottom Hole Pressure

    If a reservoir contains two wells with specified bottom hole pressuresp1and p2a pressure solution can be obtained by summing two solutions for a single wellat specified well pressure. This solution will satisfy the pressure equation.

    However this solution will notsatisfy the required bottom hole pressures atthe wells. If both wells are producers then there will be additional drawdownsat each well due to production in the other well. However if the wells are farapart 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 canbe generated from solutions for a single well. Unlike the case of bottom holepressure controlled wells this solution will satisfy the flow rate boundary

    condition at each well. This is possible because each superposed solutionconserves mass locally so it does not add any extra flow at the well locations.

    11

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    12/100

    Chapter 2

    The Laplace Transform

    The Laplace Transform is defined by:

    L{f(t)} =0

    estf(t)dt= f(s) (2.1)

    Example:f(t) =t (2.2)

    Use integration by parts, recall:

    b

    a

    udv

    dt

    dt= uv

    |ba

    b

    a

    vdu

    dt

    dt (2.3)

    Chooseu= t and v = 1s

    est

    L{f(t)} = ts

    est|0 +0

    1

    sestdt (2.4)

    = 0 + 1

    s2est

    0

    = 1

    s2 (2.5)

    For the Laplace transform to exist the following requirements must hold:a) f(t) have a finite number of maxima, minima and discontinuitiesb) there exist constants , M, Tsuch that

    et|f(t)| < M, t > T (2.6)Functions satisfying this requirement are known as functions of exponentialorder. For t >0 there is 1 > such that:

    e1t|f(t)| < M (2.7)

    12

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    13/100

    PE281 - Applied Mathematics in Reservoir Engineering

    When this just holds is known as the abscissa of covergence.

    Example:f(t) =e2t (2.8)

    ete2t =e(2)t (2.9)

    (2.9) remains bounded for 2, therefore the abscissa of convergence forthis f(t) is 2.

    2.1 Properties of Laplace Transforms

    2.1.1 Theorem 1 - Linearity of the Laplace Transform

    Operator

    L{c1f1(t) +c2f2(t)} =c1L{f1(t)} +c2L{f2(t)} (2.10) the Laplace Transform is a linear operator.Proof:

    L{c1f1+c2f2} =0

    estc1f1+c2f2dt (2.11)

    =c1

    0

    estf1dt+c20

    estf2dt (2.12)

    =c1L{

    f1(t)

    }+c2

    L{f2(t)

    } (2.13)

    2.1.2 Theorem 2 - Laplace Transform of a Time Deriv-

    ative

    L{f(t)} =sL{f(t)} f(0) (2.14)Proof:

    L{f(t)} =0

    estf(t)dt (2.15)

    Integrate by parts

    =estf(t)|0 0

    f(t)(sest)dt (2.16)

    = f(0) + s0

    estf(t)dt (2.17)

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

    13

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    14/100

    PE281 - Applied Mathematics in Reservoir Engineering

    2.1.3 Theorem 3 - Laplace Transform of a Derivative

    L

    nf

    tn

    = snL{f(t)}

    n1i=0

    sifni1(0) (2.19)

    This can be proved by repeated application of Theorem 2.

    2.1.4 Theorem 4 - Early Time Behaviour

    lims sL{f(t)} = limt0+ f(t) =f(0

    +) (2.20)

    Proof:Begin from Theorem 2

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

    Now take limits:

    limsL{f

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

    +) (2.22)

    Iff(t) is of exponential order:

    lims e

    stf(t)dt 0 (2.23)

    |f(t)| < Met, t >0 (2.24)

    I(b) = b0|f(t)|estdt as b

    limb

    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 = lims sL{f(t)} f(0

    +) (2.27)

    proving theorem 4.

    14

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    15/100

    PE281 - Applied Mathematics in Reservoir Engineering

    2.1.5 Theorem 5 - Late Time Behaviour

    lims0 s

    L{f(t)} = limt f(t) (2.28)

    Proof:Begin from Theorem 2

    L{f(t)} =sL{f(t)} f(0+) (2.29)Now take limits:

    lims0

    L{f(t)} = lims0 s

    L{f(t)} f(0+) (2.30)

    Expand the left hand side term:

    lims0

    0

    estf(t)dt=0

    f(t)lims0estdt=0

    f(t)dt (2.31)

    =limtf(t) f(0) (2.32)Substituting (2.32) into (2.29) gives:

    lims0

    sL{f(t)} = limt f(t) (2.33)

    2.1.6 Theorem 6 - Multiplication of a Transform by sIfL{f(t)} =s(s) then f(t) =

    tL1{(s)}

    Proof:F(t) = L1{(s)} (2.34)

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

    and use Theorem 4:

    F(0) = lims sL{F(t)} = lims s(s) (2.36)

    = limsL{f(t)} = 0 (2.37)

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

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

    15

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    16/100

    PE281 - Applied Mathematics in Reservoir Engineering

    Taking inverse Laplace Transforms of this gives:

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

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

    tL{(s)} =f(t) (2.41)

    Example: Suppose we want to find the inverse transform of:

    L{f(t)} = ss2 +a2

    (2.42)

    We know can use the following transform relationship to help us:

    L{ sin ata } = 1

    s2 +a2 (2.43)

    Using theorem 6 we know:

    f(t) =

    t

    sin at

    a = cos at (2.44)

    2.1.7 Theorem 7 - Division of a Transform bys

    L t

    0 f(t)dt

    =

    1

    sL{f(t)} (2.45)Proof:

    L t

    0f(t)dt

    =

    0

    est t

    0f(t)dt

    dt (2.46)

    Use integration by parts:

    =

    1

    s

    t0

    f(t)dt0

    +1

    s

    0

    estf(t)dt=1

    sL{f(t)} (2.47)

    Example: Suppose we require the inverse transform of:

    L{f(t)

    }=

    1

    s3 + 4s=

    1

    s

    1

    s2 + 4 (2.48)

    We know:

    L

    1

    s2 + 4

    =

    1

    2sin 2t (2.49)

    f(t) = t0

    1

    2sin 2tdt=

    1

    4(1 cos2t) (2.50)

    16

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    17/100

    PE281 - Applied Mathematics in Reservoir Engineering

    2.1.8 Theorem 8 - First Shift Theorem

    L{eatf(t)} = f(s +a) (2.51)Proof:

    L{eatf(t)} =0

    eatestf(t)dt=0

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

    2.1.9 Theorem 9 - Second Shift Theorem

    L{f(t a)u(t a)} =easL{f(t)} (2.53)where u(t a) is a unit step function.

    u(t a) = 1, t a >0 (2.54)= 0, otherwise (2.55)

    (2.56)

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

    0

    f(t a)u(t a)estdt (2.57)

    =

    af(t a)estdt (2.58)

    =0 f()e

    s(+a)

    d (2.59)

    where =t aApply Theorem 8:

    =esa0

    f()esd (2.60)

    =esaLf(t)dt (2.61)

    2.1.10 Theorem 10 - Multiplication by t

    L{tf(t)} = f(s) (2.62)Proof:

    f(s) = d

    ds

    0

    estf(t)dt (2.63)

    =0testf(t)dt (2.64)

    = L{tf(t)} (2.65)

    17

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    18/100

    PE281 - Applied Mathematics in Reservoir Engineering

    2.1.11 Theorem 11 - Division by t

    L

    f(t)

    t

    =

    s

    f(s)ds (2.66)

    Proof: s

    f(s)ds=

    s

    0

    estf(t)dtds (2.67)

    =0

    s

    estf(t)dsdt (2.68)

    =0

    f(t)

    est

    t

    s

    dt (2.69)

    =0

    f(t)t

    estdt (2.70)

    = L

    f(t)

    t

    (2.71)

    2.1.12 Theorem 12 - Convolution

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

    f(t )g()d} (2.72)

    =L{

    t

    0

    f()g(t

    )d}

    (2.73)

    = L{f(t) g(t)} (2.74)Proof:First use the definition of the Laplace transform:

    L{ t0

    f(t )g()d} =0

    t0

    f(t )g()estddt (2.75)

    Change limits on the integral by introducing a step function:

    = 0

    0

    u(t

    )f(t

    )g()estddt (2.76)

    (See Figure 2.1 for the step function.)Change the order of integration:

    =0

    g()0

    u(t )f(t )estdtd (2.77)

    18

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    19/100

    PE281 - Applied Mathematics in Reservoir Engineering

    1

    u

    t

    Figure 2.1: Step function as a function of

    1

    u

    Figure 2.2: Step function as a function oft

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

    =0

    g()

    f(t )estdtd (2.78)

    Apply first shift theorem:

    =0

    g()

    0f()es(+)d

    d (2.79)

    =0

    g()esd0

    f()esd (2.80)

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

    19

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    20/100

    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 equa-tions. The general procedure is:- transform both side of the equation- solve the transformed equation to get an expression for the Laplace trans-form of the solution- invert to 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 dif-ferential equation in x or t.

    2.2.1 Ordinary Differential Equation Example

    Solve:y+ 2y+y = tet (2.82)

    wherey(t= 0) = 1 (2.83)

    y(t= 0) = 2 (2.84)L{y} =s2y sy(0) y(0) (2.85)L{y} =sy y(0) (2.86)

    L{tet} = 1(s + 1)2

    (2.87)

    s2y s+ 2 + 2sy 2 + y = 1(s + 1)2

    (2.88)

    Solve for y:

    (s

    2

    + 2s + 1)y s= 1

    (s + 1)2 (2.89)

    (s + 1)y= 1

    (s + 1)2+s (2.90)

    y = 1(s + 1)4

    + s

    (s + 1)2 (2.91)

    20

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    21/100

    PE281 - Applied Mathematics in Reservoir Engineering

    Now invert to find y. Consider the first term, we know (from tables):

    L{t(n)} = n!sn+1

    (2.92)

    Combining this transform with the first shift theorem gives:

    L1

    1

    (s + 1)4

    =

    ett3

    3! (2.93)

    Now consider the second term:

    s

    (s + 1)2 =

    s + 1

    1

    (s + 1)2 =

    1

    s + 1 1

    (s + 1)2 (2.94)

    We can use the known transforms:

    L{1} =1s

    (2.95)

    and

    L{t} = 1s2

    (2.96)

    Combining this with the first shift theorem again gives:

    L1

    s(s + 1)2

    = et ett (2.97)

    The final solution for y is:

    y = et

    t3

    3! t + 1

    (2.98)

    2.3 Computing Laplace Transforms in Math-

    ematica

    Laplace transforms can be computed using Mathematica using the LaplaceTransform Calculus package. On wasson the example given in Equation (2.5)can be computed using:

    21

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    22/100

    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 noneed to load the CalculusLaplaceTransform package.Note: For problem sets please work out any transforms required by handand show working, unless otherwise specified. Feel free to check your workagainst Mathematica output however.

    22

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    23/100

    Chapter 3

    Petroleum Engineering

    Applications of LaplaceTransforms

    This chapter outlines how Laplace transforms can be used to solve problemsof interest to petroleum engineers. The solutions presented consider differenttreatments of the well and different boundary conditions.

    3.1 Line Source SolutionThis section considers infinite acting radial flow in a reservoir where thewell is modelled as a line source. The differential equation and boundaryconditions involved are:

    1

    r

    r

    r

    p

    r

    =

    ctk

    p

    t (3.1)

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

    q= 2kh

    r pr

    (3.2)

    The outer boundary condition is:

    p= pi, r (3.3)

    23

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    24/100

    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

    q (pi p) (3.5)

    rD = r

    rw(3.6)

    tD = kt

    ctr2w(3.7)

    1rD

    rD

    rD

    pDrD

    =

    pDtD

    (3.8)

    pD(rD, tD = 0) = 0 (3.9)

    pD(rD , tD) = 0 (3.10)

    rDpDtD

    |rD0 = 1 (3.11)

    The solution procedure begins by Laplace transforming both sides of thepressure equation:

    L

    1

    rD

    rD

    rD

    pDrD

    = L

    pDtD

    (3.12)

    1

    rD

    rD

    rD

    pDrD

    = s pD pD(rD, tD = 0) (3.13)

    2pD

    r2D+

    1

    rD

    pDrD

    spD = 0 (3.14)

    A solution to this differential equation can be found by noting that it is anexample of a modified Bessel equation.

    24

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    25/100

    PE281 - Applied Mathematics in Reservoir Engineering

    3.1.1 Bessel and Modified Bessel Equations

    The Bessel equation is:

    x2y+xy+ (x2 n2)y= 0 (3.15)

    y= c1Jn(x) +c2Yn(x) (3.16)

    where Jn is a Bessel function of the first kind of order n and Yn is a Besselfunction of the second kind or order n.The modified Bessel equation is:

    x2y+xy

    (x2 +n2)y= 0 (3.17)

    y = c1In(x) +c2Kn(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:

    r2D2pDr2D

    +rDpDrD

    r2DspD= 0 (3.19)

    Substitute = rDs:

    22pD2

    +pD 2pD = 0 (3.20)

    Solve for pD:pD =c1I0(rD

    s) +c2K0(rD

    s) (3.21)

    Now consider the boundary conditions. First consider the infinite actingcondition. As rD , pD must remain bounded, however:

    limx I0(x) = (3.22)

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

    pD =c2K0(rD

    s) (3.23)

    25

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    26/100

    PE281 - Applied Mathematics in Reservoir Engineering

    The inner boundary condition is:

    limrD0

    rDpDrD

    = 1 (3.24)

    limrD0

    L

    rDpDrD

    = lim

    rD0rD

    pDrD

    = L{1} = 1s

    (3.25)

    To differentiate the Bessel function we need the following recurrence rela-tionship:

    d

    dx

    xnKn(x)

    = xnKn+1(x) (3.26)

    Substituting (3.26) into (3.25) gives:

    limrD0

    rD

    rD

    c2K0(rD

    s)

    = 1s

    (3.27)

    limrD0

    c2rD

    sK1(rD

    s)

    = 1s

    (3.28)

    To evaluate the limit we can use the following limiting form ofKv for smallarguments:

    Kv(z) 12

    (v)(1

    2z)v (3.29)

    limrD0

    K1(rDs) = 1rD

    s (3.30)

    c2 limrD0

    rD

    s 1

    rD

    s

    = 1

    s (3.31)

    c2=1s

    (3.32)

    Finally we have the complete solution for pD:

    pD(rD, s) =1

    s

    K0(rD

    s) (3.33)

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

    L t

    0f(t)dt

    =

    1

    sL{f(t)} (3.34)

    26

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    27/100

    PE281 - Applied Mathematics in Reservoir Engineering

    To proceed the inverse transform ofK0(rS

    s) is required. Transform pair

    117 from the handout gives the following:

    L1{K0(rD

    s)} = 12tD

    exp

    r2D4tD

    (3.35)

    pD = tD0

    1

    2tDexp

    r2D4tD

    dtD (3.36)

    This integral can be evaluated by using substitution:

    u= r2D

    4tD(3.37)

    tD = r2D

    4u (3.38)

    dtD =r2D

    4u2du (3.39)

    Equation (3.36) becomes:

    pD= r2D

    4tD

    4u

    2r2Dexp(u)r

    2D

    4u2du=

    1

    2

    r2D

    4tD

    exp(u)u

    du (3.40)

    Now introduce the exponential integral, Ei(x):

    Ei(x) = x

    eu

    u du (3.41)

    (This definition follows Abramowitz and Stegun, Handbook of Mathemati-cal Functions, Dover, 1970. Note that in some references Ei(x) is denotedbyE1(x) - be careful!)

    pD=

    1

    2Ei

    r2D

    4tD (3.42)

    Finally the answer is written in dimensional terms:

    p= pi+ q

    4khEi

    r

    2ct4kt

    (3.43)

    27

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    28/100

    PE281 - Applied Mathematics in Reservoir Engineering

    3.1.3 Late Time Behaviour ofpD

    We can consider the late time behaviour ofpD by recalling theorem 5 andtaking the limit of pD as s 0.

    pD(s) =1

    sK0(rD

    s) (3.44)

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

    K0(x) = (ln x2

    +)I0(x) +14

    z2

    (1!)2+ (1 +

    1

    2)

    (14

    z2)2

    (2!)2 +... (3.45)

    limx0

    K0(x) = ln

    x2

    (3.46)where = Eulers constant, 0.5772.

    lims0

    pD = 1s

    ln rD+ ln

    s ln2 +

    (3.47)

    limtpD = L

    11

    s(ln rD+ ln

    s ln 2 + )

    (3.48)

    Using transform pair 95 from the handout to invert the ln

    s term gives:

    = ln rD+ ln 2 + 12

    (+ ln tD) (3.49)

    =1

    2

    ln

    tDr2D

    + 0.80907

    (3.50)

    3.2 Finite Well Radius Solution

    The line source solution applies the constant flow rate condition as r tendsto zero. This simplifies the solution process. However an analytical solution

    can also be obtained when the flow rate condition is applied at r= rw. Thegoverning equation and boundary conditions remain the same as the linesource solution, except for the inner boundary condition which is now:

    rDpDrD

    |rD=1= 1 (3.51)

    28

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    29/100

    PE281 - Applied Mathematics in Reservoir Engineering

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

    2pD

    r2D+

    1

    rD

    pDrD

    spD = 0 (3.52)

    As before the general solution to the problem is:

    pD =c1I0(rD

    s) +c2K0(rD

    s) (3.53)

    The solution must remain bounded as r tends to infinity so as before we setc1 = 0:

    pD =c2K0(rD

    s) (3.54)

    Now consider the inner boundary condition. It requires that:

    rD(c2K0(rD

    s) = 1

    s (3.55)

    c2

    sK1(rD

    s) = 1s

    rD = 1 (3.56)

    c2= 1s32 K1(

    s)

    (3.57)

    The final solution for pD is:

    pD =K0(rD

    s)

    s32 K1(

    s)

    (3.58)

    3.2.1 Early Time Behaviour ofpD

    The early time behaviour ofpD can be examined by considering the limit ofpD as s . To do so the behaviour of the Bessel functions is required forlarge arguments.

    Kv(x)

    2xex

    (1 +

    1

    8x +

    (

    1)(

    9)

    2!(8x)2 +.... (3.59)

    where x is large and = 4v2.

    K0(rD

    s) =

    2rD

    serD

    s (3.60)

    29

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    30/100

    PE281 - Applied Mathematics in Reservoir Engineering

    and

    K1(s) = 2

    ses (3.61)

    So at late time pD is:

    pD = 1

    s32

    2rD

    serD

    s

    2

    s

    e

    s (3.62)

    = 1

    s32

    1rD

    e

    s(rD1) (3.63)

    The solution for pD can be found using transform pair number 85 from the

    handout:

    pD(rD, tD) = 1

    rD

    2

    tD

    e (rD1)

    2

    4tD (rD 1)erfc

    rD 12

    tD

    (3.64)

    pD(rD = 1, tD) = 2

    tD

    (3.65)

    3.2.2 Late Time Behaviour ofpD

    To find the late time behaviour ofpD

    consider the limit of pD

    ats

    0. Firstconsider the behaviour of the Bessel functions. As before:

    limx0

    K0(x) = [ln( 12

    x) +] (3.66)

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

    Kv(x) =1

    2(x)(

    1

    2x)v (3.67)

    where (x + 1) =x!

    limx0 K1

    (x) =12

    (12

    x)1 = 1x

    (3.68)

    Recall the solution for pD:

    pD =K0(rD

    s)

    s32 K1(

    s)

    (3.69)

    30

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    31/100

    PE281 - Applied Mathematics in Reservoir Engineering

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

    inverse transform:

    pD = L1 1s 32

    [ln(12

    rD

    s) +]1s

    = L11s (ln rD+ln

    sln2+) (3.70)

    =1

    2

    ln

    tDr2D

    + 0.80907

    (3.71)

    This is the same late time behaviour as the line source solution.

    3.3 Constant Pressure Inner Boundary Con-

    dition

    The previous two solutions have considered constant rate boundary condi-tions at the well. It is also possible to consider constant pressure boundaryconditions. It becomes more convenient to define the dimensionless pressure,pD, in terms of both the initial reservoir pressure, pi, and the well pressure,pw:

    pD = pi ppi pw

    (3.72)

    The dimensionless form of the pressure equation is as before:

    1

    rD

    rD

    rD

    pDrD

    =

    pDtD

    (3.73)

    For an infinite acting reservoir the boundary and initial conditions in dimen-sionless form are:

    pD(rD, tD) = 1 rD = 1 (3.74)

    pD(rD , tD) = 0 (3.75)pD(rD, tD = 0) = 0 (3.76)

    As before the general solution to this problem is:

    pD =c1I0(rDs) +c2K0(rDs) (3.77)Again c1 is set to zero to ensure the pressure remains finite as r . Theinner boundary condition is used to solve for c2:

    pD(rD = 1) =c2K0(

    s) =1

    s (3.78)

    31

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    32/100

    PE281 - Applied Mathematics in Reservoir Engineering

    c2 =

    1

    sK0(s) (3.79)

    pD(rD) = K0(rD

    s)

    sK0(

    s) (3.80)

    The inverse transform to solve this problem was provided by Van Everdin-gen and Hurst, The Application of the Laplace Transformation to FlowProblems in Reservoirs, Petroleum Transactions AIME, 305-324, 1949 (seeequation VI-26):

    pD(rD, tD) = 2

    0

    (1 eu2tD)[J0(u)Y0(urD) Y0(u)J0(urD)]u2[J20 (u) +Y

    20(u)]

    du (3.81)

    3.3.1 Early Time Behaviour of the Flow Rates

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

    qD = rD pDrD

    (3.82)

    qD = rD pDrD

    = rD rD

    K0(rD

    s)

    sK0(

    s)

    (3.83)

    Using the previously established expression for the derivative ofK0 gives:

    qD = rD

    s

    K1(rD

    s)

    K0(

    s) (3.84)

    The cumulative recovery is defined by:

    QD = td0

    qDdtD (3.85)

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

    QD =1

    sqD =

    rD

    s32

    K1(rD

    s)

    K0(s) (3.86)

    To consider the early time behaviour of the flow rates consider the limit ofqD ass . The early time behaviour of the Bessel functions have alreadybeen established:

    K1(rD

    s)

    2

    srDerD

    s (3.87)

    32

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    33/100

    PE281 - Applied Mathematics in Reservoir Engineering

    K0(

    s)

    2se

    s (3.88)

    qD = rDs

    2

    srDerD

    s

    2

    s

    e

    s =

    rDs

    e

    s(rD1) (3.89)

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

    qD =

    rD

    tDe (rD1)

    2

    4tD (3.90)

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

    QD =rD

    2

    tD

    e (rD1)

    2

    4tD (rD 1)erfc

    rD 12

    tD

    (3.91)

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

    3.4 Bounded Reservoir Example

    The previous examples have considered flow in infinite acting reservoirs. Lin-

    ear boundaries in reservoirs with either constant pressure or constant flowrate wells can be created using superposition as discussed in Chapter 1. Con-sider a case with a constant flow rate and the well and a constant pressureat the outer boundary (at radius re). The boundary and initial conditions indimensionless form are:

    rDpDrD

    = 1 rD = 1 (3.92)

    pD = 0 rD = rerw

    =rDe (3.93)

    pD = 0 tD = 0, rD (3.94)As before the general solution to this problem is:

    pD =c1I0(rD

    s) +c2K0(rD

    s) (3.95)

    33

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    34/100

    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 theouter boundary condition requires:

    c1I0(rDe

    s) +c2K0(rDe

    s) = 0 (3.96)

    The inner boundary conditions requires:

    rD[c1I0(rD

    s) +c2K0(rD

    s)] = 1

    s rD = 1 (3.97)

    The derivatives of the Bessel functions can be found from:

    d

    dx [xn

    Kn(x)] = xn

    Kn+1(x) (3.98)

    d

    dx[xnIn(x)] =xnIn+1(x) (3.99)

    Using these derivatives (3.97) becomes:

    c1

    sI1(

    s) c2

    sK1(

    s) = 1s

    (3.100)

    c1I1(

    s) c2K1(

    s) = 1s32

    (3.101)

    The outer boundary condition requires:c1I0(rDe

    s) +c2K0(rDe

    s) = 0 (3.102)

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

    c1 = 1s32

    K0(rDe

    s)

    K0(rDe

    s)I1(

    s) +K1(

    s)I0(rDe

    s) (3.103)

    c2 = 1

    s32

    I0(rDe

    s)

    K0(rDe

    s)I1(

    s) +K1(

    s)I0(rDe

    s) (3.104)

    pD = 1

    s32

    I0(rDe

    s)K0(rD

    s)

    K0(rDe

    s)I0(rD

    s)

    K0(rDes)I1(s) +K1(s)I0(rDes) (3.105)The late time (steady state) behaviour ofpD can be determined by takingthe limit of pD as stends to infinity:

    pD =lnrDrDe

    (3.106)

    34

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    35/100

    PE281 - Applied Mathematics in Reservoir Engineering

    3.5 Van Everdingen and Hurst

    Van Everdingen and Hursts 1949 paper was one of the first applications ofLaplace transforms in petroleum reservoir engineering. One of the interestingresults they proved was the following relationship between the pressure at awell (operating at constant flow rate) and the cumulative production (froma well operating at constant pressure):

    spD QD = 1

    s2 rD = 1 (3.107)

    Van Everdingen and Hurst also demonstrated how to add wellbore storage

    to a problem:pD =

    spDxxs(1 + scDspDxx)

    (3.108)

    3.6 Incorporating Storage and Skin

    Wellbore storage means that even if a well is produced at constant flow ratethe flow from the reservoir into the wellbore may be transient. The additionalflow can come from either the expansion of fluid in the wellbore or a changingliquid 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

    t =

    Vwp

    p

    t =cwVw

    p

    t (3.110)

    The relevant storage coefficient, Cis defined by:

    C=cwVw (3.111)

    3.6.2 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

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    36/100

    PE281 - Applied Mathematics in Reservoir Engineering

    relevant storage coefficient, C is defined by:

    C=Aw

    g (3.112)

    3.6.3 Laplace Space Solution

    If the Laplace space solution for a problem which has no storage and no skinis given by pDxx then solution for a problem with a skin, S, and storage, cDis:

    pD = spDxx+S

    s[1 + scD(spDxx+S)] (3.113)

    The dimensionless storage cD is defined by:

    CD = 5.615C

    2cthr2w(3.114)

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

    =

    fctf

    fctf+mctm 0<

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    37/100

    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 PetroleumEngineering in 1992 (Well Test Interpretation Using Laplace Space TypeCurves). This was a key contribution to the use of Laplace transforms in welltesting. The solutions to many well testing problems (beyond the examplespresented here) are known in Laplace space. As part of his study Bourgeoisdefined a quantity known as the Laplace pressure, sp. When plotted against

    1/sthis has similar behaviour as the real pressureBourgeois showed that instead of performing parameter estimation using

    nonlinear regression in real space the matching could be achieved efficientlyand effectively in Laplace space. The efficiency lies in the removal of theneed for a numerical inverse transform to evaluate the performance of setof paramter estimates. In Bourgeois examples fewer iterations were neededwhen matching in Laplace space than in real space.

    3.9 Heat Transfer

    Laplace transforms are also useful in other petroleum engineering engineeringproblems. During my undergraduate research project I studied heat transferfrom a buried pipeline which connects an offshore platform to onshore pro-duction facilities. Heat transfer was a particular concern because the fluidscould form solid hydrates if the temperature fell below a critical level.

    The pipe is buried below the sea floor. This makes the computationaldomain semi-infinite. However in the part of the study that used Laplacetransforms an effective cylinder configuration was used as shown in Figure3.1.

    Two energy balance equations are required in this problem. The first

    governs the temperature distribution in the pipe surrounds:

    ke2Te=ece Tet

    (3.120)

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

    37

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    38/100

    PE281 - Applied Mathematics in Reservoir Engineering

    Surroundings, T

    ro

    ri

    Burial medium, T

    Pipe, Tp

    e

    o

    Figure 3.1: Configuration of pipe and surrounds

    at velocity, U:

    pcpTpt

    +pcpUTpx

    = 2ri

    q (3.121)

    where qis the flux of heat through the pipe wall:

    q= ke Ter|r=ri (3.122)

    The solution procedure involved solving for the Laplace transform ofTein

    terms ofTp. This expression was then substituted into the equation governingthe Laplace transform ofTp. Finally the Tp was solved for.

    An example of this solution given below for the case of the pipeline heatingup at start-up:

    Tp(x, s) =Ti To

    s exp((s

    U +

    2ke

    s

    ripcpU)x) +

    Tos

    (3.123)

    where

    = K0(

    sri)I0(

    sro)

    Ko(

    sro)I0(

    sri) (3.124)

    =ece

    ke(3.125)

    =K0(

    sr0)I1(

    sri) +K1(

    sri)I0(

    sro) (3.126)

    The transient pipeline temperature distribution could be found by nu-merically inverting the expression for Tp. The results from this approach

    38

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    39/100

    PE281 - Applied Mathematics in Reservoir Engineering

    were much closer to field test results than results from a large finite differ-

    ence simulation. Since the numerical inverse can be computed very quicklymany more cases could be considered to assess the sensitivities to variousparameters in the model.

    3.10 Numerical Inversion of Laplace Trans-

    forms

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

    f(t) = L1

    {F(s)} = 1

    2i +

    i est

    F(s)ds (3.127)

    whereis chosen in such away that any singularities inF(s) are avoided. Thecontour the integral is performed over is known as the Bromwich contour.When an inverse transform is required that cant be found from tables thisintegral is usually evaluated numerically.

    The most commonly used algorithm for numerical inversion of Laplacetransforms is the Stehfest algorithm (Communications of the Association forComputing Machinery, algorithm 368). To invert f(s) the following summa-tion is performed:

    f(t) =ln 2t

    Ni=1

    Vif

    ln 2t

    i

    (3.128)

    where

    Vi = (1) N2+i

    min(i,N/2)k=( i+12 )

    kN2(2k)!

    (N/2 k)!k!(k 1)!(i k)!(2k i)! (3.129)

    Theoretically the accuracy of f(t) increases as N increases. However inpractice the Vi grow quickly in magnitude with Nand round-offs errors areamplified. Usually N= 8 is used in numerical inversions. This means that

    for every value off(t) required 8 values off(s) are required.The Stehfest algorithm works well for smooth functions but has difficul-

    ties for oscillatory functions and functions with discontinuities. Oscillatoryfunctions can be inverted if their wavelength is large with respect to halfthe width of the peaks. Stehfest tested his algorithm on 50 functions andreported errors of only 0.1%.

    39

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    40/100

    PE281 - Applied Mathematics in Reservoir Engineering

    There are other algorithms available for the numerical inversion of Laplace

    transforms. The Talbot algorithm (J. Inst. Math. Appl., Jan. 1979, pg 97-120) is one of the most accurate and widely applicable. Other algorithm seekto reuse previously evaluated f(s) values in the evaluation of subsequent f(t)values.

    3.11 Summary

    This chapter has outlined several petroleum engineering applications of Laplacetransforms 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, skinand dual porosity behaviour can be added readily to the solutions in Laplacespace. The Laplace space solution can also be efficiently incorporated intononlinear regression routines.

    A heat transfer case study was discussed to demonstrate how the use ofLaplace space solutions can complement numerical methods. The solution

    that study developed approximated the physics and the geometry of theproblem but ran very quickly and could be used for sensitivity analyses. Itultimately reproduced the field results more accurately than the numericalmodel results.

    40

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    41/100

    Chapter 4

    Fourier Transforms

    Like the Laplace transform the Fourier transform is also an integral trans-form. When viewed in the context of signal processing the application of theFourier transform takes a function from real-space to frequency-space (seelater examples). The Fourier transform is defined by:

    F(s) =

    f(x)ei2xsdx (4.1)

    The inverse transform is defined in a similar manner:

    f(x) = F(s)e

    i2xs

    ds (4.2)

    We will also use the notation f(s) for F(s). The Fourier transform exists iff(x) and f(x) are at least piecewise continuous and the following integralexists:

    |f(x)|dx (4.3)

    There are also some alternative definitions:

    F(s) =

    f(x)eixsdx (4.4)

    f(x) = 1

    2

    F(s)eixsds (4.5)

    and

    F(s) = 1

    2

    f(x)eixsdx (4.6)

    41

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    42/100

    PE281 - Applied Mathematics in Reservoir Engineering

    f(x) = 1

    2

    F(s)eixsds (4.7)

    Example:f(x) =ex

    2

    (4.8)

    F(s) =

    ex2

    ei2sxdx (4.9)

    =

    e(x2+i2xs)dx (4.10)

    =

    e(x2+i2xss2+s2)dx (4.11)

    =

    e(x+is)

    2s2dx (4.12)

    =es2

    e(x+is)2

    dx (4.13)

    =es2

    e2

    dx (4.14)

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

    F(s) =es2

    (4.15)

    The Fourier transform relates a function in real space (either time or distance)to a function in frequency space. This can be seen by recalling:

    e

    i2xs

    = cos(2xs) +i sin(2xs) (4.16)Now consider the inverse transform:

    f(x) =

    F(s)ei2xsds (4.17)

    This integral shows that the Fourier transform breaks a function f(x) into asum of sines and cosines with frequency s. (Recall the frequency off(kx) is|k|2

    ). The ammplitude associated with any given frequency is given by F(s).Example:Consider f= cos(x). The Fourier transform off is:

    F(s) =

    1

    2(+ 2s) +1

    2 (+ 2s) (4.18)i.e.

    f(x) =1

    2(cos(x) +i sin(x) + cos(x) +i sin(x)) (4.19)

    =1

    2(cos(x) + cos(x)) = cos(x) (4.20)

    42

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    43/100

    PE281 - Applied Mathematics in Reservoir Engineering

    -1.0

    -0.8

    -0.6

    -0.4

    -0.2

    0.0

    0.2

    0.4

    0.6

    0.8

    1.0

    cos(x)

    -3 -2 -1 0 1 2 3x

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

    -1.0

    -0.8

    -0.6

    -0.4

    -0.2

    0.0

    0.2

    0.4

    0.6

    0.8

    1.0

    Amplitude

    -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0

    Frequency

    Frequency spectrum

    Figure 4.2: Frequency spectrum off(x) =cos(x)

    43

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    44/100

    PE281 - Applied Mathematics in Reservoir Engineering

    4.1 Fourier Transform Theorems

    4.1.1 Theorem 1 - Linearity

    F(f(x) +g(x)) =F(f(x)) + F(g(x)) (4.21)

    4.1.2 Theorem 2 - Shift Theorem

    IfF(f(x)) =F(s) (4.22)

    then

    F(f(x a)) =ei2sa

    F(s) (4.23)Proof:

    F(f(x a)) =

    f(x a)ei2sxdx (4.24)

    =

    f(x a)ei2s(xa)i2sad(x a) (4.25)

    =ei2sa

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

    =ei2saF(s) (4.27)

    4.1.3 Theorem 3 - Similarity Theorem

    IfF(f(x)) =F(s) (4.28)

    F(f(ax)) = 1

    |a|F

    s

    a

    (4.29)

    4.1.4 Theorem 4 - Convolution Theorem

    If

    F(f(x)) =F(s) (4.30)and

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

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

    44

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    45/100

    PE281 - Applied Mathematics in Reservoir Engineering

    4.1.5 Theorem 5 - Parsevals theorem

    |f(x)|2dx=

    |F(s)|2ds (4.33)

    4.1.6 Theorem 6 - Derivatives

    F(fn(x)) = (i2s)nF(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)ei2sxdx (4.35)

    =

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

    Now consider a case where f(x) is the sum of an even and an odd function,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.Withf(x) defined as the sum of an even and odd function the Fourier trans-form off(x) becomes:

    F(f(x)) =

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

    i

    (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

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    46/100

    PE281 - Applied Mathematics in Reservoir Engineering

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

    Also note the following integral:

    fo(x)dx= 0 (4.43)

    Now substitute these relationships into (4.39):

    F(f(x)) =

    fe(x) cos(2sx)dx i

    fo(x) sin(2sx)dx (4.44)

    = 2

    0fe(x) cos(2sx)dx

    2i

    0fo(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)) =

    2

    0

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

    F1c (Fc(s)) =

    2

    0

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

    Fc(f) =

    s2

    f(0)

    s2Fc(s) (4.48)

    Fs(f(x)) =

    2

    0

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

    F1s (Fs(s)) =

    2

    0

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

    Fs(f) =s

    2

    f(0) s2Fs(s) (4.51)

    Use of sine and cosine transforms simplifies the transform procedure when

    transforming even and odd functions. The sine and cosines transforms canbe used in place of the full Fourier transform for problems with:- semi-infinite domains- differential equation that have even orders of derivatives- either f off specified at the boundary

    46

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    47/100

    PE281 - Applied Mathematics in Reservoir Engineering

    4.3 Example 1: 1D Pressure Diffusion

    Consider a one dimensional problem governed by:

    2pDx2D

    =pDtD

    (4.52)

    The boundary conditions are:

    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 usethe 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 theboundary conditions.First transform the differential equation (in space):

    s

    2

    pD(xD = 0, tD) s2pD = pD

    tD(4.56)

    pDtD

    +s2pD =

    2

    (4.57)

    This equation can be solved using the integrating factor method:

    dy

    dx+ P(x)y=Q(x) (4.58)

    ye

    Pdx =

    Qe

    Pdxdx +C (4.59)

    pDe

    s2tD = tD

    02

    ses

    2d+C (4.60)

    pD= tD0

    2

    ses

    2(tD)d (4.61)

    =

    2

    1

    s(1 es2tD) (4.62)

    47

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    48/100

    PE281 - Applied Mathematics in Reservoir Engineering

    Now invert to find pD:

    F1s (pD) =

    2

    0

    pDsin(sxD)ds (4.63)

    = 2

    0

    2

    1

    s(1 es2tD) sin(sxD)ds (4.64)

    = 1 Erf

    xD4tD

    = Erfc

    xD

    4tD

    (4.65)

    where Erf(z) and Erfc(z) are the error function and the complimentaryerror function defined by:

    Erf(z) = 2

    =

    z0

    et2

    dt (4.66)

    Erfc(z) = 1 Erf(z) (4.67)

    4.4 Example 2: Heat Equation

    Consider the diffusion of heat in a one-dimensional bar. Well consider aninfinitely long bar so the full Fourier transform is required. The governing

    equation is:

    22T

    x2 =

    T

    t (4.68)

    The boundary conditions are:

    T(x, t) =T(x ) = 0 (4.69)The initial condition is a prescribed temperature that varies in space:

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

    First consider the Fourier transform of the spatial derivatives:

    F(f(x)) = 1

    2

    eisxf(x)dx (4.71)

    = 1

    2f(x)eisx|

    12

    (is)f(x)eisxdx (4.72)

    48

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    49/100

    PE281 - Applied Mathematics in Reservoir Engineering

    Since f(x) vanishes at

    = (is)F(f(x)) (4.73)

    Similar arguments require f(x) vanishes at. The transformed differen-tial equation is:

    T

    t +2s2T = 0 (4.74)

    T =c1e(s)2t (4.75)Now consider the initial condition:

    T(t= 0) = T0 = c1 (4.76)

    T = T0e(s)2t (4.77)Now invert to find T:

    T = 1

    2

    eisxT0e(s)2tds (4.78)

    The transform ofT0 is:

    T0 = 1

    2

    T0()e

    isd (4.79)

    T= 12

    eisx

    eisT0()e(s)2tdds (4.80)

    = 1

    2

    T0()

    eis(x)(s)2tdsd (4.81)

    Finally we have an expression for T in terms ofT0:

    T = 1

    42t

    T0()e (x)2

    42t d (4.82)

    4.5 Example 3: Elliptic Problem

    Consider a steady-state problem in a two-dimensional semi-infinite domaingoverned by:

    2p= 0 (4.83)

    49

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    50/100

    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 boundarywe will use the sine transform to transform the differential equation:

    Fs2p

    x2 +

    2p

    y2

    = 0 (4.88)

    s

    2

    p(0, y) s2p +

    2p

    y2 = 0 (4.89)

    2p

    y2 s2p= 0 (4.90)

    This equation can be solved for Tto give:

    T =c1cos(isy) +c2sin(isy) (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:

    p= F1sinh(s(a y))

    sinh(sa) (4.94)

    wheresinh(z) = isin(iz) (4.95)

    Now invert to find p:

    p=

    2

    0

    F1sinh(s(a y))

    sinh(sa) sin(xs)ds (4.96)

    50

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    51/100

    PE281 - Applied Mathematics in Reservoir Engineering

    where

    F1 =

    2

    0

    f()sin(s)d (4.97)

    Substituting F1 into the expression for p gives:

    2

    0

    0

    f()sinh(s(a y))

    sinh(sa) sin(s)sin(sx)dds (4.98)

    = y

    0

    f()

    1

    y2 + (x )2 1

    y2 + (x +)2

    d (4.99)

    4.6 Radial ProblemsAll the examples presented have been for linear problems. Radial problemsare often of more interest to petroleum engineers. Is the Fourier transformhelpful in these cases?

    2pDr2D

    + 1

    rD

    pDrD

    =pDtD

    (4.100)

    - The sine and cosine transforms wont work because the pressure equationin 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 ofthe pressure at. Ideally the pressure and its first derivative would van-ish at. This may be the case at r = + however it much harder tomake that claim at r =. Applying the full Fourier transform in timeis another option. However transforming the time derivative requires thebehaviour of the pressure at t =. This is not such a problem since itis likely p = pi would be suitable. However now the boundary conditionsbecome time dependent if the flow begins at t= 0.

    The Hankel transform is better suited to radial problems.

    Hv() =0

    rJv(r)f(r)dr (4.101)

    f(r) =0

    Jv(r)Hv()d (4.102)

    Well discuss this in a later section.

    51

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    52/100

    PE281 - Applied Mathematics in Reservoir Engineering

    4.7 Inverting Fourier Transforms Numerically

    Unlike the Laplace transform there is no special algorithm (like the Stehfestalgorithm) required to invert Fourier transforms numerically. Since the limitsof the inversion integral are real standard numerical integration routines canbe used to evaluate the integral. The Stehfest routine required eight evalu-ations of the integrand to determine a numerical inverse Laplace transformat a given time. Many more evaluations of the integrand may be requiredwhen inverting a Fourier transform. If the Fourier transform is being appliedto discrete data (discrete Fourier transform) instead of a function there areformal algorithms that can be used to perform the inversion.

    4.8 Discrete Fourier Transforms

    Instead of considering the Fourier transform of a continuous function considera 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 ofs:

    sn= n

    N

    (4.104)

    The Fourier transform at sn is:

    F(sn) =

    f(x)e2ixsndx N1k=0

    fke2isnxk =

    N1k=0

    fke2ikn/N

    (4.105)Similarly the inverse transform is:

    fk= 1

    N

    N1n=0

    F(sn)e2ikn/N (4.106)

    For instance if we have 100 data points sampled from the following functionover x[0,1]:

    f(x) =sin(20x) +noise (4.107)

    The function f(x), shown in Figure 4.3, is quite noisey. However by takingthe Fourier transform, (Figure 4.4) we can extract the original sine wave

    52

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    53/100

    PE281 - Applied Mathematics in Reservoir Engineering

    20 40 60 80 100

    -2

    -1.5

    -1

    -0.5

    0.5

    1

    1.5

    Figure 4.3: Noisy signal

    quite easily. The Fourier transform shows two distinct spikes, one at then = 10 and one at n = 90. These correspond to frequencies of10 i.e.the frequency of the original sine wave. The first N/2 values of the Fouriertransform correspond to frequencies of 0 < f < fmax. The secondN/2 valuesof the Fourier transform correspond to the frequenciesfmax < f

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    54/100

    PE281 - Applied Mathematics in Reservoir Engineering

    20 40 60 80 100

    1

    2

    3

    4

    5

    Figure 4.4: Fourier transform

    f

    aliased Fourier transform

    true Fourier transform

    0

    H(f)

    1

    2

    1

    2

    Figure 4.5: Aliasing effect (from Numerical Recipes in C, Cambridge Uni-versity Press

    54

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    55/100

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

    e2ijk/Nfj (4.108)

    =N/21j=0

    e2ik(2j)/Nf2j+N/21j=0

    e2ik(2j+1)/Nf2j+1 (4.109)

    =N/21

    j=0

    e2ikj/(N/2)f2j+ WkN/21

    j=0

    e2ikj/(N/2)f2j+1 (4.110)

    whereW =e2i/N (4.111)

    =Fe(sk) +WkFo(sk) (4.112)This expansion can be performed recursively i.e. a transform a lengthN/2can be written as the sum of two transforms of length N/4 etc.

    55

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    56/100

    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, p1010, 1984 ). It is an alternative to the Fourier transform. The transform isdefined by:

    F(s) = 12

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

    f(t) = 1

    2

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

    The notation cas(2st) is sometimes used:

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

    Like the Fourier transform alternative definitions are possible:

    F(s) = 1

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

    f(t) =

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

    Like the Fourier transform the Hartley transform maps a real signal into afunction of frequency. Unlike the Fourier transform this function of frequency

    56

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    57/100

    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 performednumerically there is a considerable decrease in the amount of computationrequired. A complex multiplication or division requires four operations anda complex addition or subtraction requires a two operations. Also real dataarrays require only half the storage of complex data arrays. So the FastHartley transform (FHT) requires considerably less memory and CPU timethan the Fast Fourier Transform (FFT). Another attractive feature of theHartley transform is that the transform and its inverse are symmetrical sothe 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 particularyappropriate for the spatial domain of semi infinite (or bounded) radial prob-lems because we must make assumptions about the behaviour of the pressureat. The Hankel transform is a more suitable choice:

    Fv() =0

    rJv(r)f(r)dr (5.6)

    f(r) =

    0

    Jv(r)Fv()d (5.7)

    The Hankel transform is in fact a family of transforms, depending on theorder v of the Bessel function involved. For our applications we will considerBessel functions of order zero.

    5.2.1 Properties of Hankel Transforms

    Parsevals Theorem

    There is no direct analogue to the convolution theorem for Hankel transformshowever the following theorem can be readily proved:

    0

    Fv()Gv()d=0

    f(x)g(x)xdx (5.8)

    57

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    58/100

    PE281 - Applied Mathematics in Reservoir Engineering

    Derivatives

    Consider the Hankel transform ofg(x) =f(x).

    Gv() =0

    f(x)Jv(x)xdx (5.9)

    = [xf(x)Jv(x)]0

    0

    f(x)d

    dx[xJv(x)]dx (5.10)

    Assume that f(x) is such that the first term is zero. Now consider thederivatives of the Bessel functions:

    d

    dx [xJv(x)] =

    x

    2v [(v+ 1)Jv1(x) (v 1)Jv+1(x)] (5.11)

    Gv() = [v+ 12v

    Fv1() v 12v

    Fv+1()] (5.12)

    Note that v= 0 is a special case.

    Bessels Equation

    One of the most useful features of the Hankel transform is what happens whenit is applied to Bessels equation. Iff(x) is an arbitrary function considerthe transform of:

    g(x) = d2

    dx2f(x) +

    1

    x

    d

    dxf(x) v

    2

    x2f(x) (5.13)

    Gv() = 2Fv() (5.14)Note that the terms in the radial diffusivity equation,

    2pr2

    + 1r

    pr

    , are aninstance of Bessels equations so in radial (no , z) coordinates:

    F0(2p) = 2F0() (5.15)

    For more information on Hankel transforms see: Integral Transforms andtheir Applications, Brian Davies, Springer-Verlag, 1978.

    58

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    59/100

    PE281 - Applied Mathematics in Reservoir Engineering

    r

    line sink

    z=h

    z=0porous media

    z

    Figure 5.1: Source/sink configuration

    5.2.2 Hankel Transform Example

    Barry, Aldis and Mercer, Injection of Fluid into a Layer of DeformablePorous Medium, Applied Mechanics Reviews, v48, n10, 1995, pg 722, con-sider 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:

    2p

    r2+

    1

    r

    p

    r+

    2p

    z2 =

    (r )

    r (r)

    r (z zo)

    (5.16)

    The Dirac delta terms are used to impose the rate boundary conditions atthe source and sink. When this equation is Hankel transformed it becomes:

    2p

    z2 2

    p= ((z z0) J0(p)) (5.17)where pis the Hankel transform ofp;The solution for p is:

    p= cosh(z0)

    sinh()cosh((z 1)) J0()

    2 , z[z0, 1] (5.18)

    59

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    60/100

    PE281 - Applied Mathematics in Reservoir Engineering

    p= cosh((z0 1))

    sinh() cosh((z))

    J0()

    2 , z[0, z0] (5.19)

    These expressions were inverted by Barry et al. using a routine from theNAG library.

    60

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    61/100

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    62/100

    PE281 - Applied Mathematics in Reservoir Engineering

    Example:

    L= a(x)d2

    dx2+b(x)

    d

    dx+c(x) (6.4)

    i.e.

    Lu= a(x)d2u

    dx2+b(x)

    du

    dx+c(x)u (6.5)

    What is L?A=

    v[au+bu+cu]dx (6.6)

    Integrate by parts (term by term):

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

    vbudx = uvb

    u(vb)dx (6.8)

    A= vau (va)u + uvb +

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

    uLv dx (6.9)

    Now consider Lv a little more:

    Lv= (va) (vb)+vc = (va+av) vb bv+vc (6.10)

    =v a+av+av+avvbbv+vc = av +(2ab)v+(ab+c)v (6.11) L =a(x) d

    dx2+ (2a(x) b(x)) d

    dx+ (a(x) b(x) +c(x)) (6.12)

    Self-Adjointness

    If L = L and the boundary terms vanish, the operator L is known as aself-adjoint operator. In the example above, L is self-adjoint if:

    2a b= b (6.13)

    a b+c= c (6.14) b= a (6.15)

    i.e. ifb= a then L is self adjoint. The importance of self adjoint operatorswill become clearer we discuss Greens functions.

    62

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    63/100

    PE281 - Applied Mathematics in Reservoir Engineering

    -1 -1/2 -1/3 0

    k=1

    1/3 1/2 1

    1/2

    1

    3/2

    k=3

    k=2

    Figure 6.1: Wk function

    6.1.2 The Dirac Delta Function

    The Dirac delta function is written as (x) and is used to describe pointsource. Begin by considering a function, Wk:

    Wk = k

    2, |x| < 1

    k

    0, otherwise

    (6.16)

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

    limk

    1k

    1k

    k

    2 dx=

    k

    2

    1k

    1k

    dx (6.17)

    =k

    2

    1

    k+

    1

    k

    = 1 (6.18)

    Define (x) = limk Wk

    (x) = 1.0 (6.19)

    (x) = 0, x = 0, x= 0

    (6.20)

    63

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    64/100

    PE281 - Applied Mathematics in Reservoir Engineering

    H(x-a)

    1

    x=a

    Figure 6.2: Heavisde function

    Integrals Involving (x)

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

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

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

    Derivatives Involving (x)

    This is easier to consider in integral form.

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

    (x)h(x) dx (6.23)

    =

    (x)h(x) dx (6.24)

    More generally:

    n(x a)h(x)dx= (1)nhn(a) (6.25)

    Heaviside Step Functions and the Dirac Delta Function

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

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

    H(x a)h(x) dx (6.26)

    64

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    65/100

    PE281 - Applied Mathematics in Reservoir Engineering

    =h(

    )

    H(x

    a)h(x)dx (6.27)

    =h()

    ah(x)dx (6.28)

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

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

    6.1.3 Greens Functions

    Consider a differential equation written in operator form on a domain :

    Lu= f (6.32)

    whereu is the unknown function andfis a forcing function. We will assume(initially) that L is self-adjoint, however this assumption will ultimately berelaxed. Using operator notation:

    u= L1f (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 =L1L= I (6.34)

    Now define the inverse operator as:

    L1f=

    G(x, xi)f(xi)dxi (6.35)

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

    GLu(xi)dxi =

    uLGdxi=

    Gf(xi)dxi (6.36)

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

    LG(x, xi) =LG(x,xi) =(xi

    x) (6.37)

    The boundary conditions for this problem can be found by setting the bound-ary terms to zero.

    u=

    G(x, xi)f(xi)dxi (6.38)

    This derivation assumes L is a self adjoint operator, we will return to thenon-self adjoint case in another section.

    65

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    66/100

    PE281 - Applied Mathematics in Reservoir Engineering

    6.2 Greens Function Examples

    6.2.1 Self Adjoint Problem

    Use Greens functions to solve:

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

    u(0) =u(1) = 0 (6.40)

    Step 1: Find L

    Note we are working with u(xi) not u(x). 10

    Gudxi=Gu|10 10

    uGdxi (6.41)

    =Gu|10 uG|10+ 10

    uGdxi (6.42)

    i.e.

    L = d2

    dx2 (6.43)

    Step 2: Consider Boundary Terms

    To ensure the problem is self-adjoint we will zero the boundary terms byimposing boundary conditions on G:

    G(x, 1)u(1) G(x, 0)u(0) = 0 (6.44)

    G(x, 1)u(1) G(x, 0)u(0) = 0 (6.45)Since u(1) =u(0) = 0 we require:

    G(x, 1) = 0 (6.46)

    G(x, 0) = 0 (6.47)

    66

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    67/100

    PE281 - Applied Mathematics in Reservoir Engineering

    Step 3: Solve forG

    d2G

    dx2i=(xi x) (6.48)

    dGdxi

    =H(xi x) +Axi (6.49)

    G= (xi x)H(xi x) +Axi+B (6.50)Now use boundary conditions to solve for Aand 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 Aand B back into G:

    G= (xi x)H(xi x) + (x 1)xi (6.56)

    Step 4: Solve foru

    u(x) = 10

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

    Symmetry and Interpretation ofG

    Note the symmetry in G.

    When xi < x:G= (x 1)xi (6.58)

    When xi> x:

    G= (xi 1)x (6.59)This symmetry is something that should be expected for self adjoint prob-

    lems. PhysicallyG can be interpreted as the deflection of a beam in responseto an incremental load (xi)dxi at point xi.

    67

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    68/100

    PE281 - Applied Mathematics in Reservoir Engineering

    6.2.2 Non-Self Adjoint Problem

    Use Greens functions to solve:

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

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

    u(1) =a (6.62)

    Step 1: Find L

    1

    0GLudxi= Gu

    |10

    1

    0uGdxi + 3Gu

    |10

    3

    1

    0uGdxi + 2

    1

    0uGdxi (6.63)

    =Gu|10 Gu|10+ 10

    uGdxi+ 3Gu|10 3 10

    uGdxi+ 2 10

    uGdxi (6.64)

    L = d2

    dx2 3 d

    dx+ 2 (6.65)

    The problem is not self adjoint.

    Step 2: Consider Boundary Terms

    G(x, 1)u(1)

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

    G(x, 0)u(0) + G(x, 0)u(0) 3G(x, 0)u(0) = 0 (6.66)Substitute in the boundary conditions for u:

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

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

    2G(x, 1) + 6G(x, 1) + G(0, x) = 0 (6.69)As in the self adjoint problem we will multiply Lu by G and integrate

    over . 10

    GLudxi= boundary terms+ 10

    uLGdxi= 10

    Gfdxi (6.70)

    68

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    69/100

    PE281 - Applied Mathematics in Reservoir Engineering

    By zeroing out as many boundary terms as possible and choosing LG=

    (xi x) this becomes: 10

    Gfdxi = aG(x, 1) + u(x) (6.71)

    Step 3: Solve forG

    It is convenient to solve the problem in two parts.

    d2G

    dx2i 3 dG

    dxi+ 2G= 0, 0 xi < x (6.72)

    d2G

    dx2i 3 dG

    dxi+ 2G= 0, x < xi 1 (6.73)

    The singularity at xi =x will be handled by imposing conditions on theconstants of integration. The general solution to this problem is:

    G= Aexi +Be2xi , 0 xi< x (6.74)

    G= C exi +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)2G(x, 1) + 6G(x, 1) + G(0, x) = 0 (6.78)

    2(Ce+ 2De2) + 6(Ce +De2) + (A+ 2B) = 0 (6.79)A + 2B+ 4Ce + 2De2 = 0 (6.80)

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

    Aex +Be2x =C ex +De2x (6.81)

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

    x+0x0

    G 3G+ 2Gdxi= x+0

    x0(xi x)dxi (6.82)

    69

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    70/100

    PE281 - Applied Mathematics in Reservoir Engineering

    dG

    dxi |x+0x0

    3G

    |x+0x0+ 2

    x+0

    x0Gdxi = 1 (6.83)

    Because we have required G to be continuous the second and third terms inthis 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 forG is:

    G=1

    k(2e2(1x) 4e1x)(exi e2xi), 0 xi x (6.85)

    G=

    1

    k (2e2

    x

    2e2

    1)exi

    x

    + (4e4e1

    x

    +ex

    )e2xi

    x

    , x xi

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    71/100

    PE281 - Applied Mathematics in Reservoir Engineering

    dy

    i

    d

    n

    Figure 6.3: Relationship ofdy to d

    6.3.1 Adjoint Operator

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

    vLu d = boundary terms+

    uLv d (6.90)

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

    vAuxxd =

    y2y1

    x2x1

    vAuxxdx

    dy (6.91)

    = y2

    y1

    vAux|x2x1

    x2x1

    (vA)xuxdx

    dy (6.92)

    = y2

    y1

    [vAux (vA)xu]x2x1+

    x2x1

    (vA)xxudx

    dy (6.93)

    = y2

    y1[vAux (vA)xu]x2x1dy+

    (vA)xxud (6.94)

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

    an arbitrary function ofxand y.

    dy = dcos = i nd (6.95)Therefore the integral being evaluated is:

    [vAux (vA)xu]i nd +

    (vA)xxud (6.96)

    71

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    72/100

    PE281 - Applied Mathematics in Reservoir Engineering

    Treating all terms in this manner gives the following relationship between

    L nand L: vLu d =

    (Mi+Nj) nd +

    uLv d (6.97)

    where

    Lv= (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 Lu LvLaplace 2u 2vHelmholtz 2u+k2u 2v+k2vDiffusion ut uxx vt vxxWave c2uxx utt c2vxx 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)

    andBx+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) =limkWk(r) (6.103)

    wherer=

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

    72

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    73/100

    PE281 - Applied Mathematics in Reservoir Engineering

    and

    Wk= k2

    , r 1

    k (6.105)

    = 0, r > 1

    k (6.106)

    and/or

    Wk(r) =kekr

    2

    (6.107)

    The two dimensional delta function has similar properties to the one dimen-sional delta function:

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

    6.3.3 Constructing Greens Functions

    When working in two dimensions is usually easier to construct the Greensfunction for a given problem as the sum of two Greens functions:

    G= Gf+Gb (6.110)

    where Gf satisifes LGf =(xi x, yi y) without taking account of anyparticular boundary conditions on G or Gf. The function Gf is known as afree-space Greens function. The function Gb takes account of the boundaryterms for a particular problem.

    Example: Two-Dimensional Laplace Equation

    LGf= Gf =(xi x, yi y) (6.111)As before we will begin by solving the problem away from the singularitywhere the delta function is zero, then will consider the singularity separately.

    2Gf=1r

    r(r

    Gfr

    ) = 0 (6.112)

    r Gfr

    =A (6.113)

    73

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    74/100

    PE281 - Applied Mathematics in Reservoir Engineering

    x,y

    e

    y

    x

    i

    i

    Figure 6.4: Integration around singularity

    Gf

    r

    =A

    r

    (6.114)

    Gfr

    =A

    r (6.115)

    Gf=Alnr+B (6.116)where

    r=

    (xi x)2 + (yi y)2 (6.117)Now consider the singularity by integrating over a disc surrounding the sin-gularity as shown in Figure 6.4.

    e

    2Gf

    d = e

    (xi

    x, yi

    y)d (6.118)

    Use Greens second identity to convert the domain integral on the left to aboundary integral. In general for two function f and g Green proved:

    (f2g g2f)d =

    f

    g

    n g f

    n

    d (6.119)

    74

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    75/100

    PE281 - Applied Mathematics in Reservoir Engineering

    e2Gfd =

    e

    Gf

    r

    dr (6.120)

    = 20

    Gfr

    rd (6.121)

    Now substitute Gf=Alnr+B:

    =A 20

    1

    rrd (6.122)

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

    2A = 1 (6.123)

    i.e.A= 1 (6.124)

    Since we are not considering any boundary conditions we can not solve forB explicity so we will set it (arbitrarily) to zero, i.e.:

    Gf= 1

    2lnr (6.125)

    Example: One-Dimensional Diffusion Equation

    The diffusion equation is:

    Lu= u

    t

    2u

    x2 (6.126)

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

    L= t

    2

    x2 (6.127)

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

    LGf= Gf

    +2Gfx2i

    = (xi x)( t) (6.128)

    Well use a Fourier transform to do this, specifically:

    F(s) = 1

    2

    f(xi)eixisdxi (6.129)

    75

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    76/100

    PE281 - Applied Mathematics in Reservoir Engineering

    Gf s2 Gf= ( t) 1

    2eixs (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, > t (6.131)

    Gf s2 Gf= 0, < t (6.132)

    This equation can be readily solved for Gf:

    Gf=Aes2, > t (6.133)

    Gf=Bes2, < t (6.134)

    Now take account of the singularity by integrating past it:

    t+0

    t0d Gfd

    d s2 t+0

    t0Gfd= 1

    2

    t+0t0

    ( t)eixsd (6.135)

    We require Gfto be continuous so the second integral in the above equationvanishes to give:

    (Aes2 Bes2) = 1

    2eixs (6.136)

    To solve forAandB we need one more equation. This time we will consider aphysical argument. The Greens function represent the response of a systemto a unit input applied at time and location xi. So before time we donot expect change in the system i.e G will be zero for t < . Therefore theconstantA is zero.Now solve for B:

    B = 1

    2 eixses2t

    (6.137)

    Gf= 0, > t (6.138)

    Gf= 1

    2eixs

    s2t + s

    2 > t (6.139)

    76

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    77/100

    PE281 - Applied Mathematics in Reservoir Engineering

    Gfcan be written more compactly as:

    Gf=H(t )

    2eixs

    s2t + s

    2 (6.140)

    The Fourier transform can be inverted to give:

    Gf= H(t )

    4(t )e(xix)

    2

    4(t) (6.141)

    6.4 The Newman Product Theorem

    This theorem is not specific to the solution of the differential equations thatgive rise to Greens functions (LG= (xix) etc). The theorem allows us tofind solutions to differential equations in multiple dimensions from solutionsto one-dimensional problems. We will consider the diffusion equation in threedimensions:

    2u

    x2+

    2u

    y2+

    2u

    z2 =

    1

    u

    t (6.142)

    on the domaina1 x b1 (6.143)

    a2 y b2 (6.144)a3 z b3 (6.145)

    with initial conditions

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

    Note being able to express the initial condition in this product form isessential.

    The boundary conditions can be constant u, constant flux or mixed on each

    edge.

    Now consider solving three one-dimensional problems:

    2u1x2

    =1

    u1t

    , a1 x b1 (6.147)

    77

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    78/100

    PE281 - Applied Mathematics in Reservoir Engineering

    2u2

    y2 =

    1

    u2

    t , a2

    y

    b2 (6.148)

    2u3z2

    = 1

    u3t

    , a3 y b3 (6.149)The initial conditions for this set of equations are:

    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 solu-tion 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):

    2u

    x2+

    2u

    y2+

    2u

    z2 =

    2u1u2u3x2

    +2u1u2u3

    y2 +

    2u1u2u3z2

    (6.154)

    Expanding the derivatives gives:

    =u2u32u1

    x2 +u1u32u2

    y2 +u1u22u3

    z2 (6.155)

    Now substitute in (6.147):

    =u2u31

    u1t

    +u1u31

    u2t

    +u1u21

    u3t

    (6.156)

    = 1

    u

    t (6.157)

    For an example involving radial coordinates see Carslaw and Jaegar, page33.

    78

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    79/100

    PE281 - Applied Mathematics in Reservoir Engineering

    6.5 Gringarten and Ramey

    Gringarten and Ramey, The Use of Source and Greens Functions in Solv-ing Unsteady-Flow Problems in Reservoirs. SPEJ, October 1973, pg 285,applied Greens functions and the Newman product theorem to reservoir en-gineering problems. Gringarten and Ramey derived both free-space Greensfunctions and Greens functions satisfying boundary conditions for rectangu-lar, homogeneous, anisotropic reservoirs. Gringarten and Ramey define bothGreens functions and source functions. Source functions act over a regionwhile Greens functions act a given point in one, two or three dimensions.Source functions can be determined by integrating Greens functions over anappropriate region (corresponding to a well or fracture).

    The basic result that Gringarten and Ramey use is the Green functionsfor a point source in a one dimensional reservoir:

    G= 1

    4te

    (xxw)2

    4t (6.158)

    where

    2p pt

    = 0 (6.159)

    Note that this one dimensional source corresponds to an infinite planarsource in three dimensions (see Figure 6.5). This source can be integratedover a region of width xfto produce a slab source as shown in Figure 6.6:

    S=1

    2

    erf

    x (xw xf/2)

    4t

    erf

    x (xw+xf/2)

    4t

    (6.160)

    The product of the inifinite plan source and the infinite line source givesthe point source solution (see Figure 6.7).

    The set of free-space solutions Gringarten and Ramey generated is givenby 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 infi-nite plane and infinte slab sources by using the method of images (which wediscussed at the start of the course. These solutions are VII(x) to XII(x) inTable 2 of their paper. For instance consider constant pressure boundaries

    79

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    80/100

    PE281 - Applied Mathematics in Reservoir Engineering

    x

    y

    z

    x = xwFigure 6.5: Planar source

    x

    y

    zxf

    x = xwFigure 6.6: Slab source

    80

  • 8/13/2019 PE 281 - Applied Mathematics in Reservoir Engineering

    81/100

    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 wewill require thatG = 0 on these boundaries (since G represent the effect of aunit flow rate at the well at any location in space). The sequence of imagesis shown in Figure 6.8.

    The sequence extends infinitely in both directions. The Greens function that

    corresponds with this sequence is:

    G= 1

    4t

    e

    (xxw)2

    4t e (x+xw)2

    4t e (x2xe+xw)2

    4t +e(x+2xexw)

    2

    4t +...

    (6.161)

    G= 1

    4t

    n=

    e(xxw2nxe)

    2

    4t e (x+xw2nxe)2

    4t

    (6.162)

    This series can have convergence problems. It is better to expand it usingPoissons summation formula, which is:

    f(n) =

    2

    n= F

    2n

    (6.