You are on page 1of 184

UNIVERSITY OF CALGARY

Development of a Standalone Compositional Simulator for Modelling Multiphase Flow and

Temperature Distribution Along Wellbore

by

Wanqiang Xiong

A THESIS

SUBMITTED TO THE FACULTY OF GRADUATE STUDIES

IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE

DEGREE OF DOCTOR OF PHILOSOPHY

GRADUATE PROGRAM IN CHEMICAL AND PETROLEUM ENGINEERING

CALGARY, ALBERTA

DECEMBER, 2019

© Wanqiang Xiong 2019


Abstract

Well modeling of multiphase flow and temperature flow along a wellbore has wide applications

in the petroleum industry especially in unconventional oil and gas recovery processes. Also,

wellbore modeling can be applied in a geothermal well for optimizing production parameters.

The main research works completed in this study include building mathematical equations for

wellbore modeling and development of a standalone wellbore simulator. At first, a series of

mathematical equations are built for wellbore modeling of fluid flow in tubing or annulus, heat

loss to a surrounding formation and heat transfer in the formation. Then methods and workflows

are determined for key steps in wellbore simulator development including discretization, a grid

system, a solution method and a liner equation solver. A standalone compositional wellbore

simulator is developed. Validation works against CMG SAM, CMG Flexwell and Eclipse Multi-

Segment Well are conducted afterwards. Different scenarios have been modeled by the wellbore

simulator that include hot water injection, steam injection, SAGD circulation, SAGD injection,

multiphase well production, steam-solvent co-injection, liquid CO2 injection for a shale gas

reservoir and geothermal well production. Different well trajectories and structures are handled

such as vertical, deviated and horizontal wells, and the wells consisted of one or dual tubing

strings. New correlations for more accurate heat loss calculations are regressed in this study

based on CFD Fluent simulation and they can better estimate the convection heat transfer in

annuli space with single tubing or dual-tubing strings. Also, a semi-numerical method and a fully

numerical method for heat loss calculations are proposed. The semi-numerical method consists

of heat loss through wellbore components calculated by correlations and heat loss in a

surrounding formation numerically simulated, and the fully numerical method performs

simulation for heat transfer both in wellbore components and the surrounding formation.

ii
Acknowledgements

First, I would like to express my sincerest gratitude to my supervisor Dr. Zhangxing (John) Chen

for his time, guidance and support throughout my PhD studies at the University of Calgary. As

the leader of the Reservoir Simulation Group, he has not only directed our research works by his

outstanding knowledge and incredible talent but also has behaved as a role model for us by his

charming personality.

I would also like to express sincerest thanks to all the professors in the department and

colleagues in the Reservoir Simulation Group who offered me generous help in both my

coursework and research.

I would like to extend my sincerest thanks and appreciations to Dr. Mehdi Bahonar and

Dr. Chao Dong in ConocoPhillips Canada for their invaluable support and advice on my research

works. They always have the right direction guidelines and meticulous suggestions to every aspect of

my research.

I would also like to extend my sincere thanks to my family for giving me the opportunity to

pursue my dreams and realize them. Without their encouragement and support, I would not have put

my heart and soul into my research completely.

I also want to thank my friends, in particular, Hui Liu, He Zhong, Kun Wang, Jia Luo and

Xueying Lu for their friendship and kind help. The friendships with them provide me a nice studying

and living environment and are one of such precious things for me.

iii
Table of Contents

Abstract ............................................................................................................................... ii

Acknowledgements ............................................................................................................ iii

Table of Contents ............................................................................................................... iv

List of Tables ..................................................................................................................... vi

List of Figures and Illustrations ....................................................................................... viii

List of Symbols, Abbreviations and Nomenclature .......................................................... xii

Chapter 1: Overview of Wellbore Modeling .......................................................................1

1.1 Background ................................................................................................................1

1.2 Literature Review ......................................................................................................3

Chapter 2: Thermal Wellbore Modeling ............................................................................10

2.1 Wellbore Flow Introduction.....................................................................................10

2.2 Mathematical Equations of Fluid Flow and Energy ................................................24

2.2.1 Energy Flow Equation .....................................................................................26

2.2.2 Mass Flow Equation ........................................................................................28

2.2.3 Momentum Balance Equation .........................................................................29

2.2.4 Auxiliary Equations .........................................................................................31

2.3 Computation of Wellbore Heat Transfer .................................................................32

2.4 Modeling for Phase Velocities .................................................................................39

2.5 Computation of Thermal Fluid Properties ...............................................................43

2.6 Isenthalpic Flash Calculation ...................................................................................49

Chapter 3: Important Issues in Wellbore Simulator Development ....................................60

3.1 Introduction to Wellbore Simulator Development ..................................................60

3.2 Gridding Scheme for Wellbore Simulator ...............................................................61

3.3 Numerical Solution for Equations ...........................................................................64

iv
3.4 Implementation for Heat Loss Calculation ..............................................................69

Chapter 4: Simulator Validation and Applications ............................................................80

4.1 Introduction to Wellbore Simulator .........................................................................80

4.2 Validation for the Wellbore Simulator ....................................................................82

4.3 Application in SAGD Well ......................................................................................95

4.4 Application in Multiphase Production Well ..........................................................107

4.5 Application in Steam-Solvent Co-injection Well ..................................................112

4.6 Application in Liquid CO2 Injection Well .............................................................118

4.7 Application in Geothermal Production Well .........................................................125

Chapter 5: Conclusions and Recommendations ..............................................................132

5.1 Conclusions ............................................................................................................132

5.2 Recommendations and Future Works ....................................................................135

Appendix A: FLUENT Simulation and Correlation RESULTS......................................137

Appendix B: Keywords for Wellbore Simulation Input Data .........................................145

Appendix C: Input and Output Format ............................................................................155

References ........................................................................................................................160

v
List of Tables

Table 2-1a Parameters a, b and c for Flow Regimes (Beggs and Brill, 1973)............................ 15

Table 2-1b Parameters e, f, h and k for Flow Regimes (Beggs and Brill, 1973) ........................ 15

Table 2-2 C0 and Vd Values for Flow Regimes (Hasan and Kabir, 2007) ............................... 42

Table 2-3 Coefficients of equation (2-88) (IAPWS Industrial Formulation, 1997) ..................... 47

Table 2-4 Coefficients and exponents of nio and Jio (IAPWS Industrial Formulation, 1997) ... 48

Table 2-5 Coefficients and exponents of Ii, Ji and ni (IAPWS Industrial Formulation, 1997) .... 48

Table 3-1: Wellbore parameters for comparison of heat loss calculation .................................... 70

Table 3-2: Temperatures used in FLUENT simulation for each size combination ...................... 74

Table 4-1: Wellbore parameters for hot water injection ............................................................... 82

Table 4-2: Wellbore parameters for steam injection..................................................................... 86

Table 4-3: Wellbore parameters for validation against CMG Flexwell ....................................... 89

Table 4-4: Wellbore parameters for validation against Eclipse multi-segment well .................... 93

Table 4-5: Wellbore parameters for SAGD circulation ................................................................ 97

Table 4-6: Wellbore parameters for SAGD injection ................................................................. 103

Table 4-7: Wellbore parameters for a production well ............................................................... 107

Table 4-8: Wellbore parameters for a steam-solvent co-injection well ...................................... 113

Table 4-9: Wellbore parameters for a well injecting liquid CO2 ................................................ 120

Table 4-10: Wellbore parameters for a geothermal well ............................................................ 127

Table A-1: FLUENT and correlation results at rto=3 ½” and rci=7” .......................................... 137

Table A-2: Nusselt numbers by FLUENT and correlations at rto=3 ½” and rci=7” ................... 137

Table A-3: FLUENT and correlation results at rto=3 ½” and rci=11 ¾” .................................... 138

Table A-4: Nusselt numbers by FLUENT and correlations at rto=3 ½” and rci=11 ¾” ............. 138

Table A-5: FLUENT and correlation results at rto=4 ½” and rci=9 ⅝” ...................................... 139

Table A-6: Nusselt numbers by FLUENT and correlations at rto=4 ½” and rci=9 ⅝” ............... 139

vi
Table A-7: FLUENT and correlation results at rto=4 ½” and rci=11 ¾” .................................... 140

Table A-8: Nusselt numbers by FLUENT and correlations at rto=4 ½” and rci=11 ¾” ............. 140

Table A-9: FLUENT and correlation results at rto=5 ½” and rci=9 ⅝” ...................................... 141

Table A-10: Nusselt numbers by FLUENT and correlations at rto=5 ½” and rci=9 ⅝” ............. 141

Table A-11: Data used for regressing a new correlation ............................................................ 142

Table A-12: FLUENT simulation results for double-tubing annulus ......................................... 143

Table A-13: Nusselt numbers by FLUENT for double-tubing annulus ..................................... 144

vii
List of Figures and Illustrations

Fig. 2-1: Flow regimes of multiphase flow in a vertical pipe (Weisman, 1983) .......................... 12

Fig. 2-2: Multiphase flow in a vertical pipe (Weisman, 1983) ..................................................... 13

Fig. 2-3: Iterative procedure of Uto calculation........................................................................... 23

Fig. 2-4: Schematic description of a thermal wellbore system ..................................................... 25

Fig. 2-5: Schematic description of energy balance in a fluid segment ........................................ 26

Fig. 2-6: Fluid flow in a wellbore control volume of length Δz .................................................. 28

Fig. 2-7: Schematic representation of momentum balance in a fluid segment ............................ 30

Fig. 2-8: Temperature gradient in a typical wellbore .................................................................. 33

Fig. 2-9: Axis system for annulus heat transfer ........................................................................... 35

Fig. 2-10: 2D grid system for heat flow in the formation ............................................................ 37

Fig. 2-11: Slip between Gas and Liquid in Drift-Flux Model ..................................................... 39

Fig. 2-12: Procedure for Drift-Flux model application................................................................ 40

Fig. 2-13: Procedure for isenthalpic flash calculation ................................................................. 50

Fig. 2-14: Schematic description of isenthalpic flash calculation .............................................. 51

Fig. 2-15: Procedure for isenthalpic flash calculation inner loop using EOS .............................. 52

Fig. 2-16: Schematic description of phase transition with temperature (Stone et al., 2009) ....... 56

Fig. 3-1: 1D grid system for tubing or annulus flow in a wellbore simulator .............................. 61

Fig. 3-2: 2D point grid system for heat transfer in annuli space................................................... 62

Fig. 3-3: 2D radial grid system for heat transfer simulation in formation .................................... 63

Fig. 3-4: Schematic representation of Jacobian matrix ................................................................. 68

Fig. 3-5: Comparison for cement/formation temperature calculation (Tcf)................................... 71

Fig. 3-6: Schematic description of semi-numerical method ......................................................... 72

Fig. 3-7: Description for a FLUENT model (Xiong, W., 2014) ................................................... 73

Fig. 3-8: Comparison between correlations and FLUENT simulation (Xiong, W., 2014)........... 75

viii
Fig. 3-9: Validation for the correlation (3-11) (Xiong, W., 2014)................................................ 76

Fig. 3-10: A Fluent simulation for annuli space with double-tubing strings ................................ 76

Fig. 3-11: Comparison between α from simulation and the predicted one (Xiong, W., 2014) .... 78

Fig. 3-12: Schematic description of fully numerical method ....................................................... 78

Fig. 4-1: A screenshot of wellbore modeling program running.................................................... 80

Fig. 4-2: A screenshot of interface for wellbore simulator ........................................................... 81

Fig. 4-3: A screenshot of input wellbore parameters .................................................................... 81

Fig. 4-4a: Pressure and temperature of hot water along the wellbore at different times .............. 83

Fig. 4-4b: Cement/Formation temperature and heat loss of hot water injection along the
wellbore at different times .................................................................................................... 84

Fig. 4-5a: Pressure and temperature of hot water along the wellbore at different times .............. 85

Fig. 4-5b: Cement/Formation temperature and heat loss of hot water injection along the
wellbore at different times .................................................................................................... 85

Fig. 4-6a: Pressure and temperature of steam injection along the wellbore at different times ..... 87

Fig. 4-6b Cement/Formation temperature and heat loss of steam injection along the wellbore
at different times ................................................................................................................... 87

Fig. 4-6c Enthalpy and steam quality of steam injection along the wellbore at different times ... 88

Fig. 4-7: A CMG FlexWell model for validating steam injection ............................................... 89

Fig. 4-8a: Comparison between this study and CMG Flexwell at 1 day ...................................... 90

Fig. 4-8b: Comparison between this study and CMG Flexwell at 1 month ................................. 91

Fig. 4-8c: Comparison between this study and CMG Flexwell at 1 year ..................................... 91

Fig. 4-8d: Comparison between this study and CMG Flexwell at 10 year ................................... 91

Fig. 4-9: An Eclipse multi-segment well model for validating steam injection .......................... 92

Fig. 4-10a: Pressure comparison between this study and Eclipse multi-segment well ................ 94

Fig. 4-10b: Temperature comparison between this study and Eclipse multi-segment well ......... 94

Fig. 4-10c: Steam quality comparison between this study and Eclipse multi-segment well ........ 95

ix
Fig. 4-11: Schematic description of SAGD circulation ................................................................ 96

Fig. 4-12a: Enthalpy along the steam flow path inside wellbore at different times ..................... 98

Fig. 4-12b: Steam quality along the steam flow path inside wellbore at different times ............. 98

Fig. 4-12c: Pressure along the steam flow path inside wellbore at different times ...................... 99

Fig. 4-12d: Temperature along the steam flow path inside wellbore at different times ............... 99

Fig. 4-13: Temperature at the cement/formation boundary changes with time .......................... 101

Fig. 4-14: Steam injection in a SGAD well with concentric dual-tubing string ......................... 102

Fig. 4-15a: Enthalpy along the wellbore at different times ........................................................ 104

Fig. 4-15b: Steam quality along the wellbore at different times................................................. 104

Fig. 4-15c: Pressure along the wellbore at different times ......................................................... 105

Fig. 4-15d: Temperature along the wellbore at different times .................................................. 105

Fig. 4-16a: Pressure and temperature along the wellbore at different times .............................. 108

Fig. 4-16b: Temperature at cement/formation boundary Tcf and heat loss along the wellbore
at different times ................................................................................................................. 109

Fig. 4-16c: Casing temperature and in-situ oil fraction along the wellbore at different times ... 109

Fig. 4-16d: In-situ gas fraction along the wellbore at different times ........................................ 110

Fig. 4-16e: Flow regime along the wellbore at different times................................................... 110

Fig. 4-17: Steam-solvent co-injection in a horizontal well ......................................................... 112

Fig. 4-18a: Pressure and temperature along the wellbore at different times .............................. 115

Fig. 4-18b: Temperature at cement/formation boundary Tcf and heat loss along the wellbore
at different times ................................................................................................................. 116

Fig. 4-18c: Casing temperature and enthalpy along the wellbore at different times .................. 116

Fig. 4-18d: In-situ oil fraction and in-situ gas fraction along the wellbore at different times .... 117

Fig. 4-19: Shale gas extraction using CO2 in a well ................................................................... 119

Fig. 4-20a: Pressure and temperature along the wellbore at different times .............................. 122

x
Fig. 4-20b: Temperature at cement/formation boundary Tcf and heat loss along the wellbore
at different times ................................................................................................................. 123

Fig. 4-20c: Casing temperature and enthalpy along the wellbore at different times .................. 123

Fig. 4-20d: In-situ liquid fraction and gas fraction along the wellbore at different times .......... 124

Fig. 4-21: Typical geothermal production well .......................................................................... 126

Fig. 4-22a: Pressure and temperature along the wellbore at different times .............................. 129

Fig. 4-22b: Temperature at cement/formation boundary Tcf and heat loss along the wellbore
at different times ................................................................................................................. 129

Fig. 4-22c: Casing temperature and enthalpy along the wellbore at different times .................. 130

Fig. 4-22d: In-situ water fraction and gas fraction along the wellbore at different times .......... 130

xi
List of Symbols, Abbreviations and Nomenclature

Symbols

A pipe cross-sectional area for fluid flow, ft2

𝐴1 outside tubing surface area, ft2

𝐴2 inner casing surface area, ft2

Ai cross-sectional area of segment, ft2

𝐶𝑎𝑛 heat capacity of fluid in the annulus, Btu/(lbm °F)

Cpe formation heat capacity, Btu/(lbm °F)

𝐶0 profile parameter (or distribution coefficient), dimensionless

𝑑 pipe diameter, ft

𝑑𝑖 inside diameter of an annulus, ft

𝑑𝑖𝑛 pipe inside diameter, ft

𝑑𝑜 outside diameter of an annulus, ft

𝐷𝑜 outside diameter of the annulus, ft

𝐹1−2 the shape factor between the two-alumni surface area, dimensionless

𝑓𝑔 in-situ gas volume fraction

𝑓𝑡𝑝 two-phase friction factor

𝑓𝑚 Moody friction factor

G annulus gap width (𝐺 = 𝑟𝑜 − 𝑟𝑖 ), ft

𝐺𝑟 Grashof number, dimensionless

𝑔 gravitational acceleration constant, ft/sec2

𝑔𝑇 geothermal gradient, °F/ft

ℎ enthalpy of single-phase fluid, Btu/lbm

xii
ℎ𝑐 convective heat transfer coefficient of fluid inside annulus, Btu/(hr ft2 °F)

ℎ𝑓 convective heat transfer coefficient of fluid, Btu/(hr ft2 °F)

ℎ𝑝 enthalpy of phase p, Btu/lbm

ℎ𝑟 radial heat transfer coefficient of fluid inside annulus, Btu/(hr ft2 °F)

𝐻𝑎 total annulus height, ft

i segment index

𝑖0 zero moment of intensity, Btu/(hr ft2)

𝑘 thermal conductivity of fluid in the annulus, Btu/(hr ft °F)

𝑘𝑎 air thermal conductivity in the annulus, Btu/(hr ft °F)

𝑘𝑐𝑎𝑠 thermal conductivity of casing, Btu/(hr ft °F)

𝑘𝑐𝑒𝑚 thermal conductivity of cement, Btu/(hr ft °F)

𝑘𝑒 thermal conductivity of formation, Btu/(hr ft °F)

𝑘ℎ𝑎 thermal conductivity of the fluid in the annulus, Btu/(hr ft °F)

𝑘ℎ𝑐 equivalent thermal conductivity of the fluid in the annulus calculated by natural

convection effects at the average pressure and temperature, Btu/(hr ft °F)

𝑘𝑖𝑛𝑠 thermal conductivity of insulation, Btu/(hr ft °F)

𝑘𝑟 formation thermal conductivity along the radial direction, Btu/(hr ft °F)

𝑘𝑡 thermal conductivity of tubing, Btu/(hr ft °F)

𝑘𝑧 formation thermal conductivity in the z direction, Btu/(hr ft °F)

𝐾𝑢 critical Kutateladze number, dimensionless

𝑚𝑐𝑝 mass source/sink term for component c in phase p, lbm/day

𝑚ℎ unit thermal source/sink term, Btu/(ft3 day)

𝑚ℎ_𝑡 total thermal source/sink term, Btu

xiii
𝑚𝑤𝑝 mass source/sink term for water component in phase p, lbm/day

n time level

𝑁 conduction-to-radiation ratio, dimensionless

𝑁𝑟 total grid number along the radial direction

𝑁𝑢 Nusselt number

𝑁𝑢′ modified Nusselt number for double-tubing annulus

𝑝 pressure in the annulus, psi

𝑝∞ pressure at 𝑁 = ∞, psi

𝑃 fluid pressure, psi

𝑃𝑟 Prandtl number, dimensionless

𝑞 heat flux rate across the annulus, Btu/(hr ft)

𝑄𝑙𝑜𝑠𝑠 heat loss rate to the surroundings, Btu/(hr ft)

𝑄𝑙𝑜𝑠𝑠_𝑡 heat loss the surroundings, Btu

𝑅𝑎 Rayleigh number, dimensionless

𝑟 radius to wellbore center, ft

𝑟𝑐𝑖 inside radius of casing, ft

𝑟𝑐𝑜 outside radius of casing, ft

𝑟𝑐𝑓 cement/formation interface radius, ft

𝑟𝑒 external formation radius, ft

𝑟𝑖 radius of inner wall in the annulus, ft

𝑟𝑖𝑛𝑠 radius of the outside tubing insulation, ft

𝑟𝑜 radius of outside wall in the annulus, ft

𝑟𝑡𝑖 inside radius of tubing, ft

xiv
𝑟𝑡𝑜 outside radius of tubing, ft

𝑟𝑤 wellbore radius, ft

t time, days

𝑇 fluid temperature in the annulus, °F

𝑇𝐶 outside wall temperature in the annulus, °F

𝑇𝑐𝑖 casing internal temperature, °F

𝑇𝑐𝑓 cement/formation interface temperature, °F

𝑇𝑒 formation temperature, °F

𝑇𝑒𝑖 initial formation temperature, °F

𝑇𝑓 fluid temperature inside tubing, °F

𝑇ℎ inner wall temperature in the annulus, °F

𝑇𝑟𝑒𝑠 reservoir formation temperature, °F

𝑇𝑠𝑢𝑟𝑓 surface geothermal temperature, °F

𝑇𝑡𝑜 tubing external temperature, °F

𝑝𝑤 wellbore pressure, psi

𝑢 internal energy of single-phase fluid, Btu/lbm

𝑢𝑝 internal energy of phase p, Btu/lbm

𝑢𝑧 axial velocity along the z direction in the annulus, ft/s

𝑈𝑡𝑜 overall heat transfer coefficient, Btu/(hr ft2 °F)

𝑣 radial velocity along the 𝑟 direction in the annulus, ft/s

𝑉𝑐 characteristic velocity, ft/s

𝑉𝑑 gas drift velocity, ft/s

𝑉𝑔 average gas velocity across the pipe area, ft/s

xv
𝑉𝑔𝑏 superficial gas velocity for transition from bubbly to slug flow, ft/s

𝑉𝑔𝑐 superficial gas velocity for transition from churn to annular flow, ft/s

𝑉𝑖 volume of segment, ft3

𝑉𝐿 average liquid velocity across the pipe area, ft/s

𝑉𝑚 average mixture velocity, ft/sec

𝑉𝑝 velocity of phase p, ft/sec

𝑉𝑠𝑔 gas superficial velocity, ft/s

𝑉𝑠𝑔𝑓 flooding velocity at which the flow regime transits into annular flow, ft/s

𝑉𝑠𝐿 liquid superficial velocity, ft/s

𝑉𝑠𝑝 superficial velocity of phase p, ft/sec

𝑉𝑠𝑠 superficial velocity of steam, ft/sec

𝑉𝑠𝑤 superficial velocity of water, ft/sec

𝑥𝑐𝑔 molar fraction of hydrocarbon component c in gas phase

𝑥𝑐𝑜 molar fraction of hydrocarbon component c in oil phase

𝑥𝑐𝑝 molar fraction of hydrocarbon component c in phase p

𝑥𝑐𝑤 molar fraction of hydrocarbon component c in water phase

𝑥𝑤𝑔 molar fraction of component water in gas phase

𝑥𝑤𝑜 molar fraction of component water in oil phase

𝑥𝑤𝑝 molar fraction of water component in phase p

𝑥𝑤𝑤 molar fraction of component water in water phase

z wellbore curvilinear coordinate, ft

𝑍 wellbore depth, ft

𝑍𝑟𝑒𝑠 vertical depth of reservoir, ft

xvi
∆𝑟 grid length along the radial direction, ft

∆t time step, second

∆z segment length, ft

Greek Symbols

𝛼 formation thermal diffusivity, ft2/hr

𝛼𝑝 in-situ volume fraction of phase p

𝛼𝑠 in-situ volume fraction of steam

𝛼𝑤 in-situ volume fraction of water

𝛽 thermal volumetric expansion coefficient of the fluid in the annulus, °R-1

𝛿 annulus aspect ratio (𝛿 = 𝑟𝑡𝑜 ⁄𝑟𝑐𝑖 )

𝜀𝑐𝑖 emissivity of inside casing surface, dimensionless

𝜀𝑡𝑜 emissivity of outside tubing surface, dimensionless

𝜃 local angle between well and the vertical direction, radian

𝜗 kinematic viscosity, ft2/s

𝜇𝑎𝑛 viscosity of the fluid in the annulus, lbm/(ft hr)

𝜌 fluid density, lbm/ft3

𝜌𝑎𝑛 density of fluid in the annulus, lbm/ft3

ρe formation density, lbm/ft3

ρg gas density, lbm/ft3

ρL liquid density, lbm/ft3

𝜌𝑚 mixture density, lbm/ft3

𝜌𝑝 phase density, lbm/ft3

xvii
𝜌𝑠 steam density, lbm/ft3

𝜌𝑤 water density, lbm/ft3

𝜎 Stefan Boltzman constant, 1.713 × 10−9 Btu/(ft 2 hr °R4 )

𝜎𝑎 absorption coefficient, 1/ft

𝜎𝑔𝑙 the gas/liquid interfacial tension, lbm/s2

Subscripts

a acceleration

c hydrocarbon component (C1, C2, …)

f frictional

h hydrostatic

p phase (gas, oil, water)

s superficial

xviii
Chapter 1: Overview of Wellbore Modeling

1.1 Background

Modeling of fluid flow along a wellbore has numerous applications in the petroleum

industry and the geothermal energy industry. With continuous evolvement of sophisticated wells

(horizontal wells, multilateral wells, and wells with multiple-tubing strings), wellbore modeling

has increasingly received pressing priority. Especially in the heavy oil industry which employs

some wellbore sensitive technologies such as SAGD (steam assisted gravity drainage) and CSS

(cyclic steam stimulation), wellbore modeling is crucial for their development. In cases of steam

injection in SAGD, CSS and other thermal injection technologies, accurately modeling the flow

parameters (e.g., steam quality) is critical for well design, well completion, reservoir monitoring,

reservoir management, and reservoir simulation. Also, wellbore modeling in a geothermal well is

important for geothermal energy development.

Typical wellbore modeling involves a description of flow behavior along a wellbore

trajectory. As a flow rate changes with time and fluids exchange heat with the surrounding

formation around a wellbore, the flow behavior along a wellbore is a transient process. This

means that fluid properties like pressure and temperature significantly change with time. Due to

the complexity in flow behaviors along a wellbore with different completions, modeling and

simulation need to consider a lot of factors. These include fluid flow in tubing or annulus, heat

exchange between wellbore strings, heat loss to a surrounding formation, heat transfer in the

formation, and mass transfer along well completions. The related parameters involve pressure,

temperature, phase velocities, fluid densities, phase fractions, phase compositions, heat transfer

coefficients and other fluid and wellbore properties. For the heat exchange between the fluids in

a wellbore and its surrounding formations, complicated mechanisms such as radiation and

1
natural convective heat transfer through the annulus space filled with air or other fluids and heat

dispersion in the surrounding formations that consist of different rocks, shale and minerals are of

research interest. Despite notable advancements made in wellbore modeling, accurate heat loss

modeling is still a challenging task with the existing wellbore simulators.

The existing commercial wellbore simulators include CMG Flexwell and Eclipse Multi-

segment Well. These wellbore simulators have significant improvements in computation

accuracy and application ranges than empirical correlations and analytical models. However,

they have certain limits, especially in handling complex well configurations and the heat

exchange mechanism between a wellbore and its surrounding formation. The current wellbore

simulators such as ECLIPSE and CMG’s still need further improvements. Challenges in

effectively solving highly nonlinear and coupled equations and improving computational

efficiency still beset the wellbore simulation. More research works on the development of an

accurate and robust wellbore simulator are necessary. The research work on annulus heat transfer

mechanisms can also have a great contribution to wellbore heat loss calculations. Better

prediction models for computing heat transfer in the annulus between tubing and casing can

improve the accuracy of heat loss calculations.

There are three major tasks in this study: (1) Build mathematical equations of fluid flow

in tubing or annulus, heat loss to a surrounding formation and heat transfer in the formation; (2)

Develop a wellbore simulator based on wellbore modeling equations; (3) Develop an interface

for the wellbore simulator. This wellbore simulator is designed to handle different wellbore

types: vertical wells, deviated wells and horizontal wells. The wellbore completions can have no

tubing, single tubing, and double-tubing strings inside annulus and multistage casings. The

complex wellbore configurations can be simplified by using a multi-part scheme which divides a

2
complex wellbore into several relatively simple wellbore simulation units. A fully implicit

method is used to solve the highly nonlinear coupled governing mass, momentum and energy

equations in the tubing and annulus. An annuli heat transfer simulator is embedded to simulate

the convective and radiation heat transfer from a tubing wall to a casing wall through the annuli

space. Also, new correlations are regressed from FLUENT simulation and they can be used to

replace the expensive annuli simulation to speed up a simulation run. The heat transfer from a

casing wall to its surrounding formation is simulated instead of using correlations as most other

wellbore simulators do. Therefore, more accurate heat loss calculation results than the traditional

method can be obtained. A series of validations, such as single-phase hot water injection, two-

phase steam injection, and multiple phase production against CMG SAM and CMG FlexWell are

conducted. The main objective of this research is to develop a standalone wellbore simulator for

all kinds of thermal injection and production such as SAGD, CSS and geothermal wells. Also, it

can be easily modified to couple with a reservoir simulator.

1.2 Literature Review

Early wellbore modeling research is mainly about multiphase flow correlations. From the

early 1930s, people began to perform some theoretical analyses on two-phase gas-liquid flow in

a vertical pipe. Particularly, petroleum engineering pioneers like Schlumberger and Doll (1937)

started to model temperature distributions in oil wells. Gilbert (1954) first developed some

empirical correlations for solving problems in vertical pipe flow, summarized the behavior of

vertical two-phase flow and provided a series of interpretation charts for calculating pressure in

different tubing sizes and a range of oil gravities. Duns and Ros (1963) presented a correlation

and procedures for computing pressure profiles in vertical wells with multiphase flow. This

correlation considered different flow regimes and was able to handle a range of field conditions.

3
At that time, dividing a multiphase flow into several different flow regimes had been widely used

and the wellbore modeling works were able to consider more complex slip phenomenon between

gas and liquid instead of a homogenous model. Hagedorn and Brown (1965) constructed

pressure-depth traverses for three tubing sizes tested in their 1,500-ft long experimental well at

the University of Texas and then developed correlations which extended the application ranges

such as pipe sizes and flow conditions. Orkiszewski (1967) proposed another correlation for

calculating pressure profiles in vertical wells and an accuracy increase was observed by this

correlation. In his method, the liquid holdup was calculated from experimental observation data.

Beggs and Brill (1973) developed their correlations for predicting a flow pattern and computing

pressure gradients in inclined wells. In fact, their correlations have been used in a wide range of

wells (including horizontal wells) with different flow regimes.

Taitel and Dukler (1976, 1980) built a theoretical model for analytically determining the

transition criteria of flow regimes based on real physical mechanisms. Their work was the first

so-called mechanistic modeling and represented a new stage of wellbore modeling research.

Xiao et al. (1990) developed a mechanistic model which can be used to determine the flow

patterns and calculate pressure gradients and liquid holdup. Their model was used by CMG

Flexwell to find flow regimes and calculate pressure profiles in a wellbore. From the 1980s,

Hasan and Kabir (1988, 2002) did a lot of work on wellbore modeling research and

systematically summarized wellbore modeling results in their published book. They improved

the mechanistic model and further developed a drift-flux model that was first proposed by Zuber

et al. (1965). Compared with mechanistic models, the drift-flux model is more suitable for

implementation in a wellbore simulator because of its continuity and differentiability. Shi et al.

(2005) developed another drift-flux model that has been adopted by Eclipse Multi-segment Well.

4
Shi et al.’s drift-flux model does not distinguish flow patterns along a wellbore and is easy to

use. This drift-flux model is differentiable among continuous space, and, therefore, reduces the

non-convergence risk in wellbore simulation.

Thermal wellbore modeling works started from Schlumberger and Doll’s measurements

on oil well temperatures in the 1930s. Ramey (1962) presented a mathematical model and gave

its analytical solution for calculating liquid and gas temperature profiles varying with time along

a vertical wellbore depth. In his model the flow in a wellbore is assumed as single-phase,

incompressible and steady-state and frictional loss and kinetic energy was neglected. Although

Ramey made several assumptions for simplifying his model, his work is considered the basis of

thermal wellbore modeling and simulation. In next few years, several researchers published their

works on improvements of Ramey’s model. Based on Ramey’s model, Willhite (1967)

established an iterative procedure to compute an overall heat transfer coefficient and heat loss to

surrounding formations. His method has been widely used in thermal wellbore modeling. Farouq

Ali (1981) developed a mathematical model for simulating steam-water flow in steam injection

wells and geothermal wells. Ali’s model is the first one that considered a complete wellbore

simulation system: the steam flow in tubing or annulus, the heat loss to a surrounding formation

through tubing, annulus, casing and cement and heat dispersion in the formation. Ali also

provided an analytical solution for flow in a wellbore and a numerical finite difference procedure

for solving a heat transfer equation in a formation which pioneered the work for developing a

thermal wellbore simulator. Fontanilla and Aziz (1982) proposed an analytical model for

calculating pressure and steam quality in a steam injection well. They incorporated two-phase

pressure gradient calculation correlations such as Beggs and Brill’s (1973) into their model.

Through comparisons with some experimental data, they found that the Beggs and Brill

5
correlation was the best one for their analytical model. Hasan and Kabir (2002) introduced a set

of analytical fluid temperature equations for wellbores with single-tubing or double-tubing

strings. The derived analytical solutions by them can consider the transient fluid flow in a

wellbore. Also, they introduced more influencing factors such as Joule-Thompson effects and

kinetic energy into their model.

Stone et al. (1989) developed the first wellbore simulator considering thermal three-phase

flow. Also, this wellbore simulator was fully coupled with a reservoir simulator, which means

that it simultaneously solved wellbore variables and reservoir variables together. Cao (2002)

developed an isothermal compositional wellbore simulator which was fully coupled with their

reservoir simulator GPRS (General Purpose Reservoir Simulator). Livescu et al. (2008, 2010)

further improved Stone’s model and developed a series of thermal multiphase (black oil and

compositional) wellbore simulators fully coupling with GPRS. Livescu’s wellbore models

symmetrically described the thermal wellbore fluid flows and considered a very complete list of

details on thermal wellbore modeling. Pourafshary et al. (2008) developed a thermal

compositional wellbore simulator coupling with a reservoir simulator. Bahonar (2011)

summarized thermal wellbore modeling work and developed a non-isothermal wellbore

simulator for steam injection wells. Most recently, Dong (2012) developed another fully-coupled

thermal wellbore and reservoir simulator. But these wellbore simulators cannot be applied in

wellbore with complex configurations and the thermal modeling in them is too simple. Also,

there are commercial reservoir simulators such as ECLIPSE Multi-Segment Well, CMG

Flexwell and surface facilities simulation software such as PIPESIM and IPM. However, these

commercial simulators are far from being perfect and there are still a lot of improvements needed

for different wellbore modeling applications.

6
Another area that may connect to thermal wellbore modeling is the research work on

annulus heat transfer. Accurate modeling on heat transfer in annuli space can have a great

contribution to wellbore heat loss calculations. From the 1950s, researchers began to investigate

natural convection heat transfer around vertical plates. Dropkin and Sommerscales (1965)

conducted experiments of measuring liquid natural convection heat transfer coefficients between

two parallel plates at various angles. They presented a set of empirical correlations regressed

from their experimental data. Those correlations were adopted by Willhite (1967). His method

has been widely used for computing wellbore heat loss since then. Nowadays, research works on

heat transfer in annuli space have made significant progress as well. However, those new

achievements on heat transfer in annuli space have yet to be applied in thermal wellbore

modeling and today we still use the Dropkin and Sommerscales correlation to calculate the heat

loss through a annuli space. Raithby and Hollands (1974) published a correlation for laminar and

turbulent flow of natural convection heat transfer in horizontal annuli and that correlation was

extensively used later. Kuehn and Goldstein (1975, 1980) carried out a series of experimental

and theoretical studies on natural convection heat transfer in horizontal space. Water and air,

which flowed in several of Rayleigh numbers (from 104 to 106) in the horizontal annulus, are

used respectively as a fluid medium in their experiments. Their experiments were conducted in

concentric and eccentric annuli space and empirical correlations for calculating natural

convection heat transfer coefficients are regressed from experimental data. Keyhani et al. (1983)

measured heat transfer in a vertical annuli space using air and helium as the working fluids. The

overall heat transfer data within a range of Rayleigh numbers from 103 to 2.3×106 were collected

in their experiments. Joshi (1987) built a model describing laminar natural convection in vertical

annuli space and then derived an analytical solution for his model. Since then, the research

7
method on heat transfer in annuli space had gradually evolved into numerical modeling. Elshamy

et al. (1990) developed a computer program to simulate laminar natural convection in a confocal

elliptical annulus. Based on their simulation results, empirical correlations were regressed

considering a wide range of Rayleigh numbers and different aspect ratios (the ratio of an inner

diameter to an outer diameter). Holzbecher et al. (1995) conducted an experiment on the laminar

and turbulent natural convection flow in a vertical annuli space and then compared experiment

results with numerical simulation. Weng and Chu (1996) developed a mathematical model

describing both natural convection and radiation heat transfer in a vertical annuli space. Hamad

et al. (1998) conducted natural convection heat transfer experiments which investigated different

angles of annuli with two values of the diameter ratio. They compared the experiment results

with FLUENT simulation results and empirical correlations were regressed based on the

relationship between the Rayleigh number and average Nusselt number. Since then, the CFD

(Computational Fluid Dynamics) software FLUENT had emerged as a prevailing tool for

researching heat transfer in annuli space. The FLUENT simulation results were also verified to

be accurate for predicting heat transfer in annuli space by many experiment results. Inaba et al.

(2005) set up an experiment to investigate the heat transfer in a vertical annuli space filled with

high temperature gas (nitrogen or helium). Then they performed FLUENT simulation for

comparison with observed data in their experiment. They also presented some empirical

correlations regressed through the observed experimental data with respect to different ratios of

radiation to convection heat transfer. Reddy et al. (2008) performed a numerical simulation for

natural convective heat transfer in vertical annuli space by using a pressure-correction algorithm

to solve heat transfer PDE equations. Alipour et al. (2013) investigated the effects of different

annuli aspect ratios on natural heat transfer by conducting an experiment and some

8
corresponding correlations were also developed in their study. Recent research on heat transfer in

annuli space mainly relies on numerical methods and FLUENT has been proved a very effective

tool for predicting heat transfer in annuli space.

9
Chapter 2: Thermal Wellbore Modeling

2.1 Wellbore Flow Introduction

The flow phenomenon in petroleum wellbores is complex due to sophisticate wellbore

completions and multiple forms and interactions of fluid mixtures along a wellbore trajectory.

Generally, flow can be categorized into four groups: (1) Single phase flow including single phase

gas, oil or water injection or production. Sometimes steam injection in thermal recoveries can

also be treated as single phase flow when the steam quality is high enough or steam is

superheated; (2) Two-phase flow including two phase gas-water, gas-oil or oil-water flow. (3)

Three-phase flow including oil, gas and water mixtures in a wellbore; (4) In a relatively rare case

where there are solid particles flowing together with oil, gas and water, a four-phase flow occurs

in a wellbore. For single-phase flow, it is considered as homogenous along a wellbore and only

the gravitational force and frictional force are the major factors affecting fluid properties.

Multiphase flow usually involves two or three phases of gas, oil and water mixtures and it is

complicated by the gas slip phenomenon. This gas slip phenomenon is due to the tendency of gas

flowing faster than liquid and gas buoyancy in a pipe space. If the multiphase flow is considered

as homogeneous, the gas slip is neglected but it may lead to large errors in wellbore modeling.

Thus, it is critical to take into account gas slip in multiphase flow research.

In the multiphase flow wellbore modeling, there are some important basic concepts

including a superficial velocity, liquid holdup, flow regimes and in-situ volume fractions. The

gas superficial velocity is defined as:


𝑞𝑔
𝑉𝑠𝑔 = (2-1)
𝐴

where qg is the in-situ gas flow rate and A is the cross-sectional area of a tubing or annulus.

Accordingly, the liquid superficial velocity is defined as:

10
𝑞𝑙
𝑉𝑠𝑙 = (2-2)
𝐴

where ql is the in-situ liquid flow rate. The superficial velocity can be interpreted as a phase

velocity when it occupies the whole cross-sectional area of a pipe. The fluid mixture velocity is

defined as:

𝑉𝑚 = 𝑉𝑠𝑔 + 𝑉𝑠𝑙 (2-3)

The real gas velocity is given as:


𝑞𝑔
𝑉𝑔 = 𝐴 (2-4)
𝑔

where Ag is the actual cross-sectional area in which the gas flows through in a pipe (Ag≤A).

Accordingly, the real liquid velocity is defined as:


𝑞 𝑞
𝑉𝑙 = 𝐴𝑙 = 𝐴−𝐴𝑙 (2-5)
𝑙 𝑔

where Al is the actual cross-sectional area in which the liquid flows through in a pipe (Al≤A).

The in-situ gas volume fraction is defined as:


𝐴𝑔 𝑉𝑠𝑔
𝑓𝑔 = = (2-6)
𝐴 𝑉𝑔

The liquid holdup is defined as:

𝐻𝐿 = 1 − 𝑓𝑔 (2-7)

The density of the fluid mixture 𝜌𝑚 can be calculated by:

𝜌𝑚 = 𝜌𝑔 𝑓𝑔 + 𝜌𝐿 (1 − 𝑓𝑔 ) (2-8)

where 𝜌𝑔 is the gas phase density and 𝜌𝐿 is the liquid phase density. Once an in-situ gas volume

fraction or liquid holdup is known, the fluid mixture density can be computed from equation (2-

8). To determine liquid holdup or an in-situ gas volume fraction, an important concept need to be

considered. That is a flow regime or flow pattern. It refers to the multiphase flow geometrical

configurations in a pipe space. A flow regime is affected by a phase density, a phase velocity,

11
pipe geometry, and pressure. The usual flow regimes include bubbly flow, slug flow, churn

flow, and annular flow as shown in Fig. 2-1.

Fig. 2-1: Flow regimes of multiphase flow in a vertical pipe (Weisman, 1983)

For isothermal wellbore flow research, calculating pressure profiles along a wellbore

trajectory is the major task. The basic equation for computing pressure along the wellbore is the

momentum balance equation:

𝑑P 𝑑P 𝑑P 𝑑P
=( ) +( ) +( ) (2-9)
𝑑𝑧 𝑑𝑧 𝐺 𝑑𝑧 𝐹 𝑑𝑧 𝐴

𝑑P
( 𝑑𝑧 ) = 𝜌𝑚 𝑔𝑐𝑜𝑠𝜃
𝐺

2
𝑓𝑡𝑝 𝜌𝑚 𝑉𝑚
𝑑P
( 𝑑𝑧 ) = ±
𝐹 2𝑑𝑖𝑛

𝑑P 𝑑 𝑑
( 𝑑𝑧 ) = ± [𝑑𝑡 (𝜌𝑚 𝑉𝑚 ) + 𝑑𝑧 (𝜌𝑚 𝑉𝑚2 )]
𝐴

The details on the momentum equation are discussed later. The three terms in this

𝑑P 𝑑P 𝑑P
equation refers to: ( 𝑑𝑧 ) the gravitational force, (𝑑𝑧 ) frictional gradient and ( 𝑑𝑧 ) kinetic
𝐺 𝐹 𝐴

energy. The definitions of these terms show that a pressure drop along a wellbore is mainly

decided by the fluid mixture density and mixture velocity. Thus, the main content of a pressure

calculation along a wellbore is how to accurately estimate the fluid mixture properties. The

12
simplest method for pressure calculations is a homogeneous model which considers the

multiphase flow as a single-phase flow. This approach assumes that all fluid properties along the

wellbore are the same and thus the fluid properties can be calculated only based on the wellhead

or well bottom input conditions. However, the situations at different sections of a wellbore are

quite different as a wellbore trajectory is usually vertical or deviated. Figure 2-2 shows what

possible flow patterns look like along a typical vertical well.

Fig. 2-2: Multiphase flow in a vertical pipe (Weisman, 1983)

It is apparent that a homogenous model can generate large errors when it is applied in

multiphase flow. Only single-phase flow is appropriate for application of a homogeneous model.

Therefore, several researchers proposed different empirical models to more accurately solve the

problem. These empirical models include the Duns and Ros correlation (1963), Orkiszewski

correlation (1967) and Beggs and Brill correlation (1973). Among them, the Beggs and Brill

correlation (1973) is most widely used and it is given as:

𝑓𝑡𝑝 𝜌𝑛 𝑉2
𝑚
𝑑𝑃 𝜌𝑚 𝑔𝑠𝑖𝑛𝜃+
2𝑑
= (2-10)
𝑑𝐿 1−𝐸𝑘

13
𝜌𝑚 𝑉𝑠𝑔 𝑉𝑚
𝐸𝑘 =
𝑃

dP
where is the pressure gradient, ftp is the two-phase friction factor, ρm is the fluid mixture
dL

density, ρn is the no-slip density of the fluid mixture and d is a pipe diameter. The Beggs and

Brill equation can be used for two-phase flow in vertical, horizontal and inclined pipelines. The

first step in this method is to determine flow regimes based on an input liquid volume fraction

 𝐿 and the mixture Froude number 𝑁𝐹𝑟 :

𝑉
 𝐿 = 𝑉𝑠𝑙 (2-11)
𝑚

𝑚 𝑉2
𝑁𝐹𝑟 = 𝑔𝑑 (2-12)

Segregated Limits:

L  0.01 and N Fr  L1
or L  0.01 and N Fr  L

Transition Limits:

L  0.01 and L2  N Fr  L3

Intermittent Limits:

0.01  L  0.4 and L3  N Fr  L1


or L  0.4 and L3  N Fr  L4

Distributed Limits:

L  0.4 and N Fr  L1
or L  0.4 and N Fr  L4

The parameters for flow regime boundaries are defined by the following variables:

L1 = 316 L0.302 , L2 = 9.252  10 −4 L− 2.4684


L3 = 0.10 L−1.4516 , L4 = 0.5 L− 6.738

14
The second step in the Beggs and Brill correlation is calculating the liquid holdup:

𝐻𝐿 = 𝐻𝐿0 𝜔 (2-13)

𝑎𝜆𝑏
𝐻𝐿0 = 𝑁𝑐𝐿 (𝐻𝐿0 > 𝜆𝐿 )
𝐹𝑟

where 𝐻𝐿0 means the equivalent liquid holdup existing at the same conditions in a horizontal

pipe. The parameters a, b and c can be obtained for each flow regime in the following table:

Table 2-1a Parameters a, b and c for Flow Regimes (Beggs and Brill, 1973)
Flow Regime a b c

Segregated 0.98 0.4846 0.0868

Intermittent 0.845 0.5351 0.0173

Distributed 1.065 0.5824 0.0609

For transition flow, the liquid holdup is calculated as:

𝐿 −𝑁𝐹𝑟 𝑁 −𝐿
𝐻𝐿(𝑡𝑟𝑎𝑛𝑠𝑖𝑡𝑖𝑜𝑛) = ( 𝐿3 ) 𝐻𝐿(𝑠𝑒𝑔𝑟𝑒𝑔𝑎𝑡𝑒𝑑) + ( 𝐿𝐹𝑟−𝐿 2) 𝐻𝐿(𝑖𝑛𝑡𝑒𝑟𝑚𝑖𝑡𝑡𝑒𝑛𝑡) (2-14)
3 −𝐿2 3 2

The 𝜔 in equation (2-13) is used to correct the liquid holdup due to an effect of pipe inclination:

𝜔 = 1 + 𝛼[sin(1.8𝜃) − 0.333 sin3 (1.8𝜃)] (2-15)

where 𝜃 is the actual angle of a pipe from the horizontal. The coefficient 𝛼 is determined by:

𝑓 ℎ 𝑘
𝛼 = (1 − 𝜆𝐿 ) ln(𝑒 ∙ 𝜆𝐿 ∙ 𝑁𝑣𝑙 ∙ 𝑁𝐹𝑟 ) (2-16)

𝜌 0.25
𝑁𝑣𝑙 = 1.983𝑉𝑠𝑙 (𝑔𝜎𝐿 )

where 𝜎 is the interfacial tension between the gas and liquid phases. The parameters e, f, h and k

in equation (2-16) can be obtained from following table:

Table 2-1b Parameters e, f, h and k for Flow Regimes (Beggs and Brill, 1973)
Flow Pattern e f h k

Segregated uphill 0.011 -3.768 3.539 -1.614

15
Intermittent uphill 2.96 0.305 -0.4473 0.0978

Distributed uphill No correction 𝛼=0,𝜔=1

All patterns downhill 4.70 -0.3692 0.1244 -0.5056

For vertical upward flow (𝜃 = 90° ), 𝜔 = 1 + 0.3𝛼 .

After the liquid holdup 𝐻𝐿 is obtained, the fluid mixture density can be computed by

equation (2-8) and the no-slip density in equation (2-10) can be calculated by 𝜌𝑛 = 𝜌𝐿 𝜆𝐿 +

𝜌𝑔 (1 − 𝜆𝐿 ) . The two-phase friction factor ftp is a function of the Moody friction factor:

𝑓𝑡𝑝 = 𝑓𝑚 𝑒 𝑆 (2-17)

where 𝑓𝑚 is Moody friction factor and it can be calculated by Chen’s (1979) correlation:
1
𝑓𝑚 = 𝜀 ⁄𝑑 5.0452 2 (2-18)
[4 log( − log Ʌ)]
3.7065 𝑅𝑒

(𝜀 ⁄𝑑 )1.1098 5.8506 0.8981


Ʌ= +( )
2.8257 𝑅𝑒

𝜌𝑛 𝑣𝑚 𝑑
𝑅𝑒 = 𝜇𝑛

where Re is the Reynolds number, 𝜀 is pipe roughness and 𝜇𝑛 is the fluid no-slip viscosity (𝜇𝑛 =

𝜇𝐿 𝜆𝐿 + 𝜇𝑔 (1 − 𝜆𝐿 )).

The parameter S in equation (2-17) is given as:

ln 𝑥
𝑆 = −0.0523+3.182 ln 𝑥−0.8725(ln 𝑥)2 +0.01853(ln 𝑥)4 (𝑥 ≤ 1 𝑜𝑟 𝑥 ≥ 1.2)

𝑆 = ln(2.2𝑥 − 1.2) (1 < 𝑥 < 1.2)

𝜆
𝑥 = 𝐻𝐿2
𝐿

In addition to empirical correlations, mechanistic models are ever a major focus of

wellbore flow research to predict multiphase flow behavior along a wellbore. Compared with

experiment-based empirical correlations, those mechanistic models rely more on mechanism

16
theory analysis. Typically, in a mechanistic model, the first step is to determine flow regimes and

then an individual model for each flow regime is used to calculate friction loss and pressure

gradient. Famous mechanistic models include Hasan and Kabir’s mechanistic model (1988) and

Ansari’s mechanistic model (1994). These models have been proved to be more relatively

successful for predicting multiphase flow.

Hasan and Kabir’s mechanistic model (1988) predicts a pressure profile based on the

main four flow patterns (shown in Fig. 2-1). This widely-used mechanistic model is summarized

as follows: If phase velocities are low, the gas phase almost moves at the same speed as the

liquid phase and the gas phase is dispersed in the liquid phase as small bubbles. When the gas

velocity is increased to a critical point, the flow pattern will transit to slug flow. This bubble/slug

transition velocity is expressed as:

sin 𝜃
𝑉𝑠𝑔 = 4−𝐷 (𝐷𝑜 𝑉𝑠𝑙 + 𝑉𝑠 ) (2-19)
𝑜

1.2 𝑑 < 4 𝑖𝑛
𝐷𝑜 = { }
2.0 𝑑 > 4 𝑖𝑛
0.25
𝑔𝜎𝐿 (𝜌𝐿 −𝜌𝑔 )
𝑉𝑠 = 1.53 [ ]
𝜌𝐿2

When the superficial gas velocity exceeds the velocity given by (2-19), the flow transits

from bubble flow to slug flow.

Another criterion for transition to slug flow can be used by checking the Taylor bubble

rise velocity:

𝜎𝐿 𝑔(𝜌𝐿 −𝜌𝑔 )
𝑉𝑇𝐵 = 0.35√ 𝜌𝐿2
√sin 𝜃 (1 + cos 𝜃)1.2 (2-20)

The superficial gas velocity for slug/churn flow transition is given as:

2) 1.7
0.0067(𝜌𝐿 𝑉𝑠𝑙
𝑉𝑠𝑔 = √ if 𝜌𝐿 𝑉𝑠𝑙2 < 50 (2-21a)
𝜌𝑔

17
2 )−23.2
17.1log10 (𝜌𝐿 𝑉𝑠𝑙
𝑉𝑠𝑔 = √ if 𝜌𝐿 𝑉𝑠𝑙2 ≥ 50 (2-21b)
𝜌𝑔

The superficial gas velocity for flow transition to annular flow is written as:
0.25
𝜎𝐿 𝑔(𝜌𝐿 −𝜌𝑔 )
𝑉𝑠𝑔 = 3.1 [ 2 ] (2-22)
𝜌𝑔

The liquid holdup in a bubbly flow regime is expressed as:


𝑉𝑠𝑔
𝐻𝐿 = 1 − 𝐷 (2-23)
𝑜 𝑉𝑚 +𝑉𝑠

A pressure change in a bubbly flow regime along a wellbore ∆𝐿 is calculated by:

2𝑓𝑚 𝜌𝑚 𝑉2𝑚 ∆𝑉
∆𝑃 = 𝜌𝑚 𝑔𝑠𝑖𝑛𝜃 + 𝑑
+ 𝜌𝑚 𝑉𝑚 ∆𝐿𝑚 (2-24)

The Moody friction factor 𝑓𝑚 can be computed by equation (2-18).

For slug and churn flow, equation (2-23) is still used to calculate liquid holdup and the

gas slip velocity is calculated from the equation:

𝑔𝑑(𝜌𝐿 −𝜌𝑔 )
𝑉𝑠 = 0.35√ 𝜌𝐿
√sin 𝜃 (1 + cos 𝜃)1.2 (2-25)

𝐷𝑜 = 1.2 for slug flow and 𝐷𝑜 = 1.15 for churn flow. Equation (2-24) is still used for a pressure

change in slug and churn flow regimes.

In annular flow, the liquid holdup calculation is different from it in bubbly, slug and

churn flow:
𝑉𝑠𝑙 𝐸
𝐻𝐿 = 𝑉 (2-26)
𝑠𝑙 𝐸+𝑉𝑠𝑔

2.86
𝐸 = 0.0055 [104 ∙ (𝑉𝑠𝑔 ) ] 𝑖𝑓 (𝑉𝑠𝑔 ) < 4 × 10−4
𝑐𝑟𝑖𝑡 𝑐𝑟𝑖𝑡

𝐸 = 0.857log10 [104 ∙ (𝑉𝑠𝑔 ) ] 𝑖𝑓 (𝑉𝑠𝑔 ) ≥ 4 × 10−4


𝑐𝑟𝑖𝑡 𝑐𝑟𝑖𝑡

𝑉𝑠𝑔 𝜇𝑔 𝜌𝑔 0.5
(𝑉𝑠𝑔 ) = 𝜎𝐿
(𝜌 )
𝑐𝑟𝑖𝑡 𝐿

18
The friction loss for annular flow is given as:
2
2𝑓𝑐 𝜌𝑐 𝑉𝑠𝑔
∆𝑃𝑓 = (𝑓 ) (2-27)
𝑑 𝑔𝑐

0.079(1+75𝐻𝐿 )
𝑓𝑐 = 0.25
𝑁𝑅𝑒𝑔

𝜌𝑔 𝑉𝑠𝑔 +𝜌𝐿 𝑉𝑠𝑙 𝐸


𝜌𝑐 = 𝑉𝑠𝑔 +𝑉𝑠𝑙 𝐸

𝑓𝑔𝑐 = (1 + 𝑋 0.8 )−0.378

0.9 0.1
1−𝑚𝑔 𝜇 𝜌𝐿
𝑋=( ) (𝜇 𝐿 ) √𝜌𝑔
𝑚𝑔 𝑔

where mg is a gas mass fraction and NReg is the Reynold number of gas flow.

As mechanistic models rely more on a theory analysis, their application range is

relatively wider than the empirical correlations. Over the time many researchers developed

different mechanistic models for specified range applications. But no single model has been

proved to perform well to all wellbore flow applications. Every empirical correlation or

mechanistic model should be used with caution with attention to its valid range or assumption.

For thermal wellbore research, temperature profile computations along a wellbore is

another major task in addition to pressure profile calculations. When a fluid flows through a

wellbore path, it will exchange heat with its surrounding formation as there is a temperature

difference between the fluid and surrounding formation. This heat exchange causes that

temperature varies along the wellbore. As temperature affects fluid properties, accurately

estimating it along the wellbore is crucial.

Ramey (1962) proposed an analytical temperature profile solution for fluid flow in an

injector. The equation is expressed as:

𝑇𝑓 = 𝑎𝑍 + 𝑏 − 𝑎𝐴 + (𝑇0 + 𝑎𝐴 − 𝑏)𝑒 −𝑍⁄𝐴 for liquid (2-28a)

19
1 1
𝑇𝑓 = 𝑎𝑍 + 𝑏 − 𝐴 (𝑎 + 778𝑐) + [𝑇0 − 𝑏 + 𝐴 (𝑎 + 778𝑐)] 𝑒 −𝑍⁄𝐴 for gas (2-28b)

𝑐𝑝𝑓 𝑊𝑓 [𝑘𝑓 +𝑟𝑡𝑜 𝑈𝑡𝑜 𝑓(𝑡)]


𝐴= 2𝜋𝑟𝑡𝑜 𝑈𝑡𝑜 𝑘𝑓

where a and b are coefficients in a linear geothermal temperature function 𝑇0 = 𝑎𝑍 + 𝑏, cpf is

specific heat of the fluid, Z is the wellbore depth, 𝑊𝑓 is a fluid flow rate in a wellbore, 𝑘𝑓 is the

thermal conductivity of the fluid, 𝑟𝑡𝑜 is the outside tubing radius, 𝑈𝑡𝑜 is the overall heat transfer

coefficient and f is a time function. This method assumes that the flow is a single-phase and

steady flow in the tubing. It also assumes that the fluid is incompressible and has no phase

changes, and an enthalpy change due to a pressure change is canceled by a potential energy

change.

One important step in application of equation (2-28) is to evaluate the time function f(t)

which relates to the heat loss calculation. The most-widely used method for calculating heat loss

in a wellbore is proposed by Willhite (1967) and it is given by:

𝑄𝑙𝑜𝑠𝑠 = 2𝜋𝑟𝑡𝑜 𝑈𝑡𝑜 (𝑇𝑓 − 𝑇𝑐𝑓 ) (2-29)

where 𝑇𝑓 is the fluid temperature and 𝑇𝑐𝑓 is the temperature at a cement/formation interface. The

overall heat transfer coefficient considers all the heat resistances including the flowing fluid,

tubing wall, annulus, a casing wall and cement as one factor. It can be written as:

1 𝑟𝑡𝑜 𝑟𝑡𝑜 𝑙𝑛(𝑟𝑡𝑜 /𝑟𝑡𝑖 ) 𝑟𝑡𝑜 𝑙𝑛(𝑟𝑖𝑛𝑠 /𝑟𝑡𝑜 ) 𝑟𝑡𝑜 𝑟𝑡𝑜 𝑙𝑛(𝑟𝑐𝑜 /𝑟𝑐𝑖 ) 𝑟𝑡𝑜 𝑙𝑛(𝑟𝑤𝑏 /𝑟𝑐𝑜 )
=𝑟 + + +𝑟 + + (2-30)
𝑈𝑡𝑜 𝑡𝑖 ℎ𝑓 𝑘𝑡 𝑘𝑖𝑛𝑠 𝑖𝑛𝑠 (ℎ𝑐 +ℎ𝑟 ) 𝑘𝑐𝑎𝑠 𝑘𝑐𝑒𝑚

where 𝑟𝑡𝑖 , 𝑟𝑡𝑜 , 𝑟𝑖𝑛𝑠 , 𝑟𝑐𝑖 , 𝑟𝑐𝑜 , and 𝑟𝑤𝑏 are the radii of the inside tubing, outside tubing, tubing

insulation, inside casing, outside casing and cement/formation interface, respectively. 𝑘𝑡 , 𝑘𝑖𝑛𝑠 ,

𝑘𝑐𝑎𝑠 , and 𝑘𝑐𝑒𝑚 are the thermal conductivities of the tubing wall, tubing insulation, casing wall

and cement, respectively. ℎ𝑓 is the convective heat transfer coefficient between the fluid film and

20
its contact wall, and ℎ𝑐 and ℎ𝑟 are the convective and radial heat transfer coefficients of the

medium inside annulus.

Because items like ℎ𝑐 and ℎ𝑟 in equation (2-30) depend on temperature in annulus

which, in turn, is a function of the overall heat transfer coefficient 𝑈𝑡𝑜 , 𝑈𝑡𝑜 can not be directly

computed from equation (2-30). An iterative procedure was proposed by Willhite as follows:

(1) Estimate an initial value for the overall heat transfer coefficient 𝑈𝑡𝑜 . The initial values

can be obtained from the paper by Willhite (1967) based on the average tubing temperature.

(2) Compute the Ramey time function f(t), which was proposed by Ramey (1962). The

Ramey heat loss computation equation is given as:

2𝜋𝑘𝑒 (𝑇𝑐𝑜 −𝑇𝑒 )


𝑄𝑙𝑜𝑠𝑠 = (2-31)
𝑓(𝑡)

where 𝑘𝑒 is the formation thermal conductivity, 𝑇𝑐𝑜 is the temperature of outside of the casing

wall, 𝑇𝑒 is the formation temperature, and 𝑓(𝑡) is the so-called transient time function.

When time t is greater than one week, function (𝑡) is calculated by:

2√𝛼𝑡
𝑓(𝑡) = 𝑙𝑛 − 0.29 (2-32)
𝑟𝑐𝑓

where 𝛼 is the formation thermal diffusivity and 𝑟𝑐𝑓 is the cement/formation interface radius.

When the time t is less than one week, f(t) can be obtained from Willhite’s paper.

(3) Compute the initial formation temperature Te and the temperature at the

cement/formation interface Tcf :

𝑇𝑒 = 𝑇𝑠𝑢𝑟𝑓 + 𝑔𝑇 𝑍 cos 𝜃 (2-33)

𝑟𝑡𝑜 𝑈𝑡𝑜 𝑓(𝑡)𝑇𝑓 +𝑘𝑒 𝑇𝑒


𝑇𝑐𝑓 = (2-34)
𝑟𝑡𝑜 𝑈𝑡𝑜 𝑓(𝑡)+𝑘𝑒

where 𝑇𝑠𝑢𝑟𝑓 is the ground surface geothermal temperature, 𝑔𝑇 is a geothermal gradient, 𝑍 is the

wellbore depth and 𝜃 is the local angle between a well and the vertical direction.

21
(4) Compute the tubing external temperature Tto and the casing internal temperature Tci:

𝑟
𝑇𝑡𝑜 = 𝑇𝑓 − [𝑙𝑛 ( 𝑟𝑡𝑜 ) /𝑘𝑡 ] 𝑟𝑡𝑜 𝑈𝑡𝑜 (𝑇𝑓 − 𝑇𝑐𝑓 ) (2-35)
𝑡𝑖

𝑟 𝑟
𝑇𝑐𝑖 = 𝑇𝑐𝑓 + [𝑙𝑛 ( 𝑟𝑐𝑓 ) /𝑘𝑐𝑒𝑚 + 𝑙𝑛 ( 𝑟𝑐𝑜 ) /𝑘𝑐𝑎𝑠 ] 𝑟𝑡𝑜 𝑈𝑡𝑜 (𝑇𝑓 − 𝑇𝑐𝑓 ) (2-36)
𝑐𝑜 𝑐𝑖

(5) Compute the radial heat transfer coefficient hr and the convective heat transfer

coefficient hc in the annuli space. The equation for computing the radial heat transfer coefficient

hr is derived from the Stefan-Boltzmann law:

2
ℎ𝑟 = 𝜎𝐹𝑡𝑐𝑖 (𝑇𝑡𝑜 + 𝑇𝑐𝑖2 )(𝑇𝑡𝑜 + 𝑇𝑐𝑖 ) (2-37)

1 1 𝑟 1
= 𝜀 + 𝑟𝑡𝑖 (𝜀 − 1)
𝐹𝑡𝑐𝑖 𝑡𝑜 𝑐𝑖 𝑐𝑖

where 𝜀𝑡𝑜 is the emissivity of the outside tubing surface, 𝜀𝑐𝑖 is the emissivity of the inside casing

surface and 𝜎 is the Stefan-Boltzmann constant [1.713 × 10−9 Btu/(ft 2 hr °R4 )]. The correlations

proposed by Dropkin and Sommerscales (1956) are used to compute the convective heat transfer

coefficient hc:

𝑟
ℎ𝑐 = 𝑘ℎ𝑐 / [𝑟𝑡𝑜 𝑙𝑛 (𝑟𝑐𝑖 )] (2-38)
𝑡𝑜

𝑘ℎ𝑐 ⁄𝑘ℎ𝑎 = 0.049(𝐺𝑟 𝑃𝑟 )0.333 𝑃𝑟0.074

(𝑟𝑐𝑖 −𝑟𝑡𝑜 )3 𝑔𝜌𝑎𝑛


2 𝛽(𝑇 −𝑇 )
𝑡𝑜 𝑐𝑖
𝐺𝑟 = 2
𝜇𝑎𝑛

𝑃𝑟 = 𝐶𝑎𝑛 𝜇𝑎𝑛 /𝑘ℎ𝑎

where 𝑘ℎ𝑐 and 𝑘ℎ𝑎 are equivalent and real thermal conductivity of the medium in the space

between two parallel plates ( 𝑘ℎ𝑐 is computed by natural convection effects), 𝑃𝑟 is the

dimensionless Prandtl number, 𝐶𝑎𝑛 is the heat capacity, 𝜇𝑎𝑛 is the viscosity, 𝐺𝑟 is the

dimensionless Grashof number, 𝛽 is the thermal volumetric expansion coefficient, and 𝜌𝑎𝑛 is the

22
density of the medium. The appropriate application range for formulas (2-38) is 5 × 104 ≤

𝐺𝑟 𝑃𝑟 ≤ 7.2 × 108 .

(6) Compute Uto from equation (2-30) using the parameters obtained through the above

steps (1) to (5) and then compare this Uto with its old value. The new Uto value will be used as

the initial value to repeat steps (2) through (6) if the difference is greater than a user-input

tolerance value. Until the difference between this Uto and its old value is less than the tolerance,

the iteration is terminated and the final Uto is accepted.

After the iteration of Uto calculations is converged, the temperatures at different parts of a

wellbore are also obtained and can be directly used to heat loss calculations. The whole

procedure of iteratively computing the overall heat transfer coefficient Uto is shown in Fig. 2-6.

After Uto is obtained, the heat loss can be easily computed from equation (2-29).

Fig. 2-3: Iterative procedure of Uto calculation


While Ramey’s analytical model can only apply to some simple cases of injectors, Hasan

and Kabir presented another analytical model considering more conditions for predicting fluid

temperature along a wellbore in producers:

23
𝑔 sin 𝜃
𝑇𝑓 = 𝑇𝑒𝑖 + 𝐴[1 − 𝑒 (𝑍𝑏ℎ −𝑍)/𝐴 ] (− + 𝜙 + 𝑔𝑇 sin 𝜃) + 𝑒 (𝑍𝑏ℎ −𝑍)/𝐴 (𝑇𝑓𝑏ℎ − 𝑇𝑒𝑏ℎ ) (2-39)
𝑐𝑝𝑚

𝑐𝑝𝑓 𝑊𝑓 𝑘𝑒 +𝑟𝑡𝑜 𝑈𝑡𝑜 𝑇𝐷


𝐴= ( )
2𝜋 𝑟𝑡𝑜 𝑈𝑡𝑜 𝑘𝑒

2𝜋𝑘𝑒 (𝑇𝑐𝑓 −𝑇𝑒 )


𝑇𝐷 = 𝑄𝑙𝑜𝑠𝑠

where Tei is the initial formation temperature, Tei = Teibh − g T Z , Teibh is the formation

temperature at well bottom, Zbh is the well bottom depth, Tfbh is fluid temperature at well bottom

and g T is the geothermal gradient. The parameter ϕ depends on a mass flow rate, a gas/liquid

ratio, and wellhead pressure, and it is given by Sagar et al. (1991):

𝜙 = −0.002978 + 1.006 × 106 𝑃𝑤ℎ + 1.906 × 10−4 𝑊𝑓 − 1.047 × 10−6 𝑓𝑔𝐿 + 3.229 ×

10−5 API + 0.004009𝛾𝑔 − 0.3551𝑔𝑇 (2-40)

where Pwh is the wellhead pressure, fgL is a gas/liquid ratio and γg is the gas specific gravity.

Equation (2-40) is only suitable for a mass flow rate of less than 5 lbm/sec. For a mass flow rate

of greater than 5 lbm/sec, ϕ = 1.0.

Equation (2-39) can be used in different conditions of multiple phase flow in a producer.

It can handle different flow regimes and consider well deviation and geometry. Few other

analytical models like Alves et al. (1992) are available for predicting fluid temperature profiles

along a wellbore. But the application range of these models is limited. General wellbore

simulation has become more prevailing in recent wellbore modeling research.

2.2 Mathematical Equations of Fluid Flow and Energy

A thermal wellbore modeling consists of three major parts within a wellbore (as shown in

Fig. 2-4): fluid flow in tubing (sometimes flow in the annulus), heat exchange between the hot

fluid flowing in wellbore and surrounding formation and heat transfer in the formation. The heat

24
exchange between hot fluid and formation usually refers to heat loss from hot fluid to formation

but the fluid in wellbore can be heated by surrounding formation at some situations.

Fig. 2-4: Schematic description of a thermal wellbore system

For fluid flow in tubing or annulus, there are a lot of physical parameters to be

considered: gravity force, friction loss, kinetic energy, fluid temperature and enthalpy and their

interactions with surrounding formation, and fluid velocity, flow regimes and fluid mixture

density etc. Similar to thermal reservoir modeling, thermal wellbore modeling also considers

mass, momentum and energy changes and therefore consists of energy, mass and momentum

governing equations. All these equations are derived from the conservation law. Some

researchers have presented complete set of governing equations in their published papers (Ali,

1981; Livescu et al., 2010; Bahonar, 2011). But for heat exchange and heat transfer in formation,

current wellbore modeling modules just make many simplifications or easily ignore them in

applications.

25
2.2.1 Energy Flow Equation

Fig. 2-5: Schematic description of energy balance in a fluid segment


For a volume element in tubing along the wellbore through which fluid is flowing, there

are several energy items considerable:

Mass inflow rate = 𝜌𝑝 𝑉𝑠𝑝 𝐴

1
Specific kinetic energy = 𝑉2
2 𝑝

1
Energy inflow = 𝐴∆𝑡 ∑𝑝 𝜌𝑝 𝑉𝑠𝑝 (ℎ𝑝 + 𝑉𝑝2 ) │𝑧
2

1
Energy outflow = 𝐴∆𝑡 ∑𝑝 𝜌𝑝 𝑉𝑠𝑝 (ℎ𝑝 + 2 𝑉𝑝2 ) │𝑧+∆𝑧

Gravitational potential energy change = 𝐴∆𝑧∆𝑡 ∑𝑝 𝜌𝑝 𝑉𝑠𝑝 𝑔𝑐𝑜𝑠𝜃

Energy lost to surroundings (Qloss_t) = 𝑄𝑙𝑜𝑠𝑠 ∆𝑧∆𝑡

1
Energy accumulation during ∆𝑡 = 𝐴∆𝑧 ∑𝑝 𝜌𝑝 𝛼𝑝 (𝑢𝑝 + 2 𝑉𝑝2 ) │ − 𝐴∆𝑧 ∑𝑝 𝜌𝑝 𝛼𝑝 (𝑢𝑝 +
𝑡+∆𝑡

1 2
𝑉 )│
2 𝑝 𝑡

According to conservation law, these items in the volume element have a relationship

shown in follows during a time period ∆𝑡:

Energy inflow – Energy outflow + Gravitational potential energy change – Energy lost to

surroundings (Qloss_t) + Energy sink/source (mh_t) = Energy accumulation

26
Thus we can obtain the following equation based on the relationship shown above:
1 1
−(∑𝑝 𝜌𝑝 𝑉𝑠𝑝 (ℎ𝑝 + 𝑉𝑝2 )│𝑧+∆𝑧 − ∑𝑝 𝜌𝑝 𝑉𝑠𝑝 (ℎ𝑝 + 𝑉𝑝2 )│𝑧 ) 𝑄𝑙𝑜𝑠𝑠_𝑡 𝑚ℎ
2 2 𝑡
∆𝑧
+ ∑𝑝 𝜌𝑝 𝑉𝑠𝑝 𝑔𝑐𝑜𝑠𝜃 − 𝐴∆𝑧∆𝑡 + 𝐴∆𝑧∆𝑡 =

1 1
∑𝑝 𝜌𝑝 𝛼𝑝 (𝑢𝑝 + 𝑉𝑝2 )│ −∑𝑝 𝜌𝑝 𝛼𝑝 (𝑢𝑝 + 𝑉𝑝2 )│
2 𝑡+∆𝑡 2 𝑡
∆𝑡
(2-41)

𝑄𝑙𝑜𝑠𝑠_𝑡 𝑄𝑙𝑜𝑠𝑠 ∆𝑧∆𝑡 𝑄𝑙𝑜𝑠𝑠 𝑚ℎ𝑡


𝐴∆𝑧∆𝑡
= 𝐴∆𝑧∆𝑡
= 𝐴
and 𝐴∆𝑧∆𝑡
= 𝑚ℎ

By taking ∆𝑡 → 0 and ∆𝑧 → 0 , we obtain the energy continuity equation:

𝜕 1 𝜕 1 𝑄𝑙𝑜𝑠𝑠
∑ 𝜌 𝛼 (𝑢𝑝
𝜕𝑡 𝑝 𝑝 𝑝
+ 2 𝑉𝑝2 ) = − 𝜕𝑧 ∑𝑝 𝜌𝑝 𝑉𝑠𝑝 (ℎ𝑝 + 2 𝑉𝑝2 ) + ∑𝑝 𝜌𝑝 𝑉𝑠𝑝 𝑔𝑐𝑜𝑠𝜃 − 𝐴
+ 𝑚ℎ (2-42)

where 𝑝 is the phase index and represents the oil, water and gas phases, 𝑢𝑝 is the internal energy

of phase oil, water or gas, and ℎ𝑝 is phase enthalpies. The enthalpy ℎ𝑝 can be calculated by ℎ𝑝 =

𝑝𝑤
𝑢𝑝 + 𝜌 . The Joule-Thompson effect is reflected in this equation by the phase density 𝜌𝑝 . 𝑉𝑝 is
𝑝

the real phase velocity and 𝑉𝑠𝑝 is the superficial phase velocity, which is computed by 𝑉𝑠𝑝 =

𝛼𝑝 𝑉𝑝 . The left-hand side of equation (2-42) represents the energy accumulation term changing

with time in the control volume. The right-hand side is the sum of energy influx, energy outflux,

kinetic energy change and heat loss. The first term on the right-hand side describes the

convection heat flux and kinetic energy change in the control volume. The second term on the
𝑄𝑙𝑜𝑠𝑠
right-hand side represents the gravitational energy change. is the heat loss to the
𝐴

surrounding formation per unit tubing or annulus length. The last term on the right-hand side is

the heat flux sink/source term similar with a sink/source term in mass conservation equation.

This energy continuity equation was proposed by several authors in their publications (Ali, 1981;

Stone et al., 1989; Hasan & kabir, 2002; Livescu et al., 2008; Bahonar et al., 2009).

27
2.2.2 Mass Flow Equation

The mass flow equation consists of the fluid mass flow and accumulation change along

the wellbore path. Based on the similar derivation procedure presented by Aziz and Settari

(1979), the equation is derived as follows considering that there are Nc hydrocarbon components

and one water component in a control volume along the tubing in the wellbore (Fig. 2-6).

Fig. 2-6: Fluid flow in a wellbore control volume of length Δz


The mass accumulation in the control volume during the time interval ∆𝑡 is:

(𝜌𝑔 𝛼𝑔 𝑥𝑐𝑔 + 𝜌𝑜 𝛼𝑜 𝑥𝑐𝑜 + 𝜌𝑤 𝛼𝑤 𝑥𝑐𝑤 )| − (𝜌𝑔 𝛼𝑔 𝑥𝑐𝑔 + 𝜌𝑜 𝛼𝑜 𝑥𝑐𝑜 + 𝜌𝑤 𝛼𝑤 𝑥𝑐𝑤 )|


𝑡+∆𝑡 𝑡+∆𝑡

Where 𝜌 is the density, 𝛼 is the in-situ phase volume fraction, 𝑥𝑐 is the molar fraction of

a hydrocarbon component in a phase and 𝑜, 𝑤, and 𝑔 represents the oil, water, and gas phases,

respectively.

From the mass conversation law:

mass inflow – mass outflow = mass accumulation +sink/source

We can obtain the following equation:

28
𝑚|𝑧 𝐴∆𝑡 − 𝑚|𝑧+∆𝑧 𝐴∆𝑡 + 𝑚𝑐_𝑡 = (𝜌𝑔 𝛼𝑔 𝑥𝑐𝑔 + 𝜌𝑜 𝛼𝑜 𝑥𝑐𝑜 + 𝜌𝑤 𝛼𝑤 𝑥𝑐𝑤 )| 𝐴∆𝑧 −
𝑡+∆𝑡

(𝜌𝑔 𝛼𝑔 𝑥𝑐𝑔 + 𝜌𝑜 𝛼𝑜 𝑥𝑐𝑜 + 𝜌𝑤 𝛼𝑤 𝑥𝑐𝑤 )| 𝐴∆𝑧 (2-43)


𝑡+∆𝑡

Where 𝑚 is mass flow rate of one component, 𝐴 is the wellbore cross-sectional area at

depth z, 𝑚𝑐_𝑡 is the phase sink/source term for oil, gas and water. The mass flow rate 𝑚 can be

written as:

𝑚 = 𝜌𝑔 𝑉𝑠𝑔 𝑥𝑐𝑔 + 𝜌𝑜 𝑉𝑠𝑜 𝑥𝑐𝑜 + 𝜌𝑤 𝑉𝑠𝑤 𝑥𝑐𝑤

Where 𝑉𝑠 is the phase superficial velocity in the tubing or annulus. By dividing 𝐴∆𝑧∆𝑡

and taking ∆𝑧 → 0 and ∆𝑡 → 0 in equation (2-43), we obtain:

𝜕𝑚 𝜕(𝜌𝑔 𝛼𝑔 𝑥𝑐𝑔 +𝜌𝑜 𝛼𝑜 𝑥𝑐𝑜 +𝜌𝑤 𝛼𝑤 𝑥𝑐𝑤 )


− + 𝑚𝑐 = (2-44)
𝜕𝑧 𝜕𝑡

Where 𝑚𝑐 is the sink/source term in unit volume and unit time and it can be expressed as

𝑚𝑐 = 𝑚𝑐𝑔 + 𝑚𝑐𝑜 + 𝑚𝑐𝑤 . Finally we can obtain the mass continuity equation for a hydrocarbon

component (Livescu et al., 2008):

𝜕 𝜕
(𝜌𝑔 𝛼𝑔 𝑥𝑐𝑔 + 𝜌𝑜 𝛼𝑜 𝑥𝑐𝑜 + 𝜌𝑤 𝛼𝑤 𝑥𝑐𝑤 ) + 𝜕𝑧 (𝜌𝑔 𝑉𝑠𝑔 𝑥𝑐𝑔 + 𝜌𝑜 𝑉𝑠𝑜 𝑥𝑐𝑜 + 𝜌𝑤 𝑉𝑠𝑤 𝑥𝑐𝑤 ) = 𝑚𝑐𝑔 +
𝜕𝑡

𝑚𝑐𝑜 + 𝑚𝑐𝑤 ( 𝑓𝑜𝑟 ℎ𝑦𝑑𝑟𝑜𝑐𝑎𝑟𝑏𝑜𝑛 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡 𝑐 = 1,2, … , 𝑁𝑐 ) (2-45)

Similarly, the mass continuity equation for the water component (Livescu et al., 2008) is:

𝜕 𝜕
(𝜌𝑔 𝛼𝑔 𝑥𝑤𝑔 + 𝜌𝑜 𝛼𝑜 𝑥𝑤𝑜 + 𝜌𝑤 𝛼𝑤 𝑥𝑤𝑤 ) + 𝜕𝑧 (𝜌𝑔 𝑉𝑠𝑔 𝑥𝑤𝑔 + 𝜌𝑜 𝑉𝑠𝑜 𝑥𝑤𝑜 + 𝜌𝑤 𝑉𝑠𝑤 𝑥𝑤𝑤 ) =
𝜕𝑡

𝑚𝑤𝑤 + 𝑚𝑤𝑜 + 𝑚𝑤𝑜 ( 𝑓𝑜𝑟 𝑤𝑎𝑡𝑒𝑟 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡) (2-46)

2.2.3 Momentum Balance Equation

The momentum balance equation mainly describes the pressure loss of fluid flow inside

tubing or other type of pipe caused by friction, gravity, and kinetic energy change etc. As

presented by Hasan and Kabir (2002), considering forces pressure (p), friction (F), and gravity,

29
the momentum changes of the fluid in the control volume (as shown in Fig. 2-7) equals to the

total momentum change due to forces imposed on it.

Fig. 2-7: Schematic representation of momentum balance in a fluid segment


Thus, we obtain:

𝑝𝐴 − (𝑝 + 𝑑𝑝)𝐴 ± 𝑑𝐹 + 𝐴(𝑑𝑧)𝜌𝑔 sin 𝜃 = ±[𝑤𝑣 − (𝑤 + 𝑑𝑤)(𝑣 + 𝑑𝑣)] (2-47)

where w is the fluid mass flow rate, v is fluid velocity, A is the cross-sectional area for

fluid flow, dp is pressure change, dv is velocity change and dw is mass change respectively. The

positive symbol stands for a producer and negative symbol is for an injector. 𝑤𝑣 − (𝑤 +

𝑑𝑤)(𝑣 + 𝑑𝑣) is fluid momentum change along the z direction and 𝑝𝐴 − (𝑝 + 𝑑𝑝)𝐴 + 𝑑𝐹 +

𝐴(𝑑𝑧)𝜌𝑔 sin 𝜃 is the sum of momentum change due to forces.

By dividing both sides of equation (2-47) with Adz and omitting dw*dv (the infinitesimal

of higher order against dz), we obtain the momentum balance equation as presented by several

researchers (Ali, 1981; Stone et al., 1989; Hasan & kabir, 2002; Livescu et al., 2008; Bahonar et

al., 2009).

𝜕P 2
𝑓𝑚 𝜌𝑚 𝑉𝑚 𝜕 𝜕
= 𝜌𝑚 𝑔𝑐𝑜𝑠𝜃 ± ± [𝜕𝑡 (𝜌𝑚 𝑉𝑚 ) + 𝜕𝑧 (𝜌𝑚 𝑉𝑚2 )] (2-48)
𝜕𝑧 2𝑑𝑖𝑛

The pressure change over a wellbore length can be written as:

∆P = ∆Pℎ ± ∆P𝑓 ± ∆P𝑎 (2-49)

30
∆Pℎ = 𝜌𝑚 𝑔𝑐𝑜𝑠𝜃
2
𝑓𝑚 𝜌𝑚 𝑉𝑚
∆P𝑓 = 2𝑑𝑖𝑛

𝜕 𝜕
∆P𝑎 = 𝜕𝑡 (𝜌𝑚 𝑉𝑚 ) + 𝜕𝑧 (𝜌𝑚 𝑉𝑚2 )

where 𝑃 is the fluid pressure in tubing or a pipe, 𝜌𝑚 is the fluid mixture density defined as

𝜌𝑚 = 𝜌𝑔 𝛼𝑔 + 𝜌𝑜 𝛼𝑜 + 𝜌𝑤 𝛼𝑤 , 𝑉𝑚 is the fluid mixture velocity which can be computed from the

drift-flux model described later, 𝑓𝑚 is the Moody friction factor which can be calculated by

empirical correlations such as Colebrook (1939) equation considering Reynolds number, pipe

roughness and pipe diameter. Equation (2-48) indicates that the pressure change along the

wellbore consists of three parts: hydrostatic pressure changes due to gravity (∆Pℎ ), the frictional

pressure loss (∆P𝑓 ) and pressure change caused by kinetic energy change (∆P𝑎 ). In equation (2-

49), ∆P𝑓 and ∆P𝑎 are positive for production wells and negative for injection wells.

2.2.4 Auxiliary Equations

In order to solve the abovementioned three governing equations, a series of auxiliary

equations are needed. Because there is no pore space inside a wellbore, capillary pressure is not

considered. Therefore the equation equivalent to saturation equation in reservoir is the sum of in-

situ phase volume fractions in a wellbore segment:

𝛼𝑔 + 𝛼𝑤 + 𝛼𝑜 = 1 (2-50)

Equations for composition variables are:

∑𝑁𝑐
𝑖=1 𝑥𝑐𝑔 + 𝑥𝑤𝑔 = 1 (2-51)

∑𝑁𝑐
𝑖=1 𝑥𝑐𝑤 + 𝑥𝑤𝑤 = 1 (2-52)

∑𝑁𝑐
𝑖=1 𝑥𝑐𝑜 + 𝑥𝑤𝑜 = 1 (2-53)

Equations for phase equilibria are:

31
𝑥𝑐𝑔𝑖
= 𝐾𝑔𝑜𝑖 (i=1, …, Nc) (2-54)
𝑥𝑐𝑜𝑖

𝑥𝑐𝑜𝑖
= 𝐾𝑜𝑤𝑖 (i=1, …, Nc) (2-55)
𝑥𝑐𝑤𝑖

where K is called equilibrium constant which is a function of phase compositions and

pressure.

2.3 Computation of Wellbore Heat Transfer

For thermal wellbore modeling, it is important to accurately compute heat transfer

between the fluid inside a wellbore and the surrounding formation. A typical wellbore (as shown

in Fig. 2-5) consists of tubing (more than one tubing in complex wellbore), annulus between the

tubing and casing, casing and cement. When fluid flows in the wellbore (mainly through the

tubing), it has heat exchange continuously with surrounding formation. Typically for a steam

injection, the steam in wellbore loses part of its heat into surrounding formation through different

wellbore parts before it reaches the well-bottom. This heat loss process involves different heat

transfer mechanisms. In the steel tubing & casing wall and cement layer, heat conduction is the

main transmission mechanism. In annulus filled with air or steam, natural convection and

radiation are principle heat transmission mechanisms. Other heat transmission mechanism like

the convective heat transfer between fluid film and the inside tubing wall can be ignored due to

its high value. Therefore, the temperature profile from the wellbore center to the formation

resembles the red curve shown in Fig. 2-8.

32
Fig. 2-8: Temperature gradient in a typical wellbore
The main method for computing wellbore heat loss is through empirical correlations. It

can also be obtained by numerical simulation as discussed below. The correlation-based heat loss

calculation method does not consider transient phenomenon in different wellbore parts and it

assume the whole heat transfer process is in a quasi-steady state. However the heat loss process

is transient especially for convective heat transfer in the annulus. When the heat goes through

annulus part from tubing to the formation, it involves convective heat transfer and radiation heat

transfer in the annuli space. Obviously the convection in the annuli space is a transient process

and it can change with time significantly as the properties of medium (usually air or steam) in the

annulus change with time and there is a convection flow too. In the equation (2-30) for

calculating Uto, convection is represented by the convective heat transfer coefficient hc. The

equation (2-38) for calculating hc is based on data observed by Dropkin and Sommerscales

(1956) from their experiment for testing convection heat transfer between two enclosed vertical

33
plates. But the space between two enclosed vertical plates is different from the annuli space.

Thus using this old correlation may not acquire the best accuracy of heat loss calculation.

Since Willhite (1967) proposed this method, a lot of researches have been conducted on

heat transfer in vertical, inclined and horizontal annuli space. Some convection heat transfer

correlations for annuli space like Raithby and Hollands (1974) and Churchill (1983) are widely

used. The Raithby and Hollands (1974) was given as following:

𝑃𝑟 1⁄4

1 4
𝑘ℎ𝑐 ⁄𝑘ℎ𝑎 = 0.386 ( ) 𝑅𝑎𝑙 (2-56)
0.861+𝑃𝑟

𝑔𝛽(𝑇𝑡𝑜 −𝑇𝑐𝑖 )𝐿3𝑐


𝑅𝑎𝑙 = 𝜗𝛼

2[ln(𝑟𝑐𝑖 ⁄𝑟𝑡𝑜 )]4⁄3


𝐿𝑐 =
−3⁄5 −3⁄5 5⁄3
(𝑟𝑡𝑜 +𝑟𝑐𝑖 )

where 𝛼 is the formation thermal diffusivity, 𝜗 is the kinematic viscosity, and 𝑅𝑎𝑙 is the Rayleigh

number.

The correlation proposed by Churchill (1983) is written as:


𝑁𝑢 𝑘ℎ𝑎
ℎ𝑐 = (2-57)
𝐷𝑜

𝑟 1⁄2
𝑁𝑢 = 0.364[𝑅𝑎𝑙 𝑓(𝑃𝑟 )]1⁄4 (𝑟𝑐𝑖 )
𝑡𝑜

−16⁄9
0.5 9⁄16
𝑓(𝑃𝑟 ) = [1 + ( 𝑃 ) ]
𝑟

where 𝐷𝑜 is the outside diameter of the annulus and 𝑁𝑢 is the dimensionless Nusselt number.

Although these new correlations may be more accurate than Dropkin and Sommerscales

equation for estimating convection in annuli space, they have yet to be applied in petroleum

industry.

34
Fig. 2-9: Axis system for annulus heat transfer
The heat loss computation can be obtained by a numerical simulation which can provide

higher accuracy. Some commercial tools like CFD module FLUENT can perform numerical

simulation for heat transfer in annuli space. A lot of research works on heat transfer in annuli

space were conducted by numerical simulation. Weng et al. (1996) proposed a set of

mathematical equations for describing heat transfer in an enclosed vertical space similar with an

annuli space. This set of equations include both convective and radial heat transfer mechanisms

in a coordinate system as shown in Fig. 2-9 and it consists of five major equations:

Mass Continuity:

𝜕 𝜕
(𝑟𝐷 𝑢𝐷 ) + (𝑟𝐷 𝑣𝐷 ) = 0 (2-58)
𝜕𝑧𝐷 𝜕𝑟𝐷

Axial Momentum:

1 𝜕 𝜕 𝜕𝑝𝐷 𝑃𝑟 𝜕 𝜕𝑢 𝜕 𝜕𝑢
[ (𝑟𝐷 𝑢𝐷2 ) + (𝑟𝐷 𝑢𝐷 𝑣𝐷 )] = − + 𝑟 [𝜕𝑧 (𝑟𝐷 𝜕𝑧 𝐷) + 𝜕𝑟 (𝑟𝐷 𝜕𝑟 𝐷)] + 𝑅𝑎𝑃𝑟𝑇𝐷
𝑟𝐷 𝜕𝑧𝐷 𝜕𝑟𝐷 𝜕𝑧𝐷 𝐷 𝐷 𝐷 𝐷 𝐷

(2-59)

Radial Momentum:

1 𝜕 𝜕 𝜕𝑝 𝑃𝑟 𝜕 𝜕𝑣 𝜕 𝜕𝑣 𝑣2
[𝜕𝑧 (𝑟𝐷 𝑢𝐷 𝑣𝐷 ) + 𝜕𝑟 (𝑟𝐷 𝑣𝐷2 )] = − 𝜕𝑟 𝐷 + 𝑟 [𝜕𝑧 (𝑟𝐷 𝜕𝑧𝐷) + 𝜕𝑟 (𝑟𝐷 𝜕𝑟𝐷)] − 𝑃𝑟 𝑟𝐷2
𝑟𝐷 𝐷 𝐷 𝐷 𝐷 𝐷 𝐷 𝐷 𝐷 𝑑

(2-60)

35
Energy Conservation:

1 𝜕 𝜕 1 𝜕 𝜕𝑇 𝜕 𝜕𝑇 𝑇𝑓 𝜏02 𝑇
[𝜕𝑧 (𝑟𝐷 𝑢𝐷 𝑇𝐷 ) + 𝜕𝑟 (𝑟𝐷 𝑣𝐷 𝑇𝐷 )] = 𝑟 [𝜕𝑧 (𝑟𝐷 𝜕𝑧 𝐷) + 𝜕𝑟 (𝑟𝐷 𝜕𝑟 𝐷)] + [( 𝑇𝐷 +
𝑟𝐷 𝐷 𝐷 𝐷 𝐷 𝐷 𝐷 𝐷 𝑁 𝑓

4
1) − 𝐼0 ] (2-61)

Radiative Transfer:

4
1 𝜕 𝜕𝐼 𝜕 𝜕𝐼 𝑇
[𝜕𝑧 (𝑟𝐷 𝜕𝑧0 ) + 𝜕𝑟 (𝑟𝐷 𝜕𝑟0 )] = 3𝜏02 [𝐼0 − ( 𝑇𝐷 + 1) ] (2-62)
𝑟𝐷 𝐷 𝐷 𝐷 𝐷 𝑓

The dimensionless parameters in these five equations are defined as:


𝑧 𝑟 𝑢 𝑣 𝑝−𝑝 𝑇−𝑇𝐶
𝑧𝐷 = 𝐺, 𝑟𝐷 = 𝐺, 𝑢𝐷 = 𝛼⁄𝐺 , 𝑣𝐷 = 𝛼⁄𝐺 , 𝑝𝐷 = 𝜌(𝛼⁄𝐺∞)2 , 𝑇𝐷 = 𝑇
ℎ −𝑇𝐶

𝑇𝐶 𝑘𝜎 𝑖 𝐻𝑎 𝑟
𝑇𝑓 = 𝑇 , 𝑁 = 4𝜎𝑇𝑎3 , 𝐼0 = 4𝜎𝑇
0
4 , 𝜏0 = 𝜎𝑎 𝐺, 𝑍0 = , 𝜂 = 𝑟𝑖
ℎ −𝑇𝐶 𝑐 𝑐 𝐺 𝑜

𝜗 𝑔𝛽(𝑇ℎ −𝑇𝐶 )𝐺 3
𝑃𝑟 = 𝛼, 𝑅𝑎 = 𝜗𝛼

where 𝑟 is the annulus radius, 𝑟𝑜 is the radius of the outside wall, 𝑟𝑖 is the radius of the inner

wall, 𝐺 is the annulus gap width (𝐺 = 𝑟𝑜 − 𝑟𝑖 ), 𝑧 is the annulus height, 𝑝 is the pressure in the

annulus, 𝑣 is the radial velocity along the 𝑟 direction, 𝑢 is the axial velocity along the z direction,

𝑁 is the conduction-to-radiation ratio, 𝑝∞ is the pressure at 𝑁 = ∞, 𝑇 is the fluid temperature, 𝜌

is the fluid density, 𝑇ℎ is the inner wall temperature, 𝐻𝑎 is the total annulus height, 𝑇𝐶 is outsider

wall temperature, 𝐼0 is the dimensionless zero moment of intensity, 𝜎𝑎 is the absorption

coefficient, and 𝑖0 is the zero moment of intensity.

The boundary conditions for these equations are:


𝑟𝑖
at the inner wall where 𝑟𝐷 = :
𝐺

2 𝜕
𝑢𝐷 = 𝑣𝐷 = 0, 𝑇𝐷 = 0, (1 + 3𝜏 ) 𝐼0 = 1
0 𝜕𝑅

𝑟𝑜
at the outside wall where 𝑟𝐷 = :
𝐺

36
4
2 𝜕 1
𝑢𝐷 = 𝑣𝐷 = 0, 𝑇𝐷 = 1, (1 − 3𝜏 ) 𝐼 = (1 + 𝑇 )
0 𝜕𝑅 0 𝑓

at the top of the annulus where 𝑧𝐷 = 0 :


4
𝜕𝑇𝐷 1 𝜕𝐼 2 𝜕 𝑇
𝑢𝐷 = 𝑣𝐷 = 0, + 3𝑁 𝜕𝑧0 = 0, (1 − 3𝜏 ) 𝐼 = (1 + 𝑇𝐷)
𝜕𝑧𝐷 𝐷 0 𝜕𝑅 0 𝑓

at the bottom of the annulus where 𝑧𝐷 = 𝑍0 :


4
𝜕𝑇𝐷 1 𝜕𝐼 2 𝜕 𝑇
𝑢𝐷 = 𝑣𝐷 = 0, + 3𝑁 𝜕𝑧0 = 0, (1 + 3𝜏 ) 𝐼 = (1 + 𝑇𝐷)
𝜕𝑧𝐷 𝐷 0 𝜕𝑅 0 𝑓

The equations (2-58) to (2-62) can be solved by the finite difference method and thus the

heat loss through an annuli space can be achieved by numerical simulation.

The heat transfer in a wellbore’s surrounding formation seems not to have much effect on

flow fluid in wellbore. But from equation (2-29), we can see that heat loss calculation depends

on an important parameter: the temperature at the cement/formation interface 𝑇𝑐𝑓 . For

correlation-based heat loss calculation method, this parameter is obtained through a function f(t)

proposed by Ramey (1962). However a more accurate solution is through a numerical heat

transfer simulation in the surround formation. The main heat transfer mechanism in formation is

heat conduction. A typical 2D radial model presented by Ali (1981) and Bahonar et al. (2009)

for heat conduction in formation are described as follows.

Fig. 2-10: 2D grid system for heat flow in the formation

37
The surrounding formation around a wellbore can be coordinated as a 2D radial system as

shown in Fig. 2-10. The heat transfer PDE equation is given as:

1 ∂ ∂Te ∂ ∂Te ∂Te


(k r r ) + ∂z (k z ) = ρe Cpe (2-63)
r ∂r ∂r ∂z ∂t

where 𝑇𝑒 is the formation temperature, 𝑧 is the vertical depth, 𝑟 is the formation radius

relative to the wellbore axial direction, 𝑘𝑧 is the thermal conductivity of formation rock in the z

direction, 𝑘𝑟 is the thermal conductivity of formation rock along the radial direction, 𝐶𝑝𝑒 is the

formation rock heat capacity and 𝜌𝑒 is the formation rock density. The equation (2-63) can be

further simplified if variation of the formation thermal conductivities 𝑘𝑟 and 𝑘𝑧 with temperature

is neglected.

There are four boundary conditions for solving equations (2-63):

at well head 𝑧 = 0, 𝑟 ≥ 𝑟𝑐𝑓 : 𝑇𝑒 = 𝑇𝑠𝑢𝑟𝑓

at well bottom 𝑧 = 𝑍𝑟𝑒𝑠 , 𝑟 ≥ 𝑟𝑐𝑓 : 𝑇𝑒 = 𝑇𝑟𝑒𝑠

𝜕𝑇𝑒
at outer edge of formation 0 ≤ 𝑧 ≤ 𝑍𝑟𝑒𝑠 , 𝑟 = ∞ : =0
𝜕𝑟

at the inner boundary contacting with the wellbore

𝜕𝑇𝑒
0 ≤ 𝑧 ≤ 𝑍𝑟𝑒𝑠 , 𝑟 = 𝑟𝑐𝑓 : 𝑄𝑙𝑜𝑠𝑠 = −2𝜋𝑟k r 𝜕𝑟

where 𝑍𝑟𝑒𝑠 is the vertical depth of the wellbore bottom, 𝑟𝑐𝑓 is the wellbore radius at the contact

interface between wellbore and formation (typically at the cement/formation interface), 𝑇𝑠𝑢𝑟𝑓 is

the ground surface temperature at the wellhead, 𝑇𝑟𝑒𝑠 is the formation temperature at reservoir

depth and 𝑄𝑙𝑜𝑠𝑠 is the instant wellbore heat loss rate.

Equation (2-63) can be solved by finite differences and thus a more accurate

cement/formation interface 𝑇𝑐𝑓 can be obtained. The initial formation temperature 𝑇𝑒𝑖 can be

initialized by:

38
𝑇𝑒𝑖 = 𝑇𝑠𝑢𝑟𝑓 + 𝑔𝑇 𝑧 (2-64)

where 𝑔𝑇 is the geothermal gradient.

2.4 Modeling for Phase Velocities

When a fluid mixture of gas and liquid flows in a vertical pipe, the real velocities of gas

and liquid are not the same. The gas velocity tends to be faster than the liquid velocity. This is

the so-called gas slip phenomenon. Two mechanisms are involved in this phenomenon: gas has

higher concentration in the center of the pipe because of its smaller surface tension with pipe

wall compared with liquid and gas rises vertically because of its buoyancy.

Fig. 2-11: Slip between Gas and Liquid in Drift-Flux Model


Zuber and Findlay (1965) introduced a gas velocity expression as:

𝑉𝑔 = 𝐶0 𝑉𝑚 + 𝑉𝑑 (2-65)

where 𝑉𝑔 is the real gas velocity in the pipe, 𝑉𝑚 is the fluid mixture velocity, 𝐶0 is the

profile parameter (or distribution coefficient) which represents the first mechanism

abovementioned and 𝑉𝑑 is the gas drift velocity which accounts for the gas buoyancy. Equation

(2-65) is the basic formulation of so-called drift-flux model.

39
From the definitions of superficial velocity and real velocity, 𝑉𝑠𝑔 = 𝑓𝑔 𝑉𝑔 and 𝑉𝑠𝐿 =

(1 − 𝑓𝑔 )𝑉𝐿 .

With 𝑉𝑠𝑔 and 𝑉𝑠𝐿 known, the in-situ gas volume fraction can be obtained from the

equation:
𝑉𝑠𝑔
𝑓𝑔 = 𝐶 (2-66)
0 𝑉𝑚 +𝑉𝑑

Thus the density of fluid mixture fluid 𝜌𝑚 can be calculated by equation (2-8). Because

superficial velocities 𝑉𝑠𝑔 and 𝑉𝑠𝐿 are known parameters, the key part in drift-flux model is how to

obtain the profile parameter 𝐶0 and the gas drift velocity 𝑉𝑑 . Once 𝐶0 and 𝑉𝑑 are determined,

phase velocities and the density of fluid mixture fluid 𝜌𝑚 can be easily computed. The procedure

for applying a drift-flux model is shown as:

Fig. 2-12: Procedure for Drift-Flux model application

Shi et al. (2005) published a robust model to compute the profile parameter 𝐶0 and the

gas drift velocity 𝑉𝑑 . In this model, the profile parameter is calculated by:

𝐴
𝐶𝑜 = 1+(𝐴−1)𝛾2 (2-67)

40
where A is a parameter which represents profile in slug or bubble flow regime, 𝛾 is a

control parameter to adjust 𝐶𝑜 . In ECLIPSE Multi-Segment Well (2016), the default value for A

is 1.2. When the in-situ gas volume fraction 𝑓𝑔 or mixture velocity 𝑉𝑚 is high, 𝛾 is used to adjust

𝐶𝑜 approaching to 1.0. Actually it is determined by fluid mixture velocity 𝑉𝑚 and the in-situ gas

volume fraction 𝑓𝑔 .

The gas drift velocity is given as:

(1−𝑓𝑔 𝐶0 )𝐶0 𝐾(𝑓𝑔 )𝑉𝑐


𝑉𝑑 = 𝜌𝑔
(2-68)
𝑓𝑔 𝐶0 √ +1−𝑓𝑔 𝐶0
𝜌𝑙

where 𝑉𝑐 is called characteristic velocity and 𝐾(𝑓𝑔 ) is a function of in-situ gas volume

fraction 𝑓𝑔 . 𝑉𝑐 can be computed by:

1⁄4
𝜎𝑔𝑙 𝑔(𝜌𝑙 −𝜌𝑔 )
𝑉𝑐 = ( ) (2-69)
𝜌𝑙2

where 𝜎𝑔𝑙 is the gas/liquid interfacial tension. 𝐾(𝑓𝑔 ) is calculated by:

𝐾(𝑓𝑔 ) = 1.53⁄𝐶0 , when 𝑓𝑔 ≤ 𝑎1

Linear interpolation, when 𝑎1 ≤ 𝑓𝑔 ≤ 𝑎2 .

𝐾(𝑓𝑔 ) = 𝐾𝑢 , when 𝑓𝑔 ≥ 𝑎2

The drift-flux model by Shi et al. (2005) consists of simple mathematical equations and

can be easily applied in the wellbore simulation to determine phase velocities. In addition, these

equations are continuous and differentiable. Thus it can improve the numerical stability in the

wellbore simulation.

Hasan and Kabir (2007) also introduced a model to calculate the profile parameter 𝐶0 and

the drift velocity 𝑉𝑑 . They divided the flow regime in a pipe into four types: Bubbly flow, Slug

flow, Churn flow and Annular flow. For each flow regime, a fixed 𝐶0 value is given for three

41
different flows (upward cocurrent, countercurrent and downward). There are different equations

for calculating the drift velocity 𝑉𝑑 in different flow regimes. For Annular flow, the drift velocity

𝑉𝑑 is set to zero thus no gas drift in annular flow. The gas slip phenomenon disappears in an

annular flow.

Table 2-2 𝑪𝟎 and 𝑽𝒅 Values for Flow Regimes (Hasan and Kabir, 2007)
Profile Parameter 𝐶0
Drift Velocity
Flow Regime Upward
Downward Countercurrent 𝑉𝑑
Cocurrent

Annular 1.0 1.0 1.0 0

Churn 1.12 1.15 1.15 𝑉𝑑

Slug 1.12 1.2 1.2 𝑉𝑑

Bubbly 1.2 1.2 2.0 𝑉𝑑𝑏

For churn flow or slug flow, the drift velocity is given by:

𝑉𝑑 = 𝑉𝑑𝑏 (1 − 𝑒 −0.1𝑉𝑔𝑏⁄(𝑉𝑠𝑔−𝑉𝑔𝑏 ) ) + 𝑉𝑑𝑇 𝑒 −0.1𝑉𝑔𝑏 ⁄(𝑉𝑠𝑔−𝑉𝑔𝑏) (2-70)

where 𝑉𝑑𝑏 is the drift velocity in bubbly flow, 𝑉𝑑𝑇 is called Taylor bubble-rising velocity

and 𝑉𝑔𝑏 is the critical gas velocity at which the flow regime transits from bubbly flow to slug

flow.

For the bubbly flow, the drift velocity is obtained through:


0.25
𝑉𝑑𝑏 = 1.53[𝑔(𝜌𝐿 − 𝜌𝑔 )𝜎𝑔𝐿 ⁄𝜌𝐿2 ] (2-71)

The Taylor bubble-rising velocity is computed through equation:

𝑉𝑑𝑇 = 0.35√𝑔𝑑(𝜌𝐿 − 𝜌𝑔 )⁄𝜌𝐿 (2-72)

The gas velocity 𝑉𝑔𝑏 is given as:

42
𝐶0 𝑉𝑠𝐿 ±𝑉𝑑
𝑉𝑔𝑏 = cos 𝜃 (2-73)
4−𝐶0

where 𝜃 is the well path inclination angle from the horizontal.

For Hasan and Kabir (2007) model, the first step is to determine the flow regime based

on superficial velocities and fluid densities. An orderly sequence of annular, churn, slug, and

bubbly from well head to well bottom should be considered. Then the profile parameter 𝐶0 and

the gas drift velocity 𝑉𝑑 are obtained based on the flow regime as shown in Table 2-2.

2.5 Computation of Thermal Fluid Properties

The major fluid properties that need to consider in a wellbore simulation include phase

density, phase viscosity and phase enthalpy. The gas phase density can be calculated by (Ahmed

, 2006):
𝑃𝑀𝑎
𝜌𝑔 = (2-74)
𝑍𝑅𝑇

where Z is the gas deviation factor which can be calculated from correlations like the

Hall-Yarborough method or through EOS equations, 𝑀𝑎 is gas apparent molecular weight, R is

universal gas constant, T is gas temperature and P is fluid pressure.

The oil density can be computed through EOS equations or by a correlation. A useful

equation for calculating oil phase density is given by (CMG STARS manual, 2017) :
1
)−𝑏(𝑇−𝑇0 )− 𝑐(𝑇 2 −𝑇02 )]
𝜌 = 𝜌0 𝑒 [𝑎(𝑃−𝑃0 2 (2-75)

where ρ0 is oil phase density at the reference conditions ( pressure P0 and temperature

T0 ), P0 is reference pressure, T0 is the reference temperature, 𝑎 is the oil compressibility, 𝑏 + 𝑐𝑇

is thermal expansion coefficient of the oil phase, T is oil temperature and P is oil phase pressure.

As water density varies little with pressure changes, water density calculation can only

take account of temperature. The correlation proposed by Ali (2010) can be used to estimate

water density:

43
𝜌𝑤 = 3786.31 − 37.2487𝑇 + 0.196246𝑇 2 − 5.04708 × 10−4 𝑇 3 + 6.29368 × 10−7 𝑇 4 − 3.08480 ×

10−10 𝑇 5 (2-76)

where T is the water temperature and its allowed range is 273.15 𝐾 ≤ 𝑇 ≤ 640 𝐾.

With phase densities known, the fluid mixture density in a wellbore is computed by drift-

flux model.

Enthalpy represents the total heat content in the fluid. It includes internal energy and

product of pressure and volume in the fluid system. The enthalpy is defined as (Guggenheim,

1959):

ℎ = 𝑢 + 𝑃𝑉 (2-77)

where u is the fluid internal energy, P is fluid pressure and V fluid volume.

For oil or water phase, a correlation by Ali (2010) can be used to calculate the enthalpy:
𝑇
ℎ = ∫𝑇 𝐶𝑝 (𝑇)𝑑𝑇 (2-78)
𝑟𝑒𝑓

For water, 𝐶𝑝 (𝑇) = 4.3245 − 3.696 × 103 𝑇 + 2.482 × 10−5 𝑇 2

For oil, 𝐶𝑝 (𝑇) = 4.3245 − 3.696 × 103 𝑇 + 2.482 × 10−5 𝑇 2

where 𝐶𝑝 (𝑇) is specific heat capacity, T is fluid temperature and Tref is reference

temperature for the enthalpy.

For the gas phase enthalpy, first component enthalpies are computed and then they are

summarized based on component fractions in the gas phase. The gas component enthalpy is

calculated from (CMG STARS manual 2017):

𝐶𝑝 (𝑇) = 𝑐1 + 𝑐2 ∙ 𝑇 + 𝑐3 ∙ 𝑇 2 + 𝑐4 ∙ 𝑇 3 + 𝑐5 ∙ 𝑇 4

where c1, c2, c3, c4 and c5 are fixed coefficients for each component and can be looked

up from a table.

44
Viscosity is an important parameter for thermal modeling. It is usually calculated by

empirical correlations. Also it can be looked up from a table based on temperature. The viscosity

of gas is calculated by the Lee-Gonzalez-Eakin method (Ahmed, 2006):

𝜌𝑔 𝑌
𝜇𝑔 = 10−4 𝐾𝑒𝑥𝑝 [𝑋 (62.4) ] (2-79)

(9.4+0.02𝑀𝑎 )𝑇 1.5
𝐾= 209+19𝑀𝑎 +𝑇

986
𝑋 = 3.5 + + 0.01𝑀𝑎
𝑇

𝑌 = 2.4 − 0.2𝑋

where 𝜌𝑔 is gas density and 𝑇 is gas temperature.

The water viscosity can be computed by the equation given by (Ahmed , 2006) :
1776−𝑇
𝜇𝑤 = 25.6𝑇−89 (2-80)

While the oil viscosity can be calculated by the Standing (1981) equation:

1.8×107 360 𝑎
𝜇𝑜 = (0.32 + ) (𝑇−260) (2-81)
𝐴𝑃𝐼 4.53

8.33
𝑎 = 10(0.43+𝐴𝑃𝐼 )

The fluid mixture viscosity is estimated by the linear mixture rule based on the gas, water

and oil viscosities.

For thermal wellbore modeling, it is crucial to accurately estimate steam properties. One

important concept among steam properties is steam quality which is defined as the mass

proportion of vapor in saturated water condense/vapor mixture. The steam quality can be

computed from enthalpy:


ℎ−ℎ𝑤
𝑓𝑠𝑡 = (2-82)
𝐿𝑣

45
where ℎ is the specific enthalpy of dry steam, ℎ𝑤 is enthalpy of condense water and 𝐿𝑣 is

enthalpy of vaporization. The density of dry steam is only function of temperature and a

correlation by Ali (2010) is given by:

𝑙𝑛𝜌𝑠 = −93.7072 + 0.833941𝑇 − 0.00320809𝑇 2 + 6.57652 × 10−6 𝑇 3 − 6.93747 × 10−9 𝑇 4 + 2.97203 ×

10−12 𝑇 5 (2-83)

For saturated steam, its density calculation can be derived from steam quality definition:
1
𝜌 = 𝑓𝑠𝑡 1−𝑓𝑠𝑡 (2-84)
+
𝜌𝑠 𝜌𝑤

where 𝜌𝑠 is dry steam density, 𝜌𝑤 is water condensate density and 𝑓𝑠𝑡 is steam quality.

A correlation by Ali (2010) can be used to calculate the saturated steam enthalpy:

ℎ = ℎ𝑤 + 𝑓𝑠𝑡 𝐿𝑣 (2-85)

ℎ𝑤 = 23665.2 − 366.232𝑇 + 2.26952𝑇 2 − 0.00730365𝑇 3 + 1.30241 × 10−5 𝑇 4 − 1.22103 ×

10−8 𝑇 5 + 4.70878 × 10−12 𝑇 6

1
𝐿𝑣 = (7184500 + 11048.6𝑇 − 88.405𝑇 2 + 0.162561𝑇 3 − 1.21377 × 10−4 𝑇 4 )2

The temperature range for above equation is 273.15 K ≤ T ≤ 640 K.

The dry steam viscosity is approximately estimated by (Ali, 2010):

𝜇𝑠 = 1.0 × 10−4 (0.2𝑇 + 81.97) (2-86)

where T is steam temperature in unit °F.

Thus the saturated steam mixture viscosity is computed by the linear mixture rule:

𝜇 = (1 − 𝑓𝑠𝑡 )𝜇𝑤 + 𝑓𝑠𝑡 𝜇𝑠 (2-87)

For saturated steam, its saturation temperature can be computed from the pressure and a

correlation provided by IAPWS Industrial Formulation (1997) will give an accurate result:
0.5
𝑇𝑠 𝑛10 +𝐷−[(𝑛10 +𝐷)2 −4(𝑛9 +𝑛10 𝐷)]
= (2-88)
𝑇∗ 2

46
2𝐺
where 𝐷 = −𝐹−(𝐹2 −4𝐸𝐺)0.5

with 𝐸 = 𝛽 2 + 𝑛3 𝛽 + 𝑛6

𝐹 = 𝑛1 𝛽 2 + 𝑛4 𝛽 + 𝑛7

𝐺 = 𝑛2 𝛽 2 + 𝑛5 𝛽 + 𝑛8

𝛽 = (𝑃𝑠 ⁄𝑃 ∗ )0.25

with 𝑇 ∗ = 1 K and 𝑃 ∗ = 1 MPa. The coefficients 𝑛1 − 𝑛10 of above equation are listed in

Table 2-3:

Table 2-3 Coefficients of equation (2-88) (IAPWS Industrial Formulation, 1997)


i ni i ni

1 0.116 705 214 527 67 × 104 6 0.149 151 086 135 30 × 102

2 − 0.724 213 167 032 06 × 106 7 − 0.482 326 573 615 91 × 104

3 − 0.170 738 469 400 92 × 102 8 0.405 113 405 420 57 × 106

4 0.120 208 247 024 70 × 105 9 − 0.238 555 575 678 49

5 − 0.323 255 503 223 33 × 107 10 0.650 175 348 447 98 × 103

IAPWS Industrial Formulation (1997) also provides a correlation for accurately

computing superheated steam enthalpy:


ℎ𝑠
= 𝜏(𝛾𝜏𝑜 + 𝛾𝜏𝑟 ) (2-89)
𝑅𝑇

47
where ℎ𝑠 is the specific enthalpy of superheated steam, T is the superheated steam temperature,

𝜏 = (540 𝐾)/𝑇 and 𝜋 = 𝑝⁄(1 𝑀𝑃𝑎).

The coefficients for 𝑛𝑖𝑜 and 𝐽𝑖𝑜 are listed in the following table:

Table 2-4 Coefficients and exponents of 𝒏𝒐𝒊 and 𝑱𝒐𝒊 (IAPWS Industrial Formulation, 1997)
𝑖 𝐽𝑖𝑜 𝑛𝑖𝑜 𝑖 𝐽𝑖𝑜 𝑛𝑖𝑜
1 0 −0.96927686500217×101 6 –2 0.14240819171444×101
2 1 0.10086655968018×102 7 –1 −0.43839511319450×101
3 –5 −0.56087911283020×10-2 8 2 −0.28408632460772
4 –4 0.71452738081455×10-1 9 3 0.21268463753307×10-1
5 –3 −0.40710498223928

The coefficients for 𝐼𝑖 , 𝐽𝑖 and 𝑛𝑖 are listed in the following table:

Table 2-5 Coefficients and exponents of 𝑰𝒊 , 𝑱𝒊 and 𝒏𝒊 (IAPWS Industrial Formulation, 1997)
𝑖 𝐼𝑖 𝐽𝑖 𝑛𝑖 𝑖 𝐼𝑖 𝐽𝑖 𝑛𝑖
1 1 0 −0.17731742473213×10- 23 7 0 −0.59059564324270×10-17
2 1 1 −0.17834862292358×10-
2 24 7 11 −0.12621808899101×10-5
3 1 2 −0.45996013696365×10-
1 25 7 25 −0.38946842435739×10-1
4 1 3 −0.57581259083432×10-
1 26 8 8 0.11256211360459×10-10
5 1 6 −0.50325278727930×10-
1 27 8 36 −0.82311340897998×101
6 2 1 −0.33032641670203×10-
1 28 9 13 0.19809712802088×10-7
7 2 2 −0.18948987516315×10-
4 29 10 4 0.10406965210174×10-18
8 2 4 −0.39392777243355×10-
3 30 10 10 −0.10234747095929×10-12
9 2 7 −0.43797295650573×10-
2 31 10 14 −0.10018179379511×10-8
10 2 36 −0.26674547914087×10-
1 32 16 29 −0.80882908646985×10-10
11 3 0 0.20481737692309×10-7
4 33 16 50 0.106930319
12 3 1 0.43870667284435×10-6 34 18 57 −0.33662250574171
13 3 3 −0.32277677238570×10- 35 20 20 0.89185845355421×10-24
14 3 6 −0.15033924542148×10-
4 36 20 35 0.30629316876232×10-12
15 3 35 2
−0.40668253562649×10 - 37 20 48 −0.42002467698208×10-5
16 4 1 −0.78847309559367×10-
1 38 21 21 −0.59056029685639×10-25
17 4 2 0.12790717852285×10-7
9 39 22 53 0.37826947613457×10-5
18 4 3 0.48225372718507×10-6 40 23 39 −0.12768608934681×10-14
19 5 7 0.22922076337661×10-5 41 24 26 0.73087610595061×10-28
20 6 3 −0.16714766451061×10- 42 24 40 0.55414715350778×10-16
21 6 16 −0.21171472321355×10-
10 43 24 58 −0.94369707241210×10-6
22 6 35 −0.23895741934104×102
2

48
2.6 Isenthalpic Flash Calculation

For thermal compositional wellbore simulation problem like ES-SAGD, a three-phase

isenthalpic flash calculation for hydrocarbon-water fluid mixture is required. An isenthalpic flash

calculation is an algorithm that calculates multiphase equilibrium at given enthalpy, pressure and

global molar fractions. Unlike regular isothermal flash calculation, the temperature in isenthalpic

flash calculation is unknown and is a major variable to be solved. Thus the isenthalpic flash

calculation has one more iteration loop to solve temperature than regular isothermal three-phase

flash calculation. Generally, it can decide system temperature, phase molar fractions and phase

compositions based on enthalpy input and global composition in each grid segment along the

wellbore.

Following the method of Agarwal et al. (1991), Heidari, et al. (2014) proposed a new

isenthalpic flash calculation scheme that can be used in thermal wellbore simulation. The energy

equation defined in this scheme is:

𝐸𝑗 = 𝐻𝑠𝑝𝑒𝑐 − 𝐻 = 0 (2-90)

Where 𝐻𝑠𝑝𝑒𝑐 is the enthalpy input for the system and 𝐻 is the enthalpy calculated from a

three-phase flash calculation. The total system energy can be calculated from phase molar

fractions, component fractions in each phase and phase enthalpies:

(2-91)

where np is the total phase number, ni is phase molar fraction, nc is total component

number, xij is the molar fraction of component j in phase i and hij is enthalpy of component j in

phase i.

49
The scheme comprises of two cycles of iteration procedures: the outer loop uses Newton-

Raphson method to solve the system temperature at which the total energy 𝐻 is sufficiently close

to the known enthalpy 𝐻𝑠𝑝𝑒𝑐 (as shown in Fig. 2-13).

Fig. 2-13: Procedure for isenthalpic flash calculation


The steps for the outer loop of isenthalpic flash calculation are:

(1) Input system enthalpy Hspec, pressure P, global component molar fractions zi and

guess an initial temperature T;

(2) Perform isothermal flash calculation to compute phase compositions xi, yi, phase split

gas fraction 𝑛𝑣 , oil fraction 𝑛𝑜 , and water fraction 𝑛𝑤 . This step is also known as the inner-loop;

(3) Compute system enthalpy H1 based on results in step (20) using equation (2-91);

(4) Compare H1 with the specified enthalpy Hspec, if |𝐻𝑠𝑝𝑒𝑐 − 𝐻1 | is great than a

tolerance, then go to step (5), otherwise go to step (6);

50
(5) Set 𝑓(𝑇) = 𝐻𝑠𝑝𝑒𝑐 − 𝐻1 , calculate f(T) derivative f’(T), then get system new

𝑓(𝑇)
temperature 𝑇1 = 𝑇 − 𝑓′(𝑇) and go to step (2);

(6) Accept the current temperature and result in step (2) as the final result.

The inner loop of isenthalpic flash calculation uses Newton-Raphson iteration method to

perform isothermal three-phase flash calculation based on given pressure, temperature and global

feeding compositions. The equilibrium constants (K-value) can be calculated from EOS

equations (e.g. Peng-Robinson Equation) or empirical correlations in the inner loop.

Fig. 2-14: Schematic description of isenthalpic flash calculation

For the inner loop of isenthalpic flash calculation, it also includes two cycles of loop:

calculating phase equilibrium constants in outer loop and solving the Rachford-Rice equation to

get phase fractions and phase compositions in the inner loop. Thus an isenthalpic flash

calculation actually consists of three cycles of iterative loop as shown in Fig. 2-14 and a flow

chart for the inner loop of isenthalpic flash calculation using EOS is shown in Fig. 2-15.

51
Fig. 2-15: Procedure for isenthalpic flash calculation inner loop using EOS

The steps for the inner loop of isenthalpic flash calculation are:

(1) Estimate an initial K-value for each component;

(2) Solve the Rachford-Rice equation using existing global molar fractions Zi and K-

values. It usually needs Newton-Raphson iteration method to accomplish this step;

(3) Calculate phase properties using cubic equation of state such as Peng-Robinson

Equation;

(4) Calculate vapor fugacity coefficient ϕiv and liquid coefficient ϕiL. if the difference of

ϕ
ϕiv and ϕiL is greater than a tolerance, then set 𝐾𝑖(𝑛𝑒𝑤) = 𝐾𝑖 ϕ𝑖𝑣 and go to step (2). Otherwise
𝑖𝐿

accept the result and end the iterative procedure.

Generally the initial K-value can be estimated by Wilson (1968) correlation:

𝐾𝑖 = (𝑃𝑐𝑖 ⁄𝑃 )𝑒𝑥𝑝[5.37(1 + 𝜔𝑖 )(1 − 𝑇𝑐𝑖 /𝑇)] (2-92)

52
where 𝜔 is the acentric factor, Tc is critical temperature and Pc is critical pressure.

For known K-values Ki and global molar fractions zi, Rachford-Rice equation is used to

calculate vapor molar fraction:

(2-93)

where nv is vapor molar fraction and n is the total component number. Equation (2-93)

can be solved by iteration or Newton-Raphson iteration method.

A lot of cubic equations of state are available for phase behavior computation. Among

them the Peng-Robinson equation is recognized as the most accurate one. It is given as:
𝑅𝑇 𝑐 𝛼 𝑎
𝑃 = (𝑉−𝑏) − 𝑉(𝑉+𝑏)+𝑏(𝑉−𝑏) (2-94)

𝑅 2 𝑇𝑐2
𝛼𝑐 = 457235 ( )
𝑃𝑐

𝑎 = [1 + 𝑚(1 − 𝑇𝑟0.5 )]2

𝑚 = 0.37464 + 1.54226𝜔 − 0.26992𝜔2

1 𝑅𝑇
𝑏 = 8 ( 𝑃 𝑐)
𝑐

where Tr is reduced temperature 𝑇𝑟 = 𝑇⁄𝑇𝑐 . When it is reformulated in terms of

compressibility factor 𝑍 = 𝑃𝑉 ⁄𝑅𝑇, equation (2-94) becomes:

𝑍 3 − (1 − 𝐵)𝑍 2 + (𝐴 − 2𝐵 − 3𝐵 2 )𝑍 − (𝐴𝐵 − 𝐵 2 − 𝐵 3 ) = 0 (2-95)


𝑎𝑃
𝐴 = (𝑅𝑇)2

𝑏𝑃
𝐵 = 𝑅𝑇

For pure compound, the fugacity coefficient is calculated:

𝐴 𝑍+(1−√2)𝐵
ln ϕ = (𝑍 − 1) − ln(𝑍 − 𝐵) + 2√2𝐵 ln [𝑍+(1+√2)𝐵] (2-96)

53
For multicomponent system, the fugacity coefficient is given as:

(2-97)
𝑛 𝑛

𝑎 = ∑ ∑ 𝑧𝑖 𝑧𝑗 𝑎𝑖𝑗
𝑖=1 𝑗=1

𝑏 = ∑ 𝑧𝑖 𝑏𝑖
𝑖=1

𝑎𝑖𝑗 = √𝑎𝑖 𝑎𝑗 (1 − 𝑘𝑖𝑗 )

where kij is a binary interaction coefficient and z stands for component global molar

fraction.

As the calculation is intensive in the EOS equation, updating K-value by EOS can be

expensive. Thus a correlation can be used to calculate K-value directly for increasing the running

speed. The most commonly used K-value correlation is given by Crookston (1977):

𝑎 𝑑
𝐾(𝑃, 𝑇) = (𝑃 + 𝑏 ∙ 𝑃 + 𝑐) ∙ exp (𝑇−𝑒) (2-98)

where a, b, c, d and e are experimental regressed coefficient.

With isenthalpic calculation, it becomes more complex than the common three-phase

flash calculation and the stability test is not applicable under certain situations. Performing such

flash calculations is expensive because even one Newton iteration of simulation needs thousands

of times of such flash calculations and each flash calculation needs three levels of iteration to

converge: iteration for solving the Rachford-Rice equation, iteration for three-phase flash

calculation using EOS equation to update equilibrium constants and the iteration for computing

system temperature at given system enthalpy. Recently Lapene et al. (2010) proposed a new

Modified Racford-Rice equation to simplify the three-phase flash calculation for thermal

54
compositional simulation. With this new method, the two loops in the three-phase flash

calculation are reduced to solve a Modified Racford-Rice equation:

(2-99)
1−𝑦
𝐾𝑤∗ = 1−𝑥𝑤
𝑤

1−𝑧
𝐾𝑤𝑧 = 1−𝑥𝑤
𝑤

Where xw is the water molar fraction in liquid phase, yw is the water molar fraction in gas

phase and zw is the water global molar fraction.

The derivative of the MRR equation (2-99) with respect to vapor fraction nv is:

(2-100)

This objective function is always negative and it means that the presented MRR equation

(2-99) is monotonically decreased. A unique solution is guaranteed between adjacent asymptotes.

A detailed iteration procedure is proposed by Lapene et al. (2010) for solving this MRR equation.

Stone et al. (2009) presented a robust method for isenthalpic calculation. The main idea

for this method is that when the total system enthalpy increases the system will gradually evolve

from a two-phase water-oil to three-phase gas-water-oil and finally becomes a single gas phase if

the enthalpy reaches higher enough. The system status is decided by comparing input enthalpy

with three critical enthalpies: the enthalpy at which the first gas bubble appears in the system, the

enthalpy at which first liquid phase (oil or water) completely disappear in the system and the

enthalpy at which the system totally becomes a single-phase gas. After the system status is

determined, the temperature, molar fractions in phases and phase split are computed accordingly.

55
Fig. 2-16: Schematic description of phase transition with temperature (Stone et al., 2009)

The first step for Stone isenthalpic calculation is to calculate the three temperatures at the

three critical phase transition boundaries and their corresponding enthalpies as shown in Fig. 2-

16. At temperature T1, the system become a single-phase gas phase and this temperature can be

decided by the water temperature Tw and oil temperature To calculated by equation (2-101) and

(2-102) respectively.
𝑃𝑠𝑤(𝑇)
𝑧𝑤 = 𝐾𝑤 (𝑇) = for solution Tw (2-101)
𝑃

for solution To (2-102)

Then the temperature T1 is determined by 𝑇1 = max(𝑇𝑤 , 𝑇𝑜 ). Where zw is water global

molar fraction, 𝐾𝑤 (𝑇) is water component K-value at temperature T, 𝑃𝑠𝑤(𝑇) is water saturation

pressure at temperature T, Kio(T) is the K-value of component i at temperature T and “vhc”

means volatile hydrocarbon component.

56
If temperature 𝑇1 = 𝑇𝑤 from equation (2-101), it shows that oil is first to disappear and

then water disappear into a single-phase gas. The temperature for first liquid phase (oil)

disappearance T2 is then obtained by solving:

(2-103)

where 𝐾𝑤 (𝑇2 ) is water component K-value at temperature T2, Kio(T2) is the K-value of

component i at temperature T2.

If temperature 𝑇1 = 𝑇𝑜 from equation (2-102), it shows that water is first to disappear and

then oil disappear into a single-phase gas. The temperature for first liquid phase (water)

disappearance T2 is then obtained by solving:

(2-104)

where znvhc is the global molar fraction for total non-volatile hydrocarbon component and

znchc is the global molar fraction for total non-condensable hydrocarbon component.

The temperature T3 for first gas bubble appearing in the system is obtained by solving:

(2-105)

If temperature 𝑇1 = 𝑇𝑤 from equation (2-101), the transition enthalpy 𝐻𝑡_𝑤𝑎𝑡 for water

phase to leave the system is calculated by:

𝐻𝑡_𝑤𝑎𝑡 = ℎ𝑔𝑎𝑠 (𝑃, 𝑇1 , 𝑦𝑖 = 𝑧𝑖 ) (2-106)

where hgas is the gas phase enthalpy.

The transition enthalpy 𝐻𝑡_𝑜𝑖𝑙 for oil or liquid phase to leave the system is calculated by:

𝐻𝑡_𝑜𝑖𝑙 = 𝑛𝑣 ∙ ℎ𝑔𝑎𝑠 (𝑃, 𝑇2 , 𝑦𝑖 ) + 𝑛𝑤 ∙ ℎ𝑤𝑎𝑡 (𝑃, 𝑇2 ) (2-107)

57
where hwat is the gas phase enthalpy, 𝑛𝑣 is gas phase molar fraction and 𝑛𝑤 is water phase

molar fraction.

If temperature 𝑇1 = 𝑇𝑜 from equation (2-102), the transition enthalpy 𝐻𝑡_𝑜𝑖𝑙 for oil or

liquid phase to leave the system is calculated by:

𝐻𝑡_𝑜𝑖𝑙 = ℎ𝑔𝑎𝑠 (𝑃, 𝑇1 , 𝑦𝑖 = 𝑧𝑖 ) (2-108)

If there are non-volatile hydrocarbons in the system, then the 𝐻𝑡_𝑜𝑖𝑙 is set to be ∞.

The transition enthalpy 𝐻𝑡_𝑤𝑎𝑡 for water phase to leave the system is calculated by:

𝐻𝑡_𝑤𝑎𝑡 = 𝑛𝑣 ∙ ℎ𝑔𝑎𝑠 (𝑃, 𝑇2 , 𝑦𝑖 ) + 𝑛𝑜 ∙ ℎ𝑜𝑖𝑙 (𝑃, 𝑇2 , 𝑥𝑖 ) (2-109)

After the three critical temperatures and their corresponding transition enthalpies are

determined, the VLE calculation is performed based on three types systems:

(1) 𝐻𝑡_𝑤𝑎𝑡 ≤ 𝐻𝑡 ≤ 𝐻𝑡_𝑜𝑖𝑙 : Oil-Gas system

In this state, total water component only presents in gas phase, the system temperature is

determined by solving:

(2-110)

The gas phase molar fraction is determined by:

𝐻𝑡 −ℎ𝑜𝑖𝑙 (𝑇,𝑥𝑖 )
𝑛𝑣 = ℎ (2-111)
𝑔𝑎𝑠 (𝑇,𝑦𝑖 )−ℎ𝑜𝑖𝑙 (𝑇,𝑥𝑖 )

where 𝐻𝑡 is the system input enthalpy for isenthalpic flash calculation.

(2) 𝐻𝑡_𝑜𝑖𝑙 ≤ 𝐻𝑡 ≤ 𝐻𝑡_𝑤𝑎𝑡 : Water-Gas system

In this state, total oil components only present in gas phase, the system temperature is

determined by solving:

(1−𝑧𝑤 ) (𝑧𝑤 −𝐾𝑤 (𝑇))


𝐻𝑡 − (1−𝐾 (𝑇))
ℎ𝑔𝑎𝑠 (𝑇, 𝑦𝑖 (𝑇)) − (1−𝐾 ℎ𝑤𝑎𝑡 (𝑇) =0 (2-112)
𝑤 𝑤 (𝑇))

58
The gas phase molar fraction is determined by:
1−𝑧𝑤
𝑛𝑣 = 1−𝐾 (2-113)
𝑤 (𝑇)

(3) 𝐻𝑡_𝑔𝑎𝑠 ≤ 𝐻𝑡 ≤ min(𝐻𝑡_𝑤𝑎𝑡 , 𝐻𝑡_𝑜𝑖𝑙 ) : Oil-Water-Gas system

This is three phase status and it need to solve two equations simultaneously to obtain the

system temperature and gas phase fraction:

(2-114)

and again

𝐻𝑡 = 𝑛𝑣 ℎ𝑔𝑎𝑠 + [1 − 𝑛𝑣 (1 − 𝐾𝑤 ) − 𝑧𝑤 ]ℎ𝑜𝑖𝑙 + (𝑧𝑤 − 𝑛𝑣 𝐾𝑤 )ℎ𝑤𝑎𝑡 (2-115)

In case there is no volatile hydrocarbon component in the system, the gas fraction is

obtained by steam quality calculation.

Stone isenthalpic method has been demonstrated stable for narrow boiling system and can

have quick convergence.

59
Chapter 3: Important Issues in Wellbore Simulator Development

3.1 Introduction to Wellbore Simulator Development

With wellbore modeling equations, a thermal compositional wellbore simulator can be

developed. This wellbore simulator should be able to handle different wellbore configurations

and different fluid flow problems. Also a friendly windows-based interface is useful for easily

using the wellbore simulator. The development of a wellbore simulator is similar to development

of a reservoir simulator thus techniques in several schemes including gridding, discretizing,

solution method, liner solver from reservoir simulator development can be used as reference.

As a thermal wellbore simulation can be divided into three major tasks: fluid flow along

the wellbore, heat loss through wellbore components such as the annulus and heat transfer in

surrounding formation, the grid system consists of three different parts accordingly. From the

wellbore structure, all grids in the wellbore simulation can be automatically generated from well

trajectory data and related wellbore parameters. The geology modeling process in reservoir

simulation can be neglected in wellbore simulation.

Although other numerical techniques like finite element method could provide more

accurate solution results, finite volume method is still the best method considering the balance

between simulation running speed and results accuracy. As the mathematical equations are

highly nonlinear and coupled, fully implicit scheme is used to solve the discretized equations.

The wellbore simulator program is developed by C++ and the interface for building a

model and viewing results is developed based on Microsoft Foundation Class Library. The

wellbore simulator has following capabilities:

(1) Modeling single phase, two phase and multiphase flow along the tubing or annulus;

(2) Modeling two phase and superheated steam injection;

60
(3) Modeling heat loss through tubing wall, annulus, casing wall and cement;

(4) Modeling heat transfer in surrounding formation;

(5) Modeling compositional flow including steam solvent co-injection, CO2 injection for

shale gas reservoir, non-condensable gas (NCG) co-injection etc.;

(6) Modeling geothermal well production;

(7) Handling vertical well, deviated well and horizontal well with multiple-tubing strings;

(8) Performing wellbore simulation from wellhead to bottom or from bottom to wellhead;

(9) Providing interface for building a wellbore simulation model;

(10) Providing interface for viewing results in text and graphical plots.

3.2 Gridding Scheme for Wellbore Simulator

For simulating fluid flow in the tubing or annulus, a 1D grid system is applied along the

wellbore depth. Based on the well trajectory data, the tubing or annulus space along the well path

is divided into N segments (grid blocks) and geometry parameters of each segment is calculated

(as shown in Fig. 3-1).

Fig. 3-1: 1D grid system for tubing or annulus flow in a wellbore simulator

61
The strategy for assigning the primary variable into the segments is: the phase in-situ

fractions are assigned to the center of a segment and other variables (pressure, enthalpy, velocity

etc.) are aligned with the segment boundary. By this strategy, the boundary conditions can be

easily set on the upper boundary of the first segment or the lower boundary of the last segment.

Also the discretized equations are simplified by only considering two neighboring segment.

For a thermal simulation, the heat loss through the tubing components is crucial. Due to

the complexity of convection and radiative heat transfer in the annulus, sometimes numerical

simulation is essential for providing more accurate results. Thus a 2D point grid system

(Xueying Lu, 2016) in the annulus is generated for such simulation. In this grid, the annuli space

between tubing wall and casing wall is simplified to 2D rectangular space because the heat

transfer patterns along the circular wall are similar. Then a heat transfer simulation can be

performed based on this 2D point grid system. But if the empirical correlations are used for

calculating heat loss, the grid system in annulus is not needed.

Fig. 3-2: 2D point grid system for heat transfer in annuli space

For heat loss calculation, another important process is to determine the temperature at the

boundary between wellbore and formation (the position at which cement contact with

62
formation). This temperature depends on how heat dissipates in surrounding formation. Its

accuracy greatly affects the accuracy of heat loss estimation. Thus accurate estimation of heat

transfer in surrounding formation by simulation can improve the heat loss calculation accuracy.

A 2D radial grid system is generated for such heat transfer simulation in surrounding formation.

Fig. 3-3: 2D radial grid system for heat transfer simulation in formation

In this 2D radial grid system, the length of each block along the radial direction is

increased by logarithmic pattern:


1
𝑟𝑖+1 𝑟 𝑁 −1
= (𝑟 𝑒 ) 𝑟 (3-1)
𝑟𝑖 𝑤

𝑟𝑖+1 = (𝑟𝑖 𝑟𝑖+1 )1⁄2


2

𝑟1 = 𝑟𝑤
2

where 𝑟𝑖 is the radius of grid i at center in radial direction, 𝑟𝑤 is the wellbore radius, 𝑟𝑒 is

the external formation radius and 𝑁𝑟 is the total grid number along the radial direction. In the Z

direction, the formation is divided by the segments number N in tubing or annulus. Thus the grid

number in formation Z direction is equal to the segment number in tubing or annulus.

63
3.3 Numerical Solution for Equations

As this study is mainly to develop a wellbore simulator, how to numerically solve the

partial differential equations for fluid flow and energy exchange is one of major tasks. From

consideration of running speed and accuracy, the finite volume method is used to discretize the

equations based on the grid system mentioned above. For the flow and energy in wellbore tubing

or annulus, the discretized equations (Livescu et al., 2008) are:

∆z n+1 n n+1
F𝑐,𝑖 = Ai [(∑p ρp αp 𝑥𝑐𝑝 ) − (∑p ρp αp 𝑥𝑐𝑝 ) ] ± Ai [(∑p ρp Vsp 𝑥𝑐𝑝 ) −
∆t i i i+1

n+1 n+1
(∑p ρp Vsp 𝑥𝑐𝑝 ) ] − [∑𝑝 𝑚𝑐𝑝 ]i =0 (3-2)
i

n+1
F𝑝,𝑖 = (pn+1
i − pn+1 n+1 n+1
i−1 ) − ∆ph,i ± ∆pf,i ± ∆pa,i = 0 (3-3)

n+1 n
∆z 1 1
F𝑒,𝑖 = A [(∑p ρp αp (𝑢𝑝
∆t i
+ 2 𝑉𝑝2 )) − (∑p ρp αp (𝑢𝑝 + 2 𝑉𝑝2 )) ] ± Ai [(∑p ρp Vsp (ℎ𝑝 +
i i

n+1 n+1
1 2 1 n+1
2
𝑉𝑝 )) − (∑p ρp Vsp (ℎ𝑝 + 2 𝑉𝑝2 )) ] − (Vi ∑p ρp 𝑉𝑠𝑝 𝑔) + ∆z(Q loss )n+1
i − (mh )n+1
i =0 (3-4)
i+1 i i

Where the subscript c represents the component index 𝑐 = 1,2, ⋯ , 𝑁𝑐 and water

component, the subscript p represents phase oil, gas and water, i is the grid number along the

wellbore, n is the time level (n represent previous time step and n+1 represent current time step),

∆t is the current timestep and ∆z is the length of block i along the wellbore depth.

For the heat transfer simulation in annuli space, a detailed discretization and solution

method are listed in Xueying Lu’s research (2016).

For heat transfer in surrounding formation, the discretized equation (Bahonar M, 2011)

is:
𝑛+1 𝑛+1 𝑛+1 𝑛+1 𝑛+1 𝑛
𝛾𝑘−1,𝑖 𝑇𝑘−1,𝑖 + 𝛾𝑘,𝑖−1 𝑇𝑘,𝑖−1 + 𝛾𝑘,𝑖 𝑇𝑘,𝑖 + 𝛾𝑘,𝑖+1 𝑇𝑘,𝑖+1 + 𝛾𝑘+1,𝑖 𝑇𝑘+1,𝑖 = −𝑇𝑘,𝑖 (3-5)

64
Where 𝛾 is heat transmissibility coefficients, n is the time level (n represent previous time

step and n+1 represent current time step), 𝑇 is the temperature, 𝑖 is the grid indices in the radial

direction and 𝑘 is the grid indices in the Z direction respectively.

As the discretized equations for wellbore flow and heat transfer in annulus are highly

non-linear and fully coupled, Newton iteration with fully implicit scheme is used to solve the

equations. The Newton iteration method has the following form for a set of non-linear

equations:

𝑋 𝑣+1 = 𝑋 𝑣 − 𝐽−1 (𝑋 𝑣 )𝐹(𝑋 𝑣 ) (3-6)

where X stands for the vector of primary variables (𝑥1 , 𝑥2 , ⋯ , 𝑥𝑚 ), v is the Newton

iteration number, J is the Jacobian matrix which is constructed from partial derivatives of 𝐹(𝑋 𝑣 )

with respect to 𝑋 𝑣 and F is the set of nonlinear equations. In practice, equation (3-6) is

transformed into matrix solving format (Ax=b) and 𝛿 𝑣 is solved based on 𝐽(𝑋 𝑣 ) and 𝐹(𝑋 𝑣 ).

𝐽(𝑋 𝑣 )𝛿 𝑣 = −𝐹(𝑋 𝑣 ) (3-7)

𝑋 𝑣+1 = 𝑋 𝑣 + 𝛿 𝑣

The 𝐹(𝑋 𝑣 ) can be expressed as:

𝐹1 = F𝑐,1
𝐹2 = F𝑝,1
𝐹3 = F𝑒,1
𝑣) ⋮
𝐹(𝑋 = (3-8)
𝐹𝑚−2 = F𝑐,𝑁
𝐹𝑚−1 = F𝑝,𝑁
[ 𝐹𝑚 = F𝑒,𝑁 ]

Then the Jacobian matrix 𝐽(𝑋 𝑣 ) is calculated by:

𝜕𝐹1 𝜕𝐹1

𝜕𝑥1 𝜕𝑥𝑚
𝐽(𝑋 𝑣 ) = ⋯ ⋱ ⋯ (3-9)
𝜕𝐹𝑚 𝜕𝐹𝑚
[ 𝜕𝑥1 ⋯ 𝜕𝑥𝑚 ]

65
At first iteration of each timestep, 𝑋 𝑣 take the values from previous timestep. All

parameters in 𝐹(𝑋 𝑣 ) are updated at each Newton iteration therefore a fully implicit scheme is

applied. Three methods are available for calculating derivatives in constructing the Jacobian

matrix 𝐽(𝑋 𝑣 ): analytical, numerical and automatic differentiation. In this study, the numerical

differentiation method is used to construct the Jacobian matrix. The numerical differentiation has

three common approaches: forward difference, backward difference and central difference.

Forward Difference:

𝜕𝐹𝑖 𝐹𝑖 (⋯ , 𝑥𝑘 + ∆𝑥, ⋯ ) − 𝐹𝑖 (⋯ , 𝑥𝑘 , ⋯ )
= + 𝑂(∆𝑥)
𝜕𝑥𝑘 ∆𝑥

Backward Difference:

𝜕𝐹𝑖 𝐹𝑖 (⋯ , 𝑥𝑘 , ⋯ ) − 𝐹𝑖 (⋯ , 𝑥𝑘 − ∆𝑥, ⋯ )
= + 𝑂(∆𝑥)
𝜕𝑥𝑘 ∆𝑥

Central Difference:

𝜕𝐹𝑖 𝐹𝑖 (⋯ , 𝑥𝑘 + ∆𝑥, ⋯ ) − 𝐹𝑖 (⋯ , 𝑥𝑘 − ∆𝑥, ⋯ )


= + 𝑂(∆𝑥 2 )
𝜕𝑥𝑘 2∆𝑥

As the error is proportional to ∆𝑥 2 in central difference, it will have smaller error when

∆𝑥 is small. But central difference needs to calculate the function 𝐹𝑖 twice then computation time

is increased twice. Although central difference can provide more accurate derivative estimation,

a forward difference is used in this study as running speed is a major concern for compositional

wellbore simulation. The central difference will increase the time twice for building the Jacobian

matrix and significantly slow the wellbore simulation. In case that the nonlinear equations are

difficult to converge, an under-relaxation scheme is applied to dampen the solution and avoid

oscillations.

The primary variables aligned to the equations include pressure (P), global molar

fractions (Zi), mixture velocity (Vm) and fluid mixture enthalpy (h). Generally the pressure (P)

66
will be aligned with the water component conservation equation, global molar fractions (Zi) are

aligned with the rest component conservation equations, mixture velocity (Vm) is aligned with the

momentum equation and fluid mixture enthalpy (h) is aligned with the energy equation. When

phase appear or disappear during the Newton iterations, none of these variables will become

zero. Thus this scheme of primary variables selection and alignment can effectively avoid

variables switch during phase appearance and disappearance. The procedure for solving the

equations includes:

(1) Use initial conditions in reservoir or values from previous timestep to set primary

variables P, Zi, Vm and h;

(2) Perform isenthalpic flash calculation to calculate fluid temperature, phase densities,

phase compositions, phase splits etc.;

(3) Apply drift-flux model to calculate in-situ gas volume fraction, mixture densities and

update other secondary variables;

(4) Construct the Jacobian matrix 𝐽(𝑋 𝑣 ) by numerical differentiation;

(5) Calculate residuals 𝐹(𝑋 𝑣 );

(6) Solve linear equations 𝐽(𝑋 𝑣 )𝛿 𝑣 = −𝐹(𝑋 𝑣 ) to get 𝛿 𝑣 ;

(7) If the residuals or 𝛿 𝑣 great than convergence tolerance, then update primary variables

P, Zi, Vm and h using 𝛿 𝑣 and go to step (2); otherwise move to next timestep and repeat this

procedure until the whole simulation time is reached.

For wellbore flow and heat transfer in annulus, only two neighboring blocks are

connected for a regular block as the grid is a 1D system. The Jacobian matrix has a similar

format as following:

67
Fig. 3-4: Schematic representation of Jacobian matrix
For each × in the Jacobian matrix shown in above Fig. 3-4, it represents a 𝑛𝑒𝑞 × 𝑛𝑒𝑞

submatrix (𝑛𝑒𝑞 is the primary variable number in each block). This is a sparse matrix with

banded width.

When the Jacobian matrix is ready during a Newtonian cycle, the next major task is

solving the linear solver equations:

𝐴∙x =b (3-10)

Where A is the sparse Jacobian matrix, x is 𝛿 𝑣 and b is −𝐹(𝑋 𝑣 ). When the segment

number is small in a wellbore, equation (3-10) can be solved by Gaussian elimination method.

But for a large number of grid blocks along with the wellbore, Gaussian elimination will become

very slow and an iterative method should be used. In a typical iterative procedure, a

preconditioner is placed first by incomplete LU factorization and then the linear equations are

solved by iteration. There are a lot of commercial or open source linear solver libraries available

for solving equation (3-10). For reservoir simulation, GMRES (Generalized Minimal Residual)

method is mostly used as the linear solver. This method is fast and stable for the type of matrix in

reservoir simulation. But in parallel run, the GMRES method has disadvantages because of the

68
frequent communication between blocks. There are other methods like BiCGSTAB (Biconjugate

Gradient Stabilized), BiCG (Biconjugate Gradient) and AIM (Accelerated Iterative) available in

a standard linear solver code library.

In this study, open source code libraries IML++ and SparseLib++ are used as the linear

solver. The code in this study is developed by C++ and Visual C++ language.

3.4 Implementation for Heat Loss Calculation

For thermal simulation in a wellbore, computation of heat loss to surrounding formation

is crucial for estimating downhole fluid conditions. Existing wellbore simulators like CMG

Flexwell are using the Ramey (1962) and Willhite (1967) method which include correlation

equations (2-29), (2-30) and the associated iterative procedure to calculate the heat loss to

surrounding formation. As discussed in section 2.3, this method has limited accuracy because it

is based on some outdated experiment results in 1950s. In this study, two more heat loss

calculation methods are implemented in addition to this correlation method: semi-numerical

method and numerical method. A well model is built for comparison between the numerical

method and the Ramey (1962) and Willhite (1967) method. The parameters in this model are

those in a typical on-site wellbore as shown in table (3-1). Hot water with rate 300 m3/d is

injected. The injection pressure is 4,100 kPa and temperature is 250.3 °C at the wellhead. The

simulation is run for 10 years of injection with the numerical method and the Ramey (1962) and

Willhite (1967) method respectively.

69
Table 3-1: Wellbore parameters for comparison of heat loss calculation
Item Name Value Unit Item Name Value Unit
emissivity of outside tubing
rti inside tubing radius 0.038 m 𝜀𝑡𝑜 0.8
surface
emissivity of inside casing
rto outside tubing radius 0.04445 m 𝜀𝑐𝑖 0.8
surface
rci inside casing radius 0.081 m 𝑔𝑇 geothermal gradient 0.03513 °C/m
surface geothermal
rco outside casing radius 0.089 m 𝑇𝑠𝑢𝑟𝑓 12 °C
temperature
cement/formation water density at standard
rwb 0.124 m 𝜌0 998.2 kg/m3
radius condition
tubing thermal
kt 43.2639 W/(m °C) 𝜀 ⁄𝑑 relative roughness of tubing 0.0001
conductivity
casing thermal
kcas 43.2693 W/(m °C) 𝜌𝑎𝑛 density of annulus fluid 1.1216 kg/m3
conductivity
cement thermal
Kcem 0.35 W/(m °C) 𝜇𝑎𝑛 viscosity of annulus fluid 0.02052 cp
conductivity
radial thermal
heat capacity of annulus
ke conductivity of 1.73 W/(m °C) 𝐶𝑎𝑛 1.9258 kJ/(kg °C)
fluid
formation
vertical thermal
thermal conductivity of
kez conductivity of 1.73 W/(m °C) kha 0.05615 W/(m °C)
annulus fluid
formation
formation thermal 0.73806
α m2/s
diffusivity 3E-6

The comparison was made for cement/formation temperature calculation (Tcf) which has

direct effect on heat loss calculation.

70
Fig. 3-5: Comparison for cement/formation temperature calculation (Tcf)
Figure 3-5 shows that errors of the Ramey & Willhite method can be significant. Because

in the wellbore components (tubing wall, annulus, casing wall and cement) through which the

heat transfers to the surrounding formation, the only heat transfer mechanism in tubing wall,

casing wall and cement is heat conduction which can be accurately estimated by one-dimension

Fourier’s law. But in annulus it involves complex mechanisms including heat radiation and heat

convection in the annuli space. Thus, we can conclude that the main error source in Ramey

method comes from the calculation of heat transfer in annulus and from the cement/formation

temperature. It is necessary to upgrade the correlation-only Ramey method to better accuracy

methods.

For the semi-numerical method, a set of new correlations regressed from CFD Fluent

simulation are used to replace the outdated Dropkin and Sommerscales (1956) correlations in

Ramey (1962) and Willhite (1967) method. From the casing wall to the surrounding formation,

the heat loss is estimated by a numerical simulation method. Thus the procedure of heat loss

71
from tubing wall to casing wall estimated by correlation and heat loss from casing wall to the

surrounding formation computed by numerical simulation is called the semi-numerical method.

Fig. 3-6: Schematic description of semi-numerical method


CFD Fluent is a widely used simulation software package for heat transfer, reactions,

turbulence and model flow in numerous industry applications. The accuracy of Fluent

simulating heat transfer in annuli space has been verified by experiments conducted by some

researchers like Inaba et al. (2005). Since it has been proved among literatures that the Fluent

simulation results can generate close results to experiments, then we can use Fluent simulation

results as source data to regress more accurate correlations for heat transfer. The correlation

based on Fluent simulation results should have similar accuracy as correlation from an

experiment. In this study, a series of simulations are performed based on ANSYS FLUENT 14.0

for regressing better correlations than those used in Ramey (1962) and Willhite (1967) to predict

heat transfer in annuli space.

72
Fig. 3-7: Description for a FLUENT model (Xiong, W., 2014)
The main input for the Fluent models includes property of tubing and casing material,

fluid media in the annuli space, sizes of tubing and casing and temperature at tubing and casing

walls. The tubing and casing material is considered as the general steel used in tubing series.

Fluid media in the annuli space is air for all models. A series of combinations of different tubing

and casing sizes are created in different models to represent different annuli space from narrow

to spacious. Typical tubing sizes used in the model include 3 ½”, 4”, 4 ½”, 5”, 5 ½” etc. and

casing sizes include 7”, 8”, 9”, 9 ⅝”, 11 ¾” etc. For each combination of tubing and casing size,

different temperatures at tubing and casing are applied (Table 3-1).

73
Table 3-2: Temperatures used in FLUENT simulation for each size combination

Temperature Difference
Tubing temperature (K) Casing temperature (K)
(K)

310 290 20
360 290 70
410 290 120
460 290 170
510 290 220
560 290 270
610 290 320
410 340 70
510 340 170
610 340 270
460 390 70
560 390 170
510 440 70
560 440 120
610 440 170
510 490 20
560 490 70
610 490 120
610 550 60

A correlation based on the results from simulation result of these Fluent models is

regressed in this study (Xiong, W., 2014):

𝑁𝑢 = 𝐶𝛿 𝑎 𝑅𝑎 𝑏 (3-11)

a=1.098661

b=0.246907

C=0.951182

Where 𝑁𝑢 is the Nusselt number, 𝑅𝑎 is the Raleigh number and 𝛿 is the annulus aspect

ratio (𝛿 = 𝑟𝑡𝑜 ⁄𝑟𝑐𝑖 ). With the Nusselt number, the heat loss rate 𝑞 can be calculated by:

𝑞 = 𝜋𝑘𝑎 𝑁𝑢 (𝑇𝑐𝑖 − 𝑇𝑡𝑜 ) (3-12)

74
Where 𝑘𝑎 is the thermal conductivity of fluid media (considered as air usually) in the

annulus.

The correlation together with some other correlations including Raithby and Hollands

(1974), Churchill (1983) and the one used by Willhite (1967) are compared with the Fluent

simulation in the following figure.

Fig. 3-8: Comparison between correlations and FLUENT simulation (Xiong, W., 2014)
Figure 3-8 shows that existing correlations results are significantly deviated from the

Fluent simulation (No one match well with Fluent simulation results in different models).

Consequently, a new correlation matching well with Fluent simulation is essential for more

accurate heat loss calculation.

To validate the correlation (3-11), Fluent models with different tubing and casing sizes

which are not used in regression are created. The two combinations of tubing and casing size are

randomly selected. The results predicted by the correlation (3-11) are compared with the Fluent

simulation results by the two models in flowing figure.

75
Fig. 3-9: Validation for the correlation (3-11) (Xiong, W., 2014)
From figure 3-9, it shows that the correlation regressed by this study can match well with

Fluent simulation results. Thus we can use this correlation for better convection heat transfer

estimation in the annulus.

Fig. 3-10: A Fluent simulation for annuli space with double-tubing strings
Fluent simulations also are conducted in annuli space with dual-tubing strings. Through

comparison with single-tubing wellbore which has the same casing and tubing sizes, this study

find that each tubing in annuli space with dual-tubing strings has less heat transfer rate than the

same tubing in a single-tubing annuli space. It could be explained by the fact that heat transfer

behavior from each tubing is inhibited by the heat transfer from another tubing in the annuli

space. Then a new correlation for predicting heat transfer in annuli space with dual-tubing strings

is also regressed (Xiong, W., 2014):

𝑁𝑢𝑑 = 𝛼𝑁𝑢 (3-13)

76
𝛼 = 𝐶𝛽 𝑎 𝑅𝑎 𝑏
2 2 2 2 2 2
𝜋𝑟𝑐𝑖 −𝜋𝑟𝑡𝑜1 −𝜋𝑟𝑡𝑜2 𝑟𝑐𝑖 −𝑟𝑡𝑜1 −𝑟𝑡𝑜2
𝛽= 2 −𝜋𝑟 2 = 2 −𝑟 2
𝜋𝑟𝑐𝑖 𝑡𝑜1 𝑟𝑐𝑖 𝑡𝑜1

𝐶 = 0.527105

𝑎 = 0.560901

𝑏 = 0.021058

Where 𝑁𝑢𝑑 is the modified Nusselt number for tubing in annuli space with dual-tubing

strings, 𝛼 is the coefficient for reducing the Nusselt number from single tubing to tubing in

annuli space with dual-tubing strings and 𝛽 is the ratio of reduced annuli space to single-tubing

annuli space.

For each tubing in annuli space with dual-tubing strings, equation (3-11) is first used to

calculate the Nusselt number 𝑁𝑢 and then equation (3-13) is used to calculate the modified

Nusselt number 𝑁𝑢𝑑 . Finally, 𝑁𝑢𝑑 is used to calculate the natural heat convection for each tubing.

To validate correlation (3-13), a series of Fluent simulation were conducted in annuli

space with dual-tubing strings and the single-tubing space with same tubing and casing size.

Values of 𝑁𝑢𝑑 and 𝑁𝑢 are read from the simulation results and series of 𝛼 are calculated by

𝑁𝑢𝑑 /𝑁𝑢 . At the same time a series of 𝛼 are also calculated from equation (3-13) using the same

parameters in the simulation model. The comparison between the 𝛼 values calculated by

equation (3-13) and the 𝛼 values calculated by 𝑁𝑢𝑑 /𝑁𝑢 from simulation results are shown in

following figure:

77
Fig. 3-11: Comparison between 𝜶 from simulation and the predicted one (Xiong, W., 2014)
This comparison shows that the 𝛼 values calculated by equation (3-13) have a relatively

good match with the 𝛼 values calculated by 𝑁𝑢𝑑 /𝑁𝑢 from simulation results.

Another improvement for heat loss calculation is the implementation of fully numerical

method. It means that except in the tubing wall the heat transfer in other wellbore components

including annulus, casing wall, cement and surrounding formation is numerically simulated (as

shown in figure 3-12).

Fig. 3-12: Schematic description of fully numerical method


The annulus heat transfer simulator is developed by Xueying Lu (2016). In this simulator,

it uses a 2D rectangular space to approximately represent the annular space. As shown in figure

3-12, the fully numerical method for heat loss calculation involves three types of simulation.

78
First at beginning of a timestep, heat transfer simulation in annulus is performed through the

simulator developed by Xueying Lu (2016). This simulation gives the heat flux through the

annulus which is used the input for the heat transfer simulation from casing wall to the

surrounding formation. After the heat transfer simulation from casing wall to the surrounding

formation is converged, the heat loss for each grid block in the tubing is calculated. Finally a

simulation for fluid and energy flow in the tubing is performed based on the heat loss results.

The results of simulation for fluid and energy flow are then used as input parameters for heat

transfer simulations of heat loss at next time step.

79
Chapter 4: Simulator Validation and Applications

4.1 Introduction to Wellbore Simulator

A C++ program was developed in this study for performing different wellbore modeling

and simulation tasks. This program can be directly run in a command-line environment (Figure

4-1).

Fig. 4-1: A screenshot of wellbore modeling program running


To assist building wellbore simulation models and viewing the simulation results, a

windows-based interface was also developed. Under this interface, it can create, save and open

projects just like any other standard Windows software. As wellbore modeling involves different

wellbore parameters including wellbore configuration profile, thermal properties of wellbore

components, well dynamic production data, fluid properties, numerical control parameter etc.,

inputting data for wellbore simulator can be a difficult task. Thus, a tool for building wellbore

simulation model is essential for wellbore modeling research.

80
Fig. 4-2: A screenshot of interface for wellbore simulator
This interface simplifies the task for preparing the formatted input data that the wellbore

simulation program can read.

Fig. 4-3: A screenshot of input wellbore parameters

81
4.2 Validation for the Wellbore Simulator

Validation against CMG SAM, CMG Flexwell and Eclipse Multi-Segment Well were

conducted in this study. At first, a hot water injection was run and the results are compared with

CMG SAM. In this case, the hot water is injected into a vertical well with depth 1,000m. The hot

water injection rate is 300 m3/d (Cold Water Equivalent). In the vertical well, it has one tubing

and one casing. The hot water has pressure 3,100 kPa and temperature 230 °C at the wellhead.

The hot water is injected for two years in the model. The detailed wellbore parameters are listed

in Table 4-1. The values in Table 4-1 represent a typical parameter set in real industry wells.

Table 4-1: Wellbore parameters for hot water injection


Item Name Value Unit Item Name Value Unit
rti inside tubing radius 0.038 m 𝐶𝑝𝑟 formation heat capacity 782 kJ/(kg.°C)
rto outside tubing radius 0.04445 m 𝑔𝑇 geothermal gradient 0.03513 °C/m

rci inside casing radius 0.081 m 𝑇𝑠𝑢𝑟𝑓 surface geothermal temperature 12 °C

rco outside casing radius 0.089 m 𝜌0 water density at standard condition 998.2 kg/m3

rwb cement/formation radius 0.112 m 𝜀 ⁄𝑑 relative roughness of tubing 0.0001


tubing thermal
kt 43.2639 W/(m.°C) Z wellbore depth 1,000 m
conductivity
casing thermal
kcas 43.2693 W/(m.°C) dZ length per grid block 20 m
conductivity
cement thermal
Kcem 0.35 W/(m.°C) P water injection pressure 3,100 kPa
conductivity
emissivity of outside
𝜀𝑡𝑜 0.85 T water injection temperature 230 °C
tubing surface
emissivity of inside
𝜀𝑐𝑖 0.85 W water injection rate 300 m3/day
casing surface
radial thermal
ke conductivity of 1.73 W/(m.°C) 𝜌𝑎𝑛 density of annulus fluid 800 kg/m3
formation
vertical thermal
kez conductivity of 1.73 W/(m.°C) 𝜇𝑎𝑛 viscosity of annulus fluid 0.1055 cp
formation
formation thermal
α 0.738E-6 m2/s 𝐶𝑎𝑛 heat capacity of annulus fluid 4.87 kJ/(kg.°C)
diffusivity
thermal conductivity of annulus
𝜌𝑟 formation density 2998.9 kg/m3 kha 0.58 W/(m.°C)
fluid

82
The numerical parameters used here and in other following cases are:
First time step size after well change: 0.001 day
Max time step: 5 day
Material balance error tolerance: 1.0E-5
Max Newton iterations: 25
Linear solver precision: 1.0E-8
Linear solver iterations: 100
This case is run and compared with a CMG SAM model with the same parameters in the

injection well. The compared items include pressure, fluid temperature, heat loss from the fluid

and temperature at the boundary of cement and formation along the total well trajectory. The

values of these items at one day, one month, one year and two year from the simulation

beginning are selected for comparison.

Fig. 4-4a: Pressure and temperature of hot water along the wellbore at different times

83
Fig. 4-4b: Cement/Formation temperature and heat loss of hot water injection along the
wellbore at different times
Figure 4-4 shows that the results by the wellbore simulator (indicated by WM) in this

study can produce a very close result to CMG SAM model. It needs to mention that both the

wellbore simulator in this study and CMG SAM model have used the correlation-based Ramey

(1962) and Willhite (1967) method. If the semi-numerical method for heat loss calculation is

applied in wellbore simulator by this study, its results will be significantly different from CMG

SAM as shown in figure 4-5. It shows that the semi-numerical method differs much from Ramey

(1962) and Willhite (1967) method which has relatively large error.

84
Fig. 4-5a: Pressure and temperature of hot water along the wellbore at different times

Fig. 4-5b: Cement/Formation temperature and heat loss of hot water injection along the
wellbore at different times
The second case for validation is a steam injection in a vertical well with depth of 500m.

Also, the well has one tubing and one casing. The steam injection rate is 220 m3/d (Cold Water

85
Equivalent). The steam injection pressure is set to be 3760 kPa and the corresponding saturated

steam temperature is 246.715 °C at wellhead. The steam is injected for two years in the model.

The detailed wellbore parameters are listed in Table 4-2.

Table 4-2: Wellbore parameters for steam injection


Item Name Value Unit Item Name Value Unit
rti inside tubing radius 0.038 m 𝑔𝑇 geothermal gradient 0.03513 °C/m
rto outside tubing radius 0.04445 m 𝑇𝑠𝑢𝑟𝑓 surface geothermal temperature 12 °C

rci inside casing radius 0.122 m 𝜌0 water density at standard condition 998.2 kg/m3

rco outside casing radius 0.130 m 𝜀 ⁄𝑑 relative roughness of tubing 0.0001

rwb cement/formation radius 0.169 m Z wellbore depth 500 m


tubing thermal
kt 43.2639 W/(m.°C) dZ length per grid block 10 m
conductivity
casing thermal
kcas 43.2693 W/(m.°C) P water injection pressure 3760 kPa
conductivity
cement thermal
Kcem 0.35 W/(m.°C) T water injection temperature 246.715 °C
conductivity
emissivity of outside
𝜀𝑡𝑜 0.80 W water injection rate 220 m3/day
tubing surface
emissivity of inside
𝜀𝑐𝑖 0.80 fst steam quality 0.95
casing surface
radial thermal
ke conductivity of 1.73 W/(m.°C) 𝜌𝑎𝑛 density of annulus fluid 1.1216 kg/m3
formation
vertical thermal
kez conductivity of 1.73 W/(m.°C) 𝜇𝑎𝑛 viscosity of annulus fluid 0.02052 cp
formation
formation thermal
α 0.738E-6 m2/s 𝐶𝑎𝑛 heat capacity of annulus fluid 1.9258 kJ/(kg.°C)
diffusivity
thermal conductivity of annulus
𝜌𝑟 formation density 2998.9 kg/m3 kha 0.05615 W/(m.°C)
fluid
𝐶𝑝𝑟 formation heat capacity 782 kJ/(kg.°C)

A CMG SAM model was built for validation and the same parameters for injection well

was implemented in the model. Again, both the wellbore simulator in this study and CMG SAM

model have used the correlation-based Ramey (1962) and Willhite (1967) method.

86
Fig. 4-6a: Pressure and temperature of steam injection along the wellbore at different times

Fig. 4-6b Cement/Formation temperature and heat loss of steam injection along the
wellbore at different times

87
Fig. 4-6c Enthalpy and steam quality of steam injection along the wellbore at different
times
Figure 4-6 shows that the results by the wellbore simulator (indicated by WM) in this

study match well with CMG SAM results. Especially the Cement/Formation temperature, the

heat loss and the steam quality have a good match with CMG SAM. As friction loss is

proportional to the square of velocity and the steam velocity is high, a little difference in steam

velocity can cause large frictional loss difference and then cause slight pressure difference in this

case. Because the steam is saturated, steam temperature is decided by steam pressure and then

steam temperature has slight difference as well.

The third case is run for validation against CMG Flexwell. As the wellbore simulator in

this study does not connect to a reservoir, the comparison was only performed along the wellbore

section above the reservoir. The total length in this section is 800m.

88
Fig. 4-7: A CMG FlexWell model for validating steam injection
The wellbore parameters are listed in Table 4-3.

Table 4-3: Wellbore parameters for validation against CMG Flexwell


Item Name Value Unit Item Name Value Unit
rti inside tubing radius 0.038 m 𝐶𝑝𝑟 formation heat capacity 782 kJ/(kg.°C)
rto outside tubing radius 0.04445 m α formation thermal diffusivity 0.738E-6 m2/s

rci inside casing radius 0.081 m 𝑔𝑇 geothermal gradient 0.03513 °C/m


surface geothermal
rco outside casing radius 0.089 m 𝑇𝑠𝑢𝑟𝑓 12 °C
temperature
water density at standard
rwb cement/formation radius 0.124 m 𝜌0 998.2 kg/m3
condition
kt tubing thermal conductivity 43.2639 W/(m.°C) 𝜀 ⁄𝑑 relative roughness of tubing 0.0001
kcas casing thermal conductivity 43.2693 W/(m.°C) Z wellbore depth 800 m

Kcem cement thermal conductivity 0.35 W/(m.°C) dZ length per grid block 50 m
emissivity of outside tubing
𝜀𝑡𝑜 0.8 𝜌𝑎𝑛 density of annulus fluid 1.1216 kg/m3
surface
emissivity of inside casing
𝜀𝑐𝑖 0.8 𝜇𝑎𝑛 viscosity of annulus fluid 0.02052 cp
surface
radial thermal conductivity
ke 1.73 W/(m.°C) 𝐶𝑎𝑛 heat capacity of annulus fluid 1.9258 kJ/(kg.°C)
of formation
vertical thermal thermal conductivity of
kez 1.73 W/(m.°C) kha 0.05615 W/(m.°C)
conductivity of formation annulus fluid
𝜌𝑟 formation density 2998.9 kg/m3

The steam injection conditions at wellhead are changed at different times:

89
At beginning: steam pressure 3850 kPa, steam temperature 247.69 °C and steam quality

0.972

At 6 year: steam pressure 4079.8 kPa, steam temperature 251.1 °C and steam quality

0.972

The steam injection rate is 350 m3/d (Cold Water Equivalent). Steam pressure,

temperature and quality along the 800m wellbore are compared between this study and CMG

Flexwell at different times.

Fig. 4-8a: Comparison between this study and CMG Flexwell at 1 day

90
Fig. 4-8b: Comparison between this study and CMG Flexwell at 1 month

Fig. 4-8c: Comparison between this study and CMG Flexwell at 1 year

Fig. 4-8d: Comparison between this study and CMG Flexwell at 10 year
From the results comparison in figure 4-8, the wellbore simulation results by this study

have close results with CMG Flexwell along the well trajectory at 1 day, 1 month, 1 year and 10

year during the 10-years of simulation run. It indicates that wellbore simulation results of steam

injection by this study are reliable. Both the wellbore simulator in this study and CMG Flexwell

91
model have used the correlation-based Ramey (1962) and Willhite (1967) method to calculate

heat loss. Ramey (1962) and Willhite (1967) method are the only heat loss calculation method

available in commercial wellbore simulators.

The fourth case is run for validation against Eclipse Multi-Segment Well. Also, the

comparison was only performed along the wellbore section above the reservoir in the Eclipse

model. The total length in this section is 668m. The Eclipse model and well trajectory was

created by Petrel.

Fig. 4-9: An Eclipse multi-segment well model for validating steam injection

The wellbore parameters are listed in Table 4-4.

92
Table 4-4: Wellbore parameters for validation against Eclipse multi-segment well
Item Name Value Unit Item Name Value Unit
rti inside tubing radius 0.038 m 𝐶𝑝𝑟 formation heat capacity 782 kJ/(kg.°C)
rto outside tubing radius 0.04445 m α formation thermal diffusivity 0.738E-6 m2/s
rci inside casing radius 0.081 m 𝑔𝑇 geothermal gradient 0.03513 °C/m
rco outside casing radius 0.089 m 𝑇𝑠𝑢𝑟𝑓 surface geothermal temperature 12 °C
water density at standard
rwb cement/formation radius 0.112 m 𝜌0 998.2 kg/m3
condition
tubing thermal
kt 43.2639 W/(m.°C) 𝜀 ⁄𝑑 relative roughness of tubing 0.0001
conductivity
casing thermal
kcas 43.2693 W/(m.°C) Z wellbore depth 668 m
conductivity
cement thermal
Kcem 0.35 W/(m.°C) dZ length per grid block 35.5 m
conductivity
emissivity of outside
𝜀𝑡𝑜 0.8 𝜌𝑎𝑛 density of annulus fluid 1.1216 kg/m3
tubing surface
emissivity of inside casing
𝜀𝑐𝑖 0.8 𝜇𝑎𝑛 viscosity of annulus fluid 0.02052 cp
surface
radial thermal
ke 1.73 W/(m.°C) 𝐶𝑎𝑛 heat capacity of annulus fluid 1.9258 kJ/(kg.°C)
conductivity of formation
vertical thermal thermal conductivity of annulus
kez 1.73 W/(m.°C) kha 0.05615 W/(m.°C)
conductivity of formation fluid
𝜌𝑟 formation density 2998.9 kg/m3

The steam injection conditions at wellhead are changed at different times:

At beginning: steam pressure 4260 kPa, steam temperature 254.3 °C and steam quality

0.95

1 month: steam pressure 3948 kPa, steam temperature 249.8 °C and steam quality 0.953

1 year: steam pressure 3916 kPa, steam temperature 249.3 °C and steam quality 0.9539

10 year: steam pressure 3715 kPa, steam temperature 246.2 °C and steam quality 0.956

The steam injection rate is 266.62 m3/d (Cold Water Equivalent). Steam pressure,

temperature and quality along the 668m wellbore are compared between this study and Eclipse

Multi-Segment Well at different times.

93
Fig. 4-10a: Pressure comparison between this study and Eclipse multi-segment well

Fig. 4-10b: Temperature comparison between this study and Eclipse multi-segment well

94
Fig. 4-10c: Steam quality comparison between this study and Eclipse multi-segment well

The comparison in Figure 4-10 shows that the wellbore simulation results by this study

(labeled “WM”) have a close agreement with Eclipse Multi-Segment Well (labeled “Ecl MSW”)

at 1 day, 1 month, 1 year and 10 year through the 10-years of simulation period. The close

correspondence between this study and Eclipse Multi-Segment Well reassures the reliability of

wellbore simulation results in this study.

4.3 Application in SAGD Well

For steam injection in SAGD, estimating the steam conditions in wellbore is crucial for

well design, completion, reservoir monitoring, simulation, and management. Wellbore

simulation in SAGD well is a major concern in this study. In this case, 90 days of SAGD

circulation is simulated first. The wellbore has two concentric tubings and the steam is injected

in the inner tubing and then flows back through the outer tubing.

95
Fig. 4-11: Schematic description of SAGD circulation

There is leakage when steam contacts with reservoir in the horizontal annulus. Here this

case assumes the leakage is 10% along the total horizontal section of the well. The detailed

wellbore parameters are listed in Table 4-5.

96
Table 4-5: Wellbore parameters for SAGD circulation
Item Name Value Unit Item Name Value Unit
inside radius of inner
riti 0.038 m 𝑔𝑇 geothermal gradient 0.03513 °C/m
tubing
outside radius of inner
rito 0.04445 m 𝑇𝑠𝑢𝑟𝑓 surface geothermal temperature 12 °C
tubing
inside radius of inner
roti 0.063 m 𝜌0 water density at standard condition 998.2 kg/m3
tubing
outside radius of inner
roto 0.06985 m 𝜀 ⁄𝑑 relative roughness of tubing 0.0001
tubing
rci inside casing radius 0.11 m Lti Length of inner tubing 1,343 m

rco outside casing radius 0.122 m Lto Length of outer tubing 203 m

rwb cement/formation radius 0.17 m Z wellbore depth 1,343 m


tubing thermal
kt 43.2639 W/(m.°C) dZ length per grid block 20 m
conductivity
casing thermal
kcas 43.2693 W/(m.°C) P steam injection pressure 4,600 kPa
conductivity
cement thermal
Kcem 0.35 W/(m.°C) T steam injection temperature 258.8 °C
conductivity
emissivity of outside
𝜀𝑡𝑜 0.80 W steam injection rate 205 m3/day
tubing surface
emissivity of inside
𝜀𝑐𝑖 0.80 fst steam quality 0.98
casing surface
radial thermal
ke conductivity of 1.73 W/(m.°C) 𝜌𝑎𝑛 density of annulus fluid 800 kg/m3
formation
vertical thermal
kez conductivity of 1.73 W/(m.°C) 𝜇𝑎𝑛 viscosity of annulus fluid 0.1055 cp
formation
formation thermal
α 0.738E-6 m2/s 𝐶𝑎𝑛 heat capacity of annulus fluid 4.87 kJ/(kg.°C)
diffusivity
thermal conductivity of annulus
𝜌𝑟 formation density 2998.9 kg/m3 kha 0.58 W/(m.°C)
fluid
𝐶𝑝𝑟 formation heat capacity 782 kJ/(kg.°C)

It assumes that the steam leakage is evenly distributed along the horizontal section (300m

to 1343m). The wellbore simulator in this study provides a feature in which a leakage or

injection profile along the perforation layers can be defined. The fluid flow and properties are

simulated both in tubing and annulus. The fluid properties along the steam flow path inside

wellbore at different times are presented in following figures.

97
Fig. 4-12a: Enthalpy along the steam flow path inside wellbore at different times

Fig. 4-12b: Steam quality along the steam flow path inside wellbore at different times

98
Fig. 4-12c: Pressure along the steam flow path inside wellbore at different times

Fig. 4-12d: Temperature along the steam flow path inside wellbore at different times

99
In this case the fluid system along the steam flow path in the wellbore for SAGD

circulation is at a transient state. The heat loss is calculated by the semi-numerical method

proposed by this study. In the first month (< 30 days), the state is dramatically changed. In figure

4-12a, the enthalpy profile along the tubing, the horizontal liner annulus contacting with

reservoir and outer tubing to wellhead is displayed at 1 day, 30 days, 60 days and 90 days. In

figure 4-12b, the steam quality profile along the tubing, the horizontal liner annulus contacting

with reservoir and outer tubing to wellhead is displayed at 1 day, 30 days, 60 days and 90 days.

The steam quality is calculated from enthalpy. At time 1 day, it shows that the enthalpy and

steam quality decline sharply in the tubing and then they also decline sharply in the annulus liner

and outer tubing. The steam becomes liquid water (zero steam quality) near the wellhead in the

outer tubing. At beginning, the temperature in surrounding formation is low. Then the steam heat

loss to formation is large so that at the end of the steam flow path, the steam becomes liquid

because of much lower enthalpy. In the first month (< 30 days), the temperature at the

cement/formation boundary has a quick increase which leads steam heat loss decrease quickly

when the time is less than 30 days. Then after 30 days, the temperature at the cement/formation

boundary will steadily and slowly increase which leads to steady and slow steam heat loss

decrease in the wellbore. The temperature at the cement/formation boundary with time is shown

in figure 4-13.

100
Fig. 4-13: Temperature at the cement/formation boundary changes with time

Thus, the tendency of temperature at the cement/formation boundary changing with time

explains the enthalpy and steam quality change in inner tubing, annulus and outer tubing with

time. Figure 4-12a also presents that enthalpy and steam quality change with wellbore depth are

significantly different in inner tubing, liner annulus and outer tubing. The reason is that the heat

loss from steam in these three sections go through different wellbore components. This leads to

different heat loss rate to surrounding formation. In figure 4-12c, the pressure profile along the

tubing, the horizontal liner annulus contacting with reservoir and outer tubing to wellhead is

displayed at 1 day, 30 days, 60 days and 90 days. At beginning of the SAGD circulation, the

pressure decreases sharply in outer tubing because the steam become liquid water at that section

and has a much higher density and gravitational gradient. After 30 days, the pressure becomes

stable in the wellbore because there are no liquid water existing any more in the wellbore. The

steam density and gravitational gradient in different parts of the wellbore becomes close. In

figure 4-12d, the temperature profile along the tubing, the horizontal liner annulus contacting

101
with reservoir and outer tubing to wellhead is displayed at 1 day, 30 days, 60 days and 90 days.

As the saturated steam temperature is decided by steam pressure, the steam temperature has

similar change pattern with pressure. The big temperature drop in outer tubing at 1 day is caused

by steam becoming liquid water. As liquid water has much less specific enthalpy than the steam,

same amount of heat loss will cause much larger temperature drop in liquid water than the steam.

Fig. 4-14: Steam injection in a SGAD well with concentric dual-tubing string

Another case for normal SAGD injection (as shown in Figure 4-14) is tested by the

wellbore simulator in this study. The wellbore parameters are listed in Table 4-6.

102
Table 4-6: Wellbore parameters for SAGD injection
Item Name Value Unit Item Name Value Unit
riti inside radius of inner tubing 0.038 m 𝐶𝑝𝑟 formation heat capacity 782 kJ/(kg.°C)
rito outside radius of inner tubing 0.04445 m α formation thermal diffusivity 0.738E-6 m2/s

roti inside radius of inner tubing 0.089 m 𝑔𝑇 geothermal gradient 0.03513 °C/m
surface geothermal
roto outside radius of inner tubing 0.091 m 𝑇𝑠𝑢𝑟𝑓 12 °C
temperature
water density at standard
rci inside casing radius 0.151 m 𝜌0 998.2 kg/m3
condition
rco outside casing radius 0.161 m 𝜀 ⁄𝑑 relative roughness of tubing 0.0001

rwb cement/formation radius 0.198 m Lti Length of inner tubing 900 m

kt tubing thermal conductivity 43.2639 W/(m.°C) Lto Length of outer tubing 600 m

kcas casing thermal conductivity 43.2693 W/(m.°C) Z wellbore depth 900 m

Kcem cement thermal conductivity 0.35 W/(m.°C) dZ length per grid block 30 m
emissivity of outside tubing
𝜀𝑡𝑜 0.80 𝜌𝑎𝑛 density of annulus fluid 800 kg/m3
surface
emissivity of inside casing
𝜀𝑐𝑖 0.80 𝜇𝑎𝑛 viscosity of annulus fluid 0.1055 cp
surface
radial thermal conductivity of
ke 1.73 W/(m.°C) 𝐶𝑎𝑛 heat capacity of annulus fluid 4.87 kJ/(kg.°C)
formation
vertical thermal conductivity thermal conductivity of
kez 1.73 W/(m.°C) kha 0.58 W/(m.°C)
of formation annulus fluid
𝜌𝑟 formation density 2998.9 kg/m3

The steam injection conditions at wellhead in inner tubing and outer tubing are:

Inner tubing: steam pressure 4000 kPa, steam temperature 250.3 °C, steam quality 0.95

and injection rate 200 m3/d.

Outer tubing: steam pressure 3346.65 kPa, steam temperature 240 °C, steam quality 0.80

and injection rate 220 m3/d.

The steam quality and temperature in outer tubing are lower so it can absorb the heat loss

from steam in inner tubing. Four-years of simulation was run in this case. Also, the heat loss is

calculated by the semi-numerical method proposed by this study. The fluid properties along the

two tubings at different times are presented in following figures.

103
Fig. 4-15a: Enthalpy along the wellbore at different times

Fig. 4-15b: Steam quality along the wellbore at different times

104
Fig. 4-15c: Pressure along the wellbore at different times

Fig. 4-15d: Temperature along the wellbore at different times

105
In figure 4-15a, the enthalpy profile along the inner tubing and outer tubing is displayed

at time 1 day, 1 month, 1 year and 4 year. As temperature in inner tubing is higher than the

temperature in outer tubing, the heat loss direction is from inner tubing to outer tubing. Then in

inner tubing, the enthalpy decreases along the tubing from top to bottom. In outer tubing, the

enthalpy increases as it absorbs the heat from inner tubing. Although the steam in outer tubing

lost heat to surrounding formation, it absorbs more heat from inner tubing than it lost to

formation. In result the steam enthalpy increases in outer tubing. At beginning, the changes along

two tubings are lager because the system is at a transient state. After 1 year, the system become

more stable. In figure 4-15b, the steam quality profile along the inner tubing and outer tubing is

displayed at time 1 day, 1 month, 1 year and 4 year. Because the steam quality is calculated from

enthalpy, it has the same changing pattern with the enthalpy. In figure 4-15c, the steam pressure

profile along the inner tubing and outer tubing is displayed at time 1 day, 1 month, 1 year and 4

year. The pressure decreases in inner tubing but slightly increase in outer tubing. Because the

velocity in inner tubing is much higher than the velocity in outer tubing, it has higher frictional

loss and pressure decreases in inner tubing. In outer tubing, the frictional loss is even lower than

the gravitational gradient. Thus, pressure slightly increases in outer tubing. In figure 4-15d, the

steam temperature profile along the inner tubing and outer tubing is displayed at time 1 day, 1

month, 1 year and 4 year. As the steam is saturated in the wellbore and the saturated steam

temperature is decided by steam pressure, the steam temperature has similar change pattern with

pressure. Figure 4-15c and 4-15c also show that the steam pressure and temperature do not

change much with time.

106
4.4 Application in Multiphase Production Well

In this case a multiphase flow production well with 1000m depth is simulated. The well is

producing oil, water and gas at the same time. The wellbore parameters are listed in Table 4-7.

Table 4-7: Wellbore parameters for a production well


Item Name Value Unit Item Name Value Unit
rti inside radius of inner tubing 0.038 m 𝐶𝑝𝑟 formation heat capacity 782 kJ/(kg.°C)
formation thermal
rto outside radius of inner tubing 0.04445 m α 0.738E-6 m2/s
diffusivity
rci inside casing radius 0.081 m 𝑔𝑇 geothermal gradient 0.03513 °C/m
surface geothermal
rco outside casing radius 0.089 m 𝑇𝑠𝑢𝑟𝑓 12 °C
temperature
water density at standard
rwb cement/formation radius 0.12 m 𝜌0 998.2 kg/m3
condition
kt tubing thermal conductivity 43.2639 W/(m.°C) 𝜀 ⁄𝑑 relative roughness of tubing 0.0001

kcas casing thermal conductivity 43.2693 W/(m.°C) Z wellbore depth 1000 m

Kcem cement thermal conductivity 0.35 W/(m.°C) dZ length per grid block 20 m
emissivity of outside tubing
𝜀𝑡𝑜 0.80 𝜌𝑎𝑛 density of annulus fluid 1.1216 kg/m3
surface
emissivity of inside casing
𝜀𝑐𝑖 0.80 𝜇𝑎𝑛 viscosity of annulus fluid 0.02052 cp
surface
radial thermal conductivity of heat capacity of annulus
ke 1.73 W/(m.°C) 𝐶𝑎𝑛 1.9258 kJ/(kg.°C)
formation fluid
vertical thermal conductivity thermal conductivity of
kez 1.73 W/(m.°C) kha 0.05615 W/(m.°C)
of formation annulus fluid
𝜌𝑟 formation density 2998.9 kg/m3

The fluid conditions at well bottom are used as input: pressure 5000 kPa, temperature 80

°C. The flow rates at standard condition at different times are:

At beginning: oil rate 200 m3/d, water rate 100 m3/d, gas rate 30000 m3/d.

At 1 year: oil rate 220 m3/d, water rate 130 m3/d, gas rate 50000 m3/d.

The reference conditions are: pressure 3000 kPa, temperature 20 °C.

The oil density is calculated by:


7.296𝑒−6 2
)+1.9095𝑒−3(𝑇−𝑇0 )− (𝑇 −𝑇02 )]
𝜌 = 900𝑒 [4.57𝑒−7(𝑃−𝑃0 2 (P0 and T0 are reference

pressure and temperature)

107
Gas specific gravity is assumed as 0.66 and gas specific heat is set to be 2.0 kJ/(kg.°C).

Five-years of simulation was run in this case. The heat loss is calculated by the semi-

numerical method proposed by this study. The fluid properties along the wellbore are displayed

in following figures.

Fig. 4-16a: Pressure and temperature along the wellbore at different times

108
Fig. 4-16b: Temperature at cement/formation boundary Tcf and heat loss along the
wellbore at different times

Fig. 4-16c: Casing temperature and in-situ oil fraction along the wellbore at different times

109
Fig. 4-16d: In-situ gas fraction along the wellbore at different times

Fig. 4-16e: Flow regime along the wellbore at different times

110
In figure 4-16a, the pressure and temperature profiles along wellbore depth is displayed at

times 1 day, 1 month, 1 year and 5 year. It shows that the fluid pressure profile along the

wellbore is stable if the flow rates and fluid condition at wellbore bottom are stable. The pressure

profile change in the figure is caused by the flow rates change at 1 year as shown in the input

parameters. However, the fluid temperature profile along the wellbore will gradually increase

until it is close to the fluid temperature at the wellbore bottom. This is because the temperature

at cement/formation Tcf will gradually increase and approach the fluid temperature at the

wellbore bottom over time. Then the heat loss from fluid will gradually decrease to be very small

value. In figure 4-16b, the temperature at cement/formation boundary Tcf and heat loss profile

along wellbore depth is displayed at time 1 day, 1 month, 1 year and 5 year. It presents that the

temperature at cement/formation Tcf will gradually increase and approach to the fluid

temperature at the wellbore bottom over time and as a result the heat loss from fluid will become

smaller and smaller. In figure 4-16c, the casing temperature and in-situ oil fraction profile along

wellbore depth is displayed at time 1 day, 1 month, 1 year and 5 year. The casing temperature is

an important parameter for wellbore condition monitor and well completion design. In the figure,

it shows that casing temperature will increase gradually over time and finally it will be close to

the fluid temperature at the wellbore bottom. This gives hints that we should choose the casing

which can bear the highest temperature of fluid at wellbore bottom when we perform a wellbore

completion design at beginning. Similar with pressure, in-situ oil profile along the wellbore is

stable if the flow rates and fluid condition at wellbore bottom are stable. The in-situ oil fraction

profile change in the figure is caused by the flow rates change at 1 year as shown in the input

parameters. In figure 4-16d, the in-situ gas fraction profile along wellbore depth is displayed at

time 1 day, 1 month, 1 year and 5 year. The in-situ gas fraction is an important parameter to

111
decide the flow regime, fluid mixture density etc. Similar with pressure, in-situ gas profile along

the wellbore is stable if the flow rates and fluid condition at wellbore bottom are stable. The in-

situ gas fraction profile change in the figure is caused by the flow rates change at 1 year as

shown in the input parameters. The in-situ gas fraction will become higher and higher when

fluids flow from deep to shallow. And the in-situ oil fraction will decrease accordingly. In figure

4-16e, the flow regime profile along wellbore depth is displayed at time 1 day, 1 month, 1 year

and 5 year. It displays that flow regime is affected by in-situ gas fraction. It also is stable unless

the flow rates and fluid conditions at wellbore bottom are changed.

4.5 Application in Steam-Solvent Co-injection Well

In this case a 1003m long horizontal well with steam-solvent co-injection is tested. The

horizontal well trajectory is created by Petrel and it has one tubing (as shown in Figure 4-17).

Fig. 4-17: Steam-solvent co-injection in a horizontal well

The wellbore parameters are similar with those in other cases in this study and they are

listed in Table 4-8.

112
Table 4-8: Wellbore parameters for a steam-solvent co-injection well
Item Name Value Unit Item Name Value Unit
rti inside radius of inner tubing 0.051 m 𝐶𝑝𝑟 formation heat capacity 782 kJ/(kg.°C)
formation thermal
rto outside radius of inner tubing 0.058 m α 0.738E-6 m2/s
diffusivity
rci inside casing radius 0.122 m 𝑔𝑇 geothermal gradient 0.03513 °C/m
surface geothermal
rco outside casing radius 0.130 m 𝑇𝑠𝑢𝑟𝑓 12 °C
temperature
water density at standard
rwb cement/formation radius 0.169 m 𝜌0 998.2 kg/m3
condition
kt tubing thermal conductivity 43.2639 W/(m.°C) 𝜀 ⁄𝑑 relative roughness of tubing 0.0001

kcas casing thermal conductivity 43.2693 W/(m.°C) Z wellbore depth 1003 m

Kcem cement thermal conductivity 0.35 W/(m.°C) dZ length per grid block 20 m
emissivity of outside tubing
𝜀𝑡𝑜 0.80 𝜌𝑎𝑛 density of annulus fluid 1.1216 kg/m3
surface
emissivity of inside casing
𝜀𝑐𝑖 0.80 𝜇𝑎𝑛 viscosity of annulus fluid 0.02052 cp
surface
radial thermal conductivity of heat capacity of annulus
ke 1.73 W/(m.°C) 𝐶𝑎𝑛 1.9258 kJ/(kg.°C)
formation fluid
vertical thermal conductivity thermal conductivity of
kez 1.73 W/(m.°C) kha 0.05615 W/(m.°C)
of formation annulus fluid
𝜌𝑟 formation density 2998.9 kg/m3

Because of solvent existing in the injection fluid, a compositional thermal simulation was

performed. Three components are defined in this case: Gas, Solvent and Water. The k-value of

Gas and Solvent are calculated by equation (2-98):

𝑎 𝑑
𝐾(𝑃, 𝑇) = (𝑃 + 𝑏 ∙ 𝑃 + 𝑐) ∙ exp (𝑇−𝑒)

The parameters in this equation for Gas and Solvent components are:

a b c d e
Gas 3.19E+04 0 0 -3.31E+01 -2.77E+01
Solvent 1.98E+06 0 0 -3456.8 -194.48

Water k-value is calculated by 𝑃𝑠𝑎𝑡 (𝑇)/𝑃 .

Other parameters for Gas and Solvent components are:

113
Partial Thermal
Critical Molecular Liquid
Critical Molar Expansion
Temperature Mass Compressibility
Pressure (kPa) Density Coefficient
(C) (kg/gmol) (1/kPa)
(gmol/m3) (1/C)
Gas -82.55 4.60E+03 0.01604 3.75E+04 5.50E-07 8.00E-04
Solvent 344.45 2108 0.104 6.90E+03 5.50E-07 8.00E-04

The enthalpy is calculated by equation (2-78):


𝑇
ℎ = ∫𝑇 𝐶𝑝 (𝑇)𝑑𝑇
𝑟𝑒𝑓

For a component in gas, the heat capacity is calculated by:

𝐶𝑝 (𝑇) = 𝑐1 + 𝑐2 ∙ 𝑇 + 𝑐3 ∙ 𝑇 2 + 𝑐4 ∙ 𝑇 3 + 𝑐5 ∙ 𝑇 4

The coefficients for Gas and Solvent components are:

c1 c2 c3 c4 c5
Gas 38.40043 -0.07117 2.76E-04 -2.39E-07 6.86E-11
Solvent -26.8844 1.95336 -1.15E-03 3.02E-07 -2.09E-11
After component enthalpy in gas phase is calculated, the component enthalpy in oil phase

is calculated by:

ho(T) = hg(T) – hvap(T)

Where ho(T) is the component enthalpy in oil phase, hg(T) is the component enthalpy in

gas phase and hvap(T) is component vaporization enthalpy. hvap(T) is calculated by Watson's

correlation:

ℎ𝑣𝑎𝑝(𝑇) = 𝐻𝑉𝑅 ∗ (𝑇𝑐 − 𝑇)0.38

In this case, the coefficient HVR for Gas and Solvent components are given by:

HVR (J/(gmol∙K0.38))
Gas 1556
Solvent 14955

The global component mole fractions at the wellhead is defined as:

114
Component Gas Solvent Water
Mole Fraction 0.002 0.06 0.938

At wellhead, the total fluid flow rate is 10000 m3/d, pressure is 3800 kPa and the fluid

mixture enthalpy is 1.5×106 J/kg. Five-years of simulation was run and fluid properties along the

wellbore are displayed in following figures.

Fig. 4-18a: Pressure and temperature along the wellbore at different times

115
Fig. 4-18b: Temperature at cement/formation boundary Tcf and heat loss along the
wellbore at different times

Fig. 4-18c: Casing temperature and enthalpy along the wellbore at different times

116
Fig. 4-18d: In-situ oil fraction and in-situ gas fraction along the wellbore at different times

In figure 4-18a, the pressure and temperature profiles along wellbore depth are drawn at

time 1 day, 1 month, 1 year and 5 year. It shows that the fluid pressure and temperature profile

along the wellbore is stable as the flow rates and fluid condition at wellhead are not changed

during the whole simulation process. Because the steam and solvent mixture is in a saturated

status, its temperature is decided by the pressure. Thus, the stable pressure status leads to stable

temperature status. If the fluid mixture is undersaturated as in the previous multiphase production

well case, the temperature will not depend on pressure and is determined by enthalpy. In figure

4-18b, the temperature at cement/formation boundary Tcf and heat loss profile along wellbore

depth is displayed at time 1 day, 1 month, 1 year and 5 year. It shows that the temperature at

cement/formation Tcf will gradually increase but the speed of the increase becomes lower and

lower especially after one year. Accordingly, the heat loss from fluid gradually decrease with

time and reaches to a pseudo-stable status. In figure 4-18c, the casing temperature and fluid

117
enthalpy profile along wellbore depth is displayed at time 1 day, 1 month, 1 year and 5 year. As

casing temperature is key indicator for wellbore condition and well completion design,

understanding its variation with time is crucial for wellbore design and monitor. The results in

this figure presents that casing temperature will increase gradually over time and finally it will

close to the fluid temperature at the wellbore head. This result is similar with it in the previous

multiphase production well case. Thus, we can conclude that the casing which can bear the

highest temperature of fluid along a wellbore should be chosen in wellbore completion. Similar

with heat loss variation, fluid enthalpy profile along the wellbore changes with time and becomes

pseudo-stable finally. At beginning of injection, the enthalpy declines sharply along the

wellbore. After 1 day, the enthalpy change along the wellbore becomes smaller. In figure 4-18d,

the in-situ oil fraction and in-situ gas fraction profile along wellbore depth is shown at time 1

day, 1 month, 1 year and 5 year. The in-situ oil and gas fractions are determined by performing

an isenthalpic flash calculation. Their values are determined by fluid pressure and enthalpy.

Because the enthalpy declines sharply at the beginning, a small amount of solvent oil condensed

near the well bottom. This is a situation that we should avoid in the steam-solvent co-injection

process. A fluid with higher enthalpy at the wellhead is suggested. Then the program in this

study can be used to optimize the fluid injection conditions at well head e.g. determining the best

injection pressure and enthalpy. Similarly, the in-situ gas fraction changes with the enthalpy

variation along the wellbore. Because the pressure is stable with time, the in-situ gas fraction

changes with are mainly determined by enthalpy.

4.6 Application in Liquid CO2 Injection Well

In this case, a pure liquid carbon dioxide (CO2) is injected to a well for shale gas

formation. The well has a 4000m vertical section and this case only simulates the vertical part to

118
find the CO2 status at the well bottom. Carbon dioxide is an ideal material for shale gas fracking

and extraction. When the carbon dioxide is in supercritical status (pressure larger than 7353 kPa

and temperature higher than 30 °C), it has low viscosity, high flow ability like a gas and high

density like a liquid. The adsorption ability of carbon dioxide to shale formation is 4 to 20 times

than the gas to shale formation. Therefore, using carbon dioxide not only greatly increase the

shale gas production but also sequester the carbon dioxide into the shale formation.

Fig. 4-19: Shale gas extraction using CO2 in a well

This case shows how to choose appropriate carbon dioxide conditions at wellhead to

ensure it is in supercritical status at well bottom and has enough pressure to inject into the

formation as well. The wellbore parameters for the vertical part are similar with those in other

cases in this study and they are listed in Table 4-9.

119
Table 4-9: Wellbore parameters for a well injecting liquid CO2
Item Name Value Unit Item Name Value Unit
rti inside radius of inner tubing 0.051 m 𝐶𝑝𝑟 formation heat capacity 782 kJ/(kg.°C)
formation thermal
rto outside radius of inner tubing 0.058 m α 0.738E-6 m2/s
diffusivity
rci inside casing radius 0.096 m 𝑔𝑇 geothermal gradient 0.03513 °C/m
surface geothermal
rco outside casing radius 0.106 m 𝑇𝑠𝑢𝑟𝑓 12 °C
temperature
water density at standard
rwb cement/formation radius 0.138 m 𝜌0 998.2 kg/m3
condition
kt tubing thermal conductivity 43.2639 W/(m.°C) 𝜀 ⁄𝑑 relative roughness of tubing 0.0001

kcas casing thermal conductivity 43.2693 W/(m.°C) Z wellbore depth 4000 m

Kcem cement thermal conductivity 0.35 W/(m.°C) dZ length per grid block 20 m
emissivity of outside tubing
𝜀𝑡𝑜 0.80 𝜌𝑎𝑛 density of annulus fluid 1.1216 kg/m3
surface
emissivity of inside casing
𝜀𝑐𝑖 0.80 𝜇𝑎𝑛 viscosity of annulus fluid 0.02052 cp
surface
radial thermal conductivity of heat capacity of annulus
ke 1.73 W/(m.°C) 𝐶𝑎𝑛 1.9258 kJ/(kg.°C)
formation fluid
vertical thermal conductivity thermal conductivity of
kez 1.73 W/(m.°C) kha 0.05615 W/(m.°C)
of formation annulus fluid
𝜌𝑟 formation density 2998.9 kg/m3

Only one component is defined in this case: CO2. The k-value of CO2 is calculated by

equation (2-98):

𝑎 𝑑
𝐾(𝑃, 𝑇) = (𝑃 + 𝑏 ∙ 𝑃 + 𝑐) ∙ exp (𝑇−𝑒)

The parameters in this equation are:

a b c d e
CO2 119950 0 4.55 -236.8 -79.1

Other parameters for CO2 are:

Partial Thermal
Critical Molecular Liquid
Critical Molar Expansion
Temperature Mass Compressibility
Pressure (kPa) Density Coefficient
(C) (kg/gmol) (1/kPa)
(gmol/m3) (1/C)
CO2 30 7353 0.044 18103.6 1.0E-6 8.48E-04

120
The enthalpy is calculated by equation (2-78):
𝑇
ℎ = ∫𝑇 𝐶𝑝 (𝑇)𝑑𝑇
𝑟𝑒𝑓

For a component in gas, the heat capacity is calculated by:

𝐶𝑝 (𝑇) = 𝑐1 + 𝑐2 ∙ 𝑇 + 𝑐3 ∙ 𝑇 2 + 𝑐4 ∙ 𝑇 3 + 𝑐5 ∙ 𝑇 4

The coefficients for CO2 are:

c1 c2 c3 c4 c5
CO2 21.0855 0.06709 -4.75E-05 1.49E-08 -1.27E-12

After component enthalpy in gas phase is calculated, the component enthalpy in oil phase

is calculated by:

ho(T) = hg(T) – hvap(T)

Where ho(T) is the component enthalpy in oil phase, hg(T) is the component enthalpy in

gas phase and hvap(T) is component vaporization enthalpy. hvap(T) is calculated by Watson's

correlation:

ℎ𝑣𝑎𝑝(𝑇) = 𝐻𝑉𝑅 ∗ (𝑇𝑐 − 𝑇)0.38

In this case, the coefficient HVR for Gas and Solvent components are given by:

HVR (J/(gmol∙K0.38))
CO2 2882

The purpose in this case is to find an injection combination of carbon dioxide pressure,

enthalpy and flow rate at wellhead which can ensure the fluid at well bottom is always in

supercritical state during a five-years period. After several trials, a set of such combination is

found: pressure 8200 kPa, enthalpy -250000 J/kg (the reference temperature is 0 °C) and flow

rate is 210 m3/d. At such status, the carbon dioxide is in liquid status and its temperature is -3.07

121
°C. It needs to mention that such optimized injection condition is chosen based the wellbore

parameters listed in Table 4-9.

Five-years of simulation was run and CO2 properties along the wellbore are displayed in

following figures.

Fig. 4-20a: Pressure and temperature along the wellbore at different times

122
Fig. 4-20b: Temperature at cement/formation boundary Tcf and heat loss along the
wellbore at different times

Fig. 4-20c: Casing temperature and enthalpy along the wellbore at different times

123
Fig. 4-20d: In-situ liquid fraction and gas fraction along the wellbore at different times

In figure 4-20a, the pressure and temperature profiles of carbon dioxide along wellbore

depth are shown at time 1 day, 1 month, 1 year and 5 year. At most parts of the wellbore, the

pressure is stable at different times. But at the well bottom, the pressure becomes larger with

time. This can be explained by the temperature variation. At beginning like 1 day, the CO2

temperature increases sharply nearby the well bottom because it is in supercritical status and the

supercritical fluid temperature increase much more than common fluid when absorbing the same

amount of heat. Also, the heat transfer from formation to CO2 fluid is large due to large

temperature difference between CO2 and formation at beginning. Because CO2 temperature is

high, its density becomes lower at supercritical. Then it has a lower gravity gradient and causes

lower pressure at well bottom. The temperature figure also shows the CO2 can always keep

supercritical status during the five-years period. Thus, it shows that how an appropriate wellhead

injection condition is chosen to ensure that CO2 fluid at well bottom is always in supercritical

124
status. Is also presents that the heat from formation surrounding the wellbore can be utilized to

heat CO2 to supercritical status. In figure 4-20b, the temperature at cement/formation boundary

Tcf and heat loss profile along wellbore depth is displayed at time 1 day, 1 month, 1 year and 5

year. As the fluid CO2 absorbs heat from the surrounding formation, the temperature at

cement/formation boundary Tcf gradually decrease with time and finally reaches to a pseudo-

stable state. At 5 year, the decrease speed of Tcf becomes very slower and close to CO2 fluid

temperature. Accordingly, the heat loss from formation to CO2 fluid becomes lower with time.

The heat loss sudden change to be lower at 1 day, 1 month and 1 year is due to CO2 supercritical

status which has higher temperature and less heat capacity. In figure 4-20c, the casing

temperature and fluid enthalpy profile along wellbore depth is displayed at time 1 day, 1 month,

1 year and 5 year. In this case, the casing temperature does not change much with time except at

the well bottom. The casing is only required to endure the highest formation temperature.

However, the enthalpy gradually decreases with time especially at the well bottom. In figure 4-

20d, the in-situ liquid fraction and in-situ gas fraction profile along wellbore depth is shown at

time 1 day, 1 month, 1 year and 5 year. These two figures show that above the wellbore bottom

the CO2 is always in liquid status and at well bottom the CO2 is always in supercritical status as

desired.

4.7 Application in Geothermal Production Well

Development of geothermal energy through hot water and steam injection production is

growing rapidly around the world. A wellbore simulation for water and steam flow in a

geothermal well can optimize the production parameters and help to estimate the geothermal

reservoir conditions. Currently the geothermal reservoir and well parameters are only calculated

by some empirical models based on simplified assumptions (Shulyupin et al. 2013). Therefore,

125
application of wellbore simulation by this study to acquire geothermal well parameters is a great

improvement.

Typically, a well for geothermal production doesn’t have a tubing in wellbore as shown

in Figure 21.

Fig. 4-21: Typical geothermal production well

This case shows how to simulate the hot water and steam flow in a geothermal

production well. It assumes that there is no tubing in the wellbore. Hot water/steam mixture mass

flow rate, fluid enthalpy, fluid composition and pressure are input at the well bottom. A carbon

dioxide component is also considered in this case as it is usually present in a geothermal

production. The wellbore parameters for the vertical part are similar with those in other cases in

this study and they are listed in Table 4-10.

126
Table 4-10: Wellbore parameters for a geothermal well
Item Name Value Unit Item Name Value Unit
rti inside radius of inner tubing 0 m 𝜌𝑟 formation density 2998.9 kg/m3
rto outside radius of inner tubing 0 m 𝐶𝑝𝑟 formation heat capacity 782 kJ/(kg.°C)
formation thermal
rci inside casing radius 0.158 m α 0.738E-6 m2/s
diffusivity
rco outside casing radius 0.168 m 𝑔𝑇 geothermal gradient 0.03513 °C/m
surface geothermal
rwb cement/formation radius 0.206 m 𝑇𝑠𝑢𝑟𝑓 12 °C
temperature
water density at standard
kcas casing thermal conductivity 43.2693 W/(m.°C) 𝜌0 998.2 kg/m3
condition
Kcem cement thermal conductivity 0.35 W/(m.°C) Z wellbore depth 2000 m
radial thermal conductivity of
ke 1.73 W/(m.°C) dZ length per grid block 10 m
formation
vertical thermal conductivity
kez 1.73 W/(m.°C)
of formation
Because there is no tubing in wellbore, the heat loss calculation will only consider the

heat conduction through casing wall and cement. The overall heat transfer coefficient can be

written as:

1 𝑟𝑡𝑜 𝑙𝑛(𝑟𝑐𝑜 /𝑟𝑐𝑖 ) 𝑟𝑡𝑜 𝑙𝑛(𝑟𝑤𝑏 /𝑟𝑐𝑜 )


= +
𝑈𝑡𝑜 𝑘𝑐𝑎𝑠 𝑘𝑐𝑒𝑚

Two components are defined in this case: Water and CO2. The k-value of CO2 is

calculated by looking up a k-value table:

P(kPa)
69 2826.8 5584.6 8342.4 11100.2 13858
T(°C)
10 85.11036 2.57102 1.61998 1.34375 1.23938 1.20425
65.5 122.5926 3.70329 2.33341 1.93554 1.78519 1.7346
121 168.9026 5.10223 3.21487 2.6667 2.45956 2.38986
176.5 224.2975 6.77561 4.26925 3.54129 3.26622 3.17366
232 288.8241 8.72483 5.49744 4.56006 4.20585 4.08666
287.5 362.3516 10.94596 6.89696 5.72094 5.27656 5.12703
343 444.6077 13.43076 8.46261 7.01963 6.47437 6.29089
Other parameters for CO2 are:

127
Partial Thermal
Critical Molecular Liquid
Critical Molar Expansion
Name Temperature Mass Compressibility
Pressure (kPa) Density Coefficient
(C) (kg/gmol) (1/kPa)
(gmol/m3) (1/C)
CO2 30 7353 0.044 18103.6 1.0E-6 8.48E-04

The enthalpy is calculated by equation (2-78):


𝑇
ℎ = ∫𝑇 𝐶𝑝 (𝑇)𝑑𝑇
𝑟𝑒𝑓

For a component in gas, the heat capacity is calculated by:

𝐶𝑝 (𝑇) = 𝑐1 + 𝑐2 ∙ 𝑇 + 𝑐3 ∙ 𝑇 2 + 𝑐4 ∙ 𝑇 3 + 𝑐5 ∙ 𝑇 4

The coefficients for CO2 are:

c1 c2 c3 c4 c5
CO2 21.0855 0.06709 -4.75E-05 1.49E-08 -1.27E-12

Water and steam properties are calculated by the IAPWS Industrial Formulation (1997)

as discussed in Chapter 2.

The purpose in this case is to simulate the pressure and temperature profiles along the

geothermal wellbore and their changes with time. The wellbore parameters are chosen to

represent a common on-site geothermal wellbore. The global component mole fractions at the

well bottom is defined as:

Component CO2 Water


Mole Fraction 0.01 0.99

At well bottom, the total mass fluid flow rate is 39.2 kg/s, pressure is 18000 kPa and the

fluid mixture enthalpy is 1.221×106 J/kg. Five-years of simulation was run and fluid properties

along the wellbore are displayed in following figures.

128
Fig. 4-22a: Pressure and temperature along the wellbore at different times

Fig. 4-22b: Temperature at cement/formation boundary Tcf and heat loss along the
wellbore at different times

129
Fig. 4-22c: Casing temperature and enthalpy along the wellbore at different times

Fig. 4-22d: In-situ water fraction and gas fraction along the wellbore at different times

130
In figure 4-22a, the pressure and temperature profiles along wellbore depth are drawn at

time 1 day, 1 month, 1 year and 5 year. The fluid pressure profile along the geothermal wellbore

is stable because only hot water/steam enthalpy changes with time and it will not cause large

change in the gas and liquid water fraction changes. The little liquid and gas fraction change will

lead a stable pressure profile. However, the water/steam and CO2 mixture temperature change

with time. The temperature profile reaches to stable status after one year. In figure 4-22b, the

temperature at cement/formation boundary Tcf and heat loss profile along wellbore depth are

drawn at time 1 day, 1 month, 1 year and 5 year. The temperature at cement/formation Tcf will

gradually increase but the speed of the increase becomes lower and lower especially after one

year. Meanwhile, the heat loss from fluid gradually decrease with time and reaches to a pseudo-

stable status because cement/formation temperature gradually approach to the fluid temperature

in casing. In figure 4-22c, the casing temperature and fluid enthalpy profile along wellbore depth

are shown at time 1 day, 1 month, 1 year and 5 year. As fluid flow in the casing and there is no

tubing, the casing temperature is equal to fluid temperature. The fluid enthalpy profile along the

wellbore changes with time and becomes pseudo-stable after one year. This shows that the

geothermal production will reach to be stable after about one year from the well opening. In

figure 4-22d, the in-situ water fraction and in-situ gas fraction profile along wellbore depth is

shown at time 1 day, 1 month, 1 year and 5 year. The in-situ water and gas fractions are

determined by performing an isenthalpic flash calculation. Their values are determined by fluid

pressure and enthalpy. Because the enthalpy declines larger at the beginning, the liquid water

fraction at beginning is higher.

131
Chapter 5: Conclusions and Recommendations

The main contributions in this research include wellbore modeling of fluid flow and heat

transfer along a wellbore and a wellbore simulator development based on the wellbore modeling

equations. Also new methods for calculating heat loss to surrounding formation are proposed in

this study to improve the accuracy in thermal wellbore modeling.

5.1 Conclusions

A series of mathematical equations are built for modeling fluid and energy flow along the

wellbore, heat loss through wellbore components and heat transfer in surrounding formation. As

the modeling equation are highly non-linear and fully coupled, a fully implicit method is adapted

to solve the equations.

Traditional heat loss calculation correlation by Ramey et al. is proved to have relatively

large error in this study. Therefore, some new methods are proposed to improve the heat loss

calculation which is particularly important for a thermal wellbore modeling. Based on FLUENT

simulation results, correlations are regressed to better estimate the convection heat transfer in

annuli space with single tubing or dual-tubing. Then a semi-numerical and fully numerical

methods for calculating heat loss are adapted in this research. The semi-numerical method uses

the new correlations regressed from CFD Fluent simulation to calculate heat transfer in annulus

and estimates heat loss from the casing wall to the surrounding formation by a numerical

simulation. The fully numerical method can simulate the heat transfer in wellbore components

including annulus, casing wall, cement and surrounding formation. These two methods have

been proved to have higher accuracy for calculating heat loss in this study.

The phase velocities in wellbore flow are modeled by drift-flux model proposed by Shi et

al. (2005) which is continuous and differentiable and can be easily applied to wellbore

132
simulation. A three-phase isenthalpic flash calculation for hydrocarbon-water fluid mixture

proposed by Stone et al. (2009) is used for thermal compositional simulation. This flash

calculation has been proved to be robust and fast.

The mathematical equations are discretized by finite-volume method and the Newton

iteration method is used to solve the equations. The open source code libraries IML++ and

SparseLib++ are used as the linear solver and the wellbore simulator program is developed in

C++ language.

A standalone thermal compositional wellbore simulator is developed for modelling

multiphase flow and temperature distribution along wellbore. This wellbore simulator can run

standalone without a reservoir simulator. It can simulate a regular single or multiple phase well

injection/production, thermal recovery process which includes steam injection, NCG injection,

SAGD injection/production, steam solvent co-injection and other unconventional development

applications like liquid CO2 injection and geothermal well production.

A 1D staggered grid system is used for fluid and energy flow along the wellbore, 2D

point grid system is used for simulating annulus heat transfer and 2D radial grid system is

generated for simulating heat transfer in surrounding formation.

At a timestep of wellbore simulation, first an annulus heat transfer simulation is

performed (or direct calculation by correlations) and then heat transfer in surrounding formation

is simulated or calculated by correlation based on result parameters from previous timestep.

After the heat loss calculation is converged, a simulation for fluid and energy flow along the

wellbore is conducted then.

Four heat loss calculation methods are implemented in this wellbore simulator: traditional

correlation-based Ramey and Willhite method, new correlations regressed in this study based on

133
CFD Fluent simulation which can handle dual-tubing wellbore, semi-numerical method

consisting of heat loss through wellbore components calculated by correlations and heat loss in

surrounding formation numerically simulated and fully numerical method which perform

simulation for heat transfer both in wellbore components and surrounding formation.

For single and multiple phase well injection/production, steam injection and SAGD

injection/production, the fluid properties are calculated by black oil approximation and steam

properties are calculated by IAPWS Industrial Formulation (1997). However, for steam solvent

co-injection, NCG injection, CO2 injection and geothermal well production, the fluid properties

are calculated by performing three-phase isenthalpic flash calculation.

The wellbore simulator can handle different wellbore types including vertical well,

deviated well and horizontal wells and complex configurations such as dual-tubing string which

include eccentric and concentric tubings.

A Windows-based interface is developed for preparing data and results visualization.

Using this application, it can create, save and open projects just like any other standard Windows

software.

Through a series of validation works against CMG SAM, CMG Flexwell and Eclipse

Multi-Segment Well, the results in this study can show a good agreement with results from those

commercial simulators. Also test works are run in cases of SAGD circulation/injection,

multiphase production, steam-solvent co-injection, liquid CO2 injection and geothermal well

production.

The originality of this research work includes: (1) The wellbore simulator is designed to

be run standalone and it means that it can run the wellbore simulation without a reservoir model

which is not necessary for some well design and evaluation. Generally existing wellbore

134
simulators are coupled with reservoir simulator; (2) First time to combine fluid flow simulation

insider tubing, heat transfer simulation in annulus and heat transfer simulation in surrounding

formation together; (3) Research heat transfer in annulus with dual-tubing strings; (4) Use fully

implicit method to simulate the heat transfer from casing wall to the surrounding formation and

improvement in annulus heat transfer calculation by introducing FLUENT simulation.

5.2 Recommendations and Future Works

With more and more features added into the wellbore simulator, it is inevitable that some

errors existing in the program. Therefore, more testing works especially for filed-scale data are

needed to improve the program stability. Also, it is worth to improve existing functions to

handle more complex wellbore configurations and add more features for field-scale applications.

Currently the wellbore simulator runs standalone without a reservoir simulator. The

interaction between reservoir and wellbore is assumed evenly distributed or can be inputted as a

static profile along the perforation section. But for wellbores like a horizontal well, the

interaction between reservoir and wellbore is not evenly distributed and may largely change

along the horizontal section and with time. Without a reservoir simulator, the simulation results

in the perforation section may not have the accuracy as expected. Then a thermal reservoir

simulator can be developed to couple with the wellbore simulator to better simulate the

interaction with reservoir. The reservoir simulator is not necessary to be as sophisticated as a

commercial reservoir simulator as long as it can approximately reflects the transient changes in

reservoir formation nearby the wellbore. With a reservoir simulator coupling with the wellbore

simulator, it can extend to simulate more complex problems including Flow Control Device

(FCD), hot dry rock exploitation etc. in addition to improving simulation accuracy along the

perforation section of a wellbore.

135
With more sophisticated wells like horizontal wells, multilateral wells, wells with

multiple tubings or strings etc. applied in petroleum industry, wellbore simulation should

consider these complex factors accordingly. It should include more wellbore components such as

Flow Control Device (FCD), pump, packer etc. for future wellbore simulator development.

Wellbores with multiple-tubing strings are common in current thermal injection wells. Although

the wellbore simulator can handle dual-tubing strings, the functions are still ideal based on many

assumptions compared with the real situation. The interaction between the multiple tubings and

the heat transfer in such annuli space are complex. Future work on wellbore simulator can

consider more mechanisms in wellbore with multiple-tubing strings.

The correlation regressed in this study are based on 2D Fluent simulations which only

consider variation along the radial direction. But the wellbore length may have a non-negligible

effect on the heat transfer in annulus. A full 3D Fluent model can account for this effect and thus

is recommended in future wellbore modeling research work.

The annuls heat transfer simulator used in this study for a full numerical heat loss

calculation is based on a 2D point grid system. It only considers parameters effect along the

radial direction. But the wellbore length is usually long and the fluid movement along it may

have significant effect on heat transfer in annuli space. Thus a full 3D annuls heat transfer

simulator is recommended to be developed in future studies.

136
APPENDIX A: FLUENT SIMULATION AND CORRELATION RESULTS

Table A-1: FLUENT and correlation results at rto=3 ½” and rci=7”


Rayleigh Heat Flux Rate (W/m)
Ti(K) To(K)
Number Raithby &Hollands Willhite Churchill FLUENT
310 290 7.04550E+05 21.12 11.76 18.1 22.86
360 290 1.60300E+06 96.7 58.42 84.02 106.02
410 290 1.80620E+06 183.7 112.5 160.07 202.5
460 290 1.77750E+06 277.6 169.77 241.83 306.02
510 290 1.63230E+06 376.2 228.25 327.32 414.46
560 290 1.45380E+06 477.5 286.29 414.5 525.18
610 290 1.28680E+06 581.66 344.77 504.19 639.16
410 340 8.39620E+05 93.52 52.97 80.34 101.74
510 340 1.02980E+06 271.43 157.26 234.33 297
610 340 9.13730E+05 468.3 267.99 403.23 511.6
460 390 4.81536E+05 91.52 49.03 77.84 98.84
560 390 6.40861E+05 266.11 147 227.83 289.32
510 440 2.94981E+05 89.76 45.7 75.56 95.9
560 440 3.80903E+05 172.16 90.05 145.72 185.18
610 440 4.19850E+05 261.7 138.42 222.16 282.42
510 490 7.07040E+04 19.28 8.39 15.63 19.04
560 490 1.90191E+05 88.36 42.97 73.67 93.1
610 490 2.55894E+05 169.63 85.11 142.35 180.66
610 550 1.07469E+05 72.09 32.93 59.2 73.6

Table A-2: Nusselt numbers by FLUENT and correlations at rto=3 ½” and rci=7”
Ra FLUENT Willhite Raithby & Hollands Churchill This Study
7.0704E+04 7.445 3.281 7.539 6.112 7.750
1.0747E+05 8.433 3.773 8.260 6.783 8.594
1.9019E+05 9.891 4.565 9.388 7.827 9.895
2.5589E+05 10.697 5.039 10.044 8.428 10.647
2.9498E+05 11.096 5.288 10.386 8.743 11.027
3.8090E+05 11.836 5.756 11.004 9.314 11.746
4.1985E+05 12.129 5.944 11.239 9.541 12.031
4.8154E+05 12.555 6.228 11.625 9.887 12.446
6.4086E+05 13.476 6.847 12.395 10.612 13.356
7.0455E+05 13.781 7.090 12.732 10.912 13.672
8.3962E+05 14.412 7.504 13.248 11.381 14.277
9.1373E+05 14.711 7.706 13.466 11.595 14.578
1.0298E+06 15.153 8.023 13.848 11.955 15.015
1.2868E+06 16.015 8.639 14.574 12.633 15.864
1.4538E+06 16.511 9.000 15.012 13.031 16.349
1.6030E+06 16.916 9.321 15.429 13.406 16.749
1.6323E+06 16.988 9.355 15.420 13.416 16.824
1.7775E+06 17.363 9.633 15.751 13.721 17.181
1.8062E+06 17.440 9.689 15.821 13.786 17.250

137
Table A-3: FLUENT and correlation results at rto=3 ½” and rci=11 ¾”
Heat Flux Rate (W/m)
Ti(K) To(K) Ra
Raithby & Hollands Willhite Churchill FLUENT
310 290 1.67518E+07 44.97 16.76 54.69 25.3
360 290 3.82288E+07 207.25 83.39 253.83 119.16
410 290 4.40171E+07 394.50 160.88 483.77 226.52
460 290 4.30896E+07 593.90 241.86 728.31 340.7
510 290 3.95945E+07 801.14 323.90 981.99 465.12
560 290 3.54023E+07 1014.59 406.16 1242.70 589.24
610 290 3.13025E+07 1233.70 488.46 1509.73 717.96
410 340 2.04045E+07 199.02 75.69 242.61 115.7
510 340 2.51237E+07 574.97 223.06 702.30 336.12
610 340 2.23060E+07 990.81 380.35 1209.18 580.4
460 390 1.17031E+07 192.52 69.59 233.52 112.78
560 390 1.56121E+07 560.82 208.31 682.25 328.94
510 440 7.16796E+06 187.64 64.80 226.46 109.72
560 440 9.33283E+06 361.31 127.93 437.34 211.28
610 440 1.02271E+07 550.33 196.55 666.77 321.62
510 490 1.72615E+06 39.54 11.90 46.84 22.76
560 490 4.64236E+06 184.08 61.01 221.05 106.38
610 490 6.21302E+06 355.25 121.06 428.10 205.94
610 550 2.60879E+06 149.67 46.93 178.38 86.46

Table A-4: Nusselt numbers by FLUENT and correlations at rto=3 ½” and rci=11 ¾”
Ra FLUENT Willhite Raithby & Hollands Churchill This Study
1.72615E+06 8.982 4.698 15.605 18.486 8.668
2.60879E+06 9.932 5.391 17.194 20.493 9.598
4.64236E+06 11.391 6.533 19.710 23.669 11.066
6.21302E+06 12.246 7.199 21.125 25.457 11.892
7.16796E+06 12.787 7.552 21.868 26.393 12.319
9.33283E+06 13.617 8.245 23.287 28.186 13.148
1.02271E+07 13.909 8.500 23.800 28.835 13.449
1.17031E+07 14.419 8.897 24.613 29.855 13.904
1.56121E+07 15.457 9.789 26.354 32.060 14.930
1.67518E+07 15.179 10.058 26.982 32.813 15.192
2.04045E+07 16.381 10.717 28.178 34.349 15.950
2.23060E+07 16.823 11.024 28.719 35.048 16.304
2.51237E+07 17.292 11.475 29.580 36.131 16.790
3.13025E+07 18.143 12.344 31.176 38.152 17.727
3.54023E+07 18.662 12.864 32.134 39.358 18.274
3.82288E+07 18.902 13.228 32.876 40.264 18.624
3.95945E+07 19.181 13.357 33.038 40.496 18.786
4.30896E+07 19.363 13.746 33.753 41.393 19.183
4.40171E+07 19.505 13.853 33.968 41.655 19.284

138
Table A-5: FLUENT and correlation results at rto=4 ½” and rci=9 ⅝”
Heat Flux Rate (W/m)
Ti(K) To(K) Ra
Raithby and Hollands Willhite Churchill FLUENT
310 290 3.91226E+06 31.76 16.50 30.28 29.06
360 290 8.92804E+06 145.95 82.08 140.53 132.88
410 290 1.02799E+07 277.70 158.35 267.83 253.42
460 290 1.00632E+07 418.10 238.06 403.22 385.34
510 290 9.24699E+06 564.14 318.80 543.66 517.82
560 290 8.26792E+06 714.70 399.77 688.00 654.62
610 290 7.31045E+06 869.39 480.78 835.84 796.06
410 340 4.76532E+06 140.45 74.50 134.32 127
510 340 5.86745E+06 405.47 219.55 388.82 368.54
610 340 5.20939E+06 699.01 374.37 669.45 637.7
460 390 2.73318E+06 136.14 68.49 129.29 123.18
560 390 3.64609E+06 396.16 205.03 377.72 360.06
510 440 1.67402E+06 132.96 63.78 125.38 119.78
560 440 2.17961E+06 255.75 125.92 242.13 230.9
610 440 2.38847E+06 389.39 193.46 369.15 352.16
510 490 4.03130E+05 28.22 11.72 25.93 25.02
560 490 1.08419E+06 130.70 60.05 122.38 117.04
610 490 1.45100E+06 251.90 119.16 237.01 226.16
610 550 6.09262E+05 106.58 46.19 98.76 94.74

Table A-6: Nusselt numbers by FLUENT and correlations at rto=4 ½” and rci=9 ⅝”
Ra FLUENT Willhite Raithby & Hollands Churchill This Study
4.03130E+05 9.874 4.624 11.138 10.234 9.982
6.09262E+05 10.884 5.306 12.244 11.345 11.053
1.08419E+06 12.532 6.430 13.995 13.104 12.743
1.45100E+06 13.449 7.086 14.979 14.094 13.694
1.67402E+06 13.960 7.433 15.496 14.612 14.186
2.17961E+06 14.882 8.116 16.483 15.605 15.141
2.38847E+06 15.230 8.366 16.840 15.964 15.487
2.73318E+06 15.748 8.757 17.405 16.529 16.011
3.64609E+06 16.920 9.635 18.616 17.749 17.192
3.91226E+06 17.435 9.900 19.053 18.166 17.494
4.76532E+06 17.981 10.548 19.885 19.017 18.367
5.20939E+06 18.484 10.851 20.261 19.404 18.776
5.86745E+06 18.960 11.295 20.860 20.003 19.335
7.31045E+06 20.117 12.150 21.970 21.122 20.414
8.26792E+06 20.733 12.661 22.636 21.790 21.044
8.92804E+06 21.078 13.020 23.152 22.292 21.447
9.24699E+06 21.355 13.147 23.265 22.420 21.634
1.00632E+07 21.900 13.530 23.762 22.917 22.090
1.02799E+07 21.821 13.635 23.911 23.062 22.207

139
Table A-7: FLUENT and correlation results at rto=4 ½” and rci=11 ¾”
Heat Flux Rate (W/m)
Ti(K) To(K) Ra
Raithby and Hollands Willhite Churchill FLUENT
310 290 1.14587E+07 41.05 18.57 43.92 29.56
360 290 2.61496E+07 189.04 92.36 203.85 138.58
410 290 3.01090E+07 359.80 178.19 388.51 265.38
460 290 2.94745E+07 541.67 267.88 584.90 400.5
510 290 2.70838E+07 730.73 358.73 788.63 541.1
560 290 2.42161E+07 925.50 449.85 998.01 685.82
610 290 2.14118E+07 1125.47 541.00 1212.46 832.7
410 340 1.39573E+07 181.62 83.83 194.84 132.82
510 340 1.71853E+07 524.62 247.05 564.02 386.46
610 340 1.52579E+07 904.12 421.26 971.09 669.72
460 390 8.00528E+06 175.77 77.07 187.54 128.82
560 390 1.06791E+07 511.90 230.71 547.91 377.84
510 440 4.90309E+06 171.40 71.77 181.87 125.3
560 440 6.38392E+06 329.95 141.69 351.22 242.12
610 440 6.99565E+06 502.52 217.69 535.48 369.64
510 490 1.18074E+06 36.18 13.18 37.62 26.34
560 490 3.17550E+06 168.22 67.57 177.53 122.68
610 490 4.24988E+06 324.55 134.08 343.80 237.66
610 550 1.78449E+06 136.87 51.97 143.26 99.62

Table A-8: Nusselt numbers by FLUENT and correlations at rto=4 ½” and rci=11 ¾”
Ra FLUENT Willhite Raithby & Hollands Churchill This Study
1.18074E+06 10.395 5.203 14.278 14.846 10.372
1.78449E+06 11.444 5.971 15.724 16.458 11.485
3.17550E+06 13.136 7.235 18.012 19.009 13.241
4.24988E+06 14.133 7.973 19.299 20.444 14.229
4.90309E+06 14.603 8.364 19.975 21.196 14.740
6.38392E+06 15.605 9.132 21.266 22.636 15.733
6.99565E+06 15.986 9.414 21.732 23.158 16.093
8.00528E+06 16.470 9.854 22.472 23.977 16.637
1.06791E+07 17.755 10.841 24.055 25.747 17.864
1.14587E+07 17.735 11.140 24.626 26.352 18.178
1.39573E+07 18.805 11.869 25.715 27.586 19.085
1.52579E+07 19.412 12.210 26.206 28.147 19.509
1.71853E+07 19.882 12.710 26.989 29.016 20.091
2.14118E+07 21.043 13.671 28.441 30.639 21.212
2.42161E+07 21.721 14.247 29.312 31.608 21.866
2.61496E+07 21.982 14.651 29.987 32.336 22.285
2.70838E+07 22.315 14.794 30.135 32.522 22.479
2.94745E+07 22.762 15.224 30.785 33.242 22.953
3.01090E+07 22.851 15.343 30.980 33.453 23.074

140
Table A-9: FLUENT and correlation results at rto=5 ½” and rci=9 ⅝”
Heat Flux Rate (W/m)
Ti(K) To(K) Ra
Raithby and Hollands Willhite Churchill FLUENT
310 290 2.00308E+06 27.11 18.08 23.11 31.84
360 290 4.57116E+06 124.40 89.95 107.27 148.46
410 290 5.26329E+06 236.64 173.53 204.44 283.52
460 290 5.15238E+06 356.30 260.88 307.79 426.54
510 290 4.73446E+06 480.83 349.36 414.99 575.9
560 290 4.23317E+06 609.28 438.10 525.17 728.92
610 290 3.74295E+06 741.32 526.87 638.01 885.52
410 340 2.43984E+06 119.85 81.64 102.53 141.92
510 340 3.00413E+06 345.88 240.60 296.79 411.52
610 340 2.66721E+06 596.42 410.25 511.00 708.78
460 390 1.39939E+06 116.32 75.06 98.69 136.76
560 390 1.86680E+06 338.27 224.69 288.32 399.84
510 440 8.57099E+05 113.74 69.90 95.70 132.76
560 440 1.11596E+06 218.62 137.99 184.82 256.4
610 440 1.22289E+06 332.80 212.00 281.78 390.92
510 490 2.06402E+05 24.24 12.84 19.80 27.24
560 490 5.55103E+05 111.93 65.81 93.42 129.64
610 490 7.42913E+05 215.55 130.58 180.91 251.06
610 550 3.11942E+05 91.42 50.61 75.39 104.38

Table A-10: Nusselt numbers by FLUENT and correlations at rto=5 ½” and rci=9 ⅝”
Ra FLUENT Willhite Raithby & Hollands Churchill This Study
2.06402E+05 10.750 5.067 9.566 7.812 10.603
3.11942E+05 11.991 5.815 10.502 8.660 11.742
5.55103E+05 13.881 7.046 11.984 10.003 13.537
7.42913E+05 14.929 7.765 12.818 10.758 14.547
8.57099E+05 15.472 8.146 13.255 11.154 15.070
1.11596E+06 16.525 8.894 14.090 11.912 16.084
1.22289E+06 16.906 9.168 14.393 12.186 16.452
1.39939E+06 17.485 9.596 14.871 12.617 17.009
1.86680E+06 18.789 10.558 15.896 13.548 18.263
2.00308E+06 19.102 10.849 16.265 13.867 18.584
2.43984E+06 20.094 11.559 16.969 14.516 19.511
2.66721E+06 20.544 11.891 17.287 14.811 19.945
3.00413E+06 21.171 12.378 17.794 15.269 20.540
3.74295E+06 22.378 13.314 18.733 16.123 21.686
4.23317E+06 23.086 13.875 19.297 16.633 22.355
4.57116E+06 23.549 14.268 19.733 17.016 22.783
4.73446E+06 23.750 14.407 19.829 17.114 22.981
5.15238E+06 24.242 14.827 20.250 17.493 23.466
5.26329E+06 24.413 14.942 20.376 17.603 23.590

141
Table A-11: Data used for regressing a new correlation
Ra δ (rto/rci) Nusselt Number Ra δ (rto/rci) Nusselt Number
7.07040E+04 0.55 7.445 4.76532E+06 0.47 17.981
1.07469E+05 0.55 8.433 5.20939E+06 0.47 18.484
1.90191E+05 0.55 9.891 5.86745E+06 0.47 18.960
2.55894E+05 0.55 10.697 7.31045E+06 0.47 20.117
2.94981E+05 0.55 11.096 8.26792E+06 0.47 20.733
3.80903E+05 0.55 11.836 8.92804E+06 0.47 21.078
4.19850E+05 0.55 12.129 9.24699E+06 0.47 21.355
4.81536E+05 0.55 12.555 1.00632E+07 0.47 21.900
6.40861E+05 0.55 13.476 1.02799E+07 0.47 21.821
7.04550E+05 0.55 13.781 1.18074E+06 0.38 10.395
8.39620E+05 0.55 14.412 1.78449E+06 0.38 11.444
9.13730E+05 0.55 14.711 3.17550E+06 0.38 13.136
1.02980E+06 0.55 15.153 4.24988E+06 0.38 14.133
1.28680E+06 0.55 16.015 4.90309E+06 0.38 14.603
1.45380E+06 0.55 16.511 6.38392E+06 0.38 15.605
1.60300E+06 0.55 16.916 6.99565E+06 0.38 15.986
1.63230E+06 0.55 16.988 8.00528E+06 0.38 16.470
1.77750E+06 0.55 17.363 1.06791E+07 0.38 17.755
1.80620E+06 0.55 17.440 1.14587E+07 0.38 17.735
1.72615E+06 0.30 8.982 1.39573E+07 0.38 18.805
2.60879E+06 0.30 9.932 1.52579E+07 0.38 19.412
4.64236E+06 0.30 11.391 1.71853E+07 0.38 19.882
6.21302E+06 0.30 12.246 2.14118E+07 0.38 21.043
7.16796E+06 0.30 12.787 2.42161E+07 0.38 21.721
9.33283E+06 0.30 13.617 2.61496E+07 0.38 21.982
1.02271E+07 0.30 13.909 2.70838E+07 0.38 22.315
1.17031E+07 0.30 14.419 2.94745E+07 0.38 22.762
1.56121E+07 0.30 15.457 3.01090E+07 0.38 22.851
1.67518E+07 0.30 15.179 2.06402E+05 0.58 10.750
2.04045E+07 0.30 16.381 3.11942E+05 0.58 11.991
2.23060E+07 0.30 16.823 5.55103E+05 0.58 13.881
2.51237E+07 0.30 17.292 7.42913E+05 0.58 14.929
3.13025E+07 0.30 18.143 8.57099E+05 0.58 15.472
3.54023E+07 0.30 18.662 1.11596E+06 0.58 16.525
3.82288E+07 0.30 18.902 1.22289E+06 0.58 16.906
3.95945E+07 0.30 19.181 1.39939E+06 0.58 17.485
4.30896E+07 0.30 19.363 1.86680E+06 0.58 18.789
4.40171E+07 0.30 19.505 2.00308E+06 0.58 19.102
4.03130E+05 0.47 9.874 2.43984E+06 0.58 20.094
6.09262E+05 0.47 10.884 2.66721E+06 0.58 20.544
1.08419E+06 0.47 12.532 3.00413E+06 0.58 21.171
1.45100E+06 0.47 13.449 3.74295E+06 0.58 22.378
1.67402E+06 0.47 13.960 4.23317E+06 0.58 23.086
2.17961E+06 0.47 14.882 4.57116E+06 0.58 23.549
2.38847E+06 0.47 15.230 4.73446E+06 0.58 23.750
2.73318E+06 0.47 15.748 5.15238E+06 0.58 24.242
3.64609E+06 0.47 16.920 5.26329E+06 0.58 24.413
3.91226E+06 0.47 17.435

142
Table A-12: FLUENT simulation results for double-tubing annulus
Heat Flux Rate (W/m)
Ti(K) To(K) Ra in tubing 1 Ra in tubing 2
tubing 1 tubing 2
310 290 1.67518E+07 1.14587E+07 16.98 20.36
360 290 3.82288E+07 2.61496E+07 94.2 105.94
410 290 4.40171E+07 3.01090E+07 157 190.2
460 290 4.30896E+07 2.94745E+07 234.78 282.72
510 290 3.95945E+07 2.70838E+07 340.6 358.2
560 290 3.54023E+07 2.42161E+07 442.8 450.4
610 290 3.13025E+07 2.14118E+07 506.2 576.2
410 340 2.04045E+07 1.39573E+07 77.4 91.4
510 340 2.51237E+07 1.71853E+07 236.74 271.8
610 340 2.23060E+07 1.52579E+07 392.2 464.8
460 390 1.17031E+07 8.00528E+06 75.16 89
560 390 1.56121E+07 1.06791E+07 222.4 247.2
510 440 7.16796E+06 4.90309E+06 71.76 84.2
560 440 9.33283E+06 6.38392E+06 142.2 157.74
610 440 1.02271E+07 6.99565E+06 218.2 238.92
510 490 1.72615E+06 1.18074E+06 13.7 20.66
560 490 4.64236E+06 3.17550E+06 62.18 94.86
610 490 6.21302E+06 4.24988E+06 144.54 149.34
610 550 2.60879E+06 1.78449E+06 50.34 78.16

143
Table A-13: Nusselt numbers by FLUENT for double-tubing annulus
3 1/2" Tubing 3 1/2" Tubing 4 1/2" Tubing 4 1/2" Tubing
Ra in tubing 1 in Single- in Double- Ra in tubing 2 in Single- in Double-
Tubing Model Tubing Model Tubing Model Tubing Model
1.72615E+06 8.9821 5.407 1.18074E+06 10.3949 8.153
2.60879E+06 9.9324 5.783 1.78449E+06 11.4442 8.979
4.64236E+06 11.3907 6.658 3.17550E+06 13.1360 10.157
6.21302E+06 12.2463 8.595 4.24988E+06 14.1325 8.881
7.16796E+06 12.7872 8.363 4.90309E+06 14.6029 9.813
9.33283E+06 13.6171 9.165 6.38392E+06 15.6047 10.166
1.02271E+07 13.9090 9.436 6.99565E+06 15.9857 10.332
1.17031E+07 14.4188 9.609 8.00528E+06 16.4695 11.379
1.56121E+07 15.4573 10.451 1.06791E+07 17.7552 11.616
1.67518E+07 15.1788 10.187 1.14587E+07 17.7346 12.215
2.04045E+07 16.3812 10.959 1.39573E+07 18.8051 12.941
2.23060E+07 16.8228 11.368 1.52579E+07 19.4117 13.472
2.51237E+07 17.2920 12.179 1.71853E+07 19.8818 13.983
3.13025E+07 18.1432 12.792 2.14118E+07 21.0427 14.561
3.54023E+07 18.6620 14.024 2.42161E+07 21.7208 14.265
3.82288E+07 18.9016 14.942 2.61496E+07 21.9821 16.805
3.95945E+07 19.1812 14.046 2.70838E+07 22.3146 14.772
4.30896E+07 19.3633 13.343 2.94745E+07 22.7619 16.068
4.40171E+07 19.5046 13.519 3.01090E+07 22.8506 16.377

144
APPENDIX B: KEYWORDS FOR WELLBORE SIMULATION INPUT DATA

WELL_TYPE

well_type

Define well type for wellbore simulation.

well_type can be INJECTOR, and PRODUCER.

INJECTOR: the simulation is for an injector.

PRODUCER: the simulation is for a producer.

WELL_DEPTH

depth

Define well depth for a vertical well.

When there is no keyword WELLPATH which implies a non-vertical well, this keyword is
required.

WELLPATH

INCLUDE well_path_file

Define a non-vertical well and include a well path file.

well_path_file is the well data file name and its directory.

The well path data file is a text file and has the following format:

MAINWELL "PROD1" 499500 6240290


-200 -200 -1.33877620100E-09 1.86264514923096E-09

-189.397568290927 -189.399788451266 -0.187817027093843 9.31322574615479E-09

-178.795136581854 -178.812894517338 -0.751032138825394 3.25962901115417E-08

-168.192704872782 -168.252619081387 -1.68893773993477 7.07805156707764E-08

… … … …

145
/

END_WELLPATH

The first row begin with MAINWELL which followed by well name on the second column with
quotations. The third and fourth columns are X and Y coordinate of the well.

The second and rest of the rows are MD, TVD, DX and DY until the row with only “/”.

The last row is a keyword END_WELLPATH. All data units in this keyword are meter.

RELATIVE_ROUGH

fr

Define relative roughness of tubing wall for calculating frictional loss.

fr is the relative roughness.

fric_method

fric_method defines calculation method for friction factor. It can be one of three keywords:

CHEN1979, COLEBROOK1, COLEBROOK2.

CHEN1979: use chen’s (1979) correlation to calculate friction factor.

COLEBROOK1: use Colebrook equation to calculate friction factor.

COLEBROOK2: use another Colebrook equation to calculate friction factor.

SEGMENT_N

grid_num

Define the total grid number along the wellbore.

fr is the relative roughness.

146
START_POINT

n_point

Define the wellbore simulation start point at which the well conditions such flow rate, pressure
are defined.

n_point is the start point 0 or 1. 0 means the simulation starts from well head and 1 means the
simulation starts from well bottom.

WELL_CAL_UNITS num_units

ntub rti rto insul rins tlen (rti1 rto1 insul1 rins1 tlen1 ) iscon rci rco rwb md ilateral

example:

WELL_CAL_UNITS 1
1 0.038 0.04445 0 0 500 0 0.081 0.089 0.12 500 0
Define wellbore simulation units that include tubing, casing and wellbore parameters.

num_units is the number of total simulation units.

ntub is the tubing number in current simulation unit. It can be 1 or 2.

rti is the inside radius of first tubing, m.

rto is the outside radius of first tubing, m.

insul is if the first tubing is insulated (0 or 1). 0 means the tubing is not insulated and 1 means the
tubing is insulated.

rins is the first tubing insulation radius (rins>rto), m. When insul is 1, this radius must be
defined.

tlen is the length of second tubing, m.

rti1 is the inside radius of second tubing, m.

rto1 is the outside radius of second tubing, m.

147
insul1 is if the second tubing is insulated (0 or 1). 0 means the tubing is not insulated and 1
means the tubing is insulated.

rins1 is the second tubing insulation radius (rins1>rto1), m. When insul1 is 1, this radius must be
defined.

tlen1 is the length of first tubing, m.

iscon is if the two tubings are concentric (0 or 1). 0 means the two tubings are not concentric and
1 means the two tubings are concentric.

rci is the inside radius of casing, m.

rco is the outside radius of casing, m.

rwb is the wellbore radius at cement-formation boundary, m.

md is the wellbore measured depth, m.

ilateral is the current branch number in a multi-lateral wellbore. 0 means the main branch.

THERMAL_CONDUCT

th_tub th_cas th_cement th_r th_v

example:

THERMAL_CONDUCT
43.2639 43.2639 0.35 1.73 1.73
Define thermal conductivities of tubing, casing, cementing, radial formation and vertical
formation.

th_tub is the thermal conductivity of tubing, W/(m C).

th_cas is the thermal conductivity of casing, W/(m C).

th_cement is the thermal conductivity of cement, W/(m C).

th_r is the thermal conductivity of formation in radial direction, W/(m C).

th_v is the thermal conductivity of formation in radial direction, W/(m C).

148
INSULATION_K

th_insulation

example:

INSULATION_K

0.09

Define thermal conductivity of tubing insulation.

th_insulation is the thermal conductivity of tubing insulation, W/(m C).

EMISSIVITY

e_tub e_cas

example:

EMISSIVITY
0.8 0.8
Define emissivity of the external tubing surface and internal casing surface.

e_tub is emissivity of the external tubing surface.

e_cas is emissivity of the internal casing surface.

ANNULUS_PROPERTY

den vis Cp thc

example:

ANNULUS_PROPERTY
0.6216 0.02852 1.0258 0.044115
Define properties of annulus gas or liquid: density, viscosity, heat capacity, thermal conductivity.

den is density of annulus gas or liquid, kg/m3.

vis is viscosity of annulus gas or liquid, cp.

Cp is heat capacity of annulus gas or liquid, kJ/(kg.C).

149
thc is thermal conductivity of annulus gas or liquid, W/(m C).

SURFACE_T

t_surf

example:

SURFACE_T
12
Define the surface geothermal temperature, °C.

t_surf is the surface geothermal temperature, °C.

GEOT_GRADIENT

t_gradient

example:

GEOT_GRADIENT
0.03513
Define the geothermal gradient in surrounding formation, C/m.

t_gradient is the geothermal gradient in surrounding formation, C/m.

FORMATION_PROPERTY

den Cp th_r th_v

example:

FORMATION_PROPERTY
2998.9 782 1.73 1.73
Define formation density, formation heat capacity, formation thermal conductivity in radial and
vertical direction.

den is the density of the surrounding formation, kg/m3.

Cp is the heat capacity of the surrounding formation, kJ/(kg.C).

150
th_r is the formation thermal conductivity in radial direction, W/(m C).

th_v is the formation thermal conductivity in vertical direction, W/(m C).

DTWELL

dt_well

example:

DTWELL
0.01
Define first time step after well conditions change, day.

dt_well is the first time step after well conditions change, day.

DTMAX

dt_max

example:

DTMAX
5.0
Define maximum time step allowed during the whole simulation, day.

dt_max is the maximum time step allowed during the whole simulation, day.

NT_TOLERANCE

nt_tolerance

example:

NT_TOLERANCE
1e-004
Define convergence tolerance for Newton iteration.

nt_tolerance is the convergence tolerance for Newton iteration.

151
SUMMARY

key1 key2 key3 ….

example:

SUMMARY
DEPTH PRES FLUIDT ENTHALPY FORMATIONT HEATLOSS VELOCITY
FPATTERN MB_MASS MB_PRES MB_ENTHALPY
/
Define report items in the simulation result file. Available keywords include:

DEPTH wellbore measured depth (MD), m.

PRES fluid pressure in the segment, kPa.

FLUIDT fluid temperature, °C.

ENTHALPY fluid enthalpy, J/kg.

FORMATIONT formation temperature at wellbore/formation boundary, °C.

HEATLOSS heat loss in a segment, J/kg.

VELOCITY fluid mixture velocity in a segment, m/s.

FPATTERN fluid regime in a segment.

FRICTION frictional loss in a segment, kPa.

FST steam quality, %.

UTO overall heat loss coefficient, W/(m2 C).

CASING_T casing temperature, °C.

ACCELP acceleration pressure loss, kPa.

GRAVP hydrostatic pressure loss, kPa.

MB_MASS material balance error.

MB_PRES balance error for pressure.

152
MB_ENTHALPY balance error for enthalpy.

DATE year month day

example:

DATE 2009 1 1.05

Define a date time card for input injection/production history and conditions.

FLOW_RATE

rate

Define injection or production fluid mixture rate at wellbore head or bottom (determined by
keyword START_POINT).

rate is the injection or production fluid mixture rate, m3/day. For steam injection, it’s the cold
water equivalent (CWE) production rate.

START_COND

pres temp fst

example:

START_COND
4000 250.3 0.80
Define injection/production conditions including fluid pressure, fluid temperature and steam
quality at well bottom or well head.

pres is injection or production fluid pressure, kPa.

temp is the injection or production fluid temperature, °C.

fst is the injection or production fluid steam quality, fraction.

CIRCLE_START

Indicate a SAGD circulation is started from current time step.

153
CIRCLE_END

Indicate a SAGD circulation is ended from current time step.

STOP

Indicate the wellbore simulation will stop at current time step.

154
APPENDIX C: INPUT AND OUTPUT FORMAT

The input file format is designed as similar to CMG input file and following is typical input

sample for geothermal well production:

**Example data for geothermal well simulation


**phase type for wellbore simulation
PHASE_TYPE
COMPOSITION

**well type: INJECTOR, PRODUCER


**Producer for Geothermal Well
WELL_TYPE
PRODUCER

**reference temperature for calculating water, oil or gas enthalpy, C


**should be reservoir average temperature
E_TREF 0

**the start point, 0--from the top, 1--from the bottom


START_POINT
1

**well depth, m
WELL_DEPTH
2000

**relative roughness
RELATIVE_ROUGH
0.0001

**Calculation method for friction factor


** CHEN1979 for Chen 1979 equation
** COLEBROOK1 for Colebrook equation that CMG use
** COLEBROOK2 for another Colebrook-white equation
FRIC_METHOD
COLEBROOK2

**segment number
SEGMENT_N
25

155
COMPOSITION_INPUT

NUMCOMP 2
COMPNAME CO2 WATER
KA 119950.0 0
KB 0.0 0
KC 4.55 0
KD -236.8 0
KE -79.1 0
TC 30 0
PC 7353 0
MW 0.044 0
DENMOL 18103.6 0
DENP 1.E-06 0
DENT 848.E-06 0
DENT2 0 0

**HVR values in Watson's correlation for calculating component vaporization enthalpy (J/gmol-
K^0.38)
**Do not input water as it will be calculated internally
HVR
2882 0

**Coefficients for calculating component enthalpy except water


**Five coefficients for each component in each comlumn
ENTH_COEF
21.0855 0
0.06709 0
-4.74505E-5 0
1.49183E-08 0
-1.27083E-12 0

COMP_INPUT_END

VISCTABLE
**temperature(C) CO2 WATER
10 0.081 1.0
100 0.052 0.2838
300 0.021 0.12
/

**first time step after well conditions change


DTWELL 0.01

**maximum time step


DTMAX 2

156
**convergence tolerance for Newton iteration
NT_TOLERANCE 1.0e-5

**Units of wellbore calculation: number of tubing,tubing inside,tubing outside,is insulated,


insulation radius, absolute tubing length, ..., is tubing concentric, casing inside,casing outside and
cementing-formation interface, wellbore MD, current lateral, m
WELL_CAL_UNITS 1
0 0 0.058 0 0 0 0 0.158 0.168 0.206 2000 0

**thermal conductivity: tubing, casing, cementing, radial formation and vertical formation,
W/(m C)
THERMAL_CONDUCT
43.2639 43.2639 0.35 1.73 1.73

**insulation thermal conductivity (optional), W/(m C)


INSULATION_K
0.09

**formation thremal diffusivity, m^2/s


FTD
0.738063E-6

**emissivity of the external tubing surface and internal tubing surface, dimensionless
EMISSIVITY
0.8 0.8

**properties of annulus gas or liquid: density(kg/m^3),viscosity(cp)),heat capacity(kJ/(kg


C)),thermal conductivity(W/(m C))
ANNULUS_PROPERTY
1.1216 0.02052 1.9258 0.05615

**geothermal gradient, C/m


GEOT_GRADIENT
0.03513

**surface geothermal temperature, C


SURFACE_T
12

**formation densit(kg/m^3), formation heat capacity(J/(kg C)), formation thermal conductivity


in radial and vertical direction (W/(m C))
FORMATION_PROPERTY
2998.9 782 1.73 1.73

SUMMARY

157
DEPTH PRES FLUIDT ENTHALPY FORMATIONT HEATLOSS VELOCITY
FPATTERN
CASING_T FRAC_GAS FRAC_WAT
/

**other output keywords available: VELOCITY FST GRAVP ACCELP


**MB_MASS MB_PRES MB_ENTHALPY UTO

**start date
DATE 2008 1 1

**mass flow rate at well bottom kg/s


MASS_FLOW_RATE
39.2

**feed composition z
FEED_COMP
0.01 0.99

**The pressure and temperature at the top or bottom of a well, kPa and C
START_COND
**3800 0
18000 1.221E6

DATE 2008 1 2

**Set dates to output results data


DATE 2008 2 1
DATE 2008 3 1
DATE 2008 4 1
DATE 2009 1 1
DATE 2010 1 1
DATE 2011 1 1
DATE 2012 1 1
DATE 2013 1 1
DATE 2014 1 1
DATE 2019 1 1

STOP

158
Following is output file sample:

159
References

Agarwal, R.K., Li, Y.K., Nghiem, L.X., and Coombe, D.A. 1991. Multiphase Multicomponent

Isenthalpic Flash Calculation. JCPT 30(3): 69-75.

Ahmed, T. 2006. Reservoir Engineering Handbook, Gulf Professional, 3rd Ed.

Ali S.M. Farouq, 1981. A Comprehensive Wellbore Steam/Water Flow model for Steam

Injection Wells. J Can Pet Technol 21(2): 82-88. JCPT Paper No. 82-02-04. doi: 10.2118/82-

02-04.

Ali S.M. Farouq. Practical Heavy Oil Recovery, October 2010.

Alipour, M., Hosseini, R., Rezania, A. Radius Ratio Effects on Natural Heat Transfer in

Concentric Annulus. Experimental Thermal and Fluid Science Volume 49, September 2013,

Pages 135–140. DOI: 10.1016/j.expthermflusci.2013.04.011.

Aziz, K., Settari, A. Petroleum Reservoir Simulation, Applied Science Publishers LTD., 1979.

Bahonar M, Azaiez J, Chen Z. A Semi-unsteady State Wellbore Steam/Water Flow Model for

the Prediction of Sandface Conditions in Steam Injection Wells, paper CIPC-005, presented in

the Canadian International Petroleum Conference(CIPC), Calgary, Alberta, Canada, June 2009.

Bahonar M. Transient Non-isothermal Wellbore Fluid Flow and Heat Transfer Modeling, Ph.D

dissertation, University of Calgary, 2011.

Beggs, H. D., Brill, J. P. A Study of Two-Phase Flow in Inclined Pipes. Journal of Petroleum

Technology, May 1973, 607-617.

Bleakley, W.B. 1964. Here Are Case Histories of Two Thermal Projects (Thermal Recovery:

Second of Two Installments). The Oil and Gas Journal (October 26, 1964): 123-130.

Cao, H. Development of Techniques for General Purpose Simulators, Ph.D dissertation, Stanford

University, 2002.

160
Churchill, S.W. Heat Exchanger Design Handbook. Schlunder, E.U., ed., Hemisphere

Publishing, New York, NY 1983.

CMG STARS user manual (version 2017) by Computer Modeling Group Ltd.

Dong, C. An Integrated Multi-Component Reservoir-Wellbore Thermal Model, Ph.D

dissertation, University of Calgary, 2012.

Dropkin, D., Sommerscales, E. Heat Transfer by Natural Convection in Liquids Confined by

Two Parallel Plates Inclined at Various Angles with Respect to the Horizontal. J. Heat Transfer;

Trans., ASME, Series C (Feb., 1965) 87, 77-84.

Duns, H. Jr., Ros, N. C. J. Vertical Flow of Gas and Liquid Mixtures in Wells. Proceeding of the

Sixth World Petroleum Congress, Frankfurt, June 1963, Section II, Paper 22-PD6.

Elshamy, M. M., Ozisik, M. N., Coulter, J. P.. Correlation for Laminar Natural Convection

between Confocal Horizontal Elliptical Cylinders. Numerical Heat Transfer, Part A:

Applications: An International Journal of Computation and Methodology Volume 18, Issue 1,

1990, pages 95-112. DOI:10.1080/10407789008944785.

Fontanilla, J.P. and Aziz, K. 1982. Prediction of Bottom-Hole Conditions for Wet Steam

Injection Wells. J Can Pet Technol 21 (2): 82-88. JCPT Paper No. 82-02-04. doi: 10.2118/82-02-

04.

Gilbert, W.E. Flowing and Gas-lift well Performance. Drilling and Production Practice, 1

January 1954, p. 126.

Hagedorn, A. R., Brown, K. E. Experimental Study of Pressure Gradients Occurring During

Continuous Two-Phase Flow in Small Diameter Vertical Conduits. Journal of Petroleum

Technology, April 1965, 475-484.

161
Hamad F.A., Khan, M.K.. Natural Convection Heat Transfer in Horizontal and Inclined Annuli

of Different Diameter Ratios. Energy Conversion and Management Volume 39, Issue 8, 10 June

1998, Pages 797–807. DOI: 10.1016/S0196-8904(97)10010-3.

Hasan, A. R., Kabir, C. S. A Study of Multiphase Flow Behavior in Vertical Wells. SPE

Production Engineering Journal, May 1988, page 263–272.

Hasan, A.R. and Wang X. Analysis and Applications of Steam-Water Flow in Wells. Presented

at the International Petroleum Technology Conference held in Doha, Qatar, 7-9 December 2009.

Hasan, A.R., Kabir, C.S., 2002. Fluid Flow and Heat Transfer in Wellbores. Society of

Petroleum Engineers, Richardson, TX.

Hasan, A.R., Kabir, C.S., Sayarpour, M. 2007. A basic Approach to Wellbore Two-Phase Flow

modeling. Paper SPE 109868 presented at the SPE Annual Technical Conference and Exhibition,

Anaheim, California, USA, 11-14 November. doi: 10.2118/109868-MS.

Heidari, M., Nghiem, L.X., Maini, B.B., 2014. Improved Isenthalpic Multiphase Flash

Calculations for Thermal Compositional Simulators. Paper SPE-170029-MS presented at the

SPE Heavy Oil Conference, Alberta, Canada, 10-12 June 2014.

Holzbecher, M., Steiff, A. Lamlinar and Turbulent Free Convection Vertical Cylinders with

Internal Heat Generation. International Journal of Heat and Mass Transfer Volume 38, Issue 15,

October 1995, Pages 2893–2903. DOI: 10.1016/0017-9310(95)00031-4.

Inaba, Y., Zhang, Y., Takeda, T., Shiina, Y. Natural Convection Heat Transfer of High

Temperature Gas in an Annulus between Two Vertical Concentric Cylinders. Heat Transfer—

Asian Research Volume 34, Issue 5, pages 293–308, July 2005. DOI: 10.1002/htj.20070.

Incropera, F.P., Dewitt, D.P. Introduction to Heat Transfer. John Wiley and Sons, New York,

2002.

162
Joshi, H.M. Fully Developed Natural Convection in an Isothermal Vertical Annular Duct. Int.

Commun. Heat Mass Transfer 14 (1987) 657–664.

Keyhani, M., Kulacki, F.A., R.N. Christensen, Free Convection in a Vertical Annulus with

Constant Heat Flux on the Inner Wall, J. Heat Transfer 105 (1983) 454–459.

Kuehn, T. H., Goldstein, R. J. An Experimental and Theoretical Study of Natural Convection in

the Annulus between Horizontal Concentric Cylinders. J. Fluid Mech. (1976), vol. 74, part 4, pp.

695-719.

Kuehn, T. H., Goldstein, R. J. An Experimental Study of Natural Convection Heat Transfer in

Concentric and Eccentric Horizontal Cylindrical Annuli. J. Heat Transfer 100(4), 635-640 (Nov

01, 1978). doi:10.1115/1.3450869.

Kuehn, T. H., Goldstein, R. J. Correlating Equations for Natural Convection Heat Transfer

between Horizontal Circular Cylinders. International Journal of Heat and Mass Transfer, Vol. 19,

1976, pp. 1127-1134.

Lapene, A., Nichita, D.V., Debenest, G., and Quintard, M. 2010. Three-Phase Free-Water Flash

Calculations Using New Modified Rachford-Rice equation. Fluid Phase Equilibria 297: 121-128.

Livescu, S., Durlofsky, L.J., and Aziz, K., 2008. A Semianalytical Thermal Mutiphase Wellbore

Flow Model for Use in Reservoir Simulation. Paper SPE 115796 presented at the SPE Annual

Technical Conference and Exihibition, Denver, 21-24 Septempber 2008. doi: 10.2118/115796-

MS.

Livescu, S., Durlofsky, L.J., and Aziz, K., 2008. Application of a New Fully-Coupled Thermal

Multiphase Wellbore Flow Model. Paper SPE 113215 presented at the SPE/DOE Symposium on

Improved Oil Recovery, Tulsa, 20-23 April 2008. doi: 10.2118/113215-MS.

163
Livescu, S., Durlofsky, L.J., and Aziz, K., and Ginstra, J.C. 2010. A Fully-Coupled Thermal

Multiphase Wellbore Flow Model for Use in Reservoir Simulation. Journal of petroleum Science

and Engineering 71(3-4): 138-146.

Lu, X. Numerical Simulation of Conjugate Natural Convection and Radiation within Thermal

Wellbore Annuli, Master dissertation, University of Calgary, 2016.

Nodera, T. Overview of Solving Method for Sparse Matrices, RIMS Kokyuroku 832, 127-136,

1993.

Orkiszewski, J. Predicting Two-Phase Pressure Drops in Vertical Pipe. Journal of Petroleum

Technology, June 1967, 829-838.

Pourafshary, P., Varavei, A., Sepehrnoori, K., Podio, A.L. A Compositional Wellbore/Reservoir

Simulator to Model Multiphase Flow and Temperature Distribution. International Petroleum

Technology Conference, 2008.

Raithby, G.D., Hollands, K.G.T.. Laminar and Turbulent Heat Transfer by Natural Convection.

International Journal of Heat and Mass Transfer, Volume 17, Issue 12, December 1974, Pages

1620–1622. DOI: 10.1016/0017-9310(74)90070-2.

Ramey, H.J. Jr., 1962. Wellbore Heat Transmission. J Pet Technol 14(4): 427-435; Trans.,

AIME, 225. SPE-96-PA.doi: 10.2118/96-PA.

Schlumberger GeoQuest, ECLIPSE Technical Description Manual (2016).

Schulumberger M, Doll GH, Temperature Measurement in Oil Wells, J Inst Pet Technologist,

1937; 23:159.

Shi, H., Holmes, J.A., Diaz, L.R., Durlofsky, L.J., Aziz, K., June 2005.Drift-flux Parameters for

Three-Phase Steady-State Flow in Wellbores, SPE Paper 89836. SPE J 10(2), 130-137.

164
Shi, H., Holmes, J.A., Durlofsky, L.J., Aziz, K., Diaz, L.R., Alkaya, B., Oddie, G., 2005.Drift-

flux Modeling of Two-Phase Flow in Wellbores, SPE Paper 84228. SPE J 10(1), 24-33 March.

Shulyupin A. N. and Chermoshentseva A. A., “On calculation of a steam-water flow in a

geothermal well,” Tech. Phys. 58, 1100–1105, 2013.

Stone, T.W., Edmunds, N.R., Kristoff, B.J., 1989. A Comprehensive Wellbore/Reservoir

Simulator. SPE Paper 18419, presented at the SPE Symposium on Reservoir Simulation,

Houston, TX, Feb. 6-8, 1989.

Taitel, Y., Barnea, D., Duker, A.E. Modeling Multi Pattern Transitions for Steady Upward Gas-

Liquid Flow in Vertical Tubes. AIChE Journal, 1980, 26, page 345-354.

Taitel, Y., Dukler, A. E. A Model for Predicting Flow Regime Transitions in Horizontal and

Near Horizontal Gas-Liquid Flow. AIChE Journal, 1976, 22, page 47-57.

Venkata Reddy, P., Narasimham, G.S.V.L. Natural Convection in a Vertical Annulus Driven by

a Central Heat Generating Rod. International Journal of Heat and Mass Transfer Volume 51,

Issues 19–20, September 2008, Pages 5024–5032. DOI: 10.1016/j.ijheatmasstransfer.2008.02.

032.

Wagner W., et al. The IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of

Water and Steam, ASME J. Eng. Gas Turbines and Power, 122, 150-182 (2000).

Weng L. C., Chu, H. S. Combined Natural Convection Radiation in a Vertical Annulus. Heat and

Mass Transfer August 1996, Volume 31, Issue 6, page 371-379.

Willhite, G.P., 1967. Over-All Heat Transfer Coefficients in Steam and Hot Water Injection

Wells. J Pet Technol 19(5): 607-615. SPE-1449-PA.doi: 10.2118/1449-PA.

165
Xiao, J.J., Shoham, O., Brill, J.P. A Comprehensive Mechanistic Model for Two-Phase Flow in

Pipelines, Proceedings from 65th Annual Technical Conference of SPE, September 23-26, 1990,

New Orleans, USA, SPE 20631.

Xiong, W. Development of a Standalone Thermal Wellbore Simulator, Master dissertation,

University of Calgary, 2014.

Yusuke S., Toshiaki T., Ryuichi I. Performance Improvement of TOUGH2 Simulation with

Graphics Processing Unit, PROCEEDINGS, TOUGH Symposium 2012.

Zhu, Y.D., Shu, C., Qiu, J., Tani, J. Numerical Simulation of Natural Convection between Two

Elliptical Cylinders Using DQ Method. International Journal of Heat and Mass Transfer Volume

47, Issue 4, February 2004, Pages 797–808. DOI: 10.1016/j.ijheatmasstransfer.2003.06.005.

Zuber, N. and Findlay, J.A. Average Volumetric Concentration in Two-Phase Flow Systems. J.

Heat Transfer, Trans. ASME (1965) 87,453.

166

You might also like