TOUGH Models
In Leapfrog Energy, you can import and visualise TOUGH2 and TOUGH3 models, inputs and outputs, and generate rock types from geological and combined models in the project. You can also create dynamic structured and unstructured TOUGH models based on geological models and combined models.
This topic describes working with TOUGH models in Leapfrog Energy. It is divided into:
- Creating Structured TOUGH Models
- Editing the Grid Definition for a Structured TOUGH Model
- Creating Unstructured TOUGH Models
- Importing TOUGH Models
- TOUGH Inputs and Outputs
- Generating Rock Types
- Evaluating Faults on the Grid
- Editing Rock Type Properties
- Editing TOUGH Model Parameters
- Displaying TOUGH Models
- Static Copies of TOUGH Models
- Exporting TOUGH Models
Creating Structured TOUGH Models
Structured TOUGH models can be created in Leapfrog Energy with layering defined by a geological model or combined model.
To create a new structured TOUGH model, right-click on the Flow Models folder and select TOUGH > New Structured Model. The New TOUGH Grid window will appear, together with controls in the scene that will help you define the model. In this example, a geological model has been added to the scene to aid in defining the TOUGH grid:
Select the geological model or combined model you wish to use from the Model to grid list, then define the grid using the in-scene controls or the fields in the New TOUGH Grid window. The model should be slightly smaller than the selected Model to grid; any TOUGH blocks that exist outside the Model to grid will be marked as inactive when the model is exported.
Once you have created a structured TOUGH model, you can edit the grid but you cannot change the Model to grid.
As you make changes in the New TOUGH Grid window, the scene will be updated to reflect those changes. For example, here the initial grid dimensions are updated using the in-scene controls. Then the Block size is changed in the New TOUGH Grid window, which results in Block count being updated.
You cannot have partial blocks, which is why when you adjust the grid size using the in-scene handles, the grid will snap to the nearest full block size.
If you wish to use different block sizes in different parts of the grid, untick the Uniform Spacing box and then click the Spacings buttons to change the number of blocks. There are four ways to change the spacings:
- Click on a value to edit it.
- Divide a row, column or layer. Click on a row, column or layer, then on the Divide button. Two new rows/columns/layers will appear in the list.
- Merge rows, columns or layers. Hold down the Shift key while clicking on each item, then click on the Merge button. The selected items will be combined.
- Set uniform spacing on selected rows, columns or layers. You will be prompted to enter the number of cells you wish to create from the selected rows/columns/layers.
Select multiple spacings by holding down the Shift key while clicking on each item. Click OK to return to the New TOUGH Grid window.
Here the blocks are initially 1000x1000x1000. The Column Spacings are adjusted to demonstrate how the Divide, Merge and Uniform Spacing options can be used to control grid spacing.
Click OK to create the model, which will appear in the project tree under the Flow Models folder. In this example, structured TOUGH models have been created from a faulted geological model and an unfaulted geological model. For the faulted model, the faults are evaluated on the TOUGH grid and used in generating rocktypes.
For more information on working with a structured TOUGH model created in Leapfrog Energy see:
- Editing the Grid Definition for a Structured TOUGH Model
- Evaluating Faults on the Grid
- Editing TOUGH Model Parameters
- Displaying TOUGH Models
- Exporting TOUGH Models
For information on importing outputs for TOUGH models created in Leapfrog Energy, see Inputs and Outputs for TOUGH Models Created in Leapfrog Energy.
Editing the Grid Definition for a Structured TOUGH Model
The grid definition for structured TOUGH models created in Leapfrog Energy can be updated after its initial creation. You cannot change the geological model or combined model used as the basis for a structured TOUGH grid once it has been created, but all other settings can be changed. To do this, double-click on the grid in the project tree and in the window that appears, click on the Grid tab.
Double-clicking on the grid in the project tree displays a TOUGH Grid Properties window. You cannot edit the grid in this window. To edit the grid, double-click on the model in the project tree, then click on the Grid tab.
In this tab, you can edit:
- The Base Point, using either the fields in the Grid tab or the orange handle in the scene
- The Azimuth by entering a specific value or using the blue handle in the scene
- The Grid Dimensions by changing the Columns, Rows or Layers dimensions in the Grid tab or using the red handles in the scene
- The Block Sizes by clicking on a particular block and changing its value. Note that the difference in value will be accrued to the next block in the list and that the last block in the list cannot be edited.
The block counts cannot be edited; they are calculated from the grid dimensions and the block sizes.
In this example, each column block is 2000. Note how changing one block affects the following block and that changing the block sizes does not affect the overall grid dimensions.
When you enlarge the grid using the red handles in the scene, blocks are added using the value of the last block in the list. Here, enlarging the grid adds blocks of 4500:
Here, the last block is 500 and so enlarging the grid adds blocks of 500:
Creating Unstructured TOUGH Models
Unstructured TOUGH models are built using Voronoi grid geometry, which typically allows for more detail than structured grids due to the variable size and shape of the cells. To create a new unstructured TOUGH model, you must first have at least one geological model defined in the project.
To create an unstructured TOUGH model, right-click on the Flow Models folder and select TOUGH > New Unstructured Model. The New Unstructured TOUGH Model window will appear, together with controls in the scene that will help you define the top and depth of the grid. In this example, a geological model has been added to the scene to aid in defining the TOUGH model:
A geological model or a combined model can be used for the initial grid dimensions. Select the model required from the Model to grid list and set the dimensions of the grid.
Once you have created an unstructured TOUGH model, you can edit the grid but you cannot change the Model to grid.
The Boundary can be rectangular or it can be defined from another object in the project.
The Simplify boundary option reduces the number of points along the boundary. Reducing the Tolerance value increases the number of points along the boundary. The two settings together let you define a basic boundary with elements that are roughly uniform in size, set by the value of Block size. Once you have created the grid, you will be able to add features to it, which will change the size of the blocks.
Layers will be uniform, but if you want more control over the layers, untick the Uniform Spacing option and click Layer Spacings to set custom layers:
There are four ways to change the spacings:
- Click on a value to edit it.
- Divide a row or column. Click on a row or column, then on the Divide Row or Divide Column button. Two new rows or columns will appear in the list.
- Merge rows or columns. Hold down the Shift key while clicking on each item, then click on the Merge Rows or Merge Columns button. The selected items will be combined.
- Set uniform spacing on selected rows or columns. You will be prompted to enter the number of cells you wish to create from the selected rows or columns.
In the New Unstructured TOUGH Model window, the Block size setting determines the basic size of the blocks that make up the grid, although the size will vary according to features applied to the grid and the Feature snapping distance. The size will also vary if the Simplify boundary option is unticked, in which case the Block size setting is the maximum size of the blocks.
The Feature snapping distance is automatically set to 1 percent of the Block size. To use a smaller snapping distance, untick the Auto box and set the value required. You cannot set a value that is larger than 1 percent of the Block size.
The effects of the Feature snapping distance do not become apparent until features have been added to the grid. When enabled, Leapfrog Energy will merge centroid points that would be closely spaced so that they occupy a single cell, as opposed to creating tiny cells to accommodate the points.
Click OK to create the model, which will appear in the project tree under the Flow Models folder:
Features are objects added to the model to help control where the cell centroids will be placed, which in turn can help with accuracy and localised detail when defining geologic features. These objects can be points (), lines () or polygons (), as well as existing fault planes, which are automatically added to the model if the model used as for gridding is a faulted model.
Double-click on the 2D grid () to see more detail about the grid’s features:
When a faulted geological model used to define the model, the geological model’s faults will be included on the grid as features.
When the model is created and there is only one drilling data set in the project, the well collars are added to the model as a feature. If there is more than one drilling data set in the project, no well collars will be added to the model; you will need to add one of the drilling data sets to the model manually. To do this, add the drilling data set as a feature, as described below.
Double-click on the wells object in the project tree to view the individual wells:
Untick any wells you do not want to use for defining the grid.
If screens are included in the well data, there will be a Use Screens option. When enabled, the x-y coordinates of the mid-point of the screen intervals will be used for the centre points. Otherwise, the x-y coordinates of the collar will be used.
Double-click on individual faults to change their settings.
To add features to the model, right-click on the 2D grid () in the project tree and select New Feature. The New TOUGH Feature window will appear:
Click the Select button to choose from suitable objects in the project. You can add Point, Line and Polygon features. Enabling the Simplify Feature option will reduce the number of points used.
Click OK to add the feature, which will appear in the project tree under the 2D grid object:
You can edit the feature by double-clicking on it or by right-clicking and selecting Open. However, the feature has not yet been applied to the grid. To enable the feature, double-click on the grid to open the Edit 2D TOUGH Unstructured Grid window. Tick the box to enable the feature, then adjust the number of Refinement Steps:
More Refinement Steps will produce more detail near the feature.
Click Apply or OK to view the effect the feature and its settings have on the grid.
If you want to modify a feature without having to reprocess the grid, untick it in the Features tab. If you want to delete a feature, right-click on it in the project tree and select Delete.
The images below show a grid displayed with collar points (in red) to demonstrate the effects of no features and collars applied with different refinement steps:
No features | Collars with 2 refinement steps | Collars with 10 refinement steps |
Importing TOUGH Models
You can import structured and unstructured TOUGH2 and TOUGH3 models into Leapfrog Energy, along with inputs (*.dat files) and outputs (*.listing, *.csv files). You do not need each file type to import a TOUGH model, as you can, for example:
- Import only a geometry file to check the geometry
- Import a geometry file and an inputs file to visualise the model inputs
- Import a geometry file and an outputs file to visualise the simulation outputs over time
Furthermore, if you have the inputs for a structured TOUGH model but do not have the geometry file, you can import the inputs file and Leapfrog Energy will attempt to reconstruct the geometry from the information in the inputs file.
Geometry information is required when importing simulation outputs, so when importing an outputs file, you must also import either a geometry file or an inputs file from which the geometry can be reconstructed.
Inputs and outputs can be imported when you import the TOUGH model, or you can import them later. See TOUGH Inputs and Outputs.
To import a TOUGH model, right-click on the Flow Models folder and select TOUGH > Import TOUGH. In the window that appears, select the file or files you wish to import by clicking the folder button () for the file type you wish to import and browsing for the file. In this example, we want to import inputs but do not have a geometry file.
Click Import to add the model to the project tree.
If you are importing only an inputs file and Leapfrog Energy cannot build the geometry from the information in the file, a message will be displayed. You will need the geometry file in order to import the model.
The TOUGH model will appear in the project tree under the Flow Models folder. If outputs are imported, they are added to the project tree in a separate folder.
The options available for the model depend on whether inputs or outputs have already been imported.
- If you only imported the geometry, you can edit the model’s parameters, generate rock types by evaluating another model and import inputs and outputs:
- If you imported the geometry and inputs, you can edit the model’s parameters, delete the inputs and import outputs:
- If you imported the geometry, inputs and outputs, you can edit the model’s parameters and delete the inputs:
If you delete inputs, you can then either import another inputs file or evaluate a model in the project on the grid to generate rock types as described in Generating Rock Types.
TOUGH Inputs and Outputs
TOUGH simulation inputs (*.dat files) can be imported for TOUGH models imported into Leapfrog Energy but not for TOUGH models created in Leapfrog Energy as rock types are generated from the model used as the basis for the TOUGH model.
TOUGH simulation outputs in *.listing and *.csv formats can be imported for TOUGH models imported into Leapfrog Energy and created in Leapfrog Energy. For TOUGH models created in Leapfrog Energy, a static model will first be created, and the outputs will be added to the static model. Note that this static copy is different from the static copies created for other types of Leapfrog Energy models, such as geological models, numeric interpolants and combined models. See Static Copies of TOUGH Models for more information.
Inputs and Outputs for TOUGH Models Imported Into Leapfrog Energy
TOUGH input and output files can be imported when a TOUGH model is imported into Leapfrog Energy but can also be imported later.
To import an inputs file for an imported TOUGH model, right-click on the model in the project tree and select Import TOUGH Inputs. In the window that appears, select the inputs file, then click Open. The information in the file will be added to the TOUGH model. If you later want to delete the inputs, right-click on the model and select Delete TOUGH Inputs. You can then import a different inputs file or generate rock types from a model in the project (see Generating Rock Types).
To import an outputs file for an imported TOUGH model, right-click on the model in the project tree and select Import TOUGH Simulation Outputs. In the window that appears, select the listing file, then click Open. The information in the file will be added to the TOUGH model in an outputs folder. To delete outputs, right-click on the outputs folder and select Delete Simulation Outputs. The folder and its contents will be deleted from the project. You can then import a different outputs file.
Inputs and Outputs for TOUGH Models Created in Leapfrog Energy
When you create a TOUGH model in Leapfrog Energy, rock types are automatically generated from the model used as the basis for the TOUGH model; you cannot import inputs for these models.
You can import outputs for a TOUGH model created in Leapfrog Energy. First, a static model will be created, and the imported outputs will be added to this static model.
To import an outputs file for a TOUGH model created in Leapfrog Energy, right-click on the model in the project tree and select Import TOUGH Simulation Outputs. You will be prompted to created a static copy of the model. Once the static model has been added to the project tree, you will be prompted to select the listing file. Select the file, then click Open. The information in the file will be added to the static model in an outputs folder. To delete outputs, right-click on the outputs folder and select Delete Simulation Outputs. The folder and its contents will be deleted from the project. You can then import a different outputs file.
Generating Rock Types
If you have not imported inputs onto an imported TOUGH model, you can generate rock types by evaluating a geological model or combined model in the project onto the TOUGH grid.
For TOUGH models created in Leapfrog Energy, the rock type table is automatically generated from the model used as a basis for the TOUGH model.
To generate rock types for an imported TOUGH model, right-click on the model in the project tree and select Generate Rock Types.
In the window that appears, select the model you wish to use, then click OK.
A Rock Types table with a Fault Rock Evaluation will be added to the model:
If the selected model has active faults, they will automatically be evaluated on the TOUGH grid, as shown above. If the selected model does not have active faults, the Fault Rock Evaluation will still be present but it is, in effect, only the model evaluation.
Change how faults are evaluated on the TOUGH model by double-clicking on the Fault Rock Evaluation. See Evaluating Faults on the Grid.
Edit rock type properties by double-clicking on the Rock Types table. See Editing Rock Type Properties.
Evaluating Faults on the Grid
A faulted rock type evaluation is based on the fault system of the model associated with the TOUGH model. For TOUGH models created in Leapfrog Energy, the faulted rocktype evaluation is automatically created when the TOUGH model is created; for imported TOUGH models, the evaluation is created when rock types are generated for the model.
Each fault is assigned its own lithology value and if more than one fault intersects a block, a combination lithology is created. For this grid, there are no faults enabled and so there are no fault lithologies:
Here a single fault, F1, has been added to the model. Where the fault intersects blocks, there are combinations of the fault lithology and the other lithologies:
The addition of a second fault, F2, results in more fault+lithology combinations:
To change which faults are evaluated, double-click on the Fault Rock Evaluation in the project tree. In the Edit Fault Rock Evaluation window, you can choose which of the model’s active faults are evaluated on the TOUGH grid.
The Thickness value represents the width of the fault’s crush zone. It is a distance value, and blocks within that distance are assigned the fault lithology. The default value is 0, which means that only blocks intersected by the fault will be assigned the fault lithology.
You can also change the evaluation names in the Fault Rock Evaluation window; simply double-click on the name and edit the text:
You can set rock type properties for the fault and combination lithologies. In the Edit Rock Type Properties window, the fault units are listed separately from the model’s lithological units:
Editing Rock Type Properties
To edit rock type properties for a TOUGH model, expand the model in the project tree and double-click on the Rock Types table. The Edit Rock Type Properties window will appear. This table shows properties for an unfaulted model, where properties can be set for each lithology in the model:
When a faulted model is evaluated on the grid, you can also change properties for the combination lithologies where the faults intersect blocks, as is the case here:
See Evaluating Faults on the Grid for more information on faulted model evaluations.
The tables shown above are those for One water simulations. For Two water simulations, there is an additional column, Initial mass fraction of water 2. The model parameters are changed by double-clicking on the TOUGH model in the project tree. See TOUGH Parameters for more information.
The NAD property is read-only and locked to zero.
In the Relative Permeability and Capillary Pressure tab, enter the Type of function and set the parameters.
Leapfrog Energy supports TOUGH2 two-phase functions:
- For relative permeability, IRP 1 to 8
- For capillary pressure, ICP 1, 2, 3, 4, 6, 7 and 8
You can export the rock type properties in *.csv format. To do this, right-click on the Rock Types tables and select Export Block Rock Types.
Editing TOUGH Model Parameters
Once you have imported or created a TOUGH model, you can edit information about the model by double-clicking on the model in the project tree or by right-clicking and selecting Edit Parameters. The Edit TOUGH Simulation Model Parameters window will appear.
The options in this window are largely the same regardless of whether a TOUGH model is structured or unstructured, created in Leapfrog Energy or imported. The main differences are as follows:
- The General tab contains TOUGH engine settings and different simulation parameters, which are described below.
- The Grid tab displays a summary of the grid definition for all TOUGH models.
- For structured TOUGH models created in Leapfrog Energy, you can edit the grid definition in this tab. See Editing the Grid Definition for a Structured TOUGH Model.
- For unstructured TOUGH models created in Leapfrog Energy, this tab only displays a summary. However, you can edit the grid definition by double-clicking on the grid () in the project tree, which opens the Edit Unstructured TOUGH Model window. All settings except for the Model to grid can be changed. The controls in this window are similar to those for creating the initial unstructured model; see Creating Unstructured TOUGH Models for more information on the settings in the Edit Unstructured TOUGH Model window.
- For TOUGH models imported into Leapfrog Energy, only a summary a displayed; the grid definition cannot be changed.
- The Parameters and Boundary Conditions tabs are the same regardless of whether the model is structured or unstructured, created in Leapfrog Energy or imported. See TOUGH Parameters and Boundary Conditions.
- The Generators tab applies to structured TOUGH models. See Defining Generators.
- The MINC tab contains settings relating to dual porosity. See Dual Porosity/MINC Support.
In the General tab, select the TOUGH Engine used and set the simulation parameters. When the Two water component is selected, a Mass Fraction option is available when setting rocktypes for the simulation. See Generating Rock Types for more information.
Note that if you select Two water, only the Nonisothermal option is available.
TOUGH Parameters
To change TOUGH parameters, double-click on the TOUGH model in the project tree. In the window that appears, click on the Parameters tab.
The Parameters tab is divided into a number of sub-tabs along the left-hand side of the window:
A negative value must be set for the Length of time steps (DELTEN) field before the Duration of timestep (DLT) fields can be set.
Once you have set the model parameters, click OK to make the changes.
Boundary Conditions
To change boundary conditions for a TOUGH model, double-click on the model in the project tree. In the window that appears, click on the Boundary Conditions tab.
For Atmosphere, you can choose between:
- A single block that forms the top of all the grid columns
- Individual atmosphere blocks for each grid column
The Pressure and Temperature Gas Saturation units are kPa.
Defining Generators
If well data in the project includes a screens table, you can define generators for a structured TOUGH model using the screens.
Before defining generators, it is important that the screens are correct and related to the wells; any errors in the screens table should be corrected before generators are defined.
To defined generators for a structured TOUGH model, double-click on the model in the project tree, then select the Generators tab.
If the Add button () at the bottom of the screen is greyed out, check that your screens table has been imported and that all errors in the table have been corrected.
Click the Add button () to add a generator. Select the well required from the Hole list:
The From - To list displays the screens available for the selected well.
Select whether the Type is Mass Injection, Mass Extraction or Heat, then enter the properties required for each Type.
You can edit any generator by clicking on it. You can also delete any generator by clicking on it and then clicking the Delete button ().
Dual Porosity/MINC Support
To model dual porosity, tick the box in the MINC tab:
All fields in the MINC tab will be disabled if you have not yet generated rock types for the model.
The maximum number of fractions is 3 and the sum must be one. The third fraction can be removed, but the volume fractions need to be adjusted so they add up to 1:
You cannot save the parameters unless the volume fractions are valid.
Once you have saved the parameters, the models original Rock Types table will be replaced, split into a Fracture Rock Types table and a Matrix Rock Types table:
Both tables can be exported in *.csv format.
Displaying TOUGH Models
Display a TOUGH model by dragging it into the scene:
You can display the model as blocks or points, and you can display all layers or only one layer:
You can select any input as a colour option in the shape list. If the input is time-dependent, a timestep slider will be available from the shape properties panel:
Click and drag the slider or click along the timeline to view the different timesteps available.
Static Copies of TOUGH Models
A static copy of a TOUGH model is one for which the grid geometry cannot be changed. When updates are made to the TOUGH model from which the static copy was created, these changes are not made to the static copy. However, the static copy is linked to the geological model or combined model on which the original TOUGH model was based, and changes made to that linked model will result in updates being made to the rock type table and assignment of rock types to the grid blocks.
The static copy for a TOUGH model is different from the static copies for other types of models, such as geological models, numeric models and combined models, where a static copy is a snapshot that does not change when data on which the original model was dependent is updated.
For a static copy of a TOUGH model, you can:
- Import outputs
- Change TOUGH parameters
- Edit rock type properties
- Export the model inputs and block lithologies
To make a static copy of a TOUGH model, right-click on the model in the project tree and select Static Copy. Enter a name for the copy of the model and click OK. The copy will be added to the Flow Models folder.
A static copy of a TOUGH model may also be created as part of importing outputs for a TOUGH model created in Leapfrog Energy, as described in TOUGH Inputs and Outputs.
Exporting TOUGH Models
Once a TOUGH model has rock types assigned, you can export the model inputs and the block lithologies.
Exporting TOUGH Inputs
To export TOUGH inputs, right-click on the TOUGH model in the project tree and select Export TOUGH Input. Leapfrog Energy will ask you to specify the file location. You will then be prompted for an output filename. Enter a name and click OK.
When you export a TOUGH model, two files are saved:
- The *.dat file is the TOUGH inputs.
- The *_geometry.dat file is the grid definition.
Exporting Block Lithologies
You can export the rock type properties in *.csv format. To do this, right-click on the Rock Types tables and select Export Block Rock Types. You will then be prompted for an output filename. Enter a name and click OK.
To export block lithologies from a TOUGH model, you must first associate the model with a geological model or a combined model.