BackwardEulerMahajanModel2008.cpp

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 #include "BackwardEulerMahajanModel2008.hpp"
00014 #include <cmath>
00015 #include <cassert>
00016 #include "CardiacNewtonSolver.hpp"
00017 #include "Exception.hpp"
00018 #include "OdeSystemInformation.hpp"
00019 
00020     BackwardEulerMahajanModel2008::BackwardEulerMahajanModel2008(boost::shared_ptr<AbstractIvpOdeSolver> /* unused; should be empty */, boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
00021         : AbstractBackwardEulerCardiacCell<15>(
00022                 26,
00023                 0,
00024                 pIntracellularStimulus)
00025     {
00026         // Time units: ms
00027         //
00028         mpSystemInfo = OdeSystemInformation<BackwardEulerMahajanModel2008>::Instance();
00029         Init();
00030 
00031     }
00032 
00033     BackwardEulerMahajanModel2008::~BackwardEulerMahajanModel2008()
00034     {
00035     }
00036 
00037     void BackwardEulerMahajanModel2008::VerifyStateVariables()
00038     {}
00039 
00040     double BackwardEulerMahajanModel2008::GetIIonic()
00041     {
00042         std::vector<double>& rY = rGetStateVariables();
00043         double var_cell__V = rY[0];
00044         // Units: mV; Initial value: -87.169816169406
00045         double var_INa__xm = rY[1];
00046         // Units: dimensionless; Initial value: 0.001075453357
00047         double var_INa__xh = rY[2];
00048         // Units: dimensionless; Initial value: 0.990691306716
00049         double var_INa__xj = rY[3];
00050         // Units: dimensionless; Initial value: 0.993888937283
00051         double var_ICaL__c1 = rY[4];
00052         // Units: dimensionless; Initial value: 0.000018211252
00053         double var_ICaL__c2 = rY[5];
00054         // Units: dimensionless; Initial value: 0.979322592773
00055         double var_ICaL__xi1ca = rY[6];
00056         // Units: dimensionless; Initial value: 0.001208153482
00057         double var_ICaL__xi1ba = rY[7];
00058         // Units: dimensionless; Initial value: 0.000033616596
00059         double var_ICaL__xi2ca = rY[8];
00060         // Units: dimensionless; Initial value: 0.004173008466
00061         double var_ICaL__xi2ba = rY[9];
00062         // Units: dimensionless; Initial value: 0.015242594688
00063         double var_IKr__xr = rY[10];
00064         // Units: dimensionless; Initial value: 0.007074239331
00065         double var_IKs__xs1 = rY[11];
00066         // Units: dimensionless; Initial value: 0.048267587131
00067         double var_IKs__xs2 = rY[12];
00068         // Units: dimensionless; Initial value: 0.105468807033
00069         double var_Ito__xtos = rY[13];
00070         // Units: dimensionless; Initial value: 0.00364776906
00071         double var_Ito__ytos = rY[14];
00072         // Units: dimensionless; Initial value: 0.174403618112
00073         double var_Ito__xtof = rY[15];
00074         // Units: dimensionless; Initial value: 0.003643592594
00075         double var_Ito__ytof = rY[16];
00076         // Units: dimensionless; Initial value: 0.993331326442
00077         double var_Na__Na_i = rY[19];
00078         // Units: mM; Initial value: 11.441712311614
00079         double var_Ca__Ca_submem = rY[21];
00080         // Units: uM; Initial value: 0.226941113355
00081         double var_Ca__Ca_i = rY[22];
00082         // Units: uM; Initial value: 0.256752008084
00083 
00084         const double var_Environment__R = 8.314472;
00085         const double var_Environment__T = 308.0;
00086         const double var_Environment__F = 96.4853415;
00087         const double var_Environment__K_o = 5.4;
00088         const double var_Environment__Ca_o = 1.8;
00089         const double var_Environment__Na_o = 136.0;
00090         const double var_Environment__FonRT = var_Environment__F / (var_Environment__R * var_Environment__T);
00091         const double var_reversal_potentials__K_i = 140.0;
00092         const double var_reversal_potentials__FonRT = var_Environment__FonRT;
00093         const double var_reversal_potentials__K_o = var_Environment__K_o;
00094         const double var_reversal_potentials__ek = (1.0 / var_reversal_potentials__FonRT) * log(var_reversal_potentials__K_o / var_reversal_potentials__K_i);
00095         const double var_IK1__ek = var_reversal_potentials__ek;
00096         const double var_IK1__V = var_cell__V;
00097         const double var_IK1__aki = 1.02 / (1.0 + exp(0.2385 * ((var_IK1__V - var_IK1__ek) - 59.215)));
00098         const 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)));
00099         const double var_IK1__xkin = var_IK1__aki / (var_IK1__aki + var_IK1__bki);
00100         const double var_IK1__K_o = var_Environment__K_o;
00101         const double var_IK1__gkix = 0.3;
00102         const double var_IK1__xik1 = var_IK1__gkix * sqrt(var_IK1__K_o / 5.4) * var_IK1__xkin * (var_IK1__V - var_IK1__ek);
00103         const double var_cell__xik1 = var_IK1__xik1;
00104         const double var_Ito__ek = var_reversal_potentials__ek;
00105         const double var_Ito__gtos = 0.04;
00106         const double var_Ito__V = var_cell__V;
00107         const double var_Ito__rt2 = (var_Ito__V + 33.5) / 10.0;
00108         const double var_Ito__rs_inf = 1.0 / (1.0 + exp(var_Ito__rt2));
00109         const double var_Ito__xitos = var_Ito__gtos * var_Ito__xtos * (var_Ito__ytos + (0.5 * var_Ito__rs_inf)) * (var_Ito__V - var_Ito__ek);
00110         const double var_Ito__gtof = 0.11;
00111         const double var_Ito__xitof = var_Ito__gtof * var_Ito__xtof * var_Ito__ytof * (var_Ito__V - var_Ito__ek);
00112         const double var_Ito__xito = var_Ito__xitos + var_Ito__xitof;
00113         const double var_cell__xito = var_Ito__xito;
00114         const double var_INaK__xkmko = 1.5;
00115         const double var_INaK__V = var_cell__V;
00116         const double var_INaK__FonRT = var_Environment__FonRT;
00117         const double var_INaK__Na_o = var_Environment__Na_o;
00118         const double var_INaK__sigma = (exp(var_INaK__Na_o / 67.3) - 1.0) / 7.0;
00119         const 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)));
00120         const double var_INaK__Na_i = var_Na__Na_i;
00121         const double var_INaK__K_o = var_Environment__K_o;
00122         const double var_INaK__xkmnai = 12.0;
00123         const double var_INaK__gNaK = 1.5;
00124         const 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);
00125         const double var_cell__xiNaK = var_INaK__xiNaK;
00126         const double var_cell__wca = 8.0;
00127         const double var_INaCa__gNaCa = 0.84;
00128         const double var_INaCa__V = var_cell__V;
00129         const double var_INaCa__FonRT = var_Environment__FonRT;
00130         const double var_INaCa__zw4 = 1.0 + (0.2 * exp(var_INaCa__V * (0.35 - 1.0) * var_INaCa__FonRT));
00131         const double var_INaCa__xkdna = 0.3;
00132         const double var_INaCa__Ca_submem = var_Ca__Ca_submem;
00133         const double var_INaCa__aloss = 1.0 / (1.0 + pow(var_INaCa__xkdna / var_INaCa__Ca_submem, 3.0));
00134         const double var_INaCa__Na_o = var_Environment__Na_o;
00135         const double var_INaCa__Na_i = var_Na__Na_i;
00136         const double var_INaCa__Ca_o = var_Environment__Ca_o;
00137         const double var_Ca__csm = var_Ca__Ca_submem / 1000.0;
00138         const double var_INaCa__csm = var_Ca__csm;
00139         const 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);
00140         const double var_INaCa__xmcao = 1.3;
00141         const double var_INaCa__xmnao = 87.5;
00142         const double var_INaCa__yz1 = (var_INaCa__xmcao * pow(var_INaCa__Na_i, 3.0)) + (pow(var_INaCa__xmnao, 3.0) * var_INaCa__csm);
00143         const double var_INaCa__xmcai = 0.0036;
00144         const double var_INaCa__xmnai = 12.3;
00145         const 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));
00146         const double var_INaCa__yz2 = pow(var_INaCa__xmnai, 3.0) * var_INaCa__Ca_o * (1.0 + (var_INaCa__csm / var_INaCa__xmcai));
00147         const double var_INaCa__zw8 = var_INaCa__yz1 + var_INaCa__yz2 + var_INaCa__yz3 + var_INaCa__yz4;
00148         const 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));
00149         const double var_INaCa__jNaCa = (var_INaCa__gNaCa * var_INaCa__aloss * var_INaCa__zw3) / (var_INaCa__zw4 * var_INaCa__zw8);
00150         const double var_INaCa__wca = var_cell__wca;
00151         const double var_INaCa__xiNaCa = var_INaCa__wca * var_INaCa__jNaCa;
00152         const double var_cell__xiNaCa = var_INaCa__xiNaCa;
00153         const double var_ICaL__Ca_o = var_Environment__Ca_o;
00154         const double var_ICaL__V = var_cell__V;
00155         const double var_ICaL__pca = 0.00054;
00156         const double var_ICaL__FonRT = var_Environment__FonRT;
00157         const double var_ICaL__F = var_Environment__F;
00158         const double var_ICaL__za = var_ICaL__V * 2.0 * var_ICaL__FonRT;
00159         const double var_ICaL__csm = var_Ca__csm;
00160         const 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));
00161         const double var_ICaL__gca = 182.0;
00162         const double var_ICaL__po = (((((1.0 - var_ICaL__xi1ca) - var_ICaL__xi2ca) - var_ICaL__xi1ba) - var_ICaL__xi2ba) - var_ICaL__c1) - var_ICaL__c2;
00163         const double var_ICaL__jca = var_ICaL__gca * var_ICaL__po * var_ICaL__rxa;
00164         const double var_ICaL__wca = var_cell__wca;
00165         const double var_ICaL__xica = 2.0 * var_ICaL__wca * var_ICaL__jca;
00166         const double var_cell__xica = var_ICaL__xica;
00167         const double var_IKr__gkr = 0.0125;
00168         const double var_IKr__K_o = var_Environment__K_o;
00169         const double var_IKr__V = var_cell__V;
00170         const double var_IKr__rg = 1.0 / (1.0 + exp((var_IKr__V + 33.0) / 22.4));
00171         const double var_IKr__ek = var_reversal_potentials__ek;
00172         const double var_IKr__xikr = var_IKr__gkr * sqrt(var_IKr__K_o / 5.4) * var_IKr__xr * var_IKr__rg * (var_IKr__V - var_IKr__ek);
00173         const double var_cell__xikr = var_IKr__xikr;
00174         const double var_IKs__Ca_i = var_Ca__Ca_i;
00175         const double var_IKs__gksx = 1.0 + (0.8 / (1.0 + pow(0.5 / var_IKs__Ca_i, 3.0)));
00176         const double var_IKs__gks = 0.1386;
00177         const double var_IKs__V = var_cell__V;
00178         const double var_reversal_potentials__prNaK = 0.01833;
00179         const double var_reversal_potentials__Na_o = var_Environment__Na_o;
00180         const double var_reversal_potentials__Na_i = var_Na__Na_i;
00181         const 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)));
00182         const double var_IKs__eks = var_reversal_potentials__eks;
00183         const double var_IKs__xiks = var_IKs__gks * var_IKs__gksx * var_IKs__xs1 * var_IKs__xs2 * (var_IKs__V - var_IKs__eks);
00184         const double var_cell__xiks = var_IKs__xiks;
00185         const double var_INa__V = var_cell__V;
00186         const double var_INa__gna = 12.0;
00187         const double var_reversal_potentials__ena = (1.0 / var_reversal_potentials__FonRT) * log(var_reversal_potentials__Na_o / var_reversal_potentials__Na_i);
00188         const double var_INa__ena = var_reversal_potentials__ena;
00189         const 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);
00190         const double var_cell__xina = var_INa__xina;
00191 
00192         /*
00193          * Currents in this model are given in microA/microF (as the results of conductance (mS/microF) times voltage (mV)).
00194          * Hence, no conversion factor is necessary because this term will be multiplied by Cm (in microF/cm2)
00195          * giving rise to mono/bidomain currents in the correct units.
00196          *
00197          * 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.
00198          */
00199         return (var_cell__xik1+var_cell__xito+var_cell__xiNaK+var_cell__xiNaCa+var_cell__xica+var_cell__xina+var_cell__xikr+var_cell__xiks);
00200     }
00201 
00202     void BackwardEulerMahajanModel2008::ComputeResidual(double var_environment__time, const double rCurrentGuess[15], double rResidual[15])
00203     {
00204         std::vector<double>& rY = rGetStateVariables();
00205         double var_cell__V = rY[0];
00206         // Units: mV; Initial value: -87.169816169406
00207         double var_INa__xm = rY[1];
00208         // Units: dimensionless; Initial value: 0.001075453357
00209         double var_INa__xh = rY[2];
00210         // Units: dimensionless; Initial value: 0.990691306716
00211         double var_INa__xj = rY[3];
00212         // Units: dimensionless; Initial value: 0.993888937283
00213 
00214         double var_Ca__Ca_NSR = rCurrentGuess[0];
00215         double var_Ca__Ca_dyad = rCurrentGuess[1];
00216         double var_Ca__Ca_i = rCurrentGuess[2];
00217         double var_Ca__Ca_submem = rCurrentGuess[3];
00218         double var_Ca__tropi = rCurrentGuess[4];
00219         double var_Ca__trops = rCurrentGuess[5];
00220         double var_ICaL__c1 = rCurrentGuess[6];
00221         double var_ICaL__c2 = rCurrentGuess[7];
00222         double var_ICaL__xi1ba = rCurrentGuess[8];
00223         double var_ICaL__xi1ca = rCurrentGuess[9];
00224         double var_ICaL__xi2ba = rCurrentGuess[10];
00225         double var_ICaL__xi2ca = rCurrentGuess[11];
00226         double var_Irel__Ca_JSR = rCurrentGuess[12];
00227         double var_Irel__xir = rCurrentGuess[13];
00228         double var_Na__Na_i = rCurrentGuess[14];
00229 
00230         const double var_Environment__R = 8.314472;
00231         const double var_Environment__T = 308.0;
00232         const double var_Environment__F = 96.4853415;
00233         const double var_Environment__K_o = 5.4;
00234         const double var_Environment__Ca_o = 1.8;
00235         const double var_Environment__Na_o = 136.0;
00236         const double var_Environment__FonRT = var_Environment__F / (var_Environment__R * var_Environment__T);
00237         const double var_reversal_potentials__FonRT = var_Environment__FonRT;
00238         const double var_INaK__xkmko = 1.5;
00239         const double var_INaK__V = var_cell__V;
00240         const double var_INaK__FonRT = var_Environment__FonRT;
00241         const double var_INaK__Na_o = var_Environment__Na_o;
00242         const double var_INaK__sigma = (exp(var_INaK__Na_o / 67.3) - 1.0) / 7.0;
00243         const 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)));
00244         const double var_INaK__Na_i = var_Na__Na_i;
00245         const double var_INaK__K_o = var_Environment__K_o;
00246         const double var_INaK__xkmnai = 12.0;
00247         const double var_INaK__gNaK = 1.5;
00248         const 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);
00249         const double var_cell__wca = 8.0;
00250         const double var_INaCa__gNaCa = 0.84;
00251         const double var_INaCa__V = var_cell__V;
00252         const double var_INaCa__FonRT = var_Environment__FonRT;
00253         const double var_INaCa__zw4 = 1.0 + (0.2 * exp(var_INaCa__V * (0.35 - 1.0) * var_INaCa__FonRT));
00254         const double var_INaCa__xkdna = 0.3;
00255         const double var_INaCa__Ca_submem = var_Ca__Ca_submem;
00256         const double var_INaCa__aloss = 1.0 / (1.0 + pow(var_INaCa__xkdna / var_INaCa__Ca_submem, 3.0));
00257         const double var_INaCa__Na_o = var_Environment__Na_o;
00258         const double var_INaCa__Na_i = var_Na__Na_i;
00259         const double var_INaCa__Ca_o = var_Environment__Ca_o;
00260         const double var_Ca__csm = var_Ca__Ca_submem / 1000.0;
00261         const double var_INaCa__csm = var_Ca__csm;
00262         const 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);
00263         const double var_INaCa__xmcao = 1.3;
00264         const double var_INaCa__xmnao = 87.5;
00265         const double var_INaCa__yz1 = (var_INaCa__xmcao * pow(var_INaCa__Na_i, 3.0)) + (pow(var_INaCa__xmnao, 3.0) * var_INaCa__csm);
00266         const double var_INaCa__xmcai = 0.0036;
00267         const double var_INaCa__xmnai = 12.3;
00268         const 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));
00269         const double var_INaCa__yz2 = pow(var_INaCa__xmnai, 3.0) * var_INaCa__Ca_o * (1.0 + (var_INaCa__csm / var_INaCa__xmcai));
00270         const double var_INaCa__zw8 = var_INaCa__yz1 + var_INaCa__yz2 + var_INaCa__yz3 + var_INaCa__yz4;
00271         const 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));
00272         const double var_INaCa__jNaCa = (var_INaCa__gNaCa * var_INaCa__aloss * var_INaCa__zw3) / (var_INaCa__zw4 * var_INaCa__zw8);
00273         const double var_INaCa__wca = var_cell__wca;
00274         const double var_INaCa__xiNaCa = var_INaCa__wca * var_INaCa__jNaCa;
00275         const double var_ICaL__Ca_o = var_Environment__Ca_o;
00276         const double var_ICaL__V = var_cell__V;
00277         const double var_ICaL__pca = 0.00054;
00278         const double var_ICaL__FonRT = var_Environment__FonRT;
00279         const double var_ICaL__F = var_Environment__F;
00280         const double var_ICaL__za = var_ICaL__V * 2.0 * var_ICaL__FonRT;
00281         const double var_ICaL__csm = var_Ca__csm;
00282         const 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));
00283         const double var_ICaL__gca = 182.0;
00284         const double var_ICaL__po = (((((1.0 - var_ICaL__xi1ca) - var_ICaL__xi2ca) - var_ICaL__xi1ba) - var_ICaL__xi2ba) - var_ICaL__c1) - var_ICaL__c2;
00285         const double var_ICaL__jca = var_ICaL__gca * var_ICaL__po * var_ICaL__rxa;
00286         const double var_reversal_potentials__Na_o = var_Environment__Na_o;
00287         const double var_reversal_potentials__Na_i = var_Na__Na_i;
00288         const double var_INa__V = var_cell__V;
00289         const double var_INa__gna = 12.0;
00290         const double var_reversal_potentials__ena = (1.0 / var_reversal_potentials__FonRT) * log(var_reversal_potentials__Na_o / var_reversal_potentials__Na_i);
00291         const double var_INa__ena = var_reversal_potentials__ena;
00292         const 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);
00293         const double var_ICaL__Ca_dyad = var_Ca__Ca_dyad;
00294         const double var_ICaL__vth = 0.0;
00295         const double var_ICaL__s6 = 8.0;
00296         const double var_ICaL__poinf = 1.0 / (1.0 + exp((-(var_ICaL__V - var_ICaL__vth)) / var_ICaL__s6));
00297         const double var_ICaL__cat = 3.0;
00298         const double var_ICaL__fca = 1.0 / (1.0 + pow(var_ICaL__cat / var_ICaL__Ca_dyad, 3.0));
00299         const double var_ICaL__vx =  -40.0;
00300         const double var_ICaL__sx = 3.0;
00301         const double var_ICaL__vy =  -40.0;
00302         const double var_ICaL__sy = 4.0;
00303         const double var_ICaL__vyr =  -40.0;
00304         const double var_ICaL__syr = 11.32;
00305         const double var_ICaL__cpt = 6.09365;
00306         const double var_ICaL__taupo = 1.0;
00307         const double var_ICaL__alpha = var_ICaL__poinf / var_ICaL__taupo;
00308         const double var_ICaL__beta = (1.0 - var_ICaL__poinf) / var_ICaL__taupo;
00309         const double var_ICaL__k1 = 0.024168 * var_ICaL__fca;
00310         const double var_ICaL__k2 = 0.000103615;
00311         const double var_ICaL__k1t = 0.00413;
00312         const double var_ICaL__k2t = 0.00224;
00313         const double var_ICaL__poi = 1.0 / (1.0 + exp((-(var_ICaL__V - var_ICaL__vx)) / var_ICaL__sx));
00314         const double var_ICaL__tau3 = 3.0;
00315         const double var_ICaL__k3 = (1.0 - var_ICaL__poi) / var_ICaL__tau3;
00316         const double var_ICaL__k3t = var_ICaL__k3;
00317         const double var_ICaL__Ps = 1.0 / (1.0 + exp((-(var_ICaL__V - var_ICaL__vyr)) / var_ICaL__syr));
00318         const double var_ICaL__tca = 78.0329;
00319         const double var_ICaL__tau_ca = (var_ICaL__tca / (1.0 + pow(var_ICaL__Ca_dyad / var_ICaL__cpt, 4.0))) + 0.1;
00320         const double var_ICaL__recov = 10.0 + (4954.0 * exp(var_ICaL__V / 15.6));
00321         const double var_ICaL__Pr = 1.0 - (1.0 / (1.0 + exp((-(var_ICaL__V - var_ICaL__vy)) / var_ICaL__sy)));
00322         const double var_ICaL__tauca = ((var_ICaL__recov - var_ICaL__tau_ca) * var_ICaL__Pr) + var_ICaL__tau_ca;
00323         const double var_ICaL__k6 = (var_ICaL__fca * var_ICaL__Ps) / var_ICaL__tauca;
00324         const double var_ICaL__k5 = (1.0 - var_ICaL__Ps) / var_ICaL__tauca;
00325         const double var_ICaL__tauba = ((var_ICaL__recov - 450.0) * var_ICaL__Pr) + 450.0;
00326         const double var_ICaL__k6t = var_ICaL__Ps / var_ICaL__tauba;
00327         const double var_ICaL__k5t = (1.0 - var_ICaL__Ps) / var_ICaL__tauba;
00328         const 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;
00329         const 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;
00330         const double var_ICaL__r1 = 0.3;
00331         const double var_ICaL__r2 = 3.0;
00332         const double var_ICaL__s1 = 0.0182688 * var_ICaL__fca;
00333         const double var_ICaL__s1t = 0.00195;
00334         const double var_ICaL__s2 = (((var_ICaL__s1 * var_ICaL__r1) / var_ICaL__r2) * var_ICaL__k2) / var_ICaL__k1;
00335         const double var_ICaL__s2t = (((var_ICaL__s1t * var_ICaL__r1) / var_ICaL__r2) * var_ICaL__k2t) / var_ICaL__k1t;
00336         const double var_Irel__V = var_cell__V;
00337         const double var_Irel__Ca_NSR = var_Ca__Ca_NSR;
00338         const double var_Ileak_Iup_Ixfer__Ca_NSR = var_Ca__Ca_NSR;
00339         const double var_Ileak_Iup_Ixfer__gleak = 2.069e-05;
00340         const double var_Ileak_Iup_Ixfer__kj = 50.0;
00341         const double var_Ileak_Iup_Ixfer__Ca_i = var_Ca__Ca_i;
00342         const 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);
00343         const double var_Ca__jleak = var_Ileak_Iup_Ixfer__jleak;
00344         const double var_Ileak_Iup_Ixfer__cup = 0.5;
00345         const double var_Ileak_Iup_Ixfer__vup = 0.4;
00346         const 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));
00347         const double var_Ca__jup = var_Ileak_Iup_Ixfer__jup;
00348         const double var_Ca__xir = var_Irel__xir;
00349         const double var_Ca__dCa_JSR = ((-var_Ca__xir) + var_Ca__jup) - var_Ca__jleak;
00350         const double var_Irel__dCa_JSR = var_Ca__dCa_JSR;
00351         const double var_Irel__po = var_ICaL__po;
00352         const double var_Irel__rxa = var_ICaL__rxa;
00353         const double var_Irel__cstar = 90.0;
00354         const double var_Irel__gryr = 2.58079;
00355         const double var_Irel__gbarsr = 26841.8;
00356         const double var_Irel__gdyad = 9000.0;
00357         const double var_Irel__ax = 0.3576;
00358         const double var_Irel__ay = 0.05;
00359         const double var_Irel__av = 11.3;
00360         const double var_Irel__bv = ((1.0 - var_Irel__av) * var_Irel__cstar) - 50.0;
00361         const 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;
00362         const double var_Irel__Qr = (var_Irel__Ca_NSR * var_Irel__Qr0) / var_Irel__cstar;
00363         const double var_Irel__sparkV = exp((-var_Irel__ay) * (var_Irel__V + 30.0)) / (1.0 + exp((-var_Irel__ay) * (var_Irel__V + 30.0)));
00364         const double var_Irel__spark_rate = (var_Irel__gryr / 1.0) * var_Irel__po * fabs(var_Irel__rxa) * var_Irel__sparkV;
00365         const double var_Irel__taua = 100.0;
00366         const double var_Irel__taur = 30.0;
00367         const 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)));
00368         const double var_Irel__xicap = var_Irel__po * var_Irel__gdyad * fabs(var_Irel__rxa);
00369         const double var_Irel__xiryr = var_Irel__xirp + var_Irel__xicap;
00370         const double var_Na__wca = var_cell__wca;
00371         const double var_Na__xina = var_INa__xina;
00372         const double var_Na__xiNaK = var_INaK__xiNaK;
00373         const double var_Na__xiNaCa = var_INaCa__xiNaCa;
00374         const double var_Ca__xiryr = var_Irel__xiryr;
00375         const double var_Ca__bcal = 24.0;
00376         const double var_Ca__xkcal = 7.0;
00377         const double var_Ca__srmax = 47.0;
00378         const double var_Ca__srkd = 0.6;
00379         const double var_Ca__bmem = 15.0;
00380         const double var_Ca__kmem = 0.3;
00381         const double var_Ca__bsar = 42.0;
00382         const double var_Ca__ksar = 13.0;
00383         const double var_Ca__bpxs = (var_Ca__bcal * var_Ca__xkcal) / ((var_Ca__xkcal + var_Ca__Ca_submem) * (var_Ca__xkcal + var_Ca__Ca_submem));
00384         const double var_Ca__spxs = (var_Ca__srmax * var_Ca__srkd) / ((var_Ca__srkd + var_Ca__Ca_submem) * (var_Ca__srkd + var_Ca__Ca_submem));
00385         const double var_Ca__mempxs = (var_Ca__bmem * var_Ca__kmem) / ((var_Ca__kmem + var_Ca__Ca_submem) * (var_Ca__kmem + var_Ca__Ca_submem));
00386         const double var_Ca__sarpxs = (var_Ca__bsar * var_Ca__ksar) / ((var_Ca__ksar + var_Ca__Ca_submem) * (var_Ca__ksar + var_Ca__Ca_submem));
00387         const double var_Ca__dcsib = 1.0 / (1.0 + var_Ca__bpxs + var_Ca__spxs + var_Ca__mempxs + var_Ca__sarpxs);
00388         const double var_Ca__bpxi = (var_Ca__bcal * var_Ca__xkcal) / ((var_Ca__xkcal + var_Ca__Ca_i) * (var_Ca__xkcal + var_Ca__Ca_i));
00389         const double var_Ca__spxi = (var_Ca__srmax * var_Ca__srkd) / ((var_Ca__srkd + var_Ca__Ca_i) * (var_Ca__srkd + var_Ca__Ca_i));
00390         const double var_Ca__mempxi = (var_Ca__bmem * var_Ca__kmem) / ((var_Ca__kmem + var_Ca__Ca_i) * (var_Ca__kmem + var_Ca__Ca_i));
00391         const double var_Ca__sarpxi = (var_Ca__bsar * var_Ca__ksar) / ((var_Ca__ksar + var_Ca__Ca_i) * (var_Ca__ksar + var_Ca__Ca_i));
00392         const double var_Ca__dciib = 1.0 / (1.0 + var_Ca__bpxi + var_Ca__spxi + var_Ca__mempxi + var_Ca__sarpxi);
00393         const double var_Ca__xkon = 0.0327;
00394         const double var_Ca__xkoff = 0.0196;
00395         const double var_Ca__btrop = 70.0;
00396         const double var_Ca__xbi = (var_Ca__xkon * var_Ca__Ca_i * (var_Ca__btrop - var_Ca__tropi)) - (var_Ca__xkoff * var_Ca__tropi);
00397         const double var_Ca__xbs = (var_Ca__xkon * var_Ca__Ca_submem * (var_Ca__btrop - var_Ca__trops)) - (var_Ca__xkoff * var_Ca__trops);
00398         const double var_Ca__taud = 4.0;
00399         const double var_Ca__taups = 0.5;
00400         const double var_Ca__jd = (var_Ca__Ca_submem - var_Ca__Ca_i) / var_Ca__taud;
00401         const double var_Ca__jNaCa = var_INaCa__jNaCa;
00402         const double var_Ca__jca = var_ICaL__jca;
00403         const 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);
00404         const 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);
00405         const 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);
00406         const 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);
00407         const 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);
00408         const 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);
00409         const double d_dt_Irel__Ca_JSR = (var_Irel__Ca_NSR - var_Irel__Ca_JSR) / var_Irel__taua;
00410         const 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);
00411         const double d_dt_Na__Na_i = (-(var_Na__xina + (3.0 * var_Na__xiNaK) + (3.0 * var_Na__xiNaCa))) / (var_Na__wca * 1000.0);
00412         const double d_dt_Ca__Ca_dyad = var_Ca__xiryr - ((var_Ca__Ca_dyad - var_Ca__Ca_submem) / var_Ca__taups);
00413         const 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);
00414         const double d_dt_Ca__Ca_i = var_Ca__dciib * (((var_Ca__jd - var_Ca__jup) + var_Ca__jleak) - var_Ca__xbi);
00415         const double d_dt_Ca__Ca_NSR = var_Ca__dCa_JSR;
00416         const double d_dt_Ca__tropi = var_Ca__xbi;
00417         const double d_dt_Ca__trops = var_Ca__xbs;
00418 
00419         rResidual[6] = rCurrentGuess[6] - rY[4] - mDt*1.0*d_dt_ICaL__c1;
00420         rResidual[7] = rCurrentGuess[7] - rY[5] - mDt*1.0*d_dt_ICaL__c2;
00421         rResidual[9] = rCurrentGuess[9] - rY[6] - mDt*1.0*d_dt_ICaL__xi1ca;
00422         rResidual[8] = rCurrentGuess[8] - rY[7] - mDt*1.0*d_dt_ICaL__xi1ba;
00423         rResidual[11] = rCurrentGuess[11] - rY[8] - mDt*1.0*d_dt_ICaL__xi2ca;
00424         rResidual[10] = rCurrentGuess[10] - rY[9] - mDt*1.0*d_dt_ICaL__xi2ba;
00425         rResidual[12] = rCurrentGuess[12] - rY[17] - mDt*1.0*d_dt_Irel__Ca_JSR;
00426         rResidual[13] = rCurrentGuess[13] - rY[18] - mDt*1.0*d_dt_Irel__xir;
00427         rResidual[14] = rCurrentGuess[14] - rY[19] - mDt*1.0*d_dt_Na__Na_i;
00428         rResidual[1] = rCurrentGuess[1] - rY[20] - mDt*1.0*d_dt_Ca__Ca_dyad;
00429         rResidual[3] = rCurrentGuess[3] - rY[21] - mDt*1.0*d_dt_Ca__Ca_submem;
00430         rResidual[2] = rCurrentGuess[2] - rY[22] - mDt*1.0*d_dt_Ca__Ca_i;
00431         rResidual[0] = rCurrentGuess[0] - rY[23] - mDt*1.0*d_dt_Ca__Ca_NSR;
00432         rResidual[4] = rCurrentGuess[4] - rY[24] - mDt*1.0*d_dt_Ca__tropi;
00433         rResidual[5] = rCurrentGuess[5] - rY[25] - mDt*1.0*d_dt_Ca__trops;
00434     }
00435 
00436     void BackwardEulerMahajanModel2008::ComputeJacobian(double var_environment__time, const double rCurrentGuess[15], double rJacobian[15][15])
00437     {
00438         std::vector<double>& rY = rGetStateVariables();
00439         double var_cell__V = rY[0];
00440         // Units: mV; Initial value: -87.169816169406
00441         double var_INa__xm = rY[1];
00442         // Units: dimensionless; Initial value: 0.001075453357
00443         double var_INa__xh = rY[2];
00444         // Units: dimensionless; Initial value: 0.990691306716
00445         double var_INa__xj = rY[3];
00446         // Units: dimensionless; Initial value: 0.993888937283
00447 
00448         double var_Ca__Ca_NSR = rCurrentGuess[0];
00449         double var_Ca__Ca_dyad = rCurrentGuess[1];
00450         double var_Ca__Ca_i = rCurrentGuess[2];
00451         double var_Ca__Ca_submem = rCurrentGuess[3];
00452         double var_Ca__tropi = rCurrentGuess[4];
00453         double var_Ca__trops = rCurrentGuess[5];
00454         double var_ICaL__c1 = rCurrentGuess[6];
00455         double var_ICaL__c2 = rCurrentGuess[7];
00456         double var_ICaL__xi1ba = rCurrentGuess[8];
00457         double var_ICaL__xi1ca = rCurrentGuess[9];
00458         double var_ICaL__xi2ba = rCurrentGuess[10];
00459         double var_ICaL__xi2ca = rCurrentGuess[11];
00460         double var_Irel__Ca_JSR = rCurrentGuess[12];
00461         double var_Irel__xir = rCurrentGuess[13];
00462         double var_Na__Na_i = rCurrentGuess[14];
00463 
00464         const double dt = 1.0 * mDt;
00465 
00466         const double var_Environment__R = 8.314472;
00467         const double var_Environment__T = 308.0;
00468         const double var_Environment__F = 96.4853415;
00469         const double var_Environment__Ca_o = 1.8;
00470         const double var_Environment__FonRT = var_Environment__F / (var_Environment__R * var_Environment__T);
00471         const double var_Ca__csm = var_Ca__Ca_submem / 1000.0;
00472         const double var_ICaL__Ca_o = var_Environment__Ca_o;
00473         const double var_ICaL__V = var_cell__V;
00474         const double var_ICaL__pca = 0.00054;
00475         const double var_ICaL__FonRT = var_Environment__FonRT;
00476         const double var_ICaL__F = var_Environment__F;
00477         const double var_ICaL__za = var_ICaL__V * 2.0 * var_ICaL__FonRT;
00478         const double var_ICaL__csm = var_Ca__csm;
00479         const double var_Irel__cstar = 90.0;
00480         const double var_Irel__av = 11.3;
00481         const double var_Irel__bv = ((1.0 - var_Irel__av) * var_Irel__cstar) - 50.0;
00482 
00483         rJacobian[0][0] = 1.0 - (dt * ((((((-4.138e-05) * var_Ca__Ca_NSR) / (pow(var_Ca__Ca_NSR, 2.0) + 2500.0)) * ((16.667 * var_Ca__Ca_NSR) - var_Ca__Ca_i)) + (((4.138e-05 * pow(var_Ca__Ca_NSR, 3.0)) / pow(pow(var_Ca__Ca_NSR, 2.0) + 2500.0, 2.0)) * ((16.667 * var_Ca__Ca_NSR) - var_Ca__Ca_i))) - ((0.00034484023 * pow(var_Ca__Ca_NSR, 2.0)) / (pow(var_Ca__Ca_NSR, 2.0) + 2500.0))));
00484         rJacobian[0][1] = 0.0;
00485         rJacobian[0][2] = (-dt) * ((((0.8 * var_Ca__Ca_i) / (pow(var_Ca__Ca_i, 2.0) + 0.25)) - ((0.8 * pow(var_Ca__Ca_i, 3.0)) / pow(pow(var_Ca__Ca_i, 2.0) + 0.25, 2.0))) + ((2.069e-05 * pow(var_Ca__Ca_NSR, 2.0)) / (pow(var_Ca__Ca_NSR, 2.0) + 2500.0)));
00486         rJacobian[0][3] = 0.0;
00487         rJacobian[0][4] = 0.0;
00488         rJacobian[0][5] = 0.0;
00489         rJacobian[0][6] = 0.0;
00490         rJacobian[0][7] = 0.0;
00491         rJacobian[0][8] = 0.0;
00492         rJacobian[0][9] = 0.0;
00493         rJacobian[0][10] = 0.0;
00494         rJacobian[0][11] = 0.0;
00495         rJacobian[0][12] = 0.0;
00496         rJacobian[0][13] = dt;
00497         rJacobian[0][14] = 0.0;
00498         rJacobian[1][0] = ((((((-298.2422222) * dt) * ((((((1.0 - var_ICaL__xi1ca) - var_ICaL__xi2ca) - var_ICaL__xi1ba) - var_ICaL__xi2ba) - var_ICaL__c1) - var_ICaL__c2)) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0))) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.3576) * var_cell__V) - 10.728)) / (1.0 + exp(((-0.3576) * var_cell__V) - 10.728));
00499         rJacobian[1][1] = 1.0 + (2.0 * dt);
00500         rJacobian[1][2] = 0.0;
00501         rJacobian[1][3] = (-2.0) * dt;
00502         rJacobian[1][4] = 0.0;
00503         rJacobian[1][5] = 0.0;
00504         rJacobian[1][6] = (-dt) * (((((((-298.2422222) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0))) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.3576) * var_cell__V) - 10.728)) / (1.0 + exp(((-0.3576) * var_cell__V) - 10.728))) - (9000.0 * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))));
00505         rJacobian[1][7] = (-dt) * (((((((-298.2422222) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0))) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.3576) * var_cell__V) - 10.728)) / (1.0 + exp(((-0.3576) * var_cell__V) - 10.728))) - (9000.0 * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))));
00506         rJacobian[1][8] = (-dt) * (((((((-298.2422222) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0))) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.3576) * var_cell__V) - 10.728)) / (1.0 + exp(((-0.3576) * var_cell__V) - 10.728))) - (9000.0 * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))));
00507         rJacobian[1][9] = (-dt) * (((((((-298.2422222) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0))) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.3576) * var_cell__V) - 10.728)) / (1.0 + exp(((-0.3576) * var_cell__V) - 10.728))) - (9000.0 * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))));
00508         rJacobian[1][10] = (-dt) * (((((((-298.2422222) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0))) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.3576) * var_cell__V) - 10.728)) / (1.0 + exp(((-0.3576) * var_cell__V) - 10.728))) - (9000.0 * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))));
00509         rJacobian[1][11] = (-dt) * (((((((-298.2422222) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0))) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.3576) * var_cell__V) - 10.728)) / (1.0 + exp(((-0.3576) * var_cell__V) - 10.728))) - (9000.0 * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))));
00510         rJacobian[1][12] = (((((((-298.2422222) * dt) * ((((((1.0 - var_ICaL__xi1ca) - var_ICaL__xi2ca) - var_ICaL__xi1ba) - var_ICaL__xi2ba) - var_ICaL__c1) - var_ICaL__c2)) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? 1.0 : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? var_Irel__av : 0.0))) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.3576) * var_cell__V) - 10.728)) / (1.0 + exp(((-0.3576) * var_cell__V) - 10.728));
00511         rJacobian[1][13] = 0.0;
00512         rJacobian[1][14] = 0.0;
00513         rJacobian[2][0] = ((-dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_i, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_i, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_i, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_i, 2.0)))) * (((((4.138e-05 * var_Ca__Ca_NSR) / (pow(var_Ca__Ca_NSR, 2.0) + 2500.0)) * ((16.667 * var_Ca__Ca_NSR) - var_Ca__Ca_i)) - (((4.138e-05 * pow(var_Ca__Ca_NSR, 3.0)) / pow(pow(var_Ca__Ca_NSR, 2.0) + 2500.0, 2.0)) * ((16.667 * var_Ca__Ca_NSR) - var_Ca__Ca_i))) + ((0.00034484023 * pow(var_Ca__Ca_NSR, 2.0)) / (pow(var_Ca__Ca_NSR, 2.0) + 2500.0)));
00514         rJacobian[2][1] = 0.0;
00515         rJacobian[2][2] = (1.0 + (((dt / pow((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_i, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_i, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_i, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_i, 2.0)), 2.0)) * (((((((1.0 / 4.0) * var_Ca__Ca_submem) - ((1.0 / 4.0) * var_Ca__Ca_i)) - ((0.4 * pow(var_Ca__Ca_i, 2.0)) / (pow(var_Ca__Ca_i, 2.0) + 0.25))) + (((2.069e-05 * pow(var_Ca__Ca_NSR, 2.0)) / (pow(var_Ca__Ca_NSR, 2.0) + 2500.0)) * ((16.667 * var_Ca__Ca_NSR) - var_Ca__Ca_i))) - ((0.0327 * var_Ca__Ca_i) * (70.0 - var_Ca__tropi))) + (0.0196 * var_Ca__tropi))) * (((((-336.0) / pow(7.0 + var_Ca__Ca_i, 3.0)) - (56.4 / pow(0.6 + var_Ca__Ca_i, 3.0))) - (9.0 / pow(0.3 + var_Ca__Ca_i, 3.0))) - (1092.0 / pow(13.0 + var_Ca__Ca_i, 3.0))))) - ((dt / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_i, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_i, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_i, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_i, 2.0)))) * (((((-2.539) - ((0.8 * var_Ca__Ca_i) / (pow(var_Ca__Ca_i, 2.0) + 0.25))) + ((0.8 * pow(var_Ca__Ca_i, 3.0)) / pow(pow(var_Ca__Ca_i, 2.0) + 0.25, 2.0))) - ((2.069e-05 * pow(var_Ca__Ca_NSR, 2.0)) / (pow(var_Ca__Ca_NSR, 2.0) + 2500.0))) + (0.0327 * var_Ca__tropi)));
00516         rJacobian[2][3] = (((-1.0) / 4.0) * dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_i, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_i, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_i, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_i, 2.0)));
00517         rJacobian[2][4] = ((-dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_i, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_i, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_i, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_i, 2.0)))) * ((0.0327 * var_Ca__Ca_i) + 0.0196);
00518         rJacobian[2][5] = 0.0;
00519         rJacobian[2][6] = 0.0;
00520         rJacobian[2][7] = 0.0;
00521         rJacobian[2][8] = 0.0;
00522         rJacobian[2][9] = 0.0;
00523         rJacobian[2][10] = 0.0;
00524         rJacobian[2][11] = 0.0;
00525         rJacobian[2][12] = 0.0;
00526         rJacobian[2][13] = 0.0;
00527         rJacobian[2][14] = 0.0;
00528         rJacobian[3][0] = 0.0;
00529         rJacobian[3][1] = 0.0;
00530         rJacobian[3][2] = (((-25.0) / 2.0) * dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_submem, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_submem, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_submem, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_submem, 2.0)));
00531         rJacobian[3][3] = (1.0 + (((dt / pow((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_submem, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_submem, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_submem, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_submem, 2.0)), 2.0)) * (((((((50.0 * var_Irel__xir) - ((25.0 / 2.0) * var_Ca__Ca_submem)) + ((25.0 / 2.0) * var_Ca__Ca_i)) - ((9100.0 * ((((((1.0 - var_ICaL__xi1ca) - var_ICaL__xi2ca) - var_ICaL__xi1ba) - var_ICaL__xi2ba) - var_ICaL__c1) - var_ICaL__c2)) * (((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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))))) + ((((42.0 / (1.0 + (0.027 / pow(var_Ca__Ca_submem, 3.0)))) * (((1.8 * pow(var_Na__Na_i, 3.0)) * exp(0.01318693882 * var_cell__V)) - (((314432.0 / 125.0) * var_Ca__Ca_submem) * exp((-0.02449002923) * var_cell__V)))) / (1.0 + (0.2 * exp((-0.02449002923) * var_cell__V)))) / (((7.966356167 * pow(var_Na__Na_i, 3.0)) + (4115.811375 * var_Ca__Ca_submem)) + 12405.2022))) - ((0.0327 * var_Ca__Ca_submem) * (70.0 - var_Ca__trops))) + (0.0196 * var_Ca__trops))) * (((((-336.0) / pow(7.0 + var_Ca__Ca_submem, 3.0)) - (56.4 / pow(0.6 + var_Ca__Ca_submem, 3.0))) - (9.0 / pow(0.3 + var_Ca__Ca_submem, 3.0))) - (1092.0 / pow(13.0 + var_Ca__Ca_submem, 3.0))))) - ((dt / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_submem, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_submem, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_submem, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_submem, 2.0)))) * (((((-14.789) + (((((3.402 / pow(1.0 + (0.027 / pow(var_Ca__Ca_submem, 3.0)), 2.0)) * (((1.8 * pow(var_Na__Na_i, 3.0)) * exp(0.01318693882 * var_cell__V)) - (((314432.0 / 125.0) * var_Ca__Ca_submem) * exp((-0.02449002923) * var_cell__V)))) / (1.0 + (0.2 * exp((-0.02449002923) * var_cell__V)))) / (((7.966356167 * pow(var_Na__Na_i, 3.0)) + (4115.811375 * var_Ca__Ca_submem)) + 12405.2022)) / pow(var_Ca__Ca_submem, 4.0))) - ((((105649.152 / (1.0 + (0.027 / pow(var_Ca__Ca_submem, 3.0)))) * exp((-0.02449002923) * var_cell__V)) / (1.0 + (0.2 * exp((-0.02449002923) * var_cell__V)))) / (((7.966356167 * pow(var_Na__Na_i, 3.0)) + (4115.811375 * var_Ca__Ca_submem)) + 12405.2022))) - ((((172864.0778 / (1.0 + (0.027 / pow(var_Ca__Ca_submem, 3.0)))) * (((1.8 * pow(var_Na__Na_i, 3.0)) * exp(0.01318693882 * var_cell__V)) - (((314432.0 / 125.0) * var_Ca__Ca_submem) * exp((-0.02449002923) * var_cell__V)))) / (1.0 + (0.2 * exp((-0.02449002923) * var_cell__V)))) / pow(((7.966356167 * pow(var_Na__Na_i, 3.0)) + (4115.811375 * var_Ca__Ca_submem)) + 12405.2022, 2.0))) + (0.0327 * var_Ca__trops)));
00532         rJacobian[3][4] = 0.0;
00533         rJacobian[3][5] = ((-dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_submem, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_submem, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_submem, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_submem, 2.0)))) * ((0.0327 * var_Ca__Ca_submem) + 0.0196);
00534         rJacobian[3][6] = (((-9100.0) * dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_submem, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_submem, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_submem, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_submem, 2.0)))) * (((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)));
00535         rJacobian[3][7] = (((-9100.0) * dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_submem, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_submem, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_submem, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_submem, 2.0)))) * (((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)));
00536         rJacobian[3][8] = (((-9100.0) * dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_submem, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_submem, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_submem, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_submem, 2.0)))) * (((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)));
00537         rJacobian[3][9] = (((-9100.0) * dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_submem, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_submem, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_submem, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_submem, 2.0)))) * (((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)));
00538         rJacobian[3][10] = (((-9100.0) * dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_submem, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_submem, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_submem, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_submem, 2.0)))) * (((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)));
00539         rJacobian[3][11] = (((-9100.0) * dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_submem, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_submem, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_submem, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_submem, 2.0)))) * (((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)));
00540         rJacobian[3][12] = 0.0;
00541         rJacobian[3][13] = ((-50.0) * dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_submem, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_submem, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_submem, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_submem, 2.0)));
00542         rJacobian[3][14] = ((-dt) / ((((1.0 + (168.0 / pow(7.0 + var_Ca__Ca_submem, 2.0))) + (28.2 / pow(0.6 + var_Ca__Ca_submem, 2.0))) + (4.5 / pow(0.3 + var_Ca__Ca_submem, 2.0))) + (546.0 / pow(13.0 + var_Ca__Ca_submem, 2.0)))) * ((((((226.8 / (1.0 + (0.027 / pow(var_Ca__Ca_submem, 3.0)))) * pow(var_Na__Na_i, 2.0)) * exp(0.01318693882 * var_cell__V)) / (1.0 + (0.2 * exp((-0.02449002923) * var_cell__V)))) / (((7.966356167 * pow(var_Na__Na_i, 3.0)) + (4115.811375 * var_Ca__Ca_submem)) + 12405.2022)) - (((((1003.760877 / (1.0 + (0.027 / pow(var_Ca__Ca_submem, 3.0)))) * (((1.8 * pow(var_Na__Na_i, 3.0)) * exp(0.01318693882 * var_cell__V)) - (((314432.0 / 125.0) * var_Ca__Ca_submem) * exp((-0.02449002923) * var_cell__V)))) / (1.0 + (0.2 * exp((-0.02449002923) * var_cell__V)))) / pow(((7.966356167 * pow(var_Na__Na_i, 3.0)) + (4115.811375 * var_Ca__Ca_submem)) + 12405.2022, 2.0)) * pow(var_Na__Na_i, 2.0)));
00543         rJacobian[4][0] = 0.0;
00544         rJacobian[4][1] = 0.0;
00545         rJacobian[4][2] = (-dt) * (2.289 - (0.0327 * var_Ca__tropi));
00546         rJacobian[4][3] = 0.0;
00547         rJacobian[4][4] = 1.0 - (dt * (((-0.0327) * var_Ca__Ca_i) - 0.0196));
00548         rJacobian[4][5] = 0.0;
00549         rJacobian[4][6] = 0.0;
00550         rJacobian[4][7] = 0.0;
00551         rJacobian[4][8] = 0.0;
00552         rJacobian[4][9] = 0.0;
00553         rJacobian[4][10] = 0.0;
00554         rJacobian[4][11] = 0.0;
00555         rJacobian[4][12] = 0.0;
00556         rJacobian[4][13] = 0.0;
00557         rJacobian[4][14] = 0.0;
00558         rJacobian[5][0] = 0.0;
00559         rJacobian[5][1] = 0.0;
00560         rJacobian[5][2] = 0.0;
00561         rJacobian[5][3] = (-dt) * (2.289 - (0.0327 * var_Ca__trops));
00562         rJacobian[5][4] = 0.0;
00563         rJacobian[5][5] = 1.0 - (dt * (((-0.0327) * var_Ca__Ca_submem) - 0.0196));
00564         rJacobian[5][6] = 0.0;
00565         rJacobian[5][7] = 0.0;
00566         rJacobian[5][8] = 0.0;
00567         rJacobian[5][9] = 0.0;
00568         rJacobian[5][10] = 0.0;
00569         rJacobian[5][11] = 0.0;
00570         rJacobian[5][12] = 0.0;
00571         rJacobian[5][13] = 0.0;
00572         rJacobian[5][14] = 0.0;
00573         rJacobian[6][0] = 0.0;
00574         rJacobian[6][1] = (((1.957608 * dt) / pow(1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)), 2.0)) / pow(var_Ca__Ca_dyad, 4.0)) * var_ICaL__c1;
00575         rJacobian[6][2] = 0.0;
00576         rJacobian[6][3] = 0.0;
00577         rJacobian[6][4] = 0.0;
00578         rJacobian[6][5] = 0.0;
00579         rJacobian[6][6] = 1.0 - (dt * (((-4.30413) + (1.0 / (1.0 + exp(((-1.0) / 8.0) * var_cell__V)))) - (0.024168 / (1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0))))));
00580         rJacobian[6][7] = (-dt) * ((1.0 / (1.0 + exp(((-1.0) / 8.0) * var_cell__V))) - 3.0);
00581         rJacobian[6][8] = 2.99776 * dt;
00582         rJacobian[6][9] = 2.999896385 * dt;
00583         rJacobian[6][10] = 3.0 * dt;
00584         rJacobian[6][11] = 3.0 * dt;
00585         rJacobian[6][12] = 0.0;
00586         rJacobian[6][13] = 0.0;
00587         rJacobian[6][14] = 0.0;
00588         rJacobian[7][0] = 0.0;
00589         rJacobian[7][1] = (-dt) * (((((-(1.0 - (1.0 / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))))) / pow(((((9.9 + (4954.0 * exp(0.0641025641 * var_cell__V))) - (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) + 0.1, 2.0)) * var_ICaL__xi2ca) * ((((0.2263746095 / pow(1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0)), 2.0)) * pow(var_Ca__Ca_dyad, 3.0)) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) - ((0.2263746095 / pow(1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0)), 2.0)) * pow(var_Ca__Ca_dyad, 3.0)))) - ((((((81.0 / pow(1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)), 2.0)) / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))) / (((((9.9 + (4954.0 * exp(0.0641025641 * var_cell__V))) - (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) + 0.1)) / pow(var_Ca__Ca_dyad, 4.0)) - ((((1.0 / (1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)))) / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))) / pow(((((9.9 + (4954.0 * exp(0.0641025641 * var_cell__V))) - (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) + 0.1, 2.0)) * ((((0.2263746095 / pow(1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0)), 2.0)) * pow(var_Ca__Ca_dyad, 3.0)) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) - ((0.2263746095 / pow(1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0)), 2.0)) * pow(var_Ca__Ca_dyad, 3.0))))) * var_ICaL__c2));
00590         rJacobian[7][2] = 0.0;
00591         rJacobian[7][3] = 0.0;
00592         rJacobian[7][4] = 0.0;
00593         rJacobian[7][5] = 0.0;
00594         rJacobian[7][6] = (-dt) * (1.0 - (1.0 / (1.0 + exp(((-1.0) / 8.0) * var_cell__V))));
00595         rJacobian[7][7] = 1.0 - (dt * ((((((-1.0) / (1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)))) / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))) / (((((9.9 + (4954.0 * exp(0.0641025641 * var_cell__V))) - (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) + 0.1)) - ((1.0 / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))) / ((((-440.0) + (4954.0 * exp(0.0641025641 * var_cell__V))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + 450.0))) - (1.0 / (1.0 + exp(((-1.0) / 8.0) * var_cell__V)))));
00596         rJacobian[7][8] = 0.0;
00597         rJacobian[7][9] = 0.0;
00598         rJacobian[7][10] = ((-dt) * (1.0 - (1.0 / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))))) / ((((-440.0) + (4954.0 * exp(0.0641025641 * var_cell__V))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + 450.0);
00599         rJacobian[7][11] = ((-dt) * (1.0 - (1.0 / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))))) / (((((9.9 + (4954.0 * exp(0.0641025641 * var_cell__V))) - (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) + 0.1);
00600         rJacobian[7][12] = 0.0;
00601         rJacobian[7][13] = 0.0;
00602         rJacobian[7][14] = 0.0;
00603         rJacobian[8][0] = 0.0;
00604         rJacobian[8][1] = 0.0;
00605         rJacobian[8][2] = 0.0;
00606         rJacobian[8][3] = 0.0;
00607         rJacobian[8][4] = 0.0;
00608         rJacobian[8][5] = 0.0;
00609         rJacobian[8][6] = (-0.00218) * dt;
00610         rJacobian[8][7] = 0.00195 * dt;
00611         rJacobian[8][8] = 1.0 - (dt * ((-0.337629096) + ((1.0 / 3.0) / (1.0 + exp((((-1.0) / 3.0) * var_cell__V) - (40.0 / 3.0))))));
00612         rJacobian[8][9] = 0.00195 * dt;
00613         rJacobian[8][10] = (-dt) * ((((((1.84375 * ((1.0 / 3.0) - ((1.0 / 3.0) / (1.0 + exp((((-1.0) / 3.0) * var_cell__V) - (40.0 / 3.0)))))) / (1.0 + exp(((-1.0) / 8.0) * var_cell__V))) / (1.0 - (1.0 / (1.0 + exp(((-1.0) / 8.0) * var_cell__V))))) * (1.0 - (1.0 / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))))) * (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))) - 0.00195);
00614         rJacobian[8][11] = 0.00195 * dt;
00615         rJacobian[8][12] = 0.0;
00616         rJacobian[8][13] = 0.0;
00617         rJacobian[8][14] = 0.0;
00618         rJacobian[9][0] = 0.0;
00619         rJacobian[9][1] = (-dt) * ((((1.957608 / pow(1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)), 2.0)) / pow(var_Ca__Ca_dyad, 4.0)) * var_ICaL__c1) + (((1.4797728 / pow(1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)), 2.0)) * ((((((1.0 - var_ICaL__xi1ca) - var_ICaL__xi2ca) - var_ICaL__xi1ba) - var_ICaL__xi2ba) - var_ICaL__c1) - var_ICaL__c2)) / pow(var_Ca__Ca_dyad, 4.0)));
00620         rJacobian[9][2] = 0.0;
00621         rJacobian[9][3] = 0.0;
00622         rJacobian[9][4] = 0.0;
00623         rJacobian[9][5] = 0.0;
00624         rJacobian[9][6] = ((-0.0058992) * dt) / (1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)));
00625         rJacobian[9][7] = (0.0182688 * dt) / (1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)));
00626         rJacobian[9][8] = (0.0182688 * dt) / (1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)));
00627         rJacobian[9][9] = 1.0 - (dt * ((((-0.0182688) / (1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)))) - 0.3334447806) + ((1.0 / 3.0) / (1.0 + exp((((-1.0) / 3.0) * var_cell__V) - (40.0 / 3.0))))));
00628         rJacobian[9][10] = (0.0182688 * dt) / (1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)));
00629         rJacobian[9][11] = (-dt) * ((((((233.2480818 * ((1.0 / 3.0) - ((1.0 / 3.0) / (1.0 + exp((((-1.0) / 3.0) * var_cell__V) - (40.0 / 3.0)))))) / (1.0 + exp(((-1.0) / 8.0) * var_cell__V))) / (1.0 - (1.0 / (1.0 + exp(((-1.0) / 8.0) * var_cell__V))))) * (1.0 - (1.0 / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))))) * (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))) - (0.0182688 / (1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)))));
00630         rJacobian[9][12] = 0.0;
00631         rJacobian[9][13] = 0.0;
00632         rJacobian[9][14] = 0.0;
00633         rJacobian[10][0] = 0.0;
00634         rJacobian[10][1] = 0.0;
00635         rJacobian[10][2] = 0.0;
00636         rJacobian[10][3] = 0.0;
00637         rJacobian[10][4] = 0.0;
00638         rJacobian[10][5] = 0.0;
00639         rJacobian[10][6] = 0.0;
00640         rJacobian[10][7] = ((-dt) / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))) / ((((-440.0) + (4954.0 * exp(0.0641025641 * var_cell__V))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + 450.0);
00641         rJacobian[10][8] = (-dt) * ((1.0 / 3.0) - ((1.0 / 3.0) / (1.0 + exp((((-1.0) / 3.0) * var_cell__V) - (40.0 / 3.0)))));
00642         rJacobian[10][9] = 0.0;
00643         rJacobian[10][10] = 1.0 - (dt * (((-(1.0 - (1.0 / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))))) / ((((-440.0) + (4954.0 * exp(0.0641025641 * var_cell__V))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + 450.0)) - (((((1.84375 * ((1.0 / 3.0) - ((1.0 / 3.0) / (1.0 + exp((((-1.0) / 3.0) * var_cell__V) - (40.0 / 3.0)))))) / (1.0 + exp(((-1.0) / 8.0) * var_cell__V))) / (1.0 - (1.0 / (1.0 + exp(((-1.0) / 8.0) * var_cell__V))))) * (1.0 - (1.0 / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))))) * (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904)))));
00644         rJacobian[10][11] = 0.0;
00645         rJacobian[10][12] = 0.0;
00646         rJacobian[10][13] = 0.0;
00647         rJacobian[10][14] = 0.0;
00648         rJacobian[11][0] = 0.0;
00649         rJacobian[11][1] = (-dt) * (((((((81.0 / pow(1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)), 2.0)) / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))) / (((((9.9 + (4954.0 * exp(0.0641025641 * var_cell__V))) - (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) + 0.1)) * var_ICaL__c2) / pow(var_Ca__Ca_dyad, 4.0)) - (((((1.0 / (1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)))) / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))) / pow(((((9.9 + (4954.0 * exp(0.0641025641 * var_cell__V))) - (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) + 0.1, 2.0)) * var_ICaL__c2) * ((((0.2263746095 / pow(1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0)), 2.0)) * pow(var_Ca__Ca_dyad, 3.0)) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) - ((0.2263746095 / pow(1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0)), 2.0)) * pow(var_Ca__Ca_dyad, 3.0))))) + ((((1.0 - (1.0 / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904)))) / pow(((((9.9 + (4954.0 * exp(0.0641025641 * var_cell__V))) - (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) + 0.1, 2.0)) * var_ICaL__xi2ca) * ((((0.2263746095 / pow(1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0)), 2.0)) * pow(var_Ca__Ca_dyad, 3.0)) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) - ((0.2263746095 / pow(1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0)), 2.0)) * pow(var_Ca__Ca_dyad, 3.0)))));
00650         rJacobian[11][2] = 0.0;
00651         rJacobian[11][3] = 0.0;
00652         rJacobian[11][4] = 0.0;
00653         rJacobian[11][5] = 0.0;
00654         rJacobian[11][6] = 0.0;
00655         rJacobian[11][7] = (((-dt) / (1.0 + (27.0 / pow(var_Ca__Ca_dyad, 3.0)))) / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))) / (((((9.9 + (4954.0 * exp(0.0641025641 * var_cell__V))) - (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) + 0.1);
00656         rJacobian[11][8] = 0.0;
00657         rJacobian[11][9] = (-dt) * ((1.0 / 3.0) - ((1.0 / 3.0) / (1.0 + exp((((-1.0) / 3.0) * var_cell__V) - (40.0 / 3.0)))));
00658         rJacobian[11][10] = 0.0;
00659         rJacobian[11][11] = 1.0 - (dt * (((-(1.0 - (1.0 / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))))) / (((((9.9 + (4954.0 * exp(0.0641025641 * var_cell__V))) - (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) * (1.0 - (1.0 / (1.0 + exp((((-1.0) / 4.0) * var_cell__V) - 10.0))))) + (78.0329 / (1.0 + (0.0007252537376 * pow(var_Ca__Ca_dyad, 4.0))))) + 0.1)) - (((((233.2480818 * ((1.0 / 3.0) - ((1.0 / 3.0) / (1.0 + exp((((-1.0) / 3.0) * var_cell__V) - (40.0 / 3.0)))))) / (1.0 + exp(((-1.0) / 8.0) * var_cell__V))) / (1.0 - (1.0 / (1.0 + exp(((-1.0) / 8.0) * var_cell__V))))) * (1.0 - (1.0 / (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904))))) * (1.0 + exp(((-0.08833922261) * var_cell__V) - 3.533568904)))));
00660         rJacobian[11][12] = 0.0;
00661         rJacobian[11][13] = 0.0;
00662         rJacobian[11][14] = 0.0;
00663         rJacobian[12][0] = ((-1.0) / 100.0) * dt;
00664         rJacobian[12][1] = 0.0;
00665         rJacobian[12][2] = 0.0;
00666         rJacobian[12][3] = 0.0;
00667         rJacobian[12][4] = 0.0;
00668         rJacobian[12][5] = 0.0;
00669         rJacobian[12][6] = 0.0;
00670         rJacobian[12][7] = 0.0;
00671         rJacobian[12][8] = 0.0;
00672         rJacobian[12][9] = 0.0;
00673         rJacobian[12][10] = 0.0;
00674         rJacobian[12][11] = 0.0;
00675         rJacobian[12][12] = 1.0 + ((1.0 / 100.0) * dt);
00676         rJacobian[12][13] = 0.0;
00677         rJacobian[12][14] = 0.0;
00678         rJacobian[13][0] = (-dt) * ((((((0.02867544444 * ((((((1.0 - var_ICaL__xi1ca) - var_ICaL__xi2ca) - var_ICaL__xi1ba) - var_ICaL__xi2ba) - var_ICaL__c1) - var_ICaL__c2)) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.05) * var_cell__V) - 1.5)) / (1.0 + exp(((-0.05) * var_cell__V) - 1.5))) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0))) - (((1.0 / 30.0) * var_Irel__xir) * ((((-30.0) * ((((((-4.138e-05) * var_Ca__Ca_NSR) / (pow(var_Ca__Ca_NSR, 2.0) + 2500.0)) * ((16.667 * var_Ca__Ca_NSR) - var_Ca__Ca_i)) + (((4.138e-05 * pow(var_Ca__Ca_NSR, 3.0)) / pow(pow(var_Ca__Ca_NSR, 2.0) + 2500.0, 2.0)) * ((16.667 * var_Ca__Ca_NSR) - var_Ca__Ca_i))) - ((0.00034484023 * pow(var_Ca__Ca_NSR, 2.0)) / (pow(var_Ca__Ca_NSR, 2.0) + 2500.0)))) / var_Ca__Ca_NSR) + ((30.0 * (((-var_Irel__xir) + ((0.4 * pow(var_Ca__Ca_i, 2.0)) / (pow(var_Ca__Ca_i, 2.0) + 0.25))) - (((2.069e-05 * pow(var_Ca__Ca_NSR, 2.0)) / (pow(var_Ca__Ca_NSR, 2.0) + 2500.0)) * ((16.667 * var_Ca__Ca_NSR) - var_Ca__Ca_i)))) / pow(var_Ca__Ca_NSR, 2.0)))));
00679         rJacobian[13][1] = 0.0;
00680         rJacobian[13][2] = (((-dt) * var_Irel__xir) * ((((0.8 * var_Ca__Ca_i) / (pow(var_Ca__Ca_i, 2.0) + 0.25)) - ((0.8 * pow(var_Ca__Ca_i, 3.0)) / pow(pow(var_Ca__Ca_i, 2.0) + 0.25, 2.0))) + ((2.069e-05 * pow(var_Ca__Ca_NSR, 2.0)) / (pow(var_Ca__Ca_NSR, 2.0) + 2500.0)))) / var_Ca__Ca_NSR;
00681         rJacobian[13][3] = 0.0;
00682         rJacobian[13][4] = 0.0;
00683         rJacobian[13][5] = 0.0;
00684         rJacobian[13][6] = (((((0.02867544444 * dt) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.05) * var_cell__V) - 1.5)) / (1.0 + exp(((-0.05) * var_cell__V) - 1.5))) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0));
00685         rJacobian[13][7] = (((((0.02867544444 * dt) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.05) * var_cell__V) - 1.5)) / (1.0 + exp(((-0.05) * var_cell__V) - 1.5))) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0));
00686         rJacobian[13][8] = (((((0.02867544444 * dt) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.05) * var_cell__V) - 1.5)) / (1.0 + exp(((-0.05) * var_cell__V) - 1.5))) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0));
00687         rJacobian[13][9] = (((((0.02867544444 * dt) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.05) * var_cell__V) - 1.5)) / (1.0 + exp(((-0.05) * var_cell__V) - 1.5))) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0));
00688         rJacobian[13][10] = (((((0.02867544444 * dt) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.05) * var_cell__V) - 1.5)) / (1.0 + exp(((-0.05) * var_cell__V) - 1.5))) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0));
00689         rJacobian[13][11] = (((((0.02867544444 * dt) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.05) * var_cell__V) - 1.5)) / (1.0 + exp(((-0.05) * var_cell__V) - 1.5))) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? (var_Irel__Ca_JSR - 50.0) : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? ((var_Irel__av * var_Irel__Ca_JSR) + var_Irel__bv) : 0.0));
00690         rJacobian[13][12] = (((((((-0.02867544444) * dt) * ((((((1.0 - var_ICaL__xi1ca) - var_ICaL__xi2ca) - var_ICaL__xi1ba) - var_ICaL__xi2ba) - var_ICaL__c1) - var_ICaL__c2)) * fabs(((0.0753539361 * fabs(var_cell__V)) < 0.001) ? (((2.0 * var_ICaL__pca) * var_ICaL__F) * ((var_ICaL__csm * exp(var_ICaL__za)) - (0.341 * var_ICaL__Ca_o))) : ((((((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)))) * exp(((-0.05) * var_cell__V) - 1.5)) / (1.0 + exp(((-0.05) * var_cell__V) - 1.5))) * var_Ca__Ca_NSR) * (((50.0 < var_Irel__Ca_JSR) && (var_Irel__Ca_JSR < 90.0)) ? 1.0 : ((var_Irel__cstar <= var_Irel__Ca_JSR) ? var_Irel__av : 0.0));
00691         rJacobian[13][13] = 1.0 - (dt * ((((-1.0) / 30.0) + ((((-var_Irel__xir) + ((0.4 * pow(var_Ca__Ca_i, 2.0)) / (pow(var_Ca__Ca_i, 2.0) + 0.25))) - (((2.069e-05 * pow(var_Ca__Ca_NSR, 2.0)) / (pow(var_Ca__Ca_NSR, 2.0) + 2500.0)) * ((16.667 * var_Ca__Ca_NSR) - var_Ca__Ca_i))) / var_Ca__Ca_NSR)) - (var_Irel__xir / var_Ca__Ca_NSR)));
00692         rJacobian[13][14] = 0.0;
00693         rJacobian[14][0] = 0.0;
00694         rJacobian[14][1] = 0.0;
00695         rJacobian[14][2] = 0.0;
00696         rJacobian[14][3] = (-dt) * ((((((((-0.00020412) / pow(1.0 + (0.027 / pow(var_Ca__Ca_submem, 3.0)), 2.0)) * (((1.8 * pow(var_Na__Na_i, 3.0)) * exp(0.01318693882 * var_cell__V)) - (((314432.0 / 125.0) * var_Ca__Ca_submem) * exp((-0.02449002923) * var_cell__V)))) / (1.0 + (0.2 * exp((-0.02449002923) * var_cell__V)))) / (((7.966356167 * pow(var_Na__Na_i, 3.0)) + (4115.811375 * var_Ca__Ca_submem)) + 12405.2022)) / pow(var_Ca__Ca_submem, 4.0)) + ((((6.33894912 / (1.0 + (0.027 / pow(var_Ca__Ca_submem, 3.0)))) * exp((-0.02449002923) * var_cell__V)) / (1.0 + (0.2 * exp((-0.02449002923) * var_cell__V)))) / (((7.966356167 * pow(var_Na__Na_i, 3.0)) + (4115.811375 * var_Ca__Ca_submem)) + 12405.2022))) + ((((10.37184466 / (1.0 + (0.027 / pow(var_Ca__Ca_submem, 3.0)))) * (((1.8 * pow(var_Na__Na_i, 3.0)) * exp(0.01318693882 * var_cell__V)) - (((314432.0 / 125.0) * var_Ca__Ca_submem) * exp((-0.02449002923) * var_cell__V)))) / (1.0 + (0.2 * exp((-0.02449002923) * var_cell__V)))) / pow(((7.966356167 * pow(var_Na__Na_i, 3.0)) + (4115.811375 * var_Ca__Ca_submem)) + 12405.2022, 2.0)));
00697         rJacobian[14][4] = 0.0;
00698         rJacobian[14][5] = 0.0;
00699         rJacobian[14][6] = 0.0;
00700         rJacobian[14][7] = 0.0;
00701         rJacobian[14][8] = 0.0;
00702         rJacobian[14][9] = 0.0;
00703         rJacobian[14][10] = 0.0;
00704         rJacobian[14][11] = 0.0;
00705         rJacobian[14][12] = 0.0;
00706         rJacobian[14][13] = 0.0;
00707         rJacobian[14][14] = 1.0 - (dt * (((((((((-0.03981212072) * var_INa__xh) * var_INa__xj) * pow(var_INa__xm, 3.0)) / var_Na__Na_i) - ((0.0004402173911 / ((1.0 + (0.1245 * exp((-0.003767696805) * var_cell__V))) + (0.03412424596 * exp((-0.03767696805) * var_cell__V)))) / (var_Na__Na_i + 12.0))) + (((0.0004402173911 / ((1.0 + (0.1245 * exp((-0.003767696805) * var_cell__V))) + (0.03412424596 * exp((-0.03767696805) * var_cell__V)))) * var_Na__Na_i) / pow(var_Na__Na_i + 12.0, 2.0))) - (((((0.013608 / (1.0 + (0.027 / pow(var_Ca__Ca_submem, 3.0)))) * pow(var_Na__Na_i, 2.0)) * exp(0.01318693882 * var_cell__V)) / (1.0 + (0.2 * exp((-0.02449002923) * var_cell__V)))) / (((7.966356167 * pow(var_Na__Na_i, 3.0)) + (4115.811375 * var_Ca__Ca_submem)) + 12405.2022))) + (((((0.06022565262 / (1.0 + (0.027 / pow(var_Ca__Ca_submem, 3.0)))) * (((1.8 * pow(var_Na__Na_i, 3.0)) * exp(0.01318693882 * var_cell__V)) - (((314432.0 / 125.0) * var_Ca__Ca_submem) * exp((-0.02449002923) * var_cell__V)))) / (1.0 + (0.2 * exp((-0.02449002923) * var_cell__V)))) / pow(((7.966356167 * pow(var_Na__Na_i, 3.0)) + (4115.811375 * var_Ca__Ca_submem)) + 12405.2022, 2.0)) * pow(var_Na__Na_i, 2.0))));
00708     }
00709 
00710     void BackwardEulerMahajanModel2008::UpdateTransmembranePotential(double var_Environment__time)
00711     {
00712         // Time units: ms
00713         var_Environment__time *= 1.0;
00714         std::vector<double>& rY = rGetStateVariables();
00715         double var_cell__V = rY[0];
00716         // Units: mV; Initial value: -87.169816169406
00717         double var_INa__xm = rY[1];
00718         // Units: dimensionless; Initial value: 0.001075453357
00719         double var_INa__xh = rY[2];
00720         // Units: dimensionless; Initial value: 0.990691306716
00721         double var_INa__xj = rY[3];
00722         // Units: dimensionless; Initial value: 0.993888937283
00723         double var_ICaL__c1 = rY[4];
00724         // Units: dimensionless; Initial value: 0.000018211252
00725         double var_ICaL__c2 = rY[5];
00726         // Units: dimensionless; Initial value: 0.979322592773
00727         double var_ICaL__xi1ca = rY[6];
00728         // Units: dimensionless; Initial value: 0.001208153482
00729         double var_ICaL__xi1ba = rY[7];
00730         // Units: dimensionless; Initial value: 0.000033616596
00731         double var_ICaL__xi2ca = rY[8];
00732         // Units: dimensionless; Initial value: 0.004173008466
00733         double var_ICaL__xi2ba = rY[9];
00734         // Units: dimensionless; Initial value: 0.015242594688
00735         double var_IKr__xr = rY[10];
00736         // Units: dimensionless; Initial value: 0.007074239331
00737         double var_IKs__xs1 = rY[11];
00738         // Units: dimensionless; Initial value: 0.048267587131
00739         double var_IKs__xs2 = rY[12];
00740         // Units: dimensionless; Initial value: 0.105468807033
00741         double var_Ito__xtos = rY[13];
00742         // Units: dimensionless; Initial value: 0.00364776906
00743         double var_Ito__ytos = rY[14];
00744         // Units: dimensionless; Initial value: 0.174403618112
00745         double var_Ito__xtof = rY[15];
00746         // Units: dimensionless; Initial value: 0.003643592594
00747         double var_Ito__ytof = rY[16];
00748         // Units: dimensionless; Initial value: 0.993331326442
00749         double var_Na__Na_i = rY[19];
00750         // Units: mM; Initial value: 11.441712311614
00751         double var_Ca__Ca_submem = rY[21];
00752         // Units: uM; Initial value: 0.226941113355
00753         double var_Ca__Ca_i = rY[22];
00754         // Units: uM; Initial value: 0.256752008084
00755 
00756         const double var_Environment__R = 8.314472;
00757         const double var_Environment__T = 308.0;
00758         const double var_Environment__F = 96.4853415;
00759         const double var_Environment__K_o = 5.4;
00760         const double var_Environment__Ca_o = 1.8;
00761         const double var_Environment__Na_o = 136.0;
00762         const double var_Environment__FonRT = var_Environment__F / (var_Environment__R * var_Environment__T);
00763 //        const double var_cell__time = var_Environment__time;
00764         const double var_reversal_potentials__K_i = 140.0;
00765         const double var_reversal_potentials__FonRT = var_Environment__FonRT;
00766         const double var_reversal_potentials__K_o = var_Environment__K_o;
00767         const double var_reversal_potentials__ek = (1.0 / var_reversal_potentials__FonRT) * log(var_reversal_potentials__K_o / var_reversal_potentials__K_i);
00768         const double var_IK1__ek = var_reversal_potentials__ek;
00769         const double var_IK1__V = var_cell__V;
00770         const double var_IK1__aki = 1.02 / (1.0 + exp(0.2385 * ((var_IK1__V - var_IK1__ek) - 59.215)));
00771         const 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)));
00772         const double var_IK1__xkin = var_IK1__aki / (var_IK1__aki + var_IK1__bki);
00773         const double var_IK1__K_o = var_Environment__K_o;
00774         const double var_IK1__gkix = 0.3;
00775         const double var_IK1__xik1 = var_IK1__gkix * sqrt(var_IK1__K_o / 5.4) * var_IK1__xkin * (var_IK1__V - var_IK1__ek);
00776         const double var_cell__xik1 = var_IK1__xik1;
00777         const double var_Ito__ek = var_reversal_potentials__ek;
00778         const double var_Ito__gtos = 0.04;
00779         const double var_Ito__V = var_cell__V;
00780         const double var_Ito__rt2 = (var_Ito__V + 33.5) / 10.0;
00781         const double var_Ito__rs_inf = 1.0 / (1.0 + exp(var_Ito__rt2));
00782         const double var_Ito__xitos = var_Ito__gtos * var_Ito__xtos * (var_Ito__ytos + (0.5 * var_Ito__rs_inf)) * (var_Ito__V - var_Ito__ek);
00783         const double var_Ito__gtof = 0.11;
00784         const double var_Ito__xitof = var_Ito__gtof * var_Ito__xtof * var_Ito__ytof * (var_Ito__V - var_Ito__ek);
00785         const double var_Ito__xito = var_Ito__xitos + var_Ito__xitof;
00786         const double var_cell__xito = var_Ito__xito;
00787         const double var_INaK__xkmko = 1.5;
00788         const double var_INaK__V = var_cell__V;
00789         const double var_INaK__FonRT = var_Environment__FonRT;
00790         const double var_INaK__Na_o = var_Environment__Na_o;
00791         const double var_INaK__sigma = (exp(var_INaK__Na_o / 67.3) - 1.0) / 7.0;
00792         const 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)));
00793         const double var_INaK__Na_i = var_Na__Na_i;
00794         const double var_INaK__K_o = var_Environment__K_o;
00795         const double var_INaK__xkmnai = 12.0;
00796         const double var_INaK__gNaK = 1.5;
00797         const 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);
00798         const double var_cell__xiNaK = var_INaK__xiNaK;
00799         const double var_cell__wca = 8.0;
00800         const double var_INaCa__gNaCa = 0.84;
00801         const double var_INaCa__V = var_cell__V;
00802         const double var_INaCa__FonRT = var_Environment__FonRT;
00803         const double var_INaCa__zw4 = 1.0 + (0.2 * exp(var_INaCa__V * (0.35 - 1.0) * var_INaCa__FonRT));
00804         const double var_INaCa__xkdna = 0.3;
00805         const double var_INaCa__Ca_submem = var_Ca__Ca_submem;
00806         const double var_INaCa__aloss = 1.0 / (1.0 + pow(var_INaCa__xkdna / var_INaCa__Ca_submem, 3.0));
00807         const double var_INaCa__Na_o = var_Environment__Na_o;
00808         const double var_INaCa__Na_i = var_Na__Na_i;
00809         const double var_INaCa__Ca_o = var_Environment__Ca_o;
00810         const double var_Ca__csm = var_Ca__Ca_submem / 1000.0;
00811         const double var_INaCa__csm = var_Ca__csm;
00812         const 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);
00813         const double var_INaCa__xmcao = 1.3;
00814         const double var_INaCa__xmnao = 87.5;
00815         const double var_INaCa__yz1 = (var_INaCa__xmcao * pow(var_INaCa__Na_i, 3.0)) + (pow(var_INaCa__xmnao, 3.0) * var_INaCa__csm);
00816         const double var_INaCa__xmcai = 0.0036;
00817         const double var_INaCa__xmnai = 12.3;
00818         const 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));
00819         const double var_INaCa__yz2 = pow(var_INaCa__xmnai, 3.0) * var_INaCa__Ca_o * (1.0 + (var_INaCa__csm / var_INaCa__xmcai));
00820         const double var_INaCa__zw8 = var_INaCa__yz1 + var_INaCa__yz2 + var_INaCa__yz3 + var_INaCa__yz4;
00821         const 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));
00822         const double var_INaCa__jNaCa = (var_INaCa__gNaCa * var_INaCa__aloss * var_INaCa__zw3) / (var_INaCa__zw4 * var_INaCa__zw8);
00823         const double var_INaCa__wca = var_cell__wca;
00824         const double var_INaCa__xiNaCa = var_INaCa__wca * var_INaCa__jNaCa;
00825         const double var_cell__xiNaCa = var_INaCa__xiNaCa;
00826         const double var_ICaL__Ca_o = var_Environment__Ca_o;
00827         const double var_ICaL__V = var_cell__V;
00828         const double var_ICaL__pca = 0.00054;
00829         const double var_ICaL__FonRT = var_Environment__FonRT;
00830         const double var_ICaL__F = var_Environment__F;
00831         const double var_ICaL__za = var_ICaL__V * 2.0 * var_ICaL__FonRT;
00832         const double var_ICaL__csm = var_Ca__csm;
00833         const 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));
00834         const double var_ICaL__gca = 182.0;
00835         const double var_ICaL__po = (((((1.0 - var_ICaL__xi1ca) - var_ICaL__xi2ca) - var_ICaL__xi1ba) - var_ICaL__xi2ba) - var_ICaL__c1) - var_ICaL__c2;
00836         const double var_ICaL__jca = var_ICaL__gca * var_ICaL__po * var_ICaL__rxa;
00837         const double var_ICaL__wca = var_cell__wca;
00838         const double var_ICaL__xica = 2.0 * var_ICaL__wca * var_ICaL__jca;
00839         const double var_cell__xica = var_ICaL__xica;
00840         const double var_IKr__gkr = 0.0125;
00841         const double var_IKr__K_o = var_Environment__K_o;
00842         const double var_IKr__V = var_cell__V;
00843         const double var_IKr__rg = 1.0 / (1.0 + exp((var_IKr__V + 33.0) / 22.4));
00844         const double var_IKr__ek = var_reversal_potentials__ek;
00845         const double var_IKr__xikr = var_IKr__gkr * sqrt(var_IKr__K_o / 5.4) * var_IKr__xr * var_IKr__rg * (var_IKr__V - var_IKr__ek);
00846         const double var_cell__xikr = var_IKr__xikr;
00847         const double var_IKs__Ca_i = var_Ca__Ca_i;
00848         const double var_IKs__gksx = 1.0 + (0.8 / (1.0 + pow(0.5 / var_IKs__Ca_i, 3.0)));
00849         const double var_IKs__gks = 0.1386;
00850         const double var_IKs__V = var_cell__V;
00851         const double var_reversal_potentials__prNaK = 0.01833;
00852         const double var_reversal_potentials__Na_o = var_Environment__Na_o;
00853         const double var_reversal_potentials__Na_i = var_Na__Na_i;
00854         const 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)));
00855         const double var_IKs__eks = var_reversal_potentials__eks;
00856         const double var_IKs__xiks = var_IKs__gks * var_IKs__gksx * var_IKs__xs1 * var_IKs__xs2 * (var_IKs__V - var_IKs__eks);
00857         const double var_cell__xiks = var_IKs__xiks;
00858 //        const double var_cell__stim_offset = 0.0;
00859 //        const double var_cell__stim_period = 400.0;
00860 //        const double var_cell__past = floor(var_cell__time / var_cell__stim_period) * var_cell__stim_period;
00861 //        const double var_cell__stim_amplitude =  -15.0;
00862 //        const double var_cell__stim_duration = 3.0;
00863         double var_cell__i_Stim = GetStimulus((1.0/1)*var_Environment__time);
00864         const double var_INa__V = var_cell__V;
00865         const double var_INa__gna = 12.0;
00866         const double var_reversal_potentials__ena = (1.0 / var_reversal_potentials__FonRT) * log(var_reversal_potentials__Na_o / var_reversal_potentials__Na_i);
00867         const double var_INa__ena = var_reversal_potentials__ena;
00868         const 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);
00869         const double var_cell__xina = var_INa__xina;
00870         const 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);
00871 
00872         double d_dt_cell__V;
00873 
00874         d_dt_cell__V = var_cell__Itotal;
00875 
00876         rY[0] += mDt * 1.0*d_dt_cell__V;
00877     }
00878 
00879     void BackwardEulerMahajanModel2008::ComputeOneStepExceptVoltage(double var_Environment__time)
00880     {
00881         // Time units: ms
00882         var_Environment__time *= 1.0;
00883         std::vector<double>& rY = rGetStateVariables();
00884         double var_cell__V = rY[0];
00885         // Units: mV; Initial value: -87.169816169406
00886 
00887         const double var_Ito__V = var_cell__V;
00888         const double var_Ito__rt2 = (var_Ito__V + 33.5) / 10.0;
00889         const double var_IKr__V = var_cell__V;
00890         const double var_IKs__V = var_cell__V;
00891         const double var_INa__V = var_cell__V;
00892         const 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;
00893         const double var_INa__bm = 0.08 * exp((-var_INa__V) / 11.0);
00894         const double var_INa__ah = (var_INa__V < (-40.0)) ? (0.135 * exp((80.0 + var_INa__V) / (-6.8))) : 0.0;
00895         const 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)))));
00896         const 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;
00897         const 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))));
00898         const 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);
00899         const 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);
00900         const double var_IKr__taukr = 1.0 / (var_IKr__xkrv1 + var_IKr__xkrv2);
00901         const double var_IKr__xkrinf = 1.0 / (1.0 + exp((-(var_IKr__V + 50.0)) / 7.5));
00902         const double var_IKs__xs1ss = 1.0 / (1.0 + exp((-(var_IKs__V - 1.5)) / 16.7));
00903         const double var_IKs__xs2ss = var_IKs__xs1ss;
00904         const 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))));
00905         const double var_IKs__tauxs2 = 4.0 * var_IKs__tauxs1;
00906         const double var_Ito__rt1 = (-(var_Ito__V + 3.0)) / 15.0;
00907         const double var_Ito__rt3 = (var_Ito__V + 60.0) / 10.0;
00908         const double var_Ito__rt4 = (((-var_Ito__V) / 30.0) * var_Ito__V) / 30.0;
00909         const double var_Ito__rt5 = (var_Ito__V + 33.5) / 10.0;
00910         const double var_Ito__xtos_inf = 1.0 / (1.0 + exp(var_Ito__rt1));
00911         const double var_Ito__ytos_inf = 1.0 / (1.0 + exp(var_Ito__rt2));
00912         const double var_Ito__xtof_inf = var_Ito__xtos_inf;
00913         const double var_Ito__ytof_inf = var_Ito__ytos_inf;
00914         const double var_Ito__txs = (9.0 / (1.0 + exp(-var_Ito__rt1))) + 0.5;
00915         const double var_Ito__tys = (3000.0 / (1.0 + exp(var_Ito__rt3))) + 30.0;
00916         const double var_Ito__txf = (3.5 * exp(var_Ito__rt4)) + 1.5;
00917         const double var_Ito__tyf = (20.0 / (1.0 + exp(var_Ito__rt5))) + 20.0;
00918 
00919         const double _g_0 = var_IKr__xkrinf / var_IKr__taukr;
00920         const double _h_0 = (-1.0) / var_IKr__taukr;
00921         const double _g_1 = var_IKs__xs1ss / var_IKs__tauxs1;
00922         const double _h_1 = (-1.0) / var_IKs__tauxs1;
00923         const double _g_2 = var_IKs__xs2ss / var_IKs__tauxs2;
00924         const double _h_2 = (-1.0) / var_IKs__tauxs2;
00925         const double _g_3 = var_INa__ah * 1.0;
00926         const double _h_3 = (var_INa__ah * (-1.0)) - (var_INa__bh * 1.0);
00927         const double _g_4 = var_INa__aj * 1.0;
00928         const double _h_4 = (var_INa__aj * (-1.0)) - (var_INa__bj * 1.0);
00929         const double _g_5 = var_INa__am * 1.0;
00930         const double _h_5 = (var_INa__am * (-1.0)) - (var_INa__bm * 1.0);
00931         const double _g_6 = var_Ito__xtof_inf / var_Ito__txf;
00932         const double _h_6 = (-1.0) / var_Ito__txf;
00933         const double _g_7 = var_Ito__xtos_inf / var_Ito__txs;
00934         const double _h_7 = (-1.0) / var_Ito__txs;
00935         const double _g_8 = var_Ito__ytof_inf / var_Ito__tyf;
00936         const double _h_8 = (-1.0) / var_Ito__tyf;
00937         const double _g_9 = var_Ito__ytos_inf / var_Ito__tys;
00938         const double _h_9 = (-1.0) / var_Ito__tys;
00939 
00940         const double dt = mDt*1.0;
00941         rY[1] = (rY[1] + _g_5*dt) / (1 - _h_5*dt);
00942         rY[2] = (rY[2] + _g_3*dt) / (1 - _h_3*dt);
00943         rY[3] = (rY[3] + _g_4*dt) / (1 - _h_4*dt);
00944         rY[10] = (rY[10] + _g_0*dt) / (1 - _h_0*dt);
00945         rY[11] = (rY[11] + _g_1*dt) / (1 - _h_1*dt);
00946         rY[12] = (rY[12] + _g_2*dt) / (1 - _h_2*dt);
00947         rY[13] = (rY[13] + _g_7*dt) / (1 - _h_7*dt);
00948         rY[14] = (rY[14] + _g_9*dt) / (1 - _h_9*dt);
00949         rY[15] = (rY[15] + _g_6*dt) / (1 - _h_6*dt);
00950         rY[16] = (rY[16] + _g_8*dt) / (1 - _h_8*dt);
00951 
00952         double _guess[15] = {rY[23],rY[20],rY[22],rY[21],rY[24],rY[25],rY[4],rY[5],rY[7],rY[6],rY[9],rY[8],rY[17],rY[18],rY[19]};
00953         CardiacNewtonSolver<15> *_solver = CardiacNewtonSolver<15>::Instance();
00954         _solver->Solve(*this, var_Environment__time, _guess);
00955         rY[23] = _guess[0];
00956         rY[20] = _guess[1];
00957         rY[22] = _guess[2];
00958         rY[21] = _guess[3];
00959         rY[24] = _guess[4];
00960         rY[25] = _guess[5];
00961         rY[4] = _guess[6];
00962         rY[5] = _guess[7];
00963         rY[7] = _guess[8];
00964         rY[6] = _guess[9];
00965         rY[9] = _guess[10];
00966         rY[8] = _guess[11];
00967         rY[17] = _guess[12];
00968         rY[18] = _guess[13];
00969         rY[19] = _guess[14];
00970     }
00971 
00972 template<>
00973 void OdeSystemInformation<BackwardEulerMahajanModel2008>::Initialise(void)
00974 {
00975     // Time units: ms
00976     //
00977     this->mVariableNames.push_back("V");
00978     this->mVariableUnits.push_back("mV");
00979     this->mInitialConditions.push_back(-87.169816169406);
00980 
00981     this->mVariableNames.push_back("xm");
00982     this->mVariableUnits.push_back("dimensionless");
00983     this->mInitialConditions.push_back(0.001075453357);
00984 
00985     this->mVariableNames.push_back("xh");
00986     this->mVariableUnits.push_back("dimensionless");
00987     this->mInitialConditions.push_back(0.990691306716);
00988 
00989     this->mVariableNames.push_back("xj");
00990     this->mVariableUnits.push_back("dimensionless");
00991     this->mInitialConditions.push_back(0.993888937283);
00992 
00993     this->mVariableNames.push_back("c1");
00994     this->mVariableUnits.push_back("dimensionless");
00995     this->mInitialConditions.push_back(0.000018211252);
00996 
00997     this->mVariableNames.push_back("c2");
00998     this->mVariableUnits.push_back("dimensionless");
00999     this->mInitialConditions.push_back(0.979322592773);
01000 
01001     this->mVariableNames.push_back("xi1ca");
01002     this->mVariableUnits.push_back("dimensionless");
01003     this->mInitialConditions.push_back(0.001208153482);
01004 
01005     this->mVariableNames.push_back("xi1ba");
01006     this->mVariableUnits.push_back("dimensionless");
01007     this->mInitialConditions.push_back(0.000033616596);
01008 
01009     this->mVariableNames.push_back("xi2ca");
01010     this->mVariableUnits.push_back("dimensionless");
01011     this->mInitialConditions.push_back(0.004173008466);
01012 
01013     this->mVariableNames.push_back("xi2ba");
01014     this->mVariableUnits.push_back("dimensionless");
01015     this->mInitialConditions.push_back(0.015242594688);
01016 
01017     this->mVariableNames.push_back("xr");
01018     this->mVariableUnits.push_back("dimensionless");
01019     this->mInitialConditions.push_back(0.007074239331);
01020 
01021     this->mVariableNames.push_back("xs1");
01022     this->mVariableUnits.push_back("dimensionless");
01023     this->mInitialConditions.push_back(0.048267587131);
01024 
01025     this->mVariableNames.push_back("xs2");
01026     this->mVariableUnits.push_back("dimensionless");
01027     this->mInitialConditions.push_back(0.105468807033);
01028 
01029     this->mVariableNames.push_back("xtos");
01030     this->mVariableUnits.push_back("dimensionless");
01031     this->mInitialConditions.push_back(0.00364776906);
01032 
01033     this->mVariableNames.push_back("ytos");
01034     this->mVariableUnits.push_back("dimensionless");
01035     this->mInitialConditions.push_back(0.174403618112);
01036 
01037     this->mVariableNames.push_back("xtof");
01038     this->mVariableUnits.push_back("dimensionless");
01039     this->mInitialConditions.push_back(0.003643592594);
01040 
01041     this->mVariableNames.push_back("ytof");
01042     this->mVariableUnits.push_back("dimensionless");
01043     this->mInitialConditions.push_back(0.993331326442);
01044 
01045     this->mVariableNames.push_back("Ca_JSR");
01046     this->mVariableUnits.push_back("uM");
01047     this->mInitialConditions.push_back(97.505463697266);
01048 
01049     this->mVariableNames.push_back("xir");
01050     this->mVariableUnits.push_back("uM_per_ms");
01051     this->mInitialConditions.push_back(0.006679257264);
01052 
01053     this->mVariableNames.push_back("Na_i");
01054     this->mVariableUnits.push_back("mM");
01055     this->mInitialConditions.push_back(11.441712311614);
01056 
01057     this->mVariableNames.push_back("Ca_dyad");
01058     this->mVariableUnits.push_back("uM");
01059     this->mInitialConditions.push_back(1.716573130685);
01060 
01061     this->mVariableNames.push_back("Ca_submem");
01062     this->mVariableUnits.push_back("uM");
01063     this->mInitialConditions.push_back(0.226941113355);
01064 
01065     this->mVariableNames.push_back("Ca_i");
01066     this->mVariableUnits.push_back("uM");
01067     this->mInitialConditions.push_back(0.256752008084);
01068 
01069     this->mVariableNames.push_back("Ca_NSR");
01070     this->mVariableUnits.push_back("uM");
01071     this->mInitialConditions.push_back(104.450004990523);
01072 
01073     this->mVariableNames.push_back("tropi");
01074     this->mVariableUnits.push_back("uM");
01075     this->mInitialConditions.push_back(22.171689894953);
01076 
01077     this->mVariableNames.push_back("trops");
01078     this->mVariableUnits.push_back("uM");
01079     this->mInitialConditions.push_back(19.864701949854);
01080 
01081     this->mInitialised = true;
01082 }
01083 
01084 
01085 // Serialization for Boost >= 1.36
01086 #include "SerializationExportWrapperForCpp.hpp"
01087 CHASTE_CLASS_EXPORT(BackwardEulerMahajanModel2008)

Generated by  doxygen 1.6.2