48 "ten Tusscher 2006.");
63 "CellModelVariant",
"eEpicardium");
153 for (
unsigned int i = 0; i <
m_nq; ++i)
157 NekDouble var_chaste_interface__membrane__V = inarray[0][i];
159 NekDouble var_chaste_interface__rapid_time_dependent_potassium_current_Xr1_gate__Xr1 = inarray[1][i];
161 NekDouble var_chaste_interface__rapid_time_dependent_potassium_current_Xr2_gate__Xr2 = inarray[2][i];
163 NekDouble var_chaste_interface__slow_time_dependent_potassium_current_Xs_gate__Xs = inarray[3][i];
165 NekDouble var_chaste_interface__fast_sodium_current_m_gate__m = inarray[4][i];
167 NekDouble var_chaste_interface__fast_sodium_current_h_gate__h = inarray[5][i];
169 NekDouble var_chaste_interface__fast_sodium_current_j_gate__j = inarray[6][i];
171 NekDouble var_chaste_interface__L_type_Ca_current_d_gate__d = inarray[7][i];
173 NekDouble var_chaste_interface__L_type_Ca_current_f_gate__f = inarray[8][i];
175 NekDouble var_chaste_interface__L_type_Ca_current_f2_gate__f2 = inarray[9][i];
177 NekDouble var_chaste_interface__L_type_Ca_current_fCass_gate__fCass = inarray[10][i];
179 NekDouble var_chaste_interface__transient_outward_current_s_gate__s = inarray[11][i];
181 NekDouble var_chaste_interface__transient_outward_current_r_gate__r = inarray[12][i];
183 NekDouble var_chaste_interface__calcium_dynamics__Ca_i = inarray[13][i];
185 NekDouble var_chaste_interface__calcium_dynamics__Ca_SR = inarray[14][i];
187 NekDouble var_chaste_interface__calcium_dynamics__Ca_ss = inarray[15][i];
189 NekDouble var_chaste_interface__calcium_dynamics__R_prime = inarray[16][i];
191 NekDouble var_chaste_interface__sodium_dynamics__Na_i = inarray[17][i];
193 NekDouble var_chaste_interface__potassium_dynamics__K_i = inarray[18][i];
198 NekDouble d_dt_chaste_interface__membrane__V;
199 const NekDouble var_membrane__R = 8314.472;
201 const NekDouble var_membrane__F = 96485.3415;
202 const NekDouble var_membrane__Cm = 0.185;
203 const NekDouble var_membrane__V_c = 0.016404;
204 const NekDouble var_inward_rectifier_potassium_current__V = var_chaste_interface__membrane__V;
205 const NekDouble var_reversal_potentials__K_i = var_chaste_interface__potassium_dynamics__K_i;
206 const NekDouble var_reversal_potentials__R = var_membrane__R;
207 const NekDouble var_reversal_potentials__T = var_membrane__T;
208 const NekDouble var_reversal_potentials__F = var_membrane__F;
210 const NekDouble var_reversal_potentials__K_o = var_potassium_dynamics__K_o;
211 const NekDouble var_reversal_potentials__E_K = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log(var_reversal_potentials__K_o / var_reversal_potentials__K_i);
212 const NekDouble var_inward_rectifier_potassium_current__E_K = var_reversal_potentials__E_K;
213 const NekDouble var_inward_rectifier_potassium_current__beta_K1 = ((3.0 * exp(0.0002 * ((var_inward_rectifier_potassium_current__V - var_inward_rectifier_potassium_current__E_K) + 100.0))) + exp(0.1 * ((var_inward_rectifier_potassium_current__V - var_inward_rectifier_potassium_current__E_K) - 10.0))) / (1.0 + exp((-0.5) * (var_inward_rectifier_potassium_current__V - var_inward_rectifier_potassium_current__E_K)));
214 const NekDouble var_inward_rectifier_potassium_current__alpha_K1 = 0.1 / (1.0 + exp(0.06 * ((var_inward_rectifier_potassium_current__V - var_inward_rectifier_potassium_current__E_K) - 200.0)));
215 const NekDouble var_inward_rectifier_potassium_current__xK1_inf = var_inward_rectifier_potassium_current__alpha_K1 / (var_inward_rectifier_potassium_current__alpha_K1 + var_inward_rectifier_potassium_current__beta_K1);
216 const NekDouble var_inward_rectifier_potassium_current__K_o = var_potassium_dynamics__K_o;
217 const NekDouble var_inward_rectifier_potassium_current__g_K1 = 5.405;
218 const NekDouble var_inward_rectifier_potassium_current__i_K1 = var_inward_rectifier_potassium_current__g_K1 * var_inward_rectifier_potassium_current__xK1_inf * sqrt(var_inward_rectifier_potassium_current__K_o / 5.4) * (var_inward_rectifier_potassium_current__V - var_inward_rectifier_potassium_current__E_K);
219 const NekDouble var_transient_outward_current__s = var_chaste_interface__transient_outward_current_s_gate__s;
220 const NekDouble var_transient_outward_current__r = var_chaste_interface__transient_outward_current_r_gate__r;
222 const NekDouble var_transient_outward_current__V = var_chaste_interface__membrane__V;
223 const NekDouble var_transient_outward_current__E_K = var_reversal_potentials__E_K;
224 const NekDouble var_transient_outward_current__i_to = var_transient_outward_current__g_to * var_transient_outward_current__r * var_transient_outward_current__s * (var_transient_outward_current__V - var_transient_outward_current__E_K);
225 const NekDouble var_rapid_time_dependent_potassium_current__Xr1 = var_chaste_interface__rapid_time_dependent_potassium_current_Xr1_gate__Xr1;
226 const NekDouble var_rapid_time_dependent_potassium_current__Xr2 = var_chaste_interface__rapid_time_dependent_potassium_current_Xr2_gate__Xr2;
227 const NekDouble var_rapid_time_dependent_potassium_current__V = var_chaste_interface__membrane__V;
228 const NekDouble var_rapid_time_dependent_potassium_current__K_o = var_potassium_dynamics__K_o;
229 const NekDouble var_rapid_time_dependent_potassium_current__E_K = var_reversal_potentials__E_K;
230 const NekDouble var_rapid_time_dependent_potassium_current__g_Kr = 0.153;
231 const NekDouble var_rapid_time_dependent_potassium_current__i_Kr = var_rapid_time_dependent_potassium_current__g_Kr * sqrt(var_rapid_time_dependent_potassium_current__K_o / 5.4) * var_rapid_time_dependent_potassium_current__Xr1 * var_rapid_time_dependent_potassium_current__Xr2 * (var_rapid_time_dependent_potassium_current__V - var_rapid_time_dependent_potassium_current__E_K);
232 const NekDouble var_slow_time_dependent_potassium_current__g_Ks =
g_Ks;
233 const NekDouble var_sodium_dynamics__Na_o = 140.0;
234 const NekDouble var_reversal_potentials__Na_o = var_sodium_dynamics__Na_o;
235 const NekDouble var_reversal_potentials__Na_i = var_chaste_interface__sodium_dynamics__Na_i;
236 const NekDouble var_reversal_potentials__P_kna = 0.03;
237 const NekDouble var_reversal_potentials__E_Ks = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log((var_reversal_potentials__K_o + (var_reversal_potentials__P_kna * var_reversal_potentials__Na_o)) / (var_reversal_potentials__K_i + (var_reversal_potentials__P_kna * var_reversal_potentials__Na_i)));
238 const NekDouble var_slow_time_dependent_potassium_current__E_Ks = var_reversal_potentials__E_Ks;
239 const NekDouble var_slow_time_dependent_potassium_current__V = var_chaste_interface__membrane__V;
240 const NekDouble var_slow_time_dependent_potassium_current__Xs = var_chaste_interface__slow_time_dependent_potassium_current_Xs_gate__Xs;
241 const NekDouble var_slow_time_dependent_potassium_current__i_Ks = var_slow_time_dependent_potassium_current__g_Ks * pow(var_slow_time_dependent_potassium_current__Xs, 2.0) * (var_slow_time_dependent_potassium_current__V - var_slow_time_dependent_potassium_current__E_Ks);
242 const NekDouble var_L_type_Ca_current__Ca_ss = var_chaste_interface__calcium_dynamics__Ca_ss;
243 const NekDouble var_L_type_Ca_current__g_CaL = 3.98e-05;
244 const NekDouble var_L_type_Ca_current__f = var_chaste_interface__L_type_Ca_current_f_gate__f;
245 const NekDouble var_L_type_Ca_current__d = var_chaste_interface__L_type_Ca_current_d_gate__d;
246 const NekDouble var_L_type_Ca_current__F = var_membrane__F;
247 const NekDouble var_L_type_Ca_current__f2 = var_chaste_interface__L_type_Ca_current_f2_gate__f2;
248 const NekDouble var_L_type_Ca_current__fCass = var_chaste_interface__L_type_Ca_current_fCass_gate__fCass;
249 const NekDouble var_L_type_Ca_current__V = var_chaste_interface__membrane__V;
250 const NekDouble var_L_type_Ca_current__T = var_membrane__T;
251 const NekDouble var_calcium_dynamics__Ca_o = 2.0;
252 const NekDouble var_L_type_Ca_current__Ca_o = var_calcium_dynamics__Ca_o;
253 const NekDouble var_L_type_Ca_current__R = var_membrane__R;
254 const NekDouble var_L_type_Ca_current__i_CaL = (((var_L_type_Ca_current__g_CaL * var_L_type_Ca_current__d * var_L_type_Ca_current__f * var_L_type_Ca_current__f2 * var_L_type_Ca_current__fCass * 4.0 * (var_L_type_Ca_current__V - 15.0) * pow(var_L_type_Ca_current__F, 2.0)) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) * ((0.25 * var_L_type_Ca_current__Ca_ss * exp((2.0 * (var_L_type_Ca_current__V - 15.0) * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T))) - var_L_type_Ca_current__Ca_o)) / (exp((2.0 * (var_L_type_Ca_current__V - 15.0) * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) - 1.0);
255 const NekDouble var_sodium_potassium_pump_current__Na_i = var_chaste_interface__sodium_dynamics__Na_i;
256 const NekDouble var_sodium_potassium_pump_current__R = var_membrane__R;
257 const NekDouble var_sodium_potassium_pump_current__T = var_membrane__T;
258 const NekDouble var_sodium_potassium_pump_current__V = var_chaste_interface__membrane__V;
259 const NekDouble var_sodium_potassium_pump_current__K_mk = 1.0;
260 const NekDouble var_sodium_potassium_pump_current__P_NaK = 2.724;
261 const NekDouble var_sodium_potassium_pump_current__K_mNa = 40.0;
262 const NekDouble var_sodium_potassium_pump_current__F = var_membrane__F;
263 const NekDouble var_sodium_potassium_pump_current__K_o = var_potassium_dynamics__K_o;
264 const NekDouble var_sodium_potassium_pump_current__i_NaK = ((((var_sodium_potassium_pump_current__P_NaK * var_sodium_potassium_pump_current__K_o) / (var_sodium_potassium_pump_current__K_o + var_sodium_potassium_pump_current__K_mk)) * var_sodium_potassium_pump_current__Na_i) / (var_sodium_potassium_pump_current__Na_i + var_sodium_potassium_pump_current__K_mNa)) / (1.0 + (0.1245 * exp(((-0.1) * var_sodium_potassium_pump_current__V * var_sodium_potassium_pump_current__F) / (var_sodium_potassium_pump_current__R * var_sodium_potassium_pump_current__T))) + (0.0353 * exp(((-var_sodium_potassium_pump_current__V) * var_sodium_potassium_pump_current__F) / (var_sodium_potassium_pump_current__R * var_sodium_potassium_pump_current__T))));
265 const NekDouble var_fast_sodium_current__j = var_chaste_interface__fast_sodium_current_j_gate__j;
266 const NekDouble var_fast_sodium_current__h = var_chaste_interface__fast_sodium_current_h_gate__h;
267 const NekDouble var_fast_sodium_current__g_Na = 14.838;
268 const NekDouble var_fast_sodium_current__m = var_chaste_interface__fast_sodium_current_m_gate__m;
269 const NekDouble var_fast_sodium_current__V = var_chaste_interface__membrane__V;
270 const NekDouble var_reversal_potentials__E_Na = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log(var_reversal_potentials__Na_o / var_reversal_potentials__Na_i);
271 const NekDouble var_fast_sodium_current__E_Na = var_reversal_potentials__E_Na;
272 const NekDouble var_fast_sodium_current__i_Na = var_fast_sodium_current__g_Na * pow(var_fast_sodium_current__m, 3.0) * var_fast_sodium_current__h * var_fast_sodium_current__j * (var_fast_sodium_current__V - var_fast_sodium_current__E_Na);
273 const NekDouble var_sodium_background_current__V = var_chaste_interface__membrane__V;
274 const NekDouble var_sodium_background_current__E_Na = var_reversal_potentials__E_Na;
275 const NekDouble var_sodium_background_current__g_bna = 0.00029;
276 const NekDouble var_sodium_background_current__i_b_Na = var_sodium_background_current__g_bna * (var_sodium_background_current__V - var_sodium_background_current__E_Na);
277 const NekDouble var_sodium_calcium_exchanger_current__alpha = 2.5;
278 const NekDouble var_sodium_calcium_exchanger_current__gamma = 0.35;
279 const NekDouble var_sodium_calcium_exchanger_current__K_sat = 0.1;
280 const NekDouble var_sodium_calcium_exchanger_current__Km_Ca = 1.38;
281 const NekDouble var_sodium_calcium_exchanger_current__K_NaCa = 1000.0;
282 const NekDouble var_sodium_calcium_exchanger_current__F = var_membrane__F;
283 const NekDouble var_sodium_calcium_exchanger_current__Ca_i = var_chaste_interface__calcium_dynamics__Ca_i;
284 const NekDouble var_sodium_calcium_exchanger_current__Ca_o = var_calcium_dynamics__Ca_o;
285 const NekDouble var_sodium_calcium_exchanger_current__V = var_chaste_interface__membrane__V;
286 const NekDouble var_sodium_calcium_exchanger_current__R = var_membrane__R;
287 const NekDouble var_sodium_calcium_exchanger_current__Km_Nai = 87.5;
288 const NekDouble var_sodium_calcium_exchanger_current__Na_o = var_sodium_dynamics__Na_o;
289 const NekDouble var_sodium_calcium_exchanger_current__Na_i = var_chaste_interface__sodium_dynamics__Na_i;
290 const NekDouble var_sodium_calcium_exchanger_current__T = var_membrane__T;
291 const NekDouble var_sodium_calcium_exchanger_current__i_NaCa = (var_sodium_calcium_exchanger_current__K_NaCa * ((exp((var_sodium_calcium_exchanger_current__gamma * var_sodium_calcium_exchanger_current__V * var_sodium_calcium_exchanger_current__F) / (var_sodium_calcium_exchanger_current__R * var_sodium_calcium_exchanger_current__T)) * pow(var_sodium_calcium_exchanger_current__Na_i, 3.0) * var_sodium_calcium_exchanger_current__Ca_o) - (exp(((var_sodium_calcium_exchanger_current__gamma - 1.0) * var_sodium_calcium_exchanger_current__V * var_sodium_calcium_exchanger_current__F) / (var_sodium_calcium_exchanger_current__R * var_sodium_calcium_exchanger_current__T)) * pow(var_sodium_calcium_exchanger_current__Na_o, 3.0) * var_sodium_calcium_exchanger_current__Ca_i * var_sodium_calcium_exchanger_current__alpha))) / ((pow(var_sodium_calcium_exchanger_current__Km_Nai, 3.0) + pow(var_sodium_calcium_exchanger_current__Na_o, 3.0)) * (var_sodium_calcium_exchanger_current__Km_Ca + var_sodium_calcium_exchanger_current__Ca_o) * (1.0 + (var_sodium_calcium_exchanger_current__K_sat * exp(((var_sodium_calcium_exchanger_current__gamma - 1.0) * var_sodium_calcium_exchanger_current__V * var_sodium_calcium_exchanger_current__F) / (var_sodium_calcium_exchanger_current__R * var_sodium_calcium_exchanger_current__T)))));
292 const NekDouble var_reversal_potentials__Ca_o = var_calcium_dynamics__Ca_o;
293 const NekDouble var_reversal_potentials__Ca_i = var_chaste_interface__calcium_dynamics__Ca_i;
294 const NekDouble var_reversal_potentials__E_Ca = ((0.5 * var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log(var_reversal_potentials__Ca_o / var_reversal_potentials__Ca_i);
295 const NekDouble var_calcium_background_current__E_Ca = var_reversal_potentials__E_Ca;
296 const NekDouble var_calcium_background_current__g_bca = 0.000592;
297 const NekDouble var_calcium_background_current__V = var_chaste_interface__membrane__V;
298 const NekDouble var_calcium_background_current__i_b_Ca = var_calcium_background_current__g_bca * (var_calcium_background_current__V - var_calcium_background_current__E_Ca);
299 const NekDouble var_potassium_pump_current__g_pK = 0.0146;
300 const NekDouble var_potassium_pump_current__V = var_chaste_interface__membrane__V;
301 const NekDouble var_potassium_pump_current__E_K = var_reversal_potentials__E_K;
302 const NekDouble var_potassium_pump_current__i_p_K = (var_potassium_pump_current__g_pK * (var_potassium_pump_current__V - var_potassium_pump_current__E_K)) / (1.0 + exp((25.0 - var_potassium_pump_current__V) / 5.98));
303 const NekDouble var_calcium_pump_current__K_pCa = 0.0005;
304 const NekDouble var_calcium_pump_current__Ca_i = var_chaste_interface__calcium_dynamics__Ca_i;
305 const NekDouble var_calcium_pump_current__g_pCa = 0.1238;
306 const NekDouble var_calcium_pump_current__i_p_Ca = (var_calcium_pump_current__g_pCa * var_calcium_pump_current__Ca_i) / (var_calcium_pump_current__Ca_i + var_calcium_pump_current__K_pCa);
307 const NekDouble var_chaste_interface__membrane__i_Stim = 0.0;
308 const NekDouble var_rapid_time_dependent_potassium_current_Xr1_gate__V = var_rapid_time_dependent_potassium_current__V;
309 const NekDouble var_rapid_time_dependent_potassium_current_Xr1_gate__alpha_xr1 = 450.0 / (1.0 + exp(((-45.0) - var_rapid_time_dependent_potassium_current_Xr1_gate__V) / 10.0));
310 const NekDouble var_rapid_time_dependent_potassium_current_Xr1_gate__beta_xr1 = 6.0 / (1.0 + exp((var_rapid_time_dependent_potassium_current_Xr1_gate__V + 30.0) / 11.5));
311 const NekDouble var_rapid_time_dependent_potassium_current_Xr1_gate__tau_xr1 = 1.0 * var_rapid_time_dependent_potassium_current_Xr1_gate__alpha_xr1 * var_rapid_time_dependent_potassium_current_Xr1_gate__beta_xr1;
312 const NekDouble var_rapid_time_dependent_potassium_current_Xr1_gate__xr1_inf = 1.0 / (1.0 + exp(((-26.0) - var_rapid_time_dependent_potassium_current_Xr1_gate__V) / 7.0));
313 const NekDouble var_rapid_time_dependent_potassium_current_Xr2_gate__V = var_rapid_time_dependent_potassium_current__V;
314 const NekDouble var_rapid_time_dependent_potassium_current_Xr2_gate__alpha_xr2 = 3.0 / (1.0 + exp(((-60.0) - var_rapid_time_dependent_potassium_current_Xr2_gate__V) / 20.0));
315 const NekDouble var_rapid_time_dependent_potassium_current_Xr2_gate__beta_xr2 = 1.12 / (1.0 + exp((var_rapid_time_dependent_potassium_current_Xr2_gate__V - 60.0) / 20.0));
316 const NekDouble var_rapid_time_dependent_potassium_current_Xr2_gate__tau_xr2 = 1.0 * var_rapid_time_dependent_potassium_current_Xr2_gate__alpha_xr2 * var_rapid_time_dependent_potassium_current_Xr2_gate__beta_xr2;
317 const NekDouble var_rapid_time_dependent_potassium_current_Xr2_gate__xr2_inf = 1.0 / (1.0 + exp((var_rapid_time_dependent_potassium_current_Xr2_gate__V + 88.0) / 24.0));
318 const NekDouble var_slow_time_dependent_potassium_current_Xs_gate__V = var_slow_time_dependent_potassium_current__V;
319 const NekDouble var_slow_time_dependent_potassium_current_Xs_gate__beta_xs = 1.0 / (1.0 + exp((var_slow_time_dependent_potassium_current_Xs_gate__V - 35.0) / 15.0));
320 const NekDouble var_slow_time_dependent_potassium_current_Xs_gate__alpha_xs = 1400.0 / sqrt(1.0 + exp((5.0 - var_slow_time_dependent_potassium_current_Xs_gate__V) / 6.0));
321 const NekDouble var_slow_time_dependent_potassium_current_Xs_gate__tau_xs = (1.0 * var_slow_time_dependent_potassium_current_Xs_gate__alpha_xs * var_slow_time_dependent_potassium_current_Xs_gate__beta_xs) + 80.0;
322 const NekDouble var_slow_time_dependent_potassium_current_Xs_gate__xs_inf = 1.0 / (1.0 + exp(((-5.0) - var_slow_time_dependent_potassium_current_Xs_gate__V) / 14.0));
323 const NekDouble var_fast_sodium_current_m_gate__V = var_fast_sodium_current__V;
324 const NekDouble var_fast_sodium_current_m_gate__alpha_m = 1.0 / (1.0 + exp(((-60.0) - var_fast_sodium_current_m_gate__V) / 5.0));
325 const NekDouble var_fast_sodium_current_m_gate__beta_m = (0.1 / (1.0 + exp((var_fast_sodium_current_m_gate__V + 35.0) / 5.0))) + (0.1 / (1.0 + exp((var_fast_sodium_current_m_gate__V - 50.0) / 200.0)));
326 const NekDouble var_fast_sodium_current_m_gate__tau_m = 1.0 * var_fast_sodium_current_m_gate__alpha_m * var_fast_sodium_current_m_gate__beta_m;
327 const NekDouble var_fast_sodium_current_m_gate__m_inf = 1.0 / pow(1.0 + exp(((-56.86) - var_fast_sodium_current_m_gate__V) / 9.03), 2.0);
328 const NekDouble var_fast_sodium_current_h_gate__V = var_fast_sodium_current__V;
329 const NekDouble var_fast_sodium_current_h_gate__h_inf = 1.0 / pow(1.0 + exp((var_fast_sodium_current_h_gate__V + 71.55) / 7.43), 2.0);
330 const NekDouble var_fast_sodium_current_h_gate__beta_h = (var_fast_sodium_current_h_gate__V < (-40.0)) ? ((2.7 * exp(0.079 * var_fast_sodium_current_h_gate__V)) + (310000.0 * exp(0.3485 * var_fast_sodium_current_h_gate__V))) : (0.77 / (0.13 * (1.0 + exp((var_fast_sodium_current_h_gate__V + 10.66) / (-11.1)))));
331 const NekDouble var_fast_sodium_current_h_gate__alpha_h = (var_fast_sodium_current_h_gate__V < (-40.0)) ? (0.057 * exp((-(var_fast_sodium_current_h_gate__V + 80.0)) / 6.8)) : 0.0;
332 const NekDouble var_fast_sodium_current_h_gate__tau_h = 1.0 / (var_fast_sodium_current_h_gate__alpha_h + var_fast_sodium_current_h_gate__beta_h);
333 const NekDouble var_fast_sodium_current_j_gate__V = var_fast_sodium_current__V;
334 const NekDouble var_fast_sodium_current_j_gate__j_inf = 1.0 / pow(1.0 + exp((var_fast_sodium_current_j_gate__V + 71.55) / 7.43), 2.0);
335 const NekDouble var_fast_sodium_current_j_gate__alpha_j = (var_fast_sodium_current_j_gate__V < (-40.0)) ? ((((((-25428.0) * exp(0.2444 * var_fast_sodium_current_j_gate__V)) - (6.948e-06 * exp((-0.04391) * var_fast_sodium_current_j_gate__V))) * (var_fast_sodium_current_j_gate__V + 37.78)) / 1.0) / (1.0 + exp(0.311 * (var_fast_sodium_current_j_gate__V + 79.23)))) : 0.0;
336 const NekDouble var_fast_sodium_current_j_gate__beta_j = (var_fast_sodium_current_j_gate__V < (-40.0)) ? ((0.02424 * exp((-0.01052) * var_fast_sodium_current_j_gate__V)) / (1.0 + exp((-0.1378) * (var_fast_sodium_current_j_gate__V + 40.14)))) : ((0.6 * exp(0.057 * var_fast_sodium_current_j_gate__V)) / (1.0 + exp((-0.1) * (var_fast_sodium_current_j_gate__V + 32.0))));
337 const NekDouble var_fast_sodium_current_j_gate__tau_j = 1.0 / (var_fast_sodium_current_j_gate__alpha_j + var_fast_sodium_current_j_gate__beta_j);
338 const NekDouble var_L_type_Ca_current_d_gate__V = var_L_type_Ca_current__V;
339 const NekDouble var_L_type_Ca_current_d_gate__alpha_d = (1.4 / (1.0 + exp(((-35.0) - var_L_type_Ca_current_d_gate__V) / 13.0))) + 0.25;
340 const NekDouble var_L_type_Ca_current_d_gate__gamma_d = 1.0 / (1.0 + exp((50.0 - var_L_type_Ca_current_d_gate__V) / 20.0));
341 const NekDouble var_L_type_Ca_current_d_gate__beta_d = 1.4 / (1.0 + exp((var_L_type_Ca_current_d_gate__V + 5.0) / 5.0));
342 const NekDouble var_L_type_Ca_current_d_gate__tau_d = (1.0 * var_L_type_Ca_current_d_gate__alpha_d * var_L_type_Ca_current_d_gate__beta_d) + var_L_type_Ca_current_d_gate__gamma_d;
343 const NekDouble var_L_type_Ca_current_d_gate__d_inf = 1.0 / (1.0 + exp(((-8.0) - var_L_type_Ca_current_d_gate__V) / 7.5));
344 const NekDouble var_L_type_Ca_current_f_gate__V = var_L_type_Ca_current__V;
345 const NekDouble var_L_type_Ca_current_f_gate__tau_f = (1102.5 * exp((-pow(var_L_type_Ca_current_f_gate__V + 27.0, 2.0)) / 225.0)) + (200.0 / (1.0 + exp((13.0 - var_L_type_Ca_current_f_gate__V) / 10.0))) + (180.0 / (1.0 + exp((var_L_type_Ca_current_f_gate__V + 30.0) / 10.0))) + 20.0;
346 const NekDouble var_L_type_Ca_current_f_gate__f_inf = 1.0 / (1.0 + exp((var_L_type_Ca_current_f_gate__V + 20.0) / 7.0));
347 const NekDouble var_L_type_Ca_current_f2_gate__V = var_L_type_Ca_current__V;
348 const NekDouble var_L_type_Ca_current_f2_gate__f2_inf = (0.67 / (1.0 + exp((var_L_type_Ca_current_f2_gate__V + 35.0) / 7.0))) + 0.33;
349 const NekDouble var_L_type_Ca_current_f2_gate__tau_f2 = (562.0 * exp((-pow(var_L_type_Ca_current_f2_gate__V + 27.0, 2.0)) / 240.0)) + (31.0 / (1.0 + exp((25.0 - var_L_type_Ca_current_f2_gate__V) / 10.0))) + (80.0 / (1.0 + exp((var_L_type_Ca_current_f2_gate__V + 30.0) / 10.0)));
350 const NekDouble var_L_type_Ca_current_fCass_gate__Ca_ss = var_L_type_Ca_current__Ca_ss;
351 const NekDouble var_L_type_Ca_current_fCass_gate__tau_fCass = (80.0 / (1.0 + pow(var_L_type_Ca_current_fCass_gate__Ca_ss / 0.05, 2.0))) + 2.0;
352 const NekDouble var_L_type_Ca_current_fCass_gate__fCass_inf = (0.6 / (1.0 + pow(var_L_type_Ca_current_fCass_gate__Ca_ss / 0.05, 2.0))) + 0.4;
353 const NekDouble var_transient_outward_current_s_gate__V = var_transient_outward_current__V;
354 const NekDouble var_transient_outward_current_s_gate__s_inf = 1.0 / (1.0 + exp((var_transient_outward_current_s_gate__V +
s_inf_factor) / 5.0));
355 const NekDouble var_transient_outward_current_s_gate__tau_s = (
s_tau_f1 * exp((-pow(var_transient_outward_current_s_gate__V +
s_tau_f2, 2.0)) /
s_tau_f3)) +
s_tau_f4 +
s_tau_f5*((5.0 / (1.0 + exp((var_transient_outward_current_s_gate__V - 20.0) / 5.0))) + 3.0);
356 const NekDouble var_transient_outward_current_r_gate__V = var_transient_outward_current__V;
357 const NekDouble var_transient_outward_current_r_gate__r_inf = 1.0 / (1.0 + exp((20.0 - var_transient_outward_current_r_gate__V) / 6.0));
358 const NekDouble var_transient_outward_current_r_gate__tau_r = (9.5 * exp((-pow(var_transient_outward_current_r_gate__V + 40.0, 2.0)) / 1800.0)) + 0.8;
359 const NekDouble var_calcium_dynamics__Ca_i = var_chaste_interface__calcium_dynamics__Ca_i;
360 const NekDouble var_calcium_dynamics__Ca_SR = var_chaste_interface__calcium_dynamics__Ca_SR;
361 const NekDouble var_calcium_dynamics__Ca_ss = var_chaste_interface__calcium_dynamics__Ca_ss;
362 const NekDouble var_calcium_dynamics__V_rel = 0.102;
363 const NekDouble var_calcium_dynamics__R_prime = var_chaste_interface__calcium_dynamics__R_prime;
364 const NekDouble var_calcium_dynamics__k1_prime = 0.15;
365 const NekDouble var_calcium_dynamics__max_sr = 2.5;
366 const NekDouble var_calcium_dynamics__EC = 1.5;
367 const NekDouble var_calcium_dynamics__min_sr = 1.0;
368 const NekDouble var_calcium_dynamics__kcasr = var_calcium_dynamics__max_sr - ((var_calcium_dynamics__max_sr - var_calcium_dynamics__min_sr) / (1.0 + pow(var_calcium_dynamics__EC / var_calcium_dynamics__Ca_SR, 2.0)));
369 const NekDouble var_calcium_dynamics__k1 = var_calcium_dynamics__k1_prime / var_calcium_dynamics__kcasr;
370 const NekDouble var_calcium_dynamics__k3 = 0.06;
371 const NekDouble var_calcium_dynamics__O = (var_calcium_dynamics__k1 * pow(var_calcium_dynamics__Ca_ss, 2.0) * var_calcium_dynamics__R_prime) / (var_calcium_dynamics__k3 + (var_calcium_dynamics__k1 * pow(var_calcium_dynamics__Ca_ss, 2.0)));
372 const NekDouble var_calcium_dynamics__i_rel = var_calcium_dynamics__V_rel * var_calcium_dynamics__O * (var_calcium_dynamics__Ca_SR - var_calcium_dynamics__Ca_ss);
373 const NekDouble var_calcium_dynamics__Vmax_up = 0.006375;
374 const NekDouble var_calcium_dynamics__K_up = 0.00025;
375 const NekDouble var_calcium_dynamics__i_up = var_calcium_dynamics__Vmax_up / (1.0 + (pow(var_calcium_dynamics__K_up, 2.0) / pow(var_calcium_dynamics__Ca_i, 2.0)));
376 const NekDouble var_calcium_dynamics__V_leak = 0.00036;
377 const NekDouble var_calcium_dynamics__i_leak = var_calcium_dynamics__V_leak * (var_calcium_dynamics__Ca_SR - var_calcium_dynamics__Ca_i);
378 const NekDouble var_calcium_dynamics__V_xfer = 0.0038;
379 const NekDouble var_calcium_dynamics__i_xfer = var_calcium_dynamics__V_xfer * (var_calcium_dynamics__Ca_ss - var_calcium_dynamics__Ca_i);
380 const NekDouble var_calcium_dynamics__k2_prime = 0.045;
381 const NekDouble var_calcium_dynamics__k2 = var_calcium_dynamics__k2_prime * var_calcium_dynamics__kcasr;
382 const NekDouble var_calcium_dynamics__k4 = 0.005;
383 const NekDouble var_calcium_dynamics__Buf_c = 0.2;
384 const NekDouble var_calcium_dynamics__K_buf_c = 0.001;
385 const NekDouble var_calcium_dynamics__Ca_i_bufc = 1.0 / (1.0 + ((var_calcium_dynamics__Buf_c * var_calcium_dynamics__K_buf_c) / pow(var_calcium_dynamics__Ca_i + var_calcium_dynamics__K_buf_c, 2.0)));
386 const NekDouble var_calcium_dynamics__K_buf_sr = 0.3;
387 const NekDouble var_calcium_dynamics__Buf_sr = 10.0;
388 const NekDouble var_calcium_dynamics__Ca_sr_bufsr = 1.0 / (1.0 + ((var_calcium_dynamics__Buf_sr * var_calcium_dynamics__K_buf_sr) / pow(var_calcium_dynamics__Ca_SR + var_calcium_dynamics__K_buf_sr, 2.0)));
389 const NekDouble var_calcium_dynamics__Buf_ss = 0.4;
390 const NekDouble var_calcium_dynamics__K_buf_ss = 0.00025;
391 const NekDouble var_calcium_dynamics__Ca_ss_bufss = 1.0 / (1.0 + ((var_calcium_dynamics__Buf_ss * var_calcium_dynamics__K_buf_ss) / pow(var_calcium_dynamics__Ca_ss + var_calcium_dynamics__K_buf_ss, 2.0)));
392 const NekDouble var_calcium_dynamics__V_sr = 0.001094;
393 const NekDouble var_calcium_dynamics__V_ss = 5.468e-05;
394 const NekDouble var_calcium_dynamics__V_c = var_membrane__V_c;
395 const NekDouble var_calcium_dynamics__F = var_membrane__F;
396 const NekDouble var_calcium_dynamics__Cm = var_membrane__Cm;
397 const NekDouble var_calcium_dynamics__i_CaL = var_L_type_Ca_current__i_CaL;
398 const NekDouble var_calcium_dynamics__i_NaCa = var_sodium_calcium_exchanger_current__i_NaCa;
399 const NekDouble var_calcium_dynamics__i_p_Ca = var_calcium_pump_current__i_p_Ca;
400 const NekDouble var_calcium_dynamics__i_b_Ca = var_calcium_background_current__i_b_Ca;
401 const NekDouble var_calcium_dynamics__d_Ca_i_d_environment__time = var_calcium_dynamics__Ca_i_bufc * (((((var_calcium_dynamics__i_leak - var_calcium_dynamics__i_up) * var_calcium_dynamics__V_sr) / var_calcium_dynamics__V_c) + var_calcium_dynamics__i_xfer) - ((1.0 * ((var_calcium_dynamics__i_b_Ca + var_calcium_dynamics__i_p_Ca) - (2.0 * var_calcium_dynamics__i_NaCa)) * var_calcium_dynamics__Cm) / (2.0 * 1.0 * var_calcium_dynamics__V_c * var_calcium_dynamics__F)));
402 const NekDouble var_calcium_dynamics__d_Ca_SR_d_environment__time = var_calcium_dynamics__Ca_sr_bufsr * (var_calcium_dynamics__i_up - (var_calcium_dynamics__i_rel + var_calcium_dynamics__i_leak));
403 const NekDouble var_calcium_dynamics__d_Ca_ss_d_environment__time = var_calcium_dynamics__Ca_ss_bufss * (((((-1.0) * var_calcium_dynamics__i_CaL * var_calcium_dynamics__Cm) / (2.0 * 1.0 * var_calcium_dynamics__V_ss * var_calcium_dynamics__F)) + ((var_calcium_dynamics__i_rel * var_calcium_dynamics__V_sr) / var_calcium_dynamics__V_ss)) - ((var_calcium_dynamics__i_xfer * var_calcium_dynamics__V_c) / var_calcium_dynamics__V_ss));
404 const NekDouble var_calcium_dynamics__d_R_prime_d_environment__time = ((-var_calcium_dynamics__k2) * var_calcium_dynamics__Ca_ss * var_calcium_dynamics__R_prime) + (var_calcium_dynamics__k4 * (1.0 - var_calcium_dynamics__R_prime));
405 const NekDouble var_sodium_dynamics__F = var_membrane__F;
406 const NekDouble var_sodium_dynamics__Cm = var_membrane__Cm;
407 const NekDouble var_sodium_dynamics__V_c = var_membrane__V_c;
408 const NekDouble var_sodium_dynamics__i_Na = var_fast_sodium_current__i_Na;
409 const NekDouble var_sodium_dynamics__i_NaCa = var_sodium_calcium_exchanger_current__i_NaCa;
410 const NekDouble var_sodium_dynamics__i_NaK = var_sodium_potassium_pump_current__i_NaK;
411 const NekDouble var_sodium_dynamics__i_b_Na = var_sodium_background_current__i_b_Na;
412 const NekDouble var_sodium_dynamics__d_Na_i_d_environment__time = (((-1.0) * (var_sodium_dynamics__i_Na + var_sodium_dynamics__i_b_Na + (3.0 * var_sodium_dynamics__i_NaK) + (3.0 * var_sodium_dynamics__i_NaCa))) / (1.0 * var_sodium_dynamics__V_c * var_sodium_dynamics__F)) * var_sodium_dynamics__Cm;
413 const NekDouble var_potassium_dynamics__F = var_membrane__F;
414 const NekDouble var_potassium_dynamics__Cm = var_membrane__Cm;
415 const NekDouble var_potassium_dynamics__V_c = var_membrane__V_c;
416 const NekDouble var_potassium_dynamics__i_K1 = var_inward_rectifier_potassium_current__i_K1;
417 const NekDouble var_potassium_dynamics__i_to = var_transient_outward_current__i_to;
418 const NekDouble var_potassium_dynamics__i_NaK = var_sodium_potassium_pump_current__i_NaK;
419 const NekDouble var_potassium_dynamics__i_Kr = var_rapid_time_dependent_potassium_current__i_Kr;
420 const NekDouble var_potassium_dynamics__i_Ks = var_slow_time_dependent_potassium_current__i_Ks;
421 const NekDouble var_potassium_dynamics__i_p_K = var_potassium_pump_current__i_p_K;
422 const NekDouble var_potassium_dynamics__chaste_interface__chaste_membrane_capacitance = 1.0;
423 const NekDouble var_potassium_dynamics__i_Stim_converter = var_chaste_interface__membrane__i_Stim;
424 const NekDouble var_potassium_dynamics__i_Stim = var_potassium_dynamics__i_Stim_converter / var_potassium_dynamics__chaste_interface__chaste_membrane_capacitance;
425 const NekDouble var_potassium_dynamics__d_K_i_d_environment__time = (((-1.0) * ((var_potassium_dynamics__i_K1 + var_potassium_dynamics__i_to + var_potassium_dynamics__i_Kr + var_potassium_dynamics__i_Ks + var_potassium_dynamics__i_p_K + var_potassium_dynamics__i_Stim) - (2.0 * var_potassium_dynamics__i_NaK))) / (1.0 * var_potassium_dynamics__V_c * var_potassium_dynamics__F)) * var_potassium_dynamics__Cm;
426 const NekDouble var_chaste_interface__calcium_dynamics__d_Ca_i_d_environment__time = var_calcium_dynamics__d_Ca_i_d_environment__time;
427 const NekDouble var_chaste_interface__calcium_dynamics__d_Ca_SR_d_environment__time = var_calcium_dynamics__d_Ca_SR_d_environment__time;
428 const NekDouble var_chaste_interface__calcium_dynamics__d_Ca_ss_d_environment__time = var_calcium_dynamics__d_Ca_ss_d_environment__time;
429 const NekDouble var_chaste_interface__calcium_dynamics__d_R_prime_d_environment__time = var_calcium_dynamics__d_R_prime_d_environment__time;
430 const NekDouble var_chaste_interface__sodium_dynamics__d_Na_i_d_environment__time = var_sodium_dynamics__d_Na_i_d_environment__time;
431 const NekDouble var_chaste_interface__potassium_dynamics__d_K_i_d_environment__time = var_potassium_dynamics__d_K_i_d_environment__time;
432 const NekDouble d_dt_chaste_interface__calcium_dynamics__Ca_i = var_chaste_interface__calcium_dynamics__d_Ca_i_d_environment__time;
433 const NekDouble d_dt_chaste_interface__calcium_dynamics__Ca_SR = var_chaste_interface__calcium_dynamics__d_Ca_SR_d_environment__time;
434 const NekDouble d_dt_chaste_interface__calcium_dynamics__Ca_ss = var_chaste_interface__calcium_dynamics__d_Ca_ss_d_environment__time;
435 const NekDouble d_dt_chaste_interface__calcium_dynamics__R_prime = var_chaste_interface__calcium_dynamics__d_R_prime_d_environment__time;
436 const NekDouble d_dt_chaste_interface__sodium_dynamics__Na_i = var_chaste_interface__sodium_dynamics__d_Na_i_d_environment__time;
437 const NekDouble d_dt_chaste_interface__potassium_dynamics__K_i = var_chaste_interface__potassium_dynamics__d_K_i_d_environment__time;
439 const NekDouble var_membrane__i_K1 = var_inward_rectifier_potassium_current__i_K1;
440 const NekDouble var_membrane__i_to = var_transient_outward_current__i_to;
441 const NekDouble var_membrane__i_Kr = var_rapid_time_dependent_potassium_current__i_Kr;
442 const NekDouble var_membrane__i_Ks = var_slow_time_dependent_potassium_current__i_Ks;
443 const NekDouble var_membrane__i_CaL = var_L_type_Ca_current__i_CaL;
444 const NekDouble var_membrane__i_NaK = var_sodium_potassium_pump_current__i_NaK;
445 const NekDouble var_membrane__i_Na = var_fast_sodium_current__i_Na;
446 const NekDouble var_membrane__i_b_Na = var_sodium_background_current__i_b_Na;
447 const NekDouble var_membrane__i_NaCa = var_sodium_calcium_exchanger_current__i_NaCa;
448 const NekDouble var_membrane__i_b_Ca = var_calcium_background_current__i_b_Ca;
449 const NekDouble var_membrane__i_p_K = var_potassium_pump_current__i_p_K;
450 const NekDouble var_membrane__i_p_Ca = var_calcium_pump_current__i_p_Ca;
451 const NekDouble var_membrane__i_Stim_converter = var_chaste_interface__membrane__i_Stim;
452 const NekDouble var_membrane__chaste_interface__chaste_membrane_capacitance = 1.0;
453 const NekDouble var_membrane__i_Stim = var_membrane__i_Stim_converter / var_membrane__chaste_interface__chaste_membrane_capacitance;
454 const NekDouble var_membrane__d_V_d_environment__time = ((-1.0) / 1.0) * (var_membrane__i_K1 + var_membrane__i_to + var_membrane__i_Kr + var_membrane__i_Ks + var_membrane__i_CaL + var_membrane__i_NaK + var_membrane__i_Na + var_membrane__i_b_Na + var_membrane__i_NaCa + var_membrane__i_b_Ca + var_membrane__i_p_K + var_membrane__i_p_Ca + var_membrane__i_Stim);
455 const NekDouble var_chaste_interface__membrane__d_V_d_environment__time = var_membrane__d_V_d_environment__time;
456 d_dt_chaste_interface__membrane__V = var_chaste_interface__membrane__d_V_d_environment__time;
457 outarray[0][i] = d_dt_chaste_interface__membrane__V;
458 outarray[1][i] = var_rapid_time_dependent_potassium_current_Xr1_gate__xr1_inf;
459 m_gates_tau[0][i] = var_rapid_time_dependent_potassium_current_Xr1_gate__tau_xr1;
460 outarray[2][i] = var_rapid_time_dependent_potassium_current_Xr2_gate__xr2_inf;
461 m_gates_tau[1][i] = var_rapid_time_dependent_potassium_current_Xr2_gate__tau_xr2;
462 outarray[3][i] = var_slow_time_dependent_potassium_current_Xs_gate__xs_inf;
463 m_gates_tau[2][i] = var_slow_time_dependent_potassium_current_Xs_gate__tau_xs;
464 outarray[4][i] = var_fast_sodium_current_m_gate__m_inf;
465 m_gates_tau[3][i] = var_fast_sodium_current_m_gate__tau_m;
466 outarray[5][i] = var_fast_sodium_current_h_gate__h_inf;
467 m_gates_tau[4][i] = var_fast_sodium_current_h_gate__tau_h;
468 outarray[6][i] = var_fast_sodium_current_j_gate__j_inf;
469 m_gates_tau[5][i] = var_fast_sodium_current_j_gate__tau_j;
470 outarray[7][i] = var_L_type_Ca_current_d_gate__d_inf;
471 m_gates_tau[6][i] = var_L_type_Ca_current_d_gate__tau_d;
472 outarray[8][i] = var_L_type_Ca_current_f_gate__f_inf;
473 m_gates_tau[7][i] = var_L_type_Ca_current_f_gate__tau_f;
474 outarray[9][i] = var_L_type_Ca_current_f2_gate__f2_inf;
475 m_gates_tau[8][i] = var_L_type_Ca_current_f2_gate__tau_f2;
476 outarray[10][i] = var_L_type_Ca_current_fCass_gate__fCass_inf;
477 m_gates_tau[9][i] = var_L_type_Ca_current_fCass_gate__tau_fCass;
478 outarray[11][i] = var_transient_outward_current_s_gate__s_inf;
479 m_gates_tau[10][i] = var_transient_outward_current_s_gate__tau_s;
480 outarray[12][i] = var_transient_outward_current_r_gate__r_inf;
481 m_gates_tau[11][i] = var_transient_outward_current_r_gate__tau_r;
482 outarray[13][i] = d_dt_chaste_interface__calcium_dynamics__Ca_i;
483 outarray[14][i] = d_dt_chaste_interface__calcium_dynamics__Ca_SR;
484 outarray[15][i] = d_dt_chaste_interface__calcium_dynamics__Ca_ss;
485 outarray[16][i] = d_dt_chaste_interface__calcium_dynamics__R_prime;
486 outarray[17][i] = d_dt_chaste_interface__sodium_dynamics__Na_i;
487 outarray[18][i] = d_dt_chaste_interface__potassium_dynamics__K_i;
int m_nq
Number of physical points.
static std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value.
static std::string className
Name of class.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
std::vector< std::pair< std::string, std::string > > SummaryList
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
TenTusscher06(const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField)
Constructor.
static CellModelSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField)
Creates an instance of this class.
static std::string lookupIds[]
std::vector< int > m_concentrations
Indices of cell model variables which are concentrations.
Array< OneD, Array< OneD, NekDouble > > m_gates_tau
Storage for gate tau values.
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
Array< OneD, Array< OneD, NekDouble > > m_cellSol
Cell model solution variables.
int m_nvar
Number of variables in cell model (inc. transmembrane voltage)
std::vector< int > m_gates
Indices of cell model variables which are gates.
enum Variants model_variant
virtual void v_SetInitialConditions()
CellModelFactory & GetCellModelFactory()
static std::string RegisterDefaultSolverInfo(const std::string &pName, const std::string &pValue)
Registers the default string value of a solver info property.
virtual void v_GenerateSummary(SummaryList &s)
Prints a summary of the model parameters.
virtual void v_Update(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.