FaberRudy2000Version3Optimised.cpp

Go to the documentation of this file.
00001 
00012 #include "FaberRudy2000Version3Optimised.hpp"
00013 
00014 
00015 FaberRudy2000Version3OptimisedLookupTables::FaberRudy2000Version3OptimisedLookupTables()
00016 {
00017     assert(mpInstance == NULL);
00018     for (int i=0; i<20001; i++)
00019     {
00020         double var_membrane__V = -100.0001 + i*0.01;
00021         _lookup_table_0[i][0] = 80.0 * exp((-var_membrane__V) * 0.0909090909091);
00022     }
00023 
00024     for (int i=0; i<20001; i++)
00025     {
00026         double var_membrane__V = -100.0001 + i*0.01;
00027         _lookup_table_0[i][1] = (var_membrane__V <  -40.0) ? (135.0 * exp((80.0 + var_membrane__V) *  -0.147058823529)) : 0.0;
00028     }
00029 
00030     for (int i=0; i<20001; i++)
00031     {
00032         double var_membrane__V = -100.0001 + i*0.01;
00033         _lookup_table_0[i][2] = (var_membrane__V <  -40.0) ? ((3560.0 * exp(0.079 * var_membrane__V)) + (310000000.0 * exp(0.35 * var_membrane__V))) : (1000.0 / (0.13 * (1.0 + exp((var_membrane__V + 10.66) *  -0.0900900900901))));
00034     }
00035 
00036     for (int i=0; i<20001; i++)
00037     {
00038         double var_membrane__V = -100.0001 + i*0.01;
00039         _lookup_table_0[i][3] = (var_membrane__V <  -40.0) ? ((1000.0 * (-((127140.0 * exp(0.2444 * var_membrane__V)) + (3.474e-05 * exp( -0.04391 * var_membrane__V)))) * (var_membrane__V + 37.78)) / (1.0 + exp(0.311 * (var_membrane__V + 79.23)))) : 0.0;
00040     }
00041 
00042     for (int i=0; i<20001; i++)
00043     {
00044         double var_membrane__V = -100.0001 + i*0.01;
00045         _lookup_table_0[i][4] = (var_membrane__V <  -40.0) ? ((121.2 * exp( -0.01052 * var_membrane__V)) / (1.0 + exp( -0.1378 * (var_membrane__V + 40.14)))) : ((300.0 * exp( -2.535e-07 * var_membrane__V)) / (1.0 + exp( -0.1 * (var_membrane__V + 32.0))));
00046     }
00047 
00048     for (int i=0; i<20001; i++)
00049     {
00050         double var_membrane__V = -100.0001 + i*0.01;
00051         _lookup_table_0[i][5] = exp((2.0 * var_membrane__V * 96485.0) * 3.87996927064e-07);
00052     }
00053 
00054     for (int i=0; i<20001; i++)
00055     {
00056         double var_membrane__V = -100.0001 + i*0.01;
00057         _lookup_table_0[i][6] = exp((2.0 * var_membrane__V * 96485.0) * 3.87996927064e-07) - 1.0;
00058     }
00059 
00060     for (int i=0; i<20001; i++)
00061     {
00062         double var_membrane__V = -100.0001 + i*0.01;
00063         _lookup_table_0[i][7] = exp((1.0 * var_membrane__V * 96485.0) * 3.87996927064e-07);
00064     }
00065 
00066     for (int i=0; i<20001; i++)
00067     {
00068         double var_membrane__V = -100.0001 + i*0.01;
00069         _lookup_table_0[i][8] = exp((1.0 * var_membrane__V * 96485.0) * 3.87996927064e-07) - 1.0;
00070     }
00071 
00072     for (int i=0; i<20001; i++)
00073     {
00074         double var_membrane__V = -100.0001 + i*0.01;
00075         _lookup_table_0[i][9] = exp((1.0 * var_membrane__V * 96485.0) * 3.87996927064e-07);
00076     }
00077 
00078     for (int i=0; i<20001; i++)
00079     {
00080         double var_membrane__V = -100.0001 + i*0.01;
00081         _lookup_table_0[i][10] = exp((1.0 * var_membrane__V * 96485.0) * 3.87996927064e-07) - 1.0;
00082     }
00083 
00084     for (int i=0; i<20001; i++)
00085     {
00086         double var_membrane__V = -100.0001 + i*0.01;
00087         _lookup_table_0[i][11] = (1.0 / (1.0 + exp((var_membrane__V + 32.0) * 0.125))) + (0.6 / (1.0 + exp((50.0 - var_membrane__V) * 0.05)));
00088     }
00089 
00090     for (int i=0; i<20001; i++)
00091     {
00092         double var_membrane__V = -100.0001 + i*0.01;
00093         _lookup_table_0[i][12] = 0.001 / ((0.0197 * exp(-pow(0.0337 * (var_membrane__V + 10.0), 2.0))) + 0.02);
00094     }
00095 
00096     for (int i=0; i<20001; i++)
00097     {
00098         double var_membrane__V = -100.0001 + i*0.01;
00099         _lookup_table_0[i][13] = 1.0 / (1.0 + exp((-(var_membrane__V + 14.0)) * 0.0925925925926));
00100     }
00101 
00102     for (int i=0; i<20001; i++)
00103     {
00104         double var_membrane__V = -100.0001 + i*0.01;
00105         _lookup_table_0[i][14] = 0.0037 + (0.0061 / (1.0 + exp((var_membrane__V + 25.0) * 0.222222222222)));
00106     }
00107 
00108     for (int i=0; i<20001; i++)
00109     {
00110         double var_membrane__V = -100.0001 + i*0.01;
00111         _lookup_table_0[i][15] = 1.0 / (1.0 + exp((var_membrane__V + 60.0) * 0.178571428571));
00112     }
00113 
00114     for (int i=0; i<20001; i++)
00115     {
00116         double var_membrane__V = -100.0001 + i*0.01;
00117         _lookup_table_0[i][16] = 1.0 / (1.0 + exp((var_membrane__V + 9.0) * 0.0446428571429));
00118     }
00119 
00120     for (int i=0; i<20001; i++)
00121     {
00122         double var_membrane__V = -100.0001 + i*0.01;
00123         _lookup_table_0[i][17] = 1.0 / (1.0 + exp((-(var_membrane__V + 21.5)) * 0.133333333333));
00124     }
00125 
00126     for (int i=0; i<20001; i++)
00127     {
00128         double var_membrane__V = -100.0001 + i*0.01;
00129         _lookup_table_0[i][18] = 0.001 / (((0.00138 * (var_membrane__V + 14.2)) / (1.0 - exp( -0.123 * (var_membrane__V + 14.2)))) + ((0.00061 * (var_membrane__V + 38.9)) / (exp(0.145 * (var_membrane__V + 38.9)) - 1.0)));
00130     }
00131 
00132     for (int i=0; i<20001; i++)
00133     {
00134         double var_membrane__V = -100.0001 + i*0.01;
00135         _lookup_table_0[i][19] = 1.0 / (1.0 + exp((-(var_membrane__V - 1.5)) * 0.059880239521));
00136     }
00137 
00138     for (int i=0; i<20001; i++)
00139     {
00140         double var_membrane__V = -100.0001 + i*0.01;
00141         _lookup_table_0[i][20] = 0.001 / (((7.19e-05 * (var_membrane__V + 30.0)) / (1.0 - exp( -0.148 * (var_membrane__V + 30.0)))) + ((0.000131 * (var_membrane__V + 30.0)) / (exp(0.0687 * (var_membrane__V + 30.0)) - 1.0)));
00142     }
00143 
00144     for (int i=0; i<20001; i++)
00145     {
00146         double var_membrane__V = -100.0001 + i*0.01;
00147         _lookup_table_0[i][21] = 1.0 / (1.0 + exp((-(var_membrane__V - 1.5)) * 0.059880239521));
00148     }
00149 
00150     for (int i=0; i<20001; i++)
00151     {
00152         double var_membrane__V = -100.0001 + i*0.01;
00153         _lookup_table_0[i][22] = 0.004 / (((7.19e-05 * (var_membrane__V + 30.0)) / (1.0 - exp( -0.148 * (var_membrane__V + 30.0)))) + ((0.000131 * (var_membrane__V + 30.0)) / (exp(0.0687 * (var_membrane__V + 30.0)) - 1.0)));
00154     }
00155 
00156     for (int i=0; i<20001; i++)
00157     {
00158         double var_membrane__V = -100.0001 + i*0.01;
00159         _lookup_table_0[i][23] = 1.0 / (1.0 + exp((7.488 - var_membrane__V) * 0.167224080268));
00160     }
00161 
00162     for (int i=0; i<20001; i++)
00163     {
00164         double var_membrane__V = -100.0001 + i*0.01;
00165         _lookup_table_0[i][24] = 0.8 - (0.65 / (1.0 + exp((var_membrane__V + 125.0) * 0.0666666666667)));
00166     }
00167 
00168     for (int i=0; i<20001; i++)
00169     {
00170         double var_membrane__V = -100.0001 + i*0.01;
00171         _lookup_table_0[i][25] = exp(var_membrane__V * 0.01);
00172     }
00173 
00174     for (int i=0; i<20001; i++)
00175     {
00176         double var_membrane__V = -100.0001 + i*0.01;
00177         _lookup_table_0[i][26] = (10000.0 * exp((var_membrane__V - 40.0) * 0.04)) / (1.0 + exp((var_membrane__V - 40.0) * 0.04));
00178     }
00179 
00180     for (int i=0; i<20001; i++)
00181     {
00182         double var_membrane__V = -100.0001 + i*0.01;
00183         _lookup_table_0[i][27] = (10000.0 * exp((-(var_membrane__V + 90.0)) * 0.04)) / (1.0 + exp((-(var_membrane__V + 90.0)) * 0.04));
00184     }
00185 
00186     for (int i=0; i<20001; i++)
00187     {
00188         double var_membrane__V = -100.0001 + i*0.01;
00189         _lookup_table_0[i][28] = 15.0 / (1.0 + exp((var_membrane__V + 60.0) * 0.2));
00190     }
00191 
00192     for (int i=0; i<20001; i++)
00193     {
00194         double var_membrane__V = -100.0001 + i*0.01;
00195         _lookup_table_0[i][29] = (100.0 * exp((var_membrane__V + 25.0) * 0.2)) / (1.0 + exp((var_membrane__V + 25.0) * 0.2));
00196     }
00197 
00198     for (int i=0; i<20001; i++)
00199     {
00200         double var_membrane__V = -100.0001 + i*0.01;
00201         _lookup_table_0[i][30] = 2.25 * (1.0 / (1.0 + (0.1245 * exp(( -0.1 * var_membrane__V * 96485.0) * 3.87996927064e-07)) + (0.0365 * 0.872719796652 * exp(((-var_membrane__V) * 96485.0) * 3.87996927064e-07)))) * 1.0;
00202     }
00203 
00204     for (int i=0; i<20001; i++)
00205     {
00206         double var_membrane__V = -100.0001 + i*0.01;
00207         _lookup_table_0[i][31] = exp((1.0 * var_membrane__V * 96485.0) * 3.87996927064e-07);
00208     }
00209 
00210     for (int i=0; i<20001; i++)
00211     {
00212         double var_membrane__V = -100.0001 + i*0.01;
00213         _lookup_table_0[i][32] = exp((1.0 * var_membrane__V * 96485.0) * 3.87996927064e-07) - 1.0;
00214     }
00215 
00216     for (int i=0; i<20001; i++)
00217     {
00218         double var_membrane__V = -100.0001 + i*0.01;
00219         _lookup_table_0[i][33] = exp((1.0 * var_membrane__V * 96485.0) * 3.87996927064e-07);
00220     }
00221 
00222     for (int i=0; i<20001; i++)
00223     {
00224         double var_membrane__V = -100.0001 + i*0.01;
00225         _lookup_table_0[i][34] = exp((1.0 * var_membrane__V * 96485.0) * 3.87996927064e-07) - 1.0;
00226     }
00227 
00228     for (int i=0; i<20001; i++)
00229     {
00230         double var_membrane__V = -100.0001 + i*0.01;
00231         _lookup_table_0[i][35] = exp(( -0.85 * var_membrane__V * 96485.0) * 3.87996927064e-07);
00232     }
00233 
00234     for (int i=0; i<20001; i++)
00235     {
00236         double var_membrane__V = -100.0001 + i*0.01;
00237         _lookup_table_0[i][36] = exp((var_membrane__V * 96485.0) * 3.87996927064e-07);
00238     }
00239 
00240     for (int i=0; i<20001; i++)
00241     {
00242         double var_membrane__V = -100.0001 + i*0.01;
00243         _lookup_table_0[i][37] = exp(( -0.85 * var_membrane__V * 96485.0) * 3.87996927064e-07);
00244     }
00245 
00246     for (int i=0; i<20001; i++)
00247     {
00248         double var_membrane__V = -100.0001 + i*0.01;
00249         _lookup_table_0[i][38] = exp((var_membrane__V * 96485.0) * 3.87996927064e-07);
00250     }
00251 
00252 }
00253 
00254 FaberRudy2000Version3OptimisedLookupTables* FaberRudy2000Version3OptimisedLookupTables::FaberRudy2000Version3OptimisedLookupTables::mpInstance = NULL;
00255 
00256 FaberRudy2000Version3Optimised::FaberRudy2000Version3Optimised(boost::shared_ptr<AbstractIvpOdeSolver> pSolver,
00257                                boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
00258     : AbstractCardiacCell(pSolver, 25, 0, pIntracellularStimulus)
00259 {
00260     // Time units: second
00261     mpSystemInfo = OdeSystemInformation<FaberRudy2000Version3Optimised>::Instance();
00262 
00263     Init();
00264 
00265 }
00266 
00267 FaberRudy2000Version3Optimised::~FaberRudy2000Version3Optimised(void)
00268 {
00269 }
00270 
00271 double FaberRudy2000Version3Optimised::GetIIonic()
00272 {
00273     std::vector<double>& rY = rGetStateVariables();
00274     double var_membrane__V = rY[0];
00275     // Units: millivolt; Initial value: -90
00276     double var_fast_sodium_current_m_gate__m = rY[1];
00277     // Units: dimensionless; Initial value: 0.0008
00278     double var_fast_sodium_current_h_gate__h = rY[2];
00279     // Units: dimensionless; Initial value: 0.993771
00280     double var_fast_sodium_current_j_gate__j = rY[3];
00281     // Units: dimensionless; Initial value: 0.995727
00282     double var_L_type_Ca_channel_d_gate__d = rY[4];
00283     // Units: dimensionless; Initial value: 3.210618e-6
00284     double var_L_type_Ca_channel_f_gate__f = rY[5];
00285     // Units: dimensionless; Initial value: 0.999837
00286     double var_T_type_Ca_channel_b_gate__b = rY[6];
00287     // Units: dimensionless; Initial value: 0.000970231
00288     double var_T_type_Ca_channel_g_gate__g = rY[7];
00289     // Units: dimensionless; Initial value: 0.994305
00290     double var_rapid_delayed_rectifier_potassium_current_xr_gate__xr = rY[8];
00291     // Units: dimensionless; Initial value: 0.000124042
00292     double var_slow_delayed_rectifier_potassium_current_xs1_gate__xs1 = rY[9];
00293     // Units: dimensionless; Initial value: 0.00445683
00294     double var_slow_delayed_rectifier_potassium_current_xs2_gate__xs2 = rY[10];
00295     // Units: dimensionless; Initial value: 0.00445683
00296     double var_transient_outward_current_zdv_gate__zdv = rY[11];
00297     // Units: dimensionless; Initial value: 0.5
00298     double var_transient_outward_current_ydv_gate__ydv = rY[12];
00299     // Units: dimensionless; Initial value: 0.5
00300     double var_calcium_dynamics__Cai = rY[13];
00301     // Units: millimolar; Initial value: 6e-5
00302     double var_ionic_concentrations__Nai = rY[23];
00303     // Units: millimolar; Initial value: 9
00304     double var_ionic_concentrations__Ki = rY[24];
00305     // Units: millimolar; Initial value: 141.2
00306 
00307     // Lookup table indexing
00308 #define COVERAGE_IGNORE
00309     if (var_membrane__V>99.9999 || var_membrane__V<-100.0001)
00310         EXCEPTION(DumpState("V outside lookup table range"));
00311 #undef COVERAGE_IGNORE
00312     double _offset_0 = var_membrane__V - -100.0001;
00313     double _offset_0_over_table_step = _offset_0 * 100.0;
00314     unsigned _table_index_0 = (unsigned) floor(_offset_0_over_table_step);
00315     double _factor_0 = _offset_0_over_table_step - _table_index_0;
00316 
00317     double var_fast_sodium_current__E_Na = 26.7123387055 * log(132.0 / var_ionic_concentrations__Nai);
00318     double var_fast_sodium_current__i_Na = 16.0 * pow(var_fast_sodium_current_m_gate__m, 3.0) * var_fast_sodium_current_h_gate__h * var_fast_sodium_current_j_gate__j * (var_membrane__V - var_fast_sodium_current__E_Na);
00319     double var_membrane__i_Na = var_fast_sodium_current__i_Na;
00320     double var_L_type_Ca_channel_f_Ca_gate__f_Ca = 1.0 / (1.0 + (var_calcium_dynamics__Cai * 1666.66666667));
00321     double var_L_type_Ca_channel__i_CaCa = var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f_Ca_gate__f_Ca * ((((0.00054 * 4.0 * var_membrane__V * 9309355225.0) * 3.87996927064e-07) * ((1.0 * var_calcium_dynamics__Cai * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_5(_table_index_0, _factor_0)) - 0.6138)) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_6(_table_index_0, _factor_0));
00322     double var_L_type_Ca_channel__i_CaNa = var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f_Ca_gate__f_Ca * ((((6.75e-07 * 1.0 * var_membrane__V * 9309355225.0) * 3.87996927064e-07) * ((0.75 * var_ionic_concentrations__Nai * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_7(_table_index_0, _factor_0)) - 99.0)) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_8(_table_index_0, _factor_0));
00323     double var_L_type_Ca_channel__i_CaK = var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f_Ca_gate__f_Ca * ((((1.93e-07 * 1.0 * var_membrane__V * 9309355225.0) * 3.87996927064e-07) * ((0.75 * var_ionic_concentrations__Ki * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_9(_table_index_0, _factor_0)) - 3.375)) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_10(_table_index_0, _factor_0));
00324     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;
00325     double var_membrane__i_Ca_L = var_L_type_Ca_channel__i_Ca_L;
00326     double var_calcium_background_current__E_Ca = 13.3561693527 * log(1.8 / var_calcium_dynamics__Cai);
00327     double var_T_type_Ca_channel__i_Ca_T = 0.05 * var_T_type_Ca_channel_b_gate__b * var_T_type_Ca_channel_b_gate__b * var_T_type_Ca_channel_g_gate__g * (var_membrane__V - var_calcium_background_current__E_Ca);
00328     double var_membrane__i_Ca_T = var_T_type_Ca_channel__i_Ca_T;
00329     double var_time_independent_potassium_current__E_K = 26.7123387055 * log(4.5 / var_ionic_concentrations__Ki);
00330     double var_rapid_delayed_rectifier_potassium_current__i_Kr = 0.0238624460886 * var_rapid_delayed_rectifier_potassium_current_xr_gate__xr * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_16(_table_index_0, _factor_0) * (var_membrane__V - var_time_independent_potassium_current__E_K);
00331     double var_membrane__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00332     double var_slow_delayed_rectifier_potassium_current__i_Ks = (0.433 * (1.0 + (0.6 / (1.0 + pow(3.8e-05 / var_calcium_dynamics__Cai, 1.4))))) * var_slow_delayed_rectifier_potassium_current_xs1_gate__xs1 * var_slow_delayed_rectifier_potassium_current_xs2_gate__xs2 * (var_membrane__V - (26.7123387055 * log(6.91956 / (var_ionic_concentrations__Ki + (0.01833 * var_ionic_concentrations__Nai)))));
00333     double var_membrane__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00334     double var_sodium_activated_potassium_current__i_K_Na = 0.0 * (0.85 / (1.0 + pow(66.0 / var_ionic_concentrations__Nai, 2.8))) * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_24(_table_index_0, _factor_0) * (var_membrane__V - var_time_independent_potassium_current__E_K);
00335     double var_membrane__i_K_Na = var_sodium_activated_potassium_current__i_K_Na;
00336     double var_ATP_sensitive_potassium_current__i_K_ATP = 2.75741043608e-08 * (var_membrane__V - var_time_independent_potassium_current__E_K);
00337     double var_membrane__i_K_ATP = var_ATP_sensitive_potassium_current__i_K_ATP;
00338     double var_transient_outward_current__i_to = 0.0 * pow(var_transient_outward_current_zdv_gate__zdv, 3.0) * var_transient_outward_current_ydv_gate__ydv * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_25(_table_index_0, _factor_0) * (var_membrane__V - var_time_independent_potassium_current__E_K);
00339     double var_membrane__i_to = var_transient_outward_current__i_to;
00340     double var_Na_Ca_exchanger__i_NaCa = (0.00025 * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_35(_table_index_0, _factor_0) * ((FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_36(_table_index_0, _factor_0) * pow(var_ionic_concentrations__Nai, 3.0) * 1.8) - (2299968.0 * var_calcium_dynamics__Cai))) / (1.0 + (0.0001 * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_37(_table_index_0, _factor_0) * ((FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_38(_table_index_0, _factor_0) * pow(var_ionic_concentrations__Nai, 3.0) * 1.8) + (2299968.0 * var_calcium_dynamics__Cai))));
00341     double var_membrane__i_NaCa = var_Na_Ca_exchanger__i_NaCa;
00342     double var_time_independent_potassium_current_K1_gate__alpha_K1 = 1020.0 / (1.0 + exp(0.2385 * ((var_membrane__V - var_time_independent_potassium_current__E_K) - 59.215)));
00343     double var_time_independent_potassium_current__i_K1 = 0.684653196881 * (var_time_independent_potassium_current_K1_gate__alpha_K1 / (var_time_independent_potassium_current_K1_gate__alpha_K1 + ((1000.0 * ((0.49124 * exp(0.08032 * ((var_membrane__V - var_time_independent_potassium_current__E_K) + 5.476))) + exp(0.06175 * ((var_membrane__V - var_time_independent_potassium_current__E_K) - 594.31)))) / (1.0 + exp( -0.5143 * ((var_membrane__V - var_time_independent_potassium_current__E_K) + 4.753)))))) * (var_membrane__V - var_time_independent_potassium_current__E_K);
00344     double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00345     double var_plateau_potassium_current__i_Kp = 0.00552 * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_23(_table_index_0, _factor_0) * (var_membrane__V - var_time_independent_potassium_current__E_K);
00346     double var_membrane__i_Kp = var_plateau_potassium_current__i_Kp;
00347     double var_sarcolemmal_calcium_pump__i_p_Ca = (1.15 * var_calcium_dynamics__Cai) / (0.0005 + var_calcium_dynamics__Cai);
00348     double var_membrane__i_p_Ca = var_sarcolemmal_calcium_pump__i_p_Ca;
00349     double var_sodium_background_current__i_Na_b = 0.004 * (var_membrane__V - var_fast_sodium_current__E_Na);
00350     double var_membrane__i_Na_b = var_sodium_background_current__i_Na_b;
00351     double var_calcium_background_current__i_Ca_b = 0.003016 * (var_membrane__V - var_calcium_background_current__E_Ca);
00352     double var_membrane__i_Ca_b = var_calcium_background_current__i_Ca_b;
00353     double var_sodium_potassium_pump__i_NaK = ((FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_30(_table_index_0, _factor_0) / (1.0 + pow(10.0 / var_ionic_concentrations__Nai, 2.0))) * 4.5) * 0.166666666667;
00354     double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00355     double var_non_specific_calcium_activated_current__i_ns_Na = (((((0.0 * 1.0 * var_membrane__V * 9309355225.0) * 3.87996927064e-07) * ((0.75 * var_ionic_concentrations__Nai * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_31(_table_index_0, _factor_0)) - 99.0)) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_32(_table_index_0, _factor_0)) * 1.0) / (1.0 + pow(0.0012 / var_calcium_dynamics__Cai, 3.0));
00356     double var_non_specific_calcium_activated_current__i_ns_K = (((((0.0 * 1.0 * var_membrane__V * 9309355225.0) * 3.87996927064e-07) * ((0.75 * var_ionic_concentrations__Ki * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_33(_table_index_0, _factor_0)) - 3.375)) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_34(_table_index_0, _factor_0)) * 1.0) / (1.0 + pow(0.0012 / var_calcium_dynamics__Cai, 3.0));
00357     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;
00358     double var_membrane__i_ns_Ca = var_non_specific_calcium_activated_current__i_ns_Ca;
00359 
00360     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;
00361 }
00362 
00363 void FaberRudy2000Version3Optimised::EvaluateYDerivatives (
00364         double var_environment__time,
00365         const std::vector<double> &rY,
00366         std::vector<double> &rDY)
00367 {
00368     // Inputs:
00369     // Time units: second
00370     var_environment__time *= 1e-3;
00371     double var_membrane__V = rY[0];
00372     // Units: millivolt; Initial value: -90
00373     double var_fast_sodium_current_m_gate__m = rY[1];
00374     // Units: dimensionless; Initial value: 0.0008
00375     double var_fast_sodium_current_h_gate__h = rY[2];
00376     // Units: dimensionless; Initial value: 0.993771
00377     double var_fast_sodium_current_j_gate__j = rY[3];
00378     // Units: dimensionless; Initial value: 0.995727
00379     double var_L_type_Ca_channel_d_gate__d = rY[4];
00380     // Units: dimensionless; Initial value: 3.210618e-6
00381     double var_L_type_Ca_channel_f_gate__f = rY[5];
00382     // Units: dimensionless; Initial value: 0.999837
00383     double var_T_type_Ca_channel_b_gate__b = rY[6];
00384     // Units: dimensionless; Initial value: 0.000970231
00385     double var_T_type_Ca_channel_g_gate__g = rY[7];
00386     // Units: dimensionless; Initial value: 0.994305
00387     double var_rapid_delayed_rectifier_potassium_current_xr_gate__xr = rY[8];
00388     // Units: dimensionless; Initial value: 0.000124042
00389     double var_slow_delayed_rectifier_potassium_current_xs1_gate__xs1 = rY[9];
00390     // Units: dimensionless; Initial value: 0.00445683
00391     double var_slow_delayed_rectifier_potassium_current_xs2_gate__xs2 = rY[10];
00392     // Units: dimensionless; Initial value: 0.00445683
00393     double var_transient_outward_current_zdv_gate__zdv = rY[11];
00394     // Units: dimensionless; Initial value: 0.5
00395     double var_transient_outward_current_ydv_gate__ydv = rY[12];
00396     // Units: dimensionless; Initial value: 0.5
00397     double var_calcium_dynamics__Cai = rY[13];
00398     // Units: millimolar; Initial value: 6e-5
00399     double var_calcium_dynamics__Ca_JSR = rY[14];
00400     // Units: millimolar; Initial value: 1.8
00401     double var_calcium_dynamics__Ca_NSR = rY[15];
00402     // Units: millimolar; Initial value: 1.8
00403     double var_calcium_dynamics__APtrack = rY[16];
00404     // Units: dimensionless; Initial value: 0
00405     double var_calcium_dynamics__APtrack2 = rY[17];
00406     // Units: dimensionless; Initial value: 0
00407     double var_calcium_dynamics__APtrack3 = rY[18];
00408     // Units: dimensionless; Initial value: 0
00409     double var_calcium_dynamics__Cainfluxtrack = rY[19];
00410     // Units: dimensionless; Initial value: 0
00411     double var_calcium_dynamics__OVRLDtrack = rY[20];
00412     // Units: dimensionless; Initial value: 0
00413     double var_calcium_dynamics__OVRLDtrack2 = rY[21];
00414     // Units: dimensionless; Initial value: 0
00415     double var_calcium_dynamics__OVRLDtrack3 = rY[22];
00416     // Units: dimensionless; Initial value: 0
00417     double var_ionic_concentrations__Nai = rY[23];
00418     // Units: millimolar; Initial value: 9
00419     double var_ionic_concentrations__Ki = rY[24];
00420     // Units: millimolar; Initial value: 141.2
00421 
00422 
00423     // Lookup table indexing
00424 #define COVERAGE_IGNORE
00425     if (var_membrane__V>99.9999 || var_membrane__V<-100.0001)
00426         EXCEPTION(DumpState("V outside lookup table range"));
00427 #undef COVERAGE_IGNORE
00428     double _offset_0 = var_membrane__V - -100.0001;
00429     double _offset_0_over_table_step = _offset_0 * 100.0;
00430     unsigned _table_index_0 = (unsigned) floor(_offset_0_over_table_step);
00431     double _factor_0 = _offset_0_over_table_step - _table_index_0;
00432 
00433     // Mathematics
00434     double var_membrane__I_st = GetStimulus(var_environment__time*1000);
00435     double var_fast_sodium_current__E_Na = 26.7123387055 * log(132.0 / var_ionic_concentrations__Nai);
00436     double var_fast_sodium_current__i_Na = 16.0 * pow(var_fast_sodium_current_m_gate__m, 3.0) * var_fast_sodium_current_h_gate__h * var_fast_sodium_current_j_gate__j * (var_membrane__V - var_fast_sodium_current__E_Na);
00437     double var_membrane__i_Na = var_fast_sodium_current__i_Na;
00438     double var_L_type_Ca_channel_f_Ca_gate__f_Ca = 1.0 / (1.0 + (var_calcium_dynamics__Cai * 1666.66666667));
00439     double var_L_type_Ca_channel__i_CaCa = var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f_Ca_gate__f_Ca * ((((0.00054 * 4.0 * var_membrane__V * 9309355225.0) * 3.87996927064e-07) * ((1.0 * var_calcium_dynamics__Cai * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_5(_table_index_0, _factor_0)) - 0.6138)) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_6(_table_index_0, _factor_0));
00440     double var_L_type_Ca_channel__i_CaNa = var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f_Ca_gate__f_Ca * ((((6.75e-07 * 1.0 * var_membrane__V * 9309355225.0) * 3.87996927064e-07) * ((0.75 * var_ionic_concentrations__Nai * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_7(_table_index_0, _factor_0)) - 99.0)) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_8(_table_index_0, _factor_0));
00441     double var_L_type_Ca_channel__i_CaK = var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f_Ca_gate__f_Ca * ((((1.93e-07 * 1.0 * var_membrane__V * 9309355225.0) * 3.87996927064e-07) * ((0.75 * var_ionic_concentrations__Ki * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_9(_table_index_0, _factor_0)) - 3.375)) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_10(_table_index_0, _factor_0));
00442     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;
00443     double var_membrane__i_Ca_L = var_L_type_Ca_channel__i_Ca_L;
00444     double var_calcium_background_current__E_Ca = 13.3561693527 * log(1.8 / var_calcium_dynamics__Cai);
00445     double var_T_type_Ca_channel__i_Ca_T = 0.05 * var_T_type_Ca_channel_b_gate__b * var_T_type_Ca_channel_b_gate__b * var_T_type_Ca_channel_g_gate__g * (var_membrane__V - var_calcium_background_current__E_Ca);
00446     double var_membrane__i_Ca_T = var_T_type_Ca_channel__i_Ca_T;
00447     double var_time_independent_potassium_current__E_K = 26.7123387055 * log(4.5 / var_ionic_concentrations__Ki);
00448     double var_rapid_delayed_rectifier_potassium_current__i_Kr = 0.0238624460886 * var_rapid_delayed_rectifier_potassium_current_xr_gate__xr * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_16(_table_index_0, _factor_0) * (var_membrane__V - var_time_independent_potassium_current__E_K);
00449     double var_membrane__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00450     double var_slow_delayed_rectifier_potassium_current__i_Ks = (0.433 * (1.0 + (0.6 / (1.0 + pow(3.8e-05 / var_calcium_dynamics__Cai, 1.4))))) * var_slow_delayed_rectifier_potassium_current_xs1_gate__xs1 * var_slow_delayed_rectifier_potassium_current_xs2_gate__xs2 * (var_membrane__V - (26.7123387055 * log(6.91956 / (var_ionic_concentrations__Ki + (0.01833 * var_ionic_concentrations__Nai)))));
00451     double var_membrane__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00452     double var_sodium_activated_potassium_current__i_K_Na = 0.0 * (0.85 / (1.0 + pow(66.0 / var_ionic_concentrations__Nai, 2.8))) * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_24(_table_index_0, _factor_0) * (var_membrane__V - var_time_independent_potassium_current__E_K);
00453     double var_membrane__i_K_Na = var_sodium_activated_potassium_current__i_K_Na;
00454     double var_ATP_sensitive_potassium_current__i_K_ATP = 2.75741043608e-08 * (var_membrane__V - var_time_independent_potassium_current__E_K);
00455     double var_membrane__i_K_ATP = var_ATP_sensitive_potassium_current__i_K_ATP;
00456     double var_transient_outward_current__i_to = 0.0 * pow(var_transient_outward_current_zdv_gate__zdv, 3.0) * var_transient_outward_current_ydv_gate__ydv * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_25(_table_index_0, _factor_0) * (var_membrane__V - var_time_independent_potassium_current__E_K);
00457     double var_membrane__i_to = var_transient_outward_current__i_to;
00458     double var_Na_Ca_exchanger__i_NaCa = (0.00025 * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_35(_table_index_0, _factor_0) * ((FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_36(_table_index_0, _factor_0) * pow(var_ionic_concentrations__Nai, 3.0) * 1.8) - (2299968.0 * var_calcium_dynamics__Cai))) / (1.0 + (0.0001 * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_37(_table_index_0, _factor_0) * ((FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_38(_table_index_0, _factor_0) * pow(var_ionic_concentrations__Nai, 3.0) * 1.8) + (2299968.0 * var_calcium_dynamics__Cai))));
00459     double var_membrane__i_NaCa = var_Na_Ca_exchanger__i_NaCa;
00460     double var_time_independent_potassium_current_K1_gate__alpha_K1 = 1020.0 / (1.0 + exp(0.2385 * ((var_membrane__V - var_time_independent_potassium_current__E_K) - 59.215)));
00461     double var_time_independent_potassium_current__i_K1 = 0.684653196881 * (var_time_independent_potassium_current_K1_gate__alpha_K1 / (var_time_independent_potassium_current_K1_gate__alpha_K1 + ((1000.0 * ((0.49124 * exp(0.08032 * ((var_membrane__V - var_time_independent_potassium_current__E_K) + 5.476))) + exp(0.06175 * ((var_membrane__V - var_time_independent_potassium_current__E_K) - 594.31)))) / (1.0 + exp( -0.5143 * ((var_membrane__V - var_time_independent_potassium_current__E_K) + 4.753)))))) * (var_membrane__V - var_time_independent_potassium_current__E_K);
00462     double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00463     double var_plateau_potassium_current__i_Kp = 0.00552 * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_23(_table_index_0, _factor_0) * (var_membrane__V - var_time_independent_potassium_current__E_K);
00464     double var_membrane__i_Kp = var_plateau_potassium_current__i_Kp;
00465     double var_sarcolemmal_calcium_pump__i_p_Ca = (1.15 * var_calcium_dynamics__Cai) / (0.0005 + var_calcium_dynamics__Cai);
00466     double var_membrane__i_p_Ca = var_sarcolemmal_calcium_pump__i_p_Ca;
00467     double var_sodium_background_current__i_Na_b = 0.004 * (var_membrane__V - var_fast_sodium_current__E_Na);
00468     double var_membrane__i_Na_b = var_sodium_background_current__i_Na_b;
00469     double var_calcium_background_current__i_Ca_b = 0.003016 * (var_membrane__V - var_calcium_background_current__E_Ca);
00470     double var_membrane__i_Ca_b = var_calcium_background_current__i_Ca_b;
00471     double var_sodium_potassium_pump__i_NaK = ((FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_30(_table_index_0, _factor_0) / (1.0 + pow(10.0 / var_ionic_concentrations__Nai, 2.0))) * 4.5) * 0.166666666667;
00472     double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00473     double var_non_specific_calcium_activated_current__i_ns_Na = (((((0.0 * 1.0 * var_membrane__V * 9309355225.0) * 3.87996927064e-07) * ((0.75 * var_ionic_concentrations__Nai * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_31(_table_index_0, _factor_0)) - 99.0)) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_32(_table_index_0, _factor_0)) * 1.0) / (1.0 + pow(0.0012 / var_calcium_dynamics__Cai, 3.0));
00474     double var_non_specific_calcium_activated_current__i_ns_K = (((((0.0 * 1.0 * var_membrane__V * 9309355225.0) * 3.87996927064e-07) * ((0.75 * var_ionic_concentrations__Ki * FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_33(_table_index_0, _factor_0)) - 3.375)) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_34(_table_index_0, _factor_0)) * 1.0) / (1.0 + pow(0.0012 / var_calcium_dynamics__Cai, 3.0));
00475     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;
00476     double var_membrane__i_ns_Ca = var_non_specific_calcium_activated_current__i_ns_Ca;
00477     double var_fast_sodium_current_m_gate__E0_m = var_membrane__V + 47.13;
00478     double var_L_type_Ca_channel_d_gate__E0_d = var_membrane__V + 10.0;
00479     double var_L_type_Ca_channel_d_gate__d_infinity = 1.0 / (1.0 + exp((-var_L_type_Ca_channel_d_gate__E0_d) * 0.160256410256));
00480     double var_L_type_Ca_channel_d_gate__tau_d = (fabs(var_L_type_Ca_channel_d_gate__E0_d) < 1e-05) ? 0.00457875457875 : ((0.001 * var_L_type_Ca_channel_d_gate__d_infinity * (1.0 - exp((-var_L_type_Ca_channel_d_gate__E0_d) * 0.160256410256))) / (0.035 * var_L_type_Ca_channel_d_gate__E0_d));
00481     double var_L_type_Ca_channel_f_gate__f_infinity = FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_11(_table_index_0, _factor_0);
00482     double var_L_type_Ca_channel_f_gate__tau_f = FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_12(_table_index_0, _factor_0);
00483     double var_transient_outward_current_zdv_gate__alpha_zdv = FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_26(_table_index_0, _factor_0);
00484     double var_transient_outward_current_zdv_gate__beta_zdv = FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_27(_table_index_0, _factor_0);
00485     double var_transient_outward_current_ydv_gate__alpha_ydv = FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_28(_table_index_0, _factor_0);
00486     double var_transient_outward_current_ydv_gate__beta_ydv = FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_29(_table_index_0, _factor_0);
00487     double var_calcium_dynamics__i_rel = ((var_calcium_dynamics__Cainfluxtrack > 0.00018) ? (((60000.0 * (var_calcium_dynamics__Cainfluxtrack - 0.00018)) / ((0.0008 + var_calcium_dynamics__Cainfluxtrack) - 0.00018)) * (1.0 - var_calcium_dynamics__APtrack2) * var_calcium_dynamics__APtrack2) : ((var_calcium_dynamics__Cainfluxtrack <= 0.00018) && (var_calcium_dynamics__OVRLDtrack2 > 0.0)) ? (4000.0 * (1.0 - var_calcium_dynamics__OVRLDtrack2) * var_calcium_dynamics__OVRLDtrack2) : 0.0) * (var_calcium_dynamics__Ca_JSR - var_calcium_dynamics__Cai);
00488     double var_calcium_dynamics__i_up = (8.75 * var_calcium_dynamics__Cai) / (var_calcium_dynamics__Cai + 0.00092);
00489     double var_calcium_dynamics__i_leak = 0.583333333333 * var_calcium_dynamics__Ca_NSR;
00490     double var_calcium_dynamics__i_tr = (var_calcium_dynamics__Ca_NSR - var_calcium_dynamics__Ca_JSR) * 5.55555555556;
00491     double d_dt_membrane__V;
00492     if (mSetVoltageDerivativeToZero)
00493     {
00494         d_dt_membrane__V = 0.0;
00495     }
00496     else
00497     {
00498         d_dt_membrane__V =  -1000.0 * (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);
00499     }
00500     double d_dt_fast_sodium_current_m_gate__m = (((fabs(var_fast_sodium_current_m_gate__E0_m) >= 1e-05) ? ((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) * (1.0 - var_fast_sodium_current_m_gate__m)) - (FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_0(_table_index_0, _factor_0) * var_fast_sodium_current_m_gate__m);
00501     double d_dt_fast_sodium_current_h_gate__h = (FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_1(_table_index_0, _factor_0) * (1.0 - var_fast_sodium_current_h_gate__h)) - (FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_2(_table_index_0, _factor_0) * var_fast_sodium_current_h_gate__h);
00502     double d_dt_fast_sodium_current_j_gate__j = (FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_3(_table_index_0, _factor_0) * (1.0 - var_fast_sodium_current_j_gate__j)) - (FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_4(_table_index_0, _factor_0) * var_fast_sodium_current_j_gate__j);
00503     double d_dt_L_type_Ca_channel_d_gate__d = ((var_L_type_Ca_channel_d_gate__d_infinity / var_L_type_Ca_channel_d_gate__tau_d) * (1.0 - var_L_type_Ca_channel_d_gate__d)) - (((1.0 - var_L_type_Ca_channel_d_gate__d_infinity) / var_L_type_Ca_channel_d_gate__tau_d) * var_L_type_Ca_channel_d_gate__d);
00504     double d_dt_L_type_Ca_channel_f_gate__f = ((var_L_type_Ca_channel_f_gate__f_infinity / var_L_type_Ca_channel_f_gate__tau_f) * (1.0 - var_L_type_Ca_channel_f_gate__f)) - (((1.0 - var_L_type_Ca_channel_f_gate__f_infinity) / var_L_type_Ca_channel_f_gate__tau_f) * var_L_type_Ca_channel_f_gate__f);
00505     double d_dt_T_type_Ca_channel_b_gate__b = (FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_13(_table_index_0, _factor_0) - var_T_type_Ca_channel_b_gate__b) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_14(_table_index_0, _factor_0);
00506     double d_dt_T_type_Ca_channel_g_gate__g = (FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_15(_table_index_0, _factor_0) - var_T_type_Ca_channel_g_gate__g) / ((var_membrane__V <= 0.0) ? (( -0.000875 * var_membrane__V) + 0.012) : 0.012);
00507     double d_dt_rapid_delayed_rectifier_potassium_current_xr_gate__xr = (FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_17(_table_index_0, _factor_0) - var_rapid_delayed_rectifier_potassium_current_xr_gate__xr) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_18(_table_index_0, _factor_0);
00508     double d_dt_slow_delayed_rectifier_potassium_current_xs1_gate__xs1 = (FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_19(_table_index_0, _factor_0) - var_slow_delayed_rectifier_potassium_current_xs1_gate__xs1) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_20(_table_index_0, _factor_0);
00509     double d_dt_slow_delayed_rectifier_potassium_current_xs2_gate__xs2 = (FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_21(_table_index_0, _factor_0) - var_slow_delayed_rectifier_potassium_current_xs2_gate__xs2) / FaberRudy2000Version3OptimisedLookupTables::Instance()->_lookup_22(_table_index_0, _factor_0);
00510     double d_dt_transient_outward_current_zdv_gate__zdv = ((var_transient_outward_current_zdv_gate__alpha_zdv / (var_transient_outward_current_zdv_gate__alpha_zdv + var_transient_outward_current_zdv_gate__beta_zdv)) - var_transient_outward_current_zdv_gate__zdv) / (1.0 / (var_transient_outward_current_zdv_gate__alpha_zdv + var_transient_outward_current_zdv_gate__beta_zdv));
00511     double d_dt_transient_outward_current_ydv_gate__ydv = ((var_transient_outward_current_ydv_gate__alpha_ydv / (var_transient_outward_current_ydv_gate__alpha_ydv + var_transient_outward_current_ydv_gate__beta_ydv)) - var_transient_outward_current_ydv_gate__ydv) / (1.0 / (var_transient_outward_current_ydv_gate__alpha_ydv + var_transient_outward_current_ydv_gate__beta_ydv));
00512     double d_dt_calcium_dynamics__APtrack = (( -1000.0 * (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)) > 150000.0) ? ((100000.0 * (1.0 - var_calcium_dynamics__APtrack)) - (500.0 * var_calcium_dynamics__APtrack)) : ( -500.0 * var_calcium_dynamics__APtrack);
00513     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);
00514     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);
00515     double d_dt_calcium_dynamics__Cainfluxtrack = (var_calcium_dynamics__APtrack > 0.2) ? (( -1.434e-07 * (((var_L_type_Ca_channel__i_CaCa + var_T_type_Ca_channel__i_Ca_T) - var_Na_Ca_exchanger__i_NaCa) + var_sarcolemmal_calcium_pump__i_p_Ca + var_calcium_background_current__i_Ca_b)) * 200477.689034) : ((var_calcium_dynamics__APtrack2 > 0.01) && (var_calcium_dynamics__APtrack <= 0.2)) ? 0.0 : ( -500.0 * var_calcium_dynamics__Cainfluxtrack);
00516     double d_dt_calcium_dynamics__OVRLDtrack = (((1.0 / (1.0 + (0.8 / var_calcium_dynamics__Ca_JSR))) > 0.7) && (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);
00517     double d_dt_calcium_dynamics__OVRLDtrack2 = ((var_calcium_dynamics__OVRLDtrack > 0.98) && (var_calcium_dynamics__OVRLDtrack2 < 0.98)) ? (50000.0 * (1.0 - var_calcium_dynamics__OVRLDtrack2)) : ( -500.0 * var_calcium_dynamics__OVRLDtrack2);
00518     double d_dt_calcium_dynamics__OVRLDtrack3 = ((var_calcium_dynamics__OVRLDtrack > 0.98) && (var_calcium_dynamics__OVRLDtrack3 < 0.98)) ? (50000.0 * (1.0 - var_calcium_dynamics__OVRLDtrack3)) : ( -10.0 * var_calcium_dynamics__OVRLDtrack3);
00519     double d_dt_calcium_dynamics__Ca_JSR = (1.0 / (1.0 + (8.0 / pow(0.8 + var_calcium_dynamics__Ca_JSR, 2.0)))) * (var_calcium_dynamics__i_tr - var_calcium_dynamics__i_rel);
00520     double d_dt_calcium_dynamics__Ca_NSR = ((((-var_calcium_dynamics__i_tr) * 1.8246370132e-13) * 476568879782.0) - var_calcium_dynamics__i_leak) + var_calcium_dynamics__i_up;
00521     double d_dt_calcium_dynamics__Cai = (1.0 / (1.0 + (0.000119 / pow(0.00238 + var_calcium_dynamics__Cai, 2.0)) + (3.5e-05 / pow(0.0005 + var_calcium_dynamics__Cai, 2.0)))) * ((( -1.434e-07 * (((var_L_type_Ca_channel__i_CaCa + var_T_type_Ca_channel__i_Ca_T) - (2.0 * var_Na_Ca_exchanger__i_NaCa)) + var_sarcolemmal_calcium_pump__i_p_Ca + var_calcium_background_current__i_Ca_b)) * 200477.689034) + ((var_calcium_dynamics__i_rel * 1.8246370132e-13) * 38686179652.9) + (((var_calcium_dynamics__i_leak - var_calcium_dynamics__i_up) * 2.09833256519e-12) * 38686179652.9));
00522     double d_dt_ionic_concentrations__Nai = ((-(var_fast_sodium_current__i_Na + var_L_type_Ca_channel__i_CaNa + var_sodium_background_current__i_Na_b + var_non_specific_calcium_activated_current__i_ns_Na + (var_Na_Ca_exchanger__i_NaCa * 3.0) + (var_sodium_potassium_pump__i_NaK * 3.0))) * 1.434e-07) * 400955.378068;
00523     double d_dt_ionic_concentrations__Ki = ((-(var_L_type_Ca_channel__i_CaK + var_rapid_delayed_rectifier_potassium_current__i_Kr + var_slow_delayed_rectifier_potassium_current__i_Ks + var_time_independent_potassium_current__i_K1 + var_plateau_potassium_current__i_Kp + var_sodium_activated_potassium_current__i_K_Na + var_ATP_sensitive_potassium_current__i_K_ATP + var_transient_outward_current__i_to + var_non_specific_calcium_activated_current__i_ns_K + ((-var_sodium_potassium_pump__i_NaK) * 2.0))) * 1.434e-07) * 400955.378068;
00524 
00525     rDY[0] = d_dt_membrane__V*1e-3;
00526     rDY[1] = d_dt_fast_sodium_current_m_gate__m*1e-3;
00527     rDY[2] = d_dt_fast_sodium_current_h_gate__h*1e-3;
00528     rDY[3] = d_dt_fast_sodium_current_j_gate__j*1e-3;
00529     rDY[4] = d_dt_L_type_Ca_channel_d_gate__d*1e-3;
00530     rDY[5] = d_dt_L_type_Ca_channel_f_gate__f*1e-3;
00531     rDY[6] = d_dt_T_type_Ca_channel_b_gate__b*1e-3;
00532     rDY[7] = d_dt_T_type_Ca_channel_g_gate__g*1e-3;
00533     rDY[8] = d_dt_rapid_delayed_rectifier_potassium_current_xr_gate__xr*1e-3;
00534     rDY[9] = d_dt_slow_delayed_rectifier_potassium_current_xs1_gate__xs1*1e-3;
00535     rDY[10] = d_dt_slow_delayed_rectifier_potassium_current_xs2_gate__xs2*1e-3;
00536     rDY[11] = d_dt_transient_outward_current_zdv_gate__zdv*1e-3;
00537     rDY[12] = d_dt_transient_outward_current_ydv_gate__ydv*1e-3;
00538     rDY[13] = d_dt_calcium_dynamics__Cai*1e-3;
00539     rDY[14] = d_dt_calcium_dynamics__Ca_JSR*1e-3;
00540     rDY[15] = d_dt_calcium_dynamics__Ca_NSR*1e-3;
00541     rDY[16] = d_dt_calcium_dynamics__APtrack*1e-3;
00542     rDY[17] = d_dt_calcium_dynamics__APtrack2*1e-3;
00543     rDY[18] = d_dt_calcium_dynamics__APtrack3*1e-3;
00544     rDY[19] = d_dt_calcium_dynamics__Cainfluxtrack*1e-3;
00545     rDY[20] = d_dt_calcium_dynamics__OVRLDtrack*1e-3;
00546     rDY[21] = d_dt_calcium_dynamics__OVRLDtrack2*1e-3;
00547     rDY[22] = d_dt_calcium_dynamics__OVRLDtrack3*1e-3;
00548     rDY[23] = d_dt_ionic_concentrations__Nai*1e-3;
00549     rDY[24] = d_dt_ionic_concentrations__Ki*1e-3;
00550 }
00551 
00552 template<>
00553 void OdeSystemInformation<FaberRudy2000Version3Optimised>::Initialise(void)
00554 {
00555     this->mVariableNames.push_back("V");
00556     this->mVariableUnits.push_back("millivolt");
00557     this->mInitialConditions.push_back(-90);
00558 
00559     this->mVariableNames.push_back("m");
00560     this->mVariableUnits.push_back("dimensionless");
00561     this->mInitialConditions.push_back(0.0008);
00562 
00563     this->mVariableNames.push_back("h");
00564     this->mVariableUnits.push_back("dimensionless");
00565     this->mInitialConditions.push_back(0.993771);
00566 
00567     this->mVariableNames.push_back("j");
00568     this->mVariableUnits.push_back("dimensionless");
00569     this->mInitialConditions.push_back(0.995727);
00570 
00571     this->mVariableNames.push_back("d");
00572     this->mVariableUnits.push_back("dimensionless");
00573     this->mInitialConditions.push_back(3.210618e-6);
00574 
00575     this->mVariableNames.push_back("f");
00576     this->mVariableUnits.push_back("dimensionless");
00577     this->mInitialConditions.push_back(0.999837);
00578 
00579     this->mVariableNames.push_back("b");
00580     this->mVariableUnits.push_back("dimensionless");
00581     this->mInitialConditions.push_back(0.000970231);
00582 
00583     this->mVariableNames.push_back("g");
00584     this->mVariableUnits.push_back("dimensionless");
00585     this->mInitialConditions.push_back(0.994305);
00586 
00587     this->mVariableNames.push_back("xr");
00588     this->mVariableUnits.push_back("dimensionless");
00589     this->mInitialConditions.push_back(0.000124042);
00590 
00591     this->mVariableNames.push_back("xs1");
00592     this->mVariableUnits.push_back("dimensionless");
00593     this->mInitialConditions.push_back(0.00445683);
00594 
00595     this->mVariableNames.push_back("xs2");
00596     this->mVariableUnits.push_back("dimensionless");
00597     this->mInitialConditions.push_back(0.00445683);
00598 
00599     this->mVariableNames.push_back("zdv");
00600     this->mVariableUnits.push_back("dimensionless");
00601     this->mInitialConditions.push_back(0.5);
00602 
00603     this->mVariableNames.push_back("ydv");
00604     this->mVariableUnits.push_back("dimensionless");
00605     this->mInitialConditions.push_back(0.5);
00606 
00607     this->mVariableNames.push_back("CaI");
00608     this->mVariableUnits.push_back("millimolar");
00609     this->mInitialConditions.push_back(6e-5);
00610 
00611     this->mVariableNames.push_back("Ca_JSR");
00612     this->mVariableUnits.push_back("millimolar");
00613     this->mInitialConditions.push_back(1.8);
00614 
00615     this->mVariableNames.push_back("Ca_NSR");
00616     this->mVariableUnits.push_back("millimolar");
00617     this->mInitialConditions.push_back(1.8);
00618 
00619     this->mVariableNames.push_back("APtrack");
00620     this->mVariableUnits.push_back("dimensionless");
00621     this->mInitialConditions.push_back(0);
00622 
00623     this->mVariableNames.push_back("APtrack2");
00624     this->mVariableUnits.push_back("dimensionless");
00625     this->mInitialConditions.push_back(0);
00626 
00627     this->mVariableNames.push_back("APtrack3");
00628     this->mVariableUnits.push_back("dimensionless");
00629     this->mInitialConditions.push_back(0);
00630 
00631     this->mVariableNames.push_back("Cainfluxtrack");
00632     this->mVariableUnits.push_back("dimensionless");
00633     this->mInitialConditions.push_back(0);
00634 
00635     this->mVariableNames.push_back("OVRLDtrack");
00636     this->mVariableUnits.push_back("dimensionless");
00637     this->mInitialConditions.push_back(0);
00638 
00639     this->mVariableNames.push_back("OVRLDtrack2");
00640     this->mVariableUnits.push_back("dimensionless");
00641     this->mInitialConditions.push_back(0);
00642 
00643     this->mVariableNames.push_back("OVRLDtrack3");
00644     this->mVariableUnits.push_back("dimensionless");
00645     this->mInitialConditions.push_back(0);
00646 
00647     this->mVariableNames.push_back("Nai");
00648     this->mVariableUnits.push_back("millimolar");
00649     this->mInitialConditions.push_back(9);
00650 
00651     this->mVariableNames.push_back("Ki");
00652     this->mVariableUnits.push_back("millimolar");
00653     this->mInitialConditions.push_back(141.2);
00654 
00655     this->mInitialised = true;
00656 }

Generated by  doxygen 1.6.2