NobleVargheseKohlNoble1998Optimised.hpp

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

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