pyscal.gaswater
Object to represent GasWater, implemented as a Container object for one WaterOil and one GasOil object
- class pyscal.gaswater.GasWater(swirr=0.0, swl=0.0, sgl=0.0, swcr=0.0, sgrw=0.0, sgcr=0.0, h=None, tag='', fast=False)[source]
A representation of two-phase properties for gas-water
Internally, this class handles gas-water by using one WaterOil object and one GasOil object, with dummy parameters for oil.
- Parameters:
swirr (
float
) – Irreducible water saturation for capillary pressureswl (
float
) – First water saturation point in outputted tables.sgl (
float
) – Minimum gas saturation in a gas paleozone.swcr (
float
) – Critical water saturation, water is immobile below thissgrw (
float
) – Residual gas saturation after water flooding.sgcr (
float
) – Critical gas saturation, gas is immobile below thish (
Optional
[float
]) – Saturation intervals in generated tables.tag (
str
) – Optional text that will be included as comments.fast (
bool
) – Set to True if you prefer speed over robustness. Not recommended, pyscal will not guarantee valid output in this mode.
- SGFN(header=True, dataincommentrow=True)[source]
Produce SGFN input for Eclipse reservoir simulator.
The columns sg and krg are outputted and formatted accordingly.
Meta-information for the tabulated data are printed as Eclipse comments.
- Parameters:
header (
bool
) – boolean for whether the SGFN string should be emitted. If you have multiple satnums, you should have True only for the first (or False for all, and emit the SGFN yourself). Defaults to True.dataincommentrow (
bool
) – boolean for wheter metadata should be printed, defaults to True.
- SWFN(header=True, dataincommentrow=True)[source]
Produce SWFN input to Eclipse
The columns sw, krw and pc are outputted and formatted accordingly.
Meta-information for the tabulated data are printed as Eclipse comments.
- Parameters:
header (
bool
) – boolean for whether the SWFN string should be emitted. If you have multiple satnums, you should have True only for the first (or False for all, and emit the SWFN yourself). Defaults to True.dataincommentrow (
bool
) – boolean for wheter metadata should be printed, defaults to True.
- add_LET_gas(l=2.0, e=2.0, t=2.0, krgend=1.0)[source]
Add krg data through the LET parametrization
A column named ‘krg’ will be added. If it exists, it will be replaced.
- Parameters:
l (
float
) – LET parametere (
float
) – LET parametert (
float
) – LET parameterkrgend (
float
) – value of krg at swl
- Return type:
None
- add_LET_water(l=2.0, e=2.0, t=2.0, krwend=1.0, krwmax=None)[source]
Add krw data through LET parametrization
The LET model applies for sw < 1 - sgrw. For higher water saturations, krw is linear between krwend and krwmax.
krwmax will be ignored if sorw is close to zero.
- Parameters:
l (
float
) – LET parametere (
float
) – LET parametert (
float
) – LET parameterkrwend (
float
) – value of krw at 1 - sorwkrwmax (
Optional
[float
]) – maximal value at Sw=1. Default 1
- Return type:
None
- add_corey_gas(ng=2.0, krgend=1.0)[source]
Add krg data through the Corey parametrization
A column named ‘krg’ will be added. If it exists, it will be replaced.
- Parameters:
ng (
float
) – Corey parameter for gaskrgend (
float
) – value of krg at swl.
- Return type:
None
- add_corey_water(nw=2.0, krwend=1.0, krwmax=None)[source]
Add krw data through the Corey parametrization
A column named ‘krw’ will be added. If it exists, it will be replaced.
The Corey model applies for sw < 1 - sgrw. For higher water saturations, krw is linear between krwend and krwmax.
krwmax will be ignored if sgrw is close to zero
- Parameters:
nw (
float
) – Corey parameter for water.krwend (
float
) – value of krw at 1 - sgcr.krwmax (
Optional
[float
]) – maximal value at Sw=1. Default 1
- Return type:
None
- add_simple_J(a=5.0, b=-1.5, poro_ref=0.25, perm_ref=100.0, drho=300.0, g=9.81)[source]
Add capillary pressure function from a simplified J-function
This is the RMS version of the coefficients a and b, the formula used is
\[J = a S_w^b\]J is not dimensionless in this equation. The capillary pressure will be in bars.
This is identical to the also seen formula
\[J = 10^{b \log(S_w) + \log(a)}\]\(S_w\) in this formula is normalized with respect to the swirr variable of the WaterOil object.
- Parameters:
a (
float
) – a coefficientb (
float
) – b coefficientporo_ref (
float
) – Reference porosity for scaling to Pc, between 0 and 1perm_ref (
float
) – Reference permeability for scaling to Pc, in milliDarcydrho (
float
) – Density difference between water and oil, in SI units kg/m³. Default value is 300g (
float
) – Gravitational acceleration, in SI units m/s², default value is 9.81
- Return type:
None
- Returns:
None. Modifies pc column in self.table, using bar as pressure unit.
- add_simple_J_petro(a, b, poro_ref=0.25, perm_ref=100.0, drho=300.0, g=9.81)[source]
Add capillary pressure function from a simplified J-function
This is the petrophysical version of the coefficients a and b, the formula used is
\[J = \left(\frac{S_w}{a}\right)^{\frac{1}{b}}\]which is identical to
\[J = 10^\frac{\log(S_w) - \log(a)}{b}\]J is not dimensionless in this equation.
\(S_w\) in this formula is normalized with respect to the swirr variable of the WaterOil object.
- Parameters:
a (
float
) – a coefficient, petrophysical versionb (
float
) – b coefficient, petrophysical versionporo_ref (
float
) – Reference porosity for scaling to Pc, between 0 and 1perm_ref (
float
) – Reference permeability for scaling to Pc, in milliDarcydrho (
float
) – Density difference between water and oil, in SI units kg/m³. Default value is 300g (
float
) – Gravitational acceleration, in SI units m/s², default value is 9.81
- Return type:
None
- Returns:
None. Modifies pc column in self.table, using bar as pressure unit.
- crosspoint()[source]
Calculate the sw value where krg == krw.
Accuracy of this crosspoint depends on the resolution chosen when initializing the saturation range (it uses linear interpolation to solve for the zero)
- Return type:
Optional
[float
]- Returns:
The gas saturation where krw == krg, for relperm linearly interpolated in water saturation.
- property krgcomment: str
Get a string representation describing krg
- property krwcomment: str
Get a string representation describing krw
- plotkrwkrg(mpl_ax=None, color='blue', alpha=1, linewidth=1, linestyle='-', marker=None, label='', logyscale=False)[source]
Plot krw and krg
If the argument ‘mpl_ax’ is not supplied, a new plot window will be made. If supplied, it will draw on the specified axis.
- selfcheck()[source]
Run selfcheck on the data.
Performs tests if necessary data is ready in the object for printing Eclipse include files, and checks some numerical properties (direction and monotonicity)
- Return type:
bool
- property sgcomment: str
Get a string representation of the endpoints used for gas
- property swcomment: str
Get a string representation of the endpoints used for water
- property swcr: float
Get the swcr
- property swirr: float
Get the swirr, irreducible water saturation used for pc-init
- property swl: float
Get the swl
- property tag: str
Get the user configured tag