MESHMaker is an internal mesh maker for TOUGH simulations. It performs a number of mesh generation and processing operations and is invoked with the keyword in the input file. The MESHMaker module has a modular structure. At the present time, there are three sub-modules available in MESHMaker: keywords RZ2D or RZ2DL invoke generation of a one or two-dimensional radially symmetric R-Z mesh; XYZ initiates generation of a one, two, or three dimensional Cartesian X-Y-Z mesh; and MINC calls a modified version of the GMINC program (Pruess, 1983) to sub-partition a primary porous medium mesh into a secondary mesh for fractured media, using the method of “multiple interacting continua” (Pruess and Narasimhan, 1982, 1985), which will be described in detail below.
The gridblock naming conventions for the MINC process are as follows. For a primary grid block with name '12345,' the corresponding fracture subelement in the secondary mesh is named '12345' (character #1 replaced with a blank for easy recognition). The successive matrix continua are labeled by running character #1 through 2, ..., 9, A, B, ..., Z. The domain assignment is incremented by 1 for the fracture grid blocks, and by 2 for the matrix grid blocks. Thus, domain assignments in data block ROCKS should be provided in the following order: the first entry is the single (effective) porous medium, then follows the effective fracture continuum, and then the rock matrix. Users should be aware that the MINC process may lead to ambiguous element names when the inactive element device is used to keep a portion of the primary mesh as unprocessed porous medium. Also, the MINC process may generate duplicate element names. TOUGH4 will check the element names after reading disk file MESH, and abort the simulation if duplicate element names are found.
As a convenience for users desiring graphical display of data, the internal mesh generation process will also write nodal point coordinates on file MESH. Nodal point coordinates are used for optional initialization of a gravity-capillary equilibrium with EOS9 (see the addendum for EOS9) and for optional addition of potential energy to enthalpy or potential energy calculation in wellbore simulations.
Mesh generation and/or MINC processing can be performed as part of a simulation run. Alternatively, by closing the input file with the keyword ENDFI (instead of ENDCY), it is possible to skip the flow simulation and only execute the MESHMaker module to generate a MESH or MINC file. These files can then be used, with additional user-modifications by hand if desired, in subsequent flow simulations. Execution of MESHMaker produces printed output which is self-explanatory. The input requirements for MESHMaker can be found in the section "r"