46 std::string CourtemancheRamirezNattel98::className
48 "CourtemancheRamirezNattel98",
49 CourtemancheRamirezNattel98::create,
50 "Ionic model of human atrial cell electrophysiology.");
53 std::string CourtemancheRamirezNattel98::lookupIds[2] = {
54 LibUtilities::SessionReader::RegisterEnumValue(
"CellModelVariant",
55 "Original", CourtemancheRamirezNattel98::eOriginal),
56 LibUtilities::SessionReader::RegisterEnumValue(
"CellModelVariant",
57 "AF", CourtemancheRamirezNattel98::eAF)
61 std::string CourtemancheRamirezNattel98::def =
62 LibUtilities::SessionReader::RegisterDefaultSolverInfo(
63 "CellModelVariant",
"Original");
68 CourtemancheRamirezNattel98::CourtemancheRamirezNattel98(
167 const Array<
OneD,
const Array<OneD, NekDouble> >&inarray,
168 Array<
OneD, Array<OneD, NekDouble> >&outarray,
171 ASSERTL0(inarray.get() != outarray.get(),
172 "Must have different arrays for input and output.");
201 Array<OneD, NekDouble> &tmp = outarray[11];
202 Array<OneD, NekDouble> &tmp2 = outarray[12];
205 Array<OneD, NekDouble> &tmp_E_na = outarray[14];
211 Array<OneD, NekDouble> &tmp_I_Na = outarray[15];
212 Vmath::Vsub(n, inarray[0], 1, tmp_E_na, 1, tmp_I_Na, 1);
213 Vmath::Vmul(n, inarray[1], 1, tmp_I_Na, 1, tmp_I_Na, 1);
214 Vmath::Vmul(n, inarray[1], 1, tmp_I_Na, 1, tmp_I_Na, 1);
215 Vmath::Vmul(n, inarray[1], 1, tmp_I_Na, 1, tmp_I_Na, 1);
216 Vmath::Vmul(n, inarray[2], 1, tmp_I_Na, 1, tmp_I_Na, 1);
217 Vmath::Vmul(n, inarray[3], 1, tmp_I_Na, 1, tmp_I_Na, 1);
219 Vmath::Vsub(n, outarray[0], 1, tmp_I_Na, 1, outarray[0], 1);
220 Vmath::Smul(n, -1.0, tmp_I_Na, 1, outarray[16], 1);
223 Array<OneD, NekDouble> &tmp_I_b_Na = outarray[15];
224 Vmath::Vsub(n, inarray[0], 1, tmp_E_na, 1, tmp_I_b_Na, 1);
226 Vmath::Vsub(n, outarray[0], 1, tmp_I_b_Na, 1, outarray[0], 1);
227 Vmath::Vsub(n, outarray[16], 1, tmp_I_b_Na, 1, outarray[16], 1);
230 Array<OneD, NekDouble> &tmp_V_E_k = outarray[14];
234 Vmath::Vsub(n, inarray[0], 1, tmp_V_E_k, 1, tmp_V_E_k, 1);
237 Array<OneD, NekDouble> &tmp_I_K1 = outarray[15];
242 Vmath::Vdiv(n, tmp_V_E_k, 1, tmp_I_K1, 1, tmp_I_K1, 1);
244 Vmath::Vsub(n, outarray[0], 1, tmp_I_K1, 1, outarray[0], 1);
245 Vmath::Smul(n, -1.0, tmp_I_K1, 1, outarray[18], 1);
248 Array<OneD, NekDouble> &tmp_I_to = outarray[15];
249 Vmath::Vmul(n, inarray[5], 1, tmp_V_E_k, 1, tmp_I_to, 1);
250 Vmath::Vmul(n, inarray[4], 1, tmp_I_to, 1, tmp_I_to, 1);
251 Vmath::Vmul(n, inarray[4], 1, tmp_I_to, 1, tmp_I_to, 1);
252 Vmath::Vmul(n, inarray[4], 1, tmp_I_to, 1, tmp_I_to, 1);
254 Vmath::Vsub(n, outarray[0], 1, tmp_I_to, 1, outarray[0], 1);
255 Vmath::Vsub(n, outarray[18], 1, tmp_I_to, 1, outarray[18], 1);
258 Array<OneD, NekDouble> &tmp_I_kur = outarray[15];
259 Vmath::Sadd(n, -15.0, inarray[0], 1, tmp_I_kur, 1);
260 Vmath::Smul(n, -1.0/13.0, tmp_I_kur, 1, tmp_I_kur, 1);
265 Vmath::Vmul(n, tmp_V_E_k, 1, tmp_I_kur, 1, tmp_I_kur, 1);
266 Vmath::Vmul(n, inarray[6], 1, tmp_I_kur, 1, tmp_I_kur, 1);
267 Vmath::Vmul(n, inarray[6], 1, tmp_I_kur, 1, tmp_I_kur, 1);
268 Vmath::Vmul(n, inarray[6], 1, tmp_I_kur, 1, tmp_I_kur, 1);
269 Vmath::Vmul(n, inarray[7], 1, tmp_I_kur, 1, tmp_I_kur, 1);
271 Vmath::Vsub(n, outarray[0], 1, tmp_I_kur, 1, outarray[0], 1);
272 Vmath::Vsub(n, outarray[18], 1, tmp_I_kur, 1, outarray[18], 1);
275 Array<OneD, NekDouble> &tmp_I_Kr = outarray[15];
277 Vmath::Smul(n, 1.0/22.4, tmp_I_Kr, 1, tmp_I_Kr, 1);
280 Vmath::Vdiv(n, tmp_V_E_k, 1, tmp_I_Kr, 1, tmp_I_Kr, 1);
281 Vmath::Vmul(n, inarray[8], 1, tmp_I_Kr, 1, tmp_I_Kr, 1);
283 Vmath::Vsub(n, outarray[0], 1, tmp_I_Kr, 1, outarray[0], 1);
284 Vmath::Vsub(n, outarray[18], 1, tmp_I_Kr, 1, outarray[18], 1);
287 Array<OneD, NekDouble> &tmp_I_Ks = outarray[15];
288 Vmath::Vmul(n, inarray[9], 1, tmp_V_E_k, 1, tmp_I_Ks, 1);
289 Vmath::Vmul(n, inarray[9], 1, tmp_I_Ks, 1, tmp_I_Ks, 1);
291 Vmath::Vsub(n, outarray[0], 1, tmp_I_Ks, 1, outarray[0], 1);
292 Vmath::Vsub(n, outarray[18], 1, tmp_I_Ks, 1, outarray[18], 1);
295 Array<OneD, NekDouble> &tmp_I_b_Ca = outarray[1];
299 Vmath::Vsub(n, inarray[0], 1, tmp_I_b_Ca, 1, tmp_I_b_Ca, 1);
301 Vmath::Vsub(n, outarray[0], 1, tmp_I_b_Ca, 1, outarray[0], 1);
304 Array<OneD, NekDouble> &tmp_I_Ca_L = outarray[2];
305 Vmath::Sadd(n, -65.0, inarray[0], 1, tmp_I_Ca_L, 1);
306 Vmath::Vmul(n, inarray[10], 1, tmp_I_Ca_L, 1, tmp_I_Ca_L, 1);
307 Vmath::Vmul(n, inarray[11], 1, tmp_I_Ca_L, 1, tmp_I_Ca_L, 1);
308 Vmath::Vmul(n, inarray[12], 1, tmp_I_Ca_L, 1, tmp_I_Ca_L, 1);
310 Vmath::Vsub(n, outarray[0], 1, tmp_I_Ca_L, 1, outarray[0], 1);
313 Array<OneD, NekDouble> &tmp_f_Na_k = outarray[14];
319 Vmath::Smul(n, 0.1245, tmp_f_Na_k, 1, tmp_f_Na_k, 1);
320 Vmath::Vadd(n, tmp_f_Na_k, 1, tmp, 1, tmp_f_Na_k, 1);
323 Array<OneD, NekDouble> &tmp_I_Na_K = outarray[15];
327 Vmath::Vmul(n, tmp_f_Na_k, 1, tmp_I_Na_K, 1, tmp_I_Na_K, 1);
329 Vmath::Vsub(n, outarray[0], 1, tmp_I_Na_K, 1, outarray[0], 1);
330 Vmath::Svtvp(n, -3.0, tmp_I_Na_K, 1, outarray[16], 1, outarray[16], 1);
331 Vmath::Svtvp(n, 2.0, tmp_I_Na_K, 1, outarray[18], 1, outarray[18], 1);
334 Array<OneD, NekDouble> &tmp_I_Na_Ca = outarray[3];
338 Vmath::Sadd(n, 1.0, tmp_I_Na_Ca, 1, tmp_I_Na_Ca, 1);
350 Vmath::Vdiv(n, tmp, 1, tmp_I_Na_Ca, 1, tmp_I_Na_Ca, 1);
351 Vmath::Vsub(n, outarray[0], 1, tmp_I_Na_Ca, 1, outarray[0], 1);
352 Vmath::Svtvp(n, -3.0, tmp_I_Na_Ca, 1, outarray[16], 1, outarray[16], 1);
355 Array<OneD, NekDouble> &tmp_I_p_Ca = outarray[4];
356 Vmath::Sadd(n, 0.0005, inarray[17], 1, tmp_I_p_Ca, 1);
357 Vmath::Vdiv(n, inarray[17], 1, tmp_I_p_Ca, 1, tmp_I_p_Ca, 1);
359 Vmath::Vsub(n, outarray[0], 1, tmp_I_p_Ca, 1, outarray[0], 1);
369 Array<OneD, NekDouble> &tmp_I_tr = outarray[5];
370 Vmath::Vsub(n, inarray[20], 1, inarray[19], 1, tmp_I_tr, 1);
374 Array<OneD, NekDouble> &tmp_I_up_leak = outarray[6];
378 Array<OneD, NekDouble> &tmp_I_up = outarray[7];
384 Array<OneD, NekDouble> &tmp_I_rel = outarray[8];
385 Vmath::Vsub(n, inarray[19], 1, inarray[17], 1, tmp_I_rel, 1);
386 Vmath::Vmul(n, tmp_I_rel, 1, inarray[13], 1, tmp_I_rel, 1);
387 Vmath::Vmul(n, tmp_I_rel, 1, inarray[13], 1, tmp_I_rel, 1);
388 Vmath::Vmul(n, tmp_I_rel, 1, inarray[14], 1, tmp_I_rel, 1);
389 Vmath::Vmul(n, tmp_I_rel, 1, inarray[15], 1, tmp_I_rel, 1);
393 Array<OneD, NekDouble> &tmp_B1 = outarray[9];
394 Vmath::Svtvm(n, 2.0, tmp_I_Na_Ca, 1, tmp_I_p_Ca, 1, tmp_B1, 1);
395 Vmath::Vsub(n, tmp_B1, 1, tmp_I_Ca_L, 1, tmp_B1, 1);
396 Vmath::Vsub(n, tmp_B1, 1, tmp_I_b_Ca, 1, tmp_B1, 1);
404 Array<OneD, NekDouble> &tmp_B2 = outarray[10];
415 Vmath::Vdiv(n, tmp_B1, 1, tmp_B2, 1, outarray[17], 1);
418 Vmath::Vsub(n, tmp_I_up, 1, tmp_I_up_leak, 1, outarray[20], 1);
424 Vmath::Vmul(n, outarray[19], 1, outarray[19], 1, outarray[19], 1);
426 Vmath::Sadd(n, 1.0, outarray[19], 1, outarray[19], 1);
427 Vmath::Vdiv(n, tmp, 1, outarray[19], 1, outarray[19], 1);
435 for (i = 0, v = &inarray[0][0], x = &inarray[1][0], x_new = &outarray[1][0], x_tau = &
m_gates_tau[0][0];
436 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
438 alpha = (*v == (-47.13)) ? 3.2 : (0.32*(*v+47.13))/(1.0-exp((-0.1)*(*v + 47.13)));
439 beta = 0.08*exp(-(*v)/11.0);
440 *x_tau = 1.0/(alpha + beta);
441 *x_new = alpha*(*x_tau);
444 for (i = 0, v = &inarray[0][0], x = &inarray[2][0], x_new = &outarray[2][0], x_tau = &
m_gates_tau[1][0];
445 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
447 alpha = (*v >= -40.0) ? 0.0 : 0.135*exp(-((*v)+80.0)/6.8);
448 beta = (*v >= -40.0) ? 1.0/(0.13*(1.0+exp(-(*v + 10.66)/11.1)))
449 : 3.56*exp(0.079*(*v))+310000.0*exp(0.35*(*v));
450 *x_tau = 1.0/(alpha + beta);
451 *x_new = alpha*(*x_tau);
454 for (i = 0, v = &inarray[0][0], x = &inarray[3][0], x_new = &outarray[3][0], x_tau = &
m_gates_tau[2][0];
455 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
457 alpha = (*v >= -40.0) ? 0.0
458 : (-127140.0*exp(0.2444*(*v))-3.474e-05*exp(-0.04391*(*v)))*(((*v)+37.78)/(1.0+exp(0.311*((*v)+79.23))));
459 beta = (*v >= -40.0) ? (0.3*exp(-2.535e-07*(*v))/(1.0+exp(-0.1*(*v+32.0))))
460 : 0.1212*exp(-0.01052*(*v))/(1.0+exp(-0.1378*(*v+40.14)));
461 *x_tau = 1.0/(alpha + beta);
462 *x_new = alpha*(*x_tau);
465 for (i = 0, v = &inarray[0][0], x = &inarray[4][0], x_new = &outarray[4][0], x_tau = &
m_gates_tau[3][0];
466 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
468 alpha = 0.65/(exp(-(*v+10.0)/8.5) + exp(-(*v-30.0)/59.0));
469 beta = 0.65/(2.5 + exp((*v+82.0)/17.0));
470 *x_tau = 1.0/
K_Q10/(alpha + beta);
471 *x_new = (1.0/(1.0+exp(-(*v+20.47)/17.54)));
474 for (i = 0, v = &inarray[0][0], x = &inarray[5][0], x_new = &outarray[5][0], x_tau = &
m_gates_tau[4][0];
475 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
477 alpha = 1.0/(18.53 + exp((*v+113.7)/10.95));
478 beta = 1.0/(35.56 + exp(-(*v+1.26)/7.44));
479 *x_tau = 1.0/
K_Q10/(alpha + beta);
480 *x_new = (1.0/(1.0+exp((*v+43.1)/5.3)));
483 for (i = 0, v = &inarray[0][0], x = &inarray[6][0], x_new = &outarray[6][0], x_tau = &
m_gates_tau[5][0];
484 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
486 alpha = 0.65/(exp(-(*v+10.0)/8.5)+exp(-(*v-30.0)/59.0));
487 beta = 0.65/(2.5+exp((*v+82.0)/17.0));
488 *x_tau = 1.0/
K_Q10/(alpha + beta);
489 *x_new = 1.0/(1.0+exp(-(*v+30.3)/9.6));
492 for (i = 0, v = &inarray[0][0], x = &inarray[7][0], x_new = &outarray[7][0], x_tau = &
m_gates_tau[6][0];
493 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
495 alpha = 1.0/(21.0 + exp(-(*v-185.0)/28.0));
496 beta = exp((*v-158.0)/16.0);
497 *x_tau = 1.0/
K_Q10/(alpha + beta);
498 *x_new = 1.0/(1.0+exp((*v-99.45)/27.48));
501 for (i = 0, v = &inarray[0][0], x = &inarray[8][0], x_new = &outarray[8][0], x_tau = &
m_gates_tau[7][0];
502 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
504 alpha = 0.0003*(*v+14.1)/(1-exp(-(*v+14.1)/5.0));
505 beta = 7.3898e-5*(*v-3.3328)/(exp((*v-3.3328)/5.1237)-1.0);
506 *x_tau = 1.0/(alpha + beta);
507 *x_new = 1.0/(1+exp(-(*v+14.1)/6.5));
510 for (i = 0, v = &inarray[0][0], x = &inarray[9][0], x_new = &outarray[9][0], x_tau = &
m_gates_tau[8][0];
511 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
513 alpha = 4e-5*(*v-19.9)/(1.0-exp(-(*v-19.9)/17.0));
514 beta = 3.5e-5*(*v-19.9)/(exp((*v-19.9)/9.0)-1.0);
515 *x_tau = 0.5/(alpha + beta);
516 *x_new = 1.0/sqrt(1.0+exp(-(*v-19.9)/12.7));
519 for (i = 0, v = &inarray[0][0], x = &inarray[10][0], x_new = &outarray[10][0], x_tau = &
m_gates_tau[9][0];
520 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
522 *x_tau = (1-exp(-(*v+10.0)/6.24))/(0.035*(*v+10.0)*(1+exp(-(*v+10.0)/6.24)));
523 *x_new = 1.0/(1.0 + exp(-(*v+10)/8.0));
526 for (i = 0, v = &inarray[0][0], x = &inarray[11][0], x_new = &outarray[11][0], x_tau = &
m_gates_tau[10][0];
527 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
530 *x_tau = 9.0/(0.0197*exp(-0.0337*0.0337*(*v+10.0)*(*v+10.0))+0.02);
531 *x_new = exp((-(*v + 28.0)) / 6.9) / (1.0 + exp((-(*v + 28.0)) / 6.9));
534 for (i = 0, v = &inarray[0][0], x = &inarray[12][0], x_new = &outarray[12][0], x_tau = &
m_gates_tau[11][0];
535 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
538 *x_new = 1.0/(1.0+inarray[17][i]/0.00035);
541 Array<OneD, NekDouble> &tmp_Fn = outarray[15];
542 Vmath::Svtsvtp(n, 0.5*5e-13/
F, tmp_I_Ca_L, 1, -0.2*5e-13/
F, tmp_I_Na_Ca, 1, tmp_Fn, 1);
546 for (i = 0, v = &tmp_Fn[0], x = &inarray[13][0], x_new = &outarray[13][0], x_tau = &
m_gates_tau[12][0];
547 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
550 *x_new = 1.0/(1.0 + exp(-(*v - 3.4175e-13)/1.367e-15));
553 for (i = 0, v = &tmp_Fn[0], x = &inarray[14][0], x_new = &outarray[14][0], x_tau = &
m_gates_tau[13][0];
554 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
556 *x_tau = 1.91 + 2.09/(1.0+exp(-(*v - 3.4175e-13)/13.67e-16));
557 *x_new = 1.0 - 1.0/(1.0 + exp(-(*v - 6.835e-14)/13.67e-16));
560 for (i = 0, v = &inarray[0][0], x = &inarray[15][0], x_new = &outarray[15][0], x_tau = &
m_gates_tau[14][0];
561 i < n; ++i, ++v, ++x, ++x_new, ++x_tau)
563 *x_tau = 6.0*(1.0-exp(-(*v-7.9)/5.0))/(1.0+0.3*exp(-(*v-7.9)/5.0))/(*v-7.9);
564 *x_new = 1.0 - 1.0/(1.0 + exp(-(*v - 40.0)/17.0));
613 case 4:
return "o_a";
614 case 5:
return "o_i";
615 case 6:
return "u_a";
616 case 7:
return "u_i";
617 case 8:
return "x_r";
618 case 9:
return "x_s";
621 case 12:
return "f_Ca";
625 case 16:
return "Na_i";
626 case 17:
return "Ca_i";
627 case 18:
return "K_i";
628 case 19:
return "Ca_rel";
629 case 20:
return "Ca_up";
630 default:
return "unknown";