Maleckar2009OdeSystem.cpp

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 #include <cmath>
00014 #include <cassert>
00015 #include "Maleckar2009OdeSystem.hpp"
00016 #include "Exception.hpp"
00017 #include "OdeSystemInformation.hpp"
00018 
00019 Maleckar2009OdeSystem::Maleckar2009OdeSystem(boost::shared_ptr<AbstractIvpOdeSolver> pSolver,
00020                             boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
00021             : AbstractCardiacCell(pSolver, 30, 0, pIntracellularStimulus)
00022 {
00023      mScaleFactorGks=1.0;
00024      mScaleFactorIto=1.0;
00025      mScaleFactorGkr=1.0;
00026      mScaleFactorGna=1.0;
00027      mScaleFactorAch=1e-24;
00028      mScaleFactorGNaK=1.0;
00029      mScaleFactorGNaCa=1.0;
00030      mScaleFactorGCaL=1.0;
00031      mScaleFactorGKur=1.0;
00032      mScaleFactorGK1=1.0;
00033      mScaleFactorAZD=0.0;
00034     // Time units: second
00035     //
00036     mpSystemInfo = OdeSystemInformation<Maleckar2009OdeSystem>::Instance();
00037     Init();
00038 
00039 }
00040 
00041 Maleckar2009OdeSystem::~Maleckar2009OdeSystem(void)
00042 {
00043 }
00044 
00045 void Maleckar2009OdeSystem::SetScaleFactorGks(double sfgks)
00046 {
00047     mScaleFactorGks=sfgks;
00048 }
00049 void Maleckar2009OdeSystem::SetScaleFactorIto(double sfito)
00050 {
00051     mScaleFactorIto=sfito;
00052 }
00053 void Maleckar2009OdeSystem::SetScaleFactorGkr(double sfgkr)
00054 {
00055     mScaleFactorGkr=sfgkr;
00056 }
00057 void Maleckar2009OdeSystem::SetScaleFactorGna(double sfgna)
00058 {
00059     mScaleFactorGna=sfgna;
00060 }
00061 void Maleckar2009OdeSystem::SetScaleFactorAch(double sfach)
00062 {
00063     mScaleFactorAch=sfach;
00064 }
00065 void Maleckar2009OdeSystem::SetScaleFactorGNaK(double sfgnak)
00066 {
00067     mScaleFactorGNaK=sfgnak;
00068 }
00069 void Maleckar2009OdeSystem::SetScaleFactorGNaCa(double sfgnaca)
00070 {
00071     mScaleFactorGNaCa=sfgnaca;
00072 }
00073 void Maleckar2009OdeSystem::SetScaleFactorGCaL(double sfgcal)
00074 {
00075     mScaleFactorGCaL=sfgcal;
00076 }
00077 void Maleckar2009OdeSystem::SetScaleFactorGKur(double sfgkur)
00078 {
00079     mScaleFactorGKur=sfgkur;
00080 }
00081 void Maleckar2009OdeSystem::SetScaleFactorGK1(double sfgk1)
00082 {
00083     mScaleFactorGK1=sfgk1;
00084 }
00085 void Maleckar2009OdeSystem::SetScaleFactorAZD(double sfazd)
00086 {
00087     mScaleFactorAZD=sfazd;
00088 }
00089 
00090 void Maleckar2009OdeSystem::VerifyStateVariables()
00091 {}
00092 
00093 double Maleckar2009OdeSystem::GetIIonic()
00094 {
00095     std::vector<double>& rY = rGetStateVariables();
00096     double var_membrane__V = rY[0];
00097     // Units: millivolt; Initial value: -73.941851
00098     double var_sodium_current_m_gate__m = rY[1];
00099     // Units: dimensionless; Initial value: 0.003325
00100     double var_sodium_current_h1_gate__h1 = rY[2];
00101     // Units: dimensionless; Initial value: 0.875262
00102     double var_sodium_current_h2_gate__h2 = rY[3];
00103     // Units: dimensionless; Initial value: 0.870692
00104     double var_L_type_Ca_channel_d_L_gate__d_L = rY[4];
00105     // Units: dimensionless; Initial value: 0.000014
00106     double var_L_type_Ca_channel_f_L1_gate__f_L1 = rY[5];
00107     // Units: dimensionless; Initial value: 0.998578
00108     double var_L_type_Ca_channel_f_L2_gate__f_L2 = rY[6];
00109     // Units: dimensionless; Initial value: 0.998561
00110     double var_Ca_independent_transient_outward_K_current_r_gate__r = rY[7];
00111     // Units: dimensionless; Initial value: 0.001098
00112     double var_Ca_independent_transient_outward_K_current_s_gate__s = rY[8];
00113     // Units: dimensionless; Initial value: 0.948202
00114     double var_ultra_rapid_K_current_aur_gate__a_ur = rY[9];
00115     // Units: dimensionless; Initial value: 0.000371
00116     double var_ultra_rapid_K_current_iur_gate__i_ur = rY[10];
00117     // Units: dimensionless; Initial value: 0.966869
00118     double var_delayed_rectifier_K_currents_n_gate__n = rY[11];
00119     // Units: dimensionless; Initial value: 0.004661
00120     double var_delayed_rectifier_K_currents_pa_gate__pa = rY[12];
00121     // Units: dimensionless; Initial value: 0.000054
00122     double var_intracellular_ion_concentrations__Na_i = rY[13];
00123     // Units: millimolar; Initial value: 8.488527
00124     double var_intracellular_ion_concentrations__Ca_i = rY[14];
00125     // Units: millimolar; Initial value: 6.5e-5
00126     double var_intracellular_ion_concentrations__K_i = rY[15];
00127     // Units: millimolar; Initial value: 129.502075
00128     double var_intracellular_ion_concentrations__Ca_d = rY[16];
00129     // Units: millimolar; Initial value: 7.1e-5
00130     double var_cleft_space_ion_concentrations__Na_c = rY[22];
00131     // Units: millimolar; Initial value: 130.019282
00132     double var_cleft_space_ion_concentrations__Ca_c = rY[23];
00133     // Units: millimolar; Initial value: 1.814418
00134     double var_cleft_space_ion_concentrations__K_c = rY[24];
00135     // Units: millimolar; Initial value: 5.588239
00136 
00137     const double var_membrane__R = 8314.0;
00138     const double var_membrane__T = 306.15;
00139     const double var_membrane__F = 96487.0;
00140     const double var_membrane__Cm = 0.05;
00141     const double var_sodium_current__F = var_membrane__F;
00142     const double var_sodium_current__R = var_membrane__R;
00143     const double var_sodium_current__T = var_membrane__T;
00144     const double var_sodium_current__Na_c = var_cleft_space_ion_concentrations__Na_c;
00145     const double var_sodium_current__Na_i = var_intracellular_ion_concentrations__Na_i;
00146     const double var_sodium_current__E_Na = ((var_sodium_current__R * var_sodium_current__T) / var_sodium_current__F) * log(var_sodium_current__Na_c / var_sodium_current__Na_i);
00147     const double var_sodium_current__m = var_sodium_current_m_gate__m;
00148     const double var_sodium_current__h2 = var_sodium_current_h2_gate__h2;
00149     const double var_sodium_current__h1 = var_sodium_current_h1_gate__h1;
00150     const double var_sodium_current__V = var_membrane__V;
00151     const double var_sodium_current__P_Na = 0.0018;
00152     const double var_sodium_current__i_Na = mScaleFactorGna*(((var_sodium_current__P_Na * var_sodium_current__m * var_sodium_current__m * var_sodium_current__m * ((0.9 * var_sodium_current__h1) + (0.1 * var_sodium_current__h2)) * var_sodium_current__Na_c * var_sodium_current__V * var_sodium_current__F * var_sodium_current__F) / (var_sodium_current__R * var_sodium_current__T)) * (exp(((var_sodium_current__V - var_sodium_current__E_Na) * var_sodium_current__F) / (var_sodium_current__R * var_sodium_current__T)) - 1.0)) / (exp((var_sodium_current__V * var_sodium_current__F) / (var_sodium_current__R * var_sodium_current__T)) - 1.0);
00153     const double var_membrane__i_Na = var_sodium_current__i_Na;
00154     const double var_L_type_Ca_channel__k_Ca = 0.025;
00155     const double var_L_type_Ca_channel__Ca_d = var_intracellular_ion_concentrations__Ca_d;
00156     const double var_L_type_Ca_channel__f_Ca = var_L_type_Ca_channel__Ca_d / (var_L_type_Ca_channel__Ca_d + var_L_type_Ca_channel__k_Ca);
00157     const double var_L_type_Ca_channel__E_Ca_app = 60.0;
00158     const double var_L_type_Ca_channel__g_Ca_L = 6.75*mScaleFactorGCaL;
00159     const double var_L_type_Ca_channel__d_L = var_L_type_Ca_channel_d_L_gate__d_L;
00160     const double var_L_type_Ca_channel__f_L2 = var_L_type_Ca_channel_f_L2_gate__f_L2;
00161     const double var_L_type_Ca_channel__V = var_membrane__V;
00162     const double var_L_type_Ca_channel__f_L1 = var_L_type_Ca_channel_f_L1_gate__f_L1;
00163     const double var_L_type_Ca_channel__i_Ca_L = var_L_type_Ca_channel__g_Ca_L * var_L_type_Ca_channel__d_L * ((var_L_type_Ca_channel__f_Ca * var_L_type_Ca_channel__f_L1) + ((1.0 - var_L_type_Ca_channel__f_Ca) * var_L_type_Ca_channel__f_L2)) * (var_L_type_Ca_channel__V - var_L_type_Ca_channel__E_Ca_app);
00164     const double var_membrane__i_Ca_L = var_L_type_Ca_channel__i_Ca_L;
00165     const double var_Ca_independent_transient_outward_K_current__V = var_membrane__V;
00166     const double var_Ca_independent_transient_outward_K_current__g_t = 8.25*mScaleFactorIto;
00167     const double var_Ca_independent_transient_outward_K_current__F = var_membrane__F;
00168     const double var_Ca_independent_transient_outward_K_current__K_c = var_cleft_space_ion_concentrations__K_c;
00169     const double var_Ca_independent_transient_outward_K_current__T = var_membrane__T;
00170     const double var_Ca_independent_transient_outward_K_current__K_i = var_intracellular_ion_concentrations__K_i;
00171     const double var_Ca_independent_transient_outward_K_current__R = var_membrane__R;
00172     const double var_Ca_independent_transient_outward_K_current__E_K = ((var_Ca_independent_transient_outward_K_current__R * var_Ca_independent_transient_outward_K_current__T) / var_Ca_independent_transient_outward_K_current__F) * log(var_Ca_independent_transient_outward_K_current__K_c / var_Ca_independent_transient_outward_K_current__K_i);
00173     const double var_Ca_independent_transient_outward_K_current__r = var_Ca_independent_transient_outward_K_current_r_gate__r;
00174     const double var_Ca_independent_transient_outward_K_current__s = var_Ca_independent_transient_outward_K_current_s_gate__s;
00175     const double var_Ca_independent_transient_outward_K_current__i_t = var_Ca_independent_transient_outward_K_current__g_t * var_Ca_independent_transient_outward_K_current__r * var_Ca_independent_transient_outward_K_current__s * (var_Ca_independent_transient_outward_K_current__V - var_Ca_independent_transient_outward_K_current__E_K);
00176     const double var_membrane__i_t = var_Ca_independent_transient_outward_K_current__i_t;
00177     const double var_ultra_rapid_K_current__g_kur = 2.25*mScaleFactorGKur;
00178     const double var_ultra_rapid_K_current__V = var_membrane__V;
00179     const double var_ultra_rapid_K_current__E_K = var_Ca_independent_transient_outward_K_current__E_K;
00180     const double var_ultra_rapid_K_current__a_ur = var_ultra_rapid_K_current_aur_gate__a_ur;
00181     const double var_ultra_rapid_K_current__i_ur = var_ultra_rapid_K_current_iur_gate__i_ur;
00182     const double var_ultra_rapid_K_current__i_Kur = var_ultra_rapid_K_current__g_kur * var_ultra_rapid_K_current__a_ur * var_ultra_rapid_K_current__i_ur * (var_ultra_rapid_K_current__V - var_ultra_rapid_K_current__E_K);
00183     const double var_membrane__i_Kur = var_ultra_rapid_K_current__i_Kur;
00184     const double var_inward_rectifier__T = var_membrane__T;
00185     const double var_inward_rectifier__V = var_membrane__V;
00186     const double var_inward_rectifier__g_K1 = 3.1*mScaleFactorGK1;
00187     const double var_inward_rectifier__R = var_membrane__R;
00188     const double var_inward_rectifier__K_c = var_cleft_space_ion_concentrations__K_c;
00189     const double var_inward_rectifier__F = var_membrane__F;
00190     const double var_inward_rectifier__E_K = var_Ca_independent_transient_outward_K_current__E_K;
00191     const double var_inward_rectifier__i_K1 = (var_inward_rectifier__g_K1 * pow(var_inward_rectifier__K_c / 1.0, 0.4457) * (var_inward_rectifier__V - var_inward_rectifier__E_K)) / (1.0 + exp((1.5 * ((var_inward_rectifier__V - var_inward_rectifier__E_K) + 3.6) * var_inward_rectifier__F) / (var_inward_rectifier__R * var_inward_rectifier__T)));
00192     const double var_membrane__i_K1 = var_inward_rectifier__i_K1;
00193     const double var_delayed_rectifier_K_currents__V = var_membrane__V;
00194     const double var_delayed_rectifier_K_currents_pi_gate__V = var_delayed_rectifier_K_currents__V;
00195     const double var_delayed_rectifier_K_currents_pi_gate__pip = 1.0 / (1.0 + exp((var_delayed_rectifier_K_currents_pi_gate__V + 55.0) / 24.0));
00196     const double var_delayed_rectifier_K_currents__pip = var_delayed_rectifier_K_currents_pi_gate__pip;
00197     const double var_delayed_rectifier_K_currents_pa_gate__AZD = mScaleFactorAZD;
00198     const double var_delayed_rectifier_K_currents__AZD = var_delayed_rectifier_K_currents_pa_gate__AZD;
00199     const double var_delayed_rectifier_K_currents__factorAZD = (1.0 - (1.0 / (1.0 + exp((-(var_delayed_rectifier_K_currents__AZD - 0.6)) / 0.12)))) / 0.9933;
00200     const double var_delayed_rectifier_K_currents__E_K = var_Ca_independent_transient_outward_K_current__E_K;
00201     const double var_delayed_rectifier_K_currents__g_Kr = 0.5*mScaleFactorGkr;
00202     const double var_delayed_rectifier_K_currents__pa = var_delayed_rectifier_K_currents_pa_gate__pa;
00203     const double var_delayed_rectifier_K_currents__i_Kr = var_delayed_rectifier_K_currents__g_Kr * var_delayed_rectifier_K_currents__factorAZD * var_delayed_rectifier_K_currents__pa * var_delayed_rectifier_K_currents__pip * (var_delayed_rectifier_K_currents__V - var_delayed_rectifier_K_currents__E_K);
00204     const double var_membrane__i_Kr = var_delayed_rectifier_K_currents__i_Kr;
00205     const double var_delayed_rectifier_K_currents__n = var_delayed_rectifier_K_currents_n_gate__n;
00206     const double var_delayed_rectifier_K_currents__g_Ks = 1.0*mScaleFactorGks;
00207     const double var_delayed_rectifier_K_currents__i_Ks = var_delayed_rectifier_K_currents__g_Ks * var_delayed_rectifier_K_currents__n * (var_delayed_rectifier_K_currents__V - var_delayed_rectifier_K_currents__E_K);
00208     const double var_membrane__i_Ks = var_delayed_rectifier_K_currents__i_Ks;
00209     const double var_background_currents__E_Na = var_sodium_current__E_Na;
00210     const double var_background_currents__g_B_Na = 0.060599;
00211     const double var_background_currents__V = var_membrane__V;
00212     const double var_background_currents__i_B_Na = var_background_currents__g_B_Na * (var_background_currents__V - var_background_currents__E_Na);
00213     const double var_membrane__i_B_Na = var_background_currents__i_B_Na;
00214     const double var_background_currents__Ca_c = var_cleft_space_ion_concentrations__Ca_c;
00215     const double var_background_currents__R = var_membrane__R;
00216     const double var_background_currents__Ca_i = var_intracellular_ion_concentrations__Ca_i;
00217     const double var_background_currents__F = var_membrane__F;
00218     const double var_background_currents__T = var_membrane__T;
00219     const double var_background_currents__E_Ca = ((var_background_currents__R * var_background_currents__T) / (2.0 * var_background_currents__F)) * log(var_background_currents__Ca_c / var_background_currents__Ca_i);
00220     const double var_background_currents__g_B_Ca = 0.078681;
00221     const double var_background_currents__i_B_Ca = var_background_currents__g_B_Ca * (var_background_currents__V - var_background_currents__E_Ca);
00222     const double var_membrane__i_B_Ca = var_background_currents__i_B_Ca;
00223     const double var_sodium_potassium_pump__K_c = var_cleft_space_ion_concentrations__K_c;
00224     const double var_sodium_potassium_pump__pow_K_NaK_Na_15 = 36.4829;
00225     const double var_sodium_potassium_pump__Na_i = var_intracellular_ion_concentrations__Na_i;
00226     const double var_sodium_potassium_pump__pow_Na_i_15 = pow(var_sodium_potassium_pump__Na_i, 1.5);
00227     const double var_sodium_potassium_pump__V = var_membrane__V;
00228     const double var_sodium_potassium_pump__i_NaK_max = 68.55*mScaleFactorGNaK;
00229     const double var_sodium_potassium_pump__K_NaK_K = 1.0;
00230     const double var_sodium_potassium_pump__i_NaK = (((((var_sodium_potassium_pump__i_NaK_max * var_sodium_potassium_pump__K_c) / (var_sodium_potassium_pump__K_c + var_sodium_potassium_pump__K_NaK_K)) * var_sodium_potassium_pump__pow_Na_i_15) / (var_sodium_potassium_pump__pow_Na_i_15 + var_sodium_potassium_pump__pow_K_NaK_Na_15)) * (var_sodium_potassium_pump__V + 150.0)) / (var_sodium_potassium_pump__V + 200.0);
00231     const double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00232     const double var_sarcolemmal_calcium_pump_current__i_CaP_max = 4.0;
00233     const double var_sarcolemmal_calcium_pump_current__k_CaP = 0.0002;
00234     const double var_sarcolemmal_calcium_pump_current__Ca_i = var_intracellular_ion_concentrations__Ca_i;
00235     const double var_sarcolemmal_calcium_pump_current__i_CaP = (var_sarcolemmal_calcium_pump_current__i_CaP_max * var_sarcolemmal_calcium_pump_current__Ca_i) / (var_sarcolemmal_calcium_pump_current__Ca_i + var_sarcolemmal_calcium_pump_current__k_CaP);
00236     const double var_membrane__i_CaP = var_sarcolemmal_calcium_pump_current__i_CaP;
00237     const double var_Na_Ca_ion_exchanger_current__Ca_c = var_cleft_space_ion_concentrations__Ca_c;
00238     const double var_Na_Ca_ion_exchanger_current__Na_i = var_intracellular_ion_concentrations__Na_i;
00239     const double var_Na_Ca_ion_exchanger_current__gamma_Na = 0.45;
00240     const double var_Na_Ca_ion_exchanger_current__Ca_i = var_intracellular_ion_concentrations__Ca_i;
00241     const double var_Na_Ca_ion_exchanger_current__K_NaCa = 0.0374842*mScaleFactorGNaCa;
00242     const double var_Na_Ca_ion_exchanger_current__F = var_membrane__F;
00243     const double var_Na_Ca_ion_exchanger_current__d_NaCa = 0.0003;
00244     const double var_Na_Ca_ion_exchanger_current__R = var_membrane__R;
00245     const double var_Na_Ca_ion_exchanger_current__Na_c = var_cleft_space_ion_concentrations__Na_c;
00246     const double var_Na_Ca_ion_exchanger_current__V = var_membrane__V;
00247     const double var_Na_Ca_ion_exchanger_current__T = var_membrane__T;
00248     const double var_Na_Ca_ion_exchanger_current__i_NaCa = (var_Na_Ca_ion_exchanger_current__K_NaCa * ((var_Na_Ca_ion_exchanger_current__Na_i * var_Na_Ca_ion_exchanger_current__Na_i * var_Na_Ca_ion_exchanger_current__Na_i * var_Na_Ca_ion_exchanger_current__Ca_c * exp((var_Na_Ca_ion_exchanger_current__F * var_Na_Ca_ion_exchanger_current__V * var_Na_Ca_ion_exchanger_current__gamma_Na) / (var_Na_Ca_ion_exchanger_current__R * var_Na_Ca_ion_exchanger_current__T))) - (var_Na_Ca_ion_exchanger_current__Na_c * var_Na_Ca_ion_exchanger_current__Na_c * var_Na_Ca_ion_exchanger_current__Na_c * var_Na_Ca_ion_exchanger_current__Ca_i * exp(((var_Na_Ca_ion_exchanger_current__gamma_Na - 1.0) * var_Na_Ca_ion_exchanger_current__V * var_Na_Ca_ion_exchanger_current__F) / (var_Na_Ca_ion_exchanger_current__R * var_Na_Ca_ion_exchanger_current__T))))) / (1.0 + (var_Na_Ca_ion_exchanger_current__d_NaCa * ((var_Na_Ca_ion_exchanger_current__Na_c * var_Na_Ca_ion_exchanger_current__Na_c * var_Na_Ca_ion_exchanger_current__Na_c * var_Na_Ca_ion_exchanger_current__Ca_i) + (var_Na_Ca_ion_exchanger_current__Na_i * var_Na_Ca_ion_exchanger_current__Na_i * var_Na_Ca_ion_exchanger_current__Na_i * var_Na_Ca_ion_exchanger_current__Ca_c))));
00249     const double var_membrane__i_NaCa = var_Na_Ca_ion_exchanger_current__i_NaCa;
00250     const double var_ACh_dependent_K_current__Cm = var_membrane__Cm;
00251     const double var_ACh_dependent_K_current__V = var_membrane__V;
00252     const double var_ACh_dependent_K_current__E_K = var_Ca_independent_transient_outward_K_current__E_K;
00253     const double var_ACh_dependent_K_current__ACh = mScaleFactorAch;
00254     const double var_ACh_dependent_K_current__i_KACh = (10000.0 / (1.0 + ((9.13652 * pow(1.0, 0.477811)) / pow(var_ACh_dependent_K_current__ACh, 0.477811)))) * (0.0517 + (0.4516 / (1.0 + exp((var_ACh_dependent_K_current__V + 59.53) / 17.18)))) * (var_ACh_dependent_K_current__V - var_ACh_dependent_K_current__E_K) * var_ACh_dependent_K_current__Cm;
00255     const double var_membrane__i_KACh = var_ACh_dependent_K_current__i_KACh;
00256 
00257 
00258 
00259     double i_ion_in_pA  = (var_membrane__i_Na+var_membrane__i_Ca_L+var_membrane__i_t+var_membrane__i_Kur+var_membrane__i_K1+var_membrane__i_Kr+var_membrane__i_Ks+var_membrane__i_B_Na+var_membrane__i_B_Ca+var_membrane__i_NaK+var_membrane__i_CaP+var_membrane__i_NaCa+var_membrane__i_KACh);
00260 
00261     /***
00262      * Convert to microA/cm2.
00263      *
00264      * Cm needs to be converted from nF to  microF (to cancel with mono/bidomain Cm) --> 10^-3 at the denominator
00265      * Currents are in pA and needs to be converted to microA --> 10^-6 at the numerator.
00266      * So we divide by (Cm*1000)
00267      */
00268     double i_ion_in_microAmp_per_cm_square = i_ion_in_pA/(var_membrane__Cm*1000);
00269     return i_ion_in_microAmp_per_cm_square;
00270 }
00271 
00272 void Maleckar2009OdeSystem::EvaluateYDerivatives(
00273         double var_environment__time,
00274         const std::vector<double> &rY,
00275         std::vector<double> &rDY)
00276 {
00277     // Inputs:
00278     // Time units: second
00279     var_environment__time *= 0.001;
00280     double var_membrane__V = rY[0];
00281     // Units: millivolt; Initial value: -73.941851
00282     double var_sodium_current_m_gate__m = rY[1];
00283     // Units: dimensionless; Initial value: 0.003325
00284     double var_sodium_current_h1_gate__h1 = rY[2];
00285     // Units: dimensionless; Initial value: 0.875262
00286     double var_sodium_current_h2_gate__h2 = rY[3];
00287     // Units: dimensionless; Initial value: 0.870692
00288     double var_L_type_Ca_channel_d_L_gate__d_L = rY[4];
00289     // Units: dimensionless; Initial value: 0.000014
00290     double var_L_type_Ca_channel_f_L1_gate__f_L1 = rY[5];
00291     // Units: dimensionless; Initial value: 0.998578
00292     double var_L_type_Ca_channel_f_L2_gate__f_L2 = rY[6];
00293     // Units: dimensionless; Initial value: 0.998561
00294     double var_Ca_independent_transient_outward_K_current_r_gate__r = rY[7];
00295     // Units: dimensionless; Initial value: 0.001098
00296     double var_Ca_independent_transient_outward_K_current_s_gate__s = rY[8];
00297     // Units: dimensionless; Initial value: 0.948202
00298     double var_ultra_rapid_K_current_aur_gate__a_ur = rY[9];
00299     // Units: dimensionless; Initial value: 0.000371
00300     double var_ultra_rapid_K_current_iur_gate__i_ur = rY[10];
00301     // Units: dimensionless; Initial value: 0.966869
00302     double var_delayed_rectifier_K_currents_n_gate__n = rY[11];
00303     // Units: dimensionless; Initial value: 0.004661
00304     double var_delayed_rectifier_K_currents_pa_gate__pa = rY[12];
00305     // Units: dimensionless; Initial value: 0.000054
00306     double var_intracellular_ion_concentrations__Na_i = rY[13];
00307     // Units: millimolar; Initial value: 8.488527
00308     double var_intracellular_ion_concentrations__Ca_i = rY[14];
00309     // Units: millimolar; Initial value: 6.5e-5
00310     double var_intracellular_ion_concentrations__K_i = rY[15];
00311     // Units: millimolar; Initial value: 129.502075
00312     double var_intracellular_ion_concentrations__Ca_d = rY[16];
00313     // Units: millimolar; Initial value: 7.1e-5
00314     double var_intracellular_Ca_buffering__O_C = rY[17];
00315     // Units: dimensionless; Initial value: 0.026604
00316     double var_intracellular_Ca_buffering__O_TC = rY[18];
00317     // Units: dimensionless; Initial value: 0.012843
00318     double var_intracellular_Ca_buffering__O_TMgC = rY[19];
00319     // Units: dimensionless; Initial value: 0.190077
00320     double var_intracellular_Ca_buffering__O_TMgMg = rY[20];
00321     // Units: dimensionless; Initial value: 0.714719
00322     double var_cleft_space_ion_concentrations__Na_c = rY[22];
00323     // Units: millimolar; Initial value: 130.019282
00324     double var_cleft_space_ion_concentrations__Ca_c = rY[23];
00325     // Units: millimolar; Initial value: 1.814418
00326     double var_cleft_space_ion_concentrations__K_c = rY[24];
00327     // Units: millimolar; Initial value: 5.588239
00328     double var_Ca_handling_by_the_SR__Ca_rel = rY[25];
00329     // Units: millimolar; Initial value: 0.630471
00330     double var_Ca_handling_by_the_SR__Ca_up = rY[26];
00331     // Units: millimolar; Initial value: 0.646226
00332     double var_Ca_handling_by_the_SR__O_Calse = rY[27];
00333     // Units: dimensionless; Initial value: 0.43071
00334     double var_Ca_handling_by_the_SR__F1 = rY[28];
00335     // Units: dimensionless; Initial value: 0.45453
00336     double var_Ca_handling_by_the_SR__F2 = rY[29];
00337     // Units: dimensionless; Initial value: 0.002665
00338 
00339     VerifyStateVariables();
00340 
00341     // Mathematics
00342     const double var_membrane__R = 8314.0;
00343     const double var_membrane__T = 306.15;
00344     const double var_membrane__F = 96487.0;
00345     const double var_membrane__Cm = 0.05;
00346     const double var_sodium_current__F = var_membrane__F;
00347     const double var_sodium_current__R = var_membrane__R;
00348     const double var_sodium_current__T = var_membrane__T;
00349     const double var_sodium_current__Na_c = var_cleft_space_ion_concentrations__Na_c;
00350     const double var_sodium_current__Na_i = var_intracellular_ion_concentrations__Na_i;
00351     const double var_sodium_current__E_Na = ((var_sodium_current__R * var_sodium_current__T) / var_sodium_current__F) * log(var_sodium_current__Na_c / var_sodium_current__Na_i);
00352     const double var_sodium_current__m = var_sodium_current_m_gate__m;
00353     const double var_sodium_current__h2 = var_sodium_current_h2_gate__h2;
00354     const double var_sodium_current__h1 = var_sodium_current_h1_gate__h1;
00355     const double var_sodium_current__V = var_membrane__V;
00356     const double var_sodium_current__P_Na = 0.0018;
00357     const double var_sodium_current__i_Na = mScaleFactorGna*(((var_sodium_current__P_Na * var_sodium_current__m * var_sodium_current__m * var_sodium_current__m * ((0.9 * var_sodium_current__h1) + (0.1 * var_sodium_current__h2)) * var_sodium_current__Na_c * var_sodium_current__V * var_sodium_current__F * var_sodium_current__F) / (var_sodium_current__R * var_sodium_current__T)) * (exp(((var_sodium_current__V - var_sodium_current__E_Na) * var_sodium_current__F) / (var_sodium_current__R * var_sodium_current__T)) - 1.0)) / (exp((var_sodium_current__V * var_sodium_current__F) / (var_sodium_current__R * var_sodium_current__T)) - 1.0);
00358     const double var_membrane__i_Na = var_sodium_current__i_Na;
00359     const double var_L_type_Ca_channel__k_Ca = 0.025;
00360     const double var_L_type_Ca_channel__Ca_d = var_intracellular_ion_concentrations__Ca_d;
00361     const double var_L_type_Ca_channel__f_Ca = var_L_type_Ca_channel__Ca_d / (var_L_type_Ca_channel__Ca_d + var_L_type_Ca_channel__k_Ca);
00362     const double var_L_type_Ca_channel__E_Ca_app = 60.0;
00363     const double var_L_type_Ca_channel__g_Ca_L = 6.75*mScaleFactorGCaL;
00364     const double var_L_type_Ca_channel__d_L = var_L_type_Ca_channel_d_L_gate__d_L;
00365     const double var_L_type_Ca_channel__f_L2 = var_L_type_Ca_channel_f_L2_gate__f_L2;
00366     const double var_L_type_Ca_channel__V = var_membrane__V;
00367     const double var_L_type_Ca_channel__f_L1 = var_L_type_Ca_channel_f_L1_gate__f_L1;
00368     const double var_L_type_Ca_channel__i_Ca_L = var_L_type_Ca_channel__g_Ca_L * var_L_type_Ca_channel__d_L * ((var_L_type_Ca_channel__f_Ca * var_L_type_Ca_channel__f_L1) + ((1.0 - var_L_type_Ca_channel__f_Ca) * var_L_type_Ca_channel__f_L2)) * (var_L_type_Ca_channel__V - var_L_type_Ca_channel__E_Ca_app);
00369     const double var_membrane__i_Ca_L = var_L_type_Ca_channel__i_Ca_L;
00370     const double var_Ca_independent_transient_outward_K_current__V = var_membrane__V;
00371     const double var_Ca_independent_transient_outward_K_current__g_t = 8.25*mScaleFactorIto;
00372     const double var_Ca_independent_transient_outward_K_current__F = var_membrane__F;
00373     const double var_Ca_independent_transient_outward_K_current__K_c = var_cleft_space_ion_concentrations__K_c;
00374     const double var_Ca_independent_transient_outward_K_current__T = var_membrane__T;
00375     const double var_Ca_independent_transient_outward_K_current__K_i = var_intracellular_ion_concentrations__K_i;
00376     const double var_Ca_independent_transient_outward_K_current__R = var_membrane__R;
00377     const double var_Ca_independent_transient_outward_K_current__E_K = ((var_Ca_independent_transient_outward_K_current__R * var_Ca_independent_transient_outward_K_current__T) / var_Ca_independent_transient_outward_K_current__F) * log(var_Ca_independent_transient_outward_K_current__K_c / var_Ca_independent_transient_outward_K_current__K_i);
00378     const double var_Ca_independent_transient_outward_K_current__r = var_Ca_independent_transient_outward_K_current_r_gate__r;
00379     const double var_Ca_independent_transient_outward_K_current__s = var_Ca_independent_transient_outward_K_current_s_gate__s;
00380     const double var_Ca_independent_transient_outward_K_current__i_t = var_Ca_independent_transient_outward_K_current__g_t * var_Ca_independent_transient_outward_K_current__r * var_Ca_independent_transient_outward_K_current__s * (var_Ca_independent_transient_outward_K_current__V - var_Ca_independent_transient_outward_K_current__E_K);
00381     const double var_membrane__i_t = var_Ca_independent_transient_outward_K_current__i_t;
00382     const double var_ultra_rapid_K_current__g_kur = 2.25*mScaleFactorGKur;
00383     const double var_ultra_rapid_K_current__V = var_membrane__V;
00384     const double var_ultra_rapid_K_current__E_K = var_Ca_independent_transient_outward_K_current__E_K;
00385     const double var_ultra_rapid_K_current__a_ur = var_ultra_rapid_K_current_aur_gate__a_ur;
00386     const double var_ultra_rapid_K_current__i_ur = var_ultra_rapid_K_current_iur_gate__i_ur;
00387     const double var_ultra_rapid_K_current__i_Kur = var_ultra_rapid_K_current__g_kur * var_ultra_rapid_K_current__a_ur * var_ultra_rapid_K_current__i_ur * (var_ultra_rapid_K_current__V - var_ultra_rapid_K_current__E_K);
00388     const double var_membrane__i_Kur = var_ultra_rapid_K_current__i_Kur;
00389     const double var_inward_rectifier__T = var_membrane__T;
00390     const double var_inward_rectifier__V = var_membrane__V;
00391     const double var_inward_rectifier__g_K1 = 3.1*mScaleFactorGK1;
00392     const double var_inward_rectifier__R = var_membrane__R;
00393     const double var_inward_rectifier__K_c = var_cleft_space_ion_concentrations__K_c;
00394     const double var_inward_rectifier__F = var_membrane__F;
00395     const double var_inward_rectifier__E_K = var_Ca_independent_transient_outward_K_current__E_K;
00396     const double var_inward_rectifier__i_K1 = (var_inward_rectifier__g_K1 * pow(var_inward_rectifier__K_c / 1.0, 0.4457) * (var_inward_rectifier__V - var_inward_rectifier__E_K)) / (1.0 + exp((1.5 * ((var_inward_rectifier__V - var_inward_rectifier__E_K) + 3.6) * var_inward_rectifier__F) / (var_inward_rectifier__R * var_inward_rectifier__T)));
00397     const double var_membrane__i_K1 = var_inward_rectifier__i_K1;
00398     const double var_delayed_rectifier_K_currents__V = var_membrane__V;
00399     const double var_delayed_rectifier_K_currents_pi_gate__V = var_delayed_rectifier_K_currents__V;
00400     const double var_delayed_rectifier_K_currents_pi_gate__pip = 1.0 / (1.0 + exp((var_delayed_rectifier_K_currents_pi_gate__V + 55.0) / 24.0));
00401     const double var_delayed_rectifier_K_currents__pip = var_delayed_rectifier_K_currents_pi_gate__pip;
00402     const double var_delayed_rectifier_K_currents_pa_gate__AZD = mScaleFactorAZD;
00403     const double var_delayed_rectifier_K_currents__AZD = var_delayed_rectifier_K_currents_pa_gate__AZD;
00404     const double var_delayed_rectifier_K_currents__factorAZD = (1.0 - (1.0 / (1.0 + exp((-(var_delayed_rectifier_K_currents__AZD - 0.6)) / 0.12)))) / 0.9933;
00405     const double var_delayed_rectifier_K_currents__E_K = var_Ca_independent_transient_outward_K_current__E_K;
00406     const double var_delayed_rectifier_K_currents__g_Kr = 0.5*mScaleFactorGkr;
00407     const double var_delayed_rectifier_K_currents__pa = var_delayed_rectifier_K_currents_pa_gate__pa;
00408     const double var_delayed_rectifier_K_currents__i_Kr = var_delayed_rectifier_K_currents__g_Kr * var_delayed_rectifier_K_currents__factorAZD * var_delayed_rectifier_K_currents__pa * var_delayed_rectifier_K_currents__pip * (var_delayed_rectifier_K_currents__V - var_delayed_rectifier_K_currents__E_K);
00409     const double var_membrane__i_Kr = var_delayed_rectifier_K_currents__i_Kr;
00410     const double var_delayed_rectifier_K_currents__n = var_delayed_rectifier_K_currents_n_gate__n;
00411     const double var_delayed_rectifier_K_currents__g_Ks = 1.0*mScaleFactorGks;
00412     const double var_delayed_rectifier_K_currents__i_Ks = var_delayed_rectifier_K_currents__g_Ks * var_delayed_rectifier_K_currents__n * (var_delayed_rectifier_K_currents__V - var_delayed_rectifier_K_currents__E_K);
00413     const double var_membrane__i_Ks = var_delayed_rectifier_K_currents__i_Ks;
00414     const double var_background_currents__E_Na = var_sodium_current__E_Na;
00415     const double var_background_currents__g_B_Na = 0.060599;
00416     const double var_background_currents__V = var_membrane__V;
00417     const double var_background_currents__i_B_Na = var_background_currents__g_B_Na * (var_background_currents__V - var_background_currents__E_Na);
00418     const double var_membrane__i_B_Na = var_background_currents__i_B_Na;
00419     const double var_background_currents__Ca_c = var_cleft_space_ion_concentrations__Ca_c;
00420     const double var_background_currents__R = var_membrane__R;
00421     const double var_background_currents__Ca_i = var_intracellular_ion_concentrations__Ca_i;
00422     const double var_background_currents__F = var_membrane__F;
00423     const double var_background_currents__T = var_membrane__T;
00424     const double var_background_currents__E_Ca = ((var_background_currents__R * var_background_currents__T) / (2.0 * var_background_currents__F)) * log(var_background_currents__Ca_c / var_background_currents__Ca_i);
00425     const double var_background_currents__g_B_Ca = 0.078681;
00426     const double var_background_currents__i_B_Ca = var_background_currents__g_B_Ca * (var_background_currents__V - var_background_currents__E_Ca);
00427     const double var_membrane__i_B_Ca = var_background_currents__i_B_Ca;
00428     const double var_sodium_potassium_pump__K_c = var_cleft_space_ion_concentrations__K_c;
00429     const double var_sodium_potassium_pump__pow_K_NaK_Na_15 = 36.4829;
00430     const double var_sodium_potassium_pump__Na_i = var_intracellular_ion_concentrations__Na_i;
00431     const double var_sodium_potassium_pump__pow_Na_i_15 = pow(var_sodium_potassium_pump__Na_i, 1.5);
00432     const double var_sodium_potassium_pump__V = var_membrane__V;
00433     const double var_sodium_potassium_pump__i_NaK_max = 68.55*mScaleFactorGNaK;
00434     const double var_sodium_potassium_pump__K_NaK_K = 1.0;
00435     const double var_sodium_potassium_pump__i_NaK = (((((var_sodium_potassium_pump__i_NaK_max * var_sodium_potassium_pump__K_c) / (var_sodium_potassium_pump__K_c + var_sodium_potassium_pump__K_NaK_K)) * var_sodium_potassium_pump__pow_Na_i_15) / (var_sodium_potassium_pump__pow_Na_i_15 + var_sodium_potassium_pump__pow_K_NaK_Na_15)) * (var_sodium_potassium_pump__V + 150.0)) / (var_sodium_potassium_pump__V + 200.0);
00436     const double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00437     const double var_sarcolemmal_calcium_pump_current__i_CaP_max = 4.0;
00438     const double var_sarcolemmal_calcium_pump_current__k_CaP = 0.0002;
00439     const double var_sarcolemmal_calcium_pump_current__Ca_i = var_intracellular_ion_concentrations__Ca_i;
00440     const double var_sarcolemmal_calcium_pump_current__i_CaP = (var_sarcolemmal_calcium_pump_current__i_CaP_max * var_sarcolemmal_calcium_pump_current__Ca_i) / (var_sarcolemmal_calcium_pump_current__Ca_i + var_sarcolemmal_calcium_pump_current__k_CaP);
00441     const double var_membrane__i_CaP = var_sarcolemmal_calcium_pump_current__i_CaP;
00442     const double var_Na_Ca_ion_exchanger_current__Ca_c = var_cleft_space_ion_concentrations__Ca_c;
00443     const double var_Na_Ca_ion_exchanger_current__Na_i = var_intracellular_ion_concentrations__Na_i;
00444     const double var_Na_Ca_ion_exchanger_current__gamma_Na = 0.45;
00445     const double var_Na_Ca_ion_exchanger_current__Ca_i = var_intracellular_ion_concentrations__Ca_i;
00446     const double var_Na_Ca_ion_exchanger_current__K_NaCa = 0.0374842*mScaleFactorGNaCa;
00447     const double var_Na_Ca_ion_exchanger_current__F = var_membrane__F;
00448     const double var_Na_Ca_ion_exchanger_current__d_NaCa = 0.0003;
00449     const double var_Na_Ca_ion_exchanger_current__R = var_membrane__R;
00450     const double var_Na_Ca_ion_exchanger_current__Na_c = var_cleft_space_ion_concentrations__Na_c;
00451     const double var_Na_Ca_ion_exchanger_current__V = var_membrane__V;
00452     const double var_Na_Ca_ion_exchanger_current__T = var_membrane__T;
00453     const double var_Na_Ca_ion_exchanger_current__i_NaCa = (var_Na_Ca_ion_exchanger_current__K_NaCa * ((var_Na_Ca_ion_exchanger_current__Na_i * var_Na_Ca_ion_exchanger_current__Na_i * var_Na_Ca_ion_exchanger_current__Na_i * var_Na_Ca_ion_exchanger_current__Ca_c * exp((var_Na_Ca_ion_exchanger_current__F * var_Na_Ca_ion_exchanger_current__V * var_Na_Ca_ion_exchanger_current__gamma_Na) / (var_Na_Ca_ion_exchanger_current__R * var_Na_Ca_ion_exchanger_current__T))) - (var_Na_Ca_ion_exchanger_current__Na_c * var_Na_Ca_ion_exchanger_current__Na_c * var_Na_Ca_ion_exchanger_current__Na_c * var_Na_Ca_ion_exchanger_current__Ca_i * exp(((var_Na_Ca_ion_exchanger_current__gamma_Na - 1.0) * var_Na_Ca_ion_exchanger_current__V * var_Na_Ca_ion_exchanger_current__F) / (var_Na_Ca_ion_exchanger_current__R * var_Na_Ca_ion_exchanger_current__T))))) / (1.0 + (var_Na_Ca_ion_exchanger_current__d_NaCa * ((var_Na_Ca_ion_exchanger_current__Na_c * var_Na_Ca_ion_exchanger_current__Na_c * var_Na_Ca_ion_exchanger_current__Na_c * var_Na_Ca_ion_exchanger_current__Ca_i) + (var_Na_Ca_ion_exchanger_current__Na_i * var_Na_Ca_ion_exchanger_current__Na_i * var_Na_Ca_ion_exchanger_current__Na_i * var_Na_Ca_ion_exchanger_current__Ca_c))));
00454     const double var_membrane__i_NaCa = var_Na_Ca_ion_exchanger_current__i_NaCa;
00455     const double var_ACh_dependent_K_current__Cm = var_membrane__Cm;
00456     const double var_ACh_dependent_K_current__V = var_membrane__V;
00457     const double var_ACh_dependent_K_current__E_K = var_Ca_independent_transient_outward_K_current__E_K;
00458     const double var_ACh_dependent_K_current__ACh = mScaleFactorAch;
00459     const double var_ACh_dependent_K_current__i_KACh = (10000.0 / (1.0 + ((9.13652 * pow(1.0, 0.477811)) / pow(var_ACh_dependent_K_current__ACh, 0.477811)))) * (0.0517 + (0.4516 / (1.0 + exp((var_ACh_dependent_K_current__V + 59.53) / 17.18)))) * (var_ACh_dependent_K_current__V - var_ACh_dependent_K_current__E_K) * var_ACh_dependent_K_current__Cm;
00460     const double var_membrane__i_KACh = var_ACh_dependent_K_current__i_KACh;
00461     double var_membrane__i_Stim = GetStimulus((1.0/0.001)*var_environment__time);
00462     const double var_membrane__I = var_membrane__i_Na + var_membrane__i_Ca_L + var_membrane__i_t + var_membrane__i_Kur + var_membrane__i_K1 + var_membrane__i_Kr + var_membrane__i_Ks + var_membrane__i_B_Na + var_membrane__i_B_Ca + var_membrane__i_NaK + var_membrane__i_CaP + var_membrane__i_NaCa + var_membrane__i_KACh + var_membrane__i_Stim;
00463     const double var_sodium_current_m_gate__V = var_sodium_current__V;
00464     const double var_sodium_current_m_gate__m_infinity = 1.0 / (1.0 + exp((var_sodium_current_m_gate__V + 27.12) / (-8.21)));
00465     const double var_sodium_current_m_gate__m_factor = (var_sodium_current_m_gate__V + 25.57) / 28.8;
00466     const double var_sodium_current_m_gate__tau_m = (4.2e-05 * exp((-var_sodium_current_m_gate__m_factor) * var_sodium_current_m_gate__m_factor)) + 2.4e-05;
00467     const double var_sodium_current_h1_gate__V = var_sodium_current__V;
00468     const double var_sodium_current_h1_gate__h_infinity = 1.0 / (1.0 + exp((var_sodium_current_h1_gate__V + 63.6) / 5.3));
00469     const double var_sodium_current_h1_gate__h_factor = 1.0 / (1.0 + exp((var_sodium_current_h1_gate__V + 35.1) / 3.2));
00470     const double var_sodium_current_h1_gate__tau_h1 = (0.03 * var_sodium_current_h1_gate__h_factor) + 0.0003;
00471     const double var_sodium_current_h2_gate__h_infinity = var_sodium_current_h1_gate__h_infinity;
00472     const double var_sodium_current_h2_gate__h_factor = var_sodium_current_h1_gate__h_factor;
00473     const double var_sodium_current_h2_gate__tau_h2 = (0.12 * var_sodium_current_h2_gate__h_factor) + 0.003;
00474     const double var_L_type_Ca_channel_d_L_gate__V = var_L_type_Ca_channel__V;
00475     const double var_L_type_Ca_channel_d_L_gate__d_L_infinity = 1.0 / (1.0 + exp((var_L_type_Ca_channel_d_L_gate__V + 9.0) / (-5.8)));
00476     const double var_L_type_Ca_channel_d_L_gate__d_L_factor = (var_L_type_Ca_channel_d_L_gate__V + 35.0) / 30.0;
00477     const double var_L_type_Ca_channel_d_L_gate__tau_d_L = (0.0027 * exp((-var_L_type_Ca_channel_d_L_gate__d_L_factor) * var_L_type_Ca_channel_d_L_gate__d_L_factor)) + 0.002;
00478     const double var_L_type_Ca_channel_f_L1_gate__V = var_L_type_Ca_channel__V;
00479     const double var_L_type_Ca_channel_f_L1_gate__f_L_infinity = 1.0 / (1.0 + exp((var_L_type_Ca_channel_f_L1_gate__V + 27.4) / 7.1));
00480     const double var_L_type_Ca_channel_f_L1_gate__f_L_factor = var_L_type_Ca_channel_f_L1_gate__V + 40.0;
00481     const double var_L_type_Ca_channel_f_L1_gate__tau_f_L1 = (0.161 * exp((((-var_L_type_Ca_channel_f_L1_gate__f_L_factor) * var_L_type_Ca_channel_f_L1_gate__f_L_factor) / 14.4) / 14.4)) + 0.01;
00482     const double var_L_type_Ca_channel_f_L2_gate__f_L_factor = var_L_type_Ca_channel_f_L1_gate__f_L_factor;
00483     const double var_L_type_Ca_channel_f_L2_gate__tau_f_L2 = (1.3323 * exp((((-var_L_type_Ca_channel_f_L2_gate__f_L_factor) * var_L_type_Ca_channel_f_L2_gate__f_L_factor) / 14.2) / 14.2)) + 0.0626;
00484     const double var_L_type_Ca_channel_f_L2_gate__f_L_infinity = var_L_type_Ca_channel_f_L1_gate__f_L_infinity;
00485     const double var_Ca_independent_transient_outward_K_current_r_gate__V = var_Ca_independent_transient_outward_K_current__V;
00486     const double var_Ca_independent_transient_outward_K_current_r_gate__tau_r = (0.0035 * exp((((-var_Ca_independent_transient_outward_K_current_r_gate__V) * var_Ca_independent_transient_outward_K_current_r_gate__V) / 30.0) / 30.0)) + 0.0015;
00487     const double var_Ca_independent_transient_outward_K_current_r_gate__r_infinity = 1.0 / (1.0 + exp((var_Ca_independent_transient_outward_K_current_r_gate__V - 1.0) / (-11.0)));
00488     const double var_Ca_independent_transient_outward_K_current_s_gate__V = var_Ca_independent_transient_outward_K_current__V;
00489     const double var_Ca_independent_transient_outward_K_current_s_gate__s_factor = (var_Ca_independent_transient_outward_K_current_s_gate__V + 52.45) / 15.8827;
00490     const double var_Ca_independent_transient_outward_K_current_s_gate__tau_s = (0.025635 * exp((-var_Ca_independent_transient_outward_K_current_s_gate__s_factor) * var_Ca_independent_transient_outward_K_current_s_gate__s_factor)) + 0.01414;
00491     const double var_Ca_independent_transient_outward_K_current_s_gate__s_infinity = 1.0 / (1.0 + exp((var_Ca_independent_transient_outward_K_current_s_gate__V + 40.5) / 11.5));
00492     const double var_ultra_rapid_K_current_aur_gate__V = var_ultra_rapid_K_current__V;
00493     const double var_ultra_rapid_K_current_aur_gate__a_ur_infinity = 1.0 / (1.0 + exp((-(var_ultra_rapid_K_current_aur_gate__V + 6.0)) / 8.6));
00494     const double var_ultra_rapid_K_current_aur_gate__tau_a_ur = (0.009 / (1.0 + exp((var_ultra_rapid_K_current_aur_gate__V + 5.0) / 12.0))) + 0.0005;
00495     const double var_ultra_rapid_K_current_iur_gate__V = var_ultra_rapid_K_current__V;
00496     const double var_ultra_rapid_K_current_iur_gate__i_ur_infinity = 1.0 / (1.0 + exp((var_ultra_rapid_K_current_iur_gate__V + 7.5) / 10.0));
00497     const double var_ultra_rapid_K_current_iur_gate__tau_i_ur = (0.59 / (1.0 + exp((var_ultra_rapid_K_current_iur_gate__V + 60.0) / 10.0))) + 3.05;
00498     const double var_delayed_rectifier_K_currents_n_gate__V = var_delayed_rectifier_K_currents__V;
00499     const double var_delayed_rectifier_K_currents_n_gate__n_factor = (var_delayed_rectifier_K_currents_n_gate__V - 20.0) / 20.0;
00500     const double var_delayed_rectifier_K_currents_n_gate__tau_n = 0.7 + (0.4 * exp((-var_delayed_rectifier_K_currents_n_gate__n_factor) * var_delayed_rectifier_K_currents_n_gate__n_factor));
00501     const double var_delayed_rectifier_K_currents_n_gate__n_infinity = 1.0 / (1.0 + exp((var_delayed_rectifier_K_currents_n_gate__V - 19.9) / (-12.7)));
00502     const double var_delayed_rectifier_K_currents_pa_gate__V = var_delayed_rectifier_K_currents__V;
00503     const double var_delayed_rectifier_K_currents_pa_gate__pa_factor = (var_delayed_rectifier_K_currents_pa_gate__V + 20.1376) / 22.1996;
00504     const double var_delayed_rectifier_K_currents_pa_gate__tau_pa = 0.03118 + (0.21718 * exp((-var_delayed_rectifier_K_currents_pa_gate__pa_factor) * var_delayed_rectifier_K_currents_pa_gate__pa_factor));
00505     const double var_delayed_rectifier_K_currents_pa_gate__p_a_infinity = 1.0 / (1.0 + exp((var_delayed_rectifier_K_currents_pa_gate__V + 15.0 + (10.0 * var_delayed_rectifier_K_currents_pa_gate__AZD)) / (-6.0)));
00506     const double var_intracellular_ion_concentrations__phi_Na_en = 0.0;
00507     const double var_intracellular_ion_concentrations__Vol_i = 0.005884;
00508     const double var_intracellular_ion_concentrations__Vol_d = 0.00011768;
00509     const double var_intracellular_ion_concentrations__tau_di = 0.01;
00510     const double var_intracellular_ion_concentrations__F = var_membrane__F;
00511     const double var_intracellular_ion_concentrations__i_di = ((var_intracellular_ion_concentrations__Ca_d - var_intracellular_ion_concentrations__Ca_i) * 2.0 * var_intracellular_ion_concentrations__Vol_d * var_intracellular_ion_concentrations__F) / var_intracellular_ion_concentrations__tau_di;
00512     const double var_intracellular_ion_concentrations__i_Na = var_sodium_current__i_Na;
00513     const double var_intracellular_ion_concentrations__i_Ca_L = var_L_type_Ca_channel__i_Ca_L;
00514     const double var_intracellular_ion_concentrations__i_t = var_Ca_independent_transient_outward_K_current__i_t;
00515     const double var_intracellular_ion_concentrations__i_Kur = var_ultra_rapid_K_current__i_Kur;
00516     const double var_intracellular_ion_concentrations__i_K1 = var_inward_rectifier__i_K1;
00517     const double var_intracellular_ion_concentrations__i_Kr = var_delayed_rectifier_K_currents__i_Kr;
00518     const double var_intracellular_ion_concentrations__i_Ks = var_delayed_rectifier_K_currents__i_Ks;
00519     const double var_intracellular_ion_concentrations__i_B_Na = var_background_currents__i_B_Na;
00520     const double var_intracellular_ion_concentrations__i_B_Ca = var_background_currents__i_B_Ca;
00521     const double var_intracellular_ion_concentrations__i_NaK = var_sodium_potassium_pump__i_NaK;
00522     const double var_intracellular_ion_concentrations__i_CaP = var_sarcolemmal_calcium_pump_current__i_CaP;
00523     const double var_intracellular_ion_concentrations__i_NaCa = var_Na_Ca_ion_exchanger_current__i_NaCa;
00524     const double var_intracellular_ion_concentrations__i_KACh = var_ACh_dependent_K_current__i_KACh;
00525     const double var_Ca_handling_by_the_SR__k_cyca = 0.0003;
00526     const double var_Ca_handling_by_the_SR__k_xcs = 0.4;
00527     const double var_Ca_handling_by_the_SR__k_srca = 0.5;
00528     const double var_Ca_handling_by_the_SR__Ca_i = var_intracellular_ion_concentrations__Ca_i;
00529     const double var_Ca_handling_by_the_SR__I_up_max = 2800.0;
00530     const double var_Ca_handling_by_the_SR__i_up = (var_Ca_handling_by_the_SR__I_up_max * ((var_Ca_handling_by_the_SR__Ca_i / var_Ca_handling_by_the_SR__k_cyca) - ((var_Ca_handling_by_the_SR__k_xcs * var_Ca_handling_by_the_SR__k_xcs * var_Ca_handling_by_the_SR__Ca_up) / var_Ca_handling_by_the_SR__k_srca))) / (((var_Ca_handling_by_the_SR__Ca_i + var_Ca_handling_by_the_SR__k_cyca) / var_Ca_handling_by_the_SR__k_cyca) + ((var_Ca_handling_by_the_SR__k_xcs * (var_Ca_handling_by_the_SR__Ca_up + var_Ca_handling_by_the_SR__k_srca)) / var_Ca_handling_by_the_SR__k_srca));
00531     const double var_intracellular_ion_concentrations__i_up = var_Ca_handling_by_the_SR__i_up;
00532     const double var_Ca_handling_by_the_SR__alpha_rel = 200000.0;
00533     const double var_Ca_handling_by_the_SR__i_rel_f2 = var_Ca_handling_by_the_SR__F2 / (var_Ca_handling_by_the_SR__F2 + 0.25);
00534     const double var_Ca_handling_by_the_SR__i_rel_factor = var_Ca_handling_by_the_SR__i_rel_f2 * var_Ca_handling_by_the_SR__i_rel_f2;
00535     const double var_Ca_handling_by_the_SR__i_rel = var_Ca_handling_by_the_SR__alpha_rel * var_Ca_handling_by_the_SR__i_rel_factor * (var_Ca_handling_by_the_SR__Ca_rel - var_Ca_handling_by_the_SR__Ca_i);
00536     const double var_intracellular_ion_concentrations__i_rel = var_Ca_handling_by_the_SR__i_rel;
00537     const double var_intracellular_ion_concentrations__i_Stim = var_membrane__i_Stim;
00538     const double var_intracellular_Ca_buffering__Ca_i = var_intracellular_ion_concentrations__Ca_i;
00539     const double var_intracellular_Ca_buffering__J_O_TMgC = (200000.0 * var_intracellular_Ca_buffering__Ca_i * ((1.0 - var_intracellular_Ca_buffering__O_TMgC) - var_intracellular_Ca_buffering__O_TMgMg)) - (6.6 * var_intracellular_Ca_buffering__O_TMgC);
00540     const double var_intracellular_Ca_buffering__J_O_TC = (78400.0 * var_intracellular_Ca_buffering__Ca_i * (1.0 - var_intracellular_Ca_buffering__O_TC)) - (392.0 * var_intracellular_Ca_buffering__O_TC);
00541     const double var_intracellular_Ca_buffering__J_O_C = (200000.0 * var_intracellular_Ca_buffering__Ca_i * (1.0 - var_intracellular_Ca_buffering__O_C)) - (476.0 * var_intracellular_Ca_buffering__O_C);
00542     const double var_intracellular_Ca_buffering__J_O = (0.08 * var_intracellular_Ca_buffering__J_O_TC) + (0.16 * var_intracellular_Ca_buffering__J_O_TMgC) + (0.045 * var_intracellular_Ca_buffering__J_O_C);
00543     const double var_intracellular_ion_concentrations__J_O = var_intracellular_Ca_buffering__J_O;
00544     const double var_intracellular_Ca_buffering__Mg_i = 2.5;
00545     const double var_intracellular_Ca_buffering__J_O_TMgMg = (2000.0 * var_intracellular_Ca_buffering__Mg_i * ((1.0 - var_intracellular_Ca_buffering__O_TMgC) - var_intracellular_Ca_buffering__O_TMgMg)) - (666.0 * var_intracellular_Ca_buffering__O_TMgMg);
00546     const double var_cleft_space_ion_concentrations__Vol_c = 0.000800224;
00547     const double var_cleft_space_ion_concentrations__tau_Na = 14.3;
00548     const double var_cleft_space_ion_concentrations__tau_K = 10.0;
00549     const double var_cleft_space_ion_concentrations__tau_Ca = 24.7;
00550     const double var_cleft_space_ion_concentrations__Na_b = 130.0;
00551     const double var_cleft_space_ion_concentrations__Ca_b = 1.8;
00552     const double var_cleft_space_ion_concentrations__K_b = 5.4;
00553     const double var_cleft_space_ion_concentrations__F = var_membrane__F;
00554     const double var_cleft_space_ion_concentrations__i_Na = var_sodium_current__i_Na;
00555     const double var_cleft_space_ion_concentrations__i_Ca_L = var_L_type_Ca_channel__i_Ca_L;
00556     const double var_cleft_space_ion_concentrations__i_t = var_Ca_independent_transient_outward_K_current__i_t;
00557     const double var_cleft_space_ion_concentrations__i_Kur = var_ultra_rapid_K_current__i_Kur;
00558     const double var_cleft_space_ion_concentrations__i_K1 = var_inward_rectifier__i_K1;
00559     const double var_cleft_space_ion_concentrations__i_Kr = var_delayed_rectifier_K_currents__i_Kr;
00560     const double var_cleft_space_ion_concentrations__i_Ks = var_delayed_rectifier_K_currents__i_Ks;
00561     const double var_cleft_space_ion_concentrations__i_B_Na = var_background_currents__i_B_Na;
00562     const double var_cleft_space_ion_concentrations__i_B_Ca = var_background_currents__i_B_Ca;
00563     const double var_cleft_space_ion_concentrations__i_NaK = var_sodium_potassium_pump__i_NaK;
00564     const double var_cleft_space_ion_concentrations__i_CaP = var_sarcolemmal_calcium_pump_current__i_CaP;
00565     const double var_cleft_space_ion_concentrations__i_NaCa = var_Na_Ca_ion_exchanger_current__i_NaCa;
00566     const double var_cleft_space_ion_concentrations__phi_Na_en = var_intracellular_ion_concentrations__phi_Na_en;
00567     const double var_Ca_handling_by_the_SR__tau_tr = 0.01;
00568     const double var_Ca_handling_by_the_SR__Vol_rel = 4.41e-05;
00569     const double var_Ca_handling_by_the_SR__F = var_membrane__F;
00570     const double var_Ca_handling_by_the_SR__i_tr = ((var_Ca_handling_by_the_SR__Ca_up - var_Ca_handling_by_the_SR__Ca_rel) * 2.0 * var_Ca_handling_by_the_SR__Vol_rel * var_Ca_handling_by_the_SR__F) / var_Ca_handling_by_the_SR__tau_tr;
00571     const double var_Ca_handling_by_the_SR__Vol_up = 0.0003969;
00572     const double var_Ca_handling_by_the_SR__k_rel_i = 0.0003;
00573     const double var_Ca_handling_by_the_SR__r_Ca_i_term = var_Ca_handling_by_the_SR__Ca_i / (var_Ca_handling_by_the_SR__Ca_i + var_Ca_handling_by_the_SR__k_rel_i);
00574     const double var_Ca_handling_by_the_SR__r_Ca_i_factor = var_Ca_handling_by_the_SR__r_Ca_i_term * var_Ca_handling_by_the_SR__r_Ca_i_term * var_Ca_handling_by_the_SR__r_Ca_i_term * var_Ca_handling_by_the_SR__r_Ca_i_term;
00575     const double var_Ca_handling_by_the_SR__Ca_d = var_intracellular_ion_concentrations__Ca_d;
00576     const double var_Ca_handling_by_the_SR__k_rel_d = 0.003;
00577     const double var_Ca_handling_by_the_SR__r_Ca_d_term = var_Ca_handling_by_the_SR__Ca_d / (var_Ca_handling_by_the_SR__Ca_d + var_Ca_handling_by_the_SR__k_rel_d);
00578     const double var_Ca_handling_by_the_SR__r_Ca_d_factor = var_Ca_handling_by_the_SR__r_Ca_d_term * var_Ca_handling_by_the_SR__r_Ca_d_term * var_Ca_handling_by_the_SR__r_Ca_d_term * var_Ca_handling_by_the_SR__r_Ca_d_term;
00579     const double var_Ca_handling_by_the_SR__r_act = 203.8 * (var_Ca_handling_by_the_SR__r_Ca_i_factor + var_Ca_handling_by_the_SR__r_Ca_d_factor);
00580     const double var_Ca_handling_by_the_SR__r_inact = 33.96 + (339.6 * var_Ca_handling_by_the_SR__r_Ca_i_factor);
00581     const double var_Ca_handling_by_the_SR__r_recov = 0.815;
00582     const double var_Ca_handling_by_the_SR__J_O_Calse = (480.0 * var_Ca_handling_by_the_SR__Ca_rel * (1.0 - var_Ca_handling_by_the_SR__O_Calse)) - (400.0 * var_Ca_handling_by_the_SR__O_Calse);
00583 
00584     double d_dt_membrane__V;
00585     if (mSetVoltageDerivativeToZero)
00586     {
00587         d_dt_membrane__V = 0.0;
00588     }
00589     else
00590     {
00591         d_dt_membrane__V = (-var_membrane__I) / var_membrane__Cm;
00592     }
00593 
00594     const double d_dt_sodium_current_m_gate__m = (var_sodium_current_m_gate__m_infinity - var_sodium_current_m_gate__m) / var_sodium_current_m_gate__tau_m;
00595     const double d_dt_sodium_current_h1_gate__h1 = (var_sodium_current_h1_gate__h_infinity - var_sodium_current_h1_gate__h1) / var_sodium_current_h1_gate__tau_h1;
00596     const double d_dt_sodium_current_h2_gate__h2 = (var_sodium_current_h2_gate__h_infinity - var_sodium_current_h2_gate__h2) / var_sodium_current_h2_gate__tau_h2;
00597     const double d_dt_L_type_Ca_channel_d_L_gate__d_L = (var_L_type_Ca_channel_d_L_gate__d_L_infinity - var_L_type_Ca_channel_d_L_gate__d_L) / var_L_type_Ca_channel_d_L_gate__tau_d_L;
00598     const double d_dt_L_type_Ca_channel_f_L1_gate__f_L1 = (var_L_type_Ca_channel_f_L1_gate__f_L_infinity - var_L_type_Ca_channel_f_L1_gate__f_L1) / var_L_type_Ca_channel_f_L1_gate__tau_f_L1;
00599     const double d_dt_L_type_Ca_channel_f_L2_gate__f_L2 = (var_L_type_Ca_channel_f_L2_gate__f_L_infinity - var_L_type_Ca_channel_f_L2_gate__f_L2) / var_L_type_Ca_channel_f_L2_gate__tau_f_L2;
00600     const double d_dt_Ca_independent_transient_outward_K_current_r_gate__r = (var_Ca_independent_transient_outward_K_current_r_gate__r_infinity - var_Ca_independent_transient_outward_K_current_r_gate__r) / var_Ca_independent_transient_outward_K_current_r_gate__tau_r;
00601     const double d_dt_Ca_independent_transient_outward_K_current_s_gate__s = (var_Ca_independent_transient_outward_K_current_s_gate__s_infinity - var_Ca_independent_transient_outward_K_current_s_gate__s) / var_Ca_independent_transient_outward_K_current_s_gate__tau_s;
00602     const double d_dt_ultra_rapid_K_current_aur_gate__a_ur = (var_ultra_rapid_K_current_aur_gate__a_ur_infinity - var_ultra_rapid_K_current_aur_gate__a_ur) / var_ultra_rapid_K_current_aur_gate__tau_a_ur;
00603     const double d_dt_ultra_rapid_K_current_iur_gate__i_ur = (var_ultra_rapid_K_current_iur_gate__i_ur_infinity - var_ultra_rapid_K_current_iur_gate__i_ur) / var_ultra_rapid_K_current_iur_gate__tau_i_ur;
00604     const double d_dt_delayed_rectifier_K_currents_n_gate__n = (var_delayed_rectifier_K_currents_n_gate__n_infinity - var_delayed_rectifier_K_currents_n_gate__n) / var_delayed_rectifier_K_currents_n_gate__tau_n;
00605     const double d_dt_delayed_rectifier_K_currents_pa_gate__pa = (var_delayed_rectifier_K_currents_pa_gate__p_a_infinity - var_delayed_rectifier_K_currents_pa_gate__pa) / var_delayed_rectifier_K_currents_pa_gate__tau_pa;
00606     const double d_dt_intracellular_ion_concentrations__K_i = (-(((var_intracellular_ion_concentrations__i_t + var_intracellular_ion_concentrations__i_Kur + var_intracellular_ion_concentrations__i_K1 + var_intracellular_ion_concentrations__i_Ks + var_intracellular_ion_concentrations__i_Kr + var_intracellular_ion_concentrations__i_KACh) - (2.0 * var_intracellular_ion_concentrations__i_NaK)) + var_intracellular_ion_concentrations__i_Stim)) / (var_intracellular_ion_concentrations__Vol_i * var_intracellular_ion_concentrations__F);
00607     const double d_dt_intracellular_ion_concentrations__Na_i = (-(var_intracellular_ion_concentrations__i_Na + var_intracellular_ion_concentrations__i_B_Na + (3.0 * var_intracellular_ion_concentrations__i_NaCa) + (3.0 * var_intracellular_ion_concentrations__i_NaK) + var_intracellular_ion_concentrations__phi_Na_en)) / (var_intracellular_ion_concentrations__Vol_i * var_intracellular_ion_concentrations__F);
00608     const double d_dt_intracellular_ion_concentrations__Ca_i = ((-((var_intracellular_ion_concentrations__i_B_Ca + var_intracellular_ion_concentrations__i_CaP + var_intracellular_ion_concentrations__i_up) - (var_intracellular_ion_concentrations__i_di + var_intracellular_ion_concentrations__i_rel + (2.0 * var_intracellular_ion_concentrations__i_NaCa)))) / (2.0 * var_intracellular_ion_concentrations__Vol_i * var_intracellular_ion_concentrations__F)) - (1.0 * var_intracellular_ion_concentrations__J_O);
00609     const double d_dt_intracellular_ion_concentrations__Ca_d = (-(var_intracellular_ion_concentrations__i_Ca_L + var_intracellular_ion_concentrations__i_di)) / (2.0 * var_intracellular_ion_concentrations__Vol_d * var_intracellular_ion_concentrations__F);
00610     const double d_dt_intracellular_Ca_buffering__O_C = var_intracellular_Ca_buffering__J_O_C;
00611     const double d_dt_intracellular_Ca_buffering__O_TC = var_intracellular_Ca_buffering__J_O_TC;
00612     const double d_dt_intracellular_Ca_buffering__O_TMgC = var_intracellular_Ca_buffering__J_O_TMgC;
00613     const double d_dt_intracellular_Ca_buffering__O_TMgMg = var_intracellular_Ca_buffering__J_O_TMgMg;
00614     const double d_dt_intracellular_Ca_buffering__O = var_intracellular_Ca_buffering__J_O;
00615     const double d_dt_cleft_space_ion_concentrations__Ca_c = ((var_cleft_space_ion_concentrations__Ca_b - var_cleft_space_ion_concentrations__Ca_c) / var_cleft_space_ion_concentrations__tau_Ca) + (((var_cleft_space_ion_concentrations__i_Ca_L + var_cleft_space_ion_concentrations__i_B_Ca + var_cleft_space_ion_concentrations__i_CaP) - (2.0 * var_cleft_space_ion_concentrations__i_NaCa)) / (2.0 * var_cleft_space_ion_concentrations__Vol_c * var_cleft_space_ion_concentrations__F));
00616     const double d_dt_cleft_space_ion_concentrations__K_c = ((var_cleft_space_ion_concentrations__K_b - var_cleft_space_ion_concentrations__K_c) / var_cleft_space_ion_concentrations__tau_K) + (((var_cleft_space_ion_concentrations__i_t + var_cleft_space_ion_concentrations__i_Kur + var_cleft_space_ion_concentrations__i_K1 + var_cleft_space_ion_concentrations__i_Ks + var_cleft_space_ion_concentrations__i_Kr) - (2.0 * var_cleft_space_ion_concentrations__i_NaK)) / (var_cleft_space_ion_concentrations__Vol_c * var_cleft_space_ion_concentrations__F));
00617     const double d_dt_cleft_space_ion_concentrations__Na_c = ((var_cleft_space_ion_concentrations__Na_b - var_cleft_space_ion_concentrations__Na_c) / var_cleft_space_ion_concentrations__tau_Na) + ((var_cleft_space_ion_concentrations__i_Na + var_cleft_space_ion_concentrations__i_B_Na + (3.0 * var_cleft_space_ion_concentrations__i_NaCa) + (3.0 * var_cleft_space_ion_concentrations__i_NaK) + var_cleft_space_ion_concentrations__phi_Na_en) / (var_cleft_space_ion_concentrations__Vol_c * var_cleft_space_ion_concentrations__F));
00618     const double d_dt_Ca_handling_by_the_SR__F1 = (var_Ca_handling_by_the_SR__r_recov * ((1.0 - var_Ca_handling_by_the_SR__F1) - var_Ca_handling_by_the_SR__F2)) - (var_Ca_handling_by_the_SR__r_act * var_Ca_handling_by_the_SR__F1);
00619     const double d_dt_Ca_handling_by_the_SR__F2 = (var_Ca_handling_by_the_SR__r_act * var_Ca_handling_by_the_SR__F1) - (var_Ca_handling_by_the_SR__r_inact * var_Ca_handling_by_the_SR__F2);
00620     const double d_dt_Ca_handling_by_the_SR__O_Calse = var_Ca_handling_by_the_SR__J_O_Calse;
00621     const double d_dt_Ca_handling_by_the_SR__Ca_up = (var_Ca_handling_by_the_SR__i_up - var_Ca_handling_by_the_SR__i_tr) / (2.0 * var_Ca_handling_by_the_SR__Vol_up * var_Ca_handling_by_the_SR__F);
00622     const double d_dt_Ca_handling_by_the_SR__Ca_rel = ((var_Ca_handling_by_the_SR__i_tr - var_Ca_handling_by_the_SR__i_rel) / (2.0 * var_Ca_handling_by_the_SR__Vol_rel * var_Ca_handling_by_the_SR__F)) - (31.0 * var_Ca_handling_by_the_SR__J_O_Calse);
00623 
00624     rDY[0] = 0.001*d_dt_membrane__V;
00625     rDY[1] = 0.001*d_dt_sodium_current_m_gate__m;
00626     rDY[2] = 0.001*d_dt_sodium_current_h1_gate__h1;
00627     rDY[3] = 0.001*d_dt_sodium_current_h2_gate__h2;
00628     rDY[4] = 0.001*d_dt_L_type_Ca_channel_d_L_gate__d_L;
00629     rDY[5] = 0.001*d_dt_L_type_Ca_channel_f_L1_gate__f_L1;
00630     rDY[6] = 0.001*d_dt_L_type_Ca_channel_f_L2_gate__f_L2;
00631     rDY[7] = 0.001*d_dt_Ca_independent_transient_outward_K_current_r_gate__r;
00632     rDY[8] = 0.001*d_dt_Ca_independent_transient_outward_K_current_s_gate__s;
00633     rDY[9] = 0.001*d_dt_ultra_rapid_K_current_aur_gate__a_ur;
00634     rDY[10] = 0.001*d_dt_ultra_rapid_K_current_iur_gate__i_ur;
00635     rDY[11] = 0.001*d_dt_delayed_rectifier_K_currents_n_gate__n;
00636     rDY[12] = 0.001*d_dt_delayed_rectifier_K_currents_pa_gate__pa;
00637     rDY[13] = 0.001*d_dt_intracellular_ion_concentrations__Na_i;
00638     rDY[14] = 0.001*d_dt_intracellular_ion_concentrations__Ca_i;
00639     rDY[15] = 0.001*d_dt_intracellular_ion_concentrations__K_i;
00640     rDY[16] = 0.001*d_dt_intracellular_ion_concentrations__Ca_d;
00641     rDY[17] = 0.001*d_dt_intracellular_Ca_buffering__O_C;
00642     rDY[18] = 0.001*d_dt_intracellular_Ca_buffering__O_TC;
00643     rDY[19] = 0.001*d_dt_intracellular_Ca_buffering__O_TMgC;
00644     rDY[20] = 0.001*d_dt_intracellular_Ca_buffering__O_TMgMg;
00645     rDY[21] = 0.001*d_dt_intracellular_Ca_buffering__O;
00646     rDY[22] = 0.001*d_dt_cleft_space_ion_concentrations__Na_c;
00647     rDY[23] = 0.001*d_dt_cleft_space_ion_concentrations__Ca_c;
00648     rDY[24] = 0.001*d_dt_cleft_space_ion_concentrations__K_c;
00649     rDY[25] = 0.001*d_dt_Ca_handling_by_the_SR__Ca_rel;
00650     rDY[26] = 0.001*d_dt_Ca_handling_by_the_SR__Ca_up;
00651     rDY[27] = 0.001*d_dt_Ca_handling_by_the_SR__O_Calse;
00652     rDY[28] = 0.001*d_dt_Ca_handling_by_the_SR__F1;
00653     rDY[29] = 0.001*d_dt_Ca_handling_by_the_SR__F2;
00654 }
00655 
00656 
00657 template<>
00658 void OdeSystemInformation<Maleckar2009OdeSystem>::Initialise(void)
00659 {
00660     // Time units: second
00661     //
00662     this->mVariableNames.push_back("V");
00663     this->mVariableUnits.push_back("millivolt");
00664     this->mInitialConditions.push_back(-73.941851);
00665 
00666     this->mVariableNames.push_back("m");
00667     this->mVariableUnits.push_back("dimensionless");
00668     this->mInitialConditions.push_back(0.003325);
00669 
00670     this->mVariableNames.push_back("h1");
00671     this->mVariableUnits.push_back("dimensionless");
00672     this->mInitialConditions.push_back(0.875262);
00673 
00674     this->mVariableNames.push_back("h2");
00675     this->mVariableUnits.push_back("dimensionless");
00676     this->mInitialConditions.push_back(0.870692);
00677 
00678     this->mVariableNames.push_back("d_L");
00679     this->mVariableUnits.push_back("dimensionless");
00680     this->mInitialConditions.push_back(0.000014);
00681 
00682     this->mVariableNames.push_back("f_L1");
00683     this->mVariableUnits.push_back("dimensionless");
00684     this->mInitialConditions.push_back(0.998578);
00685 
00686     this->mVariableNames.push_back("f_L2");
00687     this->mVariableUnits.push_back("dimensionless");
00688     this->mInitialConditions.push_back(0.998561);
00689 
00690     this->mVariableNames.push_back("r");
00691     this->mVariableUnits.push_back("dimensionless");
00692     this->mInitialConditions.push_back(0.001098);
00693 
00694     this->mVariableNames.push_back("s");
00695     this->mVariableUnits.push_back("dimensionless");
00696     this->mInitialConditions.push_back(0.948202);
00697 
00698     this->mVariableNames.push_back("a_ur");
00699     this->mVariableUnits.push_back("dimensionless");
00700     this->mInitialConditions.push_back(0.000371);
00701 
00702     this->mVariableNames.push_back("i_ur");
00703     this->mVariableUnits.push_back("dimensionless");
00704     this->mInitialConditions.push_back(0.966869);
00705 
00706     this->mVariableNames.push_back("n");
00707     this->mVariableUnits.push_back("dimensionless");
00708     this->mInitialConditions.push_back(0.004661);
00709 
00710     this->mVariableNames.push_back("pa");
00711     this->mVariableUnits.push_back("dimensionless");
00712     this->mInitialConditions.push_back(0.000054);
00713 
00714     this->mVariableNames.push_back("Na_i");
00715     this->mVariableUnits.push_back("millimolar");
00716     this->mInitialConditions.push_back(8.488527);
00717 
00718     this->mVariableNames.push_back("Ca_i");
00719     this->mVariableUnits.push_back("millimolar");
00720     this->mInitialConditions.push_back(6.5e-5);
00721 
00722     this->mVariableNames.push_back("K_i");
00723     this->mVariableUnits.push_back("millimolar");
00724     this->mInitialConditions.push_back(129.502075);
00725 
00726     this->mVariableNames.push_back("Ca_d");
00727     this->mVariableUnits.push_back("millimolar");
00728     this->mInitialConditions.push_back(7.1e-5);
00729 
00730     this->mVariableNames.push_back("O_C");
00731     this->mVariableUnits.push_back("dimensionless");
00732     this->mInitialConditions.push_back(0.026604);
00733 
00734     this->mVariableNames.push_back("O_TC");
00735     this->mVariableUnits.push_back("dimensionless");
00736     this->mInitialConditions.push_back(0.012843);
00737 
00738     this->mVariableNames.push_back("O_TMgC");
00739     this->mVariableUnits.push_back("dimensionless");
00740     this->mInitialConditions.push_back(0.190077);
00741 
00742     this->mVariableNames.push_back("O_TMgMg");
00743     this->mVariableUnits.push_back("dimensionless");
00744     this->mInitialConditions.push_back(0.714719);
00745 
00746     this->mVariableNames.push_back("O");
00747     this->mVariableUnits.push_back("dimensionless");
00748     this->mInitialConditions.push_back(1.38222);
00749 
00750     this->mVariableNames.push_back("Na_c");
00751     this->mVariableUnits.push_back("millimolar");
00752     this->mInitialConditions.push_back(130.019282);
00753 
00754     this->mVariableNames.push_back("Ca_c");
00755     this->mVariableUnits.push_back("millimolar");
00756     this->mInitialConditions.push_back(1.814418);
00757 
00758     this->mVariableNames.push_back("K_c");
00759     this->mVariableUnits.push_back("millimolar");
00760     this->mInitialConditions.push_back(5.588239);
00761 
00762     this->mVariableNames.push_back("Ca_rel");
00763     this->mVariableUnits.push_back("millimolar");
00764     this->mInitialConditions.push_back(0.630471);
00765 
00766     this->mVariableNames.push_back("Ca_up");
00767     this->mVariableUnits.push_back("millimolar");
00768     this->mInitialConditions.push_back(0.646226);
00769 
00770     this->mVariableNames.push_back("O_Calse");
00771     this->mVariableUnits.push_back("dimensionless");
00772     this->mInitialConditions.push_back(0.43071);
00773 
00774     this->mVariableNames.push_back("F1");
00775     this->mVariableUnits.push_back("dimensionless");
00776     this->mInitialConditions.push_back(0.45453);
00777 
00778     this->mVariableNames.push_back("F2");
00779     this->mVariableUnits.push_back("dimensionless");
00780     this->mInitialConditions.push_back(0.002665);
00781 
00782     this->mInitialised = true;
00783 }
00784 
00785 
00786 // Serialization for Boost >= 1.36
00787 #include "SerializationExportWrapperForCpp.hpp"
00788 CHASTE_CLASS_EXPORT(Maleckar2009OdeSystem)

Generated by  doxygen 1.6.2