rockphypy

Submodules

Package Contents

Classes

Anisotropy

Effective models, coordinate transform, anisotropic parameters and phase velocities that can be applied to anisotropic media.

AVO

Exact and approximations of reflectivity in isotropic and anisotropic media.

BW

Effective CO2, natural gas, brine and oil property calculation using original and modified Batzle-Wang equations.

Permeability

Different permeability models.

GM

Fluid

EM

Empirical

Empirical relations that widely applied

QI

utils

Basic calculations for velocities, moduli and stiffness matrix.

class rockphypy.Anisotropy[source]

Effective models, coordinate transform, anisotropic parameters and phase velocities that can be applied to anisotropic media.

static Thomsen(C11, C33, C13, C44, C66, den, theta)[source]

Compute thomsen parameters and three phase velocities for weak anisotropic TI media with vertical symmetry axis.

Parameters:
  • Cij (float) – Stiffnesses in GPa

  • den (float) – density of the effective medium, for backus average, the effective density can be computed using VRH method for Voigt average.

  • theta (float or array-like) – angle of incidence

Returns:

float or array-like – VP, VSV, VSH: wave velocities propagating along given direction

static Thomsen_Tsvankin(C11, C22, C33, C12, C13, C23, C44, C55, C66)[source]

Elastic constants of an orthorhombic elastic medium defined by Tsvankin’s notation for weak elastic anisotropy assuming the vertical symmetry axis is along the x3 direction.

Parameters:

Cij (float) – Stiffnesses in GPa

Returns:

floats – Thomsen-Tsvankin parameters

static Backus(V, lamda, G)[source]

Computes stiffnesses of a layered medium using backus average model.

Parameters:
  • V (float or array-like) – volumetric fractions of N isotropic layering materials

  • lamda (float or array-like) – Lamé coefficients of N isotropic layering materials

  • G (float or array-like) – shear moduli of N isotropic layering materials

Returns:

float or array-like – C11,C33,C13,C44,C66:Elastic moduli of the anisotropic layered media

static Backus_log(Vp, Vs, Den, Depth)[source]

Computes Backus Average from log data, notice that the Depth is 1d Vector including each top depth of layer and also the bottom of last layer.

Parameters:
  • Vp (array) – P wave velocities of layers [Vp1,Vp2…Vpn], Km/s, size N

  • Vs (array) – S wave velocities of layers [Vs1,Vs2…Vsn],Km/s size N

  • Den (array) – Densities of layers, size N

  • Depth (array) – 1d depth, ATTENTION: each depth point corresponds to the top of thin isotropic layer, the bottom of the sedimentary package is the last depth point. [dep1,dep2,,,,,,depn, depn+1], size N+1

Returns:

array-like – Stiffness coeffs and averaged density

static vel_azi_HTI(C, Den, azimuth)[source]

Given stiffnesses and density of the HTI medium, compute the azimuth dependent phase velocities.

Parameters:
  • C (2d array) – stiffness matrix of the HTI medium

  • Den (float) – density of the fractured medium

  • azimuth (float or array like) – azimuth angle, degree

Returns:

float or array like – VP,VSH, VSV: phase velocities

static vel_azi_VTI(C, Den, azimuth)[source]

Given stiffnesses and density of the VTI medium, compute the azimuth dependent phase velocities.

Parameters:
  • C (2d array) – stiffness matrix of the VTI medium

  • Den (float) – density of the fractured medium

  • azimuth (float or array like) – azimuth angle, degree

Returns:

float or array like – VP,VSH, VSV: phase velocities

static Bond_trans(C, theta, axis=3)[source]

Coordinate Transformations for stiffness matrix in 6x6 Voigt notation using Bond transformation matrix.

Parameters:
  • C (2d array) – original stiffness matrix

  • theta (float) – rotational angle

  • axis (int, optional) – axis=1: fix 1-axis, rotate 2 and 3 axis, examples can be a TTI(Tilted TI) resulted from the rotation of VTI with horizontal aligned fracture sets wrt the vertical x3 axis. In this case, the input C should be a VTI matrix axis=3: fix 3-axis, rotate 1 and 2 axis, E.g. seismic measurements of HTI media e.g caused by vertically aligned fractures. The angle theta may be assigned to be the angle between the fracture normal and a seismic line.

Returns:

2d array – C_trans, new stiffness matrix wrt to the original right-hand rectangular Cartesian coordinates

References

  • Bond, W., Jan. 1943, The mathematics of the physical properties of crystals, The Bell System Technical Journal, 1-72.

class rockphypy.AVO[source]

Exact and approximations of reflectivity in isotropic and anisotropic media.

static AVO_HTI(D1, D2, C1, C2, theta, azimuth)[source]

Compute azimuth dependent PP reflectivity for wealy anisotropic HTI media using Ruger’s approximation

Parameters:
  • D1 (float or array-like) – density of the upper medium g/cm3

  • D2 (float or array-like) – density of the lower medium g/cm3

  • C1 (2D array) – stiffness matrix of the upper medium

  • C2 (2D array) – stiffness matrix of the lower medium

  • theta (array-like) – incident angle, in degree unit

  • azimuth (array-like) – azimuth angle, in degree unit

Returns:

float or array-like – PP reflectivities

static Aki_Richards(theta, vp1, vp2, vs1, vs2, den1, den2)[source]

Aki-Richard approximation to PP reflectivity.

Parameters:
  • theta (float or array-like) – incident angle, degree

  • vp1 (float) – P wave velocity of layer 1, m/s

  • vp2 (float) – P wave velocity of layer 2, m/s

  • vs1 (float) – S wave velocity of layer 1, m/s

  • vs2 (float) – S wave velocity of layer 2, m/s

  • den1 (float) – density of layer 1, kg/m3

  • den2 (float) – density of layer 2, kg/m3

Returns:

float or array-like – R_pp: P wave reflectivity R_ps: PS reflectivity Rpp0: intercept gradient

static zoeppritz(vp1, vs1, rho1, vp2, vs2, rho2, theta)[source]

Reflection & Transmission coefficients calculated using full Zoeppritz equations.

Parameters:
  • vp1 (float) – P wave velocity of layer 1, m/s

  • vs1 (float) – S wave velocity of layer 1, m/s

  • rho1 (float) – density of layer 1, kg/m3

  • vp2 (float) – P wave velocity of layer 2, m/s

  • vs2 (float) – S wave velocity of layer 2, m/s

  • rho2 (float) – density of layer 2, kg/m3

  • theta (float or array-like) – incident angle, degree

Returns:

float or array-like – Rpp,Rps: PP and PS reflectivity

static AVO_abe(vp1, vs1, d1, vp2, vs2, d2)[source]

Different approximations AVO terms

Parameters:
  • vp1 (float or array-like) – P wave velocity of layer 1, m/s

  • vs1 (float or array-like) – S wave velocity of layer 1, m/s

  • d1 (float or array-like) – density of layer 1, kg/m3

  • vp2 (float or array-like) – P wave velocity of layer 2, m/s

  • vs2 (float or array-like) – S wave velocity of layer 2, m/s

  • d2 (float or array-like) – density of layer 2, kg/m3

Returns:

float or array-like – different linear AVO approximations

static EI_ref(Vp, Vs, rho, theta, SP, norm=True)[source]

Compute elastic impedance of an isotropic, flat-layered Earth

Parameters:
  • vp1 (float or array-like) – P wave velocity of layer 1, m/s

  • vs1 (float or array-like) – S wave velocity of layer 1, m/s

  • d1 (float or array-like) – density of layer 1, kg/m3

  • Vp (float or array-like) – P wave velocity

  • Vs (float or array-like) – S wave velocity

  • rho (float or array-like) – density

  • theta (array-like) – incident angles

  • SP (float) – constant ratio of Vs to Vp, can be taken as the average of input Vs/Vp, i.e. SP= VS.mean()/VP.mean()

  • norm (bool, optional) – If True: normalized input velocities and density such that the units and dimension match with acoustic impedance. Defaults to True.

Returns:

float or array-like – EI_pp: elastic impedance for PP reflection EI_svp: elastic impedance for P-SV reflection EI_psv: elastic impedance for SV-P reflection EI_svsv: elastic impedance for SV-SV reflection EI_shsh: elastic impedance for SH-SH reflection

static AVO_ortho(a1, b1, e11, d11, e12, d12, g1, rho1, a2, b2, e21, d21, e22, d22, g2, rho2, the)[source]

calculates the reflectivity in the symmetry plane for interfaces between 2 orthorhombic media, refactered from srb toolbox written by Diana Sava. :param a1: P-wave vertical velocities of upper medium (1) :type a1: float or array-like :param b1: S-wave vertical velocities of upper medium (1) :type b1: float or array-like :param e11: epsilon in the two symmetry planes of the orthorhombic medium for the upper medium (first index indicates the upper medium (1), second index indicates the plane of symmetry (1 - plane perpendicular to x, 2 - plane perpendicular to y); :type e11: float or array-like :param d11: delta in the two symmetry planes of the orthorhombic medium for the upper medium :type d11: float or array-like :param e12: epsilon in the two symmetry planes of the orthorhombic medium for the upper medium :type e12: float or array-like :param d12: delta in the two symmetry planes of the orthorhombic medium for the upper medium :type d12: float or array-like :param g1: vertical shear wave splitting parameter for the upper medium (1) :type g1: float or array-like :param rho1: density of the upper medium :type rho1: float or array-like :param a2: P-wave vertical velocities of lower medium (2) :type a2: float or array-like :param b2: S-wave vertical velocities of lower medium (2) :type b2: float or array-like :param e21: epsilon in the two symmetry planes of the orthorhombic medium for the lower medium :type e21: float or array-like :param d21: delta in the two symmetry planes of the orthorhombic medium for the lower medium :type d21: float or array-like :param e22: epsilon in the two symmetry planes of the orthorhombic medium for the lower medium :type e22: float or array-like :param d22: delta in the two symmetry planes of the orthorhombic medium for the lower medium :type d22: float or array-like :param g2: vertical shear wave splitting parameter for the upper medium (2) :type g2: float or array-like :param rho2: density of the lower medium :type rho2: float or array-like :param the: incident angle :type the: float or array-like

Returns:

array-like – Rxy: PP reflectivity as a function of angle of incidence in xz plane (13). Ryz: PP reflectivity as a function of angle of incidence in yz plane (23)

class rockphypy.BW[source]

Effective CO2, natural gas, brine and oil property calculation using original and modified Batzle-Wang equations.

static dz_dp(P_pr, T_pr)[source]

Values for dZ/dPpr obtained from equation 10b in Batzle and Wang (1992).

static pseudo_p_t(P, T, G)[source]

Calculate the pseudoreduced temperature and pressure according to Thomas et al. 1970.

Parameters:
  • P (float or array-like) – Pressure in MPa

  • T (float or array-like) – Temperature in °C

  • G (float) – Gas gravity

Returns:

float or array-like – Ta: absolute temperature Ppr:pseudoreduced pressure Tpr:pseudoreduced temperature

static rho_K_co2(P, T, G)[source]

Compute CO2 properties as a function of temperature and pressure using modified Batzle-Wang equations

Parameters:
  • P (float or array-like) – Pressure in MPa

  • T (float or array-like) – Temperature in °C

  • G (float) – Gas gravity

Returns:

float or array-like – rho (g/cc): gas density K (GPa): bulk modulus

References

Xu, H. (2006). Calculation of CO2 acoustic properties using Batzle-Wang equations. Geophysics, 71(2), F21-F23.

static rho_K_gas(P, T, G)[source]

Estimate the Gas density and bulk modulus at specific temperature and pressure.

Parameters:
  • P (float or array-like) – Pressure in MPa

  • T (float or array-like) – Temperature in °C

  • G (float) – Gas gravity

Returns:

float or array-like – rho: Gas density (g/cm3) K: Gas bulk modulus (GPa)

static rho_K_oil(P, T, den)[source]

Estimate the oil density and bulk modulus at specific temperature and pressure.

Parameters:
  • P (float or array-like) – Pressure in MPa

  • T (float or array-like) – Temperature in °C

  • den (float) – oil density in g/cm3

Returns:

float or array-like – rho: oil density (g/cm3) K: oil bulk modulus (GPa)

static rho_K_go(P, T, den, G, Rg)[source]

compute density and bulk modulus of live oil.

Parameters:
  • P (float or array-like) – Pressure in MPa

  • T (float or array-like) – Temperature in °C

  • den (float) – oil density in g/cm3

  • G (float) – gas gravity

  • Rg (float) – the volume ratio of liberated gas to remaining oil at atmospheric pressure and 15.6°C, Liter/Liter

Returns:

float or array-like – rho_g (g/cm3): true density of live oil at saturation K (GPa): true bulk modulus of live oil at saturation

static rho_K_water(T, P)[source]

Compute the density and bulk modulus of pure water as a function of temperature and pressure using Batzle and Wang (1992).

Parameters:
  • T (float or array-like) – Temperature in °C

  • P (float or array-like) – Pressure in MPa

Returns:

float or array-like – rho_w (g/cm3): density of pure water K_w (Gpa): bulk modulus of pure water

static v_water(T, P)[source]

Acoustic velocity of pure water as a function of temperature and pressure using Batzle and Wang (1992).

Parameters:
  • T (float or array-like) – Temperature in °C

  • P (float or array-like) – Pressure in MPa

Returns:

float or array-like – v_w (m/s): acoustic velocity of pure water

static rho_K_brine(T, P, S)[source]

Calculation of the density and bulk modulus of brine (NaCl) as a function of temperature, salinity and pressure using Batzle and Wang (1992).

Parameters:
  • T (float or array-like) – Temperature in °C

  • P (float or array-like) – Pressure in MPa

  • S (float) – weight fraction of sodium chloride in ppm/1e6

Returns:

float or array-like – rho_b (g/cm3): the density of brine K_b (GPa):bulk modulus of brine

static v_brine(T, P, S)[source]

Calculte the acoustic velocity of brine as a function of temperature, salinity and pressure using Batzle and Wang (1992).

Parameters:
  • T (float or array-like) – Temperature in °C

  • P (float or array-like) – Pressure in MPa

  • S (float) – weight fraction of sodium chloride in ppm/1e6

Returns:

float or array-like – v_b (m/s): the velocity of brine

static co2_brine(temperature, pressure, salinity, Sco2, brie_component=None, bw=False)[source]

compute the effective properties of critical Co2 brine mixture depending on temperature, pressure and salinity of the brine, as well as the saturation state.

Parameters:
  • temperature (degree) –

  • pressure (Mpa) – pore pressure, not effective stress

  • salinity (ppm) – The weight fraction of NaCl, e.g. 35e-3 for 35 parts per thousand, or 3.5% (the salinity of seawater).

  • Sco2 (frac) – Co2 saturation

  • brie_component (num) – if None: uniform saturation. otherwise patchy saturation according to brie mixing

Returns:

den_mix (g/cc) – mixture density Kf_mix (GPa): bulk modulus

class rockphypy.Permeability[source]

Different permeability models.

static Kozeny_Carman(phi, d)[source]

Describe the permeability in a porous medium using Kozeny-Carman equation assuming the turtuosity tau=sqrt(2), 1/B=2.5 for unconsolidated monomodal sphere pack.

Parameters:
  • phi (float or array-like) – porosity

  • d (float) – pore diameter in m.

Examples

>>> phi= np.linspace(0.01,0.35,100)
>>> d= 250
>>> k= Kozeny_Carman(phi, d)
>>> plt.semilogy(phi, k )
Returns:

float or array-like – k (m^2): the resulting permeability is in the same units as d^2

static Kozeny_Carman_Percolation(phi, phic, d, B)[source]

The Kozeny−Carman relations incorporating the percolation effect

Parameters:
  • phi (float or array-like) – porosity

  • phic (float) – percolation porosity

  • d (float) – pore diameter

  • B (float) – geometric factor that partly accounts for the irregularities of pore shapes.

Returns:

float or array-like – k (m^2): the resulting permeability is in the same units as d^2

static Owolabi(phi, Swi)[source]

Estimate the permeability in uncosonlidated sands of Pleistocene to Oligocene age in Eastern Niger Delta from log derived porosityand irreducible water saturation.

Parameters:
  • phi (float or array-like) – porosity

  • Swi (float or array-like) – irreducible water-saturation from welllogs

Returns:

float or array-like – k_oil, k_gas: permeabilities in mD for oil and gas sand reservoir, respectively

static Perm_logs(phi, Swi)[source]

Various empirical correlations of between permeability, porosity and irreducible water-saturation from welllogs. Models includs Tixier, Timur, Coates and Coates-Dumanoir.

Parameters:
  • phi (float or array-like) – porosity

  • Swi (float or array-like) – irreducible water-saturation from welllogs

Returns:

  • float or array-like – k_tixier, k_Timur , k_coates, k_coates_Dumanoir: different permeability estimations, in the unit of mD

  • Assumptions

  • ———–

  • - The functional forms used in these equations have to be calibrated, whenever possible, to site-specific data.

  • - The rock is isotropic.

  • - Fluid-bearing rock is completely saturated.

static Panda_Lake(d, C, S, tau, phi)[source]

Modified Kozeny-carman relation incorpating the contribution of grain size variation and sorting using Manmath N. Panda and Larry W. Lake relation.

Parameters:
  • d (float) – mean particles size in um.

  • C (float) – coefficient of variation of particles size distribution

  • S (float) – skewness of particles size distribution

  • tau (float) – tortuosity factor

  • phi (float or array-like) – porosity

Returns:

float or array-like – k (md): permeability

References

  • Estimation of Single-Phase permeability from parameters of particle-Size Distribution, Manmath N. Panda and Larry W. Lake, AAPG 1994.

static Panda_Lake_cem(phi, d)[source]

Quantify the effects of cements on the single phase permeability estimate of unconsolidated sand using Panda & Lake model

Parameters:
  • phi (float or array-like) – porosity

  • d (float) – mean particles size in um

Returns:

float or array-like – k (md): permeability

static Revil(phi, d)[source]

Estimate permeability in very shaly rock using Revil et al. 1997

Parameters:
  • phi (float or array-like) – porosity

  • d (float) – mean particles size in um

Returns:

float or array-like – k (md): permeability

static Fredrich(phi, d, b)[source]

Compute permability considering Pore Geometry and Transport Properties of Fontainebleau Sandstone

Parameters:
  • phi (float or array-like) – porosity>10%

  • d (float) – _description_

  • b (float) – shape factor b is equal to 2 for circular tubes and equal to 3 for cracks.

Returns:

  • float or array-like – k (md): permeability

  • References – ———-

  • - Fredrich, J. T., Greaves, K. H., & Martin, J. W. (1993, December). Pore geometry and transport properties of Fontainebleau sandstone. In International journal of rock mechanics and mining sciences & geomechanics abstracts (Vol. 30, No. 7, pp. 691-697). Pergamon.

static Bloch(S, C, D)[source]

Predict porosity and permeability in sandstones prior to drilling using Bloch empirical relations obtain in Yacheng field.

Parameters:
  • S (float) – Trask sorting coefficient

  • C (float) – Rigid grain content in frac

  • D (float) – Grain size in mm

Returns:

float or array-like – phi, k: porosity (frac) and permeability (mD), respectively

static Bernabe(phi, crf, w, r)[source]

Bernabe models permit to compute the permeability and porosity of strongly pressure dependent pores such as cracks and approximately constant pores associated with tubes and nodal pores.

Parameters:
  • phi (float or array-like) – total porosity

  • crf (float) – crack fraction in pore volume

  • w (float) – width or aperture of the equivalent crack in um

  • r (float) – radius of the tube in um

Returns:

  • float or array-like – k (md): total permeability

  • References – ———-

  • - Bernabe, Y. (1991). Pore geometry and pressure dependence of the transport properties in sandstones. Geophysics, 56(4), 436-446.

class rockphypy.GM[source]

Contact based granular medium models and extensions.

static ThomasStieber(phi_sand, phi_sh, vsh)[source]

Thomas-Stieber porosity model for sand-shale system.

Parameters:
  • phi_sand (float) – clean sand porosity

  • phi_sh (float) – shale porosity

  • vsh (float or array-like) – volume faction of shale in the mixture

Returns:

float or array-like – phi_ABC,phi_AC (frac): porosity line as shown in Fig 5.3.2 in (Mavko,2020)

static silty_shale(C, Kq, Gq, Ksh, Gsh)[source]

Dvorkin–Gutierrez silty shale model: model the elastic moduli of decreasing clay content for shale.

Parameters:
  • C (float or array-like) – volume fraction of clay

  • Kq (float) – bulk modulus of silt grains

  • Gq (float) – shear modulus of silt grains

  • Ksh (float) – saturated bulk modulus of pure shale

  • Gsh (float) – saturated shear modulus of pure shale, * Ksh and Gsh could be derived from well-log measurements of VP, VS and density in a pure shale zone.

Returns:

float or array-like – K_sat, G_sat: elastic moduli of the saturated silty shale.

static shaly_sand(phis, C, Kss, Gss, Kcc, Gcc)[source]

Modeling elastic moduli for sand with increasing clay content using LHS bound rather than using Gassmann relation.

Parameters:
  • phis (float) – critical porosity of sand composite

  • C (float or array-like) – clay content

  • Kss (float) – saturated bulk moduli for clean sandstone using e.g. HM

  • Gss (float) – saturated shear moduli for clean sandstone using e.g. HM

  • Kcc (float) – saturated bulk moduli calculated from the sandy shale model at critical clay content using silty shale model

  • Gcc (float) – saturated shear moduli calculated from the sandy shale model at critical clay content using silty shale model

Returns:

float or array-like – K_sat,G_sat: saturated rock moduli of the shaly sand

static contactcement(K0, G0, Kc, Gc, phi, phic, Cn, scheme)[source]

Compute dry elastic moduli of cemented sandstone via Contact cement model by Dvorkin &Nur (1996).

Parameters:
  • K0 (float) – Bulk modulus of grain material in GPa

  • G0 (float) – Shear modulus of grain material in GPa

  • Kc (float) – Bulk modulus of cement

  • Gc (float) – Shear modulus of cement

  • phi (float or array-like) – Porosity

  • phic (float) – Critical Porosity

  • Cn (float) – coordination number

  • scheme (int) –

    Scheme of cement deposition

    1=cement deposited at grain contacts 2=cement deposited at grain surfaces

Returns:

_type_ – K_dry, G_dry (GPa): Effective elastic moduli of dry rock

References

  • Dvorkin & Nur, 1996, Geophysics, 61, 1363-1370

static hertzmindlin(K0, G0, phic, Cn, sigma, f)[source]

Compute effective dry elastic moduli of granular packing under hydrostatic pressure condition via Hertz-Mindlin approach. Reduced shear factor that honours the non-uniform contacts in the granular media is implemented.

Parameters:
  • K0 (float) – Bulk modulus of grain material in GPa

  • G0 (float) – Shear modulus of grain material in GPa phic : float Critical Porosity

  • Cn (float) – coordination number

  • sigma (float or array-like) – effective stress

  • f (float) – reduced shear factor between 0 and 1 0=dry pack with inifinitely rough spheres; 1=dry pack with infinitely smooth spheres

Returns:

  • K_dry, G_dry (float or array-like) – effective elastic moduli of dry pack

  • References – ———-

  • - Rock physics handbook section 5.5.

  • - Bachrach, R. and Avseth, P. (2008) Geophysics, 73(6), E197–E209.

static softsand(K0, G0, phi, phic, Cn, sigma, f)[source]

Soft-sand (unconsolidated sand) model: model the porosity-sorting effects using the lower Hashin-Shtrikman-Walpole bound. (Also referred to as the ‘friable-sand model’ in Avseth et al. (2010).

Parameters:
  • K0 (float) – Bulk modulus of grain material in GPa

  • G0 (float) – Shear modulus of grain material in GPa

  • phi (float or array like) – Porosity phic : float Critical Porosity

  • Cn (float) – coordination number

  • sigma (float or array-like) – effective stress

  • f (float) – reduced shear factor between 0 and 1 0=dry pack with inifinitely rough spheres; 1=dry pack with infinitely smooth spheres

Returns:

  • float or array-like – K_dry, G_dry (GPa): Effective elastic moduli of dry pack

  • References – ———-

  • - The Uncemented (Soft) Sand Model in Rock physics handbook section 5.5

  • - Avseth, P.; Mukerji, T. & Mavko, G. Cambridge university press, 2010

static Walton(K0, G0, phic, Cn, sigma, f)[source]

Compute dry rock elastic moduli of sphere packs based on the Walton (1987)’ thoery. Reduced shear factor that honours the non-uniform contacts in the granular media is implemented.

Parameters:
  • K0 (float) – Bulk modulus of grain material in GPa

  • G0 (float) – Shear modulus of grain material in GPa phic : float Critical Porosity

  • Cn (float) – coordination number

  • sigma (float or array-like) – effective stress

  • f (float) – reduced shear factor between 0 and 1 0=dry pack with inifinitely rough spheres; 1=dry pack with infinitely smooth spheres

Returns:

  • float or array-like – K_w, G_w: Effective elastic moduli of dry pack

  • References – ———-

  • - Walton model in Rock physics handbook section 5.5

  • - Walton, K., 1987, J. Mech. Phys. Solids, vol.35, p213-226.

  • - Bachrach, R. and Avseth, P. (2008) Geophysics, 73(6), E197–E209

static johnson(K0, G0, n, phi, epsilon, epsilon_axial, path='together')[source]

effective theory for stress-induced anisotropy in sphere packs. The transversely isotropic strain is considered as a combination of hydrostatic strain and uniaxial strain.

Parameters:
  • K0 (float) – Bulk modulus of grain material in GPa

  • G0 (float) – Shear modulus of grain material in GPa

  • n (float) – coordination number

  • phi (float or array like) – porosity

  • epsilon (float or array like) – hydrostatic strain (negative in compression)

  • epsilon_axial (float or array like) – uniaxial strain (along 3-axis)

  • path (str, optional) – ‘together’: the hydrostatic and uniaxial strains are applied simultaneously ‘uni_iso’: the uniaxial strain is applied first followed by a hydrostatic strain ‘iso_uni’: the hydrostatic strain is applied first followed by a uniaxial strain by default ‘together’

Returns:

  • array and float – C: (matrix): VTI stiffness matrix sigma33: non zero stress tensor component sigma11: non zero stress tensor component, sigma11=sigma22

  • References – ———-

  • - Norris, A. N., and Johnson, D. L., 1997, ASME Journal of Applied Mechanics, 64, 39-49.

  • - Johnson, D.L., Schwartz, L.M., Elata, D., et al., 1998. Transactions ASME, 65, 380–388.

static stiffsand(K0, G0, phi, phic, Cn, sigma, f)[source]

Stiff-sand model: Modified Hashin-Shtrikman upper bound with Hertz-Mindlin end point, counterpart to soft sand model. model the porosity-sorting effects using the lower Hashin–Shtrikman–Walpole bound.

Parameters:
  • K0 (float) – Bulk modulus of grain material in GPa

  • G0 (float) – Shear modulus of grain material in GPa

  • phi (float or array like) – Porosity phic : float Critical Porosity

  • Cn (float) – coordination number

  • sigma (float or array-like) – effective stress

  • f (float) – reduced shear factor between 0 and 1 0=dry pack with inifinitely rough spheres; 1=dry pack with infinitely smooth spheres

Returns:

float or array-like – K_dry, G_dry (GPa): Effective elastic moduli of dry pack

static constantcement(phi_b, K0, G0, Kc, Gc, phi, phic, Cn, scheme)[source]

Constant cement (constant depth) model according to Avseth (2000)

Parameters:
  • phi_b (_type_) – adjusted high porosity end memeber

  • K0 (float) – Bulk modulus of grain material in GPa

  • G0 (float) – Shear modulus of grain material in GPa

  • Kc (float) – Bulk modulus of cement

  • Gc (float) – Shear modulus of cement

  • phi (float or array-like) – Porosity

  • phic (float) – Critical Porosity

  • Cn (float) – coordination number

  • scheme (int) –

    Scheme of cement deposition

    1=cement deposited at grain contacts 2=cement deposited at grain surfaces

Returns:

  • float or array-like – K_dry, G_dry (GPa): Effective elastic moduli of dry rock

  • References – ———-

  • - Avseth, P.; Dvorkin, J.; Mavko, G. & Rykkje, J. Geophysical Research Letters, Wiley Online Library, 2000, 27, 2761-2764

static MUHS(K0, G0, Kc, Gc, phi, phi_b, phic, Cn, scheme)[source]

Increasing cement model: Modified Hashin-Strikmann upper bound blend with contact cement model. For elastically stiff sandstone modelling.

Parameters:
  • K0 (float) – Bulk modulus of grain material in GPa

  • G0 (float) – Shear modulus of grain material in GPa

  • Kc (float) – Bulk modulus of cement

  • Gc (float) – Shear modulus of cement

  • phi (float or array-like) – Porosity

  • phi_b (_type_) – adjusted high porosity end memeber

  • phic (float) – Critical Porosity

  • Cn (float) – coordination number

  • scheme (int) –

    Scheme of cement deposition

    1=cement deposited at grain contacts 2=cement deposited at grain surfaces

Returns:

  • float or array-like – K_dry, G_dry (GPa): Effective elastic moduli of dry rock

  • References – ———-

  • - Avseth, P.; Mukerji, T. & Mavko, G. Cambridge university press, 2010

static Digby(K0, G0, phi, Cn, sigma, a_R)[source]

Compute Keff and Geff using Digby’s model

Parameters:
  • K0 (float) – Bulk modulus of grain material in GPa

  • G0 (float) – Shear modulus of grain material in GPa

  • phi (float) – Porosity

  • Cn (float) – coordination number

  • sigma (float or array-like) – stress

  • a_R (float) – a_R (unitless): ratio of the radius of the initially bonded area to the grain radius

Returns:

  • float or array-like – Keff, Geff (Gpa): effective medium stiffness

  • References – ———-

  • - Digby, P.J., 1981. Journal of Applied Mechanics, 48, 803–808.

static pcm(f, sigma, K0, G0, phi, phic, v_cem, v_ci, Kc, Gc, Cn, mode, scheme, f_)[source]

Computes effective elastic moduli of patchy cemented sandstone according to Avseth (2016).

Parameters:
  • f (float) – volume fraction of cemented rock in the binary mixture

  • sigma (float or array-like) – effective stress

  • K0 (float) – Bulk modulus of grain material in GPa

  • G0 (float) – Shear modulus of grain material in GPa

  • phi (float) – Porosity

  • phic (float) – Critical Porosity

  • v_cem (float) – cement fraction in contact cement model. phi_cem= phic-vcem

  • v_ci (float) – cement threshold above which increasing cement model is applied

  • Kc (float) – bulk modulus of cement

  • Gc (float) – shear modulus of cement

  • Cn (float) – coordination number

  • mode (str) – ‘stiff’ or ‘soft’. stiffest mixing or softest mixing. Defaults to ‘stiff’.

  • scheme (int) – contact cement scheme. 1=cement deposited at grain contacts 2=cement deposited at grain surfaces

  • f – slip factor in HM modelling. Defaults to 0.5.

Note

(Avseth,2016): If 10% is chosen as the “critical” cement limit, the increasing cement model can be used in addition to the contact cement model. (Torset, 2020): with the increasing cement model appended at 4% cement”

Returns:

  • float or array-like – K_DRY, G_DRY (GPa): effective elastic moduli of the dry rock

  • References – ———- - Avseth, P.; Skjei, N. & Mavko, G. The Leading Edge, GeoScienceWorld, 2016, 35, 868-87.

static diluting(k, sigma0, sigma, m)[source]

stress dependent diluting parameter used in varying patchiness cement model.

Parameters:
  • k (float) – cement crushing factor. k<=1: no cement crumbling; k>1: cement crumbling.

  • sigma0 (float) – reference stress, e.g. maximum effective stress, stress at which unloading begins.

  • sigma (array-like) – effective stress

  • m (float) – curvature parameter that defines diluting rate.

Returns:

array-like – stress dependent diluting parameter

static vpcm(alpha, f, sigma, K0, G0, phi, phic, v_cem, v_ci, Kc, Gc, Cn, scheme, f_)[source]

Compute effective elastic moduli using varying patchiness cement model (VPCM) as proposed by Yu et al. (2023).

Parameters:
  • alpha (float or array-like) – diluting parameters

  • f (float) – volume fraction of cemented rock in the binary mixture

  • sigma (float or array-like) – effective stress

  • K0 (float) – Bulk modulus of grain material in GPa

  • G0 (float) – Shear modulus of grain material in GPa

  • phi (float) – Porosity

  • phic (float) – Critical Porosity

  • v_cem (float) – cement fraction in contact cement model. phi_cem= phic-vcem

  • v_ci (float) – cement threshold above which increasing cement model is applied

  • Kc (float) – bulk modulus of cement

  • Gc (float) – shear modulus of cement

  • Cn (float) – coordination number

  • scheme (int) – contact cement scheme. 1=cement deposited at grain contacts 2=cement deposited at grain surfaces

  • f – slip factor in HM modelling.

  • Note – (Avseth,2016): If 10% is chosen as the “critical” cement limit, the increasing cement model can be used in addition to the contact cement model. (Torset, 2020): with the increasing cement model appended at 4% cement”

Returns:

array-like – K_DRY, G_DRY (GPa): effective elastic moduli of the dry rock

class rockphypy.Fluid[source]

Fluid subsitution approaches and models describing velocity dispersion and attenuation due to the fluid effect.

static Brie(Kw, Kgas, Sw, e)[source]

Brie empirical fluid mixing law

Parameters:
  • Kw (float) – bulk modulus of fluid phase

  • Kgas (float) – bulk modulus of gas phase

  • Sw (float or array) – water saturation

  • e (int) – Brie component

Returns:

float or array – Kf: effective fluid propertie

static Biot(Kdry, Gdry, K0, Kfl, rho0, rhofl, eta, phi, kapa, a, alpha, freq)[source]

Compute Biot dispersion and velocity attenuation

Parameters:
  • Kdry (float or array-like) – dry frame bulk modulus

  • Gdry (float or array-like) – dry frame shear modulus

  • K0 (float) – bulk modulus of mineral material making up rock

  • Kfl (float) – effective bulk modulus of pore fluid

  • rho0 (float) – grain density

  • rhofl (float) – pore fluid density

  • eta (float) – η is the viscosity of the pore fluid

  • phi (float) – porosity

  • kapa (float) – absolute permeability of the rock

  • a (float) – pore-size parameter. Stoll (1974) found that values between 1/6 and 1/7 of the mean grain diameter

  • alpha (float) – tortuosity parameter, always greater than or equal to 1.

  • freq (float or array-like) – frequency range, e.g 10^-3 to 10^3 Hz

Returns:

float or array-like – Vp_fast, fast P-wave velocities at all frequencies,km/s Vp_slow, slow P-wave velocities at all frequencies,km/s Vs, S-wave velocities,km/s QP1_inv, fast P-wave attenuation QP2_inv, slow P-wave attenuation Qs_inv, S-wave attenuation

static Biot_HF(Kdry, Gdry, K0, Kfl, rho0, rhofl, phi, alpha)[source]

Biot high-frequency limiting velocities in the notation of Johnson and Plona (1982)

Parameters:
  • Kdry (float or array-like) – dry frame bulk modulus

  • Gdry (float or array-like) – dry frame shear modulus

  • K0 (float) – bulk modulus of mineral material making up rock

  • Kfl (float) – effective bulk modulus of pore fluid

  • rho0 (float) – grain density

  • rhofl (float) – pore fluid density

  • phi (float) – porosity

  • alpha (float) – tortuosity parameter, always greater than or equal to 1.

Returns:

float or array-like – Vp_fast,Vp_slow,Vs: high-frequency limiting velocities,km/s

static Geertsma_Smit_HF(Kdry, Gdry, K0, Kfl, rho0, rhofl, phi, alpha)[source]

Approximation of Biot high-frequency limit of the fast P-wave velocity given by Geertsma and Smit (1961), This form predicts velocities that are too high (by about 3%–6%) compared with the actual high-frequency limit.

Parameters:
  • Kdry (float or array-like) – dry frame bulk modulus

  • Gdry (float or array-like) – dry frame shear modulus

  • K0 (float) – bulk modulus of mineral material making up rock

  • Kfl (float) – effective bulk modulus of pore fluid

  • rho0 (float) – grain density

  • rhofl (float) – pore fluid density

  • phi (float) – porosity

  • alpha (float) – tortuosity parameter, always greater than or equal to 1.

Returns:

float or array-like – Vp_fast,Vs: high-frequency limiting velocities, km/s

static Geertsma_Smit_LF(Vp0, Vpinf, freq, phi, rhofl, kapa, eta)[source]

Low and middle-frequency approximations of Biot wave given by Geertsma and Smit (1961). Noticed that mathematically this approximation is valid at moderate-to-low seismic frequencies, i.e. f<fc

Parameters:
  • Vp0 (float) – Biot−Gassmann low-frequency limiting P-wave velocity, km/s or m/s

  • Vpinf (float) – Biot highfrequency limiting P-wave velocity, km/s or m/s

  • freq (float or array-like) – frequency

  • phi (float) – porosity

  • rhofl (float) – fluid density

  • kapa (float) – absolute permeability of the rock.

  • eta (float) – viscosity of the pore fluid

Returns:

float or array-like – Vp: frequency-dependent P-wave velocity of saturated rock

static Gassmann(K_dry, G_dry, K_mat, Kf, phi)[source]

Computes saturated elastic moduli of rock via Gassmann equation given dry-rock moduli.

Parameters:
  • K_dry (float or array-like) – dry frame bulk modulus

  • G_dry (float or array-like) – dry frame shear modulus

  • K_mat (float) – matrix bulk modulus

  • Kf (float) – fluid bulk modulus

  • phi (float or array-like) – porosity

Returns:

float or array-like – K_sat, G_sat: fluid saturated elastic moduli

static Gassmann_sub(phi, K0, Ksat1, Kfl1, Kfl2)[source]

Fluid subsititution using Gassmann equation, thr rock is initially saturated with a fluid, compute the saturated moduli for tge rock saturated with a different fluid

Parameters:
  • phi (float or array-like) – porosity

  • K0 (float) – mineral modulus

  • Ksat1 (float or array-like) – original bulk modulus of rock saturated with fluid of bulk modulus Kfl1

  • Kfl1 (float) – original saturant

  • Kfl2 (float) – new saturant

Returns:

float or array-like – Ksat2: new satuarted bulk modulus of the rock

static vels(K_dry, G_dry, K0, D0, Kf, Df, phi)[source]

Computes Vp,Vs and densities of saturated rock using Gassmann relations from elastic moduli of rock. See also Gassmann_vels.

Parameters:
  • K_dry (float) – dry frame bulk modulus

  • G_dry (float) – dry frame shear modulus

  • K0 (float) – mineral matrix bulk modulus

  • D0 (float) – mineral matrix density

  • Kf (float) – fluid bulk modulus

  • Df (float) – fluid density in g/cm3

  • phi (float or array) – porosity

Returns:

float or array – Vp, Vs, rho

static Gassmann_vels(Vp1, Vs1, rho1, rhofl1, Kfl1, rhofl2, Kfl2, K0, phi)[source]

Gassmann fluid substituion with velocities

Parameters:
  • Vp1 (float or array-like) – saturated P velocity of rock with fluid 1

  • Vs1 (float or array-like) – saturated S velocity of rock with fluid 1

  • rho1 (float) – bulk density of saturated rock with fluid 1

  • rhofl1 (float) – density of fluid 1

  • Kfl1 (float) – bulk modulus of fluid 1

  • rhofl2 (float) – density of fluid 2

  • Kfl2 (float) – bulk modulus of fluid 2

  • K0 (float) – mineral bulk modulus

  • phi (float or array-like) – porosity

Returns:

float or array-like – Vp2, Vs2: velocities of rock saturated with fluid 2

static Gassmann_approx(Msat1, M0, Mfl1, phi, Mfl2)[source]

Perform gassmann fluid subsititution using p wave modulus only

Parameters:
  • Msat1 (float or array-like) – in situ saturated p wave modulus from well log data

  • M0 (float) – p wave modulus of mineral

  • Mfl1 (float) – p wave modulus of in situ fluid

  • phi (float) – porosity

  • Mfl2 (float) – p wave modulus of new fluid for susbtitution

Returns:

float or array-like – Msat2: p wave modulus of rock fully saturated with new fluid

static Brown_Korringa_dry2sat(Sdry, K0, G0, Kfl, phi)[source]

Compute fluid saturated compliances from dry compliance for anisotropic rock using Brown and Korringa (1975). See eq. 32 in the paper.

Parameters:
  • Sdry (2d array) – comliance matrix of the dry rock

  • K0 (float) – Isotropic mineral bulk modulus

  • G0 (float) – Isotropic mineral shear modulus

  • Kfl (float) – Isotropic fluid bulk modulus

  • phi (float) – porosity

Returns:

2d array – Ssat (6x6 matrix): Saturated compliance of anisotropic rock

static Brown_Korringa_sat2dry(Ssat, K0, G0, Kfl, phi)[source]

Compute dry compliance from fluid saturated compliances for arbitrarily anisotropic rock using Brown and Korringa (1975). See eq. 32 in the paper.

Parameters:
  • Ssat (2d array) – comliance matrix (6x6) of the saturated rock

  • K0 (float) – Isotropic mineral bulk modulus

  • G0 (float) – Isotropic mineral shear modulus

  • Kfl (float) – Isotropic fluid bulk modulus

  • phi (float) – porosity

Returns:

2d array – Sdry (6x6 matrix): Dry compliance of anisotropic rock

static Brown_Korringa_sub(Csat, K0, G0, Kfl1, Kfl2, phi)[source]

Fluid substitution in arbitrarily anisotropic rock using Brown and Korringa (1975). the rock is originally saturated by fluid 1. After fluid subsititution, the rock is finally saturated by fluid 2.

Parameters:
  • Csat (6x6 matrix) – comliance matrix of the saturated rock

  • K0 (float) – Isotropic mineral bulk modulus

  • G0 (float) – Isotropic mineral shear modulus

  • Kfl1 (float) – bulk modulus of the original fluid

  • Kfl2 (float) – bulk modulus of the final fluid

  • phi (float) – porosity

Returns:

2d array – Csat2, Ssat2 (6x6 matrix): Dry stiffness and compliance matrix of anisotropic rock saturated with new fluid

static Mavko_Jizba(Vp_hs, Vs_hs, Vpdry, Vsdry, K0, rhodry, rhofl, Kfl, phi)[source]

Predicting the very high-frequency moduli and velocities of saturated rocks from dry rock properties using the Squirt flow model derived by Mavko and Jizba (1991).

Parameters:
  • Vp_hs (float) – P wave velocity of the dry rock measured at very high effective pressure in the unit of m/s

  • Vs_hs (float) – S wave velocity of the dry rock measured at very high effective pressure in the unit of m/s

  • Vpdry (array) – P wave velocity of the dry rock measured at different effective pressure in the unit of m/s

  • Vsdry (array) – S wave velocity of the dry rock measured at different effective pressure in the unit of m/s

  • K0 (float) – mineral bulk moduli

  • rhodry (float) – bulk density of the dry rock

  • rhofl (float) – bulk density of the pore fluid

  • Kfl (float) – bulk moduli of the pore fluid

  • phi (float) – porosity

Returns:

float or array-like – Kuf_sat (float):GPa, predicted high frequency bulk moduli of saturated rock Guf_sat (array): GPa, predicted high frequency shear moduli of saturated rock at different pressure Vp_hf (array): m/s, predicted high frequency P wave velocities of saturated rock Vs_hf (array): m/s, predicted high frequency S wave velocities of saturated rock

static Squirt_anisotropic(Sdry, Sdry_hp)[source]

Predict wet unrelaxed frame compliances at very high frequency from dry frame compliances for transversely isotropic rocks using theoretical formula derived by Mukerji and Mavko, (1994)

Parameters:
  • Sdry (list or array) – dry rock compliances [S11 S12 S13 S33 S44]

  • Sdry_hp (array) – dry rock compliances at very high effective stress [S11 S12 S13 S33 S44]

Returns:

array – The wet-frame compliances [S11 S12 S13 S33 S44]

static White_Dutta_Ode(Kdry, Gdry, K0, phi, rho0, rhofl1, rhofl2, Kfl1, Kfl2, eta1, eta2, kapa, a, sg, freq)[source]

Dispersion and Attenuation of partial saturation using White and Dutta–Odé Model.

Parameters:
  • Kdry (float) – bulk modulus of the dry rock

  • Gdry (float) – shear modulus of the dry rock

  • K0 (float) – Isotropic mineral bulk modulus

  • phi (float) – porosity

  • rho0 (float) – mineral density

  • rhofl1 (float) – density of the fluid opcupying the central sphere

  • rhofl2 (float) – density of the fluid opcupying the outer sphere

  • Kfl1 (float) – bulk modulus of the fluid opcupying the central sphere

  • Kfl2 (float) – bulk modulus of the fluid opcupying the outer sphere

  • eta1 (float) – viscousity of the fluid opcupying the central sphere

  • eta2 (float) – viscousity of the fluid opcupying the outer sphere

  • kapa (float) – absolute permeability of the rock

  • a (float) – radius of central sphere , sg=a3/b3

  • sg (float) – saturation of fluid opcupying the central sphere

  • freq (float or array-like) – frequencies

Returns:

float, array-like – Vp (m/s): P wave velocity km/s a_w: attenuation coefficient K_star: complex bulk modulus

class rockphypy.EM[source]

classical bounds and inclusion models.

static VRH(volumes, M)[source]

Computes Voigt, Reuss, and Hill Average Moduli Estimate.

Parameters:
  • volumes (list or array-like) – volumetric fractions of N phases

  • M (list or array-like) – elastic modulus of the N phase.

Returns:

float – M_v: Voigt average M_r: Reuss average M_0: Hill average

static cripor(K0, G0, phi, phic)[source]

Critical porosity model according to Nur’s modified Voigt average.

Parameters:
  • K0 (float or array-like) – mineral bulk modulus in GPa

  • G0 (float or array-like) – mineral shear modulus in GPa

  • phi (float or array-like) – porosity in frac

  • phic (float) – critical porosity in frac

Returns:

float or array-like – K_dry,G_dry (GPa): dry elastic moduli of the framework

static cripor_reuss(M0, Mf, phic, den=False)[source]

In the suspension domain, the effective bulk and shear moduli of the rock can be estimated by using the Reuss (isostress) average.

Parameters:
  • M0 (float) – The solid phase modulus or density

  • Mf (float) – The pore filled phase modulus or density

  • phic (float) – critical porosity

  • den (bool, optional) – If False: compute the reuss average for effective modulus of two mixing phases. If true, compute avearge density using mass balance, which corresponds to voigt average. Defaults to False.

Returns:

float or array-like – M (GPa/g.cc): average modulus or average density

References

  • Section 7.1 Rock physics handbook 2nd edition

static HS(f, K1, K2, G1, G2, bound='upper')[source]

Compute effective moduli of two-phase composite using hashin-strikmann bounds.

Parameters:
  • f (float) – 0-1, volume fraction of stiff material

  • K1 (float or array-like) – bulk modulus of stiff phase

  • K2 (float or array-like) – bulk modulus of soft phase

  • G1 (float or array-like) – shear modulus of stiff phase

  • G2 (float or array-like) – shear modulus of soft phase

  • bound (str, optional) – upper bound or lower bound. Defaults to ‘upper’.

Returns:

float or array-like – K, G (GPa): effective moduli of two-phase composite

static Eshelby_Cheng(K, G, phi, alpha, Kf, mat=False)[source]

Compute the effective anisotropic moduli of a cracked isotropic rock with single set fracture using Eshelby–Cheng Model.

Parameters:
  • K (float) – bulk modulus of the isotropic matrix GPa

  • G (float) – shear modulus of the isotropic matrix GPa

  • phi (float) – (crack) porosity

  • alpha (float) – aspect ratio of crack

  • Kf (float) – bulk modulus of the fluid. For dry cracks use fluid bulk modulus 0

  • mat (bool, optional) – If true: the output is in matrix form, otherwise is numpy array. Defaults to False.

Returns:

1d or 2d array – C_eff: effective moduli of cracked, transversely isotropic rocks

References

  • section 4.14 in The Rock Physics Handbook

static hudson(K, G, Ki, Gi, alpha, crd, order=1, axis=3)[source]

Hudson’s effective crack model assuming weak inclusion for media with single crack set with all normals aligned along 1 or 3-axis. First and Second order corrections are both implemented. Notice that the second order correction has limitation. See Cheng (1993).

Parameters:
  • K (float) – bulk modulus of isotropic background

  • G (float) – shear modulus of isotropic background

  • Ki (float) – bulk modulus of the inclusion material. For dry cracks: Ki=0

  • Gi (float) – shear modulus of the inclusion material

  • alpha (float) – crack aspect ratio

  • crd (float) – crack density

  • order (int, optional) –

    approximation order.

    1: Hudson’s model with first order correction. 2: Hudson’s model with first order correction. Defaults to 1.

  • axis (int, optional) –

    axis of symmetry.

    1: crack normals aligned along 1-axis, output HTI 3: crack normals aligned along 3-axis, output VTI Defaults to 3

Returns:

2d array – C_eff: effective moduli in 6x6 matrix form.

static hudson_rand(K, G, Ki, Gi, alpha, crd)[source]

Hudson’s crack model of a material containing randomly oriented inclusions. The model results agree with the consistent results of Budiansky and O’Connell (1976).

Parameters:
  • K (float or array-like) – bulk modulus of isotropic background

  • G (float or array-like) – shear modulus of isotropic background

  • Ki (float) – bulk modulus of the inclusion material. For dry cracks: Ki=0

  • Gi (float) – shear modulus of the inclusion material, for fluid, Gi=0

  • alpha (float) – crack aspect ratio

  • crd (float) – crack density

Returns:

float or array-like – K_eff, G_eff (GPa): effective moduli of the medium with randomly oriented inclusions

static hudson_ortho(K, G, Ki, Gi, alpha, crd)[source]

Hudson’s first order effective crack model assuming weak inclusion for media with three crack sets with normals aligned along 1 2, and 3-axis respectively. Model is valid for small crack density and aspect ratios.

Parameters:
  • K (float) – bulk modulus of isotropic background

  • G (float) – shear modulus of isotropic background

  • Ki (float) – bulk modulus of the inclusion material. For dry cracks: Ki=0

  • Gi (float) – shear modulus of the inclusion material, for fluid, Gi=0

  • alpha (nd array with size 3) – [alpha1, alpha2,alpha3] aspect ratios of three crack sets

  • crd (nd array with size 3) – [crd1, crd2, crd3] crack densities of three crack sets

Returns:

2d array – C_eff: effective moduli in 6x6 matrix form.

static hudson_cone(K, G, Ki, Gi, alpha, crd, theta)[source]

Hudson’s first order effective crack model assuming weak inclusion for media with crack normals randomly distributed at a fixed angle from the TI symmetry axis 3 forming a cone;

Parameters:
  • K (float) – bulk modulus of isotropic background

  • G (float) – shear modulus of isotropic background

  • Ki (float) – bulk modulus of the inclusion material. For dry cracks: Ki=0

  • Gi (float) – shear modulus of the inclusion material, for fluid, Gi=0

  • alpha (float) – aspect ratios of crack sets

  • crd (float) – total crack density

  • theta (float) – the fixed angle between the crack normam and the symmetry axis x3. degree unit.

Returns:

2d array – C_eff: effective moduli of TI medium in 6x6 matrix form.

static Berryman_sc(K, G, X, Alpha)[source]

Effective elastic moduli for multi-component composite using Berryman’s Consistent (Coherent Potential Approximation) method.See also: PQ_vectorize, Berryman_func

Parameters:
  • K (array-like) – 1d array of bulk moduli of N constituent phases, [K1,K2,…Kn]

  • G (array-like) – 1d array of shear moduli of N constituent phases, [G1,G2,…Gn]

  • X (array-like) – 1d array of volume fractions of N constituent phases, [x1,…xn], Sum(X) = 1.

  • Alpha (array-like) – aspect ratios of N constituent phases. Note that α <1 for oblate spheroids and α > 1 for prolate spheroids, α = 1 for spherical pores,[α1,α2…αn]

Returns:

array-like – K_sc,G_sc: Effective bulk and shear moduli of the composite

static PQ_vectorize(Km, Gm, Ki, Gi, alpha)[source]

compute geometric strain concentration factors P and Q for prolate and oblate spheroids according to Berymann (1980).See also: Berryman_sc, Berryman_func

Parameters:
  • Km (float) – bulk modulus of matrix phase. For Berryman SC approach, this corresponds to the effective moduli of the composite.

  • Gm (float) – shear modulus of matrix phase. For Berryman SC approach, this corresponds to the effective moduli of the composite.

  • Ki (array-like) – 1d array of bulk moduli of N constituent phases, [K1,K2,…Kn]

  • Gi (array-like) – 1d array of shear moduli of N constituent phases, [G1,G2,…Gn]

  • alpha (array-like) – aspect ratios of N constituent phases. Note that α <1 for oblate spheroids and α > 1 for prolate spheroids, α = 1 for spherical pores,[α1,α2…αn]

Returns:

array-like – P,Q (array): geometric strain concentration factors, [P1,,,Pn],[Q1,,,Qn]

static Berryman_func(params, K, G, X, Alpha)[source]

Form the system of equastions to solve. See 4.11.14 and 4.11.15 in Rock physics handbook 2020. See also: Berryman_sc

Parameters:
  • params – Parameters to solve, K_sc, G_sc

  • K (array) – 1d array of bulk moduli of N constituent phases, [K1,K2,…Kn]

  • G (array) – 1d array of shear moduli of N constituent phases, [G1,G2,…Gn]

  • X (array) – 1d array of volume fractions of N constituent phases, [x1,…xn]

  • Alpha (array) – aspect ratios of N constituent phases. Note that α <1 for oblate spheroids and α > 1 for prolate spheroids, α = 1 for spherical pores,[α1,α2…αn]

Returns:

equation – Eqs to be solved

static Swiss_cheese(Ks, Gs, phi)[source]

Compute effective elastic moduli via “Swiss cheese” model with spherical pores. “Swiss cheese” model assumes a dilute distribution of spherical inclusions embedded in an * unbounded * homogenous solid. It takes the “noninteracting assumption” in which all cavities (pores) are independent so that their contributions can be added.

Parameters:
  • Ks (float or array-like) – Bulk modulus of matrix in GPa

  • Gs (float or array-like) – Shear modulus of matrix in GPa

  • phi (float or array-like) – porosity

Returns:

float or array-like – Kdry,Gdry (GPa): effective elastic moduli

static SC(phi, Ks, Gs, iter_n)[source]

Self-Consistent(SC) model with spherical pores considering the critical porosity and the interaction effect between inclusions.

Parameters:
  • phi (float or array-like) – porosity in frac, note that phi.shape== Ks.shape

  • Ks (float) – bulk modulus of matrix phase in GPa

  • Gs (float) – shear modulus of matrix phase in GPa

  • iter_n (int) – iterations, necessary iterations increases as f increases.

Returns:

float or array-like – K_eff,G_eff (GPa): effective elastic moduli

static Dilute_crack(Ks, Gs, cd)[source]

The non-iteracting randomly oriented crack model.

Parameters:
  • Ks (float) – bulk modulus of uncracked medium in GPa

  • Gs (float) – shear modulus of uncracked medium in GPa

  • cd (float or array-like) – crack density

Returns:

float or array-like – K_eff,G_eff (GPa): effective elastic moduli

static OConnell_Budiansky(K0, G0, crd)[source]

O’Connell and Budiansky (1974) presented equations for effective bulk and shear moduli of a cracked medium with randomly oriented dry penny-shaped cracks (in the limiting case when the aspect ratio α goes to 0)

Parameters:
  • K0 (float) – bulk modulus of background medium

  • G0 (float) – shear modulus of background medium

  • crd (float or array-like) – crack density

Returns:

float or array-like – K_dry,G_dry: dry elastic moduli of cracked medium

static OConnell_Budiansky_fl(K0, G0, Kfl, crd, alpha)[source]

Saturated effective elastic moduli using the O’Connell and Budiansky Consistent (SC) formulations under the constraints of small aspect ratio cracks with soft-fluid saturation.

Parameters:
  • K0 (float) – bulk modulus of background medium

  • G0 (float) – shear modulus of background medium

  • Kfl (float) – bulk modulus of soft fluid inclusion, e.g gas

  • crd (float) – crack density

  • alpha (float) – aspect ratio

Returns:

  • float – K_sat,G_sat: elastic moduli of cracked background fully saturated by soft fluid.

  • References – ———-

  • - O’Connell and Budiansky, (1974)

static OC_R_funcs(params, crd, nu_0, w)[source]

Form the system of equastions to solve. Given crack density and w, solve for the D and nu_eff simulaneously using equations 23 and 25 in O’Connell and Budiansky, (1974)

Parameters:
  • params – Parameters to solve

  • crd (float) – crack density

  • nu_0 (float) – Poisson’s ratio of background medium

  • w (float) – softness indicator of fluid filled crack, w=Kfl/alpha/K0, soft fluid saturation is w is the order of 1

Returns:

equation – eqs to be solved

static PQ(Km, Gm, Ki, Gi, alpha)[source]

compute geometric strain concentration factors P and Q for prolate and oblate spheroids according to Berymann (1980). See also PQ_vectorize

Parameters:
  • Km (float) – Bulk modulus of matrix phase

  • Gm (float) – Shear modulus of matrix phase

  • Ki (float) – Bulk modulus of inclusion phase

  • Gi (float) – Shear modulus of inclusion phase

  • alpha (float) – aspect ratio of the inclusion. Note that α <1 for oblate spheroids and α > 1 for prolate spheroids

Returns:

float – P,Q (unitless): geometric strain concentration factors

static DEM(y, t, params)[source]

ODE solver tutorial: https://physics.nyu.edu/pine/pymanual/html/chap9/chap9_scipy.html.

static Berryman_DEM(Km, Gm, Ki, Gi, alpha, phi)[source]

Compute elastic moduli of two-phase composites by incrementally adding inclusions of one phase (phase 2) to the matrix phase using Berryman DEM theory

Parameters:
  • Km (float) – host mineral bulk modulus

  • Gm (float) – host mineral shear modulus

  • Ki (float) – bulk modulus of inclusion

  • Gi (float) – shear modulus of inclusion

  • alpha (float) – aspect ratio of the inclusion phase

  • phi (float) – desired fraction occupied by the inclusion

static SC_dilute(Km, Gm, Ki, Gi, f, mode)[source]

Elastic solids with elastic micro-inclusions. Random distribution of dilute spherical micro-inclusions in a two phase composite.

Parameters:
  • Km (float) – bulk modulus of matrix

  • Gm (float) – shear modulus of matrix

  • Ki (float) – bulk modulus of inclusion

  • Gi (float) – shear modulus of inclusion

  • f (float or array) – volume fraction of inclusion phases

  • mode (string) – ‘stress’ if macro stress is prescribed. ‘strain’ if macro strain is prescribed.

References

  1. Nemat-Nasser and M. Hori (book) : Micromechanics: Overall Properties of Heterogeneous Materials. Sec 8

Returns:

float or array – K, G: effective moduli of the composite

static SC_flex(f, iter_n, Km, Ki, Gm, Gi)[source]

iteratively solving self consistent model for a two phase compposite consisting random distribution of spherical inclusion, not limited to pore.

Parameters:
  • f (float or array) – volumetric fraction, f.shape== Km.shape

  • iter_n (int) – iterations, necessary iterations increases as f increases.

  • Km (float) – bulk modulus of matrix phase

  • Ki (float) – bulk modulus of inclusion phase

  • Gm (float) – shear modulus of matrix phase

  • Gi (float) – shear modulus of inclusion phase

  • Reference

  • ---------

  • (book) (S. Nemat-Nasser and M. Hori) –

Returns:

float or array – K_eff, G_eff (GPa): Effective elastic moduli

static MT_average(f, Kmat, Gmat, K1, G1, K2, G2)[source]

Compute Two-phase composite without matrix using modified Mori-Takana Scheme according to Iwakuma 2003, one of the inhomogeneities must be considered as a matrix in the limiting model.

Parameters:
  • f (float or array) – Volume fraction of matrix/inhomogeneity 1. f1=1-f2, (1-f) can be regarded as pseudo crack density.

  • Kmat (float) – Bulk modulus of matrix/inhomogeneity 1

  • Gmat (float) – shear modulus of matrix/ inhomogeneity 1

  • K1 (float) – Bulk modulus of inhomogeneity 1

  • G1 (float) – shear modulus of inhomogeneity 1

  • K2 (float) – Bulk modulus of inhomogeneity 2

  • G2 (float) – shear modulus of inhomogeneity 2

Returns:

float or array – K_ave, G_ave [GPa]: MT average bulk and shear modulus

class rockphypy.Empirical[source]

Empirical relations that widely applied

static krief(phi, Kg, Gg)[source]

Compute porous background elastic constants as a function of porosity according to Krief model.

Parameters:
  • phi (float or array) – porosity in porous rock

  • Kg (float) – grain bulk modulus

  • Gg (float) – grain shear modulus

Returns:

float or array – lamda,G,K

static esti_VS(Vp, vsh)[source]

Estimate, using the Greenberg-Castagna empirical relations, the shearwave velocity in a brine-saturated shaly sandstone with vp since we only assume two minearl phases: so L=2, X1= 1-vsh, X2= vsh

Parameters:
  • Vp (float or array-like) – compressional velocities, m/s

  • vsh (float or array-like) – shale volume

Returns:

  • float or array-like – vs (m/s): estimated shear wave velocities

  • References – ———-

  • - handbook of rock physics P516

static han(phi, C)[source]

Han (1986) found empirical regressions relating ultrasonic (laboratory) velocities to porosity and clay content.effective pressure is 20Mpa

Parameters:
  • phi (float or array-like) – porosity

  • C (float or array-like) – clay volume fraction

Returns:

float or array-like – P and S wave velocities

static ehrenberg(Z)[source]

porosity reference trend for Norwegian Sea sandstone. Note that the functional form of the porosity model is not published in Ehrenberg (1990). It is obtained by linear regression of the digitized data point from the original plot in the paper.

Parameters:

Z (float or array) – burial depth below see floor in Km

References

Ehrenberg, S., 1990, Relationship between diagenesis and reservoir quality in sandstones of the Garn Formation, Haltenbanken, mid-Norwegian continental shelf: AAPG bulletin, 74, no. 10, 1538

Returns:

float or array – porosity

static yu_segment_trend(Z)[source]

Reference trend for Norwegian sea normally buried clean sandstones

Parameters:

Z (float or array) – burial depth below see floor in m

Returns:

float or array – P wave velocities

static ramm_porosity(Z, HB=True)[source]

porosity reference trend according to Ramm & Bjørlykke (1994)

Parameters:
  • Z (float or array) – burial depth wrt. sea floor in m

  • HB (bool, optional) – if True: only show the regression line for halten bakken area porosity data False: The regression line for all porosity from north sea and norwegian sea, by default True

Returns:

float or array – porosity

static ramm_porosity_segment(Z)[source]

segment porosity reference trend according to Ramm & Bjørlykke (1994) considering the mechanical and chemical compaction

Parameters:

Z (float or array) – burial depth wrt. sea floor in m

Returns:

float or array – porosity

static empirical_StPeter(Pe, sample=1)[source]

compute the Vp and Vs for st peter sandstone using the empirical relationship in the form of V= A+KPe-Be^(-DPe)

Parameters:
  • Pe (float or array) – effective pressure in Kbar, 1kbar= 100Mpa

  • sample (int, optional) – 1-sample 1, phi= 0.205. 2-sample 2, phi= 0.187, by default 1

Returns:

float or array – Vp,Vs in km

static Scherbaum(Z)[source]

velocity depth trend for Lower and Middle Buntsandstein

Parameters:

Z (float or array) – burial depth wrt. sea floor in m

References

Scherbaum, F., 1982. Seismic velocities in sedimentary rocks—indicators of subsidence and uplift?. Geologische Rundschau, 71(2), pp.519-536.

Returns:

float or array – P wave velocities in m/s

static Sclater(phi)[source]

Sclater-Christie exponential curve for sandstone

Parameters:

phi (float or array) – porosity

Returns:

Z (float or array) – depth wrt. sea floor in km.

static Storvoll(Z)[source]

Storvoll velocity compaction trend. The trend is for shale and shaly sediments but also used for siliciclastic rock like sandstone

Parameters:

Z (float or array) – depth wrt. sea floor in m.

Returns:

float or array – Vp meters per second

static Hillis(Z)[source]

compaction trend for Bunter Sandstone in North sea

Parameters:

Z (float or array) – depth below sea bed (in kilometers)

Returns:

float or array – Vp km/s

static Japsen(Z)[source]

a segmented linear velocity–depth function, These equations are considered as approximation for bunter sandstone trend although they are originally for bunter shale. proposed by Japsen 1999

Parameters:

Z (float or array) – depth below sea bed in m.

Returns:

float or array – Vp m/s

static hjelstuen(Z)[source]

Velocity-depth relationships for the Bjørna-Sørkapp margin deposits. note: the seismic velocities are not directly comparable with velocities from sonic logs (because of the different frequencies), and the velocity-depth profile of Hjelstuen et al. (1996) has not been corrected for uplift and erosion

Parameters:

Z (float or array) – Z< 3.8km

Returns:

float or array – V: m/s

static Cp(phi)[source]

The coordination number n depends on porosity, as shown by Murphy 1982.

Parameters:

phi (float or array) – total porosity , for a porosity of 0.4, n=8.6

Returns:

float or array – coordination number

class rockphypy.QI(Vp, phi, **kwargs)[source]

Useful functionalities for quantitative intepretation and relevant tasks.

initialize the parameters for various QI plots. e.g., phi,den,Vsh,eff_stress, TVD can be given depending on required the input parameters to the plot funtion.

Parameters:
  • Vp (array) – p wave velocity

  • phi (array) – porosity

static matrix_modulus(vsh, phi_c, phi_0, M_sh, M_g, M_c)[source]

Calculate the modulus of rock matrix as a function of porosity variation caused by cementation, Note that the rock matrix contains everything excluding pore space.

Parameters:
  • vsh (float) – bulk volume fraction of shale, can be derived from well log.

  • phi_c (float) – critical porosity

  • phi_0 (float or array) – static porosity during cementation ranging between 0.4 to 0 should be phi when phi is an array of porosity

  • M_sh (float) – modulus of shale

  • M_g (float) – modulus of grain material

  • M_c (float) – modulus of cement

Returns:

float or array – M_mat: updated matrix modulus

static den_matrix(vsh, phi_c, phi_0, den_sh, den_g, den_c)[source]

Calculate the matrix density as a function of porosity variation caused by cementation.

Parameters:
  • vsh (float) – bulk volume fraction of shale, can be derived from well log.

  • phi_c (float) – critical porosity

  • phi_0 (float or array) – static porosity during cementation ranging between 0.4 to 0 should be phi when phi is an array of porosity

  • den_sh (float) – density of the clay

  • den_g (float) – density of the grain

  • den_c (float) – density of the cement

Returns:

float or array – den_mat: updated matrix density

static screening(Dqz, Kqz, Gqz, Dsh, Ksh, Gsh, Dc, Kc, Gc, Db, Kb, phib_p, phi_c, sigma, vsh, scheme, f, Cn)[source]

compute elastic bounds used for rock physics screening, the lower bound is computed using friable sand model, and the upper bound is contact cement model blend with increasing cement model.

Parameters:
  • K0 (float) – Bulk modulus of grain material in GPa

  • G0 (float) – Shear modulus of grain material in GPa

  • Dqz (float) – Density of the grain. not limited to quartz grain

  • Kqz (float) – Bulk modulus of grain material in GPa

  • Gqz (float) – Shear modulus of grain material in GPa

  • Dsh (float) – density the clay

  • Ksh (float) – bulk modulus of the clay

  • Gsh (float) – shear modulus of the clay

  • Dc (float) – density of the cement

  • Kc (float) – Bulk modulus of cement

  • Gc (float) – Shear modulus of cement

  • Db (float) – density of the pore fluid

  • Kb (float) – bulk modulus of the pore fluid

  • phib_p (float) – adjusted high porosity end memeber

  • phic (float) – Critical Porosity

  • sigma (float or array-like) – effective stress

  • vsh (_type_) – _description_

  • scheme (int) –

    Scheme of cement deposition

    1=cement deposited at grain contacts 2=cement deposited at grain surfaces

  • f (float) –

    reduced shear factor between 0 and 1

    0=dry pack with inifinitely rough spheres; 1=dry pack with infinitely smooth spheres

  • Cn (float) – coordination number

Returns:

array – phi,vp1,vp2,vp3,vs1,vs2,vs3: porosity and velocities required for elastic diagnostics bounds

screening_plot(phi, vp1, vp2, vp3, cmap=cmap_sand)[source]

plot the rock physics screening crossplot

Parameters:
  • phi (array) – porosity

  • vp1 (array) – lower bound velocities modeled using friable sandstone model by default .

  • vp2 (array) – upper bound velocities modeled using MUSH model by default.

  • vp3 (array) – upper bound velocities modeled using contact cement model by default.

  • cmap (string, optional) – colormap, can be default colormaps in matplotlib, by default using the customized colormap: cmap_sand

Returns:

object – elastic bounds plot used for rock physics screening

static normalize(density)[source]

normalize the kde with respect to the maximum value and map value to 0-1

kde_plot(phi, v1, v2, v3, cmap=cmap_kde, vels='Vp', n=64)[source]

plot field data or measurements as 2D probability density functions in the elastic bounds cross plot

Parameters:
  • phi (array) – porosity

  • vp1 (array) – lower bound velocities modeled using friable sandstone model by default .

  • vp2 (array) – upper bound velocities modeled using MUSH model by default.

  • vp3 (array) – upper bound velocities modeled using contact cement model by default.

  • cmap (string, optional) – colormap, can be default colormaps in matplotlib, by default using the customized colormap: cmap_kde

  • vels (str, optional) – choose either P wave or S wave velocity for plotting, by default ‘Vp’

  • n (int, optional) – grid parameter used in KDE-diffusion, by default 64

Returns:

object – KDE plot with elastic bounds

static cst_vels(phi_b, K0, D0, G0, phi, phi_c, Cn, Kc, Gc, Db, Kb, scheme, vsh, Dsh, Dqz, Dc)[source]

compute velocities using constant cement model at different cement amounts

Parameters:
  • phi_b (float) – adjusted porosity for constant cemnet model

  • K0 (float) – Bulk modulus of grain material in GPa

  • D0 (float) – Density of grain material

  • G0 (float) – Shear modulus of grain material in GPa

  • phi (float) – porosity

  • phi_c (float) – Critical Porosity

  • Cn (float) – critical porosity

  • Kc (float) – Bulk modulus of cement

  • Gc (float) – Shear modulus of cement

  • Db (float) – density of the pore fluid

  • Kb (float) – bulk modulus of the pore fluid

  • scheme (int) –

    Scheme of cement deposition

    1=cement deposited at grain contacts 2=cement deposited at grain surfaces

  • vsh (float) – shale content

  • Dsh (float) – density the clay

  • Dqz (float) – Density of the grain. not limited to quartz grain

  • Dc (float) – density of the cement

Returns:

array – vp,vs: velocities given by constant cement model

static cst_plot(Dqz, Kqz, Gqz, Dsh, Ksh, Gsh, Dc, Kc, Gc, Db, Kb, phib, phib_p, phi_c, sigma, vsh, Cn, scheme, f)[source]

Diagnostic plot with constant cement model lines

Parameters:
  • Dqz (float) – Density of the grain. not limited to quartz grain

  • Kqz (float) – Bulk modulus of grain material in GPa

  • Gqz (float) – Shear modulus of grain material in GPa

  • Dsh (float) – density the clay

  • Ksh (float) – bulk modulus of the clay

  • Gsh (float) – shear modulus of the clay

  • Dc (float) – density of the cement

  • Kc (float) – Bulk modulus of cement

  • Gc (float) – Shear modulus of cement

  • Db (float) – density of the pore fluid

  • Kb (float) – bulk modulus of the pore fluid

  • phib (float) – adjusted high porosity end memeber for constant cement model

  • phib_p (array or list) – posoities used to drawing the constant cement lines

  • phi_c (float) – Critical Porosity

  • sigma (float) – effective stress

  • vsh (float) – shale content

  • Cn (float) – coordination number

  • scheme (int) –

    Scheme of cement deposition

    1=cement deposited at grain contacts 2=cement deposited at grain surfaces

  • f (float) –

    reduced shear factor between 0 and 1

    0=dry pack with inifinitely rough spheres; 1=dry pack with infinitely smooth spheres

Returns:

object – fig,ax: constant cement diagnostic plot

static cal_v_const(Dqz, Kqz, Gqz, Dsh, Ksh, Gsh, Dc, Kc, Gc, Db, Kb, phi_b, phi_c, vsh, phi, scheme)[source]

input real data porosity and caculate the theoretical constant cement model velocity value. Note: input porosity cannot be zero, otherwise the returned velocities are Nan.

Parameters:
  • Dqz (float) – Density of the grain. not limited to quartz grain

  • Kqz (float) – Bulk modulus of grain material in GPa

  • Gqz (float) – Shear modulus of grain material in GPa

  • Dsh (float) – density the clay

  • Ksh (float) – bulk modulus of the clay

  • Gsh (float) – shear modulus of the clay

  • Dc (float) – density of the cement

  • Kc (float) – Bulk modulus of cement

  • Gc (float) – Shear modulus of cement

  • Db (float) – density of the pore fluid

  • Kb (float) – bulk modulus of the pore fluid

  • phi_b (_type_) – _description_

  • phi_c (float) – Critical Porosity

  • vsh (float) – shale content

  • phi (array) – porosity

  • scheme (int) –

    Scheme of cement deposition

    1=cement deposited at grain contacts 2=cement deposited at grain surfaces

Returns:

array – vp,vs: constant cement velocities

estimate_cem(vcem_seeds, Kqz, Gqz, Ksh, Gsh, phi_c, Cn, Kc, Gc, Db, Kb, scheme, vsh, Dsh, Dqz, Dc)[source]

Estimate cement amount for well log data using constant cement model crossplot.

Parameters:
  • vcem_seeds (array or list) – some predefined values at which constant cement lines are calculated

  • Kqz (float) – Bulk modulus of grain material in GPa

  • Gqz (float) – Shear modulus of grain material in GPa

  • Ksh (float) – bulk modulus of the clay

  • Gsh (float) – shear modulus of the clay

  • phi_c (float) – Critical Porosity

  • Cn (float) – coordination number

  • Kc (float) – Bulk modulus of cement

  • Gc (float) – Shear modulus of cement

  • Db (float) – density of the pore fluid

  • Kb (float) – bulk modulus of the pore fluid

  • scheme (int) –

    Scheme of cement deposition

    1=cement deposited at grain contacts 2=cement deposited at grain surfaces

  • vsh (float) – shale content

  • Dsh (float) – density the clay

  • Dqz (float) – Density of the grain. not limited to quartz grain

  • Dc (float) – density of the cement

Returns:

array – cement amount estimation for each well log data points

cement_diag_plot(vcem, Dqz, Kqz, Gqz, Dsh, Ksh, Gsh, Dc, Kc, Gc, Db, Kb, phib, phib_p, phi_c, sigma, vsh, Cn, scheme, f)[source]

_summary_

Parameters:
  • vcem (_type_) – _description_

  • Dqz (float) – Density of the grain. not limited to quartz grain

  • Kqz (float) – Bulk modulus of grain material in GPa

  • Gqz (float) – Shear modulus of grain material in GPa

  • Dsh (float) – density the clay

  • Ksh (float) – bulk modulus of the clay

  • Gsh (float) – shear modulus of the clay

  • Dc (float) – density of the cement

  • Kc (float) – Bulk modulus of cement

  • Gc (float) – Shear modulus of cement

  • Db (float) – density of the pore fluid

  • Kb (float) – bulk modulus of the pore fluid

  • phib (float) – adjusted high porosity end memeber for constant cement model

  • phib_p (array or list) – posoities used to drawing the constant cement lines

  • phi_c (float) – Critical Porosity

  • sigma (float or array-like) – effective stress

  • vsh (float) – shale content

  • Cn (float) – coordination number

  • scheme (int) –

    Scheme of cement deposition

    1=cement deposited at grain contacts 2=cement deposited at grain surfaces

  • f (float) –

    reduced shear factor between 0 and 1

    0=dry pack with inifinitely rough spheres; 1=dry pack with infinitely smooth spheres

Returns:

object – cross plot for cement estimation

static plot_rpt(Kdry, Gdry, K0, D0, Kb, Db, Khc, Dhc, phi, sw)[source]

Create RPT plot given computed Impedance and Vp/Vs ratio.

Parameters:
  • Kdry (float or array) – effective bulk modulus given by rock physics model

  • Gdry (float or array) – effective shear modulus given by rock physics model

  • K0 (float) – bulk modulus of grain

  • D0 (float) – density of grain

  • Kb (float) – bulk moduluf of brine

  • Db (float) – density of brine

  • Khc (float) – bulk modulus of HC

  • Dhc (float) – density of HC

  • phi (float or array) – porosity

  • sw (float or array) – water saturation

Returns:

python onject (fig) – rpt plot

class rockphypy.utils[source]

Basic calculations for velocities, moduli and stiffness matrix.

static V(K, G, rho)[source]

Compute velocity given density and elastic moduli.

Parameters:
  • K (float or array) – (GPa): bulk modulus

  • G (float or array) – (GPa): shear moulus

  • rho (float or array) – (g/m3): density of the frame

Returns:

float or array – Vp, Vs (m/s): velocity

static poi(K, G)[source]

Compute poisson’s ratio from K an G

Parameters:
  • K (float or array) – (GPa): bulk modulus

  • G (float or array) – (GPa): shear moulus

Returns:

float or array – Poisson’s ratio

static lame(K, G)[source]

Compute lame constant lamdba from K an G

Parameters:
  • K (float or array) – (GPa): bulk modulus

  • G (float or array) – (GPa): shear moulus

Returns:

float or array – Poisson’s ratio

static M_from_V(den, vp, vs)[source]

_summary_

Parameters:
  • den (float or array) – (g/cm3): bulk density

  • vp (float or array) – (m/s): p wave velocity

  • vs (float or array) – (m/s): s wave velocity

Returns:

float or array – K, G (GPa):bulk and shear moduli

static write_HTI_matrix(C11, C33, C13, C44, C55)[source]

formulate HTI stiffness matrix

Parameters:
  • C11 (float) – (GPa): stiffness

  • C33 (float) – (GPa): stiffness

  • C13 (float) – (GPa): stiffness

  • C44 (float) – (GPa): stiffness

  • C55 (float) – (GPa): stiffness

Returns:

2d array – C: 6x6 stiffness matrix

static write_VTI_compliance(S11, S12, S13, S33, S44)[source]

formulate VTI compliance matrix

Parameters:
  • S11 (float) – (GPa): stiffness

  • S12 (float) – (GPa): stiffness

  • S13 (float) – (GPa): stiffness

  • S33 (float) – (GPa): stiffness

  • S44 (float) – (GPa): stiffness

Returns:

2d array – S: 6x6 compliance matrix

static write_VTI_matrix(C11, C33, C13, C44, C66)[source]

formulate VTI stiffness matrix

Parameters:
  • C11 (float) – (GPa): stiffness

  • C33 (float) – (GPa): stiffness

  • C13 (float) – (GPa): stiffness

  • C44 (float) – (GPa): stiffness

  • C66 (float) – (GPa): stiffness

Returns:

2d array – C: 6x6 stiffness matrix

static write_matrix(C11, C22, C33, C12, C13, C23, C44, C55, C66)[source]

formulate general 6x6 stiffness matrix in Voigt notation

Parameters:
  • C11 (float) – (GPa): stiffness

  • C22 (float) – (GPa): stiffness

  • C33 (float) – (GPa): stiffness

  • C12 (float) – (GPa): stiffness

  • C13 (float) – (GPa): stiffness

  • C23 (float) – (GPa): stiffness

  • C44 (float) – (GPa): stiffness

  • C55 (float) – (GPa): stiffness

  • C66 (float) – (GPa): stiffness

Returns:

2d array – C: 6x6 stiffness matrix

static write_iso(K, G)[source]

formulate isotropic 6x6 stiffness matrix in Voigt notation

Parameters:

K

Gfloat or array

(GPa): shear moulus

Returns:

2d array – C: 6x6 stiffness matrix

static crack_por(crd, alpha)[source]

compute crack porosity from crack aspect ratio and crack density

Parameters:
  • crd (float or array) – (unitless): crack density

  • alpha (float or array) – crack aspect ratio

Returns:

float or array – cpor (frac): crack porosity

static v_to_c_VTI(Vp0, Vp45, Vp90, Vs0, Vsh90, den)[source]

compute stiffness matrix given velocity measurements along different directions

Parameters:
  • Vp0 (float or array) – (km/s): incident angle dependent velocity measurements

  • Vp45 (float or array) – (km/s): incident angle dependent velocity measurements

  • Vp90 (float or array) – (km/s): incident angle dependent velocity measurements

  • Vs0 (float or array) – (km/s): incident angle dependent velocity measurements

  • Vsh90 (float or array) – (km/s): incident angle dependent velocity measurements

  • den (float or array) – (g/cm3):density of the sample

Returns:

2d array – C: VTI stiffness matrix