FaberRudy2000Version3.cpp

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

Generated on Wed Mar 18 12:51:51 2009 for Chaste by  doxygen 1.5.5