LithologyModule

petrophys.interpretation.lithology.LithologyModule

class LithologyModule(
minerals=None,
include_clay=True,
lithology='auto',
solver_options=None,
screen_barite_pef=None,
)[source]

Lithology determination from well logs.

This module combines multi-mineral analysis with clay volume to determine complete lithology fractions.

Parameters:
  • minerals (list, optional) – Primary minerals to solve for

  • include_clay (bool, optional) – Include clay from VCL (default: True)

  • lithology ({"auto", "clastic", "carbonate"}, optional) – Geological constraint on the minerals solved where porosity is solved with them and the logs resolve only two: quartz and calcite in clastic rock, calcite and dolomite in carbonate. Auto takes the family from an input lithology log or core-constrained matrix density with at least 80% agreement, else quartz and calcite.

  • solver_options (dict, optional) – Further keyword arguments for MultiMineralSolver, e.g. {"row_uncertainty": None} for an unweighted solve.

  • screen_barite_pef (bool, optional) – Set PEF aside for the well when it reads like barite-weighted mud: in most clean porous samples (VCL < 0.2, PHIE > 0.12; at least 30) the apparent matrix density is quartz-like (< 2.67 g/cm3) while the apparent matrix U is calcite-like (> 10 b/cm3), a pairing no common mineral gives. The solve then uses density, neutron (and sonic), and notes says so. Default (None): on, as in petrophys.interpret(), and off while a benchmark package is reproduced. False always uses PEF. The screen reads PHIE (or PHIT) and VCL from the well, so a well without a porosity curve is not screened, and notes says that too.

Examples

The mud of 30/6-5 is barite-weighted. On the interpreted well, which has VCL and PHIE, its PEF is set aside and the cored sand is solved as quartz:

>>> import petrophys as pp
>>> well = pp.interpret(pp.read(pp.sample("30_6-5"))).well
>>> litho = LithologyModule()
>>> result = litho.calculate(well)
>>> well["VQUAR"] = result.v_quartz
>>> litho.notes[0][:13]
'PEF set aside'

Attributes

LITHOLOGY_CODES

MATRIX_DOMINANCE

SHALE_CLAY_CUT

notes

Notes of the last calculate(), e.g. PEF set aside.

Methods

add_to_well

Add lithology curves to well.

calculate

Calculate lithology fractions.

LITHOLOGY_CODES = {'anhydrite': 5, 'coal': 7, 'dolomite': 3, 'limestone': 2, 'mixed': 8, 'salt': 6, 'sandstone': 1, 'shale': 4, 'unknown': 0}
notes: List[str]

Notes of the last calculate(), e.g. PEF set aside.

SHALE_CLAY_CUT = 0.4
MATRIX_DOMINANCE = 0.5
calculate(well, vcl=None, samples=None)[source]

Calculate lithology fractions.

Parameters:
  • well (Well) – Well with RHOB, VCL/PHIE, and enough NPHI/PEF/DTC information for a reduced or full mineral solve.

  • vcl (np.ndarray, optional) – Clay volume (uses VCL curve if not provided)

  • samples (np.ndarray of bool, optional) – Samples to solve; the others are left unsolved. Solved samples are as a full solve gives them.

Returns:

Lithology calculation results

Return type:

LithologyResult

add_to_well(well, result=None, include_lithology_code=True)[source]

Add lithology curves to well.

Parameters:
  • well (Well) – Well object

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

  • include_lithology_code (bool, optional) – Write the fallback LITHO curve derived from mineral volumes. Set False when an interpreted input lithology curve is already present and should remain authoritative.

Returns:

Well with lithology curves

Return type:

Well