Mahajan2008OdeSystem.cpp

Go to the documentation of this file.
00001 
00012 #include <cmath>
00013 #include <cassert>
00014 #include "AbstractCardiacCell.hpp"
00015 #include "Exception.hpp"
00016 #include "OdeSystemInformation.hpp"
00017 #include "AbstractStimulusFunction.hpp"
00018 #include "Mahajan2008OdeSystem.hpp"
00019 
00020 Mahajan2008OdeSystem::Mahajan2008OdeSystem(boost::shared_ptr<AbstractIvpOdeSolver> pSolver,
00021                                            boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
00022         : AbstractCardiacCell(pSolver, 26, 0, pIntracellularStimulus)
00023     {
00024         // Time units: ms
00025         //
00026         mpSystemInfo = OdeSystemInformation<Mahajan2008OdeSystem>::Instance();
00027         mScaleFactorGks = 1.0;
00028         mScaleFactorIto = 1.0;
00029         mScaleFactorGkr = 1.0;
00030         Init();
00031     }
00032 
00033     Mahajan2008OdeSystem::~Mahajan2008OdeSystem(void)
00034     {
00035     }
00036 
00037       void Mahajan2008OdeSystem::SetScaleFactorGks(double sfgks)
00038     {
00039         mScaleFactorGks=sfgks;
00040     }
00041     void Mahajan2008OdeSystem::SetScaleFactorIto(double sfito)
00042     {
00043         mScaleFactorIto=sfito;
00044     }
00045     void Mahajan2008OdeSystem::SetScaleFactorGkr(double sfgkr)
00046     {
00047         mScaleFactorGkr=sfgkr;
00048     }
00049  //   void Mahajan2008OdeSystem::VerifyGatingVariables()
00050  //   {}
00051 
00052     double Mahajan2008OdeSystem::GetIIonic()
00053     {
00054         std::vector<double>& rY = rGetStateVariables();
00055         double var_cell__V = rY[0];
00056         // Units: mV; Initial value: -87.169816169406
00057         double var_INa__xm = rY[1];
00058         // Units: dimensionless; Initial value: 0.001075453357
00059         double var_INa__xh = rY[2];
00060         // Units: dimensionless; Initial value: 0.990691306716
00061         double var_INa__xj = rY[3];
00062         // Units: dimensionless; Initial value: 0.993888937283
00063         double var_ICaL__c1 = rY[4];
00064         // Units: dimensionless; Initial value: 0.000018211252
00065         double var_ICaL__c2 = rY[5];
00066         // Units: dimensionless; Initial value: 0.979322592773
00067         double var_ICaL__xi1ca = rY[6];
00068         // Units: dimensionless; Initial value: 0.001208153482
00069         double var_ICaL__xi1ba = rY[7];
00070         // Units: dimensionless; Initial value: 0.000033616596
00071         double var_ICaL__xi2ca = rY[8];
00072         // Units: dimensionless; Initial value: 0.004173008466
00073         double var_ICaL__xi2ba = rY[9];
00074         // Units: dimensionless; Initial value: 0.015242594688
00075         double var_IKr__xr = rY[10];
00076         // Units: dimensionless; Initial value: 0.007074239331
00077         double var_IKs__xs1 = rY[11];
00078         // Units: dimensionless; Initial value: 0.048267587131
00079         double var_IKs__xs2 = rY[12];
00080         // Units: dimensionless; Initial value: 0.105468807033
00081         double var_Ito__xtos = rY[13];
00082         // Units: dimensionless; Initial value: 0.00364776906
00083         double var_Ito__ytos = rY[14];
00084         // Units: dimensionless; Initial value: 0.174403618112
00085         double var_Ito__xtof = rY[15];
00086         // Units: dimensionless; Initial value: 0.003643592594
00087         double var_Ito__ytof = rY[16];
00088         // Units: dimensionless; Initial value: 0.993331326442
00089         double var_Na__Na_i = rY[19];
00090         // Units: mM; Initial value: 11.441712311614
00091         double var_Ca__Ca_submem = rY[21];
00092         // Units: uM; Initial value: 0.226941113355
00093         double var_Ca__Ca_i = rY[22];
00094         // Units: uM; Initial value: 0.256752008084
00095 
00096         const double var_Environment__R = 8.314472;
00097         const double var_Environment__T = 308.0;
00098         const double var_Environment__F = 96.4853415;
00099         const double var_Environment__K_o = 5.4;
00100         const double var_Environment__Ca_o = 1.8;
00101         const double var_Environment__Na_o = 136.0;
00102         double var_Environment__FonRT = var_Environment__F / (var_Environment__R * var_Environment__T);
00103         const double var_reversal_potentials__K_i = 140.0;
00104         double var_reversal_potentials__FonRT = var_Environment__FonRT;
00105         double var_reversal_potentials__K_o = var_Environment__K_o;
00106         double var_reversal_potentials__ek = (1.0 / var_reversal_potentials__FonRT) * log(var_reversal_potentials__K_o / var_reversal_potentials__K_i);
00107         double var_IK1__ek = var_reversal_potentials__ek;
00108         double var_IK1__V = var_cell__V;
00109         double var_IK1__aki = 1.02 / (1.0 + exp(0.2385 * ((var_IK1__V - var_IK1__ek) - 59.215)));
00110         double var_IK1__bki = ((0.49124 * exp(0.08032 * ((var_IK1__V - var_IK1__ek) + 5.476))) + (1.0 * exp(0.06175 * ((var_IK1__V - var_IK1__ek) - 594.31)))) / (1.0 + exp((-0.5143) * ((var_IK1__V - var_IK1__ek) + 4.753)));
00111         double var_IK1__xkin = var_IK1__aki / (var_IK1__aki + var_IK1__bki);
00112         double var_IK1__K_o = var_Environment__K_o;
00113         const double var_IK1__gkix = 0.3;
00114         double var_IK1__xik1 = var_IK1__gkix * sqrt(var_IK1__K_o / 5.4) * var_IK1__xkin * (var_IK1__V - var_IK1__ek);
00115         double var_cell__xik1 = var_IK1__xik1;
00116         double var_Ito__ek = var_reversal_potentials__ek;
00117         const double var_Ito__gtos = 0.04;
00118         double var_Ito__V = var_cell__V;
00119         double var_Ito__rt2 = (var_Ito__V + 33.5) / 10.0;
00120         double var_Ito__rs_inf = 1.0 / (1.0 + exp(var_Ito__rt2));
00121         double var_Ito__xitos = mScaleFactorIto*var_Ito__gtos * var_Ito__xtos * (var_Ito__ytos + (0.5 * var_Ito__rs_inf)) * (var_Ito__V - var_Ito__ek);
00122         const double var_Ito__gtof = 0.11;
00123         double var_Ito__xitof = var_Ito__gtof * var_Ito__xtof * var_Ito__ytof * (var_Ito__V - var_Ito__ek);
00124         double var_Ito__xito = var_Ito__xitos + var_Ito__xitof;
00125         double var_cell__xito = var_Ito__xito;
00126         const double var_INaK__xkmko = 1.5;
00127         double var_INaK__V = var_cell__V;
00128         double var_INaK__FonRT = var_Environment__FonRT;
00129         double var_INaK__Na_o = var_Environment__Na_o;
00130         double var_INaK__sigma = (exp(var_INaK__Na_o / 67.3) - 1.0) / 7.0;
00131         double var_INaK__fNaK = 1.0 / (1.0 + (0.1245 * exp((-0.1) * var_INaK__V * var_INaK__FonRT)) + (0.0365 * var_INaK__sigma * exp((-var_INaK__V) * var_INaK__FonRT)));
00132         double var_INaK__Na_i = var_Na__Na_i;
00133         double var_INaK__K_o = var_Environment__K_o;
00134         const double var_INaK__xkmnai = 12.0;
00135         const double var_INaK__gNaK = 1.5;
00136         double var_INaK__xiNaK = (((var_INaK__gNaK * var_INaK__fNaK * var_INaK__Na_i) / (var_INaK__Na_i + var_INaK__xkmnai)) * var_INaK__K_o) / (var_INaK__K_o + var_INaK__xkmko);
00137         double var_cell__xiNaK = var_INaK__xiNaK;
00138         const double var_cell__wca = 8.0;
00139         const double var_INaCa__gNaCa = 0.84;
00140         double var_INaCa__V = var_cell__V;
00141         double var_INaCa__FonRT = var_Environment__FonRT;
00142         double var_INaCa__zw4 = 1.0 + (0.2 * exp(var_INaCa__V * (0.35 - 1.0) * var_INaCa__FonRT));
00143         const double var_INaCa__xkdna = 0.3;
00144         double var_INaCa__Ca_submem = var_Ca__Ca_submem;
00145         double var_INaCa__aloss = 1.0 / (1.0 + pow(var_INaCa__xkdna / var_INaCa__Ca_submem, 3.0));
00146         double var_INaCa__Na_o = var_Environment__Na_o;
00147         double var_INaCa__Na_i = var_Na__Na_i;
00148         double var_INaCa__Ca_o = var_Environment__Ca_o;
00149         double var_Ca__csm = var_Ca__Ca_submem / 1000.0;
00150         double var_INaCa__csm = var_Ca__csm;
00151         double var_INaCa__yz4 = (pow(var_INaCa__Na_i, 3.0) * var_INaCa__Ca_o) + (pow(var_INaCa__Na_o, 3.0) * var_INaCa__csm);
00152         const double var_INaCa__xmcao = 1.3;
00153         const double var_INaCa__xmnao = 87.5;
00154         double var_INaCa__yz1 = (var_INaCa__xmcao * pow(var_INaCa__Na_i, 3.0)) + (pow(var_INaCa__xmnao, 3.0) * var_INaCa__csm);
00155         const double var_INaCa__xmcai = 0.0036;
00156         const double var_INaCa__xmnai = 12.3;
00157         double var_INaCa__yz3 = var_INaCa__xmcai * pow(var_INaCa__Na_o, 3.0) * (1.0 + pow(var_INaCa__Na_i / var_INaCa__xmnai, 3.0));
00158         double var_INaCa__yz2 = pow(var_INaCa__xmnai, 3.0) * var_INaCa__Ca_o * (1.0 + (var_INaCa__csm / var_INaCa__xmcai));
00159         double var_INaCa__zw8 = var_INaCa__yz1 + var_INaCa__yz2 + var_INaCa__yz3 + var_INaCa__yz4;
00160         double var_INaCa__zw3 = (pow(var_INaCa__Na_i, 3.0) * var_INaCa__Ca_o * exp(var_INaCa__V * 0.35 * var_INaCa__FonRT)) - (pow(var_INaCa__Na_o, 3.0) * var_INaCa__csm * exp(var_INaCa__V * (0.35 - 1.0) * var_INaCa__FonRT));
00161         double var_INaCa__jNaCa = (var_INaCa__gNaCa * var_INaCa__aloss * var_INaCa__zw3) / (var_INaCa__zw4 * var_INaCa__zw8);
00162         double var_INaCa__wca = var_cell__wca;
00163         double var_INaCa__xiNaCa = var_INaCa__wca * var_INaCa__jNaCa;
00164         double var_cell__xiNaCa = var_INaCa__xiNaCa;
00165         double var_ICaL__Ca_o = var_Environment__Ca_o;
00166         double var_ICaL__V = var_cell__V;
00167         const double var_ICaL__pca = 0.00054;
00168         double var_ICaL__FonRT = var_Environment__FonRT;
00169         double var_ICaL__F = var_Environment__F;
00170         double var_ICaL__za = var_ICaL__V * 2.0 * var_ICaL__FonRT;
00171         double var_ICaL__csm = var_Ca__csm;
00172         double var_ICaL__rxa = (fabs(var_ICaL__za) < 0.001) ? ((4.0 * var_ICaL__pca * var_ICaL__F * var_ICaL__FonRT * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) / (2.0 * var_ICaL__FonRT)) : ((4.0 * var_ICaL__pca * var_ICaL__V * var_ICaL__F * var_ICaL__FonRT * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) / (exp(var_ICaL__za) - 1.0));
00173         const double var_ICaL__gca = 182.0;
00174         double var_ICaL__po = (((((1.0 - var_ICaL__xi1ca) - var_ICaL__xi2ca) - var_ICaL__xi1ba) - var_ICaL__xi2ba) - var_ICaL__c1) - var_ICaL__c2;
00175         double var_ICaL__jca = var_ICaL__gca * var_ICaL__po * var_ICaL__rxa;
00176         double var_ICaL__wca = var_cell__wca;
00177         double var_ICaL__xica = 2.0 * var_ICaL__wca * var_ICaL__jca;
00178         double var_cell__xica = var_ICaL__xica;
00179         const double var_IKr__gkr = 0.0125;
00180         double var_IKr__K_o = var_Environment__K_o;
00181         double var_IKr__V = var_cell__V;
00182         double var_IKr__rg = 1.0 / (1.0 + exp((var_IKr__V + 33.0) / 22.4));
00183         double var_IKr__ek = var_reversal_potentials__ek;
00184         double var_IKr__xikr = mScaleFactorGkr*var_IKr__gkr * sqrt(var_IKr__K_o / 5.4) * var_IKr__xr * var_IKr__rg * (var_IKr__V - var_IKr__ek);
00185         double var_cell__xikr = var_IKr__xikr;
00186         double var_IKs__Ca_i = var_Ca__Ca_i;
00187         double var_IKs__gksx = 1.0 + (0.8 / (1.0 + pow(0.5 / var_IKs__Ca_i, 3.0)));
00188         const double var_IKs__gks = 0.1386;
00189         double var_IKs__V = var_cell__V;
00190         const double var_reversal_potentials__prNaK = 0.01833;
00191         double var_reversal_potentials__Na_o = var_Environment__Na_o;
00192         double var_reversal_potentials__Na_i = var_Na__Na_i;
00193         double var_reversal_potentials__eks = (1.0 / var_reversal_potentials__FonRT) * log((var_reversal_potentials__K_o + (var_reversal_potentials__prNaK * var_reversal_potentials__Na_o)) / (var_reversal_potentials__K_i + (var_reversal_potentials__prNaK * var_reversal_potentials__Na_i)));
00194         double var_IKs__eks = var_reversal_potentials__eks;
00195         double var_IKs__xiks = mScaleFactorGks*var_IKs__gks * var_IKs__gksx * var_IKs__xs1 * var_IKs__xs2 * (var_IKs__V - var_IKs__eks);
00196         double var_cell__xiks = var_IKs__xiks;
00197         double var_INa__V = var_cell__V;
00198         const double var_INa__gna = 12.0;
00199         double var_reversal_potentials__ena = (1.0 / var_reversal_potentials__FonRT) * log(var_reversal_potentials__Na_o / var_reversal_potentials__Na_i);
00200         double var_INa__ena = var_reversal_potentials__ena;
00201         double var_INa__xina = var_INa__gna * var_INa__xh * var_INa__xj * var_INa__xm * var_INa__xm * var_INa__xm * (var_INa__V - var_INa__ena);
00202         double var_cell__xina = var_INa__xina;
00203 
00204     double i_ionic = var_cell__xik1+var_cell__xito+var_cell__xiNaK+var_cell__xiNaCa+var_cell__xica+var_cell__xina+var_cell__xikr+var_cell__xiks;
00205     assert(!std::isnan(i_ionic));
00206     return i_ionic;
00207     }
00208 
00209     void Mahajan2008OdeSystem::EvaluateYDerivatives(
00210             double var_Environment__time,
00211             const std::vector<double> &rY,
00212             std::vector<double> &rDY)
00213     {
00214         // Inputs:
00215         // Time units: ms
00216         var_Environment__time *= 1.0;
00217         double var_cell__V = rY[0];
00218         // Units: mV; Initial value: -87.169816169406
00219         double var_INa__xm = rY[1];
00220         // Units: dimensionless; Initial value: 0.001075453357
00221         double var_INa__xh = rY[2];
00222         // Units: dimensionless; Initial value: 0.990691306716
00223         double var_INa__xj = rY[3];
00224         // Units: dimensionless; Initial value: 0.993888937283
00225         double var_ICaL__c1 = rY[4];
00226         // Units: dimensionless; Initial value: 0.000018211252
00227         double var_ICaL__c2 = rY[5];
00228         // Units: dimensionless; Initial value: 0.979322592773
00229         double var_ICaL__xi1ca = rY[6];
00230         // Units: dimensionless; Initial value: 0.001208153482
00231         double var_ICaL__xi1ba = rY[7];
00232         // Units: dimensionless; Initial value: 0.000033616596
00233         double var_ICaL__xi2ca = rY[8];
00234         // Units: dimensionless; Initial value: 0.004173008466
00235         double var_ICaL__xi2ba = rY[9];
00236         // Units: dimensionless; Initial value: 0.015242594688
00237         double var_IKr__xr = rY[10];
00238         // Units: dimensionless; Initial value: 0.007074239331
00239         double var_IKs__xs1 = rY[11];
00240         // Units: dimensionless; Initial value: 0.048267587131
00241         double var_IKs__xs2 = rY[12];
00242         // Units: dimensionless; Initial value: 0.105468807033
00243         double var_Ito__xtos = rY[13];
00244         // Units: dimensionless; Initial value: 0.00364776906
00245         double var_Ito__ytos = rY[14];
00246         // Units: dimensionless; Initial value: 0.174403618112
00247         double var_Ito__xtof = rY[15];
00248         // Units: dimensionless; Initial value: 0.003643592594
00249         double var_Ito__ytof = rY[16];
00250         // Units: dimensionless; Initial value: 0.993331326442
00251         double var_Irel__Ca_JSR = rY[17];
00252         // Units: uM; Initial value: 97.505463697266
00253         double var_Irel__xir = rY[18];
00254         // Units: uM_per_ms; Initial value: 0.006679257264
00255         double var_Na__Na_i = rY[19];
00256         // Units: mM; Initial value: 11.441712311614
00257         double var_Ca__Ca_dyad = rY[20];
00258         // Units: uM; Initial value: 1.716573130685
00259         double var_Ca__Ca_submem = rY[21];
00260         // Units: uM; Initial value: 0.226941113355
00261         double var_Ca__Ca_i = rY[22];
00262         // Units: uM; Initial value: 0.256752008084
00263         double var_Ca__Ca_NSR = rY[23];
00264         // Units: uM; Initial value: 104.450004990523
00265         double var_Ca__tropi = rY[24];
00266         // Units: uM; Initial value: 22.171689894953
00267         double var_Ca__trops = rY[25];
00268         // Units: uM; Initial value: 19.864701949854
00269 
00270 
00271         // Mathematics
00272         const double var_Environment__R = 8.314472;
00273         const double var_Environment__T = 308.0;
00274         const double var_Environment__F = 96.4853415;
00275         const double var_Environment__K_o = 5.4;
00276         const double var_Environment__Ca_o = 1.8;
00277         const double var_Environment__Na_o = 136.0;
00278         double var_Environment__FonRT = var_Environment__F / (var_Environment__R * var_Environment__T);
00279         const double var_reversal_potentials__K_i = 140.0;
00280         double var_reversal_potentials__FonRT = var_Environment__FonRT;
00281         double var_reversal_potentials__K_o = var_Environment__K_o;
00282         double var_reversal_potentials__ek = (1.0 / var_reversal_potentials__FonRT) * log(var_reversal_potentials__K_o / var_reversal_potentials__K_i);
00283         double var_IK1__ek = var_reversal_potentials__ek;
00284         double var_IK1__V = var_cell__V;
00285         double var_IK1__aki = 1.02 / (1.0 + exp(0.2385 * ((var_IK1__V - var_IK1__ek) - 59.215)));
00286         double var_IK1__bki = ((0.49124 * exp(0.08032 * ((var_IK1__V - var_IK1__ek) + 5.476))) + (1.0 * exp(0.06175 * ((var_IK1__V - var_IK1__ek) - 594.31)))) / (1.0 + exp((-0.5143) * ((var_IK1__V - var_IK1__ek) + 4.753)));
00287         double var_IK1__xkin = var_IK1__aki / (var_IK1__aki + var_IK1__bki);
00288         double var_IK1__K_o = var_Environment__K_o;
00289         const double var_IK1__gkix = 0.3;
00290         double var_IK1__xik1 = var_IK1__gkix * sqrt(var_IK1__K_o / 5.4) * var_IK1__xkin * (var_IK1__V - var_IK1__ek);
00291         double var_cell__xik1 = var_IK1__xik1;
00292         double var_Ito__ek = var_reversal_potentials__ek;
00293         const double var_Ito__gtos = 0.04;
00294         double var_Ito__V = var_cell__V;
00295         double var_Ito__rt2 = (var_Ito__V + 33.5) / 10.0;
00296         double var_Ito__rs_inf = 1.0 / (1.0 + exp(var_Ito__rt2));
00297         double var_Ito__xitos = mScaleFactorIto*var_Ito__gtos * var_Ito__xtos * (var_Ito__ytos + (0.5 * var_Ito__rs_inf)) * (var_Ito__V - var_Ito__ek);
00298         const double var_Ito__gtof = 0.11;
00299         double var_Ito__xitof = var_Ito__gtof * var_Ito__xtof * var_Ito__ytof * (var_Ito__V - var_Ito__ek);
00300         double var_Ito__xito = var_Ito__xitos + var_Ito__xitof;
00301         double var_cell__xito = var_Ito__xito;
00302         const double var_INaK__xkmko = 1.5;
00303         double var_INaK__V = var_cell__V;
00304         double var_INaK__FonRT = var_Environment__FonRT;
00305         double var_INaK__Na_o = var_Environment__Na_o;
00306         double var_INaK__sigma = (exp(var_INaK__Na_o / 67.3) - 1.0) / 7.0;
00307         double var_INaK__fNaK = 1.0 / (1.0 + (0.1245 * exp((-0.1) * var_INaK__V * var_INaK__FonRT)) + (0.0365 * var_INaK__sigma * exp((-var_INaK__V) * var_INaK__FonRT)));
00308         double var_INaK__Na_i = var_Na__Na_i;
00309         double var_INaK__K_o = var_Environment__K_o;
00310         const double var_INaK__xkmnai = 12.0;
00311         const double var_INaK__gNaK = 1.5;
00312         double var_INaK__xiNaK = (((var_INaK__gNaK * var_INaK__fNaK * var_INaK__Na_i) / (var_INaK__Na_i + var_INaK__xkmnai)) * var_INaK__K_o) / (var_INaK__K_o + var_INaK__xkmko);
00313         double var_cell__xiNaK = var_INaK__xiNaK;
00314         const double var_cell__wca = 8.0;
00315         const double var_INaCa__gNaCa = 0.84;
00316         double var_INaCa__V = var_cell__V;
00317         double var_INaCa__FonRT = var_Environment__FonRT;
00318         double var_INaCa__zw4 = 1.0 + (0.2 * exp(var_INaCa__V * (0.35 - 1.0) * var_INaCa__FonRT));
00319         const double var_INaCa__xkdna = 0.3;
00320         double var_INaCa__Ca_submem = var_Ca__Ca_submem;
00321         double var_INaCa__aloss = 1.0 / (1.0 + pow(var_INaCa__xkdna / var_INaCa__Ca_submem, 3.0));
00322         double var_INaCa__Na_o = var_Environment__Na_o;
00323         double var_INaCa__Na_i = var_Na__Na_i;
00324         double var_INaCa__Ca_o = var_Environment__Ca_o;
00325         double var_Ca__csm = var_Ca__Ca_submem / 1000.0;
00326         double var_INaCa__csm = var_Ca__csm;
00327         double var_INaCa__yz4 = (pow(var_INaCa__Na_i, 3.0) * var_INaCa__Ca_o) + (pow(var_INaCa__Na_o, 3.0) * var_INaCa__csm);
00328         const double var_INaCa__xmcao = 1.3;
00329         const double var_INaCa__xmnao = 87.5;
00330         double var_INaCa__yz1 = (var_INaCa__xmcao * pow(var_INaCa__Na_i, 3.0)) + (pow(var_INaCa__xmnao, 3.0) * var_INaCa__csm);
00331         const double var_INaCa__xmcai = 0.0036;
00332         const double var_INaCa__xmnai = 12.3;
00333         double var_INaCa__yz3 = var_INaCa__xmcai * pow(var_INaCa__Na_o, 3.0) * (1.0 + pow(var_INaCa__Na_i / var_INaCa__xmnai, 3.0));
00334         double var_INaCa__yz2 = pow(var_INaCa__xmnai, 3.0) * var_INaCa__Ca_o * (1.0 + (var_INaCa__csm / var_INaCa__xmcai));
00335         double var_INaCa__zw8 = var_INaCa__yz1 + var_INaCa__yz2 + var_INaCa__yz3 + var_INaCa__yz4;
00336         double var_INaCa__zw3 = (pow(var_INaCa__Na_i, 3.0) * var_INaCa__Ca_o * exp(var_INaCa__V * 0.35 * var_INaCa__FonRT)) - (pow(var_INaCa__Na_o, 3.0) * var_INaCa__csm * exp(var_INaCa__V * (0.35 - 1.0) * var_INaCa__FonRT));
00337         double var_INaCa__jNaCa = (var_INaCa__gNaCa * var_INaCa__aloss * var_INaCa__zw3) / (var_INaCa__zw4 * var_INaCa__zw8);
00338         double var_INaCa__wca = var_cell__wca;
00339         double var_INaCa__xiNaCa = var_INaCa__wca * var_INaCa__jNaCa;
00340         double var_cell__xiNaCa = var_INaCa__xiNaCa;
00341         double var_ICaL__Ca_o = var_Environment__Ca_o;
00342         double var_ICaL__V = var_cell__V;
00343         const double var_ICaL__pca = 0.00054;
00344         double var_ICaL__FonRT = var_Environment__FonRT;
00345         double var_ICaL__F = var_Environment__F;
00346         double var_ICaL__za = var_ICaL__V * 2.0 * var_ICaL__FonRT;
00347         double var_ICaL__csm = var_Ca__csm;
00348         double var_ICaL__rxa = (fabs(var_ICaL__za) < 0.001) ? ((4.0 * var_ICaL__pca * var_ICaL__F * var_ICaL__FonRT * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) / (2.0 * var_ICaL__FonRT)) : ((4.0 * var_ICaL__pca * var_ICaL__V * var_ICaL__F * var_ICaL__FonRT * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) / (exp(var_ICaL__za) - 1.0));
00349         const double var_ICaL__gca = 182.0;
00350         double var_ICaL__po = (((((1.0 - var_ICaL__xi1ca) - var_ICaL__xi2ca) - var_ICaL__xi1ba) - var_ICaL__xi2ba) - var_ICaL__c1) - var_ICaL__c2;
00351         double var_ICaL__jca = var_ICaL__gca * var_ICaL__po * var_ICaL__rxa;
00352         double var_ICaL__wca = var_cell__wca;
00353         double var_ICaL__xica = 2.0 * var_ICaL__wca * var_ICaL__jca;
00354         double var_cell__xica = var_ICaL__xica;
00355         const double var_IKr__gkr = 0.0125;
00356         double var_IKr__K_o = var_Environment__K_o;
00357         double var_IKr__V = var_cell__V;
00358         double var_IKr__rg = 1.0 / (1.0 + exp((var_IKr__V + 33.0) / 22.4));
00359         double var_IKr__ek = var_reversal_potentials__ek;
00360         double var_IKr__xikr = mScaleFactorGkr*var_IKr__gkr * sqrt(var_IKr__K_o / 5.4) * var_IKr__xr * var_IKr__rg * (var_IKr__V - var_IKr__ek);
00361         double var_cell__xikr = var_IKr__xikr;
00362         double var_IKs__Ca_i = var_Ca__Ca_i;
00363         double var_IKs__gksx = 1.0 + (0.8 / (1.0 + pow(0.5 / var_IKs__Ca_i, 3.0)));
00364         const double var_IKs__gks = 0.1386;
00365         double var_IKs__V = var_cell__V;
00366         const double var_reversal_potentials__prNaK = 0.01833;
00367         double var_reversal_potentials__Na_o = var_Environment__Na_o;
00368         double var_reversal_potentials__Na_i = var_Na__Na_i;
00369         double var_reversal_potentials__eks = (1.0 / var_reversal_potentials__FonRT) * log((var_reversal_potentials__K_o + (var_reversal_potentials__prNaK * var_reversal_potentials__Na_o)) / (var_reversal_potentials__K_i + (var_reversal_potentials__prNaK * var_reversal_potentials__Na_i)));
00370         double var_IKs__eks = var_reversal_potentials__eks;
00371         double var_IKs__xiks = mScaleFactorGks*var_IKs__gks * var_IKs__gksx * var_IKs__xs1 * var_IKs__xs2 * (var_IKs__V - var_IKs__eks);
00372         double var_cell__xiks = var_IKs__xiks;
00373         double var_cell__i_Stim = GetStimulus((1.0/1)*var_Environment__time);
00374         double var_INa__V = var_cell__V;
00375         const double var_INa__gna = 12.0;
00376         double var_reversal_potentials__ena = (1.0 / var_reversal_potentials__FonRT) * log(var_reversal_potentials__Na_o / var_reversal_potentials__Na_i);
00377         double var_INa__ena = var_reversal_potentials__ena;
00378         double var_INa__xina = var_INa__gna * var_INa__xh * var_INa__xj * var_INa__xm * var_INa__xm * var_INa__xm * (var_INa__V - var_INa__ena);
00379         double var_cell__xina = var_INa__xina;
00380         double var_cell__Itotal = -(var_cell__xina + var_cell__xik1 + var_cell__xikr + var_cell__xiks + var_cell__xito + var_cell__xiNaCa + var_cell__xica + var_cell__xiNaK + var_cell__i_Stim);
00381         double var_INa__am = (fabs(var_INa__V + 47.13) > 0.001) ? ((0.32 * 1.0 * (var_INa__V + 47.13)) / (1.0 - exp((-0.1) * (var_INa__V + 47.13)))) : 3.2;
00382         double var_INa__bm = 0.08 * exp((-var_INa__V) / 11.0);
00383         double var_INa__ah = (var_INa__V < (-40.0)) ? (0.135 * exp((80.0 + var_INa__V) / (-6.8))) : 0.0;
00384         double var_INa__bh = (var_INa__V < (-40.0)) ? ((3.56 * exp(0.079 * var_INa__V)) + (310000.0 * exp(0.35 * var_INa__V))) : (1.0 / (0.13 * (1.0 + exp((var_INa__V + 10.66) / (-11.1)))));
00385         double var_INa__aj = (var_INa__V < (-40.0)) ? (((((-127140.0) * exp(0.2444 * var_INa__V)) - (3.474e-05 * exp((-0.04391) * var_INa__V))) * 1.0 * (var_INa__V + 37.78)) / (1.0 + exp(0.311 * (var_INa__V + 79.23)))) : 0.0;
00386         double var_INa__bj = (var_INa__V < (-40.0)) ? ((0.1212 * exp((-0.01052) * var_INa__V)) / (1.0 + exp((-0.1378) * (var_INa__V + 40.14)))) : ((0.3 * exp((-2.535e-07) * var_INa__V)) / (1.0 + exp((-0.1) * (var_INa__V + 32.0))));
00387         double var_ICaL__Ca_dyad = var_Ca__Ca_dyad;
00388         const double var_ICaL__vth = 0.0;
00389         const double var_ICaL__s6 = 8.0;
00390         double var_ICaL__poinf = 1.0 / (1.0 + exp((-(var_ICaL__V - var_ICaL__vth)) / var_ICaL__s6));
00391         const double var_ICaL__cat = 3.0;
00392         double var_ICaL__fca = 1.0 / (1.0 + pow(var_ICaL__cat / var_ICaL__Ca_dyad, 3.0));
00393         const double var_ICaL__vx =  -40.0;
00394         const double var_ICaL__sx = 3.0;
00395         const double var_ICaL__vy =  -40.0;
00396         const double var_ICaL__sy = 4.0;
00397         const double var_ICaL__vyr =  -40.0;
00398         const double var_ICaL__syr = 11.32;
00399         const double var_ICaL__cpt = 6.09365;
00400         const double var_ICaL__taupo = 1.0;
00401         double var_ICaL__alpha = var_ICaL__poinf / var_ICaL__taupo;
00402         double var_ICaL__beta = (1.0 - var_ICaL__poinf) / var_ICaL__taupo;
00403         double var_ICaL__k1 = 0.024168 * var_ICaL__fca;
00404         const double var_ICaL__k2 = 0.000103615;
00405         const double var_ICaL__k1t = 0.00413;
00406         const double var_ICaL__k2t = 0.00224;
00407         double var_ICaL__poi = 1.0 / (1.0 + exp((-(var_ICaL__V - var_ICaL__vx)) / var_ICaL__sx));
00408         const double var_ICaL__tau3 = 3.0;
00409         double var_ICaL__k3 = (1.0 - var_ICaL__poi) / var_ICaL__tau3;
00410         double var_ICaL__k3t = var_ICaL__k3;
00411         double var_ICaL__Ps = 1.0 / (1.0 + exp((-(var_ICaL__V - var_ICaL__vyr)) / var_ICaL__syr));
00412         const double var_ICaL__tca = 78.0329;
00413         double var_ICaL__tau_ca = (var_ICaL__tca / (1.0 + pow(var_ICaL__Ca_dyad / var_ICaL__cpt, 4.0))) + 0.1;
00414         double var_ICaL__recov = 10.0 + (4954.0 * exp(var_ICaL__V / 15.6));
00415         double var_ICaL__Pr = 1.0 - (1.0 / (1.0 + exp((-(var_ICaL__V - var_ICaL__vy)) / var_ICaL__sy)));
00416         double var_ICaL__tauca = ((var_ICaL__recov - var_ICaL__tau_ca) * var_ICaL__Pr) + var_ICaL__tau_ca;
00417         double var_ICaL__k6 = (var_ICaL__fca * var_ICaL__Ps) / var_ICaL__tauca;
00418         double var_ICaL__k5 = (1.0 - var_ICaL__Ps) / var_ICaL__tauca;
00419         double var_ICaL__tauba = ((var_ICaL__recov - 450.0) * var_ICaL__Pr) + 450.0;
00420         double var_ICaL__k6t = var_ICaL__Ps / var_ICaL__tauba;
00421         double var_ICaL__k5t = (1.0 - var_ICaL__Ps) / var_ICaL__tauba;
00422         double var_ICaL__k4 = (((((var_ICaL__k3 * var_ICaL__alpha) / var_ICaL__beta) * var_ICaL__k1) / var_ICaL__k2) * var_ICaL__k5) / var_ICaL__k6;
00423         double var_ICaL__k4t = (((((var_ICaL__k3t * var_ICaL__alpha) / var_ICaL__beta) * var_ICaL__k1t) / var_ICaL__k2t) * var_ICaL__k5t) / var_ICaL__k6t;
00424         const double var_ICaL__r1 = 0.3;
00425         const double var_ICaL__r2 = 3.0;
00426         double var_ICaL__s1 = 0.0182688 * var_ICaL__fca;
00427         const double var_ICaL__s1t = 0.00195;
00428         double var_ICaL__s2 = (((var_ICaL__s1 * var_ICaL__r1) / var_ICaL__r2) * var_ICaL__k2) / var_ICaL__k1;
00429         double var_ICaL__s2t = (((var_ICaL__s1t * var_ICaL__r1) / var_ICaL__r2) * var_ICaL__k2t) / var_ICaL__k1t;
00430         double var_IKr__xkrv1 = (fabs(var_IKr__V + 7.0) > 0.001) ? ((0.00138 * 1.0 * (var_IKr__V + 7.0)) / (1.0 - exp((-0.123) * (var_IKr__V + 7.0)))) : (0.00138 / 0.123);
00431         double var_IKr__xkrv2 = (fabs(var_IKr__V + 10.0) > 0.001) ? ((0.00061 * 1.0 * (var_IKr__V + 10.0)) / (exp(0.145 * (var_IKr__V + 10.0)) - 1.0)) : (0.00061 / 0.145);
00432         double var_IKr__taukr = 1.0 / (var_IKr__xkrv1 + var_IKr__xkrv2);
00433         double var_IKr__xkrinf = 1.0 / (1.0 + exp((-(var_IKr__V + 50.0)) / 7.5));
00434         double var_IKs__xs1ss = 1.0 / (1.0 + exp((-(var_IKs__V - 1.5)) / 16.7));
00435         double var_IKs__xs2ss = var_IKs__xs1ss;
00436         double var_IKs__tauxs1 = (fabs(var_IKs__V + 30.0) < (0.001 / 0.0687)) ? (1.0 / ((7.19e-05 / 0.148) + (0.000131 / 0.0687))) : (1.0 / (((7.19e-05 * (var_IKs__V + 30.0)) / (1.0 - exp((-0.148) * (var_IKs__V + 30.0)))) + ((0.000131 * (var_IKs__V + 30.0)) / (exp(0.0687 * (var_IKs__V + 30.0)) - 1.0))));
00437         double var_IKs__tauxs2 = 4.0 * var_IKs__tauxs1;
00438         double var_Ito__rt1 = (-(var_Ito__V + 3.0)) / 15.0;
00439         double var_Ito__rt3 = (var_Ito__V + 60.0) / 10.0;
00440         double var_Ito__rt4 = (((-var_Ito__V) / 30.0) * var_Ito__V) / 30.0;
00441         double var_Ito__rt5 = (var_Ito__V + 33.5) / 10.0;
00442         double var_Ito__xtos_inf = 1.0 / (1.0 + exp(var_Ito__rt1));
00443         double var_Ito__ytos_inf = 1.0 / (1.0 + exp(var_Ito__rt2));
00444         double var_Ito__xtof_inf = var_Ito__xtos_inf;
00445         double var_Ito__ytof_inf = var_Ito__ytos_inf;
00446         double var_Ito__txs = (9.0 / (1.0 + exp(-var_Ito__rt1))) + 0.5;
00447         double var_Ito__tys = (3000.0 / (1.0 + exp(var_Ito__rt3))) + 30.0;
00448         double var_Ito__txf = (3.5 * exp(var_Ito__rt4)) + 1.5;
00449         double var_Ito__tyf = (20.0 / (1.0 + exp(var_Ito__rt5))) + 20.0;
00450         double var_Irel__V = var_cell__V;
00451         double var_Irel__Ca_NSR = var_Ca__Ca_NSR;
00452         double var_Ileak_Iup_Ixfer__Ca_NSR = var_Ca__Ca_NSR;
00453         const double var_Ileak_Iup_Ixfer__gleak = 2.069e-05;
00454         const double var_Ileak_Iup_Ixfer__kj = 50.0;
00455         double var_Ileak_Iup_Ixfer__Ca_i = var_Ca__Ca_i;
00456         double var_Ileak_Iup_Ixfer__jleak = ((var_Ileak_Iup_Ixfer__gleak * var_Ileak_Iup_Ixfer__Ca_NSR * var_Ileak_Iup_Ixfer__Ca_NSR) / ((var_Ileak_Iup_Ixfer__Ca_NSR * var_Ileak_Iup_Ixfer__Ca_NSR) + (var_Ileak_Iup_Ixfer__kj * var_Ileak_Iup_Ixfer__kj))) * ((var_Ileak_Iup_Ixfer__Ca_NSR * 16.667) - var_Ileak_Iup_Ixfer__Ca_i);
00457         double var_Ca__jleak = var_Ileak_Iup_Ixfer__jleak;
00458         const double var_Ileak_Iup_Ixfer__cup = 0.5;
00459         const double var_Ileak_Iup_Ixfer__vup = 0.4;
00460         double var_Ileak_Iup_Ixfer__jup = (var_Ileak_Iup_Ixfer__vup * var_Ileak_Iup_Ixfer__Ca_i * var_Ileak_Iup_Ixfer__Ca_i) / ((var_Ileak_Iup_Ixfer__Ca_i * var_Ileak_Iup_Ixfer__Ca_i) + (var_Ileak_Iup_Ixfer__cup * var_Ileak_Iup_Ixfer__cup));
00461         double var_Ca__jup = var_Ileak_Iup_Ixfer__jup;
00462         double var_Ca__xir = var_Irel__xir;
00463         double var_Ca__dCa_JSR = ((-var_Ca__xir) + var_Ca__jup) - var_Ca__jleak;
00464         double var_Irel__dCa_JSR = var_Ca__dCa_JSR;
00465         double var_Irel__po = var_ICaL__po;
00466         double var_Irel__rxa = var_ICaL__rxa;
00467         const double var_Irel__cstar = 90.0;
00468         const double var_Irel__gryr = 2.58079;
00469         const double var_Irel__gbarsr = 26841.8;
00470         const double var_Irel__gdyad = 9000.0;
00471         const double var_Irel__ax = 0.3576;
00472         const double var_Irel__ay = 0.05;
00473         const double var_Irel__av = 11.3;
00474         double var_Irel__bv = ((1.0 - var_Irel__av) * var_Irel__cstar) - 50.0;
00475         double var_Irel__Qr0 = ((var_Irel__Ca_JSR > 50.0) && (var_Irel__Ca_JSR < var_Irel__cstar)) ? ((var_Irel__Ca_JSR - 50.0) / 1.0) : (var_Irel__Ca_JSR >= var_Irel__cstar) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0;
00476         double var_Irel__Qr = (var_Irel__Ca_NSR * var_Irel__Qr0) / var_Irel__cstar;
00477         double var_Irel__sparkV = exp((-var_Irel__ay) * (var_Irel__V + 30.0)) / (1.0 + exp((-var_Irel__ay) * (var_Irel__V + 30.0)));
00478         double var_Irel__spark_rate = (var_Irel__gryr / 1.0) * var_Irel__po * fabs(var_Irel__rxa) * var_Irel__sparkV;
00479         const double var_Irel__taua = 100.0;
00480         const double var_Irel__taur = 30.0;
00481         double var_Irel__xirp = (((var_Irel__po * var_Irel__Qr * fabs(var_Irel__rxa) * var_Irel__gbarsr) / 1.0) * exp((-var_Irel__ax) * (var_Irel__V + 30.0))) / (1.0 + exp((-var_Irel__ax) * (var_Irel__V + 30.0)));
00482         double var_Irel__xicap = var_Irel__po * var_Irel__gdyad * fabs(var_Irel__rxa);
00483         double var_Irel__xiryr = var_Irel__xirp + var_Irel__xicap;
00484         double var_Na__wca = var_cell__wca;
00485         double var_Na__xina = var_INa__xina;
00486         double var_Na__xiNaK = var_INaK__xiNaK;
00487         double var_Na__xiNaCa = var_INaCa__xiNaCa;
00488         double var_Ca__xiryr = var_Irel__xiryr;
00489         const double var_Ca__bcal = 24.0;
00490         const double var_Ca__xkcal = 7.0;
00491         const double var_Ca__srmax = 47.0;
00492         const double var_Ca__srkd = 0.6;
00493         const double var_Ca__bmem = 15.0;
00494         const double var_Ca__kmem = 0.3;
00495         const double var_Ca__bsar = 42.0;
00496         const double var_Ca__ksar = 13.0;
00497         double var_Ca__bpxs = (var_Ca__bcal * var_Ca__xkcal) / ((var_Ca__xkcal + var_Ca__Ca_submem) * (var_Ca__xkcal + var_Ca__Ca_submem));
00498         double var_Ca__spxs = (var_Ca__srmax * var_Ca__srkd) / ((var_Ca__srkd + var_Ca__Ca_submem) * (var_Ca__srkd + var_Ca__Ca_submem));
00499         double var_Ca__mempxs = (var_Ca__bmem * var_Ca__kmem) / ((var_Ca__kmem + var_Ca__Ca_submem) * (var_Ca__kmem + var_Ca__Ca_submem));
00500         double var_Ca__sarpxs = (var_Ca__bsar * var_Ca__ksar) / ((var_Ca__ksar + var_Ca__Ca_submem) * (var_Ca__ksar + var_Ca__Ca_submem));
00501         double var_Ca__dcsib = 1.0 / (1.0 + var_Ca__bpxs + var_Ca__spxs + var_Ca__mempxs + var_Ca__sarpxs);
00502         double var_Ca__bpxi = (var_Ca__bcal * var_Ca__xkcal) / ((var_Ca__xkcal + var_Ca__Ca_i) * (var_Ca__xkcal + var_Ca__Ca_i));
00503         double var_Ca__spxi = (var_Ca__srmax * var_Ca__srkd) / ((var_Ca__srkd + var_Ca__Ca_i) * (var_Ca__srkd + var_Ca__Ca_i));
00504         double var_Ca__mempxi = (var_Ca__bmem * var_Ca__kmem) / ((var_Ca__kmem + var_Ca__Ca_i) * (var_Ca__kmem + var_Ca__Ca_i));
00505         double var_Ca__sarpxi = (var_Ca__bsar * var_Ca__ksar) / ((var_Ca__ksar + var_Ca__Ca_i) * (var_Ca__ksar + var_Ca__Ca_i));
00506         double var_Ca__dciib = 1.0 / (1.0 + var_Ca__bpxi + var_Ca__spxi + var_Ca__mempxi + var_Ca__sarpxi);
00507         const double var_Ca__xkon = 0.0327;
00508         const double var_Ca__xkoff = 0.0196;
00509         const double var_Ca__btrop = 70.0;
00510         double var_Ca__xbi = (var_Ca__xkon * var_Ca__Ca_i * (var_Ca__btrop - var_Ca__tropi)) - (var_Ca__xkoff * var_Ca__tropi);
00511         double var_Ca__xbs = (var_Ca__xkon * var_Ca__Ca_submem * (var_Ca__btrop - var_Ca__trops)) - (var_Ca__xkoff * var_Ca__trops);
00512         const double var_Ca__taud = 4.0;
00513         const double var_Ca__taups = 0.5;
00514         double var_Ca__jd = (var_Ca__Ca_submem - var_Ca__Ca_i) / var_Ca__taud;
00515         double var_Ca__jNaCa = var_INaCa__jNaCa;
00516         double var_Ca__jca = var_ICaL__jca;
00517 
00518         double d_dt_cell__V;
00519         if (mSetVoltageDerivativeToZero)
00520         {
00521             d_dt_cell__V = 0.0;
00522         }
00523         else
00524         {
00525             d_dt_cell__V = var_cell__Itotal;
00526         }
00527 
00528         double d_dt_INa__xh = (var_INa__ah * (1.0 - var_INa__xh)) - (var_INa__bh * var_INa__xh);
00529         double d_dt_INa__xj = (var_INa__aj * (1.0 - var_INa__xj)) - (var_INa__bj * var_INa__xj);
00530         double d_dt_INa__xm = (var_INa__am * (1.0 - var_INa__xm)) - (var_INa__bm * var_INa__xm);
00531         double d_dt_ICaL__c1 = ((var_ICaL__alpha * var_ICaL__c2) + (var_ICaL__k2 * var_ICaL__xi1ca) + (var_ICaL__k2t * var_ICaL__xi1ba) + (var_ICaL__r2 * var_ICaL__po)) - ((var_ICaL__beta + var_ICaL__r1 + var_ICaL__k1t + var_ICaL__k1) * var_ICaL__c1);
00532         double d_dt_ICaL__c2 = ((var_ICaL__beta * var_ICaL__c1) + (var_ICaL__k5 * var_ICaL__xi2ca) + (var_ICaL__k5t * var_ICaL__xi2ba)) - ((var_ICaL__k6 + var_ICaL__k6t + var_ICaL__alpha) * var_ICaL__c2);
00533         double d_dt_ICaL__xi1ca = ((var_ICaL__k1 * var_ICaL__c1) + (var_ICaL__k4 * var_ICaL__xi2ca) + (var_ICaL__s1 * var_ICaL__po)) - ((var_ICaL__k3 + var_ICaL__k2 + var_ICaL__s2) * var_ICaL__xi1ca);
00534         double d_dt_ICaL__xi1ba = ((var_ICaL__k1t * var_ICaL__c1) + (var_ICaL__k4t * var_ICaL__xi2ba) + (var_ICaL__s1t * var_ICaL__po)) - ((var_ICaL__k3t + var_ICaL__k2t + var_ICaL__s2t) * var_ICaL__xi1ba);
00535         double d_dt_ICaL__xi2ca = ((var_ICaL__k3 * var_ICaL__xi1ca) + (var_ICaL__k6 * var_ICaL__c2)) - ((var_ICaL__k5 + var_ICaL__k4) * var_ICaL__xi2ca);
00536         double d_dt_ICaL__xi2ba = ((var_ICaL__k3t * var_ICaL__xi1ba) + (var_ICaL__k6t * var_ICaL__c2)) - ((var_ICaL__k5t + var_ICaL__k4t) * var_ICaL__xi2ba);
00537         double d_dt_IKr__xr = (var_IKr__xkrinf - var_IKr__xr) / var_IKr__taukr;
00538         double d_dt_IKs__xs1 = (var_IKs__xs1ss - var_IKs__xs1) / var_IKs__tauxs1;
00539         double d_dt_IKs__xs2 = (var_IKs__xs2ss - var_IKs__xs2) / var_IKs__tauxs2;
00540         double d_dt_Ito__xtos = (var_Ito__xtos_inf - var_Ito__xtos) / var_Ito__txs;
00541         double d_dt_Ito__ytos = (var_Ito__ytos_inf - var_Ito__ytos) / var_Ito__tys;
00542         double d_dt_Ito__xtof = (var_Ito__xtof_inf - var_Ito__xtof) / var_Ito__txf;
00543         double d_dt_Ito__ytof = (var_Ito__ytof_inf - var_Ito__ytof) / var_Ito__tyf;
00544         double d_dt_Irel__Ca_JSR = (var_Irel__Ca_NSR - var_Irel__Ca_JSR) / var_Irel__taua;
00545         double d_dt_Irel__xir = (var_Irel__spark_rate * var_Irel__Qr) - ((var_Irel__xir * (1.0 - ((var_Irel__taur * var_Irel__dCa_JSR) / var_Irel__Ca_NSR))) / var_Irel__taur);
00546         double d_dt_Na__Na_i = (-(var_Na__xina + (3.0 * var_Na__xiNaK) + (3.0 * var_Na__xiNaCa))) / (var_Na__wca * 1000.0);
00547         double d_dt_Ca__Ca_dyad = var_Ca__xiryr - ((var_Ca__Ca_dyad - var_Ca__Ca_submem) / var_Ca__taups);
00548         double d_dt_Ca__Ca_submem = var_Ca__dcsib * ((50.0 * (((var_Ca__xir - var_Ca__jd) - var_Ca__jca) + var_Ca__jNaCa)) - var_Ca__xbs);
00549         double d_dt_Ca__Ca_i = var_Ca__dciib * (((var_Ca__jd - var_Ca__jup) + var_Ca__jleak) - var_Ca__xbi);
00550         double d_dt_Ca__Ca_NSR = var_Ca__dCa_JSR;
00551         double d_dt_Ca__tropi = var_Ca__xbi;
00552         double d_dt_Ca__trops = var_Ca__xbs;
00553 
00554         rDY[0] = 1.0*d_dt_cell__V;
00555         rDY[1] = 1.0*d_dt_INa__xm;
00556         rDY[2] = 1.0*d_dt_INa__xh;
00557         rDY[3] = 1.0*d_dt_INa__xj;
00558         rDY[4] = 1.0*d_dt_ICaL__c1;
00559         rDY[5] = 1.0*d_dt_ICaL__c2;
00560         rDY[6] = 1.0*d_dt_ICaL__xi1ca;
00561         rDY[7] = 1.0*d_dt_ICaL__xi1ba;
00562         rDY[8] = 1.0*d_dt_ICaL__xi2ca;
00563         rDY[9] = 1.0*d_dt_ICaL__xi2ba;
00564         rDY[10] = 1.0*d_dt_IKr__xr;
00565         rDY[11] = 1.0*d_dt_IKs__xs1;
00566         rDY[12] = 1.0*d_dt_IKs__xs2;
00567         rDY[13] = 1.0*d_dt_Ito__xtos;
00568         rDY[14] = 1.0*d_dt_Ito__ytos;
00569         rDY[15] = 1.0*d_dt_Ito__xtof;
00570         rDY[16] = 1.0*d_dt_Ito__ytof;
00571         rDY[17] = 1.0*d_dt_Irel__Ca_JSR;
00572         rDY[18] = 1.0*d_dt_Irel__xir;
00573         rDY[19] = 1.0*d_dt_Na__Na_i;
00574         rDY[20] = 1.0*d_dt_Ca__Ca_dyad;
00575         rDY[21] = 1.0*d_dt_Ca__Ca_submem;
00576         rDY[22] = 1.0*d_dt_Ca__Ca_i;
00577         rDY[23] = 1.0*d_dt_Ca__Ca_NSR;
00578         rDY[24] = 1.0*d_dt_Ca__tropi;
00579         rDY[25] = 1.0*d_dt_Ca__trops;
00580     }
00581 
00582 
00583 
00584 template<>
00585 void OdeSystemInformation<Mahajan2008OdeSystem>::Initialise(void)
00586 {
00587     // Time units: ms
00588     //
00589     this->mVariableNames.push_back("V");
00590     this->mVariableUnits.push_back("mV");
00591     this->mInitialConditions.push_back(-87.169816169406);
00592 
00593     this->mVariableNames.push_back("xm");
00594     this->mVariableUnits.push_back("dimensionless");
00595     this->mInitialConditions.push_back(0.001075453357);
00596 
00597     this->mVariableNames.push_back("xh");
00598     this->mVariableUnits.push_back("dimensionless");
00599     this->mInitialConditions.push_back(0.990691306716);
00600 
00601     this->mVariableNames.push_back("xj");
00602     this->mVariableUnits.push_back("dimensionless");
00603     this->mInitialConditions.push_back(0.993888937283);
00604 
00605     this->mVariableNames.push_back("c1");
00606     this->mVariableUnits.push_back("dimensionless");
00607     this->mInitialConditions.push_back(0.000018211252);
00608 
00609     this->mVariableNames.push_back("c2");
00610     this->mVariableUnits.push_back("dimensionless");
00611     this->mInitialConditions.push_back(0.979322592773);
00612 
00613     this->mVariableNames.push_back("xi1ca");
00614     this->mVariableUnits.push_back("dimensionless");
00615     this->mInitialConditions.push_back(0.001208153482);
00616 
00617     this->mVariableNames.push_back("xi1ba");
00618     this->mVariableUnits.push_back("dimensionless");
00619     this->mInitialConditions.push_back(0.000033616596);
00620 
00621     this->mVariableNames.push_back("xi2ca");
00622     this->mVariableUnits.push_back("dimensionless");
00623     this->mInitialConditions.push_back(0.004173008466);
00624 
00625     this->mVariableNames.push_back("xi2ba");
00626     this->mVariableUnits.push_back("dimensionless");
00627     this->mInitialConditions.push_back(0.015242594688);
00628 
00629     this->mVariableNames.push_back("xr");
00630     this->mVariableUnits.push_back("dimensionless");
00631     this->mInitialConditions.push_back(0.007074239331);
00632 
00633     this->mVariableNames.push_back("xs1");
00634     this->mVariableUnits.push_back("dimensionless");
00635     this->mInitialConditions.push_back(0.048267587131);
00636 
00637     this->mVariableNames.push_back("xs2");
00638     this->mVariableUnits.push_back("dimensionless");
00639     this->mInitialConditions.push_back(0.105468807033);
00640 
00641     this->mVariableNames.push_back("xtos");
00642     this->mVariableUnits.push_back("dimensionless");
00643     this->mInitialConditions.push_back(0.00364776906);
00644 
00645     this->mVariableNames.push_back("ytos");
00646     this->mVariableUnits.push_back("dimensionless");
00647     this->mInitialConditions.push_back(0.174403618112);
00648 
00649     this->mVariableNames.push_back("xtof");
00650     this->mVariableUnits.push_back("dimensionless");
00651     this->mInitialConditions.push_back(0.003643592594);
00652 
00653     this->mVariableNames.push_back("ytof");
00654     this->mVariableUnits.push_back("dimensionless");
00655     this->mInitialConditions.push_back(0.993331326442);
00656 
00657     this->mVariableNames.push_back("Ca_JSR");
00658     this->mVariableUnits.push_back("uM");
00659     this->mInitialConditions.push_back(97.505463697266);
00660 
00661     this->mVariableNames.push_back("xir");
00662     this->mVariableUnits.push_back("uM_per_ms");
00663     this->mInitialConditions.push_back(0.006679257264);
00664 
00665     this->mVariableNames.push_back("Na_i");
00666     this->mVariableUnits.push_back("mM");
00667     this->mInitialConditions.push_back(11.441712311614);
00668 
00669     this->mVariableNames.push_back("Ca_dyad");
00670     this->mVariableUnits.push_back("uM");
00671     this->mInitialConditions.push_back(1.716573130685);
00672 
00673     this->mVariableNames.push_back("Ca_submem");
00674     this->mVariableUnits.push_back("uM");
00675     this->mInitialConditions.push_back(0.226941113355);
00676 
00677     this->mVariableNames.push_back("Ca_i");
00678     this->mVariableUnits.push_back("uM");
00679     this->mInitialConditions.push_back(0.256752008084);
00680 
00681     this->mVariableNames.push_back("Ca_NSR");
00682     this->mVariableUnits.push_back("uM");
00683     this->mInitialConditions.push_back(104.450004990523);
00684 
00685     this->mVariableNames.push_back("tropi");
00686     this->mVariableUnits.push_back("uM");
00687     this->mInitialConditions.push_back(22.171689894953);
00688 
00689     this->mVariableNames.push_back("trops");
00690     this->mVariableUnits.push_back("uM");
00691     this->mInitialConditions.push_back(19.864701949854);
00692 
00693     this->mInitialised = true;
00694 }

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