00001 #ifndef _FoxModel2002Modified_
00002 #define _FoxModel2002Modified_
00003
00004
00005
00006
00007
00008
00009 #include <cmath>
00010 #include <cassert>
00011 #include "AbstractCardiacCell.hpp"
00012 #include "Exception.hpp"
00013 #include "AbstractStimulusFunction.hpp"
00014 #include "OdeSystemInformation.hpp"
00015
00019 class FoxModel2002Modified : public AbstractCardiacCell
00020 {
00021 public:
00022 FoxModel2002Modified(AbstractIvpOdeSolver *pSolver,
00023 AbstractStimulusFunction *pIntracellularStimulus)
00024 : AbstractCardiacCell(pSolver, 13, 0, pIntracellularStimulus)
00025 {
00026 mpSystemInfo = OdeSystemInformation<FoxModel2002Modified>::Instance();
00027
00028 Init();
00029
00030 }
00031
00032 ~FoxModel2002Modified(void)
00033 {
00034 }
00035
00036
00037 double GetIIonic()
00038 {
00039 std::vector<double>& rY = rGetStateVariables();
00040 double var_membrane__V = rY[0];
00041
00042 double var_fast_sodium_current_m_gate__m = rY[1];
00043
00044 double var_fast_sodium_current_h_gate__h = rY[2];
00045
00046 double var_fast_sodium_current_j_gate__j = rY[3];
00047
00048 double var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr = rY[4];
00049
00050 double var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks = rY[5];
00051
00052 double var_transient_outward_potassium_current_X_to_gate__X_to = rY[6];
00053
00054 double var_transient_outward_potassium_current_Y_to_gate__Y_to = rY[7];
00055
00056 double var_L_type_Ca_current_f_gate__f = rY[8];
00057
00058 double var_L_type_Ca_current_d_gate__d = rY[9];
00059
00060 double var_L_type_Ca_current_f_Ca_gate__f_Ca = rY[10];
00061
00062 double var_calcium_dynamics__Ca_i = rY[11];
00063
00064
00065 const double var_membrane__R = 8.314;
00066 const double var_membrane__T = 310.0;
00067 const double var_membrane__F = 96.5;
00068 double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
00069 const double var_fast_sodium_current__g_Na = 12.8;
00070 double var_fast_sodium_current__j = var_fast_sodium_current_j_gate__j;
00071 double var_fast_sodium_current__T = var_membrane__T;
00072 double var_fast_sodium_current__R = var_membrane__R;
00073 const double var_standard_ionic_concentrations__Na_i = 10.0;
00074 double var_fast_sodium_current__Na_i = var_standard_ionic_concentrations__Na_i;
00075 const double var_standard_ionic_concentrations__Na_o = 138.0;
00076 double var_fast_sodium_current__Na_o = var_standard_ionic_concentrations__Na_o;
00077 double var_fast_sodium_current__F = var_membrane__F;
00078 double var_fast_sodium_current__E_Na = ((var_fast_sodium_current__R * var_fast_sodium_current__T) / var_fast_sodium_current__F) * log(var_fast_sodium_current__Na_o / var_fast_sodium_current__Na_i);
00079 double var_fast_sodium_current__V = var_membrane__V;
00080 double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
00081 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__j * (var_fast_sodium_current__V - var_fast_sodium_current__E_Na);
00082 double var_membrane__i_Na = var_fast_sodium_current__i_Na;
00083 const double var_L_type_Ca_current__P_Ca = 1.26e-05;
00084 double var_L_type_Ca_current__V = var_membrane__V;
00085 const double var_standard_ionic_concentrations__Ca_o = 2000.0;
00086 double var_L_type_Ca_current__Ca_o = var_standard_ionic_concentrations__Ca_o;
00087 double var_L_type_Ca_current__T = var_membrane__T;
00088 const double var_L_type_Ca_current__C_sc = 1.0;
00089 double var_L_type_Ca_current__Ca_i = var_calcium_dynamics__Ca_i;
00090 double var_L_type_Ca_current__R = var_membrane__R;
00091 double var_L_type_Ca_current__F = var_membrane__F;
00092 double var_L_type_Ca_current__i_Ca_max = ((((var_L_type_Ca_current__P_Ca / var_L_type_Ca_current__C_sc) * 4.0 * var_L_type_Ca_current__V * pow(var_L_type_Ca_current__F, 2.0)) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) * ((var_L_type_Ca_current__Ca_i * exp((2.0 * var_L_type_Ca_current__V * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T))) - (0.341 * var_L_type_Ca_current__Ca_o))) / (exp((2.0 * var_L_type_Ca_current__V * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) - 1.0);
00093 double var_L_type_Ca_current__d = var_L_type_Ca_current_d_gate__d;
00094 double var_L_type_Ca_current__f = var_L_type_Ca_current_f_gate__f;
00095 double var_L_type_Ca_current__f_Ca = var_L_type_Ca_current_f_Ca_gate__f_Ca;
00096 double var_L_type_Ca_current__i_Ca = var_L_type_Ca_current__i_Ca_max * var_L_type_Ca_current__f * var_L_type_Ca_current__d * var_L_type_Ca_current__f_Ca;
00097 double var_membrane__i_Ca = var_L_type_Ca_current__i_Ca;
00098 const double var_standard_ionic_concentrations__K_o = 4.0;
00099 double var_L_type_Ca_current__K_o = var_standard_ionic_concentrations__K_o;
00100 const double var_L_type_Ca_current__i_Ca_half = -0.265;
00101 const double var_L_type_Ca_current__P_CaK = 5.79e-07;
00102 const double var_standard_ionic_concentrations__K_i = 149.4;
00103 double var_L_type_Ca_current__K_i = var_standard_ionic_concentrations__K_i;
00104 double var_L_type_Ca_current__i_CaK = ((((((var_L_type_Ca_current__P_CaK / var_L_type_Ca_current__C_sc) * var_L_type_Ca_current__f * var_L_type_Ca_current__d * var_L_type_Ca_current__f_Ca) / (1.0 + (var_L_type_Ca_current__i_Ca_max / var_L_type_Ca_current__i_Ca_half))) * 1000.0 * var_L_type_Ca_current__V * pow(var_L_type_Ca_current__F, 2.0)) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) * ((var_L_type_Ca_current__K_i * exp((var_L_type_Ca_current__V * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T))) - var_L_type_Ca_current__K_o)) / (exp((var_L_type_Ca_current__V * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) - 1.0);
00105 double var_membrane__i_CaK = var_L_type_Ca_current__i_CaK;
00106 double var_rapid_activating_delayed_rectifiyer_K_current__V = var_membrane__V;
00107 double var_rapid_activating_delayed_rectifiyer_K_current__R_V = 1.0 / (1.0 + (2.5 * exp(0.1 * (var_rapid_activating_delayed_rectifiyer_K_current__V + 28.0))));
00108 double var_rapid_activating_delayed_rectifiyer_K_current__X_kr = var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr;
00109 double var_rapid_activating_delayed_rectifiyer_K_current__R = var_membrane__R;
00110 double var_rapid_activating_delayed_rectifiyer_K_current__K_o = var_standard_ionic_concentrations__K_o;
00111 double var_rapid_activating_delayed_rectifiyer_K_current__T = var_membrane__T;
00112 double var_rapid_activating_delayed_rectifiyer_K_current__K_i = var_standard_ionic_concentrations__K_i;
00113 double var_rapid_activating_delayed_rectifiyer_K_current__F = var_membrane__F;
00114 double var_rapid_activating_delayed_rectifiyer_K_current__E_K = ((var_rapid_activating_delayed_rectifiyer_K_current__R * var_rapid_activating_delayed_rectifiyer_K_current__T) / var_rapid_activating_delayed_rectifiyer_K_current__F) * log(var_rapid_activating_delayed_rectifiyer_K_current__K_o / var_rapid_activating_delayed_rectifiyer_K_current__K_i);
00115 const double var_rapid_activating_delayed_rectifiyer_K_current__g_Kr = 0.0136;
00116 double var_rapid_activating_delayed_rectifiyer_K_current__i_Kr = var_rapid_activating_delayed_rectifiyer_K_current__g_Kr * var_rapid_activating_delayed_rectifiyer_K_current__R_V * var_rapid_activating_delayed_rectifiyer_K_current__X_kr * sqrt(var_rapid_activating_delayed_rectifiyer_K_current__K_o / 4.0) * (var_rapid_activating_delayed_rectifiyer_K_current__V - var_rapid_activating_delayed_rectifiyer_K_current__E_K);
00117 double var_membrane__i_Kr = var_rapid_activating_delayed_rectifiyer_K_current__i_Kr;
00118 const double var_slow_activating_delayed_rectifiyer_K_current__g_Ks = 0.0245;
00119 double var_slow_activating_delayed_rectifiyer_K_current__V = var_membrane__V;
00120 double var_slow_activating_delayed_rectifiyer_K_current__K_i = var_standard_ionic_concentrations__K_i;
00121 double var_slow_activating_delayed_rectifiyer_K_current__F = var_membrane__F;
00122 double var_slow_activating_delayed_rectifiyer_K_current__K_o = var_standard_ionic_concentrations__K_o;
00123 double var_slow_activating_delayed_rectifiyer_K_current__T = var_membrane__T;
00124 double var_slow_activating_delayed_rectifiyer_K_current__Na_o = var_standard_ionic_concentrations__Na_o;
00125 double var_slow_activating_delayed_rectifiyer_K_current__R = var_membrane__R;
00126 double var_slow_activating_delayed_rectifiyer_K_current__Na_i = var_standard_ionic_concentrations__Na_i;
00127 double var_slow_activating_delayed_rectifiyer_K_current__E_Ks = ((var_slow_activating_delayed_rectifiyer_K_current__R * var_slow_activating_delayed_rectifiyer_K_current__T) / var_slow_activating_delayed_rectifiyer_K_current__F) * log((var_slow_activating_delayed_rectifiyer_K_current__K_o + (0.01833 * var_slow_activating_delayed_rectifiyer_K_current__Na_o)) / (var_slow_activating_delayed_rectifiyer_K_current__K_i + (0.01833 * var_slow_activating_delayed_rectifiyer_K_current__Na_i)));
00128 double var_slow_activating_delayed_rectifiyer_K_current__X_ks = var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks;
00129 double var_slow_activating_delayed_rectifiyer_K_current__i_Ks = var_slow_activating_delayed_rectifiyer_K_current__g_Ks * pow(var_slow_activating_delayed_rectifiyer_K_current__X_ks, 2.0) * (var_slow_activating_delayed_rectifiyer_K_current__V - var_slow_activating_delayed_rectifiyer_K_current__E_Ks);
00130 double var_membrane__i_Ks = var_slow_activating_delayed_rectifiyer_K_current__i_Ks;
00131 const double var_transient_outward_potassium_current__g_to = 0.23815;
00132 double var_transient_outward_potassium_current__V = var_membrane__V;
00133 double var_transient_outward_potassium_current__X_to = var_transient_outward_potassium_current_X_to_gate__X_to;
00134 double var_transient_outward_potassium_current__E_K = var_rapid_activating_delayed_rectifiyer_K_current__E_K;
00135 double var_transient_outward_potassium_current__Y_to = var_transient_outward_potassium_current_Y_to_gate__Y_to;
00136 double var_transient_outward_potassium_current__i_to = var_transient_outward_potassium_current__g_to * var_transient_outward_potassium_current__X_to * var_transient_outward_potassium_current__Y_to * (var_transient_outward_potassium_current__V - var_transient_outward_potassium_current__E_K);
00137 double var_membrane__i_to = var_transient_outward_potassium_current__i_to;
00138 const double var_time_independent_potassium_current__g_K1 = 2.8;
00139 double var_time_independent_potassium_current__F = var_membrane__F;
00140 double var_time_independent_potassium_current_K1_gate__F = var_time_independent_potassium_current__F;
00141 double var_time_independent_potassium_current__V = var_membrane__V;
00142 double var_time_independent_potassium_current_K1_gate__V = var_time_independent_potassium_current__V;
00143 double var_time_independent_potassium_current__T = var_membrane__T;
00144 double var_time_independent_potassium_current_K1_gate__T = var_time_independent_potassium_current__T;
00145 double var_time_independent_potassium_current__R = var_membrane__R;
00146 double var_time_independent_potassium_current_K1_gate__R = var_time_independent_potassium_current__R;
00147 double var_time_independent_potassium_current__E_K = var_rapid_activating_delayed_rectifiyer_K_current__E_K;
00148 double var_time_independent_potassium_current_K1_gate__E_K = var_time_independent_potassium_current__E_K;
00149 double var_time_independent_potassium_current_K1_gate__K1_infinity = 1.0 / (2.0 + exp(((1.62 * var_time_independent_potassium_current_K1_gate__F) / (var_time_independent_potassium_current_K1_gate__R * var_time_independent_potassium_current_K1_gate__T)) * (var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K)));
00150 double var_time_independent_potassium_current__K1_infinity = var_time_independent_potassium_current_K1_gate__K1_infinity;
00151 double var_time_independent_potassium_current__K_o = var_standard_ionic_concentrations__K_o;
00152 const double var_time_independent_potassium_current__K_mK1 = 13.0;
00153 double var_time_independent_potassium_current__i_K1 = ((var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K1_infinity * 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);
00154 double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00155 double var_plateau_potassium_current__V = var_membrane__V;
00156 double var_plateau_potassium_current__E_K = var_rapid_activating_delayed_rectifiyer_K_current__E_K;
00157 const double var_plateau_potassium_current__g_Kp = 0.002216;
00158 double var_plateau_potassium_current_Kp_gate__V = var_plateau_potassium_current__V;
00159 double var_plateau_potassium_current_Kp_gate__Kp_V = 1.0 / (1.0 + exp((7.488 - var_plateau_potassium_current_Kp_gate__V) / 5.98));
00160 double var_plateau_potassium_current__Kp_V = var_plateau_potassium_current_Kp_gate__Kp_V;
00161 double var_plateau_potassium_current__i_Kp = var_plateau_potassium_current__g_Kp * var_plateau_potassium_current__Kp_V * (var_plateau_potassium_current__V - var_plateau_potassium_current__E_K);
00162 double var_membrane__i_Kp = var_plateau_potassium_current__i_Kp;
00163 double var_Na_Ca_exchanger__Na_o = var_standard_ionic_concentrations__Na_o;
00164 const double var_Na_Ca_exchanger__K_NaCa = 1500.0;
00165 double var_Na_Ca_exchanger__V = var_membrane__V;
00166 double var_Na_Ca_exchanger__Ca_o = var_standard_ionic_concentrations__Ca_o;
00167 const double var_Na_Ca_exchanger__eta = 0.35;
00168 double var_Na_Ca_exchanger__Na_i = var_standard_ionic_concentrations__Na_i;
00169 double var_Na_Ca_exchanger__T = var_membrane__T;
00170 double var_Na_Ca_exchanger__R = var_membrane__R;
00171 const double var_Na_Ca_exchanger__K_sat = 0.2;
00172 const double var_Na_Ca_exchanger__K_mCa = 1380.0;
00173 double var_Na_Ca_exchanger__F = var_membrane__F;
00174 const double var_Na_Ca_exchanger__K_mNa = 87.5;
00175 double var_Na_Ca_exchanger__Ca_i = var_calcium_dynamics__Ca_i;
00176 double var_Na_Ca_exchanger__i_NaCa = (var_Na_Ca_exchanger__K_NaCa / ((pow(var_Na_Ca_exchanger__K_mNa, 3.0) + pow(var_Na_Ca_exchanger__Na_o, 3.0)) * (var_Na_Ca_exchanger__K_mCa + var_Na_Ca_exchanger__Ca_o) * (1.0 + (var_Na_Ca_exchanger__K_sat * exp(((var_Na_Ca_exchanger__eta - 1.0) * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)))))) * ((exp((var_Na_Ca_exchanger__eta * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * pow(var_Na_Ca_exchanger__Na_i, 3.0) * var_Na_Ca_exchanger__Ca_o) - (exp(((var_Na_Ca_exchanger__eta - 1.0) * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * pow(var_Na_Ca_exchanger__Na_o, 3.0) * var_Na_Ca_exchanger__Ca_i));
00177 double var_membrane__i_NaCa = var_Na_Ca_exchanger__i_NaCa;
00178 double var_sodium_potassium_pump__Na_i = var_standard_ionic_concentrations__Na_i;
00179 double var_sodium_potassium_pump__K_o = var_standard_ionic_concentrations__K_o;
00180 const double var_sodium_potassium_pump__i_NaK_max = 0.693;
00181 const double var_sodium_potassium_pump__K_mNai = 10.0;
00182 double var_sodium_potassium_pump__T = var_membrane__T;
00183 double var_sodium_potassium_pump__R = var_membrane__R;
00184 double var_sodium_potassium_pump__Na_o = var_standard_ionic_concentrations__Na_o;
00185 double var_sodium_potassium_pump__sigma = (1.0 / 7.0) * (exp(var_sodium_potassium_pump__Na_o / 67.3) - 1.0);
00186 double var_sodium_potassium_pump__V = var_membrane__V;
00187 double var_sodium_potassium_pump__F = var_membrane__F;
00188 double var_sodium_potassium_pump__f_NaK = 1.0 / (1.0 + (0.1245 * exp(((-0.1) * var_sodium_potassium_pump__V * var_sodium_potassium_pump__F) / (var_sodium_potassium_pump__R * var_sodium_potassium_pump__T))) + (0.0365 * var_sodium_potassium_pump__sigma * exp(((-var_sodium_potassium_pump__V) * var_sodium_potassium_pump__F) / (var_sodium_potassium_pump__R * var_sodium_potassium_pump__T))));
00189 const double var_sodium_potassium_pump__K_mKo = 1.5;
00190 double var_sodium_potassium_pump__i_NaK = (((var_sodium_potassium_pump__i_NaK_max * var_sodium_potassium_pump__f_NaK) / (1.0 + pow(var_sodium_potassium_pump__K_mNai / var_sodium_potassium_pump__Na_i, 1.5))) * var_sodium_potassium_pump__K_o) / (var_sodium_potassium_pump__K_o + var_sodium_potassium_pump__K_mKo);
00191 double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00192 const double var_sarcolemmal_calcium_pump__i_pCa_max = 0.05;
00193 double var_sarcolemmal_calcium_pump__Ca_i = var_calcium_dynamics__Ca_i;
00194 const double var_sarcolemmal_calcium_pump__K_mpCa = 0.05;
00195 double var_sarcolemmal_calcium_pump__i_p_Ca = (var_sarcolemmal_calcium_pump__i_pCa_max * var_sarcolemmal_calcium_pump__Ca_i) / (var_sarcolemmal_calcium_pump__K_mpCa + var_sarcolemmal_calcium_pump__Ca_i);
00196 double var_membrane__i_p_Ca = var_sarcolemmal_calcium_pump__i_p_Ca;
00197 const double var_calcium_background_current__g_Cab = 0.0003842;
00198 double var_calcium_background_current__R = var_membrane__R;
00199 double var_calcium_background_current__Ca_i = var_calcium_dynamics__Ca_i;
00200 double var_calcium_background_current__F = var_membrane__F;
00201 double var_calcium_background_current__Ca_o = var_standard_ionic_concentrations__Ca_o;
00202 double var_calcium_background_current__T = var_membrane__T;
00203 double var_calcium_background_current__E_Ca = ((var_calcium_background_current__R * var_calcium_background_current__T) / (2.0 * var_calcium_background_current__F)) * log(var_calcium_background_current__Ca_o / var_calcium_background_current__Ca_i);
00204 double var_calcium_background_current__V = var_membrane__V;
00205 double var_calcium_background_current__i_Ca_b = var_calcium_background_current__g_Cab * (var_calcium_background_current__V - var_calcium_background_current__E_Ca);
00206 double var_membrane__i_Ca_b = var_calcium_background_current__i_Ca_b;
00207 double var_sodium_background_current__V = var_membrane__V;
00208 const double var_sodium_background_current__g_Nab = 0.0031;
00209 double var_sodium_background_current__E_Na = var_fast_sodium_current__E_Na;
00210 double var_sodium_background_current__i_Na_b = var_sodium_background_current__g_Nab * (var_sodium_background_current__V - var_sodium_background_current__E_Na);
00211 double var_membrane__i_Na_b = var_sodium_background_current__i_Na_b;
00212
00213 return var_membrane__i_Na+var_membrane__i_Ca+var_membrane__i_CaK+var_membrane__i_Kr+var_membrane__i_Ks+var_membrane__i_to+var_membrane__i_K1+var_membrane__i_Kp+var_membrane__i_NaCa+var_membrane__i_NaK+var_membrane__i_p_Ca+var_membrane__i_Ca_b+var_membrane__i_Na_b;
00214 }
00215
00216 void EvaluateYDerivatives (
00217 double var_environment__time,
00218 const std::vector<double> &rY,
00219 std::vector<double> &rDY)
00220 {
00221
00222
00223 double var_membrane__V = rY[0];
00224
00225 double var_fast_sodium_current_m_gate__m = rY[1];
00226
00227 double var_fast_sodium_current_h_gate__h = rY[2];
00228
00229 double var_fast_sodium_current_j_gate__j = rY[3];
00230
00231 double var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr = rY[4];
00232
00233 double var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks = rY[5];
00234
00235 double var_transient_outward_potassium_current_X_to_gate__X_to = rY[6];
00236
00237 double var_transient_outward_potassium_current_Y_to_gate__Y_to = rY[7];
00238
00239 double var_L_type_Ca_current_f_gate__f = rY[8];
00240
00241 double var_L_type_Ca_current_d_gate__d = rY[9];
00242
00243 double var_L_type_Ca_current_f_Ca_gate__f_Ca = rY[10];
00244
00245 double var_calcium_dynamics__Ca_i = rY[11];
00246
00247 double var_calcium_dynamics__Ca_SR = rY[12];
00248
00249
00250
00251 #define COVERAGE_IGNORE
00252
00253 for (unsigned index=1; index<=10; index++)
00254 {
00255 if (!(0.0<=rY[index] && rY[index]<=1.0))
00256 {
00257 EXCEPTION(DumpState(rGetVariableNames()[index] +
00258 " gate has gone out of range. Check model parameters, for example spatial stepsize"));
00259 }
00260 }
00261 #undef COVERAGE_IGNORE
00262
00263
00264
00265 const double var_membrane__R = 8.314;
00266 const double var_membrane__T = 310.0;
00267 const double var_membrane__F = 96.5;
00268 double var_membrane__time = var_environment__time;
00269 double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
00270 const double var_fast_sodium_current__g_Na = 12.8;
00271 double var_fast_sodium_current__j = var_fast_sodium_current_j_gate__j;
00272 double var_fast_sodium_current__T = var_membrane__T;
00273 double var_fast_sodium_current__R = var_membrane__R;
00274 const double var_standard_ionic_concentrations__Na_i = 10.0;
00275 double var_fast_sodium_current__Na_i = var_standard_ionic_concentrations__Na_i;
00276 const double var_standard_ionic_concentrations__Na_o = 138.0;
00277 double var_fast_sodium_current__Na_o = var_standard_ionic_concentrations__Na_o;
00278 double var_fast_sodium_current__F = var_membrane__F;
00279 double var_fast_sodium_current__E_Na = ((var_fast_sodium_current__R * var_fast_sodium_current__T) / var_fast_sodium_current__F) * log(var_fast_sodium_current__Na_o / var_fast_sodium_current__Na_i);
00280 double var_fast_sodium_current__V = var_membrane__V;
00281 double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
00282 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__j * (var_fast_sodium_current__V - var_fast_sodium_current__E_Na);
00283 double var_membrane__i_Na = var_fast_sodium_current__i_Na;
00284 const double var_L_type_Ca_current__P_Ca = 1.26e-05;
00285 double var_L_type_Ca_current__V = var_membrane__V;
00286 const double var_standard_ionic_concentrations__Ca_o = 2000.0;
00287 double var_L_type_Ca_current__Ca_o = var_standard_ionic_concentrations__Ca_o;
00288 double var_L_type_Ca_current__T = var_membrane__T;
00289 const double var_L_type_Ca_current__C_sc = 1.0;
00290 double var_L_type_Ca_current__Ca_i = var_calcium_dynamics__Ca_i;
00291 double var_L_type_Ca_current__R = var_membrane__R;
00292 double var_L_type_Ca_current__F = var_membrane__F;
00293 double var_L_type_Ca_current__i_Ca_max = ((((var_L_type_Ca_current__P_Ca / var_L_type_Ca_current__C_sc) * 4.0 * var_L_type_Ca_current__V * pow(var_L_type_Ca_current__F, 2.0)) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) * ((var_L_type_Ca_current__Ca_i * exp((2.0 * var_L_type_Ca_current__V * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T))) - (0.341 * var_L_type_Ca_current__Ca_o))) / (exp((2.0 * var_L_type_Ca_current__V * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) - 1.0);
00294 double var_L_type_Ca_current__d = var_L_type_Ca_current_d_gate__d;
00295 double var_L_type_Ca_current__f = var_L_type_Ca_current_f_gate__f;
00296 double var_L_type_Ca_current__f_Ca = var_L_type_Ca_current_f_Ca_gate__f_Ca;
00297 double var_L_type_Ca_current__i_Ca = var_L_type_Ca_current__i_Ca_max * var_L_type_Ca_current__f * var_L_type_Ca_current__d * var_L_type_Ca_current__f_Ca;
00298 double var_membrane__i_Ca = var_L_type_Ca_current__i_Ca;
00299 const double var_standard_ionic_concentrations__K_o = 4.0;
00300 double var_L_type_Ca_current__K_o = var_standard_ionic_concentrations__K_o;
00301 const double var_L_type_Ca_current__i_Ca_half = -0.265;
00302 const double var_L_type_Ca_current__P_CaK = 5.79e-07;
00303 const double var_standard_ionic_concentrations__K_i = 149.4;
00304 double var_L_type_Ca_current__K_i = var_standard_ionic_concentrations__K_i;
00305 double var_L_type_Ca_current__i_CaK = ((((((var_L_type_Ca_current__P_CaK / var_L_type_Ca_current__C_sc) * var_L_type_Ca_current__f * var_L_type_Ca_current__d * var_L_type_Ca_current__f_Ca) / (1.0 + (var_L_type_Ca_current__i_Ca_max / var_L_type_Ca_current__i_Ca_half))) * 1000.0 * var_L_type_Ca_current__V * pow(var_L_type_Ca_current__F, 2.0)) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) * ((var_L_type_Ca_current__K_i * exp((var_L_type_Ca_current__V * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T))) - var_L_type_Ca_current__K_o)) / (exp((var_L_type_Ca_current__V * var_L_type_Ca_current__F) / (var_L_type_Ca_current__R * var_L_type_Ca_current__T)) - 1.0);
00306 double var_membrane__i_CaK = var_L_type_Ca_current__i_CaK;
00307 double var_rapid_activating_delayed_rectifiyer_K_current__V = var_membrane__V;
00308 double var_rapid_activating_delayed_rectifiyer_K_current__R_V = 1.0 / (1.0 + (2.5 * exp(0.1 * (var_rapid_activating_delayed_rectifiyer_K_current__V + 28.0))));
00309 double var_rapid_activating_delayed_rectifiyer_K_current__X_kr = var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr;
00310 double var_rapid_activating_delayed_rectifiyer_K_current__R = var_membrane__R;
00311 double var_rapid_activating_delayed_rectifiyer_K_current__K_o = var_standard_ionic_concentrations__K_o;
00312 double var_rapid_activating_delayed_rectifiyer_K_current__T = var_membrane__T;
00313 double var_rapid_activating_delayed_rectifiyer_K_current__K_i = var_standard_ionic_concentrations__K_i;
00314 double var_rapid_activating_delayed_rectifiyer_K_current__F = var_membrane__F;
00315 double var_rapid_activating_delayed_rectifiyer_K_current__E_K = ((var_rapid_activating_delayed_rectifiyer_K_current__R * var_rapid_activating_delayed_rectifiyer_K_current__T) / var_rapid_activating_delayed_rectifiyer_K_current__F) * log(var_rapid_activating_delayed_rectifiyer_K_current__K_o / var_rapid_activating_delayed_rectifiyer_K_current__K_i);
00316 const double var_rapid_activating_delayed_rectifiyer_K_current__g_Kr = 0.0136;
00317 double var_rapid_activating_delayed_rectifiyer_K_current__i_Kr = var_rapid_activating_delayed_rectifiyer_K_current__g_Kr * var_rapid_activating_delayed_rectifiyer_K_current__R_V * var_rapid_activating_delayed_rectifiyer_K_current__X_kr * sqrt(var_rapid_activating_delayed_rectifiyer_K_current__K_o / 4.0) * (var_rapid_activating_delayed_rectifiyer_K_current__V - var_rapid_activating_delayed_rectifiyer_K_current__E_K);
00318 double var_membrane__i_Kr = var_rapid_activating_delayed_rectifiyer_K_current__i_Kr;
00319 const double var_slow_activating_delayed_rectifiyer_K_current__g_Ks = 0.0245;
00320 double var_slow_activating_delayed_rectifiyer_K_current__V = var_membrane__V;
00321 double var_slow_activating_delayed_rectifiyer_K_current__K_i = var_standard_ionic_concentrations__K_i;
00322 double var_slow_activating_delayed_rectifiyer_K_current__F = var_membrane__F;
00323 double var_slow_activating_delayed_rectifiyer_K_current__K_o = var_standard_ionic_concentrations__K_o;
00324 double var_slow_activating_delayed_rectifiyer_K_current__T = var_membrane__T;
00325 double var_slow_activating_delayed_rectifiyer_K_current__Na_o = var_standard_ionic_concentrations__Na_o;
00326 double var_slow_activating_delayed_rectifiyer_K_current__R = var_membrane__R;
00327 double var_slow_activating_delayed_rectifiyer_K_current__Na_i = var_standard_ionic_concentrations__Na_i;
00328 double var_slow_activating_delayed_rectifiyer_K_current__E_Ks = ((var_slow_activating_delayed_rectifiyer_K_current__R * var_slow_activating_delayed_rectifiyer_K_current__T) / var_slow_activating_delayed_rectifiyer_K_current__F) * log((var_slow_activating_delayed_rectifiyer_K_current__K_o + (0.01833 * var_slow_activating_delayed_rectifiyer_K_current__Na_o)) / (var_slow_activating_delayed_rectifiyer_K_current__K_i + (0.01833 * var_slow_activating_delayed_rectifiyer_K_current__Na_i)));
00329 double var_slow_activating_delayed_rectifiyer_K_current__X_ks = var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks;
00330 double var_slow_activating_delayed_rectifiyer_K_current__i_Ks = var_slow_activating_delayed_rectifiyer_K_current__g_Ks * pow(var_slow_activating_delayed_rectifiyer_K_current__X_ks, 2.0) * (var_slow_activating_delayed_rectifiyer_K_current__V - var_slow_activating_delayed_rectifiyer_K_current__E_Ks);
00331 double var_membrane__i_Ks = var_slow_activating_delayed_rectifiyer_K_current__i_Ks;
00332 const double var_transient_outward_potassium_current__g_to = 0.23815;
00333 double var_transient_outward_potassium_current__V = var_membrane__V;
00334 double var_transient_outward_potassium_current__X_to = var_transient_outward_potassium_current_X_to_gate__X_to;
00335 double var_transient_outward_potassium_current__E_K = var_rapid_activating_delayed_rectifiyer_K_current__E_K;
00336 double var_transient_outward_potassium_current__Y_to = var_transient_outward_potassium_current_Y_to_gate__Y_to;
00337 double var_transient_outward_potassium_current__i_to = var_transient_outward_potassium_current__g_to * var_transient_outward_potassium_current__X_to * var_transient_outward_potassium_current__Y_to * (var_transient_outward_potassium_current__V - var_transient_outward_potassium_current__E_K);
00338 double var_membrane__i_to = var_transient_outward_potassium_current__i_to;
00339 const double var_time_independent_potassium_current__g_K1 = 2.8;
00340 double var_time_independent_potassium_current__F = var_membrane__F;
00341 double var_time_independent_potassium_current_K1_gate__F = var_time_independent_potassium_current__F;
00342 double var_time_independent_potassium_current__V = var_membrane__V;
00343 double var_time_independent_potassium_current_K1_gate__V = var_time_independent_potassium_current__V;
00344 double var_time_independent_potassium_current__T = var_membrane__T;
00345 double var_time_independent_potassium_current_K1_gate__T = var_time_independent_potassium_current__T;
00346 double var_time_independent_potassium_current__R = var_membrane__R;
00347 double var_time_independent_potassium_current_K1_gate__R = var_time_independent_potassium_current__R;
00348 double var_time_independent_potassium_current__E_K = var_rapid_activating_delayed_rectifiyer_K_current__E_K;
00349 double var_time_independent_potassium_current_K1_gate__E_K = var_time_independent_potassium_current__E_K;
00350 double var_time_independent_potassium_current_K1_gate__K1_infinity = 1.0 / (2.0 + exp(((1.62 * var_time_independent_potassium_current_K1_gate__F) / (var_time_independent_potassium_current_K1_gate__R * var_time_independent_potassium_current_K1_gate__T)) * (var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K)));
00351 double var_time_independent_potassium_current__K1_infinity = var_time_independent_potassium_current_K1_gate__K1_infinity;
00352 double var_time_independent_potassium_current__K_o = var_standard_ionic_concentrations__K_o;
00353 const double var_time_independent_potassium_current__K_mK1 = 13.0;
00354 double var_time_independent_potassium_current__i_K1 = ((var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K1_infinity * 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);
00355 double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00356 double var_plateau_potassium_current__V = var_membrane__V;
00357 double var_plateau_potassium_current__E_K = var_rapid_activating_delayed_rectifiyer_K_current__E_K;
00358 const double var_plateau_potassium_current__g_Kp = 0.002216;
00359 double var_plateau_potassium_current_Kp_gate__V = var_plateau_potassium_current__V;
00360 double var_plateau_potassium_current_Kp_gate__Kp_V = 1.0 / (1.0 + exp((7.488 - var_plateau_potassium_current_Kp_gate__V) / 5.98));
00361 double var_plateau_potassium_current__Kp_V = var_plateau_potassium_current_Kp_gate__Kp_V;
00362 double var_plateau_potassium_current__i_Kp = var_plateau_potassium_current__g_Kp * var_plateau_potassium_current__Kp_V * (var_plateau_potassium_current__V - var_plateau_potassium_current__E_K);
00363 double var_membrane__i_Kp = var_plateau_potassium_current__i_Kp;
00364 double var_Na_Ca_exchanger__Na_o = var_standard_ionic_concentrations__Na_o;
00365 const double var_Na_Ca_exchanger__K_NaCa = 1500.0;
00366 double var_Na_Ca_exchanger__V = var_membrane__V;
00367 double var_Na_Ca_exchanger__Ca_o = var_standard_ionic_concentrations__Ca_o;
00368 const double var_Na_Ca_exchanger__eta = 0.35;
00369 double var_Na_Ca_exchanger__Na_i = var_standard_ionic_concentrations__Na_i;
00370 double var_Na_Ca_exchanger__T = var_membrane__T;
00371 double var_Na_Ca_exchanger__R = var_membrane__R;
00372 const double var_Na_Ca_exchanger__K_sat = 0.2;
00373 const double var_Na_Ca_exchanger__K_mCa = 1380.0;
00374 double var_Na_Ca_exchanger__F = var_membrane__F;
00375 const double var_Na_Ca_exchanger__K_mNa = 87.5;
00376 double var_Na_Ca_exchanger__Ca_i = var_calcium_dynamics__Ca_i;
00377 double var_Na_Ca_exchanger__i_NaCa = (var_Na_Ca_exchanger__K_NaCa / ((pow(var_Na_Ca_exchanger__K_mNa, 3.0) + pow(var_Na_Ca_exchanger__Na_o, 3.0)) * (var_Na_Ca_exchanger__K_mCa + var_Na_Ca_exchanger__Ca_o) * (1.0 + (var_Na_Ca_exchanger__K_sat * exp(((var_Na_Ca_exchanger__eta - 1.0) * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)))))) * ((exp((var_Na_Ca_exchanger__eta * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * pow(var_Na_Ca_exchanger__Na_i, 3.0) * var_Na_Ca_exchanger__Ca_o) - (exp(((var_Na_Ca_exchanger__eta - 1.0) * var_Na_Ca_exchanger__V * var_Na_Ca_exchanger__F) / (var_Na_Ca_exchanger__R * var_Na_Ca_exchanger__T)) * pow(var_Na_Ca_exchanger__Na_o, 3.0) * var_Na_Ca_exchanger__Ca_i));
00378 double var_membrane__i_NaCa = var_Na_Ca_exchanger__i_NaCa;
00379 double var_sodium_potassium_pump__Na_i = var_standard_ionic_concentrations__Na_i;
00380 double var_sodium_potassium_pump__K_o = var_standard_ionic_concentrations__K_o;
00381 const double var_sodium_potassium_pump__i_NaK_max = 0.693;
00382 const double var_sodium_potassium_pump__K_mNai = 10.0;
00383 double var_sodium_potassium_pump__T = var_membrane__T;
00384 double var_sodium_potassium_pump__R = var_membrane__R;
00385 double var_sodium_potassium_pump__Na_o = var_standard_ionic_concentrations__Na_o;
00386 double var_sodium_potassium_pump__sigma = (1.0 / 7.0) * (exp(var_sodium_potassium_pump__Na_o / 67.3) - 1.0);
00387 double var_sodium_potassium_pump__V = var_membrane__V;
00388 double var_sodium_potassium_pump__F = var_membrane__F;
00389 double var_sodium_potassium_pump__f_NaK = 1.0 / (1.0 + (0.1245 * exp(((-0.1) * var_sodium_potassium_pump__V * var_sodium_potassium_pump__F) / (var_sodium_potassium_pump__R * var_sodium_potassium_pump__T))) + (0.0365 * var_sodium_potassium_pump__sigma * exp(((-var_sodium_potassium_pump__V) * var_sodium_potassium_pump__F) / (var_sodium_potassium_pump__R * var_sodium_potassium_pump__T))));
00390 const double var_sodium_potassium_pump__K_mKo = 1.5;
00391 double var_sodium_potassium_pump__i_NaK = (((var_sodium_potassium_pump__i_NaK_max * var_sodium_potassium_pump__f_NaK) / (1.0 + pow(var_sodium_potassium_pump__K_mNai / var_sodium_potassium_pump__Na_i, 1.5))) * var_sodium_potassium_pump__K_o) / (var_sodium_potassium_pump__K_o + var_sodium_potassium_pump__K_mKo);
00392 double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
00393 const double var_sarcolemmal_calcium_pump__i_pCa_max = 0.05;
00394 double var_sarcolemmal_calcium_pump__Ca_i = var_calcium_dynamics__Ca_i;
00395 const double var_sarcolemmal_calcium_pump__K_mpCa = 0.05;
00396 double var_sarcolemmal_calcium_pump__i_p_Ca = (var_sarcolemmal_calcium_pump__i_pCa_max * var_sarcolemmal_calcium_pump__Ca_i) / (var_sarcolemmal_calcium_pump__K_mpCa + var_sarcolemmal_calcium_pump__Ca_i);
00397 double var_membrane__i_p_Ca = var_sarcolemmal_calcium_pump__i_p_Ca;
00398 const double var_calcium_background_current__g_Cab = 0.0003842;
00399 double var_calcium_background_current__R = var_membrane__R;
00400 double var_calcium_background_current__Ca_i = var_calcium_dynamics__Ca_i;
00401 double var_calcium_background_current__F = var_membrane__F;
00402 double var_calcium_background_current__Ca_o = var_standard_ionic_concentrations__Ca_o;
00403 double var_calcium_background_current__T = var_membrane__T;
00404 double var_calcium_background_current__E_Ca = ((var_calcium_background_current__R * var_calcium_background_current__T) / (2.0 * var_calcium_background_current__F)) * log(var_calcium_background_current__Ca_o / var_calcium_background_current__Ca_i);
00405 double var_calcium_background_current__V = var_membrane__V;
00406 double var_calcium_background_current__i_Ca_b = var_calcium_background_current__g_Cab * (var_calcium_background_current__V - var_calcium_background_current__E_Ca);
00407 double var_membrane__i_Ca_b = var_calcium_background_current__i_Ca_b;
00408 double var_sodium_background_current__V = var_membrane__V;
00409 const double var_sodium_background_current__g_Nab = 0.0031;
00410 double var_sodium_background_current__E_Na = var_fast_sodium_current__E_Na;
00411 double var_sodium_background_current__i_Na_b = var_sodium_background_current__g_Nab * (var_sodium_background_current__V - var_sodium_background_current__E_Na);
00412 double var_membrane__i_Na_b = var_sodium_background_current__i_Na_b;
00413 double var_membrane__i_Stim = GetStimulus(var_membrane__time);
00414 double var_fast_sodium_current_m_gate__V = var_fast_sodium_current__V;
00415 double var_fast_sodium_current_m_gate__E0_m = var_fast_sodium_current_m_gate__V + 47.13;
00416 double var_fast_sodium_current_m_gate__alpha_m = (0.32 * var_fast_sodium_current_m_gate__E0_m) / (1.0 - exp((-0.1) * var_fast_sodium_current_m_gate__E0_m));
00417 double var_fast_sodium_current_m_gate__beta_m = 0.08 * exp((-var_fast_sodium_current_m_gate__V) / 11.0);
00418 double var_fast_sodium_current_h_gate__V = var_fast_sodium_current__V;
00419 double var_fast_sodium_current_h_gate__alpha_h = 0.135 * exp((var_fast_sodium_current_h_gate__V + 80.0) / (-6.8));
00420 double var_fast_sodium_current_h_gate__beta_h = 7.5 / (1.0 + exp((-0.1) * (var_fast_sodium_current_h_gate__V + 11.0)));
00421 double var_fast_sodium_current_j_gate__V = var_fast_sodium_current__V;
00422 double var_fast_sodium_current_j_gate__alpha_j = (0.175 * exp((var_fast_sodium_current_j_gate__V + 100.0) / (-23.0))) / (1.0 + exp(0.15 * (var_fast_sodium_current_j_gate__V + 79.0)));
00423 double var_fast_sodium_current_j_gate__beta_j = 0.3 / (1.0 + exp((-0.1) * (var_fast_sodium_current_j_gate__V + 32.0)));
00424 double var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__V = var_rapid_activating_delayed_rectifiyer_K_current__V;
00425 double var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr_inf = 1.0 / (1.0 + exp((-2.182) - (0.1819 * var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__V)));
00426 double var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__tau_X_kr = 43.0 + (1.0 / (exp((-5.495) + (0.1691 * var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__V)) + exp((-7.677) - (0.0128 * var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__V))));
00427 double var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V = var_slow_activating_delayed_rectifiyer_K_current__V;
00428 double var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__tau_X_ks = 1.0 / (((7.19e-05 * (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V - 10.0)) / (1.0 - exp((-0.148) * (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V - 10.0)))) + ((0.000131 * (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V - 10.0)) / (exp(0.0687 * (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V - 10.0)) - 1.0)));
00429 double var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks_infinity = 1.0 / (1.0 + exp((var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__V - 16.0) / (-13.6)));
00430 double var_transient_outward_potassium_current_X_to_gate__V = var_transient_outward_potassium_current__V;
00431 double var_transient_outward_potassium_current_X_to_gate__alpha_X_to = 0.04516 * exp(0.03577 * var_transient_outward_potassium_current_X_to_gate__V);
00432 double var_transient_outward_potassium_current_X_to_gate__beta_X_to = 0.0989 * exp((-0.06237) * var_transient_outward_potassium_current_X_to_gate__V);
00433 double var_transient_outward_potassium_current_Y_to_gate__V = var_transient_outward_potassium_current__V;
00434 double var_transient_outward_potassium_current_Y_to_gate__alpha_Y_to = (0.005415 * exp((var_transient_outward_potassium_current_Y_to_gate__V + 33.5) / (-5.0))) / (1.0 + (0.051335 * exp((var_transient_outward_potassium_current_Y_to_gate__V + 33.5) / (-5.0))));
00435 double var_transient_outward_potassium_current_Y_to_gate__beta_Y_to = (0.005415 * exp((var_transient_outward_potassium_current_Y_to_gate__V + 33.5) / 5.0)) / (1.0 + (0.051335 * exp((var_transient_outward_potassium_current_Y_to_gate__V + 33.5) / 5.0)));
00436 double var_L_type_Ca_current_f_gate__V = var_L_type_Ca_current__V;
00437 double var_L_type_Ca_current_f_gate__f_infinity = 1.0 / (1.0 + exp((var_L_type_Ca_current_f_gate__V + 12.5) / 5.0));
00438 double var_L_type_Ca_current_f_gate__tau_f = 30.0 + (200.0 / (1.0 + exp((var_L_type_Ca_current_f_gate__V + 20.0) / 9.5)));
00439 double var_L_type_Ca_current_d_gate__V = var_L_type_Ca_current__V;
00440 double var_L_type_Ca_current_d_gate__d_infinity = 1.0 / (1.0 + exp((var_L_type_Ca_current_d_gate__V + 10.0) / (-6.24)));
00441 double var_L_type_Ca_current_d_gate__E0_m = var_L_type_Ca_current_d_gate__V + 40.0;
00442 double var_L_type_Ca_current_d_gate__tau_d = 1.0 / (((0.25 * exp((-0.01) * var_L_type_Ca_current_d_gate__V)) / (1.0 + exp((-0.07) * var_L_type_Ca_current_d_gate__V))) + ((0.07 * exp((-0.05) * var_L_type_Ca_current_d_gate__E0_m)) / (1.0 + exp(0.05 * var_L_type_Ca_current_d_gate__E0_m))));
00443 double var_L_type_Ca_current_f_Ca_gate__tau_f_Ca = 30.0;
00444 double var_L_type_Ca_current_f_Ca_gate__Ca_i = var_L_type_Ca_current__Ca_i;
00445 const double var_L_type_Ca_current_f_Ca_gate__K_mfCa = 0.18;
00446 double var_L_type_Ca_current_f_Ca_gate__f_Ca_infinity = 1.0 / (1.0 + pow(var_L_type_Ca_current_f_Ca_gate__Ca_i / var_L_type_Ca_current_f_Ca_gate__K_mfCa, 3.0));
00447 const double var_calcium_dynamics__K_mCMDN = 2.0;
00448 const double var_calcium_dynamics__CMDN_tot = 10.0;
00449 double var_calcium_dynamics__beta_i = 1.0 / (1.0 + ((var_calcium_dynamics__CMDN_tot * var_calcium_dynamics__K_mCMDN) / pow(var_calcium_dynamics__K_mCMDN + var_calcium_dynamics__Ca_i, 2.0)));
00450 const double var_calcium_dynamics__V_myo = 2.584e-05;
00451 double var_calcium_dynamics__F = var_membrane__F;
00452 double var_calcium_dynamics__C_sc = var_L_type_Ca_current__C_sc;
00453 const double var_calcium_dynamics__A_Cap = 0.0001534;
00454 double var_calcium_dynamics__d = var_L_type_Ca_current__d;
00455 double var_calcium_dynamics__V = var_membrane__V;
00456 const double var_calcium_dynamics__P_rel = 6.0;
00457 double var_calcium_dynamics__gamma = 1.0 / (1.0 + pow(2000.0 / var_calcium_dynamics__Ca_SR, 3.0));
00458 double var_calcium_dynamics__f = var_L_type_Ca_current__f;
00459 double var_calcium_dynamics__f_Ca = var_L_type_Ca_current__f_Ca;
00460 double var_calcium_dynamics__J_rel = (var_calcium_dynamics__P_rel * var_calcium_dynamics__f * var_calcium_dynamics__d * var_calcium_dynamics__f_Ca * ((var_calcium_dynamics__gamma * var_calcium_dynamics__Ca_SR) - var_calcium_dynamics__Ca_i)) / (1.0 + (1.65 * exp(var_calcium_dynamics__V / 20.0)));
00461 const double var_calcium_dynamics__P_leak = 1e-06;
00462 double var_calcium_dynamics__J_leak = var_calcium_dynamics__P_leak * (var_calcium_dynamics__Ca_SR - var_calcium_dynamics__Ca_i);
00463 const double var_calcium_dynamics__V_up = 0.1;
00464 const double var_calcium_dynamics__K_mup = 0.32;
00465 double var_calcium_dynamics__J_up = var_calcium_dynamics__V_up / (1.0 + pow(var_calcium_dynamics__K_mup / var_calcium_dynamics__Ca_i, 2.0));
00466 double var_calcium_dynamics__i_Ca = var_L_type_Ca_current__i_Ca;
00467 double var_calcium_dynamics__i_Ca_b = var_calcium_background_current__i_Ca_b;
00468 double var_calcium_dynamics__i_p_Ca = var_sarcolemmal_calcium_pump__i_p_Ca;
00469 double var_calcium_dynamics__i_NaCa = var_Na_Ca_exchanger__i_NaCa;
00470 const double var_calcium_dynamics__K_mCSQN = 600.0;
00471 const double var_calcium_dynamics__CSQN_tot = 10000.0;
00472 const double var_calcium_dynamics__V_SR = 2e-06;
00473 double var_calcium_dynamics__beta_SR = 1.0 / (1.0 + ((var_calcium_dynamics__CSQN_tot * var_calcium_dynamics__K_mCSQN) / pow(var_calcium_dynamics__K_mCSQN + var_calcium_dynamics__Ca_SR, 2.0)));
00474 double d_dt_membrane__V = -(var_membrane__i_Na + var_membrane__i_Ca + var_membrane__i_CaK + var_membrane__i_Kr + var_membrane__i_Ks + var_membrane__i_to + var_membrane__i_K1 + var_membrane__i_Kp + var_membrane__i_NaCa + var_membrane__i_NaK + var_membrane__i_p_Ca + var_membrane__i_Na_b + var_membrane__i_Ca_b + var_membrane__i_Stim);
00475
00476
00477 if (mSetVoltageDerivativeToZero)
00478 {
00479 d_dt_membrane__V = 0;
00480 }
00481
00482 double d_dt_fast_sodium_current_m_gate__m = (var_fast_sodium_current_m_gate__alpha_m * (1.0 - var_fast_sodium_current_m_gate__m)) - (var_fast_sodium_current_m_gate__beta_m * var_fast_sodium_current_m_gate__m);
00483 double d_dt_fast_sodium_current_h_gate__h = (var_fast_sodium_current_h_gate__alpha_h * (1.0 - var_fast_sodium_current_h_gate__h)) - (var_fast_sodium_current_h_gate__beta_h * var_fast_sodium_current_h_gate__h);
00484 double d_dt_fast_sodium_current_j_gate__j = (var_fast_sodium_current_j_gate__alpha_j * (1.0 - var_fast_sodium_current_j_gate__j)) - (var_fast_sodium_current_j_gate__beta_j * var_fast_sodium_current_j_gate__j);
00485 double d_dt_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr = (var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr_inf - var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr) / var_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__tau_X_kr;
00486 double d_dt_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks = (var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks_infinity - var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks) / var_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__tau_X_ks;
00487 double d_dt_transient_outward_potassium_current_X_to_gate__X_to = (var_transient_outward_potassium_current_X_to_gate__alpha_X_to * (1.0 - var_transient_outward_potassium_current_X_to_gate__X_to)) - (var_transient_outward_potassium_current_X_to_gate__beta_X_to * var_transient_outward_potassium_current_X_to_gate__X_to);
00488 double d_dt_transient_outward_potassium_current_Y_to_gate__Y_to = (var_transient_outward_potassium_current_Y_to_gate__alpha_Y_to * (1.0 - var_transient_outward_potassium_current_Y_to_gate__Y_to)) - (var_transient_outward_potassium_current_Y_to_gate__beta_Y_to * var_transient_outward_potassium_current_Y_to_gate__Y_to);
00489 double d_dt_L_type_Ca_current_f_gate__f = (var_L_type_Ca_current_f_gate__f_infinity - var_L_type_Ca_current_f_gate__f) / var_L_type_Ca_current_f_gate__tau_f;
00490 double d_dt_L_type_Ca_current_d_gate__d = (var_L_type_Ca_current_d_gate__d_infinity - var_L_type_Ca_current_d_gate__d) / var_L_type_Ca_current_d_gate__tau_d;
00491 double d_dt_L_type_Ca_current_f_Ca_gate__f_Ca = (var_L_type_Ca_current_f_Ca_gate__f_Ca_infinity - var_L_type_Ca_current_f_Ca_gate__f_Ca) / var_L_type_Ca_current_f_Ca_gate__tau_f_Ca;
00492 double d_dt_calcium_dynamics__Ca_SR = (var_calcium_dynamics__beta_SR * ((var_calcium_dynamics__J_up - var_calcium_dynamics__J_leak) - var_calcium_dynamics__J_rel) * var_calcium_dynamics__V_myo) / var_calcium_dynamics__V_SR;
00493 double d_dt_calcium_dynamics__Ca_i = var_calcium_dynamics__beta_i * (((var_calcium_dynamics__J_rel + var_calcium_dynamics__J_leak) - var_calcium_dynamics__J_up) - (((var_calcium_dynamics__A_Cap * var_calcium_dynamics__C_sc) / (2.0 * var_calcium_dynamics__F * var_calcium_dynamics__V_myo)) * ((var_calcium_dynamics__i_Ca + var_calcium_dynamics__i_Ca_b + var_calcium_dynamics__i_p_Ca) - (2.0 * var_calcium_dynamics__i_NaCa))));
00494
00495 rDY[0] = d_dt_membrane__V;
00496 rDY[1] = d_dt_fast_sodium_current_m_gate__m;
00497 rDY[2] = d_dt_fast_sodium_current_h_gate__h;
00498 rDY[3] = d_dt_fast_sodium_current_j_gate__j;
00499 rDY[4] = d_dt_rapid_activating_delayed_rectifiyer_K_current_X_kr_gate__X_kr;
00500 rDY[5] = d_dt_slow_activating_delayed_rectifiyer_K_current_X_ks_gate__X_ks;
00501 rDY[6] = d_dt_transient_outward_potassium_current_X_to_gate__X_to;
00502 rDY[7] = d_dt_transient_outward_potassium_current_Y_to_gate__Y_to;
00503 rDY[8] = d_dt_L_type_Ca_current_f_gate__f;
00504 rDY[9] = d_dt_L_type_Ca_current_d_gate__d;
00505 rDY[10] = d_dt_L_type_Ca_current_f_Ca_gate__f_Ca;
00506 rDY[11] = d_dt_calcium_dynamics__Ca_i;
00507 rDY[12] = d_dt_calcium_dynamics__Ca_SR;
00508 }
00509 };
00510
00511
00512
00513 template<>
00514 void OdeSystemInformation<FoxModel2002Modified>::Initialise(void)
00515 {
00516
00517
00518 this->mVariableNames.push_back("V");
00519 this->mVariableUnits.push_back("millivolt");
00520 this->mInitialConditions.push_back(-94.7);
00521
00522 this->mVariableNames.push_back("m");
00523 this->mVariableUnits.push_back("dimensionless");
00524 this->mInitialConditions.push_back(0.00024676);
00525
00526 this->mVariableNames.push_back("h");
00527 this->mVariableUnits.push_back("dimensionless");
00528 this->mInitialConditions.push_back(0.99869);
00529
00530 this->mVariableNames.push_back("j");
00531 this->mVariableUnits.push_back("dimensionless");
00532 this->mInitialConditions.push_back(0.99887);
00533
00534 this->mVariableNames.push_back("X_kr");
00535 this->mVariableUnits.push_back("dimensionless");
00536 this->mInitialConditions.push_back(0.229);
00537
00538 this->mVariableNames.push_back("X_ks");
00539 this->mVariableUnits.push_back("dimensionless");
00540 this->mInitialConditions.push_back(0.0001);
00541
00542 this->mVariableNames.push_back("X_to");
00543 this->mVariableUnits.push_back("dimensionless");
00544 this->mInitialConditions.push_back(0.00003742);
00545
00546 this->mVariableNames.push_back("Y_to");
00547 this->mVariableUnits.push_back("dimensionless");
00548 this->mInitialConditions.push_back(1);
00549
00550 this->mVariableNames.push_back("f");
00551 this->mVariableUnits.push_back("dimensionless");
00552 this->mInitialConditions.push_back(0.983);
00553
00554 this->mVariableNames.push_back("d");
00555 this->mVariableUnits.push_back("dimensionless");
00556 this->mInitialConditions.push_back(0.0001);
00557
00558 this->mVariableNames.push_back("f_Ca");
00559 this->mVariableUnits.push_back("dimensionless");
00560 this->mInitialConditions.push_back(0.942);
00561
00562 this->mVariableNames.push_back("CaI");
00563 this->mVariableUnits.push_back("micromolar");
00564 this->mInitialConditions.push_back(0.0472);
00565
00566 this->mVariableNames.push_back("Ca_SR");
00567 this->mVariableUnits.push_back("micromolar");
00568 this->mInitialConditions.push_back(320);
00569
00570 this->mInitialised = true;
00571 }
00572
00573 #endif