TOUGH Pre- and Post-Processors
The TOUGH simulators solve the governing equations of nonisothermal multiphase flow and transport in fractured porous media. Input to and output from the simulator occurs through ASCII text files. No graphical interfaces are part of the TOUGH distribution, and only minimal support for model setup and mesh generation is built into the simulators.
The following describes external software tools for pre- and postprocessing TOUGH input and output files. Some are web-based tools, some have been made available for free download, others are licensed and available for purchase. Certain TOUGH-related pre- and postprocessors are available from commercial software developers; they are listed here for completeness, without explicit endorsement from LBNL.
LBNL Licensed Software
AMESH Generates irregular TOUGH meshes using Voronoi tesselation in a 2D plane and projection into the third dimension.
etype, written by Jerry Fairley, is a PERL script that calculates e-type (pointwise) estimates of mean and variance for point quantities at spatially referenced locations, for example, averages from Monte Carlo simulations.
MESH_FLAC2TOUGH converts a mesh created by FLAC3D into a TOUGH2 mesh; by Laura Blanco Martin.
T2CHK checks the relative permeability and capillary pressure curves set in the ROCKS or PRCAP blocks of TOUGH2 input file, and calculates the equilibrium liquid saturation about capillary pressure in each material.
T2ext, written by Jerry Fairley, is a PERL script to extract data from TOUGH2-MP file OUTPUT_DATA. Regardless of the dimensionality of the simulation, the output from T2ext is a space-delimited four or six column file, each line of which gives X,Y,Z,P (for a primary variable) or X,Y,Z,Fx,Fy,Fz (for a secondary variable). Users of GMT (Generic Mapping Tools) will find the output from T2ext is conveniently formatted for plotting with that program. Run T2ext -h for a description of all available options.
TMT2, written by Andrea Borgia, translates a MODFLOW grid created with GMS to a TOUGH2 grid, writing the blocks ELEME, CONNE, GENER, and INCON for various EOS modules (currently EOS1 – EOS5). It might work with MODFLOW GUIs, other than GMS, but it is not guaranteed nor have we tested it. Please send e-mail to Andrea Borgia with feedback. Also see the tutorial in the Tips & Tricks tab of the TOUGH User Forum.
toughio is an open-source library that provides tools to facilitate pre- and post-processing for TOUGH using the latest Python standards. It aims to make setting up of a TOUGH simulation user-friendly by relying on existing well-established Python packages, namely numpy, meshio and pyvista. (Link to the software; Link to the documentation)
TOUGH Ancillary Code
TOUGH Ancillary Code includes the following:
- MoveMesh (v1.0): Moves coordinates of TOUGH mesh
- AddBound (v2.0): Deletes elements in a specified domain or replaces them with a single boundary element connected to all elements adjacent to that region. The region can be a box or polygonial prism.
- Perm2Mesh (v1.0): Reads coordinates and log(permeability modifier) from a file and assigns them to TOUGH elements
- AssignRock (v2.0): Assigns rock type name to all elements within a specified box or polygonial prism
- CutCavity (v1.0): Cuts cavities of various shapes into 2D and 3D models
- EOS9EOS3 (v1.0): Converts EOS9-SAVE file to EOS3-INCON file
- DeleteElements (v2.0): Deletes elements and connections in specified region. The region can be a box, cylinder, material domain, or polygonial prism.
- MINC2MESH (v1.0): Splits MINC into separate MESH files, one for each continuum, for subsequent EXT processing.
The following commercial software packages are listed in alphabetical order for information only, i.e., without explicit endorsement from LBNL. Contact the vendor for detailed information about the capabilities and cost of the software.
RE-Studio is a pre and post processor for TOUGH2. RE-Studio preprocessing includes editing TOUGH2 input files with continuous syntax checking, creation of GENER keywords from well trajectories and total well production/injection rates, and creation/modification of MESH and INCON from eclipse models (coming soon). RE-Studio Postprocessing includes 3D mesh visualization and time series plotting.
SKUA-GOCAD is a geomodelling solution providing the tools to create geologic models that honor the true structure and stratigraphy of reservoirs. SKUA-GOCAD offers pre and post processing capabilities for TOUGH2, allowing to export and import 3D geological grids in TOUGH format and facilitating transfer and iterations between geological models and TOUGH simulation for reliable production forecasts.
LaGriT is a library of user callable tools that provide mesh generation, mesh optimization and dynamic mesh maintenance in two and three dimensions. It can write computational meshes in TOUGH2 format.
PyTOUGH is a Python library for automating TOUGH2 simulations of subsurface fluid and heat flow, developed by Adrian Croucher at the Department of Engineering Science, University of Auckland, New Zealand.
TOUGH2GIS is a GIS-based pre-processor for TOUGH2 that allows the user to create locally refined unstructured (Voronoi) grids and to assign rock types to grid blocks. TOUGH2GIS is developed at the University of Bologna, Italy.