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 columnssatcol (
str
) – Column name for the saturation columnkr1col (
str
) – Column name for first relperm columnkr2col (
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 dataxcol (
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.