t2geores_functions¶
- t2geores_functions.bottom_layer_incons(input_dictionary, input_mesh_dictionary, m, b, use_boiling=True, use_equation=False, cut_off_T=150, cut_off_P=1)[source]¶
Modifies the incon file base on real data a the bottom or last known elevation
- Parameters
input_dictionary (dictionary) – List the well names, define the INCONS_PARAM and source_txt file.
input_mesh_dictionary (dictionary) – Specify the polygon border defiding path
cut_off_T (float) – The heighest value of temperature a the bottom layer
cut_off_P (float) – The heighest value of pressure a the bottom layer
use_equation (bool) – If true the variables m and b will be use to extrapolate the values to the bottom layer
use_boiling (bool) – If true the boiling conditions will be use for calculating the bottom conditions
Note
A file called INCON_MOD will be modified on t2/sources.Thus, it has to be used after top_layer_incons
- t2geores_functions.check_in_out(point, borders)[source]¶
It checks if a point is outside or inside of a given area
- Parameters
point (array) – x and y position
borders (array) – Contains the array defining a close polygon
- t2geores_functions.create_structure(structure, current_path)[source]¶
It creates the necessary structure for T2GEORES to work
- Parameters
structure (dictionary) – It is an internal structure dictionary defined on formats.py
current_path (str) – It specifies the path where the structure will be constructed
Note
A good practice is to create a folder for the whole model
Examples
>>> create_structure(current_path='.')
- t2geores_functions.empty_model(structure, current_path='../')[source]¶
It erases all the file on the T2GEORES structure except the input and scripts folders
- Parameters
structure (dictionary) – It is an internal structure dictionary defined on formats.py
current_path (str) – It specifies the top folder of the structure, if the function is executed from scripts current_path is ‘../’
Attention
It will erase all the output data, mesh and images on the model.
Examples
>>> empty_model(current_path='../')
- t2geores_functions.incon_from_steinar()[source]¶
It converts an incon file modified or created in steinar into a TOUGH2 format
Attention
It reads the file: ‘../mesh/to_steinar/incon’
- Returns
STE_INCON: at ../model/t2/sources/
- Return type
file
- t2geores_functions.incon_to_steinar(sav=None)[source]¶
It converts the modified INCON file (INCON_MOD) to steinar input
Note
It will write a file called incon_to_steinar on the sources file
Examples
>>> create_structure(current_path='.')
- t2geores_functions.incons(input_dictionary, m, b, use_boiling=True, use_equation=False)[source]¶
It returns the coordinates X,Y and Z at a desired depth.
- Parameters
input_dictionary (dictionary) – Contains the infomation of the layer under the keyword ‘LAYER’ and ‘z_ref’. Also it contains the keyword ‘INCONS_PARAM’ with the specified initial conditions, i.e.:’INCONS_PARAM’:{‘To’:30,’GRADTZ’:0.08,’DEPTH_TO_SURF’:100,’DELTAZ’:20}
m (float) – Pressure slope on a TVD vs P plot
b (float) – Pressure intercept on a TVD vs P plot
use_equation (bool) – If true the variables m and b will be use to extrapolate the values to the bottom layer
use_boiling (bool) – If true the boiling conditions will be use for calculating the bottom conditions
- Returns
INCON : on model/t2/sources
- Return type
file
Attention
It requires an updated ELEME.json
Note
Boiling conditions are assumed
Examples
>>> incons(input_dictionary)
- t2geores_functions.initial_conditions(input_dictionary, m, b, use_boiling=True, use_equation=False)[source]¶
Generates the tempearture and pressure initial conditions assuming boiling from top to bottom layer
- Parameters
input_dictionary (dictionary) – Contains the infomation of the layer under the keyword ‘LAYER’ and ‘z_ref’. Also it contains the keyword ‘INCONS_PARAM’ with the specified initial conditions, i.e.:’INCONS_PARAM’:{‘To’:30,’GRADTZ’:0.08,’DEPTH_TO_SURF’:100,’DELTAZ’:20}
- Returns
list – T: initial list of temperature
list – P: initial list of pressure
list – depth: range of depth coming from layers
- t2geores_functions.patmfromelev(elev)[source]¶
It fines the atmospheric pressure base on an approximate formula
- Parameters
elev – masl where the pressure is needed
- Returns
Atmospheric pressure in bar
- Return type
float
Examples
>>> patmfromelev(750)
- t2geores_functions.top_layer_incons(input_dictionary, input_mesh_dictionary, cut_off_T=150, cut_off_P=1)[source]¶
Modifies the incon file base on real data a the top elevation
- Parameters
input_dictionary (dictionary) – List the well names, define the INCONS_PARAM and source_txt file.
input_mesh_dictionary (dictionary) – Specify the polygon border defiding path
cut_off_T (float) – The heighest value of temperature a the top layer
cut_off_P (float) – The heighest value of pressure a the top layer
Note
A file called INCON_MOD will be created on t2/sources
- t2geores_functions.water_level_projection(MD, P, Tmin)[source]¶
It projects the water level based on a pressure log
- Parameters
MD (array) – Measure depth array
P (array) – Pressure array
Tmin (float) – Minimun temperature allowed
- Returns
float – D2: water leverl projection
float – Pmin: pressure at water level
Examples
>>> water_level_projection(MD,P,120)