58 #ifndef _IONICTENTUSSCHER06_H_ 59 #define _IONICTENTUSSCHER06_H_ 61 #include <lifev/electrophysiology/solver/IonicModels/ElectroIonicModel.hpp> 63 #include <Teuchos_RCP.hpp> 64 #include <Teuchos_ParameterList.hpp> 65 #include "Teuchos_XMLParameterListHelpers.hpp" 71 class IonicTenTusscher06 :
public virtual ElectroIonicModel
77 typedef ElectroIonicModel super;
78 typedef std::shared_ptr<VectorEpetra> vectorPtr_Type;
79 typedef std::shared_ptr<VectorElemental> elvecPtr_Type;
80 typedef RegionMesh<LinearTetra> mesh_Type;
95 IonicTenTusscher06 ( Teuchos::ParameterList& parameterList );
100 IonicTenTusscher06 (
const IonicTenTusscher06& model );
102 virtual ~IonicTenTusscher06() {}
109 IonicTenTusscher06& operator= (
const IonicTenTusscher06& model );
323 inline void setknak (
const Real p )
327 inline void setKmNa (
const Real p )
331 inline void setKmK (
const Real p )
335 inline void setknaca (
const Real p )
339 inline void setKmNai (
const Real p )
343 inline void setKmCa (
const Real p )
347 inline void setksat (
const Real p )
351 inline void setn (
const Real p )
357 inline void setKo (
const Real p )
361 inline void setCao (
const Real p )
365 inline void setNao (
const Real p )
371 inline void setBufc (
const Real p )
375 inline void setKbufc (
const Real p )
379 inline void setBufsr (
const Real p )
383 inline void setKbufsr (
const Real p )
387 inline void setBufss (
const Real p )
391 inline void setKbufss (
const Real p )
396 inline void setVmaxup (
const Real p )
400 inline void setKup (
const Real p )
404 inline void setVrel (
const Real p )
408 inline void setk1_ (
const Real p )
412 inline void setk2_ (
const Real p )
416 inline void setk3 (
const Real p )
420 inline void setk4 (
const Real p )
424 inline void setEC (
const Real p )
428 inline void setmaxsr (
const Real p )
432 inline void setminsr (
const Real p )
436 inline void setVleak (
const Real p )
440 inline void setVxfer (
const Real p )
446 inline void setpKNa (
const Real p )
452 inline void setF (
const Real p )
457 inline void setR (
const Real p )
462 inline void setT (
const Real p )
468 inline void computeRTONF()
473 inline void setGkr (
const Real p )
477 inline void setGks (
const Real p )
481 inline void setGK1 (
const Real p )
485 inline void setGto (
const Real p )
489 inline void setGNa (
const Real p )
493 inline void setGbNa (
const Real p )
497 inline void setGCaL (
const Real p )
501 inline void setGbCa (
const Real p )
505 inline void setGpCa (
const Real p )
509 inline void setKpCa (
const Real p )
513 inline void setGpK (
const Real p )
519 inline void setVc (
const Real p )
523 inline void setVsr (
const Real p )
527 inline void setVss (
const Real p )
533 inline void computeinverseVcF2()
535 inverseVcF2 = 1. / ( 2. * Vc * F ) ;
537 inline void computeinverseVcF()
539 inverseVcF = 1. / ( Vc * F );
541 inline void computeinversevssF2()
543 inversevssF2 = 1. / ( 2. * Vss * F );
551 return RTONF * std::log ( ( Ko / Ki ) );
555 return RTONF * std::log ( ( Nao / Nai ) );
559 return RTONF * std::log ( ( Ko + pKNa * Nao ) / ( Ki + pKNa * Nai ) );
563 return 0.5 * RTONF * std::log ( ( Cao / Cai ) );
567 return 0.1 / ( 1. + std::exp ( 0.06 * ( V - Ek (Ki) - 200. ) ) );
571 return ( 3. * std::exp ( 0.0002 * ( V - Ek (Ki) + 100. ) ) +
572 std::exp ( 0.1 * ( V - Ek (Ki) - 10. ) ) )
573 / ( 1. + std::exp ( -0.5 * ( V - Ek (Ki) ) ) );
577 return Ak1 (V, Ki) / ( Ak1 (V, Ki) + Bk1 (V, Ki) );
581 return ( 1. / ( 1. + 0.1245 * std::exp ( -0.1 * V * F / ( R * T ) )
582 + 0.0353 * std::exp (- V * F / ( R * T ) ) ) );
586 return 1. / ( 1. + std::exp ( ( 25. - V ) / 5.98 ) );
598 return GNa * m * m * m * h * j * ( V - Ena (Nai) );
602 return GCaL * d * f * f2 * fcass * 4. * ( V - 15. ) * ( F * F / ( R * T ) ) *
603 ( 0.25 * std::exp ( 2. * ( V - 15 ) * F / ( R * T ) ) * CaSS - Cao )
604 / ( std::exp ( 2. * ( V - 15. ) * F / ( R * T ) ) - 1.);
609 return Gto * r * s * ( V - Ek (Ki) );
613 return Gkr * std::sqrt (Ko / 5.4) * xr1 * xr2 * ( V - Ek (Ki) );
617 return Gks * xs * xs * ( V - Eks (Ki, Nai) );
619 std::cout <<
"\n**** Iks ******* ";
620 std::cout <<
"\nGks: " << Gks;
621 std::cout <<
"\nxs: " << xs;
622 std::cout <<
"\nV: " << V;
623 std::cout <<
"\nKi: " << Ki;
624 std::cout <<
"\nNai: " << Nai;
625 std::cout <<
"\nEks: " << Eks (Ki, Nai);
626 std::cout <<
"\n*********** ";
632 return GK1 * rec_iK1 (V, Ki) * ( V - Ek (Ki) );
636 return knaca * ( 1. / ( KmNai * KmNai * KmNai + Nao * Nao * Nao ) ) * ( 1. / ( KmCa + Cao ) ) *
637 ( 1. / ( 1. + ksat * std::exp ( ( n - 1. ) * V * F / ( R * T ) ) ) ) *
638 (std::exp ( n * V * F / ( R * T ) ) * Nai * Nai * Nai * Cao -
639 std::exp ( ( n - 1. ) * V * F / ( R * T ) ) * Nao * Nao * Nao * Cai * 2.5);
643 return knak * ( Ko / ( Ko + KmK ) ) * ( Nai / ( Nai + KmNa ) ) * rec_iNaK (V);
647 return GpCa * Cai / ( KpCa + Cai );
651 return GpK * rec_ipK (V) * ( V - Ek (Ki) );
655 return GbNa * ( V - Ena (Nai) );
659 return GbCa * ( V - Eca (Cai) );
665 return IKr (V, xr1, xr2, Ki) +
666 IKs (V, xs, Ki, Nai) +
669 INa (V, m, h, j, Nai) +
671 ICaL (V, d, f, f2, fcass, CaSS) +
674 INaCa (V, Nai, Cai) +
683 return maxsr - ( ( maxsr - minsr ) / ( 1. + ( EC / CaSR ) * ( EC / CaSR ) ) );
687 return k1_ / kCaSR (CaSR);
691 return k2_ * kCaSR (CaSR);
695 return k4 * ( 1 - RR ) - k2 (CaSR) * CaSS * RR;
699 return RR + HT * dRR (CaSR, CaSS, RR);
703 return k1 (CaSR) * CaSS * CaSS * RR / ( k3 + k1 (CaSR) * CaSS * CaSS );
708 return Vrel * OO (CaSR, CaSS, RR) * ( CaSR - CaSS );
712 return Vleak * ( CaSR - Cai);
716 return Vmaxup / ( 1. + ( ( Kup * Kup ) / ( Cai * Cai ) ) );
720 return Vxfer * ( CaSS - Cai);
724 return Bufsr * CaSR / ( CaSR + Kbufsr );
728 return HT * ( Iup (Cai) - Irel (CaSR, CaSS, RR) - Ileak (CaSR, Cai) );
732 return Bufsr - CaCSQN (CaSR) - dCaSR (Cai, CaSR, CaSS, RR, HT) - CaSR + Kbufsr;
736 return Kbufsr * ( CaCSQN (CaSR) + dCaSR (Cai, CaSR, CaSS, RR, HT) + CaSR);
740 return ( std::sqrt ( bjsr (Cai, CaSR, CaSS, RR, HT) * bjsr (Cai, CaSR, CaSS, RR, HT)
741 + 4. * cjsr (Cai, CaSR, CaSS, RR, HT) )
742 - bjsr (Cai, CaSR, CaSS, RR, HT) ) / 2.;
747 return Bufss * CaSS / ( CaSS + Kbufss);
751 return HT * ( - Ixfer (CaSS, Cai) * ( Vc / Vss )
752 + Irel (CaSR, CaSS, RR) * ( Vsr / Vss )
753 + ( - ICaL (V, d, f, f2, fcass, CaSS) * inversevssF2 * M_cellularCapacitance ) );
757 return Bufss - CaSSBuf (CaSS) - dCaSS (Cai, CaSR, CaSS, RR, V, d, f, f2, fcass, HT) - CaSS + Kbufss;
761 return Kbufss * ( CaSSBuf (CaSS) + dCaSS (Cai, CaSR, CaSS, RR, V, d, f, f2, fcass, HT) + CaSS);
765 return ( std::sqrt ( bcss (Cai, CaSR, CaSS, RR, V, d, f, f2, fcass, HT) * bcss (Cai, CaSR, CaSS, RR, V, d, f, f2, fcass, HT)
766 + 4. * ccss (Cai, CaSR, CaSS, RR, V, d, f, f2, fcass, HT) )
767 - bcss (Cai, CaSR, CaSS, RR, V, d, f, f2, fcass, HT) ) / 2.;
772 return Bufc * Cai / ( Cai + Kbufc);
776 return HT * ( ( - ( IbCa (V, Cai) + IpCa (Cai) - 2. * INaCa (V, Nai, Cai) )
777 * inverseVcF2 * M_cellularCapacitance )
778 - ( Iup (Cai) - Ileak (CaSR, Cai) ) * ( Vsr / Vc )
779 + Ixfer (CaSS, Cai) );
783 return Bufc - CaBuf (Cai) - dCai (V, Nai, Cai, CaSR, CaSS, HT) - Cai + Kbufc;
787 return Kbufc * ( CaBuf (Cai) + dCai (V, Nai, Cai, CaSR, CaSS, HT) + Cai);
791 return ( std::sqrt ( bc (V, Nai, Cai, CaSR, CaSS, HT) * bc (V, Nai, Cai, CaSR, CaSS, HT)
792 + 4. * cc (V, Nai, Cai, CaSR, CaSS, HT) )
793 - bc (V, Nai, Cai, CaSR, CaSS, HT) ) / 2.;
799 return - ( INa (V, m, h, j, Nai)
802 + 3. * INaCa (V, Nai, Cai) ) * inverseVcF * M_cellularCapacitance;
806 return Nai + HT * dNai (V, m, h, j, Nai, Cai);
811 return - (- M_appliedCurrent
814 + IKr (V, xr1, xr2, Ki)
815 + IKs (V, xs, Ki, Nai)
817 + IpK (V, Ki) ) * inverseVcF * M_cellularCapacitance;
821 return Ki + HT * dKi (V, r, s, xr1, xr2, xs, Nai, Ki);
827 return 1. / ( 1. + std::exp ( ( -60. - V ) / 5. ) );
831 return 0.1 / ( 1. + std::exp ( ( V + 35. ) / 5. ) )
832 + 0.10 / ( 1. + std::exp ( ( V - 50. ) / 200. ) );
836 return AM (V) * BM (V);
840 return 1. / ( ( 1. + std::exp ( ( -56.86 - V ) / 9.03 ) )
841 * ( 1. + std::exp ( ( - 56.86 - V ) / 9.03 ) ) );
851 return ( 0.057 * std::exp ( - ( V + 80. ) / 6.8 ) );
858 return ( 0.77 / ( 0.13 * ( 1. + std::exp ( - ( V + 10.66 ) / 11.1 ) ) ) );
862 return ( 2.7 * std::exp ( 0.079 * V ) + ( 3.1e5 ) * std::exp ( 0.3485 * V ) );
867 return 1.0 / (AH (V) + BH (V) );
872 return 1. / ( ( 1. + std::exp ( ( V + 71.55 ) / 7.43 ) )
873 * ( 1. + std::exp ( ( V + 71.55 ) / 7.43 ) ) );
883 return ( ( ( -2.5428e4 ) * std::exp ( 0.2444 * V ) - ( 6.948e-6 ) *
884 std::exp ( -0.04391 * V ) ) * ( V + 37.78 ) /
885 ( 1. + std::exp ( 0.311 * ( V + 79.23 ) ) ) );
892 return ( 0.6 * std::exp ( ( 0.057 ) * V ) / ( 1. + std::exp ( -0.1 * ( V + 32. ) ) ) );
895 return ( 0.02424 * std::exp ( -0.01052 * V )
896 / ( 1. + std::exp ( -0.1378 * ( V + 40.14 ) ) ) );
900 return 1.0 / ( AJ (V) + BJ (V) );
909 return 1. / ( 1. + std::exp ( ( -26. - V ) / 7. ) );
913 return 450. / ( 1. + std::exp ( ( -45. - V ) / 10. ) );
917 return 6. / ( 1. + std::exp ( ( V - ( -30. ) ) / 11.5 ) );
921 return axr1 (V) * bxr1 (V);
925 return 1. / ( 1. + std::exp ( ( V - (-88.) ) / 24. ) );
929 return 3. / ( 1. + std::exp ( ( -60. - V ) / 20. ) );
933 return 1.12 / ( 1. + std::exp ( ( V - 60. ) / 20. ) );
937 return axr2 (V) * bxr2 (V);
942 return 1. / ( 1. + std::exp ( ( -5. - V ) / 14. ) );
946 return ( 1400. / (std::sqrt ( 1. + std::exp ( ( 5. - V ) / 6. ) ) ) );
950 return ( 1. / ( 1. + std::exp ( ( V - 35. ) / 15.) ) );
954 return Axs (V) * Bxs (V) + 80.;
959 return 1. / ( 1. + std::exp ( ( 20. - V ) / 6. ) );
965 return 1. / ( 1. + std::exp ( ( V + 20. ) / 5. ) );
967 else if (flag == Endo)
969 return 1. / ( 1. + std::exp ( ( V + 28. ) / 5. ) );
973 return 1. / ( 1. + std::exp ( ( V + 20. ) / 5. ) );
978 return 9.5 * std::exp ( - ( V + 40. ) * ( V + 40. ) / 1800. ) + 0.8;
983 return 85. * std::exp ( - ( V + 45. ) * ( V + 45. ) / 320. )
984 + 5. / ( 1. + std::exp ( ( V - 20. ) / 5. ) ) + 3.;
985 else if (flag == Endo)
987 return 1000. * std::exp ( - ( V + 67. ) * ( V + 67. ) / 1000. ) + 8.;
990 return 85. * std::exp ( - ( V + 45. ) * ( V + 45. ) / 320. )
991 + 5. / ( 1. + std::exp ( ( V - 20. ) / 5. ) ) + 3.;
997 return 1. / ( 1. + std::exp ( ( - 8. - V ) / 7.5 ) );
1001 return 1.4 / ( 1. + std::exp ( ( - 35. - V ) / 13. ) ) + 0.25;
1005 return 1.4 / ( 1. + std::exp ( ( V + 5. ) / 5. ) );
1009 return 1. / ( 1. + std::exp ( ( 50. - V ) / 20. ) );
1013 return Ad (V) * Bd (V) + Cd (V);
1017 return 1. / ( 1. + std::exp ( ( V + 20. ) / 7. ) );
1021 return 1102.5 * std::exp ( - ( V + 27. ) * ( V + 27. ) / 225. );
1025 return 200. / ( 1. + std::exp ( ( 13. - V ) / 10. ) );
1029 return ( 180. / ( 1. + std::exp ( ( V + 30. ) / 10. ) ) ) + 20.;
1033 return Af (V) + Bf (V) + Cf (V);
1037 return 0.67 / ( 1. + std::exp ( ( V + 35. ) / 7. ) ) + 0.33;
1041 return 600. * std::exp ( - ( V + 25. ) * ( V + 25. ) / 170. );
1045 return 31. / ( 1. + std::exp ( ( 25. - V ) / 10. ) );
1049 return 16. / ( 1. + std::exp ( ( V + 30. ) / 10. ) );
1053 return Af2 (V) + Bf2 (V) + Cf2 (V);
1057 return 0.6 / ( 1. + ( CaSS / 0.05 ) * ( CaSS / 0.05 ) ) + 0.4;
1061 return 80. / ( 1. + ( CaSS / 0.05 ) * ( CaSS / 0.05 ) ) + 2.;
1067 return m + HT * (M_INF (V) - m) / TAU_M (V);
1071 return h + HT * (H_INF (V) - h) / TAU_H (V);
1075 return j + HT * (J_INF (V) - j) / TAU_J (V);
1079 return xr1 + HT * ( Xr1_INF (V) - xr1) / TAU_Xr1 (V);
1083 return xr2 + HT * ( Xr2_INF (V) - xr2 ) / TAU_Xr2 (V);
1087 return xs + HT * ( Xs_INF (V) - xs ) / TAU_Xs (V);
1091 return s + HT * ( S_INF (V) - s ) / TAU_S (V) ;
1095 return r + HT * ( R_INF (V) - r) / TAU_R (V);
1099 return d + HT * ( D_INF (V) - d ) / TAU_D (V);
1103 return f + HT * (F_INF (V) - f) / TAU_F (V);
1107 return f2 + HT * (F2_INF (V) - f2) / TAU_F2 (V);
1111 return fcass + HT * (FCaSS_INF (CaSS) - fcass) / TAU_FCaSS (CaSS);
1117 return (M_INF (V) - m) / TAU_M (V);
1121 return (H_INF (V) - h) / TAU_H (V);
1125 return (J_INF (V) - j) / TAU_J (V);
1129 return ( Xr1_INF (V) - xr1) / TAU_Xr1 (V);
1133 return ( Xr2_INF (V) - xr2 ) / TAU_Xr2 (V);
1137 return ( Xs_INF (V) - xs ) / TAU_Xs (V);
1141 return ( S_INF (V) - s ) / TAU_S (V) ;
1145 return ( R_INF (V) - r) / TAU_R (V);
1149 return ( D_INF (V) - d ) / TAU_D (V);
1153 return (F_INF (V) - f) / TAU_F (V);
1157 return (F2_INF (V) - f2) / TAU_F2 (V);
1161 return (FCaSS_INF (CaSS) - fcass) / TAU_FCaSS (CaSS);
1170 return V + HT * ( M_appliedCurrent / M_membraneCapacitance + (- Itot (V, m, h, j, d, f, f2, fcass, r, s, xr1, xr2, xs, Nai, Ki, Cai, CaSS ) ) );
1174 void computeGatingRhs (
const std::vector<Real>& v, std::vector<Real>& rhs);
1176 void computeNonGatingRhs (
const std::vector<Real>& v, std::vector<Real>& rhs );
1178 void computeRhs (
const std::vector<Real>& v, std::vector<Real>& rhs);
1181 Real computeLocalPotentialRhs (
const std::vector<Real>& v );
1184 void computeGatingVariablesWithRushLarsen ( std::vector<Real>& v,
const Real dt );
1190 void showCurrents (std::vector<Real>& v);
1195 void solveOneStep (std::vector<Real>& v,
Real dt);
1206 inline WallFlag getFlag()
1288 inline ElectroIonicModel* createIonicTenTusscher06()
1290 return new IonicTenTusscher06();
void updateInverseJacobian(const UInt &iQuadPt)
static const LifeV::UInt elm_nodes_num[]
double Real
Generic real data.
static bool register_IonicTenTusscher06