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. PREPARATION OF MODEL INPUT
  2. Keywords and Input Data

GENER

GENER introduces sinks and/or sources

Record GENER.1

Free format for 11 parameters.

ELNE, SLNS, LTAB, TYPE, ITAB, GX, EX, HX, LOT12, LOT13, LOT14

or Format (A3, I2, A3, I2, 4I5, 5X, A4, A1, 6E10.4) (for 5 -character element name only).

EL, NE, SL, NS, NSEQ, NADD, NADS, LTAB, TYPE, ITAB, GX, EX, HX, LOT12, LOT13, LOT14

ELNE name of the element containing the sink/source.

SLNS name of the sink/source.

EL, NE code name of the element containing the sink/source.

SL, NS code name of the sink/source. The first three characters are arbitrary, the last two characters must be numbers.

NSEQ number of additional sinks/sources with the same injection/production rate (not applicable for TYPE = DELV, used for formatted input only).

NADD increment between the code numbers of two successive elements with identical sink/source (used for formatted input only).

NADS increment between the code numbers of two successive sinks/sources (used for formatted input only).

LTAB number of points in table of generation rate versus time. Set 0 or 1 for constant generation rate. For wells on deliverability, LTAB denotes the number of open layers, to be specified only for the bottommost layer.

TYPE specifies different options for fluid or heat production and injection. For example, different fluid components may be injected, the nature of which depends on the EOS module being used. Different options for considering wellbore flow effects may also be specified.

HEAT

Introduces a heat sink/source

COM1

component 1 (water)

WATE

Water

COM2

component 2

COM3

component 3

∙∙∙

COMn

component n

MASS

mass production rate specified

DELV

well on deliverability against specified bottomhole pressure.

F--- or f---

well on deliverability against specified wellhead pressure

For DELV, if a well is completed in more than one layer, bottommost layer must be specified first, with number of layers given in LTAB. Subsequent layers must be given sequentially for a total number of LTAB layers.

For F--- or f--- type, by convention, when the first letter of a type specification is F or f, TOUGH4 will perform flowing wellbore pressure corrections using tabular data of flowing bottomhole pressure vs. flow rate and flowing enthalpy. The tabular data used for flowing wellbore correction must be generated by means of a wellbore simulator ahead of a TOUGH4 run as ASCII data of 80 characters per record, according to the format specifications below.

The first record is an arbitrary title. The second record holds the number of flow rate and flowing enthalpy data (table points), NG and NH, respectively, in Format 2I5; in Table 17 we have NG = 11, NH = 9. This is followed by NG flow rate data in format 8E10.4, and NH enthalpy data also in format 8E10.4. After this come NG sets of NH flowing bottomhole pressure data in format 8E10.4. The data in Table 17 were generated with the HOLA wellbore simulator (Aunzo et al., 1991) for a 0.2 m (≈ 8 inch) inside diameter well of 1,000 m feed zone depth with 7 bars wellhead pressure. Formation temperature for the conductive heat loss calculation in HOLA was assumed to increase linearly from 25 ˚C at the land surface to 275.5 ˚C at 750 m depth. Flow rates cover the range from 0.5 to 90.5 kg/s, and flowing enthalpies cover the range from 1,000 to 1,400 kJ/kg. A data record with very large bottomhole pressures of 55.55 MPa was added by hand for a very large hypothetical rate of 1,000 kg/s. This was done to avoid rates going out of table range during Newton-Raphson iteration in a TOUGH4 flow simulation.

Table 17. Flowing bottomhole pressures (in Pa) at 1000 m feed zone depth for a well of 20 cm (≈ 8 inch) inside diameter producing at 7 bar wellhead pressure (calculated from HOLA; Aunzo et al., 1991).

*f725d* - (q,h) from ( .5000E+00, .1000E+07) to ( .9050E+02, .1400E+07)

11 9

.5000E+00 .1050E+02 .2050E+02 .3050E+02 .4050E+02 .5050E+02 .6050E+02 .7050E+02

.8050E+02 .9050E+02 1.e3

.1000E+07 .1050E+07 .1100E+07 .1150E+07 .1200E+07 .1250E+07 .1300E+07 .1350E+07

.1400E+07

.1351E+07 .1238E+07 .1162E+07 .1106E+07 .1063E+07 .1028E+07 .9987E+06 .9740E+06

.9527E+06

.1482E+07 .1377E+07 .1327E+07 .1299E+07 .1284E+07 .1279E+07 .1279E+07 .1286E+07

.1292E+07

.2454E+07 .1826E+07 .1798E+07 .1807E+07 .1835E+07 .1871E+07 .1911E+07 .1954E+07

.1998E+07

.4330E+07 .3199E+07 .2677E+07 .2280E+07 .2322E+07 .2376E+07 .2434E+07 .2497E+07

.2559E+07

.5680E+07 .4772E+07 .3936E+07 .3452E+07 .2995E+07 .2808E+07 .2884E+07 .2967E+07

.3049E+07

.6658E+07 .5909E+07 .5206E+07 .4557E+07 .4158E+07 .3746E+07 .3391E+07 .3402E+07

.3511E+07

.7331E+07 .6850E+07 .6171E+07 .5627E+07 .5199E+07 .4814E+07 .4465E+07 .4208E+07

.3957E+07

.7986E+07 .7548E+07 .7140E+07 .6616E+07 .6256E+07 .5908E+07 .5634E+07 .5399E+07

.5128E+07

.8621E+07 .8177E+07 .7820E+07 .7560E+07 .7234E+07 .6814E+07 .6624E+07 .6385E+07

.6254E+07

.8998E+07 .8732E+07 .8453E+07 .8124E+07 .7925E+07 .7671E+07 .7529E+07 .7397E+07

.7269E+07

.5555e+08 .5555e+08 .5555e+08 .5555e+08 .5555e+08 .5555e+08 .5555e+08 .5555e+08

.5555e+08

The data must be provided by means of a disk file, whose name consists of the four characters of the TYPE specification, and the one character of the following ITAB parameter. For example, to use wellbore pressure data in a disk file called f725d, specify TYPE as ‘f725’, and specify ITAB as ‘d’. Different wellbore tables, representing e.g. wells with different diameter, feed zone depth, and flowing wellhead pressure, may be used simultaneously in a TOUGH4 simulation. Also, several wells completed in different grid blocks may reference the same wellbore table.

The capability for flowing wellbore pressure correction is presently only available for wells with a single feed zone.

TOUGH4 introduces additional options for the TYPE including:

GAPP Produce mass of gas phase with given buttonhole pressure, GX is for

productivity index PI ( m3m^3m3), EX is for the bottomhole pressure.

AQPP Produce mass of aqueous phase with given buttonhole pressure, GX is for

productivity index PI ( m3m^3m3), EX is for the bottomhole pressure.

OIPP Produce mass of non-aqueous phase with given buttonhole pressure,

GX is for productivity index ( m3m^3m3), EX is for the bottomhole pressure.

GAPR Produce mass of gas phase with given production rate.

AQPR Produce mass of aqueous phase with given production rate.

OIPR Produce mass of non-aqueous phase with given production rate.

GAIP Injection mixing gas with given bottomhole pressure. GX is the

bottomhole pressure, HX, LOT12, LOT13, and LOT14 are the mass

fractions of each component (see below for formatting).

AQIP Injection mixing aqueous fluid with given bottomhole pressure. GX is the

bottomhole pressure, HX, LOT12, LOT13, and LOT14 are the mass

fractions of each component (see below for formatting).

OIIP Injection mixing non-aqueous fluid at given bottomhole pressure. GX is

the bottomhole pressure, HX, LOT12, LOT13, and LOT14 are the

mass fractions of each component (see below for formatting)

(Comp. name) production (negative) or injection (positive) of the component.

The component name can also be an option of the TYPE. This option specifies the injection or production of the component. For example, TYPE “CO2” represents the injection or production CO2 to/from the model element. A negative GX indicates production and positive GX indicates injection.

ITAB unless left blank, table of specific enthalpies will be read (LTAB > 1 only). When time-dependent injection is used, ITAB must be specified non-blank, and specific enthalpy data must be given. If LTAB =0 or 1 and ITAB is non-blank (excluding ITAB ="V" or "M"), user provided enthalpy will be used for the calculation, not matter injection or production. In addition, if ITAB is "M", "N", “V” or “T”, it has special meanings:

“V” or “v” production or injection rate is in volume per second, no time series of

“T” or “t” production or injection rate is in volume per second, the time series of

“M” or “m” production or injection rate is in mole per second, enthalpy is in J/mole,

no time series of specific enthalpy data will be read.

“N” or “n” production or injection rate is in mole per second, enthalpy is in J/mole,

the time series of specific enthalpy data will be read.

GX constant generation rate; positive for injection, negative for production; GX is mass rate (kg/sec) for generation types COMl, COM2, COM3, etc., and MASS; it is energy rate (J/s) for a HEAT sink/source. For wells on deliverability, type GAPP, AQPP, and QIPP, GX is productivity index PI ( m3m^3m3), see Eq. (4-15). For type GAIP, AQIP, and OIIP, GX is bottomhole pressure,

EX fixed specific enthalpy (J/kg) of the fluid for mass injection (GX>0). For wells on deliverability against fixed bottomhole pressure, with type of GAPP, AQPP, and OIPP, EX is bottomhole pressure Pwb (Pa), at the center of the topmost producing layer in which the well is open.

HG thickness of layer (m; wells on deliverability with specified bottomhole pressure only). It is masse fraction for type GAIP, AQIP, and OIIP.

LOT12-14 (optional) Additional data lot for the input. They could be used for mass fractions input for TYPE option GAIP, AQIP, and OIIP, or other well control parameters.

Record GENER.l.l (optional, LTAB > l only)

Free format for as more as 15 parameters per line, or Format (15E14.7)

Fl(L), L=l, LTAB

F1 generation times

Record GENER.1.2 (optional, LTAB > 1 only)

Free format for as more as 15 parameters per line, Format (15E14.7)

F2(L), L=1, LTAB

The number of data for input at each line must be identical with the F1 input.

F2 generation rates.

Record GENER.1.3 (optional, LTAB > 1 and ITAB non-blank only; this data must be provided for injection at time-dependent rates)

Free format for as more as 15 parameters per line, or Format (15E14.7)

F3(L), L=1, LTAB

The number of data for input at each line must be identical with the F1 input.

F3 specific enthalpy of produced or injected fluid.

Repeat records GENER.1, 1.1, 1.2, and 1.3 for the number of sinks/sources desired.

We provide an alternative input for Record GENER.l.l (optional, LTAB < -1 only)

Free format for 4 parameters per line, or Format (3E14.7, 1A10)

GTime, GRate, GEnthalpy, GType

GTime generation time.

GRate injection or production rate at the time GTime. As special cases, it is production

index for well type (GType ) DELV, GAPP, AQPP and OIPP, and it is bottom hole

pressure for well type GAIP, AQIP, and QIIP.

GEnthalpy specific enthalpy of produced or injected fluid. As a special case, it is bottom hole

pressure for well type DELV, GAPP, AQPP and OIPP.

GType Well production or injection type.

GTime can be in different time unit and in time series or time section based on well "TYPE" inputted by Record GENER.1 (We borrow variable "TYPE" for this purpose as it is not used for well with such alternative input). The "TYPE" can be:

"SECS" Time unit is in second, time series (default).

"HOUS" Time unit is in day, time series.

"DAYS" Time unit is in day, time series..

"SECP" Time unit is in second, time period.

"HOUP" Time unit is in day, time period.

"DAYP" Time unit is in day, time period.

GType can be any types that are allowed for the "TYPE" in the Record GENER.1 . An additional type "CLOS" is defined for indicating close of a well.

Repeat input GENER.1.1 for abs(LTAB) times.

Record GENER.2 A blank record closes the GENER data block.

Alternatively, generation information may terminate on a record with ‘+++’ typed in the first three columns, followed by element cross-referencing information.

Used in: All EOS modules

Example:

GENER // in main input file

A3A 1, injH2, , , , , COM3, , 5.0E+00, 5.356e4 //ELNE, SLNS, , , , , TYPE, , GX, EX

In GENER file with free format, TOUGH4 does not allow including NSEQ, NADD, and NADS (which will not be used) in the input line. The formatted input remains the same parameters which is for compatible with TOUGH3 input.

GENER

A3A 1, injH2, , COM3, , 5.0E+00, 5.356e4 //ELNE, SLNS, LTAB, TYPE, ITAB, GX, EX

We may use the alternative input for a complex well operation. For example, a well for H2 storage has following operation history:

(1) Produce water to reduce reservoir pressure at a rate of 10kg/s for 2 days.

(2) Inject cushion gas CO2 at 1kg/s for 5 days

(3) Close well for 3 days.

(4) Inject H2 for 0.2 day at a rate 2kg/s.

(5) close well for 0.7 day.

(6) produce H2 for o.1 day at a rate 4kg/s.

(7) repeat step (4-6) for additional two days.

The input will be:

GENER

A3A 1, injH2, , , , -12, DAYP,

2.0, -10.0, , WATE //produce water

5.0, 1.0, .526684E+06, CO2 //inject CO2, 5.356e4 enthalpy of injected CO2

3.0, , ,CLOS //close well

0.2, 2.0, 5.356e4 , H2 // inject H2

0.7, , ,CLOS

0.1, -4.0, , H2 //produce H2

0.2, 2.0, 5.356e4 , H2 // inject H2

0.7, , ,CLOS

0.1, -4.0, , H2

0.2, 2.0, 5.356e4 , H2 // inject H2

0.7, , ,CLOS

0.1, -4.0, , H2

If "TYPE" is "DAYS" , the input will be like:

GENER

A3A 1, injH2, , , , -12, DAYS,

0.0, -10.0, , WATE //produce water

2.0, 1.0, .526684E+06, CO2 //inject CO2, 5.356e4 enthalpy of injected CO2

7.0, , ,CLOS //close well

10.0, 2.0, 5.356e4 , H2 // inject H2

10.2, , ,CLOS

10.9, -4.0, , H2

11.0, 2.0, 5.356e4 , H2 // inject H2

11.2, , ,CLOS

11.9, -4.0, , H2

12.0, 2.0, 5.356e4 , H2 // inject H2

12.2, , ,CLOS

12.9, -4.0, , H2

MOP(12) must be 2 for this input.

PreviousGASESNextGOFT

Last updated 1 day ago

Inputs of mass fractions through HX, LOT12, LOT13, and LOT14 for injection fluids with given bottomhole pressure require a special format as n0.x, which consists of two portions, one (n) for the component number, the other (x) for the mass fraction, e.g. “20.22, 10.28, 40.5” represents injection fluid consisting of three components, including component2 with mass fraction of 0,22, component1 with mass fraction 0,28, and component4 with mass fraction of 0.5. The sum of the mass fractions must be equal to 1.0 and the component number must correspond to the component list of the model. Maximum 4 components are allowed for the injection with GAIP, AQIP, and OIIP. The type GAPP, AQPP, OIPP, GAPR, AQPR, QIPR, GAIP, AQIO, and QIIP are implemented using the . Coordinate z of the well elements and elements connected to them must be provided in the mesh input if virtual node method is used.

specific enthalpy data will be read (may need additional inputs with

).

specific enthalpy data will be read (may need additional inputs with

).

8️⃣
virtual node well treatment method
IE(55),
FE(66)-
FE(79)
IE(55),
FE(66)-
FE(79)