You are on page 1of 191

INFORMATION TO USERS

This manuscript has been reproduced from the microfilm master. UMI films the
text directly from the original or copy submitted. Thus, some thesis and
dissertation copies are in typewriter face, while others may be from any type of
computer printer.

The quality of this reproduction is dependent upon the quality of th e copy


submitted. Broken or indistinct print, colored or poor quality illustrations and
photographs, print bleedthrough, substandard margins, and improper alignment
can adversely affect reproduction.

In the unlikely event that the author did not send UMI a complete manuscript and
there are missing pages, these will be noted. Also, if unauthorized copyright
material had to be removed, a note will indicate the deletion.

Oversize materials (e.g., maps, drawings, charts) are reproduced by sectioning


the original, beginning at the upper left-hand comer and continuing from left to
right in equal sections with small overlaps.

Photographs included in the original manuscript have been reproduced


xerographically in this copy. Higher quality 6" x 9* black and white photographic
prints are available for any photographs or illustrations appearing in this copy for
an additional charge. Contact UMI directly to order.

Bell & Howell Information and Learning


300 North Zeeb Road, Ann Arbor, Ml 48106-1346 USA

UMI* 800-521-0600

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
EXPERIMENTAL AND ANALYTICAL STUDIES OF CYCLIC

STEAM INJECTION USING HORIZONTAL WELLS

A Dissertation

by

BAMBANG GUNADI

Submitted to the Office o f Graduate Studies o f


Texas A&M University
in partial fulfillment o f the requirements for the degree o f

DOCTOR OF PHILOSOPHY

December 1999

Major Subject: Petroleum Engineering

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
UMI Number 9957438

___ ®

UMI
UMI Microform9957438
Copyright 2000 by Bell & Howell Information and Learning Company.
All rights reserved. This microform edition is protected against
unauthorized copying under Title 17, United States Code.

Bell & Howell Information and Learning Company


300 North Zeeb Road
P.O. Box 1346
Ann Arbor, Ml 48106-1346

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
EXPERIMENTAL AND ANALYTICAL STUDIES OF CYCLIC
STEAM INJECTION USING HORIZONTAL WELLS

A Dissertation

by

BAMBANG GUN ADI

Submitted to Texas A&M University


in partial fulfillment o f the requirements
for the degree o f

DOCTOR OF PHILOSOPHY

Approved as to style and content by:

Daulat D. Mamora ng H.
^hine E Wu
(Chair o f Committee) (Member)

A Un f D c
v
(A
Akhil Datta-Gupta Robert R. Berg
(Member) (Member)

Charles H. Bowman
(Head o f Department)

December 1999

Major Subject: Petroleum Engineering

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
ABSTRACT

Experimental and Analytical Studies o f Cyclic Steam Injection Using Horizontal Wells.

(December 1999)

Bambang Gunadi, B.S., Bandung Institute o f Technology, Indonesia;

M.S., Bandung Institute o f Technology, Indonesia

Chair o f Advisory Committee: Dr. Daulat D. Mamora

A mathematical model has been developed that satisfactorily describes the results
o f laboratory scaled-model experiments o f cyclic steam injection using horizontal wells.
The physical model consists o f an insulated aluminum parallelepiped containing a
mixture o f sand, water, and oil. The 1:396 scaled-model has internal dimensions o f 10 in.
in length and breadth and 5 in. in height, representing half o f an actual 5-acre reservoir
drainage area measuring 330 ft. in length and breath and 165 ft. in thickness and
containing 1.85 MMSTB oil. Steam injection rates and reservoir pressure for the model
are properly scaled to represent field values o f 3,500 cold water equivalent barrels per
day per well and 1,000 psia respectively. An experimental run consists o f up to six
cycles, each cycle representing (in the field) an injection period o f up to 632 days, up to a
shut in period o f 178 days, and up to 2604 days production period. Runs are made with
the horizontal well placed on one side o f the model in two vertical positions, namely, at
mid reservoir height and at reservoir base.
The analytical model consists o f dividing the horizontal wellbore section into
discrete intervals based on time-step specified. Heat and material balances are performed
for each interval, from which advancements o f the steam zone in the reservoir and in the
wellbore are determined. Results o f temperature, pressure, and produced oil and water
volumes based on the analytical model are in good agreement with the experimental data.
Main research findings are that (i) steam reaches the horizontal well toe if the
injection rate and injection time exceed certain minimum values, depending on the

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
reservoir properties and well configuration, and (ii) the steam zone is not cylindrical but
somewhat conical in shape, the steam zone radius being largest at the heel o f the well.
These research findings and the analytical model are expected to be o f significant value
to industry. It is recommended to conduct further research in which tubing, larger than
1/8 in. utilized in this study, is used as the horizontal well to better simulate steam
displacement o f the wellbore contents.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
DEDICATION

This dissertation is dedicated to:

my wife, Nunung Sumiarsih

my children, Tcmti M ulianti Gunadi


Dwi Shanti Aprilliani Gunadi
Trianto Adiputro Gunadi

and

my late father, Achmadi and my m other Suparni,


and
my father in law, Soelaeman Prawirasapoetra and my mother
law, Zainab, fo r their support Jove, and prayer.

and
my sister, Sri Pergiwati and my brother in law, Yaya Sunarya
and Budiman P. fo r their support and help.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
ACKNOWLEDGEMENTS

I wish to express my deepest gratitude to my research advisor, and mahaguru, Dr.


Daulat D. Mamora as the chair o f my Ph.D. committee for his advice, support,
guidance, friendship, and encouragement during my research and education at Texas
A&M University.

I also wish to thank my Ph.D. committee members, Dr. Ching H. Wu, Dr. Akhil Datta-
Gupta, and Dr. Robert R. Berg for their helpful suggestions, useful advice and
discussions during this research. I also wish to thank to Dr. Michael D. Manson for
serving as my Graduate Council Representative.

I would like to thank the professors and staff o f the Harold Vance Department o f
Petroleum Engineering at Texas A&M University, especially Frank Platt, for all their
support.

I would like to thank Taufan Marhaendrajana, Syamsu Alam, for all their support and
help during my stu d y , and also Gunawan Sutadiwiria for the helpful discussions.

Last, I would like to thank Pertamina, the national oil company o f Indonesia, for giving
me the chance and support to pursue my Ph. D. program at Texas A&M University.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
vii

TABLE OF CONTENTS

Page
ABSTRACT ............................................................................................................ iii
DEDICATION...................................................................................................... v
ACKNOWLEDGEMENTS................................................................................. vi
TABLE OF CON TEN TS........................................................................................ vii
LIST OF T A B L E S ............................................................................................... ix
LIST OF FIG U R E S............................................................................................. x
CHAPTER I INTRODUCTION.......................................................................... 1

1.1 Background.................................................................................. I
1.2 Research O bjectives.................................................................... 3
1.3 Organization o f Dissertation...................................................... 3

CHAPTER H LITERATURE R EV IEW ........................................................... 4

2.1 Cyclic Steam Injection............................................................... 4


2.2 Steam Injection Using Horizontal W ells................................. 7
2.3 Cyclic Steam Injection Using Horizontal W ells..................... 7

CHAPTER III EXPERIMENTAL APPARATUS AND PROCEDURE ........ 9

3.1 Physical Model Scaling.............................................................. 9


3.2 Experimental A pparatus............................................................. 12
3.2.1 Steam generator................................................................ 12
3.2.2 Steam quality measuring device.................................... 13
3.2.3 Scaled m o d el.................................................................... 14
3.2.4 X-Ray CT scanner........................................................... 16
3.2.5 Data logger / recording system ...................................... 17
3.2.6 Condensation and liquid measurement system 17
3.3. Experimental Procedure............................................................. 17

CHAPTER IV EXPERIMENTAL RESULTS .................................................. 19

4.1 Horizontal Well at Mid-Reservoir H eight................................ 19


4.2 Horizontal Well at Reservoir B a se ............................................ 30
4.3 Vertical W ell................................................................................ 40
4.4 Scanning R esults......................................................................... 47

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
viii

Page

CHAPTER V NEW CYCLIC STEAM INJECTION M ODEL...................... 49

5.1 Sub-Model for Injection Period in Horizontal W ells 50


5.1.1 Material balance............................................................. 50
5.1.2 Darcy’s la w ..................................................................... 51
5.1.3 Heat balance 1 ................................................................ 51
5.1.4 Heat balance 2 ................................................................ 51
5.2 Sub-Model for Soaking and Production Periods..................... 58
5.2.1 Soaking p erio d ................................................................ 59
5.2.2 Production period........................................................... 59
5.3 Verification o f Cyclic Steam Injection M odel......................... 63
5.3.1 Horizontal well cyclic steam injection m odel 63
5.3.1.1 Horizontal well at mid-reservoir height 63
5.3.1.2 Horizontal well at reservoir base..................... 72
5.3.2 Vertical well m odel....................................................... 81

CHAPTER VI SUMMARY, CONCLUSIONS AND


RECOMMENDATIONS ........................................................... 90

6.1 Summary ............................................................................ 90


6.2 Conclusions........................................................................ 90
6.3 Recommendations.............................................................. 91

NOMENCLATURE............................................................................................... 92
REFERENCES........................................................................................................ 95
APPENDIX A BOBERG AND LANTZ M ETHOD..................................... 97
APPENDIX B HONARPOUR CORRELATIONS....................................... 100
APPENDIX C COMPUTER PROGRAM S................................................... 101
V IT A ........................................................................................................................ 175

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
ix

LIST OF TABLES

TABLE Page

3.1 LIST OF EQUIPMENT U S E D ...................................................................... 14


4 .1 EXPERIMENTAL RESULTS FOR RUN WITH HORIZONTAL
WELL AT MID-RESERVOIR H EIG H T.................................................... 30
4.2 EXPERIMENTAL RESULTS FOR RUN WITH HORIZONTAL
WELL AT RESERVOIR B A S E ................................................................... 40
4.3 EXPERIMENTAL RESULTS FOR RUN WITH VERTICAL WELL .. 47

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
X

LIST OF FIGURES

FIGURE Page

1.1 Schematic o f cyclic steam injection ................................................................ 2


3.1 Schematic diagram o f cyclic steam injection apparatus................................... 13
3.2 Schematic diagram o f scaled m o d el.................................................................. 16
4 .1 Horizontal well at mid-reservoir height, locations o f thermocouples and
planes parallel to horizontal w e ll..................................................................... 20
4.2 Horizontal well at mid-reservoir height, locations o f thermocouples and
planes perpendicular to horizontal w e ll.......................................................... 20
4.3 Pressure and temperature data for horizontal well at mid-reservoir height. 21
4.4 Temperature data at right plane for run with horizontal well at mid-
reservoir height .................................................................................................. 22
4.5 Temperature data at parallel mid plane for run with horizontal well at
mid-reservoir height .......................................................................................... 23
4.6 Temperature data at left plane for run with horizontal well at mid-
reservoir heig h t................................................................................................... 24
4.7 Temperature data at front plane for nm with horizontal well at mid­
reservoir h eig h t.................................................................................................... 25
4.8 Temperature data at perpendicular mid plane for run with horizontal well
at mid-reservoir h eight....................................................................................... 26
4.9 Temperature data at rear plane for run with horizontal well at mid-
reservoir h eig h t................................................................................................... 27
4.10 Cumulative oil and water production for horizontal well at mid-reservoir
h e ig h t.................................................................................................................... 28
4.11 Horizontal well at reservoir base, location o f thermocouples and planes
parallel to horizontal w e ll.................................................................................. 31
4.12 Horizontal well at reservoir base, location o f thermocouples and planes
perpendicular to horizontal w e ll....................................................................... 31

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
xi

FIGURE Page

4.13 Pressure and temperature data for run with horizontal well at reservoir
b a s e .......................................................................................................................... 32
4.14 Temperature data at right plane for run with horizontal well at reservoir
b a s e .......................................................................................................................... 33
4.15 Temperature data at parallel-mid plane for run with horizontal well at
reservoir b a s e ......................................................................................................... 34
4.16 Temperature data at left plane for run with horizontal well at reservoir
b a s e .......................................................................................................................... 35
4.17 Temperature data at front plane for run with horizontal well at reservoir
b a s e .......................................................................................................................... 36
4.18 Temperature data at perpendicular-mid plane for run with horizontal well
at reservoir b a se ..................................................................................................... 37
4.19 Temperature data at rear plane for run with horizontal well at reservoir
b a s e .......................................................................................................................... 38
4.20 Cumulative oil and water production for run with horizontal well at
reservoir b a se ......................................................................................................... 39
4.21 Vertical well, location o f thermocouples and planes........................................ 41
4.22 Pressure and temperature data for run with vertical w e ll................................. 42
4.23 Temperature data at top plane for run with vertical w e ll................................. 43
4.24 Temperature data at middle plane for run with vertical w e ll.......................... 44
4.25 Temperature data at base plane for run with vertical w e ll............................... 45
4.26 Cumulative oil and water production for run with vertical w e ll..................... 46
4.27 Edge effect in CT scan results............................................................................. 48
5.1 Steam zone at the end o f first time s te p ............................................................. 54
5.2 Steam zone at the end o f second time s te p ........................................................ 58
5.3 Steam zone profile at the end o f injection......................................................... 58
5.4 Steam zone approximated as a cylinder............................................................. 60

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
xii

FIGURE Page

5.5 Model steam zone profile for horizontal well at mid-reservoir h e ig h t 64


5.6 Cumulative oil production: model results and data for horizontal well at
mid-reservoir height............................................................................................. 65
5.7 Cumulative water production: model results and data for horizontal well
at mid-reservoir height..................................................................................... 66
5.8 Average temperatures: model results and mid-well data for horizontal
well at mid-reservoir height............................................................................. 67
5.9 Calculated oil production rate for horizontal well at mid-reservoir height.. 68
5.10 Calculated water production rate for horizontal well at mid-reservoir
h e ig h t.................................................................................................................. 69
5.11 Calculated field equivalent oil production rate for horizontal well at mid­
reservoir height.................................................................................................. 70
5.12 Calculated field equivalent water production rate for horizontal well at
mid-reservoir height......................................................................................... 71
5.13 Model steam zone profile for horizontal well at reservoir base................... 73
5.14 Cumulative oil production: model results and data for horizontal well at
reservoir b a se ..................................................................................................... 74
5.15 Cumulative water production: model results and data for horizontal well
at reservoir b a se ................................................................................................. 75
5.16 Average temperatures: model results and mid-well data for horizontal
well at reservoir ba se........................................................................................ 76
5.17 Calculated oil production rate for horizontal well at reservoir b a s e 77
5.18 Calculated water production rate for horizontal well at reservoir b a se 78
5.19 Calculated field equivalent oil production rate for horizontal well at
reservoir b a se ..................................................................................................... 79
5.20 Calculated field equivalent water production rate for horizontal well at
reservoir b a se ..................................................................................................... 80

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
xiii

FIGURE Page

5.21 Model steam zone profile for vertical w e ll........................................................ 82


5.22 Cumulative oil production: model results and data for vertical w e ll 83
5.23 Cumulative water production: model results and data for vertical w e ll 84
5.24 Average temperatures: model results and mid-well data for vertical w e ll... 85
5.25 Calculated oil production rate for vertical w e ll................................................. 86
5.26 Calculated water production rate for vertical w ell............................................ 87
5.27 Calculated field equivalent oil production rate for vertical w e ll..................... 88
5.28 Calculated field equivalent water production rate for vertical w e ll................ 89

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
1

CHAPTER I

INTRODUCTION

Steam injection is the most widely used enhanced oil recovery (EOR) method in
the oil industry. The main benefits o f steam injection are reduction in oil viscosity and
residual oil saturation, and — for light oil reservoirs - steam distillation o f the lighter
hydrocarbon fractions. The two most common modes o f steam injection are
steamflooding, and cyclic-steam injection.
In steamflooding, vertical well patterns of injectors and producers are used.
Typically these are 5-spot, 7-spot, and 9-spot patterns. In cyclic-steam injection, the
injection well is also the producer. Cyclic-steam injection, also known as huff-and-puff,
is a type o f well stimulation involving heating the reservoir around the wellbore by
periodically injected steam. Cyclic-steam injection consists o f three repeated (cyclic)
stages, namely, the injection, soak, and production periods. During the injection period,
wet steam (typically about 70% quality) is injected. This is followed by the soaking
period, when heat from the injected steam is allowed to be conducted through the
reservoir, heating and lowering the viscosity o f the oil. The well is then opened up
during the production period to produce the oil and condensed injected steam. The
cyclic-steam injection process is illustrated in Fig. 1.1.

1.1 Background

The amount o f oil produced during cyclic steam injection depends to a large
extent on how much the oil viscosity can be reduced. Reduction o f oil viscosity depends
on how much heat can be transferred from the hot steam injected to the oil reservoir.
For the same reservoir, a horizontal well has more contact area and higher injection rate
than a vertical well. Therefore the heated volume around a horizontal well is larger than
that around a vertical well.

This dissertation follows the style and format o f the Journal o f Petroleum Technology.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
2

Steam Injection
,Packer

(A
Hu Oil Sand

Tubing
Fluid Production

Fig. 1.1 -Schem atic of cyclic steam injection (after Hong1)

During the steam injection period, the shape o f the steam front for horizontal
wells is different than that for vertical wells. For a horizontal well the shape o f the
steam front is expected to be more like a cone with a larger steam zone radius at the
heel because steam would preferentially be injected near the “heel” than the “toe” of
the well. To date no analytical model exists that describes cyclic steam injection for
horizontal wells. Moreover, there are only a few cyclic steam projects utilizing
horizontal wells because the technique is new.2 The motivation o f this study is to
develop an analytical cyclic steam injection model using horizontal wells. Due to lack
o f field data, the analytical model will be tested against the results o f a scaled laboratory
model.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
3

1.2 Research Objectives


Based on studies conducted to-date, the following are not well understood and
have not been modeled:
1. The shape o f the steam zone for a horizontal well during cyclic-steaming.
2. The optimum injection rate and injection time for cyclic steam injection using
horizontal wells, if these exist.
3. Oil production during cyclic steam injection using horizontal wells.
The overall objective o f my research is therefore to develop an analytical model
o f cyclic steam injection using horizontal wells. To verify the model, calculated results
would be compared against experimental results of a laboratory scaled physical model
o f cyclic steam injection with horizontal wells.

1.3 Organization o f Dissertation

Literature review o f cyclic steam injection, steam injection using horizontal wells,
and cyclic steam injection using horizontal wells are given in Chapter II. This is
followed in Chapter HI by a description o f scaling, experimental apparatus and
procedure used in this study. The experimental results using vertical and horizontal
wells are given in Chapter IV. A mathematical model to describe the performance of
cyclic steam injection using horizontal wells is presented in Chapter V. Finally
summary, conclusions and recommendations o f the study are given in Chapter VI.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
4

CHAPTER II

LITERATURE REVIEW

The literature review is divided into three sections. The first section discusses
papers related to cyclic steam injection. The second section includes papers that are
related to steam injection using horizontal wells, and the third section describes papers
containing cyclic steam injection using horizontal wells.

2.1 Cyclic Steam Injection

In 1966, Boberg and Lantz3*4 developed probably the earliest analytical model o f
cyclic steam injection for a vertical well system. In this model gravity is ignored, and the
heated area (steam zone) is assumed to develop radially outward from the wellbore
during steam injection. The steam zone is therefore a cylinder with the well at the center
o f the cylinder. During the injection period, heat loss occurs to the over-burden and
under-burden. Radius o f the steam zone is based on the model developed by Marx and
Langenheim.5 In the Marx and Langenheim model, based on heat balance, the
cumulative heat injected is equal to the heat required to raise the temperature o f the
steam zone o f radius, rh , from initial reservoir temperature, TR, to steam temperature,

Ts , plus the heat lost to the over-and under-burden. The resulting equation for the steam
zone radius is given as follows.

4 K x {T ,-T ,)t,N , ' ........................................................................................................................................................................................................................................................................... ( ' (

where h is the height o f the reservoir, M s is the mass o f steam injected, hfg is enthalpy

o f vaporization, hfs is the enthalpy o f water at Ts , hfr is the enthalpy o f water at TR,K is

the formation thermal conductivity, /, is injection time, and N s is number of sand layers.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
5

During the soaking and production period, heat loss dissipates from the steam
zone radially and vertically. The average temperature within the steam zone at any time
during the soaking period and production period is given by:

= tr +(r, -r,)(v , v. ( i - s ) - 3 ) ........................................................................ (2.2)

where vr, v. are unit solutions o f heat o f conduction in the radial and vertical direction,
S is the function which accounts for energy removed by produced fluids. The oil and
water production is calculated for each time step o f production by including heat loss in
each time step. The model has been tested against field data and has been found to model
the observed results satisfactorily.
In 1970 Kuo6 developed a gravity drainage model for steam soak process. This
model assumed that steam uniformly enters the vertical well during the injection period.
Therefore the steam zone is a cylinder with the well at the center o f the cylinder. Radius
o f the steam zone is assumed constant over the reservoir life. Performance o f individual
steam-soak analysis is not considered in this model.
In 1970, Closemann et al? developed a steam-soak model for vertical wells in
depletion-type reservoirs. The steam zone is assumed to be cylindrical in shape with the
well at the center of the cylinder. In this model the steam zone only occupies part o f the
wellbore. During injection it assumed that oil is displaced from the steam zone until
some residual value o f oil saturation. During production the oil is allowed to flow back
across the outer radius o f the steam zone. Oil production is the total oil produced from
the steam zone and from the cold zone. The model also calculates time to resaturate the
steam zone with oil. In this model, gravity drainage, reservoir dip, and effects of heat in
produced fluid are neglected. The steam zone model is subdivided into a stratified model
and a crossflow model. In the stratified model the oil-bearing regions adjacent to the
steam zone are divided into a number o f horizontal layers o f uniform thickness. The
cumulative production is calculated by adding cumulative production from each layer
and production from steam zone. In the crossflow model, the cumulative production

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
6

from the cold zone is corrected using crossflow factors. Comparison with field data
shows that the crossflow model gives a good match using 50 ft interval steamed out o f
173 ft reservoir thickness.
In 1980 Stegemeier et al.s conducted experimental scaled-model studies for
steam flood and cyclic steam injection using vertical wells. The physical models
represented actual fields such as the Midway Sunset field in California. The results o f
the experiments were useful in understanding the complicated steam processes and
provided guidance in design and operations o f these fields. The model scaling described
in their paper is a classic and has been utilized in this research as described in Chapter
III.
Gajdica et al? developed semianalytical thermal models for linear steamdrive in
1993. The model was tested against the results o f thermal simulation. Two models were
developed, one for a ID linear system and one for a 2D cross sectional system. The
models were developed for steam injection using two wells, an injection well and a
production well, each located at one end o f the reservoir. The model calculates steam-
zone steam saturation, water front locations, and overburden heat loss. In the 2D model
the gravity override o f steam is also included.
In the ID model the reservoir is assumed to be horizontal. The steam front,
saturation, and temperature isosurfaces are assumed to be vertical. During steam
injection three zones are assumed to develop: the steam zone located nearest to the
injection well, the water zone, and the oil zone which is closest to the production well.
The model then calculates location o f the steam and water fronts and the average phase
saturations in each zone. Using this information the pressure drop and production rates
can be calculated using Darcy’s law and material balance.
In the 2D model the steam rises to the top o f reservoir because o f gravity
segregation.10 The resultant steam zone has the shape o f a cone. The water zone is
divided into two zones: the hot water zone which is located below the steam zone, and
the cold water zone which is located ahead o f steam zone. The model also calculates the
steam zone size and shape, the hot water zone shape, and the water front. Pressure drop
and production are calculated in a similar manner as for the ID model.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
7

2.2 Steam Injection Using Horizontal Wells


In 1981, Butler et a l.n presented an analytical model for a new horizontal
steamflood technique, the steam assisted gravity drainage (SAGD) method. In a SAGD
pattern, two horizontal wells are utilized, namely, a horizontal injector above a
horizontal producer. When steam is introduced into the upper injector, it tends to rise
and the heavier condensate and heated oil will move to the producer below. As the oil is
removed from the steam chamber, more space is left in the reservoir for steam to flow in.
The steam chamber becomes larger by growing upwards and sideways. The growth o f
the steam zone is significantly affected by gravity drainage o f oil to the horizontal
producer, so that the steam zone has the shape o f an inverted pear in cross-sectional
view. In this model oil drains down to the production well along the sides o f the steam
zone. The amount o f oil production is calculated basically using Darcy’s law and
material balance equation.12 Fractional recovery o f oil calculated by the model is in good
agreement with scaled, pressurized experimental results.
In 1992, Reis13 presented an improved model o f the SAGD process. In this
model the steam zone shape is approximated as an inverted triangle with its vertex fixed
at the production well. The oil drains downward along the interface o f a laterally
expanding steam zone. Using cumulative oil production along the horizontal well, and
combining with the material balance equation, the steam zone interface angle can be
calculated. Oil production rate and steam zone interface angle calculated by the model
are in good agreement with the experimental data o f Chung and Butler.14

2.3 Cyclic Steam Injection Using Horizontal Wells


In 1984, Toma et a l.15 conducted an experimental study for cyclic steam injection
in a horizontal well.16’17 The experiment was conducted for a sizeable portion o f a
horizontal well in an oil sand formation. The scaled model represents a section o f
formation with radius 1.5 m containing a horizontal well that is 12 m in length. The
experimental results show that the recovery o f cyclic steaming in a horizontal well is
affected by the axial and radial components o f recovery. The oil recovery is modeled

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
8

using linear regression. The growth o f the steam zone along the well as a function o f
time and injection rate was not modeled.
A three dimensional thermal and compositional simulation study18 to evaluate the
performance o f horizontal wells under cyclic steam injection and steam flooding was
done in 1999 by Rodriguez.2 The study was conducted for the Bachaquero-01 reservoir
in Venezuela. The results show that recovery o f the field can be increased by
steamflooding with additional producer wells around the horizontal well injector. The
main advantages o f steamflooding are reservoir re-pressurization and improved thermal
efficiency.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
9

CHAPTER m

EXPERIMENTAL APPARATUS AND PROCEDURE

3.1 Physical Model Scaling


The physical model has been scaled following the Stegemeier et al.s method. The
method involves conserving dimensionless parameters in the model and in the actual
reservoir. These dimensionless parameters include the modified Jacob number, Fourier
number, Stokes number, etc. Based on these dimensionless numbers, Stegemeier et al.
derived expressions to scale model-to-reservoir properties such as pressure, temperature,
steam quality, time, and fluid injection and production rates. These expressions and the
scaled reservoir properties are described in the following.
The model constructed represents a quarter o f a ten-acre reservoir drainage for a
vertical well, and half o f a five-acre drainage for a horizontal well. Dimensions and the
scaling o f the model is limited by the maximum CT scan diameter, 50 cm. To permit X-
ray scanning during experiments, the maximum height o f the model is also limited to
five inches, and the maximum width to ten inches. The model, 10-inch long by 10-inch
wide by 5-inch high represents a reservoir volume measuring 330 ft long by 330 ft wide
by 165 ft thick. This gives a length scale of 1:396.
Pressure scaling can be calculated using the following relationship.

(3.1)

where PM is pressure in the model, PR is pressure in the reservoir, Ppm is flowing


pressure in the model, PpR is flowing pressure in the reservoir. Lr and Lm are the

reservoir and model scaled lengths, so that equals 396. Using assumption initial

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
10

pressure PK o f 5 psia in the model to represent an initial pressure PR o f 1000 psia in the

reservoir, we obtain from Eq. 3.1 the following.

PM = 0.002525 P *+2.4747.................... (3.2)

19.20
Temperature scaling is based on the ratio o f saturated steam temperature1 •
'*"" in
the reservoir and in the model. The calculation involves finding the ratio o f temperature
difference in the reservoir to the corresponding difference in the model, X , given by:

Y— PRt) (3.3)
f e - r j '

where TR is the steam temperature in the reservoir, T„ is the initial temperature

reservoir, Tu is the steam temperature in the model, and TMi is the initial model

temperature. By substituting values o f X , into Eq. 3.3 we obtain the


relationship between temperature in the model and temperature in the reservoir as
follows. At initial reservoir pressure o f 1000 psia, and initial model pressure o f 5 psia,
the saturated steam temperatures are 544.75 °F in the reservoir, and 162.21 °F in the
model. Assuming initial temperature o f the reservoir, to be 85 °F and initial

temperature in the model, TMi, is 65 °F, the temperature scaling relationship is:

Tu =0.2114 Tr +47.028......................................................................................................(3.4)

The required steam quality in the model is calculated using Eq. 3.S.

C„AT A L P rC r Pc C C
fs S t ~ +1 -I (3-5)
'M CAT p ,^M . PCRCCR J

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
II

where CWA T is the difference between water enthalpies at steam temperature, and at

initial temperature, <f> is the porosity, p C is the volumetric heat capacity, and p c Cc is
the volumetric heat capacity o f the cap rock. Subscripts M and R represent the model
and the reservoir. Using initial and steam pressure and temperature data above, steam
quality in the reservoir o f 100%, <frR = 0.34, A SR= 0.70, <j>K{ = 0.34, ASU = 0.14,
f P rC
S'r \ f _ 'N
Pci
' l a/ {-\t
- 1, and = 1, it can be shown that the steam quality needed in the
.P.Kf C\f Pc. Q ,* J

model is 100% as follows. Using Eq. 3.5,

130.117-33.09" 650 (0.34X0.70)^


f ,u = +1 0X0 - n = i . 0 3
1000.9 ’M (542.4-53.08) (0.34X0.14)

The time scale is calculated using the following expression.

\2
A{ _ hR Pc» Ki
•(3.6)
V J PCr Ccr J

where kh is the heat conductivity cap rock. Using km - 0.3888, and £ ^= 1 .2 , time

scaling using Eq. 3.6 is as follows.

^ = f - i ^ - Y l ) f — ) (525,960)—
tR 1^0.3897 \3 9 6 J 1 yr

— = 10.3518 — -..............................................................................................................(3.7)
tR year

This means that one minute in the model represents 35 days in the reservoir.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
12

Fluid injection and production rate scaling is calculated as follows.

j
Rm _ rP if O
om
-(3-8)
Rr s.PoR JU J < <f>R ^ R ,M
V.V j

where p„ is the oil density. Using p oM = p oR, and Eqs. 3.7 and 3.8 :

, cc/min
to - . ( ,) f _ I_ Y f f i ! ^ 4 Y _ J _ l ( 5 25,960X. .0.4)
qR v \ 3 9 6 j U 0.34X 0.70)JU 0.3518/ A 1 bbl/D

^ • = 0.0181 CC/mi“ •(3.9)


R r bbl/D

which means that one cc/min in the model represents 55 bbl/D in the reservoir.

3.2 Experimental Apparatus


The experimental apparatus consists o f six main components, namely steam
generator, steam quality measuring device, scaled model, condensation and liquid
measurement system, X-ray CT scanner, and data logger/recording system. Fig. 3.1 is a
schematic diagram of the cyclic-steam injection apparatus. Table 3.1 lists the equipment
used in the experiment. A brief description o f these main components follows.

3.2.1 Steam generator


An electric-powered steam generator rated at 1,000 watts maximum (1200 °F,
2000 psi maximum) to generate the steam required for the experiment. The amount o f
steam generated is controlled by a HPLC pump, which supplies water to the steam
generator at a rate accurate to 0.1 ml/min.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
13

3.2.2 Steam quality measuring device


This device is used to measure the quality o f the steam injected into the scaled
model. The steam quality measuring device consists o f an aluminum cell measuring 10
in. long by 3 in. OD with a wall thickness of 0.125 in. Steam enters the device through a
middle port and leaves the device through two outlets, one at the top, and the other at the
bottom. Fluid from the outlet ports are recombined, and injected into the scaled model.
The steam quality is measured by scanning the device to measure the amount o f liquid
and vapor in the device at steady-state.

Legend
1. Water reservoir
2 . HPLCpurp
3 . Steam generator
4 . Steamquality measiring device
5 . IVessue transducer
6 . Datalogger/PC
7. Themrcoi^e
8. Scaled model
9 . Condenser
10. Graduated vacum cylinder
11. Vacuum pimp

Fig. 3.1 —Schematic diagram of cyclic steam injection apparatus

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
14

3.2.3 Scaled model

The scaled model consists o f a parallelepiped aluminum container measuring 10


inches long by 10 inches wide by 5 inches high with a wall thickness o f 0.25 in. The
scaled laboratory model represents an actual drainage volume o f 330 ft long by 330 ft
wide by 165 ft thick. Scaling o f the model follows the Stegemeier8 method. A schematic
diagram o f the scaled model is shown in Fig. 3.2. 1/8-inch thick Teflon sheets are glued
to the inside o f the model to minimize heat loss. The model is sealed by a system of
flanges with fourteen pair o f bolts and nuts and a rectangular Teflon gasket.
The horizontal well, located at the side o f the model, consists of 0.125 in. OD
tubing. A 0.125 in. vertical well is located at one comer o f the model. Thermowells,
within each o f which a thermocouple is placed to measure the temperature in the model,
are placed at 10 locations inside the model. The scaled model would be completely filled
with a mixture o f sand, oil and water.

Table 3.1 - LIST OF EQUIPMENT USED

Water reservoir 4-liter plastic container.

HPLC pump Beckman

Steam generator Custom made by Texaco, max. Pressure 2,000 psi, max.
temperature 1,200 °F.

Temperature controller Fenwall temperature controller, model 550, type J


thermocouple, maximum temperature 1,200 °F.

Heater tape controller Fenwall temperature controller, model 524, type J


thermocouple, maximum temperature 600 °F.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
15

Table 3.1 —Continued

Steam quality measuring Custom made, aluminum cylinder, 26.7 cm(10.5 in) long
device by 7.6 cm(3.0 in) OD, wall thickness 3.2 mm(0.125 in).

Scaled model Custom made, aluminum box, 27.3 cm(10.75 in) long by
27.3 cm(10.75 in) width by 14.6 cm(5.75 in) height.

Thermocouple Omega JMQSS-040, type J, sheath diameter 0.040 in.

Pressure transducer Validyne, model DP15-TL.

Condenser Glass type.

Graduated cylinder Lab Glass, measuring cylinder vacuum type, 100 ml.

Chiller unit Haskriss Co chiller unit, model R100, cooling temperature


53 °F - 64 °F, max. rate 18 liter/min.

Data logger Hewlett-Packard data acquisition/control unit, model


3497A with type 44422A T-couple acquisition assembly.

Well 1/8 in. aluminum tubing with slots cut 4 per inch.

Thermowell 1/16 in. SS tubing.

Vacuum pump Welch DirecTorr II.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
16

Aluminum (1/4” thick)

Thermowell (1/16” SS tubing)

Horizontal well (1/8” SS


tubing)

I
Teflon insulation (1/8” thick)

Teflon gasket

Fig. 3.2 —Schematic diagram o f scaled model

3.2.4 X -ray C T scanner


The Engineering Imaging Laboratory CT scanner will be used to obtain cross
sectional scan images o f the scaled model and the steam quality measuring device. From
these scan images the steam zone area and steam quality o f the steam injected will be
determined with the aid o f a graphics computer software. The CT scanner, acquired by
the Department o f Petroleum Engineering in 1996, is a high resolution, 4th generation
Advent HD200 model with 720 diode detectors.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
17

3.2.5 Data logger/recording system


Pressure and temperature readings are measured and recorded at 10-second
intervals using a HP 3497A data-logger and a personal computer system.

3.2.6 Condensation and liquid measurement system


Cold water at 55 °F from a chiller unit is circulated through the condenser to
condense the effluent vapor into liquid. The condensed fluids are than collected in and
measured by a graduated vacuum cylinder.

3.3 Experimental Procedure


Overall procedure for an experimental run may be summarized as follows. Steam is
injected into a well in the model at a constant rate, pressure, and temperature for a period
o f time. While steam is injected, cross sectional scans using the CT scanner are taken.
Close the injection valve, soak for a period o f time, then open the valve, and produce the
well. Steps in preparation o f the apparatus and for an experimental run are as follows:
1. Thoroughly mix 100-mesh sand with water. Then mix the resulting sand-water
mixture with oil. Measure the volume and mass o f all constituents. The sand mix is
then tamped into the model. After the model is filled up to the top with sand mix,
install the cover and pressure test for leaks.
2. Insulate the model with fiber-frax and place the model in the CT scanner. Scan the
model to obtain initial porosity and fluid saturation profiles.
3. Evacuate the model until 5 psia. Record effluent volume.
4. Generate steam. Flow steam through steam quality measuring device by-passing the
model. Evacuate steam quality measuring device until 10 psia, record pressure and
temperature, and scan to measure steam quality.
5. When the desired steam quality is established, steam is injected into the model at
constant rate, pressure and temperature.
6. Scan the model during injection period.
7. Close injection valve to stop injecting steam, and scan the model during soak period.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
18

8. Evacuate the graduated cylinder until flowing pressure, 3 psia is obtained. Open the
production valve.
9. Record the amount o f effluent every two minutes.
10. Scan the model at the end o f the production period.
11. Repeat steps 5 to 10 for the next cycle.

Based on experimental data we can measure the amount o f heat injected, and the
volumes o f oil and water produced for each cycle. The temperature in the wellbore and
in the reservoir are also measured. The temperature data together with CT scan results
will be used to infer the advancement o f the steam zone, thus verifying the analytical
cyclic-steam injection model.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
19

CHAPTER IV
EXPERIMENTAL RESULTS

Two main types o f experiments were conducted, cyclic steam injection using a
horizontal well and the cyclic steam injection using a vertical well. Cyclic steam
experiments using a horizontal well were conducted for two different locations o f the
horizontal well: at mid-reservoir height and at reservoir base. Vertical well was placed at
the comer o f the physical model.

4.1 Horizontal Well at Mid-Reservoir Height


In this experiment, the well was placed at the mid-reservoir height on the right
side o f the model. Steam at 193 °F, 10 psia was injected at equivalent water rate o f 32
cc/min. To monitor the steam zone, ten thermocouples were placed in the model at ten
different locations. Location o f the well and thermocouples (T1 to T 10) in the model are
shown in Fig. 4.1 The left, parallel-mid ,and right planes in Fig. 4.1, and front,
perpendicular-mid, and rear planes in Fig. 4.2 are imaginary planes.
The experiment was conducted for six cycles o f injection, soak, and production.
During the experiment, temperature and pressure readings were recorded in 10-sec
intervals. Produced liquid was collected in 100 cc graduated cylinders, one for each
cycle, after which cumulative oil and water production were determined. Fig. 4.3 shows
the results o f temperature and pressure recorded during the experiment. Figures 4.4 to
4.6 shows the temperature distribution in the right, parallel-mid and left imaginary
planes. Figures 4.7 to 4.9 show the temperatures recorded in the front, perpendicular-
mid , and rear imaginary planes. Cumulative oil and water produced are shown in Fig.
4.10 and Table 4.1.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
20

Parallel-mid plane
T3

T2.
16

T8
Left plane' T5
Right plane

T9
Horizontal well

Fig. 4.1 - Horizontal well at mid-reservoir height, locations o f thermocouples and


planes parallel to horizontal well

T3
Rear plane
T2.
16

T8
Front plane T10

Perpendicular-mid plane T9
Horizontal well

Fig. 4.2 - Horizontal well at mid-reservoir height, locations o f thermocouples and


planes perpendicular to horizontal well

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
21

eisd ‘sinssajj
©
O O
90
o
so o o
oo
cm

cm

Fig. 4.3 - Pressure and temperature data hr horizontal well at mid-reservoir height
o
sO
fP 008
o

^ q o o ooooa»>

o
cm

2 o
£
h

o
90

O
SO

©
ooo ■sr

©
o o oo CM

oVi
C4
j o ‘sjraeJdduidj.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
22

Fig. 4.4 - Temperature data at right plane for run with horizontal well at mid-reservoir height
00

PO

Q tl


E
2 «
H

00

o
v>
o 8 o
vi o

‘3JtnBJ3dU13X

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
23

Fig. 4.5 - Temperature data at parallel mid plane for run with horizontal well at mid-reservoir height
00

'O

00

C
O

p>

(N

o o
«n
CN
J 0 ‘3JniBJ3dui3X

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
24

oc

data at left plane for run with horizontal well at mid-reservoir height
oo

VO

00

oo
t-
Fig. 4.6 -Temperature

m CM
f-

o
o
*/■> o ©
CN fN
J Q‘ajm Bjadrasi

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
25

Fig. 4.7 - Temperature data at front plane for run with horizontal well at mid-reservoir height

J o s3JtUBJ3dni3X

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
26

Fig. 4.8 - Temperature data at perpendicular mid plane for run with horizontal well at mid-reservoir height
o
30

o
vO

o
■M
-

OM
C

o
oo

04
oso

o
<X> Tf*

o<N

O o O
U) o
ID o
CM
CM

X , ‘s i i u B J d d n i d X

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
27

Fig. 4.9 - Temperature data at rear plane for run with horizontal well at mid-reservoir height
OO

OO

oo

oo

K
o
•n O
CN
^ ‘sjnjBJsdmax

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

250
Water
Oil

200 - -

£ 150 - -

50

0 20 40 60 80 100 120 140 160 180 200

Time, min

Fig. 4.10 - Cumulative oil and water production for horizontal well at mid-reservoir height

K)
OO
29

Figure 4.3 shows that in the first three cycles, during injection period, the
temperature in the middle o f the well increases from the initial reservoir temperature, 63
°F, to around 170 °F. In the first cycle, the temperature at the “toe” increases only
slightly, but increases significantly up to 110 °F in the second and third cycles. During
the fourth, fifth, and sixth cycles, the maximum temperature in the middle o f the well
reaches up to 180 °F, while the temperature at the “toe” increases up to 140 °F. For the
six cycles, the steam was injected at 8 psia and 182.9 °F saturation temperature. The data
record shows that for all six cycles, the steam zone never reaches the end o f the
wellbore.
Temperature data outside the wellbore are plotted in Figs. 4.4 to 4.9. During
injection, for all six cycles, Fig. 4.4 shows that T4 is greater than T10; Fig. 4.5 shows
that T9 is greater than T6 and T3; and Fig. 4.6 shows that temperatures in the left plane
are mostly constant. Figures 4.7 to 4.9 show that at distances greater than about five
inches from the wellbore the reservoir remains essentially at the initial temperature.
Temperature data also indicate that the radius o f steam zone is largest at the “heel” and
becomes smaller toward the “toe”.
Cumulative production data (Fig. 4.10) show that the oil production is relatively
small at the first three cycles due largely to fact that the sand mix near the wellbore is
still relatively cold. However, with a longer injection time in the fourth cycle, near-
wellbore stimulation is affected, resulting in significantly higher oil production. Water
production shows a rapid increase in the first three cycles but thereafter increases almost
linearly with time.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
30

TABLE 4.1—EXPERIMENTAL RESULTS FOR RUN WITH HORIZONTAL


WELL AT MID-RESERVOIR HEIGHT

Cumulative Cumulative
Injection Soak time Production oil water
Cycle time time production production
(min) (min) (min) (cc) (cc)
1 1.5 0.5 3 2 15
2 2 1.5 6 4 55
3 2.5 2 8 6 85
4 1.5 1 74 26 162
5 1.5 1 19 41 186
6 2 2 8 46 206

4.2 Horizontal Well at Reservoir Base


In this experiment, the horizontal well was placed at the bottom right side o f the
scaled model. Ten thermocouples were placed inside the model at ten different locations,
and one thermocouple was placed inside the injection line. During the experiment, steam
was injected at a constant rate of 16 cc/min cold water equivalent. Locations o f the well,
thermocouples, and imaginary planes are shown in Figs. 4.11 and 4.12.
The experiment was conducted for six cycles. Temperature and pressure readings
were recorded in ten-second intervals during the experiment. Cumulative liquid
production was measured using graduated cylinders. Temperature and pressure data are
shown in Fig. 4.13. Recorded temperature at each imaginary plane is shown in Figs.
4.14 to 4.19. Cumulative oil and water production are shown in Table 4.2 and Fig. 4.20.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
31

Parallel-mid plane
T3

T2.
16

T8
Left plane
Right plane

T9

Horizontal well

Fig. 4.11 - Horizontal well at reservoir base, location o f thermocouples and planes
parallel to horizontal well

T3
Rear plane
T2.
16
* TZ
T8
Front plane T10

Perpendicular-mid plane T9
Horizontal well

Fig. 4.12 - Horizontal well at reservoir base, location o f thermocouples and planes
perpendicular to horizontal well

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

300 60

T-Line T-SQMD

250 -- -- 50

--4 0

Pressure, psia
T-Middle

■30
P-SQMD
T-Toe
P-Well head

-20

■■ 10

50 100 150 200 250

Time, min

Fig. 4.13 - Pressure and temperature data for run with horizontal well at reservoir base
u>
N)
33

Fig. 4.14 - Temperature data at right plane for run with horizontal well at reservoir base
i—

.s
E
<S
s

o o o o
o
<*■) CN

^ ‘ajtuw adoiai

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
34

Fig. 4.15 - Temperature data at parallel-mid plane for run with horizontal well at reservoir base
.s
E
oT
E
E—

eo
P

o>

©
o o S O s o

^ ‘3injBJ3dlU3X

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
35

oc O

Fig. 4.16 - Temperature data at left plane for run with horizontal well at reservoir base
CM

CO

lO
300 -

o
in ©
CM CM

io ‘aime-radurai

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

300
T-Line

250

200

§
2 150

I
£
100

T5

T Line

0 50 100 150 200 250

Time, min

Fig. 4.17 - Temperature data at front plane for run with horizontal well at reservoir base
U>
C\
37

data at perpendicular-mid plane for run with horizontal well at reservoir base
.s
£
CM s
I—

(D

©
•/I
Fig. 4.18 - Temperature

O VI
O
VI
O
(N n
^ c3injBJ3dui3L

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
38

Fig. 4.19 - Temperature data at rear plane for run with horizontal well at reservoir base
90

CO

QO

o o
«/“> o O
m <N CN

j o ‘sjruBjadoiax

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

Water

50 100 150 200 250

Time, min

Fig. 4.20 - Cumulative oil and water production for run with horizontal well at reservoir base

VO
40

TABLE 4.2—EXPERIMENTAL RESULTS FOR RUN WITH HORIZONTAL


WELL AT RESERVOIR BASE

Cumulative Cumulative
Injection Soak time Production Oil Water
Cycle time time Production Production
(min) (min) (min) (cc) (cc)
1 4 4 15 3 19
2 4 5 12 7 50
3 8 4 10 11 103
4 7 3 8 16 135
5 10 3 17 26 221
6 18 2 27 91 346

Pressure and temperature recorded (Fig. 4.13) shows that the temperature at the
'‘toe” remains essentially the same as the temperature in the middle o f the well during
injection in the sixth cycle. As with the horizontal well at mid-reservoir height, the
temperature outside the well (Figs. 4.14 to 4.19) show that the temperature near the
“heel” is greater that temperature near the “toe” during injection. Even when the steam
zone reaches the end o f the well, temperature data indicate that the steam zone radius at
the “heel” is greater than that toward the “toe”.
Production data shows that production increase sharply in the sixth cycle when
the steam zone reaches the end o f the wellbore. Unfortunately at the end o f the sixth
cycle the experiment had to be stop because o f the excessive amount o f liquid produced.
Water production increases gradually with time.

4.3 V ertical WeU


In this experiment, the well is placed at the comer o f the scaled model. Ten
thermocouples were placed inside the model at different locations, and one
thermocouple was placed inside the injection line. During the experiment, steam was
injected at a constant rate o f 8 cc/min cold water equivalent. Locations o f the well,
thermocouples, and imaginary planes are shown in Fig. 4.21.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
41

Seven cycles was performed in this experiment. As in the experiments with a


horizontal well, the temperature and pressure readings were recorded in ten-second
intervals. Cumulative oil and water production were also measured. Temperature and
pressure data are as shown in Fig. 4.22. Recorded temperatures at each imaginary plane
are shown in Figs. 4.23 to 4.25. Cumulative oil and water production are shown in Table
4.3 and Fig. 4.26.

Vertical well
Top plane

Middle plane
T2.
T7

T5 *
T10

T9
Base plane

Fig. 4.21 -V ertical well, location o f thermocouples and planes

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
300

T-SQMD
T-Line
250 --5 0

200 ■40
T em perature,

150 - ■30

100 - • - •20

P-Model
T-Well
50 -■ - • 10

0 20 40 60 80 100 120 140 160 180 200

Time, min

Fig. 4.22 - Pressure and temperature data for run with vertical well
43

00

CM

Fig. 4.23 - Temperature data at top plane for run with vertical well
CM
00

CO

©
© o©
CM
© ©
o «On o

j o ^jnjBJsduisx

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
44

OO

Fig. 4.24 - Temperature data at middle plane for run with vertical well
IT)

SO

E
E—

00

so
in

o o
Vi o o o
o § o
^ ‘3JnjBJ3dtU3X

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
45

00

Fig. 4.25 - Temperature data at base plane for run with vertical well

Oi £

CD
K oo

o
o
O
«o o
o o »o/%
cn cs C4
'3jnjBJ3<iui3J_

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

250
W ater

Oil

200

i
d
•£ >50
£
*T3
2

0 20 40 60 80 100 120 140 160 180 200


Time, min.

Fig. 4.26 - Cumulative oil and water production for run with vertical well
47

TABLE 4.3— EXPERIMENTAL RESULTS FOR RUN W ITH VERTICAL WELL

Cumulative Cumulative
Injection Soak time Production Oil W ater
Cycle time time Production Production
(min) (min) (min) (cc) (cc)
1 6 6 10 13 9
2 5 2 12 26 28
3 8 6 10 32 77
4 7 3 10 41 134
5 10 6 13 43 164
6 4 4 16 45 191
7 6 5 16 46 216

Temperature data (Fig. 4.22) show that the steam zone reaches only the middle
o f the wellbore for each cycle injected. Temperature data outside the wellbore show that
in the middle and base planes, radius o f the steam zone does not exceed 2.5 inches from
the well. The data also indicate that temperatures at a distance 2.5 inches from the well
are higher in the top plane than in the middle and base planes. This observation indicates
that the steam zone is larger at the top o f the reservoir due to gravity segregation of
steam. This is a complex phenomenon. In the analytical model, a simplifying assumption
is made, in the gravity segregation is ignored, so that the steam zone advances radially
away from the wellbore. Production data show that the oil production increase gradually
in the first four cycles but becomes almost asymptotic thereafter. Water production
increases sharply in the first four cycles and more gradually in the remaining cycles.

4.4 Scanning Results


CT scan images were taken in each experiment. Before injecting steam into the
model, the steam quality measurement device was scanned to measure steam quality.
During the experiment the model was scanned at four different locations. In each cycle
scanning was taken three times, before injecting steam, at the end o f injection period,

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
48

and at the end o f production period. The purpose o f these scans is to measure liquid
saturation in the model. Unfortunately the CT scan result can not be used to determine
the liquid saturation because o f “edge effect”. However, the CT scan gives a good results
in measuring steam quality. The edge effect o f CT scan image is shown in Fig. 4.27.

Fig. 4.27 - Edge effect in CT scan results

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
49

CHAPTER V

NEW CYCLIC STEAM INJECTION MODEL

As described in Chapter IV, during cyclic steam injection in horizontal wells, the
steam does not always reach the toe o f the well. Further, the steamzone is larger at the
heel than towards the toe o f the horizontal well. Previous analytical models can not
model the aforementioned phenomena, primarily because these models assume an
instantaneous sweep o f the wellbore at start of steam injection. Consequently two new
mathematical models have been developed, one for cyclic steam injection using
horizontal wells, and one for cyclic steam injection using vertical wells.
The analytical model for cyclic steam injection using horizontal wells consists of
two sub-models as follows.
(i) Sub-model for injection period, and
(ii) Sub-model for soaking and production periods.
The mathematical model for cyclic steam injection using verticalwellsincorporates
previous and new sub-models as follows.
(i) Marx and Langenheim model for the injection period (as in the Boberg
and Lantz method), and
(ii) Horizontal well sub-model for soaking and production periods, but with
the well in the vertical position.
The new model for cyclic steam injection using horizontal well is divided into
two sub-models. The first sub-model involves calculating the length and radius o f the
steam zone during the injection period. The second sub-model enables calculation of
average temperature21 and fluid production during the soak and production periods. In
the sub-model for injection period, the horizontal well is divided into segments. The
length o f each segment is based on the time step specified, while the total number of
segments depends on total injection time. Using Darcy’s law and heat balance,22,23 the
radius o f the steam zone around each segment at each time step may be calculated. The

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
50

sub-model for soaking and production periods is based on a modified Boberg and Lantz
method. Following is a description o f these sub-models and the results o f verification o f
the new models against experimental data.

5.1 Sub-Model for Injection Period in Horizontal Wells


In this sub-model, the wellbore is assumed to be filled with oil before steam is
injected. During the injection period, oil in the wellbore is displaced gradually into the
reservoir by the injected steam, beginning at the “heel” o f the horizontal well and
progressing towards the “toe” o f the well. To simulate this progressive displacement by
steam, the total injection time in a cycle is divided into small, equal time steps o f At.
Following Marx and Langenheim, the steam zone around each segment is approximated
to be cylindrical in shape. With increasing injection time the steam zone grows around
each segment and displaces more o f the oil in the wellbore. The growth in radius and
length o f the steam zone is calculated using a material balance, Darcy’s law and heat
balance. This is described in the following.

5.1.1 Material balance


In the first time step, the volume o f steam injected is equal to the volume o f
steam injected into the reservoir plus volume o f oil displaced in the first segment plus
volume o f steam occupying the first segment o f the wellbore. The material balance
expression can be written as follows.

Iw n r ? AL,
— = ? ,/ /+ ? » / /+ ' ~ ................................................................................................... (3 -0
Ps A t/

Iw is the mass rate o f steam injected, ps is density o f steam, qsll is the volumetric rate o f

steam entering the formation, qoll is the volumetric rate o f oil displaced to the

formation, r, is the internal radius o f the tubing , ALi is the length of the first segment

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
51

swept by steam , and A// is the first time step. For the term qslJ and qm], / and j are the

indices for the segment number and time step number, respectively.

5.1.2 Darcy’s law


Volumetric rate o f oil displaced is equal to the volumetric rate o f steam times
viscosity ratio o f steam and oil, assuming the same pressure gradients and relative
permeability for oil and steam.

Ron —Rsii “ ........................................................................................................................................................ ( 5 .2 )


Ho
where fis is viscosity o f the steam, and is the oil viscosity at steam temperature.

5.1.3 Heat balance 1


Heat injected equals the amount o f heat injected into the reservoir plus the
amount of heat required to increase the temperature o f the oil in the well plus the amount
o f heat stored in the well (steam). That is,

K At, =qstl p s H s A// +7crt2 AL, \psH s +Ca (Ts - T r) ] ...............................................(5.3)

The term on the left hand side o f Eq. 5.3 is the amount o f heat injected during time A//.
The first term on the right hand side o f Eq. 5.3 is the amount o f heat injected into the
reservoir during time Ati, while the second term is the amount of heat required to
increase the temperature o f the oil in the segment ALj from initial reservoir temperature,
Tr , to steam temperature, Ts plus the amount o f heat contained in the seam occupying

the wellbore segment. Hs is the steam enthalpy, and Ca is the volumetric heat capacity o f
oil.

5.1.4 Heat balance 2


The amount o f heat injected into the reservoir equals the amount o f heat
contained in the steam zone plus the amount o f heat loss by conduction. That is,

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
52

qs„ p s H s At, =Jt(r„2 - r ,2 (Ts - T J A L , + HCF„+HCB„ , .................................... (5.4)

where r// is the steam zone radius at segment 1 at the end o f At{, C rf is the volumetric
heat capacity o f the reservoir, HCF\\ is heat conducted across the front o f the steam
zone, and HCBu is the heat conducted across the back o f the steam zone (Fig. 5.1). In
the terms rtJ, HCFtJ and HCBy , / and j are the indices for segment number and time

step number, respectively. These heat losses parallel to the wellbore direction are given
by Eqs. 5.5 and 5.6.

HCF„ = \ 7r(r“' ~ r‘ ( T ~ Tr ) dt
U o yjjrat

_ M r„ !
4tree

HCB = f Jrr,/ ^'R) ^


" o 4 nat

~ T*) 4 * 7
V tta

where Ar is the thermal conductivity o f the reservoir and a is the thermal difihisivity o f
the reservoir.

The length o f the steam zone at time step l can be calculated by substituting Eq.
5.2 into Eq. 5.1, which upon rearranging yields:

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
53

Iw k rt2 AL,
Ps A/,
4sii ~ (5-7)
/+
. Pa.

Substitute Eq. 5.7 into Eq. 5.3, and rearranging:

L A/,
1+ P l
AX, =- Po
.(5.8)

1+ P s

qsi i can then be be calculated by substiting AZ,/ from Eq. 5.8 into Eq. 5.7.
Substitute ALi and qsll from Eq. 5.8 and Eq. 5.7 into Eq. 5.3, and using Eqs. 5.5 and

5.6, we obtain:

q,„ p,H A > , = * -(r,/ - r / K C „ f t - T , ) + 2^ " '' ^ .


.(5.9)
2x{r„! )x B(T ,-T s ) J * r ,
yl*<xs

Equation 5.9 is a quadratic equation in rn which can be solved to give:

J-4ac
................................................................................................................. (5-10)
2a

where a = at +a2 + a3

C-C, +C, +Cj

a \ = x&L\ Cgp (Ts —Tr )

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
54

_ _ 2 ^ l s (T1 - T R) 4 ^
2 ’ 2 ~ /
jn a R

Cl ~ ~ ri n C rF (Ts ~ T r )

2 x X R r * { r , - T R) J * T ,
Cl =
4 K aR

c3= -q sUPsHs&t

At the end o f Atf, growth o f the steam zone can be illustrated as in Fig. 5.1.

ALx

Fig 5.1 -Steam zone at the end o f first time step

In the second time step Ati, the steamzone radius at segment 1 grows to rn , at segment
number 2 to r??, and the steam zone length increases by AL2 . Similarly r/? and AL 2 are
calculated as follows.

— = q„2 + <Is22+<Io22 + fCr'A * L2 .......................................................................................(5-1 1)


Ps ^2

(lo 2 2 ~ <
is22 (5-12)
Po

Substituting Eq. 5.12 into Eq.5.11 gives:

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
55

> 2.,
~ Q s l2 + 4s2 2 ( 1 + ................................................................................ (5.13)
Ps \ PoJ *2

Using Darcy’s equation at the first segment,

AL,
= 1T
AL, T T q*"
t +AL2
— ..................................................................................................................................................................................................................................................................................................( 5 - 1 4 )

and
AL 7
Qs22 = — ~TT~qsii ........................................................................................................(5-15)
AL, + AL2

Performing a heat balance similar to heat balance 1, we obtain:

K H s A/, = qsl2 PsHs&2 +<Is22 PsHI&t2 + 7tr2 AL2 {p sH s + C 0 (Ts - TR) ) ....................(5.16)

Substituting Eqs. 5.14 and 5.15 into Eq. 5.16, we can solve for AL 2 as follows.

AL, - (5.17)
' x r ,2( p ,H ,+ C A T ,- T R))

qs / 2 and qS2 2 can be calculated by back substitute AL 2 into Eq. 5.14 and 5.15.

Applying a heat balance similar to heat balance 2, we obtain:

qsl2p s H s At2 = j v ( rl2 - r u 2^ ( T , - T r ) AL, + HCFl2 + HCBn ................................. (5.18)

and
qs22p s H s At2 =ir(r22 - r t2 J C ^ (Ts - T r)A L 2 + //C F „ ................................................ (5.19)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
56

where

HCF = f r22 ) (Ts Tr ) dt


12 o Jxai

_ 2 x [ri2 ~ r 22 )^R (T'i ~ T r ) -J 2 ^ 20 )


yj l t d

rJ C B n - " \ 7 t r n 2 ^ ( T s - TR) d t
12 I y jx a t

M r n K iT .- T ,) ^
■ ffta

and

HCFn = I f K(r” ~ r‘2)X r (T‘ ~ Tr) dt


22 l yfftO t

^ 2 f t (r222 ~ r r2 ) A R (Ts - T R ) j A t ~ ^

yj f t a

Substituting qS22 to Eq. 5.19 and HCF22 from Eq. 5.22 into Eq. 5.19, we obtain a
quadratic equation in r?? which can be calculated as follows.

J —4 a c
ru = * - = ......... (5-23)
2a

where a = a, + a 2

c = c x + c2 +c 3

a.\ = ft AL2 Cgp (7^ —Tr )

_ 2ft2.R (Ts —Tr ) yj&t2


a2 — 1
y jx a

C\ ——r, ft AL2 Cgp (Ts —Tr )

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
57

27trt2 X r {Ts - T r ) J & 2


c2 = -
ffta
4*

c3 = -4 sn P ,H SM 2

HCF 12 is then calculated by substituting rr> from E q 5.23 into Eq. 5.20. HCF 12 obtained
is then substituted into Eq. 5.18 to yield r /j as follows.

J -4 a c
^12 = ^------ • (5.24)
la

where a = al + a2 +ai

c= cl + c2 + c 3 +c4

a\ —f t AZ,, Cup (Tx ~Fr )

2ft XR (7^ —Tr )


a ,,a , =
4n a R

c, = ~ r\ 1 f t AZ, Cgp (Ts —Tr )

2 ftr22 2Xr (Ts - T r ) J K f


c, =-■
yJft<xR

2 f t r 2 A r (Ts - T R) j A t 2
C3 =
4 KaR
C->~ ~ <
lsl2 P * H s&t2

The calculations are continued for time step 3 and so on, until end of injection
time. Computer programs in Visual Basic 6 have been written to perform these
calculations. A listing o f the programs is given in Appendix C. Steam zones at the end o f
time step 2 and at the end o f the injection period, are shown in Figs. 5.2 and 5.3
respectively.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
58

c) h c f x1

!=} HCF-a

HCB{1 .11

h c f 22

!=) HCF\2

AL, AL,

Figure 5.2 —Steam zone at the end o f second time step

AL

Figure 5.3 —Steam zone profile at end of injection

5.2 Sub-Model for Soaking and Production Periods


During the soaking period, the amount o f heat transferred to the reservoir
removed through liquid production will be calculated following the Boberg and Lantz3
method. Liquid production is calculated based on a modified o f Boberg and Lantz3
method.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
59

5.2.1 Soaking period


Following Boberg and Lantz method, the average temperature, , in the steam

zone at the end o f the soaking period can be calculated using the following equation

^avg ~ T r + (7^ TR\V R Vz ) (5.25)

where vr and vz are unit solutions of heat loss in the radial direction and along the
wellbore direction, respectively. Eq. 5.25 assumes the steam zone is cylindrical in shape.
The steam zone around the horizontal well however is not cylindrical but conical in
shape (Fig. 5 3 ).
For Eq. 5.25 to be used in the sub-model, the cone-like shape o f steam zone is
approximated as a cylindrical with an average radius, Rm, given by:

(5.26)

where n is the total number o f segments containing steam at the end o f injection, r, is the
steam radius at segment z, AZ,, is the length o f segment z, and Lsz is the total length o f the
steam zone. The simplified cylindrical shape steam zone is illustrated in Fig. 5.4.

5.2.2 Production period


During the production period, the zone around the wellbore is divided into two
zones, namely hot zone and warm zone. The hot zone is that occupied by the steam zone,
and the warm zone is that which is not occupied by steam. Oil and water production
from each o f these two zones are calculated separately, based on water saturation,
average temperature, relative permeability to oil and water, and the reservoir pressure for
each area at each time step of production.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
60

hot zone

'ov warm zone

^------------

AL-
hot-warm zone
interface

Figure 5.4 - Steam zone approximated as a cylinder

Steps to calculate liquid production during the production period are as follows.
1. At the end of the soaking period, calculate average temperature for the hot zone,
Tmh and average temperature for the warm zone namely . Tmh calculated using

the Boberg and Lantz3 method. is estimated based on the assumption that during

the soaking period, the heat is conducted from the hot zone to the warm zone through
an area of n { R a v f . The temperature at the hot-warm zone interface is assumed to

be constant and is given by the average temperature from Ts to Tmh. The

temperature 7^ at a distance x ahead o f hot-warm interface can be shown to be:

T ,= ( T ^ - T C) 1 - e r f +TC, .(5.27)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
61

where Tc is the initial temperature o f the warm zone, and t is the soak period. is

then calculated by averaging the temperature in the warm zone that has been divided
into equal intervals o f A x.
2. Divide production period into incremental time intervals o f At p .

3. Calculate new reservoir pressure resulting from steam injected, namely Pr^ based on
fluid compressibility as follows.

Prj = Pr + AP, (5.28)


where

(5.29)

and A V is the volume o f steam injected in equivalent water volume, is the total
pore volum e, and Ct is the total compressibility o f fluid in the pore volume.
4. Calculate water saturation. The initial water saturation inside the hot zone is
calculated by assuming that during the injection period steam would displaced some
oil inside the steam zone creating steam channels and some steam would condense
outside the steam zone. At the end o f the soaking period, the steam would condense
in these channels. Thus, the average water saturation in the hot zone is the amount o f
condensed water in the channels divided by pore volume o f hot zone. The channel
volume is determined to be 3% to 5% o f pore volume, based on history matching o f
water production. The water saturation in the warm zone is not affected by steam
injected, it is same as initial water saturation in the reservoir.
5. Based on water saturation calculated from step no. 4, calculate relative permeability
to oil and water in the hot and warm zones using Honarpour24 correlations, described
in Appendix B.
6. For each Atp calculate liquid production from both zones using Darcy’s equation. Oil
and water production from the hot zone are given b y the following equations.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
62

_ _ k kroh Ar(/rl Ay)*


Qoh (5.30)

^ Aw* Ac (At A/ )
(5.31)

Liquid production and from the warm zone are given by the following equations.

kkm ( L - L j ( p n - P ^ )
( 5.32)

k krw w A c ) (A l A / )
(5.33)

k mh and are the relative permeabilities o f oil in the hot zone and in the warm

zone, respectively n oh and /uwh are the oil and water viscosities in the hot zone

based on Tmh, and //^ a n d are oil and water viscosities in the warm zone

based on .

7. At end o f Atp> calculate new average temperature o f both zones based on heat
conduction to the reservoir and heat removed by liquid produced using the Boberg
and Lantz method, as described in Appendix A.
8. Using cumulative liquid produced, calculate the new reservoir pressure.
9. Calculate the new water saturation in the hot zone based on assumption that the
amount of liquid produced from this zone is replaced by water.
10. Repeat step no.5 to no.9 until end o f production period.
11. At the end o f production period, calculate the amount o f heat remaining to be used in
the steam zone radius calculation for the next cycle.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
63

5 3 Verification o f Cyclic Steam Injection Model


The new models for cyclic steam injection using horizontal and vertical wells
have been verified against experimental results. The calculated results and date
compared are the length and radius o f the steam zone, the average temperature at the end
o f production for each cycle, reservoir pressure, and oil and water production for each
cycle. Results based on the new cyclic steam injection model are in good agreement with
the experimental data as described in the following.

5.3.1 Horizontal well cyclic steam injection model


This model has been verified using the results o f two experimental data runs:
horizontal well at mid-reservoir height, and horizontal well at reservoir base.

5.3.1.1 Horizontal well at mid-reservoir height


Comparison o f model results and experimental data are shown in Figs. 5.5 to 5.8.
In Fig. 5.5 model results show that the steam zone never reach 50% of the wellbore
length in all o f die six cycies. This results agrees with experimental observation Fig. 4.3
which shows that the temperature recorded in the middle of the wellbore never reaches
steam temperature in all the six cycles, calculated results also shows that the steam zone
radius at the heel never reaches the top o f the scaled model at a distance 2.5 inches (6.5
cm) from the wellbore. This results is also verified by experimental data (Fig. 4.4) which
shows that the temperature recorded at T4 never reaches the steam temperature in all
cycles.
Figures 5.6 and 5.7 compare cumulative oil and water production calculated by
the model to the data. It can be seen that the model results and experimental data are in
good agreement. The difference between mathematical model calculation and
experimental data results for cumulative oil produced is 7%, and for cumulative water
produced is 1.5 % at the end o f cycle life. Verification o f calculated temperature is
shown in Fig. 5.8. The temperatures compared are the average temperatures at the end o f
the production period for each cycle. Due to the fact that the steam never reaches the
middle o f the wellbore, only the average temperatures in the warm zone (based on model

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

Cycle 4
Cycle 2 Cycle 3

B
u
a
N
Cycle 5

8
«/5

Cycle 1

A
AA
Cycle 6 A
A

H------------------------
0.0 0.1 0.2 0.3 0.4 0.5

Horizontal well length, traction of total length

Fig. S.S - Model steam zone profile for horizontal well at mid-reservoir height
65

Fig. 5.6 - Cumulative oil production: model results and data for horizontal well at mid-reservoir height
©

o
00

o o o
n o o

oo ‘uoipnpoid [to um 3

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

250

200 --

100 - -

50 -•

□ Data
— Model

0 20 40 60 80 100 120 140 160

Time, min

Fig. S.7 - Cumulative water production: model results and data for horizontal well at mid-reservoir height
67

Fig. 5.8 - Average temperatures: model results and mid-well data for horizontal well at mid-reservoir height
00

•k ‘ d u ia j.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
68

Fig. 5.9 - Calculated oil production rate for horizontal well at mid-reservoir height
o

o o
0.025

o e> o
oss/oo ‘3jbj uoipnpoad n o

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
69

Fig. 5.10 - Calculated water production rate for horizontal well at mid-reservoir height
00

VO

O <N o
0.14

00
o

OSSpO ‘9JBJ UOponpOid

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
70

Fig. 5.11 - Calculated field equivalent oil production rate for horizontal well at mid-reservoir height
o

o
rr

o
N

O
o
c
1
Zi
E
o H
00

o
o

o
CN

o o
CN
o
o o
00
© o

p/qjs ‘sjBi uoponpojd [iq

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
71

Fig. 5.12 - Calculated field equivalent water production rate for horizontal well at mid-reservoir height
00

«N

00

o o o o
1000

o o
00

p/iqq ‘3JBJ poid I31B/W

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
72

calculation) and recorded temperatures in the middle o f the well from experimental
results can be compared. There are some differences between experimental and model
results, but both exhibit the same trend in temperature.
Oil and water production rates calculated by the model are shown in Figs. 5.4 to
5.12. In each cycle the oil production rate is high at the beginning then declines with
increasing time, as actually observed in the field. The production rate declines because
oil viscosity increases as the reservoir temperature decreases with time. Maximum oil
production rate is reached during the third cycle at 0.020 cc/sec or 226 STB/D in the
field. The water production rate maximum is 0.13 cc/sec or 1471 bbl/d at field condition.

5.3.1.2 Horizontal well at reservoir base


Figure 5.13 shows that the length o f the steam zone reaches the end of the
wellbore during the fifth and sixth cycles. The calculated results agree with experimental
data in Fig. 4.13 which shows that the temperature recorded in the middle and at the end
o f the well reach the steam temperature in the fifth and the sixth cycles. Maximum
radius o f the steam zone calculated at the middle o f the wellbore never reaches half of
the model height (2.5 inches). This result is verified by temperature recorded T7 in Fig.
4.14 which shows that the temperature at that point never reaches the steam temperature.
Calculated cumulative oil and water production agree with experimental data (
Figs. 5.14 and 5.15). The model result and data for average temperature comparison
shown in Fig. 5.16. The temperatures compared are the average temperature in the hot
zone and temperatures recorded in the middle o f the well. Model results and data agree
satisfactorily.
Calculated oil and water production rates are shown in Figs. 5.17 —5.20. The
maximum oil production rate is reached during the sixth cycle, 0.12 cc/sec or equivalent
to 796 STB/D in the field. The maximum water production is 0.37 cc/sec or 2453 bbl/d
in the field. Compared to the horizontal well at mid-reservoir height, the liquid
production for this well is higher eventhough the steam injection rates are the same in
both cases. This is due to the fact that in this well the steamzone reaches the end o f the

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

6 4
o
e>

3
2 Cycle 5
0 3
1

Cycle 2
Cycle 6
Cycle I

Cycle 4
Cycle 3

0
0,00 0.10 0.20 0,30 0.40 0.50 0.60 0.70 0.80 0.90 1.00
Horizontal well length, fraction of total length

Fig. 5.13 - Model steam zone profile for horizontal well at reservoir base
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

100

8
§
a
s
1o,
O
E
6
3
u

• Data
— Model

0 20 40 60 80 100 120 140 160 180

Time, min

Fig. 5.14 - Cumulative oil production: model results and data for horizontal well at reservoir base
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

450

400

350

o 300

S 250

200

R 150

100

— Model
□ Data

0 20 40 60 80 100 120 140 160 180

Time, min

Fig. 5.15 - Cumulative water production: model results and data for horizontal well at reservoir base
76

Fig. 5.16 - Average temperatures : model results and mid-well data for horizontal well at reservoir base
oo

<N

00

o o
«o o o o
<N
^ ‘siniBJsdmax

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
77

OO

Fig. 5.17 - Calculated oil production rate for horizontal well at reservoir base
<N

00

SO
0.14

o o’ o' o o' o* o'


oaspo ‘sjBi aoipnpojd [tq

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
78

OO

Fig. 5.18 - Calculated water production rate for horizontal well at reservoir base
OO

o o o o
0.40

03S/33 ‘3JBJ uouonpoid J316^

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

900

800

700

TD
£ 600
trj

§
2 500
ao
•a
| 400
2
a
§ 300

200

100

0 20 40 60 80 100 120 140 160 180 200

Time, month

Fig. 5.19 - Calculated field equivalent oil production rate for horizontal well at reservoir base

^4
80

rs

Fig. 5.20 - Calculated field equivalent water production rate for horizontal well at reservoir base
00

00

o oo O oo o
3000

CS <N «r>

p/iqq £3ibj uoponpoid

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
81

wellbore, while in the mid-reservoir height the steam zone only reaches up to 45% o f the
wellbore length.

5.3.2 Vertical well model


Model results and experimental data for the vertical well run are in good
agreement, as seen in Figs. 5.21 —5.24. The calculated maximum steam zone radius is
5.8 cm, which is less than 5 inch. This result can not be verified by temperature data
because the thermocouples are located further away from the well.
Cumulative oil and water production based on the new model are in good
agreement with the experimental data, as shown in Figs. 5.22 - 5.23. The average
temperature based on the model are also in sound agreement with experimental data
(Fig. 5. 24).
Oil and water production rates based on the new model are shown in Figs. 5.25 -
5.28. Maximum oil production rate was reached in the second cycle at 0.11 cc/sec,
equivalent to 1458 STB/D in the field. Maximum water production rate 0.1 cc/sec or
equivalent to 1326 STB/D in the field.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission

6.50
Cycle 5

6.00 +

Cyc le 3 Cycle 4

5.50 + Cycle 7

r>
Cycle 6
a3 5.00
2 :
u
c
n 4.50--

4.00 + Cycle 2

Cycle 1

3.50 +

3.00
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
Vertical well, fraction of total length

Fig. 5.21 - Model steam zone profile for vertical well


83

QO

Fig. 5.22 - Cumulative oil production: model results and data for vertical well
00

o o oN
< O ©
«o
oo ‘uoijsnpoid \io um 3

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
84

OO

Fig. 5.23 - Cumulative water production : model results and data for vertical well
VO

00

o o o
o
o o
o
CN
oo ‘joibav um o

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
85

OO

Fig. 5.24 ■Average temperatures : model results and mid-well data for vertical well
'O

00

o o © o © o o
OO VO CN o 00
J o ‘3JnjBJ3dUI3X

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
86

Fig. 5.25 - Calculated oil production rate for vertical well


00

o OO
s© o
0.12

o o

D3S/03 pOJd [IQ

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
87

00

Fig. 5.26 - Calculated water production rate for vertical well


CN

00

o
CN

o
o
600

00 sO CN
o o o o o o o o o

D3S/03 pojd

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
88

oe

Fig. 5.27 - Calculated field equivalent oil production rate for vertical well
00

© o © © o © ©
© o
009!

CN
© o00 o o
CN

p/qjs ‘ajBJ pojd n o

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
89

oe

Fig. 5.28 - Calculated field equivalent water production rate for vertical well
OO

so

o o o o
1400

00
2
CM
p/iqq ‘ajBJ pojd

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
90

CHAPTER VI

SUMMARY, CONCLUSIONS AND RECOMMENDATIONS

6.1 Sum m ary


The main objective o f this research was to develop an analytical model for cyclic
steam injection using horizontal wells. Due to lack o f field data for cyclic steam injection
using horizontal wells, the analytical model was verified against experimental results. The
experiments were conducted using a laboratory scaled model, representing half o f a five-
acre drainage area for the case o f a horizontal well. When a vertical well was used in the
model, the model represented a quarter o f a ten-acre drainage area. Each experimental run
consisted of up to six steam injection cycles. Thermocouples were placed inside the model
to record reservoir and wellbore temperatures. Pressure data were also recorded in addition
to measuring the cumulative production. Runs were made with the horizontal well placed
on one side o f the model in two vertical positions, one at mid-reservoir height, and the
other at the reservoir base.
An analytical model has been developed that describes the growth o f the steam
zone in the wellbore and reservoir, temperature and pressure profiles, and oil and water
production for the whole sequence o f steam injection cycles. The model results are in good
agreement with the experimental data. The main findings and conclusions from this study
may be summarized as follows.

6.2 Conclusions
1. A new analytical model to describe cyclic steam performance using horizontal wells
and vertical wells has been developed. The model consists o f two sub-models, a sub­
model for the injection period and a sub-model for the soaking and production periods.
2. Experimental results indicate that during the steam injection period, the temperature
near the heel o f a horizontal well is higher than that towards the toe. This observation

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
91

implies that the steam zone is largest near the heel, becoming smaller towards the toe.
The shape o f the steam zone is like a cone, as borne out by temperature data and the
analytical model.
3. For cyclic steam injection in horizontal wells, there is a minimum steam injection rate
below which the steam will not reach the toe o f the well even at long injection times.
4. Scaled-up results indicate that for a 330 ft long horizontal well at mid-reservoir height
steam will only reach about 40% o f the well length after injecting at about 3536
CWEBPD/well for 88 days. The corresponding peak oil rate is 130 STB/D. For the
same injection rate, with the horizontal well at reservoir base, steam reaches the toe of
the well with a peak oil production o f 796 STB/D.

6.3 Recommendations
The findings from this study appear to have significant application in industry. It is
therefore recommended to conduct further research using a larger physical model than
used in this study to better simulate and model steam displacement o f the wellbore
contents in horizontal wells.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
92

NOMENCLATURE

Cc = volumetric heat capacity o f cap rock, Btu/ft3-0?

ca = volumetric heat capacity of oil, Btu/ft3-0?

C rf = volumetric heat capacity o f reservoir, Btu/ft3-0?

C WA T = difference between water enthalpies at Ts and Tr, Btu/lb


= steam quality, dimensionless
fs

fsM = steam quality in the model, dimensionless

h = reservoir thickness, ft
= enthalpy o f vaporization, Btu/lb
hfg

= enthalpy o f water at reservoir temperature, Btu/lb


hfr

Hs = steam enthalpy, Btu/ lb

HCF = heat conduction across the front o f steam zone, Btu

HCB = heat conduction across the back o f steam zone, Btu

In- = mass rate of steam injected, lb/sec

k = absolute permeability, Darcy

kro = relative permeability to oil, dimensionless


=
knv relative permeability to water, dimensionless

K =
formation conductivity, Btu/hr-ft-°F

AL = length of each segment, cm

Lr = length o f reservoir, ft

Lm = length o f model, ft

Ms = mass o f steam injected, lb

Ns = number of sand layer, dimensionless

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
p pressure, psia

Pp = flowing pressire, psia

q = fluid rate, bbl/D

<ls = volumetric rate of steam entering the formation, cc/sec

<7o = volumetric rate of oil displaced to the formation, cc/sec

fh = steam zone radius, ft

rt = casing radius, cm

r = steam zone radius in the mathematical model, cm

AS r = ( Soi - Sor)R

AS m = ( S 0i - S or) \ f

So, = initial oil saturation, dimensionless

SoR = residual oil saturation, dimensionless

t = time, sec

u = injection time, day

At = time step, sec

T = temperature, °F

Toy = average temperature o f steam zone, °F

Tr, = initial reservoir temperature, °F

Tm = initial model temperature, °F

Vr = unit solution o f heat conduction in the radial direction, dimensionless

V- = unit solution o f heat conduction in the vertical direction, dimensionless

<p = porosity, dimensionless

8 = correction factor for heat removed by produced fluid, dimensionless

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
94

Pc density cap rock, lb/cuft

a = thermal diffusivity, f^/hr

A thermal conductivity, Btu/ hr-ft-°F

P viscosity, cp

Subscripts

K1 =
model
R =
reservoir
s =
steam
o —
oil
H' —
water
V = indices for segment number and time step number

Example qsu — rate o f steam entering the formation at segment number


one, at time step one

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
95

REFERENCES

1. Hong, K.C.: Steamflood Reservoir Management, PennWell Publishing Co, Tulsa,


Oklahoma, 1994.
2. Rodriguez, M. G.: “Bachaquero-01 Reservoir, Venezuela - Increasing Oil
Production by Switching from Cyclic Steam Injection to Steamflooding Using
Horizontal Wells”, MS Thesis, Texas A&M Univ., 1999.
3. Boberg, T. C. and Lantz, R. B.: “Calculation o f the Production Rate o f a Thermally
Stimulated Well”, J. Pet. Tech. (Dec. 1966) 1613-1623.
4. Boberg, Thomas C.: Thermal Methods o f Oil Recovery, An Exxon Monograph, John
Wiley & Sons, New York, 1988.
5. Marx, J.W. and Langenheim, R.H.: “Reservoir Heating by Hot Fluid Injection”,
Trans AIME (1 9 5 9 )2 1 6 ,3 1 2 -3 1 5 .
6. Kuo, C.H., Shain, S.A., Phocas, D.M.: “A Gravity Drainage Model for the Steam-
Soak Process”, SPEJ (June 1970) 119-126.
7. Closemann, P. J., Ratliff. N. W., Truitt, N. E.: “A Steam-Soak Model for Depletion -
Type Reservoirs”, / . Pet. Tech. ( June 1970) 757-770.
8. Stegemeier, G. L., Laumbach, D. D., Volek, C. W.: “Representing Steam Processes
with Vacuum Models”, SP EJ (June 1980) 151-174.
9. Gajdica, R. J., Brigham, W.E., Aziz, K.: “A Semianalytical Thermal Model for
Linear Steamdrive”, SPE Reservoir Engineering (Feb. 1993) 73-79.
10. Closmann, P. J., Smith Richard A.: “Temperature Observations and Steam-Zone
Rise in the vicinity o f a Steam-Heated Fracture”, SPEJ (Aug. 1983) 575-586.
11. Butler, R. M., Me Nab, G. S. and Lo H. Y.,: “Theoretical Studies on the Gravity
Drainage o f Heavy Oil During In-situ Steam Heating”, Can. J. Chem. Eng. (Aug.
1981)59,455-460.
12. Dake L.P.: Fundamentals o f Reservoir Engineering Elsevier Science B.V,
Amsterdam, 1977.
13. Reis, J. C.: “A Steam Assisted Gravity Drainage Model for Tar sands: Linear
Geometry”, / . Can. Petr. Tech. (Dec. 1992)31, 14-20.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
96

14. Chung, K.H., Butler, R.M.: “Geometric Effect o f Steam Injectionon the Formation o f
Emulsions in the Steam-assisted Gravity Drainage Process ”, J. Can. Petr. Tech. (Jan.
1988) 27, 36-42.
15. Toma, P., Redford, D., Livesey, D.: “The Laboratory Simulation o f Bitumen
Recovery by Steam Stimulation o f Horizontal Wells”, WRI-DOE Tar-Sand
Symposium, Vail, Colorado, June 26-29, 1984.
16. Ahner P.F., Sufi A.H.: “Physical Model Steamflood Studies Using Horizontal
Wells ”, paper SPE/DOE 20247 presented at the SPE/DOE Seventh Symposium on
Enhanced Oil Recovery, Tulsa, April 22-25, 1990.
17. Joshi S.D.: “A Laboratory Study o f Thermal Oil Recovery Using Horizontal Wells,”
paper SPE/DOE 14916 presented at the SPE/DOE Fifth Symposium on Enhanced
Oil Recovery, Tulsa, April 20-23, 1986.
18. Rial, R.M.: “3D Thermal Simulation Using a Horizontal Wellbore for
Steamflooding”, paper SPE 13076 presented at the 1984 Annual Technical
Conference, Houston, 16-19 September.
19. Keenan, H.J. and Keyes, F.G.: Thermodynamic Properties o f Steam, John Wiley &
Sons, New York, 1936.
20. Prats, M.: Thermal Recovery, SPE Monograph Vol. 7, SPE, Dallas, 1986.
21. Thomas, G. W.: “Approximate Methods for Calculating the Temperature
Distribution during H ot Fluid Injection”, J. Can. Petr. Tech. (Oct. -D ec. 1967) 123-
129.
22. Carslaw, H. S., Jaeger, C.: Conduction o f Heat in Solids, Oxford at the Clarendon
Press, London, 1959.
23. Bird, R. B., Stewart, W . E., Lightfoot, E. N.: Transport Phenomena, John Wiley &
Sons, New York, 1960.
24. Honarpour M., Koederizz, L.F., Harvey, H.A.,: “Empirical Equations for Estimating
Two-Phase Relative Permeability in Consolidated Rock”, J. Petr. Tech. (Dec. 1982)
2905-2908.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
97

APPENDIX A

BOBERG AND LANTZ METHOD

The average temperature, , o f the heated region is calculated at any time after

the termination o f steam injection. The equation is based on approximate energy balance
around the heated region. The equation is derived as follows.

T„ = rR+(r,- T , ) f c ; ( l - S ) - s } .................................................................................(A. 1 )

v r is the conduction correction for energy loss radially away from the heated region,
and is given by:

“re BrV J * { y )d y
Vr = 2 j ------- ^ £ U L , ................................................................................................... (A.2)
o y

where 9 r =
rh~

vr may also be evaluated by

Vr = g 2 s S* ......................................................................................................................(A.3)
k=0

where

\
1 {k + 1.5)
.........................................................................................(A.4)
< 9 j(2 + *X3+*)J ‘

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
98

The conduction correction for vertical heat loss, v : , is given by

h 1 l4 a (t-e j ( r.2 V
vr = e r f l -ex p -(A.5)
lo /4 a (/-0 j V

where hl =h + z , and z is defined as a hypothetical thickness, when added to sand


thickness accounts for all energy injected including that lost to unproductive rock, z is
calculated using:

•(A.6)

The correction factor for energy removed by liquid production , S , is obtained as


follows.

.(A.7)
2 ,? x rt '-(pC)XF( r , - T R)hI '

H f is the rate o f heat loss by producing fluid. Depends o f type o f the liquid produced, it

is calculated as follows.

For the case where negligible gas and water vapor produced:

H , =<?„ {{ fiC l + « „ -r s).............................. (A.8)

where Rw is water oil ratio of liquid production.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
99

For the case where gas and water vapor production are s ig n ificant,

Hr (A.9)

where H , = 5 .6 1 5 (p C )„ + * ,C s ( r „ - r s )

H . =5.61S/». ( * . ( / / . , H„]

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
100

APPENDIX B

HONARPOUR CORRELATIONS

The empirical equations for estimating two-phase oil-water relative permeability


used in this study are correlations developed by Honarpour in 1982. These equations
were developed using laboratory data set from oil and gas fields in the US, Canada,
Libya, Iran, Argentina, and United Arab Emirates. The data sets were classified
according to lithology (carbonate and non carbonate), and wetability (oil wet and water
wet). Stepwise linear regression analysis was used to develop equations that measured
relative permeability from fluid saturations, permeability and porosity. The goodness fit
o f each equation was determined according to the statistical concept o f R2.
The equations used in this study are as follows.

k n, was calculated using the following equation :

£ =0.035388 -0.0 1 0 8 7 4
(B .l)
0.56556( S .) 16(S. - S „ )

k m was calculated using:

1.8

1 j
k m =0.76067 ►

1~Sw, ~ S 0r y

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
101

APPENDIX C

COMPUTER PROGRAMS

Four programs were written for use in this research. These programs are
Middle.vbp, Bottom.vbp, Vertical.vbp, which were written in Visual Basic 6, and
Exp.bas which was written in Quick Basic 4.5. Programs Middle.vbp and Bottom.vbp
were used to calculate performance o f cyclic steam injection using a horizontal well at
mid-reservoir height and a horizontal well at the reservoir base. Program Vertical.vbp
was used to calculate cyclic steam performance using a vertical well. Program Exp.bas
was used to record pressure and temperature data during experiments.

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Program MIDDLE.VBP

Horizontal, well in the middle o f reservoir

Attribute V B N am e = "Module 1"


Public KROM, KRWM, KS
Public CYCLE, TINJT, TSOAKT, TPRODT, I, NN
Public QI, LT, TS, TR, ROS, ROW, CID, COD, IW
Public HS, POR, SOR, SWC
Public CPRF, CPO, MUS, MUOC
Public TA, PI
Public DT
Public LMDRES, ALPHRES, LMDTS, LMDBACK, COND, CHTKN
Sub INPUTDATAO

CYCLE = Val(Form7.Textl(0).Text)
KROM = Val(Form7.Textl(22).Text)
KRWM = Val(Form7.Textl(23).Text)
NN = CYCLE
ReDim TINJT(NN), TSOAKT(NN), TPRODT(NN)

For I = 1 To NN
TINJT(I) = Val(Form7.Textl(I).Text)
TSOAKT(I) = Val(Form 7.Textl(I + 6).Text)
TPRODT(I) = V al(Form 7.Textl(I + 12).Text)
Next I

QI = Val(Form l.Textl(0).Text)
LT = V al(Form l.Textl(l).Text)
TS = Val(Form l.Textl(2).Text)
TR = Val(Form l.Textl(3).Text)
ROS = Val(Form l.Textl(4).Text)
ROW = Val(Forml T extl(5).T ext)
CID = Val(Form l.Textl(6).Text)
COD = Val(Form l.Textl(7).Text)

HS = Val(Form l.Textl(9).Text)
POR = Val(Forml .Textl(lO).Text)
SOR = V al(Form l.TextI(l l).Text)
SWC = Val(Forml.Textl(12).Text)

CPRF = Val(Forml.TextI(13).Text)
CPO = Val(Forml.Textl(14).Text)
MUOC = Val(Form l.Textl(15).Text)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
103

MUS = Val(Forml.Textl(16).Text)
DT = Val(Form 1.Text 1(17).Text)

'Ambient Temperature, oF'


TA = 63
KS = Val(Form7.Textl(19).Text)

• ****************** C O N S T A N T S *******************************
PI = 3.14159
'Heat Conduction Area Constant, CACON'
COND = Val(Forml.Textl(21).Text)
'Heat Taken Constant, CHTKN'
CHTKN = Val(Forml.Textl(24).Text)
'Heat conductivity reservoir,LMDRES,Btu/sec-cm-oF 2.2 btu/hr-ft-oF'
'Heat diffiisivity reservoir, ALPHRES,cmA2/sec'
'Heat conductivity to side, LMDTS,Btu/sec-cm-oF'
'Heat conductivity to back, LMDBACK,Btu/sec-cm-oF'
'Heat conduction constant to back, LMDBACK, BTU/cmA2-sec ***(=(TS-
T A)/((L/lambda))
LMDRES = 0.00002
ALPHRES = 0.01
LMDTS = 0.00000550642
LMDBACK = 0.0000035429

'Heat capacity tubing, CPTUB,Btu/gr-oF'


'Heat Conductivity tubing,LMDTUB,Btu/sec-cm-oF'
'Density tubing, ROTUB,gr/cc'
'Heat diffiisivity tubing, ALPHTUB,cmA2/sec'
'Tubing length, LTUB,cm'
CPTUB = 0.000249
LMDTUB = 0.000182
ROTUB = 7.80112
ALPHTUB =0.0961
LTU B = 10#

'ALUMINUM'
'Heat Conductivity,LMDAL,Btu/sec-cm-oF'
'Heat diffiisivity, ALPHAL,cmA2/sec'
'Length, LAL,cm'
LMDAL = 0.001086
ALPHAL = 0.9458
LAL = 0.635

End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
104

Attribute V B N am e = "Module4”
Public L, RT, RTO
Sub CHANGEUNITQ

'Injection Rate, QI cc/min to cc/sec'


'Wellbore Length, L inch to cm'
'Steam Density, ROS lb/cuft to lb/cc'
'Water Density, ROW Ib/cuft to lb/cc'
'ID Casing, CID inch to cm'
'OD Casing, CID inch to cm'
'Heat Capacity Reservoir, CPRF btu/cuft-oF to btu/cc-oF'
'Heat Conductivity Oil, CPO btu/cuft-oF to btu/cc-oF'

QI = QI / 60#
L = LT * 2.54
ROS = ROS / (30.48 A 3#)
ROW = ROW / (30.48 A3#)
CID = CID * 2.54
COD = COD * 2.54

CPRF = CPRF / (30.48 A 3)


CPO = CPO / (30.48 A 3)

'Heat Conductivity Teflon, LMDT, BTU/hr ft oF to BTU/sec cm oF'


LMDT = 0.1333
LMDT = LMDT / (3600 * 30.48)

' *** VARIABLES CALCULATIONS ****

'TUBING RADIUS, RT, CM


'TUBING SEGMENT LENGTH, DL, CM
'Tubing Area, ATUB, cmA2
'TEMP AVERAGE, TAVG, oF
'MASS INJECTION RATE, IW, LB/SEC

RT = CID / 2
RTO = COD / 2
ATUB = PI * (RTO A 2 - RT A 2)
IW = QI * ROW

End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Attribute V B N am e = "Module6"
Public TINJ, SIT, TPROD, KK, O, COUNTO
Sub MAINCALC()

.*****0 PEN OUTPUT FILES*****'


FOUT1S = Form 1.Text l(22).Text
FOUT2S = Form 1.Text l(23).Text
Open FOUT1S For Append As #1
Open FOUT2$ For Append As #2

Form l.Hide
Form3.Show
Call Form I .HEADER

For KK = 1 To CYCLE
Form3.Textl.Text = KK

TINJ = TINJT(KK)
SIT = TSOAKT(KK)
TPROD = TPRODT(KK)
COUNTO = 1

Call Module8.0ILPROP
Call Module5 .STE AMZONE
Call Module 13.LAVG
Call Module7.SOAK
COUNTO = 0
Call Module8 .OILPROP
Call Module 1l.WATERVISC
Call Modulel4.SWINITIAL

Form4.Show
Call Form 1.GRAPH
Call Module9.PROD
Call Module 10.REMAINING
O=N
807 Next KK
Close #1
Close #2
End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
106

Attribute V B N a m e = "Module8"
Public MUO, TW
Sub OILPROP0

If COUNTO = 1 Then
TOIL = TS
Else
TOIL = TAVRG
End If
If COUNTO = 3 Then
TOIL = TCZ
TW = TOIL
End If
MUO = 10 A 15 * (TOIL A -5.9844)

End Sub

Attribute VB Name = "Module5"


Public TSIPS, VWIPS
Public THINJSEGT, THCOND, THCVRES, TOTHTKN
Public N
Public DL, RH, QS, LTOT
Sub STEAMZONE0

'********* INITIALIZATIONS **************


. ******** Number o f Segment, N ************
N = Int(TINJ / DT)

ReDim RH(N, N), QS(N), DL(N)


ReDim THINJSEGT(N), THCOND(N), THCVRES(N), TOTHTKN(N)
ReDim TSIPS(N), VWIPS(N)

For I = 1 To N
TSIPS(I) = 0
Next I

TTOT = 0
LTOT = 0
THINJTOT = 0
THCCAP = 0
THINJMOD = 0
THCB ACK = 0
THCSIDE = 0

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
107

THCRES = 0
FACR = (DT A0.5)

For K = 2 To N
For I = 1 To K - 1
RH(K, I) = RT
Next I
Next K

CCONV = CPRF * (TS - TR)


CCONDR = 2 * LMDRES * (TS - TR) * (DT A 0.5) / ((PI * ALPHRES) A0.5)
CCONDB = LMDBACK * DT
CCONDS = LMDTS * DT

' Condition o f No Conductions


If COND = 0 Then
CCON DR= 0
CCONDB = 0
CCONDS = 0
End If

For I = 1 To N
TTOT = TTOT + DT
If K K > 1 Then
If O >= I Then
HREM = HR(I) / ((O - I) + 1)
Else
HREM = 0
End If
End If

If I = 1 Then

ROS2 = ROS
HS2 = HS
If K K > 1 Then
DLL 1 = (IW * HS2 * DT) - (IW * HS2 * DT / (1 + MUS / MUO))
Else
DLL1 = (IW * HS2 * DT) - (IW * HS2 * DT / (1 + MUS / MUO))
TRW = TR
End If
DLL2 = PI * RT A 2 * (ROS2 * HS2 + CPO * (TS - TRW) - (ROS2 * HS2) / (1
+ MUS / MUO))
DL(I) = DLL1 / DLL2

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
108

LTOT = L T O T + DL(I)
QSI = ((IW / ROS2) - (PI * RT A2 * DL(I) / DT)) / (1 + MUS / MUO)
CHIN = ROS2 * HS2 * DT * QSI

GoTo 150
Else

ROS2 = ROS
HS2 = HS
End If

If K K > 1 And O >= I Then


TRW = TR
End If

LL1 = (IW * HS2 * DT) - QSI * ROS2 * HS2 * DT


LL2 = PI * RT A 2 * (ROS2 * HS2 + CPO * (TS - TRW))
DL(I) = LL1 / LL2

LTOT = LTOT + DL(I)


QS(I) = (DL(I) / LTOT) * QSI

150 For K = I To I Step-I


THCBACK = 0
THCSIDE = 0
THCRES = 0

If K K > 1 Then
If O >= I Then
HREM = HR(K) / ((O - K) + 1)
Else
HREM = 0
End If
End If

If K = I Then
RX = RT
RY = RT
Else
RX = R H (K + 1,1)
RY = RH(K, I - 1)
End If

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
109

If K = 1 And I = I Then

A1 = 0.5 * PI * DL(I) * CCONV


A2 = COND * (0.5 * PI) * CCONDB
A3 = FACR * COND * (0.5 * PI) * CCONDR
A = A i + A2 + A3

B = COND * 2 * DL(1) * CCONDS

C l = -0.5 * PI * RT A2 * DL(1) * CCONV


C2 = -COND * (0.5 * PI) * RT A 2 * CCONDB
C3 = -FACR * COND * (0.5 * PI) * RT A 2 * CCONDR
C4 = -(DL(1) / LTOT) * CHIN - HREM
C5 = 0

C = C 1 + C2 + C3 + C4 + C5

RRI = (-B + (B A 2 - 4 * A * C) A 0.5) / (2 * A)


THINJSEG = (DL(1) / LTOT) * QSI * ROS2 * HS2 * DT

HCVRES = 0.5 * PI * (R R IA 2 - RT A 2) * DL(1) * CCONV


HCBACK = COND * (0.5 * PI) * (R R IA 2 - RT A2) * CCONDB
HCSIDE = COND * 2 * RRI * DL(I) * CCONDS
HCRES = FACR * COND * (0.5 * PI) * (RRI A 2 - RT A 2) * CCONDR

THINJSEGT(K) = THINJSEGT(K) + THINJSEG


THCVRES(K) = THCVRES(K) + HCVRES
THCOND(K) = THCOND(K) + HCBACK + HCSIDE + HCRES
TSIPS(K) = TSIPS(K) + (DL(K) / LTOT) ♦ QSI * DT

' Heat Balance


' THINJSEG = HCVRES + HCBACK + HCRES + HCSIDE

GoTo 100

End If

If K = I Then
A1 = (0.5) * PI * DL(1) * CCONV
A2 = COND * (0.5 * PI) * CCONDB
A3 = FACR * COND * (0.5 * PI) * CCONDR
A —A1 + A2 +■A3

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
110

B = COND * 2 * DL(1) * CCONDS

C l = -(0.5) * PI * RH(K, I - 1) A 2 * DL(1) * CCONV


C2A = -COND * (0.5 * PI) * RH(K, I - 1) A 2 * CCONDB
C2B = 0.5 * PI * (RH(K, I - 1) A 2 - RT A 2) * CCONDB
C2 = C2A + C2B
C3A = -FACR * COND * (0.5 * PI) * RH(K + I, I) A 2 * CCONDR
C3B = FACR * COND * (1 - CHTKN) * (0.5 * PI) * ((RH(K + I, I) A2 - RH(K
+ 1,1- 1 )A 2))* CCONDR

If CHTKN = 0 Then
C3B = 0
End If

C3 = C3A + C3B
C4 = -(DL(1) / LTOT) * CHIN - HREM
C5 = 0
C6A = -COND * 2 * (RH(K, I - 1)) * DL(1) * CCONDS
C6B = 2 * (RH(K, I - I)) * DL(1) * CCONDS
C6 = C6A + C6B

C = C1 + C 2 + C 3 + C 4 + C5 + C6

RRI = (-B + (B A 2 - 4 * A * C) A 0.5) / (2 * A)

THINJSEG = (DL(1) / LTOT) * QSI * ROS2 * HS2 * DT

HCVRES = (0.5) * PI * (RRI A 2 - RH(K, I - 1) A 2) * DL(1) * CCONV


HCBACK1 = COND * (0.5 * PI) * (R R IA 2 - RH(K, I - 1) A 2) * CCONDB
HCBACK2 = 0.5 * PI * (RH(K, I - 1) A2 - RT A 2) * CCONDB
HCBACK = HCBACK1 + HCBACK2
HCSIDE1 = COND * 2 * (RRI - RH(K, I - 1)) * DL(1) * CCONDS
HCSIDE2 = 2 * (RH(K, I - 1)) * DL(1) * CCONDS
HCSIDE = HCSIDE1 + HCSIDE2
HCRES1 = FACR * COND * (0.5 * PI) * (R R IA 2 - RH(K + I, I) A 2) *
CCONDR

HCRES2 = FACR * COND * (1 - CHTKN) * (0.5 * PI) * ((RH(K + 1 ,1) A2 -


RH(K + 1 ,1 - I) A 2)) * CCONDR

If CHTKN = 0 Then
HCRES2 = 0

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Ill

End If

HCRES = HCRES1 + HCRES2

THINJSEGT(K) = THINJSEGT(K) + THINJSEG


THCOND(K) = THCOND(K) + HCBACK + HCSIDE + HCRES
THCVRES(K) = THCVRES(K) + HCVRES
TOTHTKN(K) = 0

TSIPS(K) = TSIPS(K) + (DL(K) / LTOT) * QSI * DT


GoTo 100
End If

If K = I Then

Z=0

A1 = 0.5 * PI * DL(K) * CCONV


A2 =0
A3 = FACR * COND * (0.5 * PI) * CCONDR
A4 = -FACR * CHTKN * COND * (0.5 * PI) * CCONDR

B = COND * 2 * DL(K) * CCONDS

C l = -0.5 * PI * (RT A 2) * DL(K) * CCONV


C2 = 0!
C3A = -FACR * COND * (0.5 * PI) * RT A2 * CCONDR
C3B = FACR * CHTKN * COND * (0.5 * PI) * RT A 2 * CCONDR
C4 = -(DL(K) / LTOT) * CHIN - HREM

510 A = A1 + A 2 + A3 + A 4

C = C1 + C 2 + C3A + C3B + C4

RRI = (-B + (B A2 - 4 * A * C) A 0.5) / (2 * A)


RX = RRI
If Z = 1 Then GoTo 520
If RRI > RH(K - 1 ,1 - 1) Then
Z= 1
RX = RH (K - 1 ,1 -1 )
A4 = 0
C3B = -FACR * CHTKN * COND * (0.5 * PI) * (RX A 2 - RT A2) *
CCONDR
GoTo 510

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
112

End If

520 THINJSEG = (DL(K) / LTOT) * CHIN


THTKN = FACR * CHTKN * COND * (0.5 * PI) * (RX A 2 - RT A2) *
CCONDR

HCVRES = 0.5 * PI * (R R IA 2 - RT A 2) * DL(K) * CCONV


HCBACK = 0
HCSIDE = COND * 2 * RRI * DL(K) * CCONDS
HCRES = FACR * COND * (0.5 * PI) * (RRI A 2 - RT A 2) * CCONDR

THINJSEGT(K) = THINJSEGT(K) + THINJSEG + THTKN


THCVRES(K) = THCVRES(K) + HCVRES
THCOND(K) = THCOND(K) + HCBACK + HCSIDE + HCRES
TOTHTKN(K) = TOTHTKN(K) + THTKN

TSIPS(K) = TSIPS(K) + (DL(K) / LTOT) * QSI * DT

GoTo 100

Else

Z=0

A1 = (0.5) * PI * DL(K) * CCONV


A2 = 0
A3 = FACR * COND * (0.5 * PI) * CCONDR
A4 = -FACR * CHTKN * COND * (0.5 * PI) * CCONDR

B = COND * 2 * DL(K) * CCONDS

Cl = -(0.5) * PI * (RH(K, I - 1) A 2) * DL(K) * CCONV


C2 = 0
C3A = -FACR * COND * (0.5 * PI) * RH(K + 1 ,1) A 2 * CCONDR
C3B = FACR * CHTKN * COND * (0.5 * PI) * RH(K, I - 1) A 2 * CCONDR

C3C = FACR * COND * (1 - CHTKN) * (0.5 * PI) * ((RH(K + 1 ,1) A 2 - RH(K


+ 1 ,1 - 1) A 2)) * CCONDR

If CHTKN = 0 Then
C3C = 0
End If

C3 = C3A + C3B + C3C

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
113

C4 = -(DL(K) / LTOT) * CHIN - HREM


C6A =* -COND * 2 * RH(K, I - 1) * DL(K) * CCONDS
C6B = 2 * RH(K, I - 1) * DL(K) * CCONDS
C6 = C6A + C6B

610 A = A1 + A2 + A3 + A4
C = C1 + C 2 + C 3 + C 4 + C6

RRI = (-B + ( B A2 - 4 * A * C ) A 0.5) / (2 * A)

If Z = 1 Then
GoTo 620
End If

RX = RRI

If RRI > RH(K - 1 , 1 - 1 ) Then


Z= 1
RX = RH(K - 1 ,1 - 1)
A4 = 0
C3B = -FACR * CHTKN * COND * (0.5 * PI) * (RX A2 - RH(K, I - 1) A 2) *
CCONDR
GoTo 610
End If

620 THINJSEG = (DL(K) / LTOT) * QSI * ROS2 * HS2 * DT


THTKN = FACR * CHTKN * COND * (0.5 * PI) * (RX A 2 - RH(K, I - 1) A 2) *
CCONDR

HCVRES = (0.5) * PI * (R R IA 2 - RH(K, I - 1)A 2) * DL(K) * CCONV


HCBACK = 0
HCRES 1 = FACR * COND * (0.5 * PI) * (R R IA 2 - RH(K +- 1 ,1) A 2) *
CCONDR
HCRES2 = FACR * COND * (1 - CHTKN) * (0.5 * PI) * ((RH(K + 1 ,1) A 2 -
RH(K + 1 ,1 - 1 )A 2)) * CCONDR

If CHTKN = 0 Then
HCRES2 = 0
End If

HCRES = HCRES 1 + HCRES2


HCSIDE 1 = COND * 2 * (RRI - RH(K, I - 1)) * DL(K) * CCONDS
HCSIDE2 = 2 * RH(K, I - 1) * DL(K) * CCONDS

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
HCSIDE = HCSIDE 1 + HCSIDE2

THINJSEGT(K) = THINJSEGT(K) + THINJSEG + THTKN


THCOND(K) = THCOND(K) + HCBACK + HCSIDE + HCRES
THCVRES(K) = THCVRES(K) + HCVRES
TOTHTKN(K) = TOTHTKN(K) + THTKN

End If
TSIPS(K) = TSIPS(K) + (DL(K) / LTOT) * QSI * DT

100 RH(K, I) = I * RRI

If I = N Then

VWIPS(K) = TSIPS(K) * ROS / ROW


TVWI = TVWI + VWIPS(K)

Form3.MSFlexGridl.Col = 0
Form3.MSFlexGridl.ROW = N - K + 1
Form3 .MSFlexGrid 1.Text = I

Form3.MSFlexGridl.Col = 1
Form3 .MSFlexGridl .ROW = N - K + I
Form3.MSFlexGridl.Text = K

Form3.MSFlexGridl.Col = 2
Form3.MSFlexGridl .ROW = N - K + 1
Form3.MSFlexGridl.Text = Round(RH(K, I), 6)

Form3. M SFlexGridl. Col = 3


Form3.MSFlexGridl.ROW = N - K + 1
Form3.MSFlexGridl .Text = Round(LTOT, 4)

Form3.MSFlexGridl.Col = 4
Form3.MSFlexGridl.ROW = N - K + 1
Form3.MSFlexGridl.Text = Round(THINJSEGT(K), 3)

Form3.MSFlexGridl.Col = 5
Form3.MSFlexGridl.ROW = N - K + 1
Form3.MSFlexGridl.Text = Round(THCVRES(K), 3)

Form3.MSFlexGridl.Col = 6
Form3 .MSFlexGridl .ROW = N - K + 1
Form3.MSFlexGridl.Text = Round(THCOND(K), 3)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
115

Form3. MSFlexGridl. Col = 7


Form3. MSFlexGridl. ROW = N - K + 1
Form3 .MSFlexGridl.Text = Round(VWIPS(K), 3)

THINJTOT = IW * DT * HS2
End If
Next K

10 Next I
10000
End Sub

Attribute VB Name = "Modulel3"


Public RAVRG
Sub LAVGO

TAREAR = 0
TOTVOL = 0
AREAV = 0.5 * PI * (RH(1, N » A 2
For I = 1 To N
AREAR = PI * RH(I, N) * DL(I)
TAREAR = TAREAR + AREAR
VTOT = 0.5 * PI * RH(I, N) A 2 * DL(I)
TOTVOL = TOTVOL + VTOT
Next I
RAVG = TAREAR / (PI * LTOT)
RAVRG = (TOTVOL / (0.5 * PI * LTOT)) A 0.5
VAVRG = PI * RAVRG A2 * LTOT * 0.5
Form 11.Show

End Sub

Attribute VB_Name = "ModuIe7"


Public TAVRG, ZZ
Sub SOAK0
STTOT = 0

Call Module2.VRCALC
Call Module3.VZCALC

TAVRG = TR + (TS - TR) * (VR * VZ)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
116

Call Module 19.TCOLDZONE


Forml 1.Print TAVRG
End Sub

Attribute V B N a m e = "Module 11"


Public MUW
Sub WATERVISCO

TW = TAVRG
If 60 <= TW And TW < 80 Then
MUW = (TW - 60) * (0.88 - 1.15) / 20 + 1.15
GoTo 71
End If
If 80 <= TW And TW < 100 Then
MUW = (TW - 80) * (0.68 - 0.88) / 20 + 0.88
GoTo 71
End If
If 100 <= TW And TW < 120 Then
MUW = (TW - 100) * (0.57 - 0.68) / 20 + 0.68
GoTo 71
End If
If 120 <= TW And TW < 140 Then
MUW = (TW - 120) * (0.45 - 0.57) / 20 + 0.57
GoTo 71
End If
If 140 <= TW And TW < 160 Then
MUW = (TW - 140) * (0.39 - 0.45) / 20 + 0.45
GoTo 71
End If
If 160 <= TW And TW < 180 Then
MUW = (TW - 160) * (0.35 - 0.39) / 20 + 0.39
GoTo 71
End If
If 180 <= TW And TW < 200 Then
MUW = (TW - 180) * (0.3 - 0.35) / 20 + 0.35
End If
71

End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
117

Attribute VB Name = "Module 14"


Public SWQW, KRWQW, VMWIC, VMOISZ1, RE
Public SWIN, VPOR, VWINT1, VWI, VWIS, VWINJC1
Sub SWINITIALO

Form2.Show
VWINT1 = 0
VWINJC1 = 0
VWI = 0
'*** CALCULATE TOTAL WATER INJECTED,VWI @ CYCLE ***
For I = 1 To N
VWI = VWI + VWTPS(I)
Next I

• *** TOTAL W TRINJCTD = WTR1NJCTD @ CYCLE + WTR [NJCTD


REMAINING ***
I f K K > 1 Then
VWI = VWI + VWIREM
End If

RE = 6.35

If KK > 1 And TINJ < 100 Then


RE = RAVRG
End If

VBULK = 0.5 * PI * RE A 2 * LTOT


VPOR = VBULK * POR
VS = VBULK * POR * (1 - 0.15 - 0.15)

SE = 0.05
'Vol Moveable Water in the Channel=VMWIC
VMWIC = SE * (1 - SOR - SWC) * VPOR
'Water Saturation for water Production'
SWQW = SWC + VMWIC / VPOR

If KK = 1 Then
SWIN = SWQW
COUNT =1
Call Module 15.KROKRW
KRWQW = KRW
VMOISZ1 = (1 - SWC - SOR) * VPOR - VMWIC
Else

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
VMOISZ1 = (1 - SWC - SOR) * VPOR - VMWIC - TOTOILPROD
VMWISZ1 = (1 - SWC - SOR) * VPOR - VMOISZ1
SWIN = SWC + VMWISZ1 / VPOR
End If

End Sub

Attribute VB Name = "ModuIe9"


Public TOTOILPROD, TOTQOH
Public TCOLD
Public HFCZT, HFCZ
Public J, DTP
Public TOIL, THF, TQWH, TQOH, COUNT, TOTQW, VWIREM, RW, PR, DV1
Sub PRODO

ReDim TQO(N)
ReDim TQW(N)

'CPW=1 BTU/LB-oF PRATTS, pg.224, FIG.B-64'


'ROW*CPW = 62.4 BTU/CUFT-oF = 0.0022036 BTU/CC-oF'
CPW = 0.0022036

M U W C = 1.0825

PR = Val(Form7.Textl(20).Text)
PW = VaI(Form7.Textl(21).Text)

'Interval production time, I sec.)


DTP = 1

'*** INITIALIZATION ****


TOTQO = 0
TOTQOH = 0
TOTQW = 0
HFCZT = 0
'*** SW = SW initial ****
COUNT = 1
THF = 0
SWW = SWIN

CW = 3 * 10 A-6
CG = 1 / PR

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
119

CT = 0.965 * CW + 0.035 * CG

DV = QI * TINJ
V = (500 * (2.54 A3)) * POR
DP = DV / (V * CT)
PR1 = PR + DP

JJ = TPROD / DTP

For J = 1 To JJ
RW = RTO
COUNTO = 0
TOIL = TAVRG

Call Module8 .OILPROP


MUOH = MUO
Call Module 1l.WATERVISC
Call Module 15.KROKRW

C 1A = Log(RAVRG / RW)
C1B = Log(RE / RW)
Cl =C1A/C1B
C2A = Log(RE / RAVRG)
C2B = Log(RE / RW)
C2 = C2A / C2B

JBAR = 1 / ((MUOH / MUOC) * C l + C2)

Call Module 12.JCOLD

QOH1 = (JBAR * JCS * (PR1 - PW) / 14.7)


COUNTO = 3
Call Module8 .OILPROP
MUOW = MUO

QOC = 2 * PI * (L - LTOT) * KS * KROM * ((PR1 - PW) / 14.7) /


(MUOW * Log(RE / RW))
QOH = (QOHl + QOC) * 0.5
COUNTO = 0

If KRO = 0 Then
JBAR = 0
RWO = 0

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
120

GoTo 4
End If

4 TQOH = QOH * DTP


TOTQO = TOTQO + TQOH
TOTQOH = TOTQOH + QOH1 * 0.5

QW1 = 2 * PI * LTOT * KS * KRWQW * (PR1 - PW) / 14.7


QW 2 = MUW * Log(RAVRG / RW) + MUWC * Log(RE / RAVRG)
Q W = (QW1 / QW2) * 0.5

TQW H = QW * DTP
TOTQW = TOTQW1 + TQWH

If TOTQW > 1 * VWI Then


TQW H = I * VWI - TOTQW1
Q W = TQWH / DTP
TOTQW = TOTQW I + TQWH
End If
TOTQW1 = TOTQW

'Heat loss by fluid produced'


HF = ((QOH1 * CPO + 2 * OW * CPW) * (TAVRG - TR)) * DTP
THF = THF + HF
'Calculate Temp. Cold zone
HFCZ = QOC * 0.5 * CPO * (TCZ - TR) * DTP
HFCZT = HFCZT + HFCZ
Call Module20.TCOLDZPROD
TCZ = TCZP

Form9.Show

If J = JJT h en
Form9.Print J, TAVRG, TOTQO, TOTQW, KRW, KRO, MUO, MUW, JBAR
End If

Print #2, J, TAVRG, TOTQO, TOTQW, SWX, KRW, KRO, QOH, QW, RWO,
JBAR, JCS, PR1, TCZ, HFCZT, HFCZ, RAVRG, LTOT

Call Module 16.TAVGPROD


TAVRG = TAVRG 1

'Sw calculation for next time step production'


Call M odulel 7.SWCAL

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
121

COUNT = 0

DV1 = QI * TINJ - (TOTQW + TOTQO)


Call Module 18.PRCALC

Next J

PR = PR1
TCOLD = TCZ
VWIREM = 0 * (VWI - TOTQW)
If VWIREM < 0 Then
VWIREM = 0
End If

TOTOILPROD = TOTOILPROD + TOTQOH


End Sub

Attribute VB Name = "Module 10"


Public HR
Sub REMAINING()

ReDim HR(N)
HRTOT = 0

For I = I To N
HR(I) = 0.5 * PI * (RAVRG A 2) * DL(I) * CPRF * (TAVRG - TR)
HRTOT = HRTOT + HR(I)
Print #1,1, TAVRG, HR(I), HRTOT
Next I

End Sub

Attribute VB_Name = "Modulel2"


Public JCS, JCSW, MUWC
Sub JCOLD0

MUWC = 1.0825
COUNTO = 3
Call Module8 .OILPROP
MUOW = MUO
KS = Val(Form7.Textl(19).Text)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
122

JCS = 2 * PI * KS * KRO * LTOT / (MUOC * Log(RE / RW))


COUNTO = 0

End Sub

Attribute VB Name = "Modulel5"


Public KRO, KRW, SWX
Sub KROKRW0
If COUNT = 1 Then
SWX = SWIN
Else
SWX = SWW
End If
IfS W X > = 0.85 Then
SWX = 0.85
End If
If SWX < 0.15 Then
SWX = 0.15
End If

'HONARPOUR CALCULATION
KRW1 = 0.035388 * ((SWX - SWC) / (1 - SWC - SOR))
KRW2 = 0.010874 * ((SWX - SOR) / (1 - SWC - SOR)) A 2.9
KRW3 = 0.56556 * (SWX A 3.6) * (SWX - SWC)
KRW = KRW1 - KRW2 + KRW3

NORMALIZED KRO
SWXX = SWC
KROl = 0.76067 * (((I - SWXX) / (1 - SWC) - SOR) / (1 - SO R ))A 1.8
K R 02 = ((1 - SWXX - SOR) / (1 - SWC - SO R))A 2
K R03 = 2.6318 * POR * (1 - SOR) * (1 - SWXX - SOR)
CNORM = KROl * KR02 + KR03

KROl = 0.76067 * (((1 - SWX) / (1 - SWC) - SOR) / (1 - SOR)) A 1.8


K R 02 = ((1 - SWX - SOR) / (1 - SWC - SO R ))A2
KR03 = 2.6318 * POR * (1 - SOR) * (1 - SWX - SOR)
KRO = (KROl * KR02 + KRO3) / CNORM

End Sub
Attribute VB Name = "Module 17"
Public SWW
Sub SWCAL0

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
123

VOP = TQOH
VMOISZ = VMOISZ1 - TOTQOH
VMWISZ = (1 - SOR - SWC) * VPOR - VMOISZ
SWW = SWC + VMWISZ / VPOR

End Sub

Attribute VB_Name = "Module16"


Public TAVRG1
Sub TAVGPRODO

DELTA 1 = THF
DELTA2 = HBAR * PI * RAVRG A 2 * CPRF * (TS - TR)
DELTA = DELTA 1 / DELTA2

SIT = TSOAKT(KK) + J * DTP


Call Module2.VRCALC
Call Module3.VZC ALC
TAVRG 1 = TR + (TS - TR) * ((VR * VZ) * (1 - DELTA) - DELTA)
If TAVRG1 < TR Then
TAVRG 1 = TR
End If

End Sub

Attribute VB_Name = "Module2"


Public VR, TETAR
Public Sub VRCALCO

TETAR = ALPHRES * SIT / (RAVRG A 2)


If TETAR >= 0.02 And TETAR <= 0.025 Then
VR = 0.92 + (((TETAR - 0.025) / 0.005) * (-0.03))
GoTo 10
End If
If TETAR < 0.02 Then
VR = 0.95 + (((TETAR - 0.02) / 0.02) * (-0.05))
GoTo 10
End If
SK = 0.25
SK2 = 0#
For K = 1 To 300

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
c

124

SK2 = SK2 + SK
SKI = ((-1 / TETAR) * (K + 1.5) / ((2 + K) * (3 + K))) * SK
SK = SKI
Next K
VR = (1 / TETAR) * SK2
10

End Sub

Attribute VB Name = "Module3"


Public VZ, TETAZ, HBAR
Public Sub VZCALCO

Z1 = 2 * IW * HS * TINJT(KK)
Z2 = PI * RAVRG A 2 * CPRF * (TS - TR)
ZZ = Z1 / Z2 - LTOT

' HBAR = ZZ + LAVRG


HBAR = ZZ + LTOT

XI = 4 * ALPHRES * (SIT)
X2 = (XI / (PI * HBAR A 2)) A 0.5
X3 = Exp(-HBAR A 2 / X I)

'ERROR FUNCTION CALCULATIONS - from Abramowitz & Stegun’


’Y = ERF(HBAR/(X1A0.5)'

A1 = 0.0705230784
A2 = 0.0422820123
A3 = 0.0092705272
A4 = 0.0001520143
A5 = 0.0002765672
A6 = 0.0000430638

X = H B A R /(X I A0.5)

Y 1 = ( 1 + A 1 * X + A 2 * X A2 + A 3 * X A3 + A 4 * X A4 + A 5 * X A 5 + A 6 * X A6)
A 16
Y = 1 -(1 / Yl ) + 0.0000003
VZ = Y - X2 * (1 - X3)
TETAZ = ALPHRES * SIT / (HBAR / 2)
End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
Attribute VB Name = "Modulel8"
Public PR1
Public Sub PRCALCO
CW = 3 * 10 A-6
CG = 0.2

CT = 0.965 * CW + 0.035 * CG

DV = QI * TINJ
V = (500 * (2.54 A 3)) * POR
DP = DV1 /(V * CT)
PR1 = PR + DP

End Sub

Attribute VB Name = "Module 19"


Public TCZ, TDX, TCZ1
Public Sub TCOLDZONEO
TAVSZ = (TS + TAVRG) / 2
DLCZ = (L - LTOT) / 100
TDX = 0
For I = 1 To 100
NU = a * DLCZ) / ((4 * ALPHRES * SIT) A 0.5)
'ERROR FUNCTION CALCULATIONS - from Abramowitz & Stegun'
'Y = ERF(NU)'

A1 = 0.0705230784
A2 = 0.0422820123
A3 = 0.0092705272
A4 = 0.0001520143
A5 = 0.0002765672
A6 = 0.0000430638

X = NU

Y1 = (1 + A1 * X + A2 * X A2 + A3 * X A 3 + A4 * X A 4 -f- A5 * X A 5 + A6 *
6) A 16
Y = 1 -(1 / Y l) + 0.0000003

If KK = 1 Then
TC = TR
Else
TC = TCZ

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
126

End If

T = (TAVSZ - TC) * (1 - Y) + TC
TDX = TDX + T * DLCZ

Next I
121 TCZ = TDX / ( L - LTOT)
TCZ1 =T C Z

End Sub

Attribute VB Name = "Module20"


Public TCZP, H1CZ, H1CZ1
Public Sub TCOLDZPRODO

'INITIAL HEAT STORED AFTER SOAK


H1CZ = 0.5 * (TCZ - TR) * CPRF * (PI * RAVRG A2 * (L - LTOT))
If J = 1 Then
H1CZ1 = H1CZ
End If

SITCZ = J * DTP

TETAR = ALPHRES * SITCZ / (RAVRG A 2)


If TETAR >= 0.02 And TETAR <= 0.025 Then
VR = 0.92 + (((TETAR - 0.025) / 0.005) * (-0.03))
GoTo 10
End If
I f TETAR < 0.02 Then
VR = 0.95 + (((TETAR - 0.02) / 0.02) * (-0.05))
GoTo 10
End If
SK = 0.25
SK2 = 0#
For K = 1 To 300
SK2 = SK2 + SK
SKI = ((-1 / TETAR) * (K + 1.5) / ((2 + K) * (3 + K))) * SK
SK = SKI
Next K
VR = (1 / TETAR) * SK2
10
VZ= 1

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
127

DELTA 1 = HFCZT
DELTA2 = H1CZ1
DELTA = DELTA 1 / DELTA2

TCZP = TR + (TCZ1 - TR) * ((VR * VZ) * (1 - DELTA) - DELTA)

If TCZP < TR Then


TCZP = TR
End If

End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
128

Program Bottom.vbp

Attribute VB_Name = "Module 1"


Public KROM, KRWM, KS
Public CYCLE, TINJT, TSOAKT, TPRODT, I, NN, ROST
Public TST, HST
Public QI, LT, TR, ROW, CID, COD, IW
Public POR, SOR, SWC
Public CPRF, CPO, MUS, MUOC
Public TA, PI
Public DT
Public LMDRES, ALPHRES, LMDTS, LMDBACK, COND, CHTKN
Sub INPUTDATAO

CYCLE = Val(Form7.Textl(0).Text)
KROM = Val(Form7.Textl(40).Text)
KRWM = Val(Fonn7.Textl(41).Text)
KS = Val(Form7.Textl(37).Text)

NN = CYCLE
ReDim TINJT(NN), TSOAKT(NN), TPRODT(NN)
ReDim TST(NN), HST(NN)
ReDim ROST(NN)
For I = 1 To NN
TINJT(I) = VaI(Form7.Textl(I).Text)
TSOAKT(I) = Val(Form7.Textl(I + 6).Text)
TPRODT(I) = Val(Form7.Textl(I + 12).Text)
TST(I) = VaI(Form7.Textl(I + 18).Text)
HST(I) = Val(Form7.Textl(I + 24).Text)
ROST(I) = Val(Form7.Textl(I + 30).Text)
Next I

QI = Val(Forml.Textl(0).Text)
LT = ValCForml.Textl(l).Text)
TR = Val(Forml.Textl(3).Text)
ROW = Val(Fonnl.Textl(5).Text)
CID = Val(Form 1.Textl (6).Text)
COD = Val(Forml.Textl(7).Text)

POR = Val(Forml.Textl(10).Text)
SOR = V al(Form l.T extl(l l).Text)
SWC = Val(Forml.Textl(12).Text)
CPRF = Val(Form 1.Textl (13).Text)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
129

CPO = Val(Forml.Textl(14).Text)
MUOC = Val(Forml.Text 1(15).Text)
MUS = Val(Forml.Textl(16).Text)

DT = Val(Form l.Textl(17).Text)

'Ambient Temperature, oF1


TA = 63

• ****************** C O N S T A N T S *******************************
PI = 3 .14159

'Heat Conduction Area Constant, CACON'


COND = Val(Form l.Textl(21).Text)
'Heat Taken Constant, CHTKN'
CHTKN = Val(Form l.Textl(24).Text)

'Heat conductivity reservoir,LMDRES,Btu/sec-cm-oF 2.2 btu/hr-ft-oF'


'Heat diffusivity reservoir, ALPHRES,cmA2/sec'
'Heat conductivity to side, LMDTS,Btu/sec-cm-oF'
'Heat conductivity to back, LMDBACK,Btu/sec-cm-oF'
'Heat conduction constant to back, LMDBACK, BTU/cmA2-sec ***(=(TS-
TA)/((L/lambda))

LMDRES = 0.00002
ALPHRES =0.01
LMDTS = 0.00000550642
LMDBACK = 0.0000035429

'Heat capacity tubing, CPTUB,Btu/gr-oF'


'Heat Conductivity tubing,LMDTUB,Btu/sec-cm-oF'
'Density tubing, ROTUB,gr/cc'
'Heat diffusivity tubing, ALPHTUB,cmA2/sec'
'Tubing length, LTUB,cm'
CPTUB = 0.000249
LMDTUB = 0.000182
ROTUB = 7.80112
ALPHTUB = 0.0961
LTUB = 10#

'ALUMINUM'
'Heat Conductivity,LMDAL,Btu/sec-cm-oF’
’Heat diffusivity, ALPHAL,cmA2/sec’
’Length, LAL,cm’

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
130

LMDAL = 0.001086
ALPHAL = 0.9458
LAL = 0.635

End Sub

Attribute VB Name = "Module 10"


Public HR, HRTOT
Sub REMAININGO

ReDim HR(N)
ReDim HRR(N)
HRTOT = 0

For I = 1 To N
HRR(I) = PI * (RAVRG A2) * DL(I) * CPRF * (TAVRG - TR)
HRTOT = HRTOT + HRR(I)
HR(I) = 0.25 * HRR(I)
' Print #1,1, TAVRG, HR(I), HRTOT
Next I

End Sub

Attribute VB_Name = "Module 11"


Public MUW
Sub WATERVISC0

TW = TAVRG
If 60 <= TW And TW < 80 Then
MUW = ( T W - 60) *(0 .8 8 - 1.15)/20 +1.15
GoTo 71
End If
If 80 <= TW And TW < 100 Then
MUW = (TW - 80) * (0.68 - 0.88) / 20 + 0.88
GoTo 71
End If
If 100 <= TW And TW < 120 Then
MUW = (TW - 100) * (0.57 - 0.68) / 20 + 0.68
GoTo 71
End If
If 120 <= TW And TW < 140 Then

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
131

MUW = (TW - 120) * (0.45 - 0.57) / 20 + 0.57


GoTo 71
End If
If 140 <= TW And TW < 160 Then
MUW = (TW - 140) * (0.39 - 0.45) / 20 + 0.45
GoTo 71
End If
If 160 <= TW And TW < 180 Then
MUW = (TW - 160) * (0.35 - 0.39) / 20 + 0.39
GoTo 71
End If
If 180 <= TW And TW < 200 Then
MUW = (TW - 180) * (0.3 - 0.35) / 20 + 0.35
End If
71

End Sub

Attribute VB_Name = "Module 12"


Public JCS, JCSW, MUWC
Sub JCOLD0

MUWC = 1.0825
JCS = 2 * PI * KS * KRO * LTOT I (MUOC * Log(RE / RW))

End Sub

Attribute VB_Name = "Modulel3"


Public RAVRG
Sub LAVG0
' INITIALIZATION
TAREAR = 0
TOTVOL = 0

For I = 1 To N
AREAR = 2 * PI * RH(I, N) * DL(I) * 0.25
TAREAR = TAREAR + AREAR
VTOT = 0.25 * PI * RH(I, N) A2 ♦ DL(I)
TOTVOL = TOTVOL + VTOT

Next I
RAVG = TAREAR / (2 * PI * LTOT * 0.25)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
132

RAVRG = (TOTVOL / (0.25 * PI * LTOT)) A 0.5


VAVRG = PI * RAVRG A 2 * LTOT

Forml l.Show

End Sub

Attribute VB Name = "Module 14"


Public SWQW, KRW QW , VMWIC, VMOISZ 1, RE
Public SWIN, VPOR, VWINT1, VWI, VWIS, VWINJC1
Sub SWINITIALO

Form2.Show
VWINT1 = 0
VWINJC1 = 0
VWI = 0
'*** CALCULATE TOTAL WATER INJECTED,VWI @ CYCLE ***
VWI = QI * TINJT(KK)
' *** TOTAL W TR INJCTD = WTR INJCTD @ CYCLE + WTR INJCTD
REMAINING ***
If K K > 1 Then
VWI = VWI + VWIREM
End If

RE = 12.7
VBULK = 0.25 * PI * RE A 2 * LTOT
VPOR = VBULK * POR

'SWEEP EFFICIENCY, SE
SE = 0.035

'VOLUME MOVEABLE WATER IN THE CHANNEL, VMWIC


VMWIC = SE * (1 - SWC - SOR) * VPOR

'WATER SATURATION FOR WTR PROD,SWQW


SWQW = SWC + VMWIC / VPOR

If KK = 1 Then
SWIN = SWQW
COUNT =1
Call Module 15.KROKRW
KRWQW = KRW
VMOISZ 1 = (1 - SWC - SOR) * VPOR - VMWIC

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
133

Else
VMOISZ 1 = (1 - SWC - SOR) * VPOR - VMWIC - TOTOILPROD
VMWISZ 1 = (1 - SWC - SOR) * VPOR - VMOISZ1
SWIN = SWC + VMWISZ 1 / VPOR
End If

Form l 1.Print VAVRG, VPOR, VS, VC, VOC, SWIN, SOIN, SW INl, VWI
End Sub
Attribute VB Name = "Module 15"
Public KRO, KRW, SWX
Sub KROKRWO
I f COUNT = I Then
SWX = SWIN
Else
SWX = SWW
End If

If SWX >= 0.85 Then


SWX = 0.85
End If

I f SWX < 0.15 Then


SWX = 0.15
End If

' Krw, Honarpour Eq. A -l

KRW1 = 0.035388 * ((SWX - SWC) / (1 - SWC - SOR))


KRW2 = 0.010874 * ((SWX - SOR) / (1 - SWC - SO R ))A 2.9
KRW3 = 0.56556 * SWX A 3.6 * (SW X - SWC)
KRW = KRW1 - KRW2 + KRW3

’ Kro, normalized Honarpour Eq. A-3


SWXX = SWC
K RO l = 0.76067 * (((1 - SWXX) / (1 - SWC) - SOR) / (1 - SOR)) A 1.8
K R 02 = ((I - SWXX - SOR) / (1 - SW C - SOR)) A 2
K R 03 = 2.6318 * POR * (1 - SOR) * (1 - SWXX - SOR)
CNORM = KROl * K R 02 + KR03

K RO l = 0.76067 * (((1 - SWX) / (1 - SWC) - SOR) / (1 - SOR)) A 1.8


K R 02 = ((1 - SWX - SOR) / (I - SWC - SO R))A2
K R 03 = 2.6318 * POR * (1 - SOR) * (1 - SWX - SOR)
KRO = (KROl * K R 02 + KR03) / CNORM
End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
134

Attribute VB Name = "Modulel6"


Public TAVRG1
Sub TAVGPRODO

DELTA 1 = THF
DELTA2 = 2 * HBAR * PI * RAVRG A 2 * CPRF * (TS - TR)
DELTA = DELTA 1 / DELTA2

SIT = TSOAKT(KK) + J * DTP


Call Module2.VRCALC
Call Module3.VZCALC

TAVRGl = TR + (TS - TR) * ((VR * VZ) * (1 - DELTA) - DELTA)


If TAVRG1 < TR Then
TAVRGl = T R
End If
End Sub

Attribute VB_Name = "Modulel7,f


Public SWW
Sub S W C A L O

VMOISZ = VMOISZ1 - TOTQOH


VMWISZ = (1 - SOR - SWC) * VPOR - VMOISZ
SWW = SWC + VMWISZ / VPOR

End Sub

Attribute VB Name = "Module 18"


Public PR1
Public Sub PRCALCO

CW = 3 * 10 A-6
CG = 1 / PR
CT = 0.965 * CW + 0.035 * CG

V = (500 * (2.54 A 3)) * POR


DP = DV1 /(V * CT)
PR1 = PR + DP
End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
135

Attribute VB Name = "Module2"


Public VR, TETAR
Public Sub VRCALCO

TETAR = ALPHRES * SIT / (RAVRG A 2)


IF TETAR >= 0.02 And TETAR <= 0.025 Then
V R = 0.92 + (((TETAR - 0.025) / 0.005) * (-0.03))
GoTo 10
End If

If TETAR < 0.02 Then


VR = 0.95 + (((TETAR - 0.02) / 0.02) * (-0.05))
GoTo 10
End If
SK = 0.25
SK2 = 0#
For K = 1 To 300
SK2 = SK2 + SK
SKI = ((-1 / TETAR) * (K + 1.5) / ((2 + K) * (3 + K))) * SK
SK = SKI
Next K
VR = (1 / TETAR) * SK2
10
End Sub

Attribute VB_Name = "Module20"


Public TCZ, TDX, TCZ1
Public Sub TCOLDZONE0

TAVSZ = (TS + TAVRG) / 2


DLCZ = (L - LTOT) /100
TDX = 0

For I = 1 To 100
NU = (I * DLCZ) / ((4 * ALPHRES * SIT) A 0.5)
'ERROR FUNCTION CALCULATIONS - from Abramowitz & Stegun'
'Y = ERF(HBAR/(X1A0.5)'

A1 = 0.0705230784
A2 = 0.0422820123
A3 = 0.0092705272
A4 = 0.0001520143
A5 = 0.0002765672

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
136

A6 = 0.0000430638

X = NU

Y 1 = ( 1 + A 1 * X - f A2 * X a 2 + A 3 * X a 3- f A4 * X a 4 + A 5 * X a 5 + A 6 * X a
6) A 16
Y = 1 - (1 / Yl ) + 0.0000003

If KK = 1 Then
TC = T R
Else
TC = TCZ
End If

T = (TAVSZ - TC) * (1 - Y) + TC
TDX = TDX + T * DLCZ
Next I

If L = LTOT Then
TCZ = TAVRG
GoTo 505
End If

TCZ = TDX / (L - LTOT)


TCZ 1 = TCZ

505
End Sub

Attribute VB Name = "ModuIe21"


Public TCZP, H1CZ1
Public Sub TCOLDZPROD0

'INITIAL HEAT STORED AFTER SOAK


If L = LTOT Then
TCZP = TAVRG
GoTo 505
End If

H1CZ = 0.25 * (TCZ - TR) * CPRF * (PI * RAVRG A 2 * (L - LTOT))

If J = 1 Then
H1CZ1 = H1CZ

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
137

End If

SITCZ = J * DTP
TETAR = ALPHRES * SITCZ / (RAVRG A 2)
If TETAR >= 0.02 And TETAR <= 0.025 Then
VR = 0.92 + (((TETAR - 0.025) / 0.005) * (-0.03))
GoTo 10
End If
If TETAR < 0.02 Then
VR = 0.95 + (((TETAR - 0.02) / 0.02) * (-0.05))
GoTo 10
End If
SK = 0.25
SK2 = 0#
For K = 1 To 300
SK2 = SK2 + SK
SKI = ((-1 / TETAR) * (K + 1.5) / ((2 + K) * (3 + K))) * SK
SK = SKI
Next K
VR = (1 / TETAR) * SK2
10

VZ= 1

DELTA 1 = HFCZT
DELTA2 = H1CZ1
DELTA = DELTA1 / DELTA2

TCZP = TR + (TCZ1 - TR) * ((VR * VZ) * (1 - DELTA) - DELTA)


If TCZP < T R Then
TCZP = TR
End If
505
End Sub

Attribute V B N am e = "ModuIe22"
Sub ENDWELL0

For J = II To N
For K = J To 1 Step -1

If K > II Then
RH(K, J) = 0

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
138

GoTo 11
End If

If K = II Then

A1 = 0.25 * PI * DL(K) * CCONV


A2 = 0
A3 = 0
A4 = COND * (0.25 * PI) * CCONDB

B = COND * 2 * DL(K) * CCONDS

C l = -(0.25) * PI * RH(K, J - 1) A 2 * DL(K) * CCONV


C2 = 0#
C3 = 0 #
C4 = -(0.25 * PI) * CCONDB * RT A 2
C5 = -(DL(K) / LTOT) * (IW * HS * DT) - HREM

A = A l + A2 + A3 + A4
C = C1 + C 2 + C 3 + C 4 + C5
RH(K, J) = (-B + ( B A2 - 4 * A * C ) A0.5) / (2 * A)

GoTo 11
End If

If K. = 1 Then
A1 = 0.25 * PI * DL(1) * CCONV
A2 = COND * (0.25 * PI) * CCONDB
A3 = FACR * COND * (0.25 * PI) * CCONDR
A = A1 + A2 + A3

B = COND * 2 * DL(K) * CCONDS

C l = -(0.25) * PI * RH(K, J - 1) A 2 * DL(K) * CCONV


C2 = (0.25 * PI) * RT A 2 * CCONDB
C3 = -FACR * COND * (0.25 * PI) * RH(K + 1, J) A 2 * CCONDR
C4 = 0
C5 = -(DL(K) / LTOT) ♦ (IW * HS * DT) - HREM

C = C1 + C 2 + C 3 + C 4 + C5

RH(K, J) = (-B + ( B A2 - 4 * A * C ) A 0.5) / (2 * A)

GoTo 11

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
139

End If

If K > 1 And K < II Then

A1 = 0.25 * PI * DL(K) * CCONV


A2 = 0
A3 = FACR * COND * (0.25 * PI) * CCONDR
A = A1 +A 2 + A3

B = COND * 2 * DL(K) * CCONDS

C l = -(0.25) * PI * RH(K, J - I) * 2 * DL(K) * CCONV


C2 = 0
C3 = -FACR * COND * (0.25 * PI) * RH(K + 1, J) A 2 * CCONDR
C4 = 0
C5 = -(DL(K) / LTOT) * (IW * HS * DT) - HREM

C = C1 + C 2 + C3 + C 4 + C5

RH(K, J) = (-B + ( B A2 - 4 * A * C ) A 0.5) / (2 * A)


End If
If J = N Then
Print # 1 ,1, K, DL(K), RH(K, I)
End If
11 Next K

Next J

End Sub

Attribute VB_Name = "Module3"


Public VZ, TETAZ, HBAR
Public Sub VZCALC0

Z1 = 4 * IW * HS * TINJT(KK) + HRTOT
Z2 = PI * RAVRG A 2 ♦ CPRF * (TS - TR)
ZZ = Z1 / Z2 - LTOT

HBAR = ZZ + LTOT

XI = 4 * ALPHRES * (SIT)
X2 = (XI / (PI * HBAR A 2 ))A 0.5
X3 = Exp(-HBAR A 2 / X I)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
140

’ERROR FUNCTION CALCULATIONS - from Abramowitz & Stegun'


'Y = ERF(HBAR/(X1A0.5)'

A1 = 0.0705230784
A2 = 0.0422820123
A3 = 0.0092705272
A4 = 0.0001520143
A5 = 0.0002765672
A6 = 0.0000430638

X = H B A R /(X I A 0.5)

Y1 = (1 + A1 * X + A2 * X A 2 + A3 * X A 3 + A4 * X A4 + A 5 * X A5 + A6 * X A 6)
A 16
Y = 1 -(1 / Yl ) + 0.0000003

VZ = Y - X 2 * (1 -X 3)
TETAZ = ALPHRES * SIT / ((HBAR / 2) A 2)

End Sub

Attribute VB_Name = "Module4"


Public L, RT, RTO
Sub CHANGEUNITQ

'Injection Rate, QI cc/min to cc/sec'


'Wellbore Length, L inch to cm'
'Steam Density, ROS Ib/cuft to lb/cc'
'Water Density, ROW lb/cuft to lb/cc'
'ID Casing, CID inch to cm'
'OD Casing, CID inch to cm ’
'Heat Capacity Reservoir, CPRF btu/cuft-oF to btu/cc-oF'
'Heat Conductivity Oil, CPO btu/cuft-oF to btu/cc-oF'

QI = QI / 60#
L = LT * 2.54
ROW = ROW / (30.48 A 3#)
CID = CID * 2.54
COD = COD * 2.54

CPRF = CPRF / (30.48 A 3)


CPO = CPO / (30.48 A 3)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
141

'Heat Conductivity Teflon, LMDT, BTU/hr ft oF to BTU/sec cm oF'


LMDT = 0.1333
LMDT = LMDT / (3600 * 30.48)

' *** VARIABLES CALCULATIONS ****

’TUBING RADIUS, RT, CM


'TUBING SEGMENT LENGTH, DL, CM
'Tubing Area, ATUB, cmA2
'TEMP AVERAGE, TAVG, oF
'MASS INJECTION RATE, IW, LB/SEC

RT = CID / 2
RTO = COD / 2
ATUB = PI * (RTO A2 - RT A 2)
IW = QI * ROW
End Sub

Attribute VB_Name = "ModuIe5"


Public II, CCONV, CCONDR, CCONDB, CCONDS, FACR
Public TSIPS, VWIPS
Public THINJSEGT, THCOND, THCVRES, TOTHTKN
tmblic N
Public DL, RH, QS, LTOT
Sub STEAMZONE0

.********* INITIALIZATIONS **************


■* * * * * * * * Number o f S egm en t, N ************
N = Int(TINJ / DT)

ReDim RH(N, N), QS(N), DL(N)


ReDim THINJSEGT(N), THCOND(N), THCVRES(N), TOTHTKN(N)
ReDim TSIPS(N), VWIPS(N)

For I = 1 To N
TSIPS(I) = 0
Next I

TTOT = 0
LTOT = 0

THINJTOT = 0
THCCAP = 0
THINJMOD = 0

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
THCBACK = 0
THCSIDE = 0
TH C R ES= 0

FACR = (D T A 0.5)

For K = 2 To N
For I = 1 To K - 1
RH(K, I) = RT
Next I
Next K

CCONV = CPRF * (TS - TR)


CCONDR = 2 * LMDRES * (TS - TR) * (DT A0.5) / ((PI * ALPHRES)
CCONDB = LMDBACK * DT
CCONDS = LMDTS * DT

' Condition o f NO CONDUCTIONS


If COND = 0 Then
CCONDR= 0
CCONDB = 0
CCONDS = 0
End If

For I = 1 To N
TTOT = TTOT + DT
If K K > 1 Then
If O >= I Then
HREM = HR(I) / ((O - 1) + 1)
Else
HREM = 0
End If
End If

If I = 1 Then

ROS2 = ROS
HS2 = HS
If K K > 1 Then
DLL1 = (IW * HS2 * DT) - (TW * HS2 * DT / (I + MUS / MUO))
TRW = TR
Else

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
143

DLL1 = (IW * HS2 * DT) - (IW * HS2 * DT / (1 + MUS / M U O »


TRW = TR
End If
DLL2 = PI * RT A 2 * (ROS2 * HS2 + CPO * (TS - TRW) - (ROS2 * HS2) / (1
+ MUS / MUO))
DL(I) = DLL1 / DLL2
LTOT = LTOT1 + DL(I)

If LTOT >= L Then


DL(I) = L - LTOT1
LTOT = LTOT1 +- DL(I)
End If
LTOT1 = LTOT

QSI = ((IW / ROS2) - (PI * RT A 2 * DL(I) / DT)) / (1 + MUS / MUO)


CHIN = ROS2 * HS2 * DT * QSI

GoTo 150
Else

ROS2 = ROS
HS2 = HS

End If

LL1 = (IW * HS2 * DT) - QSI * ROS2 * HS2 * DT


LL2 = PI * RT A 2 * (ROS2 * HS2 + CPO * (TS - TRW))
DL(I) = LL1 / LL2

LTOT = LTOT1 + DL(I)

If LTOT > L Then


DL(I) = L - LTOT1
LTOT = LTOT1 + DL(I)
II = I

Call Module22.ENDWELL
GoTo 10000

End If
LTOT1 = LTOT

QS(I) = (DL(I) / LTOT) * QSI

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
144

150 For K = I To 1 Step -1


THCBACK = 0
THCSIDE = 0
TH C R ES= 0

If K K > 1 Then
If O >= I Then
HREM = HR(K) / ((O - K) + 1)
Else
HREM = 0
End If
End If

If K = I Then
RX = RT
RY = RT
Else
RX = R H (K + 1 ,1)
RY = RH(K, I - 1)
End If

If K = 1 And 1 = 1 Then

A1 = 0.25 * PI * DL(K) * CCONV


A2 = COND * (0.25 * PI) * CCONDB
A3 = FACR * COND * (0.25 * PI) * CCONDR
A = A1 + A2 + A3

B = COND * 2 * DL(1) * CCONDS

C l = -0.25 * PI * RT A 2 * DL(K) * CCONV


C2 = -COND * (0.25 * PI) * RT A 2 * CCONDB
C3 = -FACR * COND * (0.25 * PI) * RT A2 * CCONDR
C4 = -(DL(1) / LTOT) * CHIN - HREM
C5 = 0

C = C1 + C 2 + C3 + C 4 + C5

RRI = ( - B + ( B A2 - 4 * A * C ) A 0.5) / (2 * A)

THINJSEG = (DL(1) / LTOT) * QSI * ROS2 * HS2 * DT

HCVRES = 0.25 * PI * (R R IA 2 - RT A 2) * DL(K) * CCONV


HCBACK = COND * (0.25 * PI) * (R R IA 2 - RT A 2) * CCONDB

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
145

HCSIDE = COND * 2 * RRI * DL(1) * CCONDS


HCRES = FACR * COND * (0.25 * PI) * (R R IA 2 - RT A 2) * CCONDR

THINJSEGT(K) = THINJSEGT(K) + THINJSEG


THCVRES(K) = THCVRES(K) + HCVRES
THCOND(K) = THCOND(K) + HCBACK + HCSIDE + HCRES

TSIPS(K) = TSIPS(K) + (DL(K) / LTOT) * QSI * DT

1Heat Balance
' THINJSEG = HCVRES +- HCBACK + HCRES + HCSIDE

GoTo 100

End If

If K = 1 Then
A1 = 0.25 * PI * DL(1) * CCONV
A2 = COND * (0.25 * PI) * CCONDB
A3 = FACR * COND * (0.25 * PI) * CCONDR
A = A1 + A 2 + A 3

B = COND * 2 * DL(K) * CCONDS

C l = -(0.25) * PI * RH(K, I - 1 )A 2 * DL(1) * CCONV


C2A = -COND * (0.25 * PI) * RH(K, I - 1) A2 * CCONDB
C2B = 0.25 * PI * (RH(K, I - 1) A2 - RT A 2) * CCONDB
C2 = C2A + C2B
C3A = -FACR * COND * (0.25 * PI) * RH(K + 1 ,1) A 2 * CCONDR
C3B = FACR * COND * (1 - CHTKN) * (0.25 * PI) * ((RH(K + 1 ,1) A 2 - RH(K
+ 1 ,1 - 1 )A 2)) * CCONDR

If CHTKN = 0 Then
C3B = 0
End If

C3 = C3A + C3B
C4 = -(DL(1) / LTOT) * CHIN - HREM
C5 = 0
C6A = -COND * 2 * (RH(K, I - 1)) * DL(1) * CCONDS
C6B = 2 * (RH(K, I - 1)) * DL(1) * CCONDS
C6 = C6A + C6B

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
146

C = C1 + C 2 + C 3 + C 4 + C5 + C6

RRI = (-B + (B A2 - 4 * A * C) A 0 .5 )/(2 * A)

THINJSEG = (DL(1) / LTOT) * QSI * ROS2 * HS2 * DT

HCVRES = (0.25) * PI * (R R IA2 - RH(K, I - 1) A 2) * DL(K) * CCONV


HCBACK1 = COND * (0.25 * PI) * (R R IA2 - RH(K, I - 1) A 2) * CCONDB
HCBACK2 = 0.25 * PI * (RH(K, I - 1) A 2 - RT A 2) * CCONDB
HCBACK = HCBACK 1 + HCBACK2
HCSIDE 1 = COND * 2 * (RRI - RH(K, I - 1)) * DL(1) * CCONDS
HCSIDE2 = 2 * (RH(K, I - 1)) * DL(1) * CCONDS
HCSIDE = HCSIDE 1 + HCSIDE2
HCRES 1 = FACR * COND * (0.25 * PI) * (R R IA 2 - RH(K + 1 ,1) A 2) *
CCONDR
HCRES2 = FACR * COND * (1 - CHTKN) * (0.25 * PI) * ((RH(K + 1 ,1) A 2 -
RH(K + 1 ,1 - 1 )A 2)) * CCONDR

If CHTKN = 0 Then
HCRES2 = 0
End If

HCRES = HCRES 1 + HCRES2

THINJSEGT(K) = THINJSEGT(K) + THINJSEG


THCOND(K) = THCOND(K) + HCBACK + HCSIDE + HCRES
THCVRES(K) = THCVRES(K) + HCVRES
TOTHTKN(K) = 0

TSIPS(K) = TSIPS(K) + (DL(K) / LTOT) * QSI * DT


GoTo 100
End If

If K = I Then

Z=0

A1 = 0.25 * PI * DL(K) * CCONV


A2 = 0
A3 = FACR * COND * (0.25 * PI) * CCONDR
A4 = -FACR * CHTKN * COND * (0.25 * PI) * CCONDR

B = COND * 2 * DL(K) * CCONDS

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
147

C l = -0.25 * PI * (RT A 2) * DL(K) * CCONV


C2 = 0!
C3A = -FACR * COND * (0.25 * PI) * RT A 2 * CCONDR
C3B = FACR * CHTKN * COND * (0.25 * PI) * RT A 2 * CCONDR
C4 = -(DL(K) / LTOT) * CHIN - HREM

510 A = A 1 + A 2 + A3 + A4

C = C1 + C 2 + C3A + C3B + C4

RRI = (-B + (B A 2 - 4 * A * C) A 0 . 5 ) / ( 2 * A)
RX = RRI
If Z = I Then GoTo 520
If RRI > RH(K - 1 , 1 - 1 ) Then
Z= I
RX = R H (K - 1 , 1 - 1 )
A4 = 0
C3B = -FACR * CHTKN * COND * (0.5 * PI) * (RX A 2 - RT A 2) *
CCONDR
GoTo 510
End If

520 THINJSEG = (DL(K) / LTOT) * CHIN


THTKN = FACR * CHTKN * COND * (0.25 * PI) * (RX A 2 - RT A 2) *
CCONDR

HCVRES = 0.25 * PI * (RRIA 2 - RT A 2) * DL(K) * CCONV


HCBACK = 0
HCSIDE = COND * 2 * RRI * DL(K) * CCONDS
HCRES = FACR * COND * (0.25 * PI) * (RRI A 2 - RT A 2) * CCONDR

THINJSEGT(K) = THINJSEGT(K) + THINJSEG + THTKN


THCVRES(K) = THCVRES(K) + HCVRES
THCOND(K) = THCOND(K) + HCBACK + HCSIDE + HCRES
TOTHTKN(K) = TOTHTKN(K) + THTKN
TSIPS(K) = TSIPS(K) + (DL(K) / LTOT) * QSI * DT

GoTo 100

Else

Z=0

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
148

A1 = (0.25) * PI * DL(K) * CCONV


A2 = 0
A3 = FACR * COND * (0.25 * PI) * CCONDR
A4 = -FACR * CHTKN * COND * (0.25 * PI) * CCONDR

B = COND * 2 * DL(K) * CCONDS

C l = -(0.25) * PI * (RH(K, I -1 ) * 2) * DL(K) * CCONV


C2 = 0!
C3A = -FACR * COND * (0.25 * PI) * RH(K + 1 ,1) A 2 * CCONDR
C3B = FACR * CHTKN * COND * (0.25 * PI) * RH(K, I - 1)A2 * CCONDR
C3C = FACR * COND * (1 - CHTKN) * (0.25 * PI) * ((RH(K + 1 ,1) A 2 - RH(K
+ 1,1- 1) A2))* CCONDR

If CHTKN = 0 Then
C3C = 0
End If

C3 = C3A + C3B + C3C


C4 = -(DL(K) / LTOT) * CHIN - HREM
C6A = -COND * 2 * RH(K, I - 1) * DL(K) * CCONDS
C6B = 2 * RH(K, I - 1) * DL(K) * CCONDS
C6 = C6A + C6B

610 A = A 1 + A 2 + A 3 + A4
C = C1 + C 2 + C 3 + C 4 + C6

RRI = (-B + (B A 2 - 4 * A * C) A 0.5) / (2 * A)

IfZ = 1 Then
GoTo 620
End If

RX = RRI

If RRI > RH(K - 1 ,1 - 1) Then


Z= 1
RX = R H (K - 1,1-1)
A4 = 0
C3B = -FACR * CHTKN * COND * (0.25 * PI) * (RX A 2 - RH(K, I - I) A 2) *
CCONDR
GoTo 610
End If

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
149

620 THINJSEG = (DL(K) / LTOT) * QSI * ROS2 * HS2 * DT


THTKN = FACR * CHTKN * COND * (0.25 * PI) * (RX A 2 - RH(K, I - 1) A 2)
* CCONDR

HCVRES = (0.25) * PI * ( RRI A2 - RH(K. I - 1)A 2) * DL(K) * CCONV


HCBACK = 0
HCRES 1 = FACR * COND * (0.25 * PI) * (RRIA 2 - RH(K + 1 , 1) A 2) *
CCONDR
HCRES2 = FACR * COND * (1 - CHTKN) * (0.25 * PI) * ((RH(K + 1 ,1) A 2 -
RH(K + 1 ,1 - 1) A2)) * CCONDR

If CHTKN = 0 Then
HCRES2 = 0
End If

HCRES = HCRES I + HCRES2


HCSIDE 1 = COND * 2 * (RRI - RH(K, I - 1)) * DL(K) * CCONDS
HCSIDE2 = 2 * RH(K, I - 1) * DL(K) * CCONDS
HCSIDE = HCSIDE 1 + HCSIDE2

THINJSEGT(K) = THINJSEGT(K) + THINJSEG + THTKN


THCOND(K) = THCOND(K) + HCBACK + HCSIDE + HCRES
THCVRES(K) = THCVRES(K) + HCVRES
TOTHTKN(K) = TOTHTKN(K) + THTKN

End If
TSIPS(K) = TSIPS(K) + (DL(K) / LTOT) * QSI * DT

100 RH(K, I) = 1 * RRI

If I = N Then

VWIPS(K) = TSIPS(K) * ROS / ROW


TVWI = TVWI + VWIPS(K)

Form3.MSFlexGridl.Col = 0
Form3 .MSFlexGrid 1.ROW = N - K + 1
Form3.MSFlexGridl .Text = I

Form3. MSFlexGrid 1.Col = 1


Form3.MSFlexGrid 1.ROW = N - K + 1

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
150

Form3.MSFlexGridl .Text = K

Form3.MSFlexGrid 1.Col = 2
Form3 .MSFlexGrid 1.ROW = N - K + 1
Form3.MSFlexGridl .Text = Round(RH(K, I), 6)

Fonn3.MSFlexGridl.Col = 3
Form3.MSFIexGridl .ROW = N - K + 1
Fonn3.MSFlexGrid 1.Text = Round(LTOT, 4)

Forai3.MSFlexGrid 1.Col = 4
Form3 .MSFlexGrid 1.ROW = N - KL+ 1
Form3.MSFIexGridl.Text = Round(THINJSEGT(K), 3)

Form3.MSFlexGrid 1.Col = 5
Form3.MSFlexGridl.ROW = N - KL+ I
Form3.MSFlexGrid 1.Text = Round(THCVRES(K), 3)

Form3.MSFlexGrid 1.Col = 6
Form3.MSFlexGridl.ROW = N - K + 1
Form3.MSFlexGridl.Text = Round(THCOND(K), 3)

Form3.MSFlexGrid 1.Col = 7
Form3.MSFlexGridl.ROW = N - K + 1
Form3.MSFlexGrid 1.Text = Round(VWTPS(K), 3)

THINJTOT = IW * DT * HS2
Print # 1 ,1, K, DL(K), RH(K, I)
End If
Next K
10
Next I
10000
End Sub

Attribute VB_Name = "Module6"


Public ROS
Public TS, HS
Public TINJ, SIT, TPROD, KK, O, COUNTO

Sub MAINCALC()
'*****OPEN OUTPUT FILES*****'

F0UT1S = Forml.Textl(22).Text

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
151

FOUT2$ = Form l.Textl(23).Text

Open FOUT1S For Append As #1


Open FOUT2S For Append As #2

Form 1.Hide
Form3.Show
CaU Form 1.HEADER

HRTOT = 0

For KK = 1 To CYCLE
Form3.Textl .Text = KK

TINJ = TINJT(KK)
SIT = TSOAKT(KK)
TPROD = TPRODT(KK)
TS = TST(KK)
HS = HST(KK)
ROS = ROST(KK)
'CHANGE UNIT ROS lb/cuft to lb/cc
ROS = ROS / (30.48 A 3#)

COUNTO =1

Call ModuIe8.0ILPROP
Call Module5 .STEAMZONE
Call Module 13.LAVG
Call Module7.SOAK

COUNTO = 0
Call Module8 .OILPROP
Call Module 14. S WINITIAL

Form4.Show
Call Module9.PROD
Call Module 10.REMAINING
0 =N
807 Next KK
Close #1
Close #2
End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
152

Attribute V B N a m e = "Module7"
Public TAVRG, ZZ, TRH
Sub SOAKO

STTOT = 0
Call Module2.VRCALC
Call Module3.VZCALC

If KK = 1 Then
TRH = TR
Else
TRH = TAVRG
End If

TAVRG = TR + (TS - TR) * (VR * VZ)


Forml 1.Print TAVRG
COUNTO = 3
Call Module20.TCOLDZONE

808
End Sub

Attribute VB Name = "Module8"


Public MUO
Sub OILPROPO

If COUNTO = 1 Then
TOIL = TS
Else
TOIL = TAVRG
End If

If COUNTO = 3 Then
TOIL = TCZ
End If

MUO = 10 A 15 * (TOIL A -5.9844)

End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
153

Attribute VB Name = "Module9"


Public TOTQOH
Public J, DTP
Public TOIL, THF, TQWH, TQOH, COUNT, TOTQW, VWIREM, RW, PR, DV1
Sub PRODO

ReDim TQO(N)
ReDim TQW(N)

’CPW=1 BTU/LB-oF PRATTS, pg.224, FIG.B-64'


'ROW*CP W = 62.4 BTU/CUFT-oF = 0.0022036 BTU/CC-oF’
CPW = 0.0022036
MUWC = 1.0825

PR = Val(Form7.Textl(38).Text)
PW = Val(Form7.Textl(39).Text)

CW = 3 * 10 A -6
CG = 1 / PR
CT = 0.965 * C W + 0.035 * CG

DV = QI * TINJ
V = (500 * (2.54 A 3)) * POR
DP = DV / (V * CT)
PR1 = PR + DP

'Interval production time, 1 sec.)


DTP = 1

’*** INITIALIZATION ****


TOTQO = 0
TOTQW = 0
TOTQW 1 = 0
HFCZT = 0
COUNT = 1
THF = 0

SWW = SWIN
JJ = TPROD / DTP

For J = 1 To JJ

RW = RTO

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
154

COUNTO = 0
TOIL = TAVRG

Call Module8 .OILPROP


MUOH = MUO
Call Module 1l.W ATERVISC
Call Module 15 .KROKRW

C 1A = Log(RAVRG / RW )
C1B = Log(RE / RW)
Cl =C1A/C1B
C2A = Log(RE / RAVRG)
C2B = Log(RE / RW)
C2 = C2A / C2B

JBAR = 1 / ((MUOH / M UOC) * C l + C2)

Call Module 12.JCOLD

QOH1 = (JBAR * JCS * (PR1 - PW) /14.7)


COUNTO = 3
Call Module8.OILPROP
MUOW = MUO
If LTOT > L Then
LTOT = L
End If
QOC = (2 * PI * (L - LTOT) * KS * KROM * (PR1 - PW) / 14.7) / (MUOW *
Log(RE / RW))
QOH = (QOH1 + QOC) * 0.25
COUNTO = 0

If KRO = 0 Then
RWO = 0
GoTo 4
End If

4 TQOH = QOH * DTP


TQOH1 = QOH1 * DTP * 0.25
TOTQO = TOTQO + TQOH
TOTQOH = TOTQOH + TQOH I

QW1 = 2 * PI * LTOT * K S * KRWQW * (PR1 - PW) / 14.7


QW2 = MUW * Log(RAVRG / RW) + MUWC * Log(RE / RAVRG)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
QW = (QW1 / QW2) * 0.25

TQWH = QW * DTP
TOTQW = TOTQW 1 + TQWH

If TOTQW > 1 * VWI Then


TQWH = 1 * VWI - TOTQW 1
QW = TQWH / DT
TOTQW = TOTQW1 + TQWH
End If

TOTQW1 = TOTQW

'Heat loss by fluid produced'


HF = ((0.25 * QOH1 * CPO + QW * CPW) * (TAVRG - TR)) * DTP
THF = THF + HF
'Calculate temp cold zone'
HFCZ = QOC * 0.25 * CPO * (TCZ - TR) * DTP
HFCZT = HFCZT + HFCZ
Call Module21.TCOLDZPROD
TCZ = TCZP

Form9.Show

If J = TPROD Then
Form9.Print J, TAVRG, TOTQO, TOTQW, KRW, KRO, JBAR, RAVRG, 0.25
HRTOT
End If

Print #2, J, TAVRG, TOTQO, TOTQW, SWX, KRW, KRO, QOH, QW, RWO,
JBAR, JCS, PR1, TCZ, LTOT, L, LTOT, RAVRG, 0.25 * HRTOT

Call Module 16.TAVGPROD


TAVRG = TAVRG 1

'Sw calculation for next time step production'


Call Module 17.SWCAL

COUNT = 0

DV1 = QI * TINJ - (TOTQW + TOTQO)


Call Module 18.PRCALC

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
156

Next J

PR = PR1
TCOLD = TCZ

VWIREM = 0 * (VWI - TOTQW)


If VWIREM < 0 Then
VWIREM = 0
End If
End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
157

Program VERTICAL.VBP

Public Sub Commandl_Click()


'*** INPUT DATA ******
Call Modulel.INPUTDATA
Form7.Hide

For I = 1 To NN
Print TINJT(I), TSOAKT(I), TPRODT(I)
Next I

Call Module4.CHANGEUNIT
Call Module6.MAINCALC

End Sub

Attribute VB Name = "ModuIe4"


Public L, RT, RTO, IW
Sub CHANGEUNITO

'Injection Rate, QI cc/min to cc/sec'


'Wellbore Length, L inch to cm'
'Steam Density, ROS lb/cuft to lb/cc'
'Water Density, ROW Ib/cuft to lb/cc'
'ID Casing, CID inch to cm'
'OD Casing, CID inch to cm'
'Heat Capacity Reservoir, CPRF btu/cuft-oF to btu/cc-oF'
'Heat Conductivity Oil, CPO btu/cuft-oF to btu/cc-oF'

QI = QI / 6 0 #
L = LT * 2.54
ROS = ROS / (30.48 A 3#)
ROW = ROW / (30.48 A 3#)
CID = CID * 2.54
COD = COD * 2.54
CPRF = CPRF / (30.48 A 3)
CPO = C P O /(30.48 A3)

'Heat Conductivity Teflon, LMDT, BTU/hr ft oF to BTU/sec cm oF'


LMDT = 0.1333
LMDT = LMDT / (3600 * 30.48)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
158

' *** VARIABLES CALCULATIONS ****

TUBING RADIUS, RT, CM


'TUBING SEGMENT LENGTH, DL, CM
Tubing Area, ATUB, cmA2
'TEMP AVERAGE, TAVG, oF
MASS INJECTION RATE, IW, LB/SEC
RT = CID / 2
RTO = COD / 2
ATUB = PI * (RTO A2 - RT A 2)
IW = QI * ROW

End Sub

Attribute VB_Name = "ModuIe6"


Public TINJ, SIT, TPROD, KK, O, COUNTO
Sub MAINCALCQ

•*****OPEN OUTPUT FILES*****'

FOUT1S = Form 1.Text 1(22).Text


FOUT2S = Form 1.Text 1(23 ).Text
Open FOUT1S For Append As #1
Open FOUT2S For Append As #2

Form 1.Hide
Form3.Show
Call Form 1.HEADER

For KK = 1 To CYCLE
Form3.Textl .Text = KK
TINJ = TINJT(KK)
SIT = TSOAKT(KK)
TPROD = TPRODT(KK)
COUNTO = 1
Call ModuIe5.STEAMZONE
Call Module 13.RAVG
Call Module7.SOAK
Call Module 14.SWINITIAL
Form4.Show
Call Module9.PROD
Call Module 10.REMAINING
0 =N

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
159

807 Next KK
Close #1
Close #2
End Sub

Attribute VB Name = "Module5"


Public SI
Public RH
Sub STEAMZONE0

'CALCULATE TAU'
TAU = (4 * ALPHRES * TINJ) / (L A 2)
’TET A=(RO*C)ob/(RO*C)rf
TETA = 1

SI = T A U / T E T A
rPSI=(EXP(S 1)*erfc(S 1)+(2/(PIA.5))*(S 1A.5)-1)*TETA

Call Module 18.ERORFC

PSI = Exp(Sl) * S3 + (2 / ( P I A 0.5)) * (S 1 A 0.5) - 1


MS = IW * TINJ
RRI = L * MS * HS * PSI
RR2 = 4 * LMDRES * PI * (TS - TR) * TINJ
RH = (RRI / RR2) A 0.5

End Sub

Attribute VB Name = "Modulel8"


Public S3
Public Sub ERORFC0

'ERROR FUNCTION CALCULATIONS - from Abramowitz & Stegun'


'Y = ERF(HBAR/(X1A0.5)'

X = (S1 A0.5)
A1 = 0.0705230784
A2 = 0.0422820123
A3 = 0.0092705272
A4 = 0.0001520143
A5 = 0.0002765672
A6 = 0.0000430638

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
160

Y1=(H-A 1*X + A 2 * X a 2 + A3* X a 3 + A 4 * X a 4 + A 5 * X a 5 + A6* X a 6)


A 16
Y = 1 - ( i / Y l ) + 0.0000003
S3 = 1 - Y

End Sub

Attribute V B N a m e = "Module 13"


Public RAVRG
Sub RAVGO

RAVRG = RH
Form 11.Show
Form l 1.Print RAVRG, AREAV

End Sub

Attribute VB Nam e = "Module7"


Public TAVRG, ZZ
Sub SOAKO

STTOT = 0

Call Module2.VRCALC
Call Module3.VZCALC

TAVRG = TR + (TS - TR) * (VR * VZ)


Form l 1.Print TAVRG

End Sub

Attribute VB Name = "Module2"


Public VR, TETAR
Public Sub VRCALCO

TETAR = ALPHRES * SIT / (RAVRG A 2)


If TETAR >= 0.02 And TETAR <= 0.025 Then
VR = 0.92 + (((TETAR - 0.025) / 0.005) * (-0.03))
GoTo 10

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
161

End If
If TETAR < 0.02 Then
VR = 0.95 + (((TETAR - 0.02) / 0.02) * (-0.05))
GoTo 10
End If
SK = 0.25
SK2 = 0#
For K = 1 To 300
SK2 = SK2 + SK
SKI = ((-1 / TETAR) * (K + 1.5) / ((2 + K) * (3 + K))) * SK
SK = SKI
Next K
VR = (1 / TETAR) * SK2
10

End Sub

Attribute VB Name = "ModuIe3"

Public VZ, TETAZ, HBAR


Public Sub VZCALCO

Z1 = IW * HS * TINJT(KK)
Z2 = PI * RAVRG A 2 * CPRF * (TS - TR)
ZZ = Z1 / Z2 - L

HBAR = ZZ + L
XI = 4 * ALPHRES * (SIT)
X2 = (X I / (PI * HBAR A 2)) A 0.5
X3 = Exp(-HBAR A 2 / X I)

'ERROR FUNCTION CALCULATIONS - from Abramowitz & Stegun'


’Y = ERF(HBAR/(X1A0.5)'

AI =0.0705230784
A2 = 0.0422820123
A3 = 0.0092705272
A4 = 0.0001520143
A5 = 0.0002765672
A6 = 0.0000430638
X = H B A R / ( X I A0.5)
Y 1 = ( 1 + A 1 * X + A 2 * X A2 + A 3 * X A3 + A 4 * X A4 + A 5 * X A5 + A 6 * X A6)
A 16

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
162

Y = 1 -(1 / Y l ) + 0.0000003

VZ = Y - X 2 * (1 -X3)
TETAZ = ALPHRES * SIT / (HBAR / 2)

End Sub

Attribute VB_Name = "Module 14"


Public SWIN, VPOR, VWINT1, VWI, VWIS, VWINJC1
Sub SWINITIAL()

Form2.Show

COUNTO = 1
COUNT = 1
Call Module8,OILPROP
Call Module 1 l.WATERVISC
VWINT1 = 0
VWINJC1 = 0
VWI = QI * TINJ

If K K > 1 Then
VWI = VWI + VWIREM
End If

VBULK = PI * RAVRG A 2 * L
VPOR = VBULK * POR
VS = VBULK * POR * (1 - 0.15 - 0.15)
MS = VS * ROS
VC = MS / ROW
VOC = VS - VC
VOIN = (MUW / (MUO + MUW)) * VOC
VWIN = (MUO / (MUO + MUW)) * VOC

If VWIN > VWI Then


VWIN = VWI
End If

VWINT1 = VWINT1 + VWIN


SWIN = (0.15 * VPOR + VC + VWIN) / VPOR
VWIS = (0.15 * VPOR + VC + VWIN)
VWINJC1 = VWIN + VC
VOIS = (0.15 * VPOR + VOIN)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
163

SOIN = VOIS / VPOR

End Sub

Attribute VB Name = "Module9"


Public RE, RW, TOIL, THF, TOTQW, COUNT, TQWH, TQOH, J
Sub PRODO

'CPW=1 BTU /LB-oF PRATTS, pg.224, FIG.B-64’


'ROW*CPW = 62.4 BTU/CUFT-oF = 0.0022036 BTU/CC-oF’
CPW = 0.0022036

RE = 1 . 02 * RAVRG
DTP = 1

'*** INITIALIZATION ****


TOTQO = 0
TOTQW = 0
COUNT = 1
THF = 0

F o r J = l ToTPRO D
RW = RTO
COUNTO = 0
TOIL = TAVRG

Call Module8.0ILPROP
MUOH = MUO
Call Module 1 l.WATERVISC
Call Module 15.KROKRW

C 1A = Log(RAVRG / RW)
C1B = Log(RE / RW)
Cl = C 1 A / C 1 B
C2A = Log(RE / RAVRG)
C2B = Log(RE / RW)
C2 = C2A / C2B

Call Module 12.JCOLD


If KRO = 0 Then
QOH = 0
JBAR = 0
GoTo 4

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
164

End If

JBAR = 1 / ((MUOH / MUOC) * C l + C2)

QOH = (JBAR * JCS * (PR - PW) / 14.7) ♦ 0.25


' QOH = (2 * PI * KS * KRO * LTOT * (PR - PW) / (14.7 * MUOH * CIA )) * 0.25

RWO = (K R W /K R O ) * (M U O H /M U W )
QW = QOH * RWO

4 TQOH = QOH * DTP


TOTQO = TOTQO +■TQOH

If KRO = 0 Then
QW1 = 2 * PI * KS * KRWM * L * (PR - PW) / 14.7
QW2 = MUW * C IA + MUWC * C2A
QW = (QW1 / QW2) * 0.25

End If

TQWH = QW * DTP
TOTQW = TOTQW + TQWH

HF = (4 * QOH * CPO + 4 * QW * CPW) * (TAVRG - TR) * DTP


THF = THF + HF

Form9.Show

If J = TPROD Then
Form9.Print J, TAVRG, TOTQO, TOTQW, KRW, KRO, MUO, MUW, JBAR
End If

Print #2, J, TAVRG, TOTQO, TOTQW, SWX, KRW, KRO, QOH, QW, RWO,
JBAR, JCS

Call Module 16.TAVGPROD


TAVRG = TAVRG 1
Call Module 17.SWCAL
COUNT = 0
Next J
VWIREM = 1 * (VWI - TOTQW)
If VWIREM < 0 Then
VWIREM = 0
End If

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
165

End Sub

Attribute VB Name = "Module 17"


Public SWW
Sub SWCALO

VFP = (TQWH + TQOH) * 4


VOCC = VFP
VWIS1 = VWIS - (TQWH * 4)

TOIL = TAVRG 1
Call Module8-OILPROP
Call Module 1 l.WATERVISC

VOIN = (MUW / (MUO + MUW)) * VOCC


VWIN = (MUO / (MUO + MUW)) * VOCC
VWINT = VWINT1 + VWIN

If (VWINJC1 + VWINT) > VWI Then


VWIN = VWI - (VWINJC1 + VWINT 1)
VWINT = VWINT 1 + VWIN
End If
If VWIN < 0 Then
VWIN = 0
VWINT = VWINT 1 + VWIN
End If

VWIS = VWIS 1 + VWIN


SWW = VWIS / VPOR
VWINT 1 = VWINT
End Sub
Attribute VB Name = "Module8"
Public MUO
Sub OILPROP0

If COUNTO = 1 Then
TOIL = TS
Else
TOIL = TAVRG
End If
MUO = 10 A 15 * (TOIL A -5.9844)

End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
166

Attribute VB Name = "Module 11"


Public MUW
Sub WATERVISCO

TW = TAVRG
If 60 <= TW And TW < 80 Then
MUW = (TW - 60) * (0.88 - 1.15) / 20 + 1.15
GoTo 71
End If
If 80 <= TW And TW < 100 Then
MUW = (TW - 80) * (0.68 - 0.88) / 20 + 0.88
GoTo 71
End If
If 100 <= TW And TW < 120 Then
MUW = (TW - 100) * (0.57 - 0.68) / 20 + 0.68
GoTo 71
End If
If 120 <= TW And TW < 140 Then
MUW = (TW - 120) * (0.45 - 0.57) / 20 + 0.57
GoTo 71
End If
If 140 <= TW And TW < 160 Then
MUW = (TW - 140) * (0.39 - 0.45) / 20 + 0.45
GoTo 71
End If
If 160 <= TW And TW < 180 Then
MUW = (TW - 160) * (0.35 - 0.39) / 20 + 0.39
GoTo 71
End If
If 180 <= TW And TW < 200 Then
MUW = (TW - 180) * (0.3 - 0.35) / 20 + 0.35
End If
71
End Sub

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
167

Program EXP.BAS

i * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

' ** EXPERIMENTAL STUDIES OF CYCLIC STEAM INJECTION USING **


* ** HORIZONTAL WELLS **
• * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

’ D. D. MAMORA, BAMBANG GUN ADI


' RAMEY LAB., TEXAS A&M, JULY 1997

DECLARE SUB TEM P 0


OPTION BASE I
DEFINT A-Z
DIM TSEC!(2000), Sl!(2000), S2!(2000), TCTEMP!(20)
DIM TCCOLD!(l), RCOLD!(5)
COMMON SHARED TCTEMPIO, RCOLDO
COMMON SHARED DEV AS LONG, ISC AS LONG
COMMON SHARED GS AS INTEGER, i AS INTEGER, M AS INTEGER
COMMON SHARED MAXI AS INTEGER, MAXGC AS INTEGER, ACTUAL
AS INTEGER
COMMON PCIB.BASERR, PCIB.ERR, PCIB.ERRS, PCIB.NAMES,
PCIB.GLBERR
COMMON FALSE AS INTEGER, TRUE AS INTEGER, NOERR AS INTEGER
COMMON EUNKNOWN AS SINGLE, ESEL AS SINGLE, ERANGE AS
SINGLE
COMMON ETIME AS SINGLE, ECTRL AS SINGLE, EPASS AS SINGLE
COMMON ENUM AS SINGLE, EADDR AS SINGLE

' ## ESTABLISH ERROR VARIABLES "ON ERROR" BRANCHING ##


1 U ltlifilltilllittM titfliiilliitlttttM tt il M M t i t t t t l f l f i H m t l t t H I I H H H I f t f t f f t t i l H I I H m i m M M M m t

NRL = 1
PCIB.ERR = 0
PCIB.ERRS = STRJNG$(64, 32)
PCIB.NAMES = STRING$(16, 32)
PCIB.GLBERR = 0
CALL DEFERR(PCIB.ERR, PCIB.ERR$, PCIB.NAMES, PCIB.GLBERR)
PCIB.BASERR = 255
ON ERROR GOTO 99
GOTO MNEMONICS

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
■uoissjiujad jnoifflM paijqmojd u o jpnp ojdaj ja q p n j jauMo p6pAdoo a q p o uoissiuuad qjiM paonpcuday

## NO IIVDO IIV1H NN VH 3 : VZ.6t* dH ## ,


M i i i t i M t i i i i f t i f l t m t i m f i M M M t i m t i M t t i M M M t l t m t t m ittittltH m iiltittlltlttiliiM m t ,

1# SV QN3ddV ‘HOd . . i v a io e^ v ., NHdO

## d n - i3 s m ^ a o o ^ d a N 3 ## ,
im M M m ttn m m H M M m m itffliitm m H iw iH H m M v w m tiitittittm im itt ,

1800001 = ^ a a v H
i/,00001 = WT1N3
1900001 = SSVd3
i£0000I = TH 133
ifrOOOOI = 3WLL3
i £00001 = 30N V H 3
i£0000I = 3 3 S 3
i 100001 = NMONXNT13
0 = tfHSON
3STV3XO N = 3 n U I
0 = 3S3V 3
:S3INOW3NW

dO lS
$!THH‘8I3d -„:'HOUa3., INTHd
,,0 3 1 3 3 1 3 0 ,, •'ffd S d m 9I*dH„ INTHd
■ffdSQlOaiDd = HH33W1 N 3 H 1 0 = HH33JAJ1 31
U H 3'8I3d = >T H 3dm
^ o 'a r a s a n

dO lS
$ 9 H 3 9 I3 d :HOHHH„ INTHd
„03H H n330„ -HH3 # 90>TH3 3ISVH., INIHd
^ o n n a a n 0 1 0 0 n s h i ^ r a a s v a a o d = t t h s 31 66
:'a330NVHa0"H93

## HNIlflOH ONHONVH HOHH3 ## ,

891
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

OJWt Ot OK)K) K) WWK) K) wW (Z)


n n oo m ^O JO OOvJO\UlAUtO-00 r
o
H
I— N)
OO O
o o o o o o o o o o o , . , w
o
nonnnnonnohc
o o o o o o o o o o >

r ,r ,ri r r ' r ' r r ' r ' r ' H


m tn tn tn m tn tn tn tn tn
o'O W 'J<3\Oi^.W tOf D
C/3
C/5 §
s g g s s s s a a s s g
? S S S 2 2 2 2 2 2 S s
C/3
^ /—S/-s /-N /—S/—S /—\ /-S /*> ' >•
o o o a o o o o o o ns
m t n t n t n t n t n t n r n t n t n C/1
p p p p p p p p p p a
^jTTjnri^rJTn^nprjpnrrinrj tn
O

^qonnnonoo
t^t^t^t^SSt^t^trjtrl

C ' ^O O^
O' “"ss J'OwO.' '/■^w—SU
J r N— ' s «-*' W
/-“ *N / " N
i ^ W MVh\
' s -/
/~ S
^
f j

s I
- Q ' O 0 0 x l O \ U i A W M ' - O ,t
170

' m SYSTEM INITIALISATION ##


1 MUMIttWmittiimmtitlttttlimmtWlillllfimMM MftflllfllffflfWIMitfllfMfmMiiffM

TIMES = "00:00:00"
CLS
CALL IORESET(ISC)
TIMEOUT = 1!
CALL IOTIMEOUT(ISC, TIMEOUT)
CALL IOCLEAR(ISC)
CALL IOREMOTE(ISC)

CODESS = "SISOIVA1VD5VF1VSO”
LENGTH = LEN(CODES$)
CALL IOOUTPUTS(DEV, CODESS, LENGTH)

SCREEN 9
WIDTH 80, 43
VIEW PRINT 1 TO 43
LOCATE 43, 2
PRINT" 0 30 60 90 120 150 180"
LOCATE 43, 3
PRINT" TIME (MIN)
LOCATE 40, 2
PRINT "0"
LOCATE 3 1, 2
PRINT "55"
LOCATE 22, 1
PRINT "110"
LOCATE 13, I
PRINT "165"
LOCATE 5, 1
PRINT "220"

LOCATE 2, 2
PRINT "oF MIN PSI SQD T1 T2 T3 T5 T8"

LINE (639, 349)-(0, 0), 15, B


LINE (30, 30)-(630, 315), 15, B
VIEW (31, 31)-(629, 314), 2 'VIEWPORT #1
WINDOW (0!, tmpMAX!)-(TMAX!, 0!)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
171

TIMER ON
CODESS = "AC20VR3"
LENGTH = LEN(CODES$)
CALL IOOUTPUTS(DEV, CODESS, LENGTH)
CALL IOENTERA(DEV, SEG S2!(l), MAXI, ACTUAL)
S2!(l) = S2!(l) * TCAL!

CODESS = "AC21VR5"
LENGTH = LEN(CODESS)
CALL IOOUTPUTS(DEV, CODESS, LENGTH)
CALL IOENTERA(DEV, SEG S l!(l), MAXI, ACTUAL)
SI 1(1) = S1!(I) * PCAL!

TSEC! = TIMER
TMIN! = TSEC! / 60!

LOCATE 3 ,2
PRINT U SIN G " ####.## ##.## ###.## ###.## ###.## ###.## ###.##
###.##"; TMIN!; S l!(l); S2!(l); TCTEMP!(1); TCTEMP!(2);
TCTEMP!(3); TCTEMP!(5); TCTEMP(8)
1800 LOCATE 42, 66
PRINT TIMES

1500 TSECO! = GS * DELT!


TSEC1! = NBL * DELT! * 6
TSEC! = TIMER
TMIN! = TSEC! / 60!

' ## PLOT DATA ON SCREEN ##


i

IF (TSEC! - TSEC1!) >= 0! THEN


VIEW (31, 31)-(629, 314)
WINDOW (0!, tmpMAX!)-(TMAX!, 0!)
CIRCLE (TMIN!, S l!(l)), .04, 15
CIRCLE (TMIN!, S2!(l)), .04, 5

NBL = NBL + 1
SOUND 800, 1
END IF

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
172

IF (TSEC! - TSECO!) >= 0! THEN GOTO READPT


GOTO 1800
END

' tiiM ttM iiitiiiiim m m iiiiiiiifittfttiffm fftiitm M tiM iM iiiittim m uittm jm uttM
' ## MEASURE AND STORE READINGS ##

READPT:

CODESS = "AC20VR3"
LENGTH = LEN(CODES$)
CALL IOOUTPUTS(DEV, CODESS, LENGTH)
CALL IOENTERA(DEV, SEG S2!(l), MAXI, ACTUAL)
S 2!(l) = S2!(l) * TCAL!

CODESS = "AC21VR5"
LENGTH = LEN(CODES$)
CALL IOOUTPUTS(DEV, CODESS, LENGTH)
CALL IOENTERA(DEV, SEG S l!(l), MAXI, ACTUAL)
S l!(l) = S l!(l) * PCAL!

CALL TEMP

' ## STORE DATA ##

LOCATE 3, 2
PRINT USING" ####.## ##.## ###.## ###.## ###.## ###.## ###.##
###.##"; TMIN!; Sl!(l); S2!(l); TCTEMP!(1); TCTEMP!(2);
TCTEMP!(3); TCTEMP!(5); TCTEMP!(8)

2100 NRL = NRL + 1

IF (NRL = 30) THEN


PRINT #1, TSEC!, S l!(l), S2!(l), TCTEMP!(1), TCTEMP!(2), TCTEMP!(3),
TCTEMP!(4), TCTEMP!(5), TCTEMP!(6), TCTEMP!(7),
TCTEMP!(8), TCTEMP!(9), TCTEMP!(10)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
173

NRL = 1
GOTO 2200
END IF
GOTO 2100

2200 GS = GS + 1
GOTO 1500

DEFSNGA-Z
SUB TEMP
DIM LENGTH AS INTEGER
DIM V 2!(l), RCOLD!(5)
R0# = -.00000075004344#
R l# = .0000505321995#
R2# = 2.348050017D-08
P0# = -.3595568424#
P I# = 19750.87948#
P2# = -175116.5425#
P 3 # = 18212965.58#
P4# = -2831128435#
P5# = 271508383300#
P6# = -13801412100000#
P7# = 379243843260000#
P8# = -5371925517000000#
P9# = 3.0840255439D+16
i

'READ COLD JUNCTION CHANNEL #39


f

CODESS = "AC39VR5VN1"
LENGTH = LEN(CODES$)
CALL IOOUTPUTS(DEV, CODESS, LENGTH)
CALL IOENTERA(DEV, SEG RCOLD!(l), MAXI, ACTUAL)
TCOLD# = RCOLD!(l) * 10!
V I ! = R0# + TCOLD# * (R l# + TCOLD# * R2#)

'Read THERMOCOUPLE EMF at channels 22 TO 31

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
174

CODESS = "AF22AL31ASVR5VN1"
LENGTH = LEN(CODES$)
FORI = 1 TO 10
CALL IOOUTPUTS(DEV, CODESS, LENGTH)
CALL IOENTERA(DEV, SEG V2!(l), MAXI, ACTUAL)
V! = V I! + V 2!(l)
P79# = P7# + V! * (P8# + V! * P9#)
P56# = P5# + V! * (P6# + V! * P79#)
P34# = P3# + V! * (P4# + V! * P56#)
P12# = PI# + V! * (P2# + V! * P34#)
T l# = P0# + V! * P12#
TCTEMP!(I) = INT(T1# * 100! + .5) / 100!
NEXT I

END SUB

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.
VITA

Name: Bambang Gunadi

Date o f Birth: June 24,1953

Place o f Birth: Bandung, Indonesia

Parents: R. Achmadi
R. Supami

Permanent Address: Jl. Merpati n no. C l, Kunciran Mas Permai, Ciledug


Tangerang, Indonesia.

Education: B.S., Petroleum Engineering (October 1981)


Bandung Institute of Technology, Indonesia.

M.S., Petroleum Engineering ( January 1993)


Bandung Institute o f Technology, Indonesia.

Professional Affiliations: Society o f Petroleum Engineers, Member.

Experience: PT Stanvac Indonesia, Indonesia (May 1982 - Oct.


1983).
Pertamina, Indonesia (Oct. 1983 - present)

Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

You might also like