geometry

geometry.MD_to_TVD(well, depth)[source]

It returns the coordinates X,Y and Z at a desired depth.

Parameters
  • well (str) – Selected well

  • depth (float) – Measure depth at which the X,Y,Z coordinate is needed

Returns

  • float – x_V : x position of desire point

  • float – y_V : y position of desire point

  • float – z_V : z position of desire point

Attention

The input information comes from the files input/ubication.csv and input/survey/{well}_MD.dat.

Note

A linear regression is used.

Examples

>>> MD_to_TVD('WELL-1',500)
geometry.MD_to_TVD_one_var_array(well, var_array, MD_array)[source]

It returns the position X, Y and Z for every point on a log along Pressure or Temperature.

Parameters
  • well (str) – Selected well

  • var_array (array) – It contains the log of pressure or temperature

  • MD_array (array) – It contains the measure depth values corresponding with every point on var_array

Returns

  • float – x_V : x position of desire point

  • float – y_V : y position of desire point

  • float – z_V : z position of desire point

  • array – v_V : contains the values of pressure or temperature for every coordinate

Attention

The input information comes from the files input/ubication.csv and input/survey/{well}_MD.dat.

Note

A linear regression is used.

Examples

>>> MD_to_TVD_one_var_array('WELL-1',data['Temp'],data['MD'],100)
geometry.PT_natural_to_GIS(input_dictionary)[source]

It generates a shapefile containing pressure and temperature real data from every well at every layer elevation

Parameters

input_dictionary (dictionary) – Contains the infomation of the layer under the keyword ‘LAYER’ and ‘z_ref’.

Returns

layer_{corr}_masl_{masl}.shp: on ../input/PT/GIS/

Return type

file

Note

The primary data comes from the defined formation data

Examples

>>> PT_natural_to_GIS(input_dictionary)
geometry.PT_real_to_json(input_dictionary)[source]

It writes a json file based on the formation data (pressure and temperature) at the level of the defined mesh layers.

Parameters

input_dictionary (dictionary) – Contains the infomation of the layer under the keyword ‘LAYER’ and ‘z_ref’.

Returns

PT_real_json: en direccion ../input/PT/PT_real_json.txt

Return type

file

Examples

>>> PT_real_to_json(input_dictionary)
geometry.P_from_T_TVD(T_array, TVD_array, water_level_TVD, Pmin)[source]

It generates a pressure log based on real temperature measurements and a hydrostatic level

Parameters
  • T_array (array) – Temperature values

  • TVD_array (array) – TVD values associate with every temperature record

  • water_level_TVD (float) – Hydrostatic level on TVD value

Returns

P: pressure values

Return type

array

Examples

>>> P_from_T_TVD(T_array,TVD_array,water_level_TVD,Pmin)
geometry.TVD_to_MD(well, TVD)[source]

It returns the measured depth position for a well based on a true vertical depth

Parameters
  • well (str) – Selected well

  • TVD (float) – Desire true vertical depth

Returns

MD : measure depth

Return type

float

Attention

The input information comes from the files input/ubication.csv and input/survey/{well}_MD.dat.

Note

A linear regression is used.

Examples

>>> TVD_to_MD('WELL-1',-100)
geometry.TVD_to_MD_array(well, TVD_array)[source]

It returns the measure depths for a desire list of true vertical depth values

Parameters
  • well (str) – Selected well

  • TVD_array (list) – List of true vertical depth values

Returns

MD : list of measure depth values

Return type

array

Attention

The input information comes from the files input/ubication.csv and input/survey/{well}_MD.dat.

Note

A linear regression is used.

Examples

>>>TVD_to_MD_array(‘WELL-1,data[‘TVD’])

geometry.feedzone_to_GIS(input_dictionary)[source]

It writes a shapefile (point type) from the wells feedzones position

Parameters

input_dictionary (dictionary) – Dictionary contaning the path and name of database on keyword ‘db_path’.

Returns

well_survey: on the path ../mesh/GIS

Return type

file

Examples

>>> feedzone_to_GIS(input_dictionary)
geometry.iter_TVD(input_dictionary, well)[source]
geometry.line_intersect(Ax1, Ay1, Ax2, Ay2, Bx1, By1, Bx2, By2)[source]

Finds the intersection point between two lines

Parameters

{letter}{position}{corr} (float) – Identifies the point A or B, the position (x or y ) and the correlative (1 or 2)

Returns

(x,y), if there is no intersection, None value is returned

Return type

tuple

geometry.remap(data)[source]

It returns an array with the number of values as the reference pressure array

Parameters

data (dict) – Contains ‘MD_P’,’P’ and ‘MD_T’ at least. The depths values for P are found base on the depths of MD_T

Returns

data : with ‘remap_P’ cointaning the values of P for the depths listed at MD_T

Return type

dict

geometry.survey_to_GIS(input_dictionary)[source]

It writes a shapefile (line type) from the wells surveys

Parameters

input_dictionary (dictionary) – Dictionary contaning the path and name of database on keyword ‘db_path’.

Returns

well_survey: on the path ../mesh/GIS

Return type

file

Examples

>>> survey_to_GIS(input_dictionary)
geometry.vertical_layers(input_dictionary)[source]

It returns the layers information on a dictionary

Returns

input_dictionary – Contains the infomation of the layer under the keyword ‘LAYER’ and ‘z_ref’.

Return type

dictionary

Returns

layers_info: dictionary with keywords; name, top, middle and bottom. The last three are float values

Return type

dictionary

geometry.write_feedzone_from_dict(wells)[source]

It generates a file on csv format containing the well feedzone position and coordinates from a python dictionary with well information

Parameters

wells (dictionary) – Contains the wells names, feedzone and contribution

Returns

well_feedzone: on ../input

Return type

file

Note

regeo_mesh uses this file as an input

Examples

>>> wells={'TR-1':{type_w':'OBS','feedzones':{'A':{'MD':600,'contribution':1}}}},
>>> write_feedzone_position_from_dict(wells)
geometry.write_feedzone_position(input_dictionary)[source]

It generates a file on csv format containing the well feedzone position and coordinates.

Parameters

input_dictionary (dictionary) – Contains the path of the input files under the keyword ‘sources_txt’

Returns

well_feezone_xyz: on ../input

Return type

file

Note

regeo_mesh uses this file as an input

Examples

>>> write_feedzone_position(source_txt='../input/')
geometry.write_feedzone_position_from_dict(wells)[source]

It generates a file on csv format containing the well feedzone position and coordinates from a python dictionary with well information

Parameters

wells (dictionary) – Contains the wells names, feedzone and contribution

Returns

well_feedzone_xyz: on ../input

Return type

file

Note

regeo_mesh uses this file as an input

Examples

>>> wells={'TR-1':{type_w':'OBS','feedzones':{'A':{'MD':600,'contribution':1}}}},
>>> write_feedzone_position_from_dict(wells)
geometry.write_well_track(input_dictionary)[source]

It converts every specified well survey using measure depth on true vertical depth survey

Parameters

input_dictionary (dictionary) – Contains list of wells under the keywords ‘WELLS’, ‘MAKE_UP_WELLS’ and ‘NOT_PRODUCING_WELL’. It also needs to contain the input files path.

Returns

{pozo}_xyz.csv: on ../input/survey/xyz

Return type

file

Examples

>>> write_well_track(input_dictionary)