model_plots

model_plots.check_gener_D(input_dictionary)[source]

It plots the listed wells on an input dictionary from the T2 input file.

Parameters

input_dictionary (dictionary) – It specifies the reference date

Returns

Individual plots for each source.

Return type

plot

model_plots.check_layers_and_feedzones(input_dictionary, show_fig, sav_fig)[source]

It return a plot with the well TVD and the stratigrafy units

Parameters
  • show_fig (bool) – If True shows the figure

  • sav_fig (bool) – If True saves the figure on ../output/

  • input_dictionary (dictionary) – Contains the layers information under the keyword ‘LAYER’ and ‘z_ref’. It also needs to specify the input files path under the keyword ‘source_txt’

Returns

well names on horizontal axis and feedzone depth on vertical axis

Return type

plot

Examples

>>> plot_vertical_layer_distribution(layers,z0_level,show_fig,sav_fig=True)
model_plots.mh_duplicates(input_dictionary, inspect_well)[source]

It plots over time the dates where there is mass flow and flowing enthalpy information

Parameters
  • input_dictionary (dictionary) – It lists all the wells includes under the key: ‘WELLS’

  • inspect_well (str) – It is a well in particular to be plotted with a different marker size

Returns

Individual plots for each source.

Return type

plot

model_plots.permeability_plot(input_dictionary, show_fig, sav_fig)[source]

It generates a plot for the permeability distribution. Currently just ‘Corey’ is available.

Parameters
  • input_dictionary (dictionary) – Contains the permeability distribution information under the keyword of ‘RPCAP’

  • sav_fig (bool) – If true saves the figure on ../output

  • slr (float) – Saturacion de liquido, tomado de model_conf

Returns

coreys_permeabilities.png: output figure

Return type

image

Examples

>>> permeability_plot(input_dictionary,show_fig=True,sav_fig=True)
model_plots.plot_init_conditions(input_dictionary, m, b, use_boiling=True, use_equation=False)[source]

Creates a plot for the initial pressure and temperature values

Parameters

input_dictionary (dictionary) – A dictionary containing 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

Pressure vs depth and temperature vs depth

Return type

plot

Examples

>>> plot_init_conditions(input_dictionary)
model_plots.plot_liquid_vs_WHP(well, savefig=False)[source]

Creates a scatter plots using liquid flow rate and wellhead pressure

Parameters
  • well (str) – Selected well

  • savefig (bool) – If true saves a figure in input/mh/images/{well}_scatter_WHP_lflow.png

Returns

WHP versus liquid flow

Return type

plot

Attention

The file ../input/mh/{well}_mh.dat must exist

Examples

>>> plot_liquid_vs_WHP('WELL-1')
model_plots.plot_one_cooling_and_drawdown_from_txt(well, depth)[source]

From the real cooling and drawdown data a plot is generated for a desired well

Parameters
  • well (str) – Selected well

  • depth (float) – Meters above the see level of desire plot

Returns

Temperature (yaxis1), pressure (yaxis2) and time

Return type

plot

Attention

The file input/cooling/{pozo}_DD.dat and input/drawdown/{pozo}_DD.dat must exist

Note

The depth must exists on the cooling and drawdown files

Examples

>>> plot_one_cooling_and_drawdown_from_txt('WELL-1',0)
model_plots.plot_one_cooling_from_txt(well, depth)[source]

From the real cooling data a plot is generated for a desired well

Parameters
  • well (str) – Selected well

  • depth (float) – Meters above the see level of desire plot

Returns

Pressure vs time

Return type

plot

Attention

The file input/cooling/{pozo}_DD.dat must exist

Note

The depth must exists on the cooling file

Examples

>>> plot_one_cooling_from_txt('WELL-1',0)
model_plots.plot_one_drawdown_from_txt(well, depth, savefig=False)[source]

From the real drawndown data a plot is generated for a desired well

Parameters
  • well (str) – Selected well

  • depth (float) – Meters above the see level of desire plot

Returns

Pressure vs time

Return type

plot

Attention

The file input/drawdown/{pozo}_DD.dat must exist

Note

The depth must exists on the drawdown file

Examples

>>> plot_one_drawdown_from_txt('WELL-1',0)
model_plots.plot_one_mh_from_txt(well, savefig=False)[source]

Creates a plot using the flow and enthalpy measurements

Parameters

well (str) – Selected well

Returns

Enthalpy (yaxis1), flow (yaxis2) vs time

Return type

plot

Attention

The file ../input/mh/{well}_mh.dat must exist

Examples

>>> plot_one_mh_from_txt('WELL-1')
model_plots.plot_total_vs_WHP(well, savefig=False)[source]

Creates a plot using total flow and WHP

Parameters
  • well (str) – Selected well

  • savefig (bool) – If true saves a figure in input/mh/images/{well}_producer.png

Returns

Total fluid versus WHP

Return type

plot

Attention

The file ../input/mh/{well}_mh.dat must exist

Examples

>>> plot_total_vs_WHP('WELL-1')
model_plots.plot_vertical_layer_distribution(show_fig, sav_fig, input_dictionary)[source]

It plots the layers defined for the mesh

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

  • show_fig (bool) – If True shows the figure

  • sav_fig (bool) – If True saves the figure on ../output/

Returns

vertical_distribution.png: output figure

Return type

image

Examples

>>> plot_vertical_layer_distribution(show_fig=True,sav_fig=False,input_dictionary)
model_plots.resample(well, type_well, save_fig=True, approach='ffill')[source]

It resamples a well, based on two approches: forward filling or cummulative sum

Parameters
  • type_well (str) – Either injector or prducer

  • well (str) – Well to be resample

  • save_fig (bool) – If True it saves some images in input/mh/filtered showing comparisons and time series

  • approach (str) – Either ffill or acc

Returns

Values every 15th of every month in input/mh/filtered/{well}_week_avg.csv

Return type

File

model_plots.total_flow(wells, savefig=False, ffill=False, inspect=[])[source]

Creates a plot using total flow and WHP

Parameters
  • wells (list) – List of wells to evalute

  • savefig (bool) – If true saves a figure in input/mh/images/total_flow.png

  • ffill (bool) – If True, it does a forward fill for every well

  • inspect (list) – Wells to be plotted individually

Returns

Plot a time series including: Total, Steam, Liquid, and Injection from the weekly average, and Steam real and Liquid real from the raw data

Return type

plot

Attention

The file input/mh/{well}_mh.dat and input/mhfiltered/%s_week_avg.csv must exist