59 const std::vector<double>& rY = *pStateVariables;
60 double var_membrane__V = rY[0];
62 double var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = rY[1];
64 double var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = rY[2];
66 double var_slow_delayed_rectifier_potassium_current_xs_gate__xs = rY[3];
68 double var_fast_sodium_current_m_gate__m = rY[4];
70 double var_fast_sodium_current_h_gate__h = rY[5];
72 double var_L_type_Ca_channel_d_gate__d = rY[6];
74 double var_L_type_Ca_channel_f_gate__f = rY[7];
76 double var_L_type_Ca_channel_f2_gate__f2 = rY[8];
78 double var_L_type_Ca_channel_f2ds_gate__f2ds = rY[9];
80 double var_transient_outward_current_s_gate__s = rY[10];
82 double var_transient_outward_current_r_gate__r = rY[11];
84 double var_intracellular_sodium_concentration__Na_i = rY[14];
86 double var_intracellular_potassium_concentration__K_i = rY[15];
88 double var_intracellular_calcium_concentration__Ca_i = rY[16];
90 double var_intracellular_calcium_concentration__Ca_ds = rY[17];
93 const double var_membrane__R = 8314.472;
94 const double var_membrane__T = 310.0;
95 const double var_membrane__F = 96485.3415;
96 double var_reversal_potentials__K_i = var_intracellular_potassium_concentration__K_i;
97 double var_reversal_potentials__R = var_membrane__R;
98 double var_reversal_potentials__T = var_membrane__T;
99 double var_reversal_potentials__F = var_membrane__F;
100 const double var_extracellular_potassium_concentration__K_o = 4.0;
101 double var_reversal_potentials__K_o = var_extracellular_potassium_concentration__K_o;
102 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);
103 double var_time_independent_potassium_current__E_K = var_reversal_potentials__E_K;
104 double var_time_independent_potassium_current__K_o = var_extracellular_potassium_concentration__K_o;
105 double var_time_independent_potassium_current__R = var_membrane__R;
106 double var_time_independent_potassium_current__V = var_membrane__V;
107 double var_time_independent_potassium_current__T = var_membrane__T;
108 const double var_time_independent_potassium_current__K_mk1 = 10.0;
109 const double var_time_independent_potassium_current__g_K1 = 0.5;
110 double var_time_independent_potassium_current__F = var_membrane__F;
111 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)));
112 double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
113 double var_transient_outward_current__s = var_transient_outward_current_s_gate__s;
114 double var_transient_outward_current__r = var_transient_outward_current_r_gate__r;
115 const double var_transient_outward_current__g_to = 0.005;
116 double var_transient_outward_current__V = var_membrane__V;
117 double var_transient_outward_current__E_K = var_reversal_potentials__E_K;
118 const double var_transient_outward_current__g_tos = 0.0;
119 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);
120 double var_membrane__i_to = var_transient_outward_current__i_to;
121 const double var_rapid_delayed_rectifier_potassium_current__g_Kr2 = 0.0013;
122 const double var_rapid_delayed_rectifier_potassium_current__g_Kr1 = 0.0021;
123 double var_rapid_delayed_rectifier_potassium_current__xr1 = var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1;
124 double var_rapid_delayed_rectifier_potassium_current__xr2 = var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2;
125 double var_rapid_delayed_rectifier_potassium_current__V = var_membrane__V;
126 double var_rapid_delayed_rectifier_potassium_current__E_K = var_reversal_potentials__E_K;
127 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);
128 double var_membrane__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
129 double var_slow_delayed_rectifier_potassium_current__xs = var_slow_delayed_rectifier_potassium_current_xs_gate__xs;
130 const double var_extracellular_sodium_concentration__Na_o = 140.0;
131 double var_reversal_potentials__Na_o = var_extracellular_sodium_concentration__Na_o;
132 double var_reversal_potentials__Na_i = var_intracellular_sodium_concentration__Na_i;
133 const double var_reversal_potentials__P_kna = 0.03;
134 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)));
135 double var_slow_delayed_rectifier_potassium_current__E_Ks = var_reversal_potentials__E_Ks;
136 const double var_slow_delayed_rectifier_potassium_current__g_Ks = 0.0026;
137 double var_slow_delayed_rectifier_potassium_current__V = var_membrane__V;
138 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);
139 double var_membrane__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
140 double var_L_type_Ca_channel__d = var_L_type_Ca_channel_d_gate__d;
141 const double var_L_type_Ca_channel__FrICa = 1.0;
142 double var_L_type_Ca_channel__f = var_L_type_Ca_channel_f_gate__f;
143 double var_L_type_Ca_channel__K_o = var_extracellular_potassium_concentration__K_o;
144 double var_L_type_Ca_channel__K_i = var_intracellular_potassium_concentration__K_i;
145 double var_L_type_Ca_channel__F = var_membrane__F;
146 const double var_L_type_Ca_channel__P_Ca_L = 0.1;
147 double var_L_type_Ca_channel__T = var_membrane__T;
148 const double var_L_type_Ca_channel__P_CaK = 0.002;
149 double var_L_type_Ca_channel__V = var_membrane__V;
150 double var_L_type_Ca_channel__f2 = var_L_type_Ca_channel_f2_gate__f2;
151 double var_L_type_Ca_channel__R = var_membrane__R;
152 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))));
153 double var_membrane__i_Ca_L_K_cyt = var_L_type_Ca_channel__i_Ca_L_K_cyt;
154 double var_L_type_Ca_channel__f2ds = var_L_type_Ca_channel_f2ds_gate__f2ds;
155 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))));
156 double var_membrane__i_Ca_L_K_ds = var_L_type_Ca_channel__i_Ca_L_K_ds;
157 const double var_sodium_potassium_pump__i_NaK_max = 0.7;
158 double var_sodium_potassium_pump__Na_i = var_intracellular_sodium_concentration__Na_i;
159 double var_sodium_potassium_pump__K_o = var_extracellular_potassium_concentration__K_o;
160 const double var_sodium_potassium_pump__K_mNa = 40.0;
161 const double var_sodium_potassium_pump__K_mK = 1.0;
162 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);
163 double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
164 const double var_fast_sodium_current__g_Na = 2.5;
165 double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
166 double var_fast_sodium_current__V = var_membrane__V;
167 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)));
168 double var_fast_sodium_current__E_mh = var_reversal_potentials__E_mh;
169 double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
170 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);
171 double var_membrane__i_Na = var_fast_sodium_current__i_Na;
172 double var_sodium_background_current__V = var_membrane__V;
173 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);
174 double var_sodium_background_current__E_Na = var_reversal_potentials__E_Na;
175 const double var_sodium_background_current__g_bna = 0.0006;
176 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);
177 double var_membrane__i_b_Na = var_sodium_background_current__i_b_Na;
178 const double var_persistent_sodium_current__g_pna = 0.004;
179 double var_persistent_sodium_current__V = var_membrane__V;
180 double var_persistent_sodium_current__E_Na = var_reversal_potentials__E_Na;
181 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);
182 double var_membrane__i_p_Na = var_persistent_sodium_current__i_p_Na;
183 const double var_L_type_Ca_channel__P_CaNa = 0.01;
184 double var_L_type_Ca_channel__Na_o = var_extracellular_sodium_concentration__Na_o;
185 double var_L_type_Ca_channel__Na_i = var_intracellular_sodium_concentration__Na_i;
186 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))));
187 double var_membrane__i_Ca_L_Na_cyt = var_L_type_Ca_channel__i_Ca_L_Na_cyt;
188 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))));
189 double var_membrane__i_Ca_L_Na_ds = var_L_type_Ca_channel__i_Ca_L_Na_ds;
190 double var_sodium_calcium_exchanger__Na_i = var_intracellular_sodium_concentration__Na_i;
191 const double var_sodium_calcium_exchanger__n_NaCa = 3.0;
192 const double var_sodium_calcium_exchanger__gamma = 0.5;
193 double var_sodium_calcium_exchanger__F = var_membrane__F;
194 double var_sodium_calcium_exchanger__Na_o = var_extracellular_sodium_concentration__Na_o;
195 const double var_sodium_calcium_exchanger__FRiNaCa = 0.001;
196 double var_sodium_calcium_exchanger__R = var_membrane__R;
197 double var_sodium_calcium_exchanger__Ca_i = var_intracellular_calcium_concentration__Ca_i;
198 double var_sodium_calcium_exchanger__T = var_membrane__T;
199 double var_sodium_calcium_exchanger__V = var_membrane__V;
200 const double var_sodium_calcium_exchanger__d_NaCa = 0.0;
201 const double var_extracellular_calcium_concentration__Ca_o = 2.0;
202 double var_sodium_calcium_exchanger__Ca_o = var_extracellular_calcium_concentration__Ca_o;
203 const double var_sodium_calcium_exchanger__k_NaCa = 0.0005;
204 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)));
205 double var_membrane__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
206 double var_sodium_calcium_exchanger__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
207 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)));
208 double var_membrane__i_NaCa_ds = var_sodium_calcium_exchanger__i_NaCa_ds;
209 double var_L_type_Ca_channel__Ca_i = var_intracellular_calcium_concentration__Ca_i;
210 double var_L_type_Ca_channel__Ca_o = var_extracellular_calcium_concentration__Ca_o;
211 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))));
212 double var_membrane__i_Ca_L_Ca_cyt = var_L_type_Ca_channel__i_Ca_L_Ca_cyt;
213 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))));
214 double var_membrane__i_Ca_L_Ca_ds = var_L_type_Ca_channel__i_Ca_L_Ca_ds;
215 double var_reversal_potentials__Ca_o = var_extracellular_calcium_concentration__Ca_o;
216 double var_reversal_potentials__Ca_i = var_intracellular_calcium_concentration__Ca_i;
217 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);
218 double var_calcium_background_current__E_Ca = var_reversal_potentials__E_Ca;
219 const double var_calcium_background_current__g_bca = 0.00025;
220 double var_calcium_background_current__V = var_membrane__V;
221 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);
222 double var_membrane__i_b_Ca = var_calcium_background_current__i_b_Ca;
227 const double g_sac = 0.035;
228 const double E_sac = -10;
230 double sac_ionic_current = g_sac * f * (var_membrane__V - E_sac);
240 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;
243 value_in_nA += sac_ionic_current;
245 double value_in_microA = 0.001*value_in_nA;
247 double value_in_microA_per_cm_square = value_in_microA/estimated_cell_surface_in_cm_square;
248 return value_in_microA_per_cm_square;
252 double var_environment__time,
253 const std::vector<double> &rY,
254 std::vector<double> &rDY)
258 var_environment__time *= 0.001;
259 double var_membrane__V = rY[0];
261 double var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = rY[1];
263 double var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = rY[2];
265 double var_slow_delayed_rectifier_potassium_current_xs_gate__xs = rY[3];
267 double var_fast_sodium_current_m_gate__m = rY[4];
269 double var_fast_sodium_current_h_gate__h = rY[5];
271 double var_L_type_Ca_channel_d_gate__d = rY[6];
273 double var_L_type_Ca_channel_f_gate__f = rY[7];
275 double var_L_type_Ca_channel_f2_gate__f2 = rY[8];
277 double var_L_type_Ca_channel_f2ds_gate__f2ds = rY[9];
279 double var_transient_outward_current_s_gate__s = rY[10];
281 double var_transient_outward_current_r_gate__r = rY[11];
283 double var_calcium_release__ActFrac = rY[12];
285 double var_calcium_release__ProdFrac = rY[13];
287 double var_intracellular_sodium_concentration__Na_i = rY[14];
289 double var_intracellular_potassium_concentration__K_i = rY[15];
291 double var_intracellular_calcium_concentration__Ca_i = rY[16];
293 double var_intracellular_calcium_concentration__Ca_ds = rY[17];
295 double var_intracellular_calcium_concentration__Ca_up = rY[18];
297 double var_intracellular_calcium_concentration__Ca_rel = rY[19];
299 double var_intracellular_calcium_concentration__Ca_Calmod = rY[20];
301 double var_intracellular_calcium_concentration__Ca_Trop = rY[21];
306 const double var_membrane__R = 8314.472;
307 const double var_membrane__T = 310.0;
308 const double var_membrane__F = 96485.3415;
309 const double var_membrane__Cm = 9.5e-05;
310 double var_reversal_potentials__K_i = var_intracellular_potassium_concentration__K_i;
311 double var_reversal_potentials__R = var_membrane__R;
312 double var_reversal_potentials__T = var_membrane__T;
313 double var_reversal_potentials__F = var_membrane__F;
314 const double var_extracellular_potassium_concentration__K_o = 4.0;
315 double var_reversal_potentials__K_o = var_extracellular_potassium_concentration__K_o;
316 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);
317 double var_time_independent_potassium_current__E_K = var_reversal_potentials__E_K;
318 double var_time_independent_potassium_current__K_o = var_extracellular_potassium_concentration__K_o;
319 double var_time_independent_potassium_current__R = var_membrane__R;
320 double var_time_independent_potassium_current__V = var_membrane__V;
321 double var_time_independent_potassium_current__T = var_membrane__T;
322 const double var_time_independent_potassium_current__K_mk1 = 10.0;
323 const double var_time_independent_potassium_current__g_K1 = 0.5;
324 double var_time_independent_potassium_current__F = var_membrane__F;
325 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)));
326 double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
327 double var_transient_outward_current__s = var_transient_outward_current_s_gate__s;
328 double var_transient_outward_current__r = var_transient_outward_current_r_gate__r;
329 const double var_transient_outward_current__g_to = 0.005;
330 double var_transient_outward_current__V = var_membrane__V;
331 double var_transient_outward_current__E_K = var_reversal_potentials__E_K;
332 const double var_transient_outward_current__g_tos = 0.0;
333 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);
334 double var_membrane__i_to = var_transient_outward_current__i_to;
335 const double var_rapid_delayed_rectifier_potassium_current__g_Kr2 = 0.0013;
336 const double var_rapid_delayed_rectifier_potassium_current__g_Kr1 = 0.0021;
337 double var_rapid_delayed_rectifier_potassium_current__xr1 = var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1;
338 double var_rapid_delayed_rectifier_potassium_current__xr2 = var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2;
339 double var_rapid_delayed_rectifier_potassium_current__V = var_membrane__V;
340 double var_rapid_delayed_rectifier_potassium_current__E_K = var_reversal_potentials__E_K;
341 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);
342 double var_membrane__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
343 double var_slow_delayed_rectifier_potassium_current__xs = var_slow_delayed_rectifier_potassium_current_xs_gate__xs;
344 const double var_extracellular_sodium_concentration__Na_o = 140.0;
345 double var_reversal_potentials__Na_o = var_extracellular_sodium_concentration__Na_o;
346 double var_reversal_potentials__Na_i = var_intracellular_sodium_concentration__Na_i;
347 const double var_reversal_potentials__P_kna = 0.03;
348 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)));
349 double var_slow_delayed_rectifier_potassium_current__E_Ks = var_reversal_potentials__E_Ks;
350 const double var_slow_delayed_rectifier_potassium_current__g_Ks = 0.0026;
351 double var_slow_delayed_rectifier_potassium_current__V = var_membrane__V;
352 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);
353 double var_membrane__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
354 double var_L_type_Ca_channel__d = var_L_type_Ca_channel_d_gate__d;
355 const double var_L_type_Ca_channel__FrICa = 1.0;
356 double var_L_type_Ca_channel__f = var_L_type_Ca_channel_f_gate__f;
357 double var_L_type_Ca_channel__K_o = var_extracellular_potassium_concentration__K_o;
358 double var_L_type_Ca_channel__K_i = var_intracellular_potassium_concentration__K_i;
359 double var_L_type_Ca_channel__F = var_membrane__F;
360 const double var_L_type_Ca_channel__P_Ca_L = 0.1;
361 double var_L_type_Ca_channel__T = var_membrane__T;
362 const double var_L_type_Ca_channel__P_CaK = 0.002;
363 double var_L_type_Ca_channel__V = var_membrane__V;
364 double var_L_type_Ca_channel__f2 = var_L_type_Ca_channel_f2_gate__f2;
365 double var_L_type_Ca_channel__R = var_membrane__R;
366 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))));
367 double var_membrane__i_Ca_L_K_cyt = var_L_type_Ca_channel__i_Ca_L_K_cyt;
368 double var_L_type_Ca_channel__f2ds = var_L_type_Ca_channel_f2ds_gate__f2ds;
369 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))));
370 double var_membrane__i_Ca_L_K_ds = var_L_type_Ca_channel__i_Ca_L_K_ds;
371 const double var_sodium_potassium_pump__i_NaK_max = 0.7;
372 double var_sodium_potassium_pump__Na_i = var_intracellular_sodium_concentration__Na_i;
373 double var_sodium_potassium_pump__K_o = var_extracellular_potassium_concentration__K_o;
374 const double var_sodium_potassium_pump__K_mNa = 40.0;
375 const double var_sodium_potassium_pump__K_mK = 1.0;
376 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);
377 double var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK;
378 const double var_fast_sodium_current__g_Na = 2.5;
379 double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
380 double var_fast_sodium_current__V = var_membrane__V;
381 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)));
382 double var_fast_sodium_current__E_mh = var_reversal_potentials__E_mh;
383 double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
384 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);
385 double var_membrane__i_Na = var_fast_sodium_current__i_Na;
386 double var_sodium_background_current__V = var_membrane__V;
387 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);
388 double var_sodium_background_current__E_Na = var_reversal_potentials__E_Na;
389 const double var_sodium_background_current__g_bna = 0.0006;
390 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);
391 double var_membrane__i_b_Na = var_sodium_background_current__i_b_Na;
392 const double var_persistent_sodium_current__g_pna = 0.004;
393 double var_persistent_sodium_current__V = var_membrane__V;
394 double var_persistent_sodium_current__E_Na = var_reversal_potentials__E_Na;
395 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);
396 double var_membrane__i_p_Na = var_persistent_sodium_current__i_p_Na;
397 const double var_L_type_Ca_channel__P_CaNa = 0.01;
398 double var_L_type_Ca_channel__Na_o = var_extracellular_sodium_concentration__Na_o;
399 double var_L_type_Ca_channel__Na_i = var_intracellular_sodium_concentration__Na_i;
400 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))));
401 double var_membrane__i_Ca_L_Na_cyt = var_L_type_Ca_channel__i_Ca_L_Na_cyt;
402 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))));
403 double var_membrane__i_Ca_L_Na_ds = var_L_type_Ca_channel__i_Ca_L_Na_ds;
404 double var_sodium_calcium_exchanger__Na_i = var_intracellular_sodium_concentration__Na_i;
405 const double var_sodium_calcium_exchanger__n_NaCa = 3.0;
406 const double var_sodium_calcium_exchanger__gamma = 0.5;
407 double var_sodium_calcium_exchanger__F = var_membrane__F;
408 double var_sodium_calcium_exchanger__Na_o = var_extracellular_sodium_concentration__Na_o;
409 const double var_sodium_calcium_exchanger__FRiNaCa = 0.001;
410 double var_sodium_calcium_exchanger__R = var_membrane__R;
411 double var_sodium_calcium_exchanger__Ca_i = var_intracellular_calcium_concentration__Ca_i;
412 double var_sodium_calcium_exchanger__T = var_membrane__T;
413 double var_sodium_calcium_exchanger__V = var_membrane__V;
414 const double var_sodium_calcium_exchanger__d_NaCa = 0.0;
415 const double var_extracellular_calcium_concentration__Ca_o = 2.0;
416 double var_sodium_calcium_exchanger__Ca_o = var_extracellular_calcium_concentration__Ca_o;
417 const double var_sodium_calcium_exchanger__k_NaCa = 0.0005;
418 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)));
419 double var_membrane__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
420 double var_sodium_calcium_exchanger__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
421 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)));
422 double var_membrane__i_NaCa_ds = var_sodium_calcium_exchanger__i_NaCa_ds;
423 double var_L_type_Ca_channel__Ca_i = var_intracellular_calcium_concentration__Ca_i;
424 double var_L_type_Ca_channel__Ca_o = var_extracellular_calcium_concentration__Ca_o;
425 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))));
426 double var_membrane__i_Ca_L_Ca_cyt = var_L_type_Ca_channel__i_Ca_L_Ca_cyt;
427 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))));
428 double var_membrane__i_Ca_L_Ca_ds = var_L_type_Ca_channel__i_Ca_L_Ca_ds;
429 double var_reversal_potentials__Ca_o = var_extracellular_calcium_concentration__Ca_o;
430 double var_reversal_potentials__Ca_i = var_intracellular_calcium_concentration__Ca_i;
431 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);
432 double var_calcium_background_current__E_Ca = var_reversal_potentials__E_Ca;
433 const double var_calcium_background_current__g_bca = 0.00025;
434 double var_calcium_background_current__V = var_membrane__V;
435 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);
436 double var_membrane__i_b_Ca = var_calcium_background_current__i_b_Ca;
437 double var_membrane__i_Stim =
GetStimulus((1.0/0.001)*var_environment__time);
438 double var_rapid_delayed_rectifier_potassium_current_xr1_gate__V = var_rapid_delayed_rectifier_potassium_current__V;
439 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));
440 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);
441 double var_rapid_delayed_rectifier_potassium_current_xr2_gate__V = var_rapid_delayed_rectifier_potassium_current__V;
442 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));
443 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));
444 double var_slow_delayed_rectifier_potassium_current_xs_gate__V = var_slow_delayed_rectifier_potassium_current__V;
445 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));
446 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);
447 double var_fast_sodium_current_m_gate__V = var_fast_sodium_current__V;
448 double var_fast_sodium_current_m_gate__E0_m = var_fast_sodium_current_m_gate__V + 41.0;
449 const double var_fast_sodium_current_m_gate__delta_m = 1e-05;
450 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)));
451 double var_fast_sodium_current_m_gate__beta_m = 8000.0 * exp((-0.056) * (var_fast_sodium_current_m_gate__V + 66.0));
452 double var_fast_sodium_current_h_gate__V = var_fast_sodium_current__V;
453 const double var_fast_sodium_current_h_gate__shift_h = 0.0;
454 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));
455 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))));
456 double var_L_type_Ca_channel__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
457 const double var_L_type_Ca_channel__Km_f2 = 100000.0;
458 const double var_L_type_Ca_channel__Km_f2ds = 0.001;
459 const double var_L_type_Ca_channel__R_decay = 20.0;
460 double var_L_type_Ca_channel_d_gate__V = var_L_type_Ca_channel__V;
461 double var_L_type_Ca_channel_d_gate__E0_d = (var_L_type_Ca_channel_d_gate__V + 24.0) - 5.0;
462 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)));
463 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));
464 const double var_L_type_Ca_channel_d_gate__speed_d = 3.0;
465 double var_L_type_Ca_channel_f_gate__V = var_L_type_Ca_channel__V;
466 double var_L_type_Ca_channel_f_gate__E0_f = var_L_type_Ca_channel_f_gate__V + 34.0;
467 const double var_L_type_Ca_channel_f_gate__delta_f = 0.0001;
468 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));
469 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));
470 const double var_L_type_Ca_channel_f_gate__speed_f = 0.3;
471 double var_L_type_Ca_channel_f2_gate__Km_f2 = var_L_type_Ca_channel__Km_f2;
472 double var_L_type_Ca_channel_f2_gate__Ca_i = var_L_type_Ca_channel__Ca_i;
473 double var_L_type_Ca_channel_f2ds_gate__Km_f2ds = var_L_type_Ca_channel__Km_f2ds;
474 double var_L_type_Ca_channel_f2ds_gate__R_decay = var_L_type_Ca_channel__R_decay;
475 double var_L_type_Ca_channel_f2ds_gate__Ca_ds = var_L_type_Ca_channel__Ca_ds;
476 double var_transient_outward_current_s_gate__V = var_transient_outward_current__V;
477 double var_transient_outward_current_s_gate__alpha_s = 0.033 * exp((-var_transient_outward_current_s_gate__V) / 17.0);
478 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)));
479 double var_transient_outward_current_r_gate__V = var_transient_outward_current__V;
480 double var_sarcoplasmic_reticulum_calcium_pump__Ca_i = var_intracellular_calcium_concentration__Ca_i;
481 double var_sarcoplasmic_reticulum_calcium_pump__Ca_up = var_intracellular_calcium_concentration__Ca_up;
482 const double var_sarcoplasmic_reticulum_calcium_pump__alpha_up = 0.4;
483 const double var_sarcoplasmic_reticulum_calcium_pump__beta_up = 0.03;
484 const double var_sarcoplasmic_reticulum_calcium_pump__K_srca = 0.5;
485 const double var_sarcoplasmic_reticulum_calcium_pump__K_xcs = 0.4;
486 const double var_sarcoplasmic_reticulum_calcium_pump__K_cyca = 0.0003;
487 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;
488 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;
489 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);
490 double var_calcium_translocation__Ca_rel = var_intracellular_calcium_concentration__Ca_rel;
491 double var_calcium_translocation__Ca_up = var_intracellular_calcium_concentration__Ca_up;
492 double var_calcium_translocation__i_trans = 50.0 * (var_calcium_translocation__Ca_up - var_calcium_translocation__Ca_rel);
493 const double var_calcium_release__K_m_rel = 250.0;
494 const double var_calcium_release__K_leak_rate = 0.05;
495 double var_calcium_release__Ca_rel = var_intracellular_calcium_concentration__Ca_rel;
496 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;
497 double var_calcium_release__V = var_membrane__V;
498 double var_calcium_release__VoltDep = exp(0.08 * (var_calcium_release__V - 40.0));
499 const double var_calcium_release__K_m_Ca_cyt = 0.0005;
500 double var_calcium_release__Ca_i = var_intracellular_calcium_concentration__Ca_i;
501 double var_calcium_release__CaiReg = var_calcium_release__Ca_i / (var_calcium_release__Ca_i + var_calcium_release__K_m_Ca_cyt);
502 double var_calcium_release__Ca_ds = var_intracellular_calcium_concentration__Ca_ds;
503 const double var_calcium_release__K_m_Ca_ds = 0.01;
504 double var_calcium_release__CadsReg = var_calcium_release__Ca_ds / (var_calcium_release__Ca_ds + var_calcium_release__K_m_Ca_ds);
505 double var_calcium_release__RegBindSite = var_calcium_release__CaiReg + ((1.0 - var_calcium_release__CaiReg) * var_calcium_release__CadsReg);
506 double var_calcium_release__ActRate = (0.0 * var_calcium_release__VoltDep) + (500.0 * pow(var_calcium_release__RegBindSite, 2.0));
507 double var_calcium_release__InactRate = 60.0 + (500.0 * pow(var_calcium_release__RegBindSite, 2.0));
508 double var_calcium_release__PrecFrac = (1.0 - var_calcium_release__ActFrac) - var_calcium_release__ProdFrac;
509 double var_calcium_release__SpeedRel = (var_calcium_release__V < (-50.0)) ? 5.0 : 1.0;
510 const double var_intracellular_calcium_concentration__V_up_ratio = 0.01;
511 const double var_intracellular_calcium_concentration__V_rel_ratio = 0.1;
512 const double var_intracellular_calcium_concentration__V_e_ratio = 0.4;
513 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;
514 const double var_intracellular_calcium_concentration__radius = 0.012;
515 const double var_intracellular_calcium_concentration__length = 0.074;
516 double var_intracellular_calcium_concentration__V_Cell = 3.141592654 * pow(var_intracellular_calcium_concentration__radius, 2.0) * var_intracellular_calcium_concentration__length;
517 double var_intracellular_calcium_concentration__V_i = var_intracellular_calcium_concentration__V_Cell * var_intracellular_calcium_concentration__V_i_ratio;
518 double var_intracellular_sodium_concentration__V_i = var_intracellular_calcium_concentration__V_i;
519 double var_intracellular_sodium_concentration__F = var_membrane__F;
520 double var_intracellular_sodium_concentration__i_Na = var_fast_sodium_current__i_Na;
521 double var_intracellular_sodium_concentration__i_b_Na = var_sodium_background_current__i_b_Na;
522 double var_intracellular_sodium_concentration__i_p_Na = var_persistent_sodium_current__i_p_Na;
523 double var_intracellular_sodium_concentration__i_Ca_L_Na_cyt = var_L_type_Ca_channel__i_Ca_L_Na_cyt;
524 double var_intracellular_sodium_concentration__i_Ca_L_Na_ds = var_L_type_Ca_channel__i_Ca_L_Na_ds;
525 double var_intracellular_sodium_concentration__i_NaK = var_sodium_potassium_pump__i_NaK;
526 double var_intracellular_sodium_concentration__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
527 double var_intracellular_potassium_concentration__V_i = var_intracellular_calcium_concentration__V_i;
528 double var_intracellular_potassium_concentration__i_K1 = var_time_independent_potassium_current__i_K1;
529 double var_intracellular_potassium_concentration__i_Kr = var_rapid_delayed_rectifier_potassium_current__i_Kr;
530 double var_intracellular_potassium_concentration__i_Ks = var_slow_delayed_rectifier_potassium_current__i_Ks;
531 double var_intracellular_potassium_concentration__i_Ca_L_K_cyt = var_L_type_Ca_channel__i_Ca_L_K_cyt;
532 double var_intracellular_potassium_concentration__i_Ca_L_K_ds = var_L_type_Ca_channel__i_Ca_L_K_ds;
533 double var_intracellular_potassium_concentration__i_to = var_transient_outward_current__i_to;
534 double var_intracellular_potassium_concentration__i_NaK = var_sodium_potassium_pump__i_NaK;
535 double var_intracellular_potassium_concentration__F = var_membrane__F;
536 const double var_intracellular_calcium_concentration__Calmod = 0.02;
537 const double var_intracellular_calcium_concentration__Trop = 0.05;
538 const double var_intracellular_calcium_concentration__alpha_Calmod = 100000.0;
539 const double var_intracellular_calcium_concentration__beta_Calmod = 50.0;
540 const double var_intracellular_calcium_concentration__alpha_Trop = 100000.0;
541 const double var_intracellular_calcium_concentration__beta_Trop = 200.0;
542 const double var_intracellular_calcium_concentration__V_ds_ratio = 0.1;
543 const double var_intracellular_calcium_concentration__Kdecay = 10.0;
544 double var_intracellular_calcium_concentration__i_up = var_sarcoplasmic_reticulum_calcium_pump__i_up;
545 double var_intracellular_calcium_concentration__i_trans = var_calcium_translocation__i_trans;
546 double var_intracellular_calcium_concentration__i_rel = var_calcium_release__i_rel;
547 double var_intracellular_calcium_concentration__i_NaCa_cyt = var_sodium_calcium_exchanger__i_NaCa_cyt;
548 double var_intracellular_calcium_concentration__i_NaCa_ds = var_sodium_calcium_exchanger__i_NaCa_ds;
549 double var_intracellular_calcium_concentration__i_Ca_L_Ca_cyt = var_L_type_Ca_channel__i_Ca_L_Ca_cyt;
550 double var_intracellular_calcium_concentration__i_Ca_L_Ca_ds = var_L_type_Ca_channel__i_Ca_L_Ca_ds;
551 double var_intracellular_calcium_concentration__i_b_Ca = var_calcium_background_current__i_b_Ca;
552 double var_intracellular_calcium_concentration__F = var_membrane__F;
557 const double g_sac = 0.035;
558 const double E_sac = -10;
560 double sac_ionic_current = g_sac * f * (var_membrane__V - E_sac);
562 double d_dt_membrane__V;
565 d_dt_membrane__V = 0.0;
569 d_dt_membrane__V = ((-1.0) / var_membrane__Cm) * (sac_ionic_current + 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);
571 double d_dt_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1 = (var_rapid_delayed_rectifier_potassium_current_xr1_gate__alpha_xr1 * (1.0 - var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1)) - (var_rapid_delayed_rectifier_potassium_current_xr1_gate__beta_xr1 * var_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1);
572 double d_dt_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2 = (var_rapid_delayed_rectifier_potassium_current_xr2_gate__alpha_xr2 * (1.0 - var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2)) - (var_rapid_delayed_rectifier_potassium_current_xr2_gate__beta_xr2 * var_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2);
573 double d_dt_slow_delayed_rectifier_potassium_current_xs_gate__xs = (var_slow_delayed_rectifier_potassium_current_xs_gate__alpha_xs * (1.0 - var_slow_delayed_rectifier_potassium_current_xs_gate__xs)) - (var_slow_delayed_rectifier_potassium_current_xs_gate__beta_xs * var_slow_delayed_rectifier_potassium_current_xs_gate__xs);
574 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);
575 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);
576 double d_dt_L_type_Ca_channel_d_gate__d = 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__d)) - (var_L_type_Ca_channel_d_gate__beta_d * var_L_type_Ca_channel_d_gate__d));
577 double d_dt_L_type_Ca_channel_f_gate__f = 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__f)) - (var_L_type_Ca_channel_f_gate__beta_f * var_L_type_Ca_channel_f_gate__f));
578 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));
579 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));
580 double d_dt_transient_outward_current_s_gate__s = (var_transient_outward_current_s_gate__alpha_s * (1.0 - var_transient_outward_current_s_gate__s)) - (var_transient_outward_current_s_gate__beta_s * var_transient_outward_current_s_gate__s);
581 double d_dt_transient_outward_current_r_gate__r = 333.0 * ((1.0 / (1.0 + exp((-(var_transient_outward_current_r_gate__V + 4.0)) / 5.0))) - var_transient_outward_current_r_gate__r);
582 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);
583 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);
584 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);
585 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));
586 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);
587 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);
588 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;
589 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);
590 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;
591 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;
593 rDY[0] = 0.001*d_dt_membrane__V;
594 rDY[1] = 0.001*d_dt_rapid_delayed_rectifier_potassium_current_xr1_gate__xr1;
595 rDY[2] = 0.001*d_dt_rapid_delayed_rectifier_potassium_current_xr2_gate__xr2;
596 rDY[3] = 0.001*d_dt_slow_delayed_rectifier_potassium_current_xs_gate__xs;
597 rDY[4] = 0.001*d_dt_fast_sodium_current_m_gate__m;
598 rDY[5] = 0.001*d_dt_fast_sodium_current_h_gate__h;
599 rDY[6] = 0.001*d_dt_L_type_Ca_channel_d_gate__d;
600 rDY[7] = 0.001*d_dt_L_type_Ca_channel_f_gate__f;
601 rDY[8] = 0.001*d_dt_L_type_Ca_channel_f2_gate__f2;
602 rDY[9] = 0.001*d_dt_L_type_Ca_channel_f2ds_gate__f2ds;
603 rDY[10] = 0.001*d_dt_transient_outward_current_s_gate__s;
604 rDY[11] = 0.001*d_dt_transient_outward_current_r_gate__r;
605 rDY[12] = 0.001*d_dt_calcium_release__ActFrac;
606 rDY[13] = 0.001*d_dt_calcium_release__ProdFrac;
607 rDY[14] = 0.001*d_dt_intracellular_sodium_concentration__Na_i;
608 rDY[15] = 0.001*d_dt_intracellular_potassium_concentration__K_i;
609 rDY[16] = 0.001*d_dt_intracellular_calcium_concentration__Ca_i;
610 rDY[17] = 0.001*d_dt_intracellular_calcium_concentration__Ca_ds;
611 rDY[18] = 0.001*d_dt_intracellular_calcium_concentration__Ca_up;
612 rDY[19] = 0.001*d_dt_intracellular_calcium_concentration__Ca_rel;
613 rDY[20] = 0.001*d_dt_intracellular_calcium_concentration__Ca_Calmod;
614 rDY[21] = 0.001*d_dt_intracellular_calcium_concentration__Ca_Trop;