TOUGH4 User Manual
  • Quick Entry to Keywords for Data Input
  • 1️⃣INTRODUCTION
    • About TOUGH
    • TOUGH Development History
    • TOUGH4 Implementation
    • Scope and Methodology
  • 2️⃣WHAT IS NEW IN TOUGH4
  • 3️⃣CODE COMPILATION AND INSTALLATION
    • Setup for Compilation
    • Code Compilation
      • 1. Compilation of TOUGH4 using Visual Studio
      • 2. Compilation of TOUGH4 on Linux-like platform
    • Installation
    • Running the Executable for Simulations
  • 4️⃣GOVERNING EQUATIONS
    • Mass-Balance Equation
    • Accumulation Terms
    • Flux Terms
    • Sink and Source Terms
    • Virtual Node Well Treatment
    • Semi-Analytical Conductive Heat Exchange
    • Drift Model
    • Non-Darcy Flow
  • 5️⃣NUMERICAL METHOD
    • Space and Time Discretization
    • Interface Weighting Schemes
    • Initial and Boundary Conditions
      • Initial Conditions and Restarting
      • Neumann Boundary Conditions
      • Dirichlet Boundary Conditions
      • Atmospheric Boundary Conditions
      • Constant Temperature Boundary Conditions
    • Parallel computing schemes
    • Linear Solvers
    • Python Functions
      • Relative Permeability
      • Capillary Pressure
      • Initial Condition Calculation
      • Fetching Output Data
      • Fetching Thermophysical Property Data From NIST Webbook
      • Coupling With Third-Party Software
  • 6️⃣SOFTWARE ARCHITECTURE
    • Program Design
    • Data Structure
    • Linear Equation Setup
  • 7️⃣PROCESS MODELING
    • EOS1
    • EOS2
    • EOS3
    • EOS4
    • EOS6
    • EOS7
    • EOS9
    • ECO2
    • EWASG
    • TMVOC
    • Tracers/Decay Chain
    • Biodegradation Reaction
    • Wellbore Flow
    • Non-Darcy Flow
    • Enhanced Coal Bed Methane
  • 8️⃣PREPARATION OF MODEL INPUT
    • Input Formatting
    • Keywords and Input Data
      • TITLE
      • BIODG
      • CBMDA
      • CHEMP
      • COFT
      • CONNE
      • COUPL
      • DIFFU
      • ELEME
      • ENDCY
      • ENDFI
      • FLAC
      • FNIST
      • FOFT
      • FORCH
      • GASES
      • GENER
      • GOFT
      • HYSTE
      • INCON
      • INDOM
      • MESHM
      • MODDE
      • MOMOP
      • MULTI
      • OUTPU
      • PARAM
      • ROCKS
      • ROFT
      • RPCAP
      • SELEC
      • SOLVR
      • SPAVA
      • TIMBC
      • TIMES
      • TRACR
      • WELLB
    • Inputs for Initial Conditions
      • EOS1
      • EOS2
      • EOS3
      • EOS4
      • EOS6
      • EOS7
      • EOS9
      • ECO2
      • EWASG
      • TMVOC
    • Geometry Data
      • General Concepts
      • MESHMaker
      • Multiple-continuum processing
    • Inputs for MESHMaker
      • Generation of radially symmetric grids
        • RADII
        • EQUID
        • LOGAR
        • LAYER
      • Generation of rectilinear grids
      • MINC processing for fractured media
    • Adjustment of Computing Parameters at Run-time
  • 9️⃣OUTPUTS
  • 🔟VALIDATION AND APPLICATION EXAMPLES
    • EOS1
      • Problem 1 - Code Demonstration
      • Problem 2 - Heat Sweep in a Vertical Fracture (rvf)
      • Problem 3 - Five-spot Geothermal Production/Injection (rfp)
      • Problem 4 - Coupled Wellbore Flow (r1q)
      • Problem 5 - Five-Spot Geothermal Production/Injection under extremely high temperature
    • EOS2
      • Problem 1 -Five-spot Geothermal Production/Injection (rfp)
    • EOS3
      • Problem 1 - Code Demonstration (eos3p1)
      • Problem 2 - 1D TH Problem with Heating and Gas Source (by Guanlong Guo)
      • Problem 3 - Heat Pipe in Cylindrical Geometry (rhp)
      • Problem 4 - 3D Thermal Consolidation Test, Coupling with FLAC3D Simulator (by Guanlong Guo)
    • EOS4
      • Problem 1 - Code Demonstration (eos4p1)
      • Problem 2 - Heat Pipe in Cylindrical Geometry (rhp)
    • EOS6
      • Problem 1-Validation with EOS2
      • Problem 2-Noble Gas Transport
    • EOS7
      • Problem 1-Multiphase and Nonisothermal Processes in a System with Variable Salinity (rf1)
      • Problem 2-Thermal and Tracer Diffusion (EOS7R/rdif7)
      • Problem 3-Contamination of an Aquifer from VOC Vapors in the Vadose Zone (EOS7R/rdica)
      • Problem 4-Density, Viscosity, Solubility, and Enthalpy of Real Gas Mixtures (EOS7C/SAM7C1)
      • Problem 5-CO2 Injection into a Depleted Gas Reservoir (EOS7C2/SAM7C2)
      • Problem 6- CO2 Injection into a Saturated System (EOS7C/SAM7C3)
      • Problem 7-Density, Viscosity, and Enthalpy of Real Gas Mixtures (EOS7CA/SAM7CA1)
      • Problem 8-CO2 Injection into a Shallow Vadose Zone (EOS7CA/SAM7CA2)
      • Problem 9-Non-Isothermal Compressed Air Energy Storage in Reservoir (by Julien Mouli-Castillo)
    • EOS9
      • Page 1
    • ECO2
      • Problem 1-Demonstration of Initialization Options (ECO2N/rtab)
      • Problem 2-Radial Flow from a CO2 Injection Well (ECO2N/rcc3)
      • Problem 3-CO2 Discharge Along a Fault Zone (ECO2N/r1dv)
      • Problem 4-CO2 Injection into a 2-D Layered Brine Formation (ECO2N/rtp7)
      • Problem 5-Upflow of CO2 along a Deep Fault Zone (ECO2M/r1d)
      • Problem 6-Migration of a CO2 Plume in a Sloping Aquifer, Intersected by a Fault (ECO2M/rwaf)
      • Problem 7-GCS/GHE with a double-porosity reservoir (Case6_50kg_DP/ECO2NV2)
    • EWASG
      • Problem 1 - Brine Density Calculation (dnh)
      • Problem 2 - Production from a Geothermal Reservoir with Hypersaline Brine and CO2 (rhbc)
    • TMVOC
      • Problem 1-Initialization of Different Phase Conditions (r7c)
      • Problem 2-1-D Buckley-Leverett Flow (rblm)
      • Problem 3-Diffusion of components (rdif2)
      • Problem 4-Steam Displacement of a NAPL in a Laboratory Column (rtcem)
      • Problem 5-Steam Displacement of a Benzene-Toluene Mixture in a Laboratory Column (rbt)
      • Problem 6 -Air Displacement of a NAPL from a Laboratory Column (rad)
      • Problem 7-NAPL Spill in the Unsaturated Zone (r2dl)
    • T4.Well
      • Problem 1-Steady-state two-phase flow upward
      • Problem 2-Non-isothermal CO2 flow through a wellbore initially full of water
  • CONCLUSION REMARKS
  • REFERENCES
  • ACKNOWLEDGEMENT
  • Appendix
    • ☑️A: RELATIVE PERMEABILITY FUNCTIONS
      • IRP=1 Linear function
      • IRP=2 Power function
      • IRP=3 Corey's curves
      • IRP=4 Grant's curve
      • IRP=5 Perfectly mobile
      • IRP=6 Fatt and Klikoff function
      • IRP=7 van Genuchten-Mualem Model
      • IRP=8 Verma function
      • IRP=10 Modified Brooks-Corey Model
      • IRP=11 Modified van Genuchten Model
      • IRP=12 Regular hysteresis
      • IRP=13 Simple hysteresis
      • IRP=31 Three phase perfectly mobile
      • IRP=32 Modified Stone's first 3-phase method
      • IRP=33 Three-phase Parker's function
      • IRP=34 Alternative Stone 3-phase
      • IRP=35 Power-law function
      • IRP=36 Faust for two-phase Buckley-Leverett problem
      • IRP=37 Another alternative to Stone function
      • IRP=40 Table lookup
      • IRP=41 User-Defined relative permeability function
    • ☑️B: CAPILLARY PRESSURE FUNCTIONS
      • ICP=1 Linear function
      • ICP=2 Function of Pickens
      • ICP=3 TRUST capillary pressure
      • ICP=4 Milly’s function
      • ICP=6 Leverett’s function
      • ICP=7 van Genuchten function
      • ICP=8 No capillary pressure
      • ICP=10 Modified Brooks-Corey Model
      • ICP=11 Modified van Genuchten Model
      • ICP=12 Regular hysteresis
      • ICP=13 Simple hysteresis
      • ICP=31 Parker et al 3-phase function
      • ICP=32 Parker 3-phase function, alternative 1
      • ICP=33 Parker 3-phase function, alternative 2
      • ICP=34 Parker 3-phase function, alternative 3
      • ICP=40 Table lookup
      • ICP=41 User-Defined capillary pressure function
    • ☑️C: ADDITIONAL PROGRAM OPTIONS
    • ☑️D: DESCRIPTION OF FRACTURED FLOW
      • Multiple Continuum Approaches
      • Active Fracture Modle
Powered by GitBook
On this page
  1. GOVERNING EQUATIONS

Drift Model

PreviousSemi-Analytical Conductive Heat ExchangeNextNon-Darcy Flow

Mass and Energy Conservation

According to mass and energy conservation principles, the generalized conservation equation of mass components and energy in the wellbore can be written as follows:

∂Mκ∂t=qκ+Fκ\frac{{\partial {M^\kappa }}}{{\partial t}} = {q^\kappa } + {F^\kappa }∂t∂Mκ​=qκ+Fκ (4-36)

where superscript κ\kappaκ is the index for the components, κ\kappaκ = 1 to NumCom, NumCom+1 is energy, taken as internal and kinetic energy here; MκM^\kappaMκ are the accumulation terms of the components κ\kappaκ ; qκq^\kappaqκ are external source/sink terms for mass or energy components; and FκF^\kappaFκ are the mass or energy transport terms along the borehole due to advective processes.

Accumulation Terms

The accumulation term MκM^\kappaMκ of Eq. 4-36 for the mass components in single- or two- phase system is given by

Mκ=ρGSGXGκ+ρLSLXLκ(κ=1,NumCom){M^\kappa } = {\rho _G}{S_G}X_G^\kappa + {\rho _L}{S_L}X_L^\kappa (\kappa = 1,NumCom)Mκ=ρG​SG​XGκ​+ρL​SL​XLκ​(κ=1,NumCom) (4-37)

where XβκX^{\kappa}_{\beta}Xβκ​ is the mass fraction of component κ\kappaκ in fluid phase ( = G for gas; = L for liquid), ρβ\rho_{\beta}ρβ​is the density of phase β\betaβ; and SβS_{\beta}Sβ​ is the local saturation of phase defined as

SG=AGA=AGAG+AL{S_G} = \frac{{{A_G}}}{A} = \frac{{{A_G}}}{{{A_G} + {A_L}}}SG​=AAG​​=AG​+AL​AG​​ (4-38)

where A is the well cross-sectional area; AGA_GAG​ and ALA_LAL​ denote the cross-sectional areas occupied by gas and liquid over the cross section at a given elevation (or distance along the well). The

accumulation term for energy is defined as

Me=∑β(ρβSβUβ+12ρβSβUβ2){M^e} = \sum\limits_\beta {\left( {{\rho _\beta }{S_\beta }{U_\beta } + \frac{1}{2}{\rho _\beta }{S_\beta }U_\beta ^2} \right)} Me=β∑​(ρβ​Sβ​Uβ​+21​ρβ​Sβ​Uβ2​) (4-39)

where U is the internal energy of phase , and u is the average phase velocity in the wellbore. The two right-hand-side terms in Eq. 4-39 represent the accumulation of internal and kinetic energy, respectively.

Flow Terms

Transport along the wellbore is governed in general by processes of advection, diffusion, and dispersion, and is also subject to other processes such as exchanges with the formation at feed zones. The total advective mass transport term for a component can be written in one-dimension as

Fκ=−1A[∂(AρGXGκSGuG)∂z+∂(AρLXLκSLuL)∂z]{F^\kappa } = -\frac{1}{A}\left[ {\frac{{\partial ({A\rho _G}X_G^\kappa S_G{u_G})}}{{\partial z}} + \frac{{\partial ({A\rho _L}X_L^\kappa S_L{u_L})}}{{\partial z}}} \right]Fκ=−A1​[∂z∂(AρG​XGκ​SG​uG​)​+∂z∂(AρL​XLκ​SL​uL​)​] (4-40)

where uβu_{\beta}uβ​ is the average velocity vector of phase within the wellbore, A is the well cross-sectional area, and z is the along-wellbore coordinate (can be vertical or horizontal).

The transport terms for energy in the wellbore include those due to (1) advection, (2) kinetic energy, (3) potential energy, and (4) lateral wellbore heat loss/gain. The overall one-dimensional energy transport term can be written as

Note that the mass or energy exchange terms between a perforated wellbore section and its surrounding formation are omitted from the above equations for simplicity. These terms are calculated as flow through porous media as implemented in normal TOUGH except that the nodal distance to the interface on the wellbore side is set to zero in the grid.

Momentum Conservation Using the Drift-Flux Model (DFM)

Therefore, the liquid velocity can be determined as

with the two turning saturations, S1 and S2, set at 0.8 and 0.9999, respectively.

To calculate the mixture velocity, we use the transient momentum conservation equation with the steady-state assumption about the wall shear stress. Specifically, starting from the transient momentum equation

where u is the mixture velocity in the wellbore, L is a length of the wellbore section (positive upward), ρ is the mixture density and θ is the local angle between wellbore section and the vertical direction. The friction coefficient (f) is a function of the Reynolds number (Re) for laminar and turbulent flows by

The fundamental challenge of implementing the transient DFM is the coupling that exists between friction factor and velocity. The first-order approach is to use a velocity from the prior time step to calculate the friction factor for the current time step. Further detailed discussions can be found in Pan et. al. (2010)

Fe=−λ∂T∂z−1A∑β∂∂z(AρβSβ(uβhβ+12uβ2)−∑β(gSβρβuβcosθ)−q′′{F^e} = -\lambda \frac{\partial T} {\partial z} -\frac{1}{A}\sum\limits_\beta {\frac{\partial }{{\partial z}}\left( {{A\rho _\beta }{S_\beta }({u_\beta h_\beta}} + {\frac{1}{2}{ }u_\beta ^2} \right)- \sum\limits_\beta {(g S_\beta\rho _\beta }{u_\beta } cos\theta)} - {q^{''}}Fe=−λ∂z∂T​−A1​β∑​∂z∂​(Aρβ​Sβ​(uβ​hβ​+21​uβ2​)−β∑​(gSβ​ρβ​uβ​cosθ)−q′′ (4-41)

where hβh_{\beta}hβ​ is specific enthalpy of fluid phase β\betaβ , g is the gravitational acceleration, θ\thetaθis the incline angle of the wellbore, and q" is the wellbore heat loss/gain per unit length of wellbore (optional if the surrounding formation is not explicitly represented in the numerical grid).

In order to model the advective transport terms ( FβF_\betaFβ​and uβu_\betauβ​), we invoke the DFM (Zuber and Findlay, 1965; Shi et al., 2005) to describe both single-phase and multiphase flow in wellbores. The basic idea of the DFM is to consider the two-phase liquid-gas mixture as a single effective fluid phase with slip between gas and liquid arising from non-uniform velocity profiles, as well as from buoyancy forces accounted for by empirically relating phase fractions and velocities to the mixture velocity.

The gas velocity uGu_GuG​ is related to the mixture velocity u as follows:

uG=C0u+ud{u_G} = {C_0}u + {u_d}uG​=C0​u+ud​ (4-42)

where C0C_0C0​ is the profile parameter (or distribution coefficient), and udu_dud​ is the drift velocity of the gas describing the buoyancy effect (Shi et al., 2005),

ud=(1−C0SG)C0uCKuC0SGρGρL+1−C0SG{u_d} = \frac{{(1 - {C_0}{S_G}){C_0}{u_C}{K_u}}}{{{C_0}{S_G}\sqrt {\frac{{{\rho _G}}}{{{\rho _L}}}} + 1 - {C_0}{S_G}}}ud​=C0​SG​ρL​ρG​​​+1−C0​SG​(1−C0​SG​)C0​uC​Ku​​ (4-43)

where Ku K_u Ku​ is the Kutateladze number and ucu_cuc​ is the “characteristic velocity,” a measure of the velocity of bubble rise in a liquid column, given by

uC=[gσGL(ρL−ρG)ρL2]14{u_C} = {\left[ {\frac{{g{\sigma _{GL}}({\rho _L} - {\rho _G})}}{{{\rho _L}^2}}} \right]^{\frac{1}{4}}}uC​=[ρL​2gσGL​(ρL​−ρG​)​]41​ (4-44)

where σGL\sigma_{GL}σGL​ is the surface tension between gas and liquid phases. By definition, the average mixture velocity (u) is the volumetrically weighted velocity

u=SGuG+(1−SG)uLu = {S_G}{u_G} + (1 - {S_G}){u_L}u=SG​uG​+(1−SG​)uL​ (4-45)

uL=(1−SGC01−SG)u−(SG1−SG)ud{u_L} = \left( {\frac{{1 - {S_G}{C_0}}}{{1 - {S_G}}}} \right)u - \left( {\frac{{{S_G}}}{{1 - {S_G}}}} \right){u_d}uL​=(1−SG​1−SG​C0​​)u−(1−SG​SG​​)ud​ (4-46)

The profile parameter C0C_0C0​ varies from 1.0 to 1.2 and is assumed to be a smooth function of gas saturation:

C0={1.2,SG<S11+0.1[1+cos⁡(πSG−S1S2−S1)],S1<SG<S21.0,SG>S2{C_0} = \left\{ \begin{array}{l} 1.2,{S_G} < {S_1}\\ 1 + 0.1\left[ {1 + \cos \left( {\pi \frac{{{S_G} - {S_1}}}{{{S_2} - {S_1}}}} \right)} \right],{S_1} < {S_G} < {S_2}\\ 1.0,{S_G} > {S_2} \end{array} \right.C0​=⎩⎨⎧​1.2,SG​<S1​1+0.1[1+cos(πS2​−S1​SG​−S1​​)],S1​<SG​<S2​1.0,SG​>S2​​ (4-47)

∂∂t(ρu)+∂∂L(ρu2)=−∂P∂L−fρu24rw−ρgcos⁡θ\frac{\partial }{{\partial t}}(\rho u) + \frac{\partial }{{\partial L}}\left( {\rho {u^2}} \right) = - \frac{{\partial P}}{{\partial L}} - \frac{{f\rho {u^2}}}{{4{r_w}}} - \rho g\cos \theta ∂t∂​(ρu)+∂L∂​(ρu2)=−∂L∂P​−4rw​fρu2​−ρgcosθ (4-48)

f=64ReforRe<24001f=−2log⁡[2ε/d3.7−5.02Relog⁡(2ε/d3.7+13Re)]forRe>2400f = \frac{{64}}{{{\mathop{\rm Re}\nolimits} }}{\rm{ \enspace for \enspace Re < 2400 }} \\ \frac{1}{{\sqrt f }} = - 2\log \left[ {\frac{{2\varepsilon /d}}{{3.7}} - \frac{{5.02}}{{{\mathop{\rm Re}\nolimits} }}\log \left( {\frac{{2\varepsilon /d}}{{3.7}} + \frac{{13}}{{{\mathop{\rm Re}\nolimits} }}} \right)} \right] \enspace for \enspace Re > 2400 f=Re64​forRe<2400f​1​=−2log[3.72ε/d​−Re5.02​log(3.72ε/d​+Re13​)]forRe>2400 (4-49)

where the Reynolds number is defined as Re=ρudμRe=\frac{\rho u d}{\mu}Re=μρud​, μ is the mixture viscosity.

4️⃣