You are on page 1of 13

Drill Stem Test Simulation

by

Nicolas A. Jeannequin

Practical Numerical Analysis

MSc in Mathematical Modelling


and Scientific Computing
Abstract

The drill stem test is used by petroleum engineers to investigate the formation in which a well is
being drilled. In this paper we will present a simplified model of the test and provide a numerical
solution. The implementation of it was done using Matlab.
Contents

1 Introduction 3

1.1 Description of the Drill Stem Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2 The problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2.1 Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2.2 Governing equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Numerical solution 6

2.1 Change of variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2 Finite difference scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 Results 8

3.1 λ = β = 0.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.1.1 Description of the simulated evolution of pressure . . . . . . . . . . . . . . . . 8

3.1.2 Final pressure and volume of fluid in the pipe . . . . . . . . . . . . . . . . . . 9

3.2 λ = 6 β = 0.000245 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.2.1 Description of the simulated evolution of pressure . . . . . . . . . . . . . . . . 9

3.2.2 Volume produced by the well during the flowing period . . . . . . . . . . . . 11

2
Chapter 1

Introduction

1.1 Description of the Drill Stem Test

A well test is a period of time during which the pressure of a well is recorded to estimate well or
reservoir properties, to determine the productivity of the well or to obtain reservoir management
data. The drill stem test is just an example of such a well test.

The following picture describes the drill equipment needed for carrying out a drill stem test.

Figure 1.1: Equipment for a drill stem test

At the beginning of the test, a valve and a pressure transducer are lowered down a drill pipe. A
packer expands to isolate the region in which oil is thought to be present. The valve is then opened
so that fluid can flow in the pipe. At this point the test can start, it involves three stages:

3
• When the valve is opened, the pressure at the wall of the well falls sharply and allows the
formation fluid to flow into the well (this is called the “flow” state). The pressure decreases
during that time and its variation is recorded.

• The fluid in the well flows to the surface - this means that the well is “producing” and the
volume of oil is recorded.

• The valve is shut causing the pressure to build up again on the wall of the well - (the engineer
jargon for this is the “shut in” period). The rate of recovery of pressure is recorded.

It is the rate of recovery of the pressure, combined with the known amount of fluid produced during
the test, which enables the engineer to estimate the permeability of the formation and the far field
pressure.

This in turn influences the decision as to whether the well is productive enough or not and deter-
mines in the former case the production strategy.

A simple PDE model of the pressure observed at the bottom of the well during drill stem testing
can be constructed and solved numerically. It provides the expected time history of the pressure
when the valve is opened for an initial flowing period and then during shut in, when we are given
the formation and surface pressures.

1.2 The problem

1.2.1 Aim

The aim of the paper is to determine the time history of well pressure, the final pressure and the
volume of formation fluid “produced” for a specific well. The parameters of the well we will study
are as follows:

Parameters

• The formation pressure: Pf , is given to be 3000psi which can be converted to 2.07 ∗ 107 Pa.
ρgh
• 100 foot cushion of water, the non-dimensional initial pressure corresponds to pi = Pf ≈
0.0144, where ρ is the density of water: 1000kg/m3 .

• The surface pressure, pc is also determined in the same fashion, by using the formula: pc =
ρ0 gD
Pf , where D is the well depth and given as 1524m. ρ0 is the density of the oil and is given
as 700kg/m3 . We obtain: pc = 0.505.

• The flowing period is set to 0.5 hours and the shut in to 2 hours.

4
1.2.2 Governing equations

The governing equations for this process which calculates the pressure in the formation over time
are non-dimensionalised by using the following new variables:

R = rw r, t = ts τ, P = pPf .

After some manipulations of the equations of fluid dynamics and using Darcy’s law we obtain the
following non-dimensional model:

∂p 1 ∂ ∂p
β = r .
∂τ r ∂r ∂r

β and λ have been taken to be both 0.8 to develop the matlab code, since in that case we avoid a
flow to surface state. We also provide the graphs and results when β = 0.000245 and λ = 6 since
they are the parameters provided.

There are three types of boundary conditions to the model: when the well is flowing and oil has
not reached the surface, when oil is being produced, during the shut in period.

Boundary Conditions Equations


∂p ∂p
well is flowing and oil has not reached the surface ∂τ |r=1 = λ ∂r |r=1
oil is being produced p|r=1 = pc = ρgzPf
∂p
during the shut in period |
∂r r=1 = 0

The initial conditions are:

p(r, 0) = 1, 1 ≤ r < ∞
p(1, 0) = pi .

5
Chapter 2

Numerical solution

As we can see the model comprises a parabolic partial differential equation. We will use a time
marching method to describe the pressure. The governing equations are discretised both in time
and space. We impose the proper boundary conditions depending on whether the well is in a “flow”
or in a “shut in” state.

2.1 Change of variables

The problem is parabolic and the solution can be found by a time marching method. The spatial
domain of the problem is converted using the transformation ζ = 1r . Thus, the PDE transforms
into
∂p ∂ ∂p
β = ζ3 ζ
∂τ ∂ζ ∂ζ
where, ζ is the new spatial coordinate for the non-dimensional length and it ranges from 0 to 1.
Thus, ζ = 1 corresponds to r = 1 and ζ = 0 corresponds to r → ∞.

The boundary conditions now become:

Boundary Conditions Equations


∂p ∂p
well is flowing and oil has not reached the surface ∂τ |ζ=1 = −λ ∂ζ |ζ=1
oil is being produced p = pc
∂p
during the shut in period ∂ζ |ζ=1 = 0

The initial conditions are,


p(ζ, 0) = 1, ζ ∈ [0, 1).
p(1, 0) = pi ,
where pi is the non-dimensional initial pressure in the pipe.

6
2.2 Finite difference scheme

This system is discretised by defining a grid over the domain with m spatial steps of size ∆ζ, a time
step of ∆τ and pnj representing the pressure at spatial coordinate j and time step n. We obtain:

pn+1
j − pnj ζj3 n n+1 n+1 n+1
o
β = θ ζ 1p − (ζ 1 + ζ 1 )p + ζ 1p
j− 2 j−1 +
∆τ ∆ζ 2 j+ 2 j+1 j+ 2 j− 2 j

ζj3 n o
(1 − θ) 2 ζj+ 1 pnj+1 − (ζj+ 1 + ζj− 1 )pnj + ζj− 1 pnj−1 (2.1)
∆ζ 2 2 2 2

for j = 1, . . . , m − 1.

The boundary conditions transform to,


( )
n+1
pn+1
m − pm
n pn+1
m − pm−1 pnm − pnm−1
= − λθ + λ(1 − θ)
∆τ ∆ζ ∆ζ

when the well is flowing but has not reached the surface;

pnm = pc

when the well is producing; and


n+1
pn+1
m − pm−1 = 0

when the well is shut in.

The initial condition is given by


p0j = 1 0 ≤ j ≤ m.

The problem can be represented in matrix format as below, by letting pn = [pn0 , pn1 , . . . , pnm ]T denote
the pressure at time n∆τ ,
∆τ
pn+1 − pn = [θDpn+1 + (1 − θ)Dpn ]
β(∆ζ)2
or
∆τ ∆τ
(I − θD)pn+1 = (I + (1 − θ)D)pn
β(∆ζ)2 β(∆ζ)2
where D is a tri - diagonal matrix, p is a vector containing the value of the non-dimensional pressure
along the formation. The initial condition is applied to p and subsequent values of p are obtained
from iterations through a loop. The boundary conditions are changed by changing the last two
entries of the last row of D.

7
Chapter 3

Results

In this section, we present the diagrams that we obtained when running the Matlab simulation.
The first part will deal with the case when λ and β were taken to both be 0.8, which allowed us
to develop the Matlab code. The second part then takes β = 0.000245 and λ = 6 which are the
parameters of the well that we want to test.

In both simulations the other parameters were taken to be:

1. a 100 foot cushion of water,

2. a 30 minute flowing period and a 2 hour shut in period,

3. a formation pressure of Pf = 3000 Psi,

4. well depth of D = 1524m,

5. and density of the oil was taken to be 70kg/m3 .

3.1 λ = β = 0.8

3.1.1 Description of the simulated evolution of pressure

Figure 3.1 shows us the evolution of the pressure over time at the bottom of the well during the
flowing and shut in periods. We can see that the pressure is initially equal to the pressure exerted
by the cushion of water. The valve being open, fluid starts to fill the pipe which makes the pressure
at the bottom of the well rise. Once the valve is closed, there is a sharp rise in pressure which
gradually slows down as the pressure at the bottom of the well approaches that of the formation.

In this simulation, there is no oil produced, since the pressure during the flowing period never
reaches pc . It is nevertherless possible to determine the amount of fluid inside the pipe.

8
Figure 3.1: Non dimensional well pressure vs time

3.1.2 Final pressure and volume of fluid in the pipe

The final pressure was found by taking the value found in the last time step (at t= 2.5 hours) and
was then transformed back to physical units. We found:
psi
Pf inal = 0.90927 ∗ 2.07 ∗ 10−7 P a ∗ 1.45 ∗ 10−4 = 2729 psi
Pa
.

The volume in the pipe was then calculated by considering that the pressure at the bottom of the
well was created by the amount of fluid above it. Therefore:
Pf ∗ p 0.4815 ∗ 2.07 ∗ 107 P a
V = πr2 h = πr2 = π ∗ (0.51m)2 ∗ kg m
= 11.87m3
ρg 700 m3 ∗ 9.8 s2

where r is the radius of the pipe, h is the height of fluid produced in the pipe, ρ is the density of
oil, Pf is the formation pressure, p is the non-dimensional pressure when the flow period ends.

3.2 λ = 6 β = 0.000245

3.2.1 Description of the simulated evolution of pressure

Figure 3.2 shows the time history of the well pressure during the flowing period followed by the
shut in period. We convert the results back to oil field units for the graphical display.

9
Figure 3.2: Pressure vs time

This figure also shows that there is a small period of time during which the pressure stays constant,
this signals that the fluid has reached the surface.

Figure 3.3 shows the evolution of pressure over the whole formation.

10
Figure 3.3: Pressure vs τ and ζ

3.2.2 Volume produced by the well during the flowing period

To calculate the volume produced we will use the same method as when λ = β = 0.8. We will first
do a simulation where the pipe is longer and therefore the fluid does not overflow and then one
where it does. The difference between the two curves shows the amount of fluid that was produced
as shown in figure 3.4.

11
Figure 3.4: Evolution of pressure during flowing period. Data 1 represents the real pressure. Data
2 shows how the pressure would have evolved if the pipe had been longer. The difference between
the two curves when the plateau starts represents the amount of fluid produced.

The final (at the end of flowing) non dimensional pressure found for Data 1 was 0.505 and the final
pressure found for Data 2 was 0.5308. Therefore the volume produced by the well during flowing
period was:

0.5308 ∗ 2.07 ∗ 107 P a 0.505 ∗ 2.07 ∗ 107 P a


V = πr2 h2 − πr2 h1 = π ∗ (0.51m)2 ∗ ( kg m
− kg m
) = 81m3
700 m3 ∗ 9.8 s2 700 m3 ∗ 9.8 s2

where r is the radius of the pipe.

12

You might also like