00001 #ifndef _CML_noble_varghese_kohl_noble_1998_basic_backward_
00002 #define _CML_noble_varghese_kohl_noble_1998_basic_backward_
00003
00015 #include <boost/serialization/access.hpp>
00016 #include <boost/serialization/base_object.hpp>
00017 #include <cmath>
00018 #include <cassert>
00019 #include "AbstractBackwardEulerCardiacCell.hpp"
00020 #include "CardiacNewtonSolver.hpp"
00021 #include "Exception.hpp"
00022 #include "AbstractStimulusFunction.hpp"
00023 #include "OdeSystemInformation.hpp"
00024
00025
00026 #include <boost/serialization/export.hpp>
00027
00028 class BackwardEulerNobleVargheseKohlNoble1998 : public AbstractBackwardEulerCardiacCell<12>
00029 {
00030 friend class TestFastSlowBackwardEulerNoble98;
00031
00032 private:
00034 friend class boost::serialization::access;
00041 template<class Archive>
00042 void serialize(Archive & archive, const unsigned int version)
00043 {
00044
00045 archive & boost::serialization::base_object<AbstractBackwardEulerCardiacCell<12> >(*this);
00046 }
00047 public:
00048 BackwardEulerNobleVargheseKohlNoble1998(boost::shared_ptr<AbstractIvpOdeSolver> ,
00049 boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
00050 : AbstractBackwardEulerCardiacCell<12>(22, 0, pIntracellularStimulus)
00051 {
00052 MakeVars();
00053 }
00054
00055
00056 BackwardEulerNobleVargheseKohlNoble1998(boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
00057 : AbstractBackwardEulerCardiacCell<12>(22, 0, pIntracellularStimulus)
00058 {
00059 MakeVars();
00060 }
00061
00062 private:
00063 void MakeVars()
00064 {
00065 mpSystemInfo = OdeSystemInformation<BackwardEulerNobleVargheseKohlNoble1998>::Instance();
00066 Init();
00067
00068 }
00069 public:
00070 ~BackwardEulerNobleVargheseKohlNoble1998(void)
00071 {
00072 }
00073
00074 void VerifyGatingVariables()
00075 {
00076
00077
00078
00079 assert(rGetStateVariables()[1]>=0);
00080 assert(rGetStateVariables()[1]<=1);
00081
00082 assert(rGetStateVariables()[2]>=0);
00083 assert(rGetStateVariables()[2]<=1);
00084
00085 assert(rGetStateVariables()[3]>=0);
00086 assert(rGetStateVariables()[3]<=1);
00087
00088 assert(rGetStateVariables()[4]>=0);
00089 assert(rGetStateVariables()[4]<=1);
00090
00091 assert(rGetStateVariables()[5]>=0);
00092 assert(rGetStateVariables()[5]<=1);
00093
00094 assert(rGetStateVariables()[6]>=0);
00095 assert(rGetStateVariables()[6]<=1);
00096
00097 assert(rGetStateVariables()[7]>=0);
00098 assert(rGetStateVariables()[7]<=1);
00099
00100 assert(rGetStateVariables()[10]>=0);
00101 assert(rGetStateVariables()[10]<=1);
00102
00103 assert(rGetStateVariables()[11]>=0);
00104 assert(rGetStateVariables()[11]<=1);
00105
00106 }
00107
00108 void VerifyStateVariables()
00109 {
00110 VerifyGatingVariables();
00111
00112
00113
00114
00115 assert(rGetStateVariables()[14]>=0);
00116 assert(rGetStateVariables()[15]>=0);
00117 assert(rGetStateVariables()[16]>=0);
00118
00119
00120 #define COVERAGE_IGNORE
00121 if (rGetStateVariables()[17]<=0)
00122 {
00123 std::cout<<"Warning a Calcium-related concentration is negative: "<<rGetStateVariables()[17]<<"\n";
00124
00125 }
00126 #undef COVERAGE_IGNORE
00127 assert(rGetStateVariables()[18]>=0);
00128 assert(rGetStateVariables()[19]>=0);
00129 assert(rGetStateVariables()[20]>=0);
00130 assert(rGetStateVariables()[21]>=0);
00131 }
00132
00133
00134
00135 double GetIIonic()
00136 {
00137 std::vector<double>& rY = rGetStateVariables();
00138 double var_membrane__V = rY[0];
00139
00140 double var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = rY[1];
00141
00142 double var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = rY[2];
00143
00144 double var_slow_delayed_rectifier_potassium_current_xs_gate__xs = rY[3];
00145
00146 double var_fast_sodium_current_m_gate__m = rY[4];
00147
00148 double var_fast_sodium_current_h_gate__h = rY[5];
00149
00150 double var_L_type_Ca_channel_d_gate__d = rY[6];
00151
00152 double var_L_type_Ca_channel_f_gate__f = rY[7];
00153
00154 double var_L_type_Ca_channel_f2_gate__f2 = rY[8];
00155
00156 double var_L_type_Ca_channel_f2ds_gate__f2ds = rY[9];
00157
00158 double var_transient_outward_current_s_gate__s = rY[10];
00159
00160 double var_transient_outward_current_r_gate__r = rY[11];
00161
00162 double var_intracellular_sodium_concentration__Na_i = rY[14];
00163
00164 double var_intracellular_potassium_concentration__K_i = rY[15];
00165
00166 double var_intracellular_calcium_concentration__Ca_i = rY[16];
00167
00168 double var_intracellular_calcium_concentration__Ca_ds = rY[17];
00169
00170
00171 const double var_membrane__R = 8314.472;
00172 const double var_membrane__T = 310.0;
00173 const double var_membrane__F = 96485.3415;
00174 double var_reversal_potentials__K_i = var_intracellular_potassium_concentration__K_i;
00175 double var_reversal_potentials__R = var_membrane__R;
00176 double var_reversal_potentials__T = var_membrane__T;
00177 double var_reversal_potentials__F = var_membrane__F;
00178 const double var_extracellular_potassium_concentration__K_o = 4.0;
00179 double var_reversal_potentials__K_o = var_extracellular_potassium_concentration__K_o;
00180 double var_reversal_potentials__E_K = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log(var_reversal_potentials__K_o / var_reversal_potentials__K_i);
00181 double var_time_independent_potassium_current__E_K = var_reversal_potentials__E_K;
00182 double var_time_independent_potassium_current__K_o = var_extracellular_potassium_concentration__K_o;
00183 double var_time_independent_potassium_current__R = var_membrane__R;
00184 double var_time_independent_potassium_current__V = var_membrane__V;
00185 double var_time_independent_potassium_current__T = var_membrane__T;
00186 const double var_time_independent_potassium_current__K_mk1 = 10.0;
00187 const double var_time_independent_potassium_current__g_K1 = 0.5;
00188 double var_time_independent_potassium_current__F = var_membrane__F;
00189 double var_time_independent_potassium_current__i_K1 = (((var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K_o) / (var_time_independent_potassium_current__K_o + var_time_independent_potassium_current__K_mk1)) * (var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K)) / (1.0 + exp((((var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K) - 10.0) * var_time_independent_potassium_current__F * 1.25) / (var_time_independent_potassium_current__R * var_time_independent_potassium_current__T)));
00190 double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00191 double var_transient_outward_current__s = var_transient_outward_current_s_gate__s;
00192 double var_transient_outward_current__r = var_transient_outward_current_r_gate__r;
00193 const double var_transient_outward_current__g_to = 0.005;
00194 double var_transient_outward_current__V = var_membrane__V;
00195 double var_transient_outward_current__E_K = var_reversal_potentials__E_K;
00196 const double var_transient_outward_current__g_tos = 0.0;
00197 double var_transient_outward_current__i_to = var_transient_outward_current__g_to * (var_transient_outward_current__g_tos + (var_transient_outward_current__s * (1.0 - var_transient_outward_current__g_tos))) * var_transient_outward_current__r * (var_transient_outward_current__V - var_transient_outward_current__E_K);
00198 double var_membrane__i_to = var_transient_outward_current__i_to;
00199 const double var_rapid_delayed_rectifier_potassium_current__g_Kr2 = 0.0013;
00200 const double var_rapid_delayed_rectifier_potassium_current__g_Kr1 = 0.0021;
00201 double var_rapid_delayed_rectifier_potassium_current__xr1 = var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1;
00202 double var_rapid_delayed_rectifier_potassium_current__xr2 = var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2;
00203 double var_rapid_delayed_rectifier_potassium_current__V = var_membrane__V;
00204 double var_rapid_delayed_rectifier_potassium_current__E_K = var_reversal_potentials__E_K;
00205 double var_rapid_delayed_rectifier_potassium_current__i_Kr = ((((var_rapid_delayed_rectifier_potassium_current__g_Kr1 * var_rapid_delayed_rectifier_potassium_current__xr1) + (var_rapid_delayed_rectifier_potassium_current__g_Kr2 * var_rapid_delayed_rectifier_potassium_current__xr2)) * 1.0) / (1.0 + exp((var_rapid_delayed_rectifier_potassium_current__V + 9.0) / 22.4))) * (var_rapid_delayed_rectifier_potassium_current__V - var_rapid_delayed_rectifier_potassium_current__E_K);
00206 double var_membrane__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00207 double var_slow_delayed_rectifier_potassium_current__xs = var_slow_delayed_rectifier_potassium_current_xs_gate__xs;
00208 const double var_extracellular_sodium_concentration__Na_o = 140.0;
00209 double var_reversal_potentials__Na_o = var_extracellular_sodium_concentration__Na_o;
00210 double var_reversal_potentials__Na_i = var_intracellular_sodium_concentration__Na_i;
00211 const double var_reversal_potentials__P_kna = 0.03;
00212 double var_reversal_potentials__E_Ks = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log((var_reversal_potentials__K_o + (var_reversal_potentials__P_kna * var_reversal_potentials__Na_o)) / (var_reversal_potentials__K_i + (var_reversal_potentials__P_kna * var_reversal_potentials__Na_i)));
00213 double var_slow_delayed_rectifier_potassium_current__E_Ks = var_reversal_potentials__E_Ks;
00214 const double var_slow_delayed_rectifier_potassium_current__g_Ks = 0.0026;
00215 double var_slow_delayed_rectifier_potassium_current__V = var_membrane__V;
00216 double var_slow_delayed_rectifier_potassium_current__i_Ks = var_slow_delayed_rectifier_potassium_current__g_Ks * pow(var_slow_delayed_rectifier_potassium_current__xs, 2.0) * (var_slow_delayed_rectifier_potassium_current__V - var_slow_delayed_rectifier_potassium_current__E_Ks);
00217 double var_membrane__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00218 double var_L_type_Ca_channel__d = var_L_type_Ca_channel_d_gate__d;
00219 const double var_L_type_Ca_channel__FrICa = 1.0;
00220 double var_L_type_Ca_channel__f = var_L_type_Ca_channel_f_gate__f;
00221 double var_L_type_Ca_channel__K_o = var_extracellular_potassium_concentration__K_o;
00222 double var_L_type_Ca_channel__K_i = var_intracellular_potassium_concentration__K_i;
00223 double var_L_type_Ca_channel__F = var_membrane__F;
00224 const double var_L_type_Ca_channel__P_Ca_L = 0.1;
00225 double var_L_type_Ca_channel__T = var_membrane__T;
00226 const double var_L_type_Ca_channel__P_CaK = 0.002;
00227 double var_L_type_Ca_channel__V = var_membrane__V;
00228 double var_L_type_Ca_channel__f2 = var_L_type_Ca_channel_f2_gate__f2;
00229 double var_L_type_Ca_channel__R = var_membrane__R;
00230 double var_L_type_Ca_channel__i_Ca_L_K_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaK * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__K_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__K_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00231 double var_membrane__i_Ca_L_K_cyt = var_L_type_Ca_channel__i_Ca_L_K_cyt;
00232 double var_L_type_Ca_channel__f2ds = var_L_type_Ca_channel_f2ds_gate__f2ds;
00233 double var_L_type_Ca_channel__i_Ca_L_K_ds = (((var_L_type_Ca_channel__FrICa * var_L_type_Ca_channel__P_CaK * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__K_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__K_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00234 double var_membrane__i_Ca_L_K_ds = var_L_type_Ca_channel__i_Ca_L_K_ds;
00235 const double var_sodium_potassium_pump__i_NaK_max = 0.7;
00236 double var_sodium_potassium_pump__Na_i = var_intracellular_sodium_concentration__Na_i;
00237 double var_sodium_potassium_pump__K_o = var_extracellular_potassium_concentration__K_o;
00238 const double var_sodium_potassium_pump__K_mNa = 40.0;
00239 const double var_sodium_potassium_pump__K_mK = 1.0;
00240 double var_sodium_potassium_pump__i_NaK = (((var_sodium_potassium_pump__i_NaK_max * var_sodium_potassium_pump__K_o) / (var_sodium_potassium_pump__K_mK + var_sodium_potassium_pump__K_o)) * var_sodium_potassium_pump__Na_i) / (var_sodium_potassium_pump__K_mNa + var_sodium_potassium_pump__Na_i);
00241 double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00242 const double var_fast_sodium_current__g_Na = 2.5;
00243 double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
00244 double var_fast_sodium_current__V = var_membrane__V;
00245 double var_reversal_potentials__E_mh = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log((var_reversal_potentials__Na_o + (0.12 * var_reversal_potentials__K_o)) / (var_reversal_potentials__Na_i + (0.12 * var_reversal_potentials__K_i)));
00246 double var_fast_sodium_current__E_mh = var_reversal_potentials__E_mh;
00247 double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
00248 double var_fast_sodium_current__i_Na = var_fast_sodium_current__g_Na * pow(var_fast_sodium_current__m, 3.0) * var_fast_sodium_current__h * (var_fast_sodium_current__V - var_fast_sodium_current__E_mh);
00249 double var_membrane__i_Na = var_fast_sodium_current__i_Na;
00250 double var_sodium_background_current__V = var_membrane__V;
00251 double var_reversal_potentials__E_Na = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log(var_reversal_potentials__Na_o / var_reversal_potentials__Na_i);
00252 double var_sodium_background_current__E_Na = var_reversal_potentials__E_Na;
00253 const double var_sodium_background_current__g_bna = 0.0006;
00254 double var_sodium_background_current__i_b_Na = var_sodium_background_current__g_bna * (var_sodium_background_current__V - var_sodium_background_current__E_Na);
00255 double var_membrane__i_b_Na = var_sodium_background_current__i_b_Na;
00256 const double var_persistent_sodium_current__g_pna = 0.004;
00257 double var_persistent_sodium_current__V = var_membrane__V;
00258 double var_persistent_sodium_current__E_Na = var_reversal_potentials__E_Na;
00259 double var_persistent_sodium_current__i_p_Na = ((var_persistent_sodium_current__g_pna * 1.0) / (1.0 + exp((-(var_persistent_sodium_current__V + 52.0)) / 8.0))) * (var_persistent_sodium_current__V - var_persistent_sodium_current__E_Na);
00260 double var_membrane__i_p_Na = var_persistent_sodium_current__i_p_Na;
00261 const double var_L_type_Ca_channel__P_CaNa = 0.01;
00262 double var_L_type_Ca_channel__Na_o = var_extracellular_sodium_concentration__Na_o;
00263 double var_L_type_Ca_channel__Na_i = var_intracellular_sodium_concentration__Na_i;
00264 double var_L_type_Ca_channel__i_Ca_L_Na_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaNa * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Na_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Na_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00265 double var_membrane__i_Ca_L_Na_cyt = var_L_type_Ca_channel__i_Ca_L_Na_cyt;
00266 double var_L_type_Ca_channel__i_Ca_L_Na_ds = (((var_L_type_Ca_channel__FrICa * var_L_type_Ca_channel__P_CaNa * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Na_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Na_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00267 double var_membrane__i_Ca_L_Na_ds = var_L_type_Ca_channel__i_Ca_L_Na_ds;
00268 double var_sodium_calcium_exchanger__Na_i = var_intracellular_sodium_concentration__Na_i;
00269 const double var_sodium_calcium_exchanger__n_NaCa = 3.0;
00270 const double var_sodium_calcium_exchanger__gamma = 0.5;
00271 double var_sodium_calcium_exchanger__F = var_membrane__F;
00272 double var_sodium_calcium_exchanger__Na_o = var_extracellular_sodium_concentration__Na_o;
00273 const double var_sodium_calcium_exchanger__FRiNaCa = 0.001;
00274 double var_sodium_calcium_exchanger__R = var_membrane__R;
00275 double var_sodium_calcium_exchanger__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00276 double var_sodium_calcium_exchanger__T = var_membrane__T;
00277 double var_sodium_calcium_exchanger__V = var_membrane__V;
00278 const double var_sodium_calcium_exchanger__d_NaCa = 0.0;
00279 const double var_extracellular_calcium_concentration__Ca_o = 2.0;
00280 double var_sodium_calcium_exchanger__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00281 const double var_sodium_calcium_exchanger__k_NaCa = 0.0005;
00282 double var_sodium_calcium_exchanger__i_NaCa_cyt = ((1.0 - var_sodium_calcium_exchanger__FRiNaCa) * var_sodium_calcium_exchanger__k_NaCa * ((exp((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_o) - (exp(((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_i))) / ((1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_sodium_calcium_exchanger__Ca_i * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_sodium_calcium_exchanger__Ca_o * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa))))) * (1.0 + (var_sodium_calcium_exchanger__Ca_i / 0.0069)));
00283 double var_membrane__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
00284 double var_sodium_calcium_exchanger__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
00285 double var_sodium_calcium_exchanger__i_NaCa_ds = (var_sodium_calcium_exchanger__FRiNaCa * var_sodium_calcium_exchanger__k_NaCa * ((exp((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_o) - (exp(((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_ds))) / ((1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_sodium_calcium_exchanger__Ca_ds * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_sodium_calcium_exchanger__Ca_o * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa))))) * (1.0 + (var_sodium_calcium_exchanger__Ca_ds / 0.0069)));
00286 double var_membrane__i_NaCa_ds = var_sodium_calcium_exchanger__i_NaCa_ds;
00287 double var_L_type_Ca_channel__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00288 double var_L_type_Ca_channel__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00289 double var_L_type_Ca_channel__i_Ca_L_Ca_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * 4.0 * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Ca_i * exp((100.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Ca_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00290 double var_membrane__i_Ca_L_Ca_cyt = var_L_type_Ca_channel__i_Ca_L_Ca_cyt;
00291 double var_L_type_Ca_channel__i_Ca_L_Ca_ds = (((var_L_type_Ca_channel__FrICa * 4.0 * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Ca_i * exp((100.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Ca_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00292 double var_membrane__i_Ca_L_Ca_ds = var_L_type_Ca_channel__i_Ca_L_Ca_ds;
00293 double var_reversal_potentials__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00294 double var_reversal_potentials__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00295 double var_reversal_potentials__E_Ca = ((0.5 * var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log(var_reversal_potentials__Ca_o / var_reversal_potentials__Ca_i);
00296 double var_calcium_background_current__E_Ca = var_reversal_potentials__E_Ca;
00297 const double var_calcium_background_current__g_bca = 0.00025;
00298 double var_calcium_background_current__V = var_membrane__V;
00299 double var_calcium_background_current__i_b_Ca = var_calcium_background_current__g_bca * (var_calcium_background_current__V - var_calcium_background_current__E_Ca);
00300 double var_membrane__i_b_Ca = var_calcium_background_current__i_b_Ca;
00301
00312 double value_in_nA = var_membrane__i_K1+var_membrane__i_to+var_membrane__i_Kr+var_membrane__i_Ks+var_membrane__i_Ca_L_K_cyt+var_membrane__i_Ca_L_K_ds+var_membrane__i_NaK+var_membrane__i_Na+var_membrane__i_b_Na+var_membrane__i_p_Na+var_membrane__i_Ca_L_Na_cyt+var_membrane__i_Ca_L_Na_ds+var_membrane__i_NaCa_cyt+var_membrane__i_NaCa_ds+var_membrane__i_Ca_L_Ca_cyt+var_membrane__i_Ca_L_Ca_ds+var_membrane__i_b_Ca;
00313 double value_in_microA = 0.001*value_in_nA;
00314 double value_in_microA_per_cm_squared = value_in_microA/0.000095;
00315 return value_in_microA_per_cm_squared;
00316 }
00317
00318 void ComputeResidual(const double rCurrentGuess[12], double rResidual[12])
00319 {
00320 std::vector<double>& rY = rGetStateVariables();
00321 double var_membrane__V = rY[0];
00322
00323 double var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = rY[1];
00324
00325 double var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = rY[2];
00326
00327 double var_slow_delayed_rectifier_potassium_current_xs_gate__xs = rY[3];
00328
00329 double var_fast_sodium_current_m_gate__m = rY[4];
00330
00331 double var_fast_sodium_current_h_gate__h = rY[5];
00332
00333 double var_L_type_Ca_channel_d_gate__d = rY[6];
00334
00335 double var_L_type_Ca_channel_f_gate__f = rY[7];
00336
00337 double var_transient_outward_current_s_gate__s = rY[10];
00338
00339 double var_transient_outward_current_r_gate__r = rY[11];
00340
00341
00342 double var_L_type_Ca_channel_f2_gate__f2 = rCurrentGuess[0];
00343 double var_L_type_Ca_channel_f2ds_gate__f2ds = rCurrentGuess[1];
00344 double var_calcium_release__ActFrac = rCurrentGuess[2];
00345 double var_calcium_release__ProdFrac = rCurrentGuess[3];
00346 double var_intracellular_calcium_concentration__Ca_Calmod = rCurrentGuess[4];
00347 double var_intracellular_calcium_concentration__Ca_Trop = rCurrentGuess[5];
00348 double var_intracellular_calcium_concentration__Ca_ds = rCurrentGuess[6];
00349 double var_intracellular_calcium_concentration__Ca_i = rCurrentGuess[7];
00350 double var_intracellular_calcium_concentration__Ca_rel = rCurrentGuess[8];
00351 double var_intracellular_calcium_concentration__Ca_up = rCurrentGuess[9];
00352 double var_intracellular_potassium_concentration__K_i = rCurrentGuess[10];
00353 double var_intracellular_sodium_concentration__Na_i = rCurrentGuess[11];
00354
00355 const double var_membrane__R = 8314.472;
00356 const double var_membrane__T = 310.0;
00357 const double var_membrane__F = 96485.3415;
00358 double var_reversal_potentials__K_i = var_intracellular_potassium_concentration__K_i;
00359 double var_reversal_potentials__R = var_membrane__R;
00360 double var_reversal_potentials__T = var_membrane__T;
00361 double var_reversal_potentials__F = var_membrane__F;
00362 const double var_extracellular_potassium_concentration__K_o = 4.0;
00363 double var_reversal_potentials__K_o = var_extracellular_potassium_concentration__K_o;
00364 double var_reversal_potentials__E_K = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log(var_reversal_potentials__K_o / var_reversal_potentials__K_i);
00365 double var_time_independent_potassium_current__E_K = var_reversal_potentials__E_K;
00366 double var_time_independent_potassium_current__K_o = var_extracellular_potassium_concentration__K_o;
00367 double var_time_independent_potassium_current__R = var_membrane__R;
00368 double var_time_independent_potassium_current__V = var_membrane__V;
00369 double var_time_independent_potassium_current__T = var_membrane__T;
00370 const double var_time_independent_potassium_current__K_mk1 = 10.0;
00371 const double var_time_independent_potassium_current__g_K1 = 0.5;
00372 double var_time_independent_potassium_current__F = var_membrane__F;
00373 double var_time_independent_potassium_current__i_K1 = (((var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K_o) / (var_time_independent_potassium_current__K_o + var_time_independent_potassium_current__K_mk1)) * (var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K)) / (1.0 + exp((((var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K) - 10.0) * var_time_independent_potassium_current__F * 1.25) / (var_time_independent_potassium_current__R * var_time_independent_potassium_current__T)));
00374 double var_transient_outward_current__s = var_transient_outward_current_s_gate__s;
00375 double var_transient_outward_current__r = var_transient_outward_current_r_gate__r;
00376 const double var_transient_outward_current__g_to = 0.005;
00377 double var_transient_outward_current__V = var_membrane__V;
00378 double var_transient_outward_current__E_K = var_reversal_potentials__E_K;
00379 const double var_transient_outward_current__g_tos = 0.0;
00380 double var_transient_outward_current__i_to = var_transient_outward_current__g_to * (var_transient_outward_current__g_tos + (var_transient_outward_current__s * (1.0 - var_transient_outward_current__g_tos))) * var_transient_outward_current__r * (var_transient_outward_current__V - var_transient_outward_current__E_K);
00381 const double var_rapid_delayed_rectifier_potassium_current__g_Kr2 = 0.0013;
00382 const double var_rapid_delayed_rectifier_potassium_current__g_Kr1 = 0.0021;
00383 double var_rapid_delayed_rectifier_potassium_current__xr1 = var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1;
00384 double var_rapid_delayed_rectifier_potassium_current__xr2 = var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2;
00385 double var_rapid_delayed_rectifier_potassium_current__V = var_membrane__V;
00386 double var_rapid_delayed_rectifier_potassium_current__E_K = var_reversal_potentials__E_K;
00387 double var_rapid_delayed_rectifier_potassium_current__i_Kr = ((((var_rapid_delayed_rectifier_potassium_current__g_Kr1 * var_rapid_delayed_rectifier_potassium_current__xr1) + (var_rapid_delayed_rectifier_potassium_current__g_Kr2 * var_rapid_delayed_rectifier_potassium_current__xr2)) * 1.0) / (1.0 + exp((var_rapid_delayed_rectifier_potassium_current__V + 9.0) / 22.4))) * (var_rapid_delayed_rectifier_potassium_current__V - var_rapid_delayed_rectifier_potassium_current__E_K);
00388 double var_slow_delayed_rectifier_potassium_current__xs = var_slow_delayed_rectifier_potassium_current_xs_gate__xs;
00389 const double var_extracellular_sodium_concentration__Na_o = 140.0;
00390 double var_reversal_potentials__Na_o = var_extracellular_sodium_concentration__Na_o;
00391 double var_reversal_potentials__Na_i = var_intracellular_sodium_concentration__Na_i;
00392 const double var_reversal_potentials__P_kna = 0.03;
00393 double var_reversal_potentials__E_Ks = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log((var_reversal_potentials__K_o + (var_reversal_potentials__P_kna * var_reversal_potentials__Na_o)) / (var_reversal_potentials__K_i + (var_reversal_potentials__P_kna * var_reversal_potentials__Na_i)));
00394 double var_slow_delayed_rectifier_potassium_current__E_Ks = var_reversal_potentials__E_Ks;
00395 const double var_slow_delayed_rectifier_potassium_current__g_Ks = 0.0026;
00396 double var_slow_delayed_rectifier_potassium_current__V = var_membrane__V;
00397 double var_slow_delayed_rectifier_potassium_current__i_Ks = var_slow_delayed_rectifier_potassium_current__g_Ks * pow(var_slow_delayed_rectifier_potassium_current__xs, 2.0) * (var_slow_delayed_rectifier_potassium_current__V - var_slow_delayed_rectifier_potassium_current__E_Ks);
00398 double var_L_type_Ca_channel__d = var_L_type_Ca_channel_d_gate__d;
00399 const double var_L_type_Ca_channel__FrICa = 1.0;
00400 double var_L_type_Ca_channel__f = var_L_type_Ca_channel_f_gate__f;
00401 double var_L_type_Ca_channel__K_o = var_extracellular_potassium_concentration__K_o;
00402 double var_L_type_Ca_channel__K_i = var_intracellular_potassium_concentration__K_i;
00403 double var_L_type_Ca_channel__F = var_membrane__F;
00404 const double var_L_type_Ca_channel__P_Ca_L = 0.1;
00405 double var_L_type_Ca_channel__T = var_membrane__T;
00406 const double var_L_type_Ca_channel__P_CaK = 0.002;
00407 double var_L_type_Ca_channel__V = var_membrane__V;
00408 double var_L_type_Ca_channel__f2 = var_L_type_Ca_channel_f2_gate__f2;
00409 double var_L_type_Ca_channel__R = var_membrane__R;
00410 double var_L_type_Ca_channel__i_Ca_L_K_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaK * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__K_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__K_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00411 double var_L_type_Ca_channel__f2ds = var_L_type_Ca_channel_f2ds_gate__f2ds;
00412 double var_L_type_Ca_channel__i_Ca_L_K_ds = (((var_L_type_Ca_channel__FrICa * var_L_type_Ca_channel__P_CaK * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__K_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__K_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00413 const double var_sodium_potassium_pump__i_NaK_max = 0.7;
00414 double var_sodium_potassium_pump__Na_i = var_intracellular_sodium_concentration__Na_i;
00415 double var_sodium_potassium_pump__K_o = var_extracellular_potassium_concentration__K_o;
00416 const double var_sodium_potassium_pump__K_mNa = 40.0;
00417 const double var_sodium_potassium_pump__K_mK = 1.0;
00418 double var_sodium_potassium_pump__i_NaK = (((var_sodium_potassium_pump__i_NaK_max * var_sodium_potassium_pump__K_o) / (var_sodium_potassium_pump__K_mK + var_sodium_potassium_pump__K_o)) * var_sodium_potassium_pump__Na_i) / (var_sodium_potassium_pump__K_mNa + var_sodium_potassium_pump__Na_i);
00419 const double var_fast_sodium_current__g_Na = 2.5;
00420 double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
00421 double var_fast_sodium_current__V = var_membrane__V;
00422 double var_reversal_potentials__E_mh = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log((var_reversal_potentials__Na_o + (0.12 * var_reversal_potentials__K_o)) / (var_reversal_potentials__Na_i + (0.12 * var_reversal_potentials__K_i)));
00423 double var_fast_sodium_current__E_mh = var_reversal_potentials__E_mh;
00424 double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
00425 double var_fast_sodium_current__i_Na = var_fast_sodium_current__g_Na * pow(var_fast_sodium_current__m, 3.0) * var_fast_sodium_current__h * (var_fast_sodium_current__V - var_fast_sodium_current__E_mh);
00426 double var_sodium_background_current__V = var_membrane__V;
00427 double var_reversal_potentials__E_Na = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log(var_reversal_potentials__Na_o / var_reversal_potentials__Na_i);
00428 double var_sodium_background_current__E_Na = var_reversal_potentials__E_Na;
00429 const double var_sodium_background_current__g_bna = 0.0006;
00430 double var_sodium_background_current__i_b_Na = var_sodium_background_current__g_bna * (var_sodium_background_current__V - var_sodium_background_current__E_Na);
00431 const double var_persistent_sodium_current__g_pna = 0.004;
00432 double var_persistent_sodium_current__V = var_membrane__V;
00433 double var_persistent_sodium_current__E_Na = var_reversal_potentials__E_Na;
00434 double var_persistent_sodium_current__i_p_Na = ((var_persistent_sodium_current__g_pna * 1.0) / (1.0 + exp((-(var_persistent_sodium_current__V + 52.0)) / 8.0))) * (var_persistent_sodium_current__V - var_persistent_sodium_current__E_Na);
00435 const double var_L_type_Ca_channel__P_CaNa = 0.01;
00436 double var_L_type_Ca_channel__Na_o = var_extracellular_sodium_concentration__Na_o;
00437 double var_L_type_Ca_channel__Na_i = var_intracellular_sodium_concentration__Na_i;
00438 double var_L_type_Ca_channel__i_Ca_L_Na_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaNa * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Na_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Na_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00439 double var_L_type_Ca_channel__i_Ca_L_Na_ds = (((var_L_type_Ca_channel__FrICa * var_L_type_Ca_channel__P_CaNa * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Na_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Na_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00440 double var_sodium_calcium_exchanger__Na_i = var_intracellular_sodium_concentration__Na_i;
00441 const double var_sodium_calcium_exchanger__n_NaCa = 3.0;
00442 const double var_sodium_calcium_exchanger__gamma = 0.5;
00443 double var_sodium_calcium_exchanger__F = var_membrane__F;
00444 double var_sodium_calcium_exchanger__Na_o = var_extracellular_sodium_concentration__Na_o;
00445 const double var_sodium_calcium_exchanger__FRiNaCa = 0.001;
00446 double var_sodium_calcium_exchanger__R = var_membrane__R;
00447 double var_sodium_calcium_exchanger__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00448 double var_sodium_calcium_exchanger__T = var_membrane__T;
00449 double var_sodium_calcium_exchanger__V = var_membrane__V;
00450 const double var_sodium_calcium_exchanger__d_NaCa = 0.0;
00451 const double var_extracellular_calcium_concentration__Ca_o = 2.0;
00452 double var_sodium_calcium_exchanger__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00453 const double var_sodium_calcium_exchanger__k_NaCa = 0.0005;
00454 double var_sodium_calcium_exchanger__i_NaCa_cyt = ((1.0 - var_sodium_calcium_exchanger__FRiNaCa) * var_sodium_calcium_exchanger__k_NaCa * ((exp((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_o) - (exp(((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_i))) / ((1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_sodium_calcium_exchanger__Ca_i * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_sodium_calcium_exchanger__Ca_o * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa))))) * (1.0 + (var_sodium_calcium_exchanger__Ca_i / 0.0069)));
00455 double var_sodium_calcium_exchanger__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
00456 double var_sodium_calcium_exchanger__i_NaCa_ds = (var_sodium_calcium_exchanger__FRiNaCa * var_sodium_calcium_exchanger__k_NaCa * ((exp((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_o) - (exp(((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_ds))) / ((1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_sodium_calcium_exchanger__Ca_ds * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_sodium_calcium_exchanger__Ca_o * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa))))) * (1.0 + (var_sodium_calcium_exchanger__Ca_ds / 0.0069)));
00457 double var_L_type_Ca_channel__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00458 double var_L_type_Ca_channel__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00459 double var_L_type_Ca_channel__i_Ca_L_Ca_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * 4.0 * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Ca_i * exp((100.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Ca_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00460 double var_L_type_Ca_channel__i_Ca_L_Ca_ds = (((var_L_type_Ca_channel__FrICa * 4.0 * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Ca_i * exp((100.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Ca_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00461 double var_reversal_potentials__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00462 double var_reversal_potentials__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00463 double var_reversal_potentials__E_Ca = ((0.5 * var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log(var_reversal_potentials__Ca_o / var_reversal_potentials__Ca_i);
00464 double var_calcium_background_current__E_Ca = var_reversal_potentials__E_Ca;
00465 const double var_calcium_background_current__g_bca = 0.00025;
00466 double var_calcium_background_current__V = var_membrane__V;
00467 double var_calcium_background_current__i_b_Ca = var_calcium_background_current__g_bca * (var_calcium_background_current__V - var_calcium_background_current__E_Ca);
00468 double var_L_type_Ca_channel__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
00469 const double var_L_type_Ca_channel__Km_f2 = 100000.0;
00470 const double var_L_type_Ca_channel__Km_f2ds = 0.001;
00471 const double var_L_type_Ca_channel__R_decay = 20.0;
00472 double var_L_type_Ca_channel_f2_gate__Km_f2 = var_L_type_Ca_channel__Km_f2;
00473 double var_L_type_Ca_channel_f2_gate__Ca_i = var_L_type_Ca_channel__Ca_i;
00474 double var_L_type_Ca_channel_f2ds_gate__Km_f2ds = var_L_type_Ca_channel__Km_f2ds;
00475 double var_L_type_Ca_channel_f2ds_gate__R_decay = var_L_type_Ca_channel__R_decay;
00476 double var_L_type_Ca_channel_f2ds_gate__Ca_ds = var_L_type_Ca_channel__Ca_ds;
00477 double var_sarcoplasmic_reticulum_calcium_pump__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00478 double var_sarcoplasmic_reticulum_calcium_pump__Ca_up = var_intracellular_calcium_concentration__Ca_up;
00479 const double var_sarcoplasmic_reticulum_calcium_pump__alpha_up = 0.4;
00480 const double var_sarcoplasmic_reticulum_calcium_pump__beta_up = 0.03;
00481 const double var_sarcoplasmic_reticulum_calcium_pump__K_srca = 0.5;
00482 const double var_sarcoplasmic_reticulum_calcium_pump__K_xcs = 0.4;
00483 const double var_sarcoplasmic_reticulum_calcium_pump__K_cyca = 0.0003;
00484 double var_sarcoplasmic_reticulum_calcium_pump__K_1 = (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca;
00485 double var_sarcoplasmic_reticulum_calcium_pump__K_2 = var_sarcoplasmic_reticulum_calcium_pump__Ca_i + (var_sarcoplasmic_reticulum_calcium_pump__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_1) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca;
00486 double var_sarcoplasmic_reticulum_calcium_pump__i_up = ((var_sarcoplasmic_reticulum_calcium_pump__Ca_i / var_sarcoplasmic_reticulum_calcium_pump__K_2) * var_sarcoplasmic_reticulum_calcium_pump__alpha_up) - (((var_sarcoplasmic_reticulum_calcium_pump__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_1) / var_sarcoplasmic_reticulum_calcium_pump__K_2) * var_sarcoplasmic_reticulum_calcium_pump__beta_up);
00487 double var_calcium_translocation__Ca_rel = var_intracellular_calcium_concentration__Ca_rel;
00488 double var_calcium_translocation__Ca_up = var_intracellular_calcium_concentration__Ca_up;
00489 double var_calcium_translocation__i_trans = 50.0 * (var_calcium_translocation__Ca_up - var_calcium_translocation__Ca_rel);
00490 const double var_calcium_release__K_m_rel = 250.0;
00491 const double var_calcium_release__K_leak_rate = 0.05;
00492 double var_calcium_release__Ca_rel = var_intracellular_calcium_concentration__Ca_rel;
00493 double var_calcium_release__i_rel = ((pow(var_calcium_release__ActFrac / (var_calcium_release__ActFrac + 0.25), 2.0) * var_calcium_release__K_m_rel) + var_calcium_release__K_leak_rate) * var_calcium_release__Ca_rel;
00494 double var_calcium_release__V = var_membrane__V;
00495 double var_calcium_release__VoltDep = exp(0.08 * (var_calcium_release__V - 40.0));
00496 const double var_calcium_release__K_m_Ca_cyt = 0.0005;
00497 double var_calcium_release__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00498 double var_calcium_release__CaiReg = var_calcium_release__Ca_i / (var_calcium_release__Ca_i + var_calcium_release__K_m_Ca_cyt);
00499 double var_calcium_release__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
00500 const double var_calcium_release__K_m_Ca_ds = 0.01;
00501 double var_calcium_release__CadsReg = var_calcium_release__Ca_ds / (var_calcium_release__Ca_ds + var_calcium_release__K_m_Ca_ds);
00502 double var_calcium_release__RegBindSite = var_calcium_release__CaiReg + ((1.0 - var_calcium_release__CaiReg) * var_calcium_release__CadsReg);
00503 double var_calcium_release__ActRate = (0.0 * var_calcium_release__VoltDep) + (500.0 * pow(var_calcium_release__RegBindSite, 2.0));
00504 double var_calcium_release__InactRate = 60.0 + (500.0 * pow(var_calcium_release__RegBindSite, 2.0));
00505 double var_calcium_release__PrecFrac = (1.0 - var_calcium_release__ActFrac) - var_calcium_release__ProdFrac;
00506 double var_calcium_release__SpeedRel = (var_calcium_release__V < (-50.0)) ? 5.0 : 1.0;
00507 const double var_intracellular_calcium_concentration__V_up_ratio = 0.01;
00508 const double var_intracellular_calcium_concentration__V_rel_ratio = 0.1;
00509 const double var_intracellular_calcium_concentration__V_e_ratio = 0.4;
00510 double var_intracellular_calcium_concentration__V_i_ratio = ((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio;
00511 const double var_intracellular_calcium_concentration__radius = 0.012;
00512 const double var_intracellular_calcium_concentration__length = 0.074;
00513 double var_intracellular_calcium_concentration__V_Cell = 3.141592654 * pow(var_intracellular_calcium_concentration__radius, 2.0) * var_intracellular_calcium_concentration__length;
00514 double var_intracellular_calcium_concentration__V_i = var_intracellular_calcium_concentration__V_Cell * var_intracellular_calcium_concentration__V_i_ratio;
00515 double var_intracellular_sodium_concentration__V_i = var_intracellular_calcium_concentration__V_i;
00516 double var_intracellular_sodium_concentration__F = var_membrane__F;
00517 double var_intracellular_sodium_concentration__i_Na = var_fast_sodium_current__i_Na;
00518 double var_intracellular_sodium_concentration__i_b_Na = var_sodium_background_current__i_b_Na;
00519 double var_intracellular_sodium_concentration__i_p_Na = var_persistent_sodium_current__i_p_Na;
00520 double var_intracellular_sodium_concentration__i_Ca_L_Na_cyt = var_L_type_Ca_channel__i_Ca_L_Na_cyt;
00521 double var_intracellular_sodium_concentration__i_Ca_L_Na_ds = var_L_type_Ca_channel__i_Ca_L_Na_ds;
00522 double var_intracellular_sodium_concentration__i_NaK = var_sodium_potassium_pump__i_NaK;
00523 double var_intracellular_sodium_concentration__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
00524 double var_intracellular_potassium_concentration__V_i = var_intracellular_calcium_concentration__V_i;
00525 double var_intracellular_potassium_concentration__i_K1 = var_time_independent_potassium_current__i_K1;
00526 double var_intracellular_potassium_concentration__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00527 double var_intracellular_potassium_concentration__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00528 double var_intracellular_potassium_concentration__i_Ca_L_K_cyt = var_L_type_Ca_channel__i_Ca_L_K_cyt;
00529 double var_intracellular_potassium_concentration__i_Ca_L_K_ds = var_L_type_Ca_channel__i_Ca_L_K_ds;
00530 double var_intracellular_potassium_concentration__i_to = var_transient_outward_current__i_to;
00531 double var_intracellular_potassium_concentration__i_NaK = var_sodium_potassium_pump__i_NaK;
00532 double var_intracellular_potassium_concentration__F = var_membrane__F;
00533 const double var_intracellular_calcium_concentration__Calmod = 0.02;
00534 const double var_intracellular_calcium_concentration__Trop = 0.05;
00535 const double var_intracellular_calcium_concentration__alpha_Calmod = 100000.0;
00536 const double var_intracellular_calcium_concentration__beta_Calmod = 50.0;
00537 const double var_intracellular_calcium_concentration__alpha_Trop = 100000.0;
00538 const double var_intracellular_calcium_concentration__beta_Trop = 200.0;
00539 const double var_intracellular_calcium_concentration__V_ds_ratio = 0.1;
00540 const double var_intracellular_calcium_concentration__Kdecay = 10.0;
00541 double var_intracellular_calcium_concentration__i_up = var_sarcoplasmic_reticulum_calcium_pump__i_up;
00542 double var_intracellular_calcium_concentration__i_trans = var_calcium_translocation__i_trans;
00543 double var_intracellular_calcium_concentration__i_rel = var_calcium_release__i_rel;
00544 double var_intracellular_calcium_concentration__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
00545 double var_intracellular_calcium_concentration__i_NaCa_ds = var_sodium_calcium_exchanger__i_NaCa_ds;
00546 double var_intracellular_calcium_concentration__i_Ca_L_Ca_cyt = var_L_type_Ca_channel__i_Ca_L_Ca_cyt;
00547 double var_intracellular_calcium_concentration__i_Ca_L_Ca_ds = var_L_type_Ca_channel__i_Ca_L_Ca_ds;
00548 double var_intracellular_calcium_concentration__i_b_Ca = var_calcium_background_current__i_b_Ca;
00549 double var_intracellular_calcium_concentration__F = var_membrane__F;
00550 double d_dt_L_type_Ca_channel_f2_gate__f2 = 1.0 - (1.0 * ((var_L_type_Ca_channel_f2_gate__Ca_i / (var_L_type_Ca_channel_f2_gate__Km_f2 + var_L_type_Ca_channel_f2_gate__Ca_i)) + var_L_type_Ca_channel_f2_gate__f2));
00551 double d_dt_L_type_Ca_channel_f2ds_gate__f2ds = var_L_type_Ca_channel_f2ds_gate__R_decay * (1.0 - ((var_L_type_Ca_channel_f2ds_gate__Ca_ds / (var_L_type_Ca_channel_f2ds_gate__Km_f2ds + var_L_type_Ca_channel_f2ds_gate__Ca_ds)) + var_L_type_Ca_channel_f2ds_gate__f2ds));
00552 double d_dt_calcium_release__ActFrac = (var_calcium_release__PrecFrac * var_calcium_release__SpeedRel * var_calcium_release__ActRate) - (var_calcium_release__ActFrac * var_calcium_release__SpeedRel * var_calcium_release__InactRate);
00553 double d_dt_calcium_release__ProdFrac = (var_calcium_release__ActFrac * var_calcium_release__SpeedRel * var_calcium_release__InactRate) - (var_calcium_release__SpeedRel * 1.0 * var_calcium_release__ProdFrac);
00554 double d_dt_intracellular_sodium_concentration__Na_i = ((-1.0) / (1.0 * var_intracellular_sodium_concentration__V_i * var_intracellular_sodium_concentration__F)) * (var_intracellular_sodium_concentration__i_Na + var_intracellular_sodium_concentration__i_p_Na + var_intracellular_sodium_concentration__i_b_Na + (3.0 * var_intracellular_sodium_concentration__i_NaK) + (3.0 * var_intracellular_sodium_concentration__i_NaCa_cyt) + var_intracellular_sodium_concentration__i_Ca_L_Na_cyt + var_intracellular_sodium_concentration__i_Ca_L_Na_ds);
00555 double d_dt_intracellular_potassium_concentration__K_i = ((-1.0) / (1.0 * var_intracellular_potassium_concentration__V_i * var_intracellular_potassium_concentration__F)) * ((var_intracellular_potassium_concentration__i_K1 + var_intracellular_potassium_concentration__i_Kr + var_intracellular_potassium_concentration__i_Ks + var_intracellular_potassium_concentration__i_Ca_L_K_cyt + var_intracellular_potassium_concentration__i_Ca_L_K_ds + var_intracellular_potassium_concentration__i_to) - (2.0 * var_intracellular_potassium_concentration__i_NaK));
00556 double d_dt_intracellular_calcium_concentration__Ca_Trop = (var_intracellular_calcium_concentration__alpha_Trop * var_intracellular_calcium_concentration__Ca_i * (var_intracellular_calcium_concentration__Trop - var_intracellular_calcium_concentration__Ca_Trop)) - (var_intracellular_calcium_concentration__beta_Trop * var_intracellular_calcium_concentration__Ca_Trop);
00557 double d_dt_intracellular_calcium_concentration__Ca_Calmod = (var_intracellular_calcium_concentration__alpha_Calmod * var_intracellular_calcium_concentration__Ca_i * (var_intracellular_calcium_concentration__Calmod - var_intracellular_calcium_concentration__Ca_Calmod)) - (var_intracellular_calcium_concentration__beta_Calmod * var_intracellular_calcium_concentration__Ca_Calmod);
00558 double d_dt_intracellular_calcium_concentration__Ca_i = ((((((-1.0) / (2.0 * 1.0 * var_intracellular_calcium_concentration__V_i * var_intracellular_calcium_concentration__F)) * (((var_intracellular_calcium_concentration__i_Ca_L_Ca_cyt + var_intracellular_calcium_concentration__i_b_Ca) - (2.0 * var_intracellular_calcium_concentration__i_NaCa_cyt)) - (2.0 * var_intracellular_calcium_concentration__i_NaCa_ds))) + (var_intracellular_calcium_concentration__Ca_ds * var_intracellular_calcium_concentration__V_ds_ratio * var_intracellular_calcium_concentration__Kdecay) + ((var_intracellular_calcium_concentration__i_rel * var_intracellular_calcium_concentration__V_rel_ratio) / var_intracellular_calcium_concentration__V_i_ratio)) - d_dt_intracellular_calcium_concentration__Ca_Calmod) - d_dt_intracellular_calcium_concentration__Ca_Trop) - var_intracellular_calcium_concentration__i_up;
00559 double d_dt_intracellular_calcium_concentration__Ca_ds = (((-1.0) * var_intracellular_calcium_concentration__i_Ca_L_Ca_ds) / (2.0 * 1.0 * var_intracellular_calcium_concentration__V_ds_ratio * var_intracellular_calcium_concentration__V_i * var_intracellular_calcium_concentration__F)) - (var_intracellular_calcium_concentration__Ca_ds * var_intracellular_calcium_concentration__Kdecay);
00560 double d_dt_intracellular_calcium_concentration__Ca_up = ((var_intracellular_calcium_concentration__V_i_ratio / var_intracellular_calcium_concentration__V_up_ratio) * var_intracellular_calcium_concentration__i_up) - var_intracellular_calcium_concentration__i_trans;
00561 double d_dt_intracellular_calcium_concentration__Ca_rel = ((var_intracellular_calcium_concentration__V_up_ratio / var_intracellular_calcium_concentration__V_rel_ratio) * var_intracellular_calcium_concentration__i_trans) - var_intracellular_calcium_concentration__i_rel;
00562
00563 rResidual[0] = rCurrentGuess[0] - rY[8] - mDt*0.001*d_dt_L_type_Ca_channel_f2_gate__f2;
00564 rResidual[1] = rCurrentGuess[1] - rY[9] - mDt*0.001*d_dt_L_type_Ca_channel_f2ds_gate__f2ds;
00565 rResidual[2] = rCurrentGuess[2] - rY[12] - mDt*0.001*d_dt_calcium_release__ActFrac;
00566 rResidual[3] = rCurrentGuess[3] - rY[13] - mDt*0.001*d_dt_calcium_release__ProdFrac;
00567 rResidual[11] = rCurrentGuess[11] - rY[14] - mDt*0.001*d_dt_intracellular_sodium_concentration__Na_i;
00568 rResidual[10] = rCurrentGuess[10] - rY[15] - mDt*0.001*d_dt_intracellular_potassium_concentration__K_i;
00569 rResidual[7] = rCurrentGuess[7] - rY[16] - mDt*0.001*d_dt_intracellular_calcium_concentration__Ca_i;
00570 rResidual[6] = rCurrentGuess[6] - rY[17] - mDt*0.001*d_dt_intracellular_calcium_concentration__Ca_ds;
00571 rResidual[9] = rCurrentGuess[9] - rY[18] - mDt*0.001*d_dt_intracellular_calcium_concentration__Ca_up;
00572 rResidual[8] = rCurrentGuess[8] - rY[19] - mDt*0.001*d_dt_intracellular_calcium_concentration__Ca_rel;
00573 rResidual[4] = rCurrentGuess[4] - rY[20] - mDt*0.001*d_dt_intracellular_calcium_concentration__Ca_Calmod;
00574 rResidual[5] = rCurrentGuess[5] - rY[21] - mDt*0.001*d_dt_intracellular_calcium_concentration__Ca_Trop;
00575 }
00576
00577 void ComputeJacobian(const double rCurrentGuess[12], double rJacobian[12][12])
00578 {
00579 std::vector<double>& rY = rGetStateVariables();
00580 double var_membrane__V = rY[0];
00581
00582 double var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = rY[1];
00583
00584 double var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = rY[2];
00585
00586 double var_slow_delayed_rectifier_potassium_current_xs_gate__xs = rY[3];
00587
00588 double var_fast_sodium_current_m_gate__m = rY[4];
00589
00590 double var_fast_sodium_current_h_gate__h = rY[5];
00591
00592 double var_L_type_Ca_channel_d_gate__d = rY[6];
00593
00594 double var_L_type_Ca_channel_f_gate__f = rY[7];
00595
00596 double var_transient_outward_current_s_gate__s = rY[10];
00597
00598 double var_transient_outward_current_r_gate__r = rY[11];
00599
00600
00601 double var_L_type_Ca_channel_f2_gate__f2 = rCurrentGuess[0];
00602 double var_L_type_Ca_channel_f2ds_gate__f2ds = rCurrentGuess[1];
00603 double var_calcium_release__ActFrac = rCurrentGuess[2];
00604 double var_calcium_release__ProdFrac = rCurrentGuess[3];
00605 double var_intracellular_calcium_concentration__Ca_Calmod = rCurrentGuess[4];
00606 double var_intracellular_calcium_concentration__Ca_Trop = rCurrentGuess[5];
00607 double var_intracellular_calcium_concentration__Ca_ds = rCurrentGuess[6];
00608 double var_intracellular_calcium_concentration__Ca_i = rCurrentGuess[7];
00609 double var_intracellular_calcium_concentration__Ca_rel = rCurrentGuess[8];
00610 double var_intracellular_calcium_concentration__Ca_up = rCurrentGuess[9];
00611 double var_intracellular_potassium_concentration__K_i = rCurrentGuess[10];
00612 double var_intracellular_sodium_concentration__Na_i = rCurrentGuess[11];
00613
00614 const double var_membrane__R = 8314.472;
00615 const double var_membrane__T = 310.0;
00616 const double var_membrane__F = 96485.3415;
00617 const double var_extracellular_potassium_concentration__K_o = 4.0;
00618 const double var_time_independent_potassium_current__K_mk1 = 10.0;
00619 const double var_time_independent_potassium_current__g_K1 = 0.5;
00620 const double var_transient_outward_current__g_to = 0.005;
00621 const double var_transient_outward_current__g_tos = 0.0;
00622 const double var_rapid_delayed_rectifier_potassium_current__g_Kr2 = 0.0013;
00623 const double var_rapid_delayed_rectifier_potassium_current__g_Kr1 = 0.0021;
00624 const double var_extracellular_sodium_concentration__Na_o = 140.0;
00625 const double var_reversal_potentials__P_kna = 0.03;
00626 const double var_slow_delayed_rectifier_potassium_current__g_Ks = 0.0026;
00627 const double var_L_type_Ca_channel__FrICa = 1.0;
00628 const double var_L_type_Ca_channel__P_Ca_L = 0.1;
00629 const double var_L_type_Ca_channel__P_CaK = 0.002;
00630 const double var_sodium_potassium_pump__i_NaK_max = 0.7;
00631 const double var_sodium_potassium_pump__K_mNa = 40.0;
00632 const double var_sodium_potassium_pump__K_mK = 1.0;
00633 const double var_fast_sodium_current__g_Na = 2.5;
00634 const double var_sodium_background_current__g_bna = 0.0006;
00635 const double var_persistent_sodium_current__g_pna = 0.004;
00636 const double var_L_type_Ca_channel__P_CaNa = 0.01;
00637 const double var_sodium_calcium_exchanger__n_NaCa = 3.0;
00638 const double var_sodium_calcium_exchanger__gamma = 0.5;
00639 const double var_sodium_calcium_exchanger__FRiNaCa = 0.001;
00640 const double var_sodium_calcium_exchanger__d_NaCa = 0.0;
00641 const double var_extracellular_calcium_concentration__Ca_o = 2.0;
00642 const double var_sodium_calcium_exchanger__k_NaCa = 0.0005;
00643 const double var_calcium_background_current__g_bca = 0.00025;
00644 const double var_L_type_Ca_channel__Km_f2 = 100000.0;
00645 const double var_L_type_Ca_channel__Km_f2ds = 0.001;
00646 const double var_L_type_Ca_channel__R_decay = 20.0;
00647 const double var_sarcoplasmic_reticulum_calcium_pump__alpha_up = 0.4;
00648 const double var_sarcoplasmic_reticulum_calcium_pump__beta_up = 0.03;
00649 const double var_sarcoplasmic_reticulum_calcium_pump__K_srca = 0.5;
00650 const double var_sarcoplasmic_reticulum_calcium_pump__K_xcs = 0.4;
00651 const double var_sarcoplasmic_reticulum_calcium_pump__K_cyca = 0.0003;
00652 const double var_calcium_release__K_m_rel = 250.0;
00653 const double var_calcium_release__K_leak_rate = 0.05;
00654 const double var_calcium_release__K_m_Ca_cyt = 0.0005;
00655 const double var_calcium_release__K_m_Ca_ds = 0.01;
00656 const double var_intracellular_calcium_concentration__V_up_ratio = 0.01;
00657 const double var_intracellular_calcium_concentration__V_rel_ratio = 0.1;
00658 const double var_intracellular_calcium_concentration__V_e_ratio = 0.4;
00659 const double var_intracellular_calcium_concentration__radius = 0.012;
00660 const double var_intracellular_calcium_concentration__length = 0.074;
00661 const double var_intracellular_calcium_concentration__Calmod = 0.02;
00662 const double var_intracellular_calcium_concentration__Trop = 0.05;
00663 const double var_intracellular_calcium_concentration__alpha_Calmod = 100000.0;
00664 const double var_intracellular_calcium_concentration__beta_Calmod = 50.0;
00665 const double var_intracellular_calcium_concentration__alpha_Trop = 100000.0;
00666 const double var_intracellular_calcium_concentration__beta_Trop = 200.0;
00667 const double var_intracellular_calcium_concentration__V_ds_ratio = 0.1;
00668 const double var_intracellular_calcium_concentration__Kdecay = 10.0;
00669
00670 rJacobian[0][0] = 1.0 + 0.001*mDt;
00671 rJacobian[0][1] = 0.0;
00672 rJacobian[0][2] = 0.0;
00673 rJacobian[0][3] = 0.0;
00674 rJacobian[0][4] = 0.0;
00675 rJacobian[0][5] = 0.0;
00676 rJacobian[0][6] = 0.0;
00677 rJacobian[0][7] = (-0.001*mDt) * (((-1.0) / (var_L_type_Ca_channel__Km_f2 + var_intracellular_calcium_concentration__Ca_i)) + (var_intracellular_calcium_concentration__Ca_i / pow(var_L_type_Ca_channel__Km_f2 + var_intracellular_calcium_concentration__Ca_i, 2.0)));
00678 rJacobian[0][8] = 0.0;
00679 rJacobian[0][9] = 0.0;
00680 rJacobian[0][10] = 0.0;
00681 rJacobian[0][11] = 0.0;
00682 rJacobian[1][0] = 0.0;
00683 rJacobian[1][1] = 1.0 + (0.001*mDt * var_L_type_Ca_channel__R_decay);
00684 rJacobian[1][2] = 0.0;
00685 rJacobian[1][3] = 0.0;
00686 rJacobian[1][4] = 0.0;
00687 rJacobian[1][5] = 0.0;
00688 rJacobian[1][6] = ((-0.001*mDt) * var_L_type_Ca_channel__R_decay) * (((-1.0) / (var_L_type_Ca_channel__Km_f2ds + var_intracellular_calcium_concentration__Ca_ds)) + (var_intracellular_calcium_concentration__Ca_ds / pow(var_L_type_Ca_channel__Km_f2ds + var_intracellular_calcium_concentration__Ca_ds, 2.0)));
00689 rJacobian[1][7] = 0.0;
00690 rJacobian[1][8] = 0.0;
00691 rJacobian[1][9] = 0.0;
00692 rJacobian[1][10] = 0.0;
00693 rJacobian[1][11] = 0.0;
00694 rJacobian[2][0] = 0.0;
00695 rJacobian[2][1] = 0.0;
00696 rJacobian[2][2] = 1.0 - (0.001*mDt * ((((-500.0) * ((var_membrane__V < (-50.0)) ? 5.0 : 1.0)) * pow((var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)), 2.0)) - (((var_membrane__V < (-50.0)) ? 5.0 : 1.0) * (60.0 + (500.0 * pow((var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)), 2.0))))));
00697 rJacobian[2][3] = ((500.0 * 0.001*mDt) * ((var_membrane__V < (-50.0)) ? 5.0 : 1.0)) * pow((var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)), 2.0);
00698 rJacobian[2][4] = 0.0;
00699 rJacobian[2][5] = 0.0;
00700 rJacobian[2][6] = (-0.001*mDt) * (((((1000.0 * ((1.0 - var_calcium_release__ActFrac) - var_calcium_release__ProdFrac)) * ((var_membrane__V < (-50.0)) ? 5.0 : 1.0)) * ((var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)))) * (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)) - (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / pow(var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds, 2.0)))) - ((((1000.0 * var_calcium_release__ActFrac) * ((var_membrane__V < (-50.0)) ? 5.0 : 1.0)) * ((var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)))) * (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)) - (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / pow(var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds, 2.0)))));
00701 rJacobian[2][7] = (-0.001*mDt) * (((((1000.0 * ((1.0 - var_calcium_release__ActFrac) - var_calcium_release__ProdFrac)) * ((var_membrane__V < (-50.0)) ? 5.0 : 1.0)) * ((var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)))) * (((1.0 / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) - (var_intracellular_calcium_concentration__Ca_i / pow(var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt, 2.0))) + (((((-1.0) / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (var_intracellular_calcium_concentration__Ca_i / pow(var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt, 2.0))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)))) - ((((1000.0 * var_calcium_release__ActFrac) * ((var_membrane__V < (-50.0)) ? 5.0 : 1.0)) * ((var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)))) * (((1.0 / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) - (var_intracellular_calcium_concentration__Ca_i / pow(var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt, 2.0))) + (((((-1.0) / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (var_intracellular_calcium_concentration__Ca_i / pow(var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt, 2.0))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)))));
00702 rJacobian[2][8] = 0.0;
00703 rJacobian[2][9] = 0.0;
00704 rJacobian[2][10] = 0.0;
00705 rJacobian[2][11] = 0.0;
00706 rJacobian[3][0] = 0.0;
00707 rJacobian[3][1] = 0.0;
00708 rJacobian[3][2] = ((-0.001*mDt) * ((var_membrane__V < (-50.0)) ? 5.0 : 1.0)) * (60.0 + (500.0 * pow((var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)), 2.0)));
00709 rJacobian[3][3] = 1.0 + (0.001*mDt * ((var_membrane__V < (-50.0)) ? 5.0 : 1.0));
00710 rJacobian[3][4] = 0.0;
00711 rJacobian[3][5] = 0.0;
00712 rJacobian[3][6] = (((((-1000.0) * 0.001*mDt) * var_calcium_release__ActFrac) * ((var_membrane__V < (-50.0)) ? 5.0 : 1.0)) * ((var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)))) * (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)) - (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / pow(var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds, 2.0)));
00713 rJacobian[3][7] = (((((-1000.0) * 0.001*mDt) * var_calcium_release__ActFrac) * ((var_membrane__V < (-50.0)) ? 5.0 : 1.0)) * ((var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (((1.0 - (var_intracellular_calcium_concentration__Ca_i / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)))) * (((1.0 / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) - (var_intracellular_calcium_concentration__Ca_i / pow(var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt, 2.0))) + (((((-1.0) / (var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt)) + (var_intracellular_calcium_concentration__Ca_i / pow(var_intracellular_calcium_concentration__Ca_i + var_calcium_release__K_m_Ca_cyt, 2.0))) * var_intracellular_calcium_concentration__Ca_ds) / (var_intracellular_calcium_concentration__Ca_ds + var_calcium_release__K_m_Ca_ds)));
00714 rJacobian[3][8] = 0.0;
00715 rJacobian[3][9] = 0.0;
00716 rJacobian[3][10] = 0.0;
00717 rJacobian[3][11] = 0.0;
00718 rJacobian[4][0] = 0.0;
00719 rJacobian[4][1] = 0.0;
00720 rJacobian[4][2] = 0.0;
00721 rJacobian[4][3] = 0.0;
00722 rJacobian[4][4] = 1.0 - (0.001*mDt * (((-var_intracellular_calcium_concentration__alpha_Calmod) * var_intracellular_calcium_concentration__Ca_i) - var_intracellular_calcium_concentration__beta_Calmod));
00723 rJacobian[4][5] = 0.0;
00724 rJacobian[4][6] = 0.0;
00725 rJacobian[4][7] = ((-0.001*mDt) * var_intracellular_calcium_concentration__alpha_Calmod) * (var_intracellular_calcium_concentration__Calmod - var_intracellular_calcium_concentration__Ca_Calmod);
00726 rJacobian[4][8] = 0.0;
00727 rJacobian[4][9] = 0.0;
00728 rJacobian[4][10] = 0.0;
00729 rJacobian[4][11] = 0.0;
00730 rJacobian[5][0] = 0.0;
00731 rJacobian[5][1] = 0.0;
00732 rJacobian[5][2] = 0.0;
00733 rJacobian[5][3] = 0.0;
00734 rJacobian[5][4] = 0.0;
00735 rJacobian[5][5] = 1.0 - (0.001*mDt * (((-var_intracellular_calcium_concentration__alpha_Trop) * var_intracellular_calcium_concentration__Ca_i) - var_intracellular_calcium_concentration__beta_Trop));
00736 rJacobian[5][6] = 0.0;
00737 rJacobian[5][7] = ((-0.001*mDt) * var_intracellular_calcium_concentration__alpha_Trop) * (var_intracellular_calcium_concentration__Trop - var_intracellular_calcium_concentration__Ca_Trop);
00738 rJacobian[5][8] = 0.0;
00739 rJacobian[5][9] = 0.0;
00740 rJacobian[5][10] = 0.0;
00741 rJacobian[5][11] = 0.0;
00742 rJacobian[6][0] = 0.0;
00743 rJacobian[6][1] = (((((((((((((0.6366197725 * 0.001*mDt) * var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_Ca_L) * var_L_type_Ca_channel_d_gate__d) * var_L_type_Ca_channel_f_gate__f) * (var_membrane__V - 50.0)) / var_membrane__R) / var_membrane__T) / (1.0 - exp((((2.0 * ((-var_membrane__V) + 50.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T))) * ((var_intracellular_calcium_concentration__Ca_i * exp(((100.0 * var_membrane__F) / var_membrane__R) / var_membrane__T)) - (var_extracellular_calcium_concentration__Ca_o * exp((((2.0 * ((-var_membrane__V) + 50.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T)))) / var_intracellular_calcium_concentration__V_ds_ratio) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio);
00744 rJacobian[6][2] = 0.0;
00745 rJacobian[6][3] = 0.0;
00746 rJacobian[6][4] = 0.0;
00747 rJacobian[6][5] = 0.0;
00748 rJacobian[6][6] = 1.0 + (0.001*mDt * var_intracellular_calcium_concentration__Kdecay);
00749 rJacobian[6][7] = ((((((((((((((0.6366197725 * 0.001*mDt) * var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_Ca_L) * var_L_type_Ca_channel_d_gate__d) * var_L_type_Ca_channel_f_gate__f) * var_L_type_Ca_channel_f2ds_gate__f2ds) * (var_membrane__V - 50.0)) / var_membrane__R) / var_membrane__T) / (1.0 - exp((((2.0 * ((-var_membrane__V) + 50.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T))) * exp(((100.0 * var_membrane__F) / var_membrane__R) / var_membrane__T)) / var_intracellular_calcium_concentration__V_ds_ratio) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio);
00750 rJacobian[6][8] = 0.0;
00751 rJacobian[6][9] = 0.0;
00752 rJacobian[6][10] = 0.0;
00753 rJacobian[6][11] = 0.0;
00754 rJacobian[7][0] = ((((((((((((0.636619772 * 0.001*mDt) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) * (1.0 - var_L_type_Ca_channel__FrICa)) * var_L_type_Ca_channel__P_Ca_L) * var_L_type_Ca_channel_d_gate__d) * var_L_type_Ca_channel_f_gate__f) * (var_membrane__V - 50.0)) / var_membrane__R) / var_membrane__T) / (1.0 - exp((((2.0 * ((-var_membrane__V) + 50.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T))) * ((var_intracellular_calcium_concentration__Ca_i * exp(((100.0 * var_membrane__F) / var_membrane__R) / var_membrane__T)) - (var_extracellular_calcium_concentration__Ca_o * exp((((2.0 * ((-var_membrane__V) + 50.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T)));
00755 rJacobian[7][1] = 0.0;
00756 rJacobian[7][2] = ((((-0.001*mDt) * ((((2.0 * var_calcium_release__ActFrac) / pow(var_calcium_release__ActFrac + 0.25, 2.0)) * var_calcium_release__K_m_rel) - (((2.0 * pow(var_calcium_release__ActFrac, 2.0)) / pow(var_calcium_release__ActFrac + 0.25, 3.0)) * var_calcium_release__K_m_rel))) * var_intracellular_calcium_concentration__Ca_rel) * var_intracellular_calcium_concentration__V_rel_ratio) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio);
00757 rJacobian[7][3] = 0.0;
00758 rJacobian[7][4] = (-0.001*mDt) * ((var_intracellular_calcium_concentration__alpha_Calmod * var_intracellular_calcium_concentration__Ca_i) + var_intracellular_calcium_concentration__beta_Calmod);
00759 rJacobian[7][5] = (-0.001*mDt) * ((var_intracellular_calcium_concentration__alpha_Trop * var_intracellular_calcium_concentration__Ca_i) + var_intracellular_calcium_concentration__beta_Trop);
00760 rJacobian[7][6] = (-0.001*mDt) * (((((((-0.159154943) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) / var_membrane__F) * ((((((((2.0 * var_sodium_calcium_exchanger__FRiNaCa) * var_sodium_calcium_exchanger__k_NaCa) * exp((((((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T)) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) / (1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_ds * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))))) / (1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_ds))) + (((((((2.0 * var_sodium_calcium_exchanger__FRiNaCa) * var_sodium_calcium_exchanger__k_NaCa) * (((exp(((((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_extracellular_calcium_concentration__Ca_o) - ((exp((((((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) * var_intracellular_calcium_concentration__Ca_ds))) / pow(1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_ds * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))), 2.0)) / (1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_ds))) * var_sodium_calcium_exchanger__d_NaCa) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa))) + (((((289.8550724 * var_sodium_calcium_exchanger__FRiNaCa) * var_sodium_calcium_exchanger__k_NaCa) * (((exp(((((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_extracellular_calcium_concentration__Ca_o) - ((exp((((((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) * var_intracellular_calcium_concentration__Ca_ds))) / (1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_ds * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))))) / pow(1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_ds), 2.0)))) + (var_intracellular_calcium_concentration__V_ds_ratio * var_intracellular_calcium_concentration__Kdecay));
00761 rJacobian[7][7] = 1.0 - (0.001*mDt * (((((((((((-0.159154943) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) / var_membrane__F) * (((((((((((((((4.0 * (1.0 - var_L_type_Ca_channel__FrICa)) * var_L_type_Ca_channel__P_Ca_L) * var_L_type_Ca_channel_d_gate__d) * var_L_type_Ca_channel_f_gate__f) * var_L_type_Ca_channel_f2_gate__f2) * (var_membrane__V - 50.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T) / (1.0 - exp((((2.0 * ((-var_membrane__V) + 50.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T))) * exp(((100.0 * var_membrane__F) / var_membrane__R) / var_membrane__T)) + (((((0.5 * var_calcium_background_current__g_bca) * var_membrane__R) * var_membrane__T) / var_membrane__F) / var_intracellular_calcium_concentration__Ca_i)) + ((((((2.0 * (1.0 - var_sodium_calcium_exchanger__FRiNaCa)) * var_sodium_calcium_exchanger__k_NaCa) * exp((((((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T)) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) / (1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_i * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))))) / (1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_i)))) + (((((((2.0 * (1.0 - var_sodium_calcium_exchanger__FRiNaCa)) * var_sodium_calcium_exchanger__k_NaCa) * (((exp(((((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_extracellular_calcium_concentration__Ca_o) - ((exp((((((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) * var_intracellular_calcium_concentration__Ca_i))) / pow(1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_i * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))), 2.0)) / (1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_i))) * var_sodium_calcium_exchanger__d_NaCa) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa))) + (((((289.8550724 * (1.0 - var_sodium_calcium_exchanger__FRiNaCa)) * var_sodium_calcium_exchanger__k_NaCa) * (((exp(((((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_extracellular_calcium_concentration__Ca_o) - ((exp((((((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) * var_intracellular_calcium_concentration__Ca_i))) / (1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_i * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))))) / pow(1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_i), 2.0)))) - (var_intracellular_calcium_concentration__alpha_Calmod * (var_intracellular_calcium_concentration__Calmod - var_intracellular_calcium_concentration__Ca_Calmod))) - (var_intracellular_calcium_concentration__alpha_Trop * (var_intracellular_calcium_concentration__Trop - var_intracellular_calcium_concentration__Ca_Trop))) - ((1.0 / (((var_intracellular_calcium_concentration__Ca_i + (((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca)) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs)) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca)) * var_sarcoplasmic_reticulum_calcium_pump__alpha_up)) + ((var_intracellular_calcium_concentration__Ca_i / pow(((var_intracellular_calcium_concentration__Ca_i + (((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca)) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs)) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca, 2.0)) * var_sarcoplasmic_reticulum_calcium_pump__alpha_up)) - (((((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca) / pow(((var_intracellular_calcium_concentration__Ca_i + (((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca)) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs)) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca, 2.0)) * var_sarcoplasmic_reticulum_calcium_pump__beta_up)));
00762 rJacobian[7][8] = (((-0.001*mDt) * (((pow(var_calcium_release__ActFrac, 2.0) / pow(var_calcium_release__ActFrac + 0.25, 2.0)) * var_calcium_release__K_m_rel) + var_calcium_release__K_leak_rate)) * var_intracellular_calcium_concentration__V_rel_ratio) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio);
00763 rJacobian[7][9] = (-0.001*mDt) * (((((((var_intracellular_calcium_concentration__Ca_i / pow(((var_intracellular_calcium_concentration__Ca_i + (((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca)) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs)) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca, 2.0)) * var_sarcoplasmic_reticulum_calcium_pump__alpha_up) * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca) + ((((var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca) / (((var_intracellular_calcium_concentration__Ca_i + (((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca)) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs)) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca)) * var_sarcoplasmic_reticulum_calcium_pump__beta_up)) - (((((var_intracellular_calcium_concentration__Ca_up * pow(var_sarcoplasmic_reticulum_calcium_pump__K_cyca, 2.0)) * pow(var_sarcoplasmic_reticulum_calcium_pump__K_xcs, 2.0)) / pow(var_sarcoplasmic_reticulum_calcium_pump__K_srca, 2.0)) / pow(((var_intracellular_calcium_concentration__Ca_i + (((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca)) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs)) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca, 2.0)) * var_sarcoplasmic_reticulum_calcium_pump__beta_up));
00764 rJacobian[7][10] = 0.0;
00765 rJacobian[7][11] = (((((0.159154943 * 0.001*mDt) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) / var_membrane__F) * (((((((((((((-2.0) * (1.0 - var_sodium_calcium_exchanger__FRiNaCa)) * var_sodium_calcium_exchanger__k_NaCa) * exp(((((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T)) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_sodium_calcium_exchanger__n_NaCa) / var_intracellular_sodium_concentration__Na_i) * var_extracellular_calcium_concentration__Ca_o) / (1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_i * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))))) / (1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_i))) + ((((((((((2.0 * (1.0 - var_sodium_calcium_exchanger__FRiNaCa)) * var_sodium_calcium_exchanger__k_NaCa) * (((exp(((((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_extracellular_calcium_concentration__Ca_o) - ((exp((((((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) * var_intracellular_calcium_concentration__Ca_i))) / pow(1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_i * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))), 2.0)) / (1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_i))) * var_sodium_calcium_exchanger__d_NaCa) * var_extracellular_calcium_concentration__Ca_o) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_sodium_calcium_exchanger__n_NaCa) / var_intracellular_sodium_concentration__Na_i)) - (((((((((2.0 * var_sodium_calcium_exchanger__FRiNaCa) * var_sodium_calcium_exchanger__k_NaCa) * exp(((((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T)) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_sodium_calcium_exchanger__n_NaCa) / var_intracellular_sodium_concentration__Na_i) * var_extracellular_calcium_concentration__Ca_o) / (1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_ds * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))))) / (1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_ds)))) + ((((((((((2.0 * var_sodium_calcium_exchanger__FRiNaCa) * var_sodium_calcium_exchanger__k_NaCa) * (((exp(((((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_extracellular_calcium_concentration__Ca_o) - ((exp((((((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) * var_intracellular_calcium_concentration__Ca_ds))) / pow(1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_ds * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))), 2.0)) / (1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_ds))) * var_sodium_calcium_exchanger__d_NaCa) * var_extracellular_calcium_concentration__Ca_o) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_sodium_calcium_exchanger__n_NaCa) / var_intracellular_sodium_concentration__Na_i));
00766 rJacobian[8][0] = 0.0;
00767 rJacobian[8][1] = 0.0;
00768 rJacobian[8][2] = (0.001*mDt * ((((2.0 * var_calcium_release__ActFrac) / pow(var_calcium_release__ActFrac + 0.25, 2.0)) * var_calcium_release__K_m_rel) - (((2.0 * pow(var_calcium_release__ActFrac, 2.0)) / pow(var_calcium_release__ActFrac + 0.25, 3.0)) * var_calcium_release__K_m_rel))) * var_intracellular_calcium_concentration__Ca_rel;
00769 rJacobian[8][3] = 0.0;
00770 rJacobian[8][4] = 0.0;
00771 rJacobian[8][5] = 0.0;
00772 rJacobian[8][6] = 0.0;
00773 rJacobian[8][7] = 0.0;
00774 rJacobian[8][8] = 1.0 - (0.001*mDt * (((((-50.0) * var_intracellular_calcium_concentration__V_up_ratio) / var_intracellular_calcium_concentration__V_rel_ratio) - ((pow(var_calcium_release__ActFrac, 2.0) / pow(var_calcium_release__ActFrac + 0.25, 2.0)) * var_calcium_release__K_m_rel)) - var_calcium_release__K_leak_rate));
00775 rJacobian[8][9] = (((-50.0) * 0.001*mDt) * var_intracellular_calcium_concentration__V_up_ratio) / var_intracellular_calcium_concentration__V_rel_ratio;
00776 rJacobian[8][10] = 0.0;
00777 rJacobian[8][11] = 0.0;
00778 rJacobian[9][0] = 0.0;
00779 rJacobian[9][1] = 0.0;
00780 rJacobian[9][2] = 0.0;
00781 rJacobian[9][3] = 0.0;
00782 rJacobian[9][4] = 0.0;
00783 rJacobian[9][5] = 0.0;
00784 rJacobian[9][6] = 0.0;
00785 rJacobian[9][7] = (((-0.001*mDt) * (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) / var_intracellular_calcium_concentration__V_up_ratio) * ((((1.0 / (((var_intracellular_calcium_concentration__Ca_i + (((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca)) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs)) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca)) * var_sarcoplasmic_reticulum_calcium_pump__alpha_up) - ((var_intracellular_calcium_concentration__Ca_i / pow(((var_intracellular_calcium_concentration__Ca_i + (((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca)) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs)) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca, 2.0)) * var_sarcoplasmic_reticulum_calcium_pump__alpha_up)) + (((((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca) / pow(((var_intracellular_calcium_concentration__Ca_i + (((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca)) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs)) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca, 2.0)) * var_sarcoplasmic_reticulum_calcium_pump__beta_up));
00786 rJacobian[9][8] = (-50.0) * 0.001*mDt;
00787 rJacobian[9][9] = 1.0 - (0.001*mDt * ((((((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio) / var_intracellular_calcium_concentration__V_up_ratio) * ((((((((-var_intracellular_calcium_concentration__Ca_i) / pow(((var_intracellular_calcium_concentration__Ca_i + (((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca)) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs)) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca, 2.0)) * var_sarcoplasmic_reticulum_calcium_pump__alpha_up) * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca) - ((((var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca) / (((var_intracellular_calcium_concentration__Ca_i + (((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca)) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs)) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca)) * var_sarcoplasmic_reticulum_calcium_pump__beta_up)) + (((((var_intracellular_calcium_concentration__Ca_up * pow(var_sarcoplasmic_reticulum_calcium_pump__K_cyca, 2.0)) * pow(var_sarcoplasmic_reticulum_calcium_pump__K_xcs, 2.0)) / pow(var_sarcoplasmic_reticulum_calcium_pump__K_srca, 2.0)) / pow(((var_intracellular_calcium_concentration__Ca_i + (((var_intracellular_calcium_concentration__Ca_up * var_sarcoplasmic_reticulum_calcium_pump__K_cyca) * var_sarcoplasmic_reticulum_calcium_pump__K_xcs) / var_sarcoplasmic_reticulum_calcium_pump__K_srca)) + (var_sarcoplasmic_reticulum_calcium_pump__K_cyca * var_sarcoplasmic_reticulum_calcium_pump__K_xcs)) + var_sarcoplasmic_reticulum_calcium_pump__K_cyca, 2.0)) * var_sarcoplasmic_reticulum_calcium_pump__beta_up))) - 50.0));
00788 rJacobian[9][10] = 0.0;
00789 rJacobian[9][11] = 0.0;
00790 rJacobian[10][0] = (((((((((((((0.3183098861 * 0.001*mDt) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) * (1.0 - var_L_type_Ca_channel__FrICa)) * var_L_type_Ca_channel__P_CaK) * var_L_type_Ca_channel__P_Ca_L) * var_L_type_Ca_channel_d_gate__d) * var_L_type_Ca_channel_f_gate__f) * (var_membrane__V - 50.0)) / var_membrane__R) / var_membrane__T) / (1.0 - exp(((((-var_membrane__V) + 50.0) * var_membrane__F) / var_membrane__R) / var_membrane__T))) * ((var_intracellular_potassium_concentration__K_i * exp(((50.0 * var_membrane__F) / var_membrane__R) / var_membrane__T)) - (var_extracellular_potassium_concentration__K_o * exp(((((-var_membrane__V) + 50.0) * var_membrane__F) / var_membrane__R) / var_membrane__T)));
00791 rJacobian[10][1] = (((((((((((((0.3183098861 * 0.001*mDt) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) * var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaK) * var_L_type_Ca_channel__P_Ca_L) * var_L_type_Ca_channel_d_gate__d) * var_L_type_Ca_channel_f_gate__f) * (var_membrane__V - 50.0)) / var_membrane__R) / var_membrane__T) / (1.0 - exp(((((-var_membrane__V) + 50.0) * var_membrane__F) / var_membrane__R) / var_membrane__T))) * ((var_intracellular_potassium_concentration__K_i * exp(((50.0 * var_membrane__F) / var_membrane__R) / var_membrane__T)) - (var_extracellular_potassium_concentration__K_o * exp(((((-var_membrane__V) + 50.0) * var_membrane__F) / var_membrane__R) / var_membrane__T)));
00792 rJacobian[10][2] = 0.0;
00793 rJacobian[10][3] = 0.0;
00794 rJacobian[10][4] = 0.0;
00795 rJacobian[10][5] = 0.0;
00796 rJacobian[10][6] = 0.0;
00797 rJacobian[10][7] = 0.0;
00798 rJacobian[10][8] = 0.0;
00799 rJacobian[10][9] = 0.0;
00800 rJacobian[10][10] = 1.0 + ((((((0.3183098861 * 0.001*mDt) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) / var_membrane__F) * (((((((((((((var_time_independent_potassium_current__g_K1 * var_extracellular_potassium_concentration__K_o) / (var_extracellular_potassium_concentration__K_o + var_time_independent_potassium_current__K_mk1)) * var_membrane__R) * var_membrane__T) / var_membrane__F) / var_intracellular_potassium_concentration__K_i) / (1.0 + exp((((1.25 * ((var_membrane__V - (((var_membrane__R * var_membrane__T) / var_membrane__F) * log(var_extracellular_potassium_concentration__K_o / var_intracellular_potassium_concentration__K_i))) - 10.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T))) - (((((((1.25 * var_time_independent_potassium_current__g_K1) * var_extracellular_potassium_concentration__K_o) / (var_extracellular_potassium_concentration__K_o + var_time_independent_potassium_current__K_mk1)) * (var_membrane__V - (((var_membrane__R * var_membrane__T) / var_membrane__F) * log(var_extracellular_potassium_concentration__K_o / var_intracellular_potassium_concentration__K_i)))) / pow(1.0 + exp((((1.25 * ((var_membrane__V - (((var_membrane__R * var_membrane__T) / var_membrane__F) * log(var_extracellular_potassium_concentration__K_o / var_intracellular_potassium_concentration__K_i))) - 10.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T), 2.0)) / var_intracellular_potassium_concentration__K_i) * exp((((1.25 * ((var_membrane__V - (((var_membrane__R * var_membrane__T) / var_membrane__F) * log(var_extracellular_potassium_concentration__K_o / var_intracellular_potassium_concentration__K_i))) - 10.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T))) + (((((((var_rapid_delayed_rectifier_potassium_current__g_Kr1 * var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1) + (var_rapid_delayed_rectifier_potassium_current__g_Kr2 * var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2)) / (1.0 + exp((0.04464285714 * var_membrane__V) + 0.4017857143))) * var_membrane__R) * var_membrane__T) / var_membrane__F) / var_intracellular_potassium_concentration__K_i)) + (((((var_slow_delayed_rectifier_potassium_current__g_Ks * pow(var_slow_delayed_rectifier_potassium_current_xs_gate__xs, 2.0)) * var_membrane__R) * var_membrane__T) / var_membrane__F) / (var_intracellular_potassium_concentration__K_i + (var_reversal_potentials__P_kna * var_intracellular_sodium_concentration__Na_i)))) + ((((((((((((1.0 - var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaK) * var_L_type_Ca_channel__P_Ca_L) * var_L_type_Ca_channel_d_gate__d) * var_L_type_Ca_channel_f_gate__f) * var_L_type_Ca_channel_f2_gate__f2) * (var_membrane__V - 50.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T) / (1.0 - exp(((((-var_membrane__V) + 50.0) * var_membrane__F) / var_membrane__R) / var_membrane__T))) * exp(((50.0 * var_membrane__F) / var_membrane__R) / var_membrane__T))) + (((((((((((var_L_type_Ca_channel__FrICa * var_L_type_Ca_channel__P_CaK) * var_L_type_Ca_channel__P_Ca_L) * var_L_type_Ca_channel_d_gate__d) * var_L_type_Ca_channel_f_gate__f) * var_L_type_Ca_channel_f2ds_gate__f2ds) * (var_membrane__V - 50.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T) / (1.0 - exp(((((-var_membrane__V) + 50.0) * var_membrane__F) / var_membrane__R) / var_membrane__T))) * exp(((50.0 * var_membrane__F) / var_membrane__R) / var_membrane__T))) + ((((((var_transient_outward_current__g_to * (var_transient_outward_current__g_tos + (var_transient_outward_current_s_gate__s * (1.0 - var_transient_outward_current__g_tos)))) * var_transient_outward_current_r_gate__r) * var_membrane__R) * var_membrane__T) / var_membrane__F) / var_intracellular_potassium_concentration__K_i)));
00801 rJacobian[10][11] = (((((0.3183098861 * 0.001*mDt) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) / var_membrane__F) * ((((((((var_slow_delayed_rectifier_potassium_current__g_Ks * pow(var_slow_delayed_rectifier_potassium_current_xs_gate__xs, 2.0)) * var_membrane__R) * var_membrane__T) / var_membrane__F) / (var_intracellular_potassium_concentration__K_i + (var_reversal_potentials__P_kna * var_intracellular_sodium_concentration__Na_i))) * var_reversal_potentials__P_kna) - ((((2.0 * var_sodium_potassium_pump__i_NaK_max) * var_extracellular_potassium_concentration__K_o) / (var_sodium_potassium_pump__K_mK + var_extracellular_potassium_concentration__K_o)) / (var_sodium_potassium_pump__K_mNa + var_intracellular_sodium_concentration__Na_i))) + (((((2.0 * var_sodium_potassium_pump__i_NaK_max) * var_extracellular_potassium_concentration__K_o) / (var_sodium_potassium_pump__K_mK + var_extracellular_potassium_concentration__K_o)) * var_intracellular_sodium_concentration__Na_i) / pow(var_sodium_potassium_pump__K_mNa + var_intracellular_sodium_concentration__Na_i, 2.0)));
00802 rJacobian[11][0] = (((((((((((((0.3183098861 * 0.001*mDt) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) * (1.0 - var_L_type_Ca_channel__FrICa)) * var_L_type_Ca_channel__P_CaNa) * var_L_type_Ca_channel__P_Ca_L) * var_L_type_Ca_channel_d_gate__d) * var_L_type_Ca_channel_f_gate__f) * (var_membrane__V - 50.0)) / var_membrane__R) / var_membrane__T) / (1.0 - exp(((((-var_membrane__V) + 50.0) * var_membrane__F) / var_membrane__R) / var_membrane__T))) * ((var_intracellular_sodium_concentration__Na_i * exp(((50.0 * var_membrane__F) / var_membrane__R) / var_membrane__T)) - (var_extracellular_sodium_concentration__Na_o * exp(((((-var_membrane__V) + 50.0) * var_membrane__F) / var_membrane__R) / var_membrane__T)));
00803 rJacobian[11][1] = (((((((((((((0.3183098861 * 0.001*mDt) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) * var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaNa) * var_L_type_Ca_channel__P_Ca_L) * var_L_type_Ca_channel_d_gate__d) * var_L_type_Ca_channel_f_gate__f) * (var_membrane__V - 50.0)) / var_membrane__R) / var_membrane__T) / (1.0 - exp(((((-var_membrane__V) + 50.0) * var_membrane__F) / var_membrane__R) / var_membrane__T))) * ((var_intracellular_sodium_concentration__Na_i * exp(((50.0 * var_membrane__F) / var_membrane__R) / var_membrane__T)) - (var_extracellular_sodium_concentration__Na_o * exp(((((-var_membrane__V) + 50.0) * var_membrane__F) / var_membrane__R) / var_membrane__T)));
00804 rJacobian[11][2] = 0.0;
00805 rJacobian[11][3] = 0.0;
00806 rJacobian[11][4] = 0.0;
00807 rJacobian[11][5] = 0.0;
00808 rJacobian[11][6] = 0.0;
00809 rJacobian[11][7] = (((((0.3183098861 * 0.001*mDt) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) / var_membrane__F) * (((((((((-3.0) * (1.0 - var_sodium_calcium_exchanger__FRiNaCa)) * var_sodium_calcium_exchanger__k_NaCa) * exp((((((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T)) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) / (1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_i * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))))) / (1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_i))) - (((((((3.0 * (1.0 - var_sodium_calcium_exchanger__FRiNaCa)) * var_sodium_calcium_exchanger__k_NaCa) * (((exp(((((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_extracellular_calcium_concentration__Ca_o) - ((exp((((((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) * var_intracellular_calcium_concentration__Ca_i))) / pow(1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_i * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))), 2.0)) / (1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_i))) * var_sodium_calcium_exchanger__d_NaCa) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa))) - (((((434.7826086 * (1.0 - var_sodium_calcium_exchanger__FRiNaCa)) * var_sodium_calcium_exchanger__k_NaCa) * (((exp(((((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_extracellular_calcium_concentration__Ca_o) - ((exp((((((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) * var_intracellular_calcium_concentration__Ca_i))) / (1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_i * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))))) / pow(1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_i), 2.0)));
00810 rJacobian[11][8] = 0.0;
00811 rJacobian[11][9] = 0.0;
00812 rJacobian[11][10] = ((((((((((0.03819718633 * 0.001*mDt) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) / pow(var_membrane__F, 2.0)) * var_fast_sodium_current__g_Na) * pow(var_fast_sodium_current_m_gate__m, 3.0)) * var_fast_sodium_current_h_gate__h) * var_membrane__R) * var_membrane__T) / (var_intracellular_sodium_concentration__Na_i + (0.12 * var_intracellular_potassium_concentration__K_i));
00813 rJacobian[11][11] = 1.0 + ((((((0.3183098861 * 0.001*mDt) / pow(var_intracellular_calcium_concentration__radius, 2.0)) / var_intracellular_calcium_concentration__length) / (((1.0 - var_intracellular_calcium_concentration__V_e_ratio) - var_intracellular_calcium_concentration__V_up_ratio) - var_intracellular_calcium_concentration__V_rel_ratio)) / var_membrane__F) * ((((((((((((((var_fast_sodium_current__g_Na * pow(var_fast_sodium_current_m_gate__m, 3.0)) * var_fast_sodium_current_h_gate__h) * var_membrane__R) * var_membrane__T) / var_membrane__F) / (var_intracellular_sodium_concentration__Na_i + (0.12 * var_intracellular_potassium_concentration__K_i))) + (((((var_persistent_sodium_current__g_pna / (1.0 + exp((((-1.0) / 8.0) * var_membrane__V) - (13.0 / 2.0)))) * var_membrane__R) * var_membrane__T) / var_membrane__F) / var_intracellular_sodium_concentration__Na_i)) + ((((var_sodium_background_current__g_bna * var_membrane__R) * var_membrane__T) / var_membrane__F) / var_intracellular_sodium_concentration__Na_i)) + ((((3.0 * var_sodium_potassium_pump__i_NaK_max) * var_extracellular_potassium_concentration__K_o) / (var_sodium_potassium_pump__K_mK + var_extracellular_potassium_concentration__K_o)) / (var_sodium_potassium_pump__K_mNa + var_intracellular_sodium_concentration__Na_i))) - (((((3.0 * var_sodium_potassium_pump__i_NaK_max) * var_extracellular_potassium_concentration__K_o) / (var_sodium_potassium_pump__K_mK + var_extracellular_potassium_concentration__K_o)) * var_intracellular_sodium_concentration__Na_i) / pow(var_sodium_potassium_pump__K_mNa + var_intracellular_sodium_concentration__Na_i, 2.0))) + (((((((((3.0 * (1.0 - var_sodium_calcium_exchanger__FRiNaCa)) * var_sodium_calcium_exchanger__k_NaCa) * exp(((((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T)) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_sodium_calcium_exchanger__n_NaCa) / var_intracellular_sodium_concentration__Na_i) * var_extracellular_calcium_concentration__Ca_o) / (1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_i * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))))) / (1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_i)))) - ((((((((((3.0 * (1.0 - var_sodium_calcium_exchanger__FRiNaCa)) * var_sodium_calcium_exchanger__k_NaCa) * (((exp(((((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_extracellular_calcium_concentration__Ca_o) - ((exp((((((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0)) * var_membrane__V) * var_membrane__F) / var_membrane__R) / var_membrane__T) * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) * var_intracellular_calcium_concentration__Ca_i))) / pow(1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_intracellular_calcium_concentration__Ca_i * pow(var_extracellular_sodium_concentration__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_extracellular_calcium_concentration__Ca_o * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)))), 2.0)) / (1.0 + (144.9275362 * var_intracellular_calcium_concentration__Ca_i))) * var_sodium_calcium_exchanger__d_NaCa) * var_extracellular_calcium_concentration__Ca_o) * pow(var_intracellular_sodium_concentration__Na_i, var_sodium_calcium_exchanger__n_NaCa)) * var_sodium_calcium_exchanger__n_NaCa) / var_intracellular_sodium_concentration__Na_i)) + ((((((((((((1.0 - var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaNa) * var_L_type_Ca_channel__P_Ca_L) * var_L_type_Ca_channel_d_gate__d) * var_L_type_Ca_channel_f_gate__f) * var_L_type_Ca_channel_f2_gate__f2) * (var_membrane__V - 50.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T) / (1.0 - exp(((((-var_membrane__V) + 50.0) * var_membrane__F) / var_membrane__R) / var_membrane__T))) * exp(((50.0 * var_membrane__F) / var_membrane__R) / var_membrane__T))) + (((((((((((var_L_type_Ca_channel__FrICa * var_L_type_Ca_channel__P_CaNa) * var_L_type_Ca_channel__P_Ca_L) * var_L_type_Ca_channel_d_gate__d) * var_L_type_Ca_channel_f_gate__f) * var_L_type_Ca_channel_f2ds_gate__f2ds) * (var_membrane__V - 50.0)) * var_membrane__F) / var_membrane__R) / var_membrane__T) / (1.0 - exp(((((-var_membrane__V) + 50.0) * var_membrane__F) / var_membrane__R) / var_membrane__T))) * exp(((50.0 * var_membrane__F) / var_membrane__R) / var_membrane__T))));
00814 }
00815
00816 protected:
00817 void UpdateTransmembranePotential(double var_environment__time)
00818 {
00819
00820 var_environment__time *= 0.001;
00821 std::vector<double>& rY = rGetStateVariables();
00822 double var_membrane__V = rY[0];
00823
00824 double var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = rY[1];
00825
00826 double var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = rY[2];
00827
00828 double var_slow_delayed_rectifier_potassium_current_xs_gate__xs = rY[3];
00829
00830 double var_fast_sodium_current_m_gate__m = rY[4];
00831
00832 double var_fast_sodium_current_h_gate__h = rY[5];
00833
00834 double var_L_type_Ca_channel_d_gate__d = rY[6];
00835
00836 double var_L_type_Ca_channel_f_gate__f = rY[7];
00837
00838 double var_L_type_Ca_channel_f2_gate__f2 = rY[8];
00839
00840 double var_L_type_Ca_channel_f2ds_gate__f2ds = rY[9];
00841
00842 double var_transient_outward_current_s_gate__s = rY[10];
00843
00844 double var_transient_outward_current_r_gate__r = rY[11];
00845
00846 double var_intracellular_sodium_concentration__Na_i = rY[14];
00847
00848 double var_intracellular_potassium_concentration__K_i = rY[15];
00849
00850 double var_intracellular_calcium_concentration__Ca_i = rY[16];
00851
00852 double var_intracellular_calcium_concentration__Ca_ds = rY[17];
00853
00854
00855 const double var_membrane__R = 8314.472;
00856 const double var_membrane__T = 310.0;
00857 const double var_membrane__F = 96485.3415;
00858 const double var_membrane__Cm = 9.5e-05;
00859
00860 double var_reversal_potentials__K_i = var_intracellular_potassium_concentration__K_i;
00861 double var_reversal_potentials__R = var_membrane__R;
00862 double var_reversal_potentials__T = var_membrane__T;
00863 double var_reversal_potentials__F = var_membrane__F;
00864 const double var_extracellular_potassium_concentration__K_o = 4.0;
00865 double var_reversal_potentials__K_o = var_extracellular_potassium_concentration__K_o;
00866 double var_reversal_potentials__E_K = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log(var_reversal_potentials__K_o / var_reversal_potentials__K_i);
00867 double var_time_independent_potassium_current__E_K = var_reversal_potentials__E_K;
00868 double var_time_independent_potassium_current__K_o = var_extracellular_potassium_concentration__K_o;
00869 double var_time_independent_potassium_current__R = var_membrane__R;
00870 double var_time_independent_potassium_current__V = var_membrane__V;
00871 double var_time_independent_potassium_current__T = var_membrane__T;
00872 const double var_time_independent_potassium_current__K_mk1 = 10.0;
00873 const double var_time_independent_potassium_current__g_K1 = 0.5;
00874 double var_time_independent_potassium_current__F = var_membrane__F;
00875 double var_time_independent_potassium_current__i_K1 = (((var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K_o) / (var_time_independent_potassium_current__K_o + var_time_independent_potassium_current__K_mk1)) * (var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K)) / (1.0 + exp((((var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K) - 10.0) * var_time_independent_potassium_current__F * 1.25) / (var_time_independent_potassium_current__R * var_time_independent_potassium_current__T)));
00876 double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00877 double var_transient_outward_current__s = var_transient_outward_current_s_gate__s;
00878 double var_transient_outward_current__r = var_transient_outward_current_r_gate__r;
00879 const double var_transient_outward_current__g_to = 0.005;
00880 double var_transient_outward_current__V = var_membrane__V;
00881 double var_transient_outward_current__E_K = var_reversal_potentials__E_K;
00882 const double var_transient_outward_current__g_tos = 0.0;
00883 double var_transient_outward_current__i_to = var_transient_outward_current__g_to * (var_transient_outward_current__g_tos + (var_transient_outward_current__s * (1.0 - var_transient_outward_current__g_tos))) * var_transient_outward_current__r * (var_transient_outward_current__V - var_transient_outward_current__E_K);
00884 double var_membrane__i_to = var_transient_outward_current__i_to;
00885 const double var_rapid_delayed_rectifier_potassium_current__g_Kr2 = 0.0013;
00886 const double var_rapid_delayed_rectifier_potassium_current__g_Kr1 = 0.0021;
00887 double var_rapid_delayed_rectifier_potassium_current__xr1 = var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1;
00888 double var_rapid_delayed_rectifier_potassium_current__xr2 = var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2;
00889 double var_rapid_delayed_rectifier_potassium_current__V = var_membrane__V;
00890 double var_rapid_delayed_rectifier_potassium_current__E_K = var_reversal_potentials__E_K;
00891 double var_rapid_delayed_rectifier_potassium_current__i_Kr = ((((var_rapid_delayed_rectifier_potassium_current__g_Kr1 * var_rapid_delayed_rectifier_potassium_current__xr1) + (var_rapid_delayed_rectifier_potassium_current__g_Kr2 * var_rapid_delayed_rectifier_potassium_current__xr2)) * 1.0) / (1.0 + exp((var_rapid_delayed_rectifier_potassium_current__V + 9.0) / 22.4))) * (var_rapid_delayed_rectifier_potassium_current__V - var_rapid_delayed_rectifier_potassium_current__E_K);
00892 double var_membrane__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
00893 double var_slow_delayed_rectifier_potassium_current__xs = var_slow_delayed_rectifier_potassium_current_xs_gate__xs;
00894 const double var_extracellular_sodium_concentration__Na_o = 140.0;
00895 double var_reversal_potentials__Na_o = var_extracellular_sodium_concentration__Na_o;
00896 double var_reversal_potentials__Na_i = var_intracellular_sodium_concentration__Na_i;
00897 const double var_reversal_potentials__P_kna = 0.03;
00898 double var_reversal_potentials__E_Ks = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log((var_reversal_potentials__K_o + (var_reversal_potentials__P_kna * var_reversal_potentials__Na_o)) / (var_reversal_potentials__K_i + (var_reversal_potentials__P_kna * var_reversal_potentials__Na_i)));
00899 double var_slow_delayed_rectifier_potassium_current__E_Ks = var_reversal_potentials__E_Ks;
00900 const double var_slow_delayed_rectifier_potassium_current__g_Ks = 0.0026;
00901 double var_slow_delayed_rectifier_potassium_current__V = var_membrane__V;
00902 double var_slow_delayed_rectifier_potassium_current__i_Ks = var_slow_delayed_rectifier_potassium_current__g_Ks * pow(var_slow_delayed_rectifier_potassium_current__xs, 2.0) * (var_slow_delayed_rectifier_potassium_current__V - var_slow_delayed_rectifier_potassium_current__E_Ks);
00903 double var_membrane__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
00904 double var_L_type_Ca_channel__d = var_L_type_Ca_channel_d_gate__d;
00905 const double var_L_type_Ca_channel__FrICa = 1.0;
00906 double var_L_type_Ca_channel__f = var_L_type_Ca_channel_f_gate__f;
00907 double var_L_type_Ca_channel__K_o = var_extracellular_potassium_concentration__K_o;
00908 double var_L_type_Ca_channel__K_i = var_intracellular_potassium_concentration__K_i;
00909 double var_L_type_Ca_channel__F = var_membrane__F;
00910 const double var_L_type_Ca_channel__P_Ca_L = 0.1;
00911 double var_L_type_Ca_channel__T = var_membrane__T;
00912 const double var_L_type_Ca_channel__P_CaK = 0.002;
00913 double var_L_type_Ca_channel__V = var_membrane__V;
00914 double var_L_type_Ca_channel__f2 = var_L_type_Ca_channel_f2_gate__f2;
00915 double var_L_type_Ca_channel__R = var_membrane__R;
00916 double var_L_type_Ca_channel__i_Ca_L_K_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaK * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__K_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__K_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00917 double var_membrane__i_Ca_L_K_cyt = var_L_type_Ca_channel__i_Ca_L_K_cyt;
00918 double var_L_type_Ca_channel__f2ds = var_L_type_Ca_channel_f2ds_gate__f2ds;
00919 double var_L_type_Ca_channel__i_Ca_L_K_ds = (((var_L_type_Ca_channel__FrICa * var_L_type_Ca_channel__P_CaK * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__K_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__K_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00920 double var_membrane__i_Ca_L_K_ds = var_L_type_Ca_channel__i_Ca_L_K_ds;
00921 const double var_sodium_potassium_pump__i_NaK_max = 0.7;
00922 double var_sodium_potassium_pump__Na_i = var_intracellular_sodium_concentration__Na_i;
00923 double var_sodium_potassium_pump__K_o = var_extracellular_potassium_concentration__K_o;
00924 const double var_sodium_potassium_pump__K_mNa = 40.0;
00925 const double var_sodium_potassium_pump__K_mK = 1.0;
00926 double var_sodium_potassium_pump__i_NaK = (((var_sodium_potassium_pump__i_NaK_max * var_sodium_potassium_pump__K_o) / (var_sodium_potassium_pump__K_mK + var_sodium_potassium_pump__K_o)) * var_sodium_potassium_pump__Na_i) / (var_sodium_potassium_pump__K_mNa + var_sodium_potassium_pump__Na_i);
00927 double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00928 const double var_fast_sodium_current__g_Na = 2.5;
00929 double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
00930 double var_fast_sodium_current__V = var_membrane__V;
00931 double var_reversal_potentials__E_mh = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log((var_reversal_potentials__Na_o + (0.12 * var_reversal_potentials__K_o)) / (var_reversal_potentials__Na_i + (0.12 * var_reversal_potentials__K_i)));
00932 double var_fast_sodium_current__E_mh = var_reversal_potentials__E_mh;
00933 double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
00934 double var_fast_sodium_current__i_Na = var_fast_sodium_current__g_Na * pow(var_fast_sodium_current__m, 3.0) * var_fast_sodium_current__h * (var_fast_sodium_current__V - var_fast_sodium_current__E_mh);
00935 double var_membrane__i_Na = var_fast_sodium_current__i_Na;
00936 double var_sodium_background_current__V = var_membrane__V;
00937 double var_reversal_potentials__E_Na = ((var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log(var_reversal_potentials__Na_o / var_reversal_potentials__Na_i);
00938 double var_sodium_background_current__E_Na = var_reversal_potentials__E_Na;
00939 const double var_sodium_background_current__g_bna = 0.0006;
00940 double var_sodium_background_current__i_b_Na = var_sodium_background_current__g_bna * (var_sodium_background_current__V - var_sodium_background_current__E_Na);
00941 double var_membrane__i_b_Na = var_sodium_background_current__i_b_Na;
00942 const double var_persistent_sodium_current__g_pna = 0.004;
00943 double var_persistent_sodium_current__V = var_membrane__V;
00944 double var_persistent_sodium_current__E_Na = var_reversal_potentials__E_Na;
00945 double var_persistent_sodium_current__i_p_Na = ((var_persistent_sodium_current__g_pna * 1.0) / (1.0 + exp((-(var_persistent_sodium_current__V + 52.0)) / 8.0))) * (var_persistent_sodium_current__V - var_persistent_sodium_current__E_Na);
00946 double var_membrane__i_p_Na = var_persistent_sodium_current__i_p_Na;
00947 const double var_L_type_Ca_channel__P_CaNa = 0.01;
00948 double var_L_type_Ca_channel__Na_o = var_extracellular_sodium_concentration__Na_o;
00949 double var_L_type_Ca_channel__Na_i = var_intracellular_sodium_concentration__Na_i;
00950 double var_L_type_Ca_channel__i_Ca_L_Na_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * var_L_type_Ca_channel__P_CaNa * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Na_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Na_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00951 double var_membrane__i_Ca_L_Na_cyt = var_L_type_Ca_channel__i_Ca_L_Na_cyt;
00952 double var_L_type_Ca_channel__i_Ca_L_Na_ds = (((var_L_type_Ca_channel__FrICa * var_L_type_Ca_channel__P_CaNa * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Na_i * exp((50.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Na_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00953 double var_membrane__i_Ca_L_Na_ds = var_L_type_Ca_channel__i_Ca_L_Na_ds;
00954 double var_sodium_calcium_exchanger__Na_i = var_intracellular_sodium_concentration__Na_i;
00955 const double var_sodium_calcium_exchanger__n_NaCa = 3.0;
00956 const double var_sodium_calcium_exchanger__gamma = 0.5;
00957 double var_sodium_calcium_exchanger__F = var_membrane__F;
00958 double var_sodium_calcium_exchanger__Na_o = var_extracellular_sodium_concentration__Na_o;
00959 const double var_sodium_calcium_exchanger__FRiNaCa = 0.001;
00960 double var_sodium_calcium_exchanger__R = var_membrane__R;
00961 double var_sodium_calcium_exchanger__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00962 double var_sodium_calcium_exchanger__T = var_membrane__T;
00963 double var_sodium_calcium_exchanger__V = var_membrane__V;
00964 const double var_sodium_calcium_exchanger__d_NaCa = 0.0;
00965 const double var_extracellular_calcium_concentration__Ca_o = 2.0;
00966 double var_sodium_calcium_exchanger__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00967 const double var_sodium_calcium_exchanger__k_NaCa = 0.0005;
00968 double var_sodium_calcium_exchanger__i_NaCa_cyt = ((1.0 - var_sodium_calcium_exchanger__FRiNaCa) * var_sodium_calcium_exchanger__k_NaCa * ((exp((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_o) - (exp(((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_i))) / ((1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_sodium_calcium_exchanger__Ca_i * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_sodium_calcium_exchanger__Ca_o * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa))))) * (1.0 + (var_sodium_calcium_exchanger__Ca_i / 0.0069)));
00969 double var_membrane__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
00970 double var_sodium_calcium_exchanger__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
00971 double var_sodium_calcium_exchanger__i_NaCa_ds = (var_sodium_calcium_exchanger__FRiNaCa * var_sodium_calcium_exchanger__k_NaCa * ((exp((var_sodium_calcium_exchanger__gamma * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_o) - (exp(((var_sodium_calcium_exchanger__gamma - 1.0) * (var_sodium_calcium_exchanger__n_NaCa - 2.0) * var_sodium_calcium_exchanger__V * var_sodium_calcium_exchanger__F) / (var_sodium_calcium_exchanger__R * var_sodium_calcium_exchanger__T)) * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa) * var_sodium_calcium_exchanger__Ca_ds))) / ((1.0 + (var_sodium_calcium_exchanger__d_NaCa * ((var_sodium_calcium_exchanger__Ca_ds * pow(var_sodium_calcium_exchanger__Na_o, var_sodium_calcium_exchanger__n_NaCa)) + (var_sodium_calcium_exchanger__Ca_o * pow(var_sodium_calcium_exchanger__Na_i, var_sodium_calcium_exchanger__n_NaCa))))) * (1.0 + (var_sodium_calcium_exchanger__Ca_ds / 0.0069)));
00972 double var_membrane__i_NaCa_ds = var_sodium_calcium_exchanger__i_NaCa_ds;
00973 double var_L_type_Ca_channel__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00974 double var_L_type_Ca_channel__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00975 double var_L_type_Ca_channel__i_Ca_L_Ca_cyt = ((((1.0 - var_L_type_Ca_channel__FrICa) * 4.0 * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2 * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Ca_i * exp((100.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Ca_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00976 double var_membrane__i_Ca_L_Ca_cyt = var_L_type_Ca_channel__i_Ca_L_Ca_cyt;
00977 double var_L_type_Ca_channel__i_Ca_L_Ca_ds = (((var_L_type_Ca_channel__FrICa * 4.0 * var_L_type_Ca_channel__P_Ca_L * var_L_type_Ca_channel__d * var_L_type_Ca_channel__f * var_L_type_Ca_channel__f2ds * (var_L_type_Ca_channel__V - 50.0) * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)) / (1.0 - exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T)))) * ((var_L_type_Ca_channel__Ca_i * exp((100.0 * var_L_type_Ca_channel__F) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))) - (var_L_type_Ca_channel__Ca_o * exp(((-(var_L_type_Ca_channel__V - 50.0)) * var_L_type_Ca_channel__F * 2.0) / (var_L_type_Ca_channel__R * var_L_type_Ca_channel__T))));
00978 double var_membrane__i_Ca_L_Ca_ds = var_L_type_Ca_channel__i_Ca_L_Ca_ds;
00979 double var_reversal_potentials__Ca_o = var_extracellular_calcium_concentration__Ca_o;
00980 double var_reversal_potentials__Ca_i = var_intracellular_calcium_concentration__Ca_i;
00981 double var_reversal_potentials__E_Ca = ((0.5 * var_reversal_potentials__R * var_reversal_potentials__T) / var_reversal_potentials__F) * log(var_reversal_potentials__Ca_o / var_reversal_potentials__Ca_i);
00982 double var_calcium_background_current__E_Ca = var_reversal_potentials__E_Ca;
00983 const double var_calcium_background_current__g_bca = 0.00025;
00984 double var_calcium_background_current__V = var_membrane__V;
00985 double var_calcium_background_current__i_b_Ca = var_calcium_background_current__g_bca * (var_calcium_background_current__V - var_calcium_background_current__E_Ca);
00986 double var_membrane__i_b_Ca = var_calcium_background_current__i_b_Ca;
00987
00988
00989
00990
00991
00992 double var_membrane__i_Stim = GetStimulus((1.0/0.001)*var_environment__time);
00993 double d_dt_membrane__V = ((-1.0) / var_membrane__Cm) * (var_membrane__i_Stim + var_membrane__i_K1 + var_membrane__i_to + var_membrane__i_Kr + var_membrane__i_Ks + var_membrane__i_NaK + var_membrane__i_Na + var_membrane__i_b_Na + var_membrane__i_p_Na + var_membrane__i_Ca_L_Na_cyt + var_membrane__i_Ca_L_Na_ds + var_membrane__i_NaCa_cyt + var_membrane__i_NaCa_ds + var_membrane__i_Ca_L_Ca_cyt + var_membrane__i_Ca_L_Ca_ds + var_membrane__i_Ca_L_K_cyt + var_membrane__i_Ca_L_K_ds + var_membrane__i_b_Ca);
00994
00995 rY[0] += mDt * 0.001*d_dt_membrane__V;
00996 }
00997
00998 void ComputeOneStepExceptVoltage(double var_environment__time)
00999 {
01000
01001 var_environment__time *= 0.001;
01002 std::vector<double>& rY = rGetStateVariables();
01003 double var_membrane__V = rY[0];
01004
01005
01006 double var_transient_outward_current__V = var_membrane__V;
01007 double var_rapid_delayed_rectifier_potassium_current__V = var_membrane__V;
01008 double var_slow_delayed_rectifier_potassium_current__V = var_membrane__V;
01009 double var_L_type_Ca_channel__V = var_membrane__V;
01010 double var_fast_sodium_current__V = var_membrane__V;
01011 double var_rapid_delayed_rectifier_potassium_current_xr1_gate__V = var_rapid_delayed_rectifier_potassium_current__V;
01012 double var_rapid_delayed_rectifier_potassium_current_xr1_gate__alpha_xr1 = 50.0 / (1.0 + exp((-(var_rapid_delayed_rectifier_potassium_current_xr1_gate__V - 5.0)) / 9.0));
01013 double var_rapid_delayed_rectifier_potassium_current_xr1_gate__beta_xr1 = 0.05 * exp((-(var_rapid_delayed_rectifier_potassium_current_xr1_gate__V - 20.0)) / 15.0);
01014 double var_rapid_delayed_rectifier_potassium_current_xr2_gate__V = var_rapid_delayed_rectifier_potassium_current__V;
01015 double var_rapid_delayed_rectifier_potassium_current_xr2_gate__alpha_xr2 = 50.0 / (1.0 + exp((-(var_rapid_delayed_rectifier_potassium_current_xr2_gate__V - 5.0)) / 9.0));
01016 double var_rapid_delayed_rectifier_potassium_current_xr2_gate__beta_xr2 = 0.4 * exp(-pow((var_rapid_delayed_rectifier_potassium_current_xr2_gate__V + 30.0) / 30.0, 3.0));
01017 double var_slow_delayed_rectifier_potassium_current_xs_gate__V = var_slow_delayed_rectifier_potassium_current__V;
01018 double var_slow_delayed_rectifier_potassium_current_xs_gate__alpha_xs = 14.0 / (1.0 + exp((-(var_slow_delayed_rectifier_potassium_current_xs_gate__V - 40.0)) / 9.0));
01019 double var_slow_delayed_rectifier_potassium_current_xs_gate__beta_xs = 1.0 * exp((-var_slow_delayed_rectifier_potassium_current_xs_gate__V) / 45.0);
01020 double var_fast_sodium_current_m_gate__V = var_fast_sodium_current__V;
01021 double var_fast_sodium_current_m_gate__E0_m = var_fast_sodium_current_m_gate__V + 41.0;
01022 const double var_fast_sodium_current_m_gate__delta_m = 1e-05;
01023 double var_fast_sodium_current_m_gate__alpha_m = (fabs(var_fast_sodium_current_m_gate__E0_m) < var_fast_sodium_current_m_gate__delta_m) ? 2000.0 : ((200.0 * var_fast_sodium_current_m_gate__E0_m) / (1.0 - exp((-0.1) * var_fast_sodium_current_m_gate__E0_m)));
01024 double var_fast_sodium_current_m_gate__beta_m = 8000.0 * exp((-0.056) * (var_fast_sodium_current_m_gate__V + 66.0));
01025 double var_fast_sodium_current_h_gate__V = var_fast_sodium_current__V;
01026 const double var_fast_sodium_current_h_gate__shift_h = 0.0;
01027 double var_fast_sodium_current_h_gate__alpha_h = 20.0 * exp((-0.125) * ((var_fast_sodium_current_h_gate__V + 75.0) - var_fast_sodium_current_h_gate__shift_h));
01028 double var_fast_sodium_current_h_gate__beta_h = 2000.0 / (1.0 + (320.0 * exp((-0.1) * ((var_fast_sodium_current_h_gate__V + 75.0) - var_fast_sodium_current_h_gate__shift_h))));
01029 double var_L_type_Ca_channel_d_gate__V = var_L_type_Ca_channel__V;
01030 double var_L_type_Ca_channel_d_gate__E0_d = (var_L_type_Ca_channel_d_gate__V + 24.0) - 5.0;
01031 double var_L_type_Ca_channel_d_gate__alpha_d = (fabs(var_L_type_Ca_channel_d_gate__E0_d) < 0.0001) ? 120.0 : ((30.0 * var_L_type_Ca_channel_d_gate__E0_d) / (1.0 - exp((-var_L_type_Ca_channel_d_gate__E0_d) / 4.0)));
01032 double var_L_type_Ca_channel_d_gate__beta_d = (fabs(var_L_type_Ca_channel_d_gate__E0_d) < 0.0001) ? 120.0 : ((12.0 * var_L_type_Ca_channel_d_gate__E0_d) / (exp(var_L_type_Ca_channel_d_gate__E0_d / 10.0) - 1.0));
01033 const double var_L_type_Ca_channel_d_gate__speed_d = 3.0;
01034 double var_L_type_Ca_channel_f_gate__V = var_L_type_Ca_channel__V;
01035 double var_L_type_Ca_channel_f_gate__E0_f = var_L_type_Ca_channel_f_gate__V + 34.0;
01036 const double var_L_type_Ca_channel_f_gate__delta_f = 0.0001;
01037 double var_L_type_Ca_channel_f_gate__alpha_f = (fabs(var_L_type_Ca_channel_f_gate__E0_f) < var_L_type_Ca_channel_f_gate__delta_f) ? 25.0 : ((6.25 * var_L_type_Ca_channel_f_gate__E0_f) / (exp(var_L_type_Ca_channel_f_gate__E0_f / 4.0) - 1.0));
01038 double var_L_type_Ca_channel_f_gate__beta_f = 12.0 / (1.0 + exp(((-1.0) * (var_L_type_Ca_channel_f_gate__V + 34.0)) / 4.0));
01039 const double var_L_type_Ca_channel_f_gate__speed_f = 0.3;
01040 double var_transient_outward_current_s_gate__V = var_transient_outward_current__V;
01041 double var_transient_outward_current_s_gate__alpha_s = 0.033 * exp((-var_transient_outward_current_s_gate__V) / 17.0);
01042 double var_transient_outward_current_s_gate__beta_s = 33.0 / (1.0 + exp((-0.125) * (var_transient_outward_current_s_gate__V + 10.0)));
01043
01044 const double _g_0 = var_L_type_Ca_channel_d_gate__speed_d * (var_L_type_Ca_channel_d_gate__alpha_d * 1.0);
01045 const double _h_0 = var_L_type_Ca_channel_d_gate__speed_d * ((var_L_type_Ca_channel_d_gate__alpha_d * (-1.0)) - (var_L_type_Ca_channel_d_gate__beta_d * 1.0));
01046 const double _g_1 = var_L_type_Ca_channel_f_gate__speed_f * (var_L_type_Ca_channel_f_gate__alpha_f * 1.0);
01047 const double _h_1 = var_L_type_Ca_channel_f_gate__speed_f * ((var_L_type_Ca_channel_f_gate__alpha_f * (-1.0)) - (var_L_type_Ca_channel_f_gate__beta_f * 1.0));
01048 const double _g_2 = var_fast_sodium_current_h_gate__alpha_h * 1.0;
01049 const double _h_2 = (var_fast_sodium_current_h_gate__alpha_h * (-1.0)) - (var_fast_sodium_current_h_gate__beta_h * 1.0);
01050 const double _g_3 = var_fast_sodium_current_m_gate__alpha_m * 1.0;
01051 const double _h_3 = (var_fast_sodium_current_m_gate__alpha_m * (-1.0)) - (var_fast_sodium_current_m_gate__beta_m * 1.0);
01052 const double _g_4 = var_rapid_delayed_rectifier_potassium_current_xr1_gate__alpha_xr1 * 1.0;
01053 const double _h_4 = (var_rapid_delayed_rectifier_potassium_current_xr1_gate__alpha_xr1 * (-1.0)) - (var_rapid_delayed_rectifier_potassium_current_xr1_gate__beta_xr1 * 1.0);
01054 const double _g_5 = var_rapid_delayed_rectifier_potassium_current_xr2_gate__alpha_xr2 * 1.0;
01055 const double _h_5 = (var_rapid_delayed_rectifier_potassium_current_xr2_gate__alpha_xr2 * (-1.0)) - (var_rapid_delayed_rectifier_potassium_current_xr2_gate__beta_xr2 * 1.0);
01056 const double _g_6 = var_slow_delayed_rectifier_potassium_current_xs_gate__alpha_xs * 1.0;
01057 const double _h_6 = (var_slow_delayed_rectifier_potassium_current_xs_gate__alpha_xs * (-1.0)) - (var_slow_delayed_rectifier_potassium_current_xs_gate__beta_xs * 1.0);
01058 const double _g_7 = 333.0 * (1.0 / (1.0 + exp((-(var_membrane__V + 4.0)) / 5.0)));
01059 const double _h_7 = 333.0 * (-1.0);
01060 const double _g_8 = var_transient_outward_current_s_gate__alpha_s * 1.0;
01061 const double _h_8 = (var_transient_outward_current_s_gate__alpha_s * (-1.0)) - (var_transient_outward_current_s_gate__beta_s * 1.0);
01062
01063 const double dt = mDt*0.001;
01064 rY[1] = (rY[1] + _g_4*dt) / (1 - _h_4*dt);
01065 rY[2] = (rY[2] + _g_5*dt) / (1 - _h_5*dt);
01066 rY[3] = (rY[3] + _g_6*dt) / (1 - _h_6*dt);
01067 rY[4] = (rY[4] + _g_3*dt) / (1 - _h_3*dt);
01068 rY[5] = (rY[5] + _g_2*dt) / (1 - _h_2*dt);
01069 rY[6] = (rY[6] + _g_0*dt) / (1 - _h_0*dt);
01070 rY[7] = (rY[7] + _g_1*dt) / (1 - _h_1*dt);
01071 rY[10] = (rY[10] + _g_8*dt) / (1 - _h_8*dt);
01072 rY[11] = (rY[11] + _g_7*dt) / (1 - _h_7*dt);
01073
01074 double _guess[12] = {rY[8],rY[9],rY[12],rY[13],rY[20],rY[21],rY[17],rY[16],rY[19],rY[18],rY[15],rY[14]};
01075 CardiacNewtonSolver<12> *_solver = CardiacNewtonSolver<12>::Instance();
01076 _solver->Solve(*this, _guess);
01077 rY[8] = _guess[0];
01078 rY[9] = _guess[1];
01079 rY[12] = _guess[2];
01080 rY[13] = _guess[3];
01081 rY[20] = _guess[4];
01082 rY[21] = _guess[5];
01083 rY[17] = _guess[6];
01084 rY[16] = _guess[7];
01085 rY[19] = _guess[8];
01086 rY[18] = _guess[9];
01087 rY[15] = _guess[10];
01088 rY[14] = _guess[11];
01089 }
01090
01091 };
01092
01093
01094 template<>
01095 void OdeSystemInformation<BackwardEulerNobleVargheseKohlNoble1998>::Initialise(void)
01096 {
01097
01098
01099
01100
01101
01102
01103 this->mVariableNames.push_back("V");
01104 this->mVariableUnits.push_back("millivolt");
01105 this->mInitialConditions.push_back(-92.849333);
01106
01107 this->mVariableNames.push_back("xr1");
01108 this->mVariableUnits.push_back("dimensionless");
01109 this->mInitialConditions.push_back(1.03e-5);
01110
01111 this->mVariableNames.push_back("xr2");
01112 this->mVariableUnits.push_back("dimensionless");
01113 this->mInitialConditions.push_back(2e-7);
01114
01115 this->mVariableNames.push_back("xs");
01116 this->mVariableUnits.push_back("dimensionless");
01117 this->mInitialConditions.push_back(0.001302);
01118
01119 this->mVariableNames.push_back("m");
01120 this->mVariableUnits.push_back("dimensionless");
01121 this->mInitialConditions.push_back(0.0016203);
01122
01123 this->mVariableNames.push_back("h");
01124 this->mVariableUnits.push_back("dimensionless");
01125 this->mInitialConditions.push_back(0.9944036);
01126
01127 this->mVariableNames.push_back("d");
01128 this->mVariableUnits.push_back("dimensionless");
01129 this->mInitialConditions.push_back(0);
01130
01131 this->mVariableNames.push_back("f");
01132 this->mVariableUnits.push_back("dimensionless");
01133 this->mInitialConditions.push_back(1);
01134
01135 this->mVariableNames.push_back("f2");
01136 this->mVariableUnits.push_back("dimensionless");
01137 this->mInitialConditions.push_back(0.9349197);
01138
01139 this->mVariableNames.push_back("f2ds");
01140 this->mVariableUnits.push_back("dimensionless");
01141 this->mInitialConditions.push_back(0.9651958);
01142
01143 this->mVariableNames.push_back("s");
01144 this->mVariableUnits.push_back("dimensionless");
01145 this->mInitialConditions.push_back(0.9948645);
01146
01147 this->mVariableNames.push_back("r");
01148 this->mVariableUnits.push_back("dimensionless");
01149 this->mInitialConditions.push_back(0);
01150
01151 this->mVariableNames.push_back("ActFrac");
01152 this->mVariableUnits.push_back("dimensionless");
01153 this->mInitialConditions.push_back(0.0042614);
01154
01155 this->mVariableNames.push_back("ProdFrac");
01156 this->mVariableUnits.push_back("dimensionless");
01157 this->mInitialConditions.push_back(0.4068154);
01158
01159 this->mVariableNames.push_back("Na_i");
01160 this->mVariableUnits.push_back("millimolar");
01161 this->mInitialConditions.push_back(7.3321223);
01162
01163 this->mVariableNames.push_back("K_i");
01164 this->mVariableUnits.push_back("millimolar");
01165 this->mInitialConditions.push_back(136.5644281);
01166
01167 this->mVariableNames.push_back("Ca_i");
01168 this->mVariableUnits.push_back("millimolar");
01169 this->mInitialConditions.push_back(1.4e-5);
01170
01171 this->mVariableNames.push_back("Ca_ds");
01172 this->mVariableUnits.push_back("millimolar");
01173 this->mInitialConditions.push_back(1.88e-5);
01174
01175 this->mVariableNames.push_back("Ca_up");
01176 this->mVariableUnits.push_back("millimolar");
01177 this->mInitialConditions.push_back(0.4531889);
01178
01179 this->mVariableNames.push_back("Ca_rel");
01180 this->mVariableUnits.push_back("millimolar");
01181 this->mInitialConditions.push_back(0.4481927);
01182
01183 this->mVariableNames.push_back("Ca_Calmod");
01184 this->mVariableUnits.push_back("millimolar");
01185 this->mInitialConditions.push_back(0.0005555);
01186
01187 this->mVariableNames.push_back("Ca_Trop");
01188 this->mVariableUnits.push_back("millimolar");
01189 this->mInitialConditions.push_back(0.0003542);
01190
01191 this->mInitialised = true;
01192 }
01193
01194 BOOST_CLASS_EXPORT(BackwardEulerNobleVargheseKohlNoble1998)
01195
01196 namespace boost
01197 {
01198 namespace serialization
01199 {
01204 template<class Archive>
01205 inline void save_construct_data(
01206 Archive & ar, const BackwardEulerNobleVargheseKohlNoble1998 * t, const unsigned int file_version)
01207 {
01208 const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver();
01209 const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction();
01210 ar << p_solver;
01211 ar << p_stimulus;
01212 }
01213
01220 template<class Archive>
01221 inline void load_construct_data(
01222 Archive & ar, BackwardEulerNobleVargheseKohlNoble1998 * t, const unsigned int file_version)
01223 {
01224 boost::shared_ptr<AbstractIvpOdeSolver> p_solver;
01225 boost::shared_ptr<AbstractStimulusFunction> p_stimulus;
01226 ar >> p_solver;
01227 ar >> p_stimulus;
01228 ::new(t)BackwardEulerNobleVargheseKohlNoble1998(p_solver, p_stimulus);
01229 }
01230 }
01231 }
01232
01233
01234 #endif