svMultiPhysics
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ActiveStress Class Referenceabstract

Abstract active stress class. More...

#include <ActiveStress.h>

Inheritance diagram for ActiveStress:
[legend]

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

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.
 

Detailed Description

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.

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

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 and compute_active_tension_local, defining the initial condition, time evolution and active tension computation, 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.

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

void ActiveStress::advance_time_step ( const double  t,
const double  dt,
const Vector< double > &  calcium,
const Vector< double > &  fiber_stretch,
const Vector< double > &  fiber_stretch_rate 
)
virtual

Advance in time.

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.

◆ 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.
[in]fiber_stretchFiber stretch at the current node.
[in]fiber_stretch_rateFiber stretch rate at the current node.
[in,out]stateState vector for a single node, to be updated by this function.

Implemented in ActiveStressODE, 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 ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.

◆ 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 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 ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.

◆ get_tension_fibers()

double ActiveStress::get_tension_fibers ( const int  idx) const
inline

Get the tension along fibers \(\eta_f \Tact\) at a given point.

◆ get_tension_sheet_normals()

double ActiveStress::get_tension_sheet_normals ( const int  idx) const
inline

Get the tension along sheet normals \(\eta_n \Tact\) at a given point.

◆ get_tension_sheets()

double ActiveStress::get_tension_sheets ( const int  idx) const
inline

Get the tension along sheets \(\eta_s \Tact\) at a given point.

◆ 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 ActiveStressNashPanfilov, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.

◆ needs_fiber_stretch()

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

◆ needs_fiber_stretch_rate()

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

◆ 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 ActiveStressNashPanfilov, ActiveStressODE, ActiveStressRegazzoni, ActiveStressUniformSteady, and ActiveStressUniformUnsteady.

◆ read_parameters()

void ActiveStress::read_parameters ( const ActiveStressParameters &  params)

Read model parameters from a parameter object.

Member Data Documentation

◆ active_tension

Vector<double> ActiveStress::active_tension
protected

Active tension at every node.

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

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

◆ time

double ActiveStress::time
protected

Current time. Updated whenever calling advance_time_step.


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