constants module

class constants.Constants(vp_constants: VpConstants = None, vs_constants: VsConstants = None, material_constants: MaterialConstants = None)[source]

Bases: object

Master class controlling instantiation of VpConstants and VsConstants.

Usage

Initialize Constants class to create instances for VpConstants and VsConstants.

Example

constants = Constants()
constants.get_v_constants('Vp', v0=-0.9, b=0.001, d0=2.5,
                        dp=-0.0005, c=1.7, k=0.019, m=1.5)
constants.get_v_constants('Vs', v0=-0.9, b=0.001, d0=2.5,
                        dp=-0.0005, c=1.7, k=0.019, m=2.5)
vp_instance = constants.vp_constants
vs_instance = constants.vs_constants
get_material_constants(**kwargs)[source]

Get material constants instance and assign them to class attributes.

Parameters:

**kwargs – Variable keyword arguments representing constant values.

get_v_constants(data_type: str, **kwargs)[source]

Get constants instance based on data_type (‘Vp’ or ‘Vs’) and assign them to class attributes.

Parameters:
  • data_type (str) – Indicates whether VpConstants or VsConstants should be instantiated.

  • **kwargs – Variable keyword arguments representing constant values.

Raises:

ValueError – If an invalid data_type is provided.

material_constants: MaterialConstants = None
vp_constants: VpConstants = None
vs_constants: VsConstants = None
class constants.MaterialConstants(alpha0: float = 1e-05, alpha1: float = 2.9e-08, K: float = 90000000000.0, alpha0_unc: float = 5e-06, alpha1_unc: float = 5e-09, K_unc: float = 20000000000.0)[source]

Bases: object

This class represents material properties for geophysical calculations.

alpha0

Thermal expansivity coefficient at reference temperature. Default is 1e-5.

Type:

float

alpha1

Temperature derivative of thermal expansion coefficient. Default is 2.9e-8.

Type:

float

K

Bulk modulus, invariant with pressure and temperature. Default is 90e9.

Type:

float

alpha0_unc

Uncertainty in alpha0. Default is 0.5e-5.

Type:

float

alpha1_unc

Uncertainty in alpha1. Default is 0.5e-8.

Type:

float

K_unc

Uncertainty in K. Default is 20e9.

Type:

float

K: float = 90000000000.0
K_unc: float = 20000000000.0
alpha0: float = 1e-05
alpha0_unc: float = 5e-06
alpha1: float = 2.9e-08
alpha1_unc: float = 5e-09
class constants.VpConstants(v0: float = -0.93521, b: float = 0.00169478, d0: float = 2.55911, dp: float = -0.00047605, c: float = 1.674065, k: float = 0.01953466, m: float = -0.0004, v0_unc: float = None, b_unc: float = None, d0_unc: float = None, dp_unc: float = None, c_unc: float = None, k_unc: float = None, m_unc: float = 0.0001)[source]

Bases: object

This class represents constants for compressional wave velocity (Vp).

v0

Initial velocity at reference conditions. Default is -9.3521e-01.

Type:

float

b

Velocity gradient as function of pressure at constant temperature. Default is 1.69478e-03.

Type:

float

d0

Velocity gradient with respect to density at standard temperature and pressure. Default is 2.55911.

Type:

float

dp

Pressure dependence of velocity gradient with respect to density. Default is -4.76050e-04.

Type:

float

c

Exponential drop-off magnitude. Default is 1.674065.

Type:

float

k

Exponential drop-off of Vp at low pressure. Default is 1.953466e-02.

Type:

float

m

Velocity gradient as function of temperature at constant pressure. Default is -4e-4.

Type:

float

v0_unc

Uncertainty in v0. Default is None.

Type:

float, optional

b_unc

Uncertainty in b. Default is None.

Type:

float, optional

d0_unc

Uncertainty in d0. Default is None.

Type:

float, optional

dp_unc

Uncertainty in dp. Default is None.

Type:

float, optional

c_unc

Uncertainty in c. Default is None.

Type:

float, optional

k_unc

Uncertainty in k. Default is None.

Type:

float, optional

m_unc

Uncertainty in m. Default is 1e-4.

Type:

float, optional

b: float = 0.00169478
b_unc: float = None
c: float = 1.674065
c_unc: float = None
d0: float = 2.55911
d0_unc: float = None
dp: float = -0.00047605
dp_unc: float = None
k: float = 0.01953466
k_unc: float = None
m: float = -0.0004
m_unc: float = 0.0001
v0: float = -0.93521
v0_unc: float = None
class constants.VsConstants(v0: float = -0.60777, b: float = 0.0010345, d0: float = 1.4808, dp: float = -0.00029773, c: float = 0.7374, k: float = 0.020041, m: float = -0.00023, v0_unc: float = None, b_unc: float = None, d0_unc: float = None, dp_unc: float = None, c_unc: float = None, k_unc: float = None, m_unc: float = 0.0001)[source]

Bases: object

This class represents constants for shear wave velocity (Vs).

v0

Initial velocity at reference conditions. Default is -6.0777e-01.

Type:

float

b

Velocity gradient as function of pressure at constant temperature. Default is 1.0345e-03.

Type:

float

d0

Velocity gradient with respect to density at standard temperature and pressure. Default is 1.4808.

Type:

float

dp

Pressure dependence of velocity gradient with respect to density. Default is -2.9773e-04.

Type:

float

c

Exponential drop-off magnitude. Default is 7.3740e-01.

Type:

float

k

Exponential drop-off of Vs at low pressure. Default is 2.0041e-02.

Type:

float

m

Velocity gradient as function of temperature at constant pressure. Default is -2.3e-4.

Type:

float

v0_unc

Uncertainty in v0. Default is None.

Type:

float, optional

b_unc

Uncertainty in b. Default is None.

Type:

float, optional

d0_unc

Uncertainty in d0. Default is None.

Type:

float, optional

dp_unc

Uncertainty in dp. Default is None.

Type:

float, optional

c_unc

Uncertainty in c. Default is None.

Type:

float, optional

k_unc

Uncertainty in k. Default is None.

Type:

float, optional

m_unc

Uncertainty in m. Default is 1e-4.

Type:

float, optional

b: float = 0.0010345
b_unc: float = None
c: float = 0.7374
c_unc: float = None
d0: float = 1.4808
d0_unc: float = None
dp: float = -0.00029773
dp_unc: float = None
k: float = 0.020041
k_unc: float = None
m: float = -0.00023
m_unc: float = 0.0001
v0: float = -0.60777
v0_unc: float = None