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         /*
00205          * Currents in this model are given in microA/microF (as the results of conductance (mS/microF) times voltage (mV)).
00206          * Hence, no conversion factor is necessary because this term will be multiplied by Cm (in microF/cm2)
00207          * giving rise to mono/bidomain currents in the correct units.
00208          *
00209          * Note that the CellML file in the repository was coded up with currents as having "dimensionless" units and therefore Pycml raised a warning about the units of this.
00210          */
00211         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;
00212         assert(!std::isnan(i_ionic));
00213         return i_ionic;
00214     }
00215 
00216     void Mahajan2008OdeSystem::EvaluateYDerivatives(
00217             double var_Environment__time,
00218             const std::vector<double> &rY,
00219             std::vector<double> &rDY)
00220     {
00221         // Inputs:
00222         // Time units: ms
00223         var_Environment__time *= 1.0;
00224         double var_cell__V = rY[0];
00225         // Units: mV; Initial value: -87.169816169406
00226         double var_INa__xm = rY[1];
00227         // Units: dimensionless; Initial value: 0.001075453357
00228         double var_INa__xh = rY[2];
00229         // Units: dimensionless; Initial value: 0.990691306716
00230         double var_INa__xj = rY[3];
00231         // Units: dimensionless; Initial value: 0.993888937283
00232         double var_ICaL__c1 = rY[4];
00233         // Units: dimensionless; Initial value: 0.000018211252
00234         double var_ICaL__c2 = rY[5];
00235         // Units: dimensionless; Initial value: 0.979322592773
00236         double var_ICaL__xi1ca = rY[6];
00237         // Units: dimensionless; Initial value: 0.001208153482
00238         double var_ICaL__xi1ba = rY[7];
00239         // Units: dimensionless; Initial value: 0.000033616596
00240         double var_ICaL__xi2ca = rY[8];
00241         // Units: dimensionless; Initial value: 0.004173008466
00242         double var_ICaL__xi2ba = rY[9];
00243         // Units: dimensionless; Initial value: 0.015242594688
00244         double var_IKr__xr = rY[10];
00245         // Units: dimensionless; Initial value: 0.007074239331
00246         double var_IKs__xs1 = rY[11];
00247         // Units: dimensionless; Initial value: 0.048267587131
00248         double var_IKs__xs2 = rY[12];
00249         // Units: dimensionless; Initial value: 0.105468807033
00250         double var_Ito__xtos = rY[13];
00251         // Units: dimensionless; Initial value: 0.00364776906
00252         double var_Ito__ytos = rY[14];
00253         // Units: dimensionless; Initial value: 0.174403618112
00254         double var_Ito__xtof = rY[15];
00255         // Units: dimensionless; Initial value: 0.003643592594
00256         double var_Ito__ytof = rY[16];
00257         // Units: dimensionless; Initial value: 0.993331326442
00258         double var_Irel__Ca_JSR = rY[17];
00259         // Units: uM; Initial value: 97.505463697266
00260         double var_Irel__xir = rY[18];
00261         // Units: uM_per_ms; Initial value: 0.006679257264
00262         double var_Na__Na_i = rY[19];
00263         // Units: mM; Initial value: 11.441712311614
00264         double var_Ca__Ca_dyad = rY[20];
00265         // Units: uM; Initial value: 1.716573130685
00266         double var_Ca__Ca_submem = rY[21];
00267         // Units: uM; Initial value: 0.226941113355
00268         double var_Ca__Ca_i = rY[22];
00269         // Units: uM; Initial value: 0.256752008084
00270         double var_Ca__Ca_NSR = rY[23];
00271         // Units: uM; Initial value: 104.450004990523
00272         double var_Ca__tropi = rY[24];
00273         // Units: uM; Initial value: 22.171689894953
00274         double var_Ca__trops = rY[25];
00275         // Units: uM; Initial value: 19.864701949854
00276 
00277 
00278         // Mathematics
00279         const double var_Environment__R = 8.314472;
00280         const double var_Environment__T = 308.0;
00281         const double var_Environment__F = 96.4853415;
00282         const double var_Environment__K_o = 5.4;
00283         const double var_Environment__Ca_o = 1.8;
00284         const double var_Environment__Na_o = 136.0;
00285         double var_Environment__FonRT = var_Environment__F / (var_Environment__R * var_Environment__T);
00286         const double var_reversal_potentials__K_i = 140.0;
00287         double var_reversal_potentials__FonRT = var_Environment__FonRT;
00288         double var_reversal_potentials__K_o = var_Environment__K_o;
00289         double var_reversal_potentials__ek = (1.0 / var_reversal_potentials__FonRT) * log(var_reversal_potentials__K_o / var_reversal_potentials__K_i);
00290         double var_IK1__ek = var_reversal_potentials__ek;
00291         double var_IK1__V = var_cell__V;
00292         double var_IK1__aki = 1.02 / (1.0 + exp(0.2385 * ((var_IK1__V - var_IK1__ek) - 59.215)));
00293         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)));
00294         double var_IK1__xkin = var_IK1__aki / (var_IK1__aki + var_IK1__bki);
00295         double var_IK1__K_o = var_Environment__K_o;
00296         const double var_IK1__gkix = 0.3;
00297         double var_IK1__xik1 = var_IK1__gkix * sqrt(var_IK1__K_o / 5.4) * var_IK1__xkin * (var_IK1__V - var_IK1__ek);
00298         double var_cell__xik1 = var_IK1__xik1;
00299         double var_Ito__ek = var_reversal_potentials__ek;
00300         const double var_Ito__gtos = 0.04;
00301         double var_Ito__V = var_cell__V;
00302         double var_Ito__rt2 = (var_Ito__V + 33.5) / 10.0;
00303         double var_Ito__rs_inf = 1.0 / (1.0 + exp(var_Ito__rt2));
00304         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);
00305         const double var_Ito__gtof = 0.11;
00306         double var_Ito__xitof = var_Ito__gtof * var_Ito__xtof * var_Ito__ytof * (var_Ito__V - var_Ito__ek);
00307         double var_Ito__xito = var_Ito__xitos + var_Ito__xitof;
00308         double var_cell__xito = var_Ito__xito;
00309         const double var_INaK__xkmko = 1.5;
00310         double var_INaK__V = var_cell__V;
00311         double var_INaK__FonRT = var_Environment__FonRT;
00312         double var_INaK__Na_o = var_Environment__Na_o;
00313         double var_INaK__sigma = (exp(var_INaK__Na_o / 67.3) - 1.0) / 7.0;
00314         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)));
00315         double var_INaK__Na_i = var_Na__Na_i;
00316         double var_INaK__K_o = var_Environment__K_o;
00317         const double var_INaK__xkmnai = 12.0;
00318         const double var_INaK__gNaK = 1.5;
00319         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);
00320         double var_cell__xiNaK = var_INaK__xiNaK;
00321         const double var_cell__wca = 8.0;
00322         const double var_INaCa__gNaCa = 0.84;
00323         double var_INaCa__V = var_cell__V;
00324         double var_INaCa__FonRT = var_Environment__FonRT;
00325         double var_INaCa__zw4 = 1.0 + (0.2 * exp(var_INaCa__V * (0.35 - 1.0) * var_INaCa__FonRT));
00326         const double var_INaCa__xkdna = 0.3;
00327         double var_INaCa__Ca_submem = var_Ca__Ca_submem;
00328         double var_INaCa__aloss = 1.0 / (1.0 + pow(var_INaCa__xkdna / var_INaCa__Ca_submem, 3.0));
00329         double var_INaCa__Na_o = var_Environment__Na_o;
00330         double var_INaCa__Na_i = var_Na__Na_i;
00331         double var_INaCa__Ca_o = var_Environment__Ca_o;
00332         double var_Ca__csm = var_Ca__Ca_submem / 1000.0;
00333         double var_INaCa__csm = var_Ca__csm;
00334         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);
00335         const double var_INaCa__xmcao = 1.3;
00336         const double var_INaCa__xmnao = 87.5;
00337         double var_INaCa__yz1 = (var_INaCa__xmcao * pow(var_INaCa__Na_i, 3.0)) + (pow(var_INaCa__xmnao, 3.0) * var_INaCa__csm);
00338         const double var_INaCa__xmcai = 0.0036;
00339         const double var_INaCa__xmnai = 12.3;
00340         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));
00341         double var_INaCa__yz2 = pow(var_INaCa__xmnai, 3.0) * var_INaCa__Ca_o * (1.0 + (var_INaCa__csm / var_INaCa__xmcai));
00342         double var_INaCa__zw8 = var_INaCa__yz1 + var_INaCa__yz2 + var_INaCa__yz3 + var_INaCa__yz4;
00343         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));
00344         double var_INaCa__jNaCa = (var_INaCa__gNaCa * var_INaCa__aloss * var_INaCa__zw3) / (var_INaCa__zw4 * var_INaCa__zw8);
00345         double var_INaCa__wca = var_cell__wca;
00346         double var_INaCa__xiNaCa = var_INaCa__wca * var_INaCa__jNaCa;
00347         double var_cell__xiNaCa = var_INaCa__xiNaCa;
00348         double var_ICaL__Ca_o = var_Environment__Ca_o;
00349         double var_ICaL__V = var_cell__V;
00350         const double var_ICaL__pca = 0.00054;
00351         double var_ICaL__FonRT = var_Environment__FonRT;
00352         double var_ICaL__F = var_Environment__F;
00353         double var_ICaL__za = var_ICaL__V * 2.0 * var_ICaL__FonRT;
00354         double var_ICaL__csm = var_Ca__csm;
00355         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));
00356         const double var_ICaL__gca = 182.0;
00357         double var_ICaL__po = (((((1.0 - var_ICaL__xi1ca) - var_ICaL__xi2ca) - var_ICaL__xi1ba) - var_ICaL__xi2ba) - var_ICaL__c1) - var_ICaL__c2;
00358         double var_ICaL__jca = var_ICaL__gca * var_ICaL__po * var_ICaL__rxa;
00359         double var_ICaL__wca = var_cell__wca;
00360         double var_ICaL__xica = 2.0 * var_ICaL__wca * var_ICaL__jca;
00361         double var_cell__xica = var_ICaL__xica;
00362         const double var_IKr__gkr = 0.0125;
00363         double var_IKr__K_o = var_Environment__K_o;
00364         double var_IKr__V = var_cell__V;
00365         double var_IKr__rg = 1.0 / (1.0 + exp((var_IKr__V + 33.0) / 22.4));
00366         double var_IKr__ek = var_reversal_potentials__ek;
00367         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);
00368         double var_cell__xikr = var_IKr__xikr;
00369         double var_IKs__Ca_i = var_Ca__Ca_i;
00370         double var_IKs__gksx = 1.0 + (0.8 / (1.0 + pow(0.5 / var_IKs__Ca_i, 3.0)));
00371         const double var_IKs__gks = 0.1386;
00372         double var_IKs__V = var_cell__V;
00373         const double var_reversal_potentials__prNaK = 0.01833;
00374         double var_reversal_potentials__Na_o = var_Environment__Na_o;
00375         double var_reversal_potentials__Na_i = var_Na__Na_i;
00376         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)));
00377         double var_IKs__eks = var_reversal_potentials__eks;
00378         double var_IKs__xiks = mScaleFactorGks*var_IKs__gks * var_IKs__gksx * var_IKs__xs1 * var_IKs__xs2 * (var_IKs__V - var_IKs__eks);
00379         double var_cell__xiks = var_IKs__xiks;
00380         double var_cell__i_Stim = GetStimulus((1.0/1)*var_Environment__time);
00381         double var_INa__V = var_cell__V;
00382         const double var_INa__gna = 12.0;
00383         double var_reversal_potentials__ena = (1.0 / var_reversal_potentials__FonRT) * log(var_reversal_potentials__Na_o / var_reversal_potentials__Na_i);
00384         double var_INa__ena = var_reversal_potentials__ena;
00385         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);
00386         double var_cell__xina = var_INa__xina;
00387         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);
00388         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;
00389         double var_INa__bm = 0.08 * exp((-var_INa__V) / 11.0);
00390         double var_INa__ah = (var_INa__V < (-40.0)) ? (0.135 * exp((80.0 + var_INa__V) / (-6.8))) : 0.0;
00391         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)))));
00392         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;
00393         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))));
00394         double var_ICaL__Ca_dyad = var_Ca__Ca_dyad;
00395         const double var_ICaL__vth = 0.0;
00396         const double var_ICaL__s6 = 8.0;
00397         double var_ICaL__poinf = 1.0 / (1.0 + exp((-(var_ICaL__V - var_ICaL__vth)) / var_ICaL__s6));
00398         const double var_ICaL__cat = 3.0;
00399         double var_ICaL__fca = 1.0 / (1.0 + pow(var_ICaL__cat / var_ICaL__Ca_dyad, 3.0));
00400         const double var_ICaL__vx =  -40.0;
00401         const double var_ICaL__sx = 3.0;
00402         const double var_ICaL__vy =  -40.0;
00403         const double var_ICaL__sy = 4.0;
00404         const double var_ICaL__vyr =  -40.0;
00405         const double var_ICaL__syr = 11.32;
00406         const double var_ICaL__cpt = 6.09365;
00407         const double var_ICaL__taupo = 1.0;
00408         double var_ICaL__alpha = var_ICaL__poinf / var_ICaL__taupo;
00409         double var_ICaL__beta = (1.0 - var_ICaL__poinf) / var_ICaL__taupo;
00410         double var_ICaL__k1 = 0.024168 * var_ICaL__fca;
00411         const double var_ICaL__k2 = 0.000103615;
00412         const double var_ICaL__k1t = 0.00413;
00413         const double var_ICaL__k2t = 0.00224;
00414         double var_ICaL__poi = 1.0 / (1.0 + exp((-(var_ICaL__V - var_ICaL__vx)) / var_ICaL__sx));
00415         const double var_ICaL__tau3 = 3.0;
00416         double var_ICaL__k3 = (1.0 - var_ICaL__poi) / var_ICaL__tau3;
00417         double var_ICaL__k3t = var_ICaL__k3;
00418         double var_ICaL__Ps = 1.0 / (1.0 + exp((-(var_ICaL__V - var_ICaL__vyr)) / var_ICaL__syr));
00419         const double var_ICaL__tca = 78.0329;
00420         double var_ICaL__tau_ca = (var_ICaL__tca / (1.0 + pow(var_ICaL__Ca_dyad / var_ICaL__cpt, 4.0))) + 0.1;
00421         double var_ICaL__recov = 10.0 + (4954.0 * exp(var_ICaL__V / 15.6));
00422         double var_ICaL__Pr = 1.0 - (1.0 / (1.0 + exp((-(var_ICaL__V - var_ICaL__vy)) / var_ICaL__sy)));
00423         double var_ICaL__tauca = ((var_ICaL__recov - var_ICaL__tau_ca) * var_ICaL__Pr) + var_ICaL__tau_ca;
00424         double var_ICaL__k6 = (var_ICaL__fca * var_ICaL__Ps) / var_ICaL__tauca;
00425         double var_ICaL__k5 = (1.0 - var_ICaL__Ps) / var_ICaL__tauca;
00426         double var_ICaL__tauba = ((var_ICaL__recov - 450.0) * var_ICaL__Pr) + 450.0;
00427         double var_ICaL__k6t = var_ICaL__Ps / var_ICaL__tauba;
00428         double var_ICaL__k5t = (1.0 - var_ICaL__Ps) / var_ICaL__tauba;
00429         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;
00430         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;
00431         const double var_ICaL__r1 = 0.3;
00432         const double var_ICaL__r2 = 3.0;
00433         double var_ICaL__s1 = 0.0182688 * var_ICaL__fca;
00434         const double var_ICaL__s1t = 0.00195;
00435         double var_ICaL__s2 = (((var_ICaL__s1 * var_ICaL__r1) / var_ICaL__r2) * var_ICaL__k2) / var_ICaL__k1;
00436         double var_ICaL__s2t = (((var_ICaL__s1t * var_ICaL__r1) / var_ICaL__r2) * var_ICaL__k2t) / var_ICaL__k1t;
00437         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);
00438         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);
00439         double var_IKr__taukr = 1.0 / (var_IKr__xkrv1 + var_IKr__xkrv2);
00440         double var_IKr__xkrinf = 1.0 / (1.0 + exp((-(var_IKr__V + 50.0)) / 7.5));
00441         double var_IKs__xs1ss = 1.0 / (1.0 + exp((-(var_IKs__V - 1.5)) / 16.7));
00442         double var_IKs__xs2ss = var_IKs__xs1ss;
00443         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))));
00444         double var_IKs__tauxs2 = 4.0 * var_IKs__tauxs1;
00445         double var_Ito__rt1 = (-(var_Ito__V + 3.0)) / 15.0;
00446         double var_Ito__rt3 = (var_Ito__V + 60.0) / 10.0;
00447         double var_Ito__rt4 = (((-var_Ito__V) / 30.0) * var_Ito__V) / 30.0;
00448         double var_Ito__rt5 = (var_Ito__V + 33.5) / 10.0;
00449         double var_Ito__xtos_inf = 1.0 / (1.0 + exp(var_Ito__rt1));
00450         double var_Ito__ytos_inf = 1.0 / (1.0 + exp(var_Ito__rt2));
00451         double var_Ito__xtof_inf = var_Ito__xtos_inf;
00452         double var_Ito__ytof_inf = var_Ito__ytos_inf;
00453         double var_Ito__txs = (9.0 / (1.0 + exp(-var_Ito__rt1))) + 0.5;
00454         double var_Ito__tys = (3000.0 / (1.0 + exp(var_Ito__rt3))) + 30.0;
00455         double var_Ito__txf = (3.5 * exp(var_Ito__rt4)) + 1.5;
00456         double var_Ito__tyf = (20.0 / (1.0 + exp(var_Ito__rt5))) + 20.0;
00457         double var_Irel__V = var_cell__V;
00458         double var_Irel__Ca_NSR = var_Ca__Ca_NSR;
00459         double var_Ileak_Iup_Ixfer__Ca_NSR = var_Ca__Ca_NSR;
00460         const double var_Ileak_Iup_Ixfer__gleak = 2.069e-05;
00461         const double var_Ileak_Iup_Ixfer__kj = 50.0;
00462         double var_Ileak_Iup_Ixfer__Ca_i = var_Ca__Ca_i;
00463         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);
00464         double var_Ca__jleak = var_Ileak_Iup_Ixfer__jleak;
00465         const double var_Ileak_Iup_Ixfer__cup = 0.5;
00466         const double var_Ileak_Iup_Ixfer__vup = 0.4;
00467         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));
00468         double var_Ca__jup = var_Ileak_Iup_Ixfer__jup;
00469         double var_Ca__xir = var_Irel__xir;
00470         double var_Ca__dCa_JSR = ((-var_Ca__xir) + var_Ca__jup) - var_Ca__jleak;
00471         double var_Irel__dCa_JSR = var_Ca__dCa_JSR;
00472         double var_Irel__po = var_ICaL__po;
00473         double var_Irel__rxa = var_ICaL__rxa;
00474         const double var_Irel__cstar = 90.0;
00475         const double var_Irel__gryr = 2.58079;
00476         const double var_Irel__gbarsr = 26841.8;
00477         const double var_Irel__gdyad = 9000.0;
00478         const double var_Irel__ax = 0.3576;
00479         const double var_Irel__ay = 0.05;
00480         const double var_Irel__av = 11.3;
00481         double var_Irel__bv = ((1.0 - var_Irel__av) * var_Irel__cstar) - 50.0;
00482         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;
00483         double var_Irel__Qr = (var_Irel__Ca_NSR * var_Irel__Qr0) / var_Irel__cstar;
00484         double var_Irel__sparkV = exp((-var_Irel__ay) * (var_Irel__V + 30.0)) / (1.0 + exp((-var_Irel__ay) * (var_Irel__V + 30.0)));
00485         double var_Irel__spark_rate = (var_Irel__gryr / 1.0) * var_Irel__po * fabs(var_Irel__rxa) * var_Irel__sparkV;
00486         const double var_Irel__taua = 100.0;
00487         const double var_Irel__taur = 30.0;
00488         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)));
00489         double var_Irel__xicap = var_Irel__po * var_Irel__gdyad * fabs(var_Irel__rxa);
00490         double var_Irel__xiryr = var_Irel__xirp + var_Irel__xicap;
00491         double var_Na__wca = var_cell__wca;
00492         double var_Na__xina = var_INa__xina;
00493         double var_Na__xiNaK = var_INaK__xiNaK;
00494         double var_Na__xiNaCa = var_INaCa__xiNaCa;
00495         double var_Ca__xiryr = var_Irel__xiryr;
00496         const double var_Ca__bcal = 24.0;
00497         const double var_Ca__xkcal = 7.0;
00498         const double var_Ca__srmax = 47.0;
00499         const double var_Ca__srkd = 0.6;
00500         const double var_Ca__bmem = 15.0;
00501         const double var_Ca__kmem = 0.3;
00502         const double var_Ca__bsar = 42.0;
00503         const double var_Ca__ksar = 13.0;
00504         double var_Ca__bpxs = (var_Ca__bcal * var_Ca__xkcal) / ((var_Ca__xkcal + var_Ca__Ca_submem) * (var_Ca__xkcal + var_Ca__Ca_submem));
00505         double var_Ca__spxs = (var_Ca__srmax * var_Ca__srkd) / ((var_Ca__srkd + var_Ca__Ca_submem) * (var_Ca__srkd + var_Ca__Ca_submem));
00506         double var_Ca__mempxs = (var_Ca__bmem * var_Ca__kmem) / ((var_Ca__kmem + var_Ca__Ca_submem) * (var_Ca__kmem + var_Ca__Ca_submem));
00507         double var_Ca__sarpxs = (var_Ca__bsar * var_Ca__ksar) / ((var_Ca__ksar + var_Ca__Ca_submem) * (var_Ca__ksar + var_Ca__Ca_submem));
00508         double var_Ca__dcsib = 1.0 / (1.0 + var_Ca__bpxs + var_Ca__spxs + var_Ca__mempxs + var_Ca__sarpxs);
00509         double var_Ca__bpxi = (var_Ca__bcal * var_Ca__xkcal) / ((var_Ca__xkcal + var_Ca__Ca_i) * (var_Ca__xkcal + var_Ca__Ca_i));
00510         double var_Ca__spxi = (var_Ca__srmax * var_Ca__srkd) / ((var_Ca__srkd + var_Ca__Ca_i) * (var_Ca__srkd + var_Ca__Ca_i));
00511         double var_Ca__mempxi = (var_Ca__bmem * var_Ca__kmem) / ((var_Ca__kmem + var_Ca__Ca_i) * (var_Ca__kmem + var_Ca__Ca_i));
00512         double var_Ca__sarpxi = (var_Ca__bsar * var_Ca__ksar) / ((var_Ca__ksar + var_Ca__Ca_i) * (var_Ca__ksar + var_Ca__Ca_i));
00513         double var_Ca__dciib = 1.0 / (1.0 + var_Ca__bpxi + var_Ca__spxi + var_Ca__mempxi + var_Ca__sarpxi);
00514         const double var_Ca__xkon = 0.0327;
00515         const double var_Ca__xkoff = 0.0196;
00516         const double var_Ca__btrop = 70.0;
00517         double var_Ca__xbi = (var_Ca__xkon * var_Ca__Ca_i * (var_Ca__btrop - var_Ca__tropi)) - (var_Ca__xkoff * var_Ca__tropi);
00518         double var_Ca__xbs = (var_Ca__xkon * var_Ca__Ca_submem * (var_Ca__btrop - var_Ca__trops)) - (var_Ca__xkoff * var_Ca__trops);
00519         const double var_Ca__taud = 4.0;
00520         const double var_Ca__taups = 0.5;
00521         double var_Ca__jd = (var_Ca__Ca_submem - var_Ca__Ca_i) / var_Ca__taud;
00522         double var_Ca__jNaCa = var_INaCa__jNaCa;
00523         double var_Ca__jca = var_ICaL__jca;
00524 
00525         double d_dt_cell__V;
00526         if (mSetVoltageDerivativeToZero)
00527         {
00528             d_dt_cell__V = 0.0;
00529         }
00530         else
00531         {
00532             d_dt_cell__V = var_cell__Itotal;
00533         }
00534 
00535         double d_dt_INa__xh = (var_INa__ah * (1.0 - var_INa__xh)) - (var_INa__bh * var_INa__xh);
00536         double d_dt_INa__xj = (var_INa__aj * (1.0 - var_INa__xj)) - (var_INa__bj * var_INa__xj);
00537         double d_dt_INa__xm = (var_INa__am * (1.0 - var_INa__xm)) - (var_INa__bm * var_INa__xm);
00538         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);
00539         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);
00540         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);
00541         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);
00542         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);
00543         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);
00544         double d_dt_IKr__xr = (var_IKr__xkrinf - var_IKr__xr) / var_IKr__taukr;
00545         double d_dt_IKs__xs1 = (var_IKs__xs1ss - var_IKs__xs1) / var_IKs__tauxs1;
00546         double d_dt_IKs__xs2 = (var_IKs__xs2ss - var_IKs__xs2) / var_IKs__tauxs2;
00547         double d_dt_Ito__xtos = (var_Ito__xtos_inf - var_Ito__xtos) / var_Ito__txs;
00548         double d_dt_Ito__ytos = (var_Ito__ytos_inf - var_Ito__ytos) / var_Ito__tys;
00549         double d_dt_Ito__xtof = (var_Ito__xtof_inf - var_Ito__xtof) / var_Ito__txf;
00550         double d_dt_Ito__ytof = (var_Ito__ytof_inf - var_Ito__ytof) / var_Ito__tyf;
00551         double d_dt_Irel__Ca_JSR = (var_Irel__Ca_NSR - var_Irel__Ca_JSR) / var_Irel__taua;
00552         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);
00553         double d_dt_Na__Na_i = (-(var_Na__xina + (3.0 * var_Na__xiNaK) + (3.0 * var_Na__xiNaCa))) / (var_Na__wca * 1000.0);
00554         double d_dt_Ca__Ca_dyad = var_Ca__xiryr - ((var_Ca__Ca_dyad - var_Ca__Ca_submem) / var_Ca__taups);
00555         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);
00556         double d_dt_Ca__Ca_i = var_Ca__dciib * (((var_Ca__jd - var_Ca__jup) + var_Ca__jleak) - var_Ca__xbi);
00557         double d_dt_Ca__Ca_NSR = var_Ca__dCa_JSR;
00558         double d_dt_Ca__tropi = var_Ca__xbi;
00559         double d_dt_Ca__trops = var_Ca__xbs;
00560 
00561         rDY[0] = 1.0*d_dt_cell__V;
00562         rDY[1] = 1.0*d_dt_INa__xm;
00563         rDY[2] = 1.0*d_dt_INa__xh;
00564         rDY[3] = 1.0*d_dt_INa__xj;
00565         rDY[4] = 1.0*d_dt_ICaL__c1;
00566         rDY[5] = 1.0*d_dt_ICaL__c2;
00567         rDY[6] = 1.0*d_dt_ICaL__xi1ca;
00568         rDY[7] = 1.0*d_dt_ICaL__xi1ba;
00569         rDY[8] = 1.0*d_dt_ICaL__xi2ca;
00570         rDY[9] = 1.0*d_dt_ICaL__xi2ba;
00571         rDY[10] = 1.0*d_dt_IKr__xr;
00572         rDY[11] = 1.0*d_dt_IKs__xs1;
00573         rDY[12] = 1.0*d_dt_IKs__xs2;
00574         rDY[13] = 1.0*d_dt_Ito__xtos;
00575         rDY[14] = 1.0*d_dt_Ito__ytos;
00576         rDY[15] = 1.0*d_dt_Ito__xtof;
00577         rDY[16] = 1.0*d_dt_Ito__ytof;
00578         rDY[17] = 1.0*d_dt_Irel__Ca_JSR;
00579         rDY[18] = 1.0*d_dt_Irel__xir;
00580         rDY[19] = 1.0*d_dt_Na__Na_i;
00581         rDY[20] = 1.0*d_dt_Ca__Ca_dyad;
00582         rDY[21] = 1.0*d_dt_Ca__Ca_submem;
00583         rDY[22] = 1.0*d_dt_Ca__Ca_i;
00584         rDY[23] = 1.0*d_dt_Ca__Ca_NSR;
00585         rDY[24] = 1.0*d_dt_Ca__tropi;
00586         rDY[25] = 1.0*d_dt_Ca__trops;
00587     }
00588 
00589 
00590 
00591 template<>
00592 void OdeSystemInformation<Mahajan2008OdeSystem>::Initialise(void)
00593 {
00594     // Time units: ms
00595     //
00596     this->mVariableNames.push_back("V");
00597     this->mVariableUnits.push_back("mV");
00598     this->mInitialConditions.push_back(-87.169816169406);
00599 
00600     this->mVariableNames.push_back("xm");
00601     this->mVariableUnits.push_back("dimensionless");
00602     this->mInitialConditions.push_back(0.001075453357);
00603 
00604     this->mVariableNames.push_back("xh");
00605     this->mVariableUnits.push_back("dimensionless");
00606     this->mInitialConditions.push_back(0.990691306716);
00607 
00608     this->mVariableNames.push_back("xj");
00609     this->mVariableUnits.push_back("dimensionless");
00610     this->mInitialConditions.push_back(0.993888937283);
00611 
00612     this->mVariableNames.push_back("c1");
00613     this->mVariableUnits.push_back("dimensionless");
00614     this->mInitialConditions.push_back(0.000018211252);
00615 
00616     this->mVariableNames.push_back("c2");
00617     this->mVariableUnits.push_back("dimensionless");
00618     this->mInitialConditions.push_back(0.979322592773);
00619 
00620     this->mVariableNames.push_back("xi1ca");
00621     this->mVariableUnits.push_back("dimensionless");
00622     this->mInitialConditions.push_back(0.001208153482);
00623 
00624     this->mVariableNames.push_back("xi1ba");
00625     this->mVariableUnits.push_back("dimensionless");
00626     this->mInitialConditions.push_back(0.000033616596);
00627 
00628     this->mVariableNames.push_back("xi2ca");
00629     this->mVariableUnits.push_back("dimensionless");
00630     this->mInitialConditions.push_back(0.004173008466);
00631 
00632     this->mVariableNames.push_back("xi2ba");
00633     this->mVariableUnits.push_back("dimensionless");
00634     this->mInitialConditions.push_back(0.015242594688);
00635 
00636     this->mVariableNames.push_back("xr");
00637     this->mVariableUnits.push_back("dimensionless");
00638     this->mInitialConditions.push_back(0.007074239331);
00639 
00640     this->mVariableNames.push_back("xs1");
00641     this->mVariableUnits.push_back("dimensionless");
00642     this->mInitialConditions.push_back(0.048267587131);
00643 
00644     this->mVariableNames.push_back("xs2");
00645     this->mVariableUnits.push_back("dimensionless");
00646     this->mInitialConditions.push_back(0.105468807033);
00647 
00648     this->mVariableNames.push_back("xtos");
00649     this->mVariableUnits.push_back("dimensionless");
00650     this->mInitialConditions.push_back(0.00364776906);
00651 
00652     this->mVariableNames.push_back("ytos");
00653     this->mVariableUnits.push_back("dimensionless");
00654     this->mInitialConditions.push_back(0.174403618112);
00655 
00656     this->mVariableNames.push_back("xtof");
00657     this->mVariableUnits.push_back("dimensionless");
00658     this->mInitialConditions.push_back(0.003643592594);
00659 
00660     this->mVariableNames.push_back("ytof");
00661     this->mVariableUnits.push_back("dimensionless");
00662     this->mInitialConditions.push_back(0.993331326442);
00663 
00664     this->mVariableNames.push_back("Ca_JSR");
00665     this->mVariableUnits.push_back("uM");
00666     this->mInitialConditions.push_back(97.505463697266);
00667 
00668     this->mVariableNames.push_back("xir");
00669     this->mVariableUnits.push_back("uM_per_ms");
00670     this->mInitialConditions.push_back(0.006679257264);
00671 
00672     this->mVariableNames.push_back("Na_i");
00673     this->mVariableUnits.push_back("mM");
00674     this->mInitialConditions.push_back(11.441712311614);
00675 
00676     this->mVariableNames.push_back("Ca_dyad");
00677     this->mVariableUnits.push_back("uM");
00678     this->mInitialConditions.push_back(1.716573130685);
00679 
00680     this->mVariableNames.push_back("Ca_submem");
00681     this->mVariableUnits.push_back("uM");
00682     this->mInitialConditions.push_back(0.226941113355);
00683 
00684     this->mVariableNames.push_back("Ca_i");
00685     this->mVariableUnits.push_back("uM");
00686     this->mInitialConditions.push_back(0.256752008084);
00687 
00688     this->mVariableNames.push_back("Ca_NSR");
00689     this->mVariableUnits.push_back("uM");
00690     this->mInitialConditions.push_back(104.450004990523);
00691 
00692     this->mVariableNames.push_back("tropi");
00693     this->mVariableUnits.push_back("uM");
00694     this->mInitialConditions.push_back(22.171689894953);
00695 
00696     this->mVariableNames.push_back("trops");
00697     this->mVariableUnits.push_back("uM");
00698     this->mInitialConditions.push_back(19.864701949854);
00699 
00700     this->mInitialised = true;
00701 }

Generated by  doxygen 1.6.2