NobleVargheseKohlNoble1998.hpp

Go to the documentation of this file.
00001 #ifndef _CML_noble_varghese_kohl_noble_1998_basic_
00002 #define _CML_noble_varghese_kohl_noble_1998_basic_
00003 
00015 #include <boost/serialization/access.hpp>
00016 #include <boost/serialization/base_object.hpp>
00017 
00018 #include <cmath>
00019 #include <cassert>
00020 #include "AbstractCardiacCell.hpp"
00021 #include "Exception.hpp"
00022 #include "AbstractStimulusFunction.hpp"
00023 #include "OdeSystemInformation.hpp"
00024 
00025 // Needs to be included last
00026 #include <boost/serialization/export.hpp>
00027 
00028 class CML_noble_varghese_kohl_noble_1998_basic : public AbstractCardiacCell
00029 {
00030     friend class boost::serialization::access;
00031     template<class Archive>
00032     void serialize(Archive & archive, const unsigned int version)
00033     {
00034         archive & boost::serialization::base_object<AbstractCardiacCell>(*this);
00035     }
00036 public:
00037     CML_noble_varghese_kohl_noble_1998_basic(boost::shared_ptr<AbstractIvpOdeSolver> pSolver,
00038                                              boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
00039         : AbstractCardiacCell(pSolver, 22, 0, pIntracellularStimulus)
00040     {
00041         mpSystemInfo = OdeSystemInformation<CML_noble_varghese_kohl_noble_1998_basic>::Instance();
00042 
00043         Init();
00044 
00045     }
00046 
00047     ~CML_noble_varghese_kohl_noble_1998_basic(void)
00048     {
00049     }
00050 
00051     double GetIIonic()
00052     {
00053         std::vector<double>& rY = rGetStateVariables();
00054         double var_membrane__V = rY[0];
00055         // Units: millivolt; Initial value: -92.849333
00056         double var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = rY[1];
00057         // Units: dimensionless; Initial value: 1.03e-5
00058         double var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = rY[2];
00059         // Units: dimensionless; Initial value: 2e-7
00060         double var_slow_delayed_rectifier_potassium_current_xs_gate__xs = rY[3];
00061         // Units: dimensionless; Initial value: 0.001302
00062         double var_fast_sodium_current_m_gate__m = rY[4];
00063         // Units: dimensionless; Initial value: 0.0016203
00064         double var_fast_sodium_current_h_gate__h = rY[5];
00065         // Units: dimensionless; Initial value: 0.9944036
00066         double var_L_type_Ca_channel_d_gate__d = rY[6];
00067         // Units: dimensionless; Initial value: 0
00068         double var_L_type_Ca_channel_f_gate__f = rY[7];
00069         // Units: dimensionless; Initial value: 1
00070         double var_L_type_Ca_channel_f2_gate__f2 = rY[8];
00071         // Units: dimensionless; Initial value: 0.9349197
00072         double var_L_type_Ca_channel_f2ds_gate__f2ds = rY[9];
00073         // Units: dimensionless; Initial value: 0.9651958
00074         double var_transient_outward_current_s_gate__s = rY[10];
00075         // Units: dimensionless; Initial value: 0.9948645
00076         double var_transient_outward_current_r_gate__r = rY[11];
00077         // Units: dimensionless; Initial value: 0
00078         double var_intracellular_sodium_concentration__Na_i = rY[14];
00079         // Units: millimolar; Initial value: 7.3321223
00080         double var_intracellular_potassium_concentration__K_i = rY[15];
00081         // Units: millimolar; Initial value: 136.5644281
00082         double var_intracellular_calcium_concentration__Ca_i = rY[16];
00083         // Units: millimolar; Initial value: 1.4e-5
00084         double var_intracellular_calcium_concentration__Ca_ds = rY[17];
00085         // Units: millimolar; Initial value: 1.88e-5
00086 
00087         const double var_membrane__R = 8314.472;
00088         const double var_membrane__T = 310.0;
00089         const double var_membrane__F = 96485.3415;
00090         double var_reversal_potentials__K_i = var_intracellular_potassium_concentration__K_i;
00091         double var_reversal_potentials__R = var_membrane__R;
00092         double var_reversal_potentials__T = var_membrane__T;
00093         double var_reversal_potentials__F = var_membrane__F;
00094         const double var_extracellular_potassium_concentration__K_o = 4.0;
00095         double var_reversal_potentials__K_o = var_extracellular_potassium_concentration__K_o;
00096         double 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);
00097         double var_time_independent_potassium_current__E_K = var_reversal_potentials__E_K;
00098         double var_time_independent_potassium_current__K_o = var_extracellular_potassium_concentration__K_o;
00099         double var_time_independent_potassium_current__R = var_membrane__R;
00100         double var_time_independent_potassium_current__V = var_membrane__V;
00101         double var_time_independent_potassium_current__T = var_membrane__T;
00102         const double var_time_independent_potassium_current__K_mk1 = 10.0;
00103         const double var_time_independent_potassium_current__g_K1 = 0.5;
00104         double var_time_independent_potassium_current__F = var_membrane__F;
00105         double var_time_independent_potassium_current__i_K1 = (((var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K_o) / (var_time_independent_potassium_current__K_o + var_time_independent_potassium_current__K_mk1)) * (var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K)) / (1.0 + exp((((var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K) - 10.0) * var_time_independent_potassium_current__F * 1.25) / (var_time_independent_potassium_current__R * var_time_independent_potassium_current__T)));
00106         double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00107         double var_transient_outward_current__s = var_transient_outward_current_s_gate__s;
00108         double var_transient_outward_current__r = var_transient_outward_current_r_gate__r;
00109         const double var_transient_outward_current__g_to = 0.005;
00110         double var_transient_outward_current__V = var_membrane__V;
00111         double var_transient_outward_current__E_K = var_reversal_potentials__E_K;
00112         const double var_transient_outward_current__g_tos = 0.0;
00113         double var_transient_outward_current__i_to = var_transient_outward_current__g_to * (var_transient_outward_current__g_tos + (var_transient_outward_current__s * (1.0 - var_transient_outward_current__g_tos))) * var_transient_outward_current__r * (var_transient_outward_current__V - var_transient_outward_current__E_K);
00114         double var_membrane__i_to = var_transient_outward_current__i_to;
00115         const double var_rapid_delayed_rectifier_potassium_current__g_Kr2 = 0.0013;
00116         const double var_rapid_delayed_rectifier_potassium_current__g_Kr1 = 0.0021;
00117         double var_rapid_delayed_rectifier_potassium_current__xr1 = var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1;
00118         double var_rapid_delayed_rectifier_potassium_current__xr2 = var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2;
00119         double var_rapid_delayed_rectifier_potassium_current__V = var_membrane__V;
00120         double var_rapid_delayed_rectifier_potassium_current__E_K = var_reversal_potentials__E_K;
00121         double var_rapid_delayed_rectifier_potassium_current__i_Kr = ((((var_rapid_delayed_rectifier_potassium_current__g_Kr1 * var_rapid_delayed_rectifier_potassium_current__xr1) + (var_rapid_delayed_rectifier_potassium_current__g_Kr2 * var_rapid_delayed_rectifier_potassium_current__xr2)) * 1.0) / (1.0 + exp((var_rapid_delayed_rectifier_potassium_current__V + 9.0) / 22.4))) * (var_rapid_delayed_rectifier_potassium_current__V - var_rapid_delayed_rectifier_potassium_current__E_K);
00122         double var_membrane__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00123         double var_slow_delayed_rectifier_potassium_current__xs = var_slow_delayed_rectifier_potassium_current_xs_gate__xs;
00124         const double var_extracellular_sodium_concentration__Na_o = 140.0;
00125         double var_reversal_potentials__Na_o = var_extracellular_sodium_concentration__Na_o;
00126         double var_reversal_potentials__Na_i = var_intracellular_sodium_concentration__Na_i;
00127         const double var_reversal_potentials__P_kna = 0.03;
00128         double 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)));
00129         double var_slow_delayed_rectifier_potassium_current__E_Ks = var_reversal_potentials__E_Ks;
00130         const double var_slow_delayed_rectifier_potassium_current__g_Ks = 0.0026;
00131         double var_slow_delayed_rectifier_potassium_current__V = var_membrane__V;
00132         double var_slow_delayed_rectifier_potassium_current__i_Ks = var_slow_delayed_rectifier_potassium_current__g_Ks * pow(var_slow_delayed_rectifier_potassium_current__xs, 2.0) * (var_slow_delayed_rectifier_potassium_current__V - var_slow_delayed_rectifier_potassium_current__E_Ks);
00133         double var_membrane__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00134         double var_L_type_Ca_channel__d = var_L_type_Ca_channel_d_gate__d;
00135         const double var_L_type_Ca_channel__FrICa = 1.0;
00136         double var_L_type_Ca_channel__f = var_L_type_Ca_channel_f_gate__f;
00137         double var_L_type_Ca_channel__K_o = var_extracellular_potassium_concentration__K_o;
00138         double var_L_type_Ca_channel__K_i = var_intracellular_potassium_concentration__K_i;
00139         double var_L_type_Ca_channel__F = var_membrane__F;
00140         const double var_L_type_Ca_channel__P_Ca_L = 0.1;
00141         double var_L_type_Ca_channel__T = var_membrane__T;
00142         const double var_L_type_Ca_channel__P_CaK = 0.002;
00143         double var_L_type_Ca_channel__V = var_membrane__V;
00144         double var_L_type_Ca_channel__f2 = var_L_type_Ca_channel_f2_gate__f2;
00145         double var_L_type_Ca_channel__R = var_membrane__R;
00146         double var_L_type_Ca_channel__i_Ca_L_K_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaK * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__K_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__K_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00147         double var_membrane__i_Ca_L_K_cyt = var_L_type_Ca_channel__i_Ca_L_K_cyt;
00148         double var_L_type_Ca_channel__f2ds = var_L_type_Ca_channel_f2ds_gate__f2ds;
00149         double var_L_type_Ca_channel__i_Ca_L_K_ds = (((var_L_type_Ca_channel__FrICa * var_L_type_Ca_channel__P_CaK * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__K_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__K_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00150         double var_membrane__i_Ca_L_K_ds = var_L_type_Ca_channel__i_Ca_L_K_ds;
00151         const double var_sodium_potassium_pump__i_NaK_max = 0.7;
00152         double var_sodium_potassium_pump__Na_i = var_intracellular_sodium_concentration__Na_i;
00153         double var_sodium_potassium_pump__K_o = var_extracellular_potassium_concentration__K_o;
00154         const double var_sodium_potassium_pump__K_mNa = 40.0;
00155         const double var_sodium_potassium_pump__K_mK = 1.0;
00156         double var_sodium_potassium_pump__i_NaK = (((var_sodium_potassium_pump__i_NaK_max * var_sodium_potassium_pump__K_o) / (var_sodium_potassium_pump__K_mK + var_sodium_potassium_pump__K_o)) * var_sodium_potassium_pump__Na_i) / (var_sodium_potassium_pump__K_mNa + var_sodium_potassium_pump__Na_i);
00157         double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00158         const double var_fast_sodium_current__g_Na = 2.5;
00159         double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
00160         double var_fast_sodium_current__V = var_membrane__V;
00161         double var_reversal_potentials__E_mh = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log((var_reversal_potentials__Na_o + (0.12 * var_reversal_potentials__K_o)) / (var_reversal_potentials__Na_i + (0.12 * var_reversal_potentials__K_i)));
00162         double var_fast_sodium_current__E_mh = var_reversal_potentials__E_mh;
00163         double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
00164         double 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__V - var_fast_sodium_current__E_mh);
00165         double var_membrane__i_Na = var_fast_sodium_current__i_Na;
00166         double var_sodium_background_current__V = var_membrane__V;
00167         double 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);
00168         double var_sodium_background_current__E_Na = var_reversal_potentials__E_Na;
00169         const double var_sodium_background_current__g_bna = 0.0006;
00170         double var_sodium_background_current__i_b_Na = var_sodium_background_current__g_bna * (var_sodium_background_current__V - var_sodium_background_current__E_Na);
00171         double var_membrane__i_b_Na = var_sodium_background_current__i_b_Na;
00172         const double var_persistent_sodium_current__g_pna = 0.004;
00173         double var_persistent_sodium_current__V = var_membrane__V;
00174         double var_persistent_sodium_current__E_Na = var_reversal_potentials__E_Na;
00175         double var_persistent_sodium_current__i_p_Na = ((var_persistent_sodium_current__g_pna * 1.0) / (1.0 + exp((-(var_persistent_sodium_current__V + 52.0)) / 8.0))) * (var_persistent_sodium_current__V - var_persistent_sodium_current__E_Na);
00176         double var_membrane__i_p_Na = var_persistent_sodium_current__i_p_Na;
00177         const double var_L_type_Ca_channel__P_CaNa = 0.01;
00178         double var_L_type_Ca_channel__Na_o = var_extracellular_sodium_concentration__Na_o;
00179         double var_L_type_Ca_channel__Na_i = var_intracellular_sodium_concentration__Na_i;
00180         double var_L_type_Ca_channel__i_Ca_L_Na_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaNa * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Na_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Na_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00181         double var_membrane__i_Ca_L_Na_cyt = var_L_type_Ca_channel__i_Ca_L_Na_cyt;
00182         double var_L_type_Ca_channel__i_Ca_L_Na_ds = (((var_L_type_Ca_channel__FrICa * var_L_type_Ca_channel__P_CaNa * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Na_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Na_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00183         double var_membrane__i_Ca_L_Na_ds = var_L_type_Ca_channel__i_Ca_L_Na_ds;
00184         double var_sodium_calcium_exchanger__Na_i = var_intracellular_sodium_concentration__Na_i;
00185         const double var_sodium_calcium_exchanger__n_NaCa = 3.0;
00186         const double var_sodium_calcium_exchanger__gamma = 0.5;
00187         double var_sodium_calcium_exchanger__F = var_membrane__F;
00188         double var_sodium_calcium_exchanger__Na_o = var_extracellular_sodium_concentration__Na_o;
00189         const double var_sodium_calcium_exchanger__FRiNaCa = 0.001;
00190         double var_sodium_calcium_exchanger__R = var_membrane__R;
00191         double var_sodium_calcium_exchanger__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00192         double var_sodium_calcium_exchanger__T = var_membrane__T;
00193         double var_sodium_calcium_exchanger__V = var_membrane__V;
00194         const double var_sodium_calcium_exchanger__d_NaCa = 0.0;
00195         const double var_extracellular_calcium_concentration__Ca_o = 2.0;
00196         double var_sodium_calcium_exchanger__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00197         const double var_sodium_calcium_exchanger__k_NaCa = 0.0005;
00198         double var_sodium_calcium_exchanger__i_NaCa_cyt = ((1.0 - var_sodium_calcium_exchanger__FRiNaCa) * var_sodium_calcium_exchanger__k_NaCa * ((exp((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_o) - (exp(((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_i))) / ((1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_sodium_calcium_exchanger__Ca_i * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_sodium_calcium_exchanger__Ca_o * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa))))) * (1.0 + (var_sodium_calcium_exchanger__Ca_i / 0.0069)));
00199         double var_membrane__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
00200         double var_sodium_calcium_exchanger__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
00201         double var_sodium_calcium_exchanger__i_NaCa_ds = (var_sodium_calcium_exchanger__FRiNaCa * var_sodium_calcium_exchanger__k_NaCa * ((exp((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_o) - (exp(((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_ds))) / ((1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_sodium_calcium_exchanger__Ca_ds * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_sodium_calcium_exchanger__Ca_o * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa))))) * (1.0 + (var_sodium_calcium_exchanger__Ca_ds / 0.0069)));
00202         double var_membrane__i_NaCa_ds = var_sodium_calcium_exchanger__i_NaCa_ds;
00203         double var_L_type_Ca_channel__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00204         double var_L_type_Ca_channel__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00205         double var_L_type_Ca_channel__i_Ca_L_Ca_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * 4.0 * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Ca_i * exp((100.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Ca_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00206         double var_membrane__i_Ca_L_Ca_cyt = var_L_type_Ca_channel__i_Ca_L_Ca_cyt;
00207         double var_L_type_Ca_channel__i_Ca_L_Ca_ds = (((var_L_type_Ca_channel__FrICa * 4.0 * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Ca_i * exp((100.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Ca_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00208         double var_membrane__i_Ca_L_Ca_ds = var_L_type_Ca_channel__i_Ca_L_Ca_ds;
00209         double var_reversal_potentials__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00210         double var_reversal_potentials__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00211         double 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);
00212         double var_calcium_background_current__E_Ca = var_reversal_potentials__E_Ca;
00213         const double var_calcium_background_current__g_bca = 0.00025;
00214         double var_calcium_background_current__V = var_membrane__V;
00215         double var_calcium_background_current__i_b_Ca = var_calcium_background_current__g_bca * (var_calcium_background_current__V - var_calcium_background_current__E_Ca);
00216         double var_membrane__i_b_Ca = var_calcium_background_current__i_b_Ca;
00217 
00228         double value_in_nA = var_membrane__i_K1+var_membrane__i_to+var_membrane__i_Kr+var_membrane__i_Ks+var_membrane__i_Ca_L_K_cyt+var_membrane__i_Ca_L_K_ds+var_membrane__i_NaK+var_membrane__i_Na+var_membrane__i_b_Na+var_membrane__i_p_Na+var_membrane__i_Ca_L_Na_cyt+var_membrane__i_Ca_L_Na_ds+var_membrane__i_NaCa_cyt+var_membrane__i_NaCa_ds+var_membrane__i_Ca_L_Ca_cyt+var_membrane__i_Ca_L_Ca_ds+var_membrane__i_b_Ca;
00229         double value_in_microA = 0.001*value_in_nA;
00230         double value_in_microA_per_cm_squared = value_in_microA/0.000095;
00231         return value_in_microA_per_cm_squared;
00232     }
00233 
00234     void EvaluateYDerivatives (
00235             double var_environment__time,
00236             const std::vector<double> &rY,
00237             std::vector<double> &rDY)
00238     {
00239         // Inputs:
00240         // Time units: second
00241         var_environment__time *= 0.001;
00242         double var_membrane__V = rY[0];
00243         // Units: millivolt; Initial value: -92.849333
00244         double var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = rY[1];
00245         // Units: dimensionless; Initial value: 1.03e-5
00246         double var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = rY[2];
00247         // Units: dimensionless; Initial value: 2e-7
00248         double var_slow_delayed_rectifier_potassium_current_xs_gate__xs = rY[3];
00249         // Units: dimensionless; Initial value: 0.001302
00250         double var_fast_sodium_current_m_gate__m = rY[4];
00251         // Units: dimensionless; Initial value: 0.0016203
00252         double var_fast_sodium_current_h_gate__h = rY[5];
00253         // Units: dimensionless; Initial value: 0.9944036
00254         double var_L_type_Ca_channel_d_gate__d = rY[6];
00255         // Units: dimensionless; Initial value: 0
00256         double var_L_type_Ca_channel_f_gate__f = rY[7];
00257         // Units: dimensionless; Initial value: 1
00258         double var_L_type_Ca_channel_f2_gate__f2 = rY[8];
00259         // Units: dimensionless; Initial value: 0.9349197
00260         double var_L_type_Ca_channel_f2ds_gate__f2ds = rY[9];
00261         // Units: dimensionless; Initial value: 0.9651958
00262         double var_transient_outward_current_s_gate__s = rY[10];
00263         // Units: dimensionless; Initial value: 0.9948645
00264         double var_transient_outward_current_r_gate__r = rY[11];
00265         // Units: dimensionless; Initial value: 0
00266         double var_calcium_release__ActFrac = rY[12];
00267         // Units: dimensionless; Initial value: 0.0042614
00268         double var_calcium_release__ProdFrac = rY[13];
00269         // Units: dimensionless; Initial value: 0.4068154
00270         double var_intracellular_sodium_concentration__Na_i = rY[14];
00271         // Units: millimolar; Initial value: 7.3321223
00272         double var_intracellular_potassium_concentration__K_i = rY[15];
00273         // Units: millimolar; Initial value: 136.5644281
00274         double var_intracellular_calcium_concentration__Ca_i = rY[16];
00275         // Units: millimolar; Initial value: 1.4e-5
00276         double var_intracellular_calcium_concentration__Ca_ds = rY[17];
00277         // Units: millimolar; Initial value: 1.88e-5
00278         double var_intracellular_calcium_concentration__Ca_up = rY[18];
00279         // Units: millimolar; Initial value: 0.4531889
00280         double var_intracellular_calcium_concentration__Ca_rel = rY[19];
00281         // Units: millimolar; Initial value: 0.4481927
00282         double var_intracellular_calcium_concentration__Ca_Calmod = rY[20];
00283         // Units: millimolar; Initial value: 0.0005555
00284         double var_intracellular_calcium_concentration__Ca_Trop = rY[21];
00285         // Units: millimolar; Initial value: 0.0003542
00286 
00287 
00288         // Mathematics
00289         const double var_membrane__R = 8314.472;
00290         const double var_membrane__T = 310.0;
00291         const double var_membrane__F = 96485.3415;
00292         const double var_membrane__Cm = 9.5e-05;
00293         double var_reversal_potentials__K_i = var_intracellular_potassium_concentration__K_i;
00294         double var_reversal_potentials__R = var_membrane__R;
00295         double var_reversal_potentials__T = var_membrane__T;
00296         double var_reversal_potentials__F = var_membrane__F;
00297         const double var_extracellular_potassium_concentration__K_o = 4.0;
00298         double var_reversal_potentials__K_o = var_extracellular_potassium_concentration__K_o;
00299         double 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);
00300         double var_time_independent_potassium_current__E_K = var_reversal_potentials__E_K;
00301         double var_time_independent_potassium_current__K_o = var_extracellular_potassium_concentration__K_o;
00302         double var_time_independent_potassium_current__R = var_membrane__R;
00303         double var_time_independent_potassium_current__V = var_membrane__V;
00304         double var_time_independent_potassium_current__T = var_membrane__T;
00305         const double var_time_independent_potassium_current__K_mk1 = 10.0;
00306         const double var_time_independent_potassium_current__g_K1 = 0.5;
00307         double var_time_independent_potassium_current__F = var_membrane__F;
00308         double var_time_independent_potassium_current__i_K1 = (((var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K_o) / (var_time_independent_potassium_current__K_o + var_time_independent_potassium_current__K_mk1)) * (var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K)) / (1.0 + exp((((var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K) - 10.0) * var_time_independent_potassium_current__F * 1.25) / (var_time_independent_potassium_current__R * var_time_independent_potassium_current__T)));
00309         double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00310         double var_transient_outward_current__s = var_transient_outward_current_s_gate__s;
00311         double var_transient_outward_current__r = var_transient_outward_current_r_gate__r;
00312         const double var_transient_outward_current__g_to = 0.005;
00313         double var_transient_outward_current__V = var_membrane__V;
00314         double var_transient_outward_current__E_K = var_reversal_potentials__E_K;
00315         const double var_transient_outward_current__g_tos = 0.0;
00316         double var_transient_outward_current__i_to = var_transient_outward_current__g_to * (var_transient_outward_current__g_tos + (var_transient_outward_current__s * (1.0 - var_transient_outward_current__g_tos))) * var_transient_outward_current__r * (var_transient_outward_current__V - var_transient_outward_current__E_K);
00317         double var_membrane__i_to = var_transient_outward_current__i_to;
00318         const double var_rapid_delayed_rectifier_potassium_current__g_Kr2 = 0.0013;
00319         const double var_rapid_delayed_rectifier_potassium_current__g_Kr1 = 0.0021;
00320         double var_rapid_delayed_rectifier_potassium_current__xr1 = var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1;
00321         double var_rapid_delayed_rectifier_potassium_current__xr2 = var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2;
00322         double var_rapid_delayed_rectifier_potassium_current__V = var_membrane__V;
00323         double var_rapid_delayed_rectifier_potassium_current__E_K = var_reversal_potentials__E_K;
00324         double var_rapid_delayed_rectifier_potassium_current__i_Kr = ((((var_rapid_delayed_rectifier_potassium_current__g_Kr1 * var_rapid_delayed_rectifier_potassium_current__xr1) + (var_rapid_delayed_rectifier_potassium_current__g_Kr2 * var_rapid_delayed_rectifier_potassium_current__xr2)) * 1.0) / (1.0 + exp((var_rapid_delayed_rectifier_potassium_current__V + 9.0) / 22.4))) * (var_rapid_delayed_rectifier_potassium_current__V - var_rapid_delayed_rectifier_potassium_current__E_K);
00325         double var_membrane__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00326         double var_slow_delayed_rectifier_potassium_current__xs = var_slow_delayed_rectifier_potassium_current_xs_gate__xs;
00327         const double var_extracellular_sodium_concentration__Na_o = 140.0;
00328         double var_reversal_potentials__Na_o = var_extracellular_sodium_concentration__Na_o;
00329         double var_reversal_potentials__Na_i = var_intracellular_sodium_concentration__Na_i;
00330         const double var_reversal_potentials__P_kna = 0.03;
00331         double 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)));
00332         double var_slow_delayed_rectifier_potassium_current__E_Ks = var_reversal_potentials__E_Ks;
00333         const double var_slow_delayed_rectifier_potassium_current__g_Ks = 0.0026;
00334         double var_slow_delayed_rectifier_potassium_current__V = var_membrane__V;
00335         double var_slow_delayed_rectifier_potassium_current__i_Ks = var_slow_delayed_rectifier_potassium_current__g_Ks * pow(var_slow_delayed_rectifier_potassium_current__xs, 2.0) * (var_slow_delayed_rectifier_potassium_current__V - var_slow_delayed_rectifier_potassium_current__E_Ks);
00336         double var_membrane__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00337         double var_L_type_Ca_channel__d = var_L_type_Ca_channel_d_gate__d;
00338         const double var_L_type_Ca_channel__FrICa = 1.0;
00339         double var_L_type_Ca_channel__f = var_L_type_Ca_channel_f_gate__f;
00340         double var_L_type_Ca_channel__K_o = var_extracellular_potassium_concentration__K_o;
00341         double var_L_type_Ca_channel__K_i = var_intracellular_potassium_concentration__K_i;
00342         double var_L_type_Ca_channel__F = var_membrane__F;
00343         const double var_L_type_Ca_channel__P_Ca_L = 0.1;
00344         double var_L_type_Ca_channel__T = var_membrane__T;
00345         const double var_L_type_Ca_channel__P_CaK = 0.002;
00346         double var_L_type_Ca_channel__V = var_membrane__V;
00347         double var_L_type_Ca_channel__f2 = var_L_type_Ca_channel_f2_gate__f2;
00348         double var_L_type_Ca_channel__R = var_membrane__R;
00349         double var_L_type_Ca_channel__i_Ca_L_K_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaK * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__K_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__K_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00350         double var_membrane__i_Ca_L_K_cyt = var_L_type_Ca_channel__i_Ca_L_K_cyt;
00351         double var_L_type_Ca_channel__f2ds = var_L_type_Ca_channel_f2ds_gate__f2ds;
00352         double var_L_type_Ca_channel__i_Ca_L_K_ds = (((var_L_type_Ca_channel__FrICa * var_L_type_Ca_channel__P_CaK * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__K_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__K_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00353         double var_membrane__i_Ca_L_K_ds = var_L_type_Ca_channel__i_Ca_L_K_ds;
00354         const double var_sodium_potassium_pump__i_NaK_max = 0.7;
00355         double var_sodium_potassium_pump__Na_i = var_intracellular_sodium_concentration__Na_i;
00356         double var_sodium_potassium_pump__K_o = var_extracellular_potassium_concentration__K_o;
00357         const double var_sodium_potassium_pump__K_mNa = 40.0;
00358         const double var_sodium_potassium_pump__K_mK = 1.0;
00359         double var_sodium_potassium_pump__i_NaK = (((var_sodium_potassium_pump__i_NaK_max * var_sodium_potassium_pump__K_o) / (var_sodium_potassium_pump__K_mK + var_sodium_potassium_pump__K_o)) * var_sodium_potassium_pump__Na_i) / (var_sodium_potassium_pump__K_mNa + var_sodium_potassium_pump__Na_i);
00360         double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00361         const double var_fast_sodium_current__g_Na = 2.5;
00362         double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
00363         double var_fast_sodium_current__V = var_membrane__V;
00364         double var_reversal_potentials__E_mh = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log((var_reversal_potentials__Na_o + (0.12 * var_reversal_potentials__K_o)) / (var_reversal_potentials__Na_i + (0.12 * var_reversal_potentials__K_i)));
00365         double var_fast_sodium_current__E_mh = var_reversal_potentials__E_mh;
00366         double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
00367         double 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__V - var_fast_sodium_current__E_mh);
00368         double var_membrane__i_Na = var_fast_sodium_current__i_Na;
00369         double var_sodium_background_current__V = var_membrane__V;
00370         double 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);
00371         double var_sodium_background_current__E_Na = var_reversal_potentials__E_Na;
00372         const double var_sodium_background_current__g_bna = 0.0006;
00373         double var_sodium_background_current__i_b_Na = var_sodium_background_current__g_bna * (var_sodium_background_current__V - var_sodium_background_current__E_Na);
00374         double var_membrane__i_b_Na = var_sodium_background_current__i_b_Na;
00375         const double var_persistent_sodium_current__g_pna = 0.004;
00376         double var_persistent_sodium_current__V = var_membrane__V;
00377         double var_persistent_sodium_current__E_Na = var_reversal_potentials__E_Na;
00378         double var_persistent_sodium_current__i_p_Na = ((var_persistent_sodium_current__g_pna * 1.0) / (1.0 + exp((-(var_persistent_sodium_current__V + 52.0)) / 8.0))) * (var_persistent_sodium_current__V - var_persistent_sodium_current__E_Na);
00379         double var_membrane__i_p_Na = var_persistent_sodium_current__i_p_Na;
00380         const double var_L_type_Ca_channel__P_CaNa = 0.01;
00381         double var_L_type_Ca_channel__Na_o = var_extracellular_sodium_concentration__Na_o;
00382         double var_L_type_Ca_channel__Na_i = var_intracellular_sodium_concentration__Na_i;
00383         double var_L_type_Ca_channel__i_Ca_L_Na_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaNa * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Na_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Na_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00384         double var_membrane__i_Ca_L_Na_cyt = var_L_type_Ca_channel__i_Ca_L_Na_cyt;
00385         double var_L_type_Ca_channel__i_Ca_L_Na_ds = (((var_L_type_Ca_channel__FrICa * var_L_type_Ca_channel__P_CaNa * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Na_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Na_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00386         double var_membrane__i_Ca_L_Na_ds = var_L_type_Ca_channel__i_Ca_L_Na_ds;
00387         double var_sodium_calcium_exchanger__Na_i = var_intracellular_sodium_concentration__Na_i;
00388         const double var_sodium_calcium_exchanger__n_NaCa = 3.0;
00389         const double var_sodium_calcium_exchanger__gamma = 0.5;
00390         double var_sodium_calcium_exchanger__F = var_membrane__F;
00391         double var_sodium_calcium_exchanger__Na_o = var_extracellular_sodium_concentration__Na_o;
00392         const double var_sodium_calcium_exchanger__FRiNaCa = 0.001;
00393         double var_sodium_calcium_exchanger__R = var_membrane__R;
00394         double var_sodium_calcium_exchanger__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00395         double var_sodium_calcium_exchanger__T = var_membrane__T;
00396         double var_sodium_calcium_exchanger__V = var_membrane__V;
00397         const double var_sodium_calcium_exchanger__d_NaCa = 0.0;
00398         const double var_extracellular_calcium_concentration__Ca_o = 2.0;
00399         double var_sodium_calcium_exchanger__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00400         const double var_sodium_calcium_exchanger__k_NaCa = 0.0005;
00401         double var_sodium_calcium_exchanger__i_NaCa_cyt = ((1.0 - var_sodium_calcium_exchanger__FRiNaCa) * var_sodium_calcium_exchanger__k_NaCa * ((exp((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_o) - (exp(((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_i))) / ((1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_sodium_calcium_exchanger__Ca_i * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_sodium_calcium_exchanger__Ca_o * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa))))) * (1.0 + (var_sodium_calcium_exchanger__Ca_i / 0.0069)));
00402         double var_membrane__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
00403         double var_sodium_calcium_exchanger__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
00404         double var_sodium_calcium_exchanger__i_NaCa_ds = (var_sodium_calcium_exchanger__FRiNaCa * var_sodium_calcium_exchanger__k_NaCa * ((exp((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_o) - (exp(((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_ds))) / ((1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_sodium_calcium_exchanger__Ca_ds * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_sodium_calcium_exchanger__Ca_o * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa))))) * (1.0 + (var_sodium_calcium_exchanger__Ca_ds / 0.0069)));
00405         double var_membrane__i_NaCa_ds = var_sodium_calcium_exchanger__i_NaCa_ds;
00406         double var_L_type_Ca_channel__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00407         double var_L_type_Ca_channel__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00408         double var_L_type_Ca_channel__i_Ca_L_Ca_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * 4.0 * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Ca_i * exp((100.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Ca_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00409         double var_membrane__i_Ca_L_Ca_cyt = var_L_type_Ca_channel__i_Ca_L_Ca_cyt;
00410         double var_L_type_Ca_channel__i_Ca_L_Ca_ds = (((var_L_type_Ca_channel__FrICa * 4.0 * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Ca_i * exp((100.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Ca_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00411         double var_membrane__i_Ca_L_Ca_ds = var_L_type_Ca_channel__i_Ca_L_Ca_ds;
00412         double var_reversal_potentials__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00413         double var_reversal_potentials__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00414         double 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);
00415         double var_calcium_background_current__E_Ca = var_reversal_potentials__E_Ca;
00416         const double var_calcium_background_current__g_bca = 0.00025;
00417         double var_calcium_background_current__V = var_membrane__V;
00418         double var_calcium_background_current__i_b_Ca = var_calcium_background_current__g_bca * (var_calcium_background_current__V - var_calcium_background_current__E_Ca);
00419         double var_membrane__i_b_Ca = var_calcium_background_current__i_b_Ca;
00420         double var_membrane__i_Stim = GetStimulus((1.0/0.001)*var_environment__time);
00421         double var_rapid_delayed_rectifier_potassium_current_xr1_gate__V = var_rapid_delayed_rectifier_potassium_current__V;
00422         double var_rapid_delayed_rectifier_potassium_current_xr1_gate__alpha_xr1 = 50.0 / (1.0 + exp((-(var_rapid_delayed_rectifier_potassium_current_xr1_gate__V - 5.0)) / 9.0));
00423         double var_rapid_delayed_rectifier_potassium_current_xr1_gate__beta_xr1 = 0.05 * exp((-(var_rapid_delayed_rectifier_potassium_current_xr1_gate__V - 20.0)) / 15.0);
00424         double var_rapid_delayed_rectifier_potassium_current_xr2_gate__V = var_rapid_delayed_rectifier_potassium_current__V;
00425         double var_rapid_delayed_rectifier_potassium_current_xr2_gate__alpha_xr2 = 50.0 / (1.0 + exp((-(var_rapid_delayed_rectifier_potassium_current_xr2_gate__V - 5.0)) / 9.0));
00426         double var_rapid_delayed_rectifier_potassium_current_xr2_gate__beta_xr2 = 0.4 * exp(-pow((var_rapid_delayed_rectifier_potassium_current_xr2_gate__V + 30.0) / 30.0, 3.0));
00427         double var_slow_delayed_rectifier_potassium_current_xs_gate__V = var_slow_delayed_rectifier_potassium_current__V;
00428         double var_slow_delayed_rectifier_potassium_current_xs_gate__alpha_xs = 14.0 / (1.0 + exp((-(var_slow_delayed_rectifier_potassium_current_xs_gate__V - 40.0)) / 9.0));
00429         double var_slow_delayed_rectifier_potassium_current_xs_gate__beta_xs = 1.0 * exp((-var_slow_delayed_rectifier_potassium_current_xs_gate__V) / 45.0);
00430         double var_fast_sodium_current_m_gate__V = var_fast_sodium_current__V;
00431         double var_fast_sodium_current_m_gate__E0_m = var_fast_sodium_current_m_gate__V + 41.0;
00432         const double var_fast_sodium_current_m_gate__delta_m = 1e-05;
00433         double var_fast_sodium_current_m_gate__alpha_m = (fabs(var_fast_sodium_current_m_gate__E0_m) < var_fast_sodium_current_m_gate__delta_m) ? 2000.0 : ((200.0 * var_fast_sodium_current_m_gate__E0_m) / (1.0 - exp((-0.1) * var_fast_sodium_current_m_gate__E0_m)));
00434         double var_fast_sodium_current_m_gate__beta_m = 8000.0 * exp((-0.056) * (var_fast_sodium_current_m_gate__V + 66.0));
00435         double var_fast_sodium_current_h_gate__V = var_fast_sodium_current__V;
00436         const double var_fast_sodium_current_h_gate__shift_h = 0.0;
00437         double var_fast_sodium_current_h_gate__alpha_h = 20.0 * exp((-0.125) * ((var_fast_sodium_current_h_gate__V + 75.0) - var_fast_sodium_current_h_gate__shift_h));
00438         double var_fast_sodium_current_h_gate__beta_h = 2000.0 / (1.0 + (320.0 * exp((-0.1) * ((var_fast_sodium_current_h_gate__V + 75.0) - var_fast_sodium_current_h_gate__shift_h))));
00439         double var_L_type_Ca_channel__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
00440         const double var_L_type_Ca_channel__Km_f2 = 100000.0;
00441         const double var_L_type_Ca_channel__Km_f2ds = 0.001;
00442         const double var_L_type_Ca_channel__R_decay = 20.0;
00443         double var_L_type_Ca_channel_d_gate__V = var_L_type_Ca_channel__V;
00444         double var_L_type_Ca_channel_d_gate__E0_d = (var_L_type_Ca_channel_d_gate__V + 24.0) - 5.0;
00445         double var_L_type_Ca_channel_d_gate__alpha_d = (fabs(var_L_type_Ca_channel_d_gate__E0_d) < 0.0001) ? 120.0 : ((30.0 * var_L_type_Ca_channel_d_gate__E0_d) / (1.0 - exp((-var_L_type_Ca_channel_d_gate__E0_d) / 4.0)));
00446         double var_L_type_Ca_channel_d_gate__beta_d = (fabs(var_L_type_Ca_channel_d_gate__E0_d) < 0.0001) ? 120.0 : ((12.0 * var_L_type_Ca_channel_d_gate__E0_d) / (exp(var_L_type_Ca_channel_d_gate__E0_d / 10.0) - 1.0));
00447         const double var_L_type_Ca_channel_d_gate__speed_d = 3.0;
00448         double var_L_type_Ca_channel_f_gate__V = var_L_type_Ca_channel__V;
00449         double var_L_type_Ca_channel_f_gate__E0_f = var_L_type_Ca_channel_f_gate__V + 34.0;
00450         const double var_L_type_Ca_channel_f_gate__delta_f = 0.0001;
00451         double var_L_type_Ca_channel_f_gate__alpha_f = (fabs(var_L_type_Ca_channel_f_gate__E0_f) < var_L_type_Ca_channel_f_gate__delta_f) ? 25.0 : ((6.25 * var_L_type_Ca_channel_f_gate__E0_f) / (exp(var_L_type_Ca_channel_f_gate__E0_f / 4.0) - 1.0));
00452         double var_L_type_Ca_channel_f_gate__beta_f = 12.0 / (1.0 + exp(((-1.0) * (var_L_type_Ca_channel_f_gate__V + 34.0)) / 4.0));
00453         const double var_L_type_Ca_channel_f_gate__speed_f = 0.3;
00454         double var_L_type_Ca_channel_f2_gate__Km_f2 = var_L_type_Ca_channel__Km_f2;
00455         double var_L_type_Ca_channel_f2_gate__Ca_i = var_L_type_Ca_channel__Ca_i;
00456         double var_L_type_Ca_channel_f2ds_gate__Km_f2ds = var_L_type_Ca_channel__Km_f2ds;
00457         double var_L_type_Ca_channel_f2ds_gate__R_decay = var_L_type_Ca_channel__R_decay;
00458         double var_L_type_Ca_channel_f2ds_gate__Ca_ds = var_L_type_Ca_channel__Ca_ds;
00459         double var_transient_outward_current_s_gate__V = var_transient_outward_current__V;
00460         double var_transient_outward_current_s_gate__alpha_s = 0.033 * exp((-var_transient_outward_current_s_gate__V) / 17.0);
00461         double var_transient_outward_current_s_gate__beta_s = 33.0 / (1.0 + exp((-0.125) * (var_transient_outward_current_s_gate__V + 10.0)));
00462         double var_transient_outward_current_r_gate__V = var_transient_outward_current__V;
00463         double var_sarcoplasmic_reticulum_calcium_pump__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00464         double var_sarcoplasmic_reticulum_calcium_pump__Ca_up = var_intracellular_calcium_concentration__Ca_up;
00465         const double var_sarcoplasmic_reticulum_calcium_pump__alpha_up = 0.4;
00466         const double var_sarcoplasmic_reticulum_calcium_pump__beta_up = 0.03;
00467         const double var_sarcoplasmic_reticulum_calcium_pump__K_srca = 0.5;
00468         const double var_sarcoplasmic_reticulum_calcium_pump__K_xcs = 0.4;
00469         const double var_sarcoplasmic_reticulum_calcium_pump__K_cyca = 0.0003;
00470         double var_sarcoplasmic_reticulum_calcium_pump__K_1 = (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca;
00471         double var_sarcoplasmic_reticulum_calcium_pump__K_2 = var_sarcoplasmic_reticulum_calcium_pump__Ca_i + (var_sarcoplasmic_reticulum_calcium_pump__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_1) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca;
00472         double var_sarcoplasmic_reticulum_calcium_pump__i_up = ((var_sarcoplasmic_reticulum_calcium_pump__Ca_i / var_sarcoplasmic_reticulum_calcium_pump__K_2) * var_sarcoplasmic_reticulum_calcium_pump__alpha_up) - (((var_sarcoplasmic_reticulum_calcium_pump__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_1) / var_sarcoplasmic_reticulum_calcium_pump__K_2) * var_sarcoplasmic_reticulum_calcium_pump__beta_up);
00473         double var_calcium_translocation__Ca_rel = var_intracellular_calcium_concentration__Ca_rel;
00474         double var_calcium_translocation__Ca_up = var_intracellular_calcium_concentration__Ca_up;
00475         double var_calcium_translocation__i_trans = 50.0 * (var_calcium_translocation__Ca_up - var_calcium_translocation__Ca_rel);
00476         const double var_calcium_release__K_m_rel = 250.0;
00477         const double var_calcium_release__K_leak_rate = 0.05;
00478         double var_calcium_release__Ca_rel = var_intracellular_calcium_concentration__Ca_rel;
00479         double var_calcium_release__i_rel = ((pow(var_calcium_release__ActFrac / (var_calcium_release__ActFrac + 0.25), 2.0) * var_calcium_release__K_m_rel) + var_calcium_release__K_leak_rate) * var_calcium_release__Ca_rel;
00480         double var_calcium_release__V = var_membrane__V;
00481         double var_calcium_release__VoltDep = exp(0.08 * (var_calcium_release__V - 40.0));
00482         const double var_calcium_release__K_m_Ca_cyt = 0.0005;
00483         double var_calcium_release__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00484         double var_calcium_release__CaiReg = var_calcium_release__Ca_i / (var_calcium_release__Ca_i + var_calcium_release__K_m_Ca_cyt);
00485         double var_calcium_release__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
00486         const double var_calcium_release__K_m_Ca_ds = 0.01;
00487         double var_calcium_release__CadsReg = var_calcium_release__Ca_ds / (var_calcium_release__Ca_ds + var_calcium_release__K_m_Ca_ds);
00488         double var_calcium_release__RegBindSite = var_calcium_release__CaiReg + ((1.0 - var_calcium_release__CaiReg) * var_calcium_release__CadsReg);
00489         double var_calcium_release__ActRate = (0.0 * var_calcium_release__VoltDep) + (500.0 * pow(var_calcium_release__RegBindSite, 2.0));
00490         double var_calcium_release__InactRate = 60.0 + (500.0 * pow(var_calcium_release__RegBindSite, 2.0));
00491         double var_calcium_release__PrecFrac = (1.0 - var_calcium_release__ActFrac) - var_calcium_release__ProdFrac;
00492         double var_calcium_release__SpeedRel = (var_calcium_release__V < (-50.0)) ? 5.0 : 1.0;
00493         const double var_intracellular_calcium_concentration__V_up_ratio = 0.01;
00494         const double var_intracellular_calcium_concentration__V_rel_ratio = 0.1;
00495         const double var_intracellular_calcium_concentration__V_e_ratio = 0.4;
00496         double var_intracellular_calcium_concentration__V_i_ratio = ((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio;
00497         const double var_intracellular_calcium_concentration__radius = 0.012;
00498         const double var_intracellular_calcium_concentration__length = 0.074;
00499         double var_intracellular_calcium_concentration__V_Cell = 3.141592654 * pow(var_intracellular_calcium_concentration__radius, 2.0) * var_intracellular_calcium_concentration__length;
00500         double var_intracellular_calcium_concentration__V_i = var_intracellular_calcium_concentration__V_Cell * var_intracellular_calcium_concentration__V_i_ratio;
00501         double var_intracellular_sodium_concentration__V_i = var_intracellular_calcium_concentration__V_i;
00502         double var_intracellular_sodium_concentration__F = var_membrane__F;
00503         double var_intracellular_sodium_concentration__i_Na = var_fast_sodium_current__i_Na;
00504         double var_intracellular_sodium_concentration__i_b_Na = var_sodium_background_current__i_b_Na;
00505         double var_intracellular_sodium_concentration__i_p_Na = var_persistent_sodium_current__i_p_Na;
00506         double var_intracellular_sodium_concentration__i_Ca_L_Na_cyt = var_L_type_Ca_channel__i_Ca_L_Na_cyt;
00507         double var_intracellular_sodium_concentration__i_Ca_L_Na_ds = var_L_type_Ca_channel__i_Ca_L_Na_ds;
00508         double var_intracellular_sodium_concentration__i_NaK = var_sodium_potassium_pump__i_NaK;
00509         double var_intracellular_sodium_concentration__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
00510         double var_intracellular_potassium_concentration__V_i = var_intracellular_calcium_concentration__V_i;
00511         double var_intracellular_potassium_concentration__i_K1 = var_time_independent_potassium_current__i_K1;
00512         double var_intracellular_potassium_concentration__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00513         double var_intracellular_potassium_concentration__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00514         double var_intracellular_potassium_concentration__i_Ca_L_K_cyt = var_L_type_Ca_channel__i_Ca_L_K_cyt;
00515         double var_intracellular_potassium_concentration__i_Ca_L_K_ds = var_L_type_Ca_channel__i_Ca_L_K_ds;
00516         double var_intracellular_potassium_concentration__i_to = var_transient_outward_current__i_to;
00517         double var_intracellular_potassium_concentration__i_NaK = var_sodium_potassium_pump__i_NaK;
00518         double var_intracellular_potassium_concentration__F = var_membrane__F;
00519         const double var_intracellular_calcium_concentration__Calmod = 0.02;
00520         const double var_intracellular_calcium_concentration__Trop = 0.05;
00521         const double var_intracellular_calcium_concentration__alpha_Calmod = 100000.0;
00522         const double var_intracellular_calcium_concentration__beta_Calmod = 50.0;
00523         const double var_intracellular_calcium_concentration__alpha_Trop = 100000.0;
00524         const double var_intracellular_calcium_concentration__beta_Trop = 200.0;
00525         const double var_intracellular_calcium_concentration__V_ds_ratio = 0.1;
00526         const double var_intracellular_calcium_concentration__Kdecay = 10.0;
00527         double var_intracellular_calcium_concentration__i_up = var_sarcoplasmic_reticulum_calcium_pump__i_up;
00528         double var_intracellular_calcium_concentration__i_trans = var_calcium_translocation__i_trans;
00529         double var_intracellular_calcium_concentration__i_rel = var_calcium_release__i_rel;
00530         double var_intracellular_calcium_concentration__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
00531         double var_intracellular_calcium_concentration__i_NaCa_ds = var_sodium_calcium_exchanger__i_NaCa_ds;
00532         double var_intracellular_calcium_concentration__i_Ca_L_Ca_cyt = var_L_type_Ca_channel__i_Ca_L_Ca_cyt;
00533         double var_intracellular_calcium_concentration__i_Ca_L_Ca_ds = var_L_type_Ca_channel__i_Ca_L_Ca_ds;
00534         double var_intracellular_calcium_concentration__i_b_Ca = var_calcium_background_current__i_b_Ca;
00535         double var_intracellular_calcium_concentration__F = var_membrane__F;
00536         double d_dt_membrane__V;
00537         if (mSetVoltageDerivativeToZero)
00538         {
00539             d_dt_membrane__V = 0.0;
00540         }
00541         else
00542         {
00543             d_dt_membrane__V = ((-1.0) / var_membrane__Cm) * (var_membrane__i_Stim + var_membrane__i_K1 + var_membrane__i_to + var_membrane__i_Kr + var_membrane__i_Ks + var_membrane__i_NaK + var_membrane__i_Na + var_membrane__i_b_Na + var_membrane__i_p_Na + var_membrane__i_Ca_L_Na_cyt + var_membrane__i_Ca_L_Na_ds + var_membrane__i_NaCa_cyt + var_membrane__i_NaCa_ds + var_membrane__i_Ca_L_Ca_cyt + var_membrane__i_Ca_L_Ca_ds + var_membrane__i_Ca_L_K_cyt + var_membrane__i_Ca_L_K_ds + var_membrane__i_b_Ca);
00544         }
00545         double d_dt_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = (var_rapid_delayed_rectifier_potassium_current_xr1_gate__alpha_xr1 * (1.0 - var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1)) - (var_rapid_delayed_rectifier_potassium_current_xr1_gate__beta_xr1 * var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1);
00546         double d_dt_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = (var_rapid_delayed_rectifier_potassium_current_xr2_gate__alpha_xr2 * (1.0 - var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2)) - (var_rapid_delayed_rectifier_potassium_current_xr2_gate__beta_xr2 * var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2);
00547         double d_dt_slow_delayed_rectifier_potassium_current_xs_gate__xs = (var_slow_delayed_rectifier_potassium_current_xs_gate__alpha_xs * (1.0 - var_slow_delayed_rectifier_potassium_current_xs_gate__xs)) - (var_slow_delayed_rectifier_potassium_current_xs_gate__beta_xs * var_slow_delayed_rectifier_potassium_current_xs_gate__xs);
00548         double d_dt_fast_sodium_current_m_gate__m = (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);
00549         double d_dt_fast_sodium_current_h_gate__h = (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);
00550         double d_dt_L_type_Ca_channel_d_gate__d = var_L_type_Ca_channel_d_gate__speed_d * ((var_L_type_Ca_channel_d_gate__alpha_d * (1.0 - var_L_type_Ca_channel_d_gate__d)) - (var_L_type_Ca_channel_d_gate__beta_d * var_L_type_Ca_channel_d_gate__d));
00551         double d_dt_L_type_Ca_channel_f_gate__f = var_L_type_Ca_channel_f_gate__speed_f * ((var_L_type_Ca_channel_f_gate__alpha_f * (1.0 - var_L_type_Ca_channel_f_gate__f)) - (var_L_type_Ca_channel_f_gate__beta_f * var_L_type_Ca_channel_f_gate__f));
00552         double d_dt_L_type_Ca_channel_f2_gate__f2 = 1.0 - (1.0 * ((var_L_type_Ca_channel_f2_gate__Ca_i / (var_L_type_Ca_channel_f2_gate__Km_f2 + var_L_type_Ca_channel_f2_gate__Ca_i)) + var_L_type_Ca_channel_f2_gate__f2));
00553         double d_dt_L_type_Ca_channel_f2ds_gate__f2ds = var_L_type_Ca_channel_f2ds_gate__R_decay * (1.0 - ((var_L_type_Ca_channel_f2ds_gate__Ca_ds / (var_L_type_Ca_channel_f2ds_gate__Km_f2ds + var_L_type_Ca_channel_f2ds_gate__Ca_ds)) + var_L_type_Ca_channel_f2ds_gate__f2ds));
00554         double d_dt_transient_outward_current_s_gate__s = (var_transient_outward_current_s_gate__alpha_s * (1.0 - var_transient_outward_current_s_gate__s)) - (var_transient_outward_current_s_gate__beta_s * var_transient_outward_current_s_gate__s);
00555         double d_dt_transient_outward_current_r_gate__r = 333.0 * ((1.0 / (1.0 + exp((-(var_transient_outward_current_r_gate__V + 4.0)) / 5.0))) - var_transient_outward_current_r_gate__r);
00556         double d_dt_calcium_release__ActFrac = (var_calcium_release__PrecFrac * var_calcium_release__SpeedRel * var_calcium_release__ActRate) - (var_calcium_release__ActFrac * var_calcium_release__SpeedRel * var_calcium_release__InactRate);
00557         double d_dt_calcium_release__ProdFrac = (var_calcium_release__ActFrac * var_calcium_release__SpeedRel * var_calcium_release__InactRate) - (var_calcium_release__SpeedRel * 1.0 * var_calcium_release__ProdFrac);
00558         double d_dt_intracellular_sodium_concentration__Na_i = ((-1.0) / (1.0 * var_intracellular_sodium_concentration__V_i * var_intracellular_sodium_concentration__F)) * (var_intracellular_sodium_concentration__i_Na + var_intracellular_sodium_concentration__i_p_Na + var_intracellular_sodium_concentration__i_b_Na + (3.0 * var_intracellular_sodium_concentration__i_NaK) + (3.0 * var_intracellular_sodium_concentration__i_NaCa_cyt) + var_intracellular_sodium_concentration__i_Ca_L_Na_cyt + var_intracellular_sodium_concentration__i_Ca_L_Na_ds);
00559         double d_dt_intracellular_potassium_concentration__K_i = ((-1.0) / (1.0 * var_intracellular_potassium_concentration__V_i * var_intracellular_potassium_concentration__F)) * ((var_intracellular_potassium_concentration__i_K1 + var_intracellular_potassium_concentration__i_Kr + var_intracellular_potassium_concentration__i_Ks + var_intracellular_potassium_concentration__i_Ca_L_K_cyt + var_intracellular_potassium_concentration__i_Ca_L_K_ds + var_intracellular_potassium_concentration__i_to) - (2.0 * var_intracellular_potassium_concentration__i_NaK));
00560         double d_dt_intracellular_calcium_concentration__Ca_Trop = (var_intracellular_calcium_concentration__alpha_Trop * var_intracellular_calcium_concentration__Ca_i * (var_intracellular_calcium_concentration__Trop - var_intracellular_calcium_concentration__Ca_Trop)) - (var_intracellular_calcium_concentration__beta_Trop * var_intracellular_calcium_concentration__Ca_Trop);
00561         double d_dt_intracellular_calcium_concentration__Ca_Calmod = (var_intracellular_calcium_concentration__alpha_Calmod * var_intracellular_calcium_concentration__Ca_i * (var_intracellular_calcium_concentration__Calmod - var_intracellular_calcium_concentration__Ca_Calmod)) - (var_intracellular_calcium_concentration__beta_Calmod * var_intracellular_calcium_concentration__Ca_Calmod);
00562         double d_dt_intracellular_calcium_concentration__Ca_i = ((((((-1.0) / (2.0 * 1.0 * var_intracellular_calcium_concentration__V_i * var_intracellular_calcium_concentration__F)) * (((var_intracellular_calcium_concentration__i_Ca_L_Ca_cyt + var_intracellular_calcium_concentration__i_b_Ca) - (2.0 * var_intracellular_calcium_concentration__i_NaCa_cyt)) - (2.0 * var_intracellular_calcium_concentration__i_NaCa_ds))) + (var_intracellular_calcium_concentration__Ca_ds * var_intracellular_calcium_concentration__V_ds_ratio * var_intracellular_calcium_concentration__Kdecay) + ((var_intracellular_calcium_concentration__i_rel * var_intracellular_calcium_concentration__V_rel_ratio) / var_intracellular_calcium_concentration__V_i_ratio)) - d_dt_intracellular_calcium_concentration__Ca_Calmod) - d_dt_intracellular_calcium_concentration__Ca_Trop) - var_intracellular_calcium_concentration__i_up;
00563         double d_dt_intracellular_calcium_concentration__Ca_ds = (((-1.0) * var_intracellular_calcium_concentration__i_Ca_L_Ca_ds) / (2.0 * 1.0 * var_intracellular_calcium_concentration__V_ds_ratio * var_intracellular_calcium_concentration__V_i * var_intracellular_calcium_concentration__F)) - (var_intracellular_calcium_concentration__Ca_ds * var_intracellular_calcium_concentration__Kdecay);
00564         double d_dt_intracellular_calcium_concentration__Ca_up = ((var_intracellular_calcium_concentration__V_i_ratio / var_intracellular_calcium_concentration__V_up_ratio) * var_intracellular_calcium_concentration__i_up) - var_intracellular_calcium_concentration__i_trans;
00565         double d_dt_intracellular_calcium_concentration__Ca_rel = ((var_intracellular_calcium_concentration__V_up_ratio / var_intracellular_calcium_concentration__V_rel_ratio) * var_intracellular_calcium_concentration__i_trans) - var_intracellular_calcium_concentration__i_rel;
00566 
00567         rDY[0] = 0.001*d_dt_membrane__V;
00568         rDY[1] = 0.001*d_dt_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1;
00569         rDY[2] = 0.001*d_dt_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2;
00570         rDY[3] = 0.001*d_dt_slow_delayed_rectifier_potassium_current_xs_gate__xs;
00571         rDY[4] = 0.001*d_dt_fast_sodium_current_m_gate__m;
00572         rDY[5] = 0.001*d_dt_fast_sodium_current_h_gate__h;
00573         rDY[6] = 0.001*d_dt_L_type_Ca_channel_d_gate__d;
00574         rDY[7] = 0.001*d_dt_L_type_Ca_channel_f_gate__f;
00575         rDY[8] = 0.001*d_dt_L_type_Ca_channel_f2_gate__f2;
00576         rDY[9] = 0.001*d_dt_L_type_Ca_channel_f2ds_gate__f2ds;
00577         rDY[10] = 0.001*d_dt_transient_outward_current_s_gate__s;
00578         rDY[11] = 0.001*d_dt_transient_outward_current_r_gate__r;
00579         rDY[12] = 0.001*d_dt_calcium_release__ActFrac;
00580         rDY[13] = 0.001*d_dt_calcium_release__ProdFrac;
00581         rDY[14] = 0.001*d_dt_intracellular_sodium_concentration__Na_i;
00582         rDY[15] = 0.001*d_dt_intracellular_potassium_concentration__K_i;
00583         rDY[16] = 0.001*d_dt_intracellular_calcium_concentration__Ca_i;
00584         rDY[17] = 0.001*d_dt_intracellular_calcium_concentration__Ca_ds;
00585         rDY[18] = 0.001*d_dt_intracellular_calcium_concentration__Ca_up;
00586         rDY[19] = 0.001*d_dt_intracellular_calcium_concentration__Ca_rel;
00587         rDY[20] = 0.001*d_dt_intracellular_calcium_concentration__Ca_Calmod;
00588         rDY[21] = 0.001*d_dt_intracellular_calcium_concentration__Ca_Trop;
00589     }
00590 
00591 };
00592 
00593 
00594 template<>
00595 void OdeSystemInformation<CML_noble_varghese_kohl_noble_1998_basic>::Initialise(void)
00596 {
00597     // Time units: second
00598     //
00599     this->mVariableNames.push_back("V");
00600     this->mVariableUnits.push_back("millivolt");
00601     this->mInitialConditions.push_back(-92.849333);
00602 
00603     this->mVariableNames.push_back("xr1");
00604     this->mVariableUnits.push_back("dimensionless");
00605     this->mInitialConditions.push_back(1.03e-5);
00606 
00607     this->mVariableNames.push_back("xr2");
00608     this->mVariableUnits.push_back("dimensionless");
00609     this->mInitialConditions.push_back(2e-7);
00610 
00611     this->mVariableNames.push_back("xs");
00612     this->mVariableUnits.push_back("dimensionless");
00613     this->mInitialConditions.push_back(0.001302);
00614 
00615     this->mVariableNames.push_back("m");
00616     this->mVariableUnits.push_back("dimensionless");
00617     this->mInitialConditions.push_back(0.0016203);
00618 
00619     this->mVariableNames.push_back("h");
00620     this->mVariableUnits.push_back("dimensionless");
00621     this->mInitialConditions.push_back(0.9944036);
00622 
00623     this->mVariableNames.push_back("d");
00624     this->mVariableUnits.push_back("dimensionless");
00625     this->mInitialConditions.push_back(0);
00626 
00627     this->mVariableNames.push_back("f");
00628     this->mVariableUnits.push_back("dimensionless");
00629     this->mInitialConditions.push_back(1);
00630 
00631     this->mVariableNames.push_back("f2");
00632     this->mVariableUnits.push_back("dimensionless");
00633     this->mInitialConditions.push_back(0.9349197);
00634 
00635     this->mVariableNames.push_back("f2ds");
00636     this->mVariableUnits.push_back("dimensionless");
00637     this->mInitialConditions.push_back(0.9651958);
00638 
00639     this->mVariableNames.push_back("s");
00640     this->mVariableUnits.push_back("dimensionless");
00641     this->mInitialConditions.push_back(0.9948645);
00642 
00643     this->mVariableNames.push_back("r");
00644     this->mVariableUnits.push_back("dimensionless");
00645     this->mInitialConditions.push_back(0);
00646 
00647     this->mVariableNames.push_back("ActFrac");
00648     this->mVariableUnits.push_back("dimensionless");
00649     this->mInitialConditions.push_back(0.0042614);
00650 
00651     this->mVariableNames.push_back("ProdFrac");
00652     this->mVariableUnits.push_back("dimensionless");
00653     this->mInitialConditions.push_back(0.4068154);
00654 
00655     this->mVariableNames.push_back("Na_i");
00656     this->mVariableUnits.push_back("millimolar");
00657     this->mInitialConditions.push_back(7.3321223);
00658 
00659     this->mVariableNames.push_back("K_i");
00660     this->mVariableUnits.push_back("millimolar");
00661     this->mInitialConditions.push_back(136.5644281);
00662 
00663     this->mVariableNames.push_back("Ca_i");
00664     this->mVariableUnits.push_back("millimolar");
00665     this->mInitialConditions.push_back(1.4e-5);
00666 
00667     this->mVariableNames.push_back("Ca_ds");
00668     this->mVariableUnits.push_back("millimolar");
00669     this->mInitialConditions.push_back(1.88e-5);
00670 
00671     this->mVariableNames.push_back("Ca_up");
00672     this->mVariableUnits.push_back("millimolar");
00673     this->mInitialConditions.push_back(0.4531889);
00674 
00675     this->mVariableNames.push_back("Ca_rel");
00676     this->mVariableUnits.push_back("millimolar");
00677     this->mInitialConditions.push_back(0.4481927);
00678 
00679     this->mVariableNames.push_back("Ca_Calmod");
00680     this->mVariableUnits.push_back("millimolar");
00681     this->mInitialConditions.push_back(0.0005555);
00682 
00683     this->mVariableNames.push_back("Ca_Trop");
00684     this->mVariableUnits.push_back("millimolar");
00685     this->mInitialConditions.push_back(0.0003542);
00686 
00687     this->mInitialised = true;
00688 }
00689 
00690 
00691 BOOST_CLASS_EXPORT(CML_noble_varghese_kohl_noble_1998_basic)
00692 namespace boost
00693 {
00694     namespace serialization
00695     {
00696         template<class Archive>
00697         inline void save_construct_data(
00698             Archive & ar, const CML_noble_varghese_kohl_noble_1998_basic * t, const unsigned int fileVersion)
00699         {
00700             const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver();
00701             const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction();
00702             ar << p_solver;
00703             ar << p_stimulus;
00704         }
00705         
00706         template<class Archive>
00707         inline void load_construct_data(
00708             Archive & ar, CML_noble_varghese_kohl_noble_1998_basic * t, const unsigned int fileVersion)
00709         {
00710             boost::shared_ptr<AbstractIvpOdeSolver> p_solver;
00711             boost::shared_ptr<AbstractStimulusFunction> p_stimulus;
00712             ar >> p_solver;
00713             ar >> p_stimulus;
00714             ::new(t)CML_noble_varghese_kohl_noble_1998_basic(p_solver, p_stimulus);
00715         }
00716         
00717     }
00718     
00719 }
00720 
00721 #endif

Generated on Tue Aug 4 16:10:22 2009 for Chaste by  doxygen 1.5.5