149 for (
size_t i = 0; i <
m_nq; ++i)
153 NekDouble var_chaste_interface__membrane__V = inarray[0][i];
156 var_chaste_interface__rapid_time_dependent_potassium_current_Xr1_gate__Xr1 =
160 var_chaste_interface__rapid_time_dependent_potassium_current_Xr2_gate__Xr2 =
164 var_chaste_interface__slow_time_dependent_potassium_current_Xs_gate__Xs =
167 NekDouble var_chaste_interface__fast_sodium_current_m_gate__m =
170 NekDouble var_chaste_interface__fast_sodium_current_h_gate__h =
173 NekDouble var_chaste_interface__fast_sodium_current_j_gate__j =
176 NekDouble var_chaste_interface__L_type_Ca_current_d_gate__d =
179 NekDouble var_chaste_interface__L_type_Ca_current_f_gate__f =
182 NekDouble var_chaste_interface__L_type_Ca_current_f2_gate__f2 =
185 NekDouble var_chaste_interface__L_type_Ca_current_fCass_gate__fCass =
188 NekDouble var_chaste_interface__transient_outward_current_s_gate__s =
191 NekDouble var_chaste_interface__transient_outward_current_r_gate__r =
194 NekDouble var_chaste_interface__calcium_dynamics__Ca_i = inarray[13][i];
196 NekDouble var_chaste_interface__calcium_dynamics__Ca_SR =
199 NekDouble var_chaste_interface__calcium_dynamics__Ca_ss =
202 NekDouble var_chaste_interface__calcium_dynamics__R_prime =
205 NekDouble var_chaste_interface__sodium_dynamics__Na_i = inarray[17][i];
207 NekDouble var_chaste_interface__potassium_dynamics__K_i =
212 NekDouble d_dt_chaste_interface__membrane__V;
213 const NekDouble var_membrane__R = 8314.472;
215 const NekDouble var_membrane__F = 96485.3415;
216 const NekDouble var_membrane__Cm = 0.185;
217 const NekDouble var_membrane__V_c = 0.016404;
218 const NekDouble var_inward_rectifier_potassium_current__V =
219 var_chaste_interface__membrane__V;
220 const NekDouble var_reversal_potentials__K_i =
221 var_chaste_interface__potassium_dynamics__K_i;
222 const NekDouble var_reversal_potentials__R =
224 const NekDouble var_reversal_potentials__T = var_membrane__T;
225 const NekDouble var_reversal_potentials__F =
228 const NekDouble var_reversal_potentials__K_o =
229 var_potassium_dynamics__K_o;
230 const NekDouble var_reversal_potentials__E_K =
231 ((var_reversal_potentials__R * var_reversal_potentials__T) /
232 var_reversal_potentials__F) *
233 log(var_reversal_potentials__K_o /
234 var_reversal_potentials__K_i);
235 const NekDouble var_inward_rectifier_potassium_current__E_K =
236 var_reversal_potentials__E_K;
237 const NekDouble var_inward_rectifier_potassium_current__beta_K1 =
239 exp(0.0002 * ((var_inward_rectifier_potassium_current__V -
240 var_inward_rectifier_potassium_current__E_K) +
242 exp(0.1 * ((var_inward_rectifier_potassium_current__V -
243 var_inward_rectifier_potassium_current__E_K) -
247 (var_inward_rectifier_potassium_current__V -
248 var_inward_rectifier_potassium_current__E_K)));
249 const NekDouble var_inward_rectifier_potassium_current__alpha_K1 =
251 (1.0 + exp(0.06 * ((var_inward_rectifier_potassium_current__V -
252 var_inward_rectifier_potassium_current__E_K) -
254 const NekDouble var_inward_rectifier_potassium_current__xK1_inf =
255 var_inward_rectifier_potassium_current__alpha_K1 /
256 (var_inward_rectifier_potassium_current__alpha_K1 +
257 var_inward_rectifier_potassium_current__beta_K1);
258 const NekDouble var_inward_rectifier_potassium_current__K_o =
259 var_potassium_dynamics__K_o;
260 const NekDouble var_inward_rectifier_potassium_current__g_K1 =
262 const NekDouble var_inward_rectifier_potassium_current__i_K1 =
263 var_inward_rectifier_potassium_current__g_K1 *
264 var_inward_rectifier_potassium_current__xK1_inf *
265 sqrt(var_inward_rectifier_potassium_current__K_o / 5.4) *
266 (var_inward_rectifier_potassium_current__V -
267 var_inward_rectifier_potassium_current__E_K);
268 const NekDouble var_transient_outward_current__s =
269 var_chaste_interface__transient_outward_current_s_gate__s;
270 const NekDouble var_transient_outward_current__r =
271 var_chaste_interface__transient_outward_current_r_gate__r;
272 const NekDouble var_transient_outward_current__g_to =
274 const NekDouble var_transient_outward_current__V =
275 var_chaste_interface__membrane__V;
276 const NekDouble var_transient_outward_current__E_K =
277 var_reversal_potentials__E_K;
278 const NekDouble var_transient_outward_current__i_to =
279 var_transient_outward_current__g_to *
280 var_transient_outward_current__r *
281 var_transient_outward_current__s *
282 (var_transient_outward_current__V -
283 var_transient_outward_current__E_K);
284 const NekDouble var_rapid_time_dependent_potassium_current__Xr1 =
285 var_chaste_interface__rapid_time_dependent_potassium_current_Xr1_gate__Xr1;
286 const NekDouble var_rapid_time_dependent_potassium_current__Xr2 =
287 var_chaste_interface__rapid_time_dependent_potassium_current_Xr2_gate__Xr2;
288 const NekDouble var_rapid_time_dependent_potassium_current__V =
289 var_chaste_interface__membrane__V;
290 const NekDouble var_rapid_time_dependent_potassium_current__K_o =
291 var_potassium_dynamics__K_o;
292 const NekDouble var_rapid_time_dependent_potassium_current__E_K =
293 var_reversal_potentials__E_K;
294 const NekDouble var_rapid_time_dependent_potassium_current__g_Kr =
296 const NekDouble var_rapid_time_dependent_potassium_current__i_Kr =
297 var_rapid_time_dependent_potassium_current__g_Kr *
298 sqrt(var_rapid_time_dependent_potassium_current__K_o / 5.4) *
299 var_rapid_time_dependent_potassium_current__Xr1 *
300 var_rapid_time_dependent_potassium_current__Xr2 *
301 (var_rapid_time_dependent_potassium_current__V -
302 var_rapid_time_dependent_potassium_current__E_K);
303 const NekDouble var_slow_time_dependent_potassium_current__g_Ks =
305 const NekDouble var_sodium_dynamics__Na_o = 140.0;
306 const NekDouble var_reversal_potentials__Na_o =
307 var_sodium_dynamics__Na_o;
308 const NekDouble var_reversal_potentials__Na_i =
309 var_chaste_interface__sodium_dynamics__Na_i;
310 const NekDouble var_reversal_potentials__P_kna = 0.03;
311 const NekDouble var_reversal_potentials__E_Ks =
312 ((var_reversal_potentials__R * var_reversal_potentials__T) /
313 var_reversal_potentials__F) *
314 log((var_reversal_potentials__K_o +
315 (var_reversal_potentials__P_kna *
316 var_reversal_potentials__Na_o)) /
317 (var_reversal_potentials__K_i +
318 (var_reversal_potentials__P_kna *
319 var_reversal_potentials__Na_i)));
320 const NekDouble var_slow_time_dependent_potassium_current__E_Ks =
321 var_reversal_potentials__E_Ks;
322 const NekDouble var_slow_time_dependent_potassium_current__V =
323 var_chaste_interface__membrane__V;
324 const NekDouble var_slow_time_dependent_potassium_current__Xs =
325 var_chaste_interface__slow_time_dependent_potassium_current_Xs_gate__Xs;
326 const NekDouble var_slow_time_dependent_potassium_current__i_Ks =
327 var_slow_time_dependent_potassium_current__g_Ks *
328 pow(var_slow_time_dependent_potassium_current__Xs, 2.0) *
329 (var_slow_time_dependent_potassium_current__V -
330 var_slow_time_dependent_potassium_current__E_Ks);
331 const NekDouble var_L_type_Ca_current__Ca_ss =
332 var_chaste_interface__calcium_dynamics__Ca_ss;
333 const NekDouble var_L_type_Ca_current__g_CaL =
335 const NekDouble var_L_type_Ca_current__f =
336 var_chaste_interface__L_type_Ca_current_f_gate__f;
337 const NekDouble var_L_type_Ca_current__d =
338 var_chaste_interface__L_type_Ca_current_d_gate__d;
339 const NekDouble var_L_type_Ca_current__F =
341 const NekDouble var_L_type_Ca_current__f2 =
342 var_chaste_interface__L_type_Ca_current_f2_gate__f2;
343 const NekDouble var_L_type_Ca_current__fCass =
344 var_chaste_interface__L_type_Ca_current_fCass_gate__fCass;
345 const NekDouble var_L_type_Ca_current__V =
346 var_chaste_interface__membrane__V;
347 const NekDouble var_L_type_Ca_current__T = var_membrane__T;
348 const NekDouble var_calcium_dynamics__Ca_o = 2.0;
349 const NekDouble var_L_type_Ca_current__Ca_o =
350 var_calcium_dynamics__Ca_o;
351 const NekDouble var_L_type_Ca_current__R =
353 const NekDouble var_L_type_Ca_current__i_CaL =
354 (((var_L_type_Ca_current__g_CaL * var_L_type_Ca_current__d *
355 var_L_type_Ca_current__f * var_L_type_Ca_current__f2 *
356 var_L_type_Ca_current__fCass * 4.0 *
357 (var_L_type_Ca_current__V - 15.0) *
358 pow(var_L_type_Ca_current__F, 2.0)) /
359 (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) *
360 ((0.25 * var_L_type_Ca_current__Ca_ss *
361 exp((2.0 * (var_L_type_Ca_current__V - 15.0) *
362 var_L_type_Ca_current__F) /
363 (var_L_type_Ca_current__R * var_L_type_Ca_current__T))) -
364 var_L_type_Ca_current__Ca_o)) /
365 (exp((2.0 * (var_L_type_Ca_current__V - 15.0) *
366 var_L_type_Ca_current__F) /
367 (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) -
369 const NekDouble var_sodium_potassium_pump_current__Na_i =
370 var_chaste_interface__sodium_dynamics__Na_i;
371 const NekDouble var_sodium_potassium_pump_current__R =
373 const NekDouble var_sodium_potassium_pump_current__T =
375 const NekDouble var_sodium_potassium_pump_current__V =
376 var_chaste_interface__membrane__V;
377 const NekDouble var_sodium_potassium_pump_current__K_mk =
379 const NekDouble var_sodium_potassium_pump_current__P_NaK =
381 const NekDouble var_sodium_potassium_pump_current__K_mNa =
383 const NekDouble var_sodium_potassium_pump_current__F =
385 const NekDouble var_sodium_potassium_pump_current__K_o =
386 var_potassium_dynamics__K_o;
387 const NekDouble var_sodium_potassium_pump_current__i_NaK =
388 ((((var_sodium_potassium_pump_current__P_NaK *
389 var_sodium_potassium_pump_current__K_o) /
390 (var_sodium_potassium_pump_current__K_o +
391 var_sodium_potassium_pump_current__K_mk)) *
392 var_sodium_potassium_pump_current__Na_i) /
393 (var_sodium_potassium_pump_current__Na_i +
394 var_sodium_potassium_pump_current__K_mNa)) /
396 (0.1245 * exp(((-0.1) * var_sodium_potassium_pump_current__V *
397 var_sodium_potassium_pump_current__F) /
398 (var_sodium_potassium_pump_current__R *
399 var_sodium_potassium_pump_current__T))) +
401 exp(((-var_sodium_potassium_pump_current__V) *
402 var_sodium_potassium_pump_current__F) /
403 (var_sodium_potassium_pump_current__R *
404 var_sodium_potassium_pump_current__T))));
405 const NekDouble var_fast_sodium_current__j =
406 var_chaste_interface__fast_sodium_current_j_gate__j;
407 const NekDouble var_fast_sodium_current__h =
408 var_chaste_interface__fast_sodium_current_h_gate__h;
409 const NekDouble var_fast_sodium_current__g_Na =
411 const NekDouble var_fast_sodium_current__m =
412 var_chaste_interface__fast_sodium_current_m_gate__m;
413 const NekDouble var_fast_sodium_current__V =
414 var_chaste_interface__membrane__V;
415 const NekDouble var_reversal_potentials__E_Na =
416 ((var_reversal_potentials__R * var_reversal_potentials__T) /
417 var_reversal_potentials__F) *
418 log(var_reversal_potentials__Na_o /
419 var_reversal_potentials__Na_i);
420 const NekDouble var_fast_sodium_current__E_Na =
421 var_reversal_potentials__E_Na;
422 const NekDouble var_fast_sodium_current__i_Na =
423 var_fast_sodium_current__g_Na *
424 pow(var_fast_sodium_current__m, 3.0) * var_fast_sodium_current__h *
425 var_fast_sodium_current__j *
426 (var_fast_sodium_current__V -
427 var_fast_sodium_current__E_Na);
428 const NekDouble var_sodium_background_current__V =
429 var_chaste_interface__membrane__V;
430 const NekDouble var_sodium_background_current__E_Na =
431 var_reversal_potentials__E_Na;
432 const NekDouble var_sodium_background_current__g_bna =
434 const NekDouble var_sodium_background_current__i_b_Na =
435 var_sodium_background_current__g_bna *
436 (var_sodium_background_current__V -
437 var_sodium_background_current__E_Na);
438 const NekDouble var_sodium_calcium_exchanger_current__alpha =
440 const NekDouble var_sodium_calcium_exchanger_current__gamma =
442 const NekDouble var_sodium_calcium_exchanger_current__K_sat =
444 const NekDouble var_sodium_calcium_exchanger_current__Km_Ca =
446 const NekDouble var_sodium_calcium_exchanger_current__K_NaCa =
448 const NekDouble var_sodium_calcium_exchanger_current__F =
450 const NekDouble var_sodium_calcium_exchanger_current__Ca_i =
451 var_chaste_interface__calcium_dynamics__Ca_i;
452 const NekDouble var_sodium_calcium_exchanger_current__Ca_o =
453 var_calcium_dynamics__Ca_o;
454 const NekDouble var_sodium_calcium_exchanger_current__V =
455 var_chaste_interface__membrane__V;
456 const NekDouble var_sodium_calcium_exchanger_current__R =
458 const NekDouble var_sodium_calcium_exchanger_current__Km_Nai =
460 const NekDouble var_sodium_calcium_exchanger_current__Na_o =
461 var_sodium_dynamics__Na_o;
462 const NekDouble var_sodium_calcium_exchanger_current__Na_i =
463 var_chaste_interface__sodium_dynamics__Na_i;
464 const NekDouble var_sodium_calcium_exchanger_current__T =
466 const NekDouble var_sodium_calcium_exchanger_current__i_NaCa =
467 (var_sodium_calcium_exchanger_current__K_NaCa *
468 ((exp((var_sodium_calcium_exchanger_current__gamma *
469 var_sodium_calcium_exchanger_current__V *
470 var_sodium_calcium_exchanger_current__F) /
471 (var_sodium_calcium_exchanger_current__R *
472 var_sodium_calcium_exchanger_current__T)) *
473 pow(var_sodium_calcium_exchanger_current__Na_i, 3.0) *
474 var_sodium_calcium_exchanger_current__Ca_o) -
475 (exp(((var_sodium_calcium_exchanger_current__gamma - 1.0) *
476 var_sodium_calcium_exchanger_current__V *
477 var_sodium_calcium_exchanger_current__F) /
478 (var_sodium_calcium_exchanger_current__R *
479 var_sodium_calcium_exchanger_current__T)) *
480 pow(var_sodium_calcium_exchanger_current__Na_o, 3.0) *
481 var_sodium_calcium_exchanger_current__Ca_i *
482 var_sodium_calcium_exchanger_current__alpha))) /
483 ((pow(var_sodium_calcium_exchanger_current__Km_Nai, 3.0) +
484 pow(var_sodium_calcium_exchanger_current__Na_o, 3.0)) *
485 (var_sodium_calcium_exchanger_current__Km_Ca +
486 var_sodium_calcium_exchanger_current__Ca_o) *
488 (var_sodium_calcium_exchanger_current__K_sat *
489 exp(((var_sodium_calcium_exchanger_current__gamma - 1.0) *
490 var_sodium_calcium_exchanger_current__V *
491 var_sodium_calcium_exchanger_current__F) /
492 (var_sodium_calcium_exchanger_current__R *
493 var_sodium_calcium_exchanger_current__T)))));
494 const NekDouble var_reversal_potentials__Ca_o =
495 var_calcium_dynamics__Ca_o;
496 const NekDouble var_reversal_potentials__Ca_i =
497 var_chaste_interface__calcium_dynamics__Ca_i;
498 const NekDouble var_reversal_potentials__E_Ca =
499 ((0.5 * var_reversal_potentials__R * var_reversal_potentials__T) /
500 var_reversal_potentials__F) *
501 log(var_reversal_potentials__Ca_o /
502 var_reversal_potentials__Ca_i);
503 const NekDouble var_calcium_background_current__E_Ca =
504 var_reversal_potentials__E_Ca;
505 const NekDouble var_calcium_background_current__g_bca =
507 const NekDouble var_calcium_background_current__V =
508 var_chaste_interface__membrane__V;
509 const NekDouble var_calcium_background_current__i_b_Ca =
510 var_calcium_background_current__g_bca *
511 (var_calcium_background_current__V -
512 var_calcium_background_current__E_Ca);
513 const NekDouble var_potassium_pump_current__g_pK =
515 const NekDouble var_potassium_pump_current__V =
516 var_chaste_interface__membrane__V;
517 const NekDouble var_potassium_pump_current__E_K =
518 var_reversal_potentials__E_K;
519 const NekDouble var_potassium_pump_current__i_p_K =
520 (var_potassium_pump_current__g_pK *
521 (var_potassium_pump_current__V -
522 var_potassium_pump_current__E_K)) /
523 (1.0 + exp((25.0 - var_potassium_pump_current__V) /
525 const NekDouble var_calcium_pump_current__K_pCa = 0.0005;
526 const NekDouble var_calcium_pump_current__Ca_i =
527 var_chaste_interface__calcium_dynamics__Ca_i;
528 const NekDouble var_calcium_pump_current__g_pCa =
530 const NekDouble var_calcium_pump_current__i_p_Ca =
531 (var_calcium_pump_current__g_pCa * var_calcium_pump_current__Ca_i) /
532 (var_calcium_pump_current__Ca_i +
533 var_calcium_pump_current__K_pCa);
534 const NekDouble var_chaste_interface__membrane__i_Stim = 0.0;
535 const NekDouble var_rapid_time_dependent_potassium_current_Xr1_gate__V =
536 var_rapid_time_dependent_potassium_current__V;
538 var_rapid_time_dependent_potassium_current_Xr1_gate__alpha_xr1 =
542 var_rapid_time_dependent_potassium_current_Xr1_gate__V) /
545 var_rapid_time_dependent_potassium_current_Xr1_gate__beta_xr1 =
548 exp((var_rapid_time_dependent_potassium_current_Xr1_gate__V +
552 var_rapid_time_dependent_potassium_current_Xr1_gate__tau_xr1 =
554 var_rapid_time_dependent_potassium_current_Xr1_gate__alpha_xr1 *
555 var_rapid_time_dependent_potassium_current_Xr1_gate__beta_xr1;
557 var_rapid_time_dependent_potassium_current_Xr1_gate__xr1_inf =
561 var_rapid_time_dependent_potassium_current_Xr1_gate__V) /
563 const NekDouble var_rapid_time_dependent_potassium_current_Xr2_gate__V =
564 var_rapid_time_dependent_potassium_current__V;
566 var_rapid_time_dependent_potassium_current_Xr2_gate__alpha_xr2 =
570 var_rapid_time_dependent_potassium_current_Xr2_gate__V) /
573 var_rapid_time_dependent_potassium_current_Xr2_gate__beta_xr2 =
576 exp((var_rapid_time_dependent_potassium_current_Xr2_gate__V -
580 var_rapid_time_dependent_potassium_current_Xr2_gate__tau_xr2 =
582 var_rapid_time_dependent_potassium_current_Xr2_gate__alpha_xr2 *
583 var_rapid_time_dependent_potassium_current_Xr2_gate__beta_xr2;
585 var_rapid_time_dependent_potassium_current_Xr2_gate__xr2_inf =
588 exp((var_rapid_time_dependent_potassium_current_Xr2_gate__V +
591 const NekDouble var_slow_time_dependent_potassium_current_Xs_gate__V =
592 var_slow_time_dependent_potassium_current__V;
594 var_slow_time_dependent_potassium_current_Xs_gate__beta_xs =
597 exp((var_slow_time_dependent_potassium_current_Xs_gate__V -
601 var_slow_time_dependent_potassium_current_Xs_gate__alpha_xs =
606 var_slow_time_dependent_potassium_current_Xs_gate__V) /
609 var_slow_time_dependent_potassium_current_Xs_gate__tau_xs =
611 var_slow_time_dependent_potassium_current_Xs_gate__alpha_xs *
612 var_slow_time_dependent_potassium_current_Xs_gate__beta_xs) +
615 var_slow_time_dependent_potassium_current_Xs_gate__xs_inf =
619 var_slow_time_dependent_potassium_current_Xs_gate__V) /
621 const NekDouble var_fast_sodium_current_m_gate__V =
622 var_fast_sodium_current__V;
623 const NekDouble var_fast_sodium_current_m_gate__alpha_m =
624 1.0 / (1.0 + exp(((-60.0) - var_fast_sodium_current_m_gate__V) /
626 const NekDouble var_fast_sodium_current_m_gate__beta_m =
628 (1.0 + exp((var_fast_sodium_current_m_gate__V + 35.0) / 5.0))) +
629 (0.1 / (1.0 + exp((var_fast_sodium_current_m_gate__V - 50.0) /
631 const NekDouble var_fast_sodium_current_m_gate__tau_m =
632 1.0 * var_fast_sodium_current_m_gate__alpha_m *
633 var_fast_sodium_current_m_gate__beta_m;
634 const NekDouble var_fast_sodium_current_m_gate__m_inf =
635 1.0 / pow(1.0 + exp(((-56.86) - var_fast_sodium_current_m_gate__V) /
638 const NekDouble var_fast_sodium_current_h_gate__V =
639 var_fast_sodium_current__V;
640 const NekDouble var_fast_sodium_current_h_gate__h_inf =
642 pow(1.0 + exp((var_fast_sodium_current_h_gate__V + 71.55) / 7.43),
644 const NekDouble var_fast_sodium_current_h_gate__beta_h =
645 (var_fast_sodium_current_h_gate__V < (-40.0))
646 ? ((2.7 * exp(0.079 * var_fast_sodium_current_h_gate__V)) +
647 (310000.0 * exp(0.3485 * var_fast_sodium_current_h_gate__V)))
650 (1.0 + exp((var_fast_sodium_current_h_gate__V + 10.66) /
652 const NekDouble var_fast_sodium_current_h_gate__alpha_h =
653 (var_fast_sodium_current_h_gate__V < (-40.0))
655 exp((-(var_fast_sodium_current_h_gate__V + 80.0)) / 6.8))
657 const NekDouble var_fast_sodium_current_h_gate__tau_h =
658 1.0 / (var_fast_sodium_current_h_gate__alpha_h +
659 var_fast_sodium_current_h_gate__beta_h);
660 const NekDouble var_fast_sodium_current_j_gate__V =
661 var_fast_sodium_current__V;
662 const NekDouble var_fast_sodium_current_j_gate__j_inf =
664 pow(1.0 + exp((var_fast_sodium_current_j_gate__V + 71.55) / 7.43),
666 const NekDouble var_fast_sodium_current_j_gate__alpha_j =
667 (var_fast_sodium_current_j_gate__V < (-40.0))
669 exp(0.2444 * var_fast_sodium_current_j_gate__V)) -
671 exp((-0.04391) * var_fast_sodium_current_j_gate__V))) *
672 (var_fast_sodium_current_j_gate__V + 37.78)) /
675 exp(0.311 * (var_fast_sodium_current_j_gate__V + 79.23))))
677 const NekDouble var_fast_sodium_current_j_gate__beta_j =
678 (var_fast_sodium_current_j_gate__V < (-40.0))
680 exp((-0.01052) * var_fast_sodium_current_j_gate__V)) /
681 (1.0 + exp((-0.1378) *
682 (var_fast_sodium_current_j_gate__V + 40.14))))
683 : ((0.6 * exp(0.057 * var_fast_sodium_current_j_gate__V)) /
684 (1.0 + exp((-0.1) * (var_fast_sodium_current_j_gate__V +
686 const NekDouble var_fast_sodium_current_j_gate__tau_j =
687 1.0 / (var_fast_sodium_current_j_gate__alpha_j +
688 var_fast_sodium_current_j_gate__beta_j);
689 const NekDouble var_L_type_Ca_current_d_gate__V =
690 var_L_type_Ca_current__V;
691 const NekDouble var_L_type_Ca_current_d_gate__alpha_d =
693 (1.0 + exp(((-35.0) - var_L_type_Ca_current_d_gate__V) / 13.0))) +
695 const NekDouble var_L_type_Ca_current_d_gate__gamma_d =
696 1.0 / (1.0 + exp((50.0 - var_L_type_Ca_current_d_gate__V) /
698 const NekDouble var_L_type_Ca_current_d_gate__beta_d =
699 1.4 / (1.0 + exp((var_L_type_Ca_current_d_gate__V + 5.0) /
701 const NekDouble var_L_type_Ca_current_d_gate__tau_d =
702 (1.0 * var_L_type_Ca_current_d_gate__alpha_d *
703 var_L_type_Ca_current_d_gate__beta_d) +
704 var_L_type_Ca_current_d_gate__gamma_d;
705 const NekDouble var_L_type_Ca_current_d_gate__d_inf =
706 1.0 / (1.0 + exp(((-8.0) - var_L_type_Ca_current_d_gate__V) /
708 const NekDouble var_L_type_Ca_current_f_gate__V =
709 var_L_type_Ca_current__V;
710 const NekDouble var_L_type_Ca_current_f_gate__tau_f =
712 exp((-pow(var_L_type_Ca_current_f_gate__V + 27.0, 2.0)) / 225.0)) +
714 (1.0 + exp((13.0 - var_L_type_Ca_current_f_gate__V) / 10.0))) +
716 (1.0 + exp((var_L_type_Ca_current_f_gate__V + 30.0) / 10.0))) +
718 const NekDouble var_L_type_Ca_current_f_gate__f_inf =
719 1.0 / (1.0 + exp((var_L_type_Ca_current_f_gate__V + 20.0) /
721 const NekDouble var_L_type_Ca_current_f2_gate__V =
722 var_L_type_Ca_current__V;
723 const NekDouble var_L_type_Ca_current_f2_gate__f2_inf =
725 (1.0 + exp((var_L_type_Ca_current_f2_gate__V + 35.0) / 7.0))) +
727 const NekDouble var_L_type_Ca_current_f2_gate__tau_f2 =
728 (562.0 * exp((-pow(var_L_type_Ca_current_f2_gate__V + 27.0, 2.0)) /
731 (1.0 + exp((25.0 - var_L_type_Ca_current_f2_gate__V) / 10.0))) +
732 (80.0 / (1.0 + exp((var_L_type_Ca_current_f2_gate__V + 30.0) /
734 const NekDouble var_L_type_Ca_current_fCass_gate__Ca_ss =
735 var_L_type_Ca_current__Ca_ss;
736 const NekDouble var_L_type_Ca_current_fCass_gate__tau_fCass =
738 (1.0 + pow(var_L_type_Ca_current_fCass_gate__Ca_ss / 0.05, 2.0))) +
740 const NekDouble var_L_type_Ca_current_fCass_gate__fCass_inf =
742 (1.0 + pow(var_L_type_Ca_current_fCass_gate__Ca_ss / 0.05, 2.0))) +
744 const NekDouble var_transient_outward_current_s_gate__V =
745 var_transient_outward_current__V;
746 const NekDouble var_transient_outward_current_s_gate__s_inf =
747 1.0 / (1.0 + exp((var_transient_outward_current_s_gate__V +
750 const NekDouble var_transient_outward_current_s_gate__tau_s =
752 exp((-pow(var_transient_outward_current_s_gate__V +
s_tau_f2,
758 (1.0 + exp((var_transient_outward_current_s_gate__V - 20.0) /
761 const NekDouble var_transient_outward_current_r_gate__V =
762 var_transient_outward_current__V;
763 const NekDouble var_transient_outward_current_r_gate__r_inf =
764 1.0 / (1.0 + exp((20.0 - var_transient_outward_current_r_gate__V) /
766 const NekDouble var_transient_outward_current_r_gate__tau_r =
768 exp((-pow(var_transient_outward_current_r_gate__V + 40.0, 2.0)) /
771 const NekDouble var_calcium_dynamics__Ca_i =
772 var_chaste_interface__calcium_dynamics__Ca_i;
773 const NekDouble var_calcium_dynamics__Ca_SR =
774 var_chaste_interface__calcium_dynamics__Ca_SR;
775 const NekDouble var_calcium_dynamics__Ca_ss =
776 var_chaste_interface__calcium_dynamics__Ca_ss;
777 const NekDouble var_calcium_dynamics__V_rel = 0.102;
778 const NekDouble var_calcium_dynamics__R_prime =
779 var_chaste_interface__calcium_dynamics__R_prime;
780 const NekDouble var_calcium_dynamics__k1_prime =
782 const NekDouble var_calcium_dynamics__max_sr = 2.5;
783 const NekDouble var_calcium_dynamics__EC = 1.5;
784 const NekDouble var_calcium_dynamics__min_sr = 1.0;
785 const NekDouble var_calcium_dynamics__kcasr =
786 var_calcium_dynamics__max_sr -
787 ((var_calcium_dynamics__max_sr - var_calcium_dynamics__min_sr) /
788 (1.0 + pow(var_calcium_dynamics__EC / var_calcium_dynamics__Ca_SR,
790 const NekDouble var_calcium_dynamics__k1 =
791 var_calcium_dynamics__k1_prime /
792 var_calcium_dynamics__kcasr;
793 const NekDouble var_calcium_dynamics__k3 = 0.06;
794 const NekDouble var_calcium_dynamics__O =
795 (var_calcium_dynamics__k1 * pow(var_calcium_dynamics__Ca_ss, 2.0) *
796 var_calcium_dynamics__R_prime) /
797 (var_calcium_dynamics__k3 +
798 (var_calcium_dynamics__k1 *
799 pow(var_calcium_dynamics__Ca_ss, 2.0)));
800 const NekDouble var_calcium_dynamics__i_rel =
801 var_calcium_dynamics__V_rel * var_calcium_dynamics__O *
802 (var_calcium_dynamics__Ca_SR -
803 var_calcium_dynamics__Ca_ss);
804 const NekDouble var_calcium_dynamics__Vmax_up =
806 const NekDouble var_calcium_dynamics__K_up = 0.00025;
807 const NekDouble var_calcium_dynamics__i_up =
808 var_calcium_dynamics__Vmax_up /
809 (1.0 + (pow(var_calcium_dynamics__K_up, 2.0) /
810 pow(var_calcium_dynamics__Ca_i,
812 const NekDouble var_calcium_dynamics__V_leak =
814 const NekDouble var_calcium_dynamics__i_leak =
815 var_calcium_dynamics__V_leak *
816 (var_calcium_dynamics__Ca_SR -
817 var_calcium_dynamics__Ca_i);
818 const NekDouble var_calcium_dynamics__V_xfer =
820 const NekDouble var_calcium_dynamics__i_xfer =
821 var_calcium_dynamics__V_xfer *
822 (var_calcium_dynamics__Ca_ss -
823 var_calcium_dynamics__Ca_i);
824 const NekDouble var_calcium_dynamics__k2_prime =
826 const NekDouble var_calcium_dynamics__k2 =
827 var_calcium_dynamics__k2_prime *
828 var_calcium_dynamics__kcasr;
829 const NekDouble var_calcium_dynamics__k4 = 0.005;
830 const NekDouble var_calcium_dynamics__Buf_c = 0.2;
831 const NekDouble var_calcium_dynamics__K_buf_c = 0.001;
832 const NekDouble var_calcium_dynamics__Ca_i_bufc =
835 ((var_calcium_dynamics__Buf_c * var_calcium_dynamics__K_buf_c) /
836 pow(var_calcium_dynamics__Ca_i + var_calcium_dynamics__K_buf_c,
838 const NekDouble var_calcium_dynamics__K_buf_sr = 0.3;
839 const NekDouble var_calcium_dynamics__Buf_sr = 10.0;
840 const NekDouble var_calcium_dynamics__Ca_sr_bufsr =
843 ((var_calcium_dynamics__Buf_sr * var_calcium_dynamics__K_buf_sr) /
844 pow(var_calcium_dynamics__Ca_SR + var_calcium_dynamics__K_buf_sr,
846 const NekDouble var_calcium_dynamics__Buf_ss = 0.4;
847 const NekDouble var_calcium_dynamics__K_buf_ss = 0.00025;
848 const NekDouble var_calcium_dynamics__Ca_ss_bufss =
851 ((var_calcium_dynamics__Buf_ss * var_calcium_dynamics__K_buf_ss) /
852 pow(var_calcium_dynamics__Ca_ss + var_calcium_dynamics__K_buf_ss,
854 const NekDouble var_calcium_dynamics__V_sr = 0.001094;
855 const NekDouble var_calcium_dynamics__V_ss = 5.468e-05;
856 const NekDouble var_calcium_dynamics__V_c =
858 const NekDouble var_calcium_dynamics__F =
860 const NekDouble var_calcium_dynamics__Cm = var_membrane__Cm;
861 const NekDouble var_calcium_dynamics__i_CaL =
862 var_L_type_Ca_current__i_CaL;
863 const NekDouble var_calcium_dynamics__i_NaCa =
864 var_sodium_calcium_exchanger_current__i_NaCa;
865 const NekDouble var_calcium_dynamics__i_p_Ca =
866 var_calcium_pump_current__i_p_Ca;
867 const NekDouble var_calcium_dynamics__i_b_Ca =
868 var_calcium_background_current__i_b_Ca;
869 const NekDouble var_calcium_dynamics__d_Ca_i_d_environment__time =
870 var_calcium_dynamics__Ca_i_bufc *
871 (((((var_calcium_dynamics__i_leak - var_calcium_dynamics__i_up) *
872 var_calcium_dynamics__V_sr) /
873 var_calcium_dynamics__V_c) +
874 var_calcium_dynamics__i_xfer) -
876 ((var_calcium_dynamics__i_b_Ca + var_calcium_dynamics__i_p_Ca) -
877 (2.0 * var_calcium_dynamics__i_NaCa)) *
878 var_calcium_dynamics__Cm) /
879 (2.0 * 1.0 * var_calcium_dynamics__V_c *
880 var_calcium_dynamics__F)));
882 const NekDouble var_calcium_dynamics__d_Ca_SR_d_environment__time =
883 var_calcium_dynamics__Ca_sr_bufsr *
884 (var_calcium_dynamics__i_up -
885 (var_calcium_dynamics__i_rel +
886 var_calcium_dynamics__i_leak));
888 const NekDouble var_calcium_dynamics__d_Ca_ss_d_environment__time =
889 var_calcium_dynamics__Ca_ss_bufss *
890 (((((-1.0) * var_calcium_dynamics__i_CaL *
891 var_calcium_dynamics__Cm) /
892 (2.0 * 1.0 * var_calcium_dynamics__V_ss *
893 var_calcium_dynamics__F)) +
894 ((var_calcium_dynamics__i_rel * var_calcium_dynamics__V_sr) /
895 var_calcium_dynamics__V_ss)) -
896 ((var_calcium_dynamics__i_xfer * var_calcium_dynamics__V_c) /
897 var_calcium_dynamics__V_ss));
899 const NekDouble var_calcium_dynamics__d_R_prime_d_environment__time =
900 ((-var_calcium_dynamics__k2) * var_calcium_dynamics__Ca_ss *
901 var_calcium_dynamics__R_prime) +
902 (var_calcium_dynamics__k4 *
903 (1.0 - var_calcium_dynamics__R_prime));
906 const NekDouble var_sodium_dynamics__Cm = var_membrane__Cm;
907 const NekDouble var_sodium_dynamics__V_c =
909 const NekDouble var_sodium_dynamics__i_Na =
910 var_fast_sodium_current__i_Na;
911 const NekDouble var_sodium_dynamics__i_NaCa =
912 var_sodium_calcium_exchanger_current__i_NaCa;
913 const NekDouble var_sodium_dynamics__i_NaK =
914 var_sodium_potassium_pump_current__i_NaK;
915 const NekDouble var_sodium_dynamics__i_b_Na =
916 var_sodium_background_current__i_b_Na;
917 const NekDouble var_sodium_dynamics__d_Na_i_d_environment__time =
919 (var_sodium_dynamics__i_Na + var_sodium_dynamics__i_b_Na +
920 (3.0 * var_sodium_dynamics__i_NaK) +
921 (3.0 * var_sodium_dynamics__i_NaCa))) /
922 (1.0 * var_sodium_dynamics__V_c * var_sodium_dynamics__F)) *
923 var_sodium_dynamics__Cm;
924 const NekDouble var_potassium_dynamics__F =
926 const NekDouble var_potassium_dynamics__Cm = var_membrane__Cm;
927 const NekDouble var_potassium_dynamics__V_c =
929 const NekDouble var_potassium_dynamics__i_K1 =
930 var_inward_rectifier_potassium_current__i_K1;
931 const NekDouble var_potassium_dynamics__i_to =
932 var_transient_outward_current__i_to;
933 const NekDouble var_potassium_dynamics__i_NaK =
934 var_sodium_potassium_pump_current__i_NaK;
935 const NekDouble var_potassium_dynamics__i_Kr =
936 var_rapid_time_dependent_potassium_current__i_Kr;
937 const NekDouble var_potassium_dynamics__i_Ks =
938 var_slow_time_dependent_potassium_current__i_Ks;
939 const NekDouble var_potassium_dynamics__i_p_K =
940 var_potassium_pump_current__i_p_K;
942 var_potassium_dynamics__chaste_interface__chaste_membrane_capacitance =
944 const NekDouble var_potassium_dynamics__i_Stim_converter =
945 var_chaste_interface__membrane__i_Stim;
946 const NekDouble var_potassium_dynamics__i_Stim =
947 var_potassium_dynamics__i_Stim_converter /
948 var_potassium_dynamics__chaste_interface__chaste_membrane_capacitance;
949 const NekDouble var_potassium_dynamics__d_K_i_d_environment__time =
951 ((var_potassium_dynamics__i_K1 + var_potassium_dynamics__i_to +
952 var_potassium_dynamics__i_Kr + var_potassium_dynamics__i_Ks +
953 var_potassium_dynamics__i_p_K +
954 var_potassium_dynamics__i_Stim) -
955 (2.0 * var_potassium_dynamics__i_NaK))) /
956 (1.0 * var_potassium_dynamics__V_c * var_potassium_dynamics__F)) *
957 var_potassium_dynamics__Cm;
959 var_chaste_interface__calcium_dynamics__d_Ca_i_d_environment__time =
960 var_calcium_dynamics__d_Ca_i_d_environment__time;
962 var_chaste_interface__calcium_dynamics__d_Ca_SR_d_environment__time =
963 var_calcium_dynamics__d_Ca_SR_d_environment__time;
965 var_chaste_interface__calcium_dynamics__d_Ca_ss_d_environment__time =
966 var_calcium_dynamics__d_Ca_ss_d_environment__time;
968 var_chaste_interface__calcium_dynamics__d_R_prime_d_environment__time =
969 var_calcium_dynamics__d_R_prime_d_environment__time;
971 var_chaste_interface__sodium_dynamics__d_Na_i_d_environment__time =
972 var_sodium_dynamics__d_Na_i_d_environment__time;
974 var_chaste_interface__potassium_dynamics__d_K_i_d_environment__time =
975 var_potassium_dynamics__d_K_i_d_environment__time;
976 const NekDouble d_dt_chaste_interface__calcium_dynamics__Ca_i =
977 var_chaste_interface__calcium_dynamics__d_Ca_i_d_environment__time;
978 const NekDouble d_dt_chaste_interface__calcium_dynamics__Ca_SR =
979 var_chaste_interface__calcium_dynamics__d_Ca_SR_d_environment__time;
980 const NekDouble d_dt_chaste_interface__calcium_dynamics__Ca_ss =
981 var_chaste_interface__calcium_dynamics__d_Ca_ss_d_environment__time;
982 const NekDouble d_dt_chaste_interface__calcium_dynamics__R_prime =
983 var_chaste_interface__calcium_dynamics__d_R_prime_d_environment__time;
984 const NekDouble d_dt_chaste_interface__sodium_dynamics__Na_i =
985 var_chaste_interface__sodium_dynamics__d_Na_i_d_environment__time;
986 const NekDouble d_dt_chaste_interface__potassium_dynamics__K_i =
987 var_chaste_interface__potassium_dynamics__d_K_i_d_environment__time;
990 var_inward_rectifier_potassium_current__i_K1;
992 var_transient_outward_current__i_to;
994 var_rapid_time_dependent_potassium_current__i_Kr;
996 var_slow_time_dependent_potassium_current__i_Ks;
998 var_L_type_Ca_current__i_CaL;
1000 var_sodium_potassium_pump_current__i_NaK;
1002 var_fast_sodium_current__i_Na;
1004 var_sodium_background_current__i_b_Na;
1006 var_sodium_calcium_exchanger_current__i_NaCa;
1008 var_calcium_background_current__i_b_Ca;
1010 var_potassium_pump_current__i_p_K;
1012 var_calcium_pump_current__i_p_Ca;
1013 const NekDouble var_membrane__i_Stim_converter =
1014 var_chaste_interface__membrane__i_Stim;
1016 var_membrane__chaste_interface__chaste_membrane_capacitance =
1019 var_membrane__i_Stim_converter /
1020 var_membrane__chaste_interface__chaste_membrane_capacitance;
1021 const NekDouble var_membrane__d_V_d_environment__time =
1023 (var_membrane__i_K1 + var_membrane__i_to + var_membrane__i_Kr +
1024 var_membrane__i_Ks + var_membrane__i_CaL + var_membrane__i_NaK +
1025 var_membrane__i_Na + var_membrane__i_b_Na + var_membrane__i_NaCa +
1026 var_membrane__i_b_Ca + var_membrane__i_p_K + var_membrane__i_p_Ca +
1027 var_membrane__i_Stim);
1029 var_chaste_interface__membrane__d_V_d_environment__time =
1030 var_membrane__d_V_d_environment__time;
1031 d_dt_chaste_interface__membrane__V =
1032 var_chaste_interface__membrane__d_V_d_environment__time;
1035 outarray[0][i] = d_dt_chaste_interface__membrane__V;
1037 var_rapid_time_dependent_potassium_current_Xr1_gate__xr1_inf;
1039 var_rapid_time_dependent_potassium_current_Xr1_gate__tau_xr1;
1041 var_rapid_time_dependent_potassium_current_Xr2_gate__xr2_inf;
1043 var_rapid_time_dependent_potassium_current_Xr2_gate__tau_xr2;
1045 var_slow_time_dependent_potassium_current_Xs_gate__xs_inf;
1047 var_slow_time_dependent_potassium_current_Xs_gate__tau_xs;
1048 outarray[4][i] = var_fast_sodium_current_m_gate__m_inf;
1049 m_gates_tau[3][i] = var_fast_sodium_current_m_gate__tau_m;
1050 outarray[5][i] = var_fast_sodium_current_h_gate__h_inf;
1051 m_gates_tau[4][i] = var_fast_sodium_current_h_gate__tau_h;
1052 outarray[6][i] = var_fast_sodium_current_j_gate__j_inf;
1053 m_gates_tau[5][i] = var_fast_sodium_current_j_gate__tau_j;
1054 outarray[7][i] = var_L_type_Ca_current_d_gate__d_inf;
1055 m_gates_tau[6][i] = var_L_type_Ca_current_d_gate__tau_d;
1056 outarray[8][i] = var_L_type_Ca_current_f_gate__f_inf;
1057 m_gates_tau[7][i] = var_L_type_Ca_current_f_gate__tau_f;
1058 outarray[9][i] = var_L_type_Ca_current_f2_gate__f2_inf;
1059 m_gates_tau[8][i] = var_L_type_Ca_current_f2_gate__tau_f2;
1060 outarray[10][i] = var_L_type_Ca_current_fCass_gate__fCass_inf;
1061 m_gates_tau[9][i] = var_L_type_Ca_current_fCass_gate__tau_fCass;
1062 outarray[11][i] = var_transient_outward_current_s_gate__s_inf;
1063 m_gates_tau[10][i] = var_transient_outward_current_s_gate__tau_s;
1064 outarray[12][i] = var_transient_outward_current_r_gate__r_inf;
1065 m_gates_tau[11][i] = var_transient_outward_current_r_gate__tau_r;
1066 outarray[13][i] = d_dt_chaste_interface__calcium_dynamics__Ca_i;
1067 outarray[14][i] = d_dt_chaste_interface__calcium_dynamics__Ca_SR;
1068 outarray[15][i] = d_dt_chaste_interface__calcium_dynamics__Ca_ss;
1069 outarray[16][i] = d_dt_chaste_interface__calcium_dynamics__R_prime;
1070 outarray[17][i] = d_dt_chaste_interface__sodium_dynamics__Na_i;
1071 outarray[18][i] = d_dt_chaste_interface__potassium_dynamics__K_i;
Array< OneD, Array< OneD, NekDouble > > m_cellSol
Cell model solution variables.
std::vector< int > m_concentrations
Indices of cell model variables which are concentrations.
std::vector< int > m_gates
Indices of cell model variables which are gates.
size_t m_nq
Number of physical points.
size_t m_nvar
Number of variables in cell model (inc. transmembrane voltage)
Array< OneD, Array< OneD, NekDouble > > m_gates_tau
Storage for gate tau values.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
static std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value.
static std::string RegisterDefaultSolverInfo(const std::string &pName, const std::string &pValue)
Registers the default string value of a solver info property.
TenTusscher06(const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField)
Constructor.
static std::string lookupIds[]
enum Variants model_variant
void v_GenerateSummary(SummaryList &s) override
Prints a summary of the model parameters.
void v_Update(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time) override
void v_SetInitialConditions() override
static CellModelSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField)
Creates an instance of this class.
static std::string className
Name of class.
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
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
CellModelFactory & GetCellModelFactory()
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
scalarT< T > log(scalarT< T > in)
scalarT< T > sqrt(scalarT< T > in)