pyscal.utils.relperm

Utility functions for computations on relative permeability curves

pyscal.utils.relperm.crosspoint(dframe, satcol, kr1col, kr2col)[source]

Locate the saturation value (crosspoint) where kr1col == kr2col

Parameters:
  • dframe (DataFrame) – Dataframe with at least three columns

  • satcol (str) – Column name for the saturation column

  • kr1col (str) – Column name for first relperm column

  • kr2col (str) – Column name for second column

Return type:

float

Returns:

The saturation value (interpolated) where kr1col == kr2col, when krXcol is linearly interpolated as a function of the saturation values. In case of errors, the function will return the value -1

pyscal.utils.relperm.estimate_diffjumppoint(table, xcol=None, ycol=None, side='right')[source]

Estimate the point where the y-data jumps from being linear in x to being nonlinear, or where it shift from one linear domain to another (for a piecewise linear function)

If xcol is sw, and ycol is krw, and side is ‘right’, this will typically estimate sorw for you. If side is ‘left’ it will give you swcr.

Parameters:
  • table (DataFrame) – A Dataframe with x and y data

  • xcol (Optional[str]) – The name of the column in table containing x-data. If None (default) the first column in table will be used.

  • ycol (Optional[str]) – The name of the column in table containing y-data. If None (default) the second column in the table will be used.

  • side (str) – Must be ‘left’ or ‘right’. Decides whether to look from the right side of the x-interval or from the left side for the linear domain.

Return type:

float

Returns:

The x value where the start-linear domain ends.

pyscal.utils.relperm.truncate_zeroness(value, zeronesslimit=0.0001, name='', log=True)[source]

Check a value for closeness to zero, and return as zero if below a given limit, if not return the value

Return type:

float