Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
NhsContractionModel Class Reference

#include <NhsContractionModel.hpp>

+ Inheritance diagram for NhsContractionModel:
+ Collaboration diagram for NhsContractionModel:

Public Member Functions

 NhsContractionModel ()
 
void SetStretchAndStretchRate (double lambda, double dlambdaDt)
 
void SetInputParameters (ContractionModelInputParameters &rInputParameters)
 
void SetIntracellularCalciumConcentration (double calciumConcentration)
 
double GetCalciumTroponinValue ()
 
void EvaluateYDerivatives (double time, const std::vector< double > &rY, std::vector< double > &rDY)
 
double GetActiveTension ()
 
double GetNextActiveTension ()
 
bool IsStretchDependent ()
 
bool IsStretchRateDependent ()
 
- Public Member Functions inherited from AbstractOdeBasedContractionModel
 AbstractOdeBasedContractionModel (unsigned numStateVariables)
 
virtual void RunDoNotUpdate (double startTime, double endTime, double timeStep)
 
void UpdateStateVariables ()
 
void RunAndUpdate (double startTime, double endTime, double timeStep)
 
- Public Member Functions inherited from AbstractOdeSystem
 AbstractOdeSystem (unsigned numberOfStateVariables)
 
virtual ~AbstractOdeSystem ()
 
virtual bool CalculateStoppingEvent (double time, const std::vector< double > &rY)
 
virtual double CalculateRootFunction (double time, const std::vector< double > &rY)
 
bool GetUseAnalyticJacobian ()
 
const std::vector< double > & rGetConstStateVariables () const
 
- Public Member Functions inherited from AbstractParameterisedSystem< std::vector< double > >
 AbstractParameterisedSystem (unsigned numberOfStateVariables)
 
std::vector< double > & rGetStateVariables ()
 
std::vector< doubleGetStateVariables ()
 
void SetStateVariables (const std::vector< double > &rStateVariables)
 
double GetStateVariable (unsigned index) const
 
double GetStateVariable (const std::string &rName) const
 
void SetStateVariable (unsigned index, double newValue)
 
void SetStateVariable (const std::string &rName, double newValue)
 
virtual void VerifyStateVariables ()
 
void SetDefaultInitialConditions (const std::vector< double > &rInitialConditions)
 
void SetDefaultInitialCondition (unsigned index, double initialCondition)
 
std::vector< doubleGetInitialConditions () const
 
void ResetToInitialConditions ()
 
double GetParameter (unsigned index) const
 
double GetParameter (const std::string &rName) const
 
void SetParameter (const std::string &rName, double value)
 
void SetParameter (unsigned index, double value)
 
double GetAnyVariable (unsigned index, double time=0.0, std::vector< double > *pDerivedQuantities=NULL)
 
double GetAnyVariable (const std::string &rName, double time=0.0, std::vector< double > *pDerivedQuantities=NULL)
 
void SetAnyVariable (unsigned index, double value)
 
void SetAnyVariable (const std::string &rName, double value)
 
virtual std::vector< doubleComputeDerivedQuantities (double time, const std::vector< double > &rState)
 
std::vector< doubleComputeDerivedQuantitiesFromCurrentState (double time)
 
- Public Member Functions inherited from AbstractUntemplatedParameterisedSystem
 AbstractUntemplatedParameterisedSystem (unsigned numberOfStateVariables)
 
virtual ~AbstractUntemplatedParameterisedSystem ()
 
boost::shared_ptr< const AbstractOdeSystemInformationGetSystemInformation () const
 
std::string GetSystemName () const
 
unsigned GetNumberOfAttributes () const
 
bool HasAttribute (const std::string &rName) const
 
double GetAttribute (const std::string &rName) const
 
unsigned GetNumberOfStateVariables () const
 
const std::vector< std::string > & rGetStateVariableNames () const
 
const std::vector< std::string > & rGetStateVariableUnits () const
 
unsigned GetStateVariableIndex (const std::string &rName) const
 
bool HasStateVariable (const std::string &rName) const
 
std::string GetStateVariableUnits (unsigned index) const
 
unsigned GetNumberOfParameters () const
 
const std::vector< std::string > & rGetParameterNames () const
 
const std::vector< std::string > & rGetParameterUnits () const
 
unsigned GetParameterIndex (const std::string &rName) const
 
bool HasParameter (const std::string &rName) const
 
std::string GetParameterUnits (unsigned index) const
 
unsigned GetNumberOfDerivedQuantities () const
 
const std::vector< std::string > & rGetDerivedQuantityNames () const
 
const std::vector< std::string > & rGetDerivedQuantityUnits () const
 
unsigned GetDerivedQuantityIndex (const std::string &rName) const
 
bool HasDerivedQuantity (const std::string &rName) const
 
std::string GetDerivedQuantityUnits (unsigned index) const
 
unsigned GetAnyVariableIndex (const std::string &rName) const
 
bool HasAnyVariable (const std::string &rName) const
 
std::string GetAnyVariableUnits (unsigned index) const
 
std::string GetAnyVariableUnits (const std::string &rName) const
 
- Public Member Functions inherited from AbstractContractionModel
 AbstractContractionModel ()
 
virtual ~AbstractContractionModel ()
 
void SetStretch (double stretch)
 

Protected Member Functions

void CalculateCalciumTrop50 ()
 
double CalculateT0 (double z)
 
- Protected Member Functions inherited from AbstractParameterisedSystem< std::vector< double > >
std::string DumpState (const std::string &rMessage)
 
std::string DumpState (const std::string &rMessage, std::vector< double > Y)
 
std::string DumpState (const std::string &rMessage, std::vector< double > Y, double time)
 
void CheckParametersOnLoad (const std::vector< double > &rParameters, const std::vector< std::string > &rParameterNames)
 

Protected Attributes

double mLambda
 
double mDLambdaDt
 
double mCalciumI
 
double mCalciumTrop50
 
double mK1
 
double mK2
 
- Protected Attributes inherited from AbstractOdeBasedContractionModel
std::vector< doublemTemporaryStateVariables
 
double mTime
 
- Protected Attributes inherited from AbstractOdeSystem
bool mUseAnalyticJacobian
 
- Protected Attributes inherited from AbstractParameterisedSystem< std::vector< double > >
std::vector< doublemStateVariables
 
std::vector< doublemParameters
 
- Protected Attributes inherited from AbstractUntemplatedParameterisedSystem
unsigned mNumberOfStateVariables
 
boost::shared_ptr< AbstractOdeSystemInformationmpSystemInfo
 

Static Protected Attributes

static const double mKon = 100
 
static const double mKrefoff = 0.2
 
static const double mGamma = 2
 
static const double mCalciumTroponinMax = 0.07
 
static const double mAlphaR1 = 0.002
 
static const double mAlphaR2 = 0.0017
 
static const double mKZ = 0.15
 
static const unsigned mNr = 3u
 
static const double mBeta1 = -4
 
static const double mAlpha0 = 0.008
 
static const unsigned mN = 3u
 
static const double mZp = 0.85
 
static const double mCalcium50ref = 0.00105
 
static const double mTref = 56.2
 
static const double mBeta0 = 4.9
 
static const double mA = 0.35
 
static const double mA1 = -29
 
static const double mA2 = 138
 
static const double mA3 = 129
 
static const double mAlpha1 = 0.03
 
static const double mAlpha2 = 0.130
 
static const double mAlpha3 = 0.625
 

Friends

class TestContractionModels
 

Detailed Description

NHS (Niederer, Hunter, Smith) model of active tension in cardiac cells.

A system of ODEs which determines the active potential, given the intracellular calcium concentration, the stretch (lambda) of the cell, and the stretch rate (dlambda_dt) of the cell.

The state variables are, in order: Calcium_troponin, z, Q1, Q2, Q3

Reference: S.A. Niederer, N.P. Smith, P.J. Hunter, "New developments in a strongly coupled cardiac electro-mechanical model" Europace 7, S118-S127

The active tension is returned in KPa.

Definition at line 56 of file NhsContractionModel.hpp.

Constructor & Destructor Documentation

◆ NhsContractionModel()

NhsContractionModel::NhsContractionModel ( )

Constructor. Initialises all state variables to zero, lambda to 1, dlambda_dt to 0 and intracellular calcium concentration to 0

Definition at line 96 of file NhsContractionModel.cpp.

References CalculateCalciumTrop50(), OdeSystemInformation< ODE_SYSTEM >::Instance(), mAlphaR2, mCalciumI, mDLambdaDt, mK1, mK2, mKZ, mLambda, mNr, AbstractUntemplatedParameterisedSystem::mpSystemInfo, mZp, and AbstractParameterisedSystem< std::vector< double > >::ResetToInitialConditions().

Member Function Documentation

◆ CalculateCalciumTrop50()

void NhsContractionModel::CalculateCalciumTrop50 ( )
protected

Compute the calcium_trop50 concentration. This is a function of constants and lambda, so only needs to be called in the constructor or when lambda is set

Definition at line 72 of file NhsContractionModel.cpp.

References mBeta0, mBeta1, mCalcium50ref, mCalciumTrop50, mCalciumTroponinMax, mGamma, mKon, mKrefoff, and mLambda.

Referenced by NhsContractionModel(), and SetStretchAndStretchRate().

◆ CalculateT0()

double NhsContractionModel::CalculateT0 ( double  z)
protected

◆ EvaluateYDerivatives()

void NhsContractionModel::EvaluateYDerivatives ( double  time,
const std::vector< double > &  rY,
std::vector< double > &  rDY 
)
virtual

Evaluate the derivatives of the state variables

Parameters
timethe current time, in milliseconds
rYcurrent values of the state variables
rDYto be filled in with derivatives

Implements AbstractOdeSystem.

Definition at line 145 of file NhsContractionModel.cpp.

References CalculateT0(), EXCEPTION, mA, mA1, mA2, mA3, mAlpha0, mAlpha1, mAlpha2, mAlpha3, mAlphaR1, mAlphaR2, mCalciumI, mCalciumTrop50, mCalciumTroponinMax, mDLambdaDt, mGamma, mKon, mKrefoff, mKZ, mN, mNr, and mTref.

◆ GetActiveTension()

double NhsContractionModel::GetActiveTension ( )
virtual
Returns
the active tension, which is a function of the constants and current state variables. KILOPASCALS

Implements AbstractContractionModel.

Definition at line 203 of file NhsContractionModel.cpp.

References CalculateT0(), mA, and AbstractParameterisedSystem< std::vector< double > >::mStateVariables.

◆ GetCalciumTroponinValue()

double NhsContractionModel::GetCalciumTroponinValue ( )
Returns
the current Calcium Troponin (one of the state variables) value. This may be needed if the cell model has Calcium troponin and might need overwriting

Definition at line 140 of file NhsContractionModel.cpp.

References AbstractParameterisedSystem< std::vector< double > >::mStateVariables.

◆ GetNextActiveTension()

double NhsContractionModel::GetNextActiveTension ( )
inlinevirtual
Returns
GetNextActiveTension() normally returns the active tension corresponding to the state variables that have been computed in RunDoNotUpdate. However, this only applies to when an implicit cardiac mechanics solver is used, in which case the NhsModelWithBackwardSolver should be used.

Implements AbstractContractionModel.

Reimplemented in NhsModelWithBackwardSolver.

Definition at line 211 of file NhsContractionModel.hpp.

References EXCEPTION.

◆ IsStretchDependent()

bool NhsContractionModel::IsStretchDependent ( )
inlinevirtual
Returns
whether model is stretch-dependent

Implements AbstractContractionModel.

Definition at line 219 of file NhsContractionModel.hpp.

◆ IsStretchRateDependent()

bool NhsContractionModel::IsStretchRateDependent ( )
inlinevirtual
Returns
whether model is stretch-rate-dependent

Implements AbstractContractionModel.

Definition at line 227 of file NhsContractionModel.hpp.

◆ SetInputParameters()

void NhsContractionModel::SetInputParameters ( ContractionModelInputParameters rInputParameters)
virtual

Set the current intracellular calcium concentration

Parameters
rInputParametersinput parameters (calcium, voltage, time, of which only calcium is used)

Implements AbstractContractionModel.

Definition at line 127 of file NhsContractionModel.cpp.

References DOUBLE_UNSET, ContractionModelInputParameters_::intracellularCalciumConcentration, and mCalciumI.

◆ SetIntracellularCalciumConcentration()

void NhsContractionModel::SetIntracellularCalciumConcentration ( double  calciumConcentration)

Directly set the intracellular calcium concentration.

Parameters
calciumConcentrationcalcium concentration.

Definition at line 134 of file NhsContractionModel.cpp.

References mCalciumI.

◆ SetStretchAndStretchRate()

void NhsContractionModel::SetStretchAndStretchRate ( double  lambda,
double  dlambdaDt 
)
virtual

Set the current stretch and the stretch rate of the cell/fibre

Parameters
lambdacurrent stretch
dlambdaDtcurrent stretch rate

Implements AbstractContractionModel.

Definition at line 118 of file NhsContractionModel.cpp.

References CalculateCalciumTrop50(), mDLambdaDt, and mLambda.

Friends And Related Symbol Documentation

◆ TestContractionModels

friend class TestContractionModels
friend

Definition at line 58 of file NhsContractionModel.hpp.

Member Data Documentation

◆ mA

const double NhsContractionModel::mA = 0.35
staticprotected

◆ mA1

const double NhsContractionModel::mA1 = -29
staticprotected

See reference. Dimensionless

Definition at line 128 of file NhsContractionModel.hpp.

Referenced by EvaluateYDerivatives(), and NhsModelWithBackwardSolver::ImplicitSolveForQ().

◆ mA2

const double NhsContractionModel::mA2 = 138
staticprotected

See reference. Dimensionless

Definition at line 131 of file NhsContractionModel.hpp.

Referenced by EvaluateYDerivatives(), and NhsModelWithBackwardSolver::ImplicitSolveForQ().

◆ mA3

const double NhsContractionModel::mA3 = 129
staticprotected

See reference. Dimensionless

Definition at line 134 of file NhsContractionModel.hpp.

Referenced by EvaluateYDerivatives(), and NhsModelWithBackwardSolver::ImplicitSolveForQ().

◆ mAlpha0

const double NhsContractionModel::mAlpha0 = 0.008
staticprotected

◆ mAlpha1

const double NhsContractionModel::mAlpha1 = 0.03
staticprotected

See reference. (ms)^-1

Definition at line 137 of file NhsContractionModel.hpp.

Referenced by EvaluateYDerivatives(), and NhsModelWithBackwardSolver::ImplicitSolveForQ().

◆ mAlpha2

const double NhsContractionModel::mAlpha2 = 0.130
staticprotected

See reference. (ms)^-1

Definition at line 140 of file NhsContractionModel.hpp.

Referenced by EvaluateYDerivatives(), and NhsModelWithBackwardSolver::ImplicitSolveForQ().

◆ mAlpha3

const double NhsContractionModel::mAlpha3 = 0.625
staticprotected

See reference. (ms)^-1

Definition at line 143 of file NhsContractionModel.hpp.

Referenced by EvaluateYDerivatives(), and NhsModelWithBackwardSolver::ImplicitSolveForQ().

◆ mAlphaR1

const double NhsContractionModel::mAlphaR1 = 0.002
staticprotected

◆ mAlphaR2

const double NhsContractionModel::mAlphaR2 = 0.0017
staticprotected

◆ mBeta0

const double NhsContractionModel::mBeta0 = 4.9
staticprotected

See reference. Dimensionless

Definition at line 122 of file NhsContractionModel.hpp.

Referenced by CalculateCalciumTrop50(), and CalculateT0().

◆ mBeta1

const double NhsContractionModel::mBeta1 = -4
staticprotected

See reference. Dimensionless

Definition at line 104 of file NhsContractionModel.hpp.

Referenced by CalculateCalciumTrop50().

◆ mCalcium50ref

const double NhsContractionModel::mCalcium50ref = 0.00105
staticprotected

See reference. mMols

Definition at line 116 of file NhsContractionModel.hpp.

Referenced by CalculateCalciumTrop50().

◆ mCalciumI

double NhsContractionModel::mCalciumI
protected

The intracellular calcium concentration. To be specified by the caller

Definition at line 66 of file NhsContractionModel.hpp.

Referenced by NhsContractionModel(), NhsModelWithBackwardSolver::CalculateCaTropAndZDerivatives(), EvaluateYDerivatives(), SetInputParameters(), and SetIntracellularCalciumConcentration().

◆ mCalciumTrop50

double NhsContractionModel::mCalciumTrop50
protected

A parameter only dependent on constants and lambda, so updated whenever lambda is updated

Definition at line 70 of file NhsContractionModel.hpp.

Referenced by CalculateCalciumTrop50(), NhsModelWithBackwardSolver::CalculateCaTropAndZDerivatives(), CalculateT0(), and EvaluateYDerivatives().

◆ mCalciumTroponinMax

const double NhsContractionModel::mCalciumTroponinMax = 0.07
staticprotected

◆ mDLambdaDt

double NhsContractionModel::mDLambdaDt
protected

The stretch rate. To be specified by the caller

Definition at line 64 of file NhsContractionModel.hpp.

Referenced by NhsContractionModel(), EvaluateYDerivatives(), NhsModelWithBackwardSolver::ImplicitSolveForQ(), and SetStretchAndStretchRate().

◆ mGamma

const double NhsContractionModel::mGamma = 2
staticprotected

◆ mK1

double NhsContractionModel::mK1
protected

A constant determined from the other constrants. Set up in the constructor

Definition at line 73 of file NhsContractionModel.hpp.

Referenced by NhsContractionModel(), and CalculateT0().

◆ mK2

double NhsContractionModel::mK2
protected

A constant determined from the other constrants. Set up in the constructor

Definition at line 75 of file NhsContractionModel.hpp.

Referenced by NhsContractionModel(), and CalculateT0().

◆ mKon

const double NhsContractionModel::mKon = 100
staticprotected

See reference. (mMols)^-1 (ms)^-1

Definition at line 80 of file NhsContractionModel.hpp.

Referenced by CalculateCalciumTrop50(), NhsModelWithBackwardSolver::CalculateCaTropAndZDerivatives(), and EvaluateYDerivatives().

◆ mKrefoff

const double NhsContractionModel::mKrefoff = 0.2
staticprotected

◆ mKZ

const double NhsContractionModel::mKZ = 0.15
staticprotected

◆ mLambda

double NhsContractionModel::mLambda
protected

The stretch. To be specified by the caller

Definition at line 62 of file NhsContractionModel.hpp.

Referenced by NhsContractionModel(), CalculateCalciumTrop50(), CalculateT0(), and SetStretchAndStretchRate().

◆ mN

const unsigned NhsContractionModel::mN = 3u
staticprotected

See reference. Dimensionless

Definition at line 110 of file NhsContractionModel.hpp.

Referenced by NhsModelWithBackwardSolver::CalculateCaTropAndZDerivatives(), CalculateT0(), and EvaluateYDerivatives().

◆ mNr

const unsigned NhsContractionModel::mNr = 3u
staticprotected

◆ mTref

const double NhsContractionModel::mTref = 56.2
staticprotected

◆ mZp

const double NhsContractionModel::mZp = 0.85
staticprotected

See reference. Dimensionless

Definition at line 113 of file NhsContractionModel.hpp.

Referenced by NhsContractionModel().


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