Wrapper Class

React Data

class pytoughreact.wrapper.react_data.ReactData(filename, mode, read_function={'d': <function value_error_none.<locals>.fn>, 'e': <function value_error_none.<locals>.fn>, 'f': <function value_error_none.<locals>.fn>, 'g': <function value_error_none.<locals>.fn>, 's': <function value_error_none.<locals>.fn>, 'x': <function <lambda>>})[source]

Class for parsing REACTION data file.

__init__(filename, mode, read_function={'d': <function value_error_none.<locals>.fn>, 'e': <function value_error_none.<locals>.fn>, 'f': <function value_error_none.<locals>.fn>, 'g': <function value_error_none.<locals>.fn>, 's': <function value_error_none.<locals>.fn>, 'x': <function <lambda>>})[source]

Initialization of parameters

Parameters:
  • filename (string) – File name of the reaction data file

  • mode (str) – Mode in which to read the dat (read, write)

  • read_fuction (function) – Function for processing the different spacing forms

read_blocks(infile)[source]

Reads grid blocks.

Parameters:

infile (str) – Input file processor

React Block

class pytoughreact.wrapper.reactblock.T2Block(name='     ', volume=1.0, blockrocktype=None, blockzone=None, centre=None, atmosphere=False, ahtx=None, pmx=None, nseq=None, nadd=None)[source]

Grid block

__init__(name='     ', volume=1.0, blockrocktype=None, blockzone=None, centre=None, atmosphere=False, ahtx=None, pmx=None, nseq=None, nadd=None)[source]

Initialization of parameters

Parameters:
  • name (string) – Name of the block

  • volume (float) – Volume associated with the block

  • blockrocktype (rocktype) – Rock type of the block

  • blockzone (t2zone) – Zone the block is associated with

  • centre (float) – Center of the block

  • atmosphere (boolean) – If atmosphere present in block or not

  • ahtx (float) – Interface area (m2) for linear heat exchange with semi-infinite confining bed

  • pmx (float) – Block-by-block permeability modification coefficient

  • nseq (int) – Number of additional elements having the same volume and belonging to the same reservoir domain

  • nadd (int) – Increment between the code numbers of two successive elements

React Grid

class pytoughreact.wrapper.reactgrid.T2ReactGrid[source]
__init__()[source]

Initialization of parameters

add_block(newblock=None)[source]

Adds a block to the grid

Parameters:

newblock (T2block) – block to add to original react grid

add_zone(newzone=None)[source]

Adds a rock type to the grid. Any existing rocktype of the same name is replaced.

Parameters:

newzone (t2zone) – zone to add to original react grid

empty()[source]

Empties a TOUGH2 grid

fromgeo(geo, blockmap={})[source]

Converts a MULgraph grid to a TOUGH2 grid. The blockmap parameter applies an optional mapping to the block names from the geometry.

Parameters:
  • geo (MULgraph) – Dimension details of the grid

  • blockmap (dict) – Applies an optional mapping to the block names from the geometry.

get_num_zones()[source]

Return number of zones in grid

Returns:

output – Total number of zones in grid

Return type:

int

property num_zones

Return number of zones in grid

Returns:

output – Total number of zones in grid

Return type:

int

React Zone

class pytoughreact.wrapper.reactzone.T2Zone(name='default', water=None, mineral=None, gas=None, permporo=None, adsorption=None, decay=None, cation=None)[source]
__init__(name='default', water=None, mineral=None, gas=None, permporo=None, adsorption=None, decay=None, cation=None)[source]

Initialization of parameters

Parameters:
  • name (string) – Name of the zone

  • water (list[list[Water], list[Water]]) – List of initial and boundary waters

  • mineral (MineralZone) – Mineral composition present in the zone

  • gas (list[list[ReactGas], list[ReactGas]]) – List of all initial and injected gases

  • permporo (PermPoroZone) – Porosity Permeability relationship to be used in the zone

  • adsorption (list[list[Adsorb], list[Adsorb]]) – List of all initial and injected adsorption zones (Not Implemented yet)

  • decay (list[list[Decay], list[Decay]]) – List of all initial and injected decay zones (Not Implemented yet)

  • cation (list[list[Cation], list[Cation]]) – List of all initial and injected cation zones (Not Implemented yet)