diabayes.physics package#

Submodules#

diabayes.physics.chen_niemeijer_spiers module#

diabayes.physics.chen_niemeijer_spiers.cns(variables: Variables, params: CNSParams, constants: CNSConstants) Float[source]#

The Chen-Niemeijer-Spiers (CNS) friction law

\[ \begin{align}\begin{aligned}v(\mu, \phi) = v_0 \left( v_{\text{gr}}(\mu, \phi) + v_{\text{creep}}(\mu, \phi) \right)\\v_{\text{gr}} = \exp \left( \frac{\mu \left[1 - \mu_0 \tan \psi \right] - \mu_0 - \tan \psi}{\alpha \left[ 1 + \mu \tan \psi \right]} \right)\\v_{\text{creep}} = \xi \mu f(\phi)\\\tan \psi = 2 \beta \left( \phi_c - \phi \right)\\f(\phi) = \frac{\phi - \phi_0}{\phi_c - \phi}\end{aligned}\end{align} \]
Parameters:
  • variables (Variables) – The friction coefficient mu and gouge porosity phi

  • params (CNSParams) – The CNS parameters alpha, beta, phi_c, xi, and mu0

  • constants (CNSConstants) – The constant parameters v0, h, and phi0

Returns:

v – The instantaneous slip rate in the same units as v0

Return type:

Float

diabayes.physics.chen_niemeijer_spiers.cns_porosity(v: Float, variables: Variables, params: CNSParams, constants: CNSConstants) Float[source]#

The porosity (state) evolution for the Chen-Niemeijer-Spiers model

\[ \begin{align}\begin{aligned}\frac{\mathrm{d}\phi}{\mathrm{d}t} = - \left(1 - \phi \right) \left(\dot{\varepsilon}_{\text{gr}} + \dot{\varepsilon}_{\text{creep}} \right)\\\dot{\varepsilon}_{\text{gr}} = - \frac{\tan \psi}{h} \left( v - v_{\text{creep}} \right)\\\dot{\varepsilon}_{\text{creep}} = \frac{v_0}{h} \xi f(\phi)\\v_{\text{creep}} = v_0 \xi f(\phi) \mu\\\tan \psi = 2 \alpha \left( \phi_c - \phi \right)\\f(\phi) = \frac{\phi - \phi_0}{\phi_c - \phi}\end{aligned}\end{align} \]
Parameters:
  • v (Float) – Instantaneous fault slip rate [m/s].

  • variables (Variables) – The friction coefficient mu and gouge porosity phi

  • params (CNSParams) – The CNS parameters alpha, beta, phi_c, xi, and mu0

  • constants (CNSConstants) – The constant parameters v0, h, and phi0

Returns:

dphi – The rate of change of the porosity [1/s]

Return type:

Float

diabayes.physics.chen_niemeijer_spiers.steady_state_porosity(v: Float, mu: Float, params: CNSParams, constants: CNSConstants) Float[source]#
diabayes.physics.chen_niemeijer_spiers.sundman_cns(v: Float, variables: Variables, params: CNSParams, constants: CNSConstants) Float[source]#

diabayes.physics.rate_and_state module#

diabayes.physics.rate_and_state.ageing_law(v: Float, variables: Variables, params: RSFParams, constants: RSFConstants) Float[source]#

The conventional ageing law state evolution formulation

\[\frac{\mathrm{d}\theta}{\mathrm{d}t} = 1 - \frac{v \theta}{D_c}\]
Parameters:
  • v (Float) – Instantaneous fault slip rate [m/s].

  • variables (Variables) – The friction coefficient mu and state parameter theta

  • params (RSFParams) – The rate-and-state parameters, including D_c

  • constants (RSFConstants) – The constant parameters mu0 and v0 (not used)

Returns:

dtheta – The rate of change of the state variable [s/s]

Return type:

Float

diabayes.physics.rate_and_state.aging_law(*args, **kwargs)[source]#

Alias for the ageing_law function

diabayes.physics.rate_and_state.rsf(variables: Variables, params: RSFParams, constants: RSFConstants) Float[source]#

The classical rate-and-state friction law

\[v(\mu, \theta) = v_0 \exp \left( \frac{1}{a} \left[ \mu - \mu_0 - b \log \left( \frac{v_0 \theta}{D_c} \right) \right] \right)\]
Parameters:
  • variables (Variables) – The friction coefficient mu and state parameter theta

  • params (RSFParams) – The rate-and-state parameters a, b, and D_c

  • constants (RSFConstants) – The constant parameters mu0 and v0

Returns:

v – The instantaneous slip rate in the same units as v0

Return type:

Float

diabayes.physics.rate_and_state.slip_law(v: Float, variables: Variables, params: RSFParams, constants: RSFConstants) Float[source]#

The conventional slip law state evolution formulation

\[\frac{\mathrm{d}\theta}{\mathrm{d}t} = - \frac{v \theta}{D_c} \ln \left( \frac{v \theta}{D_c} \right)\]
Parameters:
  • v (Float) – Instantaneous fault slip rate [m/s].

  • variables (Variables) – The friction coefficient mu and state parameter theta

  • params (RSFParams) – The rate-and-state parameters, including D_c

  • constants (RSFConstants) – The constant parameters mu0 and v0 (not used)

Returns:

dtheta – The rate of change of the state variable [s/s]

Return type:

Float

diabayes.physics.stress_transfer module#

diabayes.physics.stress_transfer.inertial_springblock(t: Float, v: Float, v_partials: Variables, variables: Variables, dstate: Float[Array, '...'], constants: InertialSpringBlockConstants) Float[source]#

An inertial spring-block loading formulation

\[\frac{\mathrm{d} \mu}{\mathrm{d} t} = \left[ \frac{\partial v}{\partial \mu} \right]^{-1} \left( \frac{1}{M} \left[ k \left( v_{lp} t - x \right) - \mu \right] - \frac{\partial v}{\partial \theta} \frac{\mathrm{d} \theta}{\mathrm{d} t} - \dots \right)\]

The acceleration term in the classical inertial spring-block formulation is decomposed into its partial derivatives, avoiding the need for solving a second-order ODE. These partial derivatives (v_partials) are computed using the JAX autodiff framework.

Notes

This formulation is rather stiff, and for certain parameter values could lead to extremely small time steps necessary to maintain numerical accuracy. It is recommended to use a conventional (non-inenrtial) springblock formulation for basic velocity-steps and slide-hold-slide simuilations. Inertia is only really needed for stick-slip simulations.

Parameters:
  • t (Float) – Current value of time [s]

  • v (Float) – Instantaneous fault slip rate [m/s]

  • v_partials (Variables) – The partial derivatives of slip rate to the relevant variables (friction and state variables)

  • variables (Variables) – The instantaneous values of the variables: friction (mu), slip (slip), and other state variables (not used)

  • dstate (Array) – The time derivatives of the state variables. The radiation term is v_partials @ dstate (excluding mu)

  • constants (InertialSpringBlockConstants) – The spring-block constants containing the mass term M, the stiffness k, and the load-point velocity v_lp

Returns:

dmu – The rate of change of the friction coefficient [1/s]

Return type:

Float

diabayes.physics.stress_transfer.springblock(t: Float, v: Float, v_partials: Variables, variables: Variables, dstate: Float[Array, '...'], constants: SpringBlockConstants) Float[source]#

A conventional (non-inertial) spring-block loading formulation

\[\frac{\mathrm{d} \mu}{\mathrm{d} t} = k \left ( v_{lp} - v(t) \right)\]
Parameters:
  • v (Float) – Instantaneous fault slip rate [m/s].

  • variables (Variables) – The instantaneous variables. This argument is not used, but included for call signature consistency.

  • constants (SpringBlockConstants) – The constant parameters stiffness k (units of “friction per metre”) and load-point velocity v_lp (same units as v).

Returns:

dmu – The rate of change of the friction coefficient [1/s]

Return type:

Float

Module contents#

diabayes.physics.slip_rate(v: Float, variables: Variables, params: RSFParams | CNSParams, constants: RSFConstants | CNSConstants) Float[source]#

Evolve slip from slip rate

\[\frac{\mathrm{d} x}{\mathrm{d} t} = v\]
Parameters:
  • v (Float) – Instantaneous fault slip rate [m/s]

  • variables (Variables) – The friction coefficient mu and state parameter theta (not used)

  • params (RSFParams) – The rate-and-state parameters (not used)

  • constants (RSFConstants) – The constant parameters mu0 and v0 (not used)

Returns:

v – The rate of change of slip [m/s]

Return type:

Float