Model Components Library
Dynamics
Describes dynamics models.
- class SphericalDynamicsModelComponent(disp: Quantity[float64], fib_deform: Quantity[float64], pressure: Quantity[float64], pressure_external: Quantity[float64], vel: Quantity[float64], radius: Quantity[float64], vol_mass: Quantity[float64], thickness: Quantity[float64], damping_coef: Quantity[float64], series_stiffness: Quantity[float64], hyperelastic_cst: Quantity[ndarray[tuple[int, ...], dtype[float64]]], time: Time)
Implementation of the spherical dynamics model.
It provides a dynamics on \(y\) the displacement of a sphere radius.
Internal Equation:
\[\frac{P - P_{ext}}{|\Omega_0|} \frac{\partial V(y)}{\partial y} - \rho_0 \ddot{y} - \frac{\partial W_e(y)}{\partial y} - \frac{1}{R_0} \Sigma_v(y,\dot{y}) - \frac{k_s}{R_0} \Bigl( \frac{y}{R_0}-e_c \Bigr) = 0\]With:
\(W_e(y)\) represents an elastic energy per unit volume given by
\[W_e(y) = C_0 \exp \Bigl[ C_1 \bigl(2C(y)+C(y)^{-2}-3\bigr)^2 \Bigr] + C_2 \exp \Bigl[ C_3 \bigl(C(y)-1\bigr)^2 \Bigr]\]where \((C_0,C_1,C_2,C_3)\) denote material parameters of the passive constitutive law, and \(C(y)= (1+y/R_0)^2\) represents the component of the right Cauchy-Green deformation tensor along the fiber direction
\(\Sigma_v(y,\dot{y})\) denotes a viscous stress defined by
\[\Sigma_v(y,\dot{y}) = 2 \eta \, \bigl( C(y) + 2 C(y)^{-5} \bigr) \frac{\dot{y}}{R_0}\]with \(\eta\) a solid viscosity parameter
\(k_s\) denotes a passive elastic modulus
\(|\Omega_0|\) is the total volume of sphere tissue in the reference configuration
\[|\Omega_0| = \frac{4}{3}\pi \Biggl[ \Bigl( R_0+\frac{d_0}{2} \Bigr)^3 - \Bigl( R_0-\frac{d_0}{2} \Bigr)^3 \Biggr]\]with \(d_0\) the wall thickness in the reference configuration, and factorizing \(R_0\) from the bracket a Taylor expansion readily gives the following approximation that we use in the implementation up to the third order in \(d_0/2R_0\):
\[|\Omega_0| = 4\pi R_0^2 d_0\]\(V(y)\) denotes the volume of the sphere, i.e.
\[V(y) = \frac{4}{3}\pi \Bigl( R(y)-\frac{d(y)}{2} \Bigr)^3 = \frac{4}{3}\pi \Bigl( R_0+y-\frac{d_0}{2}C(y)^{-1} \Bigr)^3,\]with \(d(y)\) the wall thickness in the deformed configuration.
Discretised:
\[\frac{P^{n + \frac{1}{2}} - P_{ext}^{n + \frac{1}{2}}}{|\Omega_0|} DV^{{n + \frac{1}{2}}\sharp} - \rho_0 \Bigl[ \frac{\dot{y}^{n+1}-\dot{y}^n}{\Delta t^n} \Bigr] - DW^{{n + \frac{1}{2}}\sharp} - \frac{1}{R_0} \Sigma_v(y^{n + \frac{1}{2}},\dot{y}^{n + \frac{1}{2}}) - \frac{k_s}{R_0} \Bigl( \frac{y^{n + \frac{1}{2}}}{R_0}-e_c^{n + \frac{1}{2}} \Bigr) = 0\]- hyperelastic_cst: Quantity[ndarray[tuple[int, ...], dtype[float64]]]
\((C_0,C_1,C_2,C_3)\) the hyperelastic constants
- initialize() None
Compute initial block quantities (sphere radius, surface, volume, …) and solve the associated static problem to get initial displacement and fiber deformation.
- dynamics_residual() Any
Compute the residual giving a dynamics on disp
- Returns:
the residual
- Return type:
np.float64
- dynamics_residual_ddisp() Any
Compute the partial derivative of the residual for disp.
- Returns:
the residual partial derivative for disp
- Return type:
np.float64
- dynamics_residual_dfib_deform() Any
Compute the partial derivative of the residual for fib_deform.
- Returns:
the residual partial derivative for fib_deform
- Return type:
np.float64
- dynamics_residual_dvel() Any
Compute the partial derivative of the residual for vel.
- Returns:
the residual partial derivative for vel
- Return type:
np.float64
- dynamics_residual_dpressure() Any
Compute the partial derivative of the residual for the pressure.
- Returns:
the residual partial derivative for pressure
- Return type:
np.float64
- dynamics_residual_dpressure_external() Any
Compute the partial derivative of the residual pressure_external.
- Returns:
the residual partial derivative pressure_external.
- Return type:
np.float64
Velocity Law
Module describing a discretized Velocity Law Block.
It defines two residual giving a dynamics on the velocity and acceleration.
- class VelocityLawHHTModelComponent(scheme_ts_hht: Quantity[float64], accel: Quantity[float64], vel: Quantity[float64], disp: Quantity[float64], time: Time)
Velocity law HHT quantities and equation definitions
Implement the extended version of the HHT time integration scheme. Velocity and acceleration unknowns are introduced and solved for by
Discretised Internal Equations:
\[\frac{\dot{y}^{n+1}-\dot{y}^n}{\Delta t^n} - (\tfrac{1}{2}+\alpha)\, \ddot{y}^{n+1} - (\tfrac{1}{2}-\alpha)\, \ddot{y}^n = 0\]\[\frac{y^{n+1}-y^n}{\Delta t^n} - \dot{y}^{n + \frac{1}{2}} - \frac{\alpha^2}{4}\Delta t^n\, (\ddot{y}^{n+1}-\ddot{y}^n) = 0\]- velocity_law_residual() ndarray[tuple[int, ...], dtype[float64]]
Compute the velocity law residual
- Returns:
the residual value
- Return type:
NDArray[np.float64]
- velocity_law_residual_daccel() ndarray[tuple[int, ...], dtype[float64]]
Compute the velocity law residual partial derivative for
accel- Returns:
the partial derivative for accel
- Return type:
NDArray[np.float64]
- velocity_law_residual_dvel() ndarray[tuple[int, ...], dtype[float64]]
Compute the velocity law residual partial derivative for
vel- Returns:
the partial derivative for vel
- Return type:
NDArray[np.float64]
- velocity_law_residual_ddisp() ndarray[tuple[int, ...], dtype[float64]]
Compute the velocity law residual partial derivative for
disp- Returns:
the partial derivative for disp
- Return type:
NDArray[np.float64]
Rheology
Describes rheology models
- class RheologyFiberAdditiveModelComponent(fib_deform: Quantity[float64], disp: Quantity[float64], active_tension_discr: Quantity[float64], radius: Quantity[float64], damping_parallel: Quantity[float64], series_stiffness: Quantity[float64], time: Time)
Describes a Fiber Additive Rheology model implementation.
Internal Equation:
\[\dot{e}_c + T_c - k_s \Bigl( \frac{y}{R_0}-e_c \Bigr) = 0\]Discretised:
\[\mu \frac{e_c^{n+1}-e_c^n}{\Delta t^n} - k_s \Bigl( \frac{y^{n + \frac{1}{2}}}{R_0}-e_c^{n + \frac{1}{2}} \Bigr) + T_c^{{n + \frac{1}{2}}\sharp} = 0\]- active_tension_discr: Quantity[float64]
\(T_c^{{n + rac{1}{2}}\sharp}\) the active tension discretisation
- initialize() None
Initialize model’s radius inverse
- fib_deform_equation() Any
Compute the equation representing the fiber deformation.
- Returns:
the relation value
- Return type:
np.float64
- dfib_deform_equation_dfib_deform() Any
Compute the equation partial derivative for
fib_deform- Returns:
the partial derivative value
- Return type:
np.float64
- dfib_deform_equation_ddisp() float64
Compute the equation partial derivative for
disp- Returns:
the partial derivative value
- Return type:
np.float64
- dfib_deform_equation_dactive_tension_discr() Any
Compute the equation partial derivative for the
active_tension_discr- Returns:
the partial derivative value
- Return type:
np.float64
Active Law
- class ActiveLawMacroscopicHuxleyTwoMoment(fib_deform: Quantity[float64], active_stiffness: Quantity[float64], active_energy_sqrt: Quantity[float64], active_tension_discr: Quantity[float64], starling_abscissas: Quantity[ndarray[tuple[int, ...], dtype[float64]]], starling_ordinates: Quantity[ndarray[tuple[int, ...], dtype[float64]]], activation: Quantity[float64], crossbridge_stiffness: Quantity[float64], contractility: Quantity[float64], destruction_rate: Quantity[float64], time: Time)
Describes the Macroscopic Huxley Two Moment implementation of the ative law.
Internal Equations:
\[\dot{K}_c + \bigl(|u|+\alpha|\dot{e}_c|\bigr) \, K_c - n_0(e_c) K_0 |u|_+ = 0\]\[\dot{\lambda}_c + \frac{1}{2} \bigl(|u|+\alpha|\dot{e}_c|\bigr) \, \lambda_c - \sqrt{K_c} \, \dot{e}_c - \frac{n_0(e_c)}{\sqrt{K_c}} \biggl( T_0 - \frac{K_0\,\lambda_c}{2\sqrt{K_c}} \biggr) |u|_+ = 0\]\[\lambda_c - T_c/\sqrt{K_c} = 0\]Discretised:
\[\frac{K_c^{n+1}-K_c^n}{\Delta t^n} + \Bigl(|u^{n+1}|+\alpha\Bigl|\frac{e_c^{n+1}-e_c^n}{\Delta t^n}\Bigr|\Bigr) \, K_c^{n+1} - n_0(e_c^n) K_0 \, |u^{n+1}|_+ = 0\]\[\frac{\lambda_c^{n+1}-\lambda_c^n}{\Delta t^n} + \frac{1}{2}\Bigl(|u^{n+1}|+\alpha\Bigl|\frac{e_c^{n+1}-e_c^n}{\Delta t^n}\Bigr|\Bigr) \, \lambda_c^{n + \frac{1}{2}} - \sqrt{K_c^{n+1}} \, \frac{e_c^{n+1}-e_c^n}{\Delta t^n} - \frac{n_0(e_c^n)}{\sqrt{K_c^{n+1}}} \biggl( T_0 - \frac{K_0\,\lambda_c^{n + \frac{1}{2}}}{2\sqrt{K_c^{n+1}}} \biggr) |u^{n+1}|_+ = 0\]\[T_c^{n + \frac{1}{2}\sharp} - \lambda_c^{n + \frac{1}{2}} \sqrt{K_c^{n+1}} = 0\]- active_tension_discr: Quantity[float64]
\(T_c^{n + \frac{1}{2}\sharp}\) the active tension discretisation
- starling_abscissas: Quantity[ndarray[tuple[int, ...], dtype[float64]]]
Abscissas of \(n_0\) the discretized starling function
- starling_ordinates: Quantity[ndarray[tuple[int, ...], dtype[float64]]]
Ordinates of \(n_0\) the discretize starling function
- active_law_residual() Any
Compute the residual of the active law.
- Returns:
the residual value
- Return type:
np.array
- active_law_residual_dactive_stiffness() Any
Compute the residual partial derivative for the active stiffness
- Returns:
the partial derivative
- Return type:
np.array
- active_law_residual_dactive_energy_sqrt() Any
Compute the residual partial derivative for the active energy sqrt
- Returns:
the partial derivative
- Return type:
np.array
- active_law_residual_dfib_deform() Any
Compute the residual partial derivative for the fiber deformation
- Returns:
the partial derivative
- Return type:
np.array
- active_law_residual_dactive_tension() Any
Compute the residual partial derivative for the active tension
- Returns:
the partial derivative
- Return type:
np.array