|
svMultiPhysics
|
Abstract active stress class. More...
#include <ActiveStress.h>
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. | |
| 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. | |
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. | |
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 |
| 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. | |
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, by evaluating the active tension at every mesh node and storing it in a vector, whose values can be accessed through ActiveStress::get_tension_fibers.
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 provides the functions ActiveStress::get_tension_fibers, ActiveStress::get_tension_sheets and ActiveStress::get_tension_sheet_normals to access \(\eta_f \Tact\), \(\eta_s \Tact\) and \(\eta_n \Tact\), respectively.
To implement a new active stress model, the following steps need to be taken:
.cpp file, not in a header file.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.
|
inline |
Constructor.
| n_states_ | Number of state variables for this model. |
| needs_fiber_stretch | 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. |
| needs_fiber_stretch_rate | 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. |
|
virtualdefault |
Virtual destructor.
|
virtual |
Advance in time.
| [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. |
|
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. |
| [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. |
Implemented in ActiveStressODE, 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 ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.
|
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 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 ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.
|
inline |
Get the tension along fibers \(\eta_f \Tact\) at a given point.
|
inline |
Get the tension along sheet normals \(\eta_n \Tact\) at a given point.
|
inline |
Get the tension along sheets \(\eta_s \Tact\) at a given point.
|
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 ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.
|
inline |
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.
|
inline |
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.
|
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 ActiveStressNashPanfilov, ActiveStressODE, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.
| void ActiveStress::read_parameters | ( | const ActiveStressParameters & | params | ) |
Read model parameters from a parameter object.
|
protected |
Active tension at every node.
|
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.
| 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 |
Current time. Updated whenever calling advance_time_step.