LifeV
IonicNoblePurkinje.cpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  @file
29  @brief Ionic model of Noble for Purkinje cells
30  @date 01-2013
31  @author Simone Rossi <simone.rossi@epfl.ch>
32 
33  @contributors
34  @mantainer Simone Rossi <simone.rossi@epfl.ch>
35  @last update 01-2013
36  */
37 
38 
39 #include <lifev/electrophysiology/solver/IonicModels/IonicNoblePurkinje.hpp>
40 
41 
42 namespace LifeV
43 {
44 
45 // ===================================================
46 //! Constructors
47 // ===================================================
48 
49 
50 IonicNoblePurkinje::IonicNoblePurkinje() :
51  super ( 4, 3 ),
52  M_gi (0.14),
53  M_vNa (40.0),
54  M_vK (-100.0),
55  M_Cm (12.0),
56  M_Itot (0)
57 {
58  M_restingConditions.at (0) = -80.0;
59  M_restingConditions.at (1) = mInf (M_restingConditions[0]);
60  M_restingConditions.at (2) = nInf (M_restingConditions[0]);
61  M_restingConditions.at (3) = hInf (M_restingConditions[0]);
62 
63 }
64 
65 IonicNoblePurkinje::IonicNoblePurkinje ( Teuchos::ParameterList& parameterList ) :
66  super ( 4, 3 )
67 {
68  M_gi = parameterList.get ("gi", 0.14 );
69  M_vNa = parameterList.get ("vNa", 40.0 );
70  M_vK = parameterList.get ("vK", -100.0 );
71  M_Cm = parameterList.get ("Cm", 12.0 );
72  M_Itot = 0;
73 
74 }
75 
76 IonicNoblePurkinje::IonicNoblePurkinje ( const IonicNoblePurkinje& model )
77 {
78 
79  M_gi = model.M_gi;
80  M_vNa = model.M_vNa;
81  M_vK = model.M_vK;
82  M_Cm = model.M_Cm;
83  M_Itot = model.M_Itot;
84 
85  M_numberOfEquations = model.M_numberOfEquations;
86  M_restingConditions = model.M_restingConditions;
87 
88 }
89 
90 // ===================================================
91 //! Operator
92 // ===================================================
93 IonicNoblePurkinje& IonicNoblePurkinje::operator= ( const IonicNoblePurkinje& model )
94 {
95  M_gi = model.M_gi;
96  M_vNa = model.M_vNa;
97  M_vK = model.M_vK;
98  M_Cm = model.M_Cm;
99 
100  M_numberOfEquations = model.M_numberOfEquations;
101  M_restingConditions = model.M_restingConditions;
102 
103 
104  return *this;
105 }
106 
107 
108 // ===================================================
109 //! Methods
110 // ===================================================
111 void IonicNoblePurkinje::computeGatingRhs ( const std::vector<Real>& v,
112  std::vector<Real>& rhs )
113 {
114 
115  Real V = v[0];
116  Real M = v[1];
117  Real N = v[2];
118  Real H = v[3];
119 
120  Real alpham = GeneralFunctionAlphaAndBeta (V, 0, 1, 0.1, -1, -15, -48);
121  Real betam = GeneralFunctionAlphaAndBeta (V, 0, 1, -0.12, -1, 5, -8);
122  Real alphah = GeneralFunctionAlphaAndBeta (V, 0.17, -20, 0, 0, 1, -90);
123  Real betah = GeneralFunctionAlphaAndBeta (V, 1, 0, 0, 1, -10, -42);
124  Real alphan = GeneralFunctionAlphaAndBeta (V, 0, 1, 0.0001, -1, -10, -50);
125  Real betan = GeneralFunctionAlphaAndBeta (V, 0.002, -80, 0, 0, 1, -90);
126 
127  rhs[0] = alpham * (1 - M) - betam * M;
128  rhs[1] = alphan * (1 - N) - betan * N;
129  rhs[2] = alphah * (1 - H) - betah * H;
130 }
131 
132 void IonicNoblePurkinje::computeRhs ( const std::vector<Real>& v,
133  std::vector<Real>& rhs )
134 {
135 
136  Real V = v[0];
137  Real M = v[1];
138  Real N = v[2];
139  Real H = v[3];
140 
141  Real alpham = GeneralFunctionAlphaAndBeta (V, 0, 1, 0.1, -1, -15, -48);
142  Real betam = GeneralFunctionAlphaAndBeta (V, 0, 1, -0.12, -1, 5, -8);
143  Real alphah = GeneralFunctionAlphaAndBeta (V, 0.17, -20, 0, 0, 1, -90);
144  Real betah = GeneralFunctionAlphaAndBeta (V, 1, 0, 0, 1, -10, -42);
145  Real alphan = GeneralFunctionAlphaAndBeta (V, 0, 1, 0.0001, -1, -10, -50);
146  Real betan = GeneralFunctionAlphaAndBeta (V, 0.002, -80, 0, 0, 1, -90);
147 
148  Real gK1 = 1.2 * std::exp (- (V + 90.0) / 50.0) + 0.015 * std::exp ( (V + 90.0) / 60.0);
149  Real gK2 = 1.2 * N * N * N * N;
150  Real gNa = 400 * M * M * M * H + M_gi;
151 
152  M_Itot = 1 / M_Cm * (-gNa * (V - M_vNa) - (gK1 + gK2) * (V - M_vK) );
153  rhs[0] = 1 / M_Cm * (-gNa * (V - M_vNa) - (gK1 + gK2) * (V - M_vK) );
154  rhs[1] = alpham * (1 - M) - betam * M;
155  rhs[2] = alphan * (1 - N) - betan * N;
156  rhs[3] = alphah * (1 - H) - betah * H;
157 }
158 
159 
160 Real IonicNoblePurkinje::computeLocalPotentialRhs ( const std::vector<Real>& v )
161 {
162  Real dPotential (0.0);
163 
164  Real V = v[0];
165  Real M = v[1];
166  Real N = v[2];
167  Real H = v[3];
168 
169  /*
170  Real alpham = GeneralFunctionAlphaAndBeta (V, 0, 1, 0.1, -1, -15, -48);
171  Real betam = GeneralFunctionAlphaAndBeta (V, 0, 1, -0.12, -1, 5, -8);
172  Real alphah = GeneralFunctionAlphaAndBeta (V, 0.17, -20, 0, 0, 1, -90);
173  Real betah = GeneralFunctionAlphaAndBeta (V, 1, 0, 0, 1, -10, -42);
174  Real alphan = GeneralFunctionAlphaAndBeta (V, 0, 1, 0.0001, -1, -10, -50);
175  Real betan = GeneralFunctionAlphaAndBeta (V, 0.002, -80, 0, 0, 1, -90);
176  */
177 
178  Real gK1 = 1.2 * std::exp (- (V + 90.0) / 50.0) + 0.015 * std::exp ( (V + 90.0) / 60.0);
179  Real gK2 = 1.2 * N * N * N * N;
180  Real gNa = 400 * M * M * M * H + M_gi;
181 
182  M_Itot = 1 / M_Cm * (-gNa * (V - M_vNa) - (gK1 + gK2) * (V - M_vK) );
183  dPotential = 1 / M_Cm * (-gNa * (V - M_vNa) - (gK1 + gK2) * (V - M_vK) );
184 
185  return dPotential;
186 }
187 
188 void IonicNoblePurkinje::computeGatingVariablesWithRushLarsen ( std::vector<Real>& v, const Real dt )
189 {
190  Real V = v[0];
191 
192 
193  Real alpham = GeneralFunctionAlphaAndBeta (V, 0, 1, 0.1, -1, -15, -48);
194  Real betam = GeneralFunctionAlphaAndBeta (V, 0, 1, -0.12, -1, 5, -8);
195  Real alphah = GeneralFunctionAlphaAndBeta (V, 0.17, -20, 0, 0, 1, -90);
196  Real betah = GeneralFunctionAlphaAndBeta (V, 1, 0, 0, 1, -10, -42);
197  Real alphan = GeneralFunctionAlphaAndBeta (V, 0, 1, 0.0001, -1, -10, -50);
198  Real betan = GeneralFunctionAlphaAndBeta (V, 0.002, -80, 0, 0, 1, -90);
199 
200  Real taum = alpham + betam;
201  Real taun = alphan + betan;
202  Real tauh = alphah + betah;
203 
204  Real mInf = alpham / (taum);
205  Real nInf = alphan / (taun);
206  Real hInf = alphah / (tauh);
207 
208  v[1] = mInf + (v[1] - mInf) * exp (-dt * taum);
209  v[2] = nInf + (v[2] - nInf) * exp (-dt * taun);
210  v[3] = hInf + (v[3] - hInf) * exp (-dt * tauh);
211 
212 }
213 
214 void IonicNoblePurkinje::showMe()
215 {
216 
217  std::cout << "\n\tHi, I'm the Noble model\n\t Good luck\n\n";
218 }
219 
220 
221 }
void updateInverseJacobian(const UInt &iQuadPt)
double Real
Generic real data.
Definition: LifeV.hpp:175