NobleVargheseKohlNoble1998Optimised.hpp

00001 #ifndef _CML_noble_varghese_kohl_noble_1998_basic_pe_lut_
00002 #define _CML_noble_varghese_kohl_noble_1998_basic_pe_lut_
00003 
00004 // Model: noble_varghese_kohl_noble_1998_basic
00005 // Processed by pycml - CellML Tools in Python
00006 //     (translate: 4024, pycml: 4024)
00007 // on Wed Jul 16 15:15:05 2008
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 CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables
00017 {
00018 public:
00019     static CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables* Instance()
00020     {
00021         if (mpInstance == NULL)
00022         {
00023             mpInstance = new CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables;
00024         }
00025         return mpInstance;
00026     }
00027 
00028     // Methods to look up values from lookup tables
00029     // using linear interpolation
00030     inline double _lookup_0(unsigned i, double factor)
00031     {
00032         double y1 = _lookup_table_0[i][0];
00033         double y2 = _lookup_table_0[i+1][0];
00034         return y1 + (y2-y1)*factor;
00035     }
00036 
00037     inline double _lookup_1(unsigned i, double factor)
00038     {
00039         double y1 = _lookup_table_0[i][1];
00040         double y2 = _lookup_table_0[i+1][1];
00041         return y1 + (y2-y1)*factor;
00042     }
00043 
00044     inline double _lookup_2(unsigned i, double factor)
00045     {
00046         double y1 = _lookup_table_0[i][2];
00047         double y2 = _lookup_table_0[i+1][2];
00048         return y1 + (y2-y1)*factor;
00049     }
00050 
00051     inline double _lookup_3(unsigned i, double factor)
00052     {
00053         double y1 = _lookup_table_0[i][3];
00054         double y2 = _lookup_table_0[i+1][3];
00055         return y1 + (y2-y1)*factor;
00056     }
00057 
00058     inline double _lookup_4(unsigned i, double factor)
00059     {
00060         double y1 = _lookup_table_0[i][4];
00061         double y2 = _lookup_table_0[i+1][4];
00062         return y1 + (y2-y1)*factor;
00063     }
00064 
00065     inline double _lookup_5(unsigned i, double factor)
00066     {
00067         double y1 = _lookup_table_0[i][5];
00068         double y2 = _lookup_table_0[i+1][5];
00069         return y1 + (y2-y1)*factor;
00070     }
00071 
00072     inline double _lookup_6(unsigned i, double factor)
00073     {
00074         double y1 = _lookup_table_0[i][6];
00075         double y2 = _lookup_table_0[i+1][6];
00076         return y1 + (y2-y1)*factor;
00077     }
00078 
00079     inline double _lookup_7(unsigned i, double factor)
00080     {
00081         double y1 = _lookup_table_0[i][7];
00082         double y2 = _lookup_table_0[i+1][7];
00083         return y1 + (y2-y1)*factor;
00084     }
00085 
00086     inline double _lookup_8(unsigned i, double factor)
00087     {
00088         double y1 = _lookup_table_0[i][8];
00089         double y2 = _lookup_table_0[i+1][8];
00090         return y1 + (y2-y1)*factor;
00091     }
00092 
00093     inline double _lookup_9(unsigned i, double factor)
00094     {
00095         double y1 = _lookup_table_0[i][9];
00096         double y2 = _lookup_table_0[i+1][9];
00097         return y1 + (y2-y1)*factor;
00098     }
00099 
00100     inline double _lookup_10(unsigned i, double factor)
00101     {
00102         double y1 = _lookup_table_0[i][10];
00103         double y2 = _lookup_table_0[i+1][10];
00104         return y1 + (y2-y1)*factor;
00105     }
00106 
00107     inline double _lookup_11(unsigned i, double factor)
00108     {
00109         double y1 = _lookup_table_0[i][11];
00110         double y2 = _lookup_table_0[i+1][11];
00111         return y1 + (y2-y1)*factor;
00112     }
00113 
00114     inline double _lookup_12(unsigned i, double factor)
00115     {
00116         double y1 = _lookup_table_0[i][12];
00117         double y2 = _lookup_table_0[i+1][12];
00118         return y1 + (y2-y1)*factor;
00119     }
00120 
00121     inline double _lookup_13(unsigned i, double factor)
00122     {
00123         double y1 = _lookup_table_0[i][13];
00124         double y2 = _lookup_table_0[i+1][13];
00125         return y1 + (y2-y1)*factor;
00126     }
00127 
00128     inline double _lookup_14(unsigned i, double factor)
00129     {
00130         double y1 = _lookup_table_0[i][14];
00131         double y2 = _lookup_table_0[i+1][14];
00132         return y1 + (y2-y1)*factor;
00133     }
00134 
00135     inline double _lookup_15(unsigned i, double factor)
00136     {
00137         double y1 = _lookup_table_0[i][15];
00138         double y2 = _lookup_table_0[i+1][15];
00139         return y1 + (y2-y1)*factor;
00140     }
00141 
00142     inline double _lookup_16(unsigned i, double factor)
00143     {
00144         double y1 = _lookup_table_0[i][16];
00145         double y2 = _lookup_table_0[i+1][16];
00146         return y1 + (y2-y1)*factor;
00147     }
00148 
00149     inline double _lookup_17(unsigned i, double factor)
00150     {
00151         double y1 = _lookup_table_0[i][17];
00152         double y2 = _lookup_table_0[i+1][17];
00153         return y1 + (y2-y1)*factor;
00154     }
00155 
00156     inline double _lookup_18(unsigned i, double factor)
00157     {
00158         double y1 = _lookup_table_0[i][18];
00159         double y2 = _lookup_table_0[i+1][18];
00160         return y1 + (y2-y1)*factor;
00161     }
00162 
00163     inline double _lookup_19(unsigned i, double factor)
00164     {
00165         double y1 = _lookup_table_0[i][19];
00166         double y2 = _lookup_table_0[i+1][19];
00167         return y1 + (y2-y1)*factor;
00168     }
00169 
00170     inline double _lookup_20(unsigned i, double factor)
00171     {
00172         double y1 = _lookup_table_0[i][20];
00173         double y2 = _lookup_table_0[i+1][20];
00174         return y1 + (y2-y1)*factor;
00175     }
00176 
00177     inline double _lookup_21(unsigned i, double factor)
00178     {
00179         double y1 = _lookup_table_0[i][21];
00180         double y2 = _lookup_table_0[i+1][21];
00181         return y1 + (y2-y1)*factor;
00182     }
00183 
00184     inline double _lookup_22(unsigned i, double factor)
00185     {
00186         double y1 = _lookup_table_0[i][22];
00187         double y2 = _lookup_table_0[i+1][22];
00188         return y1 + (y2-y1)*factor;
00189     }
00190 
00191     inline double _lookup_23(unsigned i, double factor)
00192     {
00193         double y1 = _lookup_table_0[i][23];
00194         double y2 = _lookup_table_0[i+1][23];
00195         return y1 + (y2-y1)*factor;
00196     }
00197 
00198     inline double _lookup_24(unsigned i, double factor)
00199     {
00200         double y1 = _lookup_table_0[i][24];
00201         double y2 = _lookup_table_0[i+1][24];
00202         return y1 + (y2-y1)*factor;
00203     }
00204 
00205     inline double _lookup_25(unsigned i, double factor)
00206     {
00207         double y1 = _lookup_table_0[i][25];
00208         double y2 = _lookup_table_0[i+1][25];
00209         return y1 + (y2-y1)*factor;
00210     }
00211 
00212     inline double _lookup_26(unsigned i, double factor)
00213     {
00214         double y1 = _lookup_table_0[i][26];
00215         double y2 = _lookup_table_0[i+1][26];
00216         return y1 + (y2-y1)*factor;
00217     }
00218 
00219     inline double _lookup_27(unsigned i, double factor)
00220     {
00221         double y1 = _lookup_table_0[i][27];
00222         double y2 = _lookup_table_0[i+1][27];
00223         return y1 + (y2-y1)*factor;
00224     }
00225 
00226     inline double _lookup_28(unsigned i, double factor)
00227     {
00228         double y1 = _lookup_table_0[i][28];
00229         double y2 = _lookup_table_0[i+1][28];
00230         return y1 + (y2-y1)*factor;
00231     }
00232 
00233     inline double _lookup_29(unsigned i, double factor)
00234     {
00235         double y1 = _lookup_table_0[i][29];
00236         double y2 = _lookup_table_0[i+1][29];
00237         return y1 + (y2-y1)*factor;
00238     }
00239 
00240     inline double _lookup_30(unsigned i, double factor)
00241     {
00242         double y1 = _lookup_table_0[i][30];
00243         double y2 = _lookup_table_0[i+1][30];
00244         return y1 + (y2-y1)*factor;
00245     }
00246 
00247     inline double _lookup_31(unsigned i, double factor)
00248     {
00249         double y1 = _lookup_table_0[i][31];
00250         double y2 = _lookup_table_0[i+1][31];
00251         return y1 + (y2-y1)*factor;
00252     }
00253 
00254     
00255 protected:
00256     CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables(const CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables&);
00257     CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables& operator= (const CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables&);
00258     CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables()
00259     {
00260         assert(mpInstance == NULL);
00261         for (int i=0 ; i<17001; i++)
00262         {
00263             double var_membrane__V = -100.0001 + i*0.01;
00264             _lookup_table_0[i][0] = 1.0 + exp((var_membrane__V + 9.0) * 0.0446428571429);
00265         }
00266 
00267         for (int i=0 ; i<17001; i++)
00268         {
00269             double var_membrane__V = -100.0001 + i*0.01;
00270             _lookup_table_0[i][1] = 50.0 / (1.0 + exp((-(var_membrane__V - 5.0)) * 0.111111111111));
00271         }
00272 
00273         for (int i=0 ; i<17001; i++)
00274         {
00275             double var_membrane__V = -100.0001 + i*0.01;
00276             _lookup_table_0[i][2] = 0.05 * exp((-(var_membrane__V - 20.0)) * 0.0666666666667);
00277         }
00278 
00279         for (int i=0 ; i<17001; i++)
00280         {
00281             double var_membrane__V = -100.0001 + i*0.01;
00282             _lookup_table_0[i][3] = 50.0 / (1.0 + exp((-(var_membrane__V - 5.0)) * 0.111111111111));
00283         }
00284 
00285         for (int i=0 ; i<17001; i++)
00286         {
00287             double var_membrane__V = -100.0001 + i*0.01;
00288             _lookup_table_0[i][4] = 0.4 * exp(-pow((var_membrane__V + 30.0) * 0.0333333333333, 3.0));
00289         }
00290 
00291         for (int i=0 ; i<17001; i++)
00292         {
00293             double var_membrane__V = -100.0001 + i*0.01;
00294             _lookup_table_0[i][5] = 14.0 / (1.0 + exp((-(var_membrane__V - 40.0)) * 0.111111111111));
00295         }
00296 
00297         for (int i=0 ; i<17001; i++)
00298         {
00299             double var_membrane__V = -100.0001 + i*0.01;
00300             _lookup_table_0[i][6] = 1.0 * exp((-var_membrane__V) * 0.0222222222222);
00301         }
00302 
00303         for (int i=0 ; i<17001; i++)
00304         {
00305             double var_membrane__V = -100.0001 + i*0.01;
00306             _lookup_table_0[i][7] = 8000.0 * exp( -0.056 * (var_membrane__V + 66.0));
00307         }
00308 
00309         for (int i=0 ; i<17001; i++)
00310         {
00311             double var_membrane__V = -100.0001 + i*0.01;
00312             _lookup_table_0[i][8] = 20.0 * exp( -0.125 * ((var_membrane__V + 75.0) - 0.0));
00313         }
00314 
00315         for (int i=0 ; i<17001; i++)
00316         {
00317             double var_membrane__V = -100.0001 + i*0.01;
00318             _lookup_table_0[i][9] = 2000.0 / (1.0 + (320.0 * exp( -0.1 * ((var_membrane__V + 75.0) - 0.0))));
00319         }
00320 
00321         for (int i=0 ; i<17001; i++)
00322         {
00323             double var_membrane__V = -100.0001 + i*0.01;
00324             _lookup_table_0[i][10] = 0.004 / (1.0 + exp((-(var_membrane__V + 52.0)) * 0.125));
00325         }
00326 
00327         for (int i=0 ; i<17001; i++)
00328         {
00329             double var_membrane__V = -100.0001 + i*0.01;
00330             _lookup_table_0[i][11] = 1.0 - exp(((-(var_membrane__V - 50.0)) * 96485.3415 * 2.0) * 3.87974901066e-07);
00331         }
00332 
00333         for (int i=0 ; i<17001; i++)
00334         {
00335             double var_membrane__V = -100.0001 + i*0.01;
00336             _lookup_table_0[i][12] = 2.0 * exp(((-(var_membrane__V - 50.0)) * 96485.3415 * 2.0) * 3.87974901066e-07);
00337         }
00338 
00339         for (int i=0 ; i<17001; i++)
00340         {
00341             double var_membrane__V = -100.0001 + i*0.01;
00342             _lookup_table_0[i][13] = 1.0 - exp(((-(var_membrane__V - 50.0)) * 96485.3415) * 3.87974901066e-07);
00343         }
00344 
00345         for (int i=0 ; i<17001; i++)
00346         {
00347             double var_membrane__V = -100.0001 + i*0.01;
00348             _lookup_table_0[i][14] = 4.0 * exp(((-(var_membrane__V - 50.0)) * 96485.3415) * 3.87974901066e-07);
00349         }
00350 
00351         for (int i=0 ; i<17001; i++)
00352         {
00353             double var_membrane__V = -100.0001 + i*0.01;
00354             _lookup_table_0[i][15] = 1.0 - exp(((-(var_membrane__V - 50.0)) * 96485.3415) * 3.87974901066e-07);
00355         }
00356 
00357         for (int i=0 ; i<17001; i++)
00358         {
00359             double var_membrane__V = -100.0001 + i*0.01;
00360             _lookup_table_0[i][16] = 140.0 * exp(((-(var_membrane__V - 50.0)) * 96485.3415) * 3.87974901066e-07);
00361         }
00362 
00363         for (int i=0 ; i<17001; i++)
00364         {
00365             double var_membrane__V = -100.0001 + i*0.01;
00366             _lookup_table_0[i][17] = 1.0 - exp(((-(var_membrane__V - 50.0)) * 96485.3415 * 2.0) * 3.87974901066e-07);
00367         }
00368 
00369         for (int i=0 ; i<17001; i++)
00370         {
00371             double var_membrane__V = -100.0001 + i*0.01;
00372             _lookup_table_0[i][18] = 2.0 * exp(((-(var_membrane__V - 50.0)) * 96485.3415 * 2.0) * 3.87974901066e-07);
00373         }
00374 
00375         for (int i=0 ; i<17001; i++)
00376         {
00377             double var_membrane__V = -100.0001 + i*0.01;
00378             _lookup_table_0[i][19] = 1.0 - exp(((-(var_membrane__V - 50.0)) * 96485.3415) * 3.87974901066e-07);
00379         }
00380 
00381         for (int i=0 ; i<17001; i++)
00382         {
00383             double var_membrane__V = -100.0001 + i*0.01;
00384             _lookup_table_0[i][20] = 4.0 * exp(((-(var_membrane__V - 50.0)) * 96485.3415) * 3.87974901066e-07);
00385         }
00386 
00387         for (int i=0 ; i<17001; i++)
00388         {
00389             double var_membrane__V = -100.0001 + i*0.01;
00390             _lookup_table_0[i][21] = 1.0 - exp(((-(var_membrane__V - 50.0)) * 96485.3415) * 3.87974901066e-07);
00391         }
00392 
00393         for (int i=0 ; i<17001; i++)
00394         {
00395             double var_membrane__V = -100.0001 + i*0.01;
00396             _lookup_table_0[i][22] = 140.0 * exp(((-(var_membrane__V - 50.0)) * 96485.3415) * 3.87974901066e-07);
00397         }
00398 
00399         for (int i=0 ; i<17001; i++)
00400         {
00401             double var_membrane__V = -100.0001 + i*0.01;
00402             _lookup_table_0[i][23] = 12.0 / (1.0 + exp(( -1.0 * (var_membrane__V + 34.0)) * 0.25));
00403         }
00404 
00405         for (int i=0 ; i<17001; i++)
00406         {
00407             double var_membrane__V = -100.0001 + i*0.01;
00408             _lookup_table_0[i][24] = 0.033 * exp((-var_membrane__V) * 0.0588235294118);
00409         }
00410 
00411         for (int i=0 ; i<17001; i++)
00412         {
00413             double var_membrane__V = -100.0001 + i*0.01;
00414             _lookup_table_0[i][25] = 33.0 / (1.0 + exp( -0.125 * (var_membrane__V + 10.0)));
00415         }
00416 
00417         for (int i=0 ; i<17001; i++)
00418         {
00419             double var_membrane__V = -100.0001 + i*0.01;
00420             _lookup_table_0[i][26] = 1.0 / (1.0 + exp((-(var_membrane__V + 4.0)) * 0.2));
00421         }
00422 
00423         for (int i=0 ; i<17001; i++)
00424         {
00425             double var_membrane__V = -100.0001 + i*0.01;
00426             _lookup_table_0[i][27] = exp((0.5 * 1.0 * var_membrane__V * 96485.3415) * 3.87974901066e-07);
00427         }
00428 
00429         for (int i=0 ; i<17001; i++)
00430         {
00431             double var_membrane__V = -100.0001 + i*0.01;
00432             _lookup_table_0[i][28] = exp(( -0.5 * 1.0 * var_membrane__V * 96485.3415) * 3.87974901066e-07);
00433         }
00434 
00435         for (int i=0 ; i<17001; i++)
00436         {
00437             double var_membrane__V = -100.0001 + i*0.01;
00438             _lookup_table_0[i][29] = exp((0.5 * 1.0 * var_membrane__V * 96485.3415) * 3.87974901066e-07);
00439         }
00440 
00441         for (int i=0 ; i<17001; i++)
00442         {
00443             double var_membrane__V = -100.0001 + i*0.01;
00444             _lookup_table_0[i][30] = exp(( -0.5 * 1.0 * var_membrane__V * 96485.3415) * 3.87974901066e-07);
00445         }
00446 
00447         for (int i=0 ; i<17001; i++)
00448         {
00449             double var_membrane__V = -100.0001 + i*0.01;
00450             _lookup_table_0[i][31] = 0.0 * exp(0.08 * (var_membrane__V - 40.0));
00451         }
00452 
00453     }
00454 
00455 private:
00457     static CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables *mpInstance;
00458     // Lookup tables
00459     double _lookup_table_0[17001][32];
00460     
00461 };
00462 
00463 CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables* CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::mpInstance = NULL;
00464 
00465 class CML_noble_varghese_kohl_noble_1998_basic_pe_lut : public AbstractCardiacCell
00466 {
00467     // 
00468     // Settable parameters and readable variables
00469     // 
00470     double var_membrane__i_K1;
00471     double var_membrane__i_to;
00472     double var_membrane__i_Kr;
00473     double var_membrane__i_Ks;
00474     double var_membrane__i_Ca_L_K_cyt;
00475     double var_membrane__i_Ca_L_K_ds;
00476     double var_membrane__i_NaK;
00477     double var_membrane__i_Na;
00478     double var_membrane__i_b_Na;
00479     double var_membrane__i_p_Na;
00480     double var_membrane__i_Ca_L_Na_cyt;
00481     double var_membrane__i_Ca_L_Na_ds;
00482     double var_membrane__i_NaCa_cyt;
00483     double var_membrane__i_NaCa_ds;
00484     double var_membrane__i_Ca_L_Ca_cyt;
00485     double var_membrane__i_Ca_L_Ca_ds;
00486     double var_membrane__i_b_Ca;
00487     double var_membrane__i_Stim;
00488 public:
00489     double Get_membrane__i_K1()
00490     {
00491         return var_membrane__i_K1;
00492     }
00493 
00494     double Get_membrane__i_to()
00495     {
00496         return var_membrane__i_to;
00497     }
00498 
00499     double Get_membrane__i_Kr()
00500     {
00501         return var_membrane__i_Kr;
00502     }
00503 
00504     double Get_membrane__i_Ks()
00505     {
00506         return var_membrane__i_Ks;
00507     }
00508 
00509     double Get_membrane__i_Ca_L_K_cyt()
00510     {
00511         return var_membrane__i_Ca_L_K_cyt;
00512     }
00513 
00514     double Get_membrane__i_Ca_L_K_ds()
00515     {
00516         return var_membrane__i_Ca_L_K_ds;
00517     }
00518 
00519     double Get_membrane__i_NaK()
00520     {
00521         return var_membrane__i_NaK;
00522     }
00523 
00524     double Get_membrane__i_Na()
00525     {
00526         return var_membrane__i_Na;
00527     }
00528 
00529     double Get_membrane__i_b_Na()
00530     {
00531         return var_membrane__i_b_Na;
00532     }
00533 
00534     double Get_membrane__i_p_Na()
00535     {
00536         return var_membrane__i_p_Na;
00537     }
00538 
00539     double Get_membrane__i_Ca_L_Na_cyt()
00540     {
00541         return var_membrane__i_Ca_L_Na_cyt;
00542     }
00543 
00544     double Get_membrane__i_Ca_L_Na_ds()
00545     {
00546         return var_membrane__i_Ca_L_Na_ds;
00547     }
00548 
00549     double Get_membrane__i_NaCa_cyt()
00550     {
00551         return var_membrane__i_NaCa_cyt;
00552     }
00553 
00554     double Get_membrane__i_NaCa_ds()
00555     {
00556         return var_membrane__i_NaCa_ds;
00557     }
00558 
00559     double Get_membrane__i_Ca_L_Ca_cyt()
00560     {
00561         return var_membrane__i_Ca_L_Ca_cyt;
00562     }
00563 
00564     double Get_membrane__i_Ca_L_Ca_ds()
00565     {
00566         return var_membrane__i_Ca_L_Ca_ds;
00567     }
00568 
00569     double Get_membrane__i_b_Ca()
00570     {
00571         return var_membrane__i_b_Ca;
00572     }
00573 
00574     double Get_membrane__i_Stim()
00575     {
00576         return var_membrane__i_Stim;
00577     }
00578 
00579     CML_noble_varghese_kohl_noble_1998_basic_pe_lut(AbstractIvpOdeSolver *pSolver,
00580                                                     AbstractStimulusFunction *pIntracellularStimulus)
00581         : AbstractCardiacCell(pSolver, 22, 0, pIntracellularStimulus)
00582     {
00583         mpSystemInfo = OdeSystemInformation<CML_noble_varghese_kohl_noble_1998_basic_pe_lut>::Instance();
00584 
00585         Init();
00586 
00587     }
00588 
00589     ~CML_noble_varghese_kohl_noble_1998_basic_pe_lut(void)
00590     {
00591     }
00592 
00593     // Lookup table indices
00594     unsigned _table_index_0;
00595     double _factor_0;
00596 
00597     double GetIIonic()
00598     {
00599         std::vector<double>& rY = rGetStateVariables();
00600         double var_membrane__V = rY[0];
00601         // Units: millivolt; Initial value: -92.849333
00602         double var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = rY[1];
00603         // Units: dimensionless; Initial value: 1.03e-5
00604         double var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = rY[2];
00605         // Units: dimensionless; Initial value: 2e-7
00606         double var_slow_delayed_rectifier_potassium_current_xs_gate__xs = rY[3];
00607         // Units: dimensionless; Initial value: 0.001302
00608         double var_fast_sodium_current_m_gate__m = rY[4];
00609         // Units: dimensionless; Initial value: 0.0016203
00610         double var_fast_sodium_current_h_gate__h = rY[5];
00611         // Units: dimensionless; Initial value: 0.9944036
00612         double var_L_type_Ca_channel_d_gate__d = rY[6];
00613         // Units: dimensionless; Initial value: 0
00614         double var_L_type_Ca_channel_f_gate__f = rY[7];
00615         // Units: dimensionless; Initial value: 1
00616         double var_L_type_Ca_channel_f2_gate__f2 = rY[8];
00617         // Units: dimensionless; Initial value: 0.9349197
00618         double var_L_type_Ca_channel_f2ds_gate__f2ds = rY[9];
00619         // Units: dimensionless; Initial value: 0.9651958
00620         double var_transient_outward_current_s_gate__s = rY[10];
00621         // Units: dimensionless; Initial value: 0.9948645
00622         double var_transient_outward_current_r_gate__r = rY[11];
00623         // Units: dimensionless; Initial value: 0
00624         double var_intracellular_sodium_concentration__Na_i = rY[14];
00625         // Units: millimolar; Initial value: 7.3321223
00626         double var_intracellular_potassium_concentration__K_i = rY[15];
00627         // Units: millimolar; Initial value: 136.5644281
00628         double var_intracellular_calcium_concentration__Ca_i = rY[16];
00629         // Units: millimolar; Initial value: 1.4e-5
00630         double var_intracellular_calcium_concentration__Ca_ds = rY[17];
00631         // Units: millimolar; Initial value: 1.88e-5
00632         
00633         // Lookup table indexing
00634 #define COVERAGE_IGNORE
00635         if (var_membrane__V>69.9999 || var_membrane__V<-100.0001)
00636             EXCEPTION(DumpState("V outside lookup table range", rY));
00637 #undef COVERAGE_IGNORE
00638         double _offset_0 = var_membrane__V - -100.0001;
00639         double _offset_0_over_table_step = _offset_0 * 100.0;
00640         unsigned _table_index_0 = (unsigned) floor(_offset_0_over_table_step);
00641         double _factor_0 = _offset_0_over_table_step - _table_index_0;
00642         
00643         double var_reversal_potentials__E_K = 26.7137606597 * log(4.0 / var_intracellular_potassium_concentration__K_i);
00644         double var_time_independent_potassium_current__i_K1 = (0.142857142857 * (var_membrane__V - var_reversal_potentials__E_K)) / (1.0 + exp((((var_membrane__V - var_reversal_potentials__E_K) - 10.0) * 96485.3415 * 1.25) * 3.87974901066e-07));
00645         var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00646         double var_transient_outward_current__i_to = 0.005 * (0.0 + (var_transient_outward_current_s_gate__s * 1.0)) * var_transient_outward_current_r_gate__r * (var_membrane__V - var_reversal_potentials__E_K);
00647         var_membrane__i_to = var_transient_outward_current__i_to;
00648         double var_rapid_delayed_rectifier_potassium_current__i_Kr = ((((0.0021 * var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1) + (0.0013 * var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2)) * 1.0) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_0(_table_index_0, _factor_0)) * (var_membrane__V - var_reversal_potentials__E_K);
00649         var_membrane__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00650         double var_slow_delayed_rectifier_potassium_current__i_Ks = 0.0026 * pow(var_slow_delayed_rectifier_potassium_current_xs_gate__xs, 2.0) * (var_membrane__V - (26.7137606597 * log(8.2 / (var_intracellular_potassium_concentration__K_i + (0.03 * var_intracellular_sodium_concentration__Na_i)))));
00651         var_membrane__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00652         double var_L_type_Ca_channel__i_Ca_L_K_cyt = (((0.0 * 0.002 * 0.1 * var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f2_gate__f2 * (var_membrane__V - 50.0) * 96485.3415) * 3.87974901066e-07) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_13(_table_index_0, _factor_0)) * ((var_intracellular_potassium_concentration__K_i * 6.49930040518) - CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_14(_table_index_0, _factor_0));
00653         var_membrane__i_Ca_L_K_cyt = var_L_type_Ca_channel__i_Ca_L_K_cyt;
00654         double var_L_type_Ca_channel__i_Ca_L_K_ds = (((1.0 * 0.002 * 0.1 * var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f2ds_gate__f2ds * (var_membrane__V - 50.0) * 96485.3415) * 3.87974901066e-07) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_19(_table_index_0, _factor_0)) * ((var_intracellular_potassium_concentration__K_i * 6.49930040518) - CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_20(_table_index_0, _factor_0));
00655         var_membrane__i_Ca_L_K_ds = var_L_type_Ca_channel__i_Ca_L_K_ds;
00656         double var_sodium_potassium_pump__i_NaK = (0.56 * var_intracellular_sodium_concentration__Na_i) / (40.0 + var_intracellular_sodium_concentration__Na_i);
00657         var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00658         double var_fast_sodium_current__i_Na = 2.5 * pow(var_fast_sodium_current_m_gate__m, 3.0) * var_fast_sodium_current_h_gate__h * (var_membrane__V - (26.7137606597 * log(140.48 / (var_intracellular_sodium_concentration__Na_i + (0.12 * var_intracellular_potassium_concentration__K_i)))));
00659         var_membrane__i_Na = var_fast_sodium_current__i_Na;
00660         double var_reversal_potentials__E_Na = 26.7137606597 * log(140.0 / var_intracellular_sodium_concentration__Na_i);
00661         double var_sodium_background_current__i_b_Na = 0.0006 * (var_membrane__V - var_reversal_potentials__E_Na);
00662         var_membrane__i_b_Na = var_sodium_background_current__i_b_Na;
00663         double var_persistent_sodium_current__i_p_Na = CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_10(_table_index_0, _factor_0) * (var_membrane__V - var_reversal_potentials__E_Na);
00664         var_membrane__i_p_Na = var_persistent_sodium_current__i_p_Na;
00665         double var_L_type_Ca_channel__i_Ca_L_Na_cyt = (((0.0 * 0.01 * 0.1 * var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f2_gate__f2 * (var_membrane__V - 50.0) * 96485.3415) * 3.87974901066e-07) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_15(_table_index_0, _factor_0)) * ((var_intracellular_sodium_concentration__Na_i * 6.49930040518) - CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_16(_table_index_0, _factor_0));
00666         var_membrane__i_Ca_L_Na_cyt = var_L_type_Ca_channel__i_Ca_L_Na_cyt;
00667         double var_L_type_Ca_channel__i_Ca_L_Na_ds = (((1.0 * 0.01 * 0.1 * var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f2ds_gate__f2ds * (var_membrane__V - 50.0) * 96485.3415) * 3.87974901066e-07) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_21(_table_index_0, _factor_0)) * ((var_intracellular_sodium_concentration__Na_i * 6.49930040518) - CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_22(_table_index_0, _factor_0));
00668         var_membrane__i_Ca_L_Na_ds = var_L_type_Ca_channel__i_Ca_L_Na_ds;
00669         double var_sodium_calcium_exchanger__i_NaCa_cyt = (0.999 * 0.0005 * ((CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_27(_table_index_0, _factor_0) * pow(var_intracellular_sodium_concentration__Na_i, 3.0) * 2.0) - (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_28(_table_index_0, _factor_0) * 2744000.0 * var_intracellular_calcium_concentration__Ca_i))) / ((1.0 + (0.0 * ((var_intracellular_calcium_concentration__Ca_i * 2744000.0) + (2.0 * pow(var_intracellular_sodium_concentration__Na_i, 3.0))))) * (1.0 + (var_intracellular_calcium_concentration__Ca_i * 144.927536232)));
00670         var_membrane__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
00671         double var_sodium_calcium_exchanger__i_NaCa_ds = (0.001 * 0.0005 * ((CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_29(_table_index_0, _factor_0) * pow(var_intracellular_sodium_concentration__Na_i, 3.0) * 2.0) - (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_30(_table_index_0, _factor_0) * 2744000.0 * var_intracellular_calcium_concentration__Ca_ds))) / ((1.0 + (0.0 * ((var_intracellular_calcium_concentration__Ca_ds * 2744000.0) + (2.0 * pow(var_intracellular_sodium_concentration__Na_i, 3.0))))) * (1.0 + (var_intracellular_calcium_concentration__Ca_ds * 144.927536232)));
00672         var_membrane__i_NaCa_ds = var_sodium_calcium_exchanger__i_NaCa_ds;
00673         double var_L_type_Ca_channel__i_Ca_L_Ca_cyt = (((0.0 * 4.0 * 0.1 * var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f2_gate__f2 * (var_membrane__V - 50.0) * 96485.3415) * 3.87974901066e-07) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_11(_table_index_0, _factor_0)) * ((var_intracellular_calcium_concentration__Ca_i * 42.2409057568) - CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_12(_table_index_0, _factor_0));
00674         var_membrane__i_Ca_L_Ca_cyt = var_L_type_Ca_channel__i_Ca_L_Ca_cyt;
00675         double var_L_type_Ca_channel__i_Ca_L_Ca_ds = (((1.0 * 4.0 * 0.1 * var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f2ds_gate__f2ds * (var_membrane__V - 50.0) * 96485.3415) * 3.87974901066e-07) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_17(_table_index_0, _factor_0)) * ((var_intracellular_calcium_concentration__Ca_i * 42.2409057568) - CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_18(_table_index_0, _factor_0));
00676         var_membrane__i_Ca_L_Ca_ds = var_L_type_Ca_channel__i_Ca_L_Ca_ds;
00677         double var_calcium_background_current__i_b_Ca = 0.00025 * (var_membrane__V - (13.3568803298 * log(2.0 / var_intracellular_calcium_concentration__Ca_i)));
00678         var_membrane__i_b_Ca = var_calcium_background_current__i_b_Ca;
00679         
00690         double value_in_nA =  var_membrane__i_K1+var_membrane__i_to+var_membrane__i_Kr+var_membrane__i_Ks+var_membrane__i_Ca_L_K_cyt+var_membrane__i_Ca_L_K_ds+var_membrane__i_NaK+var_membrane__i_Na+var_membrane__i_b_Na+var_membrane__i_p_Na+var_membrane__i_Ca_L_Na_cyt+var_membrane__i_Ca_L_Na_ds+var_membrane__i_NaCa_cyt+var_membrane__i_NaCa_ds+var_membrane__i_Ca_L_Ca_cyt+var_membrane__i_Ca_L_Ca_ds+var_membrane__i_b_Ca;
00691         double value_in_microA = 0.001*value_in_nA;
00692         double value_in_microA_per_cm_squared = value_in_microA/0.000095;   
00693         return value_in_microA_per_cm_squared;
00694     }
00695 
00696     void EvaluateYDerivatives (
00697             double var_environment__time,
00698             const std::vector<double> &rY,
00699             std::vector<double> &rDY)
00700     {
00701         // Inputs:
00702         // Time units: second
00703         var_environment__time *= 0.001;
00704         double var_membrane__V = rY[0];
00705         // Units: millivolt; Initial value: -92.849333
00706         double var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = rY[1];
00707         // Units: dimensionless; Initial value: 1.03e-5
00708         double var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = rY[2];
00709         // Units: dimensionless; Initial value: 2e-7
00710         double var_slow_delayed_rectifier_potassium_current_xs_gate__xs = rY[3];
00711         // Units: dimensionless; Initial value: 0.001302
00712         double var_fast_sodium_current_m_gate__m = rY[4];
00713         // Units: dimensionless; Initial value: 0.0016203
00714         double var_fast_sodium_current_h_gate__h = rY[5];
00715         // Units: dimensionless; Initial value: 0.9944036
00716         double var_L_type_Ca_channel_d_gate__d = rY[6];
00717         // Units: dimensionless; Initial value: 0
00718         double var_L_type_Ca_channel_f_gate__f = rY[7];
00719         // Units: dimensionless; Initial value: 1
00720         double var_L_type_Ca_channel_f2_gate__f2 = rY[8];
00721         // Units: dimensionless; Initial value: 0.9349197
00722         double var_L_type_Ca_channel_f2ds_gate__f2ds = rY[9];
00723         // Units: dimensionless; Initial value: 0.9651958
00724         double var_transient_outward_current_s_gate__s = rY[10];
00725         // Units: dimensionless; Initial value: 0.9948645
00726         double var_transient_outward_current_r_gate__r = rY[11];
00727         // Units: dimensionless; Initial value: 0
00728         double var_calcium_release__ActFrac = rY[12];
00729         // Units: dimensionless; Initial value: 0.0042614
00730         double var_calcium_release__ProdFrac = rY[13];
00731         // Units: dimensionless; Initial value: 0.4068154
00732         double var_intracellular_sodium_concentration__Na_i = rY[14];
00733         // Units: millimolar; Initial value: 7.3321223
00734         double var_intracellular_potassium_concentration__K_i = rY[15];
00735         // Units: millimolar; Initial value: 136.5644281
00736         double var_intracellular_calcium_concentration__Ca_i = rY[16];
00737         // Units: millimolar; Initial value: 1.4e-5
00738         double var_intracellular_calcium_concentration__Ca_ds = rY[17];
00739         // Units: millimolar; Initial value: 1.88e-5
00740         double var_intracellular_calcium_concentration__Ca_up = rY[18];
00741         // Units: millimolar; Initial value: 0.4531889
00742         double var_intracellular_calcium_concentration__Ca_rel = rY[19];
00743         // Units: millimolar; Initial value: 0.4481927
00744         double var_intracellular_calcium_concentration__Ca_Calmod = rY[20];
00745         // Units: millimolar; Initial value: 0.0005555
00746         double var_intracellular_calcium_concentration__Ca_Trop = rY[21];
00747         // Units: millimolar; Initial value: 0.0003542
00748         
00749         
00750         // Lookup table indexing
00751 #define COVERAGE_IGNORE
00752         if (var_membrane__V>69.9999 || var_membrane__V<-100.0001)
00753             EXCEPTION(DumpState("V outside lookup table range", rY));
00754 #undef COVERAGE_IGNORE
00755         double _offset_0 = var_membrane__V - -100.0001;
00756         double _offset_0_over_table_step = _offset_0 * 100.0;
00757         unsigned _table_index_0 = (unsigned) floor(_offset_0_over_table_step);
00758         double _factor_0 = _offset_0_over_table_step - _table_index_0;
00759         
00760         // Mathematics
00761         double var_reversal_potentials__E_K = 26.7137606597 * log(4.0 / var_intracellular_potassium_concentration__K_i);
00762         double var_time_independent_potassium_current__i_K1 = (0.142857142857 * (var_membrane__V - var_reversal_potentials__E_K)) / (1.0 + exp((((var_membrane__V - var_reversal_potentials__E_K) - 10.0) * 96485.3415 * 1.25) * 3.87974901066e-07));
00763         var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00764         double var_transient_outward_current__i_to = 0.005 * (0.0 + (var_transient_outward_current_s_gate__s * 1.0)) * var_transient_outward_current_r_gate__r * (var_membrane__V - var_reversal_potentials__E_K);
00765         var_membrane__i_to = var_transient_outward_current__i_to;
00766         double var_rapid_delayed_rectifier_potassium_current__i_Kr = ((((0.0021 * var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1) + (0.0013 * var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2)) * 1.0) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_0(_table_index_0, _factor_0)) * (var_membrane__V - var_reversal_potentials__E_K);
00767         var_membrane__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00768         double var_slow_delayed_rectifier_potassium_current__i_Ks = 0.0026 * pow(var_slow_delayed_rectifier_potassium_current_xs_gate__xs, 2.0) * (var_membrane__V - (26.7137606597 * log(8.2 / (var_intracellular_potassium_concentration__K_i + (0.03 * var_intracellular_sodium_concentration__Na_i)))));
00769         var_membrane__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00770         double var_L_type_Ca_channel__i_Ca_L_K_cyt = (((0.0 * 0.002 * 0.1 * var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f2_gate__f2 * (var_membrane__V - 50.0) * 96485.3415) * 3.87974901066e-07) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_13(_table_index_0, _factor_0)) * ((var_intracellular_potassium_concentration__K_i * 6.49930040518) - CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_14(_table_index_0, _factor_0));
00771         var_membrane__i_Ca_L_K_cyt = var_L_type_Ca_channel__i_Ca_L_K_cyt;
00772         double var_L_type_Ca_channel__i_Ca_L_K_ds = (((1.0 * 0.002 * 0.1 * var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f2ds_gate__f2ds * (var_membrane__V - 50.0) * 96485.3415) * 3.87974901066e-07) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_19(_table_index_0, _factor_0)) * ((var_intracellular_potassium_concentration__K_i * 6.49930040518) - CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_20(_table_index_0, _factor_0));
00773         var_membrane__i_Ca_L_K_ds = var_L_type_Ca_channel__i_Ca_L_K_ds;
00774         double var_sodium_potassium_pump__i_NaK = (0.56 * var_intracellular_sodium_concentration__Na_i) / (40.0 + var_intracellular_sodium_concentration__Na_i);
00775         var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00776         double var_fast_sodium_current__i_Na = 2.5 * pow(var_fast_sodium_current_m_gate__m, 3.0) * var_fast_sodium_current_h_gate__h * (var_membrane__V - (26.7137606597 * log(140.48 / (var_intracellular_sodium_concentration__Na_i + (0.12 * var_intracellular_potassium_concentration__K_i)))));
00777         var_membrane__i_Na = var_fast_sodium_current__i_Na;
00778         double var_reversal_potentials__E_Na = 26.7137606597 * log(140.0 / var_intracellular_sodium_concentration__Na_i);
00779         double var_sodium_background_current__i_b_Na = 0.0006 * (var_membrane__V - var_reversal_potentials__E_Na);
00780         var_membrane__i_b_Na = var_sodium_background_current__i_b_Na;
00781         double var_persistent_sodium_current__i_p_Na = CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_10(_table_index_0, _factor_0) * (var_membrane__V - var_reversal_potentials__E_Na);
00782         var_membrane__i_p_Na = var_persistent_sodium_current__i_p_Na;
00783         double var_L_type_Ca_channel__i_Ca_L_Na_cyt = (((0.0 * 0.01 * 0.1 * var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f2_gate__f2 * (var_membrane__V - 50.0) * 96485.3415) * 3.87974901066e-07) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_15(_table_index_0, _factor_0)) * ((var_intracellular_sodium_concentration__Na_i * 6.49930040518) - CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_16(_table_index_0, _factor_0));
00784         var_membrane__i_Ca_L_Na_cyt = var_L_type_Ca_channel__i_Ca_L_Na_cyt;
00785         double var_L_type_Ca_channel__i_Ca_L_Na_ds = (((1.0 * 0.01 * 0.1 * var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f2ds_gate__f2ds * (var_membrane__V - 50.0) * 96485.3415) * 3.87974901066e-07) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_21(_table_index_0, _factor_0)) * ((var_intracellular_sodium_concentration__Na_i * 6.49930040518) - CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_22(_table_index_0, _factor_0));
00786         var_membrane__i_Ca_L_Na_ds = var_L_type_Ca_channel__i_Ca_L_Na_ds;
00787         double var_sodium_calcium_exchanger__i_NaCa_cyt = (0.999 * 0.0005 * ((CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_27(_table_index_0, _factor_0) * pow(var_intracellular_sodium_concentration__Na_i, 3.0) * 2.0) - (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_28(_table_index_0, _factor_0) * 2744000.0 * var_intracellular_calcium_concentration__Ca_i))) / ((1.0 + (0.0 * ((var_intracellular_calcium_concentration__Ca_i * 2744000.0) + (2.0 * pow(var_intracellular_sodium_concentration__Na_i, 3.0))))) * (1.0 + (var_intracellular_calcium_concentration__Ca_i * 144.927536232)));
00788         var_membrane__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
00789         double var_sodium_calcium_exchanger__i_NaCa_ds = (0.001 * 0.0005 * ((CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_29(_table_index_0, _factor_0) * pow(var_intracellular_sodium_concentration__Na_i, 3.0) * 2.0) - (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_30(_table_index_0, _factor_0) * 2744000.0 * var_intracellular_calcium_concentration__Ca_ds))) / ((1.0 + (0.0 * ((var_intracellular_calcium_concentration__Ca_ds * 2744000.0) + (2.0 * pow(var_intracellular_sodium_concentration__Na_i, 3.0))))) * (1.0 + (var_intracellular_calcium_concentration__Ca_ds * 144.927536232)));
00790         var_membrane__i_NaCa_ds = var_sodium_calcium_exchanger__i_NaCa_ds;
00791         double var_L_type_Ca_channel__i_Ca_L_Ca_cyt = (((0.0 * 4.0 * 0.1 * var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f2_gate__f2 * (var_membrane__V - 50.0) * 96485.3415) * 3.87974901066e-07) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_11(_table_index_0, _factor_0)) * ((var_intracellular_calcium_concentration__Ca_i * 42.2409057568) - CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_12(_table_index_0, _factor_0));
00792         var_membrane__i_Ca_L_Ca_cyt = var_L_type_Ca_channel__i_Ca_L_Ca_cyt;
00793         double var_L_type_Ca_channel__i_Ca_L_Ca_ds = (((1.0 * 4.0 * 0.1 * var_L_type_Ca_channel_d_gate__d * var_L_type_Ca_channel_f_gate__f * var_L_type_Ca_channel_f2ds_gate__f2ds * (var_membrane__V - 50.0) * 96485.3415) * 3.87974901066e-07) / CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_17(_table_index_0, _factor_0)) * ((var_intracellular_calcium_concentration__Ca_i * 42.2409057568) - CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_18(_table_index_0, _factor_0));
00794         var_membrane__i_Ca_L_Ca_ds = var_L_type_Ca_channel__i_Ca_L_Ca_ds;
00795         double var_calcium_background_current__i_b_Ca = 0.00025 * (var_membrane__V - (13.3568803298 * log(2.0 / var_intracellular_calcium_concentration__Ca_i)));
00796         var_membrane__i_b_Ca = var_calcium_background_current__i_b_Ca;
00797         double var_membrane__i_Stim = GetStimulus((1.0/0.001)*var_environment__time);
00798         double var_fast_sodium_current_m_gate__E0_m = var_membrane__V + 41.0;
00799         double var_L_type_Ca_channel_d_gate__E0_d = (var_membrane__V + 24.0) - 5.0;
00800         double var_L_type_Ca_channel_f_gate__E0_f = var_membrane__V + 34.0;
00801         double var_sarcoplasmic_reticulum_calcium_pump__K_2 = var_intracellular_calcium_concentration__Ca_i + (var_intracellular_calcium_concentration__Ca_up * 0.00024) + 0.00012 + 0.0003;
00802         double var_sarcoplasmic_reticulum_calcium_pump__i_up = ((var_intracellular_calcium_concentration__Ca_i / var_sarcoplasmic_reticulum_calcium_pump__K_2) * 0.4) - (((var_intracellular_calcium_concentration__Ca_up * 0.00024) / var_sarcoplasmic_reticulum_calcium_pump__K_2) * 0.03);
00803         double var_calcium_translocation__i_trans = 50.0 * (var_intracellular_calcium_concentration__Ca_up - var_intracellular_calcium_concentration__Ca_rel);
00804         double var_calcium_release__i_rel = ((pow(var_calcium_release__ActFrac / (var_calcium_release__ActFrac + 0.25), 2.0) * 250.0) + 0.05) * var_intracellular_calcium_concentration__Ca_rel;
00805         double var_calcium_release__CaiReg = var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + 0.0005);
00806         double var_calcium_release__RegBindSite = var_calcium_release__CaiReg + ((1.0 - var_calcium_release__CaiReg) * (var_intracellular_calcium_concentration__Ca_ds / (var_intracellular_calcium_concentration__Ca_ds + 0.01)));
00807         double var_calcium_release__InactRate = 60.0 + (500.0 * pow(var_calcium_release__RegBindSite, 2.0));
00808         double var_calcium_release__SpeedRel = (var_membrane__V <  -50.0) ? 5.0 : 1.0;
00809         double d_dt_membrane__V;
00810         if (mSetVoltageDerivativeToZero)
00811         {
00812             d_dt_membrane__V = 0.0;
00813         }
00814         else
00815         {
00816             d_dt_membrane__V =  -10526.3157895 * (var_membrane__i_Stim + var_membrane__i_K1 + var_membrane__i_to + var_membrane__i_Kr + var_membrane__i_Ks + var_membrane__i_NaK + var_membrane__i_Na + var_membrane__i_b_Na + var_membrane__i_p_Na + var_membrane__i_Ca_L_Na_cyt + var_membrane__i_Ca_L_Na_ds + var_membrane__i_NaCa_cyt + var_membrane__i_NaCa_ds + var_membrane__i_Ca_L_Ca_cyt + var_membrane__i_Ca_L_Ca_ds + var_membrane__i_Ca_L_K_cyt + var_membrane__i_Ca_L_K_ds + var_membrane__i_b_Ca);
00817         }
00818         double d_dt_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_1(_table_index_0, _factor_0) * (1.0 - var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1)) - (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_2(_table_index_0, _factor_0) * var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1);
00819         double d_dt_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_3(_table_index_0, _factor_0) * (1.0 - var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2)) - (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_4(_table_index_0, _factor_0) * var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2);
00820         double d_dt_slow_delayed_rectifier_potassium_current_xs_gate__xs = (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_5(_table_index_0, _factor_0) * (1.0 - var_slow_delayed_rectifier_potassium_current_xs_gate__xs)) - (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_6(_table_index_0, _factor_0) * var_slow_delayed_rectifier_potassium_current_xs_gate__xs);
00821         double d_dt_fast_sodium_current_m_gate__m = (((fabs(var_fast_sodium_current_m_gate__E0_m) < 1e-05) ? 2000.0 : ((200.0 * var_fast_sodium_current_m_gate__E0_m) / (1.0 - exp( -0.1 * var_fast_sodium_current_m_gate__E0_m)))) * (1.0 - var_fast_sodium_current_m_gate__m)) - (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_7(_table_index_0, _factor_0) * var_fast_sodium_current_m_gate__m);
00822         double d_dt_fast_sodium_current_h_gate__h = (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_8(_table_index_0, _factor_0) * (1.0 - var_fast_sodium_current_h_gate__h)) - (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_9(_table_index_0, _factor_0) * var_fast_sodium_current_h_gate__h);
00823         double d_dt_L_type_Ca_channel_d_gate__d = 3.0 * ((((fabs(var_L_type_Ca_channel_d_gate__E0_d) < 0.0001) ? 120.0 : ((30.0 * var_L_type_Ca_channel_d_gate__E0_d) / (1.0 - exp((-var_L_type_Ca_channel_d_gate__E0_d) * 0.25)))) * (1.0 - var_L_type_Ca_channel_d_gate__d)) - (((fabs(var_L_type_Ca_channel_d_gate__E0_d) < 0.0001) ? 120.0 : ((12.0 * var_L_type_Ca_channel_d_gate__E0_d) / (exp(var_L_type_Ca_channel_d_gate__E0_d * 0.1) - 1.0))) * var_L_type_Ca_channel_d_gate__d));
00824         double d_dt_L_type_Ca_channel_f_gate__f = 0.3 * ((((fabs(var_L_type_Ca_channel_f_gate__E0_f) < 0.0001) ? 25.0 : ((6.25 * var_L_type_Ca_channel_f_gate__E0_f) / (exp(var_L_type_Ca_channel_f_gate__E0_f * 0.25) - 1.0))) * (1.0 - var_L_type_Ca_channel_f_gate__f)) - (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_23(_table_index_0, _factor_0) * var_L_type_Ca_channel_f_gate__f));
00825         double d_dt_L_type_Ca_channel_f2_gate__f2 = 1.0 - (1.0 * ((var_intracellular_calcium_concentration__Ca_i / (100000.0 + var_intracellular_calcium_concentration__Ca_i)) + var_L_type_Ca_channel_f2_gate__f2));
00826         double d_dt_L_type_Ca_channel_f2ds_gate__f2ds = 20.0 * (1.0 - ((var_intracellular_calcium_concentration__Ca_ds / (0.001 + var_intracellular_calcium_concentration__Ca_ds)) + var_L_type_Ca_channel_f2ds_gate__f2ds));
00827         double d_dt_transient_outward_current_s_gate__s = (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_24(_table_index_0, _factor_0) * (1.0 - var_transient_outward_current_s_gate__s)) - (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_25(_table_index_0, _factor_0) * var_transient_outward_current_s_gate__s);
00828         double d_dt_transient_outward_current_r_gate__r = 333.0 * (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_26(_table_index_0, _factor_0) - var_transient_outward_current_r_gate__r);
00829         double d_dt_calcium_release__ActFrac = (((1.0 - var_calcium_release__ActFrac) - var_calcium_release__ProdFrac) * var_calcium_release__SpeedRel * (CML_noble_varghese_kohl_noble_1998_basic_pe_lut_LookupTables::Instance()->_lookup_31(_table_index_0, _factor_0) + (500.0 * pow(var_calcium_release__RegBindSite, 2.0)))) - (var_calcium_release__ActFrac * var_calcium_release__SpeedRel * var_calcium_release__InactRate);
00830         double d_dt_calcium_release__ProdFrac = (var_calcium_release__ActFrac * var_calcium_release__SpeedRel * var_calcium_release__InactRate) - (var_calcium_release__SpeedRel * 1.0 * var_calcium_release__ProdFrac);
00831         double d_dt_intracellular_sodium_concentration__Na_i =  -0.631827460168 * (var_fast_sodium_current__i_Na + var_persistent_sodium_current__i_p_Na + var_sodium_background_current__i_b_Na + (3.0 * var_sodium_potassium_pump__i_NaK) + (3.0 * var_sodium_calcium_exchanger__i_NaCa_cyt) + var_L_type_Ca_channel__i_Ca_L_Na_cyt + var_L_type_Ca_channel__i_Ca_L_Na_ds);
00832         double d_dt_intracellular_potassium_concentration__K_i =  -0.631827460168 * ((var_time_independent_potassium_current__i_K1 + var_rapid_delayed_rectifier_potassium_current__i_Kr + var_slow_delayed_rectifier_potassium_current__i_Ks + var_L_type_Ca_channel__i_Ca_L_K_cyt + var_L_type_Ca_channel__i_Ca_L_K_ds + var_transient_outward_current__i_to) - (2.0 * var_sodium_potassium_pump__i_NaK));
00833         double d_dt_intracellular_calcium_concentration__Ca_Trop = (100000.0 * var_intracellular_calcium_concentration__Ca_i * (0.05 - var_intracellular_calcium_concentration__Ca_Trop)) - (200.0 * var_intracellular_calcium_concentration__Ca_Trop);
00834         double d_dt_intracellular_calcium_concentration__Ca_Calmod = (100000.0 * var_intracellular_calcium_concentration__Ca_i * (0.02 - var_intracellular_calcium_concentration__Ca_Calmod)) - (50.0 * var_intracellular_calcium_concentration__Ca_Calmod);
00835         double d_dt_intracellular_calcium_concentration__Ca_i = (((( -0.315913730084 * (((var_L_type_Ca_channel__i_Ca_L_Ca_cyt + var_calcium_background_current__i_b_Ca) - (2.0 * var_sodium_calcium_exchanger__i_NaCa_cyt)) - (2.0 * var_sodium_calcium_exchanger__i_NaCa_ds))) + (var_intracellular_calcium_concentration__Ca_ds * 0.1 * 10.0) + ((var_calcium_release__i_rel * 0.1) * 2.04081632653)) - d_dt_intracellular_calcium_concentration__Ca_Calmod) - d_dt_intracellular_calcium_concentration__Ca_Trop) - var_sarcoplasmic_reticulum_calcium_pump__i_up;
00836         double d_dt_intracellular_calcium_concentration__Ca_ds = (( -1.0 * var_L_type_Ca_channel__i_Ca_L_Ca_ds) * 3.15913730084) - (var_intracellular_calcium_concentration__Ca_ds * 10.0);
00837         double d_dt_intracellular_calcium_concentration__Ca_up = (49.0 * var_sarcoplasmic_reticulum_calcium_pump__i_up) - var_calcium_translocation__i_trans;
00838         double d_dt_intracellular_calcium_concentration__Ca_rel = (0.1 * var_calcium_translocation__i_trans) - var_calcium_release__i_rel;
00839         
00840         rDY[0] = 0.001*d_dt_membrane__V;
00841         rDY[1] = 0.001*d_dt_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1;
00842         rDY[2] = 0.001*d_dt_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2;
00843         rDY[3] = 0.001*d_dt_slow_delayed_rectifier_potassium_current_xs_gate__xs;
00844         rDY[4] = 0.001*d_dt_fast_sodium_current_m_gate__m;
00845         rDY[5] = 0.001*d_dt_fast_sodium_current_h_gate__h;
00846         rDY[6] = 0.001*d_dt_L_type_Ca_channel_d_gate__d;
00847         rDY[7] = 0.001*d_dt_L_type_Ca_channel_f_gate__f;
00848         rDY[8] = 0.001*d_dt_L_type_Ca_channel_f2_gate__f2;
00849         rDY[9] = 0.001*d_dt_L_type_Ca_channel_f2ds_gate__f2ds;
00850         rDY[10] = 0.001*d_dt_transient_outward_current_s_gate__s;
00851         rDY[11] = 0.001*d_dt_transient_outward_current_r_gate__r;
00852         rDY[12] = 0.001*d_dt_calcium_release__ActFrac;
00853         rDY[13] = 0.001*d_dt_calcium_release__ProdFrac;
00854         rDY[14] = 0.001*d_dt_intracellular_sodium_concentration__Na_i;
00855         rDY[15] = 0.001*d_dt_intracellular_potassium_concentration__K_i;
00856         rDY[16] = 0.001*d_dt_intracellular_calcium_concentration__Ca_i;
00857         rDY[17] = 0.001*d_dt_intracellular_calcium_concentration__Ca_ds;
00858         rDY[18] = 0.001*d_dt_intracellular_calcium_concentration__Ca_up;
00859         rDY[19] = 0.001*d_dt_intracellular_calcium_concentration__Ca_rel;
00860         rDY[20] = 0.001*d_dt_intracellular_calcium_concentration__Ca_Calmod;
00861         rDY[21] = 0.001*d_dt_intracellular_calcium_concentration__Ca_Trop;
00862     }
00863 
00864 };
00865 
00866 template<>
00867 void OdeSystemInformation<CML_noble_varghese_kohl_noble_1998_basic_pe_lut>::Initialise(void)
00868 {
00869     // Time units: second
00870     // 
00871     this->mVariableNames.push_back("membrane__V");
00872     this->mVariableUnits.push_back("millivolt");
00873     this->mInitialConditions.push_back(-92.849333);
00874 
00875     this->mVariableNames.push_back("rapid_delayed_rectifier_potassium_current_xr1_gate__xr1");
00876     this->mVariableUnits.push_back("dimensionless");
00877     this->mInitialConditions.push_back(1.03e-5);
00878 
00879     this->mVariableNames.push_back("rapid_delayed_rectifier_potassium_current_xr2_gate__xr2");
00880     this->mVariableUnits.push_back("dimensionless");
00881     this->mInitialConditions.push_back(2e-7);
00882 
00883     this->mVariableNames.push_back("slow_delayed_rectifier_potassium_current_xs_gate__xs");
00884     this->mVariableUnits.push_back("dimensionless");
00885     this->mInitialConditions.push_back(0.001302);
00886 
00887     this->mVariableNames.push_back("fast_sodium_current_m_gate__m");
00888     this->mVariableUnits.push_back("dimensionless");
00889     this->mInitialConditions.push_back(0.0016203);
00890 
00891     this->mVariableNames.push_back("fast_sodium_current_h_gate__h");
00892     this->mVariableUnits.push_back("dimensionless");
00893     this->mInitialConditions.push_back(0.9944036);
00894 
00895     this->mVariableNames.push_back("L_type_Ca_channel_d_gate__d");
00896     this->mVariableUnits.push_back("dimensionless");
00897     this->mInitialConditions.push_back(0);
00898 
00899     this->mVariableNames.push_back("L_type_Ca_channel_f_gate__f");
00900     this->mVariableUnits.push_back("dimensionless");
00901     this->mInitialConditions.push_back(1);
00902 
00903     this->mVariableNames.push_back("L_type_Ca_channel_f2_gate__f2");
00904     this->mVariableUnits.push_back("dimensionless");
00905     this->mInitialConditions.push_back(0.9349197);
00906 
00907     this->mVariableNames.push_back("L_type_Ca_channel_f2ds_gate__f2ds");
00908     this->mVariableUnits.push_back("dimensionless");
00909     this->mInitialConditions.push_back(0.9651958);
00910 
00911     this->mVariableNames.push_back("transient_outward_current_s_gate__s");
00912     this->mVariableUnits.push_back("dimensionless");
00913     this->mInitialConditions.push_back(0.9948645);
00914 
00915     this->mVariableNames.push_back("transient_outward_current_r_gate__r");
00916     this->mVariableUnits.push_back("dimensionless");
00917     this->mInitialConditions.push_back(0);
00918 
00919     this->mVariableNames.push_back("calcium_release__ActFrac");
00920     this->mVariableUnits.push_back("dimensionless");
00921     this->mInitialConditions.push_back(0.0042614);
00922 
00923     this->mVariableNames.push_back("calcium_release__ProdFrac");
00924     this->mVariableUnits.push_back("dimensionless");
00925     this->mInitialConditions.push_back(0.4068154);
00926 
00927     this->mVariableNames.push_back("intracellular_sodium_concentration__Na_i");
00928     this->mVariableUnits.push_back("millimolar");
00929     this->mInitialConditions.push_back(7.3321223);
00930 
00931     this->mVariableNames.push_back("intracellular_potassium_concentration__K_i");
00932     this->mVariableUnits.push_back("millimolar");
00933     this->mInitialConditions.push_back(136.5644281);
00934 
00935     this->mVariableNames.push_back("intracellular_calcium_concentration__Ca_i");
00936     this->mVariableUnits.push_back("millimolar");
00937     this->mInitialConditions.push_back(1.4e-5);
00938 
00939     this->mVariableNames.push_back("intracellular_calcium_concentration__Ca_ds");
00940     this->mVariableUnits.push_back("millimolar");
00941     this->mInitialConditions.push_back(1.88e-5);
00942 
00943     this->mVariableNames.push_back("intracellular_calcium_concentration__Ca_up");
00944     this->mVariableUnits.push_back("millimolar");
00945     this->mInitialConditions.push_back(0.4531889);
00946 
00947     this->mVariableNames.push_back("intracellular_calcium_concentration__Ca_rel");
00948     this->mVariableUnits.push_back("millimolar");
00949     this->mInitialConditions.push_back(0.4481927);
00950 
00951     this->mVariableNames.push_back("intracellular_calcium_concentration__Ca_Calmod");
00952     this->mVariableUnits.push_back("millimolar");
00953     this->mInitialConditions.push_back(0.0005555);
00954 
00955     this->mVariableNames.push_back("intracellular_calcium_concentration__Ca_Trop");
00956     this->mVariableUnits.push_back("millimolar");
00957     this->mInitialConditions.push_back(0.0003542);
00958     
00959     this->mInitialised = true;
00960 }
00961 
00962 #endif

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