FaberRudy2000Version3.hpp

Go to the documentation of this file.
00001 #ifndef _FaberRudy2000Version3_
00002 #define _FaberRudy2000Version3_
00003 
00015 #include <cmath>
00016 #include <cassert>
00017 #include "AbstractCardiacCell.hpp"
00018 #include "Exception.hpp"
00019 #include "AbstractStimulusFunction.hpp"
00020 #include "OdeSystemInformation.hpp"
00021 
00022 class FaberRudy2000Version3 : public AbstractCardiacCell
00023 {
00024 private:
00025     // for heterogeneities
00026     double mScaleFactorGks;
00027     double mScaleFactorIto;
00028     double mScaleFactorGkr;
00029 public:
00030     FaberRudy2000Version3(boost::shared_ptr<AbstractIvpOdeSolver> pSolver,
00031                           boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
00032         : AbstractCardiacCell(pSolver, 25, 0, pIntracellularStimulus)
00033     {
00034         mpSystemInfo = OdeSystemInformation<FaberRudy2000Version3>::Instance();
00035 
00036         mScaleFactorGks=1.0;
00037         mScaleFactorIto=0.0;
00038         mScaleFactorGkr=1.0;
00039 
00040         Init();
00041     }
00042 
00043     ~FaberRudy2000Version3(void)
00044     {
00045     }
00046 
00047     void SetScaleFactorGks(double sfgks)
00048     {
00049         assert(sfgks>=0.0);
00050         mScaleFactorGks=sfgks;
00051     }
00052 
00053     void SetScaleFactorIto(double sfito)
00054     {
00055         assert(sfito>=0.0);
00056         mScaleFactorIto=sfito;
00057     }
00058 
00059     void SetScaleFactorGkr(double sfgkr)
00060     {
00061         assert(sfgkr>=0.0);
00062         mScaleFactorGkr=sfgkr;
00063     }
00064 
00065     double GetIIonic()
00066     {
00067         std::vector<double>& rY = rGetStateVariables();
00068         double var_membrane__V = rY[0];
00069         // Units: millivolt; Initial value: -90
00070         double var_fast_sodium_current_m_gate__m = rY[1];
00071         // Units: dimensionless; Initial value: 0.0008
00072         double var_fast_sodium_current_h_gate__h = rY[2];
00073         // Units: dimensionless; Initial value: 0.993771
00074         double var_fast_sodium_current_j_gate__j = rY[3];
00075         // Units: dimensionless; Initial value: 0.995727
00076         double var_L_type_Ca_channel_d_gate__d = rY[4];
00077         // Units: dimensionless; Initial value: 3.210618e-6
00078         double var_L_type_Ca_channel_f_gate__f = rY[5];
00079         // Units: dimensionless; Initial value: 0.999837
00080         double var_T_type_Ca_channel_b_gate__b = rY[6];
00081         // Units: dimensionless; Initial value: 0.000970231
00082         double var_T_type_Ca_channel_g_gate__g = rY[7];
00083         // Units: dimensionless; Initial value: 0.994305
00084         double var_rapid_delayed_rectifier_potassium_current_xr_gate__xr = rY[8];
00085         // Units: dimensionless; Initial value: 0.000124042
00086         double var_slow_delayed_rectifier_potassium_current_xs1_gate__xs1 = rY[9];
00087         // Units: dimensionless; Initial value: 0.00445683
00088         double var_slow_delayed_rectifier_potassium_current_xs2_gate__xs2 = rY[10];
00089         // Units: dimensionless; Initial value: 0.00445683
00090         double var_transient_outward_current_zdv_gate__zdv = rY[11];
00091         // Units: dimensionless; Initial value: 0.5
00092         double var_transient_outward_current_ydv_gate__ydv = rY[12];
00093         // Units: dimensionless; Initial value: 0.5
00094         double var_calcium_dynamics__Cai = rY[13];
00095         // Units: millimolar; Initial value: 6e-5
00096         double var_ionic_concentrations__Nai = rY[23];
00097         // Units: millimolar; Initial value: 9
00098         double var_ionic_concentrations__Ki = rY[24];
00099         // Units: millimolar; Initial value: 141.2
00100 
00101         const double var_membrane__R = 8314.0;
00102         const double var_membrane__T = 310.0;
00103         const double var_membrane__F = 96485.0;
00104         double var_fast_sodium_current__j = var_fast_sodium_current_j_gate__j;
00105         double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
00106         const double var_fast_sodium_current__g_Na = 16.0;
00107         double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
00108         double var_fast_sodium_current__V = var_membrane__V;
00109         double var_fast_sodium_current__R = var_membrane__R;
00110         double var_fast_sodium_current__F = var_membrane__F;
00111         const double var_ionic_concentrations__Nao = 132.0;
00112         double var_fast_sodium_current__Nao = var_ionic_concentrations__Nao;
00113         double var_fast_sodium_current__Nai = var_ionic_concentrations__Nai;
00114         double var_fast_sodium_current__T = var_membrane__T;
00115         double var_fast_sodium_current__E_Na = ((var_fast_sodium_current__R * var_fast_sodium_current__T) / var_fast_sodium_current__F) * log(var_fast_sodium_current__Nao / var_fast_sodium_current__Nai);
00116         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__j * (var_fast_sodium_current__V - var_fast_sodium_current__E_Na);
00117         double var_membrane__i_Na = var_fast_sodium_current__i_Na;
00118         double var_L_type_Ca_channel__d = var_L_type_Ca_channel_d_gate__d;
00119         double var_L_type_Ca_channel__f = var_L_type_Ca_channel_f_gate__f;
00120         const double var_L_type_Ca_channel_f_Ca_gate__Km_Ca = 0.0006;
00121         double var_L_type_Ca_channel__Cai = var_calcium_dynamics__Cai;
00122         double var_L_type_Ca_channel_f_Ca_gate__Cai = var_L_type_Ca_channel__Cai;
00123         double var_L_type_Ca_channel_f_Ca_gate__f_Ca = 1.0 / (1.0 + (var_L_type_Ca_channel_f_Ca_gate__Cai / var_L_type_Ca_channel_f_Ca_gate__Km_Ca));
00124         double var_L_type_Ca_channel__f_Ca = var_L_type_Ca_channel_f_Ca_gate__f_Ca;
00125         const double var_L_type_Ca_channel__gamma_Cai = 1.0;
00126         const double var_L_type_Ca_channel__gamma_Cao = 0.341;
00127         const double var_calcium_dynamics__Cao = 1.8;
00128         double var_L_type_Ca_channel__Cao = var_calcium_dynamics__Cao;
00129         double var_L_type_Ca_channel__F = var_membrane__F;
00130         const double var_L_type_Ca_channel__P_Ca = 0.00054;
00131         double var_L_type_Ca_channel__T = var_membrane__T;
00132         double var_L_type_Ca_channel__V = var_membrane__V;
00133         double var_L_type_Ca_channel__R = var_membrane__R;
00134         double var_L_type_Ca_channel__I_CaCa = (((var_L_type_Ca_channel__P_Ca * pow(2.0, 2.0) * var_L_type_Ca_channel__V * pow(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__gamma_Cai * var_L_type_Ca_channel__Cai * exp((2.0 * var_L_type_Ca_channel__V * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__gamma_Cao * var_L_type_Ca_channel__Cao))) / (exp((2.0 * var_L_type_Ca_channel__V * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) - 1.0);
00135         double var_L_type_Ca_channel__i_CaCa = var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f_Ca * var_L_type_Ca_channel__I_CaCa;
00136         const double var_L_type_Ca_channel__P_Na = 6.75e-07;
00137         const double var_L_type_Ca_channel__gamma_Nao = 0.75;
00138         double var_L_type_Ca_channel__Nao = var_ionic_concentrations__Nao;
00139         double var_L_type_Ca_channel__Nai = var_ionic_concentrations__Nai;
00140         const double var_L_type_Ca_channel__gamma_Nai = 0.75;
00141         double var_L_type_Ca_channel__I_CaNa = (((var_L_type_Ca_channel__P_Na * pow(1.0, 2.0) * var_L_type_Ca_channel__V * pow(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__gamma_Nai * var_L_type_Ca_channel__Nai * exp((1.0 * var_L_type_Ca_channel__V * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__gamma_Nao * var_L_type_Ca_channel__Nao))) / (exp((1.0 * var_L_type_Ca_channel__V * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) - 1.0);
00142         double var_L_type_Ca_channel__i_CaNa = var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f_Ca * var_L_type_Ca_channel__I_CaNa;
00143         const double var_ionic_concentrations__Ko = 4.5;
00144         double var_L_type_Ca_channel__Ko = var_ionic_concentrations__Ko;
00145         double var_L_type_Ca_channel__Ki = var_ionic_concentrations__Ki;
00146         const double var_L_type_Ca_channel__P_K = 1.93e-07;
00147         const double var_L_type_Ca_channel__gamma_Ki = 0.75;
00148         const double var_L_type_Ca_channel__gamma_Ko = 0.75;
00149         double var_L_type_Ca_channel__I_CaK = (((var_L_type_Ca_channel__P_K * pow(1.0, 2.0) * var_L_type_Ca_channel__V * pow(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__gamma_Ki * var_L_type_Ca_channel__Ki * exp((1.0 * var_L_type_Ca_channel__V * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__gamma_Ko * var_L_type_Ca_channel__Ko))) / (exp((1.0 * var_L_type_Ca_channel__V * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) - 1.0);
00150         double var_L_type_Ca_channel__i_CaK = var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f_Ca * var_L_type_Ca_channel__I_CaK;
00151         double var_L_type_Ca_channel__i_Ca_L = var_L_type_Ca_channel__i_CaCa + var_L_type_Ca_channel__i_CaK + var_L_type_Ca_channel__i_CaNa;
00152         double var_membrane__i_Ca_L = var_L_type_Ca_channel__i_Ca_L;
00153         double var_T_type_Ca_channel__V = var_membrane__V;
00154         double var_T_type_Ca_channel__g = var_T_type_Ca_channel_g_gate__g;
00155         const double var_T_type_Ca_channel__g_CaT = 0.05;
00156         double var_T_type_Ca_channel__b = var_T_type_Ca_channel_b_gate__b;
00157         double var_calcium_background_current__R = var_membrane__R;
00158         double var_calcium_background_current__Cai = var_calcium_dynamics__Cai;
00159         double var_calcium_background_current__F = var_membrane__F;
00160         double var_calcium_background_current__T = var_membrane__T;
00161         double var_calcium_background_current__Cao = var_calcium_dynamics__Cao;
00162         double var_calcium_background_current__E_Ca = ((var_calcium_background_current__R * var_calcium_background_current__T) / (2.0 * var_calcium_background_current__F)) * log(var_calcium_background_current__Cao / var_calcium_background_current__Cai);
00163         double var_T_type_Ca_channel__E_Ca = var_calcium_background_current__E_Ca;
00164         double var_T_type_Ca_channel__i_Ca_T = var_T_type_Ca_channel__g_CaT * var_T_type_Ca_channel__b * var_T_type_Ca_channel__b * var_T_type_Ca_channel__g * (var_T_type_Ca_channel__V - var_T_type_Ca_channel__E_Ca);
00165         double var_membrane__i_Ca_T = var_T_type_Ca_channel__i_Ca_T;
00166         double var_rapid_delayed_rectifier_potassium_current__Ko = var_ionic_concentrations__Ko;
00167         double var_rapid_delayed_rectifier_potassium_current__g_Kr = 0.02614 * sqrt(var_rapid_delayed_rectifier_potassium_current__Ko / 5.4);
00168         double var_rapid_delayed_rectifier_potassium_current__V = var_membrane__V;
00169         double var_rapid_delayed_rectifier_potassium_current__xr = var_rapid_delayed_rectifier_potassium_current_xr_gate__xr;
00170         double var_rapid_delayed_rectifier_potassium_current__Rect = 1.0 / (1.0 + exp((var_rapid_delayed_rectifier_potassium_current__V + 9.0) / 22.4));
00171         double var_time_independent_potassium_current__Ki = var_ionic_concentrations__Ki;
00172         double var_time_independent_potassium_current__R = var_membrane__R;
00173         double var_time_independent_potassium_current__F = var_membrane__F;
00174         double var_time_independent_potassium_current__Ko = var_ionic_concentrations__Ko;
00175         double var_time_independent_potassium_current__T = var_membrane__T;
00176         double var_time_independent_potassium_current__E_K = ((var_time_independent_potassium_current__R * var_time_independent_potassium_current__T) / var_time_independent_potassium_current__F) * log(var_time_independent_potassium_current__Ko / var_time_independent_potassium_current__Ki);
00177         double var_rapid_delayed_rectifier_potassium_current__E_K = var_time_independent_potassium_current__E_K;
00178         double var_rapid_delayed_rectifier_potassium_current__i_Kr = mScaleFactorGkr*var_rapid_delayed_rectifier_potassium_current__g_Kr * var_rapid_delayed_rectifier_potassium_current__xr * var_rapid_delayed_rectifier_potassium_current__Rect * (var_rapid_delayed_rectifier_potassium_current__V - var_rapid_delayed_rectifier_potassium_current__E_K);
00179         double var_membrane__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00180         double var_slow_delayed_rectifier_potassium_current__xs2 = var_slow_delayed_rectifier_potassium_current_xs2_gate__xs2;
00181         double var_slow_delayed_rectifier_potassium_current__Nai = var_ionic_concentrations__Nai;
00182         double var_slow_delayed_rectifier_potassium_current__Nao = var_ionic_concentrations__Nao;
00183         double var_slow_delayed_rectifier_potassium_current__F = var_membrane__F;
00184         const double var_slow_delayed_rectifier_potassium_current__PNaK = 0.01833;
00185         double var_slow_delayed_rectifier_potassium_current__Ko = var_ionic_concentrations__Ko;
00186         double var_slow_delayed_rectifier_potassium_current__R = var_membrane__R;
00187         double var_slow_delayed_rectifier_potassium_current__T = var_membrane__T;
00188         double var_slow_delayed_rectifier_potassium_current__Ki = var_ionic_concentrations__Ki;
00189         double var_slow_delayed_rectifier_potassium_current__E_Ks = ((var_slow_delayed_rectifier_potassium_current__R * var_slow_delayed_rectifier_potassium_current__T) / var_slow_delayed_rectifier_potassium_current__F) * log((var_slow_delayed_rectifier_potassium_current__Ko + (var_slow_delayed_rectifier_potassium_current__PNaK * var_slow_delayed_rectifier_potassium_current__Nao)) / (var_slow_delayed_rectifier_potassium_current__Ki + (var_slow_delayed_rectifier_potassium_current__PNaK * var_slow_delayed_rectifier_potassium_current__Nai)));
00190         double var_slow_delayed_rectifier_potassium_current__xs1 = var_slow_delayed_rectifier_potassium_current_xs1_gate__xs1;
00191         double var_slow_delayed_rectifier_potassium_current__Cai = var_calcium_dynamics__Cai;
00192         double var_slow_delayed_rectifier_potassium_current__g_Ks = 0.433 * (1.0 + (0.6 / (1.0 + pow(3.8e-05 / var_slow_delayed_rectifier_potassium_current__Cai, 1.4))));
00193         double var_slow_delayed_rectifier_potassium_current__V = var_membrane__V;
00194         double var_slow_delayed_rectifier_potassium_current__i_Ks = mScaleFactorGks*var_slow_delayed_rectifier_potassium_current__g_Ks * var_slow_delayed_rectifier_potassium_current__xs1 * var_slow_delayed_rectifier_potassium_current__xs2 * (var_slow_delayed_rectifier_potassium_current__V - var_slow_delayed_rectifier_potassium_current__E_Ks);
00195         double var_membrane__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00196         double var_sodium_activated_potassium_current__V = var_membrane__V;
00197         double var_sodium_activated_potassium_current__pov = 0.8 - (0.65 / (1.0 + exp((var_sodium_activated_potassium_current__V + 125.0) / 15.0)));
00198         double var_sodium_activated_potassium_current__g_K_Na = 0.0 * 0.12848;
00199         const double var_sodium_activated_potassium_current__nKNa = 2.8;
00200         double var_sodium_activated_potassium_current__Nai = var_ionic_concentrations__Nai;
00201         const double var_sodium_activated_potassium_current__kdKNa = 66.0;
00202         double var_sodium_activated_potassium_current__pona = 0.85 / (1.0 + pow(var_sodium_activated_potassium_current__kdKNa / var_sodium_activated_potassium_current__Nai, var_sodium_activated_potassium_current__nKNa));
00203         double var_sodium_activated_potassium_current__E_K = var_time_independent_potassium_current__E_K;
00204         double var_sodium_activated_potassium_current__i_K_Na = var_sodium_activated_potassium_current__g_K_Na * var_sodium_activated_potassium_current__pona * var_sodium_activated_potassium_current__pov * (var_sodium_activated_potassium_current__V - var_sodium_activated_potassium_current__E_K);
00205         double var_membrane__i_K_Na = var_sodium_activated_potassium_current__i_K_Na;
00206         double var_ATP_sensitive_potassium_current__V = var_membrane__V;
00207         const double var_ATP_sensitive_potassium_current__nATP = 0.24;
00208         const double var_ATP_sensitive_potassium_current__hATP = 2.0;
00209         const double var_ATP_sensitive_potassium_current__ATPi = 3.0;
00210         const double var_ATP_sensitive_potassium_current__kATP = 0.00025;
00211         double var_ATP_sensitive_potassium_current__pATP = 1.0 / (1.0 + pow(var_ATP_sensitive_potassium_current__ATPi / var_ATP_sensitive_potassium_current__kATP, var_ATP_sensitive_potassium_current__hATP));
00212         const double var_ATP_sensitive_potassium_current__i_K_ATP_on = 1.0;
00213         const double var_ATP_sensitive_potassium_current__nicholsarea = 5e-05;
00214         double var_ATP_sensitive_potassium_current__g_K_ATP = (var_ATP_sensitive_potassium_current__i_K_ATP_on * 0.000193) / var_ATP_sensitive_potassium_current__nicholsarea;
00215         double var_ATP_sensitive_potassium_current__Ko = var_ionic_concentrations__Ko;
00216         double var_ATP_sensitive_potassium_current__GKbaraATP = var_ATP_sensitive_potassium_current__g_K_ATP * var_ATP_sensitive_potassium_current__pATP * pow(var_ATP_sensitive_potassium_current__Ko / 4.0, var_ATP_sensitive_potassium_current__nATP);
00217         double var_ATP_sensitive_potassium_current__E_K = var_time_independent_potassium_current__E_K;
00218         double var_ATP_sensitive_potassium_current__i_K_ATP = var_ATP_sensitive_potassium_current__GKbaraATP * (var_ATP_sensitive_potassium_current__V - var_ATP_sensitive_potassium_current__E_K);
00219         double var_membrane__i_K_ATP = var_ATP_sensitive_potassium_current__i_K_ATP;
00220         double var_transient_outward_current__g_to = mScaleFactorIto* 0.5;
00221         double var_transient_outward_current__V = var_membrane__V;
00222         double var_transient_outward_current__E_K = var_time_independent_potassium_current__E_K;
00223         double var_transient_outward_current__zdv = var_transient_outward_current_zdv_gate__zdv;
00224         double var_transient_outward_current__ydv = var_transient_outward_current_ydv_gate__ydv;
00225         double var_transient_outward_current__rvdv = exp(var_transient_outward_current__V / 100.0);
00226         double var_transient_outward_current__i_to = var_transient_outward_current__g_to * pow(var_transient_outward_current__zdv, 3.0) * var_transient_outward_current__ydv * var_transient_outward_current__rvdv * (var_transient_outward_current__V - var_transient_outward_current__E_K);
00227         double var_membrane__i_to = var_transient_outward_current__i_to;
00228         double var_Na_Ca_exchanger__Nao = var_ionic_concentrations__Nao;
00229         double var_Na_Ca_exchanger__F = var_membrane__F;
00230         const double var_Na_Ca_exchanger__gamma = 0.15;
00231         double var_Na_Ca_exchanger__Nai = var_ionic_concentrations__Nai;
00232         const double var_Na_Ca_exchanger__c1 = 0.00025;
00233         const double var_Na_Ca_exchanger__c2 = 0.0001;
00234         double var_Na_Ca_exchanger__T = var_membrane__T;
00235         double var_Na_Ca_exchanger__Cao = var_calcium_dynamics__Cao;
00236         double var_Na_Ca_exchanger__V = var_membrane__V;
00237         double var_Na_Ca_exchanger__R = var_membrane__R;
00238         double var_Na_Ca_exchanger__Cai = var_calcium_dynamics__Cai;
00239         double var_Na_Ca_exchanger__i_NaCa = (var_Na_Ca_exchanger__c1 * exp(((var_Na_Ca_exchanger__gamma - 1.0) * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * ((exp((var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * pow(var_Na_Ca_exchanger__Nai, 3.0) * var_Na_Ca_exchanger__Cao) - (pow(var_Na_Ca_exchanger__Nao, 3.0) * var_Na_Ca_exchanger__Cai))) / (1.0 + (var_Na_Ca_exchanger__c2 * exp(((var_Na_Ca_exchanger__gamma - 1.0) * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * ((exp((var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * pow(var_Na_Ca_exchanger__Nai, 3.0) * var_Na_Ca_exchanger__Cao) + (pow(var_Na_Ca_exchanger__Nao, 3.0) * var_Na_Ca_exchanger__Cai))));
00240         double var_membrane__i_NaCa = var_Na_Ca_exchanger__i_NaCa;
00241         double var_time_independent_potassium_current__V = var_membrane__V;
00242         double var_time_independent_potassium_current_K1_gate__V = var_time_independent_potassium_current__V;
00243         double var_time_independent_potassium_current_K1_gate__E_K = var_time_independent_potassium_current__E_K;
00244         double var_time_independent_potassium_current_K1_gate__beta_K1 = (1000.0 * ((0.49124 * exp(0.08032 * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K) + 5.476))) + exp(0.06175 * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K) - 594.31)))) / (1.0 + exp((-0.5143) * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K) + 4.753)));
00245         double var_time_independent_potassium_current_K1_gate__alpha_K1 = 1020.0 / (1.0 + exp(0.2385 * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K) - 59.215)));
00246         double var_time_independent_potassium_current_K1_gate__K1_infinity = var_time_independent_potassium_current_K1_gate__alpha_K1 / (var_time_independent_potassium_current_K1_gate__alpha_K1 + var_time_independent_potassium_current_K1_gate__beta_K1);
00247         double var_time_independent_potassium_current__K1_infinity = var_time_independent_potassium_current_K1_gate__K1_infinity;
00248         double var_time_independent_potassium_current__g_K1 = 0.75 * sqrt(var_time_independent_potassium_current__Ko / 5.4);
00249         double var_time_independent_potassium_current__i_K1 = var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K1_infinity * (var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K);
00250         double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00251         const double var_plateau_potassium_current__g_Kp = 0.00552;
00252         double var_plateau_potassium_current__V = var_membrane__V;
00253         double var_plateau_potassium_current__Kp = 1.0 / (1.0 + exp((7.488 - var_plateau_potassium_current__V) / 5.98));
00254         double var_plateau_potassium_current__E_K = var_time_independent_potassium_current__E_K;
00255         double var_plateau_potassium_current__i_Kp = var_plateau_potassium_current__g_Kp * var_plateau_potassium_current__Kp * (var_plateau_potassium_current__V - var_plateau_potassium_current__E_K);
00256         double var_membrane__i_Kp = var_plateau_potassium_current__i_Kp;
00257         const double var_sarcolemmal_calcium_pump__I_pCa = 1.15;
00258         double var_sarcolemmal_calcium_pump__Cai = var_calcium_dynamics__Cai;
00259         const double var_sarcolemmal_calcium_pump__K_mpCa = 0.0005;
00260         double var_sarcolemmal_calcium_pump__i_p_Ca = (var_sarcolemmal_calcium_pump__I_pCa * var_sarcolemmal_calcium_pump__Cai) / (var_sarcolemmal_calcium_pump__K_mpCa + var_sarcolemmal_calcium_pump__Cai);
00261         double var_membrane__i_p_Ca = var_sarcolemmal_calcium_pump__i_p_Ca;
00262         const double var_sodium_background_current__g_Nab = 0.004;
00263         double var_sodium_background_current__V = var_membrane__V;
00264         double var_sodium_background_current__E_Na = var_fast_sodium_current__E_Na;
00265         double var_sodium_background_current__i_Na_b = var_sodium_background_current__g_Nab * (var_sodium_background_current__V - var_sodium_background_current__E_Na);
00266         double var_membrane__i_Na_b = var_sodium_background_current__i_Na_b;
00267         const double var_calcium_background_current__g_Cab = 0.003016;
00268         double var_calcium_background_current__V = var_membrane__V;
00269         double var_calcium_background_current__i_Ca_b = var_calcium_background_current__g_Cab * (var_calcium_background_current__V - var_calcium_background_current__E_Ca);
00270         double var_membrane__i_Ca_b = var_calcium_background_current__i_Ca_b;
00271         double var_sodium_potassium_pump__Ko = var_ionic_concentrations__Ko;
00272         const double var_sodium_potassium_pump__K_mNai = 10.0;
00273         double var_sodium_potassium_pump__Nai = var_ionic_concentrations__Nai;
00274         double var_sodium_potassium_pump__V = var_membrane__V;
00275         double var_sodium_potassium_pump__F = var_membrane__F;
00276         double var_sodium_potassium_pump__T = var_membrane__T;
00277         double var_sodium_potassium_pump__Nao = var_ionic_concentrations__Nao;
00278         double var_sodium_potassium_pump__sigma = (1.0 / 7.0) * (exp(var_sodium_potassium_pump__Nao / 67.3) - 1.0);
00279         double var_sodium_potassium_pump__R = var_membrane__R;
00280         double var_sodium_potassium_pump__f_NaK = 1.0 / (1.0 + (0.1245 * exp(((-0.1) * var_sodium_potassium_pump__V * var_sodium_potassium_pump__F) / (var_sodium_potassium_pump__R * var_sodium_potassium_pump__T))) + (0.0365 * var_sodium_potassium_pump__sigma * exp(((-var_sodium_potassium_pump__V) * var_sodium_potassium_pump__F) / (var_sodium_potassium_pump__R * var_sodium_potassium_pump__T))));
00281         const double var_sodium_potassium_pump__I_NaK = 2.25;
00282         const double var_sodium_potassium_pump__K_mKo = 1.5;
00283         double var_sodium_potassium_pump__i_NaK = (((var_sodium_potassium_pump__I_NaK * var_sodium_potassium_pump__f_NaK * 1.0) / (1.0 + pow(var_sodium_potassium_pump__K_mNai / var_sodium_potassium_pump__Nai, 2.0))) * var_sodium_potassium_pump__Ko) / (var_sodium_potassium_pump__Ko + var_sodium_potassium_pump__K_mKo);
00284         double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00285         double var_non_specific_calcium_activated_current__F = var_membrane__F;
00286         double var_non_specific_calcium_activated_current__R = var_membrane__R;
00287         double var_non_specific_calcium_activated_current__T = var_membrane__T;
00288         double var_non_specific_calcium_activated_current__V = var_membrane__V;
00289         double var_non_specific_calcium_activated_current__P_ns_Ca = 0.0 * 1.75e-07;
00290         double var_non_specific_calcium_activated_current__Nao = var_ionic_concentrations__Nao;
00291         double var_non_specific_calcium_activated_current__gamma_Nai = var_L_type_Ca_channel__gamma_Nai;
00292         double var_non_specific_calcium_activated_current__gamma_Nao = var_L_type_Ca_channel__gamma_Nao;
00293         double var_non_specific_calcium_activated_current__Nai = var_ionic_concentrations__Nai;
00294         double var_non_specific_calcium_activated_current__I_ns_Na = (((var_non_specific_calcium_activated_current__P_ns_Ca * pow(1.0, 2.0) * var_non_specific_calcium_activated_current__V * pow(var_non_specific_calcium_activated_current__F, 2.0)) / (var_non_specific_calcium_activated_current__R * var_non_specific_calcium_activated_current__T)) * ((var_non_specific_calcium_activated_current__gamma_Nai * var_non_specific_calcium_activated_current__Nai * exp((1.0 * var_non_specific_calcium_activated_current__V * var_non_specific_calcium_activated_current__F) / (var_non_specific_calcium_activated_current__R * var_non_specific_calcium_activated_current__T))) - (var_non_specific_calcium_activated_current__gamma_Nao * var_non_specific_calcium_activated_current__Nao))) / (exp((1.0 * var_non_specific_calcium_activated_current__V * var_non_specific_calcium_activated_current__F) / (var_non_specific_calcium_activated_current__R * var_non_specific_calcium_activated_current__T)) - 1.0);
00295         const double var_non_specific_calcium_activated_current__K_m_ns_Ca = 0.0012;
00296         double var_non_specific_calcium_activated_current__Cai = var_calcium_dynamics__Cai;
00297         double var_non_specific_calcium_activated_current__i_ns_Na = (var_non_specific_calcium_activated_current__I_ns_Na * 1.0) / (1.0 + pow(var_non_specific_calcium_activated_current__K_m_ns_Ca / var_non_specific_calcium_activated_current__Cai, 3.0));
00298         double var_non_specific_calcium_activated_current__Ko = var_ionic_concentrations__Ko;
00299         double var_non_specific_calcium_activated_current__Ki = var_ionic_concentrations__Ki;
00300         double var_non_specific_calcium_activated_current__gamma_Ko = var_L_type_Ca_channel__gamma_Ko;
00301         double var_non_specific_calcium_activated_current__gamma_Ki = var_L_type_Ca_channel__gamma_Ki;
00302         double var_non_specific_calcium_activated_current__I_ns_K = (((var_non_specific_calcium_activated_current__P_ns_Ca * pow(1.0, 2.0) * var_non_specific_calcium_activated_current__V * pow(var_non_specific_calcium_activated_current__F, 2.0)) / (var_non_specific_calcium_activated_current__R * var_non_specific_calcium_activated_current__T)) * ((var_non_specific_calcium_activated_current__gamma_Ki * var_non_specific_calcium_activated_current__Ki * exp((1.0 * var_non_specific_calcium_activated_current__V * var_non_specific_calcium_activated_current__F) / (var_non_specific_calcium_activated_current__R * var_non_specific_calcium_activated_current__T))) - (var_non_specific_calcium_activated_current__gamma_Ko * var_non_specific_calcium_activated_current__Ko))) / (exp((1.0 * var_non_specific_calcium_activated_current__V * var_non_specific_calcium_activated_current__F) / (var_non_specific_calcium_activated_current__R * var_non_specific_calcium_activated_current__T)) - 1.0);
00303         double var_non_specific_calcium_activated_current__i_ns_K = (var_non_specific_calcium_activated_current__I_ns_K * 1.0) / (1.0 + pow(var_non_specific_calcium_activated_current__K_m_ns_Ca / var_non_specific_calcium_activated_current__Cai, 3.0));
00304         double var_non_specific_calcium_activated_current__i_ns_Ca = var_non_specific_calcium_activated_current__i_ns_Na + var_non_specific_calcium_activated_current__i_ns_K;
00305         double var_membrane__i_ns_Ca = var_non_specific_calcium_activated_current__i_ns_Ca;
00306 
00307         return var_membrane__i_Na+var_membrane__i_Ca_L+var_membrane__i_Ca_T+var_membrane__i_Kr+var_membrane__i_Ks+var_membrane__i_K_Na+var_membrane__i_K_ATP+var_membrane__i_to+var_membrane__i_NaCa+var_membrane__i_K1+var_membrane__i_Kp+var_membrane__i_p_Ca+var_membrane__i_Na_b+var_membrane__i_Ca_b+var_membrane__i_NaK+var_membrane__i_ns_Ca;
00308     }
00309 
00310     void EvaluateYDerivatives (
00311             double var_environment__time,
00312             const std::vector<double> &rY,
00313             std::vector<double> &rDY)
00314     {
00315         // Inputs:
00316         // Time units: second, but input in ms
00317         var_environment__time *= 1e-3;
00318         double var_membrane__V = rY[0];
00319         // Units: millivolt; Initial value: -90
00320         double var_fast_sodium_current_m_gate__m = rY[1];
00321         // Units: dimensionless; Initial value: 0.0008
00322         double var_fast_sodium_current_h_gate__h = rY[2];
00323         // Units: dimensionless; Initial value: 0.993771
00324         double var_fast_sodium_current_j_gate__j = rY[3];
00325         // Units: dimensionless; Initial value: 0.995727
00326         double var_L_type_Ca_channel_d_gate__d = rY[4];
00327         // Units: dimensionless; Initial value: 3.210618e-6
00328         double var_L_type_Ca_channel_f_gate__f = rY[5];
00329         // Units: dimensionless; Initial value: 0.999837
00330         double var_T_type_Ca_channel_b_gate__b = rY[6];
00331         // Units: dimensionless; Initial value: 0.000970231
00332         double var_T_type_Ca_channel_g_gate__g = rY[7];
00333         // Units: dimensionless; Initial value: 0.994305
00334         double var_rapid_delayed_rectifier_potassium_current_xr_gate__xr = rY[8];
00335         // Units: dimensionless; Initial value: 0.000124042
00336         double var_slow_delayed_rectifier_potassium_current_xs1_gate__xs1 = rY[9];
00337         // Units: dimensionless; Initial value: 0.00445683
00338         double var_slow_delayed_rectifier_potassium_current_xs2_gate__xs2 = rY[10];
00339         // Units: dimensionless; Initial value: 0.00445683
00340         double var_transient_outward_current_zdv_gate__zdv = rY[11];
00341         // Units: dimensionless; Initial value: 0.5
00342         double var_transient_outward_current_ydv_gate__ydv = rY[12];
00343         // Units: dimensionless; Initial value: 0.5
00344         double var_calcium_dynamics__Cai = rY[13];
00345         // Units: millimolar; Initial value: 6e-5
00346         double var_calcium_dynamics__Ca_JSR = rY[14];
00347         // Units: millimolar; Initial value: 1.8
00348         double var_calcium_dynamics__Ca_NSR = rY[15];
00349         // Units: millimolar; Initial value: 1.8
00350         double var_calcium_dynamics__APtrack = rY[16];
00351         // Units: dimensionless; Initial value: 0
00352         double var_calcium_dynamics__APtrack2 = rY[17];
00353         // Units: dimensionless; Initial value: 0
00354         double var_calcium_dynamics__APtrack3 = rY[18];
00355         // Units: dimensionless; Initial value: 0
00356         double var_calcium_dynamics__Cainfluxtrack = rY[19];
00357         // Units: dimensionless; Initial value: 0
00358         double var_calcium_dynamics__OVRLDtrack = rY[20];
00359         // Units: dimensionless; Initial value: 0
00360         double var_calcium_dynamics__OVRLDtrack2 = rY[21];
00361         // Units: dimensionless; Initial value: 0
00362         double var_calcium_dynamics__OVRLDtrack3 = rY[22];
00363         // Units: dimensionless; Initial value: 0
00364         double var_ionic_concentrations__Nai = rY[23];
00365         // Units: millimolar; Initial value: 9
00366         double var_ionic_concentrations__Ki = rY[24];
00367         // Units: millimolar; Initial value: 141.2
00368 
00369 
00370         // Mathematics
00371         const double var_membrane__R = 8314.0;
00372         const double var_membrane__T = 310.0;
00373         const double var_membrane__F = 96485.0;
00374         const double var_membrane__Cm = 0.001;
00375 //        const double var_membrane__stim_end = 100000.0;
00376 //        const double var_membrane__stim_amplitude =  -25.5;
00377 //        double var_membrane__time = var_environment__time;
00378 //        const double var_membrane__stim_duration = 0.002;
00379 //        const double var_membrane__stim_period = 1.0;
00380 //        const double var_membrane__stim_start = 0.1;
00381 //        double var_membrane__I_st = ((var_membrane__time >= var_membrane__stim_start) && (var_membrane__time <= var_membrane__stim_end) && (((var_membrane__time - var_membrane__stim_start) - (floor((var_membrane__time - var_membrane__stim_start) / var_membrane__stim_period) * var_membrane__stim_period)) <= var_membrane__stim_duration)) ? var_membrane__stim_amplitude : 0.0;
00382         double var_membrane__I_st = GetStimulus(var_environment__time*1000);
00383         double var_fast_sodium_current__j = var_fast_sodium_current_j_gate__j;
00384         double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
00385         const double var_fast_sodium_current__g_Na = 16.0;
00386         double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
00387         double var_fast_sodium_current__V = var_membrane__V;
00388         double var_fast_sodium_current__R = var_membrane__R;
00389         double var_fast_sodium_current__F = var_membrane__F;
00390         const double var_ionic_concentrations__Nao = 132.0;
00391         double var_fast_sodium_current__Nao = var_ionic_concentrations__Nao;
00392         double var_fast_sodium_current__Nai = var_ionic_concentrations__Nai;
00393         double var_fast_sodium_current__T = var_membrane__T;
00394         double var_fast_sodium_current__E_Na = ((var_fast_sodium_current__R * var_fast_sodium_current__T) / var_fast_sodium_current__F) * log(var_fast_sodium_current__Nao / var_fast_sodium_current__Nai);
00395         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__j * (var_fast_sodium_current__V - var_fast_sodium_current__E_Na);
00396         double var_membrane__i_Na = var_fast_sodium_current__i_Na;
00397         double var_L_type_Ca_channel__d = var_L_type_Ca_channel_d_gate__d;
00398         double var_L_type_Ca_channel__f = var_L_type_Ca_channel_f_gate__f;
00399         const double var_L_type_Ca_channel_f_Ca_gate__Km_Ca = 0.0006;
00400         double var_L_type_Ca_channel__Cai = var_calcium_dynamics__Cai;
00401         double var_L_type_Ca_channel_f_Ca_gate__Cai = var_L_type_Ca_channel__Cai;
00402         double var_L_type_Ca_channel_f_Ca_gate__f_Ca = 1.0 / (1.0 + (var_L_type_Ca_channel_f_Ca_gate__Cai / var_L_type_Ca_channel_f_Ca_gate__Km_Ca));
00403         double var_L_type_Ca_channel__f_Ca = var_L_type_Ca_channel_f_Ca_gate__f_Ca;
00404         const double var_L_type_Ca_channel__gamma_Cai = 1.0;
00405         const double var_L_type_Ca_channel__gamma_Cao = 0.341;
00406         const double var_calcium_dynamics__Cao = 1.8;
00407         double var_L_type_Ca_channel__Cao = var_calcium_dynamics__Cao;
00408         double var_L_type_Ca_channel__F = var_membrane__F;
00409         const double var_L_type_Ca_channel__P_Ca = 0.00054;
00410         double var_L_type_Ca_channel__T = var_membrane__T;
00411         double var_L_type_Ca_channel__V = var_membrane__V;
00412         double var_L_type_Ca_channel__R = var_membrane__R;
00413         double var_L_type_Ca_channel__I_CaCa = (((var_L_type_Ca_channel__P_Ca * pow(2.0, 2.0) * var_L_type_Ca_channel__V * pow(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__gamma_Cai * var_L_type_Ca_channel__Cai * exp((2.0 * var_L_type_Ca_channel__V * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__gamma_Cao * var_L_type_Ca_channel__Cao))) / (exp((2.0 * var_L_type_Ca_channel__V * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) - 1.0);
00414         double var_L_type_Ca_channel__i_CaCa = var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f_Ca * var_L_type_Ca_channel__I_CaCa;
00415         const double var_L_type_Ca_channel__P_Na = 6.75e-07;
00416         const double var_L_type_Ca_channel__gamma_Nao = 0.75;
00417         double var_L_type_Ca_channel__Nao = var_ionic_concentrations__Nao;
00418         double var_L_type_Ca_channel__Nai = var_ionic_concentrations__Nai;
00419         const double var_L_type_Ca_channel__gamma_Nai = 0.75;
00420         double var_L_type_Ca_channel__I_CaNa = (((var_L_type_Ca_channel__P_Na * pow(1.0, 2.0) * var_L_type_Ca_channel__V * pow(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__gamma_Nai * var_L_type_Ca_channel__Nai * exp((1.0 * var_L_type_Ca_channel__V * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__gamma_Nao * var_L_type_Ca_channel__Nao))) / (exp((1.0 * var_L_type_Ca_channel__V * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) - 1.0);
00421         double var_L_type_Ca_channel__i_CaNa = var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f_Ca * var_L_type_Ca_channel__I_CaNa;
00422         const double var_ionic_concentrations__Ko = 4.5;
00423         double var_L_type_Ca_channel__Ko = var_ionic_concentrations__Ko;
00424         double var_L_type_Ca_channel__Ki = var_ionic_concentrations__Ki;
00425         const double var_L_type_Ca_channel__P_K = 1.93e-07;
00426         const double var_L_type_Ca_channel__gamma_Ki = 0.75;
00427         const double var_L_type_Ca_channel__gamma_Ko = 0.75;
00428         double var_L_type_Ca_channel__I_CaK = (((var_L_type_Ca_channel__P_K * pow(1.0, 2.0) * var_L_type_Ca_channel__V * pow(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__gamma_Ki * var_L_type_Ca_channel__Ki * exp((1.0 * var_L_type_Ca_channel__V * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__gamma_Ko * var_L_type_Ca_channel__Ko))) / (exp((1.0 * var_L_type_Ca_channel__V * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) - 1.0);
00429         double var_L_type_Ca_channel__i_CaK = var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f_Ca * var_L_type_Ca_channel__I_CaK;
00430         double var_L_type_Ca_channel__i_Ca_L = var_L_type_Ca_channel__i_CaCa + var_L_type_Ca_channel__i_CaK + var_L_type_Ca_channel__i_CaNa;
00431         double var_membrane__i_Ca_L = var_L_type_Ca_channel__i_Ca_L;
00432         double var_T_type_Ca_channel__V = var_membrane__V;
00433         double var_T_type_Ca_channel__g = var_T_type_Ca_channel_g_gate__g;
00434         const double var_T_type_Ca_channel__g_CaT = 0.05;
00435         double var_T_type_Ca_channel__b = var_T_type_Ca_channel_b_gate__b;
00436         double var_calcium_background_current__R = var_membrane__R;
00437         double var_calcium_background_current__Cai = var_calcium_dynamics__Cai;
00438         double var_calcium_background_current__F = var_membrane__F;
00439         double var_calcium_background_current__T = var_membrane__T;
00440         double var_calcium_background_current__Cao = var_calcium_dynamics__Cao;
00441         double var_calcium_background_current__E_Ca = ((var_calcium_background_current__R * var_calcium_background_current__T) / (2.0 * var_calcium_background_current__F)) * log(var_calcium_background_current__Cao / var_calcium_background_current__Cai);
00442         double var_T_type_Ca_channel__E_Ca = var_calcium_background_current__E_Ca;
00443         double var_T_type_Ca_channel__i_Ca_T = var_T_type_Ca_channel__g_CaT * var_T_type_Ca_channel__b * var_T_type_Ca_channel__b * var_T_type_Ca_channel__g * (var_T_type_Ca_channel__V - var_T_type_Ca_channel__E_Ca);
00444         double var_membrane__i_Ca_T = var_T_type_Ca_channel__i_Ca_T;
00445         double var_rapid_delayed_rectifier_potassium_current__Ko = var_ionic_concentrations__Ko;
00446         double var_rapid_delayed_rectifier_potassium_current__g_Kr = 0.02614 * sqrt(var_rapid_delayed_rectifier_potassium_current__Ko / 5.4);
00447         double var_rapid_delayed_rectifier_potassium_current__V = var_membrane__V;
00448         double var_rapid_delayed_rectifier_potassium_current__xr = var_rapid_delayed_rectifier_potassium_current_xr_gate__xr;
00449         double var_rapid_delayed_rectifier_potassium_current__Rect = 1.0 / (1.0 + exp((var_rapid_delayed_rectifier_potassium_current__V + 9.0) / 22.4));
00450         double var_time_independent_potassium_current__Ki = var_ionic_concentrations__Ki;
00451         double var_time_independent_potassium_current__R = var_membrane__R;
00452         double var_time_independent_potassium_current__F = var_membrane__F;
00453         double var_time_independent_potassium_current__Ko = var_ionic_concentrations__Ko;
00454         double var_time_independent_potassium_current__T = var_membrane__T;
00455         double var_time_independent_potassium_current__E_K = ((var_time_independent_potassium_current__R * var_time_independent_potassium_current__T) / var_time_independent_potassium_current__F) * log(var_time_independent_potassium_current__Ko / var_time_independent_potassium_current__Ki);
00456         double var_rapid_delayed_rectifier_potassium_current__E_K = var_time_independent_potassium_current__E_K;
00457         double var_rapid_delayed_rectifier_potassium_current__i_Kr = mScaleFactorGkr*var_rapid_delayed_rectifier_potassium_current__g_Kr * var_rapid_delayed_rectifier_potassium_current__xr * var_rapid_delayed_rectifier_potassium_current__Rect * (var_rapid_delayed_rectifier_potassium_current__V - var_rapid_delayed_rectifier_potassium_current__E_K);
00458         double var_membrane__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00459         double var_slow_delayed_rectifier_potassium_current__xs2 = var_slow_delayed_rectifier_potassium_current_xs2_gate__xs2;
00460         double var_slow_delayed_rectifier_potassium_current__Nai = var_ionic_concentrations__Nai;
00461         double var_slow_delayed_rectifier_potassium_current__Nao = var_ionic_concentrations__Nao;
00462         double var_slow_delayed_rectifier_potassium_current__F = var_membrane__F;
00463         const double var_slow_delayed_rectifier_potassium_current__PNaK = 0.01833;
00464         double var_slow_delayed_rectifier_potassium_current__Ko = var_ionic_concentrations__Ko;
00465         double var_slow_delayed_rectifier_potassium_current__R = var_membrane__R;
00466         double var_slow_delayed_rectifier_potassium_current__T = var_membrane__T;
00467         double var_slow_delayed_rectifier_potassium_current__Ki = var_ionic_concentrations__Ki;
00468         double var_slow_delayed_rectifier_potassium_current__E_Ks = ((var_slow_delayed_rectifier_potassium_current__R * var_slow_delayed_rectifier_potassium_current__T) / var_slow_delayed_rectifier_potassium_current__F) * log((var_slow_delayed_rectifier_potassium_current__Ko + (var_slow_delayed_rectifier_potassium_current__PNaK * var_slow_delayed_rectifier_potassium_current__Nao)) / (var_slow_delayed_rectifier_potassium_current__Ki + (var_slow_delayed_rectifier_potassium_current__PNaK * var_slow_delayed_rectifier_potassium_current__Nai)));
00469         double var_slow_delayed_rectifier_potassium_current__xs1 = var_slow_delayed_rectifier_potassium_current_xs1_gate__xs1;
00470         double var_slow_delayed_rectifier_potassium_current__Cai = var_calcium_dynamics__Cai;
00471         double var_slow_delayed_rectifier_potassium_current__g_Ks = 0.433 * (1.0 + (0.6 / (1.0 + pow(3.8e-05 / var_slow_delayed_rectifier_potassium_current__Cai, 1.4))));
00472         double var_slow_delayed_rectifier_potassium_current__V = var_membrane__V;
00473         double var_slow_delayed_rectifier_potassium_current__i_Ks = mScaleFactorGks*var_slow_delayed_rectifier_potassium_current__g_Ks * var_slow_delayed_rectifier_potassium_current__xs1 * var_slow_delayed_rectifier_potassium_current__xs2 * (var_slow_delayed_rectifier_potassium_current__V - var_slow_delayed_rectifier_potassium_current__E_Ks);
00474         double var_membrane__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00475         double var_sodium_activated_potassium_current__V = var_membrane__V;
00476         double var_sodium_activated_potassium_current__pov = 0.8 - (0.65 / (1.0 + exp((var_sodium_activated_potassium_current__V + 125.0) / 15.0)));
00477         double var_sodium_activated_potassium_current__g_K_Na = 0.0 * 0.12848;
00478         const double var_sodium_activated_potassium_current__nKNa = 2.8;
00479         double var_sodium_activated_potassium_current__Nai = var_ionic_concentrations__Nai;
00480         const double var_sodium_activated_potassium_current__kdKNa = 66.0;
00481         double var_sodium_activated_potassium_current__pona = 0.85 / (1.0 + pow(var_sodium_activated_potassium_current__kdKNa / var_sodium_activated_potassium_current__Nai, var_sodium_activated_potassium_current__nKNa));
00482         double var_sodium_activated_potassium_current__E_K = var_time_independent_potassium_current__E_K;
00483         double var_sodium_activated_potassium_current__i_K_Na = var_sodium_activated_potassium_current__g_K_Na * var_sodium_activated_potassium_current__pona * var_sodium_activated_potassium_current__pov * (var_sodium_activated_potassium_current__V - var_sodium_activated_potassium_current__E_K);
00484         double var_membrane__i_K_Na = var_sodium_activated_potassium_current__i_K_Na;
00485         double var_ATP_sensitive_potassium_current__V = var_membrane__V;
00486         const double var_ATP_sensitive_potassium_current__nATP = 0.24;
00487         const double var_ATP_sensitive_potassium_current__hATP = 2.0;
00488         const double var_ATP_sensitive_potassium_current__ATPi = 3.0;
00489         const double var_ATP_sensitive_potassium_current__kATP = 0.00025;
00490         double var_ATP_sensitive_potassium_current__pATP = 1.0 / (1.0 + pow(var_ATP_sensitive_potassium_current__ATPi / var_ATP_sensitive_potassium_current__kATP, var_ATP_sensitive_potassium_current__hATP));
00491         const double var_ATP_sensitive_potassium_current__i_K_ATP_on = 1.0;
00492         const double var_ATP_sensitive_potassium_current__nicholsarea = 5e-05;
00493         double var_ATP_sensitive_potassium_current__g_K_ATP = (var_ATP_sensitive_potassium_current__i_K_ATP_on * 0.000193) / var_ATP_sensitive_potassium_current__nicholsarea;
00494         double var_ATP_sensitive_potassium_current__Ko = var_ionic_concentrations__Ko;
00495         double var_ATP_sensitive_potassium_current__GKbaraATP = var_ATP_sensitive_potassium_current__g_K_ATP * var_ATP_sensitive_potassium_current__pATP * pow(var_ATP_sensitive_potassium_current__Ko / 4.0, var_ATP_sensitive_potassium_current__nATP);
00496         double var_ATP_sensitive_potassium_current__E_K = var_time_independent_potassium_current__E_K;
00497         double var_ATP_sensitive_potassium_current__i_K_ATP = var_ATP_sensitive_potassium_current__GKbaraATP * (var_ATP_sensitive_potassium_current__V - var_ATP_sensitive_potassium_current__E_K);
00498         double var_membrane__i_K_ATP = var_ATP_sensitive_potassium_current__i_K_ATP;
00499         double var_transient_outward_current__g_to = mScaleFactorIto* 0.5;
00500         double var_transient_outward_current__V = var_membrane__V;
00501         double var_transient_outward_current__E_K = var_time_independent_potassium_current__E_K;
00502         double var_transient_outward_current__zdv = var_transient_outward_current_zdv_gate__zdv;
00503         double var_transient_outward_current__ydv = var_transient_outward_current_ydv_gate__ydv;
00504         double var_transient_outward_current__rvdv = exp(var_transient_outward_current__V / 100.0);
00505         double var_transient_outward_current__i_to = var_transient_outward_current__g_to * pow(var_transient_outward_current__zdv, 3.0) * var_transient_outward_current__ydv * var_transient_outward_current__rvdv * (var_transient_outward_current__V - var_transient_outward_current__E_K);
00506         double var_membrane__i_to = var_transient_outward_current__i_to;
00507         double var_Na_Ca_exchanger__Nao = var_ionic_concentrations__Nao;
00508         double var_Na_Ca_exchanger__F = var_membrane__F;
00509         const double var_Na_Ca_exchanger__gamma = 0.15;
00510         double var_Na_Ca_exchanger__Nai = var_ionic_concentrations__Nai;
00511         const double var_Na_Ca_exchanger__c1 = 0.00025;
00512         const double var_Na_Ca_exchanger__c2 = 0.0001;
00513         double var_Na_Ca_exchanger__T = var_membrane__T;
00514         double var_Na_Ca_exchanger__Cao = var_calcium_dynamics__Cao;
00515         double var_Na_Ca_exchanger__V = var_membrane__V;
00516         double var_Na_Ca_exchanger__R = var_membrane__R;
00517         double var_Na_Ca_exchanger__Cai = var_calcium_dynamics__Cai;
00518         double var_Na_Ca_exchanger__i_NaCa = (var_Na_Ca_exchanger__c1 * exp(((var_Na_Ca_exchanger__gamma - 1.0) * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * ((exp((var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * pow(var_Na_Ca_exchanger__Nai, 3.0) * var_Na_Ca_exchanger__Cao) - (pow(var_Na_Ca_exchanger__Nao, 3.0) * var_Na_Ca_exchanger__Cai))) / (1.0 + (var_Na_Ca_exchanger__c2 * exp(((var_Na_Ca_exchanger__gamma - 1.0) * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * ((exp((var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * pow(var_Na_Ca_exchanger__Nai, 3.0) * var_Na_Ca_exchanger__Cao) + (pow(var_Na_Ca_exchanger__Nao, 3.0) * var_Na_Ca_exchanger__Cai))));
00519         double var_membrane__i_NaCa = var_Na_Ca_exchanger__i_NaCa;
00520         double var_time_independent_potassium_current__V = var_membrane__V;
00521         double var_time_independent_potassium_current_K1_gate__V = var_time_independent_potassium_current__V;
00522         double var_time_independent_potassium_current_K1_gate__E_K = var_time_independent_potassium_current__E_K;
00523         double var_time_independent_potassium_current_K1_gate__beta_K1 = (1000.0 * ((0.49124 * exp(0.08032 * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K) + 5.476))) + exp(0.06175 * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K) - 594.31)))) / (1.0 + exp((-0.5143) * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K) + 4.753)));
00524         double var_time_independent_potassium_current_K1_gate__alpha_K1 = 1020.0 / (1.0 + exp(0.2385 * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K) - 59.215)));
00525         double var_time_independent_potassium_current_K1_gate__K1_infinity = var_time_independent_potassium_current_K1_gate__alpha_K1 / (var_time_independent_potassium_current_K1_gate__alpha_K1 + var_time_independent_potassium_current_K1_gate__beta_K1);
00526         double var_time_independent_potassium_current__K1_infinity = var_time_independent_potassium_current_K1_gate__K1_infinity;
00527         double var_time_independent_potassium_current__g_K1 = 0.75 * sqrt(var_time_independent_potassium_current__Ko / 5.4);
00528         double var_time_independent_potassium_current__i_K1 = var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K1_infinity * (var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K);
00529         double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00530         const double var_plateau_potassium_current__g_Kp = 0.00552;
00531         double var_plateau_potassium_current__V = var_membrane__V;
00532         double var_plateau_potassium_current__Kp = 1.0 / (1.0 + exp((7.488 - var_plateau_potassium_current__V) / 5.98));
00533         double var_plateau_potassium_current__E_K = var_time_independent_potassium_current__E_K;
00534         double var_plateau_potassium_current__i_Kp = var_plateau_potassium_current__g_Kp * var_plateau_potassium_current__Kp * (var_plateau_potassium_current__V - var_plateau_potassium_current__E_K);
00535         double var_membrane__i_Kp = var_plateau_potassium_current__i_Kp;
00536         const double var_sarcolemmal_calcium_pump__I_pCa = 1.15;
00537         double var_sarcolemmal_calcium_pump__Cai = var_calcium_dynamics__Cai;
00538         const double var_sarcolemmal_calcium_pump__K_mpCa = 0.0005;
00539         double var_sarcolemmal_calcium_pump__i_p_Ca = (var_sarcolemmal_calcium_pump__I_pCa * var_sarcolemmal_calcium_pump__Cai) / (var_sarcolemmal_calcium_pump__K_mpCa + var_sarcolemmal_calcium_pump__Cai);
00540         double var_membrane__i_p_Ca = var_sarcolemmal_calcium_pump__i_p_Ca;
00541         const double var_sodium_background_current__g_Nab = 0.004;
00542         double var_sodium_background_current__V = var_membrane__V;
00543         double var_sodium_background_current__E_Na = var_fast_sodium_current__E_Na;
00544         double var_sodium_background_current__i_Na_b = var_sodium_background_current__g_Nab * (var_sodium_background_current__V - var_sodium_background_current__E_Na);
00545         double var_membrane__i_Na_b = var_sodium_background_current__i_Na_b;
00546         const double var_calcium_background_current__g_Cab = 0.003016;
00547         double var_calcium_background_current__V = var_membrane__V;
00548         double var_calcium_background_current__i_Ca_b = var_calcium_background_current__g_Cab * (var_calcium_background_current__V - var_calcium_background_current__E_Ca);
00549         double var_membrane__i_Ca_b = var_calcium_background_current__i_Ca_b;
00550         double var_sodium_potassium_pump__Ko = var_ionic_concentrations__Ko;
00551         const double var_sodium_potassium_pump__K_mNai = 10.0;
00552         double var_sodium_potassium_pump__Nai = var_ionic_concentrations__Nai;
00553         double var_sodium_potassium_pump__V = var_membrane__V;
00554         double var_sodium_potassium_pump__F = var_membrane__F;
00555         double var_sodium_potassium_pump__T = var_membrane__T;
00556         double var_sodium_potassium_pump__Nao = var_ionic_concentrations__Nao;
00557         double var_sodium_potassium_pump__sigma = (1.0 / 7.0) * (exp(var_sodium_potassium_pump__Nao / 67.3) - 1.0);
00558         double var_sodium_potassium_pump__R = var_membrane__R;
00559         double var_sodium_potassium_pump__f_NaK = 1.0 / (1.0 + (0.1245 * exp(((-0.1) * var_sodium_potassium_pump__V * var_sodium_potassium_pump__F) / (var_sodium_potassium_pump__R * var_sodium_potassium_pump__T))) + (0.0365 * var_sodium_potassium_pump__sigma * exp(((-var_sodium_potassium_pump__V) * var_sodium_potassium_pump__F) / (var_sodium_potassium_pump__R * var_sodium_potassium_pump__T))));
00560         const double var_sodium_potassium_pump__I_NaK = 2.25;
00561         const double var_sodium_potassium_pump__K_mKo = 1.5;
00562         double var_sodium_potassium_pump__i_NaK = (((var_sodium_potassium_pump__I_NaK * var_sodium_potassium_pump__f_NaK * 1.0) / (1.0 + pow(var_sodium_potassium_pump__K_mNai / var_sodium_potassium_pump__Nai, 2.0))) * var_sodium_potassium_pump__Ko) / (var_sodium_potassium_pump__Ko + var_sodium_potassium_pump__K_mKo);
00563         double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00564         double var_non_specific_calcium_activated_current__F = var_membrane__F;
00565         double var_non_specific_calcium_activated_current__R = var_membrane__R;
00566         double var_non_specific_calcium_activated_current__T = var_membrane__T;
00567         double var_non_specific_calcium_activated_current__V = var_membrane__V;
00568         double var_non_specific_calcium_activated_current__P_ns_Ca = 0.0 * 1.75e-07;
00569         double var_non_specific_calcium_activated_current__Nao = var_ionic_concentrations__Nao;
00570         double var_non_specific_calcium_activated_current__gamma_Nai = var_L_type_Ca_channel__gamma_Nai;
00571         double var_non_specific_calcium_activated_current__gamma_Nao = var_L_type_Ca_channel__gamma_Nao;
00572         double var_non_specific_calcium_activated_current__Nai = var_ionic_concentrations__Nai;
00573         double var_non_specific_calcium_activated_current__I_ns_Na = (((var_non_specific_calcium_activated_current__P_ns_Ca * pow(1.0, 2.0) * var_non_specific_calcium_activated_current__V * pow(var_non_specific_calcium_activated_current__F, 2.0)) / (var_non_specific_calcium_activated_current__R * var_non_specific_calcium_activated_current__T)) * ((var_non_specific_calcium_activated_current__gamma_Nai * var_non_specific_calcium_activated_current__Nai * exp((1.0 * var_non_specific_calcium_activated_current__V * var_non_specific_calcium_activated_current__F) / (var_non_specific_calcium_activated_current__R * var_non_specific_calcium_activated_current__T))) - (var_non_specific_calcium_activated_current__gamma_Nao * var_non_specific_calcium_activated_current__Nao))) / (exp((1.0 * var_non_specific_calcium_activated_current__V * var_non_specific_calcium_activated_current__F) / (var_non_specific_calcium_activated_current__R * var_non_specific_calcium_activated_current__T)) - 1.0);
00574         const double var_non_specific_calcium_activated_current__K_m_ns_Ca = 0.0012;
00575         double var_non_specific_calcium_activated_current__Cai = var_calcium_dynamics__Cai;
00576         double var_non_specific_calcium_activated_current__i_ns_Na = (var_non_specific_calcium_activated_current__I_ns_Na * 1.0) / (1.0 + pow(var_non_specific_calcium_activated_current__K_m_ns_Ca / var_non_specific_calcium_activated_current__Cai, 3.0));
00577         double var_non_specific_calcium_activated_current__Ko = var_ionic_concentrations__Ko;
00578         double var_non_specific_calcium_activated_current__Ki = var_ionic_concentrations__Ki;
00579         double var_non_specific_calcium_activated_current__gamma_Ko = var_L_type_Ca_channel__gamma_Ko;
00580         double var_non_specific_calcium_activated_current__gamma_Ki = var_L_type_Ca_channel__gamma_Ki;
00581         double var_non_specific_calcium_activated_current__I_ns_K = (((var_non_specific_calcium_activated_current__P_ns_Ca * pow(1.0, 2.0) * var_non_specific_calcium_activated_current__V * pow(var_non_specific_calcium_activated_current__F, 2.0)) / (var_non_specific_calcium_activated_current__R * var_non_specific_calcium_activated_current__T)) * ((var_non_specific_calcium_activated_current__gamma_Ki * var_non_specific_calcium_activated_current__Ki * exp((1.0 * var_non_specific_calcium_activated_current__V * var_non_specific_calcium_activated_current__F) / (var_non_specific_calcium_activated_current__R * var_non_specific_calcium_activated_current__T))) - (var_non_specific_calcium_activated_current__gamma_Ko * var_non_specific_calcium_activated_current__Ko))) / (exp((1.0 * var_non_specific_calcium_activated_current__V * var_non_specific_calcium_activated_current__F) / (var_non_specific_calcium_activated_current__R * var_non_specific_calcium_activated_current__T)) - 1.0);
00582         double var_non_specific_calcium_activated_current__i_ns_K = (var_non_specific_calcium_activated_current__I_ns_K * 1.0) / (1.0 + pow(var_non_specific_calcium_activated_current__K_m_ns_Ca / var_non_specific_calcium_activated_current__Cai, 3.0));
00583         double var_non_specific_calcium_activated_current__i_ns_Ca = var_non_specific_calcium_activated_current__i_ns_Na + var_non_specific_calcium_activated_current__i_ns_K;
00584         double var_membrane__i_ns_Ca = var_non_specific_calcium_activated_current__i_ns_Ca;
00585         double var_membrane__dVdt = ((-1.0) / var_membrane__Cm) * (var_membrane__i_Na + var_membrane__i_Ca_L + var_membrane__i_Ca_T + var_membrane__i_Kr + var_membrane__i_Ks + var_membrane__i_K_Na + var_membrane__i_K_ATP + var_membrane__i_to + var_membrane__i_K1 + var_membrane__i_Kp + var_membrane__i_NaCa + var_membrane__i_p_Ca + var_membrane__i_Na_b + var_membrane__i_Ca_b + var_membrane__i_NaK + var_membrane__i_ns_Ca + var_membrane__I_st);
00586         double var_fast_sodium_current_m_gate__V = var_fast_sodium_current__V;
00587         double var_fast_sodium_current_m_gate__E0_m = var_fast_sodium_current_m_gate__V + 47.13;
00588         const double var_fast_sodium_current_m_gate__delta_m = 1e-05;
00589         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) ? ((320.0 * var_fast_sodium_current_m_gate__E0_m) / (1.0 - exp((-0.1) * var_fast_sodium_current_m_gate__E0_m))) : 3200.0;
00590         double var_fast_sodium_current_m_gate__beta_m = 80.0 * exp((-var_fast_sodium_current_m_gate__V) / 11.0);
00591         double var_fast_sodium_current_h_gate__V = var_fast_sodium_current__V;
00592         double var_fast_sodium_current_h_gate__alpha_h = (var_fast_sodium_current_h_gate__V < (-40.0)) ? (135.0 * exp((80.0 + var_fast_sodium_current_h_gate__V) / (-6.8))) : 0.0;
00593         double var_fast_sodium_current_h_gate__beta_h = (var_fast_sodium_current_h_gate__V < (-40.0)) ? ((3560.0 * exp(0.079 * var_fast_sodium_current_h_gate__V)) + (310000000.0 * exp(0.35 * var_fast_sodium_current_h_gate__V))) : (1000.0 / (0.13 * (1.0 + exp((var_fast_sodium_current_h_gate__V + 10.66) / (-11.1)))));
00594         double var_fast_sodium_current_j_gate__V = var_fast_sodium_current__V;
00595         double var_fast_sodium_current_j_gate__alpha_j = (var_fast_sodium_current_j_gate__V < (-40.0)) ? ((1000.0 * (-((127140.0 * exp(0.2444 * var_fast_sodium_current_j_gate__V)) + (3.474e-05 * exp((-0.04391) * var_fast_sodium_current_j_gate__V)))) * (var_fast_sodium_current_j_gate__V + 37.78)) / (1.0 + exp(0.311 * (var_fast_sodium_current_j_gate__V + 79.23)))) : 0.0;
00596         double var_fast_sodium_current_j_gate__beta_j = (var_fast_sodium_current_j_gate__V < (-40.0)) ? ((121.2 * exp((-0.01052) * var_fast_sodium_current_j_gate__V)) / (1.0 + exp((-0.1378) * (var_fast_sodium_current_j_gate__V + 40.14)))) : ((300.0 * exp((-2.535e-07) * var_fast_sodium_current_j_gate__V)) / (1.0 + exp((-0.1) * (var_fast_sodium_current_j_gate__V + 32.0))));
00597         double var_L_type_Ca_channel_d_gate__V = var_L_type_Ca_channel__V;
00598         double var_L_type_Ca_channel_d_gate__E0_d = var_L_type_Ca_channel_d_gate__V + 10.0;
00599         double var_L_type_Ca_channel_d_gate__d_infinity = 1.0 / (1.0 + exp((-var_L_type_Ca_channel_d_gate__E0_d) / 6.24));
00600         double var_L_type_Ca_channel_d_gate__tau_d = (fabs(var_L_type_Ca_channel_d_gate__E0_d) < 1e-05) ? (0.001 / (0.035 * 6.24)) : ((0.001 * var_L_type_Ca_channel_d_gate__d_infinity * (1.0 - exp((-var_L_type_Ca_channel_d_gate__E0_d) / 6.24))) / (0.035 * var_L_type_Ca_channel_d_gate__E0_d));
00601         double var_L_type_Ca_channel_d_gate__alpha_d = var_L_type_Ca_channel_d_gate__d_infinity / var_L_type_Ca_channel_d_gate__tau_d;
00602         double var_L_type_Ca_channel_d_gate__beta_d = (1.0 - var_L_type_Ca_channel_d_gate__d_infinity) / var_L_type_Ca_channel_d_gate__tau_d;
00603         double var_L_type_Ca_channel_f_gate__V = var_L_type_Ca_channel__V;
00604         double var_L_type_Ca_channel_f_gate__f_infinity = (1.0 / (1.0 + exp((var_L_type_Ca_channel_f_gate__V + 32.0) / 8.0))) + (0.6 / (1.0 + exp((50.0 - var_L_type_Ca_channel_f_gate__V) / 20.0)));
00605         double var_L_type_Ca_channel_f_gate__tau_f = 0.001 / ((0.0197 * exp(-pow(0.0337 * (var_L_type_Ca_channel_f_gate__V + 10.0), 2.0))) + 0.02);
00606         double var_L_type_Ca_channel_f_gate__alpha_f = var_L_type_Ca_channel_f_gate__f_infinity / var_L_type_Ca_channel_f_gate__tau_f;
00607         double var_L_type_Ca_channel_f_gate__beta_f = (1.0 - var_L_type_Ca_channel_f_gate__f_infinity) / var_L_type_Ca_channel_f_gate__tau_f;
00608         double var_T_type_Ca_channel_b_gate__V = var_T_type_Ca_channel__V;
00609         double var_T_type_Ca_channel_b_gate__b_inf = 1.0 / (1.0 + exp((-(var_T_type_Ca_channel_b_gate__V + 14.0)) / 10.8));
00610         double var_T_type_Ca_channel_b_gate__tau_b = 0.0037 + (0.0061 / (1.0 + exp((var_T_type_Ca_channel_b_gate__V + 25.0) / 4.5)));
00611         double var_T_type_Ca_channel_g_gate__V = var_T_type_Ca_channel__V;
00612         double var_T_type_Ca_channel_g_gate__g_inf = 1.0 / (1.0 + exp((var_T_type_Ca_channel_g_gate__V + 60.0) / 5.6));
00613         double var_T_type_Ca_channel_g_gate__tau_g = (var_T_type_Ca_channel_g_gate__V <= 0.0) ? (((-0.000875) * var_T_type_Ca_channel_g_gate__V) + 0.012) : 0.012;
00614         double var_rapid_delayed_rectifier_potassium_current_xr_gate__V = var_rapid_delayed_rectifier_potassium_current__V;
00615         double var_rapid_delayed_rectifier_potassium_current_xr_gate__xr_infinity = 1.0 / (1.0 + exp((-(var_rapid_delayed_rectifier_potassium_current_xr_gate__V + 21.5)) / 7.5));
00616         double var_rapid_delayed_rectifier_potassium_current_xr_gate__tau_xr = 0.001 / (((0.00138 * (var_rapid_delayed_rectifier_potassium_current_xr_gate__V + 14.2)) / (1.0 - exp((-0.123) * (var_rapid_delayed_rectifier_potassium_current_xr_gate__V + 14.2)))) + ((0.00061 * (var_rapid_delayed_rectifier_potassium_current_xr_gate__V + 38.9)) / (exp(0.145 * (var_rapid_delayed_rectifier_potassium_current_xr_gate__V + 38.9)) - 1.0)));
00617         double var_slow_delayed_rectifier_potassium_current_xs1_gate__V = var_slow_delayed_rectifier_potassium_current__V;
00618         double var_slow_delayed_rectifier_potassium_current_xs1_gate__xs1_infinity = 1.0 / (1.0 + exp((-(var_slow_delayed_rectifier_potassium_current_xs1_gate__V - 1.5)) / 16.7));
00619         double var_slow_delayed_rectifier_potassium_current_xs1_gate__tau_xs1 = 0.001 / (((7.19e-05 * (var_slow_delayed_rectifier_potassium_current_xs1_gate__V + 30.0)) / (1.0 - exp((-0.148) * (var_slow_delayed_rectifier_potassium_current_xs1_gate__V + 30.0)))) + ((0.000131 * (var_slow_delayed_rectifier_potassium_current_xs1_gate__V + 30.0)) / (exp(0.0687 * (var_slow_delayed_rectifier_potassium_current_xs1_gate__V + 30.0)) - 1.0)));
00620         double var_slow_delayed_rectifier_potassium_current_xs2_gate__V = var_slow_delayed_rectifier_potassium_current__V;
00621         double var_slow_delayed_rectifier_potassium_current_xs2_gate__xs2_infinity = 1.0 / (1.0 + exp((-(var_slow_delayed_rectifier_potassium_current_xs2_gate__V - 1.5)) / 16.7));
00622         double var_slow_delayed_rectifier_potassium_current_xs2_gate__tau_xs2 = (4.0 * 0.001) / (((7.19e-05 * (var_slow_delayed_rectifier_potassium_current_xs2_gate__V + 30.0)) / (1.0 - exp((-0.148) * (var_slow_delayed_rectifier_potassium_current_xs2_gate__V + 30.0)))) + ((0.000131 * (var_slow_delayed_rectifier_potassium_current_xs2_gate__V + 30.0)) / (exp(0.0687 * (var_slow_delayed_rectifier_potassium_current_xs2_gate__V + 30.0)) - 1.0)));
00623         double var_transient_outward_current_zdv_gate__V = var_transient_outward_current__V;
00624         double var_transient_outward_current_zdv_gate__alpha_zdv = (10000.0 * exp((var_transient_outward_current_zdv_gate__V - 40.0) / 25.0)) / (1.0 + exp((var_transient_outward_current_zdv_gate__V - 40.0) / 25.0));
00625         double var_transient_outward_current_zdv_gate__beta_zdv = (10000.0 * exp((-(var_transient_outward_current_zdv_gate__V + 90.0)) / 25.0)) / (1.0 + exp((-(var_transient_outward_current_zdv_gate__V + 90.0)) / 25.0));
00626         double var_transient_outward_current_zdv_gate__tau_zdv = 1.0 / (var_transient_outward_current_zdv_gate__alpha_zdv + var_transient_outward_current_zdv_gate__beta_zdv);
00627         double var_transient_outward_current_zdv_gate__zdv_ss = var_transient_outward_current_zdv_gate__alpha_zdv / (var_transient_outward_current_zdv_gate__alpha_zdv + var_transient_outward_current_zdv_gate__beta_zdv);
00628         double var_transient_outward_current_ydv_gate__V = var_transient_outward_current__V;
00629         double var_transient_outward_current_ydv_gate__alpha_ydv = 15.0 / (1.0 + exp((var_transient_outward_current_ydv_gate__V + 60.0) / 5.0));
00630         double var_transient_outward_current_ydv_gate__beta_ydv = (100.0 * exp((var_transient_outward_current_ydv_gate__V + 25.0) / 5.0)) / (1.0 + exp((var_transient_outward_current_ydv_gate__V + 25.0) / 5.0));
00631         double var_transient_outward_current_ydv_gate__tau_ydv = 1.0 / (var_transient_outward_current_ydv_gate__alpha_ydv + var_transient_outward_current_ydv_gate__beta_ydv);
00632         double var_transient_outward_current_ydv_gate__ydv_ss = var_transient_outward_current_ydv_gate__alpha_ydv / (var_transient_outward_current_ydv_gate__alpha_ydv + var_transient_outward_current_ydv_gate__beta_ydv);
00633         const double var_calcium_dynamics__delta_Ca_ith = 0.00018;
00634         const double var_calcium_dynamics__K_mrel = 0.0008;
00635         const double var_calcium_dynamics__G_rel_max = 60000.0;
00636         const double var_calcium_dynamics__G_rel_overload = 4000.0;
00637         double var_calcium_dynamics__G_rel = (var_calcium_dynamics__Cainfluxtrack > var_calcium_dynamics__delta_Ca_ith) ? (((var_calcium_dynamics__G_rel_max * (var_calcium_dynamics__Cainfluxtrack - var_calcium_dynamics__delta_Ca_ith)) / ((var_calcium_dynamics__K_mrel + var_calcium_dynamics__Cainfluxtrack) - var_calcium_dynamics__delta_Ca_ith)) * (1.0 - var_calcium_dynamics__APtrack2) * var_calcium_dynamics__APtrack2) : ((var_calcium_dynamics__Cainfluxtrack <= var_calcium_dynamics__delta_Ca_ith) && (var_calcium_dynamics__OVRLDtrack2 > 0.0)) ? (var_calcium_dynamics__G_rel_overload * (1.0 - var_calcium_dynamics__OVRLDtrack2) * var_calcium_dynamics__OVRLDtrack2) : 0.0;
00638         double var_calcium_dynamics__i_rel = var_calcium_dynamics__G_rel * (var_calcium_dynamics__Ca_JSR - var_calcium_dynamics__Cai);
00639         const double var_calcium_dynamics__K_mup = 0.00092;
00640         const double var_calcium_dynamics__I_up = 8.75;
00641         double var_calcium_dynamics__i_up = (var_calcium_dynamics__I_up * var_calcium_dynamics__Cai) / (var_calcium_dynamics__Cai + var_calcium_dynamics__K_mup);
00642         const double var_calcium_dynamics__Ca_NSR_max = 15.0;
00643         double var_calcium_dynamics__K_leak = var_calcium_dynamics__I_up / var_calcium_dynamics__Ca_NSR_max;
00644         double var_calcium_dynamics__i_leak = var_calcium_dynamics__K_leak * var_calcium_dynamics__Ca_NSR;
00645         const double var_calcium_dynamics__tau_tr = 0.18;
00646         double var_calcium_dynamics__i_tr = (var_calcium_dynamics__Ca_NSR - var_calcium_dynamics__Ca_JSR) / var_calcium_dynamics__tau_tr;
00647         const double var_calcium_dynamics__CSQN_max = 10.0;
00648         const double var_calcium_dynamics__K_mCSQN = 0.8;
00649         double var_calcium_dynamics__F = var_membrane__F;
00650         const double var_ionic_concentrations__preplength = 0.001;
00651         const double var_ionic_concentrations__radius = 0.00011;
00652         double var_ionic_concentrations__volume = M_PI * var_ionic_concentrations__preplength * pow(var_ionic_concentrations__radius, 2.0);
00653         double var_ionic_concentrations__V_myo = 0.68 * var_ionic_concentrations__volume;
00654         double var_calcium_dynamics__V_myo = var_ionic_concentrations__V_myo;
00655         const double var_ionic_concentrations__A_cap = 1.434e-07;
00656         double var_calcium_dynamics__A_cap = var_ionic_concentrations__A_cap;
00657         double var_calcium_dynamics__V_JSR = (0.0048 / 0.68) * var_calcium_dynamics__V_myo;
00658         double var_calcium_dynamics__V_NSR = (0.0552 / 0.68) * var_calcium_dynamics__V_myo;
00659         double var_calcium_dynamics__i_NaCa = var_Na_Ca_exchanger__i_NaCa;
00660         double var_calcium_dynamics__i_CaCa = var_L_type_Ca_channel__i_CaCa;
00661         double var_calcium_dynamics__i_p_Ca = var_sarcolemmal_calcium_pump__i_p_Ca;
00662         double var_calcium_dynamics__i_Ca_b = var_calcium_background_current__i_Ca_b;
00663         double var_calcium_dynamics__i_Ca_T = var_T_type_Ca_channel__i_Ca_T;
00664         const double var_calcium_dynamics__K_mTn = 0.0005;
00665         const double var_calcium_dynamics__K_mCMDN = 0.00238;
00666         const double var_calcium_dynamics__Tn_max = 0.07;
00667         const double var_calcium_dynamics__CMDN_max = 0.05;
00668         double var_calcium_dynamics__dVdt = var_membrane__dVdt;
00669         const double var_calcium_dynamics__CSQNthresh = 0.7;
00670         const double var_calcium_dynamics__Logicthresh = 0.98;
00671         double var_ionic_concentrations__F = var_membrane__F;
00672         double var_ionic_concentrations__i_Na = var_fast_sodium_current__i_Na;
00673         double var_ionic_concentrations__i_CaNa = var_L_type_Ca_channel__i_CaNa;
00674         double var_ionic_concentrations__i_Na_b = var_sodium_background_current__i_Na_b;
00675         double var_ionic_concentrations__i_ns_Na = var_non_specific_calcium_activated_current__i_ns_Na;
00676         double var_ionic_concentrations__i_NaCa = var_Na_Ca_exchanger__i_NaCa;
00677         double var_ionic_concentrations__i_NaK = var_sodium_potassium_pump__i_NaK;
00678         double var_ionic_concentrations__i_CaK = var_L_type_Ca_channel__i_CaK;
00679         double var_ionic_concentrations__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00680         double var_ionic_concentrations__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00681         double var_ionic_concentrations__i_K1 = var_time_independent_potassium_current__i_K1;
00682         double var_ionic_concentrations__i_Kp = var_plateau_potassium_current__i_Kp;
00683         double var_ionic_concentrations__i_K_Na = var_sodium_activated_potassium_current__i_K_Na;
00684         double var_ionic_concentrations__i_K_ATP = var_ATP_sensitive_potassium_current__i_K_ATP;
00685         double var_ionic_concentrations__i_ns_K = var_non_specific_calcium_activated_current__i_ns_K;
00686         double var_ionic_concentrations__i_to = var_transient_outward_current__i_to;
00687         double d_dt_membrane__V;
00688         if (mSetVoltageDerivativeToZero)
00689         {
00690             d_dt_membrane__V = 0.0;
00691         }
00692         else
00693         {
00694             d_dt_membrane__V = ((-1.0) / var_membrane__Cm) * (var_membrane__i_Na + var_membrane__i_Ca_L + var_membrane__i_Ca_T + var_membrane__i_Kr + var_membrane__i_Ks + var_membrane__i_K_Na + var_membrane__i_K_ATP + var_membrane__i_to + var_membrane__i_K1 + var_membrane__i_Kp + var_membrane__i_NaCa + var_membrane__i_p_Ca + var_membrane__i_Na_b + var_membrane__i_Ca_b + var_membrane__i_NaK + var_membrane__i_ns_Ca + var_membrane__I_st);
00695         }
00696         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);
00697         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);
00698         double d_dt_fast_sodium_current_j_gate__j = (var_fast_sodium_current_j_gate__alpha_j * (1.0 - var_fast_sodium_current_j_gate__j)) - (var_fast_sodium_current_j_gate__beta_j * var_fast_sodium_current_j_gate__j);
00699         double d_dt_L_type_Ca_channel_d_gate__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);
00700         double d_dt_L_type_Ca_channel_f_gate__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);
00701         double d_dt_T_type_Ca_channel_b_gate__b = (var_T_type_Ca_channel_b_gate__b_inf - var_T_type_Ca_channel_b_gate__b) / var_T_type_Ca_channel_b_gate__tau_b;
00702         double d_dt_T_type_Ca_channel_g_gate__g = (var_T_type_Ca_channel_g_gate__g_inf - var_T_type_Ca_channel_g_gate__g) / var_T_type_Ca_channel_g_gate__tau_g;
00703         double d_dt_rapid_delayed_rectifier_potassium_current_xr_gate__xr = (var_rapid_delayed_rectifier_potassium_current_xr_gate__xr_infinity - var_rapid_delayed_rectifier_potassium_current_xr_gate__xr) / var_rapid_delayed_rectifier_potassium_current_xr_gate__tau_xr;
00704         double d_dt_slow_delayed_rectifier_potassium_current_xs1_gate__xs1 = (var_slow_delayed_rectifier_potassium_current_xs1_gate__xs1_infinity - var_slow_delayed_rectifier_potassium_current_xs1_gate__xs1) / var_slow_delayed_rectifier_potassium_current_xs1_gate__tau_xs1;
00705         double d_dt_slow_delayed_rectifier_potassium_current_xs2_gate__xs2 = (var_slow_delayed_rectifier_potassium_current_xs2_gate__xs2_infinity - var_slow_delayed_rectifier_potassium_current_xs2_gate__xs2) / var_slow_delayed_rectifier_potassium_current_xs2_gate__tau_xs2;
00706         double d_dt_transient_outward_current_zdv_gate__zdv = (var_transient_outward_current_zdv_gate__zdv_ss - var_transient_outward_current_zdv_gate__zdv) / var_transient_outward_current_zdv_gate__tau_zdv;
00707         double d_dt_transient_outward_current_ydv_gate__ydv = (var_transient_outward_current_ydv_gate__ydv_ss - var_transient_outward_current_ydv_gate__ydv) / var_transient_outward_current_ydv_gate__tau_ydv;
00708         double d_dt_calcium_dynamics__APtrack = (var_calcium_dynamics__dVdt > 150000.0) ? ((100000.0 * (1.0 - var_calcium_dynamics__APtrack)) - (500.0 * var_calcium_dynamics__APtrack)) : ((-500.0) * var_calcium_dynamics__APtrack);
00709         double d_dt_calcium_dynamics__APtrack2 = ((var_calcium_dynamics__APtrack < 0.2) && (var_calcium_dynamics__APtrack > 0.18)) ? ((100000.0 * (1.0 - var_calcium_dynamics__APtrack2)) - (500.0 * var_calcium_dynamics__APtrack2)) : ((-500.0) * var_calcium_dynamics__APtrack2);
00710         double d_dt_calcium_dynamics__APtrack3 = ((var_calcium_dynamics__APtrack < 0.2) && (var_calcium_dynamics__APtrack > 0.18)) ? ((100000.0 * (1.0 - var_calcium_dynamics__APtrack3)) - (500.0 * var_calcium_dynamics__APtrack3)) : ((-10.0) * var_calcium_dynamics__APtrack3);
00711         double d_dt_calcium_dynamics__Cainfluxtrack = (var_calcium_dynamics__APtrack > 0.2) ? (((-var_calcium_dynamics__A_cap) * (((var_calcium_dynamics__i_CaCa + var_calcium_dynamics__i_Ca_T) - var_calcium_dynamics__i_NaCa) + var_calcium_dynamics__i_p_Ca + var_calcium_dynamics__i_Ca_b)) / (2.0 * var_calcium_dynamics__V_myo * var_calcium_dynamics__F)) : ((var_calcium_dynamics__APtrack2 > 0.01) && (var_calcium_dynamics__APtrack <= 0.2)) ? 0.0 : ((-500.0) * var_calcium_dynamics__Cainfluxtrack);
00712         double d_dt_calcium_dynamics__OVRLDtrack = (((1.0 / (1.0 + (var_calcium_dynamics__K_mCSQN / var_calcium_dynamics__Ca_JSR))) > var_calcium_dynamics__CSQNthresh) && (var_calcium_dynamics__OVRLDtrack3 < 0.37) && (var_calcium_dynamics__APtrack3 < 0.37)) ? (50000.0 * (1.0 - var_calcium_dynamics__OVRLDtrack)) : ((-500.0) * var_calcium_dynamics__OVRLDtrack);
00713         double d_dt_calcium_dynamics__OVRLDtrack2 = ((var_calcium_dynamics__OVRLDtrack > var_calcium_dynamics__Logicthresh) && (var_calcium_dynamics__OVRLDtrack2 < var_calcium_dynamics__Logicthresh)) ? (50000.0 * (1.0 - var_calcium_dynamics__OVRLDtrack2)) : ((-500.0) * var_calcium_dynamics__OVRLDtrack2);
00714         double d_dt_calcium_dynamics__OVRLDtrack3 = ((var_calcium_dynamics__OVRLDtrack > var_calcium_dynamics__Logicthresh) && (var_calcium_dynamics__OVRLDtrack3 < var_calcium_dynamics__Logicthresh)) ? (50000.0 * (1.0 - var_calcium_dynamics__OVRLDtrack3)) : ((-10.0) * var_calcium_dynamics__OVRLDtrack3);
00715         double d_dt_calcium_dynamics__Ca_JSR = (1.0 / (1.0 + ((var_calcium_dynamics__CSQN_max * var_calcium_dynamics__K_mCSQN) / pow(var_calcium_dynamics__K_mCSQN + var_calcium_dynamics__Ca_JSR, 2.0)))) * (var_calcium_dynamics__i_tr - var_calcium_dynamics__i_rel);
00716         double d_dt_calcium_dynamics__Ca_NSR = ((((-var_calcium_dynamics__i_tr) * var_calcium_dynamics__V_JSR) / var_calcium_dynamics__V_NSR) - var_calcium_dynamics__i_leak) + var_calcium_dynamics__i_up;
00717         double d_dt_calcium_dynamics__Cai = (1.0 / (1.0 + ((var_calcium_dynamics__CMDN_max * var_calcium_dynamics__K_mCMDN) / pow(var_calcium_dynamics__K_mCMDN + var_calcium_dynamics__Cai, 2.0)) + ((var_calcium_dynamics__Tn_max * var_calcium_dynamics__K_mTn) / pow(var_calcium_dynamics__K_mTn + var_calcium_dynamics__Cai, 2.0)))) * ((((-var_calcium_dynamics__A_cap) * (((var_calcium_dynamics__i_CaCa + var_calcium_dynamics__i_Ca_T) - (2.0 * var_calcium_dynamics__i_NaCa)) + var_calcium_dynamics__i_p_Ca + var_calcium_dynamics__i_Ca_b)) / (2.0 * var_calcium_dynamics__V_myo * var_calcium_dynamics__F)) + ((var_calcium_dynamics__i_rel * var_calcium_dynamics__V_JSR) / var_calcium_dynamics__V_myo) + (((var_calcium_dynamics__i_leak - var_calcium_dynamics__i_up) * var_calcium_dynamics__V_NSR) / var_calcium_dynamics__V_myo));
00718         double d_dt_ionic_concentrations__Nai = ((-(var_ionic_concentrations__i_Na + var_ionic_concentrations__i_CaNa + var_ionic_concentrations__i_Na_b + var_ionic_concentrations__i_ns_Na + (var_ionic_concentrations__i_NaCa * 3.0) + (var_ionic_concentrations__i_NaK * 3.0))) * var_ionic_concentrations__A_cap) / (var_ionic_concentrations__V_myo * var_ionic_concentrations__F);
00719         double d_dt_ionic_concentrations__Ki = ((-(var_ionic_concentrations__i_CaK + var_ionic_concentrations__i_Kr + var_ionic_concentrations__i_Ks + var_ionic_concentrations__i_K1 + var_ionic_concentrations__i_Kp + var_ionic_concentrations__i_K_Na + var_ionic_concentrations__i_K_ATP + var_ionic_concentrations__i_to + var_ionic_concentrations__i_ns_K + ((-var_ionic_concentrations__i_NaK) * 2.0))) * var_ionic_concentrations__A_cap) / (var_ionic_concentrations__V_myo * var_ionic_concentrations__F);
00720 
00721         rDY[0] = d_dt_membrane__V*1e-3;
00722         rDY[1] = d_dt_fast_sodium_current_m_gate__m*1e-3;
00723         rDY[2] = d_dt_fast_sodium_current_h_gate__h*1e-3;
00724         rDY[3] = d_dt_fast_sodium_current_j_gate__j*1e-3;
00725         rDY[4] = d_dt_L_type_Ca_channel_d_gate__d*1e-3;
00726         rDY[5] = d_dt_L_type_Ca_channel_f_gate__f*1e-3;
00727         rDY[6] = d_dt_T_type_Ca_channel_b_gate__b*1e-3;
00728         rDY[7] = d_dt_T_type_Ca_channel_g_gate__g*1e-3;
00729         rDY[8] = d_dt_rapid_delayed_rectifier_potassium_current_xr_gate__xr*1e-3;
00730         rDY[9] = d_dt_slow_delayed_rectifier_potassium_current_xs1_gate__xs1*1e-3;
00731         rDY[10] = d_dt_slow_delayed_rectifier_potassium_current_xs2_gate__xs2*1e-3;
00732         rDY[11] = d_dt_transient_outward_current_zdv_gate__zdv*1e-3;
00733         rDY[12] = d_dt_transient_outward_current_ydv_gate__ydv*1e-3;
00734         rDY[13] = d_dt_calcium_dynamics__Cai*1e-3;
00735         rDY[14] = d_dt_calcium_dynamics__Ca_JSR*1e-3;
00736         rDY[15] = d_dt_calcium_dynamics__Ca_NSR*1e-3;
00737         rDY[16] = d_dt_calcium_dynamics__APtrack*1e-3;
00738         rDY[17] = d_dt_calcium_dynamics__APtrack2*1e-3;
00739         rDY[18] = d_dt_calcium_dynamics__APtrack3*1e-3;
00740         rDY[19] = d_dt_calcium_dynamics__Cainfluxtrack*1e-3;
00741         rDY[20] = d_dt_calcium_dynamics__OVRLDtrack*1e-3;
00742         rDY[21] = d_dt_calcium_dynamics__OVRLDtrack2*1e-3;
00743         rDY[22] = d_dt_calcium_dynamics__OVRLDtrack3*1e-3;
00744         rDY[23] = d_dt_ionic_concentrations__Nai*1e-3;
00745         rDY[24] = d_dt_ionic_concentrations__Ki*1e-3;
00746     }
00747 
00748 };
00749 
00750 
00751 
00752 template<>
00753 void OdeSystemInformation<FaberRudy2000Version3>::Initialise(void)
00754 {
00755     // Time units: second
00756     this->mVariableNames.push_back("V");
00757     this->mVariableUnits.push_back("millivolt");
00758     this->mInitialConditions.push_back(-90);
00759 
00760     this->mVariableNames.push_back("m");
00761     this->mVariableUnits.push_back("dimensionless");
00762     this->mInitialConditions.push_back(0.0008);
00763 
00764     this->mVariableNames.push_back("h");
00765     this->mVariableUnits.push_back("dimensionless");
00766     this->mInitialConditions.push_back(0.993771);
00767 
00768     this->mVariableNames.push_back("j");
00769     this->mVariableUnits.push_back("dimensionless");
00770     this->mInitialConditions.push_back(0.995727);
00771 
00772     this->mVariableNames.push_back("d");
00773     this->mVariableUnits.push_back("dimensionless");
00774     this->mInitialConditions.push_back(3.210618e-6);
00775 
00776     this->mVariableNames.push_back("f");
00777     this->mVariableUnits.push_back("dimensionless");
00778     this->mInitialConditions.push_back(0.999837);
00779 
00780     this->mVariableNames.push_back("b");
00781     this->mVariableUnits.push_back("dimensionless");
00782     this->mInitialConditions.push_back(0.000970231);
00783 
00784     this->mVariableNames.push_back("g");
00785     this->mVariableUnits.push_back("dimensionless");
00786     this->mInitialConditions.push_back(0.994305);
00787 
00788     this->mVariableNames.push_back("xr");
00789     this->mVariableUnits.push_back("dimensionless");
00790     this->mInitialConditions.push_back(0.000124042);
00791 
00792     this->mVariableNames.push_back("xs1");
00793     this->mVariableUnits.push_back("dimensionless");
00794     this->mInitialConditions.push_back(0.00445683);
00795 
00796     this->mVariableNames.push_back("xs2");
00797     this->mVariableUnits.push_back("dimensionless");
00798     this->mInitialConditions.push_back(0.00445683);
00799 
00800     this->mVariableNames.push_back("zdv");
00801     this->mVariableUnits.push_back("dimensionless");
00802     this->mInitialConditions.push_back(0.5);
00803 
00804     this->mVariableNames.push_back("ydv");
00805     this->mVariableUnits.push_back("dimensionless");
00806     this->mInitialConditions.push_back(0.5);
00807 
00808     this->mVariableNames.push_back("CaI");
00809     this->mVariableUnits.push_back("millimolar");
00810     this->mInitialConditions.push_back(6e-5);
00811 
00812     this->mVariableNames.push_back("Ca_JSR");
00813     this->mVariableUnits.push_back("millimolar");
00814     this->mInitialConditions.push_back(1.8);
00815 
00816     this->mVariableNames.push_back("Ca_NSR");
00817     this->mVariableUnits.push_back("millimolar");
00818     this->mInitialConditions.push_back(1.8);
00819 
00820     this->mVariableNames.push_back("APtrack");
00821     this->mVariableUnits.push_back("dimensionless");
00822     this->mInitialConditions.push_back(0);
00823 
00824     this->mVariableNames.push_back("APtrack2");
00825     this->mVariableUnits.push_back("dimensionless");
00826     this->mInitialConditions.push_back(0);
00827 
00828     this->mVariableNames.push_back("APtrack3");
00829     this->mVariableUnits.push_back("dimensionless");
00830     this->mInitialConditions.push_back(0);
00831 
00832     this->mVariableNames.push_back("Cainfluxtrack");
00833     this->mVariableUnits.push_back("dimensionless");
00834     this->mInitialConditions.push_back(0);
00835 
00836     this->mVariableNames.push_back("OVRLDtrack");
00837     this->mVariableUnits.push_back("dimensionless");
00838     this->mInitialConditions.push_back(0);
00839 
00840     this->mVariableNames.push_back("OVRLDtrack2");
00841     this->mVariableUnits.push_back("dimensionless");
00842     this->mInitialConditions.push_back(0);
00843 
00844     this->mVariableNames.push_back("OVRLDtrack3");
00845     this->mVariableUnits.push_back("dimensionless");
00846     this->mInitialConditions.push_back(0);
00847 
00848     this->mVariableNames.push_back("Nai");
00849     this->mVariableUnits.push_back("millimolar");
00850     this->mInitialConditions.push_back(9);
00851 
00852     this->mVariableNames.push_back("Ki");
00853     this->mVariableUnits.push_back("millimolar");
00854     this->mInitialConditions.push_back(141.2);
00855 
00856     this->mInitialised = true;
00857 }
00858 
00859 
00860 
00861 #endif

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