Professional Documents
Culture Documents
SPE 176284 MS With Cover Page v2
SPE 176284 MS With Cover Page v2
SPE-176284-MS
This paper was prepared for presentation at the SPE Asia Pacific Oil & Gas Conference and Exhibition held in Bali, Indonesia, 20–22 October 2015.
This paper was selected for presentation by an SPE program committee following review of information contained in an abstract submitted by the author(s). Contents
of the paper have not been reviewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The material does not necessarily reflect
any position of the Society of Petroleum Engineers, its officers, or members. Electronic reproduction, distribution, or storage of any part of this paper without the
written consent of the Society of Petroleum Engineers is prohibited. Permission to reproduce in print is restricted to an abstract of not more than 300 words;
illustrations may not be copied. The abstract must contain conspicuous acknowledgment of SPE copyright.
Abstract
When a wellbore is completely or partially filled with gas and work over or drilling operations are to be
carried out on the well, it is necessary to bleed off the gas and replace it with liquid or mud to maintain
well control.
The replacement of the gas in the wellbore by liquid is commonly done in small stages with gas being
released after each stage. This procedure usually requires a long time and could lead to adverse
consequences.
The method proposed in this paper will enable engineers to determine in advance the exact volumes of
liquid necessary to pump into the well and the exact volumes of gas to bleed off after each injection so
that the bottomhole pressure always stays above the formation pressure but below its fracturing pressure.
The method takes into account the integrated pressure calculation due to a real gas column in the
wellbore. Thus, the variation of the gas deviation factor with pressure and temperature of the gas in the
wellbore is taken into account. The results obtained assuming real gas behavior vs. ideal gas can be
significantly different in the number of stages, volumes calculated and pressures especially for deep high
pressure and temperature wells. Two calculation procedures for the volumes and pressures are
presented in the paper. These procedures are outlined step by step in the paper. The procedures are fast
and eliminate the need for unnecessarily small injected liquid volumes and remove the element of
guessing and the danger of unforeseen consequences.
Introduction
In a gas well the wellbore is either completely filled with gas, i.e., no liquid such as condensate or mud
is in the wellbore, or there is liquid below the gas column. It is necessary to remove the gas in the
wellbore and replaced it with liquid to maintain well control for workover activities. Swapping the gas
column with liquid without losing control of the well is done in a series of injection/release of liquid/gas
cycles1. When liquid is injected into the well the gas in the wellbore is compressed and both the well
head pressure (WHP) and bottom-hole pressure (BHP) increase. If too much liquid is injected into the
wellbore the BHP will exceed the fracturing pressure of the formation (FP) and fluids in the wellbore are
lost to the formation. Therefore, there is an optimum volume of liquid that can be injected into the
wellbore without exceeding FP. Following the liquid injection and subsequent separation of the gas and
2 SPE-176284-MS
liquid in the wellbore, some of the compressed gas is released from the well to decrease both WHP and
BHP. The BHP must not decrease below the formation pressure otherwise formation fluids enter the
wellbore and well control is lost. Therefore, there is also an optimum volume of gas that can be released
from the wellbore without allowing BHP to decrease below the formation pressure. This process is
repeated (in cycles) until all required gas in the wellbore is replaced with liquid. In the following
section we’ll present the necessary equations to determine the number of cycles, the exact amount of
injected liquid and gas released for each cycle and WHP to maintain well control during the swapping
operation.
No liquid in wellbore
Figure A-1 is a schematic of a shut-in gas well. The entire wellbore is filled with a gas with a specific
gravity of g. The depth of the well is H feet. The BHP is P BH psia. The shut-in WHP is PWH psia. The
surface temperature is TWH oR and the geothermal gradient is GTh oF/100 ft. Eq. 1 gives the PBH of a
column of gas knowing its PWH and the properties of the gas:
= . (1)
In Eq. 1 both PBH and Z are unknown. An iterative procedure can be used to determine both P BH and
Z2,3. The average pressure in the wellbore P0 and the average temperature T0 are given by Eq. 2 and Eq.
3, respectively:
= (2)
= (3)
Where TBH is the temperature at the bottom of the gas column and can be calculated using the local G Th
of the formation, TWH and the true vertical depth (TVD) of the gas column. A kill fluid with a density of
M is injected into the wellbore in stages to replace the gas in the wellbore. The volume of liquid
injected in each stage has to be optimized in order to save time while keeping bottom-hole pressure
below FP.
Figure A-2 shows the wellbore at the end of stage 1 after injecting the liquid. The height of the liquid is
hM. The maximum bottom-hole pressure Pmax is kept some P psi below FP (safty factor). The
calculations of the volume of the injected liquid and the pressures at the bottom P max, at the gas/liquid
interface Pg/m and at the surface PS are as follows; see flow chart in Figure A-3
= −∆ (4)
After the liquid is injected a sufficient time is allowed for the gas to separate from the liquid in the
wellbore. During the injection stage the gas in the wellbore is compressed and WHP increases. The
fraction of the wellbore occupied by the compressed gas X can be determined from Eq. 5:
SPE-176284-MS 3
.
− 1+ . =0 (5)
Eq. 5 can be solved either using Newton-Raphson method or Interval Halving (Bisection) method or the
Secant method. See Appendix A for details.
The PWH is decreased in order to bleed off gas at the surface at the end of each liquid injection stage.
PWH is decreased to a value that will allow maximum gas volume release while keeping the P BH above
the formation pressure to insure well control. P WH is calculated using Eq. 6:
= /
. (6)
Where
/ = − 0.052 ℎ 1− (7)
= / + 0.052 1− (8)
/ =2 ÷ 1+ . (9)
And
= (10)
Where dm is the height of the injected liquid and P is the average pressure of the gas column. The
details of this method are presented in Appendix B.
Numerical Example
The following is an ilustrative example of the method. Eq. 5 was solved using Newton-Raphson method
by an MS ExcelTM macro. The wellbore initially was filled with gas. The intial conditions of the well
are shown in Table 1.
Using the known variables, see Table 1, in Eq. 5 and solving for X and Z using Newton-Raphson
iterarative method we get for the 1st liquid injection:
4 SPE-176284-MS
X = 0.842
Z = 1.10959
Therefore,
Liquid height = 11558*(1-0.842) = 1825.8 ft
And the liquid volume = 1825.8*0.0285 = 52 Bbls
The wellhead pressure rises to 5943.2 psi and the bottom-hole pressure rises to 8006.2 psi 200 below the
frac pressure.
Allowing for liquid and gas separation and wellhead pressure stabilizes at 5943 psi; gas is released by
lowering the wellhead pressure to 3892.8 and bleeding off 122,653 SCF. This lowers the BHP to 5711.7
psi, 100 psi above reservoir pressure.
Table 2 shows the results for 1st , 2nd and 7th cycles for this well. The job took 7 cycles of liquid
injection and gas release, see Figure C-1. Total liquid injected 312.2 Bbls. Total gas released 561,624
SCF. These results obtained in the case of real gas. Assuming ideal gas behavior will give much
different results. The total volume of liquid injected and the total gas released will be the same for ideal
and real gas. However, the volume of liquid injected and gas released per cycle are much different. In
this numerical example the ideal gas shows much higher volume of liquid injected in the early cyles (as
much as 41% higher than real gas volumes). On the other hand the volume of the injected liquid is
much less in the late cycles (as much as 96% lower than real gas volumes), see Figure C-2. Also the
volumes of gas released per cycle are much different. In the ideal gas case the volume of gas releasd is
much higher in the early cyles (as much as 63% higher than real gas volumes). And the volumes
released are much less in the late cycles (as much as 99% lower than real gas volumes), see Figure C-3.
SPE-176284-MS 5
In the case where the wellbore is filled with liquid up to h m feet from the bottom, Fig. A-2, the section of
the well filled with gas is treated as in the case of no liquid in wellbore with the pressure at the bottom of
the gas column is equal to reservoir pressure less the hydrostatic of the liquid column. And the FP at
that depth is equal to reservoir fracturing pressure less the hydrostatic of the liquid.
Conclusions
A noval method for swapping a gas well was presented in paper. The required equations and the for
there solution were presented. Two methods were presented. The results from real gas and ideal gas
were compaired. The results showed that volumes of liquid injected and gas released could be
substantially different. In early cycles assuming ideal gas the volumes can be too high while in later
cycles can be too low.
Nomenclatur
T = temperature, oR
TBH = Bottom-hole temperature, oR
TO = average gas temperature, oR
TVD = true vertical depth, ft
TWH = well head temperature, oR
X = fraction of well bore occupied by gas
Z = gas deviation factor
P = defferential pressure, psi
g = gas specific gravity
m = liquid density, ppg
Aknowlegement
The author would like to thank the Baker Hughes management for their permission to publish the paper.
References
1. Grace, R.D. and Burton, M.R., “Mud Lubrication – A Viable Alternative in Well Control,” paper
IADC/SPE 35122, IADC/SPE Drillind Conference, New Orleans, Louisiana, 12-15 March 1996.
2. Elgassier, M.M., “Values of Integral of Compressibility Factor as a Function of Psuedoreduced
Pressure and Temperature,” J. of Engineering Sciences, Riyadh, Saudi Arabia, Vol. 11, No. 1,
1985.
3. Elgassier, M.M., “Bottom-hole Pressure Determination for Deep Natural Gas Wells,” J. of
Engineering Sciences, Riyadh, Saudi Arabia, Vol. 14, No. 2, 1988.
SPE-176284-MS 7
Appendix A
The initial shut-in conditions of a gas well are shown in Figure A-1. P BH is the reservoir pressure, TBH is
the reservoir temperature, H is the depth of the well, P WH is the wellhead pressure and T WH is the well
head temperature. P0, T0 and Z0 are the average pressure, average temperature and average Z-factor of
the gas respectively. The specific gravity of the gas is g. If well is opened gas will flow from the
formation into the well. To prevent this from happening liquid is injected into the well with the well
head shut-in. As the liquid is injected in the well the wellhead and the bottom-hole pressure start to rise.
Figure A-2 shows the wellbore after liquid injection. The maximum amount of liquid that can be
injected without exceeding FP is calculated as follows:
= (A-1)
The height of the liquid in the wellbore is hM. Let the fraction of the gas height in the wellbore be X.
= (A-2)
1− = (A-2)
Since no gas is released, the number of moles of the gas remains the same and
= (A-3)
And
= (A-4)
/
= (A-5)
And Pg/m is equal to bottom-hole pressure less the liquid hydrostatic head,
/ = − 0.052 ℎ 1− (A-6)
= /
. (A-7)
8 SPE-176284-MS
.
− 1+ . =0 (A-8)
Eq. A-8 can be solved either using Newton-Raphson method or Interval Halving (Bisection) method or
Secant method. MS ExcelTM was used to solve for X in Eq. A-8. In each iterative step the gas
compressibility factor Z is reevaluated for that step, see Figure A-3. An example of the output
calculations is given in Appendix C.
Figure A-3: Flow chart for calculating optimum injected liquid volume, hydrostatic pressure and surface pressure.
SPE-176284-MS 11
Appendix B
The volume of liquid injected can be calculated by assuming a small volume of injected liquid, for
example equivalent to1 linear foot of wellbore, and then increment this volume till the bottom-hole
pressure get close enough but less than FP. The calculation process can be accelerated (if it takes longer
than desired) by atarting with large values of injected liquid and later decrease it gradually as BHP gets
closer to fracturing pressure.
= 1− (B-1)
= (B-2)
/ =2 ÷ 1+ . (B-3)
= / + 0.052 1− (B-4)
dm is incremented until the calculated PBH is as close as desired to FP without going over. The
advantage of this method is that it can be conveniently used for varying wellbore ID.
12 SPE-176284-MS
Appendix C
An example of the output calculations using Newton-Raphson method is given in Table C-1. The
pressures in the wellbore vs. injected liquid volume and gas released are shown in Figure C-1. Liquid
volume injected for each cycle for both ideal gas and real gas is shown in Figure C-2. Figure C-3 shows
the volume of gas released for each cycle for both ideal gas and real gas.
9000
8000
7000
6000
Pressure, psi
5000
BHP
WHP
4000
FracPr
ResPr
3000
2000
1000
0
0 25 50 75 100 125 150 175 200 225 250 275 300 325
Volume of Liquid Injected, Bbl
Figure C-1: The variation of pressures in the wellbore with injected liquid volume and gas release.
SPE-176284-MS 13
80
73.6
70
63.8
59.4
60
Volume of Liquid Injected, Bbl
40
30
20
10
1.6
0
1 2 3 4 5 6
Cycle
Figure C-2: Liquid volume injected for each cycle for both ideal gas and real gas.
250,000
199,329
200,000
Volume of Gas Released, SCF
149,989
150,000
122,653 120,237 116,466
102,737 104,527
100,000
71,418
58,366
50,000
20,656 25,307
275
0
1 2 3 4 5 6
Cycle
Figure C-3: Released gas volume for each cycle for both ideal gas and real gas.