|
svMultiPhysics
|
Abstract ODE-based active stress model. More...
#include <ActiveStressODE.h>
Classes | |
| class | Parameters |
| Model parameters class. More... | |
Public Types | |
| enum class | ODESolver { ForwardEuler } |
| Enumeration of supported ODE solvers. More... | |
Public Member Functions | |
| ActiveStressODE (const unsigned int n_states, const bool needs_fiber_stretch, const bool needs_fiber_stretch_rate) | |
| Constructor. | |
Public Member Functions inherited from ActiveStress | |
| ActiveStress (const unsigned int n_states_, const bool needs_fiber_stretch, const bool needs_fiber_stretch_rate) | |
| Constructor. | |
| virtual | ~ActiveStress ()=default |
| Virtual destructor. | |
| virtual std::unique_ptr< ActiveStressModelParameters > | get_parameters () const =0 |
| Construct an instance of model parameters for this model. | |
| void | read_parameters (const ActiveStressParameters ¶ms) |
| Read model parameters from a parameter object. | |
| void | distribute_parameters (const CmMod &cm_mod, const cmType &cm) |
| Distribute model parameters to all parallel processes. | |
| double | get_tension_fibers (const int idx) const |
| Get the tension along fibers \(\eta_f \Tact\) at a given point. | |
| double | get_tension_sheets (const int idx) const |
| Get the tension along sheets \(\eta_s \Tact\) at a given point. | |
| double | get_tension_sheet_normals (const int idx) const |
| Get the tension along sheet normals \(\eta_n \Tact\) at a given point. | |
| virtual void | init (const unsigned int tnNo) |
| Initialize the model. | |
| virtual void | advance_time_step (const double t, const double dt, const Vector< double > &calcium, const Vector< double > &fiber_stretch, const Vector< double > &fiber_stretch_rate) |
| Advance in time. | |
| bool | needs_fiber_stretch () const |
| Whether this model uses the fiber stretch passed to advance_time_step. This flag can be used to determine whether fiber stretch computation can be skipped for efficiency. | |
| bool | needs_fiber_stretch_rate () const |
| Whether this model uses the fiber stretch rate passed to advance_time_step. This flag can be used to determine whether fiber stretch rate computation can be skipped for efficiency. | |
Protected Member Functions | |
| virtual void | read_model_specific_parameters (const ActiveStressModelParameters ¶ms) override |
| Read model parameters from a parameter object. | |
| virtual void | distribute_model_specific_parameters (const CmMod &cm_mod, const cmType &cm) override |
| Distribute model parameters to all parallel processes. | |
| virtual void | advance_time_step_local (const double t, const double dt, const double calcium, const double fiber_stretch, const double fiber_stretch_rate, Vector< double > &state) const override |
| Advance in time for a single node. | |
| virtual Vector< double > | getf (const double t, const Vector< double > &state, const double calcium, const double fiber_stretch, const double fiber_stretch_rate) const =0 |
| Compute the rate of change in the state variables. | |
Protected Member Functions inherited from ActiveStress | |
| virtual void | init_local (Vector< double > &state) const =0 |
| Initialize the state vector for a single node. | |
| virtual double | compute_active_tension_local (const Vector< double > &state, const double fiber_stretch) const =0 |
| Compute the active tension for a single node. | |
Protected Attributes | |
| ODESolver | ode_solver |
| ODE solver. | |
Protected Attributes inherited from ActiveStress | |
| bool | needs_fiber_stretch_ |
| Backing store for needs_fiber_stretch. | |
| bool | needs_fiber_stretch_rate_ |
| Backing store for needs_fiber_stretch_rate. | |
| double | time |
| Current time. Updated whenever calling advance_time_step. | |
| Array< double > | states |
| State variables for the model. | |
| Vector< double > | active_tension |
| Active tension at every node. | |
| double | eta_f |
| Active tension coefficient along the fiber direction. | |
| double | eta_s |
| Active tension coefficient along the sheet direction. | |
| double | eta_n |
| Active tension coefficient along the sheet-normal direction. | |
Additional Inherited Members | |
Public Attributes inherited from ActiveStress | |
| const unsigned int | n_states |
| Number of state variables for this model. | |
Abstract ODE-based active stress model.
This class provides an interface for defining active stress models for which the evolution of the state vector \(\astressstate\) is governed by a system of ordinary differential equations (ODEs):
\[ \begin{aligned} \dv{\astressstate}{t} &= \mathbf{F}_\text{AS}(t, \astressstate, \calcium, \fiberstretch, \fiberstretchrate)\;, \\ \Tact &= \Tact(\astressstate, \fiberstretch)\;. \end{aligned} \]
The ODE system is advanced with one of the methods described in ODESolver. After that, the active tension is computed for every node \(i\) as:
\[ {\Tact}_{i}^{n+1} = \Tact(\astressstate_i^{n+1}, \fiberstretch_i^{n+1})\;. \]
To implement a new ODE-based active stress model, the following steps need to be taken:
.cpp file, not in a header file.
|
strong |
Enumeration of supported ODE solvers.
In the documentation of the individual methods below, the subscript \(i\) is used to denote the value of variables at the \(i\)-th node, and the superscript \(n\) is used to denote the time step.
|
inline |
Constructor.
| n_states | Number of state variables for this model. |
| needs_fiber_stretch | See ActiveStress::ActiveStress. |
| needs_fiber_stretch_rate | See ActiveStress::ActiveStress. |
|
overrideprotectedvirtual |
Advance in time for a single node.
Solves one forward Euler time step for the ODE system.
| [in] | t | Current time (i.e. the time instant being advanced to). |
| [in] | dt | Time step size. |
| [in] | calcium | Calcium concentration at the current node. |
| [in] | fiber_stretch | Fiber stretch at the current node. |
| [in] | fiber_stretch_rate | Fiber stretch rate at the current node. |
| [in,out] | state | State vector for a single node, to be updated by this function. |
Implements ActiveStress.
|
overrideprotectedvirtual |
Distribute model parameters to all parallel processes.
Implements ActiveStress.
Reimplemented in ActiveStressNashPanfilov.
|
protectedpure virtual |
Compute the rate of change in the state variables.
| [in] | t | Current time (i.e. the time instant being advanced to). |
| [in] | dt | Time step size. |
| [in] | calcium | Calcium concentration at the current node. |
| [in] | fiber_stretch | Fiber stretch at the current node. |
| [in] | fiber_stretch_rate | Fiber stretch rate at the current node. |
Implemented in ActiveStressNashPanfilov.
|
overrideprotectedvirtual |
Read model parameters from a parameter object.
Implements ActiveStress.
Reimplemented in ActiveStressNashPanfilov.
|
protected |
ODE solver.