42 m_name =
"TenTusscher Panfilov 2006 (endocardium)";
44 m_name =
"TenTusscher Panvilov 2006 (mid myocardium)";
46 m_name =
"TenTusscher Panvilov 2006 (epicardium)";
236 dtyLin [
_f] = -1/a20;
237 dtyNLin[
_f] = a7/a20;
241 dtyLin [
_f2] = -1/a21;
242 dtyNLin[
_f2] = a8/a21;
252 dtyLin [
_s] = -1/a23;
253 dtyNLin[
_s] = a10/a23;
257 dtyLin [
_r] = -1/a24;
258 dtyNLin[
_r] = a11/a24;
264 dtyLin [
_xr1] = -1/a34;
265 dtyNLin[
_xr1] = a0/a34;
271 dtyLin [
_xr2] = -1/a35;
272 dtyNLin[
_xr2] = a1/a35;
278 dtyLin [
_xs] = -1/a36;
279 dtyNLin[
_xs] = a2/a36;
285 dtyLin [
_m] = -1/a37;
286 dtyNLin[
_m] = a3/a37;
289 CepsReal a17 = v<-40 ? 0.057*exp(-(v+80)/6.8) : 0;
290 CepsReal a30 = v<-40 ? 2.7*exp(0.079*v) +3.1e5*exp(0.3485*v) : 0.77/0.13*
sigmoid(v,-10.66,-11.1);
292 dtyLin [
_h] = -1/a38;
293 dtyNLin[
_h] = a4/a38;
296 CepsReal a18 = v<-40 ? (-25428*exp(0.2444*v)-6.948e-6*exp(-0.04391*v))*(v+37.78)*
sigmoid(v,-79.23,1/0.311) : 0;
297 CepsReal a31 = v<-40 ? 0.02424*exp(-0.01052*v)*
sigmoid(v,-40.14,-1/0.1378) : 0.6*exp(0.057*v)*
sigmoid(v,-32,-10);
299 dtyLin [
_j] = -1/a39;
300 dtyNLin[
_j] = a5/a39;
307 dtyLin [
_d] = -1/a42;
308 dtyNLin[
_d] = a6/a42;
312 / (1 +0.1245*pow(texp,0.1) +0.0353*texp);
322 dtyNLin[
_nai] = -cm*(a50+a51+3*a55+3*a56)/c[
_vc]/c[
_F];
326 CepsReal a45 = (3*exp(2e-4*(v-a33+100)) +exp(0.1*(v-a33-10)))*
sigmoid(v,a33,-2);
348 CepsReal iIon = -(a47+a54+a48+a49+a52+a55+a50+a51+a56+a53+a58+a57);
358 dtyNLin[
_ki] = -cm*(a47+a54+a48+a49+a58+iStim-2*a55)/(c[
_vc]*c[
_F]);
365 dtyNLin[
_cai] = a63*((a61+(a60-a59)*c[
_vsr]/c[
_vc]) - cm*(a53+a57-2*a56)/(2*c[
_vc]*c[
_F]));
377 dtyNLin[
_casr] = a68*(a59-a67-a60);
std::basic_string< CepsChar > CepsString
C++ format string.
std::set< _Type, _Compare, _Alloc > CepsSet
C++ set.
float CepsReal
Need single precision floating point.
Represents a ionic model for a group of cells, i.e. multiple systems of ODEs.
CepsReal gaussian(CepsReal x, CepsReal c, CepsReal s) const
Function often used in rates evaluations.
CepsReal m_paperStim
Original stim amplitude.
CepsUInt m_nStateVars
Dimensionality of the ODE system, -1 for vm.
CepsReal * m_constants
Constant parameters of the model, from inputs.
CepsReal getStimulation(DegreeOfFreedom *x, CepsReal t) const
Get the sum of all stimulations at time t and dof x.
CepsReal uOverExpm1u(CepsReal u) const
Functions u/(1-exp(u)) that returns 2 (from expansion around 0)
CepsVector< CepsString > m_stateVarNames
Names of state variables.
CepsReal getCmInternal(CepsReal t, DegreeOfFreedom *dof) const
Get either the value of cm on dof, or the default value from the paper.
CepsReal m_paperCm
Original value of Cm.
CepsReal sigmoid(CepsReal x, CepsReal c, CepsReal k) const
Function often used in rates evaluations.
CepsString m_name
A label for display.
A degree of freedom for any kind of problem The dof can be associated to a geometrical element or not...
FunctionDictionary that holds functions which can be used to define source terms, boundary conditions...
static constexpr const CepsInt _pnak
Index alias.
static constexpr const CepsInt _T
Index alias.
CepsReal m_cellSurface
Surface of cell for unit conversion.
static constexpr const CepsInt _rprime
Index alias.
static constexpr const CepsInt _h
Index alias.
static constexpr const CepsInt _kbuf
Index alias.
static constexpr const CepsInt _k3
Index alias.
static constexpr const CepsInt _xs
Index alias.
static constexpr const CepsInt _gbca
Index alias.
static constexpr const CepsInt _ki
Index alias.
void getInitialCondition(CepsReal *v, CepsReal *y) const final
Sets initial values of state variables and transmembrane voltage for a single point....
static constexpr const CepsInt _k4
Index alias.
static constexpr const CepsInt _vleak
Index alias.
void computeRates(CepsReal t, CepsReal *y, CepsReal *v, CepsReal *dtyL, CepsReal *dtyNL, CepsReal *dtv, DegreeOfFreedom *dof) const final
Get the linear and non linear part of the evolution function f. Also computes the ionic current.
static constexpr const CepsInt _kbufss
Index alias.
static constexpr const CepsInt _gbna
Index alias.
static constexpr const CepsInt _gks
Index alias.
static constexpr const CepsInt _kup
Index alias.
static constexpr const CepsInt _gk1
Index alias.
static constexpr const CepsInt _nao
Index alias.
static constexpr const CepsInt _f
Index alias.
static constexpr const CepsInt _gpk
Index alias.
static constexpr const CepsInt _bufss
Index alias.
static constexpr const CepsInt _F
Index alias.
Type
Model variant selector.
@ Epi
Model variant selector.
@ MidMyo
Model variant selector.
@ Endo
Model variant selector.
static constexpr const CepsInt _nai
Index alias.
static constexpr const CepsInt _R
Index alias.
static constexpr const CepsInt _kpca
Index alias.
static constexpr const CepsInt _kmca
Index alias.
static constexpr const CepsInt _vss
Index alias.
static constexpr const CepsInt _vsr
Index alias.
static constexpr const CepsInt _gkr
Index alias.
static constexpr const CepsInt _kmna
Index alias.
static constexpr const CepsInt _vrel
Index alias.
Type m_type
Endo, midmyo or epi.
static constexpr const CepsInt _bufc
Index alias.
static constexpr const CepsInt _gcal
Index alias.
static constexpr const CepsInt _f2
Index alias.
static constexpr const CepsInt _knaca
Index alias.
static constexpr const CepsInt _j
Index alias.
static constexpr const CepsInt _gamma
Index alias.
static constexpr const CepsInt _ko
Index alias.
static constexpr const CepsInt _kmnai
Index alias.
static constexpr const CepsInt _gpca
Index alias.
static constexpr const CepsInt _vxfer
Index alias.
static constexpr const CepsInt _k2prime
Index alias.
TTP06(const Type &type, Unknown *u, const CepsSet< CepsAttribute > &attrs={}, InputParameters *params=nullptr)
Constructor (sets constant parameters)
static constexpr const CepsInt _ksat
Index alias.
static constexpr const CepsInt _vmaxup
Index alias.
static constexpr const CepsInt _gto
Index alias.
static constexpr const CepsInt _kmk
Index alias.
static constexpr const CepsInt _ec
Index alias.
static constexpr const CepsInt _gna
Index alias.
static constexpr const CepsInt _d
Index alias.
static constexpr const CepsInt _xr2
Index alias.
static constexpr const CepsInt _cass
Index alias.
static constexpr const CepsInt _k1prime
Index alias.
static constexpr const CepsInt _fcass
Index alias.
static constexpr const CepsInt _cai
Index alias.
static constexpr const CepsInt _alpha
Index alias.
static constexpr const CepsInt _r
Index alias.
void setupWithParameters(InputParameters *p, FunctionDictionary *dico)
Sets the constants and the space dependant parameters from text inputs.
static constexpr const CepsInt _minsr
Index alias.
static constexpr const CepsInt _pkna
Index alias.
static constexpr const CepsInt _vc
Index alias.
static constexpr const CepsInt _m
Index alias.
static constexpr const CepsInt _casr
Index alias.
static constexpr const CepsInt _xr1
Index alias.
static constexpr const CepsInt _s
Index alias.
static constexpr const CepsInt _bufsr
Index alias.
static constexpr const CepsInt _kbufc
Index alias.
static constexpr const CepsInt _cao
Index alias.
static constexpr const CepsInt _maxsr
Index alias.
A class used to defined an unknown of a PDE problem The unknown can be defined on a specific region,...
const CepsGlobalIndex & getGlobalIndex() const
Get the index
CepsBool approxEquals(CepsReal a, CepsReal b, CepsReal epsilon)
Approximate equality with epsilon tolerance.
CepsBool isValidPtr(_Type *ptr)
Tells if pointer is not null.
void checkNanOrInf(CepsReal v, CepsString message="")
Stops if value is NaN or infty.