Nektar++
LuoRudy91.cpp
Go to the documentation of this file.
1 //! @file
2 //!
3 //! This source file was generated from CellML.
4 //!
5 //! Model: luo_rudy_1991
6 //!
7 //! Processed by pycml - CellML Tools in Python
8 //! (translators: 12434, pycml: 12383, optimize: 12408)
9 //! on Thu Oct 20 12:52:22 2011
10 //!
11 //! <autogenerated>
12 
13 #include <iostream>
14 #include <string>
15 //#include <LibUtilities/BasicUtils/Vmath.hpp>
17 
18 namespace Nektar
19 {
20  std::string LuoRudy91::className
22  "LuoRudy91",
24  "Luo Rudy 1991 model.");
25 
26 
27  /**
28  *
29  */
32  const MultiRegions::ExpListSharedPtr& pField):
33  CellModel(pSession, pField)
34  {
35  m_nq = pField->GetNpoints();
36 
37  m_nvar = 8;
38  m_gates.push_back(1);
39  m_gates.push_back(2);
40  m_gates.push_back(3);
41  m_gates.push_back(4);
42  m_gates.push_back(5);
43  m_gates.push_back(6);
44  m_concentrations.push_back(7);
45  }
46 
47 
48 
49 
50 
52  const Array<OneD, const Array<OneD, NekDouble> >&inarray,
53  Array<OneD, Array<OneD, NekDouble> >&outarray,
54  const NekDouble time)
55  {
56  for (unsigned int i = 0; i < m_nq; ++i)
57  {
58  // Inputs:
59  // Time units: millisecond
60  NekDouble var_chaste_interface__membrane__V = inarray[0][i];
61  // Units: millivolt; Initial value: -84.3801107371
62  NekDouble var_chaste_interface__fast_sodium_current_m_gate__m = inarray[1][i];
63  // Units: dimensionless; Initial value: 0.00171338077730188
64  NekDouble var_chaste_interface__fast_sodium_current_h_gate__h = inarray[2][i];
65  // Units: dimensionless; Initial value: 0.982660523699656
66  NekDouble var_chaste_interface__fast_sodium_current_j_gate__j = inarray[3][i];
67  // Units: dimensionless; Initial value: 0.989108212766685
68  NekDouble var_chaste_interface__slow_inward_current_d_gate__d = inarray[4][i];
69  // Units: dimensionless; Initial value: 0.00302126301779861
70  NekDouble var_chaste_interface__slow_inward_current_f_gate__f = inarray[5][i];
71  // Units: dimensionless; Initial value: 0.999967936476325
72  NekDouble var_chaste_interface__time_dependent_potassium_current_X_gate__X = inarray[6][i];
73  // Units: dimensionless; Initial value: 0.0417603108167287
74  NekDouble var_chaste_interface__intracellular_calcium_concentration__Cai = inarray[7][i];
75  // Units: millimolar; Initial value: 0.00017948816388306
76 
77 
78  // Mathematics
79  NekDouble d_dt_chaste_interface__membrane__V;
80  const NekDouble var_fast_sodium_current__j = var_chaste_interface__fast_sodium_current_j_gate__j; // dimensionless
81  const NekDouble var_fast_sodium_current__h = var_chaste_interface__fast_sodium_current_h_gate__h; // dimensionless
82  const NekDouble var_fast_sodium_current__m = var_chaste_interface__fast_sodium_current_m_gate__m; // dimensionless
83  const NekDouble var_fast_sodium_current__V = var_chaste_interface__membrane__V; // millivolt
84  const NekDouble var_slow_inward_current__d = var_chaste_interface__slow_inward_current_d_gate__d; // dimensionless
85  const NekDouble var_slow_inward_current__f = var_chaste_interface__slow_inward_current_f_gate__f; // dimensionless
86  const NekDouble var_slow_inward_current__V = var_chaste_interface__membrane__V; // millivolt
87  const NekDouble var_slow_inward_current__Cai = var_chaste_interface__intracellular_calcium_concentration__Cai; // millimolar
88  const NekDouble var_slow_inward_current__E_si = 7.7 - (13.0287 * log(var_slow_inward_current__Cai / 1.0)); // millivolt
89  const NekDouble var_slow_inward_current__i_si = 0.09 * var_slow_inward_current__d * var_slow_inward_current__f * (var_slow_inward_current__V - var_slow_inward_current__E_si); // microA_per_cm2
90  const NekDouble var_time_dependent_potassium_current__V = var_chaste_interface__membrane__V; // millivolt
91  const NekDouble var_time_dependent_potassium_current__X = var_chaste_interface__time_dependent_potassium_current_X_gate__X; // dimensionless
92 #if 0
93  const NekDouble var_fast_sodium_current_m_gate__m = var_fast_sodium_current__m; // dimensionless
94 #endif
95  const NekDouble var_fast_sodium_current_m_gate__V = var_fast_sodium_current__V; // millivolt
96  const NekDouble var_fast_sodium_current_m_gate__alpha_m = (0.32 * (var_fast_sodium_current_m_gate__V + 47.13)) / (1.0 - exp((-0.1) * (var_fast_sodium_current_m_gate__V + 47.13))); // per_millisecond
97  const NekDouble var_fast_sodium_current_m_gate__beta_m = 0.08 * exp((-var_fast_sodium_current_m_gate__V) / 11.0); // per_millisecond
98 #if 0
99  const NekDouble var_fast_sodium_current_m_gate__d_m_d_environment__time = (var_fast_sodium_current_m_gate__alpha_m * (1.0 - var_fast_sodium_current_m_gate__m)) - (var_fast_sodium_current_m_gate__beta_m * var_fast_sodium_current_m_gate__m); // per_millisecond
100  const NekDouble var_fast_sodium_current__fast_sodium_current_m_gate__d_m_d_environment__time = var_fast_sodium_current_m_gate__d_m_d_environment__time; // per_millisecond
101 #endif
102  const NekDouble var_fast_sodium_current_h_gate__V = var_fast_sodium_current__V; // millivolt
103  const NekDouble var_fast_sodium_current_h_gate__beta_h = (var_fast_sodium_current_h_gate__V < (-40.0)) ? ((3.56 * exp(0.079 * var_fast_sodium_current_h_gate__V)) + (310000.0 * exp(0.35 * var_fast_sodium_current_h_gate__V))) : (1.0 / (0.13 * (1.0 + exp((var_fast_sodium_current_h_gate__V + 10.66) / (-11.1))))); // per_millisecond
104  const NekDouble var_fast_sodium_current_h_gate__alpha_h = (var_fast_sodium_current_h_gate__V < (-40.0)) ? (0.135 * exp((80.0 + var_fast_sodium_current_h_gate__V) / (-6.8))) : 0.0; // per_millisecond
105 #if 0
106  const NekDouble var_fast_sodium_current_h_gate__h = var_fast_sodium_current__h; // dimensionless
107  const NekDouble var_fast_sodium_current_h_gate__d_h_d_environment__time = (var_fast_sodium_current_h_gate__alpha_h * (1.0 - var_fast_sodium_current_h_gate__h)) - (var_fast_sodium_current_h_gate__beta_h * var_fast_sodium_current_h_gate__h); // per_millisecond
108  const NekDouble var_fast_sodium_current__fast_sodium_current_h_gate__d_h_d_environment__time = var_fast_sodium_current_h_gate__d_h_d_environment__time; // per_millisecond
109 #endif
110  const NekDouble var_fast_sodium_current_j_gate__V = var_fast_sodium_current__V; // millivolt
111  const NekDouble var_fast_sodium_current_j_gate__alpha_j = (var_fast_sodium_current_j_gate__V < (-40.0)) ? (((((-127140.0) * exp(0.2444 * var_fast_sodium_current_j_gate__V)) - (3.474e-05 * exp((-0.04391) * var_fast_sodium_current_j_gate__V))) * (var_fast_sodium_current_j_gate__V + 37.78)) / (1.0 + exp(0.311 * (var_fast_sodium_current_j_gate__V + 79.23)))) : 0.0; // per_millisecond
112  const NekDouble var_fast_sodium_current_j_gate__beta_j = (var_fast_sodium_current_j_gate__V < (-40.0)) ? ((0.1212 * exp((-0.01052) * var_fast_sodium_current_j_gate__V)) / (1.0 + exp((-0.1378) * (var_fast_sodium_current_j_gate__V + 40.14)))) : ((0.3 * exp((-2.535e-07) * var_fast_sodium_current_j_gate__V)) / (1.0 + exp((-0.1) * (var_fast_sodium_current_j_gate__V + 32.0)))); // per_millisecond
113 #if 0
114  const NekDouble var_fast_sodium_current_j_gate__j = var_fast_sodium_current__j; // dimensionless
115  const NekDouble var_fast_sodium_current_j_gate__d_j_d_environment__time = (var_fast_sodium_current_j_gate__alpha_j * (1.0 - var_fast_sodium_current_j_gate__j)) - (var_fast_sodium_current_j_gate__beta_j * var_fast_sodium_current_j_gate__j); // per_millisecond
116  const NekDouble var_fast_sodium_current__fast_sodium_current_j_gate__d_j_d_environment__time = var_fast_sodium_current_j_gate__d_j_d_environment__time; // per_millisecond
117 #endif
118  const NekDouble var_slow_inward_current_d_gate__V = var_slow_inward_current__V; // millivolt
119  const NekDouble var_slow_inward_current_d_gate__alpha_d = (0.095 * exp((-0.01) * (var_slow_inward_current_d_gate__V - 5.0))) / (1.0 + exp((-0.072) * (var_slow_inward_current_d_gate__V - 5.0))); // per_millisecond
120 #if 0
121  const NekDouble var_slow_inward_current_d_gate__d = var_slow_inward_current__d; // dimensionless
122 #endif
123  const NekDouble var_slow_inward_current_d_gate__beta_d = (0.07 * exp((-0.017) * (var_slow_inward_current_d_gate__V + 44.0))) / (1.0 + exp(0.05 * (var_slow_inward_current_d_gate__V + 44.0))); // per_millisecond
124 #if 0
125  const NekDouble var_slow_inward_current_d_gate__d_d_d_environment__time = (var_slow_inward_current_d_gate__alpha_d * (1.0 - var_slow_inward_current_d_gate__d)) - (var_slow_inward_current_d_gate__beta_d * var_slow_inward_current_d_gate__d); // per_millisecond
126  const NekDouble var_slow_inward_current__slow_inward_current_d_gate__d_d_d_environment__time = var_slow_inward_current_d_gate__d_d_d_environment__time; // per_millisecond
127  const NekDouble var_slow_inward_current_f_gate__f = var_slow_inward_current__f; // dimensionless
128 #endif
129  const NekDouble var_slow_inward_current_f_gate__V = var_slow_inward_current__V; // millivolt
130  const NekDouble var_slow_inward_current_f_gate__alpha_f = (0.012 * exp((-0.008) * (var_slow_inward_current_f_gate__V + 28.0))) / (1.0 + exp(0.15 * (var_slow_inward_current_f_gate__V + 28.0))); // per_millisecond
131  const NekDouble var_slow_inward_current_f_gate__beta_f = (0.0065 * exp((-0.02) * (var_slow_inward_current_f_gate__V + 30.0))) / (1.0 + exp((-0.2) * (var_slow_inward_current_f_gate__V + 30.0))); // per_millisecond
132 #if 0
133  const NekDouble var_slow_inward_current_f_gate__d_f_d_environment__time = (var_slow_inward_current_f_gate__alpha_f * (1.0 - var_slow_inward_current_f_gate__f)) - (var_slow_inward_current_f_gate__beta_f * var_slow_inward_current_f_gate__f); // per_millisecond
134  const NekDouble var_slow_inward_current__slow_inward_current_f_gate__d_f_d_environment__time = var_slow_inward_current_f_gate__d_f_d_environment__time; // per_millisecond
135  const NekDouble var_time_dependent_potassium_current_X_gate__X = var_time_dependent_potassium_current__X; // dimensionless
136 #endif
137  const NekDouble var_time_dependent_potassium_current_X_gate__V = var_time_dependent_potassium_current__V; // millivolt
138  const NekDouble var_time_dependent_potassium_current_X_gate__beta_X = (0.0013 * exp((-0.06) * (var_time_dependent_potassium_current_X_gate__V + 20.0))) / (1.0 + exp((-0.04) * (var_time_dependent_potassium_current_X_gate__V + 20.0))); // per_millisecond
139  const NekDouble var_time_dependent_potassium_current_X_gate__alpha_X = (0.0005 * exp(0.083 * (var_time_dependent_potassium_current_X_gate__V + 50.0))) / (1.0 + exp(0.057 * (var_time_dependent_potassium_current_X_gate__V + 50.0))); // per_millisecond
140 #if 0
141  const NekDouble var_time_dependent_potassium_current_X_gate__d_X_d_environment__time = (var_time_dependent_potassium_current_X_gate__alpha_X * (1.0 - var_time_dependent_potassium_current_X_gate__X)) - (var_time_dependent_potassium_current_X_gate__beta_X * var_time_dependent_potassium_current_X_gate__X); // per_millisecond
142  const NekDouble var_time_dependent_potassium_current__time_dependent_potassium_current_X_gate__d_X_d_environment__time = var_time_dependent_potassium_current_X_gate__d_X_d_environment__time; // per_millisecond
143 #endif
144  const NekDouble var_intracellular_calcium_concentration__Cai = var_chaste_interface__intracellular_calcium_concentration__Cai; // millimolar
145  const NekDouble var_intracellular_calcium_concentration__i_si = var_slow_inward_current__i_si; // microA_per_cm2
146  const NekDouble var_intracellular_calcium_concentration__d_Cai_d_environment__time = (((-0.0001) / 1.0) * var_intracellular_calcium_concentration__i_si) + (0.07 * (0.0001 - var_intracellular_calcium_concentration__Cai)); // 'millimole per litre per millisecond'
147 #if 0
148  const NekDouble var_chaste_interface__fast_sodium_current_m_gate__d_m_d_environment__time = var_fast_sodium_current__fast_sodium_current_m_gate__d_m_d_environment__time; // per_millisecond
149  const NekDouble var_chaste_interface__fast_sodium_current_h_gate__d_h_d_environment__time = var_fast_sodium_current__fast_sodium_current_h_gate__d_h_d_environment__time; // per_millisecond
150  const NekDouble var_chaste_interface__fast_sodium_current_j_gate__d_j_d_environment__time = var_fast_sodium_current__fast_sodium_current_j_gate__d_j_d_environment__time; // per_millisecond
151  const NekDouble var_chaste_interface__slow_inward_current_d_gate__d_d_d_environment__time = var_slow_inward_current__slow_inward_current_d_gate__d_d_d_environment__time; // per_millisecond
152  const NekDouble var_chaste_interface__slow_inward_current_f_gate__d_f_d_environment__time = var_slow_inward_current__slow_inward_current_f_gate__d_f_d_environment__time; // per_millisecond
153  const NekDouble var_chaste_interface__time_dependent_potassium_current_X_gate__d_X_d_environment__time = var_time_dependent_potassium_current__time_dependent_potassium_current_X_gate__d_X_d_environment__time; // per_millisecond
154 #endif
155  const NekDouble var_chaste_interface__intracellular_calcium_concentration__d_Cai_d_environment__time = var_intracellular_calcium_concentration__d_Cai_d_environment__time; // ___units_16
156 #if 0
157  const NekDouble d_dt_chaste_interface__fast_sodium_current_m_gate__m = var_chaste_interface__fast_sodium_current_m_gate__d_m_d_environment__time; // per_millisecond
158  const NekDouble d_dt_chaste_interface__fast_sodium_current_h_gate__h = var_chaste_interface__fast_sodium_current_h_gate__d_h_d_environment__time; // per_millisecond
159  const NekDouble d_dt_chaste_interface__fast_sodium_current_j_gate__j = var_chaste_interface__fast_sodium_current_j_gate__d_j_d_environment__time; // per_millisecond
160  const NekDouble d_dt_chaste_interface__slow_inward_current_d_gate__d = var_chaste_interface__slow_inward_current_d_gate__d_d_d_environment__time; // per_millisecond
161  const NekDouble d_dt_chaste_interface__slow_inward_current_f_gate__f = var_chaste_interface__slow_inward_current_f_gate__d_f_d_environment__time; // per_millisecond
162  const NekDouble d_dt_chaste_interface__time_dependent_potassium_current_X_gate__X = var_chaste_interface__time_dependent_potassium_current_X_gate__d_X_d_environment__time; // per_millisecond
163 #endif
164  const NekDouble d_dt_chaste_interface__intracellular_calcium_concentration__Cai = var_chaste_interface__intracellular_calcium_concentration__d_Cai_d_environment__time; // 'millimole per litre per millisecond'
165 
166  const NekDouble var_membrane__R = 8314.0; // joule_per_kilomole_kelvin
167  const NekDouble var_membrane__T = 310.0; // kelvin
168  const NekDouble var_membrane__F = 96484.6; // coulomb_per_mole
169  const NekDouble var_membrane__C = 1.0; // microF_per_cm2
170  const NekDouble var_chaste_interface__membrane__I_stim = 0.0;
171  const NekDouble var_membrane__I_stim = var_chaste_interface__membrane__I_stim; // microA_per_cm2
172  const NekDouble var_fast_sodium_current__g_Na = 23.0; // milliS_per_cm2
173  const NekDouble var_fast_sodium_current__R = var_membrane__R; // joule_per_kilomole_kelvin
174  const NekDouble var_fast_sodium_current__F = var_membrane__F; // coulomb_per_mole
175  const NekDouble var_ionic_concentrations__Nao = 140.0; // millimolar
176  const NekDouble var_fast_sodium_current__Nao = var_ionic_concentrations__Nao; // millimolar
177  const NekDouble var_ionic_concentrations__Nai = 18.0; // millimolar
178  const NekDouble var_fast_sodium_current__Nai = var_ionic_concentrations__Nai; // millimolar
179  const NekDouble var_fast_sodium_current__T = var_membrane__T; // kelvin
180  const NekDouble var_fast_sodium_current__E_Na = ((var_fast_sodium_current__R * var_fast_sodium_current__T) / var_fast_sodium_current__F) * log(var_fast_sodium_current__Nao / var_fast_sodium_current__Nai); // millivolt
181  const NekDouble var_fast_sodium_current__i_Na = var_fast_sodium_current__g_Na * pow(var_fast_sodium_current__m, 3.0) * var_fast_sodium_current__h * var_fast_sodium_current__j * (var_fast_sodium_current__V - var_fast_sodium_current__E_Na); // microA_per_cm2
182  const NekDouble var_membrane__i_Na = var_fast_sodium_current__i_Na; // microA_per_cm2
183  const NekDouble var_membrane__i_si = var_slow_inward_current__i_si; // microA_per_cm2
184  const NekDouble var_time_dependent_potassium_current_Xi_gate__V = var_time_dependent_potassium_current__V; // millivolt
185  const NekDouble var_time_dependent_potassium_current_Xi_gate__Xi = (var_time_dependent_potassium_current_Xi_gate__V > (-100.0)) ? ((2.837 * (exp(0.04 * (var_time_dependent_potassium_current_Xi_gate__V + 77.0)) - 1.0)) / ((var_time_dependent_potassium_current_Xi_gate__V + 77.0) * exp(0.04 * (var_time_dependent_potassium_current_Xi_gate__V + 35.0)))) : 1.0; // dimensionless
186  const NekDouble var_time_dependent_potassium_current__Xi = var_time_dependent_potassium_current_Xi_gate__Xi; // dimensionless
187  const NekDouble var_ionic_concentrations__Ko = 5.4; // millimolar
188  const NekDouble var_time_dependent_potassium_current__Ko = var_ionic_concentrations__Ko; // millimolar
189  const NekDouble var_time_dependent_potassium_current__g_K = 0.282 * sqrt(var_time_dependent_potassium_current__Ko / 5.4); // milliS_per_cm2
190  const NekDouble var_time_dependent_potassium_current__PR_NaK = 0.01833; // dimensionless
191  const NekDouble var_time_dependent_potassium_current__F = var_membrane__F; // coulomb_per_mole
192  const NekDouble var_time_dependent_potassium_current__Nao = var_ionic_concentrations__Nao; // millimolar
193  const NekDouble var_ionic_concentrations__Ki = 145.0; // millimolar
194  const NekDouble var_time_dependent_potassium_current__Ki = var_ionic_concentrations__Ki; // millimolar
195  const NekDouble var_time_dependent_potassium_current__Nai = var_ionic_concentrations__Nai; // millimolar
196  const NekDouble var_time_dependent_potassium_current__T = var_membrane__T; // kelvin
197  const NekDouble var_time_dependent_potassium_current__R = var_membrane__R; // joule_per_kilomole_kelvin
198  const NekDouble var_time_dependent_potassium_current__E_K = ((var_time_dependent_potassium_current__R * var_time_dependent_potassium_current__T) / var_time_dependent_potassium_current__F) * log((var_time_dependent_potassium_current__Ko + (var_time_dependent_potassium_current__PR_NaK * var_time_dependent_potassium_current__Nao)) / (var_time_dependent_potassium_current__Ki + (var_time_dependent_potassium_current__PR_NaK * var_time_dependent_potassium_current__Nai))); // millivolt
199  const NekDouble var_time_dependent_potassium_current__i_K = var_time_dependent_potassium_current__g_K * var_time_dependent_potassium_current__X * var_time_dependent_potassium_current__Xi * (var_time_dependent_potassium_current__V - var_time_dependent_potassium_current__E_K); // microA_per_cm2
200  const NekDouble var_membrane__i_K = var_time_dependent_potassium_current__i_K; // microA_per_cm2
201  const NekDouble var_time_independent_potassium_current__V = var_chaste_interface__membrane__V; // millivolt
202  const NekDouble var_time_independent_potassium_current_K1_gate__V = var_time_independent_potassium_current__V; // millivolt
203  const NekDouble var_time_independent_potassium_current__Ki = var_ionic_concentrations__Ki; // millimolar
204  const NekDouble var_time_independent_potassium_current__R = var_membrane__R; // joule_per_kilomole_kelvin
205  const NekDouble var_time_independent_potassium_current__F = var_membrane__F; // coulomb_per_mole
206  const NekDouble var_time_independent_potassium_current__Ko = var_ionic_concentrations__Ko; // millimolar
207  const NekDouble var_time_independent_potassium_current__T = var_membrane__T; // kelvin
208  const NekDouble var_time_independent_potassium_current__E_K1 = ((var_time_independent_potassium_current__R * var_time_independent_potassium_current__T) / var_time_independent_potassium_current__F) * log(var_time_independent_potassium_current__Ko / var_time_independent_potassium_current__Ki); // millivolt
209  const NekDouble var_time_independent_potassium_current_K1_gate__E_K1 = var_time_independent_potassium_current__E_K1; // millivolt
210  const NekDouble var_time_independent_potassium_current_K1_gate__beta_K1 = ((0.49124 * exp(0.08032 * ((var_time_independent_potassium_current_K1_gate__V + 5.476) - var_time_independent_potassium_current_K1_gate__E_K1))) + (1.0 * exp(0.06175 * (var_time_independent_potassium_current_K1_gate__V - (var_time_independent_potassium_current_K1_gate__E_K1 + 594.31))))) / (1.0 + exp((-0.5143) * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K1) + 4.753))); // per_millisecond
211  const NekDouble var_time_independent_potassium_current_K1_gate__alpha_K1 = 1.02 / (1.0 + exp(0.2385 * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K1) - 59.215))); // per_millisecond
212  const NekDouble var_time_independent_potassium_current_K1_gate__K1_infinity = var_time_independent_potassium_current_K1_gate__alpha_K1 / (var_time_independent_potassium_current_K1_gate__alpha_K1 + var_time_independent_potassium_current_K1_gate__beta_K1); // dimensionless
213  const NekDouble var_time_independent_potassium_current__K1_infinity = var_time_independent_potassium_current_K1_gate__K1_infinity; // dimensionless
214  const NekDouble var_time_independent_potassium_current__g_K1 = 0.6047 * sqrt(var_time_independent_potassium_current__Ko / 5.4); // milliS_per_cm2
215  const NekDouble var_time_independent_potassium_current__i_K1 = var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K1_infinity * (var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K1); // microA_per_cm2
216  const NekDouble var_membrane__i_K1 = var_time_independent_potassium_current__i_K1; // microA_per_cm2
217  const NekDouble var_plateau_potassium_current__g_Kp = 0.0183; // milliS_per_cm2
218  const NekDouble var_plateau_potassium_current__V = var_chaste_interface__membrane__V; // millivolt
219  const NekDouble var_plateau_potassium_current__Kp = 1.0 / (1.0 + exp((7.488 - var_plateau_potassium_current__V) / 5.98)); // dimensionless
220  const NekDouble var_plateau_potassium_current__E_K1 = var_time_independent_potassium_current__E_K1; // millivolt
221  const NekDouble var_plateau_potassium_current__E_Kp = var_plateau_potassium_current__E_K1; // millivolt
222  const NekDouble var_plateau_potassium_current__i_Kp = var_plateau_potassium_current__g_Kp * var_plateau_potassium_current__Kp * (var_plateau_potassium_current__V - var_plateau_potassium_current__E_Kp); // microA_per_cm2
223  const NekDouble var_membrane__i_Kp = var_plateau_potassium_current__i_Kp; // microA_per_cm2
224  const NekDouble var_background_current__E_b = -59.87; // millivolt
225  const NekDouble var_background_current__g_b = 0.03921; // milliS_per_cm2
226  const NekDouble var_background_current__V = var_chaste_interface__membrane__V; // millivolt
227  const NekDouble var_background_current__i_b = var_background_current__g_b * (var_background_current__V - var_background_current__E_b); // microA_per_cm2
228  const NekDouble var_membrane__i_b = var_background_current__i_b; // microA_per_cm2
229  const NekDouble var_membrane__d_V_d_environment__time = ((-1.0) / var_membrane__C) * (var_membrane__I_stim + var_membrane__i_Na + var_membrane__i_si + var_membrane__i_K + var_membrane__i_K1 + var_membrane__i_Kp + var_membrane__i_b); // 'millivolt per millisecond'
230  const NekDouble var_chaste_interface__membrane__d_V_d_environment__time = var_membrane__d_V_d_environment__time; // ___units_1
231  d_dt_chaste_interface__membrane__V = var_chaste_interface__membrane__d_V_d_environment__time; // 'millivolt per millisecond'
232  const NekDouble m_inf = var_fast_sodium_current_m_gate__alpha_m/(var_fast_sodium_current_m_gate__alpha_m + var_fast_sodium_current_m_gate__beta_m);
233  const NekDouble m_tau = 1.0/(var_fast_sodium_current_m_gate__alpha_m + var_fast_sodium_current_m_gate__beta_m);
234  const NekDouble h_inf = var_fast_sodium_current_h_gate__alpha_h/(var_fast_sodium_current_h_gate__alpha_h + var_fast_sodium_current_h_gate__beta_h);
235  const NekDouble h_tau = 1.0/(var_fast_sodium_current_h_gate__alpha_h + var_fast_sodium_current_h_gate__beta_h);
236  const NekDouble j_inf = var_fast_sodium_current_j_gate__alpha_j/(var_fast_sodium_current_j_gate__alpha_j + var_fast_sodium_current_j_gate__beta_j);
237  const NekDouble j_tau = 1.0/(var_fast_sodium_current_j_gate__alpha_j + var_fast_sodium_current_j_gate__beta_j);
238  const NekDouble d_inf = var_slow_inward_current_d_gate__alpha_d/(var_slow_inward_current_d_gate__alpha_d + var_slow_inward_current_d_gate__beta_d);
239  const NekDouble d_tau = 1.0/(var_slow_inward_current_d_gate__alpha_d + var_slow_inward_current_d_gate__beta_d);
240  const NekDouble f_inf = var_slow_inward_current_f_gate__alpha_f/(var_slow_inward_current_f_gate__alpha_f + var_slow_inward_current_f_gate__beta_f);
241  const NekDouble f_tau = 1.0/(var_slow_inward_current_f_gate__alpha_f + var_slow_inward_current_f_gate__beta_f);
242  const NekDouble X_inf = var_time_dependent_potassium_current_X_gate__alpha_X/(var_time_dependent_potassium_current_X_gate__alpha_X + var_time_dependent_potassium_current_X_gate__beta_X);
243  const NekDouble X_tau = 1.0/(var_time_dependent_potassium_current_X_gate__alpha_X + var_time_dependent_potassium_current_X_gate__beta_X);
244 
245  outarray[0][i] = d_dt_chaste_interface__membrane__V;
246  outarray[1][i] = m_inf;
247  m_gates_tau[0][i] = m_tau;
248  outarray[2][i] = h_inf;
249  m_gates_tau[1][i] = h_tau;
250  outarray[3][i] = j_inf;
251  m_gates_tau[2][i] = j_tau;
252  outarray[4][i] = d_inf;
253  m_gates_tau[3][i] = d_tau;
254  outarray[5][i] = f_inf;
255  m_gates_tau[4][i] = f_tau;
256  outarray[6][i] = X_inf;
257  m_gates_tau[5][i] = X_tau;
258  outarray[7][i] = d_dt_chaste_interface__intracellular_calcium_concentration__Cai;
259  }
260  }
261 
262 
263  /**
264  *
265  */
267  {
268  SolverUtils::AddSummaryItem(s, "Cell model", "Luo-Rudy 1991");
269  }
270 
271 
272  /**
273  *
274  */
276  {
277  Vmath::Fill(m_nq, -84.3801107371, m_cellSol[0], 1);
278  Vmath::Fill(m_nq, 0.00171338077730188, m_cellSol[1], 1);
279  Vmath::Fill(m_nq, 0.982660523699656, m_cellSol[2], 1);
280  Vmath::Fill(m_nq, 0.989108212766685, m_cellSol[3], 1);
281  Vmath::Fill(m_nq, 0.00017948816388306, m_cellSol[4], 1);
282  Vmath::Fill(m_nq, 0.00302126301779861, m_cellSol[5], 1);
283  Vmath::Fill(m_nq, 0.999967936476325, m_cellSol[6], 1);
284  Vmath::Fill(m_nq, 0.0417603108167287, m_cellSol[7], 1);
285  }
286 }
287 
int m_nq
Number of physical points.
Definition: CellModel.h:117
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition: Vmath.cpp:46
Cell model base class.
Definition: CellModel.h:65
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: CellModel.h:51
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:50
static CellModelSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField)
Creates an instance of this class.
Definition: LuoRudy91.h:47
virtual void v_SetInitialConditions()
Set initial conditions for the cell model.
Definition: LuoRudy91.cpp:275
std::vector< int > m_concentrations
Indices of cell model variables which are concentrations.
Definition: CellModel.h:139
Array< OneD, Array< OneD, NekDouble > > m_gates_tau
Storage for gate tau values.
Definition: CellModel.h:143
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
Definition: ExpList.h:1340
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
Definition: Misc.cpp:50
Array< OneD, Array< OneD, NekDouble > > m_cellSol
Cell model solution variables.
Definition: CellModel.h:126
int m_nvar
Number of variables in cell model (inc. transmembrane voltage)
Definition: CellModel.h:119
std::vector< int > m_gates
Indices of cell model variables which are gates.
Definition: CellModel.h:141
double NekDouble
virtual void v_GenerateSummary(SummaryList &s)
Prints a summary of the model parameters.
Definition: LuoRudy91.cpp:266
static std::string className
Name of class.
Definition: LuoRudy91.h:55
CellModelFactory & GetCellModelFactory()
Definition: CellModel.cpp:45
LuoRudy91(const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField)
Constructor.
Definition: LuoRudy91.cpp:30
virtual void v_Update(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Computes the reaction terms $f(u,v)$ and $g(u,v)$.
Definition: LuoRudy91.cpp:51
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:215