svMultiPhysics
Loading...
Searching...
No Matches
ActiveStress Class Referenceabstract

Abstract active stress class. More...

#include <ActiveStress.h>

Inheritance diagram for ActiveStress:
[legend]

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 &params)
 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 &params)=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.

Detailed Description

Abstract active stress class.

Table of contents

Overview

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.

Preprocessing of model inputs

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.

Directional distribution of active stress

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.

Implementing concrete active stress models

To implement a new active stress model, the following steps need to be taken:

  1. Create a new class derived from ActiveStress.
  2. Override the methods init_local, advance_time_step_local, compute_active_tension_local and compute_active_tension_derivative_local, defining the initial condition, time evolution, active tension and its partial derivative with respect to the fiber stretch, respectively, for a single node.
  3. Create a new class derived from ActiveStressModelParameters to store the parameters specific to the new active stress model.
  4. Override the methods get_parameters, read_model_specific_parameters and distribute_model_specific_parameters to manage the parameters of the new active stress model.
  5. Register the new class into the active stress model factory by using the macro REGISTER_ACTIVE_STRESS_MODEL. The macro should be called in a .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.

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).

Coupling with the structural mechanics problem

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.

Constructor & Destructor Documentation

◆ ActiveStress()

ActiveStress::ActiveStress ( const unsigned int n_states_,
const bool needs_fiber_stretch,
const bool needs_fiber_stretch_rate )
inline

Constructor.

Parameters
n_states_Number of state variables for this model.
needs_fiber_stretchWhether 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_rateWhether 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.

◆ ~ActiveStress()

virtual ActiveStress::~ActiveStress ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ advance_time_step_local()

virtual void ActiveStress::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
protectedpure virtual

Advance in time for a single node.

Parameters
[in]tCurrent time (i.e. the time instant being advanced to).
[in]dtTime step size.
[in]calciumCalcium concentration at the current node, already multiplied by calcium_scaling_factor_.
[in]fiber_stretchFiber stretch at the current node.
[in]fiber_stretch_rateFiber stretch rate at the current node, or zero if disable_force_strain_rate_feedback_ is set.
[in,out]stateState vector for a single node, to be updated by this function.

Implemented in ActiveStressODE, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.

◆ compute_active_tension_derivative_local()

virtual double ActiveStress::compute_active_tension_derivative_local ( const Vector< double > & state,
const double fiber_stretch ) const
protectedpure virtual

Compute the partial derivative of the active tension with respect to the fiber stretch, at fixed state, for a single node.

Parameters
[in]stateState vector for a single node.
[in]fiber_stretchFiber stretch at the current node.

Implemented in ActiveStressLandNiederer, ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.

◆ compute_active_tension_local()

virtual double ActiveStress::compute_active_tension_local ( const Vector< double > & state,
const double fiber_stretch ) const
protectedpure virtual

Compute the active tension for a single node.

Parameters
[in]stateState vector for a single node.
[in]fiber_stretchFiber stretch at the current node.

Implemented in ActiveStressLandNiederer, ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.

◆ compute_tension()

ActiveTension ActiveStress::compute_tension ( const Vector< double > & state,
const double fiber_stretch ) const
inline

Compute the active tension given the state vector and fiber stretch.

Parameters
[in]stateState vector at the point.
[in]fiber_stretchFiber stretch at the point.
Returns
Active tension along fibers, sheets and sheet normals, and their derivatives with respect to the fiber stretch, bundled in an object of type ActiveTension.

◆ distribute_model_specific_parameters()

virtual void ActiveStress::distribute_model_specific_parameters ( const CmMod & cm_mod,
const cmType & cm )
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_parameters()

void ActiveStress::distribute_parameters ( const CmMod & cm_mod,
const cmType & cm )

Distribute model parameters to all parallel processes.

◆ get_parameters()

virtual std::unique_ptr< ActiveStressModelParameters > ActiveStress::get_parameters ( ) const
pure virtual

Construct an instance of model parameters for this model.

Implemented in ActiveStressLandNiederer, ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.

◆ get_state()

Vector< double > ActiveStress::get_state ( const unsigned int Ac) const
inline

Get the state vector at a given mesh node.

Parameters
[in]AcIndex of the mesh node.

◆ implicit_state_coupling()

bool ActiveStress::implicit_state_coupling ( ) const
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.

◆ init()

void ActiveStress::init ( const unsigned int tnNo)
virtual

Initialize the model.

Allocates the internal state vector and initializes it with the model's initial conditions.

Parameters
[in]tnNoTotal number of mesh nodes for the current rank.

Reimplemented in ActiveStressUniformUnsteady.

◆ init_local()

virtual void ActiveStress::init_local ( Vector< double > & state) const
protectedpure virtual

Initialize the state vector for a single node.

Parameters
[out]stateState vector for a single node, to be initialized by this function.

Implemented in ActiveStressLandNiederer, ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.

◆ needs_fiber_stretch()

bool ActiveStress::needs_fiber_stretch ( ) const
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.

◆ needs_fiber_stretch_rate()

bool ActiveStress::needs_fiber_stretch_rate ( ) const
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.

◆ read_model_specific_parameters()

virtual void ActiveStress::read_model_specific_parameters ( const ActiveStressModelParameters & params)
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.

◆ read_parameters()

void ActiveStress::read_parameters ( const ActiveStressParameters & params)

Read model parameters from a parameter object.

◆ time_advance()

void ActiveStress::time_advance ( )
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.

◆ update()

void ActiveStress::update ( const double t,
const double dt,
const Vector< double > & calcium,
const Vector< double > & fiber_stretch,
const Vector< double > & fiber_stretch_rate )
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.

Parameters
[in]tCurrent time (i.e. the time instant being advanced to).
[in]dtTime step size.
[in]calciumCalcium concentration at every node.
[in]fiber_stretchFiber stretch at every node. This is usually computed with post::fib_stretch.
[in]fiber_stretch_rateFiber stretch rate at every node. This is usually computed with post::fib_stretch_rate.

Member Data Documentation

◆ calcium_scaling_factor_

double ActiveStress::calcium_scaling_factor_ = 1.0
protected

Factor applied to calcium in update before it is passed to advance_time_step_local.

◆ disable_force_strain_rate_feedback_

bool ActiveStress::disable_force_strain_rate_feedback_ = false
protected

If true, the fiber stretch rate passed to advance_time_step_local is set to zero, disabling the force-strain-rate feedback.

◆ eta_f

double ActiveStress::eta_f
protected

Active tension coefficient along the fiber direction.

◆ eta_n

double ActiveStress::eta_n
protected

Active tension coefficient along the sheet-normal direction.

◆ eta_s

double ActiveStress::eta_s
protected

Active tension coefficient along the sheet direction.

◆ implicit_state_coupling_

bool ActiveStress::implicit_state_coupling_
protected

Whether the state of this model is updated within the nonlinear iterations of the mechanics problem.

◆ n_states

const unsigned int ActiveStress::n_states

Number of state variables for this model.

◆ needs_fiber_stretch_

bool ActiveStress::needs_fiber_stretch_
protected

Backing store for needs_fiber_stretch.

◆ needs_fiber_stretch_rate_

bool ActiveStress::needs_fiber_stretch_rate_
protected

Backing store for needs_fiber_stretch_rate.

◆ states

Array<double> ActiveStress::states
protected

State variables for the model.

◆ states_at_time_step_start

Array<double> ActiveStress::states_at_time_step_start
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.

◆ time

double ActiveStress::time = 0.0
protected

Time instant being advanced to. Set by update.


The documentation for this class was generated from the following files: