39 #include <lifev/electrophysiology/solver/IonicModels/IonicHodgkinHuxley.hpp> 45 IonicHodgkinHuxley::IonicHodgkinHuxley() :
54 M_restingConditions.at (0) = 0.0;
55 M_restingConditions.at (1) = 0.052932485257250;
56 M_restingConditions.at (2) = 0.317676914060697;
57 M_restingConditions.at (3) = 0.596120753508460;
61 IonicHodgkinHuxley::IonicHodgkinHuxley ( Teuchos::ParameterList& parameterList ) :
64 M_gNa = parameterList.get (
"gNa", 120.0 );
65 M_gK = parameterList.get (
"gK", 36.0 );
66 M_gL = parameterList.get (
"gL", 0.3 );
67 M_vNa = parameterList.get (
"vNa", 115.0 );
68 M_vK = parameterList.get (
"vK", -12.0 );
69 M_vL = parameterList.get (
"vL", 10.6 );
71 M_restingConditions.at (0) = 0.0;
72 M_restingConditions.at (1) = 0.052932485257250;
73 M_restingConditions.at (2) = 0.317676914060697;
74 M_restingConditions.at (3) = 0.596120753508460;
77 IonicHodgkinHuxley::IonicHodgkinHuxley (
const IonicHodgkinHuxley& model )
88 M_numberOfEquations = model.M_numberOfEquations;
89 M_restingConditions = model.M_restingConditions;
90 M_numberOfGatingVariables = model.M_numberOfGatingVariables;
97 IonicHodgkinHuxley& IonicHodgkinHuxley::operator= (
const IonicHodgkinHuxley& model )
106 M_numberOfEquations = model.M_numberOfEquations;
107 M_restingConditions = model.M_restingConditions;
108 M_numberOfGatingVariables = model.M_numberOfGatingVariables;
118 void IonicHodgkinHuxley::computeGatingRhs (
const std::vector<Real>& v,
119 std::vector<Real>& rhs )
127 Real alpham = 0.1 * (25. - V) / (std::exp ( (25. - V) / 10.) - 1.);
128 Real betam = 4.*std::exp (-V / 18.0);
129 Real alphah = 0.07 * std::exp (-V / 20.);
130 Real betah = 1.0 / (std::exp ( (30. - V) / 10.) + 1.);
131 Real alphan = 0.01 * (10. - V) / (std::exp ( (10. - V) / 10.) - 1.);
132 Real betan = 0.125 * std::exp (-V / 80.0);
134 rhs[0] = alpham * (1 - M) - betam * M;
135 rhs[1] = alphan * (1 - N) - betan * N;
136 rhs[2] = alphah * (1 - H) - betah * H;
139 void IonicHodgkinHuxley::computeRhs (
const std::vector<Real>& v,
140 std::vector<Real>& rhs )
142 std::vector<Real> tmpRhs (
this->Size() - 1, 0.0);
143 computeGatingRhs (v, tmpRhs);
144 rhs[0] = computeLocalPotentialRhs (v);
151 Real IonicHodgkinHuxley::computeLocalPotentialRhs (
const std::vector<Real>& v )
153 Real dPotential (0.0);
161 dPotential = -M_gK * N * N * N * N * (V - M_vK) - M_gNa * M * M * M * H * (V - M_vNa) - M_gL * (V - M_vL);
166 void IonicHodgkinHuxley::computeGatingVariablesWithRushLarsen ( std::vector<Real>& v,
const Real dt )
173 Real alpham = 0.1 * (25. - V) / (std::exp ( (25. - V) / 10.) - 1.);
174 Real betam = 4.*std::exp (-V / 18.0);
175 Real alphah = 0.07 * std::exp (-V / 20.);
176 Real betah = 1.0 / (std::exp ( (30. - V) / 10.) + 1.);
177 Real alphan = 0.01 * (10. - V) / (std::exp ( (10. - V) / 10.) - 1.);
178 Real betan = 0.125 * std::exp (-V / 80.0);
180 Real taum = alpham + betam;
181 Real taun = alphan + betan;
182 Real tauh = alphah + betah;
184 Real mInf = alpham / (taum);
185 Real nInf = alphan / (taun);
186 Real hInf = alphah / (tauh);
188 v[1] = mInf + (M - mInf) * std::exp (-dt * taum);
189 v[2] = nInf + (N - nInf) * std::exp (-dt * taun);
190 v[3] = hInf + (H - hInf) * std::exp (-dt * tauh);
194 void IonicHodgkinHuxley::showMe()
197 std::cout <<
"\n\tHi, I'm the Hodgkin Huxley model for neurons. This is the first model implemented by Simone Palamara!!!\n\t See you soon\n\n";
void updateInverseJacobian(const UInt &iQuadPt)
double Real
Generic real data.