You are on page 1of 143

A NUMERICAL SIMULATION STUDY ON THE CHARACTERISTICS

OF A VARIABLE WELLBORE STORAGE PRESSURE


TRANSIENT RESPONSE
by
WILLIAM T. HAUSS, B.S. in P.E.
Submitted to the Graduate Faculty
of Texas Tech University in
Partial Fulfillment of
the Requirements for
the Degree of
MASTER OF SCIENCE
IN
PETROLEUM ENGINEERING

Approved

Accepted

May, 1988

ACKNOWLEDGMENTS

I owe an expression of gratitude to the people who


have provided support for me throughout the writing of this
thesis.

Without the encouragement of my committee, the

Petroleum Engineering faculty, my friends, and my family,


the quality of this project would have inevitably suffered.
I would like to sincerely thank Dr. Marion D. Arnold,
the chairman of my thesis committee, for his professional
guidance and time that he spent while reviewing my work.
It was an honor and pleasure to work with such a renowned
man in the field of hydrocarbon reservoir simulation.
I am indebted to Dr. Robert E. Carlile for his
unfailing interest in my work as a graduate student.

sincerely appreciate his recommendation of me for the Amoco


Foundation Graduate Fellowship.
I will always appreciate Professor Duane A. Crawford's
concern for me, academically and as a person.

My recently

acquired interest in pressure-transient analysis is


unequivocally due to his outstanding lectures on the
subject.
Dr. Rong C. Lin, Dr. Charles G. Guffey, Dr. Carlon S.
Land, Mr. James Olson, and Mr. Mihai A. Vasilache have all
been a positive influence on my education at Texas Tech,

11

and I extend to all of them a sincere expression of my


thanks.
I would also like to thank Dr. Wayne T. Ford for
providing me with additional insight into the methods of
numerical analysis and computer programming, which are so
important to a study such as this one concerning reservoir
simulation.
Finally, I would like to offer an expression of my love
and appreciation to my mother and father, sisters, Cindy
and Ceil, and brother. Earl, for their patience, kindness,
and encouragement, which was ever so needed during the
writing of this thesis, will always be remembered.

Ill

CONTENTS

ACKNOWLEDGMENTS

ii

TABLES

vi

FIGURES

vii

NOMENCLATURE

CHAPTER
I.
II.
III.

INTRODUCTION

REVIEW OF THE LITERATURE

DEVELOPMENT OF MODEL EQUATIONS

11

Reservoir Model

12

Wellbore Model

24

Changing Liquid Level Storage


Compressional Storage
IV.

V.

VI.

25
32

FINITE DIFFERENCE FORMULATION

36

Constructing the Grid

37

Transformation in Differential Form

41

Difference Scheme

46

Discretized Model Equations

49

Steady-State Wellbore Flow

50

Transient Wellbore Flow

51

NUMERICAL SOLUTION SCHEME

54

Boundary Conditions

56

Matrix Notation

60

Numerical Algorithm

61

VERIFICATION OF THE NUMERICAL MODEL

64

A Numerical Pressure Distribution

66

iv

Finite-Difference Compared to Ei Solution . 66


Review of Conventional Pressure-Transient
Drawdown Analysis

71

A Numerical Pressure Drawdown Test Without


Wellbore Storage

76

Mathematical Basis for the Log-Log Plot ... 79


A Numerical Pressure Drawdown Test With
Wellbore Storage Included

83

Dimensionless Finite-Difference Solutions . 91


No Wellbore Storage
Wellbore Storage Included
VII.

VIII.

91
92

CHARACTERISTICS OF A VARIABLE WELLBORE


STORAGE COEFFICIENT

99

Influencing Factors

100

Significance of the Early-Time Region

103

Simulation Results

104

CONCLUSIONS

113

BIBLIOGRAPHY
APPENDIX

116
119

TABLES
6-1.

6-2.

6-3.

Tabular Comparison of Pressure Solutions


Generated From the Ei Solution and
Finite-Difference Approximations

70

Finite-Difference Pressure Drawdown


Solutions (no wellbore storage) Used
for Conventional PTA

77

Finite-Difference Pressure Drawdown


Solutions (wellbore storage included)
Used for Conventional PTA

85

VI

FIGURES

3-1.
3-2.

3-3.
3-4.
4-1.

4-2.

Elemental cylinder illustrating material


balance terms

13

Viscosity vs. pressure (a) and formation


volume factor vs. pressure (b) for an
undersaturated oil

23

Wellbore schematic of a changing liquid


level mass storage process

26

Wellbore schematic illustrating the


compressional storage process

33

Typical pressure distribution for a radial


system, before logarithmic transformation
(a) and after logarithmic
transformation (b)

39

Schematic showing the constant node spacing


chosen

40

4-3.

Schematic showing the placement of interface


grid boundaries
42

4-4.

Adjacent node and interface boundary


configuration for the r region (a) and U
region (b)

43

Illustration of the actual grid (a) and


the transformed grid (b)

44

4-6.

Implicit solution schematic-'-"

48

5-1.

Schematic of the image-block concept for


imposing no-flow boundaries

57

General reservoir parameters used to


generate the numerical and analytical
solutions for comparison

67

Pressure distribution generated by the


numerical model

68

Comparison between the Ei solution (Ei)


and the finite-difference (FD) model

72

4-5.

6-1.

6-2.
6-3.

Vll

6-4.
6-5.

6-6.

Comparison of the Ei solutions (Ei) to the


finite-difference approximations

73

Cartesian plot (a) and semi-log plot (b)


for example drawdown test with no
wellbore storage

78

Log-log plot (a) and semi-log plot (b) for


the example drawdown test with
wellbore storage

86

6-7.

Semi-log comparison of the finite-difference


solutions for pressure drawdown tests with,
and without, wellbore storage
87

6-8.

Semi-log slope (negative) versus time for a


pressure drawdown with wellbore storage ...

89

Semi-log slope (negative) versus time,


plotted with the down-hole flow rate
versus time

90

Dimensionless semi-log slope generated


from finite-difference approximations

93

Ramey, et al.-^ analytical solution to


the RDE that includes a constant
wellbore storage coefficient

95

Comparison of finite-difference
approximations to Ramey, et al.-^
solutions for a dimensionless
wellbore storage constant of 1000

96

Comparison of finite-difference
approximations to Ramey, et al.-^ analytical
solutions for various dimensionless
wellbore storage coefficients

98

6-9.

6-10.
6-11.

6-12.

6-13.

7-1.

7-2.

7-3.

Ramey, et al.-^ analytical solution to the


RDE that includes a constant wellbore
storage coefficient, C^^

106

Log-log plot of the numerical simulation


results for an increase in C^^ from 10-^
to 10^

107

Semi-log plot of the numerical simulation


results for an increase in C^^ from 10-^
to 10^

108

Vlll

7-4.

7-5.

"Log-log plot of the numerical simulation


results for a decrease in Cg^ from 10^
to 10-^

110

Semi-log plot of the numerical simulation


results for a decrease in Cg^ from 10^
to 10^

112

IX

NOMENCLATURE

Symbol

cgs

block horizontal surface area

English

cm^

ft^

Ai

P^.-j^^'''-'- coefficients

Awb

cross sectional area of wellbore

cm^

ft^

discrete surface production term

atm

psia

B.

P^^'^^

formation volume factor

cc/stdcc

RB/STB

fluid

^ --1^*
atm

psi'-1
-^

atm - 1 *

psi -1

cc/atm*

RB/psi

system compressibility

J- - 1 *
atm
^

psi - ^1

known matrix quantities

atm

psia

sec

days

coefficients

compressibility

P^^^^^"*"^ coefficients
'pv

pore volume

compressibility

wellbore storage coefficient


'SD

D.

dimensionless storage coefficient

position

subscript

yj

compressibility

coefficients

vertical block thickness

cm

ft

k^

effective permeability to oil

Darcies

Darcies

total depth of well

cm

ft

M,

mass of oil in block

gms

Ibm

M owb

mass of oil in wellbore

gms

Ibm

time level

(known)

n+1

time level

(unknown)

superscript
superscript

hydraulic diffusivity constant

cm'^/sec

ft /day

oil viscosity

cp

cp

porosity

pressure

atm

psia

bubble point pressure

atm

psia

bottom-hole pressure

atm

psia

initial reservoir pressure

atm

psia

(P)r-

pressure at radius r

atm

psia

(P)

sandface pressure

atm

psia

wellhead pressure

atm

psia

flowing bottom-hole pressure

atm

psia

sandface production rate

std cc/sec STB/D

bh

(fraction)

dimensionless pressure
1

wf
Q OS

rw

(QQg)g surface production rate

std cc/sec STB/D

radius

cm

ft

r^

external radius of reservoir

cm

ft

block midpoint radius

cm

ft

wellbore radius

cm

ft

wellbore fluid density

gms/CO

Ibm/ft^

wellbore oil density

gms/cc

Ibm/ft^

reservoir oil density

gms /std CO Ibm/ft^

time

sec

to

dimensionless time

logarithmic coordinate system

U^

external radius of reservoir

^m
^w

Pf
Po

Pos

XI

hours

U^

wellbore radius

^wb

wellbore volume

cc

ft-"

Vp

pore volume

cc

ft~-^

\}/jL

discrete storage production terms

sec

days

height of wellbore fluid

cm

ft

non-cgs units

xii

CHAPTER I
INTRODUCTION

A hydrocarbon reservoir simulation model has been


developed that describes unsteady-state radial flow of a
slightly compressible fluid in porous media.

The

simulation model uses the numerical method of finitedifferences to approximate the mathematical relationship
developed for study.

A wellbore influence was included in

the simulation model by developing a mathematical


relationship for wellbore flow, and then this relationship
was combined with the reservoir model at the finitedifference level.
The finite-difference equations were solved implicitly
for pressures using a computer program that was written for
the thesis.

The computer program was written in the Basic

programming language and was developed using an IBM-PC.

To

decrease computing time, the Basic code was compiled into


machine language using the Microsoft QuickBasic compiler.
Because the program is compiled, the program may be
executed without the use of a Basic interpreter.

In

addition, the Basic program may be run on any personal


computer that supports the MS-DOS or PC-DOS operating
systems.

The simulation model was used to perform numerical


pressure-transient testing.

The results of the simulation

were verified by comparing the numerically generated


solutions to those determined analytically from
conventional well test theory.

The comparison showed that

the finite-difference approximations were in excellent


agreement with the solutions determined analytically, and
that reservoir simulation can be used to predict
conventional well test behavior.
The numerical simulation model was developed for the
primary purpose of verifying the usage of reservoir
simulation for the investigation of wellbore storage
effects encountered during pressure-transient testing.

The

simulation model was used to investigate the specific


problem of an instantaneous change in the value of the
wellbore storage coefficient, Cg (bbl/psi), which is
normally considered constant during a pressure transient
test.

This type of variation in wellbore storage is

frequently encountered during pressure fall-off testing of


injection wells, when the fluid level, initially at the
surface, begins to fall, thus changing the physical
characterisics of the storage process from an initial
decompression of wellbore fluid to that of a falling liquid
level.
The time region in which wellbore storage is dominant
is commonly referred to as the "early-time region."

The

early-time region is a general term describing the time


regime prior to the development of the "semi-log straight
line" that is used for pressure transient analysis.

Since

H. J. Ramey et al.'s-^ early work concerning wellbore


storage and skin, the early-time region of pressure
transient data has been used successfully for determining
reservoir fluid-flow characteristics. Prior to this work,
pressure transient test data that did not indicate a
semi-log straight line were often discarded as
non-interpretable.
There has been much effort put forth in describing the
early-time region so that it may be used to obtain
information about the formation being tested. Therefore,
the work herein describes the early-time region when the
wellbore storage is not constant, thus providing insight to
the shapes of -some anomalous pressure-transient curves.
The results of the simulation study are presented
using the type-curve axes used by Raimey et al.-*-, who
plotted dimensionless pressure versus dimensionless time,
for a wide range of values of the dimensionless wellbore
storage coefficient, Cg^.

The simulation study provided

dimensionless pressure solutions that describe the general


pressure-transient behavior resulting from an instantaneous
change in the wellbore storage properties.

Dimensionless

pressure solutions are provided for cases when the

dimensionless wellbore storage coefficient (Cg^)


instantaneously increases, as well as decreases.
While performing a pressure-transient test using the
simulation model, the surface flow rate was chosen to
remain constant, while the sandface flow rate varied
according to the mathematical relationship of the wellbore
model.

This difference between the surface and sandface

flow rates is normally referred to as wellbore storage, and


it is on this process that the simulation study is focused.
A mathematical relationship for two processes of wellbore
storage have been considered; one process considers a
changing liquid level storage and the other considers fluid
compressional storage.

Both have been used in this study

to describe wellbore storing effects.


All of the simulation results that were generated
while varying the value of the wellbore storage
coefficient, Cg, are presented in dimensionless form.
using dimensionless variables, the pressure-transient
behavior caused by a change in the wellbore storage
coefficient may be illustrated for the general case.

By

CHAPTER II
REVIEW OF THE LITERATURE

During the course of research performed for this


thesis, many excellent papers on the subjects of numerical
reservoir simulation and pressure-transient analysis were
reviewed.

Few of the papers included the application of

reservoir simulation to well testing; therefore, the


subjects of numerical simulation and well testing were
reviewed, for the most part, independently.

The papers

concerning well testing that were most significant to the


development of this thesis are outlined first. Following,
the papers most frequently cited during the development of
the reservoir simulation model are discussed.
Morris Muskat^ was the first to consider a
compressible fluid when analyzing pressure build-up data.
Muskat used pressure build-up data to determine the
prevailing reservoir pressure.

He suggested an iterative

technique of plotting assumed values of P^-P (where P is


the build-up pressures and P^ is the prevailing reservior
pressure) using a logarithmic scale versus the shut-in time
(t) using a cartesian scale.

When the correct reservoir

pressure (P^) is assumed, the plotted data should be a


straight line.

Van Everdingen and Hurst's-^ applications of the


Laplace Transformation to fluid flow equations have
provided analytical solutions to the radial diffusivity
equation which form the basis for modern well-test
analysis.

Their basic solution to the unsteady-state fluid

flow equation is analogous to the prior work of Carslaw and


Jaeger^, who solved unsteady-state heat conduction problems
using the Laplace Transform.
The influence of wellbore storage on calculated
bottom-hole pressures was first considered by van
Everdingen and Hurst-^. They presented two methods for
expressing the effect of wellbore storage on unsteady-state
fluid flow equations.

Their first method states that the

rate of production from the formation may be approximated


by q(l-e"), where q is the surface production rate and a is
evaluated from observation.

Using the exponential integral

(Ei) solution to the radial diffusivity equation and the


relationship q(l-e^), they developed an explicit solution
for unsteady-state radial flow.

The explicit solution was

unique because it included the effect of wellbore storage


on calculated bottom-hole pressures.

The second method

discussed by van Everdingen and Hurst-^ forms the basis for


the inclusion of wellbore storage effects in current
weiltest theory, and it is the method used herein.

This

method states that the amount of fluid stored (or


withdrawn) from the wellbore per atmosphere of pressure

drop is a constant, C, whose value can be determined with


reasonable accuracy.

They expressed the constant, C, in

cc/atmosphere at reservoir conditions.


Prior to van Everdingen and Hurst's-^ investigation of
wellbore storage, Carslaw and Jaeger^, in their first book
on heat conduction, presented a rigorous solution to the
unsteady-state radial heat flow problem that was analogous
to the wellbore storage problem considered by van
Everdingen and Hurst.
The investigation of unsteady-state fluid flow was
extended in separate publications by van Everdingen^ and
Hurst^ to include a steady-state skin effect at the
wellbore.

Again, an analogous problem concerning

unsteady-state heat conduction was originally posed by


Carslaw and Jaeger^.
Miller, Dyes, and Hutchinson^ concluded that during a
pressure build-up, a plot of the shut-in bottom-hole
pressure versus the logarithm of time, t, should be a
straight line with a slope proportional to the reservoir
effective permeability.

Their findings are based upon

rigorous analyses of the van Everdingen and Hurst


solutions-^, and from data generated by an electric analog
device.
Horner^ later accounted for the effect of the
producing time prior to shut-in for a pressure build-up
test.

In Horner's acclaimed paper, "Pressure Build-Up in

8
Wells," he suggested that a plot of bottom-hole pressure
versus the logarithm of (t+At)/At (where t is the past
producing life of the well and At is the shut-in time) will
allow for the determination of formation permeability from
the slope of the curve in all cases. Horner's suggested
plotting technique of the year 1951 is referenced today by
the terminology "conventional analysis."
Ramey, et al.-'- pioneered the use of the type-curve
matching technique for analyzing wellbore pressuretransient data.

Their type-curve was developed for

analyzing short-time data dominated by wellbore storage and


skin.

The Laplace Transform solutions of van Everdingen

and Hurst"^ were used to construct their type-curve.


In an early paper by Bruce, Peaceman, Rachford, and
Rice^, a stable numerical procedure was developed for
solving the unsteady-state radial diffusivity equation for
production of gas at constant rate. A linear unsteadystate system was also solved.

A digital computer was used

to solve the impicit form of the finite-difference


equations developed for study.

Moreover, Bruce et al. used

a logarithmic transformation of coordinates, and their


coordinate transformation was used in this thesis for
developing the reservoir simulation model.

Their finite-

difference approximations were compared to the results of a


laboratory study of gas depletion in a linear system.

Welge and Weber^^ used the alternating direction


implicit procedure (ADIP) for relaxation calculations of
two-phase potentials in a two-dimensional grid.

They

studied well coning behavior for oil and water systems and
oil and gas systems, using cylindrical coordinates. They
concluded that the ADIP method for calculating
two-dimensional fluid displacement can be adapted to handle
problems of water and gas coning.
Bixel and van Poollen^^ provided numerical solutions
to finite-difference equations that describe unsteady-state
radial flow of a slightly compressible fluid in the
presence of radial discontinuities.

The equations were

solved implicitly for pressures using a digital computer.


They concluded that the extrapolation of build-up curves in
the presence of radial discontinuities may result in
incorrect values of static reservoir pressure.
Wattenbarger and Ramey^^ used numerical simulation to
study well test interpretation of vertically fractured gas
wells.

Due to the symmetry of their problem, they only

considered one quadrant of the 3-dimensional grid.

The

influence of the remaining grid was inferred by symmetry.


Settari and Aziz^-^ investigated the use of an
irregular grid in reservoir simulation, and later extended
the discussion^^ to cylindrical coordinates.

The grid used

for the simulation model developed for this thesis is


similar the grid proposed by Settari and Aziz.

10
Greenspan-^^ and Collatz-^^ discussed, in separate
articles, the use of irregular boundaries in reservoir
simulation.

They discussed the use of a point distributed

grid at the boundaries while maintaining a block-centered


grid for the interior nodes.
Brill, Bourgoyne, and Dixon-^' applied numerical
simulation to the interpretation of drillstem tests. Their
mathematical model described single-phase radial flow of a
slightly compressible fluid in a composite reservoir.

In

addition, they used a logarithmic transformation of


coordinates in order to structure the method of nodal
selection and to facilitate subsequent computer
programming.

They solved their finite-difference equations

in implicit form.

CHAPTER III
DEVELOPMENT OF MODEL EQUATIONS

A mathematical basis for the computer simulation model


used in this study will be developed in this chapter. The
mathematical model will consist of a partial differential
equation (PDE) describing unsteady-state radial fluid flow
in a porous medium, and an ordinary differential equation
describing wellbore storage effects. Except for units of
pressure (atmospheres) and permeability (darcies), the
model will be developed in the centimeter-gram-second (cgs)
system of units.
Wellbore storage will be expressed as a linear
function of the pressure-time derivative at the sandface.
This linearity is of primary importance to this model. It
allows the two model equations to be combined in discrete
form, and solved implicitly with the wellbore effects
acting mathematically as a variable inner boundary
condition.
Many of the intermediate steps normally excluded from
similar textbook derivations will be performed in order to
identify and symbolize the terms needed for developing a
finite-difference equation (FDE) that will give an
approximate solution to the PDE.

The additional steps may

also be of interest because they will clarify the basic


11

12
assumptions made in developing conventional well test
analysis theory.

Furthermore, the derivation will be

performed in a fashion which should promote understanding


of the discretization technique, and therefore facilitate
the subsequent development of a FDE which is the basis of
the modeling process.

Reservoir Model
A partial differential equation describing radial flow
of a slightly compressible fluid in a porous medium will be
developed in this section.

The derivation of the PDE will

be based upon a material balance applied to the flow across


a finite elemental cylinder of the radial system (see Fig.
3-1).

In addition, a source/sink term will be included to

facilitate the introduction of injection/production terms


in the computer simulation model.
will be symbolized by QQg

The source/sink term

and is positive (+) for

production and negative (-) for injection.

It will be

referred to during the derivation as the production term.


The mathematical reservoir model considers a single
phase, black-oil fluid.

The black-oil condition specifies

that the density at standard conditions of the produced


fluids (pos^ remain constant throughout the time and space
dimensions.
Darcy's law will be used to describe the inter-block
mass flow rates within the porous medium.

Therefore, the

application of the model will be limited to laminar 1 low

13

Horizontal surface
area, Aj^.

Production
<

'o mass out


<

f f

i !

Figure 3-1
Elemental cylinder illustrating
material balance terms.

14
conditions.

However, laminar flow conditions is a

satisfactory assumption for single phase reservoir oil


flow.
Following is a list of additional assumptions which
were made when deriving the reservoir model equation:
1

Constant formation thickness

Constant rock permeability

Constant porosity

Constant fluid viscosity

Constant fluid compressibility

Isothermal reservoir conditions

One phase, slightly compressible fluid

Horizontal flow in the radial direction only

Therefore, all of the above conditions must be satisfied


for the reservoir model equation to be valid.
The derivation as applied to the elemental cylinder
with flow occurring away from the wellbore is as follows:
Mass flow rate in - Mass flow rate out
-Mass Production rate = Mass rate of accumulation.

(3-1)

Expressing the mass flow rate (gms/sec) using Darcy's


law for flow into and out of the elemental cylinder will
result in:
Qo mass in
and

(3-2)

>- PoMo \ ar yJ r

15
Qo massout = " 2a (r.Ar) { i ^ ^ f i ^ H

,3.3.

where p^g is the reservoir oil density (gms/std cc).


The production term in gms/sec may be defined as
follows:
Mass Production rate

QQSPOS

(3-4)

The material balance equation (Eq. 3-1) now becomes:

-2nr

{Tfff(^)}r(-{^(eJ

" QosPos = Accumulation.

(3-5)

Accumulation for this model is defined as the change


in mass of oil (MQ) per unit change in time (t) at a given
spatial point.

For this model the spatial variable is r.

Therefore,

Accumulation = [ ^ J

(3-6)

at /^

To facilitate later discretization of the PDE, the


horizontal surface area (A^) of the block will be based
upon the radius to the midpoint of the elemental cylinder
(rj^) and Ar.

The radius to the midpoint of the block will

16
be defined below as follows:

- 1- X

^^

Thus, the horizontal surface area is shown below as Eq.


3-8:
Ah= 2ari^Ar.

(3-8)

Therefore, the pore volume of the block may be expressed as


follows:
Yp = Aj^h0.

(3_9)

If Vp is redefined as the hydrocarbon pore volume, the


mass of oil (gms) contained in the block is:
^

^pPos

^h^^Pos

2firii^Arh0pos

Therefore, Eq. 3-6 can be written as follows:


aHp _ a / 2nrii^Arh0po3 ,

at == atl

Po

'

^'"''^

It will be assumed that the the horizontal block area


(27trj^Ar) is not a function of time, and that subsidence
does not occur.

The fluid was stated previously as being

17
of the black-oil type.
time.

Therefore, pQg is not a function of

Equation 3-11 modified to reflect these conditions

will result in Eq. 3-12 shown below:


a /

aHf,

0 \

TT ( ^ ^ 1 .
at = 2tir3j,Arhpo3
^ "^^"^ "at

(^"^2)

Assuming constant reservoir temperature and constant


fluid composition, the parameters 0 and p^ can be expressed
as functions of pressure only.

In addition, the chain rule

of differential calculus can be applied to the time


derivative in Eq. 3-12 to produce the following:

aT

(-^]^

_^f_?_liL

(3-13)

The right-hand side of Eq. 3-13 may be expanded to

yield:

0 \a^ _
dP V Po /^^

f0(^^t
hf^ihl)
,L(^]\^
I V dP

P G U P J J at

and
d

d? V Po / a t

I O2UP y
Po

Po U P / J at .

(3-14)

18
Facto'ring 0/p from the right-hand side of Eq. 3-15
will yield:
d / _0^ \\ ap_
ap ^ ^ r _^/d0_\
"dP y Po Jat
Pol 0 U P ;

1_ ( d ^ \ \ ^
Po U P yj at

The pore volume compressibility is assumed constant,


and may be defined as follows:

i_fi_^

^P^

(3.17)

0 UP
Likewise, for undersaturated oil, the fluid

compressibility (Cf) may be considered constant, and may be


expressed as follows:
1 /uu^x

(3-18)

^^ = :P^(IF)^
Total system compressibility may be defined as:
r - r
+ r.
Ct = Cpv + Cf '

(3-19)

and may be combined with Eqs. 3-17 and 3-18 to yield:

r - _L(^1?_)

iL (^h.)

0 U P ^^ Po U P ;

(3-20)

19
Therefore,

at V Po J

V 3n J a t .

The accumulation term (Eq. 3-12) now becomes:

2nr^Arhpn.,f0CtAaP

at

,^_^^.

V Po J at .

Combining Eq. 3-22 with Eq. 3-5 will result in:

-2tir
I

PoMo

VaryJr

PoMo

Ur^ir+Ar^'

Rearranging and dividing Eq. 3-23 by 2K r e s u l t s in:


/

A J h k o p o s ^aP>|\

fhkoPo3/aP\\

Multiplying the f i r s t term in Eq. 3.24 by Ar/Ar and

20
applying a limit to this term as Ar approaches zero will
result in:

(,.Ar){i^j2Po3.fiLM
I

Ar l i m
Ar->o

PoMo

Ji^^fiLM

\ar;ij:+Ar

'' PoMo

Var^JrA

= Ar-i-( rhkoPo3/jP\1
ar I
PoMo \ ar /J .

^325^

Thus, Eq. 3-24 now becomes:


^^^rrhlCoPoa/^Xl
ar I PoMo V ar /J

<^_o^ ^ , ^ ^ , ^ ^ ^ \ ^
2a
V Po / at

(3_2e)

simplifying.

^ r r l ^ C o P o s j ^ i L n _ Qo3Po_3^ , ^ J , p ^ J ^ ^ a P
a r t poMo \BrJi
2K An
"" *^ V Po / at

(3-27)

Expanding the s p a t i a l d e r i v a t i v e of Eq. 3-27


a rrhkoPo3/aP\\
a r l PoJJio U r ^ J

rhkoPo3fi2.Hf_l_'|
V a r / a r \, poMo/

^ hk.
-koPo3 a (rf a p n ^ ^ ^ fiL'|J_(Po3)
\Mo

arl

U r ;j

^ rhpo3 f j P y (3,^) ,
PoMo V ar / a r

PoMo \ ar / ar

fiioPos j ^ i P > j A ( h )
PoMo \ ar / a r

(3-28)

For this model, k^, h, and p^g were chosen to be


independent of radius; therefore, their derivatives with
respect to radius are zero.

Equation 3-28 reduces to Eq

3-2 9, and is shown below.

^rrl^CoPosj^iL^j = r h k o P o s f i L ^ ^ f - ^ ^
ar I. PoMo Var^i
V ar/ar \,poMo/

hkoPo3 a I r/" ap
PoMo

m^)].

Assuming constant reservoir temperature and constant


fluid composition, the parameters PQ and p-Q may be
expressed as functions of pressure only, and the chain rule
can be applied to yield:

(3-30)
arVPoMo/

VPoMo/ar
dPVPoMo

After expansion.

arVPoMo^

^Po d P U o V

^0 d P ^ P o / J a r

Further expanding the pressure derivatives yields


B (

1 \ ^ J'-jL_J_dMo

arlpoHoJ

^ PoMo^dP

1 1 dpo \ ap
MoPo^ ^P / ar

(3-32)

22
Combining Eq. 3-32 with Eq. 3-29 will result in:

_3_frhkoPo3/iP>|\
ar I

PoMo

rhkoPosZ-i.^^

V ar ;J

R n2 dP

1_ J^ dp^U iP_-\
R 2 dP i{ ar J

hicpPos a
l ^ ] i r " ~ ^ I - J?

i^iW)

(3-33)

The derivative, dPo/dP, is a small positive number


while the derivative, dp^/dP, is a small negative number
(see Fig. 3-2); thus, there is a tendency for the two to
cancel when added.

Therefore, the first term on the

right-hand side of Eq. 3-33 will be neglected.

It is

therefore assumed that minimal error will occur in


reservoir modeling by dropping these terms. Equation 3-33
now becomes:

a rrhkppos |^ aP \1 ^ _hkoPo3. J_ f r|^iLU


arl PoMo \ ar/J
PoMo ar I \ar/J.

(3.34)

Combining Eq. 3-34 with Eq. 3-27 will result in:


hkoPos a J'r/'aP^l _ QosPos _ ^ -K^
f0Ct\^P
2TiAr
\ Po / at
PoMo ar I \ ar /J
Multiplying Eq. 3-35 by pQP-Q/r^^hkQpQg will result in
the familiar radial diffusivity equation with an additional

23

small positive number

Mo

P>Pb
(a)

small negative number

Po

P>Pb
(b)
Figure 3-2
Viscosity v s . p r e s s u r e (a) and formation volume
factor v s . p r e s s u r e (b) for an
undersaturated oil.

2\
term for production, resulting in Eq. 3-36 below.

J^-i-/rfiLn
rm ar I Var/J

- QQSPOMO

^ fg^pCtyp

atirmArhko

I. k jat

., 3,.

The difference between r and r^^ in Eq. 3-36 deserves


additional discussion.
equal.

In differential form, r and r^^ are

In discrete form, r and r^^ can represent different

locations.

The relationship between r and rj^ is determined

by the method of nodal selection.

When using techniques

such as finite differences to model this equation, r is


considered to be the nodal position and is the point in the
block to which all properties are assigned, while rj^ is the
midpoint of the block and was used to calculate the block
pore volume.

Only when the node is selected as the

midpoint between grid boundaries in radial coordinates are


the values of r and rj^ equal.

This method of nodal

selection, known as the block-centered method, is not


normally used in modeling radial systems.

This topic will

be addressed in more detail in the following chapter.


Equation 3-36 is the PDE to be modeled.

This equation

is for radial fluid flow in the reservoir only and does not
include wellbore effects.
Wellbore Model
The objective of this section is to develop a
relationship between the surface and subsurface 1 low rates,

25
and to express this relationship as a function of the
pressure-time derivative located at the sandface (r^).
Mathematically, wellbore effects are treated as an
unsteady-state mass transfer across the inlet and outlet of
a vertical fluid conduit. Moreover, the storage of mass in
the wellbore may be caused by either fluid compression or a
changing liquid level.
Wellbore effects are most prominent in wells that are
subject to instantaneous rate changes at the surface (i.e.,
pressure transient testing).

Although the term wellbore

storage is commonly used, many choose to refer to the


process as wellbore effects because the net mass in the
wellbore can decrease (unload) as well as increase (store).
In this study, the term, storage, will not specifically
imply an increase in wellbore fluid mass, rather it will be
used in a general sense which will apply to both an
increase and decrease of net wellbore fluid.

The direction

of mass transfer will, of course, be represented by the


sign of the storage term.

The sign convention used for the

wellbore model will be positive (+) for mass accumulation,


and negative (-) for mass reduction.
Changing Liquid Level Storage
Consider a well completed without a packer as shown in
Fig. 3-3.

The well is in pressure communication with a

reservoir producing at a constant bottom-hole pressure.


The initial fluid level in the annulus before shut-in is

26

"3-(Qos)s> 0

^(Qo3)s = 0

(b) Shut in

(a) Producing
Figure 3-3

Wellbore schematic of a changing liquid


level mass storage process.

27
considered to be unchanging and is defined by the vertical
distance z-^ from an arbitrary datum.

After flow has

stopped at the surface, the fluid level in the annulus will


begin to rise to a new level Z2 (see Fig. 3-3b).

The

difference in the two levels is defined as Az, and the time


span of the shut-in interval is dt. Although the surface
rate is zero, the reservoir is still producing into the
annulus and the net volume of fluid in the wellbore is
still increasing (see Fig. 3-3b).

This type of wellbore

storage will be the first of two types considered, and it


will be referred to as the changing liquid level storage
process.
Defining the difference between the surface and
subsurface flow rate as the net fluid stored during the
time period dt, the following expression may be written:

QQSPOS

" (Qos)^ Pos =


^

d(Kovb)

(3-37)

at

where Q^o is the reservoir flow rate in std cc/sec, M^^^^ is


O is

defined as the total mass (gms) of fluid contained in the


wellbore at a given time, and

(QQS^S

^^ defined as the

surface flow rate in std cc/sec.


The mass of the fluid contained in the wellbore is
related to the wellbore area (A^j^) and the variable z
(shown by z-^ and Z2 on Fig. 3-3), which is the height of

28
the fluid ^in the wellbore.

The relationship is as follows:

Mowb = ^^^^^^21.

(3-38)

Po

where p^ is assumed constant throughout the vertical extent


of the wellbore, and is equal to the reservoir p^. The
term A^^ is defined as the cross sectional area of the
fluid column that is in pressure communication with the
bottom hole pressure.

For a rod-pump well completed

without a packer, the cross sectional area (A^t)) for Eq.


3-38 is defined as that cross-sectional area of the annulus
between the casing and the tubing.

Likewise, for a well

completed with a packer, the cross-sectional area of the


tubing is used for Eq. 3-38.
Combining Eq. 3-38 with 3-37 will result in:

Applying the chain rule to incorporate the bottom-hole


pressure-time derivative and considering the black oil
assumption stated previously, Eq. 3-39 becomes:

29
Assuming a constant cross sectional area throughout
the vertical extent of the wellbore will allow A^^ to be
removed from the derivative argument of Eq. 3-40.

Also,

dividing by p^^ will modify Eq. 3-40 to become:

dz V Po /dPbh dt .

Expanding the argument of the position derivative in


Eq. 3-41,

1 dz ^ 7 d / 1 \

Sh^
Po dz
dzVp
dz
dzUoJ .

dz V Po 7

(3-42)

Recalling that the formation volume factor (p^) was


chosen to be independent of depth and is equivalent to PQ
at reservoir conditions, then Eq. 3-42 reduces to:

^ : :
dz

IpoJ

0-43)

Po

thus, combining Eq. 3-43 with Eq. 3-41 will result in:

- (0

)
s

^^t) dz dPbh
Po dPtib. dt

^3-44^

Neglecting the frictional pressure drop and the gas


column contribution to the bottom-hole pressure, an
expression can be written to express the bottom-hole

30
pressure as a function of the wellhead pressure (P) and
the depth of the liquid column, and is shown below as Eq.
3-45.
Pbh =

Ps + Pf zKc^

(3-45)

where Pf is the average density (gm/cc) of the fluid


contained in the wellbore and Kc = 9.667 x 10""^ atm cm^/gm.
Solving for z and differentiating z with respect to Pj^^
yields the following equation:

^^
dPbh

= l / A _ r ? b h ^ - j _ (is_\[
Kc I dPbh*^ Pf J

dPbh

(3_,6)

\9tji-

Expanding both derivatives on the right-hand side of Eq.


3-46 will result in Eq. 3-47 as shown below:

dz
dPbh

^ IfPbh-l- (J-\
Kc 1,

dPbh \Pt)

* -1 lbh
Pf dPbh

Assuming that the density of the wellbore liquid (p^)


is independent of pressure, and assuming that the surface
pressure (P3) does not change, Eq. 3-47 reduces to:

^
dPbh

= i-1Kc pf

(3-48)

31
Substituting the results shown by Eq. 3-48 into Eq. 3-44
results in:

^03

^^03)

Z7i^

KcpoPf

(3-49)

dt

From Eq. 3-49, the wellbore storage coefficient, Cg,


may be defined, and is shown below as Eq. 3-50.

Cs =

which has units of cc/atm.

Combining Eqs. 3-50 and 3-49

will yield Eq. 3-51 as shown below:

Qo3- (Qos)

= ^ ^
Po dt

(3-51)

The coefficient Cg is referred to as the wellbore


storage constant and its magnitude is proportional to the
length of the storage period following a surface rate
change.

For a well undergoing a changing liquid level

storage process as described by Eq. 3-51, the storage


coefficient, Cg, is dependent upon only the wellbore fluid
and the wellbore area.

However, if gas is present in large

quantities, the wellbore storage coefficent will vary with


pressure, proportional to the quantity of gas present. For
this reason, wellbore pressure transients in water

32
injection wells experiencing a changing liquid level
storage are modeled quite favorably by Eq. 3-51.
Compressional Storage
Surface rates may also differ from down-hole rates by
the process of wellbore fluid compression or decompression.
The simulation model considers compressional wellbore
storage of a one-phase, oil or water system which
completely fills the wellbore volume.

For a packer type

completion the subject volume is in the tubing, and for a


rod-pumped well with no packer the subject volume is the
annulus between the tubing and the casing.
Consider a flowing well completed with a packer as
depicted by Fig. 3-4.

The well is producing from an

undersaturated reservoir at a constant bottom-hole


pressure.

The surface pressure is such that only liquid

exists in the wellbore.


surface.

The well is then shut in at the

Fluid will continue to flow into the wellbore,

thereby increasing the mass of fluid contained in the


wellbore (see Fig. 3-4b).

The mass increase is a result of

fluid compression.
A material balance can be applied across the inlet and
outlet of the tubing string.

The resulting equation is the

same as Eq. 3-37 and will not be reproduced in this


section.

The mass of the oil can be related to the tubing

volume, which may be expressed as a function of the tubing

33

LEGEND

tlASS

INCREA.SE

(STORAGE)

-3> (Qos)s > 0


Psi

^(Q03)s= 0
Ps2 > P s l

-l

..

^.%.%.-,
'...
..
..

^wb-

'.".
.
*...
...

...
..
'..."
^ .".**

w\.*..".
'..

'...

. . .

. . .

' . . .

*%%.
^.....

mm
=^S^
ij I 1 _

- .<...

V
I I

- - - * * - - * . *

q ^03 > 4

,.%.s.s.%.%.%.%.s.^
..s.%.s.-..s.\.s.%.^

rzL

yA-A-A-A-A-A-A-A-AK^

, 1 , 1 , 1 , 1 , 1 , 1 ii;..-.'..-;..-;/.....-.........II' i ^
1 , 1 , 1 , 1 , 1 . 1 . 1| .......'......li^rJn

rzi:

(a) Producing

5?

S '.^
S '.^
S .
\
% .^i*'i'^i'*^5
% % S "I
T-^-4^ '.^
I ' I ' i t * ' . * S * ' * . ' * > ' S ' S ' S * l I II I I I

' I' I ' V . ' ' ^. ^ * w ^ ' T T ^

'.'

>o

-*.-\-v-*.-*.-*.-*.-*_-'.'.''.'.'.'.'. T

(b) Shut i n
Figure

3-4

Wellbore schematic illustrating the compressional


storage process.

34
area (A^]-))' and tubing height (L) . The resulting expression
is:

Mo^b = ^^^-^ P^

(3-52)

Po
The term MQ^J^ is defined as the total mass of oil contained
in the wellbore.
Equation 3-37 may be written for fluid compressional
storage, and is shown below as Eq. 3-53.

QosPos- (Qo3)^Po3

= ^(^^^^^^).

(3-">

Defining the total volume of the wellbore, V^j^ = A^i->L,


which is constant with time, and also invoking the black
oil condition, Eq. 3-53 for compressional storage becomes:

QosPos - (Qo3>,Pos = ''"''P"" ^ ( 1^) .

('-''''

Dividing Eq. 3-54 by Pog and incorporating the


bottom-hole pressure-time derivative using the chain rule,
Eq. 3-54 becomes:

O
Qo3

(0 )
(Qos)^

"^wb ^ f i - l ^ ! ^
""^dP^lPoJ dt .

(3-55)

35
Expanding the pressure derivative of Eq. 3-55 will
yield:

Qos - (Qos)

=-VwbJ_^P^^!bh
Po^dPbh dt

(3.5

Recalling the definition of Cf in Eq. 3-18, Eq. 3-56


simplifies to:

Po

dt

where Cf (1/atm) is now the compressibility of the fluid in


the wellbore and is assumed to be independent of pressure.
Defining Cg (compression) = V^j^Cf, Eq. 3-57 reduces to
Eq. 3-51, but with a different definition of the wellbore
storage coefficient Cg.

Therefore, Eq. 3-51 will be the

general wellbore model for the simulation study.

It will

be discretized and then combined with the reservoir flow


equation in the following chapter.

CHAPTER IV
FINITE DIFFERENCE FORMULATION

The numerical method of finite differences will be


used to approximate solutions to the mathematical model
developed in Chapter 3.

Generally, finite-difference

equations are used to approximate a differential equation


when an analytical solution is unknown, or if the known
analytical solution is cumbersome in application.

Because

complex systems are normally encountered in.reservoir


modeling, analytical solutions are seldom available.
Consequently, numerical methods are usually required.
Inherent in the formulation of finite-difference
equations is the process of discretization.

There are

several ways to discretize a given differential equation;


however, the subsequent solution will be unique for the
selected discretization technique.

Therefore, suitable

discretization choices must be made to insure accurate


approximations.

For reservoir modeling, this will include

choices concerning grid type, node location, and others.


Hydrocarbon reservoir simulation involves the process
of obtaining finite-difference equations (FDE) that
approximate a given differential equation.

It is therefore

the purpose of this chapter to develop a FDE that

36

37
approximates the differential equations developed in the
previous chapter.
Constructing the Grid
The grid structure is comprised of concentric
elemental cylinders of constant thickness (h), bounded at
the

wellbore by r^ and the outer perimeter of the

reservoir by r^.

The elemental cylinders will be referred

to as blocks and will vary continuously in width from the


wellbore to the external boundary of the model.

The grid

variation selected is logarithmic and is developed through


a logarithmic transformation of coordinates.

The purpose

of the transformation is to systematically provide smaller


nodal spacing in the vicinity of the wellbore where
pressure gradients are higher while providing larger
spacing away from the wellbore where gradients are lower.
This type of grid has been termed in the literature-^" as an
"irregular grid," and its primary application is in
modeling radial and spherical flow systems; or in general,
systems that require local grid refinements.

The

coordinate transformation into the logarithmic (U) domain


is performed by Eq. 4-1.

fe)^

U = lnf-^1 .

(4-1)

38
where r, r^, and other symbols used herein are defined in
the Nomenclature.
Since pressure is approximately a linear function of
the logarithm of radius during unsteady-state flow, equally
spaced nodes within the U-coordinate system should produce
approximately equal pressure drops between nodes in the
original (r) and transformed (U) systems (see Fig. 4-1) .
Consequently, the uniform increment between nodes, Au, will
be chosen to satisfy:

(^e-Uw)
M-1

where the subscripts e and w are in reference to the


perimeter of the reservoir and to the wellbore,
respectively.

The term M is the total number of grid

blocks and grid points comprising the radia'l system.


Equation 4-2 allows for a total of M equally spaced
nodes, including two nodes located at the boundaries; one
of the two is located at the wellbore boundary where most
pressure transient emphasis lies, and the other is located
at the perimeter of the reservoir.

Although the interface

boundaries have yet to be selected. Fig. 4-2 illustrates


the node configuration obtained from using Eq. 4-2.
A basis for block-boundary selection can be made only
after considering the difference scheme used in this study.
Specifically, the approximation of the second derivative

39

(a)

^=Ki)

U
(b)
Figure 4-1

Typical pressure distribution for a radial system,


before logarithmic transformation (a) and
after logarithmic transformation (b).

40

Figure 4-2
Schematic showing the constant node spacing chosen
As a result, nodes are located
at U^ and U^.

41
(32p/3u2) in the U region has, as an implication, a blockcentered node location.

To generate the block-centered

node location, the boundaries were chosen in the r region


as the log-mean radii between adjacent nodes, and is shown
by Eq.' 4-3.
J^i+1 - ^i
i^i+l/2

(4-3)

In
^

Although the grid points will be off-center within the


r region, they will exist, upon transformation, "blockcentered" in the computational (U) region, except for the
first and last blocks (see Fig. 4-3). Thus, the difference
scheme can be rightly applied to the transformed coordinate
system.

The relative positioning of the interface grid

boundaries with respect to the nodes as seen in the


r-coordinate system and the U-coordinate system are
depicted by Fig. 4-4.

The complete grid constructions for

both the r and U systems are illustrated by Fig. 4-5.


Transformat-inn in Differential Form

The logarithmic transformation can be included in the


reservoir PDE by transforming the equation from the
r-coordinate system to the U-coordinate system.

Expressing

the reservoir equation in terms of the U-coordinate system


will provide a systematic approach for developing a FDE
with predominately constant spacing which will consequently

42

1/2 AU

v/
AU

1/2 AU

'^

'

AU

''

AU

v^

AU

u,

Uw
U
Figure 4-3
Schematic showing the placement of
interface grid boundaries.

^- 1/2

^i+1/2

11

^i+i

i^i-1

(a)

AU
U-i_
1-1/2

Ui+1/2

1-1

(b)
Figure 4-4
Adjacent node and interface boundary configuration
for the r region (a) and U region (b).

44

'v=*'l

(a)

T;I=U.

(b)
Figure 4-5
Illustration of the actual grid (a) and
the transformed grid (b).

45
simplify the computer coding.

Therefore, prior to

discretizing the model, the dependent variable (?) will be


expressed in terms of the U-coordinate system using
differential notation.

The r-coordinate PDE is repeated

below as Eq. 3-36 for convenience.

JL.i_(rfiLH - Q03P0M0
ria ar l- Var/i

2arijiArh3Co

^ l^g^MoCtVP

(3_36)

\ l^o /at

Applying the chain rule to express the dependent


variable in terms of the U system will alter the left hand
side of Eq. 3-36 to read:

ria ar I \ a r / J

rj^ au I V a u a r / J a r

Referring to Eq. 4-1 and differentiating U with


respect to r will result in:
dU _ dlnr
dlnr^
d7 ~ dr "
dr '

(4-5)

and upon evaluation, Eq. 4-5 becomes:

^
dr

= 1
r

(4-6)

46
Substituting Eq. 4-6 into Eq. 4-4 will result in

^m ar >^ \ ar / J

rj^r au\ au /

Solving the basic transform equation (Eq. 4-1) for r


will yield:

r = r^e^.

(4-8)

Substituting Eqs. 4-7 and 4-8 into Eq. 3-36 will


generate Eq. 4-9 as shown below:

i-fiL')

rn^w a u v a u /

QQSPO^O

2nrjaArhko

= /0)jioCtyp

(4_g)

\ )<o /at

After multiplying by (rj^r^)/e ^, Eq. 4-9 becomes:

i_(^_^\ -QosPoForve"^ .^.^ .^ ( ^ ) ^


auvau/
ZttArhko
\ ko /^t

(4-10)

Equation 4-10 will serve as the basis for later


inclusion of transient wellbore flow effects.
Difference Scheme
The space and time derivatives of the mathematical
model (Eq. 4-10) will be expressed as finite-difference
terms in this section.

The finite-difference equations

7
were solved implicitly.

Therefore, all position subscripts

and time-level superscripts will be consistent with the


implicit method of solving a FDE.

For implicit handling,

the time derivative will be approximated by a standard


backward difference, while the spatial difference is
expressed at the unknown (n+1) time level.

A common

schematic^^ depicting the implicit solution concept is


included as Fig. 4-6.
Although the Taylor series expansion is an alternate
means of developing difference equations, it will not be
presented in this thesis.

Consult reference 19 for

complete derivations using the Taylor series.


Expressing the time derivative of Eq. 4-10 as a
backward-difference will yield:

ap _ Pi - Pi

where the subscripts and superscripts are referencing


position and time level, respectively.

It is significant

to note that the backward-difference approximation of the


time derivative (Eq. 4-11), for implicit handling, must
have as counterparts, spatial differences at the n+1 time
level.

Therefore, The forward difference in space is

n+1

.auji

i\+1

^i^^"^i
AU

(4-12)

48

.n+l

Pi-1
.n+1

n.

I
Pi+1

new t i m e l e v e l iiiiiiiiiiJt

o l d time

level

Figure 4-6
Implicit solution schematic 18

49
which approximates the spatial derivative at the i+i/2
location, which is the interface between the block i and
block i+1 (refer back to Fig. 4-3). Likewise, the backward
difference approximation of the spatial derivative is
n+1

_n+l
- Pi-1
AU

VauA

(4-13)

which approximates the spatial derivative at the i-i/2


location, which is the interface between block i and block
i-1.
The second derivative at location i (center of block,
except at boundaries) will be approximated using Eq. 4-12
and Eq. 4-13.

It is defined as follows:
n+l

-(]

auVau/

^n+1

/ ^n+1

AU

^n+l \

AU

(4-14)

AU
Grouping like terms and simplifying, Eq. 4-14 becomes:

Discretized Model Equations


To express the model in discrete form, all spacevariable terms will be subscripted, and the derivatives

50
will be replaced with their associated difference
approximations.

Both the reservoir and wellbore equations

will be expressed in this manner, and then combined to


represent the total system in discrete form.

Initially,

the finite-difference model (Eq. 4-10) will be developed


assuming surface and subsurface flow rates are equal
(steady-state wellbore flow), and then subsequently
discretized to incorporate unsteady-state wellbore flow.
Although this study was concerned with production only
from the first block (adjacent to wellbore), the production
term and its space dependent coefficients, upon
discretization, will be subscripted for the sake of
generality.
Steady-State Wellbore Flow
The production term of Eq. 4-10 will be represented by
the symbolttj^,and is defined as follows:

^
^

.^
. .
iAU
fPoMoryAQosje
\ 2ahko / Ari

^^_^^^

The constant time derivative coefficients of Eq. 4-10


will be grouped and defined using the familiar hydraulic
diffusivity constant, T], as follows:

_1_ ^

^Mo^t

(4-17)

51

The time derivative coefficients that are space


dependent will be grouped, subscripted, and combined with
Eq. 4-17 to generate the term y^:

'. (?)

iAU
i^mie

(4-18)

The subscripted coefficients (Eqs. 4-16, 4-18), and


derivative approximations (Eqs. 4-11, 4-15), will be
substituted into Eq. 4-10 to yield the discretized
reservoir fluid flow equation (Eq. 4-19) with no wellbore
consideration.

The result of these substitutions is shown

as follows:
n+l

^^n+1

.^n+1

^^,

Pi+1 - 2Pi + Pi-i


^ /p^+L p^ ,
^
^ OL^ = Vi(i
li
AU^
V ^t

(4-19)

Equation 4-19 is the discretized approximation to the


unsteady-state radial flow equation when surface and
subsurface flow rates are assumed equal.
Transient Wellbore Flow
The wellbore model developed in Chapter 3, relates the
sandface pressure-time derivative to the difference between
the surface and subsurface flow rates (i.e., fluid storage

52
rate).

The wellbore model is shown below as Eq. 3-51.

Qos - (Qosl

= HalEbh

5^)

Po dt

The flowing bottom-hole pressure in a producing block


is assumed equivalent to the block pressure (P^h ~ ^i^'
therefore, the bh subscript can be dropped from Eq. 3-51,
resulting in Eq. 4-20 shown below:
Co dP
Qos - (Qos), = IT ^
Po dt

('^-^^^

Equation 4-20 will be combined with Eq. 4-10 to yield,


in differential form,

the model that will consider

transient bottom-hole flow rate conditions (wellbore


storage).

This equation is presented as Eq. 4-21, shown as

follows:

aUWU/'

2rtArh3Co V

{io dt J

- ''" "(^)iT .
Rearranging Eq. 4-21, subscripting, and replacing
derivatives with their appropriate finite-difference

53

a p p r o x i m a t i o n s d e v e l o p e d p r e v i o u s l y w i l l g e n e r a t e Eq. 4 - 2 2 ,
as shown b e l o w :

r^+^ ^-nP-^^ ^^+1


P l . , l - 2 P i -HPj,!
(AU)^

/o
\/v
iAU ,
v^
iAU,^n+l
n
./PoMorw^Qosje
_ (j^pry \C3^
/ P j - Pj
V 2 a h k o / Ar^
l , 2 a h k o J A r i (^ A t

... =-ff^)(i^,
Defining,

w. _
= f Jiow_^Csie_
i^o^^v \^3^
^ Utibko/ Ari

(4-23)

and r e c a l l i n g p r e v i o u s l y d e f i n e d a^ and Yj^, Eq. 4-22


becomes:
^n+i _^n+l
_iv+l
P i + l - 2 P i " Pj-l - oCi =

^n+l ^ix

(Yi+ Yi)r^i " ^i")

(4-24)

(AU)^

Equation 4-24 is the finite-difference form of the


radial flow model that considers unsteady-state wellbore
flow.

Moreover, it forms the basis for the numerical study

presented.

In the following chapter, Eq. 4-24 will be

rearranged and defined using matrix notation, followed by a


subsequent discussion of the numerical algorithm.

CHAPTER V
NUMERICAL SOLUTION SCHEME

The implicit form of the finite-difference equation


(FDE) , as shown by Eq. 4-24, when written for each block,
will produce M linear equations and M unknowns, after
boundary conditions have been accounted for.

The M

unknowns are the block pressures at the new (n+1) time


level (Pj^^"*"-^) .

In addition, the system of equations can be

expressed using conventional matrix notation, and then


solved by any applicable numerical scheme.

Although many

iterative techniques are available for solving systems of


equations, this problem was solved by using Gaussian
elimination, a direct solution, set up specifically for
tri-diagonal matrices.
The FDE (Eq. 4-24) can be expressed in explicit form-,
but the resultant system of equations will have severe
stability limitations, and is therefore seldom used in
practice^^.

Consequently, the decision was made not to use

the explicit technique to solve the FDE.


To generate a system of equations from the implicit
form of the FDE (Eq. 4-24), it is necessary to define the
dependent-variable coefficients (AJ^,BJ^,CJL) , and the term
Dj^, by expressing the FDE in the form:
n+1

n+1

n+1

AiPi-i + BiPi + CiPi^-i = Di ,


54

(5-1)

55
where i = 1,...M-1, M, and M is the total number of grid
blocks.

The implicit form of the FDE (Eq. 4-24) which

includes wellbore effects is repeated below for


convenience.
^n+1

^^n+1

,_n+l _n

^n+1

Pi+l-2Pi ^ Pj-i _ oc, = ( Yi+Yi)r^i " ^^)


2
(AU)

(4-24)

Rearrangment of Eq. 4-24 t o a form s i m i l a r t o t h a t of


Eq. 5-1 w i l l
1

yield:

^ f-

\ n+1

= o c i - ^ - M i
At
At

Vi W + 1 ^ /

Vi

\ n+1

(5-2)

From Eqs. 5-1 and 5-2, i t follows t h a t

Ai =

-^2
{AW

^^'^^

Bi =
1

"-^, - ^
- ^
(^U)^
At
At

C, =

--

.
(5-5)

(AU)^

and

(5-4)

Di =
^

'

cxi -

^
At

- "i^
At

(5-6)

56
Therefore,' each block will have an equation similar to Eq.
5-1 with coefficients defined by Eq. 5-3 through Eq. 5-6.
Boundary Conditions
As for the analytical solution of PDE's, the ability
to solve the FDE depends upon having imposed suitable
boundary conditions.

Generally, boundary conditions are

the means in which a mathematical model interacts with its


surroundings.
For the model developed, two no-flow boundary
conditions were specified, one at the wellbore location
(r^) and the other at the external radius (r^) location.
These are shown below by Eq. 5-7.

{f} I m

0.

(5-7)

^e

The no-flow boundary conditions were imposed by using


an imaging technique, which equates the pressure in the
block closest to the boundary to the pressure in an
adjacent image-block.
technique.

Figure 5-1 illustrates this

A result of the technique, as applied to this

model, is that the coefficients A^ and C^ will be zero,


reflecting the no-flow boundary conditions.
With closed boundaries, it is necessary to have one or
more source/sink terms in the model in order to establish
dynamic conditions.

It was expedient to place a producLion

57

tt
M-l-MvM->

IMFIGI
BLOCK
I1

i-;-r-M-i*'i*M'i-*-'-

( 1-
.-.

Pn = P-

Figure 5-1
Schematic of the image-block concept
for imposing no-flow boundaries.

tt+1
IMPiGI
BLOCK
I1

'.

;
'.

58
(sink) term at the r^ location in the model for the purpose
of perturbing the pressures and creating the transient
conditions.

Although the simulation model is programmed to

accept source or sink terms at any or all locations, the


single production term at r^ describes completely the
actual physical system being simulated.
For hydrocarbon simulation, some of the most commonly
used spatial boundary conditions are:

1) constant flow

rate boundaries, 2) no-flow boundaries, and 3) constant


pressure boundaries.
In addition to specifying spatial boundary conditions,
the "initial condition" of the reservoir is required.

The

initial condition of the reservoir is normally imposed by


assigning an initial reservoir pressure to each block.
For the finite-difference model developed (Eq. 4-24),
two boundary conditions in the space dimension are
required, and the initial condition of the reservoir must
be specified.

The initial condition of the reservoir was

designated by specifying the same initial pressure for each


block (although uniform pressure is not required by the
model); stated mathematically.

P
^i=l,2...n

= ?.,

(5-8)

t=0

where P ,. is the initial pressure of the reservoir.

The

two boundary conditions imposed on the space dimension (r)

59
are located at the wellbore radius (r^) and the external
radius (r^) of the model (i.e., boundaries of the model).
A no-flow boundary condition was specified for the
wellbore, but the pressure varied because of the presence
of a production term imposed at the first block.

This

imposed rate was allowed to vary with time so that the


pressure derivative relationship could be satisfied in the
wellbore model (developed in Chapter 3) . Furthermore, the
variable flow rate at the sandface (Q^g) is a function of
the surface flow rate, (Qos)s' ^^^ the time rate of change
of pressure at the sandface.

Qos

This dependency is shown by:

= f{(Qo3)s ^(^P/^t)^^j} ,

(5_9)

The relationship stated by Eq. 5-9 is discussed in Chapter


3.
The nature of the no-flow boundary condition at the
external radius (r^) did not affect the study since only
"infinite-acting reservoir" behavior was considered.

The

"infinite-acting reservoir" effect was achieved by making


the model sufficiently large in the r direction so that the
wellbore pressure disturbances did not affect pressures at
the outer boundary of the model (i.e., P^ = Initial
Pressure for all times.).

Therefore, the pressure

transient response at the sandface (node 1) is the same as


if the reservoir was infinite in size.

60
Matrix Notation
Generally, most numerical algorithms involving systems
of equations employ conventional matrix notation, as well
as matrix algebra principles; therefore, it will be
advantageous to express the previously developed system of
equations (Eq. 5-1) in a format compatible with that of the
algorithm.

Specifically, the matrix format will allow for

a convenient application of Gaussian elimination, which


involves upper-triangularization and subsequent back
substitution.
The "shorthand" matrix equivalent of the system of
equations (Eq. 5-1) is as follows:
Ap = D,

(5-10)

where the term A is defined as the coefficient matrix, the


term D is the column vector containing known quantities in
the matrix equation, and the term p is a column vector
containing the unknown pressures at the n+1 time level.
Equation 5-10 can be expressed in a more detailed
form, thereby showing the elements of the matrix. The
system in this form (including boundary conditions) is
shown below as matrix equation 5-11. An important
observation of Eq. 5-11 is that the coefficient matrix is
tri-diagonal.

A matrix is considered tri-diagonal when all

entries, excluding the main diagonal and its two adjacent


diagonals, are zero.

Consequently, a matrix of this type

61

0 0

pnl

0 0
0 A3 B3 . 0 0

pnl
^2
pH^l
^3

Bi Ci 0

Aj B2 C2 0

0 . . C_2 0

OAM_IB.IC.I

Dj

pnl

DM-1
pnl

0 AM
M B
B^
fi
.

DM
,

(5-11)

is considered favorable, since the elimination process


(Gaussian Elimination) will require much less work.

Numerical Algorithm
The unknown pressures in Eq. 5-11 were determined by
first transforming the coefficient matrix into an upper
triangular matrix, and once completed, a back substitution
procedure was performed to yield the pressure solutions.
An upper triangular matrix is one that has all zero
entries below the main diagonal, and is achieved for a
tridiagonal matrix by the following consistent scheme:
For i = 1,...,M-1,
1) Divide the ith row (including the term Di in
the column vector D) by entry Ai^i.
2) Multiply the resultant of step 1 by Ai^^^^^j^.
3) Subtract the result of step 2 from row i+1.
Finally,

divide row M by A ^ to complete the process.

This procedure will generate a zero entry below the


ith diagonal element, and upon completion, generate an
upper triangular matrix.

In addition, all main diagonal

62
entries widl have a value of 1.

For illustrative purposes,

the resultant upper-triangular matrix is shown below as Eq.


5-12.

1
0

0 0

C2

0 0

0 0

1 c;,.2 0

Ci

p1
B2nl

1 C^-i

pnl

pH^l
*^M

DM-1
(5-12)

where the apostrophes (primes) denote a change from the


original value.
The system of equations represented by Eq. 5-12 can
now be solved by back substitution.

The pressure at the

Mth block requires no computation since the Mth row


contains all zeros except for X.he last column, which
contains a value of 1.
that Pj^""*"^ = Dj^

Therefore, it follows from Eq. 5-12

Furthermore, the remaining unknown block

pressures were solved using a sequence of back


substitutions.

A convenient algorithm for back

substituting is defined below as Eq. 5-13.


For i = M-1, M-2,....1

pr=Di -ci(P^i).

(5-13)

Once the block pressures have been determined by Eq


5-13, subsequent calculations can be made for a new time

63
step, by first assigning the current block pressures (P""^^)
to the old (n) time level, and then repeating the numerical
algorithm to produce additional pressure results for the
new time step.

The sequence outlined in this section is

continued until the pressures at the desired time have been


calculated by the simulation model.
Although the finer points of linear algebra will not
be addressed herein, it should be noted that a unique
solution must exist for the system of equations described
by Eq. 5-11.

This did not present a problem since the

finite mathematics involved in this study were such that a


unique solution existed at all times.

CHAPTER VI
VERIFICATION OF THE NUMERICAL MODEL

The reservoir simulation model was verified by


comparing the numerical solutions generated by the model to
those generated from known analytical solutions to the
radial diffusivity equation (RDE).

Much of the

verification was obtained through the use of conventional


pressure transient analysis (PTA) of the pressure-time
sandface solutions that were generated by the model during
the simulation of pressure drawdown tests conducted at
constant flow-rate. Also, the model was verified for a
broad spectrum of reservoir conditions by performing
numerous pressure drawdown tests, each with a different set
of reservoir parameters (i.e., k^, h, C^., etc., where the
meanings,of the symbols are shown in the Nomenclature
section).
The numerical model was developed (Chapter 3) without
considering an additional pressure drop due to "skin";
therefore, the finite-difference solutions will only be
compared to analytical solutions that also exclude the skin
effect.
Initially, the numerical solutions were investigated
by comparing pressure distributions (P vs. r) generated
using the numerical model with those generated using an
64

65
analytical solution to the RDE.

For equivalent radii, the

finite-difference approximations of the block pressures


were in excellent agreement with the pressures that were
determined analytically.

Moreover, the agreement was still

excellent at small radii 5 ft.), with the pressures


generated numerically usually being within 0.5 percent of
the pressures calculated analytically.
The simulation model used for the comparison was
divided into 200 grid block, resulting in the external
radius of the model being approximately 20,000 ft. The
purpose of making the external radius large was to insure
that the pressure at the boundary was not affected by
production from the first block (sandface) for the duration
of the simulation.
By using conventional PTA methods, the numerically
generated pressure-time solutions at the-sandface (node 1)
were verified.

Initially, the solutions without wellbore

storage were analyzed graphically using conventional PTA.


Then, wellbore effects were considered and the solutions
were again analyzed in a similar manner.

In both cases,

the wellbore pressure transient responses behaved according


to known analytical solutions to the RDE.
The analytical solutions used for comparison were the
Exponential Integral (Ei) solution and its logarithmic
approximation, and a solution developed by Ramey, et al.-^;
the latter solution includes wellbore storage.

66
A Numerical Pressure
Distrihul-inn

The initial verifications of the numerical solutions


were made through investigations of an assortment of
pressure vs. radius plots for various producing times.
With reservoir and production data taken from Fig. 6-1,
Fig. 6-2a illustrates the radial pressure distributions
generated by the numerical model for producing times of
1,10,100, and 1000 hours. Figure 6-2b illustrates the
linear relationship expected between pressure and radius
when the abscissa is logarithmic.

The pressure

distributions shown by Fig. 6-2a and 6-2b are typical of


radial flow systems, showing large pressure gradients near
the wellbore and smaller pressure gradients at locations
further from the wellbore.

For the producing times

considered, the pressure at the external boundary of the


model remained unchanged; therefore, the pressure
distributions shown by Fig. 6-2a and 6-2b are for
the"infinite-acting" flow period.
F-inite-D-ifference Compared to
F.-i Solution

Pressure solutions at 1000 hours were generated with


the same reservoir parameters (Fig. 6-1) using the
Exponential Integral (Ei) solution to the radial
diffusivity equation.

The Ei solution to the RDE applies

to an "infinite-acting" reservoir, producing at a constant


rate from a line-source.

It is shown below as Eq. 6-1.

67

Parameter

Value

Permeability

10 md

Porosity

20%

Initial Pressure

3000 psia

Reservoir thickness

91 ft

fi

System Compressibility
Oil Viscosity

7x10 psi
1.2 cp

Formation Volume Factor

1.01 RB/STB

Wellbore Radius

0.5 ft

Oil Production Rate

200.0 STB/D

Figure 6-1.
General reservoir parameters used to generate
the numerical and analytical solutions
for comparison.

68

1 HOUR
3000.00

2950.00

Pressure
(psia)

10 HOURS

00 HOURS

000 HOURS

-o,

TiJ>

}^J^

I*
<-

2900.00 J B 9 -

2850.00 [ y
D

a
2800.00 n 0,50
rw

600,50

1200.50
1800.50
Radius
(ft.)

2400.50

3000.50

(a)

1 HOUR

10 HOURS

3050.00
3000.00

100 HOURS

100.00

1000.00

1000 HOURS

2950.00
2900.00

Pres:' " ^ ^
(ps:l a )

2850.00 . , v * ^ * o ^ J ' ^ c C P '


t ,c<P , ; rLC2800.00!^-yH"-cC^
2750.00l'f-7|CP
2700.00 Hj
2650.00
1.00

10.00

10000.00

100000.00

Radius
(ft.)

(b)
Figure 6-2
Pressure distributions generated by the numerical
model. Cartesian coordinates (a) and semilogarithmic coodinates (b) are shown.

69
Pi - (p)j. =

- 7n f^ q^PoMo p./-9480)ioCtr^A
icoh
'^
kot
;> '

where the term Ei is a function which may be defined by Eq.


6-2 below, and all symbols and units are shown in the
Nomenclature section.
oo -u
Ei(-x) = f du

(6-2)

The Ei solution (Eq. 6-1) of the RDE relates the


pressure drawdown {Pi - (P)^-} at any location (r) in an
"infinite reservoir" to the total elapsed time (t) since
production (q^) began.

In addition, the production rate

must be constant for the time period (t), and the intitial
reservoir pressure (Pi) must be static and uniform
throughout the reservoir.

The units used for Eq. 6-1 are

standard oil field units (see Nomenclature section), with


the exception that t is in hours.
To allow a meaningful tabular comparison, the
Ei-solution pressures were evaluated at the same nodal
radii used in constructing the grid of the model.
Comparisons of the finite-difference approximations to the
Ei-solutions are shown in Table 6-1.

The comparison shown

by Table 6-1 illustrates the excellent agreement that was


achieved between the finite-difference approximations and
the Ei-solution to the RDE.

Although not shown, a

70
Table 6-1
Tabular Comparison of Pressure Solutions Generated
From the Ei Solution and Finite-Difference
Approximat ions
Radius
(ft.)

Pressure (psia)
Ei solution

Pressure (psia)
Finite-Difference

.53

2692.68

2693.09

.60

2697.19

2697.60

.72

2703.96

2704.37

.91

2712.99

2713.38

1.03

2717.50

2717.89

1.16

2722.01

2722.40

1.76

2737.81

2738.18

2.53

2751.35

2751.71

8.91

2798.74

2799.06

' 21.91

2832.59

2832.87

50.75

2864.18

2864.43

98.18

2888.98

2889.21

189.97

2913.73

2913.93

467.24

2947.04

2947.20

669.71

2959.91

2960.05

1149.23

2977.78

2977.88

2662.04

2996.66

2966.67

4302.08

2999.74

2999.73

6952.50

3000.00

3000.00

71
similar agreement was obtained using various production
rates and various values of reservoir properties.

The

graphical comparison of the analytical and finitedifference radial pressure distribution after 1000 hours of
producing time is presented as Fig. 6-3.

From this plot,

it is shown that for a producing time of 1000 hours, the


finite-difference approximation is in excellent agreement
with the Ei solution.

Furthermore, from Fig. 6-3b, it is

shown that the finite-difference approach yields excellent


approximations for the near-wellbore solutions to the Ei
equation.

The near-wellbore accuracy of the numerical

model is significant since conventional pressure-transient


theory is based upon pressure-time behavior in this region.
The same data was plotted using a logarithmic scale on the
abscissa; this is shown in Fig. 6-4a and 6-4b.
Review of Conventional PressureTransient Drawdown Analysis
Before discussing the pressure-time solutions of the
numerical model, a brief overview of pressure transient
drawdown testing will be given.

The purpose of the review

is to provide a basis for verifying the model by using


conventional pressure-transient analysis (PTA) methods.
A limited review of conventional PTA will be provided
in this section, discussing only those topics needed to
clarify the meaning of the "semi-log slope" used in
conventional PTA.

Unlike previous chapters, the equal ions

72

Ei

3000
2930 4
Press.

(psia)

FD

Initial Press.
-.'.--

2860 +$'
2790 f
2720 g
Pwf ^
2650
0.50
rw

600.50

1200.50

1800.50

Radius
(ft.)

(a)

Ei

FD

2825 T

2775

Press,
(psia)
2725

Pwf f
2675
0.50
rw

--

1.50

2.50
Radius

3.50

4.50

(ft.)

(b)

Figure 6-3
Comparison between the Ei solution (Ei) and the
finite-difference (FD) model. Full reservoir
distribution (a) and near wellbore
distribution (b) are shown.

73

Ei

FD

3000 1r*^ Initial Press.

A*-*-*"*
>^"'

Press.
(psia)

^4^*
2800

,.-

Pwf ^ < <^*


1
2600
0.10

1.00
^^

10.00
100.00
Radius
(ft.)

<

1000.00 10000.00

(a)

Ei

FD

2 8 1 5 -r
^y^

2765

.X

Press.
(psia)
2715
Pwf
2665
0.10

-I

rw

1.00
Radius
(ft.)

10.00

(b)
Figure 6^4
Comparison of t h e Ei s o l u t i o n s (Ei) t o the f i n i t e d i f f e r e n c e (FD) approximations. Full
r e s e r v o i r (a) and near wellbore (b)
d i s t r i b u t i o n s are shown.

74
presented liereafter will be expressed in standard oilfield
units.

Furthermore, the units required for the equations

will not be shown, however, the oil field units are


outlined in the Nomenclature.

The use of the model was

limited to pressure drawdown testing, therefore, only


conventional PTA of pressure-drawdown testing at constant
rate will be discussed.
For describing pressure behavior near the wellbore
(i.e., PTA), a good approximation to the Ei solution is
known.

It is referred to as the logarithmic approximation

to the Ei solution, and is shown below as Eq. 6-3.

p, . (p),, = - 162.6S^ log( i m i ^ A

(6-3)

Since the numerical model does not consider an additional


pressure drop (or gain) due to skin, Eq. 6-3 was written
for a well without skin.
Equation 6-3 describes the unsteady-state pressure
drawdown at the sandface of a well (i.e., node 1), where
the well produces at a constant rate (qo) , and is located
in an "infinite reservoir."

Furthermore, for Eq. 6-3 to

apply, the reservoir pressure (pi) must be static and


uniform prior to flowing.
The relationship shown by Eq. 6-3 describes a straight
line plot of {p)ru <Pwf i^ereafter) versus the logarithm ot
time.

Moreover, if p^^f were plotted versus time (t) usin.i

75
semi-logarithmic coordinates (abscissa being logarithmic),
a straight line would be obtained.

Consequently, this

slope, as determined from the semi-logarithmic coordinates,


is referred to as the "semi-log slope."

The equation for

the semi-log slope in units of psi/cycle is shown below as


Eq. 6-4.

m= -162.6^^M^

(6-4)

knh

Therefore, if the semi-log slope can be ascertained from


pressure-transient data, and the production rate and
in-situ fluid properties PQ and |IQ are known, then a
calculation of effective flow capacity (k^h) can be made
using Eq. 6-4.

Thus, the equation for the semi-log slope

(Eq. 6-4) provided a convenient means with which to check


the sandface (block 1) pressure-time solutions generated by
the numerical model.
By using the sandface pressure-time solutions of the
numerical model as pressure transient test data for
conventional PTA, a numerically generated semi-log slope
was determined; this slope was then compared to that
semi-log slope calculated analytically using Eq. 6-4.
Excellent agreement was achieved between the numerical
semi-log slope and the analytical semi-log slope.
Therefore, the following sections will use the semi-log
concept for verifying the numerical model.

76
A Numerical Pressure Drawdown T(-<=^r
Without Wellhnrp Stor;^aP

The pressure-time solutions were verified by


conducting a series of pressure drawdown tests using the
numerical model, and then analyzing the pressure-time
solutions at the sandface using conventional PTA.
Initially, the computer model was used to perform pressure
drawdown tests without wellbore storage; these tests are
usually referred to as the "ideal" pressure drawdown test
since a linear relationship should exist between P^^ and
the logarithm of t for all times (excluding effects caused
by wellbore storage, skin, and fractures).

Furthermore,

the initial analysis of the solutions without wellbore


storage provided an early verification of the basic
computer model, which was necessary if the wellbore
storage effect was to be later included in the simulation
model.A pressure drawdown test was performed using the
computer model, with data from Fig. 6-1.

Pressure-time

solutions for block 1 (sandface) were recorded during the


simulation, and are shown in Table 6-2.

The pressure-time

solutions were then plotted using both cartesian


coordinates and semi-logarithmic coordinates; the plots
are shown as Fig. 6-5a and 6-5b, respectively.
An analysis using least-squares regression was
performed on the simulation pressure-time data to yield a
semi-log slope of -43.12 psi/cycle.

Conventional PTA

77
Table 6-2
Finite-Difference Pressure Drawdown Solutions
(no-wellbore storage) Used for Conventional
PTA
Time
(hrs)

Pressure
(psia)

Time
(hrs)

Pressure
(psia)

0.0000

3000.0

1.8587

2811.2

0.0006

2961.7

2.2853

2807.3

0.0100

2908.9

2.9450

2802.5

0.0212

2894.9

3.6474

2798.5

0.0368

2884.7

4.3779

2795.1

0.0517

2878.4

5.7024

2790.1

0.0675

2873.4

6.7582

2786.9

0.0894

2868.1

8.5856

2782.4

0.1954

2853.5

12.2155

2775.8

0.2696

2847.4

15.0705

2771.9

0.3376

2843.2

20.0667

2766.5

0.4382

2838.3

30.8021

2758.4

0.5195

2835-1

41.0731

2753.0

0.6665

2830.4

56.7187

2746.9

0.8776

2825.3

68.5778

2743.4

1.1016

2821.0

79.0853

2740.7

1.4213

2816.2

96.8802

2737.1

78

Initial Press

3000.00 T
2950.00 T
2900.00

S
,^^5,
2850.00-i
(psia)

2800.00 %.
2750.00
2700.00

10

20

30

40

50 60
time
(hours)

70

80

90 100

(a)

3000

2950

III

m = - 4 3 . 12 p s i / c y c l e j l

11 Ill 111 I I
1 1
iTh"
1 1 1t

t ^ --

2900
Pwf
(psia)

iJi

2850
2800
2750
2700

0.0001 0.001

II ill iiiiiiii nil!

0.01

0.1
time
(hours)

10

100

(b)

Figure 6-5
C a r t e s i a n p l o t (a) and semi-log p l o t (b) for example
drawdown t e s t with no welbore s t o r a g e .

79
suggests, by Eq. 6-4, that a slope of -43.31 psi/cycle
should be expected.

Using Eq. 6-4 and data from Fig. 6-1,

the analytical semi-log slope calculation is shown below.

^
=

(-i62.6)(200 STB/D)(1.0i RB/STB)(1.2 cp)


(10 ind)(91 ft)

-43.31 psi/cycle.

For this test, the semi-log slope generated by the


finite-difference model deviated by less than 0.5 percent
from the analytically expected semi-log slope (Eq. 6-4).
Mathematical Basis for
the Log-Log Plot
In addition to performing semi-log analysis, an
additional plot will be presented which will characterize
the solutions during the time period when wellbore storage
dominates the pressure-time solutions at the sandface.
This plot is commonly referred to as the "log-log plot"
because the data are plotted using a logarithmic scale on
both the abscissa and ordinate.

The use of the log-log

plot is significant since most type curves use the nature


of logarithmic coordinates to magnify the early-time
pressure transient behavior for matching purposes. Thus, a
mathematical basis for using the log-log plot in detecting
wellbore storage effects on pressure transient data will be
provided.

80
In order to develop for use the standard dimensionless
wellbore storage coefficient, it will be necessary to first
describe the pressure-time behavior as depicted on the
log-log plot using dimensionless variables.

The discussion

will also lay the foundation for the following section


which will compare the dimensionless form of the
finite-difference solutions to published analytical
solutions, also in dimensionless form.

In addition, the

dimensionless variables will be introduced using standard


oil field units.
Expressing the wellbore model (Eq. 3-51) in standard
oil field units will yield:

Qo3

(Qo3), -

-p^-J^,

(6-5)

where C3 i s now e x p r e s s e d in u n i t s of RB/psi.


t h e term Pj^j^ ( b o t t o m - h o l e p r e s s u r e )
hereafter
pressure.

e x p r e s s e d u s i n g P^f

in Eq. 3-51 i s

t h e flowing b o t t o m - h o l e

D i m e n s i o n l e s s p r e s s u r e and d i m e n s i o n l e s s time

may be d e f i n e d f o r o i l flow as

tn =

0.000264 k o t
;,
0MoCtr^

0.00708 k o h ( P i - P ^ f )

In a d d i t i o n ,

( Q o s l Po Mo

and

follows:

(6-6)

^^_^^

81
Substitution of Eqs. 6-6 and 6-7 into Eq. 6-5, and
simplifying will yield:
O.o - (0 ^ - - 0-894 (Qo3)^C3 dPc
Wos
CUosL =
:f
^
0Cthr^
dtu

(6-8)

From Eq. 6-8, the usual form of the dimensionless


wellbore storage coefficient can be shown to be:
0.894 Co
C3L =
10Cthr^

(6-9)

Immediately following the initiation of flow at the


surface, (QQS^S' ^^^ sandface flow rate can be considered
negigible (i.e., Q^^ ~ 0).

Therefore, by replacing Q^^

with zero and using the definition of Eq. 6-9, Eq. 6-8
becomes:
dtc = CsDdPD

(6-iO)

Integrating dtj^ from 0 to t^ and dP^ from 0 to Pp as


follows:
tD

JdtD =
0

PD

CSDJCIPD
0

(^-^^)

82
will yield the following result:
^D - CgnPj)

(6-12)

Taking logarithms of both sides of Eq. 6-12 will yield:


logt]) = logPu + logCgD

(6-13)

Since Cgj^ is assumed constant, a plot of the log(Pj5)


versus the log (tj^) will yield a straight line of unit
slope.

Furthermore, since t is directly proportional to tj^

(t octjj) and (Pi-Pvrf) ^ Pp/ a plot of log(Pi-P^f) versus


log(t) using the sandface pressure-time solutions of the
model will also yield a straight line of unit slope.
Therefore, at early times (i.e., Q^^ ~ 0) during the
simulation of a pressure drawdown test that includes
wellbore storage," a plot of Pi'Pv^f (AP) versus time (t)
using logarithmic coordinates was used to detect time
periods during which wellbore storage was occurring (i.e.,
log-log slope = 1).
The unit slope concept proved to be a valuable
resource for verifying the wellbore model because the
pressure-time data required for the slope calculation
required minimal processing and was readily available.

83
A Numerical Pressure Drawdown Test With
Wellbore Storage Included

An example pressure drawdown test that includes the


storage effect of the wellbore will be presented in this
section.

The finite-difference solutions generated by the

numerical model will again be used as data for conventional


pressure-transient analysis (PTA).

In addition to

analyzing the semi-log plot, the finite-difference


solutions were analyzed using various diagnostic plots
which provided additional verification for the wellbore
model.
A computer simulated pressure drawdown test was
performed using the reservoir data from Fig. 6-1. The
storage process modelled was for a changing liquid level,
therefore, only the wellbore fluid density and the
cross-sectional area of the annulus between the casing and
tubing were needed to fully-define the storage coefficient.
The wellbore fluid density for the example pressure
drawdown test was 62.9 Ib/ft"^, and the casing-tubing
annulus cross-sectional area was .0873 ft^. The term Cg in
Eq. 3-51 may be expressed using oilfied units as:
C

=
^

1^^ (Ayb)
5.615 Po '

(6-14)

which has units of RB/psi, and A^j^ is the cross-sectional


area of the annulus between the casing and tubing.
Eq. 6-14, the wellbore storage coefficient for this

Using

84
pressure drawdown test was calculated to be 0.03560 RB/psi.
Thus, that value (0.03560 RB/psi) was used as input data
for the computer simulation of the pressure drawdown test.
The cumulative time of the simulated pressure drawdown
test was approximately 80 hours.

The sandface pressure

solutions during this time are shown in Table 6-3, and are
shown graphically on logarithmic coordinates (i.e., log-log
plot) by Fig. 6-6a.

As expected from the previous

discussion of the theory, the unit slope on the log-log


plot is evident during early times.
Since the production data and the reservoir parameters
are the same as those used for the previously discussed
pressure drawdown without wellbore storage, the semi-log
slope for both tests should be similar after the wellbore
storage period is over.

From Fig. 6-6b, it is shown that

semi-log slope for the test with wellbore storage is


approximately -43.29 psi/cycle.

In the previous section, a

semi-log slope of -43.12 psi/cycle was determined without


considering wellbore effects.

The consistency in the two

semi-log slopes is shown in Fig. 6-7 by plotting both


pressure drawdown tests on the same semi-log graph.

Fig.

6-7 also illustrates the early time deviation from


linearity caused by wellbore storage.
As a further illustration, the negative of the
semi-log slopes (psi/cycle) from Fig. 6-6b were plotted
versus time (t) using semi-logarithmic coordinates.

The

85
Table 6-3
Finite-Difference Pressure Drawdown Solutions
(wellbore storage included) Used for
Conventional PTA
Time
(hrs)

Pressure
(psia)

Time
(hrs)

Pressure
(psia)

0.0055

2998.7

6.1322

2795.9

0.0106

2997.6

9.8227

2784.1

0.0244

2994.5

12.8251

2778.1

0.0516

2988.6

15.3271

2774.2

0.0687

2985.1

16.9284

2772.1

0.0960

2979.7

18.1293

2770.7

0.1283

2973.6

25.1750

2763.9

0.1684

2966.4

29.0180

2761.0

0.3201

2942.9

30.9396

2759.7

0.4040

2931.9

33.5016

2758.1

0.4693

2924.0

43.3655

2753.0

0.8007

2892.7

50.5392

2750.0

1.3304

2861.2

57.9179

2747.4

1.9794

2838.7

61.1974

2746.3

2.5063

2827.2

66.1165

2744.8

3.1782

2817.1

72.6753

2742.9

4.6076

2804.1

80.8739

2740.9

86

1000

Ht

[ffM

:?"^-

r ,'1

= ( -

It. 1..

<<$^

<.<*. <

, ! * -

100

'-U

z\

ioff
.fflis... II

Pi-Pwf
(psi)

W
fflpHt "1

T|" "Unxt"

10

t1 Slope
11

li-- 1
::i

11

0.001

-'--H

0.01

It

_:: ]{

ft

L
.

--jy
111
111

1 J

0.1

1
time
(hrs.)

II
10

100

1000

(a)

3000

2900
Pwf
(psia)
2800

2700

1000

0.001

(b)
Figure 6-6
Log-log plot (a) and semi-log (b) plot for the example
drawdown t e s t with wellbore storage.

87

NoWBS

O WBS Included

3000.00 -o-

iiib
2900.00

WBS
Effect

Oo

;>;! T

Pwf
(psia)

vJIIJ o

1U^\0

2800.00

^^.^^

RQ^o.

'''0%

2700.00
0.01

t>,Co
' '-'-cA

'Co

l2l
0.1

10

100

time
(hrs.)

Figure 6-7
Semi-log comparison of the f i n i t e - d i f f e r e n c e
s o l u t i o n s for p r e s s u r e drawdowns with, and
without, wellbore s t o r a g e .

1000

88
result is shown by Fig. 6-8.

This graph (Fig. 6-8) depicts

the behavior of the semi-log slope when wellbore storage is


affecting pressure-time relationships at the sandface.

In

addition. Fig. 6-8 shows the decreasing influence that


wellbore storage has on pressure-time relationships at
later times during the test.

Furthermore, the value of the

semi-log slope (-43.29 psi/cycle) is more clearly seen by


using the plotting technique of Fig. 6-8.
Figure 6-9 uses the same coordinate system to plot
both the down-hole flow rate versus time and the semi-log
slope versus time.

Thus, it is shown by Fig. 6-9 that the

pressure (P) versus logarithm of time (t) plot linearity


does not begin until the down-hole flow rate (QQS^
approaches that of the surface rate, (QQS^S*

From Eq.

3-51, it can be deduced that for a constant wellbore


storage coefficient-, Cg, the sandface flow rate (QQS)
approaches the surface flow rate (QQS^S ^^^^ dP^f/dt
approaches zero; the basic equation of interest is
reproduced below as Eq. 3-51.

Q o s - (Qos), =

Po dt

<3-51)

Therefore, wellbore storage is greatest at early times


during a weiltest when dF/dt

at the wellbore is large, and

conversely, at later times, wellbore storage is minimal.

89

150

125

100

(-) S I . slope
(psi/cycle)

75

50

'fr^

^*s/A A A

'1

25

t0.01

1 1 1 Mill

0.1

l i m n

1 1 1 1 n i l1

10

1 1 11 nil

100

1 1 1 1 nil

1000

time
(hrs.)

Figure 6-8
Semi-log slope (negative) versus time for the
p r e s s u r e drawdown t e s t of Fig. 6-6b.

90

^ -S.L.

Qsand
200

S u r f a c e Flow R a t e

Slope

j-^-^iC*::<-

180
160
- S.L. slope
(psi/cycle)

&
Qsand
(stb/day)

-A-,

140
A.
A
.A.*.

^^

100
3Q

60
40

A*
A.*_

^^//A^^y

M/////A.^A_A.A__A

AA

20
0 1

0.01

1I 1 m I il

0.1

-I1 I 11 m

I I 11 m i l t

10

I I ttiw

I I HItl

100

time
(hrs.)

Figure 6-9
Semi-log slope (negative) versus time and
the down-hole flow rate versus time.

1000

91
Thus, the pressure-time behavior depicted by Fig. 6-9
appears consistent with the relationship stated by Eq.
3-51.
Although excellent agreement with conventional PTA
has been achieved, the verification presented so far has
been limited to one set of reservoir parameters and one
surface production rate (Fig. 6-1). Therefore, the
dimensionless forms of time (t^) and pressure (P^) (Eqs.
6-6 and 6-7, respectively) will be used in the following
discussion to verify the model for a wide range of
reservoir flow parameters.
Dimensionless Finite-Difference Solutions
No Wellbore Storage
Equation 6-3 can be expressed in dimensionless form by
replacing the time (t) and pressure (P) variables with
their associated dimensionless counterparts as shown by
Eqs. 6-6 and 6-7, respectively.

By doing so, an equation

will result that will describe the pressure-time behavior


at the sandface for any combination of reservoir flow
parameters that were used to originally define the
dimensionless quantities, t^ and P^.

Expressing Eq. 6-3 in

terms of these dimensionless quantities will yield:

PD =

1.151LogtD

+ 0.4046 .

(6-15)

Therefore, a plot of P^ versus the logarithm of t^ will be

92
linear with a slope of 1.151 dimensionless pressure units
per cycle of dimensionless time.
The pressure-time solutions of the example drawdown
(no wellbore storage) discussed previously were expressed
in dimensionless form using the dimensionless time and
dimensionless pressure definitions given by Eqs. 6-6 and
6-7, respectively.

The resulting dimensionless solutions

were plotted using semilogarithmic coordinates, and is


shown by Fig. 6-10.
By least-squares regression, the semilog slope on Fig.
6-10 was determined to be 1.1516 dimensionless pressure
units per cycle of dimensionless time.

Thus, excellent

agreement was achieved between the numerical and analytical


solutions for pressure versus time in dimensionless form.
The verification of the model using dimensionless
variables is significant because it automatically verifies
the numerical model for any assemblage of reservoir
properties that were originally used to define the
dimensionless variables.
Wellbore Storage Included
Ramey, et al.^ considered wellbore storage effects in
their analytical treatment of the radial diffusivity
equation.

One of the basic assumptions made during their

development was an unchanging wellbore storage coefficient,


Cg (RB/psi).

93

987_
1

Slope ^= 1 .1515(5 psi/cycle

6-

^^^N

PD
*i -

6 -

1
1 <

>

J*

*
3 -- 4
>

o_

1.OOE+02

1 .OOE+03

1. OOE+04

1.OOE+05

1.OOE+06

to

Figure 6-10.
Dimensionless semi-log slope generated from
finite-difference approximations.

94
The most popular version of their solution is in the
form of a "type-curve."

On this type-curve, dimensionless

pressure {F^) is plotted versus dimensionless time (t^) and


a family of curves is shown for a wide range of values of
the dimensionless wellbore storage coefficient, Cg^ (Eq.
6-9) . Their type-curve (for a skin of zero) is shown as
Fig. 6-11.
The pressure-time solutions of the example problem
that included wellbore storage were put into dimensionless
form using Eqs. 6-6 and 6-7.

The wellbore storage

coefficient was expressed using the dimensionless form


defined by Eq. 6-9.

The calculation of the dimensionless

wellbore storage coefficient for the previous example


problem using data from Fig. 6-1 is shown below:

CsD =

0.894 (.0356 RB/psi)

^
(0-2) (7xi0' )(91 ft)(0.5 )

1000 .

The dimensionless pressure was plotted versus


dimensionless time using logarithmic coordinates.

On the

same plot, the solutions generated analytically by Ramey,


et al. for a dimensionless wellbore storage coefficient of
1000 were superimposed.

This plot is shown by Fig. 6-12.

Again, excellent agreement was achieved between the finitedifference approximations and the analytical description of
the RDE developed by Ramey, et al.

95

1. OOE+02 -^

S)d.n*=0

l.OOE+01

PD

l.OOE+00 :T

l.OOE-01 -.f

1.OOE-02
1. OOE+011. OOE+02 1. OOE+03 1. OOE+04 1. OOE+05 1. OOE+06 1. OOE+07 1. OOE+08

to
Figure 6-11
Ramey, et al.-^ analytical solution to the RDE that
includes a constant wellbore storage
coefficient, Cgj).

96

Ramey e t a l .
1.OOE+01

^ F . D.

C3D-10'3II

- <. .j U
. o --0o - o - o - o - o - ' "

<>"

PD

l.OOE+00 :

A
r
6
/

1.OOE-01

'

I I I I Mill

I I l i tN

t I I n iM

I I niMt

I I nun

i 11 iini

1.OOE+02 l.OOE+03 l.OOE+04 l.OOE+05 1.OOE+06 l.OOE+07 l.OOE+08


tD

Figure 6-12
Comparison of finite-difference (F.D.) approximations
to Ramey et al.-^ solutions for a dimensionless
wellbore storage coefficient of 1000.

97
Additional pressure drawdown tests were performed,
each with a different dimensionless wellbore storage
coefficient.

The dimensionless finite-difference

approximations {p^ and tj^ at r^) were superimposed onto the


solutions by Ramey, et al., the resulting plot is shown by
Fig. 6-13.

As it is shown (Fig. 6-13), excellent agreement

was achieved for all Cg^ that were plotted.

Having

verified the model using the dimensionless solutions


developed by Ramey, et al.-^, confidence was established for
using the simulation model to study the effects of an
instantaneous change in value of the wellbore storage
coefficient, Co.

98

Finite Difference

- o -

Analytical

1.OOE+02 9

l.OOE+01 !

pD

l.OOE+OO

U^-o-ocP-oo-j-j^-^^^''"-"
~
Cs5p=10"2 |>>

P
:

7=

/ >

/p
:

l.OOE-Ol t>

-/^

CsD=10"4

T'
./>

CsD=10'^3
/
/

/O

>^

Csp=10"6
/>

/ >
-/>

/>

CsD=r0"5

/p
/>

yP

/>

/
/

A
A
I tiiii(P I itiiiiO I

% iiiiiiiP
I t mil
I t ittiiti I t iititii
1.OOE-02
t t ttiiiti
1.OOE+011. OOE+021. OOE+031.OOE+04 1. OOE+051.OOE+061.OOE+071.OOE+08

to
Figure 6-13
Comparison of finite-difference approximations to
Ramey, et al.-^ analytical solution for
various dimensionless wellbore
storage coefficients.

>

>

CHAPTER VII
CHARACTERISTICS OF A VARIABLE WELLBORE
STORAGE COEFFICIENT

The wellbore storage coefficient, Cg (RB/psi), is a


term which describes the magnitude of the difference
between the surface and sandface flow rates during the time
in which the bottom-hole pressure is changing (i.e.,
pressure-transient testing).

van Everdingen and Hurst^

first introduced the wellbore storage concept to the


petroleum industry.

They posed that the amount of fluid

stored (or withdrawn) from the wellbore per atmosphere of


pressure drop is a constant whose value can be determined
with reasonable accuracy.

They expressed the constant, C

(herein, Cg), in cc/atmosphere at reservoir conditions. A


mathematical model that uses the wellbore storage
coefficient, Cg, to describe wellbore flow has been
developed in Chapter 3, and is repeated below as Eq. 3-51.

--^->s = S ^ where Q^^ is the sandface flow rate (STB/D), (Qos)s ^^ the
surface flow rate (STB/D), and P^h is the bottom-hole
pressure (psia).

Most conventional weiltest theory assumes

for practical reasons that the wellbore storage coefficient


99

100
(Cg) of Eq-. 3-51 remains constant for the duration of the
pressure-transient test.

In addition, most type-curves

that are developed to include wellbore storage assume also


that the coefficient remains constant. Although this
assumption may be suitable for many well tests, it does not
characterize all tests, particularly those for some
injection wells.

Therefore, a discussion will be presented

in this chapter to provide insight into the pressuretransient behavior as seen on standard weiltest analysis
plots when the value of the wellbore storage coefficient,
Cg, changes instantaneously during a pressure-transient
test.
Influencing Factors

The factors that promote an instantaneous change in


wellbore storing effects are easier to understand if one
considers the two methods used to describe Cg in Chapter 3.
The term Cg was defined for two types of storage processes:
1) changing liquid level storage, and 2) compressional type
storage.

From theory, the changing liquid level storage

coefficient is dependent only upon the wellbore fluid


density (p^) and the cross-sectional wellbore area (A^]^) .
The cross-sectional area of the wellbore that affects the
amount of fluid stored is that area (A^j-,) of the wellbore
in pressure communication with the reservoir (usually the
tubing or the casing-tubing annulus).

The wellbore storage

coefficient may be defined using this area (A^j^) / and is

101
shown b e l o w a s Eq. 7 - 1 .

C<, =

25.65 ^^b
Pf '

(7-1)

where A^^ has units of ft^ and Pf has units of Ibm/ft^. If


a rising or falling liquid level travels through a
discontinuity of wellbore cross-sectional area (A^t>) , such
as a liner or tapered tubing string, then an instantaneous
change in the wellbore storage cofficient (Cg) will occur.
If the change in A^j^ is large, then the down-hole
pressure-time measurements of the well test should be
affected.
Fluid may also be stored in the wellbore as a result
of fluid compression.

The wellbore storage coefficient

describing compressional storing effects was developed in


Chapter 3, and is repeated below as Eq. 7-2.
Cs =

VwbCf ,

(7-2)

where V^j^ (bbl) is the volume of that portion of the


wellbore in pressure communication with the reservoir and
Cf (psi"-^) is the compressibility of the wellbore fluid.
For a wellbore to store or unload fluid by means of fluid
compression only, a complete column of fluid,.must exist in
the wellbore for the duration of the storage period.
Furthermore, when fluid is stored (or unloaded) as a result
of fluid compression in the wellbore, the value of the

102
storage coefficient (Cg) is usually much less than that
value of Cg for the same system experiencing a changing
liquid level storage process.
The dimensionless curves presented in this thesis
characterize a large change in the wellbore storage
coefficient; this usually occurs during a well test when
the storage process changes from compressional to that of a
changing liquid level, or vice versa.
An increase in the wellbore storage coefficient, Cg,
can occur while conducting a pressure fall-off test on a
water injection well.

This occurs when the fluid level,

initially at the surface, begins to fall during the well


test.

The storage process is thus changed from fluid

decompression to that of a failing liquid level.


Conversely, a decrease in the wellbore storage
coefficient may occur while pressure build-up testing a
production well.

The decrease in storage ability for a

production well during a pressure build-up test will occur


when the rising fluid level strikes either a pac)cer or the
surface, thus changing the storing process from a rising
liquid level to that of compression.

Although a cushion of

gas may exist above the liquid level for surface pressures
below the bubble point pressure of the reservoir oil (Pj^),
the effects of the gas cushion are not considered herein.
For a typical wellbore and wellbore fluid, the storage
coefficient, Cg, for the changing liquid level process is

103
approximately 100 times greater than the storage
coefficient for a compressional type storage^^. Therefore,
the pressure transient test data obtained while this is
happening should reflect the variation in wellbore storage,
and from the simulation results obtained from this thesis,
it appears that it does.
Significance of the Early-Time Region
The time regime in which pressure-transient
measurements are affected by wellbore storage and other
near-wellbore influences (i.e., skin and near-wellbore
formation fractures) is referred to in the literature as
the "early-time region."

Since H. J. Ramey, et al.'s^ work

concerning wellbore storage and skin, early-time behavior


has been used to determine reservoir flow characteristics
for hydrocarbon reservoirs.

Prior to their work, pressure-

time measurements registered during this time regime were


usually not analysed.

The early-time pressure-transient

behavior describing the departure from "ideal behavior" is


normally presented using a type-curve.

Some type-curves

can be used to determine reservoir characteristics and are


considered functional type curves, while others illustrate
general pressure-transient behavior and are usually not
used for analysis purposes.
The dimensionless curves presented in this chapter are
accurate approximations to the solutions for when the value
of the wellbore storage coefficient (Cg) changes

104
instantaneously, but the curves lack generality, thus a
correct type-curve match would be difficult.

Nevertheless,

the dimensionless curves should give insight into the


pressure-transient behavior expected in the presence of a
varying wellbore storage coefficient, thus serving as an
excellent diagnostic tool for pressure-transient curves.
Simulation Results
The reservoir simulation model was used to approximate
pressure-time solutions (sandface) of the mathematical
model during a pressure drawdown test performed at constant
rate.

During the simulation, the wellbore storage

coefficient, Cg, was allowed to vary instantaneously.

The

value of the wellbore storage coefficient was changed at a


different dimensionless time for each pressure drawdown
simulation.

This was done for the purpose of studying the

effect that a changing wellbore storage coefficient had


during various time regimes (i.e., early-time region and
late-time region).
A convenient comparison between the pressure transient
behavior of a constant Cg^ and a variable Cg^ was made by
using the familiar log-log type-curve of Ramey, et al.
plot the results of the simulation.

to

Ramey, et al. plotted

dimensionless pressure (P^) versus dimensionless time (t^),


with the third dimension (family of curves) defined by the
dimensionless value of the wellbore storage coefficient,

105
Cgjj, which was considered constant for their study. The
type-curve by Ramey, et al. is shown as Fig. 7-1.
Numerical solutions were generated for the case when
the dimensionless wellbore storage coefficient (C^^)
varied instantaneously between dimensionless times of 10^
and 10 .

The simulation model was used to vary Con at

difference dimensionless times for each simulation run,


which provided various intermediate curves that "connected"
the dimensionless Cg^ curves of 10^ and 10^ at various
points.

The log-log plot of Fig. 7-2 shows the solutions

when Cgp increases from 10"^ to 10^. From Fig. 7-2, it is


shown that similar pressure transient curves result for
each pressure drawdown, though the coefficient was changed
at a different dimensionless time for each.

Also from Fig.

7-2, it appears that a unit slope may never develop during


the test, which might suggest to the analyst that wellbore
storage is minimal, thus promoting an incorrect analysis.
Figure 7-3 uses semi-logarithmic coordinates to show
the same solutions that were plotted on Fig. 7-2.

It is

evident from this plot (Fig. 7-3) that an incorrect


semi-log analysis is possible if the analyst is not aware
of the storage process occurring.

The semi-log slope on

Fig. 7-3 "flattens" twice during the test.

Thus, if the

weiltest is not conducted for the time required for the


second semi-log straight line to develop, then an incorrect
analysis might be performed.

A result would be choosing

106

1.OOE+02 X

1.OOE+01 :

pD

S)cin=0

l.OOE+00 :

l.OOE-Ol :

1.OOE-02 iI

I tiim

l.OOE+01 l.OOE+02 1.OOE+03 l.OOE+04 l.OOE+05 1.OOE+06 l.OOE+07 l.OOE+08

to
Figure 7-1
Ramey, et al.-*- analytical solution to the radial
diffusivity equation that includes a
constant wellbore storage
coefficient, Cg^.

107

l.OOE+02

l.OOE+01 : :

skin=0

PD
l.OOE+00
tDch=1000

T CSOslU^J
tDch=400y^ + -

'

-CSD=
y)^ g

tDch=200^
l.OOE-Ol

IF I 11 millI I i iiiijF

I 11

l.OOE+02 l.OOE+03 l.OOE+04 l.OOE+05 l.OOE+06 1.OOE+07 1.OOE+08

tD
Figure 7-2
Log-log plot of the Numerical simulation
results for an increase in Cgp
from 10^ to 10^.

108

ml

7.00E+00

1 . 1 ^

'

8.OOE+00

mm

9.00E+00

>ky^

6.OOE+00

5.OOE+00

PD
4.OOE+00

C s D == 0

3.OOE+00
2.00E+00
l.OOE+OO

:csD=10 ^3/

'CsD = 10'^5

0.OOE+00
l.OOE+02 l.OOE+03 l.OOE+04 l.OOE+05 l.OOE+06 l.OOE+07 l.OOE+08

tD
Figure 7-3
Semi-log plot of the numerical simulation
results for an increase in Cgj^
from 10-^ to 10^.

109
the first straight line to develop as the semi-log straight
line to be used for analysis.

Furthermore, an

instantaneous change in wellbore storage may be recognized


by the extremely small slope on the log-log plot following
the coefficient change.

Thus, the log-log plot may be used

in its usual manner for diagnostic purposes to determine if


a change in the value of the storage coefficient (Cg) has
occurred.

Therefore, familiarity with the curves presented

in this thesis might improve the log-log plot diagnosis and


offer the analyst greater insight into some anomalous
pressure-transient curves.
Pressure transient tests were performed using the
numerical model to generate dimensionless pressure
solutions when the value of the wellbore storage
coefficient decreases.

The pressure-time behavior when the

value of the coefficient decreases is shown by Fig. 7-4.


From Fig. 7-4, it is shown that the transition period
between the Cgj^ curves of 10^ and 10^ is extremely small,
thus decreasing the potential of an incorrect semi-log
analysis.
From existing pressure-transient theory, a log-log
slope in excess of 1 cycle/cycle is not explained.

From

Fig. 7-4 it is shown that a log-log slope in -excess of 1


cycle/cycle is possible and it may be caused by a change in
value of the wellbore storage coefficient.

Furthermore,

when the storage coeffient decreases by a factor of 100, as

110

1.OOE+02

1.OOE+01 -

PD
l.OOE+00

l.OOE-Ol
l.OOE+02 l.OOE+03 l.OOE+04 l.OOE+05 l.OOE+06 l.OOE+07

l.OOE+08

tD
Figure 7-4
Log-log plot of the numerical simulation
results for a decrease in Cg^
from 10^ to 10^.

Ill
was done for Fig. 7-4, the time required for the correct
semi-log straight line to develop decreases by
approximately one and one-half log cycles of time.
Although one could intuitively suspect that a decrease
in wellbore storing is beneficial to test interpretation.
Fig. 7-4 shows quantitatively in terms of log cycles of
time the benefit that a decrease in storage can provide.
In addition. Fig. 7-4 should give additional insight into
some anomalous pressure-transient curves that may result
from an occurrence of a decrease in storing ability of the
wellbore.
Figure 7-5 shows the pressure-transient behavior as
seen on the semi-log plot when the value of the wellbore
storage coefficient has decreased during the test.
Extremely large slopes are evident on Fig. 7-5, indicating
a reduction of wellbore storage.

It can be seen from Fig.-

7-5 that the potential of an incorrect semi-log analysis is


much less for the case of a decreasing storage coefficient
because the semi-log slope flattens only once. Moreover,
the weiltest will provide only one distinct straight line,
and the need to choose between two straight lines, such as
for an increase in value of Cg, is eliminated.

Thus, a

decrease in the wellbore storage coefficient is beneficial,


since the standard weiltest analysis plots are less obscure
and the time required for the semi-log straight line to
develop is much less.

112

9.OOE+00

7.OOE+00

1
1 ;i

-TTTT-l

8.OOE+00

psi/cycl

\J ^jdr

6.OOE+00
;

5.OOE+00

PD

4.OOE+00

CsD = 0

3.OOE+00

2.OOE+00
l.OOE+00

I csD=io*3^ y
M

ycsD= = 1 0 ^ 5

- ^ iW

0.OOE+00
l.OOE+02 l.OOE+03 l.OOE+04 l.OOE+05 l.OOE+06 l.OOE+07 l.OOE+08

tD
Figure 7-5
Semi-log plot of the numerical simulation
results for a decrease in Cg^
from 10^ to 10^.

CHAPTER VIII
CONCLUSIONS

The use of reservoir simulation to describe pressuretransient testing has proved very successful.

Simulation

results have been compared with the analytical results of


H. J. Ramey, et al.-^ and van Everdingen and Hurst^, and the
comparison showed that reservoir simulation can be used to
investigate problems associated with pressure-transient
testing.

In addition, the numerical simulation study has

provided insight into some anomalous pressure-transient


curves that result when the value of the wellbore storage
coefficient, Cg, varies instantaneously during a pressuretransient test.
Through the course of building the simulation model,
programming the numerical methods, and studying the effect
of a variable wellbore storage coefficient, Cg, the
following conclusions were drawn:
1. Reservoir simulation describing one-dimensional
radial flow of a slightly compressible fluid in porous
media may be adequately performed using desktop microcomputers .
2. The approximate solutions obtained from reservoir
simulation agree closely with solutions determined using
the exponential integral (Ei) solution to the radial
113

114
diffusivity equation.

Thus, the reservoir simulation model

developed can be used to describe typical sandface


pressure-time relationships that are used in conventional
weiltest analysis.
3. Wellbore influences can be included in the implicit
formulation of the finite-difference equations. The
finite-difference approximations with wellbore influences
included were in excellent agreement with previous work by
H. J. Ramey, et al.-^
4. To generate accurate approximations of pressure at
the wellbore location, it was necessary to allow for a node
to reside at the sandface.

Although the sandface node is

located at a block boundary, the remaining nodes (excluding


the node at the outer perimeter of the model) are located
between block boundaries.
5. When modeling radial flow systems, a logarithmic
transformation of coordinates greatly simplifies nodal
placement and computer coding, but offers no advantage to
the accuracy of the finite-difference approximations.
6. The accuracy of the finite-difference
approximations was improved for the reservoir simulation
model by using smaller nodal spacing near the wellbore.
This was accomplished by spacing the nodes logarithmically
with respect to radius.
7. By making the model extremely large in the radial
direction (r), the pressure-time approximations at the

115
sandface (node 1) were maintained for the duration of the
simulation as if the reservoir was infinite in size.
8. For a typical simulation, initial time steps of 1
to 5 seconds were needed in order to generate accurate
early time approximations.

By doubling the time steps for

every 20 iterations, the accuracy was maintained.


9. By varying the value of the wellbore storage
coefficient, Cs, instantaneously during pressure drawdown
simulations, a set of dimensionless curves was developed
that may be used to illustrate the appearance of a changing
wellbore storage coefficient as seen on standard weiltest
analysis plots.
10. If the dimensionless pressure solutions presented
in this thesis were plotted using different axes, it is
believed that a general type-curve may be developed for
analysis purposes that describes the changing wellbore
storage coefficient.

BIBLIOGRAPHY
Literature C^fc^r]

1. Agarwal, R. G., Al-Hussainy, R. and Ramey, H. J.: "An


Investigation of Wellbore Storage and Skin Effect in
Unsteady Liquid Flow: I Analytical Treatment," Soc.
Pet. Eng. j . (Sept., 1970) 279-290; Trans., AIME,
249.
2. Muskat, M. : "Use of Data on the Build-up of Bottomhole Pressures," Trans., AIME (1937) 123, 44-48.
3. van Everdingen, A. F. and Hurst, W.: "The Application
of the Laplace Transformation to Flow Problems," AIME
(1949) 186, 305-324.
4. Carslaw, H. S. and Jaeger, J. C. : Conduction of He;^t in
Solids, 1st ed., Oxford at the Clarendon Press (1947)
16 and 284; 2nd ed. (1959) 22 and 342.
5- van Everdingen, A. F.: "The Skin Effect and Its
Influence on the Productive Capacity of a Well,"
Trans. AIME (1953) 198, 171-176.
6. Hurst, W.: "Establishment of the Skin Effect and Its
Impediment to Fluid-flow into a Wellbore," Pet. Eng.
(Oct., 1953) 25, B-6.
7. Miller, C. C , Dyes, A. B. and Hutchinson, C. A., Jr:
"Estimation of Permeability and Reservoir Pressure
from Bottom-hole Pressure Build-up Characteristics, "
Trans., AIME (1950) 189, 91-104.
8. Horner, D. R. : "Pressure Build-up in Wells," Proc,
Third World Pet. Cong., E. J. Brill, Leiden (1951)
II, 503-521.
9. Bruce, G- H., Peaceman, D. W., Rice, J. D- and
Rachford, H. H.: "Calculations of Unsteady-state Gas
Flow Through Porous Media," Trans., AIME (1953) 198,
79-92.
10. Welge, H. J. and Weber, A. G.: "Use of Two-dimensional
Methods for Calculating Well Coning Behavior," Soc.
Pet. Eng. J. (Dec, 1964) 345-355.

116

.V

117
^^* ^^^nd't^n^in' ^""^ ^^"^ Poolien, H. K.: "Pressure Drawdown
and Build-up m the Presence of Radial
301-3^9^'"''^^^^^'" ^''* ^^^* ^''^'

^'

^^^P^" ^^^^^

12. Wattenbarger, R. A . and Ramey, H. J.: "Well Test


Interpretation of Vertically Fractured Gas Wells," J.
Pet. Tech. (May, 1969) 625-632.
13. Settari, A. and Aziz, K.: "Use of Irregular Grid in
103-11^'' ^^''''^^^^^'" Soc. Pet. Eng. J. (Jan., 1972)
14. Settari, A. and Aziz, K.: "Use of irregular Grid in
Cylindrical
Coordinates," Trans., AIME \(1974)
257
396-412.
^ ^1
^oi,
15. Greenspan, D. : Introductory Nnmprinal An;^ly<.ic. of
,.r-i^^^^^^ Boundary V^U^f^ Pr-nHioni<i, Harper and Row
(1965), New York.
16. Collatz, L.: The Numerical Treatment nf ni fff^r^nf j ^i
Equations, 3rd ed., Springer-Verlag (1966), Berlin.
17. Brill, J. p., Bourgoyne, A. T. and Dixon, T. N.:
"Numerical Simulation of Drillstem Tests as an
Interpretation Technique," J. Pet. Tech. (Nov., 1969)
1413-1420.
18. Aziz, K. and Settari, A.: Petroleum Reservoir

Simulation, Applied Science Publishers, Ltd. (1979),


Ripple Road, Barking, England.
19. Poolen, H. K., Bixel, H. C. and Jargon, J. R.:
"Finite-differences," Oil and Gas J. (Sept., 1969)
120-121.
20. Earlougher, R. C : Advances in Well Test Analysis,
Monograph Series, Society of Petroleum Engineers of
AIME, Dallas (1977) 5.
Literature Consulted
Anderson, E.: Software Construction Set^ Hayden Book
Company, Hasbrouck Heights, New Jersey (1984).
Arnold, M. D., Department of Petroleum Engineering, Texas
Tech University (Jan., 1988), Private Communication.
Basic Reference. 3rd ed. International Business Machines
Corporation (May, 1984).

.v^

118
Brusaw, C. T., Gerald, J. A. and Walter, E. 0.: Handbook of
Techfiical Writing^ St. Martin's Press (1982), New
York.
Crawford, D. A., Department of Petroleum Engineering, Texas
Tech University (Jan., 1988), Private Communication.
Lee, J.: Well Testing, Textbook Series, Society of
Petroleum Engineers of AIME, Dallas (1982) 1.
Matthews, C. S. and Russell, D. G. : Pressure Build-up and
Flow Tests in Wells^ Monograph Series, Society of
Petroleum Engineers of AIME, Dallas (1967) 1.
Microsoft QuickBasic. Microsoft Corporation (1986).
Quasney, J. S. and Maniotes, J.: Basic Fundamentals and
Style, Boyd and Eraser Publishing Company, Boston
(1984).

APPENDIX

Solutions to the finite-difference equations were


obtained through the use of a computer program that was
developed using the Basic programming language.

The

computer program was written in Microsoft Basic and can be


executed on any IBM-PC or IBM-PC compatible.

Further, the

time required for program execution was reduced by


compiling the Basic language code into machine language
using the Microsoft QuickBasic Compiler.

The computing

time required for execution of the compiled code was


approximately one-fifth of that time required to execute
the Basic code.

A typical computing time using the

compiled version of the Basic code was approximately one


hour.

Thus, a substantial saving in computing time was

achieved by using the compiled version of the Basic code.


The computer program was developed to accomodate the
user.

The program uses an extensive system of menus, which

allows for the modification of any program variable prior


to execution without having to alter the original Basic
code.

In addition, the program can be paused during the

reservoir simulation, with the option to print the current


results, resume execution, alter variables, or to terminate
execution.

By displaying the simulation results on the

video screen as they are computed, the user of the program

119

x'^

120
may moniter the simulation and halt execution when needed.
This option allowed for a tremendous savings in the
computing time needed for generating the finite-difference
approximations for study.

The Basic code of the computer

program is shown on the following pages.

121
1000
1010
1020
1030
1040
1050
1060
1070
1080
1090
1100
1110
1120
1130
1140
1150
1160
1170
1180
1190
1200
1210
1220
1230
1240
1250
1260
1270
1280
1290
1300
1310
1320
1330
1340
1350
1360
1370
1380
1390
1400
1410
1420
1430
1440
1450
1460
1470
1480
1490

REM ***************************.,******************^^^,^*^,,.
REM * ' 1-PHASE, SLIGHTLY COMPRESSIBLE RADIAL FLUID FLOW
REM *
SIMULATION MODEL. SINGLE AND VARIABLE WELLBORE
REM *
STORAGE INCLUDED. PROGRAMMED BY WILLIAM T. HAUSS. *
REM * A MASTERS THESIS IN WELL TEST NUMERICAL SIMULATION. *
REM *********************************************************
CLS: CLEAR: KEY OFF
DEFDBL A-H, O-Z
DEF SEG = &H40
POKE &H17, PEEK(&H17) OR 64
D I M Q T ( 2 5 5 ) , BETA(255), GAMMA(255), A(255), B(255), QSFPRT(610)
D I M D ( 2 5 5 ) , R(255), RPLUS(255), DT(50), CSTERM(255), SL(610)
DIM PNEW(255), POLD(255), PWB(610), TWB(610), C(255), ZL(610)
REM
REM
*** PROGRAM DEFAULT DATA ***
QSURF=750:TSM=1.6:ITER=20:M=240:PI=3000:H=91:PHI=.2:CMP=.000007
VISC=1.2:BTAW=1.01:K=8:RWC=.5:DU=.06:N=30:DT(1)=2:A$="NO":
B$="YES"
C$="NO":D$="TRUE":DEPTH=10000:CF=.000003:DENS=62.4:TBGID=4:
T$="PDD"
CUMTIME=0: SCR0LL=11
FLAG=0: FLAG3=0: FLAG5=0
JJ=1: REM COUNTER FOR PRIMARY DATA ARRAY
PIE=4*ATN(1)
ATBG = PIE*TBGID*TBGID/576
CLOG = 2.302585094#
REM
REM
*** CALC. TIME STEP ARRAY ***
REM
LENGTH = DT(1)
FOR I = 2 TO N
DT(I) = DT(I-1)*TSM
TIME = ITER*DT(I)
LENGTH = LENGTH + TIME
NEXT I
IF FLAG3 = 1 THEN GOTO 3360
TWBS2 = LENGTH/2 :REM DEFAULT 2ND WBS BEGINS APP. 1/2 SIMUL. RUN
TWBS2XX = TWBS2:REM DUMMY STORAGE
FLAG = 0
COLOR 3:LOCATE 1,25:PRINT"PROGRAM DATA INITIALIZATION"
PRINT STRING$(80,"=");
COLOR 7
PRINT USING " A) RESERVOIR PRESSURE = #,###.## psia";PI
PRINT USING " B) RESERVOIR PERMEABILITY = ####.## md.";K
PRINT USING " C) RESERVOIR THICKNESS = ###.## ft.";H
PRINT USING " D) WELLBORE RADIUS = #.## ft.";RWC
PRINT USING " E) FLUID VISCOSITY - ##.## Cp";VISC
PRINT USING " F) FORMATION VOLUME FACTOR - #-## RB/STB";BTAW
PRINT USING " G) SYSTEM COMPRESSIBILITY = ##-##'''''"^ 1/psi";CMP
PRINT USING " H) POROSITY = #.### (fraction)";PHI
TDX = .0002637*K/(PHI*VISC*CMP*RWC*RWC)
PRINT USING " I) 1ST TIME STEP = ###.## s e e , tD = ###.##";
DT(1),TDX*DT(1)/3600

122
1500
1510
1520
1530

PRINT USING " J) NODAL SPACING MULTIPLIER = #.####";DU


PRINT USING " K) ITERATIONS PER TIME STEP = ##.##"; ITER
PRINT USING " L) TIME STEP GEOMETRIC MULTIPLIER = #.##";TSM
PRINT USING " M) NUMBER OF TIMES TO USE TIME STEP MULTIPLIER =
##-##";N
1540 TL = LENGTH/3600
1550 PRINT USING " N) END SIMULATION TIME = ,#. hrs., tD =
##.####'^'"'"'"";TL,TL*TDX
1560 PRINT USING " O) NODES USED IN COMPUTATIONS = ###";M
1570 PRINT USING " P) EXTENT OF RESERVOIR, (re) = #,###,###.## ft."
;RWC*EXP(M*DU)
1580 PRINT USING " Q) INITIAL FLOW RATE, + PRDN., - INJTN. = ####-##
STB/DAY"QSURF
1590 PRINT
1600 COLOR 4:PRINT"***"
1610 LOCATE 16, 68:PRINT"***":LOCATE 18,56rPRINT"***":COLOR 7
1620 LOCATE 21, 11:PRINT"SIGNIFIES A DEPENDENT CALCULATION, CANNOT
CHANGE DIRECTLY";
1630 COLOR 3
1640 PRINT"TYPE SELECTION LETTER TO CHANGE, RETURN TO CONTINUE, OR
ESC TO EXIT ";
1650 LOCATE 25,1:PRINT STRING$(80,"=") ;
1660 COLOR 7:LOCATE 23,5
1670 I$=INKEY$:IF 1$="" THEN GOTO 1670 ELSE IF I$="A" THEN GOTO 1710
ELSE IF I$="B" THEN GOTO 1720 ELSE IF I$="C" THEN GOTO 1730
ELSE IF I$="D" THEN GOTO 1740 ELSE IF I$=CHR$(27) THEN GOTO
1750 ELSE GOTO 1680
1680 IF I$="E" THEN GOTO 1780 ELSE IF I$="F" THEN GOTO 17 90 ELSE IF
I$="G" THEN GOTO 1800 ELSE IF I$="H" THEN GOTO 1810 ELSE IF I$=
"Q" THEN GOTO 1820 ELSE GOTO 1690
1690 IF I$="I" THEN GOTO 1830 ELSE IF I$="J" THEN GOTO 1840 ELSE IF
I$="K" THEN GOTO 1850 ELSE IF I$="L" THEN GOTO 1860 ELSE IF 1$
=CHR$(13) THEN GOTO 1950 ELSE GOTO 1700
1700 IF I$="M" THEN GOTO 1870 ELSE IF I$="0" THEN GOTO 1930 ELSE
GOTO 1670
1710 INPUT" ENTER INITIAL RESERVOIR PRESSURE";PI:GOTO 1940
1720 INPUT" ENTER RESERVOIR PERMEABILITY (md.)";K:GOTO 1940
1730 INPUT" ENTER RESERVOIR THICKNESS (ft.)";H:GOTO 1940
1740 INPUT" ENTER WELLBORE RADIUS (ft.)";RWC:GOTO 1940
1750 LOCATE 24, 25 : PRINT "ARE YOU SUREY/N";
1760 I$=INKEY$:IF 1$="" THEN GOTO 1760 ELSE IF I$ = "N" THEN GOTO
1940 ELSE IF I$="Y" THEN CLS:STOP
1770 GOTO 1760
1780 INPUT" ENTER FLUID VISCOSITY (cp)";VISC:GOTO 1940
17 90 INPUT" ENTER FORMATION VOLUME FACTOR";BTAW:GOTO 1940
1800 INPUT" ENTER SYSTEM COMPRESSIBILITY";CMP:GOTO 1940
1810 INPUT" ENTER POROSITY (fraction)";PHI:GOTO 1940
1820 INPUT" ENTER FLOW RATE. + FOR PROD., - FOR INJ." ;QSURF :GOTO 1940
1830 INPUT" ENTER FIRST TIME STEP (sec.)";DT(1):FLAG=1:GOTO 1940
1840 INPUT" ENTER NODAL SPACING MULTIPLIER";DU:GOTO 1940
1850 INPUT" ENTER ITERATIONS PER TIME STEP";ITER:FLAG=1:GOTO 1880
I860 INPUT" ENTER TIME STEP MULTIPLIER";TSM:FLAG=1:GOTO 1940
1870 INPUT" ENTER # OF TIMES TO USE TIME STEP MULTIPLIER";N:FLAG=1

123
1880
1890
1900
1910
1920
1930
1940

IF ITER*N < 600 THEN GOTO 1940


C L S : L 0 C A T E 11,20 : P R I N T " I T E R * N MUST BE < 600, YOURS IS "ITER*N
LOCATE 13,20:PRINT"STRIKE ANY KEY TO CONTINUE"
IF INKEY$="" THEN GOTO 1910
CLS:ITER=20:N=25:FLAG=0:GOTO 1370
INPUT" ENTER NODES TO USE FOR GRID (MAX=250) " ;M:GOTO 1940
LOCATE 23,1: PRINT SPC(79);:LOCATE 24,1:PRINT SPC(79);:IF FLAG=0
THEN GOTO 1370 ELSE GOTO 1270
1950 CLS
1960 LOCATE 1,25:COLOR 3
1970 PRINT"WELLBORE STORAGE DEFAULT INITIALIZATION"
1980 LOCATE 2,1:PRINT STRING$(80,"=");
1990 COLOR 7
2000 PRINT USING "A) NO WELLBORE STORAGE (\ \)";A$
2010 PRINT USING "B) ONE CONSTANT WELLBORE STORAGE (\ \)";B$
2020 PRINT USING "C) CHANGING WELLBORE STORAGE (\ \)";C$
2030 PRINT USING "D) TIME TO BEGIN 2ND WELLBORE STORAGE = ##,###.###
hrs. tD = ##.####'^'^'"'^;TWBS2/3600,TWBS2*TDX/3600
2040 PRINT USING "E) DEPTH OF WELL = ##,###.## ft.";DEPTH
2050 AWB = PIE*RWC*RWC
2060 PRINT USING "F) X-SECTIONAL AREA OF TUBING = #.#### sqft.";ATBG
2070 VTBG = ATBG*DEPTH/5.6146
2080 PRINT USING "G) VOLUME OF TUBING = ##,###.## bbl";VTBG
2090 PRINT USING "H) COMPRESSIBILITY OF WELLBORE FLUID = #.##'^^'^'^
l/psi";CF
2100 PRINT USING "I) DENSITY OF WELLBORE FLUID = ##.### Ib./cuft.";
DENS
2110 PRINT USING "J) Csl = COMPRESSION, Cs2 = CHG. LIQ. LELEL
TRUE/OPP. = (\ \)";D$
2120 IF D$ = "TRUE" THEN GOTO 2160
2130 CSl = ATBG*25.64741923#/DENS
2140 CS2 = VTBG*CF
2150 GOTO 2180
2160 CSl = VTBG*CF
2170 CS2 = ATBG*25.64741923#/DENS
2180 PRINT USING "K) Csl = ##-#### bbl/psi";CS1
2190 CSDl = .8937966101#*CS1/(PHI*CMP*H*RWC*RWC)
2200 PRINT USING "L) CsDl = ##,###,###.##";CSD1
2210 PRINT USING "M) Cs2 = ##.####",CS2
2220 CSD2 = CSD1*CS2/CS1
2230 PRINT USING "N) CsD2 >= ##,###,###.##";CSD2
2240 PRINT "FORCE A SPECIFIED CSD"
2250 PRINT "P) RETURN TO MAIN PROGRAM MENU"
2260 COLOR 4
2270 PRINT
2280 LOCATE 8, 67:PRINT"***":LOCATE 9,39:PRINT"***"rLOCATE 13,28:
PRINT"***":LOCATE 14,27:PRINT"***":LOCATE 15,28:PRINT"* * *"
:LOCATE 16,27:PRINT"***"
2300 COLOR 7
2310 LOCATE 20,10:PRINT"CsDl WILL BE USED IF ONLY 1 WELLBORE STORAGE
IS CHOSEN"
2320 LOCATE 21,10:COLOR 4:PRINT"***":COLOR 7

124
2330 LOCATE 21,15:PRINT"SIGNIFIES A DEPENDENT C A L C , CANNOT CHANGE
DIRECTLY"
2340 COLOR 3:L0CATE 25,1:PRINT STRING$(80,"=") ;
2350 LOCATE 22, 8:PRINT"TYPE SELECTION LETTER TO CHANGE OR RETURN TO
EXECUTE FORMAT.":COLOR 7
2360 I$=INKEY$: IF 1$="" THEN GOTO 2360 ELSE IF I$=CHR$(13) THEN GOTO
2630 ELSE IF I$="A" THEN GOTO 2390 ELSE IF I$="B" THEN GOTO
2400 ELSE IF I$="C" THEN GOTO 2410 ELSE IF I$="D" THEN GOTO 2420
ELSE GOTO 2370
2370 IF I$="E" THEN GOTO 2500 ELSE IF I$="H" THEN GOTO 2510 ELSE IF
I$="I" THEN GOTO 2560 ELSE IF I$="J" THEN GOTO 2570 ELSE IF
I$="P" THEN GOTO 2380 ELSE IF I$=CHR$(27) THEN GOTO 2380 ELSE
IF I$="0" THEN GOTO 2520 ELSE GOTO 2360
2380 CLS:GOTO 1370
2390 A$="YES":B$="NO":C$="NO":GOTO 1960
2400 B$="YES":A$="NO":C$="NO":GOTO 1960
2410 C$="YES":A$="NO":B$="NO":GOTO 1960
2420 INPUT"ENTER APPROXIMATE TIME TO BEGIN 2ND WELLBORE STORAGE.
hrs.";TWBS2:TWBS2=TWBS2*3600
2430 IF TWBS2 < LENGTH THEN TWBS2XX=TWBS2: GOTO 2580
2440 CLS:COLOR 2:L0CATE 11,6:PRINT"TIME TO BEGIN 2ND WELLBORE STORAGE
MUST BE < SIMULATION RUN TIME"
2450 LOCATE 13,21:PRINT USING "SIMULATION RUN TIME = ####.## hrs.":TL
2460 LOCATE 15,23:PRINT USING "YOU HAVE CHOSEN #####.##
hrs.";TWBS2/3600
2470 LOCATE 17,25: PRINT "STRIKE ANY KEY TO CONTINUE"
2480 PRINT CHR$(7):LOCATE 18,2: IF INKEY$="" THEN GOTO 2480
2490 TWBS2 = TWBS2XX: GOTO 1950
2500 INPUT"ENTER NEW DEPTH OF WELL, ft.";DEPTH:GOTO 2580
2510 INPUT"ENTER WELLBORE FLUID COMPRESSIBILITY 1/psi";CF:GOTO 2580
2520 INPUT"ENTER DESIRED CSDl, NOTE THAT WELLBORE DENSITY WILL BE
AFFECTED";FICSD
2530 DENS = 22.92357637#*ATBG/(F1CSD*PHI*CMP*H*RWC*RWC)
2540 LOCATE 23,1:PRINT SPC(77);:LOCATE 23,1:INPUT"ENTER DESIRED
CSD2, NOTE THAT FLUID COMP. WILL BE AFFECTED" ;F2CSD
2550 CF = F2CSD*PHI*CMP*H*RWC*RWC/(.8937966101#*VTBG) :GOTO 2580
2560 INPUT"ENTER WELLBORE FLUID DENSITY. Ib/cuft.";DENS: GOTO 2580
2570 IF D$="TRUE" THEN D$="OPP." ELSE IF D$="OPP." THEN D$="TRUE":
GOTO 2580
2580 LOCATE 23,1:PRINT SPC(77);:GOTO 1960
2590 REM
************************************************
2600 REM *
DATA INITIALIZATION AND SIMULATION
*
2 610 REM *
FORMAT IS OVER AT THIS POINT
*
2 620 REM
************************************************
2630 CLS:LOCATE 1,1
2640 COLOR 3
2650 PRINT STRING$(80,"=");
2660 IF T$-"PDD" THEN PRINT TAB(2 9)"CONSTANT RATE DRAWDOWN"
2670 IF T$="PBU" THEN PRINT TAB(29)"PRESSURE BUILD-UP TEST"
2 680 COLOR 7
2690 PRINT USING" INITIAL PRESSURE = ####.### psia QSURF = ####.##
STB/day";PI, QSURF

w^

I
125

2700 IF A$="YES" THEN PRINT TAB(15)"N0 WELLBORE STORAGE, Qsurf =


Qsand "AT ALL TIMES";
2710 IF B$="YES" THEN PRINT USING" SINGLE WELLBORE STORAGE, CS =
##.###'^-'^- bbl/psi";CSl
2720 IF C$="YES" THEN PRINT USING"CHANGING WELLBORE STORAGE, CSl ##.##'^'^'^- bbl/psi, CS2 = ##.##'^'^-- bbl/psi";CSl,CS2;
2730 IF C$="YES" THEN PRINT USING"WBS CHANGE BEGINS AT THE TIME STEP
PRIOR TO ###.### hrs.";TWBS2/3600
2740 IF A$="YES" THEN PRINT
2750 PRINT
2760 PRINT USING"EXPECTED SEMILOG SLOPE IS #####.###
psi/cycle";-162.6*QSURF*BTAW*VISC/(K*H)
2770 COLOR 3
2780 PRINT STRING$(80,"=");
27 90 COLOR 7
2800 PRINT" TIME SANDFACE PRESSURE SL SLOPE LL SLOPE Qsand"
2810 PRINT" (hrs.)
(psia)
(psi/cyc) (cyc/cyc)(STB/day)";
2820 COLOR 3
2830 PRINT STRING$(80,"=") ;
2840 LOCATE 24,1:PRINT STRING$(80, " = ") ;
2850 LOCATE 25,20:PRINT"STRIKE SPACEBAR TO PAUSE/PRINT OR ESC TO
QUIT";
2860 LOCATE 25,1:PRINT"TS LEFT=";
2870 COLOR 7
2880 REM
2890 REM ******
CONVERTING UNITS
*****
2900 PI "= PI/14.7
2910 CMP = CMP*14.7
2920 RWC - RWC*30.48
2930 K = K/1000
2940 H - H*30.48
2950 QSURF = QSURF*1.84
2960 CSl - CS1*2337120.173
2970 CS2 = CS2*2337120.173
2980 COUNT = N*ITER-1
2990 PICHECK = PI-.00001
3000 REM
3010 IF A$-"YES" THEN CCSS=0 ELSE CCSS^CSl
3020 LOCATE 25,11:PRINT USING"###";C0UNT+1
3030 REM ***** INITIALIZING PRESSURE ARRAYS *****
3040 FOR I = 1 TO M
3050 PNEW(I) - PI
3060 POLD(I) = PI
3070 NEXT I
3080 REM
3090 REM ***** DEFINING LOGARITHMIC SPACED GRID POINTS *****
3100
3110
3120
3130
3140
3150
3160

J = 0
FOR I = 0 TO M
R(I) = RWC*EXP(J)
J = J + DU
NEXT I
REM
RW = R(0)

126
3170 REM
3180
3190
3200
3210

REM *^*** DEFINING GRID BOUNDARIES *****


FOR I = 0 TO M-1
RPLUS(I) = (R(I+1)-R(I))/(L0G((R(I+1)/R(I))))
NEXT I

3220
3230
3240
3250
3260
3270
3280
3290
3300
3310
3320
3330
3340
3350
3360
3370
3380
3390
3400
3410
3420
3430
3440
3450
34 60
3470

RPLUS(M) = RWC*EXP(M*DU) + RWC*EXP(M*DU)-RPLUS(M-1)


REM
REM ***** DEFINING A AND C COEFFICIENTS *****
ALPHA = 1/(DU*DU)
FOR I = 1 TO M-1
A(I+1) = ALPHA
C(I) = ALPHA
NEXT I
REM
***** DEFINING COEFFICIENTS BASED ON Q *****
RIPOINT = (R(1)+RPLUS(0))/2
QT = R1P0INT*VISC*BTAW/(2*PIE*K*H*(RPLUS(1)-RPLUS(0) ) )
QT(1) = QT*QSURF
CTERMC = PHI*VISC*CMP/(2*K)
FOR KK = 1 TO N
DT = DT(KK)
CSTERM(l) = QT*CCSS/(DT*BTAW)
FOR NTS = 1 TO ITER
IF C$="NO" OR FLAG3=1 THEN GOTO 3460
IF CUMTIME < TWBS2 + DT THEN GOTO 3460
FLAG3 = 1
cess - CS2
TCHG = CUMTIME
DT(1) = DT/3:GOTO 1270
FOR I = 1 TO M
I$-INKEY$: IF I$CHR$(27) THEN GOTO 4010 ELSE IF I$-CHR$(32)
THEN GOTO 4040
CTERM - CTERMC*R(I)*(RPLUS(I)+RPLUS(I-l))/DT
B(I) = -C(I)-A(I)-CTERM-CSTERM(I)
D(I) = QT(I) - (CTERM + CSTERM (I) ) *POLD (I)
NEXT I
BETA(l) = B(l)
GAMMA(l) = D(1)/BETA(1)
FOR I = 2 TO M
BETA(I) = B(I)-A(I)*C(I-1)/BETA(I-1)
GAMMA(I) = (D(I)-A(I)*GAMMA(I-1))/BETA(I)
NEXT I
PNEW(M) = GAMMA(M)
IF PNEW(M) > PICHECK THEN GOTO 3660
CLS:COLOR 2:L0CATE 11,16
PRINT"A BOUNDARY HAS BEEN REACHED, PROGRAM TERMINATED"
LOCATE 13,15:PRINT"RETURN TO PRINT 'GOOD' DATA OR ESC TO BEGIN
AGAIN"
LOCATE 14,30:I$=INKEY$:IF 1$="" THEN GOTO 3630 ELSE IF
I$=CHR$(13) THEN GOTO 4170 ELSE IF I$=CHR$(27) THEN GOTO 3950
ELSE GOTO 3630
REM
REM ***** BACK SUBST. FOR NEW PRESSURES *****

3480
3490
3500
3510
3520
3530
3540
3550
3560
3570
3580
3590
3600
3610
3620
3630

3640
3650

.ij^gKa-

127
3660
3670
3680
3690
3700
3710
3720
3730
3740
3750
3760

FOR I = 2 TO M
L = M-I+1
PNEW(L)
NEXT I

= GAMMA(L)-C(L)*PNEW(L+1)/BETA(L)

CUMTIME = CUMTIME+DT
PWB(JJ) = P N E W ( 1 ) * 1 4 , 7
TWB(JJ) = CUMTIME/3600
QSFPRT(JJ) = (QSURF+CCSS*(PNEW(1)-P0LD(1))/(BTAW*DT))/1
I F J J = 1 THEN GOTO 37 90

84

SL(JJ) = CLOG*(PWB(JJ)-PWB(JJ-l))/((LOG(TWB(JJ)/TWB(JJ-l))))
ZL(JJ) = LOG((PI*14.7-PWB(JJ))/(Pi*l4.7-PWB(JJ-l)))/(LOG(TWB
(JJ)/TWB(JJ-1)))
3770 I F SCROLL < 2 4 THEN GOTO 3 7 9 0
3780 FOR Y = 1 1 TO 23:LOCATE Y , 1 : P R I N T SPACE$(80);:NEXT Y:SCR0LL=11
3790 LOCATE SCROLL,1
3800 PRINT USING"##.##
####.#### ####.##### #.####
###.####";TWB(JJ),PWB(JJ),SL(JJ),ZL(JJ),QSFPRT(JJ);
3810 LOCATE 25,11:PRINT USING"###";COUNT;
3820 SCROLL = SCROLL+1
3830 FOR J = 1 TO M
3840 POLD(J) = PNEW(J)
3850 NEXT J
3860 IF JJ = 6 0 0 THEN GOTO 4 0 8 0
3870 JJ = JJ + 1
3880 COUNT = COUNT+1
3890 NEXT NTS
3900 NEXT KK
3910 GOTO 4 1 7 0
3920 GOTO 1 0 6 0 REM ***** END OF SIMULATION RUN *****
3930 REM
3940 REM * * * * * ROUTINE TO PARTIALLY REINITIALIZE DATA * * * * *
3950 P I = P I * 1 4 . 7
K = K * 1 0 0 0 : H = H / 3 0 . 4 8 : RWC=RWC/30.48: J J = 1 : LL=0:
TCHG=0
3960 CMP=CMP/14.7: QSURF=QSURF/1.84: FLAG5=0: CUMTIME=0: SCR0LL=11
SL=0
3970 I F FLAG3=0 THEN CLS: GOTO 1 3 6 0
3980 FLAG3=0: N = 3 0 : I T E R = 2 0 : D T ( 1 ) = 2 ; CLS: GOTO 1 2 7 0
3990 REM
4000 REM * * * * *
ARE YOU SURE ROUTINE
*****
4010 COLOR 3 : LOCATE 2 5 , 2 0 : PRINT"ARE YOU SURE Y / N " ;
4020 1$ = INKEY$: I F 1 $ = " " THEN GOTO 4 0 2 0 ELSE I F I$="Y' THEN GOTO
3 9 5 0 ELSE I F I $ " N " THEN LOCATE 2 5 , 2 0 :PRINT"STRIKE SPACEBAR TO
PAUSE OR ESC TO QUIT";:COLOR 7 : G 0 T 0 3 4 8 0
PAUSE ROUTINE
*****
4030 REM * * * * *
4040 COLOR 3:LOCATE 2 5 , 2 0 : P R I N T " S T R I K E P TO PRINT OR SPACEBAR TO
RESUME";
4050 1$ = INKEY$: I F 1 $ = " " THEN GOTO 4 0 5 0 ELSE I F I $ = " P " THEN GOTO
4 1 7 0 ELSE LOCATE 2 5 , 2 0 : P R I N T " S T R I K E SPACEBAR TO PAUSE/PRINT OR
ESC TO QUIT";:COLOR 7
4 0 6 0 GOTO 3 4 8 0
4 0 7 0 REM
***** PRINT ROUTINE
*****
4 0 8 0 CLS: LOCATE 1 2 , 5 : INPUT"ENTER FILE PATH AND FILE NAME TO SAVE P-T
DATA, OR RETURN TO S K I P " ; P $

128
4090
4100
4110
4120
4130
4140
4150
4160
4170
4180
4190
4200
4210
4220
4230
4240

IF P$ = '.<" THEN GOTO 4170


OPEN P$ FOR OUTPUT AS 1
FOR I = 1 TO JJ-1
WRITE #1,TWB(I),PWB(I)
NEXT I
CLOSE 1
LOCATE 14, 5:PRINT"STRIKE ANY KEY TO PRINT REPORT"
I$=INKEY$: IF 1$="" THEN GOTO 4160
COLOR 7: LPRINT CHR$(15): WIDTH "LPT1:",137: LPRINT CHR$(27)"G"
CLS:LOCATE 11,20: PRINT"PRINTING, STRIKE ESC TO CANCEL"
LPRINT CHR$(27)"1"CHR$(0)
LPRINT CHR$(27)"Q"CHR$(137)
LPRINT TAB (47) "RESERVOIR AND WELLBORE SIMULATION DATA INPUT"
LPRINT TAB(12);rLPRINT STRING$(112, "=")
IF A$="YES" THEN LPRINT TAB(54);:LPRINT"NO WELLBORE STORAGE"
IF B$="YES" THEN LPRINT TAB(46);:LPRINT USING"SINGLE WELLBORE
STORAGE = ###.###### bbl/psi";CSl/2337120.173#
4250 IF B$="YES" THEN LPRINT TAB(46);:LPRINT USING"CSD "
##.#####"
";.1592277277#*CS1/(PHI*CMP*H*RWC*RWC)
4260 ID C$="YES" THEN LPRINT TAB(50);:LPRINT USING"CHANGING WELLBORE
STORAGE, CSl = ###.##### bbl/psi, CS2 = #.*#
bbl/psi";CS1/2337120.173#,CS2/2337120.173#
4270 IF C$="YES" THEN LPRINT TAB(50);:LPRINT USING"CSD1 =
##.#####"'^"'^ CSD2 = ##.#####'^-'^'^;:.1592277277#*CSl/(PHI*CMP*H*
RWC*RWC),.1592277277#*CS2/(PHI*CMP*H*RWC*RWC)
4280 IF C$="YES" THEN LPRINT TAB(50);:LPRINT USING"WELLBORE STORAGE
CHANGES AT #,###,###.## hrs.";TCHG/3600
4290 LPRINT TAB(12);:LPRINT STRING$(112,"=");:LPRINT CHR$(27)"H"
4300 LPRINT TAB(50);:LPRINT USING"PERMEABILITY = ####.## md";K*1000
4310 LPRINT TAB(50);:LPRINT USING"POROSITY = ##-## percent";PHI*100
4320 LPRINT TAB(50);:LPRINT USING"INITIAL PRESSURE - #*#.#*
psia";14.7*PI
4330 LPRINT TAB(50);:LPRINT USING"H = #*.## ft.";H/30.48
4340 LPRINT TAB (50) ;: LPRINT USING"Ct = ##.##^"'"'' l/psi";CMP/14 .7
4350 LPRINT TAB (50) ; rLPRINT USING"VISCOSITY = ###-### cp.'';VISC
4360 LPRINT TAB(50);:LPRINT USING"FORMATION VOLUME FACTOR = #-###
RB/STB";BTAW
4370 LPRINT TAB(50);rLPRINT USING"WELLBORE RADIUS = #.####
ft.";RW/30.48
4380 LPRINT TAB(50);rLPRINT USING"LENGTH OF FLOW PERIOD = **#.##*
hrs.";CUMTIME/3600
4390 LPRINT TAB(50);:LPRINT USING"PRODUCTION RATE = ###.##
STB/DAY";QSURF/1.8 4
4400 LPRINT TAB(50);:LPRINT USING"FLUID PRODUCED = #####-###
STB";QSURF*CUMTIME/158976
^***.* .*
4410 LPRINT TAB(50);:LPRINT USING"RADIUS OF INVESTIGATION = ######.##
ft.";SQR(K*CUMTIME/(2302.58094#*PHI*VISC*CMP)
4420 LPRINT TAB(50);:LPRINT USING"EXPECTED SEMILOG SLOPE = ####.#####
psi/cyc";-2.69350435#*QSURF*BTAW*VISC/(K*H)
4430 LPRINT CHRS (27) "G";: LPRINT STRING$ (133, " = " ) ; rLPRINT CHR$(27)"H"
4440 G$ = "##.####
####-#### ##.####
##.####

''^""^SBV-

129
4450 LPRINT'^ TIME
SL SLOPE

PRESSURE
tD
LL SLOPE
Qsand";

pD

4460 LPRINT" (hrs.)


(psia)
(psi/cyc)
(cyc/cyc)
STB/D";
4470 LPRINT CHR$(27)"G";:LPRINT STRING$(133,"=");:LPRINT CHR$(27)"H"
4480 FOR I = 1 TO JJ-1
4490 LPRINT USING G$;TWB(I),PWB(I),3601.284152#*K*TWB(I)/(PHI*VISC*
CMP*RW*RW),6.28280315#*K*H* (PI-PWB(I)/14.7)/(QSURF*BTAW*VISC) ,
SL(I),ZL(I),QSFPRT(I)
4500 NEXT I
4510 LPRINT CHR$(27)"G";:LPRINT STRING$(133,"=")
4520 LPRINT
4530 LPRINT STRING$(62,"=");:LPRINT CHR$(27)"H"
4540 LPRINT USING"RADIAL PRESSURE DISTRIBUTION AFTER *#.###
hrs.";CUMTIME/3600
4550 LPRINT "NODE
RADIUS, ft. PRESSURE,psia"
4560 F$="
###
#####.###
####-######"
4570 LPRINT CHR$(27)"G";:LPRINT STRING$(78,"=");:LPRINT CHR$(27)"H"
4580 FOR I = 1 TO M
4590 LPRINT USING F$;I,R (I)/30.48,PNEW(I)*14.7
4 600 NEXT I
4610 LPRINT CHR$(27)"G";:LPRINT STRINGS(78,"=");:LPRINT CHR$(27)"H"
4620 LPRINT:LPRINT:LPRINT
4630 GOTO 1060

PERMISSION TO COPY

In presenting this thesis in partial fulfillment of the


requirements for a master's degree at Texas Tech University. I agree
that the Library and my major department shall make it freely available for research purposes.

Permission to copy this thesis for

scholarly purposes may be granted by the Director of the Library or


my major professor.

It is understood that any copying or publication

of this thesis for financial gain shall not be allowed without my


further written permission and that any user may be liable for copyright infringement.

Disagree (Permission not granted)

Agree (Permission granted)

Student's signature

Student's signature

Date

D a t e ^ ^

. V

You might also like