run

run.copy_folder(src, dest)[source]

It copies all the files on a folder to another folder

Parameters
  • src (str) – Source directory

  • dest (str) – Output directory

Examples

>>> copy_folder('../model/t2','../model/t2/prev')
run.create_prev()[source]

It creates a copy of several folder for further comparisson

Note

The folders to copy are: ‘../model/t2’ ‘../output/PT/images’ ‘../output/PT/json’ ‘../output/PT/txt’ ‘../output/PT/evol’ ‘../output/mh’ All of them contains a subfolder prev where the data is stored

Examples

>>> create_prev()
run.incon_delete()[source]

It reads the TOUGH2 file assuming it is on ../model/t2/ and erases the INCON section

Returns

t2: file without INCON information

Return type

file

Attention

There is no need of input argument

Examples

>>> incon_delete()
run.incon_replace(incon_file, blocks, incon_file_len)[source]

It rewrite the incon file without the porosity, depending if it comes from .sav file or INCON generated with T2GEORES

Parameters
  • incon_file (str) – incon file to be rearange

  • blocks (str) – Declares if the file has the block information on even or odd lines

  • incon_file_len (int) – Length of incon file

Returns

string: formatted string with incon data

Return type

str

Attention

The function is called by incon_to_t2()

run.incon_to_t2(input_dictionary, file_name=None)[source]

Adds the INCON block to the TOUGH2 input file

Parameters

input_dictionary (dictionary) – Dictionary contanining the information of the source of incon with keyword ‘incon_state’ can take the value of ‘current’ or ‘init’.

Returns

t2: modified file on ../model/t2/t2

Return type

file

Examples

>>> incon_to_t2(input_dictionary)
run.rock_update(input_dictionary)[source]

It updates the rock type on the TOUGH2 file

Parameters

input_dictionary (dictionary) – TOUGH2 file name

run.run(input_dictionary)[source]

It runs the TOUGH2 input file

Parameters

input_dictionary (dictionary) – A dictionary with the EOS used on the model

Returns

various: containing the output from modelling

Return type

files

run.update_gen(input_dictionary)[source]

It updates the file the TOUGH2 input file based on the previous updates of all files on ../model/t2/sources/GENER_*

Parameters

input_dictionary (dictionary) – Dictionary contaning the type of desire run ‘production’ or ‘natural’ written on the keyword ‘TYPE_RUN’

Returns

t2: file with the modified version of GENER

Return type

file

Note

Some print sentences are expected depending on the availability of certain files

Examples

>>> update_gen(input_dictionary)
run.update_rock_distribution(input_dictionary)[source]

It updates the file the TOUGH2 input file based on the new rock distribution

Parameters

input_dictionary (dictionary) – Dictionary contaning the information where the rock distribution comes from

Returns

t2: file with the modified version of ELEME and CONNE

Return type

file

Examples

>>> update_rock_distribution(input_dictionary)