|
svMultiPhysics
|
Abstract active stress class. More...
#include <ActiveStress.h>
Classes | |
| struct | ActiveTension |
| Active tension information at a point. More... | |
| class | Evaluator |
| Helper to evaluate active tension at quadrature points. More... | |
Public Member Functions | |
| 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. | |
| Vector< double > | get_state (const unsigned int Ac) const |
| Get the state vector at a given mesh node. | |
| ActiveTension | compute_tension (const Vector< double > &state, const double fiber_stretch) const |
| Compute the active tension given the state vector and fiber stretch. | |
| virtual void | init (const unsigned int tnNo) |
| Initialize the model. | |
| virtual void | time_advance () |
| Begin a new time step. | |
| virtual void | update (const double t, const double dt, const Vector< double > &calcium, const Vector< double > &fiber_stretch, const Vector< double > &fiber_stretch_rate) |
| Update the state over the current time step. | |
| bool | needs_fiber_stretch () const |
| Whether this model uses the fiber stretch passed to update. 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 update. This flag can be used to determine whether fiber stretch rate computation can be skipped for efficiency. | |
| bool | implicit_state_coupling () const |
| Whether the state of this model is updated within the nonlinear iterations of the mechanics problem, i.e. whether the indirect dependence of the active tension on the fiber stretch is treated implicitly. | |
Public Attributes | |
| const unsigned int | n_states |
| Number of state variables for this model. | |
Protected Member Functions | |
| virtual void | read_model_specific_parameters (const ActiveStressModelParameters ¶ms)=0 |
| Read model parameters from a parameter object. | |
| virtual void | distribute_model_specific_parameters (const CmMod &cm_mod, const cmType &cm)=0 |
| Distribute model parameters to all parallel processes. | |
| virtual void | init_local (Vector< double > &state) const =0 |
| Initialize the state vector for a single node. | |
| 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 =0 |
| Advance in time 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. | |
| virtual double | compute_active_tension_derivative_local (const Vector< double > &state, const double fiber_stretch) const =0 |
| Compute the partial derivative of the active tension with respect to the fiber stretch, at fixed state, for a single node. | |
Protected Attributes | |
| bool | needs_fiber_stretch_ |
| Backing store for needs_fiber_stretch. | |
| bool | needs_fiber_stretch_rate_ |
| Backing store for needs_fiber_stretch_rate. | |
| double | time = 0.0 |
| Time instant being advanced to. Set by update. | |
| Array< double > | states |
| State variables for the model. | |
| Array< double > | states_at_time_step_start |
| State variables at the beginning of the current time step. | |
| bool | implicit_state_coupling_ |
| Whether the state of this model is updated within the nonlinear iterations of the mechanics problem. | |
| double | calcium_scaling_factor_ = 1.0 |
| bool | disable_force_strain_rate_feedback_ = false |
| 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. | |
Abstract active stress class.
This class provides an interface for defining active stress models, i.e. models that, in the context of structural mechanics of muscular tissue, compute an active tension representing the contribution of muscular contraction to the constitiutive law.
The class assumes that the active tension can be expressed as
\[ \Tact = \Tact(t, \calcium, \fiberstretch, \fiberstretchrate, \astressstate), \]
where \(\calcium\) is the intracellular calcium concentration, \(\fiberstretch\) is the fiber stretch, \(\fiberstretchrate\) is the fiber stretch rate, and \(\astressstate\) is a vector of internal state variables, representing the state of contraction.
The expression assumed above implies that the active tension is a local function of the variables it depends on, that is the active tension at a given point only depends on the value of other variables at that same point. Accordingly, this class works nodally, storing the state of contraction at every mesh node and evaluating the active tension from it, on demand, through ActiveStress::compute_tension.
Two parameters, set at the top level of the <Active_stress> XML element and shared by all models, modify the inputs before they reach the model:
Calcium_scaling_factor (default 1.0): calcium is multiplied by this factor, e.g. to convert between the units of the electrophysiology model and those expected by the active stress model.Disable_force_strain_rate_feedback (default false): if true, the fiber stretch rate is set to zero, and its computation is skipped.Both are applied once, in update, so that advance_time_step_local receives already scaled calcium and an already zeroed stretch rate. Models that do not use calcium or the stretch rate ignore them.
In muscular mechanics models, active stress normally acts only along the direction of fibers \(\fiberdirection\), reflecting the fact that contractile units are aligned with fibers. However, one might want to account for fiber dispersion, i.e. the fact that fibers are not perfectly and regularly aligned, but rather have a certain distribution of orientations centered around the principal direction \(\fiberdirection\).
This can be surrogated by defining the active stress tensor as
\[ S_\text{act} = \Tact \left( \eta_f \fiberdirection \otimes \fiberdirection + \eta_s \sheetdirection \otimes \sheetdirection + \eta_n \sheetnormaldirection \otimes \sheetnormaldirection \right), \]
where \(\sheetdirection\) and \(\sheetnormaldirection\) are the sheet and sheet-normal directions, respectively, and \(\eta_f\), \(\eta_s\), and \(\eta_n\) are coefficients that define the distribution the active tension along the three principal directions. The coefficients must be such that \(\eta_f + \eta_s + \eta_n = 1\).
This class stores the values of \(\eta_f\), \(\eta_s\) and \(\eta_n\), and applies them in ActiveStress::compute_tension, which returns \(\eta_f \Tact\), \(\eta_s \Tact\) and \(\eta_n \Tact\), bundled in an ActiveTension.
To implement a new active stress model, the following steps need to be taken:
Notice that if the model is expressed in terms of a system of ODEs, it can be implemented by deriving from ActiveStressODE, which already addresses some of the points above.
Models need no code of their own for calcium scaling or for disabling the force-strain-rate feedback, as these are applied by this class (see Preprocessing of model inputs).
The active tension depends on the fiber stretch \(\fiberstretch\) both directly, through the expression of \(\Tact\), and indirectly, through the state \(\astressstate\), which is itself driven by the fiber stretch. The mechanics problem, in turn, depends on \(\Tact\).
Explicit time discretization for the direct dependence was observed to lead to instabilities. Accordingly, the direct dependence is discretized implicitly, that is the active tension is recomputed within the nonlinear iterations for the structure problem that uses ActiveStress. To facilitate the convergence of nonlinear iterations, this class also allows to compute the derivative \(\frac{\partial\Tact}{\partial\fiberstretch}\), which is used to assemble tangent terms associated to this in the structural system.
Indirect dependence was not observed to give rise to instabilities. Accordingly, it is discretized explicitly by default, meaning that the state is updated once per time step evaluating the fiber stretch \(\fiberstretch\) using the displacement from the previous time step. The user can change this behavior by setting the parameter Implicit_state_coupling to true in the XML file. This will make the state update every nonlinear iteration. No tangent terms are computed for this contribution, so nonlinear iterations can be expected to converge more slowly when this is enabled.
|
inline |
Constructor.
| n_states_ | Number of state variables for this model. |
| needs_fiber_stretch | Whether this model uses the fiber stretch passed to update. This flag can be used to determine whether fiber stretch computation can be skipped for efficiency. |
| needs_fiber_stretch_rate | Whether this model uses the fiber stretch rate passed to update. This flag can be used to determine whether fiber stretch rate computation can be skipped for efficiency. |
|
virtualdefault |
Virtual destructor.
|
protectedpure virtual |
Advance in time for a single node.
| [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, already multiplied by calcium_scaling_factor_. |
| [in] | fiber_stretch | Fiber stretch at the current node. |
| [in] | fiber_stretch_rate | Fiber stretch rate at the current node, or zero if disable_force_strain_rate_feedback_ is set. |
| [in,out] | state | State vector for a single node, to be updated by this function. |
Implemented in ActiveStressODE, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.
|
protectedpure virtual |
Compute the partial derivative of the active tension with respect to the fiber stretch, at fixed state, for a single node.
| [in] | state | State vector for a single node. |
| [in] | fiber_stretch | Fiber stretch at the current node. |
Implemented in ActiveStressLandNiederer, ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.
|
protectedpure virtual |
Compute the active tension for a single node.
| [in] | state | State vector for a single node. |
| [in] | fiber_stretch | Fiber stretch at the current node. |
Implemented in ActiveStressLandNiederer, ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.
|
inline |
Compute the active tension given the state vector and fiber stretch.
| [in] | state | State vector at the point. |
| [in] | fiber_stretch | Fiber stretch at the point. |
|
protectedpure virtual |
Distribute model parameters to all parallel processes.
This method needs to be overridden by derived classes to distribute the parameters specific to the concrete model they implement to all parallel processes.
Implemented in ActiveStressLandNiederer, ActiveStressNashPanfilov, ActiveStressODE, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.
Distribute model parameters to all parallel processes.
|
pure virtual |
Construct an instance of model parameters for this model.
Implemented in ActiveStressLandNiederer, ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.
|
inline |
Get the state vector at a given mesh node.
| [in] | Ac | Index of the mesh node. |
|
inline |
Whether the state of this model is updated within the nonlinear iterations of the mechanics problem, i.e. whether the indirect dependence of the active tension on the fiber stretch is treated implicitly.
|
virtual |
Initialize the model.
Allocates the internal state vector and initializes it with the model's initial conditions.
| [in] | tnNo | Total number of mesh nodes for the current rank. |
Reimplemented in ActiveStressUniformUnsteady.
|
protectedpure virtual |
Initialize the state vector for a single node.
| [out] | state | State vector for a single node, to be initialized by this function. |
Implemented in ActiveStressLandNiederer, ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.
|
inline |
Whether this model uses the fiber stretch passed to update. This flag can be used to determine whether fiber stretch computation can be skipped for efficiency.
|
inline |
Whether this model uses the fiber stretch rate passed to update. This flag can be used to determine whether fiber stretch rate computation can be skipped for efficiency.
|
protectedpure virtual |
Read model parameters from a parameter object.
This method needs to be overridden by derived classes to read the parameters specific to the concrete model they implement.
Implemented in ActiveStressLandNiederer, ActiveStressNashPanfilov, ActiveStressODE, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.
| void ActiveStress::read_parameters | ( | const ActiveStressParameters & | params | ) |
Read model parameters from a parameter object.
|
virtual |
Begin a new time step.
Stores the current state as the initial condition of the time step. Must be called once per time step, before any call to update.
|
virtual |
Update the state over the current time step.
Advances the state stored by time_advance over one time step, using the given calcium, fiber stretch and fiber stretch rate.
This function may be called more than once per time step: every call restarts from the state stored by time_advance, so the resulting state depends only on the arguments of the last call.
| [in] | t | Current time (i.e. the time instant being advanced to). |
| [in] | dt | Time step size. |
| [in] | calcium | Calcium concentration at every node. |
| [in] | fiber_stretch | Fiber stretch at every node. This is usually computed with post::fib_stretch. |
| [in] | fiber_stretch_rate | Fiber stretch rate at every node. This is usually computed with post::fib_stretch_rate. |
|
protected |
Factor applied to calcium in update before it is passed to advance_time_step_local.
|
protected |
If true, the fiber stretch rate passed to advance_time_step_local is set to zero, disabling the force-strain-rate feedback.
|
protected |
Active tension coefficient along the fiber direction.
|
protected |
Active tension coefficient along the sheet-normal direction.
|
protected |
Active tension coefficient along the sheet direction.
|
protected |
Whether the state of this model is updated within the nonlinear iterations of the mechanics problem.
| const unsigned int ActiveStress::n_states |
Number of state variables for this model.
|
protected |
Backing store for needs_fiber_stretch.
|
protected |
Backing store for needs_fiber_stretch_rate.
|
protected |
State variables for the model.
|
protected |
State variables at the beginning of the current time step.
Set by time_advance and used by update as the initial condition of every call within the time step.
|
protected |
Time instant being advanced to. Set by update.