VclModule

petrophys.interpretation.clay_volume.VclModule

Also available as petrophys.interpretation.VclModule

class VclModule(
gr_min=None,
gr_max=None,
gr_method='linear',
use_sp=True,
use_nd=True,
sp_max=None,
sp_min=None,
matrix=None,
combine='min',
rho_fl=DefaultParameters.FLUID_DENSITY,
sp_fallback_only=True,
nd_clay=None,
nd_triangle_only=True,
gr_curves=None,
bound_gr=None,
check_units=True,
)[source]

Multi-method clay volume calculator.

Calculates VCL using multiple methods and selects the minimum value at each depth point, as is standard practice.

Parameters:
  • gr_min (float, optional) – Clean sand GR value, used as given. Default (None): the 5th percentile of the log, lowered to 20 API when it is higher (see bound_gr), as pp.interpret picks it.

  • gr_max (float, optional) – Shale GR value, used as given. Default (None): the 95th percentile of the log, raised to 100 API when it is lower, so isolated GR spikes do not set the shale baseline.

  • bound_gr (sequence of str, optional) – Baselines ("gr_min", "gr_max") that take the 20/100 bound of bounded_gr_baselines(). Default: those left None, which the module picks from the log. A caller that picks baselines itself (as the workflow takes P5/P95) names them here; VclResult.gr_bounded reports what the bound moved.

  • gr_method (str, optional) – GR method (default: “linear”)

  • use_sp (bool, optional) – Whether to use SP method (default: True)

  • use_nd (bool, optional) – Whether to use N-D method (default: True)

  • sp_max (float, optional) – Clean-sand SP line (static SP), mV: the line of greatest deflection.

  • sp_min (float, optional) – Shale SP baseline, mV. With sp_max left as None both lines are picked from the log, P5 for sp_max and P95 for sp_min; SP is not used when only sp_min is missing. Where the log has a GR and the SP falls with it clearly (rank correlation below -0.3 after de-trending, sp_polarity()), the SP is reversed and the two picks are swapped, with a UserWarning.

  • matrix (str, optional) – Matrix of the N-D clean line: "sandstone", "limestone" or "dolomite" (aliases such as "quartz" and "calcite" are accepted; another name raises ValueError). Default (None): limestone.

  • combine ({"min", "auto"}, optional) – How the methods are combined at each depth. "min" (default) takes the minimum of the methods with a value. "auto" takes N-D where it has a value and there is no gas crossover, GR where gas crossover affects N-D or N-D has no value, and SP only where neither has a value.

  • rho_fl (float, optional) – Fluid density, g/cm3 (default 1.0), of the density porosity that flags gas crossover (density porosity more than 0.05 above NPHI) under combine="auto".

  • sp_fallback_only (bool, optional) – Keep VCL_SP out of the minimum (default: True, as in pp.interpret). It is still computed and returned, and fills only depths where neither GR nor N-D gives a value: SP baselines picked over a drifting log read too little clay in shales. False takes SP into the minimum.

  • nd_clay (tuple of float, optional) – N-D clay point (RHOB, NPHI), e.g. from nd_shale_point(). Default: the vcl_from_nd() point (2.62 g/cm3, 0.38).

  • nd_triangle_only (bool, optional) – Leave VCL_ND undefined (NaN) where NPHI exceeds both the clean line’s 40 p.u. end point and the clay point (default: True, as in pp.interpret). Such samples, e.g. undercompacted mudstones at NPHI 0.45-0.55, lie outside the triangle the three-point formula interpolates in, where it reads too little clay (down to clean rock towards the 40 p.u. end point); the minimum then takes the other indicators.

  • gr_curves (sequence of str, optional) – Gamma-ray mnemonics read depth by depth, in order. Default: the curves mapping’s GR curve, or for "GR" the GR family (GR, then CGR, SGR, HSGR, HCGR and GAMMA where GR has no value).

  • check_units (bool, optional) – Refuse an NPHI or RHOB curve labelled in another unit than v/v and g/cm3 (pu, %, kg/m3 …) with a ValueError (default: True): the N-D method reads the values as they are, and such samples fall outside its triangle. False reads the values whatever the label, as petrophys.interpret() does after it has converted the units.

Examples

>>> import petrophys as pp
>>> well = pp.read(pp.sample("30_6-5"))
>>> vcl_calc = VclModule(gr_min=15, gr_max=120)
>>> result = vcl_calc.calculate(well)
>>> well["VCLAY"] = result.vcl

Methods

add_to_well

Add VCL curves to well.

calculate

Calculate VCL using all available methods.

calculate(well, curves=None)[source]

Calculate VCL using all available methods.

Parameters:
  • well (Well) – Well object with required curves

  • curves (dict, optional) – Curve name mapping (e.g., {“gr”: “GR”, “sp”: “SP”})

Returns:

VCL calculation results

Return type:

VclResult

add_to_well(well, result=None)[source]

Add VCL curves to well.

Parameters:
  • well (Well) – Well object

  • result (VclResult, optional) – Pre-computed result

Returns:

Well with VCL curves added

Return type:

Well