SaturationModule

petrophys.interpretation.saturation.SaturationModule

Also available as petrophys.interpretation.SaturationModule

class SaturationModule(
a=DefaultParameters.ARCHIE_A,
m=DefaultParameters.ARCHIE_M,
n=DefaultParameters.ARCHIE_N,
model='auto',
vcl_cutoff=0.3,
sxo_quicklook_fallback='per_sample',
depthwise_curve_merge=True,
rwb_fallback=None,
effective_waxman_smits=False,
)[source]

Water saturation calculator with automatic model selection.

Model selection criteria (from design doc flowchart):

VCL < vcl_cutoff  -> CLEAN -> Archie
VCL >= vcl_cutoff -> SHALY:
    Carbonate with an Rwb -> Dual Water
    Clastic, or carbonate without an Rwb:
        CEC and B_COEFF available -> Waxman-Smits
        salinity >= 20 kppm -> Simandoux
        salinity < 20 kppm -> Indonesia

Lithology may be a single string or a per-depth numpy array. When auto-routing is active, the clean/shaly decision is applied sample-by-sample so a single well can use multiple Sw models across depth.

Parameters:
  • a (float, optional) – Tortuosity factor (default: 1.0)

  • m (float, optional) – Cementation exponent (default: 2.0)

  • n (float, optional) – Saturation exponent (default: 2.0)

  • model (str, optional) – Force specific model (default: “auto”)

  • vcl_cutoff (float, optional) – VCL threshold for clean vs shaly (default: 0.3)

  • sxo_quicklook_fallback ({"per_sample", "whole_curve"}, optional) – How the quick-look relation SXO = SW**0.2 stands in for the invaded-zone Archie SXO. "per_sample" (default) fills every sample whose Archie SXO is not finite; "whole_curve" uses it only where the invaded-zone inputs are missing altogether, leaving single non-finite Archie samples NaN.

  • depthwise_curve_merge (bool, optional) – Fill the missing samples of the invaded-zone resistivity from the next candidate curve (RXO, RSHA, RESS), depth by depth (default: True). When False the first of them on the well is used as it stands.

  • rwb_fallback (float or None, optional) – Bound-water resistivity Dual Water takes when no rwb is given, as a multiple of Rw. Default None: Rwb is not estimated, so Dual Water runs only with a supplied rwb. Auto routing then gives shaly carbonate samples without one the clastic routing (Waxman-Smits with CEC and B, Simandoux at a salinity of 20 kppm or more, otherwise Indonesia) and counts them in SaturationResult.fallback_counts; model="dual_water" raises ValueError. A number takes Rwb = rwb_fallback * Rw, an assumption rather than a measurement; the “geolink” calculation profile of petrophys.interpret() pins 0.3.

  • effective_waxman_smits (bool, optional) – Report the Waxman-Smits saturation, which is solved on total porosity, on the effective-porosity basis of the other models, Swe = 1 - (PHIT / PHIE) * (1 - Swt) (Crain’s Petrophysical Handbook), so that SW can be paired with PHIE downstream. The hydrocarbon pore volume PHIE * (1 - Swe) = PHIT * (1 - Swt) is kept wherever Swt is at least the bound-water fraction (PHIT - PHIE) / PHIT. Below it the resistivity leaves less water than the clay-bound water, the hydrocarbon volume would exceed PHIE, and SW is clipped to 0; such samples are counted in SaturationResult.waxman_smits_clipped_to_zero. Pass phit on the same basis as phie. Default False (total-porosity Swt); petrophys.interpret() uses True in its default "current" calculation profile.

Examples

>>> sw_calc = SaturationModule()
>>> result = sw_calc.calculate(well, rw=0.05, lithology='carbonate')

Attributes

sxo_quicklook_fallback

How the quick-look SW**0.2 relation stands in for the invaded-zone Archie SXO.

depthwise_curve_merge

Fill a curve's missing samples from the next candidate curve.

rwb_fallback

Rwb as a multiple of Rw when Dual Water gets no rwb; None requires a supplied Rwb.

effective_waxman_smits

Convert the total-porosity Waxman-Smits Sw to the effective basis.

Methods

calculate

Calculate water saturation.

sxo_quicklook_fallback

How the quick-look SW**0.2 relation stands in for the invaded-zone Archie SXO. "per_sample" fills every sample whose Archie SXO is not finite. "whole_curve" uses it only where the invaded-zone inputs are missing altogether, leaving individual non-finite Archie samples as NaN.

depthwise_curve_merge

Fill a curve’s missing samples from the next candidate curve. When False the first candidate curve present is used as it stands.

rwb_fallback

Rwb as a multiple of Rw when Dual Water gets no rwb; None requires a supplied Rwb.

effective_waxman_smits

Convert the total-porosity Waxman-Smits Sw to the effective basis.

calculate(
well,
rw,
rcl=None,
salinity=None,
rmf=None,
vcl=None,
phie=None,
phit=None,
lithology='clastic',
cec=None,
b_coeff=None,
rho_ma=2.65,
m_star=2.0,
rwb=None,
phi_cl=DefaultParameters.CLAY_POROSITY,
rtsh=None,
vsh_exp=1.6,
shale_exp=1.6,
)[source]

Calculate water saturation.

Parameters:
  • well (Well) – Well object

  • rw (float) – Formation water resistivity

  • rcl (float, optional) – Clay resistivity (auto-estimated if not provided)

  • salinity (float, optional) – Formation water salinity (ppm)

  • rmf (float, optional) – Mud filtrate resistivity (for Sxo)

  • vcl (np.ndarray, optional) – Clay volume (default: the VCL or VCLAY curve). Without either the rock is taken as clean: Archie runs whatever model says, with a UserWarning.

  • phie (np.ndarray, optional) – Effective porosity

  • phit (np.ndarray, optional) – Total porosity (required for Dual Water / Waxman-Smits), on the basis of phie: PHIT - PHIE is read as clay-bound porosity. Default: the PHIT curve, else phie.

  • lithology (str or np.ndarray, optional) – ‘clastic’ or ‘carbonate’ globally, or per-depth array

  • cec (float, optional) – Cation exchange capacity (for Waxman-Smits, meq/g). With model="auto" Waxman-Smits is chosen only where both cec and b_coeff are given; with cec alone, name the model (model="waxman_smits").

  • b_coeff (float, optional) – Equivalent counter-ion conductance B (for Waxman-Smits), (S/m)/(meq/cm3). With model="waxman_smits" the default is the Waxman and Smits (1968) relation in Rw; model="auto" does not choose Waxman-Smits without it.

  • rho_ma (float, optional) – Matrix density (for Waxman-Smits, default: 2.65)

  • m_star (float, optional) – Intrinsic cementation exponent (for Waxman-Smits, default: 2.0)

  • rwb (float, optional) – Bound water resistivity (for Dual Water), ohm.m; see rwb_fallback for what happens without it

  • phi_cl (float, optional) – Clay porosity (for Dual Water, default from constants)

  • rtsh (float, optional) – Shale resistivity, ohm.m, used in place of rcl by the North Sea, Nigeria/Schlumberger, Simandoux, modified Simandoux and Indonesia models. Default (None): rcl.

  • vsh_exp (float, optional) – Shale-volume exponent of the North Sea shaly-sand model (default: 1.6)

  • shale_exp (float, optional) – Shale-volume exponent of the Nigeria/Schlumberger model (default: 1.6)

Returns:

Saturation calculation results

Return type:

SaturationResult