plopm.utils.readers module

Utiliy functions to read the OPM Flow simulator type output files.

plopm.utils.readers.get_faults(dic, n)

Using the input deck (.DATA) to read the i,j fault locations

Args:

dic (dict): Global dictionary

Returns:

dic (dict): Modified global dictionary

plopm.utils.readers.get_quantity(dic, name, n, nrst)

Compute the mass (intensive quantities).

Args:

dic (dict): Global dictionary

name (str): Name of the variable

skl (float): Scaling for the mass quantity

nrst (int): Number of restart step

Returns:

unit (str): Corresponding physical unit

quan (array): Floats with the requested quantity

plopm.utils.readers.get_readers(dic)

Load the opm/resdata methods

Args:

dic (dict): Global dictionary

Returns:

dic (dict): Modified global dictionary

plopm.utils.readers.get_unit(name)

Get the variable unit

Args:

name (str): Variable

Returns:

dic (dict): Modified global dictionary

plopm.utils.readers.get_wells(dic, n)

Using the input deck (.DATA) to read the i,j well locations

Args:

dic (dict): Global dictionary

Returns:

dic (dict): Modified global dictionary

plopm.utils.readers.get_xycoords_opm(dic, n)

Handle the coordinates from the OPM Grid to the 2D xy-mesh using opm

Args:

dic (dict): Global dictionary

Returns:

dic (dict): Modified global dictionary

plopm.utils.readers.get_xycoords_resdata(dic, m)

Handle the coordinates from the OPM Grid to the 2D xy-mesh using resdata

Args:

dic (dict): Global dictionary

Returns:

dic (dict): Modified global dictionary

plopm.utils.readers.get_xzcoords_opm(dic, n)

Handle the coordinates from the OPM Grid to the 2D xz-mesh using opm

Args:

dic (dict): Global dictionary

Returns:

dic (dict): Modified global dictionary

plopm.utils.readers.get_xzcoords_resdata(dic, m)

Handle the coordinates from the OPM Grid to the 2D xz-mesh using resdata

Args:

dic (dict): Global dictionary

Returns:

dic (dict): Modified global dictionary

plopm.utils.readers.get_yzcoords_opm(dic, n)

Handle the coordinates from the OPM Grid to the 2D yz-mesh using opm

Args:

dic (dict): Global dictionary

Returns:

dic (dict): Modified global dictionary

plopm.utils.readers.get_yzcoords_resdata(dic, m)

Handle the coordinates from the OPM Grid to the 2D yz-mesh using resdata

Args:

dic (dict): Global dictionary

Returns:

dic (dict): Modified global dictionary

plopm.utils.readers.handle_mass(dic, name, nrst)

Compute the mass (intensive quantities).

Args:

dic (dict): Global dictionary

name (str): Name of the variable for the mass spatial map

nrst (int): Number of restart step

Returns:

mass (array): Floats with the computed mass

plopm.utils.readers.initialize_time(times)

Handle the time units for the x axis in the summary

Args:

times (str): Type for the time to plot

Returns:

scale (float): Scale for the times

unit (str): Units for the x label

plopm.utils.readers.operate(var, quan1, i, oper)

Applied the requested operation

Args:

var (array): Floats with the current values

quan1 (array): Value(s) to operate

i (int): Index of the operator

oper (list): Input operators

Returns:

var (array): Modified values after applying the operator

plopm.utils.readers.read_summary(dic, case, quan, tunit, qskl)

Handle the summary vectors

Args:

dic (dict): Global dictionary

Returns:

dic (dict): Modified global dictionary

plopm.utils.readers.type_of_mass(name, co2_g, co2_d, h2o_l, h2o_v, x_l_co2, x_g_h2o)

From the given variable return the associated mass

Args:

name (str): Name of the variable for the mass spatial map

co2_g: Mass of CO2 in the gas phase

co2_d: Mass of CO2 in the liquid phase

h2o_l: Mass of H2O in the liquid phase

h2o_v: Mass of H2O in the gas phase

Returns:

mass (array): Floats with the computed mass