50 m_name =
"O'Hara-Rudy modified 2016";
131 c[
_ICK1 ] = std::nan(
"");
132 c[
_hK1 ] = std::nan(
"");
133 c[
_PKNa ] = 0.018333;
170 y[
_cai ] = 8.54e-05 ;
171 y[
_cass ] = 8.43e-05 ;
178 y[
_hsp ] = 0.448501 ;
180 y[
_mL ] = 0.000194015 ;
182 y[
_hLp ] = 0.265885 ;
183 y[
_a ] = 0.00101185 ;
186 y[
_ap ] = 0.000515567 ;
187 y[
_iFp ] = 0.999542 ;
188 y[
_iSp ] = 0.641861 ;
189 y[
_d ] = 2.43015e-09 ;
193 y[
_fcas ] = 0.99982 ;
194 y[
_jca ] = 0.999977 ;
195 y[
_nca ] = 0.00267171 ;
198 y[
_xrf ] = 8.26608e-06 ;
199 y[
_xrs ] = 0.453268 ;
200 y[
_xs1 ] = 0.270492 ;
201 y[
_xs2 ] = 0.0001963 ;
202 y[
_xk1 ] = 0.996801 ;
204 y[
_Jrelp ] = 3.17262e-07 ;
234 CepsReal fraction = 1./(1.+KmCaMK/CaMKa);
241 computeINa(&INa,&INaL,v,y,dtyLin,dtyNLin,fraction);
249 computeICa(&ICaL,&ICaNa,&ICaK,v,y,dtyLin,dtyNLin,fraction);
281 CepsReal Iion = INa+INaL+Ito+ICaL+ICaNa+ICaK+IKr+IKs+IK1+INaCa_i+INaCa_ss+INaK+INab+IKb+IpCa+ICab;
287 *dtv = -(Iion+IStim)/cm;
326 CepsReal Bcai = 1.0/(1.0+cmdnmax*kmcmdn/std::pow(kmcmdn+y[
_cai],2.0)
327 +trpnmax*kmtrpn/std::pow(kmtrpn+y[
_cai],2.0));
329 dtyNLin[
_cai] = Bcai*(-(IpCa+ICab-2.0*INaCa_i)*d[
_acap]/(2.0*c[
_F]*d[
_vmyo])
336 CepsReal Bcass = 1.0/(1.0+BSRmax*KmBSR/std::pow(KmBSR+y[
_cass],2.0)
337 +BSLmax*KmBSL/std::pow(KmBSL+y[
_cass],2.0));
344 CepsReal Bcajsr = 1/(1+csqnmax*kmcsqn/std::pow(kmcsqn+y[
_cajsr],2.0));
346 dtyNLin[
_cajsr] = Bcajsr*(Jtr-Jrel);
406 CepsReal taum = 1./(6.765*exp((v+11.64)/34.77) +8.552*exp(-(v+77.42)/5.955));
407 dtyLin [
_m] = -1./taum;
408 dtyNLin[
_m] = wInfm/taum;
411 CepsReal tauhf = 1./(1.432e-5*exp(-(v+1.196)/6.285)+6.149*exp((v+0.5096)/20.27));
412 CepsReal tauhs = 1./(0.009794*exp(-(v+17.95)/28.05)+0.3343*exp((v+5.730)/56.66));
413 dtyLin [
_hf] = -1./tauhf;
414 dtyNLin[
_hf] = wInfh/tauhf;
415 dtyLin [
_hs] = -1./tauhs;
416 dtyNLin[
_hs] = wInfh/tauhs;
421 CepsReal tauj = 2.038+1.0/(0.02136*exp(-(v+100.6)/8.281)+0.3052*exp((v+0.9941)/38.45));
422 dtyLin [
_j] = -1./tauj;
423 dtyNLin[
_j] = wInfj/tauj;
427 dtyLin [
_hsp] = -1./tauhsp;
428 dtyNLin[
_hsp] = wInfhsp/tauhsp;
432 dtyLin [
_jp] = -1./taujp;
433 dtyNLin[
_jp] = wInfj/taujp;
437 *INa = gNa*(v-ENa)*pow(y[
_m],3.)*((1-fraction)*h*y[
_j]+fraction*hp*y[
_jp]);
441 dtyLin [
_mL] = -1./taumL;
442 dtyNLin[
_mL] = wInfmL/taumL;
446 dtyLin [
_hL] = -1./tauhL;
447 dtyNLin[
_hL] = wInfhL/tauhL;
451 dtyLin [
_hLp] = -1./tauhLp;
452 dtyNLin[
_hLp] = wInfhLp/tauhLp;
457 *INaL = gNaL*(v-ENa)*y[
_mL]*((1.-fraction)*y[
_hL]+fraction*y[
_hLp]);
476 dtyLin [
_a] = -1./taua;
477 dtyNLin[
_a] = wInfa/taua;
482 deltaEpi -= 0.95*
sigmoid(v,-70,5.);
483 CepsReal tauiF = deltaEpi*(4.562+1/(0.3933*exp((-(v+100.0))/100.0)+0.08004*exp((v+50.0)/16.59)));
484 CepsReal tauiS = deltaEpi*(23.62+1/(0.001416*exp((-(v+96.52))/59.05)+1.780e-8*exp((v+114.1)/8.079)));
485 dtyLin [
_iF] = -1./tauiF;
486 dtyNLin[
_iF] = wInfi/tauiF;
487 dtyLin [
_iS] = -1./tauiS;
488 dtyNLin[
_iS] = wInfi/tauiS;
493 dtyLin [
_ap] = -1./taua;
494 dtyNLin[
_ap] = wInfap/taua;
496 CepsReal dtiDevelop = 1.354+1.0e-4/(exp((v-167.4)/15.89)+exp(-(v-12.23)/0.2154));
498 CepsReal tauiFp = dtiDevelop*dtiRecover*tauiF;
499 CepsReal tauiSp = dtiDevelop*dtiRecover*tauiS;
500 dtyLin [
_iFp] = -1./tauiFp;
501 dtyNLin[
_iFp] = wInfi/tauiFp;
502 dtyLin [
_iSp] = -1./tauiSp;
503 dtyNLin[
_iSp] = wInfi/tauiSp;
510 *Ito = gto*(v-EK)*((1-fraction)*i*y[
_a]+fraction*ip*y[
_ap]);
531 CepsReal taud = 0.6+1.0/(exp(-0.05*(v+6.0))+exp(0.09*(v+14.0)));
532 dtyLin [
_d] = -1./taud;
533 dtyNLin[
_d] = wInfd/taud;
536 CepsReal tauff = 7.0+1.0/(0.0045*exp(-(v+20.0)/10.0)+0.0045*exp((v+20.0)/10.0));
537 CepsReal taufs = 1000.0+1.0/(0.000035*exp(-(v+5.0)/4.0)+0.000035*exp((v+5.0)/6.0));
538 dtyLin [
_ff] = -1./tauff;
539 dtyNLin[
_ff] = wInff/tauff;
540 dtyLin [
_fs] = -1./taufs;
541 dtyNLin[
_fs] = wInff/taufs;
544 CepsReal taufcaf = 7.0+1.0/(0.04*exp(-(v-4.0)/7.0)+0.04*exp((v-4.0)/7.0));
545 CepsReal taufcas = 100.0+1.0/(0.00012*exp(-v/3.0)+0.00012*exp(v/7.0));
546 dtyLin [
_fcaf] = -1./taufcaf;
547 dtyNLin[
_fcaf] = wInffca/taufcaf;
548 dtyLin [
_fcas] = -1./taufcas;
549 dtyNLin[
_fcas] = wInffca/taufcas;
552 dtyLin [
_jca] = -1./taujca;
553 dtyNLin[
_jca] = wInffca/taujca;
556 dtyLin [
_ffp] = -1./tauffp;
557 dtyNLin[
_ffp] = wInff/tauffp;
560 dtyLin [
_fcafp] = -1./taufcafp;
561 dtyNLin[
_fcafp] = wInffca/taufcafp;
573 dtyLin [
_nca] = -km2n;
574 dtyNLin[
_nca] = anca*k2n;
594 *ICaNa = (1.0-fraction)*PCaNa *phiCaNa*y[
_d]*(f *(1.0-y[
_nca])+y[
_jca]*fca *y[
_nca])
595 + fraction *PCaNap*phiCaNa*y[
_d]*(fp*(1.0-y[
_nca])+y[
_jca]*fcap*y[
_nca]);
596 *ICaK = (1.0-fraction)*PCaK *phiCaK *y[
_d]*(f *(1.0-y[
_nca])+y[
_jca]*fca *y[
_nca])
597 + fraction *PCaKp *phiCaK *y[
_d]*(fp*(1.0-y[
_nca])+y[
_jca]*fcap*y[
_nca]);
598 *ICaL = (1.0-fraction)*PCa *phiCaL *y[
_d]*(f *(1.0-y[
_nca])+y[
_jca]*fca *y[
_nca])
599 + fraction *PCap *phiCaL *y[
_d]*(fp*(1.0-y[
_nca])+y[
_jca]*fcap*y[
_nca]);
617 CepsReal tauxrf = 12.98+1.0/(0.3652*exp((v-31.66)/3.869)+4.123e-5*exp((-(v-47.78))/20.38));
618 CepsReal tauxrs = 1.865+1.0/(0.06629*exp((v-34.70)/7.355)+1.128e-5*exp((-(v-29.74))/25.94));
619 dtyLin [
_xrf] = -1./tauxrf;
620 dtyNLin[
_xrf] = wInfxr/tauxrf;
621 dtyLin [
_xrs] = -1./tauxrs;
622 dtyNLin[
_xrs] = wInfxr/tauxrs;
650 CepsReal tauxs1 = 817.3+1.0/(2.326e-4*exp((v+48.28)/17.80)+0.001292*exp((-(v+210.0))/230.0));
651 dtyLin [
_xs1] = -1./tauxs1;
652 dtyNLin[
_xs1] = wInfxs1/tauxs1;
655 CepsReal tauxs2 = 1.0/(0.01*exp((v-50.0)/20.0)+0.0193*exp((-(v+66.54))/31.0));
656 dtyLin [
_xs2] = -1./tauxs2;
657 dtyNLin[
_xs2] = wInfxs2/tauxs2;
659 CepsReal KsCa = 1.0+0.6/(1.0+std::pow(3.8e-5/y[
_cai],1.4));
665 *IKs = GKs*KsCa*y[
_xs1]*y[
_xs2]*(v-EKs);
682 CepsReal tauxk1 = 122.2/(exp((-(v+127.2))/20.36)+exp((v+236.8)/69.33));
683 dtyLin [
_xk1] = -1./tauxk1;
684 dtyNLin[
_xk1] = wInfxk1/tauxk1;
728 CepsReal h4 = 1.0+na/kna1*(1+na/kna2);
749 CepsReal x1 = k2*k4*(k7+k6)+k5*k7*(k2+k3);
750 CepsReal x2 = k1*k7*(k4+k5)+k4*k6*(k1+k8);
751 CepsReal x3 = k1*k3*(k7+k6)+k8*k6*(k2+k3);
752 CepsReal x4 = k2*k8*(k4+k5)+k3*k5*(k1+k8);
758 CepsReal allo = 1.0/(1.0+pow(KmCaAct/ca,2.0));
759 CepsReal JncxNa = 3.0*(E4*k7-E1*k8)+E3*k4pp-E2*k3pp;
768 return Gncx*allo*(zna*JncxNa+zca*JncxCa);
788 CepsReal Knai = Knai0*pow(evfrt, delta);
789 CepsReal Knao = Knao0*pow(evfrt,1-delta);
801 CepsReal a1 = k1p*pow(y[
_nai]/Knai,3.0)/(pow(1.0+y[
_nai]/Knai,3.0)+pow(1.0+y[
_ki]/Kki,2.0)-1.0);
806 CepsReal b3 = k3m*P*H/(1.0+MgATP/Kmgatp);
807 CepsReal a4 = k4p*MgATP/Kmgatp/(1.0+MgATP/Kmgatp);
808 CepsReal b4 = k4m*pow(y[
_ki]/Kki,2.0)/(pow(1.0+y[
_nai]/Knai,3.0)+pow(1.0+y[
_ki]/Kki,2.0)-1.0);
809 CepsReal x1 = a4*a1*a2+b2*b4*b3+a2*b4*b3+b3*a1*a2;
810 CepsReal x2 = b2*b1*b4+a1*a2*a3+a3*b1*b4+a2*a3*b4;
811 CepsReal x3 = a2*a3*a4+b3*b2*b1+b2*b1*a4+a3*a4*b1;
812 CepsReal x4 = b4*b3*b2+a3*a4*a1+b2*a4*a1+b3*b2*a1;
818 CepsReal JnakNa = 3.0*(E1*a3-E2*b3);
827 *INaK = Pnak*(zna*JnakNa+zk*JnakK);
840 *IKb = GKb*xkb*(v-EK);
858 *IPCa = GpCa*y[
_cai]/(5.e-4+y[
_cai]);
878 dtyNLin[
_Jrelnp] = wInfJrel/tauJrel;
886 dtyLin [
_Jrelp] = -1/tauJrelp;
887 dtyNLin[
_Jrelp] = wInfJrelp/tauJrelp;
904 *Jup = (1-fraction)*Jupnp + fraction*Jupp - Jleak;
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 m_paperStim
Original stim amplitude.
CepsReal * m_dconstants
Constant parameters of the model, computed from others.
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.
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...
static constexpr const CepsInt _vnsr
Index alias.
void computeBgCurrents(CepsReal *IKb, CepsReal *INab, CepsReal *ICab, CepsReal v, CepsReal *y) const
Background currents.
static constexpr const CepsInt _hLp
Index alias.
static constexpr const CepsInt _R
Index alias.
void computeIKr(CepsReal *IKr, CepsReal v, CepsReal *y, CepsReal *dtyLin, CepsReal *dtyNLin) const
Rapid Delayed Rectifier K+ Current.
static constexpr const CepsInt _ICK1
Index alias.
static constexpr const CepsInt _hs
Index alias.
static constexpr const CepsInt _hNaL
Index alias.
static constexpr const CepsInt _xs2
Index alias.
void setupWithParameters(InputParameters *p)
Sets the constants and the space dependant parameters from text inputs.
static constexpr const CepsInt _T
Index alias.
void computeICa(CepsReal *ICaL, CepsReal *ICaNa, CepsReal *ICaK, CepsReal v, CepsReal *y, CepsReal *dtyLin, CepsReal *dtyNLin, CepsReal fraction) const
L-type Ca2+ channel.
static constexpr const CepsInt _acap
Index alias.
static constexpr const CepsInt _hK1
Index alias.
static constexpr const CepsInt _vcell
Index alias.
static constexpr const CepsInt _hf
Index alias.
static constexpr const CepsInt _gtoFrac
Index alias.
static constexpr const CepsInt _ko
Index alias.
static constexpr const CepsInt _ICCal
Index alias.
static constexpr const CepsInt _gNaFrac
Index alias.
static constexpr const CepsInt _j
Index alias.
static constexpr const CepsInt _cass
Index alias.
static constexpr const CepsInt _d
Index alias.
static constexpr const CepsInt _nass
Index alias.
static constexpr const CepsInt _IKs_factor
Index alias.
void computeIto(CepsReal *Ito, CepsReal v, CepsReal *y, CepsReal *dtyLin, CepsReal *dtyNLin, CepsReal fraction) const
Transient outward K+ current.
static constexpr const CepsInt _kss
Index alias.
CepsReal computeINaCaInternal(CepsReal v, CepsReal na, CepsReal ca) const
Internal function to avoid duplication.
static constexpr const CepsInt _ICNaL
Index alias.
static constexpr const CepsInt _FRT
Index alias.
void computeINaK(CepsReal *INaK, CepsReal v, CepsReal *y) const
Sodium/Potassium ATPase Current.
static constexpr const CepsInt _a
Index alias.
static constexpr const CepsInt _iF
Index alias.
static constexpr const CepsInt _gCalFrac
Index alias.
static constexpr const CepsInt _xrs
Index alias.
static constexpr const CepsInt _hKs
Index alias.
static constexpr const CepsInt _vnsr_fraction
Index alias.
static constexpr const CepsInt _vjsr_fraction
Index alias.
static constexpr const CepsInt _cajsr
Index alias.
void computeJrel(CepsReal *Jrel, CepsReal ICaL, CepsReal *y, CepsReal *dtyLin, CepsReal *dtyNLin, CepsReal fraction) const
SR Calcium Release Flux, via Ryanodine Receptor.
static constexpr const CepsInt _fcaf
Index alias.
static constexpr const CepsInt _vjsr
Index alias.
static constexpr const CepsInt _ff
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 _gNaLFrac
Index alias.
static constexpr const CepsInt _hsp
Index alias.
static constexpr const CepsInt _xs1
Index alias.
static constexpr const CepsInt _vss
Index alias.
static constexpr const CepsInt _gK1Frac
Index alias.
static constexpr const CepsInt _fcas
Index alias.
static constexpr const CepsInt _nca
Index alias.
static constexpr const CepsInt _iFp
Index alias.
static constexpr const CepsInt _ICKs
Index alias.
static constexpr const CepsInt _iS
Index alias.
static constexpr const CepsInt _nao
Index alias.
static constexpr const CepsInt _rad
Index alias.
static constexpr const CepsInt _IKr_factor
Index alias.
Type m_type
Celltype selector (endo, epi, midmyo)
static constexpr const CepsInt _CaMKt
Index alias.
static constexpr const CepsInt _ICNa
Index alias.
static constexpr const CepsInt _fcafp
Index alias.
static constexpr const CepsInt _ffp
Index alias.
static constexpr const CepsInt _ICKr
Index alias.
static constexpr const CepsInt _vmyo
Index alias.
static constexpr const CepsInt _mL
Index alias.
static constexpr const CepsInt _Jrelnp
Index alias.
static constexpr const CepsInt _ki
Index alias.
static constexpr const CepsInt _nai
Index alias.
static constexpr const CepsInt _jca
Index alias.
void computeINa(CepsReal *INa, CepsReal *iNaL, CepsReal v, CepsReal *y, CepsReal *dtyLin, CepsReal *dtyNLin, CepsReal fraction) const
Fast Na+ current and Late Na+ current.
static constexpr const CepsInt _gKrFrac
Index alias.
static constexpr const CepsInt _hto
Index alias.
static constexpr const CepsInt _hCal
Index alias.
static constexpr const CepsInt _m
Index alias.
static constexpr const CepsInt _Jrelp
Index alias.
static constexpr const CepsInt _ap
Index alias.
static constexpr const CepsInt _vmyo_fraction
Index alias.
static constexpr const CepsInt _ICto
Index alias.
static constexpr const CepsInt _INaL_factor
Index alias.
static constexpr const CepsInt _xrf
Index alias.
static constexpr const CepsInt _hNa
Index alias.
void computeIPCa(CepsReal *IPCa, CepsReal *y) const
Sarsolemmal calcium pump current.
static constexpr const CepsInt _vss_fraction
Index alias.
ORdmD16(const Type &type, Unknown *u, const CepsSet< CepsAttribute > &attrs={}, InputParameters *params=nullptr)
Constructor (sets constants)
static constexpr const CepsInt _gKsFrac
Index alias.
static constexpr const CepsInt _cao
Index alias.
static constexpr const CepsInt _cansr
Index alias.
void computeJup(CepsReal *Jup, CepsReal *y, CepsReal fraction) const
Calcium Uptake via SERCA Pump.
Type
Model variant selector.
@ Epi
Model variant selector.
@ MidMyo
Model variant selector.
@ Endo
Model variant selector.
static constexpr const CepsInt _ageo
Index alias.
static constexpr const CepsInt _IK1_factor
Index alias.
static constexpr const CepsInt _jp
Index alias.
static constexpr const CepsInt _xk1
Index alias.
static constexpr const CepsInt _hKr
Index alias.
static constexpr const CepsInt _L
Index alias.
void computeIKs(CepsReal *IKs, CepsReal v, CepsReal *y, CepsReal *dtyLin, CepsReal *dtyNLin) const
Slow Delayed Rectifier K+ Current.
static constexpr const CepsInt _ICaL_factor
Index alias.
static constexpr const CepsInt _fs
Index alias.
static constexpr const CepsInt _F
Index alias.
static constexpr const CepsInt _drug
Index alias.
void computeRates(CepsReal t, CepsReal *y, CepsReal *v, CepsReal *dtyL, CepsReal *dtyNL, CepsReal *dtv, DegreeOfFreedom *dof) const override
Get the linear and non linear part of the evolution function f. Also computes the ionic current.
void computeINaCa(CepsReal *INaCa_i, CepsReal *INaCa_ss, CepsReal v, CepsReal *y) const
Na+/Ca2+ exchanger.
static constexpr const CepsInt _PKNa
Index alias.
void computeIK1(CepsReal *IK1, CepsReal v, CepsReal *y, CepsReal *dtyLin, CepsReal *dtyNLin) const
Inward Rectifier K+ Current.
static constexpr const CepsInt _hL
Index alias.
static constexpr const CepsInt _iSp
Index alias.
static constexpr const CepsInt _cai
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.
const _Type & max(const CepsVector< _Type, _Alloc > &vec)
Returns the maximum of the vector, const version.
void checkNanOrInf(CepsReal v, CepsString message="")
Stops if value is NaN or infty.