Nektar++
Fox02.cpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: Fox02.cpp
4//
5// For more information, please see: http://www.nektar.info
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: Fox 2002 cell model.
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#include <iostream>
36#include <string>
37// #include <LibUtilities/BasicUtils/Vmath.hpp>
39
40namespace Nektar
41{
43 "Fox02", Fox02::create, "Fox 2002 cell model.");
44
45/**
46 *
47 */
50 : CellModel(pSession, pField)
51{
52 pSession->LoadParameter("chi", m_chi);
53 pSession->LoadParameter("sigmai", m_sigmai);
54
55 m_nvar = 13;
56
57 m_gates.push_back(1);
58 m_gates.push_back(2);
59 m_gates.push_back(3);
60 m_gates.push_back(4);
61 m_gates.push_back(5);
62 m_gates.push_back(6);
63 m_gates.push_back(7);
64 m_gates.push_back(8);
65 m_gates.push_back(9);
66 m_gates.push_back(10);
67 m_concentrations.push_back(11);
68 m_concentrations.push_back(12);
69}
70
73 [[maybe_unused]] const NekDouble time)
74{
75 for (size_t i = 0; i < m_nq; ++i)
76 {
77
78 // Inputs:
79 // Time units: millisecond
80 NekDouble var_chaste_interface__membrane__V = inarray[0][i];
81 // Units: millivolt; Initial value: -94.7
82 NekDouble var_chaste_interface__fast_sodium_current_m_gate__m =
83 inarray[1][i];
84 // Units: dimensionless; Initial value: 0.00024676
85 NekDouble var_chaste_interface__fast_sodium_current_h_gate__h =
86 inarray[2][i];
87 // Units: dimensionless; Initial value: 0.99869
88 NekDouble var_chaste_interface__fast_sodium_current_j_gate__j =
89 inarray[3][i];
90 // Units: dimensionless; Initial value: 0.99887
92 var_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr =
93 inarray[4][i];
94 // Units: dimensionless; Initial value: 0.229
96 var_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks =
97 inarray[5][i];
98 // Units: dimensionless; Initial value: 0.0001
100 var_chaste_interface__transient_outward_potassium_current_X_to_gate__X_to =
101 inarray[6][i];
102 // Units: dimensionless; Initial value: 0.00003742
104 var_chaste_interface__transient_outward_potassium_current_Y_to_gate__Y_to =
105 inarray[7][i];
106 // Units: dimensionless; Initial value: 1
107 NekDouble var_chaste_interface__L_type_Ca_current_f_gate__f =
108 inarray[8][i];
109 // Units: dimensionless; Initial value: 0.983
110 NekDouble var_chaste_interface__L_type_Ca_current_d_gate__d =
111 inarray[9][i];
112 // Units: dimensionless; Initial value: 0.0001
113 NekDouble var_chaste_interface__L_type_Ca_current_f_Ca_gate__f_Ca =
114 inarray[10][i];
115 // Units: dimensionless; Initial value: 0.942
116 NekDouble var_chaste_interface__calcium_dynamics__Ca_i = inarray[11][i];
117 // Units: micromolar; Initial value: 0.0472
118 NekDouble var_chaste_interface__calcium_dynamics__Ca_SR =
119 inarray[12][i];
120 // Units: micromolar; Initial value: 320
121
122 // Mathematics
123 NekDouble d_dt_chaste_interface__membrane__V;
124 const NekDouble var_membrane__R = 8.314; // joule_per_mole_kelvin
125 const NekDouble var_membrane__T = 310.0; // kelvin
126 const NekDouble var_membrane__F = 96.5; // coulomb_per_millimole
127 const NekDouble var_fast_sodium_current__j =
128 var_chaste_interface__fast_sodium_current_j_gate__j; // dimensionless
129 const NekDouble var_fast_sodium_current__h =
130 var_chaste_interface__fast_sodium_current_h_gate__h; // dimensionless
131 const NekDouble var_fast_sodium_current__m =
132 var_chaste_interface__fast_sodium_current_m_gate__m; // dimensionless
133 const NekDouble var_fast_sodium_current__V =
134 var_chaste_interface__membrane__V; // millivolt
135 const NekDouble var_standard_ionic_concentrations__Na_o =
136 138.0; // millimolar
137 const NekDouble var_standard_ionic_concentrations__Na_i =
138 10.0; // millimolar
139 const NekDouble var_L_type_Ca_current__f =
140 var_chaste_interface__L_type_Ca_current_f_gate__f; // dimensionless
141 const NekDouble var_L_type_Ca_current__f_Ca =
142 var_chaste_interface__L_type_Ca_current_f_Ca_gate__f_Ca; // dimensionless
143 const NekDouble var_L_type_Ca_current__F =
144 var_membrane__F; // coulomb_per_millimole
145 const NekDouble var_L_type_Ca_current__P_Ca =
146 1.26e-05; // cm_per_millisecond
147 const NekDouble var_L_type_Ca_current__V =
148 var_chaste_interface__membrane__V; // millivolt
149 const NekDouble var_L_type_Ca_current__C_sc = 1.0; // microF_per_cm2
150 const NekDouble var_L_type_Ca_current__T = var_membrane__T; // kelvin
151 const NekDouble var_standard_ionic_concentrations__Ca_o =
152 2000.0; // micromolar
153 const NekDouble var_L_type_Ca_current__Ca_o =
154 var_standard_ionic_concentrations__Ca_o; // micromolar
155 const NekDouble var_L_type_Ca_current__R =
156 var_membrane__R; // joule_per_mole_kelvin
157 const NekDouble var_L_type_Ca_current__Ca_i =
158 var_chaste_interface__calcium_dynamics__Ca_i; // micromolar
159 const NekDouble var_L_type_Ca_current__i_Ca_max =
160 ((((var_L_type_Ca_current__P_Ca / var_L_type_Ca_current__C_sc) *
161 4.0 * var_L_type_Ca_current__V *
162 pow(var_L_type_Ca_current__F, 2.0)) /
163 (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) *
164 ((var_L_type_Ca_current__Ca_i *
165 exp((2.0 * var_L_type_Ca_current__V * var_L_type_Ca_current__F) /
166 (var_L_type_Ca_current__R * var_L_type_Ca_current__T))) -
167 (0.341 * var_L_type_Ca_current__Ca_o))) /
168 (exp((2.0 * var_L_type_Ca_current__V * var_L_type_Ca_current__F) /
169 (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) -
170 1.0); // microA_per_microF
171 const NekDouble var_L_type_Ca_current__d =
172 var_chaste_interface__L_type_Ca_current_d_gate__d; // dimensionless
173 const NekDouble var_L_type_Ca_current__i_Ca =
174 var_L_type_Ca_current__i_Ca_max * var_L_type_Ca_current__f *
175 var_L_type_Ca_current__d *
176 var_L_type_Ca_current__f_Ca; // microA_per_microF
177 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__V =
178 var_chaste_interface__membrane__V; // millivolt
179 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__X_kr =
180 var_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr; // dimensionless
181 const NekDouble var_slow_activating_delayed_rectifiyer_K_current__V =
182 var_chaste_interface__membrane__V; // millivolt
183 const NekDouble var_slow_activating_delayed_rectifiyer_K_current__X_ks =
184 var_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks; // dimensionless
185 const NekDouble var_transient_outward_potassium_current__Y_to =
186 var_chaste_interface__transient_outward_potassium_current_Y_to_gate__Y_to; // dimensionless
187 const NekDouble var_transient_outward_potassium_current__X_to =
188 var_chaste_interface__transient_outward_potassium_current_X_to_gate__X_to; // dimensionless
189 const NekDouble var_transient_outward_potassium_current__V =
190 var_chaste_interface__membrane__V; // millivolt
191 const NekDouble var_Na_Ca_exchanger__Na_o =
192 var_standard_ionic_concentrations__Na_o; // millimolar
193 const NekDouble var_Na_Ca_exchanger__K_sat = 0.2; // dimensionless
194 const NekDouble var_Na_Ca_exchanger__Ca_i =
195 var_chaste_interface__calcium_dynamics__Ca_i; // micromolar
196 const NekDouble var_Na_Ca_exchanger__K_mNa = 87.5; // millimolar
197 const NekDouble var_Na_Ca_exchanger__Ca_o =
198 var_standard_ionic_concentrations__Ca_o; // micromolar
199 const NekDouble var_Na_Ca_exchanger__K_NaCa =
200 1500.0; // microA_per_microF
201 const NekDouble var_Na_Ca_exchanger__T = var_membrane__T; // kelvin
202 const NekDouble var_Na_Ca_exchanger__V =
203 var_chaste_interface__membrane__V; // millivolt
204 const NekDouble var_Na_Ca_exchanger__Na_i =
205 var_standard_ionic_concentrations__Na_i; // millimolar
206 const NekDouble var_Na_Ca_exchanger__eta = 0.35; // dimensionless
207 const NekDouble var_Na_Ca_exchanger__K_mCa = 1380.0; // micromolar
208 const NekDouble var_Na_Ca_exchanger__F =
209 var_membrane__F; // coulomb_per_millimole
210 const NekDouble var_Na_Ca_exchanger__R =
211 var_membrane__R; // joule_per_mole_kelvin
212 const NekDouble var_Na_Ca_exchanger__i_NaCa =
213 (var_Na_Ca_exchanger__K_NaCa /
214 ((pow(var_Na_Ca_exchanger__K_mNa, 3.0) +
215 pow(var_Na_Ca_exchanger__Na_o, 3.0)) *
216 (var_Na_Ca_exchanger__K_mCa + var_Na_Ca_exchanger__Ca_o) *
217 (1.0 +
218 (var_Na_Ca_exchanger__K_sat *
219 exp(((var_Na_Ca_exchanger__eta - 1.0) * var_Na_Ca_exchanger__V *
220 var_Na_Ca_exchanger__F) /
221 (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)))))) *
222 ((exp((var_Na_Ca_exchanger__eta * var_Na_Ca_exchanger__V *
223 var_Na_Ca_exchanger__F) /
224 (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) *
225 pow(var_Na_Ca_exchanger__Na_i, 3.0) * var_Na_Ca_exchanger__Ca_o) -
226 (exp(((var_Na_Ca_exchanger__eta - 1.0) * var_Na_Ca_exchanger__V *
227 var_Na_Ca_exchanger__F) /
228 (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) *
229 pow(var_Na_Ca_exchanger__Na_o, 3.0) *
230 var_Na_Ca_exchanger__Ca_i)); // microA_per_microF
231 const NekDouble var_sarcolemmal_calcium_pump__Ca_i =
232 var_chaste_interface__calcium_dynamics__Ca_i; // micromolar
233 const NekDouble var_sarcolemmal_calcium_pump__i_pCa_max =
234 0.05; // microA_per_microF
235 const NekDouble var_sarcolemmal_calcium_pump__K_mpCa =
236 0.05; // micromolar
237 const NekDouble var_sarcolemmal_calcium_pump__i_p_Ca =
238 (var_sarcolemmal_calcium_pump__i_pCa_max *
239 var_sarcolemmal_calcium_pump__Ca_i) /
240 (var_sarcolemmal_calcium_pump__K_mpCa +
241 var_sarcolemmal_calcium_pump__Ca_i); // microA_per_microF
242 const NekDouble var_calcium_background_current__R =
243 var_membrane__R; // joule_per_mole_kelvin
244 const NekDouble var_calcium_background_current__Ca_i =
245 var_chaste_interface__calcium_dynamics__Ca_i; // micromolar
246 const NekDouble var_calcium_background_current__F =
247 var_membrane__F; // coulomb_per_millimole
248 const NekDouble var_calcium_background_current__T =
249 var_membrane__T; // kelvin
250 const NekDouble var_calcium_background_current__Ca_o =
251 var_standard_ionic_concentrations__Ca_o; // micromolar
252 const NekDouble var_calcium_background_current__E_Ca =
253 ((var_calcium_background_current__R *
254 var_calcium_background_current__T) /
255 (2.0 * var_calcium_background_current__F)) *
256 log(var_calcium_background_current__Ca_o /
257 var_calcium_background_current__Ca_i); // millivolt
258 const NekDouble var_calcium_background_current__g_Cab =
259 0.0003842; // milliS_per_microF
260 const NekDouble var_calcium_background_current__V =
261 var_chaste_interface__membrane__V; // millivolt
262 const NekDouble var_calcium_background_current__i_Ca_b =
263 var_calcium_background_current__g_Cab *
264 (var_calcium_background_current__V -
265 var_calcium_background_current__E_Ca); // microA_per_microF
266 const NekDouble var_fast_sodium_current_m_gate__m =
267 var_fast_sodium_current__m; // dimensionless
268 const NekDouble var_fast_sodium_current_m_gate__V =
269 var_fast_sodium_current__V; // millivolt
270 const NekDouble var_fast_sodium_current_m_gate__E0_m =
271 var_fast_sodium_current_m_gate__V + 47.13; // millivolt
272 const NekDouble var_fast_sodium_current_m_gate__alpha_m =
273 (0.32 * var_fast_sodium_current_m_gate__E0_m) /
274 (1.0 -
275 exp((-0.1) *
276 var_fast_sodium_current_m_gate__E0_m)); // per_millisecond
277 const NekDouble var_fast_sodium_current_m_gate__beta_m =
278 0.08 *
279 exp((-var_fast_sodium_current_m_gate__V) / 11.0); // per_millisecond
280 const NekDouble
281 var_fast_sodium_current_m_gate__d_m_d_environment__time =
282 (var_fast_sodium_current_m_gate__alpha_m *
283 (1.0 - var_fast_sodium_current_m_gate__m)) -
284 (var_fast_sodium_current_m_gate__beta_m *
285 var_fast_sodium_current_m_gate__m); // per_millisecond
286 const NekDouble
287 var_fast_sodium_current__fast_sodium_current_m_gate__d_m_d_environment__time =
288 var_fast_sodium_current_m_gate__d_m_d_environment__time; // per_millisecond
289 const NekDouble var_fast_sodium_current_h_gate__V =
290 var_fast_sodium_current__V; // millivolt
291 const NekDouble var_fast_sodium_current_h_gate__beta_h =
292 7.5 / (1.0 + exp((-0.1) * (var_fast_sodium_current_h_gate__V +
293 11.0))); // per_millisecond
294 const NekDouble var_fast_sodium_current_h_gate__alpha_h =
295 0.135 * exp((var_fast_sodium_current_h_gate__V + 80.0) /
296 (-6.8)); // per_millisecond
297 const NekDouble var_fast_sodium_current_h_gate__h =
298 var_fast_sodium_current__h; // dimensionless
299 const NekDouble
300 var_fast_sodium_current_h_gate__d_h_d_environment__time =
301 (var_fast_sodium_current_h_gate__alpha_h *
302 (1.0 - var_fast_sodium_current_h_gate__h)) -
303 (var_fast_sodium_current_h_gate__beta_h *
304 var_fast_sodium_current_h_gate__h); // per_millisecond
305 const NekDouble
306 var_fast_sodium_current__fast_sodium_current_h_gate__d_h_d_environment__time =
307 var_fast_sodium_current_h_gate__d_h_d_environment__time; // per_millisecond
308 const NekDouble var_fast_sodium_current_j_gate__V =
309 var_fast_sodium_current__V; // millivolt
310 const NekDouble var_fast_sodium_current_j_gate__alpha_j =
311 (0.175 *
312 exp((var_fast_sodium_current_j_gate__V + 100.0) / (-23.0))) /
313 (1.0 + exp(0.15 * (var_fast_sodium_current_j_gate__V +
314 79.0))); // per_millisecond
315 const NekDouble var_fast_sodium_current_j_gate__beta_j =
316 0.3 / (1.0 + exp((-0.1) * (var_fast_sodium_current_j_gate__V +
317 32.0))); // per_millisecond
318 const NekDouble var_fast_sodium_current_j_gate__j =
319 var_fast_sodium_current__j; // dimensionless
320 const NekDouble
321 var_fast_sodium_current_j_gate__d_j_d_environment__time =
322 (var_fast_sodium_current_j_gate__alpha_j *
323 (1.0 - var_fast_sodium_current_j_gate__j)) -
324 (var_fast_sodium_current_j_gate__beta_j *
325 var_fast_sodium_current_j_gate__j); // per_millisecond
326 const NekDouble
327 var_fast_sodium_current__fast_sodium_current_j_gate__d_j_d_environment__time =
328 var_fast_sodium_current_j_gate__d_j_d_environment__time; // per_millisecond
329 const NekDouble
330 var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__V =
331 var_rapid_activating_delayed_rectifiyer_K_current__V; // millivolt
332 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__tau_X_kr =
333 43.0 +
334 (1.0 /
335 (exp((-5.495) +
336 (0.1691 *
337 var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__V)) +
338 exp((-7.677) -
339 (0.0128 *
340 var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__V)))); // millisecond
341 const NekDouble
342 var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr =
343 var_rapid_activating_delayed_rectifiyer_K_current__X_kr; // dimensionless
344 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr_inf =
345 1.0 /
346 (1.0 +
347 exp((-2.182) -
348 (0.1819 *
349 var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__V))); // dimensionless
350 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time =
351 (var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr_inf -
352 var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr) /
353 var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__tau_X_kr; // per_millisecond
354 const NekDouble
355 var_rapid_activating_delayed_rectifiyer_K_current__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time =
356 var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time; // per_millisecond
357 const NekDouble
358 var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V =
359 var_slow_activating_delayed_rectifiyer_K_current__V; // millivolt
360 const NekDouble var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__tau_X_ks =
361 1.0 /
362 (((7.19e-05 *
363 (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V -
364 10.0)) /
365 (1.0 -
366 exp((-0.148) *
367 (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V -
368 10.0)))) +
369 ((0.000131 *
370 (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V -
371 10.0)) /
372 (exp(0.0687 *
373 (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V -
374 10.0)) -
375 1.0))); // millisecond
376 const NekDouble
377 var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks_infinity =
378 1.0 /
379 (1.0 +
380 exp((var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V -
381 16.0) /
382 (-13.6))); // dimensionless
383 const NekDouble
384 var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks =
385 var_slow_activating_delayed_rectifiyer_K_current__X_ks; // dimensionless
386 const NekDouble var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time =
387 (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks_infinity -
388 var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks) /
389 var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__tau_X_ks; // per_millisecond
390 const NekDouble
391 var_slow_activating_delayed_rectifiyer_K_current__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time =
392 var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time; // per_millisecond
393 const NekDouble var_transient_outward_potassium_current_X_to_gate__V =
394 var_transient_outward_potassium_current__V; // millivolt
395 const NekDouble
396 var_transient_outward_potassium_current_X_to_gate__alpha_X_to =
397 0.04516 *
398 exp(0.03577 *
399 var_transient_outward_potassium_current_X_to_gate__V); // per_millisecond
400 const NekDouble
401 var_transient_outward_potassium_current_X_to_gate__X_to =
402 var_transient_outward_potassium_current__X_to; // dimensionless
403 const NekDouble
404 var_transient_outward_potassium_current_X_to_gate__beta_X_to =
405 0.0989 *
406 exp((-0.06237) *
407 var_transient_outward_potassium_current_X_to_gate__V); // per_millisecond
408 const NekDouble
409 var_transient_outward_potassium_current_X_to_gate__d_X_to_d_environment__time =
410 (var_transient_outward_potassium_current_X_to_gate__alpha_X_to *
411 (1.0 -
412 var_transient_outward_potassium_current_X_to_gate__X_to)) -
413 (var_transient_outward_potassium_current_X_to_gate__beta_X_to *
414 var_transient_outward_potassium_current_X_to_gate__X_to); // per_millisecond
415 const NekDouble
416 var_transient_outward_potassium_current__transient_outward_potassium_current_X_to_gate__d_X_to_d_environment__time =
417 var_transient_outward_potassium_current_X_to_gate__d_X_to_d_environment__time; // per_millisecond
418 const NekDouble var_transient_outward_potassium_current_Y_to_gate__V =
419 var_transient_outward_potassium_current__V; // millivolt
420 const NekDouble
421 var_transient_outward_potassium_current_Y_to_gate__beta_Y_to =
422 (0.005415 *
423 exp((var_transient_outward_potassium_current_Y_to_gate__V +
424 33.5) /
425 5.0)) /
426 (1.0 +
427 (0.051335 *
428 exp((var_transient_outward_potassium_current_Y_to_gate__V +
429 33.5) /
430 5.0))); // per_millisecond
431 const NekDouble
432 var_transient_outward_potassium_current_Y_to_gate__alpha_Y_to =
433 (0.005415 *
434 exp((var_transient_outward_potassium_current_Y_to_gate__V +
435 33.5) /
436 (-5.0))) /
437 (1.0 +
438 (0.051335 *
439 exp((var_transient_outward_potassium_current_Y_to_gate__V +
440 33.5) /
441 (-5.0)))); // per_millisecond
442 const NekDouble
443 var_transient_outward_potassium_current_Y_to_gate__Y_to =
444 var_transient_outward_potassium_current__Y_to; // dimensionless
445 const NekDouble
446 var_transient_outward_potassium_current_Y_to_gate__d_Y_to_d_environment__time =
447 (var_transient_outward_potassium_current_Y_to_gate__alpha_Y_to *
448 (1.0 -
449 var_transient_outward_potassium_current_Y_to_gate__Y_to)) -
450 (var_transient_outward_potassium_current_Y_to_gate__beta_Y_to *
451 var_transient_outward_potassium_current_Y_to_gate__Y_to); // per_millisecond
452 const NekDouble
453 var_transient_outward_potassium_current__transient_outward_potassium_current_Y_to_gate__d_Y_to_d_environment__time =
454 var_transient_outward_potassium_current_Y_to_gate__d_Y_to_d_environment__time; // per_millisecond
455 const NekDouble var_L_type_Ca_current_f_gate__V =
456 var_L_type_Ca_current__V; // millivolt
457 const NekDouble var_L_type_Ca_current_f_gate__tau_f =
458 30.0 +
459 (200.0 / (1.0 + exp((var_L_type_Ca_current_f_gate__V + 20.0) /
460 9.5))); // millisecond
461 const NekDouble var_L_type_Ca_current_f_gate__f =
462 var_L_type_Ca_current__f; // dimensionless
463 const NekDouble var_L_type_Ca_current_f_gate__f_infinity =
464 1.0 / (1.0 + exp((var_L_type_Ca_current_f_gate__V + 12.5) /
465 5.0)); // dimensionless
466 const NekDouble var_L_type_Ca_current_f_gate__d_f_d_environment__time =
467 (var_L_type_Ca_current_f_gate__f_infinity -
468 var_L_type_Ca_current_f_gate__f) /
469 var_L_type_Ca_current_f_gate__tau_f; // per_millisecond
470 const NekDouble
471 var_L_type_Ca_current__L_type_Ca_current_f_gate__d_f_d_environment__time =
472 var_L_type_Ca_current_f_gate__d_f_d_environment__time; // per_millisecond
473 const NekDouble var_L_type_Ca_current_d_gate__V =
474 var_L_type_Ca_current__V; // millivolt
475 const NekDouble var_L_type_Ca_current_d_gate__E0_m =
476 var_L_type_Ca_current_d_gate__V + 40.0; // millivolt
477 const NekDouble var_L_type_Ca_current_d_gate__tau_d =
478 1.0 /
479 (((0.25 * exp((-0.01) * var_L_type_Ca_current_d_gate__V)) /
480 (1.0 + exp((-0.07) * var_L_type_Ca_current_d_gate__V))) +
481 ((0.07 * exp((-0.05) * var_L_type_Ca_current_d_gate__E0_m)) /
482 (1.0 +
483 exp(0.05 * var_L_type_Ca_current_d_gate__E0_m)))); // millisecond
484 const NekDouble var_L_type_Ca_current_d_gate__d =
485 var_L_type_Ca_current__d; // dimensionless
486 const NekDouble var_L_type_Ca_current_d_gate__d_infinity =
487 1.0 / (1.0 + exp((var_L_type_Ca_current_d_gate__V + 10.0) /
488 (-6.24))); // dimensionless
489 const NekDouble var_L_type_Ca_current_d_gate__d_d_d_environment__time =
490 (var_L_type_Ca_current_d_gate__d_infinity -
491 var_L_type_Ca_current_d_gate__d) /
492 var_L_type_Ca_current_d_gate__tau_d; // per_millisecond
493 const NekDouble
494 var_L_type_Ca_current__L_type_Ca_current_d_gate__d_d_d_environment__time =
495 var_L_type_Ca_current_d_gate__d_d_d_environment__time; // per_millisecond
496 const NekDouble var_L_type_Ca_current_f_Ca_gate__f_Ca =
497 var_L_type_Ca_current__f_Ca; // dimensionless
498 const NekDouble var_L_type_Ca_current_f_Ca_gate__K_mfCa =
499 0.18; // micromolar
500 const NekDouble var_L_type_Ca_current_f_Ca_gate__Ca_i =
501 var_L_type_Ca_current__Ca_i; // micromolar
502 const NekDouble var_L_type_Ca_current_f_Ca_gate__f_Ca_infinity =
503 1.0 / (1.0 + pow(var_L_type_Ca_current_f_Ca_gate__Ca_i /
504 var_L_type_Ca_current_f_Ca_gate__K_mfCa,
505 3.0)); // dimensionless
506 const NekDouble var_L_type_Ca_current_f_Ca_gate__tau_f_Ca =
507 30.0; // millisecond
508 const NekDouble
509 var_L_type_Ca_current_f_Ca_gate__d_f_Ca_d_environment__time =
510 (var_L_type_Ca_current_f_Ca_gate__f_Ca_infinity -
511 var_L_type_Ca_current_f_Ca_gate__f_Ca) /
512 var_L_type_Ca_current_f_Ca_gate__tau_f_Ca; // per_millisecond
513 const NekDouble
514 var_L_type_Ca_current__L_type_Ca_current_f_Ca_gate__d_f_Ca_d_environment__time =
515 var_L_type_Ca_current_f_Ca_gate__d_f_Ca_d_environment__time; // per_millisecond
516 const NekDouble var_calcium_dynamics__Ca_i =
517 var_chaste_interface__calcium_dynamics__Ca_i; // micromolar
518 const NekDouble var_calcium_dynamics__CMDN_tot = 10.0; // micromolar
519 const NekDouble var_calcium_dynamics__K_mCMDN = 2.0; // micromolar
520 const NekDouble var_calcium_dynamics__beta_i =
521 1.0 /
522 (1.0 +
523 ((var_calcium_dynamics__CMDN_tot * var_calcium_dynamics__K_mCMDN) /
524 pow(var_calcium_dynamics__K_mCMDN + var_calcium_dynamics__Ca_i,
525 2.0))); // dimensionless
526 const NekDouble var_calcium_dynamics__V_myo = 2.584e-05; // microlitre
527 const NekDouble var_calcium_dynamics__F =
528 var_membrane__F; // coulomb_per_millimole
529 const NekDouble var_calcium_dynamics__C_sc =
530 var_L_type_Ca_current__C_sc; // microF_per_cm2
531 const NekDouble var_calcium_dynamics__A_Cap = 0.0001534; // cm2
532 const NekDouble var_calcium_dynamics__Ca_SR =
533 var_chaste_interface__calcium_dynamics__Ca_SR; // micromolar
534 const NekDouble var_calcium_dynamics__P_rel = 6.0; // per_millisecond
535 const NekDouble var_calcium_dynamics__V =
536 var_chaste_interface__membrane__V; // millivolt
537 const NekDouble var_calcium_dynamics__f_Ca =
538 var_chaste_interface__L_type_Ca_current_f_Ca_gate__f_Ca; // dimensionless
539 const NekDouble var_calcium_dynamics__gamma =
540 1.0 / (1.0 + pow(2000.0 / var_calcium_dynamics__Ca_SR,
541 3.0)); // dimensionless
542 const NekDouble var_calcium_dynamics__d =
543 var_chaste_interface__L_type_Ca_current_d_gate__d; // dimensionless
544 const NekDouble var_calcium_dynamics__f =
545 var_chaste_interface__L_type_Ca_current_f_gate__f; // dimensionless
546 const NekDouble var_calcium_dynamics__J_rel =
547 (var_calcium_dynamics__P_rel * var_calcium_dynamics__f *
548 var_calcium_dynamics__d * var_calcium_dynamics__f_Ca *
549 ((var_calcium_dynamics__gamma * var_calcium_dynamics__Ca_SR) -
550 var_calcium_dynamics__Ca_i)) /
551 (1.0 + (1.65 * exp(var_calcium_dynamics__V /
552 20.0))); // micromolar_per_millisecond
553 const NekDouble var_calcium_dynamics__P_leak = 1e-06; // per_millisecond
554 const NekDouble var_calcium_dynamics__J_leak =
555 var_calcium_dynamics__P_leak *
556 (var_calcium_dynamics__Ca_SR -
557 var_calcium_dynamics__Ca_i); // micromolar_per_millisecond
558 const NekDouble var_calcium_dynamics__K_mup = 0.32; // micromolar
559 const NekDouble var_calcium_dynamics__V_up =
560 0.1; // micromolar_per_millisecond
561 const NekDouble var_calcium_dynamics__J_up =
562 var_calcium_dynamics__V_up /
563 (1.0 + pow(var_calcium_dynamics__K_mup / var_calcium_dynamics__Ca_i,
564 2.0)); // micromolar_per_millisecond
565 const NekDouble var_calcium_dynamics__i_Ca =
566 var_L_type_Ca_current__i_Ca; // microA_per_microF
567 const NekDouble var_calcium_dynamics__i_Ca_b =
568 var_calcium_background_current__i_Ca_b; // microA_per_microF
569 const NekDouble var_calcium_dynamics__i_p_Ca =
570 var_sarcolemmal_calcium_pump__i_p_Ca; // microA_per_microF
571 const NekDouble var_calcium_dynamics__i_NaCa =
572 var_Na_Ca_exchanger__i_NaCa; // microA_per_microF
573 const NekDouble var_calcium_dynamics__K_mCSQN = 600.0; // micromolar
574 const NekDouble var_calcium_dynamics__CSQN_tot = 10000.0; // micromolar
575 const NekDouble var_calcium_dynamics__V_SR = 2e-06; // microlitre
576 const NekDouble var_calcium_dynamics__beta_SR =
577 1.0 /
578 (1.0 +
579 ((var_calcium_dynamics__CSQN_tot * var_calcium_dynamics__K_mCSQN) /
580 pow(var_calcium_dynamics__K_mCSQN + var_calcium_dynamics__Ca_SR,
581 2.0))); // dimensionless
582 const NekDouble var_calcium_dynamics__d_Ca_i_d_environment__time =
583 var_calcium_dynamics__beta_i *
584 (((var_calcium_dynamics__J_rel + var_calcium_dynamics__J_leak) -
585 var_calcium_dynamics__J_up) -
586 (((var_calcium_dynamics__A_Cap * var_calcium_dynamics__C_sc) /
587 (2.0 * var_calcium_dynamics__F * var_calcium_dynamics__V_myo)) *
588 ((var_calcium_dynamics__i_Ca + var_calcium_dynamics__i_Ca_b +
589 var_calcium_dynamics__i_p_Ca) -
590 (2.0 * var_calcium_dynamics__i_NaCa)))); // 'micromole per litre
591 // per millisecond'
592 const NekDouble var_calcium_dynamics__d_Ca_SR_d_environment__time =
593 (var_calcium_dynamics__beta_SR *
594 ((var_calcium_dynamics__J_up - var_calcium_dynamics__J_leak) -
595 var_calcium_dynamics__J_rel) *
596 var_calcium_dynamics__V_myo) /
597 var_calcium_dynamics__V_SR; // 'micromole per litre per millisecond'
598 const NekDouble
599 var_chaste_interface__fast_sodium_current_m_gate__d_m_d_environment__time =
600 var_fast_sodium_current__fast_sodium_current_m_gate__d_m_d_environment__time; // per_millisecond
601 const NekDouble
602 var_chaste_interface__fast_sodium_current_h_gate__d_h_d_environment__time =
603 var_fast_sodium_current__fast_sodium_current_h_gate__d_h_d_environment__time; // per_millisecond
604 const NekDouble
605 var_chaste_interface__fast_sodium_current_j_gate__d_j_d_environment__time =
606 var_fast_sodium_current__fast_sodium_current_j_gate__d_j_d_environment__time; // per_millisecond
607 const NekDouble
608 var_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time =
609 var_rapid_activating_delayed_rectifiyer_K_current__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time; // per_millisecond
610 const NekDouble
611 var_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time =
612 var_slow_activating_delayed_rectifiyer_K_current__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time; // per_millisecond
613 const NekDouble
614 var_chaste_interface__transient_outward_potassium_current_X_to_gate__d_X_to_d_environment__time =
615 var_transient_outward_potassium_current__transient_outward_potassium_current_X_to_gate__d_X_to_d_environment__time; // per_millisecond
616 const NekDouble
617 var_chaste_interface__transient_outward_potassium_current_Y_to_gate__d_Y_to_d_environment__time =
618 var_transient_outward_potassium_current__transient_outward_potassium_current_Y_to_gate__d_Y_to_d_environment__time; // per_millisecond
619 const NekDouble
620 var_chaste_interface__L_type_Ca_current_f_gate__d_f_d_environment__time =
621 var_L_type_Ca_current__L_type_Ca_current_f_gate__d_f_d_environment__time; // per_millisecond
622 const NekDouble
623 var_chaste_interface__L_type_Ca_current_d_gate__d_d_d_environment__time =
624 var_L_type_Ca_current__L_type_Ca_current_d_gate__d_d_d_environment__time; // per_millisecond
625 const NekDouble
626 var_chaste_interface__L_type_Ca_current_f_Ca_gate__d_f_Ca_d_environment__time =
627 var_L_type_Ca_current__L_type_Ca_current_f_Ca_gate__d_f_Ca_d_environment__time; // per_millisecond
628 const NekDouble
629 var_chaste_interface__calcium_dynamics__d_Ca_i_d_environment__time =
630 var_calcium_dynamics__d_Ca_i_d_environment__time; // micromolar_per_millisecond
631 const NekDouble
632 var_chaste_interface__calcium_dynamics__d_Ca_SR_d_environment__time =
633 var_calcium_dynamics__d_Ca_SR_d_environment__time; // micromolar_per_millisecond
634 const NekDouble d_dt_chaste_interface__fast_sodium_current_m_gate__m =
635 var_chaste_interface__fast_sodium_current_m_gate__d_m_d_environment__time; // per_millisecond
636 const NekDouble d_dt_chaste_interface__fast_sodium_current_h_gate__h =
637 var_chaste_interface__fast_sodium_current_h_gate__d_h_d_environment__time; // per_millisecond
638 const NekDouble d_dt_chaste_interface__fast_sodium_current_j_gate__j =
639 var_chaste_interface__fast_sodium_current_j_gate__d_j_d_environment__time; // per_millisecond
640 const NekDouble
641 d_dt_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr =
642 var_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time; // per_millisecond
643 const NekDouble
644 d_dt_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks =
645 var_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time; // per_millisecond
646 const NekDouble
647 d_dt_chaste_interface__transient_outward_potassium_current_X_to_gate__X_to =
648 var_chaste_interface__transient_outward_potassium_current_X_to_gate__d_X_to_d_environment__time; // per_millisecond
649 const NekDouble
650 d_dt_chaste_interface__transient_outward_potassium_current_Y_to_gate__Y_to =
651 var_chaste_interface__transient_outward_potassium_current_Y_to_gate__d_Y_to_d_environment__time; // per_millisecond
652 const NekDouble d_dt_chaste_interface__L_type_Ca_current_f_gate__f =
653 var_chaste_interface__L_type_Ca_current_f_gate__d_f_d_environment__time; // per_millisecond
654 const NekDouble d_dt_chaste_interface__L_type_Ca_current_d_gate__d =
655 var_chaste_interface__L_type_Ca_current_d_gate__d_d_d_environment__time; // per_millisecond
656 const NekDouble d_dt_chaste_interface__L_type_Ca_current_f_Ca_gate__f_Ca =
657 var_chaste_interface__L_type_Ca_current_f_Ca_gate__d_f_Ca_d_environment__time; // per_millisecond
658 const NekDouble d_dt_chaste_interface__calcium_dynamics__Ca_i =
659 var_chaste_interface__calcium_dynamics__d_Ca_i_d_environment__time; // 'micromole per litre per millisecond'
660 const NekDouble d_dt_chaste_interface__calcium_dynamics__Ca_SR =
661 var_chaste_interface__calcium_dynamics__d_Ca_SR_d_environment__time; // 'micromole per litre per millisecond'
662
663 const NekDouble var_fast_sodium_current__g_Na =
664 12.8; // milliS_per_microF
665 const NekDouble var_fast_sodium_current__R =
666 var_membrane__R; // joule_per_mole_kelvin
667 const NekDouble var_fast_sodium_current__Na_o =
668 var_standard_ionic_concentrations__Na_o; // millimolar
669 const NekDouble var_fast_sodium_current__F =
670 var_membrane__F; // coulomb_per_millimole
671 const NekDouble var_fast_sodium_current__T = var_membrane__T; // kelvin
672 const NekDouble var_fast_sodium_current__Na_i =
673 var_standard_ionic_concentrations__Na_i; // millimolar
674 const NekDouble var_fast_sodium_current__E_Na =
675 ((var_fast_sodium_current__R * var_fast_sodium_current__T) /
676 var_fast_sodium_current__F) *
677 log(var_fast_sodium_current__Na_o /
678 var_fast_sodium_current__Na_i); // millivolt
679 const NekDouble var_fast_sodium_current__i_Na =
680 var_fast_sodium_current__g_Na *
681 pow(var_fast_sodium_current__m, 3.0) * var_fast_sodium_current__h *
682 var_fast_sodium_current__j *
683 (var_fast_sodium_current__V -
684 var_fast_sodium_current__E_Na); // microA_per_microF
685 const NekDouble var_membrane__i_Na =
686 var_fast_sodium_current__i_Na; // microA_per_microF
687 const NekDouble var_membrane__i_Ca =
688 var_L_type_Ca_current__i_Ca; // microA_per_microF
689 const NekDouble var_L_type_Ca_current__P_CaK =
690 5.79e-07; // cm_per_millisecond
691 const NekDouble var_standard_ionic_concentrations__K_o =
692 4.0; // millimolar
693 const NekDouble var_L_type_Ca_current__K_o =
694 var_standard_ionic_concentrations__K_o; // millimolar
695 const NekDouble var_L_type_Ca_current__i_Ca_half =
696 -0.265; // microA_per_microF
697 const NekDouble var_standard_ionic_concentrations__K_i =
698 149.4; // millimolar
699 const NekDouble var_L_type_Ca_current__K_i =
700 var_standard_ionic_concentrations__K_i; // millimolar
701 const NekDouble var_L_type_Ca_current__i_CaK =
702 ((((((var_L_type_Ca_current__P_CaK / var_L_type_Ca_current__C_sc) *
703 var_L_type_Ca_current__f * var_L_type_Ca_current__d *
704 var_L_type_Ca_current__f_Ca) /
705 (1.0 + (var_L_type_Ca_current__i_Ca_max /
706 var_L_type_Ca_current__i_Ca_half))) *
707 1000.0 * var_L_type_Ca_current__V *
708 pow(var_L_type_Ca_current__F, 2.0)) /
709 (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) *
710 ((var_L_type_Ca_current__K_i *
711 exp((var_L_type_Ca_current__V * var_L_type_Ca_current__F) /
712 (var_L_type_Ca_current__R * var_L_type_Ca_current__T))) -
713 var_L_type_Ca_current__K_o)) /
714 (exp((var_L_type_Ca_current__V * var_L_type_Ca_current__F) /
715 (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) -
716 1.0); // microA_per_microF
717 const NekDouble var_membrane__i_CaK =
718 var_L_type_Ca_current__i_CaK; // microA_per_microF
719 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__K_o =
720 var_standard_ionic_concentrations__K_o; // millimolar
721 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__R =
722 var_membrane__R; // joule_per_mole_kelvin
723 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__F =
724 var_membrane__F; // coulomb_per_millimole
725 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__K_i =
726 var_standard_ionic_concentrations__K_i; // millimolar
727 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__T =
728 var_membrane__T; // kelvin
729 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__E_K =
730 ((var_rapid_activating_delayed_rectifiyer_K_current__R *
731 var_rapid_activating_delayed_rectifiyer_K_current__T) /
732 var_rapid_activating_delayed_rectifiyer_K_current__F) *
733 log(var_rapid_activating_delayed_rectifiyer_K_current__K_o /
734 var_rapid_activating_delayed_rectifiyer_K_current__K_i); // millivolt
735 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__R_V =
736 1.0 /
737 (1.0 +
738 (2.5 *
739 exp(0.1 * (var_rapid_activating_delayed_rectifiyer_K_current__V +
740 28.0)))); // dimensionless
741 const NekDouble
742 var_rapid_activating_delayed_rectifiyer_K_current__g_Kr =
743 0.0136; // milliS_per_microF
744 const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__i_Kr =
745 var_rapid_activating_delayed_rectifiyer_K_current__g_Kr *
746 var_rapid_activating_delayed_rectifiyer_K_current__R_V *
747 var_rapid_activating_delayed_rectifiyer_K_current__X_kr *
748 sqrt(var_rapid_activating_delayed_rectifiyer_K_current__K_o / 4.0) *
749 (var_rapid_activating_delayed_rectifiyer_K_current__V -
750 var_rapid_activating_delayed_rectifiyer_K_current__E_K); // microA_per_microF
751 const NekDouble var_membrane__i_Kr =
752 var_rapid_activating_delayed_rectifiyer_K_current__i_Kr; // microA_per_microF
753 const NekDouble var_slow_activating_delayed_rectifiyer_K_current__g_Ks =
754 0.0245; // milliS_per_microF
755 const NekDouble var_slow_activating_delayed_rectifiyer_K_current__T =
756 var_membrane__T; // kelvin
757 const NekDouble var_slow_activating_delayed_rectifiyer_K_current__K_o =
758 var_standard_ionic_concentrations__K_o; // millimolar
759 const NekDouble var_slow_activating_delayed_rectifiyer_K_current__R =
760 var_membrane__R; // joule_per_mole_kelvin
761 const NekDouble var_slow_activating_delayed_rectifiyer_K_current__Na_o =
762 var_standard_ionic_concentrations__Na_o; // millimolar
763 const NekDouble var_slow_activating_delayed_rectifiyer_K_current__Na_i =
764 var_standard_ionic_concentrations__Na_i; // millimolar
765 const NekDouble var_slow_activating_delayed_rectifiyer_K_current__K_i =
766 var_standard_ionic_concentrations__K_i; // millimolar
767 const NekDouble var_slow_activating_delayed_rectifiyer_K_current__F =
768 var_membrane__F; // coulomb_per_millimole
769 const NekDouble var_slow_activating_delayed_rectifiyer_K_current__E_Ks =
770 ((var_slow_activating_delayed_rectifiyer_K_current__R *
771 var_slow_activating_delayed_rectifiyer_K_current__T) /
772 var_slow_activating_delayed_rectifiyer_K_current__F) *
773 log((var_slow_activating_delayed_rectifiyer_K_current__K_o +
774 (0.01833 *
775 var_slow_activating_delayed_rectifiyer_K_current__Na_o)) /
776 (var_slow_activating_delayed_rectifiyer_K_current__K_i +
777 (0.01833 *
778 var_slow_activating_delayed_rectifiyer_K_current__Na_i))); // millivolt
779 const NekDouble var_slow_activating_delayed_rectifiyer_K_current__i_Ks =
780 var_slow_activating_delayed_rectifiyer_K_current__g_Ks *
781 pow(var_slow_activating_delayed_rectifiyer_K_current__X_ks, 2.0) *
782 (var_slow_activating_delayed_rectifiyer_K_current__V -
783 var_slow_activating_delayed_rectifiyer_K_current__E_Ks); // microA_per_microF
784 const NekDouble var_membrane__i_Ks =
785 var_slow_activating_delayed_rectifiyer_K_current__i_Ks; // microA_per_microF
786 const NekDouble var_transient_outward_potassium_current__g_to =
787 0.23815; // milliS_per_microF
788 const NekDouble var_transient_outward_potassium_current__E_K =
789 var_rapid_activating_delayed_rectifiyer_K_current__E_K; // millivolt
790 const NekDouble var_transient_outward_potassium_current__i_to =
791 var_transient_outward_potassium_current__g_to *
792 var_transient_outward_potassium_current__X_to *
793 var_transient_outward_potassium_current__Y_to *
794 (var_transient_outward_potassium_current__V -
795 var_transient_outward_potassium_current__E_K); // microA_per_microF
796 const NekDouble var_membrane__i_to =
797 var_transient_outward_potassium_current__i_to; // microA_per_microF
798 const NekDouble var_time_independent_potassium_current__E_K =
799 var_rapid_activating_delayed_rectifiyer_K_current__E_K; // millivolt
800 const NekDouble var_time_independent_potassium_current__K_o =
801 var_standard_ionic_concentrations__K_o; // millimolar
802 const NekDouble var_time_independent_potassium_current__g_K1 =
803 2.8; // milliS_per_microF
804 const NekDouble var_time_independent_potassium_current__F =
805 var_membrane__F; // coulomb_per_millimole
806 const NekDouble var_time_independent_potassium_current_K1_gate__F =
807 var_time_independent_potassium_current__F; // coulomb_per_millimole
808 const NekDouble var_time_independent_potassium_current__V =
809 var_chaste_interface__membrane__V; // millivolt
810 const NekDouble var_time_independent_potassium_current_K1_gate__V =
811 var_time_independent_potassium_current__V; // millivolt
812 const NekDouble var_time_independent_potassium_current__T =
813 var_membrane__T; // kelvin
814 const NekDouble var_time_independent_potassium_current_K1_gate__T =
815 var_time_independent_potassium_current__T; // kelvin
816 const NekDouble var_time_independent_potassium_current_K1_gate__E_K =
817 var_time_independent_potassium_current__E_K; // millivolt
818 const NekDouble var_time_independent_potassium_current__R =
819 var_membrane__R; // joule_per_mole_kelvin
820 const NekDouble var_time_independent_potassium_current_K1_gate__R =
821 var_time_independent_potassium_current__R; // joule_per_mole_kelvin
822 const NekDouble
823 var_time_independent_potassium_current_K1_gate__K1_infinity =
824 1.0 /
825 (2.0 +
826 exp(((1.62 *
827 var_time_independent_potassium_current_K1_gate__F) /
828 (var_time_independent_potassium_current_K1_gate__R *
829 var_time_independent_potassium_current_K1_gate__T)) *
830 (var_time_independent_potassium_current_K1_gate__V -
831 var_time_independent_potassium_current_K1_gate__E_K))); // dimensionless
832 const NekDouble var_time_independent_potassium_current__K1_infinity =
833 var_time_independent_potassium_current_K1_gate__K1_infinity; // dimensionless
834 const NekDouble var_time_independent_potassium_current__K_mK1 =
835 13.0; // millimolar
836 const NekDouble var_time_independent_potassium_current__i_K1 =
837 ((var_time_independent_potassium_current__g_K1 *
838 var_time_independent_potassium_current__K1_infinity *
839 var_time_independent_potassium_current__K_o) /
840 (var_time_independent_potassium_current__K_o +
841 var_time_independent_potassium_current__K_mK1)) *
842 (var_time_independent_potassium_current__V -
843 var_time_independent_potassium_current__E_K); // microA_per_microF
844 const NekDouble var_membrane__i_K1 =
845 var_time_independent_potassium_current__i_K1; // microA_per_microF
846 const NekDouble var_plateau_potassium_current__g_Kp =
847 0.002216; // milliS_per_microF
848 const NekDouble var_plateau_potassium_current__V =
849 var_chaste_interface__membrane__V; // millivolt
850 const NekDouble var_plateau_potassium_current_Kp_gate__V =
851 var_plateau_potassium_current__V; // millivolt
852 const NekDouble var_plateau_potassium_current_Kp_gate__Kp_V =
853 1.0 /
854 (1.0 + exp((7.488 - var_plateau_potassium_current_Kp_gate__V) /
855 5.98)); // dimensionless
856 const NekDouble var_plateau_potassium_current__Kp_V =
857 var_plateau_potassium_current_Kp_gate__Kp_V; // dimensionless
858 const NekDouble var_plateau_potassium_current__E_K =
859 var_rapid_activating_delayed_rectifiyer_K_current__E_K; // millivolt
860 const NekDouble var_plateau_potassium_current__i_Kp =
861 var_plateau_potassium_current__g_Kp *
862 var_plateau_potassium_current__Kp_V *
863 (var_plateau_potassium_current__V -
864 var_plateau_potassium_current__E_K); // microA_per_microF
865 const NekDouble var_membrane__i_Kp =
866 var_plateau_potassium_current__i_Kp; // microA_per_microF
867 const NekDouble var_membrane__i_NaCa =
868 var_Na_Ca_exchanger__i_NaCa; // microA_per_microF
869 const NekDouble var_sodium_potassium_pump__K_mNai = 10.0; // millimolar
870 const NekDouble var_sodium_potassium_pump__V =
871 var_chaste_interface__membrane__V; // millivolt
872 const NekDouble var_sodium_potassium_pump__F =
873 var_membrane__F; // coulomb_per_millimole
874 const NekDouble var_sodium_potassium_pump__T =
875 var_membrane__T; // kelvin
876 const NekDouble var_sodium_potassium_pump__Na_o =
877 var_standard_ionic_concentrations__Na_o; // millimolar
878 const NekDouble var_sodium_potassium_pump__sigma =
879 (1.0 / 7.0) * (exp(var_sodium_potassium_pump__Na_o / 67.3) -
880 1.0); // dimensionless
881 const NekDouble var_sodium_potassium_pump__R =
882 var_membrane__R; // joule_per_mole_kelvin
883 const NekDouble var_sodium_potassium_pump__f_NaK =
884 1.0 / (1.0 +
885 (0.1245 * exp(((-0.1) * var_sodium_potassium_pump__V *
886 var_sodium_potassium_pump__F) /
887 (var_sodium_potassium_pump__R *
888 var_sodium_potassium_pump__T))) +
889 (0.0365 * var_sodium_potassium_pump__sigma *
890 exp(((-var_sodium_potassium_pump__V) *
891 var_sodium_potassium_pump__F) /
892 (var_sodium_potassium_pump__R *
893 var_sodium_potassium_pump__T)))); // dimensionless
894 const NekDouble var_sodium_potassium_pump__i_NaK_max =
895 0.693; // microA_per_microF
896 const NekDouble var_sodium_potassium_pump__K_o =
897 var_standard_ionic_concentrations__K_o; // millimolar
898 const NekDouble var_sodium_potassium_pump__Na_i =
899 var_standard_ionic_concentrations__Na_i; // millimolar
900 const NekDouble var_sodium_potassium_pump__K_mKo = 1.5; // millimolar
901 const NekDouble var_sodium_potassium_pump__i_NaK =
902 (((var_sodium_potassium_pump__i_NaK_max *
903 var_sodium_potassium_pump__f_NaK) /
904 (1.0 + pow(var_sodium_potassium_pump__K_mNai /
905 var_sodium_potassium_pump__Na_i,
906 1.5))) *
907 var_sodium_potassium_pump__K_o) /
908 (var_sodium_potassium_pump__K_o +
909 var_sodium_potassium_pump__K_mKo); // microA_per_microF
910 const NekDouble var_membrane__i_NaK =
911 var_sodium_potassium_pump__i_NaK; // microA_per_microF
912 const NekDouble var_membrane__i_p_Ca =
913 var_sarcolemmal_calcium_pump__i_p_Ca; // microA_per_microF
914 const NekDouble var_membrane__i_Ca_b =
915 var_calcium_background_current__i_Ca_b; // microA_per_microF
916 const NekDouble var_sodium_background_current__g_Nab =
917 0.0031; // milliS_per_microF
918 const NekDouble var_sodium_background_current__V =
919 var_chaste_interface__membrane__V; // millivolt
920 const NekDouble var_sodium_background_current__E_Na =
921 var_fast_sodium_current__E_Na; // millivolt
922 const NekDouble var_sodium_background_current__i_Na_b =
923 var_sodium_background_current__g_Nab *
924 (var_sodium_background_current__V -
925 var_sodium_background_current__E_Na); // microA_per_microF
926 const NekDouble var_membrane__i_Na_b =
927 var_sodium_background_current__i_Na_b; // microA_per_microF
928 const NekDouble var_chaste_interface__membrane__i_Stim = 0.0;
929 const NekDouble var_membrane__i_Stim_converter =
930 var_chaste_interface__membrane__i_Stim; // uA_per_cm2
931 const NekDouble
932 var_membrane__chaste_interface__chaste_membrane_capacitance =
933 1.0; // uF_per_cm2
934 const NekDouble var_membrane__i_Stim =
935 var_membrane__i_Stim_converter /
936 var_membrane__chaste_interface__chaste_membrane_capacitance; // microA_per_microF
937 const NekDouble var_membrane__d_V_d_environment__time =
938 -(var_membrane__i_Na + var_membrane__i_Ca + var_membrane__i_CaK +
939 var_membrane__i_Kr + var_membrane__i_Ks + var_membrane__i_to +
940 var_membrane__i_K1 + var_membrane__i_Kp + var_membrane__i_NaCa +
941 var_membrane__i_NaK + var_membrane__i_p_Ca +
942 var_membrane__i_Na_b + var_membrane__i_Ca_b +
943 var_membrane__i_Stim); // 'millivolt per millisecond'
944 const NekDouble
945 var_chaste_interface__membrane__d_V_d_environment__time =
946 var_membrane__d_V_d_environment__time; // ___units_1
947 d_dt_chaste_interface__membrane__V =
948 var_chaste_interface__membrane__d_V_d_environment__time; // 'millivolt
949 // per
950 // millisecond'
951 outarray[0][i] = d_dt_chaste_interface__membrane__V;
952 outarray[1][i] = d_dt_chaste_interface__fast_sodium_current_m_gate__m;
953 outarray[2][i] = d_dt_chaste_interface__fast_sodium_current_h_gate__h;
954 outarray[3][i] = d_dt_chaste_interface__fast_sodium_current_j_gate__j;
955 outarray[4][i] =
956 d_dt_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr;
957 outarray[5][i] =
958 d_dt_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks;
959 outarray[6][i] =
960 d_dt_chaste_interface__transient_outward_potassium_current_X_to_gate__X_to;
961 outarray[7][i] =
962 d_dt_chaste_interface__transient_outward_potassium_current_Y_to_gate__Y_to;
963 outarray[8][i] = d_dt_chaste_interface__L_type_Ca_current_f_gate__f;
964 outarray[9][i] = d_dt_chaste_interface__L_type_Ca_current_d_gate__d;
965 outarray[10][i] =
966 d_dt_chaste_interface__L_type_Ca_current_f_Ca_gate__f_Ca;
967 outarray[11][i] = d_dt_chaste_interface__calcium_dynamics__Ca_i;
968 outarray[12][i] = d_dt_chaste_interface__calcium_dynamics__Ca_SR;
969 }
970}
971
972/**
973 *
974 */
976{
977 SolverUtils::AddSummaryItem(s, "Cell model", "Fox02");
978}
979
980/**
981 *
982 */
984{
985 Vmath::Fill(m_nq, -94.7, m_cellSol[0], 1);
986 Vmath::Fill(m_nq, 0.00024676, m_cellSol[1], 1);
987 Vmath::Fill(m_nq, 0.99869, m_cellSol[2], 1);
988 Vmath::Fill(m_nq, 0.99887, m_cellSol[3], 1);
989 Vmath::Fill(m_nq, 0.229, m_cellSol[4], 1);
990 Vmath::Fill(m_nq, 0.0001, m_cellSol[5], 1);
991 Vmath::Fill(m_nq, 0.00003742, m_cellSol[6], 1);
992 Vmath::Fill(m_nq, 1.0, m_cellSol[7], 1);
993 Vmath::Fill(m_nq, 0.0472, m_cellSol[8], 1);
994 Vmath::Fill(m_nq, 0.983, m_cellSol[9], 1);
995 Vmath::Fill(m_nq, 0.0001, m_cellSol[10], 1);
996 Vmath::Fill(m_nq, 0.942, m_cellSol[11], 1);
997 Vmath::Fill(m_nq, 320.0, m_cellSol[12], 1);
998}
999} // namespace Nektar
Cell model base class.
Definition: CellModel.h:66
Array< OneD, Array< OneD, NekDouble > > m_cellSol
Cell model solution variables.
Definition: CellModel.h:126
std::vector< int > m_concentrations
Indices of cell model variables which are concentrations.
Definition: CellModel.h:139
std::vector< int > m_gates
Indices of cell model variables which are gates.
Definition: CellModel.h:141
size_t m_nq
Number of physical points.
Definition: CellModel.h:117
size_t m_nvar
Number of variables in cell model (inc. transmembrane voltage)
Definition: CellModel.h:119
void v_GenerateSummary(SummaryList &s) override
Prints a summary of the model parameters.
Definition: Fox02.cpp:975
static CellModelSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField)
Creates an instance of this class.
Definition: Fox02.h:46
NekDouble m_chi
Definition: Fox02.h:79
void v_SetInitialConditions() override
Definition: Fox02.cpp:983
static std::string className
Name of class.
Definition: Fox02.h:54
NekDouble m_sigmai
Definition: Fox02.h:80
void v_Update(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time) override
Computes the reaction terms $f(u,v)$ and $g(u,v)$.
Definition: Fox02.cpp:71
Fox02(const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField)
Constructor.
Definition: Fox02.cpp:48
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:46
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
Definition: Misc.cpp:47
CellModelFactory & GetCellModelFactory()
Definition: CellModel.cpp:46
double NekDouble
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition: Vmath.hpp:54
scalarT< T > log(scalarT< T > in)
Definition: scalar.hpp:303
scalarT< T > sqrt(scalarT< T > in)
Definition: scalar.hpp:294