CoreMechanical

petrophys.interpretation.core_analysis.CoreMechanical

class CoreMechanical(
depth,
ucs,
vp=None,
vs=None,
poisson=None,
extra_scales=<factory>,
metadata=<factory>,
)[source]

Core mechanical property measurements.

Parameters:
  • depth (np.ndarray) – Measured depth of each sample (m or ft).

  • ucs (np.ndarray) – Uniaxial Compressive Strength (MPa) at the primary scale.

  • vp (np.ndarray, optional) – P-wave velocity (m/s).

  • vs (np.ndarray, optional) – S-wave velocity (m/s).

  • poisson (np.ndarray, optional) – Dynamic Poisson’s ratio (dimensionless), as delivered.

  • extra_scales (dict, optional) – Additional UCS arrays at other averaging scales, e.g. {“5cm”: array, “30cm”: array}.

  • metadata (dict) – Additional header information.

Examples

>>> mech = CoreMechanical.from_las(
...     "core_strength.las",
...     ucs_mnemonic="UCS_1CM",
...     vp_mnemonic="VP_5CM",
...     vs_mnemonic="VS_5CM",
... )
>>> moduli = mech.dynamic_moduli(density_gcm3=2.55)
>>> print(moduli["young_modulus"])

Attributes

Methods

computed_poisson

Compute Poisson's ratio from Vp and Vs.

dynamic_moduli

Compute dynamic elastic moduli from Vp, Vs, and bulk density.

filter_by_depth

Return a new CoreMechanical filtered to [top, bottom].

from_dataframe

Create CoreMechanical from a pandas DataFrame.

from_las

Load mechanical properties from a LAS file.

scale_average

Return a version of this object smoothed over a depth window.

to_dataframe

Export to a pandas DataFrame.

vp_vs_ratio

Vp/Vs ratio — sensitive to fluid content and lithology.

depth: ndarray
ucs: ndarray
vp: ndarray | None = None
vs: ndarray | None = None
poisson: ndarray | None = None
extra_scales: Dict[str, ndarray]
metadata: Dict[str, Any]
property n_samples: int
property top: float | None
property bottom: float | None
classmethod from_las(
filepath,
ucs_mnemonic='UCS',
vp_mnemonic='VP',
vs_mnemonic='VS',
poisson_mnemonic=None,
extra_ucs_mnemonics=None,
null_value=-999.25,
)[source]

Load mechanical properties from a LAS file.

Depth is read via lasio’s las.index property (always the first column, regardless of mnemonic name).

Parameters:
  • filepath (str or Path)

  • ucs_mnemonic (str) – Mnemonic for the primary UCS curve.

  • vp_mnemonic (str, optional) – Mnemonic for P-wave velocity (m/s).

  • vs_mnemonic (str, optional) – Mnemonic for S-wave velocity (m/s).

  • poisson_mnemonic (str, optional) – Mnemonic for dynamic Poisson’s ratio.

  • extra_ucs_mnemonics (dict, optional) – Additional UCS curves keyed by a label, e.g. {“5cm”: “UCS_5CM”, “30cm”: “UCS_30CM”}.

  • null_value (float) – LAS null value to replace with NaN.

Return type:

CoreMechanical

classmethod from_dataframe(
df,
depth_col='DEPTH',
ucs_col='UCS',
vp_col=None,
vs_col=None,
poisson_col=None,
extra_ucs_cols=None,
)[source]

Create CoreMechanical from a pandas DataFrame.

Parameters:
  • df (pd.DataFrame)

  • depth_col (str)

  • ucs_col (str)

  • vp_col (str, optional)

  • vs_col (str, optional)

  • poisson_col (str, optional)

  • extra_ucs_cols (dict, optional) – Additional UCS columns, e.g. {“5cm”: “UCS_5CM”}.

Return type:

CoreMechanical

vp_vs_ratio()[source]

Vp/Vs ratio — sensitive to fluid content and lithology.

Return type:

ndarray

dynamic_moduli(density_gcm3=2.65)[source]

Compute dynamic elastic moduli from Vp, Vs, and bulk density.

Parameters:

density_gcm3 (float or np.ndarray) – Bulk density in g/cm³. Scalar or depth array. Use RHOB log interpolated to core depths for best results.

Returns:

poisson_ratio Poisson’s ratio (dimensionless) shear_modulus Shear modulus G (GPa) young_modulus Young’s modulus E (GPa) bulk_modulus Bulk modulus K (GPa)

Return type:

dict with keys

Notes

Equations (SI units, density in kg/m³, velocities in m/s):

\[ \begin{align}\begin{aligned}\nu = \frac{V_P^2 - 2V_S^2}{2(V_P^2 - V_S^2)}\\G = \rho V_S^2\\E = 2G(1 + \nu)\\K = \rho \left(V_P^2 - \frac{4}{3}V_S^2\right)\end{aligned}\end{align} \]
computed_poisson()[source]

Compute Poisson’s ratio from Vp and Vs.

Use when the LAS file does not contain a Poisson’s ratio or when you want to check it; the loaded poisson array is left unchanged.

Return type:

ndarray

scale_average(window_m, step_m=None)[source]

Return a version of this object smoothed over a depth window.

Parameters:
  • window_m (float) – Averaging window in depth units, metres for EpsLog data (e.g. 0.30 for 30 cm). Each output averages the samples within the window centred on its depth, so samples across a depth gap are not mixed in.

  • step_m (float, optional) – Output sample spacing in depth units. Defaults to the input depths.

Returns:

New instance with smoothed arrays at the same or coarser spacing.

Return type:

CoreMechanical

filter_by_depth(top, bottom)[source]

Return a new CoreMechanical filtered to [top, bottom].

Parameters:
Return type:

CoreMechanical

to_dataframe()[source]

Export to a pandas DataFrame.

Return type:

DataFrame