Input formatting and structure

1- TOUGH 4 input file structure

Similarly, than for TOUGH2 and TOUGH3, the main TOUGH4 input file INFILE (default, or user specified name) provides inputs using data blocks defined by keywords. 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. Additionally, input can be provided in a flexible manner by means of one or several ASCII data files. 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.

The first record of the input file 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.

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.

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.

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.

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.

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.

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

*

2- Flexible file formatting

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.

3- Free formatting

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.

Figure 25. Formats for the input of 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.

Figure 26. The two formats are equivalent for the TOUGH4

4- (New feature) Entering comments in the input file

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.

5- (New feature) Multiple identical adjacent entry

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

6- Units

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).

7- Backward compatibility

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.

8- Obsolete keywords

Keyword START and MULTI which are used in TOUGH3 become obsolete. MULTI may still require only when NKIN ≠ NK. It must appear before MODDE.

9- Compatibility with TOUGH+

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_).

Last updated