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

Input Formatting

PreviousPREPARATION OF MODEL INPUTNextKeywords and Input Data

Last updated 2 months ago

TOUGH4 allows flexible formatting for the input files. The input can be in free format or in a file format that is fully backward compatible with the format of TOUGH3. It automatically recognizes the format of TOUGH3 or the new free format. For most case, the input file of TOUGH3 can be directly used. In some modules the sequence of mass components may not be consistent in both versions, e.g. CO2 is COM3 in TOUGH3/ECO2N, but it is COM2 in TOUGH4/ECO2. The inconsistency requires the modification of input for keyword GENER. TOUGH4 allows the input data in free format with comma or semicolon as a “separator”. For example, inputs using the two formats as shown in Figure 25 are equivalent for TOUGH4.

Users can use the old format or new style for different lines in the same input file. TOUGH4 will automatically identify the text lines with new style input. The TOUGH4 also allows input of the TOUGH3 multiple line inputs for a parameter series in one line (as more as 20 data). The two formats shown in Figure 26 are equivalent for TOUGH4.

In the input file, the “//” or “!” can be placed at any locations for indicating the starting of comments. The comments are for information only and neglected by the program. Another new feature for TOUGH4 input is x*n representing repeat input x (must be integer or real/double datum) n times, e.g. the last row of the input in Figure 26 can also be written as:

0.1000960052269E+6, 0.0*3, 0.105E+02, 0.15E+02

Most of the required input data are still the same as TOUGH3. For convenience of users and to make this report self-contained, we repeat the introduction of input data and adopt the texts from TOUGH3 user’s guide directly.

Input can be provided to TOUGH4 in a flexible manner by means of one or several ASCII data files. All TOUGH4 input is in standard metric (SI) units, such as meters, seconds, kilograms, ˚C, and the corresponding derived units, such as Newtons, Joules, and Pascal (= N/m2).

In the standard TOUGH4 input file data are organized in blocks which are defined by five-character keywords typed in columns 1-5, as in Table 16.

The first record must be a problem title of up to 80 characters. The last record usually is ENDCY; alternatively, ENDFI may be used if no flow simulation is to be carried out (useful for mesh generation). Data records beyond ENDCY (or ENDFI) will be ignored. Some data blocks, such as those specifying reservoir domains (ROCKS), volume elements (ELEME), connections (CONNE), sinks/sources (GENER), and initial conditions (INDOM and INCON), have a variable number of records, while others have a fixed number of records. The end of variable-length data blocks is indicated by a blank record. The data blocks can be provided in arbitrary order; exceptions are (1) the first line must be the title line, (2) ELEME, if present, must precede CONNE, (3) MODDE must be specified before PARAM, INDOM, INCON. The blocks ELEME and CONNE must either be both provided through the input file, or must both be absent, in which case alternative means for specifying geometry data will be employed. Keyword START and MULTI which are used in TOUGH3 become obsolete. MULTI may still require only when NKIN ≠ NK. It must appear before MODDE. The block INCON can be incomplete, with elements in arbitrary order, or can be absent. Elements for which no initial conditions are specified in INCON will then be assigned domain-specific initial conditions from block INDOM, if present, or will be assigned default initial conditions given in block PARAM, along with default porosities given in ROCKS. In TOUGH4 input, there is several new keywords are introduced including: MODDE, GASES, TRACR, BIODG, ROFT, SPAVA and WELLB.

Table 16. TOUGH4 input data blocks

Keyword

Functions

TITLE

First record, single line with a title for the simulation problem

MESHM

Parameters for internal grid generation through MESHMaker

ROCKS

Hydrogeologic parameters for various reservoir domains

MULTI

Specifies number of fluid components and balance equations per grid block (obsolete), replaced by MODDE

SELEC

Used with certain EOS-modules to supply thermophysical property data

MODDE

Model design, specifies module to be run, modeling processes to be included, Length of gridblock name.

PARAM

Computational parameters; time stepping and convergence parameters; program options; default initial conditions

MOMOP

More program options

SOLVR

Parameters for linear equation solver

DIFFU

Diffusivities of mass components

FOFT

Specifies grid blocks for which time series data are desired

COFT

Specifies connections for which time series data are desired

GOFT

Specifies sinks/sources for which time series data are desired

ROFT

Specifies connected rocks for which time series data are desired

RPCAP

Parameters for relative permeability and capillary pressure functions

HYSTE

Parameters for hysteretic characteristic curves; required only if non-default values of parameters are used

TIMES

Specification of times for generating printout

*ELEME

List of grid blocks (volume elements)

*CONNE

List of flow connections between grid blocks

*GENER

List of mass or heat sinks and sources

INDOM

List of initial conditions for specific reservoir domains

*INCON

List of initial conditions for specific grid blocks

TIMBC

Specifies time-dependent Dirichlet boundary conditions

OUTPU

Specifies variables/parameters for printout

GASES

Defines gas components included in current simulation

CHEMP

Provides parameters for calculating the thermophysical properties of the NAPL/chemical

TRACR

Defines tracers included in current simulation

BIODG

Defines biodegradation reactions included in current simulation

WELLB

Specifies the parameters for wellbore models.

SPAVA

Introduce the spatial variable parameters through a data file.

COUPL

Options and parameters for TOUGH4 and third-party software coupling simulation

FLAC

Introduces material parameters and coupling options for coupling with FLAC3D

FORCH

Introduces parameters on non-Darcy flow coefficient model and weighting scheme using Forchheimer equation

CBMDA

Input parameters for simulation of gas/tracer absorption (such as coalbed methane) using the extended Langmuir isotherm

ENDCY

Last record to close the TOUGH3 input file and initiate the simulation

ENDFI

Alternative to ENDCY for closing a TOUGH3 input file; will cause flow simulation to be skipped; useful if only mesh generation is desired

*

In consistent with TOUGH+, some keywords can be replaced with other words, including ROCKS (MEDIA), MESHM (meshm, Meshm), START (RANDO), FOFT (Elem_, FOFT_, foft, foft_), GOFT (SS_Ti, GOFT_, goft, goft_), COFT (conx_, COFT_, coft, coft_), and ROFT (ROFT_).

The main input file INFILE (default, or user specified name) provides inputs of data blocks for the keywords. The inputs for the keywords ELEME, CONNE, GENER, and INCON can also be done through files MESH (or MINC), GENER, and INCON. The initialization of the arrays for geometry, generation, and initial condition data is always made from these files. Users can either provide these files at execution time, or they can be written from TOUGH4 input data at the initialization phase of the program. During initialization, two binary files MESHA and MESHB are created from the file MESH. If MESHA and MESHB exist in the working folder and the model total element number is larger than 50000, the code will ignore the MESH file and the ELEME and CONNE blocks in the input file, and read geometric information directly from these two files, which will reduce the memory requirement for the master processor and enhance I/O efficiency for large model simulations. In this case, if the mesh is changed, MESHA and MESHB must be deleted from the working folder to make the changes take effect. If no data blocks GENER and INCON are provided in the main input file, and if no separate files GENER and INCON are present, defaults will take effect (no generation; domain-specific initial conditions from block INDOM, or defaults from block PARAM). If a user intends to use these defaults, the user must make sure that at execution time no files INCON or GENER are present from a previous run (or perhaps from a different problem). A safe way to use default GENER and INCON is to specify “dummy” data blocks in the input file, consisting of one record with GENER or INCON, followed by a blank record.

The format of data blocks ELEME, CONNE, GENER, and INCON is basically the same when these data are provided as separate files or as part of the main input file. They are either in free format or remaining in the original TOUGH3 format. Input of these data through the main input file rather than as separate files offers some additional conveniences, which are useful when a new simulation problem is initiated. For example, a sequence of identical items (volume elements, connections, sinks or sources) can be specified through a single data record. Also, indices used internally for cross-referencing elements, connections, and sources will be generated internally by TOUGH4 rather than having them provided by the user. MESH, GENER, and INCON files written by TOUGH4 can be merged into the main input file without changes, keeping the cross-referencing information.

At the end of each TOUGH4 simulation run, files SAVE and TABLE will be generated. These two files record the status of the flow system and coefficients of semi-analytical linear heat exchange with confining beds, respectively. SAVE can be used as the initial conditions for continuation simulation by simply changing the file name SAVE to INCON. If heat exchange with confining beds is considered in the simulation, file TABLE will be read in continuation run for the heat-exchange calculation.

8️⃣
Figure 25. Formats for the input of TOUGH4
Figure 26. The two formats are equivalent for the TOUGH4