Computes the reaction terms $f(u,v)$ and $g(u,v)$.
{
for (unsigned int i = 0; i < nq; ++i)
{
NekDouble var_chaste_interface__membrane__V = inarray[0][i];
NekDouble var_chaste_interface__fast_sodium_current_m_gate__m = inarray[1][i];
NekDouble var_chaste_interface__fast_sodium_current_h_gate__h = inarray[2][i];
NekDouble var_chaste_interface__fast_sodium_current_j_gate__j = inarray[3][i];
NekDouble var_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr = inarray[4][i];
NekDouble var_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks = inarray[5][i];
NekDouble var_chaste_interface__transient_outward_potassium_current_X_to1_gate__X_to1 = inarray[6][i];
NekDouble var_chaste_interface__transient_outward_potassium_current_Y_to1_gate__Y_to1 = inarray[7][i];
NekDouble var_chaste_interface__L_type_Ca_current__O = inarray[8][i];
NekDouble var_chaste_interface__L_type_Ca_current__O_Ca = inarray[9][i];
NekDouble var_chaste_interface__L_type_Ca_current__C0 = inarray[10][i];
NekDouble var_chaste_interface__L_type_Ca_current__C1 = inarray[11][i];
NekDouble var_chaste_interface__L_type_Ca_current__C2 = inarray[12][i];
NekDouble var_chaste_interface__L_type_Ca_current__C3 = inarray[13][i];
NekDouble var_chaste_interface__L_type_Ca_current__C4 = inarray[14][i];
NekDouble var_chaste_interface__L_type_Ca_current__C_Ca0 = inarray[15][i];
NekDouble var_chaste_interface__L_type_Ca_current__C_Ca1 = inarray[16][i];
NekDouble var_chaste_interface__L_type_Ca_current__C_Ca2 = inarray[17][i];
NekDouble var_chaste_interface__L_type_Ca_current__C_Ca3 = inarray[18][i];
NekDouble var_chaste_interface__L_type_Ca_current__C_Ca4 = inarray[19][i];
NekDouble var_chaste_interface__L_type_Ca_current_y_gate__y = inarray[20][i];
NekDouble var_chaste_interface__RyR_channel__P_O1 = inarray[21][i];
NekDouble var_chaste_interface__RyR_channel__P_O2 = inarray[22][i];
NekDouble var_chaste_interface__RyR_channel__P_C1 = inarray[23][i];
NekDouble var_chaste_interface__RyR_channel__P_C2 = inarray[24][i];
NekDouble var_chaste_interface__intracellular_Ca_fluxes__HTRPNCa = inarray[25][i];
NekDouble var_chaste_interface__intracellular_Ca_fluxes__LTRPNCa = inarray[26][i];
NekDouble var_chaste_interface__intracellular_ion_concentrations__Nai = inarray[27][i];
NekDouble var_chaste_interface__intracellular_ion_concentrations__Cai = inarray[28][i];
NekDouble var_chaste_interface__intracellular_ion_concentrations__Ki = inarray[29][i];
NekDouble var_chaste_interface__intracellular_ion_concentrations__Ca_ss = inarray[30][i];
NekDouble var_chaste_interface__intracellular_ion_concentrations__Ca_JSR = inarray[31][i];
NekDouble var_chaste_interface__intracellular_ion_concentrations__Ca_NSR = inarray[32][i];
NekDouble d_dt_chaste_interface__membrane__V;
const NekDouble var_membrane__F = 96.4853415;
const NekDouble var_fast_sodium_current__j = var_chaste_interface__fast_sodium_current_j_gate__j;
const NekDouble var_fast_sodium_current__h = var_chaste_interface__fast_sodium_current_h_gate__h;
const NekDouble var_fast_sodium_current__g_Na = 12.8;
const NekDouble var_fast_sodium_current__m = var_chaste_interface__fast_sodium_current_m_gate__m;
const NekDouble var_fast_sodium_current__V = var_chaste_interface__membrane__V;
const NekDouble var_fast_sodium_current__R = var_membrane__R;
const NekDouble var_fast_sodium_current__F = var_membrane__F;
const NekDouble var_standard_ionic_concentrations__Nao = 138.0;
const NekDouble var_fast_sodium_current__Nao = var_standard_ionic_concentrations__Nao;
const NekDouble var_fast_sodium_current__Nai = var_chaste_interface__intracellular_ion_concentrations__Nai;
const NekDouble var_fast_sodium_current__T = var_membrane__T;
const NekDouble var_fast_sodium_current__E_Na = ((var_fast_sodium_current__R * var_fast_sodium_current__T) / var_fast_sodium_current__F) * log(var_fast_sodium_current__Nao / var_fast_sodium_current__Nai);
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);
const NekDouble var_L_type_Ca_current__O = var_chaste_interface__L_type_Ca_current__O;
const NekDouble var_L_type_Ca_current__F = var_membrane__F;
const NekDouble var_L_type_Ca_current__P_Ca = 0.0003125;
const NekDouble var_standard_ionic_concentrations__Cao = 2.0;
const NekDouble var_L_type_Ca_current__Cao = var_standard_ionic_concentrations__Cao;
const NekDouble var_L_type_Ca_current__V = var_chaste_interface__membrane__V;
const NekDouble var_L_type_Ca_current__T = var_membrane__T;
const NekDouble var_L_type_Ca_current__R = var_membrane__R;
const NekDouble var_L_type_Ca_current__i_Ca_max = ((((var_L_type_Ca_current__P_Ca / (1.0 * 1.0)) * 4.0 * var_L_type_Ca_current__V * pow(var_L_type_Ca_current__F, 2.0) * 1000.0) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) * ((0.001 * exp((2.0 * var_L_type_Ca_current__V * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T))) - (0.341 * var_L_type_Ca_current__Cao))) / (exp((2.0 * var_L_type_Ca_current__V * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) - 1.0);
const NekDouble var_L_type_Ca_current__y = var_chaste_interface__L_type_Ca_current_y_gate__y;
const NekDouble var_L_type_Ca_current__O_Ca = var_chaste_interface__L_type_Ca_current__O_Ca;
const NekDouble var_L_type_Ca_current__i_Ca = var_L_type_Ca_current__i_Ca_max * var_L_type_Ca_current__y * (var_L_type_Ca_current__O + var_L_type_Ca_current__O_Ca);
const NekDouble var_L_type_Ca_current__P_K = 5.79e-07;
const NekDouble var_L_type_Ca_current__i_Ca_half = -0.265;
const NekDouble var_L_type_Ca_current__p_prime_k = var_L_type_Ca_current__P_K / (1.0 + (var_L_type_Ca_current__i_Ca_max / var_L_type_Ca_current__i_Ca_half));
const NekDouble var_standard_ionic_concentrations__Ko = 4.0;
const NekDouble var_L_type_Ca_current__Ko = var_standard_ionic_concentrations__Ko;
const NekDouble var_L_type_Ca_current__Ki = var_chaste_interface__intracellular_ion_concentrations__Ki;
const NekDouble var_L_type_Ca_current__i_Ca_K = ((((var_L_type_Ca_current__p_prime_k / (1.0 * 1.0)) * var_L_type_Ca_current__y * (var_L_type_Ca_current__O + var_L_type_Ca_current__O_Ca) * var_L_type_Ca_current__V * pow(var_L_type_Ca_current__F, 2.0)) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) * ((var_L_type_Ca_current__Ki * exp((var_L_type_Ca_current__V * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T))) - var_L_type_Ca_current__Ko)) / (exp((var_L_type_Ca_current__V * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) - 1.0);
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__Ko = var_standard_ionic_concentrations__Ko;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__f_Ko = sqrt(var_rapid_activating_delayed_rectifiyer_K_current__Ko / 4.0);
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__Ki = var_chaste_interface__intracellular_ion_concentrations__Ki;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__R = var_membrane__R;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__F = var_membrane__F;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__T = var_membrane__T;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__E_K = ((var_rapid_activating_delayed_rectifiyer_K_current__R * var_rapid_activating_delayed_rectifiyer_K_current__T) / var_rapid_activating_delayed_rectifiyer_K_current__F) * log(var_rapid_activating_delayed_rectifiyer_K_current__Ko / var_rapid_activating_delayed_rectifiyer_K_current__Ki);
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__V = var_chaste_interface__membrane__V;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__R_V = 1.0 / (1.0 + (1.4945 * exp(0.0446 * var_rapid_activating_delayed_rectifiyer_K_current__V)));
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__X_kr = var_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__g_Kr = 0.0034;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__i_Kr = var_rapid_activating_delayed_rectifiyer_K_current__g_Kr * var_rapid_activating_delayed_rectifiyer_K_current__f_Ko * var_rapid_activating_delayed_rectifiyer_K_current__R_V * var_rapid_activating_delayed_rectifiyer_K_current__X_kr * (var_rapid_activating_delayed_rectifiyer_K_current__V - var_rapid_activating_delayed_rectifiyer_K_current__E_K);
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__g_Ks = 0.0027134;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__Ko = var_standard_ionic_concentrations__Ko;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__Nao = var_standard_ionic_concentrations__Nao;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__Ki = var_chaste_interface__intracellular_ion_concentrations__Ki;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__Nai = var_chaste_interface__intracellular_ion_concentrations__Nai;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__R = var_membrane__R;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__F = var_membrane__F;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__T = var_membrane__T;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__E_Ks = ((var_slow_activating_delayed_rectifiyer_K_current__R * var_slow_activating_delayed_rectifiyer_K_current__T) / var_slow_activating_delayed_rectifiyer_K_current__F) * log((var_slow_activating_delayed_rectifiyer_K_current__Ko + (0.01833 * var_slow_activating_delayed_rectifiyer_K_current__Nao)) / (var_slow_activating_delayed_rectifiyer_K_current__Ki + (0.01833 * var_slow_activating_delayed_rectifiyer_K_current__Nai)));
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__V = var_chaste_interface__membrane__V;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__X_ks = var_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__i_Ks = var_slow_activating_delayed_rectifiyer_K_current__g_Ks * pow(var_slow_activating_delayed_rectifiyer_K_current__X_ks, 2.0) * (var_slow_activating_delayed_rectifiyer_K_current__V - var_slow_activating_delayed_rectifiyer_K_current__E_Ks);
const NekDouble var_transient_outward_potassium_current__X_to1 = var_chaste_interface__transient_outward_potassium_current_X_to1_gate__X_to1;
const NekDouble var_transient_outward_potassium_current__Y_to1 = var_chaste_interface__transient_outward_potassium_current_Y_to1_gate__Y_to1;
const NekDouble var_transient_outward_potassium_current__g_to1 = 0.23815;
const NekDouble var_transient_outward_potassium_current__E_K = var_rapid_activating_delayed_rectifiyer_K_current__E_K;
const NekDouble var_transient_outward_potassium_current__V = var_chaste_interface__membrane__V;
const NekDouble var_transient_outward_potassium_current__i_to1 = var_transient_outward_potassium_current__g_to1 * var_transient_outward_potassium_current__X_to1 * var_transient_outward_potassium_current__Y_to1 * (var_transient_outward_potassium_current__V - var_transient_outward_potassium_current__E_K);
const NekDouble var_time_independent_potassium_current__Ko = var_standard_ionic_concentrations__Ko;
const NekDouble var_time_independent_potassium_current__E_K = var_rapid_activating_delayed_rectifiyer_K_current__E_K;
const NekDouble var_time_independent_potassium_current__F = var_membrane__F;
const NekDouble var_time_independent_potassium_current_K1_gate__F = var_time_independent_potassium_current__F;
const NekDouble var_time_independent_potassium_current__V = var_chaste_interface__membrane__V;
const NekDouble var_time_independent_potassium_current_K1_gate__V = var_time_independent_potassium_current__V;
const NekDouble var_time_independent_potassium_current__T = var_membrane__T;
const NekDouble var_time_independent_potassium_current_K1_gate__T = var_time_independent_potassium_current__T;
const NekDouble var_time_independent_potassium_current_K1_gate__E_K = var_time_independent_potassium_current__E_K;
const NekDouble var_time_independent_potassium_current__R = var_membrane__R;
const NekDouble var_time_independent_potassium_current_K1_gate__R = var_time_independent_potassium_current__R;
const NekDouble var_time_independent_potassium_current_K1_gate__K1_infinity_V = 1.0 / (2.0 + exp(((1.5 * var_time_independent_potassium_current_K1_gate__F) / (var_time_independent_potassium_current_K1_gate__R * var_time_independent_potassium_current_K1_gate__T)) * (var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K)));
const NekDouble var_time_independent_potassium_current__K1_infinity_V = var_time_independent_potassium_current_K1_gate__K1_infinity_V;
const NekDouble var_time_independent_potassium_current__g_K1 = 2.8;
const NekDouble var_time_independent_potassium_current__K_mK1 = 13.0;
const NekDouble var_time_independent_potassium_current__i_K1 = ((var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K1_infinity_V * var_time_independent_potassium_current__Ko) / (var_time_independent_potassium_current__Ko + var_time_independent_potassium_current__K_mK1)) * (var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K);
const NekDouble var_plateau_potassium_current__g_Kp = 0.002216;
const NekDouble var_plateau_potassium_current__V = var_chaste_interface__membrane__V;
const NekDouble var_plateau_potassium_current_Kp_gate__V = var_plateau_potassium_current__V;
const NekDouble var_plateau_potassium_current_Kp_gate__Kp_V = 1.0 / (1.0 + exp((7.488 - var_plateau_potassium_current_Kp_gate__V) / 5.98));
const NekDouble var_plateau_potassium_current__Kp_V = var_plateau_potassium_current_Kp_gate__Kp_V;
const NekDouble var_plateau_potassium_current__E_K = var_rapid_activating_delayed_rectifiyer_K_current__E_K;
const NekDouble var_plateau_potassium_current__i_Kp = var_plateau_potassium_current__g_Kp * var_plateau_potassium_current__Kp_V * (var_plateau_potassium_current__V - var_plateau_potassium_current__E_K);
const NekDouble var_Na_Ca_exchanger__Nao = var_standard_ionic_concentrations__Nao;
const NekDouble var_Na_Ca_exchanger__K_sat = 0.2;
const NekDouble var_Na_Ca_exchanger__K_mNa = 87.5;
const NekDouble var_Na_Ca_exchanger__Nai = var_chaste_interface__intracellular_ion_concentrations__Nai;
const NekDouble var_Na_Ca_exchanger__K_NaCa = 0.3;
const NekDouble var_Na_Ca_exchanger__V = var_chaste_interface__membrane__V;
const NekDouble var_Na_Ca_exchanger__T = var_membrane__T;
const NekDouble var_Na_Ca_exchanger__Cao = var_standard_ionic_concentrations__Cao;
const NekDouble var_Na_Ca_exchanger__eta = 0.35;
const NekDouble var_Na_Ca_exchanger__K_mCa = 1.38;
const NekDouble var_Na_Ca_exchanger__F = var_membrane__F;
const NekDouble var_Na_Ca_exchanger__R = var_membrane__R;
const NekDouble var_Na_Ca_exchanger__Cai = var_chaste_interface__intracellular_ion_concentrations__Cai;
const NekDouble var_Na_Ca_exchanger__i_NaCa = ((var_Na_Ca_exchanger__K_NaCa * 5000.0) / ((pow(var_Na_Ca_exchanger__K_mNa, 3.0) + pow(var_Na_Ca_exchanger__Nao, 3.0)) * (var_Na_Ca_exchanger__K_mCa + var_Na_Ca_exchanger__Cao) * (1.0 + (var_Na_Ca_exchanger__K_sat * exp(((var_Na_Ca_exchanger__eta - 1.0) * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)))))) * ((exp((var_Na_Ca_exchanger__eta * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * pow(var_Na_Ca_exchanger__Nai, 3.0) * var_Na_Ca_exchanger__Cao) - (exp(((var_Na_Ca_exchanger__eta - 1.0) * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * pow(var_Na_Ca_exchanger__Nao, 3.0) * var_Na_Ca_exchanger__Cai));
const NekDouble var_sodium_potassium_pump__Ko = var_standard_ionic_concentrations__Ko;
const NekDouble var_sodium_potassium_pump__K_mNai = 10.0;
const NekDouble var_sodium_potassium_pump__Nai = var_chaste_interface__intracellular_ion_concentrations__Nai;
const NekDouble var_sodium_potassium_pump__V = var_chaste_interface__membrane__V;
const NekDouble var_sodium_potassium_pump__F = var_membrane__F;
const NekDouble var_sodium_potassium_pump__T = var_membrane__T;
const NekDouble var_sodium_potassium_pump__Nao = var_standard_ionic_concentrations__Nao;
const NekDouble var_sodium_potassium_pump__sigma = (1.0 / 7.0) * (exp(var_sodium_potassium_pump__Nao / 67.3) - 1.0);
const NekDouble var_sodium_potassium_pump__R = var_membrane__R;
const NekDouble var_sodium_potassium_pump__f_NaK = 1.0 / (1.0 + (0.1245 * exp(((-0.1) * var_sodium_potassium_pump__V * var_sodium_potassium_pump__F) / (var_sodium_potassium_pump__R * var_sodium_potassium_pump__T))) + (0.0365 * var_sodium_potassium_pump__sigma * exp(((-var_sodium_potassium_pump__V) * var_sodium_potassium_pump__F) / (var_sodium_potassium_pump__R * var_sodium_potassium_pump__T))));
const NekDouble var_sodium_potassium_pump__I_NaK = 0.693;
const NekDouble var_sodium_potassium_pump__K_mKo = 1.5;
const NekDouble var_sodium_potassium_pump__i_NaK = (((var_sodium_potassium_pump__I_NaK * var_sodium_potassium_pump__f_NaK) / (1.0 + pow(var_sodium_potassium_pump__K_mNai / var_sodium_potassium_pump__Nai, 1.5))) * var_sodium_potassium_pump__Ko) / (var_sodium_potassium_pump__Ko + var_sodium_potassium_pump__K_mKo);
const NekDouble var_sarcolemmal_calcium_pump__I_pCa = 0.05;
const NekDouble var_sarcolemmal_calcium_pump__Cai = var_chaste_interface__intracellular_ion_concentrations__Cai;
const NekDouble var_sarcolemmal_calcium_pump__K_mpCa = 5e-05;
const NekDouble var_sarcolemmal_calcium_pump__i_p_Ca = (var_sarcolemmal_calcium_pump__I_pCa * var_sarcolemmal_calcium_pump__Cai) / (var_sarcolemmal_calcium_pump__K_mpCa + var_sarcolemmal_calcium_pump__Cai);
const NekDouble var_calcium_background_current__R = var_membrane__R;
const NekDouble var_calcium_background_current__Cai = var_chaste_interface__intracellular_ion_concentrations__Cai;
const NekDouble var_calcium_background_current__F = var_membrane__F;
const NekDouble var_calcium_background_current__T = var_membrane__T;
const NekDouble var_calcium_background_current__Cao = var_standard_ionic_concentrations__Cao;
const NekDouble var_calcium_background_current__E_Ca = ((var_calcium_background_current__R * var_calcium_background_current__T) / (2.0 * var_calcium_background_current__F)) * log(var_calcium_background_current__Cao / var_calcium_background_current__Cai);
const NekDouble var_calcium_background_current__g_Cab = 0.0003842;
const NekDouble var_calcium_background_current__V = var_chaste_interface__membrane__V;
const NekDouble var_calcium_background_current__i_Ca_b = var_calcium_background_current__g_Cab * (var_calcium_background_current__V - var_calcium_background_current__E_Ca);
const NekDouble var_sodium_background_current__g_Nab = 0.0031;
const NekDouble var_sodium_background_current__V = var_chaste_interface__membrane__V;
const NekDouble var_sodium_background_current__E_Na = var_fast_sodium_current__E_Na;
const NekDouble var_sodium_background_current__i_Na_b = var_sodium_background_current__g_Nab * (var_sodium_background_current__V - var_sodium_background_current__E_Na);
const NekDouble var_fast_sodium_current_m_gate__V = var_fast_sodium_current__V;
const NekDouble var_fast_sodium_current_m_gate__beta_m = 80.0 * exp((-var_fast_sodium_current_m_gate__V) / 11.0);
const NekDouble var_fast_sodium_current_m_gate__E0_m = var_fast_sodium_current_m_gate__V + 47.13;
const NekDouble var_fast_sodium_current_m_gate__alpha_m = (fabs(var_fast_sodium_current_m_gate__E0_m) < 1e-05) ? (1000.0 / (0.1 - (0.005 * var_fast_sodium_current_m_gate__E0_m))) : ((320.0 * var_fast_sodium_current_m_gate__E0_m) / (1.0 - exp((-0.1) * var_fast_sodium_current_m_gate__E0_m)));
const NekDouble var_fast_sodium_current_m_gate__m = var_fast_sodium_current__m;
const NekDouble var_fast_sodium_current_m_gate__d_m_d_environment__time = (var_fast_sodium_current_m_gate__V >= (-90.0)) ? ((var_fast_sodium_current_m_gate__alpha_m * (1.0 - var_fast_sodium_current_m_gate__m)) - (var_fast_sodium_current_m_gate__beta_m * var_fast_sodium_current_m_gate__m)) : 0.0;
const NekDouble var_fast_sodium_current__fast_sodium_current_m_gate__d_m_d_environment__time = var_fast_sodium_current_m_gate__d_m_d_environment__time;
const NekDouble var_fast_sodium_current_h_gate__V = var_fast_sodium_current__V;
const NekDouble var_fast_sodium_current_h_gate__beta_h = (var_fast_sodium_current_h_gate__V < (-40.0)) ? ((3560.0 * exp(0.079 * var_fast_sodium_current_h_gate__V)) + (310000.0 * exp(0.35 * var_fast_sodium_current_h_gate__V))) : (1000.0 / (0.13 * (1.0 + exp((var_fast_sodium_current_h_gate__V + 10.66) / (-11.1)))));
const NekDouble var_fast_sodium_current_h_gate__alpha_h = (var_fast_sodium_current_h_gate__V < (-40.0)) ? (135.0 * exp((80.0 + var_fast_sodium_current_h_gate__V) / (-6.8))) : 0.0;
const NekDouble var_fast_sodium_current_h_gate__h = var_fast_sodium_current__h;
const NekDouble var_fast_sodium_current_h_gate__d_h_d_environment__time = (var_fast_sodium_current_h_gate__alpha_h * (1.0 - var_fast_sodium_current_h_gate__h)) - (var_fast_sodium_current_h_gate__beta_h * var_fast_sodium_current_h_gate__h);
const NekDouble var_fast_sodium_current__fast_sodium_current_h_gate__d_h_d_environment__time = var_fast_sodium_current_h_gate__d_h_d_environment__time;
const NekDouble var_fast_sodium_current_j_gate__V = var_fast_sodium_current__V;
const NekDouble var_fast_sodium_current_j_gate__alpha_j = (var_fast_sodium_current_j_gate__V < (-40.0)) ? ((1000.0 * (-((127140.0 * exp(0.2444 * var_fast_sodium_current_j_gate__V)) + (3.474e-05 * exp((-0.04391) * var_fast_sodium_current_j_gate__V)))) * (var_fast_sodium_current_j_gate__V + 37.78)) / (1.0 + exp(0.311 * (var_fast_sodium_current_j_gate__V + 79.23)))) : 0.0;
const NekDouble var_fast_sodium_current_j_gate__beta_j = (var_fast_sodium_current_j_gate__V < (-40.0)) ? ((121.2 * exp((-0.01052) * var_fast_sodium_current_j_gate__V)) / (1.0 + exp((-0.1378) * (var_fast_sodium_current_j_gate__V + 40.14)))) : ((300.0 * exp((-2.535e-07) * var_fast_sodium_current_j_gate__V)) / (1.0 + exp((-0.1) * (var_fast_sodium_current_j_gate__V + 32.0))));
const NekDouble var_fast_sodium_current_j_gate__j = var_fast_sodium_current__j;
const NekDouble var_fast_sodium_current_j_gate__d_j_d_environment__time = (var_fast_sodium_current_j_gate__alpha_j * (1.0 - var_fast_sodium_current_j_gate__j)) - (var_fast_sodium_current_j_gate__beta_j * var_fast_sodium_current_j_gate__j);
const NekDouble var_fast_sodium_current__fast_sodium_current_j_gate__d_j_d_environment__time = var_fast_sodium_current_j_gate__d_j_d_environment__time;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__tau_factor = 1.0;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__V = var_rapid_activating_delayed_rectifiyer_K_current__V;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__K21 = exp((-7.677) - (0.0128 * var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__V));
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__K12 = exp((-5.495) + (0.1691 * var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__V));
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__tau_X_kr = (0.001 / (var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__K12 + var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__K21)) + (var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__tau_factor * 0.027);
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr = var_rapid_activating_delayed_rectifiyer_K_current__X_kr;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr_inf = var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__K12 / (var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__K12 + var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__K21);
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time = (var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr_inf - var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr) / var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__tau_X_kr;
const NekDouble var_rapid_activating_delayed_rectifiyer_K_current__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time = var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V = var_slow_activating_delayed_rectifiyer_K_current__V;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__tau_X_ks = 0.001 / (((7.19e-05 * (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V - 10.0)) / (1.0 - exp((-0.148) * (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V - 10.0)))) + ((0.000131 * (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V - 10.0)) / (exp(0.0687 * (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V - 10.0)) - 1.0)));
const NekDouble var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks_infinity = 1.0 / (1.0 + exp((-(var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V - 24.7)) / 13.6));
const NekDouble var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks = var_slow_activating_delayed_rectifiyer_K_current__X_ks;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time = (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks_infinity - var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks) / var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__tau_X_ks;
const NekDouble var_slow_activating_delayed_rectifiyer_K_current__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time = var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time;
const NekDouble var_transient_outward_potassium_current_X_to1_gate__V = var_transient_outward_potassium_current__V;
const NekDouble var_transient_outward_potassium_current_X_to1_gate__alpha_X_to1 = 45.16 * exp(0.03577 * var_transient_outward_potassium_current_X_to1_gate__V);
const NekDouble var_transient_outward_potassium_current_X_to1_gate__X_to1 = var_transient_outward_potassium_current__X_to1;
const NekDouble var_transient_outward_potassium_current_X_to1_gate__beta_X_to1 = 98.9 * exp((-0.06237) * var_transient_outward_potassium_current_X_to1_gate__V);
const NekDouble var_transient_outward_potassium_current_X_to1_gate__d_X_to1_d_environment__time = (var_transient_outward_potassium_current_X_to1_gate__alpha_X_to1 * (1.0 - var_transient_outward_potassium_current_X_to1_gate__X_to1)) - (var_transient_outward_potassium_current_X_to1_gate__beta_X_to1 * var_transient_outward_potassium_current_X_to1_gate__X_to1);
const NekDouble var_transient_outward_potassium_current__transient_outward_potassium_current_X_to1_gate__d_X_to1_d_environment__time = var_transient_outward_potassium_current_X_to1_gate__d_X_to1_d_environment__time;
const NekDouble var_transient_outward_potassium_current_Y_to1_gate__V = var_transient_outward_potassium_current__V;
const NekDouble var_transient_outward_potassium_current_Y_to1_gate__alpha_Y_to1 = (5.415 * exp((-(var_transient_outward_potassium_current_Y_to1_gate__V + 33.5)) / 5.0)) / (1.0 + (0.051335 * exp((-(var_transient_outward_potassium_current_Y_to1_gate__V + 33.5)) / 5.0)));
const NekDouble var_transient_outward_potassium_current_Y_to1_gate__Y_to1 = var_transient_outward_potassium_current__Y_to1;
const NekDouble var_transient_outward_potassium_current_Y_to1_gate__beta_Y_to1 = (5.415 * exp((var_transient_outward_potassium_current_Y_to1_gate__V + 33.5) / 5.0)) / (1.0 + (0.051335 * exp((var_transient_outward_potassium_current_Y_to1_gate__V + 33.5) / 5.0)));
const NekDouble var_transient_outward_potassium_current_Y_to1_gate__d_Y_to1_d_environment__time = (var_transient_outward_potassium_current_Y_to1_gate__alpha_Y_to1 * (1.0 - var_transient_outward_potassium_current_Y_to1_gate__Y_to1)) - (var_transient_outward_potassium_current_Y_to1_gate__beta_Y_to1 * var_transient_outward_potassium_current_Y_to1_gate__Y_to1);
const NekDouble var_transient_outward_potassium_current__transient_outward_potassium_current_Y_to1_gate__d_Y_to1_d_environment__time = var_transient_outward_potassium_current_Y_to1_gate__d_Y_to1_d_environment__time;
const NekDouble var_L_type_Ca_current__alpha = 400.0 * exp((var_L_type_Ca_current__V + 2.0) / 10.0);
const NekDouble var_L_type_Ca_current__beta = 50.0 * exp((-(var_L_type_Ca_current__V + 2.0)) / 13.0);
const NekDouble var_L_type_Ca_current__Ca_ss = var_chaste_interface__intracellular_ion_concentrations__Ca_ss;
const NekDouble var_L_type_Ca_current__gamma = (103.75 * var_L_type_Ca_current__Ca_ss) / 1.0;
const NekDouble var_L_type_Ca_current__a = 2.0;
const NekDouble var_L_type_Ca_current__alpha_a = var_L_type_Ca_current__alpha * var_L_type_Ca_current__a;
const NekDouble var_L_type_Ca_current__b = 2.0;
const NekDouble var_L_type_Ca_current__beta_b = var_L_type_Ca_current__beta / var_L_type_Ca_current__b;
const NekDouble var_L_type_Ca_current__g = 2000.0;
const NekDouble var_L_type_Ca_current__f = 300.0;
const NekDouble var_L_type_Ca_current__gprime = 7000.0;
const NekDouble var_L_type_Ca_current__fprime = 7.0;
const NekDouble var_L_type_Ca_current__omega = 10.0;
const NekDouble var_L_type_Ca_current__C0 = var_chaste_interface__L_type_Ca_current__C0;
const NekDouble var_L_type_Ca_current__C1 = var_chaste_interface__L_type_Ca_current__C1;
const NekDouble var_L_type_Ca_current__C2 = var_chaste_interface__L_type_Ca_current__C2;
const NekDouble var_L_type_Ca_current__C3 = var_chaste_interface__L_type_Ca_current__C3;
const NekDouble var_L_type_Ca_current__C4 = var_chaste_interface__L_type_Ca_current__C4;
const NekDouble var_L_type_Ca_current__C_Ca0 = var_chaste_interface__L_type_Ca_current__C_Ca0;
const NekDouble var_L_type_Ca_current__C_Ca1 = var_chaste_interface__L_type_Ca_current__C_Ca1;
const NekDouble var_L_type_Ca_current__C_Ca2 = var_chaste_interface__L_type_Ca_current__C_Ca2;
const NekDouble var_L_type_Ca_current__C_Ca3 = var_chaste_interface__L_type_Ca_current__C_Ca3;
const NekDouble var_L_type_Ca_current__C_Ca4 = var_chaste_interface__L_type_Ca_current__C_Ca4;
const NekDouble var_L_type_Ca_current__d_O_d_environment__time = (var_L_type_Ca_current__f * var_L_type_Ca_current__C4) - (var_L_type_Ca_current__g * var_L_type_Ca_current__O);
const NekDouble var_L_type_Ca_current__d_O_Ca_d_environment__time = (var_L_type_Ca_current__fprime * var_L_type_Ca_current__C_Ca4) - (var_L_type_Ca_current__gprime * var_L_type_Ca_current__O_Ca);
const NekDouble var_L_type_Ca_current__d_C0_d_environment__time = ((var_L_type_Ca_current__beta * var_L_type_Ca_current__C1) + (var_L_type_Ca_current__omega * var_L_type_Ca_current__C_Ca0)) - (((4.0 * var_L_type_Ca_current__alpha) + var_L_type_Ca_current__gamma) * var_L_type_Ca_current__C0);
const NekDouble var_L_type_Ca_current__d_C1_d_environment__time = ((4.0 * var_L_type_Ca_current__alpha * var_L_type_Ca_current__C0) + (2.0 * var_L_type_Ca_current__beta * var_L_type_Ca_current__C2) + ((var_L_type_Ca_current__omega / var_L_type_Ca_current__b) * var_L_type_Ca_current__C_Ca1)) - ((var_L_type_Ca_current__beta + (3.0 * var_L_type_Ca_current__alpha) + (var_L_type_Ca_current__gamma * var_L_type_Ca_current__a)) * var_L_type_Ca_current__C1);
const NekDouble var_L_type_Ca_current__d_C2_d_environment__time = ((3.0 * var_L_type_Ca_current__alpha * var_L_type_Ca_current__C1) + (3.0 * var_L_type_Ca_current__beta * var_L_type_Ca_current__C3) + ((var_L_type_Ca_current__omega / pow(var_L_type_Ca_current__b, 2.0)) * var_L_type_Ca_current__C_Ca2)) - (((var_L_type_Ca_current__beta * 2.0) + (2.0 * var_L_type_Ca_current__alpha) + (var_L_type_Ca_current__gamma * pow(var_L_type_Ca_current__a, 2.0))) * var_L_type_Ca_current__C2);
const NekDouble var_L_type_Ca_current__d_C3_d_environment__time = ((2.0 * var_L_type_Ca_current__alpha * var_L_type_Ca_current__C2) + (4.0 * var_L_type_Ca_current__beta * var_L_type_Ca_current__C4) + ((var_L_type_Ca_current__omega / pow(var_L_type_Ca_current__b, 3.0)) * var_L_type_Ca_current__C_Ca3)) - (((var_L_type_Ca_current__beta * 3.0) + var_L_type_Ca_current__alpha + (var_L_type_Ca_current__gamma * pow(var_L_type_Ca_current__a, 3.0))) * var_L_type_Ca_current__C3);
const NekDouble var_L_type_Ca_current__d_C4_d_environment__time = ((var_L_type_Ca_current__alpha * var_L_type_Ca_current__C3) + (var_L_type_Ca_current__g * var_L_type_Ca_current__O) + ((var_L_type_Ca_current__omega / pow(var_L_type_Ca_current__b, 4.0)) * var_L_type_Ca_current__C_Ca4)) - (((var_L_type_Ca_current__beta * 4.0) + var_L_type_Ca_current__f + (var_L_type_Ca_current__gamma * pow(var_L_type_Ca_current__a, 4.0))) * var_L_type_Ca_current__C4);
const NekDouble var_L_type_Ca_current__d_C_Ca0_d_environment__time = ((var_L_type_Ca_current__beta_b * var_L_type_Ca_current__C_Ca1) + (var_L_type_Ca_current__gamma * var_L_type_Ca_current__C0)) - (((4.0 * var_L_type_Ca_current__alpha_a) + var_L_type_Ca_current__omega) * var_L_type_Ca_current__C_Ca0);
const NekDouble var_L_type_Ca_current__d_C_Ca1_d_environment__time = ((4.0 * var_L_type_Ca_current__alpha_a * var_L_type_Ca_current__C_Ca0) + (2.0 * var_L_type_Ca_current__beta_b * var_L_type_Ca_current__C_Ca2) + (var_L_type_Ca_current__gamma * var_L_type_Ca_current__a * var_L_type_Ca_current__C1)) - ((var_L_type_Ca_current__beta_b + (3.0 * var_L_type_Ca_current__alpha_a) + (var_L_type_Ca_current__omega / var_L_type_Ca_current__b)) * var_L_type_Ca_current__C_Ca1);
const NekDouble var_L_type_Ca_current__d_C_Ca2_d_environment__time = ((3.0 * var_L_type_Ca_current__alpha_a * var_L_type_Ca_current__C_Ca1) + (3.0 * var_L_type_Ca_current__beta_b * var_L_type_Ca_current__C_Ca3) + (var_L_type_Ca_current__gamma * pow(var_L_type_Ca_current__a, 2.0) * var_L_type_Ca_current__C2)) - (((var_L_type_Ca_current__beta_b * 2.0) + (2.0 * var_L_type_Ca_current__alpha_a) + (var_L_type_Ca_current__omega / pow(var_L_type_Ca_current__b, 2.0))) * var_L_type_Ca_current__C_Ca2);
const NekDouble var_L_type_Ca_current__d_C_Ca3_d_environment__time = ((2.0 * var_L_type_Ca_current__alpha_a * var_L_type_Ca_current__C_Ca2) + (4.0 * var_L_type_Ca_current__beta_b * var_L_type_Ca_current__C_Ca4) + (var_L_type_Ca_current__gamma * pow(var_L_type_Ca_current__a, 3.0) * var_L_type_Ca_current__C3)) - (((var_L_type_Ca_current__beta_b * 3.0) + var_L_type_Ca_current__alpha_a + (var_L_type_Ca_current__omega / pow(var_L_type_Ca_current__b, 3.0))) * var_L_type_Ca_current__C_Ca3);
const NekDouble var_L_type_Ca_current__d_C_Ca4_d_environment__time = ((var_L_type_Ca_current__alpha_a * var_L_type_Ca_current__C_Ca3) + (var_L_type_Ca_current__gprime * var_L_type_Ca_current__O_Ca) + (var_L_type_Ca_current__gamma * pow(var_L_type_Ca_current__a, 4.0) * var_L_type_Ca_current__C4)) - (((var_L_type_Ca_current__beta_b * 4.0) + var_L_type_Ca_current__fprime + (var_L_type_Ca_current__omega / pow(var_L_type_Ca_current__b, 4.0))) * var_L_type_Ca_current__C_Ca4);
const NekDouble var_L_type_Ca_current_y_gate__y = var_L_type_Ca_current__y;
const NekDouble var_L_type_Ca_current_y_gate__V = var_L_type_Ca_current__V;
const NekDouble var_L_type_Ca_current_y_gate__y_infinity = (0.8 / (1.0 + exp((var_L_type_Ca_current_y_gate__V + 12.5) / 5.0))) + 0.2;
const NekDouble var_L_type_Ca_current_y_gate__tau_y = (20.0 + (600.0 / (1.0 + exp((var_L_type_Ca_current_y_gate__V + 20.0) / 9.5)))) / 1000.0;
const NekDouble var_L_type_Ca_current_y_gate__d_y_d_environment__time = (var_L_type_Ca_current_y_gate__y_infinity - var_L_type_Ca_current_y_gate__y) / var_L_type_Ca_current_y_gate__tau_y;
const NekDouble var_L_type_Ca_current__L_type_Ca_current_y_gate__d_y_d_environment__time = var_L_type_Ca_current_y_gate__d_y_d_environment__time;
const NekDouble var_RyR_channel__P_O2 = var_chaste_interface__RyR_channel__P_O2;
const NekDouble var_RyR_channel__Ca_ss = var_chaste_interface__intracellular_ion_concentrations__Ca_ss;
const NekDouble var_RyR_channel__P_O1 = var_chaste_interface__RyR_channel__P_O1;
const NekDouble var_RyR_channel__v1 = 1800.0;
const NekDouble var_RyR_channel__Ca_JSR = var_chaste_interface__intracellular_ion_concentrations__Ca_JSR;
const NekDouble var_RyR_channel__J_rel = var_RyR_channel__v1 * (var_RyR_channel__P_O1 + var_RyR_channel__P_O2) * (var_RyR_channel__Ca_JSR - var_RyR_channel__Ca_ss);
const NekDouble var_RyR_channel__k_a_plus = 1.215e+13;
const NekDouble var_RyR_channel__k_a_minus = 576.0;
const NekDouble var_RyR_channel__k_b_plus = 4050000000.0;
const NekDouble var_RyR_channel__k_b_minus = 1930.0;
const NekDouble var_RyR_channel__k_c_plus = 100.0;
const NekDouble var_RyR_channel__k_c_minus = 0.8;
const NekDouble var_RyR_channel__P_C1 = var_chaste_interface__RyR_channel__P_C1;
const NekDouble var_RyR_channel__P_C2 = var_chaste_interface__RyR_channel__P_C2;
const NekDouble var_RyR_channel__d_P_O1_d_environment__time = ((var_RyR_channel__k_a_plus * pow(var_RyR_channel__Ca_ss, var_RyR_channel__n) * var_RyR_channel__P_C1) - ((var_RyR_channel__k_a_minus * var_RyR_channel__P_O1) + (var_RyR_channel__k_b_plus * pow(var_RyR_channel__Ca_ss, var_RyR_channel__m) * var_RyR_channel__P_O1) + (var_RyR_channel__k_c_plus * var_RyR_channel__P_O1))) + (var_RyR_channel__k_b_minus * var_RyR_channel__P_O2) + (var_RyR_channel__k_c_minus * var_RyR_channel__P_C2);
const NekDouble var_RyR_channel__d_P_O2_d_environment__time = (var_RyR_channel__k_b_plus * pow(var_RyR_channel__Ca_ss, var_RyR_channel__m) * var_RyR_channel__P_O1) - (var_RyR_channel__k_b_minus * var_RyR_channel__P_O2);
const NekDouble var_RyR_channel__d_P_C1_d_environment__time = ((-var_RyR_channel__k_a_plus) * pow(var_RyR_channel__Ca_ss, var_RyR_channel__n) * var_RyR_channel__P_C1) + (var_RyR_channel__k_a_minus * var_RyR_channel__P_O1);
const NekDouble var_RyR_channel__d_P_C2_d_environment__time = (var_RyR_channel__k_c_plus * var_RyR_channel__P_O1) - (var_RyR_channel__k_c_minus * var_RyR_channel__P_C2);
const NekDouble var_SERCA2a_pump__Cai = var_chaste_interface__intracellular_ion_concentrations__Cai;
const NekDouble var_SERCA2a_pump__N_fb = 1.2;
const NekDouble var_SERCA2a_pump__K_fb = 0.000168;
const NekDouble var_SERCA2a_pump__fb = pow(var_SERCA2a_pump__Cai / var_SERCA2a_pump__K_fb, var_SERCA2a_pump__N_fb);
const NekDouble var_SERCA2a_pump__Vmaxf = 0.0813;
const NekDouble var_SERCA2a_pump__K_SR = 1.0;
const NekDouble var_SERCA2a_pump__Ca_NSR = var_chaste_interface__intracellular_ion_concentrations__Ca_NSR;
const NekDouble var_SERCA2a_pump__K_rb = 3.29;
const NekDouble var_SERCA2a_pump__N_rb = 1.0;
const NekDouble var_SERCA2a_pump__rb = pow(var_SERCA2a_pump__Ca_NSR / var_SERCA2a_pump__K_rb, var_SERCA2a_pump__N_rb);
const NekDouble var_SERCA2a_pump__Vmaxr = 0.318;
const NekDouble var_SERCA2a_pump__J_up = (var_SERCA2a_pump__K_SR * ((var_SERCA2a_pump__Vmaxf * var_SERCA2a_pump__fb) - (var_SERCA2a_pump__Vmaxr * var_SERCA2a_pump__rb))) / (1.0 + var_SERCA2a_pump__fb + var_SERCA2a_pump__rb);
const NekDouble var_intracellular_Ca_fluxes__Ca_NSR = var_chaste_interface__intracellular_ion_concentrations__Ca_NSR;
const NekDouble var_intracellular_Ca_fluxes__Ca_JSR = var_chaste_interface__intracellular_ion_concentrations__Ca_JSR;
const NekDouble var_intracellular_Ca_fluxes__tau_tr = 0.0005747;
const NekDouble var_intracellular_Ca_fluxes__J_tr = (var_intracellular_Ca_fluxes__Ca_NSR - var_intracellular_Ca_fluxes__Ca_JSR) / var_intracellular_Ca_fluxes__tau_tr;
const NekDouble var_intracellular_Ca_fluxes__Cai = var_chaste_interface__intracellular_ion_concentrations__Cai;
const NekDouble var_intracellular_Ca_fluxes__tau_xfer = 0.0267;
const NekDouble var_intracellular_Ca_fluxes__Ca_ss = var_chaste_interface__intracellular_ion_concentrations__Ca_ss;
const NekDouble var_intracellular_Ca_fluxes__J_xfer = (var_intracellular_Ca_fluxes__Ca_ss - var_intracellular_Ca_fluxes__Cai) / var_intracellular_Ca_fluxes__tau_xfer;
const NekDouble var_intracellular_Ca_fluxes__k_htrpn_minus = 0.066;
const NekDouble var_intracellular_Ca_fluxes__k_htrpn_plus = 20000.0;
const NekDouble var_intracellular_Ca_fluxes__HTRPNCa = var_chaste_interface__intracellular_Ca_fluxes__HTRPNCa;
const NekDouble var_intracellular_Ca_fluxes__d_HTRPNCa_d_environment__time = (var_intracellular_Ca_fluxes__k_htrpn_plus * var_intracellular_Ca_fluxes__Cai * (1.0 - var_intracellular_Ca_fluxes__HTRPNCa)) - (var_intracellular_Ca_fluxes__k_htrpn_minus * var_intracellular_Ca_fluxes__HTRPNCa);
const NekDouble var_intracellular_Ca_fluxes__J_HTRPNCa = var_intracellular_Ca_fluxes__d_HTRPNCa_d_environment__time;
const NekDouble var_intracellular_Ca_fluxes__LTRPN_tot = 0.07;
const NekDouble var_intracellular_Ca_fluxes__LTRPNCa = var_chaste_interface__intracellular_Ca_fluxes__LTRPNCa;
const NekDouble var_intracellular_Ca_fluxes__k_ltrpn_minus = 40.0;
const NekDouble var_intracellular_Ca_fluxes__k_ltrpn_plus = 40000.0;
const NekDouble var_intracellular_Ca_fluxes__d_LTRPNCa_d_environment__time = (var_intracellular_Ca_fluxes__k_ltrpn_plus * var_intracellular_Ca_fluxes__Cai * (1.0 - var_intracellular_Ca_fluxes__LTRPNCa)) - (var_intracellular_Ca_fluxes__k_ltrpn_minus * var_intracellular_Ca_fluxes__LTRPNCa);
const NekDouble var_intracellular_Ca_fluxes__J_LTRPNCa = var_intracellular_Ca_fluxes__d_LTRPNCa_d_environment__time;
const NekDouble var_intracellular_Ca_fluxes__HTRPN_tot = 0.14;
const NekDouble var_intracellular_Ca_fluxes__J_trpn = (var_intracellular_Ca_fluxes__HTRPN_tot * var_intracellular_Ca_fluxes__J_HTRPNCa) + (var_intracellular_Ca_fluxes__LTRPN_tot * var_intracellular_Ca_fluxes__J_LTRPNCa);
const NekDouble var_intracellular_ion_concentrations__Cai = var_chaste_interface__intracellular_ion_concentrations__Cai;
const NekDouble var_intracellular_ion_concentrations__Ca_ss = var_chaste_interface__intracellular_ion_concentrations__Ca_ss;
const NekDouble var_intracellular_ion_concentrations__Ca_JSR = var_chaste_interface__intracellular_ion_concentrations__Ca_JSR;
const NekDouble var_intracellular_ion_concentrations__A_cap = 0.0001534;
const NekDouble var_intracellular_ion_concentrations__V_myo = 2.584e-05;
const NekDouble var_intracellular_ion_concentrations__V_JSR = 1.6e-07;
const NekDouble var_intracellular_ion_concentrations__V_NSR = 2.1e-06;
const NekDouble var_intracellular_ion_concentrations__V_SS = 1.2e-09;
const NekDouble var_intracellular_ion_concentrations__K_mCMDN = 0.00238;
const NekDouble var_intracellular_ion_concentrations__K_mEGTA = 0.00015;
const NekDouble var_intracellular_ion_concentrations__K_mCSQN = 0.8;
const NekDouble var_intracellular_ion_concentrations__CMDN_tot = 0.05;
const NekDouble var_intracellular_ion_concentrations__EGTA_tot = 0.0;
const NekDouble var_intracellular_ion_concentrations__CSQN_tot = 15.0;
const NekDouble var_intracellular_ion_concentrations__beta_i = 1.0 / (1.0 + ((var_intracellular_ion_concentrations__CMDN_tot * var_intracellular_ion_concentrations__K_mCMDN) / pow(var_intracellular_ion_concentrations__K_mCMDN + var_intracellular_ion_concentrations__Cai, 2.0)) + ((var_intracellular_ion_concentrations__EGTA_tot * var_intracellular_ion_concentrations__K_mEGTA) / pow(var_intracellular_ion_concentrations__K_mEGTA + var_intracellular_ion_concentrations__Cai, 2.0)));
const NekDouble var_intracellular_ion_concentrations__beta_SS = 1.0 / (1.0 + ((var_intracellular_ion_concentrations__CMDN_tot * var_intracellular_ion_concentrations__K_mCMDN) / pow(var_intracellular_ion_concentrations__K_mCMDN + var_intracellular_ion_concentrations__Ca_ss, 2.0)) + ((var_intracellular_ion_concentrations__EGTA_tot * var_intracellular_ion_concentrations__K_mEGTA) / pow(var_intracellular_ion_concentrations__K_mEGTA + var_intracellular_ion_concentrations__Ca_ss, 2.0)));
const NekDouble var_intracellular_ion_concentrations__beta_JSR = 1.0 / (1.0 + ((var_intracellular_ion_concentrations__CSQN_tot * var_intracellular_ion_concentrations__K_mCSQN) / pow(var_intracellular_ion_concentrations__K_mCSQN + var_intracellular_ion_concentrations__Ca_JSR, 2.0)));
const NekDouble var_intracellular_ion_concentrations__F = var_membrane__F;
const NekDouble var_intracellular_ion_concentrations__i_Na = var_fast_sodium_current__i_Na;
const NekDouble var_intracellular_ion_concentrations__i_Ca = var_L_type_Ca_current__i_Ca;
const NekDouble var_intracellular_ion_concentrations__i_Na_b = var_sodium_background_current__i_Na_b;
const NekDouble var_intracellular_ion_concentrations__i_NaCa = var_Na_Ca_exchanger__i_NaCa;
const NekDouble var_intracellular_ion_concentrations__i_NaK = var_sodium_potassium_pump__i_NaK;
const NekDouble var_intracellular_ion_concentrations__i_Ca_K = var_L_type_Ca_current__i_Ca_K;
const NekDouble var_intracellular_ion_concentrations__i_Kr = var_rapid_activating_delayed_rectifiyer_K_current__i_Kr;
const NekDouble var_intracellular_ion_concentrations__i_Ks = var_slow_activating_delayed_rectifiyer_K_current__i_Ks;
const NekDouble var_intracellular_ion_concentrations__i_K1 = var_time_independent_potassium_current__i_K1;
const NekDouble var_intracellular_ion_concentrations__i_Kp = var_plateau_potassium_current__i_Kp;
const NekDouble var_intracellular_ion_concentrations__i_to1 = var_transient_outward_potassium_current__i_to1;
const NekDouble var_intracellular_ion_concentrations__i_p_Ca = var_sarcolemmal_calcium_pump__i_p_Ca;
const NekDouble var_intracellular_ion_concentrations__i_Ca_b = var_calcium_background_current__i_Ca_b;
const NekDouble var_intracellular_ion_concentrations__J_up = var_SERCA2a_pump__J_up;
const NekDouble var_intracellular_ion_concentrations__J_rel = var_RyR_channel__J_rel;
const NekDouble var_intracellular_ion_concentrations__J_xfer = var_intracellular_Ca_fluxes__J_xfer;
const NekDouble var_intracellular_ion_concentrations__J_trpn = var_intracellular_Ca_fluxes__J_trpn;
const NekDouble var_intracellular_ion_concentrations__J_tr = var_intracellular_Ca_fluxes__J_tr;
const NekDouble var_intracellular_ion_concentrations__d_Nai_d_environment__time = ((-0.0) * (var_intracellular_ion_concentrations__i_Na + var_intracellular_ion_concentrations__i_Na_b + (var_intracellular_ion_concentrations__i_NaCa * 3.0) + (var_intracellular_ion_concentrations__i_NaK * 3.0)) * var_intracellular_ion_concentrations__A_cap * 1.0) / (var_intracellular_ion_concentrations__V_myo * var_intracellular_ion_concentrations__F);
const NekDouble var_intracellular_ion_concentrations__d_Cai_d_environment__time = var_intracellular_ion_concentrations__beta_i * ((var_intracellular_ion_concentrations__J_xfer - (var_intracellular_ion_concentrations__J_up + var_intracellular_ion_concentrations__J_trpn)) + ((((2.0 * var_intracellular_ion_concentrations__i_NaCa) - (var_intracellular_ion_concentrations__i_p_Ca + var_intracellular_ion_concentrations__i_Ca_b)) * var_intracellular_ion_concentrations__A_cap * 1.0) / (2.0 * var_intracellular_ion_concentrations__V_myo * var_intracellular_ion_concentrations__F)));
const NekDouble var_intracellular_ion_concentrations__d_Ki_d_environment__time = ((-0.0) * (var_intracellular_ion_concentrations__i_Ca_K + var_intracellular_ion_concentrations__i_Kr + var_intracellular_ion_concentrations__i_Ks + var_intracellular_ion_concentrations__i_K1 + var_intracellular_ion_concentrations__i_Kp + var_intracellular_ion_concentrations__i_to1 + (var_intracellular_ion_concentrations__i_NaK * (-2.0))) * var_intracellular_ion_concentrations__A_cap * 1.0) / (var_intracellular_ion_concentrations__V_myo * var_intracellular_ion_concentrations__F);
const NekDouble var_intracellular_ion_concentrations__d_Ca_ss_d_environment__time = var_intracellular_ion_concentrations__beta_SS * ((((var_intracellular_ion_concentrations__J_rel * var_intracellular_ion_concentrations__V_JSR) / var_intracellular_ion_concentrations__V_SS) - ((var_intracellular_ion_concentrations__J_xfer * var_intracellular_ion_concentrations__V_myo) / var_intracellular_ion_concentrations__V_SS)) - ((var_intracellular_ion_concentrations__i_Ca * var_intracellular_ion_concentrations__A_cap * 1.0) / (2.0 * var_intracellular_ion_concentrations__V_SS * var_intracellular_ion_concentrations__F)));
const NekDouble var_intracellular_ion_concentrations__d_Ca_JSR_d_environment__time = var_intracellular_ion_concentrations__beta_JSR * (var_intracellular_ion_concentrations__J_tr - var_intracellular_ion_concentrations__J_rel);
const NekDouble var_intracellular_ion_concentrations__d_Ca_NSR_d_environment__time = ((var_intracellular_ion_concentrations__J_up * var_intracellular_ion_concentrations__V_myo) / var_intracellular_ion_concentrations__V_NSR) - ((var_intracellular_ion_concentrations__J_tr * var_intracellular_ion_concentrations__V_JSR) / var_intracellular_ion_concentrations__V_NSR);
const NekDouble var_chaste_interface__fast_sodium_current_m_gate__d_m_d_environment__time_converter = var_fast_sodium_current__fast_sodium_current_m_gate__d_m_d_environment__time;
const NekDouble var_chaste_interface__fast_sodium_current_m_gate__d_m_d_environment__time = 0.001 * var_chaste_interface__fast_sodium_current_m_gate__d_m_d_environment__time_converter;
const NekDouble var_chaste_interface__fast_sodium_current_h_gate__d_h_d_environment__time_converter = var_fast_sodium_current__fast_sodium_current_h_gate__d_h_d_environment__time;
const NekDouble var_chaste_interface__fast_sodium_current_h_gate__d_h_d_environment__time = 0.001 * var_chaste_interface__fast_sodium_current_h_gate__d_h_d_environment__time_converter;
const NekDouble var_chaste_interface__fast_sodium_current_j_gate__d_j_d_environment__time_converter = var_fast_sodium_current__fast_sodium_current_j_gate__d_j_d_environment__time;
const NekDouble var_chaste_interface__fast_sodium_current_j_gate__d_j_d_environment__time = 0.001 * var_chaste_interface__fast_sodium_current_j_gate__d_j_d_environment__time_converter;
const NekDouble var_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time_converter = var_rapid_activating_delayed_rectifiyer_K_current__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time;
const NekDouble var_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time = 0.001 * var_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time_converter;
const NekDouble var_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time_converter = var_slow_activating_delayed_rectifiyer_K_current__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time;
const NekDouble var_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time = 0.001 * var_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time_converter;
const NekDouble var_chaste_interface__transient_outward_potassium_current_X_to1_gate__d_X_to1_d_environment__time_converter = var_transient_outward_potassium_current__transient_outward_potassium_current_X_to1_gate__d_X_to1_d_environment__time;
const NekDouble var_chaste_interface__transient_outward_potassium_current_X_to1_gate__d_X_to1_d_environment__time = 0.001 * var_chaste_interface__transient_outward_potassium_current_X_to1_gate__d_X_to1_d_environment__time_converter;
const NekDouble var_chaste_interface__transient_outward_potassium_current_Y_to1_gate__d_Y_to1_d_environment__time_converter = var_transient_outward_potassium_current__transient_outward_potassium_current_Y_to1_gate__d_Y_to1_d_environment__time;
const NekDouble var_chaste_interface__transient_outward_potassium_current_Y_to1_gate__d_Y_to1_d_environment__time = 0.001 * var_chaste_interface__transient_outward_potassium_current_Y_to1_gate__d_Y_to1_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current__d_O_d_environment__time_converter = var_L_type_Ca_current__d_O_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current__d_O_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current__d_O_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current__d_O_Ca_d_environment__time_converter = var_L_type_Ca_current__d_O_Ca_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current__d_O_Ca_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current__d_O_Ca_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C0_d_environment__time_converter = var_L_type_Ca_current__d_C0_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C0_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current__d_C0_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C1_d_environment__time_converter = var_L_type_Ca_current__d_C1_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C1_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current__d_C1_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C2_d_environment__time_converter = var_L_type_Ca_current__d_C2_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C2_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current__d_C2_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C3_d_environment__time_converter = var_L_type_Ca_current__d_C3_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C3_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current__d_C3_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C4_d_environment__time_converter = var_L_type_Ca_current__d_C4_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C4_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current__d_C4_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C_Ca0_d_environment__time_converter = var_L_type_Ca_current__d_C_Ca0_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C_Ca0_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current__d_C_Ca0_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C_Ca1_d_environment__time_converter = var_L_type_Ca_current__d_C_Ca1_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C_Ca1_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current__d_C_Ca1_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C_Ca2_d_environment__time_converter = var_L_type_Ca_current__d_C_Ca2_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C_Ca2_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current__d_C_Ca2_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C_Ca3_d_environment__time_converter = var_L_type_Ca_current__d_C_Ca3_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C_Ca3_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current__d_C_Ca3_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C_Ca4_d_environment__time_converter = var_L_type_Ca_current__d_C_Ca4_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current__d_C_Ca4_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current__d_C_Ca4_d_environment__time_converter;
const NekDouble var_chaste_interface__L_type_Ca_current_y_gate__d_y_d_environment__time_converter = var_L_type_Ca_current__L_type_Ca_current_y_gate__d_y_d_environment__time;
const NekDouble var_chaste_interface__L_type_Ca_current_y_gate__d_y_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_current_y_gate__d_y_d_environment__time_converter;
const NekDouble var_chaste_interface__RyR_channel__d_P_O1_d_environment__time_converter = var_RyR_channel__d_P_O1_d_environment__time;
const NekDouble var_chaste_interface__RyR_channel__d_P_O1_d_environment__time = 0.001 * var_chaste_interface__RyR_channel__d_P_O1_d_environment__time_converter;
const NekDouble var_chaste_interface__RyR_channel__d_P_O2_d_environment__time_converter = var_RyR_channel__d_P_O2_d_environment__time;
const NekDouble var_chaste_interface__RyR_channel__d_P_O2_d_environment__time = 0.001 * var_chaste_interface__RyR_channel__d_P_O2_d_environment__time_converter;
const NekDouble var_chaste_interface__RyR_channel__d_P_C1_d_environment__time_converter = var_RyR_channel__d_P_C1_d_environment__time;
const NekDouble var_chaste_interface__RyR_channel__d_P_C1_d_environment__time = 0.001 * var_chaste_interface__RyR_channel__d_P_C1_d_environment__time_converter;
const NekDouble var_chaste_interface__RyR_channel__d_P_C2_d_environment__time_converter = var_RyR_channel__d_P_C2_d_environment__time;
const NekDouble var_chaste_interface__RyR_channel__d_P_C2_d_environment__time = 0.001 * var_chaste_interface__RyR_channel__d_P_C2_d_environment__time_converter;
const NekDouble var_chaste_interface__intracellular_Ca_fluxes__d_HTRPNCa_d_environment__time_converter = var_intracellular_Ca_fluxes__d_HTRPNCa_d_environment__time;
const NekDouble var_chaste_interface__intracellular_Ca_fluxes__d_HTRPNCa_d_environment__time = 0.001 * var_chaste_interface__intracellular_Ca_fluxes__d_HTRPNCa_d_environment__time_converter;
const NekDouble var_chaste_interface__intracellular_Ca_fluxes__d_LTRPNCa_d_environment__time_converter = var_intracellular_Ca_fluxes__d_LTRPNCa_d_environment__time;
const NekDouble var_chaste_interface__intracellular_Ca_fluxes__d_LTRPNCa_d_environment__time = 0.001 * var_chaste_interface__intracellular_Ca_fluxes__d_LTRPNCa_d_environment__time_converter;
const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Nai_d_environment__time_converter = var_intracellular_ion_concentrations__d_Nai_d_environment__time;
const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Nai_d_environment__time = 0.001 * var_chaste_interface__intracellular_ion_concentrations__d_Nai_d_environment__time_converter;
const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Cai_d_environment__time_converter = var_intracellular_ion_concentrations__d_Cai_d_environment__time;
const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Cai_d_environment__time = 0.001 * var_chaste_interface__intracellular_ion_concentrations__d_Cai_d_environment__time_converter;
const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ki_d_environment__time_converter = var_intracellular_ion_concentrations__d_Ki_d_environment__time;
const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ki_d_environment__time = 0.001 * var_chaste_interface__intracellular_ion_concentrations__d_Ki_d_environment__time_converter;
const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_ss_d_environment__time_converter = var_intracellular_ion_concentrations__d_Ca_ss_d_environment__time;
const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_ss_d_environment__time = 0.001 * var_chaste_interface__intracellular_ion_concentrations__d_Ca_ss_d_environment__time_converter;
const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_JSR_d_environment__time_converter = var_intracellular_ion_concentrations__d_Ca_JSR_d_environment__time;
const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_JSR_d_environment__time = 0.001 * var_chaste_interface__intracellular_ion_concentrations__d_Ca_JSR_d_environment__time_converter;
const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_NSR_d_environment__time_converter = var_intracellular_ion_concentrations__d_Ca_NSR_d_environment__time;
const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_NSR_d_environment__time = 0.001 * var_chaste_interface__intracellular_ion_concentrations__d_Ca_NSR_d_environment__time_converter;
const NekDouble d_dt_chaste_interface__fast_sodium_current_m_gate__m = var_chaste_interface__fast_sodium_current_m_gate__d_m_d_environment__time;
const NekDouble d_dt_chaste_interface__fast_sodium_current_h_gate__h = var_chaste_interface__fast_sodium_current_h_gate__d_h_d_environment__time;
const NekDouble d_dt_chaste_interface__fast_sodium_current_j_gate__j = var_chaste_interface__fast_sodium_current_j_gate__d_j_d_environment__time;
const NekDouble d_dt_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr = var_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__d_X_kr_d_environment__time;
const NekDouble d_dt_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks = var_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__d_X_ks_d_environment__time;
const NekDouble d_dt_chaste_interface__transient_outward_potassium_current_X_to1_gate__X_to1 = var_chaste_interface__transient_outward_potassium_current_X_to1_gate__d_X_to1_d_environment__time;
const NekDouble d_dt_chaste_interface__transient_outward_potassium_current_Y_to1_gate__Y_to1 = var_chaste_interface__transient_outward_potassium_current_Y_to1_gate__d_Y_to1_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current__O = var_chaste_interface__L_type_Ca_current__d_O_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current__O_Ca = var_chaste_interface__L_type_Ca_current__d_O_Ca_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current__C0 = var_chaste_interface__L_type_Ca_current__d_C0_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current__C1 = var_chaste_interface__L_type_Ca_current__d_C1_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current__C2 = var_chaste_interface__L_type_Ca_current__d_C2_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current__C3 = var_chaste_interface__L_type_Ca_current__d_C3_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current__C4 = var_chaste_interface__L_type_Ca_current__d_C4_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current__C_Ca0 = var_chaste_interface__L_type_Ca_current__d_C_Ca0_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current__C_Ca1 = var_chaste_interface__L_type_Ca_current__d_C_Ca1_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current__C_Ca2 = var_chaste_interface__L_type_Ca_current__d_C_Ca2_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current__C_Ca3 = var_chaste_interface__L_type_Ca_current__d_C_Ca3_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current__C_Ca4 = var_chaste_interface__L_type_Ca_current__d_C_Ca4_d_environment__time;
const NekDouble d_dt_chaste_interface__L_type_Ca_current_y_gate__y = var_chaste_interface__L_type_Ca_current_y_gate__d_y_d_environment__time;
const NekDouble d_dt_chaste_interface__RyR_channel__P_O1 = var_chaste_interface__RyR_channel__d_P_O1_d_environment__time;
const NekDouble d_dt_chaste_interface__RyR_channel__P_O2 = var_chaste_interface__RyR_channel__d_P_O2_d_environment__time;
const NekDouble d_dt_chaste_interface__RyR_channel__P_C1 = var_chaste_interface__RyR_channel__d_P_C1_d_environment__time;
const NekDouble d_dt_chaste_interface__RyR_channel__P_C2 = var_chaste_interface__RyR_channel__d_P_C2_d_environment__time;
const NekDouble d_dt_chaste_interface__intracellular_Ca_fluxes__HTRPNCa = var_chaste_interface__intracellular_Ca_fluxes__d_HTRPNCa_d_environment__time;
const NekDouble d_dt_chaste_interface__intracellular_Ca_fluxes__LTRPNCa = var_chaste_interface__intracellular_Ca_fluxes__d_LTRPNCa_d_environment__time;
const NekDouble d_dt_chaste_interface__intracellular_ion_concentrations__Nai = var_chaste_interface__intracellular_ion_concentrations__d_Nai_d_environment__time;
const NekDouble d_dt_chaste_interface__intracellular_ion_concentrations__Cai = var_chaste_interface__intracellular_ion_concentrations__d_Cai_d_environment__time;
const NekDouble d_dt_chaste_interface__intracellular_ion_concentrations__Ki = var_chaste_interface__intracellular_ion_concentrations__d_Ki_d_environment__time;
const NekDouble d_dt_chaste_interface__intracellular_ion_concentrations__Ca_ss = var_chaste_interface__intracellular_ion_concentrations__d_Ca_ss_d_environment__time;
const NekDouble d_dt_chaste_interface__intracellular_ion_concentrations__Ca_JSR = var_chaste_interface__intracellular_ion_concentrations__d_Ca_JSR_d_environment__time;
const NekDouble d_dt_chaste_interface__intracellular_ion_concentrations__Ca_NSR = var_chaste_interface__intracellular_ion_concentrations__d_Ca_NSR_d_environment__time;
const NekDouble var_membrane__i_Na = var_fast_sodium_current__i_Na;
const NekDouble var_membrane__i_Ca = var_L_type_Ca_current__i_Ca;
const NekDouble var_membrane__i_Ca_K = var_L_type_Ca_current__i_Ca_K;
const NekDouble var_membrane__i_Kr = var_rapid_activating_delayed_rectifiyer_K_current__i_Kr;
const NekDouble var_membrane__i_Ks = var_slow_activating_delayed_rectifiyer_K_current__i_Ks;
const NekDouble var_membrane__i_to1 = var_transient_outward_potassium_current__i_to1;
const NekDouble var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
const NekDouble var_membrane__i_Kp = var_plateau_potassium_current__i_Kp;
const NekDouble var_membrane__i_NaCa = var_Na_Ca_exchanger__i_NaCa;
const NekDouble var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
const NekDouble var_membrane__i_p_Ca = var_sarcolemmal_calcium_pump__i_p_Ca;
const NekDouble var_membrane__i_Ca_b = var_calcium_background_current__i_Ca_b;
const NekDouble var_membrane__i_Na_b = var_sodium_background_current__i_Na_b;
const NekDouble var_chaste_interface__membrane__i_Stim = 0.0;
const NekDouble var_membrane__i_Stim_converter = var_chaste_interface__membrane__i_Stim;
const NekDouble var_membrane__chaste_interface__chaste_membrane_capacitance = 1.0;
const NekDouble var_membrane__i_Stim = var_membrane__i_Stim_converter / var_membrane__chaste_interface__chaste_membrane_capacitance;
const NekDouble var_membrane__d_V_d_environment__time = ((-1.0) * 1.0 * (var_membrane__i_Na + var_membrane__i_Ca + var_membrane__i_Ca_K + var_membrane__i_Kr + var_membrane__i_Ks + var_membrane__i_to1 + var_membrane__i_K1 + var_membrane__i_Kp + var_membrane__i_NaCa + var_membrane__i_NaK + var_membrane__i_p_Ca + var_membrane__i_Na_b + var_membrane__i_Ca_b + var_membrane__i_Stim)) / var_membrane__C_sc;
const NekDouble var_chaste_interface__membrane__d_V_d_environment__time_converter = var_membrane__d_V_d_environment__time;
const NekDouble var_chaste_interface__membrane__d_V_d_environment__time = 0.001 * var_chaste_interface__membrane__d_V_d_environment__time_converter;
d_dt_chaste_interface__membrane__V = var_chaste_interface__membrane__d_V_d_environment__time;
outarray[0][i] = d_dt_chaste_interface__membrane__V;
outarray[1][i] = d_dt_chaste_interface__fast_sodium_current_m_gate__m;
outarray[2][i] = d_dt_chaste_interface__fast_sodium_current_h_gate__h;
outarray[3][i] = d_dt_chaste_interface__fast_sodium_current_j_gate__j;
outarray[4][i] = d_dt_chaste_interface__rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr;
outarray[5][i] = d_dt_chaste_interface__slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks;
outarray[6][i] = d_dt_chaste_interface__transient_outward_potassium_current_X_to1_gate__X_to1;
outarray[7][i] = d_dt_chaste_interface__transient_outward_potassium_current_Y_to1_gate__Y_to1;
outarray[8][i] = d_dt_chaste_interface__L_type_Ca_current__O;
outarray[9][i] = d_dt_chaste_interface__L_type_Ca_current__O_Ca;
outarray[10][i] = d_dt_chaste_interface__L_type_Ca_current__C0;
outarray[11][i] = d_dt_chaste_interface__L_type_Ca_current__C1;
outarray[12][i] = d_dt_chaste_interface__L_type_Ca_current__C2;
outarray[13][i] = d_dt_chaste_interface__L_type_Ca_current__C3;
outarray[14][i] = d_dt_chaste_interface__L_type_Ca_current__C4;
outarray[15][i] = d_dt_chaste_interface__L_type_Ca_current__C_Ca0;
outarray[16][i] = d_dt_chaste_interface__L_type_Ca_current__C_Ca1;
outarray[17][i] = d_dt_chaste_interface__L_type_Ca_current__C_Ca2;
outarray[18][i] = d_dt_chaste_interface__L_type_Ca_current__C_Ca3;
outarray[19][i] = d_dt_chaste_interface__L_type_Ca_current__C_Ca4;
outarray[20][i] = d_dt_chaste_interface__L_type_Ca_current_y_gate__y;
outarray[21][i] = d_dt_chaste_interface__RyR_channel__P_O1;
outarray[22][i] = d_dt_chaste_interface__RyR_channel__P_O2;
outarray[23][i] = d_dt_chaste_interface__RyR_channel__P_C1;
outarray[24][i] = d_dt_chaste_interface__RyR_channel__P_C2;
outarray[25][i] = d_dt_chaste_interface__intracellular_Ca_fluxes__HTRPNCa;
outarray[26][i] = d_dt_chaste_interface__intracellular_Ca_fluxes__LTRPNCa;
outarray[27][i] = d_dt_chaste_interface__intracellular_ion_concentrations__Nai;
outarray[28][i] = d_dt_chaste_interface__intracellular_ion_concentrations__Cai;
outarray[29][i] = d_dt_chaste_interface__intracellular_ion_concentrations__Ki;
outarray[30][i] = d_dt_chaste_interface__intracellular_ion_concentrations__Ca_ss;
outarray[31][i] = d_dt_chaste_interface__intracellular_ion_concentrations__Ca_JSR;
outarray[32][i] = d_dt_chaste_interface__intracellular_ion_concentrations__Ca_NSR;
}
}