correct_density_hc

petrophys.interpretation.porosity.hydrocarbon_correction.correct_density_hc

correct_density_hc(
rhob,
phi,
sxo,
rhob_fluid=1.0,
hc_type='oil',
vcl=None,
rho_ma=2.65,
rho_cl=2.45,
rho_hc=None,
floor_porosity=None,
)[source]

Correct bulk density for hydrocarbon effect.

When VCL and rho_ma are provided, use a volumetric mixing-law inversion for the preliminary porosity estimate. Otherwise, fall back to the simpler porosity-based correction.

Parameters:
  • rhob (float or np.ndarray) – Raw bulk density (g/cc).

  • phi (float or np.ndarray) – Porosity estimate used only in the simple fallback when VCL is not provided.

  • sxo (float or np.ndarray) – Flushed-zone water saturation (v/v).

  • rhob_fluid (float) – Mud-filtrate / fluid density in the flushed zone (g/cc).

  • hc_type (str) – Hydrocarbon type: "oil" or "gas".

  • vcl (float or np.ndarray, optional) – Clay volume fraction. Enables the preliminary-porosity approach.

  • rho_ma (float) – Matrix density (g/cc).

  • rho_cl (float) – Clay / shale density (g/cc).

  • rho_hc (float, optional) – Hydrocarbon density in the flushed zone (g/cc). Default: 0.8 for oil, 0.2 for gas.

  • floor_porosity (bool, optional) – Count a negative porosity as 0, so that rock denser than its matrix (a tight or heavy-mineral bed) gets no correction; a negative porosity would lower RHOB there. Default (None): True, and False while a benchmark package is reproduced.

Returns:

Hydrocarbon-corrected bulk density (g/cc).

Return type:

float or np.ndarray