resqpy.olio.relperm.RelPerm¶
- class resqpy.olio.relperm.RelPerm(model, uuid=None, df=None, uom_list=None, realization=None, phase_combo=None, low_sal=False, table_index=None, title='relperm_table', column_lookup_uuid=None, uom_lookup_uuid=None)[source]¶
Bases:
DataFrame
Class for storing and retrieving a pandas dataframe of relative permeability data.
Note
inherits from DataFrame class
Methods:
__init__
(model[, uuid, df, uom_list, ...])Create a new RelPerm object from either a previously stored object or a pandas dataframe.
interpolate_point
(saturation, kr_or_pc_col)Returns a tuple of the saturation value and the corresponding interpolated rel.
df_to_text
(filepath, filename)Creates a text file from a dataframe of relative permeability and capillary pressure data.
Write relative permeability table data to hdf5 file and create xml for dataframe objects.
Inherited from
DataFrame
__init__
(model[, uuid, df, uom_list, ...])Create a new RelPerm object from either a previously stored object or a pandas dataframe.
Returns the Dataframe as a pandas DataFrame.
column_uom
(col_index)Returns units of measure for the specified column, or Euc if no units present.
Write relative permeability table data to hdf5 file and create xml for dataframe objects.
- __init__(model, uuid=None, df=None, uom_list=None, realization=None, phase_combo=None, low_sal=False, table_index=None, title='relperm_table', column_lookup_uuid=None, uom_lookup_uuid=None)[source]¶
Create a new RelPerm object from either a previously stored object or a pandas dataframe.
- Parameters
phase_combo (str, optional) – the combination of phases whose relative permeability behaviour is described. Options include ‘water-oil’, ‘gas-oil’ and ‘gas-water’
low_sal (boolean, optional) – if True, indicates that the water-oil table contains the low-salinity data for relative permeability and capillary pressure
table_index (int, optional) – the index of the relative permeability
Note (table when multiple relative permeability tables are present.) –
1. (indices should start at) –
Note
see DataFrame class docstring for details of other arguments
- interpolate_point(saturation, kr_or_pc_col)[source]¶
Returns a tuple of the saturation value and the corresponding interpolated rel. perm. or cap. pressure value.
- Parameters
saturation (float) – the saturation at which the relative permeability or cap. pressure will be interpolated
kr_or_pc_col (str) – the column name of the parameter to be interpolated
- Returns
tuple of float, the first element is the saturation and the second element is the interpolated value
Note
A simple linear interpolation is performed.
- df_to_text(filepath, filename)[source]¶
Creates a text file from a dataframe of relative permeability and capillary pressure data.
- Parameters
filepath (str) – location where new text file is written to
filename (str) – name of the new text file
- Returns
tuple of float, the first element is the saturation and the second element is the interpolated value
Note
- Only Nexus compatible text files are currently supported. Text files that are compatible with other reservoir
simulators may be supported in the future.
- column_uom(col_index)¶
Returns units of measure for the specified column, or Euc if no units present.
- dataframe()¶
Returns the Dataframe as a pandas DataFrame.