Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PanditGilesDemir03.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File PanditGilesDemir03.cpp
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Pandit-Giles-Demir 2003 cell model
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #include <iostream>
37 #include <string>
40 namespace Nektar
41 {
44  "PanditGilesDemir03",
46  "Pandit-Giles-Demir 2003 cell model.");
47 
48 
49  /**
50  *
51  */
54  const int nq): CellModel(pSession, nq)
55  {
56  m_nq = nq;
57  }
58 
59 
61  const Array<OneD, const Array<OneD, NekDouble> >&inarray,
62  Array<OneD, Array<OneD, NekDouble> >&outarray,
63  const NekDouble time)
64  {
65  int nvariables = inarray.num_elements();
66  int nq = m_nq;
67  for (unsigned int i = 0; i < nq; ++i)
68  {
69  // Inputs:
70  // Time units: millisecond
71  NekDouble var_chaste_interface__membrane__V = inarray[0][i];
72  // Units: millivolt; Initial value: -80.50146
73  NekDouble var_chaste_interface__sodium_current_m_gate__m = inarray[2][i];
74  // Units: dimensionless; Initial value: 0.004164108
75  NekDouble var_chaste_interface__sodium_current_h_gate__h = inarray[3][i];
76  // Units: dimensionless; Initial value: 0.6735613
77  NekDouble var_chaste_interface__sodium_current_j_gate__j = inarray[4][i];
78  // Units: dimensionless; Initial value: 0.6729362
79  NekDouble var_chaste_interface__L_type_Ca_channel_d_gate__d = inarray[5][i];
80  // Units: dimensionless; Initial value: 0.000002171081
81  NekDouble var_chaste_interface__L_type_Ca_channel_f_11_gate__f_11 = inarray[6][i];
82  // Units: dimensionless; Initial value: 0.9999529
83  NekDouble var_chaste_interface__L_type_Ca_channel_f_12_gate__f_12 = inarray[7][i];
84  // Units: dimensionless; Initial value: 0.9999529
85  NekDouble var_chaste_interface__L_type_Ca_channel_Ca_inact_gate__Ca_inact = inarray[8][i];
86  // Units: dimensionless; Initial value: 0.9913102
87  NekDouble var_chaste_interface__Ca_independent_transient_outward_K_current_r_gate__r = inarray[9][i];
88  // Units: dimensionless; Initial value: 0.002191519
89  NekDouble var_chaste_interface__Ca_independent_transient_outward_K_current_s_gate__s = inarray[10][i];
90  // Units: dimensionless; Initial value: 0.9842542
91  NekDouble var_chaste_interface__Ca_independent_transient_outward_K_current_s_slow_gate__s_slow = inarray[11][i];
92  // Units: dimensionless; Initial value: 0.6421196
93  NekDouble var_chaste_interface__steady_state_outward_K_current_r_ss_gate__r_ss = inarray[12][i];
94  // Units: dimensionless; Initial value: 0.002907171
95  NekDouble var_chaste_interface__steady_state_outward_K_current_s_ss_gate__s_ss = inarray[13][i];
96  // Units: dimensionless; Initial value: 0.3142767
97  NekDouble var_chaste_interface__hyperpolarisation_activated_current_y_gate__y = inarray[14][i];
98  // Units: dimensionless; Initial value: 0.003578708
99  NekDouble var_chaste_interface__SR_Ca_release_channel__P_O1 = inarray[15][i];
100  // Units: dimensionless; Initial value: 0.0004327548
101  NekDouble var_chaste_interface__SR_Ca_release_channel__P_O2 = inarray[16][i];
102  // Units: dimensionless; Initial value: 0.000000000606254
103  NekDouble var_chaste_interface__SR_Ca_release_channel__P_C1 = inarray[17][i];
104  // Units: dimensionless; Initial value: 0.6348229
105  NekDouble var_chaste_interface__SR_Ca_release_channel__P_C2 = inarray[18][i];
106  // Units: dimensionless; Initial value: 0.3647471
107  NekDouble var_chaste_interface__intracellular_and_SR_Ca_fluxes__HTRPNCa = inarray[19][i];
108  // Units: millimolar; Initial value: 1.394301e-1
109  NekDouble var_chaste_interface__intracellular_and_SR_Ca_fluxes__LTRPNCa = inarray[20][i];
110  // Units: millimolar; Initial value: 5.1619e-3
111  NekDouble var_chaste_interface__intracellular_ion_concentrations__Na_i = inarray[21][i];
112  // Units: millimolar; Initial value: 10.73519
113  NekDouble var_chaste_interface__intracellular_ion_concentrations__Ca_i = inarray[22][i];
114  // Units: millimolar; Initial value: 0.00007901351
115  NekDouble var_chaste_interface__intracellular_ion_concentrations__K_i = inarray[23][i];
116  // Units: millimolar; Initial value: 139.2751
117  NekDouble var_chaste_interface__intracellular_ion_concentrations__Ca_ss = inarray[24][i];
118  // Units: millimolar; Initial value: 0.00008737212
119  NekDouble var_chaste_interface__intracellular_ion_concentrations__Ca_JSR = inarray[25][i];
120  // Units: millimolar; Initial value: 0.06607948
121  NekDouble var_chaste_interface__intracellular_ion_concentrations__Ca_NSR = inarray[26][i];
122  // Units: millimolar; Initial value: 0.06600742
123 
124 
125  // Mathematics
126  NekDouble d_dt_chaste_interface__membrane__V;
127  const NekDouble var_membrane__R = 8314.5; // millijoule_per_mole_kelvin
128  const NekDouble var_membrane__T = 295.0; // kelvin
129  const NekDouble var_membrane__F = 96487.0; // coulomb_per_mole
130  const NekDouble var_sodium_current__F = var_membrane__F; // coulomb_per_mole
131  const NekDouble var_standard_ionic_concentrations__Na_o = 140.0; // millimolar
132  const NekDouble var_sodium_current__Na_o = var_standard_ionic_concentrations__Na_o; // millimolar
133  const NekDouble var_sodium_current__T = var_membrane__T; // kelvin
134  const NekDouble var_sodium_current__R = var_membrane__R; // millijoule_per_mole_kelvin
135  const NekDouble var_sodium_current__Na_i = var_chaste_interface__intracellular_ion_concentrations__Na_i; // millimolar
136  const NekDouble var_sodium_current__E_Na = ((var_sodium_current__R * var_sodium_current__T) / var_sodium_current__F) * log(var_sodium_current__Na_o / var_sodium_current__Na_i); // millivolt
137  const NekDouble var_sodium_current__m = var_chaste_interface__sodium_current_m_gate__m; // dimensionless
138  const NekDouble var_sodium_current__j = var_chaste_interface__sodium_current_j_gate__j; // dimensionless
139  const NekDouble var_sodium_current__h = var_chaste_interface__sodium_current_h_gate__h; // dimensionless
140  const NekDouble var_sodium_current__V = var_chaste_interface__membrane__V; // millivolt
141  const NekDouble var_sodium_current__g_Na = 1.064; // microS
142  const NekDouble var_sodium_current__i_Na = var_sodium_current__g_Na * pow(var_sodium_current__m, 3.0) * var_sodium_current__h * var_sodium_current__j * (var_sodium_current__V - var_sodium_current__E_Na); // nanoA
143  const NekDouble var_L_type_Ca_channel__d = var_chaste_interface__L_type_Ca_channel_d_gate__d; // dimensionless
144  const NekDouble var_L_type_Ca_channel__E_Ca_L = 65.0; // millivolt
145  const NekDouble var_L_type_Ca_channel__g_Ca_L_normal = 0.0341; // microS
146  const NekDouble var_membrane__Diabetes = 0.0; // dimensionless
147  const NekDouble var_L_type_Ca_channel__Diabetes = var_membrane__Diabetes; // dimensionless
148  const NekDouble var_L_type_Ca_channel__g_Ca_L = (var_L_type_Ca_channel__Diabetes == 0.0) ? var_L_type_Ca_channel__g_Ca_L_normal : (0.76 * var_L_type_Ca_channel__g_Ca_L_normal); // microS
149  const NekDouble var_L_type_Ca_channel__f_12 = var_chaste_interface__L_type_Ca_channel_f_12_gate__f_12; // dimensionless
150  const NekDouble var_L_type_Ca_channel__f_11 = var_chaste_interface__L_type_Ca_channel_f_11_gate__f_11; // dimensionless
151  const NekDouble var_L_type_Ca_channel__V = var_chaste_interface__membrane__V; // millivolt
152  const NekDouble var_L_type_Ca_channel__Ca_inact = var_chaste_interface__L_type_Ca_channel_Ca_inact_gate__Ca_inact; // dimensionless
153  const NekDouble var_L_type_Ca_channel__i_Ca_L = var_L_type_Ca_channel__g_Ca_L * var_L_type_Ca_channel__d * (((0.9 + (var_L_type_Ca_channel__Ca_inact / 10.0)) * var_L_type_Ca_channel__f_11) + ((0.1 - (var_L_type_Ca_channel__Ca_inact / 10.0)) * var_L_type_Ca_channel__f_12)) * (var_L_type_Ca_channel__V - var_L_type_Ca_channel__E_Ca_L); // nanoA
154  const NekDouble var_Ca_independent_transient_outward_K_current__Diabetes = var_membrane__Diabetes; // dimensionless
155  const NekDouble var_Ca_independent_transient_outward_K_current__b = (var_Ca_independent_transient_outward_K_current__Diabetes == 0.0) ? 0.114 : 0.31; // dimensionless
156  const NekDouble var_Ca_independent_transient_outward_K_current__a = 1.0 - var_Ca_independent_transient_outward_K_current__b; // dimensionless
157  const NekDouble var_Ca_independent_transient_outward_K_current__g_t_normal = 0.04375; // microS
158  const NekDouble var_Ca_independent_transient_outward_K_current__g_t = (var_Ca_independent_transient_outward_K_current__Diabetes == 0.0) ? var_Ca_independent_transient_outward_K_current__g_t_normal : (0.68 * var_Ca_independent_transient_outward_K_current__g_t_normal); // microS
159  const NekDouble var_Ca_independent_transient_outward_K_current__V = var_chaste_interface__membrane__V; // millivolt
160  const NekDouble var_Ca_independent_transient_outward_K_current__r = var_chaste_interface__Ca_independent_transient_outward_K_current_r_gate__r; // dimensionless
161  const NekDouble var_Ca_independent_transient_outward_K_current__s = var_chaste_interface__Ca_independent_transient_outward_K_current_s_gate__s; // dimensionless
162  const NekDouble var_Ca_independent_transient_outward_K_current__F = var_membrane__F; // coulomb_per_mole
163  const NekDouble var_Ca_independent_transient_outward_K_current__T = var_membrane__T; // kelvin
164  const NekDouble var_Ca_independent_transient_outward_K_current__K_i = var_chaste_interface__intracellular_ion_concentrations__K_i; // millimolar
165  const NekDouble var_Ca_independent_transient_outward_K_current__R = var_membrane__R; // millijoule_per_mole_kelvin
166  const NekDouble var_standard_ionic_concentrations__K_o = 5.4; // millimolar
167  const NekDouble var_Ca_independent_transient_outward_K_current__K_o = var_standard_ionic_concentrations__K_o; // millimolar
168  const NekDouble var_Ca_independent_transient_outward_K_current__E_K = ((var_Ca_independent_transient_outward_K_current__R * var_Ca_independent_transient_outward_K_current__T) / var_Ca_independent_transient_outward_K_current__F) * log(var_Ca_independent_transient_outward_K_current__K_o / var_Ca_independent_transient_outward_K_current__K_i); // millivolt
169  const NekDouble var_Ca_independent_transient_outward_K_current__s_slow = var_chaste_interface__Ca_independent_transient_outward_K_current_s_slow_gate__s_slow; // dimensionless
170  const NekDouble var_Ca_independent_transient_outward_K_current__i_t = var_Ca_independent_transient_outward_K_current__g_t * var_Ca_independent_transient_outward_K_current__r * ((var_Ca_independent_transient_outward_K_current__a * var_Ca_independent_transient_outward_K_current__s) + (var_Ca_independent_transient_outward_K_current__b * var_Ca_independent_transient_outward_K_current__s_slow)) * (var_Ca_independent_transient_outward_K_current__V - var_Ca_independent_transient_outward_K_current__E_K); // nanoA
171  const NekDouble var_steady_state_outward_K_current__V = var_chaste_interface__membrane__V; // millivolt
172  const NekDouble var_steady_state_outward_K_current__s_ss = var_chaste_interface__steady_state_outward_K_current_s_ss_gate__s_ss; // dimensionless
173  const NekDouble var_steady_state_outward_K_current__E_K = var_Ca_independent_transient_outward_K_current__E_K; // millivolt
174  const NekDouble var_steady_state_outward_K_current__g_ss_normal = 0.0077; // microS
175  const NekDouble var_steady_state_outward_K_current__Diabetes = var_membrane__Diabetes; // dimensionless
176  const NekDouble var_steady_state_outward_K_current__g_ss = (var_steady_state_outward_K_current__Diabetes == 0.0) ? var_steady_state_outward_K_current__g_ss_normal : (0.77 * var_steady_state_outward_K_current__g_ss_normal); // microS
177  const NekDouble var_steady_state_outward_K_current__r_ss = var_chaste_interface__steady_state_outward_K_current_r_ss_gate__r_ss; // dimensionless
178  const NekDouble var_steady_state_outward_K_current__i_ss = var_steady_state_outward_K_current__g_ss * var_steady_state_outward_K_current__r_ss * var_steady_state_outward_K_current__s_ss * (var_steady_state_outward_K_current__V - var_steady_state_outward_K_current__E_K); // nanoA
179  const NekDouble var_hyperpolarisation_activated_current__f_Na = 0.2; // dimensionless
180  const NekDouble var_hyperpolarisation_activated_current__E_Na = var_sodium_current__E_Na; // millivolt
181  const NekDouble var_hyperpolarisation_activated_current__y = var_chaste_interface__hyperpolarisation_activated_current_y_gate__y; // dimensionless
182  const NekDouble var_hyperpolarisation_activated_current__V = var_chaste_interface__membrane__V; // millivolt
183  const NekDouble var_hyperpolarisation_activated_current__g_f = 0.00145; // microS
184  const NekDouble var_hyperpolarisation_activated_current__i_f_Na = var_hyperpolarisation_activated_current__g_f * var_hyperpolarisation_activated_current__y * var_hyperpolarisation_activated_current__f_Na * (var_hyperpolarisation_activated_current__V - var_hyperpolarisation_activated_current__E_Na); // nanoA
185  const NekDouble var_hyperpolarisation_activated_current__f_K = 1.0 - var_hyperpolarisation_activated_current__f_Na; // dimensionless
186  const NekDouble var_hyperpolarisation_activated_current__E_K = var_Ca_independent_transient_outward_K_current__E_K; // millivolt
187  const NekDouble var_hyperpolarisation_activated_current__i_f_K = var_hyperpolarisation_activated_current__g_f * var_hyperpolarisation_activated_current__y * var_hyperpolarisation_activated_current__f_K * (var_hyperpolarisation_activated_current__V - var_hyperpolarisation_activated_current__E_K); // nanoA
188  const NekDouble var_inward_rectifier__T = var_membrane__T; // kelvin
189  const NekDouble var_inward_rectifier__V = var_chaste_interface__membrane__V; // millivolt
190  const NekDouble var_inward_rectifier__g_K1 = 0.024; // microS
191  const NekDouble var_inward_rectifier__R = var_membrane__R; // millijoule_per_mole_kelvin
192  const NekDouble var_inward_rectifier__K_o = var_standard_ionic_concentrations__K_o; // millimolar
193  const NekDouble var_inward_rectifier__F = var_membrane__F; // coulomb_per_mole
194  const NekDouble var_inward_rectifier__E_K = var_Ca_independent_transient_outward_K_current__E_K; // millivolt
195  const NekDouble var_inward_rectifier__i_K1 = ((((48.0 / (exp((var_inward_rectifier__V + 37.0) / 25.0) + exp((var_inward_rectifier__V + 37.0) / (-25.0)))) + 10.0) * 0.0001) / (1.0 + exp((var_inward_rectifier__V - (var_inward_rectifier__E_K + 76.77)) / (-17.0)))) + ((var_inward_rectifier__g_K1 * (var_inward_rectifier__V - (var_inward_rectifier__E_K + 1.73))) / ((1.0 + exp((1.613 * var_inward_rectifier__F * (var_inward_rectifier__V - (var_inward_rectifier__E_K + 1.73))) / (var_inward_rectifier__R * var_inward_rectifier__T))) * (1.0 + exp((var_inward_rectifier__K_o - 0.9988) / (-0.124))))); // nanoA
196  const NekDouble var_background_currents__R = var_membrane__R; // millijoule_per_mole_kelvin
197  const NekDouble var_background_currents__Ca_i = var_chaste_interface__intracellular_ion_concentrations__Ca_i; // millimolar
198  const NekDouble var_standard_ionic_concentrations__Ca_o = 1.2; // millimolar
199  const NekDouble var_background_currents__Ca_o = var_standard_ionic_concentrations__Ca_o; // millimolar
200  const NekDouble var_background_currents__F = var_membrane__F; // coulomb_per_mole
201  const NekDouble var_background_currents__T = var_membrane__T; // kelvin
202  const NekDouble var_background_currents__E_Ca = ((0.5 * var_background_currents__R * var_background_currents__T) / var_background_currents__F) * log(var_background_currents__Ca_o / var_background_currents__Ca_i); // millivolt
203  const NekDouble var_background_currents__V = var_chaste_interface__membrane__V; // millivolt
204  const NekDouble var_background_currents__g_B_Ca_normal = 3.24e-05; // microS
205  const NekDouble var_background_currents__Diabetes = var_membrane__Diabetes; // dimensionless
206  const NekDouble var_background_currents__g_B_Ca = (var_background_currents__Diabetes == 0.0) ? var_background_currents__g_B_Ca_normal : (0.5 * var_background_currents__g_B_Ca_normal); // microS
207  const NekDouble var_background_currents__i_B_Ca = var_background_currents__g_B_Ca * (var_background_currents__V - var_background_currents__E_Ca); // nanoA
208  const NekDouble var_background_currents__g_B_K = 0.000138; // microS
209  const NekDouble var_background_currents__E_K = var_Ca_independent_transient_outward_K_current__E_K; // millivolt
210  const NekDouble var_background_currents__i_B_K = var_background_currents__g_B_K * (var_background_currents__V - var_background_currents__E_K); // nanoA
211  const NekDouble var_background_currents__E_Na = var_sodium_current__E_Na; // millivolt
212  const NekDouble var_background_currents__g_B_Na_normal = 8.015e-05; // microS
213  const NekDouble var_background_currents__g_B_Na = (var_background_currents__Diabetes == 0.0) ? var_background_currents__g_B_Na_normal : (1.25 * var_background_currents__g_B_Na_normal); // microS
214  const NekDouble var_background_currents__i_B_Na = var_background_currents__g_B_Na * (var_background_currents__V - var_background_currents__E_Na); // nanoA
215  const NekDouble var_sodium_potassium_pump__Na_o = var_standard_ionic_concentrations__Na_o; // millimolar
216  const NekDouble var_sodium_potassium_pump__sigma = (exp(var_sodium_potassium_pump__Na_o / 67.3) - 1.0) / 7.0; // dimensionless
217  const NekDouble var_sodium_potassium_pump__K_m_Na = 10.0; // millimolar
218  const NekDouble var_sodium_potassium_pump__K_m_K = 1.5; // millimolar
219  const NekDouble var_sodium_potassium_pump__V = var_chaste_interface__membrane__V; // millivolt
220  const NekDouble var_sodium_potassium_pump__T = var_membrane__T; // kelvin
221  const NekDouble var_sodium_potassium_pump__R = var_membrane__R; // millijoule_per_mole_kelvin
222  const NekDouble var_sodium_potassium_pump__Na_i = var_chaste_interface__intracellular_ion_concentrations__Na_i; // millimolar
223  const NekDouble var_sodium_potassium_pump__F = var_membrane__F; // coulomb_per_mole
224  const NekDouble var_sodium_potassium_pump__i_NaK_max_normal = 0.08; // nanoA
225  const NekDouble var_sodium_potassium_pump__Diabetes = var_membrane__Diabetes; // dimensionless
226  const NekDouble var_sodium_potassium_pump__i_NaK_max = (var_sodium_potassium_pump__Diabetes == 0.0) ? var_sodium_potassium_pump__i_NaK_max_normal : (0.63 * var_sodium_potassium_pump__i_NaK_max_normal); // nanoA
227  const NekDouble var_sodium_potassium_pump__K_o = var_standard_ionic_concentrations__K_o; // millimolar
228  const NekDouble var_sodium_potassium_pump__i_NaK = (((var_sodium_potassium_pump__i_NaK_max / (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))))) * var_sodium_potassium_pump__K_o) / (var_sodium_potassium_pump__K_o + var_sodium_potassium_pump__K_m_K)) / (1.0 + pow(var_sodium_potassium_pump__K_m_Na / var_sodium_potassium_pump__Na_i, 1.5)); // nanoA
229  const NekDouble var_Na_Ca_ion_exchanger_current__Na_o = var_standard_ionic_concentrations__Na_o; // millimolar
230  const NekDouble var_Na_Ca_ion_exchanger_current__Na_i = var_chaste_interface__intracellular_ion_concentrations__Na_i; // millimolar
231  const NekDouble var_Na_Ca_ion_exchanger_current__gamma_NaCa = 0.5; // dimensionless
232  const NekDouble var_Na_Ca_ion_exchanger_current__Ca_i = var_chaste_interface__intracellular_ion_concentrations__Ca_i; // millimolar
233  const NekDouble var_Na_Ca_ion_exchanger_current__Ca_o = var_standard_ionic_concentrations__Ca_o; // millimolar
234  const NekDouble var_Na_Ca_ion_exchanger_current__K_NaCa = 9.984e-06; // nanoA_millimolar_4
235  const NekDouble var_Na_Ca_ion_exchanger_current__d_NaCa = 0.0001; // millimolar_4
236  const NekDouble var_Na_Ca_ion_exchanger_current__V = var_chaste_interface__membrane__V; // millivolt
237  const NekDouble var_Na_Ca_ion_exchanger_current__i_NaCa = (var_Na_Ca_ion_exchanger_current__K_NaCa * ((pow(var_Na_Ca_ion_exchanger_current__Na_i, 3.0) * var_Na_Ca_ion_exchanger_current__Ca_o * exp(0.03743 * var_Na_Ca_ion_exchanger_current__V * var_Na_Ca_ion_exchanger_current__gamma_NaCa)) - (pow(var_Na_Ca_ion_exchanger_current__Na_o, 3.0) * var_Na_Ca_ion_exchanger_current__Ca_i * exp(0.03743 * var_Na_Ca_ion_exchanger_current__V * (var_Na_Ca_ion_exchanger_current__gamma_NaCa - 1.0))))) / (1.0 + (var_Na_Ca_ion_exchanger_current__d_NaCa * ((var_Na_Ca_ion_exchanger_current__Ca_i * pow(var_Na_Ca_ion_exchanger_current__Na_o, 3.0)) + (var_Na_Ca_ion_exchanger_current__Ca_o * pow(var_Na_Ca_ion_exchanger_current__Na_i, 3.0))))); // nanoA
238  const NekDouble var_sarcolemmal_calcium_pump_current__Ca_i = var_chaste_interface__intracellular_ion_concentrations__Ca_i; // millimolar
239  const NekDouble var_sarcolemmal_calcium_pump_current__i_Ca_P_max = 0.004; // nanoA
240  const NekDouble var_sarcolemmal_calcium_pump_current__i_Ca_P = (var_sarcolemmal_calcium_pump_current__i_Ca_P_max * var_sarcolemmal_calcium_pump_current__Ca_i) / (var_sarcolemmal_calcium_pump_current__Ca_i + 0.0004); // nanoA
241  const NekDouble var_sodium_current_m_gate__V = var_sodium_current__V; // millivolt
242  const NekDouble var_sodium_current_m_gate__m_infinity = 1.0 / (1.0 + exp((var_sodium_current_m_gate__V + 45.0) / (-6.5))); // dimensionless
243  const NekDouble var_sodium_current_m_gate__tau_m = 0.00136 / (((0.32 * (var_sodium_current_m_gate__V + 47.13)) / (1.0 - exp((-0.1) * (var_sodium_current_m_gate__V + 47.13)))) + (0.08 * exp((-var_sodium_current_m_gate__V) / 11.0))); // second
244  const NekDouble var_sodium_current_m_gate__m = var_sodium_current__m; // dimensionless
245  const NekDouble var_sodium_current_m_gate__d_m_d_environment__time = (var_sodium_current_m_gate__m_infinity - var_sodium_current_m_gate__m) / var_sodium_current_m_gate__tau_m; // per_second
246  const NekDouble var_sodium_current__sodium_current_m_gate__d_m_d_environment__time = var_sodium_current_m_gate__d_m_d_environment__time; // per_second
247  const NekDouble var_sodium_current_h_gate__V = var_sodium_current__V; // millivolt
248  const NekDouble var_sodium_current_h_gate__h_infinity = 1.0 / (1.0 + exp((var_sodium_current_h_gate__V + 76.1) / 6.07)); // dimensionless
249  const NekDouble var_sodium_current_h_gate__h = var_sodium_current__h; // dimensionless
250  const NekDouble var_sodium_current_h_gate__tau_h = (var_sodium_current_h_gate__V >= (-40.0)) ? (0.0004537 * (1.0 + exp((-(var_sodium_current_h_gate__V + 10.66)) / 11.1))) : (0.00349 / ((0.135 * exp((-(var_sodium_current_h_gate__V + 80.0)) / 6.8)) + (3.56 * exp(0.079 * var_sodium_current_h_gate__V)) + (310000.0 * exp(0.35 * var_sodium_current_h_gate__V)))); // second
251  const NekDouble var_sodium_current_h_gate__d_h_d_environment__time = (var_sodium_current_h_gate__h_infinity - var_sodium_current_h_gate__h) / var_sodium_current_h_gate__tau_h; // per_second
252  const NekDouble var_sodium_current__sodium_current_h_gate__d_h_d_environment__time = var_sodium_current_h_gate__d_h_d_environment__time; // per_second
253  const NekDouble var_sodium_current_j_gate__V = var_sodium_current__V; // millivolt
254  const NekDouble var_sodium_current_j_gate__j_infinity = 1.0 / (1.0 + exp((var_sodium_current_j_gate__V + 76.1) / 6.07)); // dimensionless
255  const NekDouble var_sodium_current_j_gate__j = var_sodium_current__j; // dimensionless
256  const NekDouble var_sodium_current_j_gate__tau_j = (var_sodium_current_j_gate__V >= (-40.0)) ? ((0.01163 * (1.0 + exp((-0.1) * (var_sodium_current_j_gate__V + 32.0)))) / exp((-2.535e-07) * var_sodium_current_j_gate__V)) : (0.00349 / ((((var_sodium_current_j_gate__V + 37.78) / (1.0 + exp(0.311 * (var_sodium_current_j_gate__V + 79.23)))) * (((-127140.0) * exp(0.2444 * var_sodium_current_j_gate__V)) - (3.474e-05 * exp((-0.04391) * var_sodium_current_j_gate__V)))) + ((0.1212 * exp((-0.01052) * var_sodium_current_j_gate__V)) / (1.0 + exp((-0.1378) * (var_sodium_current_j_gate__V + 40.14)))))); // second
257  const NekDouble var_sodium_current_j_gate__d_j_d_environment__time = (var_sodium_current_j_gate__j_infinity - var_sodium_current_j_gate__j) / var_sodium_current_j_gate__tau_j; // per_second
258  const NekDouble var_sodium_current__sodium_current_j_gate__d_j_d_environment__time = var_sodium_current_j_gate__d_j_d_environment__time; // per_second
259  const NekDouble var_L_type_Ca_channel__Ca_ss = var_chaste_interface__intracellular_ion_concentrations__Ca_ss; // millimolar
260  const NekDouble var_L_type_Ca_channel_d_gate__d = var_L_type_Ca_channel__d; // dimensionless
261  const NekDouble var_L_type_Ca_channel_d_gate__V = var_L_type_Ca_channel__V; // millivolt
262  const NekDouble var_L_type_Ca_channel_d_gate__d_infinity = 1.0 / (1.0 + exp((var_L_type_Ca_channel_d_gate__V + 15.3) / (-5.0))); // dimensionless
263  const NekDouble var_L_type_Ca_channel_d_gate__tau_d = (0.00305 * exp((-0.0045) * pow(var_L_type_Ca_channel_d_gate__V + 7.0, 2.0))) + (0.00105 * exp((-0.002) * pow(var_L_type_Ca_channel_d_gate__V - 18.0, 2.0))) + 0.00025; // second
264  const NekDouble var_L_type_Ca_channel_d_gate__d_d_d_environment__time = (var_L_type_Ca_channel_d_gate__d_infinity - var_L_type_Ca_channel_d_gate__d) / var_L_type_Ca_channel_d_gate__tau_d; // per_second
265  const NekDouble var_L_type_Ca_channel__L_type_Ca_channel_d_gate__d_d_d_environment__time = var_L_type_Ca_channel_d_gate__d_d_d_environment__time; // per_second
266  const NekDouble var_L_type_Ca_channel_f_11_gate__f_11 = var_L_type_Ca_channel__f_11; // dimensionless
267  const NekDouble var_L_type_Ca_channel_f_11_gate__Diabetes = var_L_type_Ca_channel__Diabetes; // dimensionless
268  const NekDouble var_L_type_Ca_channel_f_11_gate__V = var_L_type_Ca_channel__V; // millivolt
269  const NekDouble var_L_type_Ca_channel_f_11_gate__tau_f_11 = (var_L_type_Ca_channel_f_11_gate__Diabetes == 0.0) ? ((0.105 * exp(-pow((var_L_type_Ca_channel_f_11_gate__V + 45.0) / 12.0, 2.0))) + (0.04 / (1.0 + exp(((-var_L_type_Ca_channel_f_11_gate__V) + 25.0) / 25.0))) + (0.015 / (1.0 + exp((var_L_type_Ca_channel_f_11_gate__V + 75.0) / 25.0))) + 0.0017) : ((0.9 * 0.105 * exp(-pow((var_L_type_Ca_channel_f_11_gate__V + 45.0) / 12.0, 2.0))) + (0.04 / (1.0 + exp(((-var_L_type_Ca_channel_f_11_gate__V) + 25.0) / 25.0))) + (0.015 / (1.0 + exp((var_L_type_Ca_channel_f_11_gate__V + 75.0) / 25.0))) + 0.0017); // second
270  const NekDouble var_L_type_Ca_channel_f_11_gate__f_11_infinity = 1.0 / (1.0 + exp((var_L_type_Ca_channel_f_11_gate__V + 26.7) / 5.4)); // dimensionless
271  const NekDouble var_L_type_Ca_channel_f_11_gate__d_f_11_d_environment__time = (var_L_type_Ca_channel_f_11_gate__f_11_infinity - var_L_type_Ca_channel_f_11_gate__f_11) / var_L_type_Ca_channel_f_11_gate__tau_f_11; // per_second
272  const NekDouble var_L_type_Ca_channel__L_type_Ca_channel_f_11_gate__d_f_11_d_environment__time = var_L_type_Ca_channel_f_11_gate__d_f_11_d_environment__time; // per_second
273  const NekDouble var_L_type_Ca_channel_f_12_gate__f_12 = var_L_type_Ca_channel__f_12; // dimensionless
274  const NekDouble var_L_type_Ca_channel_f_12_gate__V = var_L_type_Ca_channel__V; // millivolt
275  const NekDouble var_L_type_Ca_channel_f_12_gate__f_12_infinity = 1.0 / (1.0 + exp((var_L_type_Ca_channel_f_12_gate__V + 26.7) / 5.4)); // dimensionless
276  const NekDouble var_L_type_Ca_channel_f_12_gate__tau_f_12 = (0.041 * exp(-pow((var_L_type_Ca_channel_f_12_gate__V + 47.0) / 12.0, 2.0))) + (0.08 / (1.0 + exp((var_L_type_Ca_channel_f_12_gate__V + 55.0) / (-5.0)))) + (0.015 / (1.0 + exp((var_L_type_Ca_channel_f_12_gate__V + 75.0) / 25.0))) + 0.0017; // second
277  const NekDouble var_L_type_Ca_channel_f_12_gate__d_f_12_d_environment__time = (var_L_type_Ca_channel_f_12_gate__f_12_infinity - var_L_type_Ca_channel_f_12_gate__f_12) / var_L_type_Ca_channel_f_12_gate__tau_f_12; // per_second
278  const NekDouble var_L_type_Ca_channel__L_type_Ca_channel_f_12_gate__d_f_12_d_environment__time = var_L_type_Ca_channel_f_12_gate__d_f_12_d_environment__time; // per_second
279  const NekDouble var_L_type_Ca_channel_Ca_inact_gate__Ca_ss = var_L_type_Ca_channel__Ca_ss; // millimolar
280  const NekDouble var_L_type_Ca_channel_Ca_inact_gate__Ca_inact_infinity = 1.0 / (1.0 + (var_L_type_Ca_channel_Ca_inact_gate__Ca_ss / 0.01)); // dimensionless
281  const NekDouble var_L_type_Ca_channel_Ca_inact_gate__tau_Ca_inact = 0.009; // second
282  const NekDouble var_L_type_Ca_channel_Ca_inact_gate__Ca_inact = var_L_type_Ca_channel__Ca_inact; // dimensionless
283  const NekDouble var_L_type_Ca_channel_Ca_inact_gate__d_Ca_inact_d_environment__time = (var_L_type_Ca_channel_Ca_inact_gate__Ca_inact_infinity - var_L_type_Ca_channel_Ca_inact_gate__Ca_inact) / var_L_type_Ca_channel_Ca_inact_gate__tau_Ca_inact; // per_second
284  const NekDouble var_L_type_Ca_channel__L_type_Ca_channel_Ca_inact_gate__d_Ca_inact_d_environment__time = var_L_type_Ca_channel_Ca_inact_gate__d_Ca_inact_d_environment__time; // per_second
285  const NekDouble var_Ca_independent_transient_outward_K_current_r_gate__V = var_Ca_independent_transient_outward_K_current__V; // millivolt
286  const NekDouble var_Ca_independent_transient_outward_K_current_r_gate__r_infinity = 1.0 / (1.0 + exp((var_Ca_independent_transient_outward_K_current_r_gate__V + 10.6) / (-11.42))); // dimensionless
287  const NekDouble var_Ca_independent_transient_outward_K_current_r_gate__r = var_Ca_independent_transient_outward_K_current__r; // dimensionless
288  const NekDouble var_Ca_independent_transient_outward_K_current_r_gate__tau_r = 1.0 / ((45.16 * exp(0.03577 * (var_Ca_independent_transient_outward_K_current_r_gate__V + 50.0))) + (98.9 * exp((-0.1) * (var_Ca_independent_transient_outward_K_current_r_gate__V + 38.0)))); // second
289  const NekDouble var_Ca_independent_transient_outward_K_current_r_gate__d_r_d_environment__time = (var_Ca_independent_transient_outward_K_current_r_gate__r_infinity - var_Ca_independent_transient_outward_K_current_r_gate__r) / var_Ca_independent_transient_outward_K_current_r_gate__tau_r; // per_second
290  const NekDouble var_Ca_independent_transient_outward_K_current__Ca_independent_transient_outward_K_current_r_gate__d_r_d_environment__time = var_Ca_independent_transient_outward_K_current_r_gate__d_r_d_environment__time; // per_second
291  const NekDouble var_Ca_independent_transient_outward_K_current_s_gate__V = var_Ca_independent_transient_outward_K_current__V; // millivolt
292  const NekDouble var_Ca_independent_transient_outward_K_current_s_gate__s_infinity = 1.0 / (1.0 + exp((var_Ca_independent_transient_outward_K_current_s_gate__V + 45.3) / 6.8841)); // dimensionless
293  const NekDouble var_Ca_independent_transient_outward_K_current_s_gate__tau_s = (0.35 * exp(-pow((var_Ca_independent_transient_outward_K_current_s_gate__V + 70.0) / 15.0, 2.0))) + 0.035; // second
294  const NekDouble var_Ca_independent_transient_outward_K_current_s_gate__s = var_Ca_independent_transient_outward_K_current__s; // dimensionless
295  const NekDouble var_Ca_independent_transient_outward_K_current_s_gate__d_s_d_environment__time = (var_Ca_independent_transient_outward_K_current_s_gate__s_infinity - var_Ca_independent_transient_outward_K_current_s_gate__s) / var_Ca_independent_transient_outward_K_current_s_gate__tau_s; // per_second
296  const NekDouble var_Ca_independent_transient_outward_K_current__Ca_independent_transient_outward_K_current_s_gate__d_s_d_environment__time = var_Ca_independent_transient_outward_K_current_s_gate__d_s_d_environment__time; // per_second
297  const NekDouble var_Ca_independent_transient_outward_K_current_s_slow_gate__V = var_Ca_independent_transient_outward_K_current__V; // millivolt
298  const NekDouble var_Ca_independent_transient_outward_K_current_s_slow_gate__s_slow_infinity = 1.0 / (1.0 + exp((var_Ca_independent_transient_outward_K_current_s_slow_gate__V + 45.3) / 6.8841)); // dimensionless
299  const NekDouble var_Ca_independent_transient_outward_K_current_s_slow_gate__s_slow = var_Ca_independent_transient_outward_K_current__s_slow; // dimensionless
300  const NekDouble var_Ca_independent_transient_outward_K_current_s_slow_gate__tau_s_slow = (3.7 * exp(-pow((var_Ca_independent_transient_outward_K_current_s_slow_gate__V + 70.0) / 30.0, 2.0))) + 0.035; // second
301  const NekDouble var_Ca_independent_transient_outward_K_current_s_slow_gate__d_s_slow_d_environment__time = (var_Ca_independent_transient_outward_K_current_s_slow_gate__s_slow_infinity - var_Ca_independent_transient_outward_K_current_s_slow_gate__s_slow) / var_Ca_independent_transient_outward_K_current_s_slow_gate__tau_s_slow; // per_second
302  const NekDouble var_Ca_independent_transient_outward_K_current__Ca_independent_transient_outward_K_current_s_slow_gate__d_s_slow_d_environment__time = var_Ca_independent_transient_outward_K_current_s_slow_gate__d_s_slow_d_environment__time; // per_second
303  const NekDouble var_steady_state_outward_K_current_r_ss_gate__V = var_steady_state_outward_K_current__V; // millivolt
304  const NekDouble var_steady_state_outward_K_current_r_ss_gate__r_ss_infinity = 1.0 / (1.0 + exp((var_steady_state_outward_K_current_r_ss_gate__V + 11.5) / (-11.82))); // dimensionless
305  const NekDouble var_steady_state_outward_K_current_r_ss_gate__r_ss = var_steady_state_outward_K_current__r_ss; // dimensionless
306  const NekDouble var_steady_state_outward_K_current_r_ss_gate__tau_r_ss = 10.0 / ((45.16 * exp(0.03577 * (var_steady_state_outward_K_current_r_ss_gate__V + 50.0))) + (98.9 * exp((-0.1) * (var_steady_state_outward_K_current_r_ss_gate__V + 38.0)))); // second
307  const NekDouble var_steady_state_outward_K_current_r_ss_gate__d_r_ss_d_environment__time = (var_steady_state_outward_K_current_r_ss_gate__r_ss_infinity - var_steady_state_outward_K_current_r_ss_gate__r_ss) / var_steady_state_outward_K_current_r_ss_gate__tau_r_ss; // per_second
308  const NekDouble var_steady_state_outward_K_current__steady_state_outward_K_current_r_ss_gate__d_r_ss_d_environment__time = var_steady_state_outward_K_current_r_ss_gate__d_r_ss_d_environment__time; // per_second
309  const NekDouble var_steady_state_outward_K_current_s_ss_gate__s_ss = var_steady_state_outward_K_current__s_ss; // dimensionless
310  const NekDouble var_steady_state_outward_K_current_s_ss_gate__tau_s_ss = 2.1; // second
311  const NekDouble var_steady_state_outward_K_current_s_ss_gate__V = var_steady_state_outward_K_current__V; // millivolt
312  const NekDouble var_steady_state_outward_K_current_s_ss_gate__s_ss_infinity = 1.0 / (1.0 + exp((var_steady_state_outward_K_current_s_ss_gate__V + 87.5) / 10.3)); // dimensionless
313  const NekDouble var_steady_state_outward_K_current_s_ss_gate__d_s_ss_d_environment__time = (var_steady_state_outward_K_current_s_ss_gate__s_ss_infinity - var_steady_state_outward_K_current_s_ss_gate__s_ss) / var_steady_state_outward_K_current_s_ss_gate__tau_s_ss; // per_second
314  const NekDouble var_steady_state_outward_K_current__steady_state_outward_K_current_s_ss_gate__d_s_ss_d_environment__time = var_steady_state_outward_K_current_s_ss_gate__d_s_ss_d_environment__time; // per_second
315  const NekDouble var_hyperpolarisation_activated_current_y_gate__V = var_hyperpolarisation_activated_current__V; // millivolt
316  const NekDouble var_hyperpolarisation_activated_current_y_gate__tau_y = 1.0 / ((0.11885 * exp((var_hyperpolarisation_activated_current_y_gate__V + 80.0) / 28.37)) + (0.5623 * exp((var_hyperpolarisation_activated_current_y_gate__V + 80.0) / (-14.19)))); // second
317  const NekDouble var_hyperpolarisation_activated_current_y_gate__y = var_hyperpolarisation_activated_current__y; // dimensionless
318  const NekDouble var_hyperpolarisation_activated_current_y_gate__y_infinity = 1.0 / (1.0 + exp((var_hyperpolarisation_activated_current_y_gate__V + 138.6) / 10.48)); // dimensionless
319  const NekDouble var_hyperpolarisation_activated_current_y_gate__d_y_d_environment__time = (var_hyperpolarisation_activated_current_y_gate__y_infinity - var_hyperpolarisation_activated_current_y_gate__y) / var_hyperpolarisation_activated_current_y_gate__tau_y; // per_second
320  const NekDouble var_hyperpolarisation_activated_current__hyperpolarisation_activated_current_y_gate__d_y_d_environment__time = var_hyperpolarisation_activated_current_y_gate__d_y_d_environment__time; // per_second
321  const NekDouble var_SR_Ca_release_channel__Ca_ss = var_chaste_interface__intracellular_ion_concentrations__Ca_ss; // millimolar
322  const NekDouble var_SR_Ca_release_channel__v1 = 1800.0; // per_second
323  const NekDouble var_SR_Ca_release_channel__P_O2 = var_chaste_interface__SR_Ca_release_channel__P_O2; // dimensionless
324  const NekDouble var_SR_Ca_release_channel__P_O1 = var_chaste_interface__SR_Ca_release_channel__P_O1; // dimensionless
325  const NekDouble var_SR_Ca_release_channel__Ca_JSR = var_chaste_interface__intracellular_ion_concentrations__Ca_JSR; // millimolar
326  const NekDouble var_SR_Ca_release_channel__J_rel = var_SR_Ca_release_channel__v1 * (var_SR_Ca_release_channel__P_O1 + var_SR_Ca_release_channel__P_O2) * (var_SR_Ca_release_channel__Ca_JSR - var_SR_Ca_release_channel__Ca_ss); // millimolar_per_second
327  const NekDouble var_SR_Ca_release_channel__k_a_plus = 1.215e+13; // per_second
328  const NekDouble var_SR_Ca_release_channel__k_a_minus = 576.0; // per_second
329  const NekDouble var_SR_Ca_release_channel__k_b_plus = 4050000000.0; // per_second
330  const NekDouble var_SR_Ca_release_channel__k_b_minus = 1930.0; // per_second
331  const NekDouble var_SR_Ca_release_channel__k_c_plus = 100.0; // per_second
332  const NekDouble var_SR_Ca_release_channel__k_c_minus = 0.8; // per_second
333  const NekDouble var_SR_Ca_release_channel__P_C1 = var_chaste_interface__SR_Ca_release_channel__P_C1; // dimensionless
334  const NekDouble var_SR_Ca_release_channel__P_C2 = var_chaste_interface__SR_Ca_release_channel__P_C2; // dimensionless
335  const NekDouble var_SR_Ca_release_channel__n = 4.0; // dimensionless
336  const NekDouble var_SR_Ca_release_channel__m = 3.0; // dimensionless
337  const NekDouble var_SR_Ca_release_channel__d_P_O1_d_environment__time = ((var_SR_Ca_release_channel__k_a_plus * pow(var_SR_Ca_release_channel__Ca_ss / 1.0, var_SR_Ca_release_channel__n) * var_SR_Ca_release_channel__P_C1) - ((var_SR_Ca_release_channel__k_a_minus * var_SR_Ca_release_channel__P_O1) + (var_SR_Ca_release_channel__k_b_plus * pow(var_SR_Ca_release_channel__Ca_ss / 1.0, var_SR_Ca_release_channel__m) * var_SR_Ca_release_channel__P_O1) + (var_SR_Ca_release_channel__k_c_plus * var_SR_Ca_release_channel__P_O1))) + (var_SR_Ca_release_channel__k_b_minus * var_SR_Ca_release_channel__P_O2) + (var_SR_Ca_release_channel__k_c_minus * var_SR_Ca_release_channel__P_C2); // per_second
338  const NekDouble var_SR_Ca_release_channel__d_P_O2_d_environment__time = (var_SR_Ca_release_channel__k_b_plus * pow(var_SR_Ca_release_channel__Ca_ss / 1.0, var_SR_Ca_release_channel__m) * var_SR_Ca_release_channel__P_O1) - (var_SR_Ca_release_channel__k_b_minus * var_SR_Ca_release_channel__P_O2); // per_second
339  const NekDouble var_SR_Ca_release_channel__d_P_C1_d_environment__time = ((-var_SR_Ca_release_channel__k_a_plus) * pow(var_SR_Ca_release_channel__Ca_ss / 1.0, var_SR_Ca_release_channel__n) * var_SR_Ca_release_channel__P_C1) + (var_SR_Ca_release_channel__k_a_minus * var_SR_Ca_release_channel__P_O1); // per_second
340  const NekDouble var_SR_Ca_release_channel__d_P_C2_d_environment__time = (var_SR_Ca_release_channel__k_c_plus * var_SR_Ca_release_channel__P_O1) - (var_SR_Ca_release_channel__k_c_minus * var_SR_Ca_release_channel__P_C2); // per_second
341  const NekDouble var_SERCA2a_pump__N_fb = 1.2; // dimensionless
342  const NekDouble var_SERCA2a_pump__K_fb = 0.000168; // millimolar
343  const NekDouble var_SERCA2a_pump__Ca_i = var_chaste_interface__intracellular_ion_concentrations__Ca_i; // millimolar
344  const NekDouble var_SERCA2a_pump__fb = pow(var_SERCA2a_pump__Ca_i / var_SERCA2a_pump__K_fb, var_SERCA2a_pump__N_fb); // dimensionless
345  const NekDouble var_SERCA2a_pump__Diabetes = var_membrane__Diabetes; // dimensionless
346  const NekDouble var_SERCA2a_pump__Vmaxf_normal = 0.04; // millimolar_per_second
347  const NekDouble var_SERCA2a_pump__Vmaxf = (var_SERCA2a_pump__Diabetes == 0.0) ? var_SERCA2a_pump__Vmaxf_normal : (0.8 * var_SERCA2a_pump__Vmaxf_normal); // millimolar_per_second
348  const NekDouble var_SERCA2a_pump__K_SR_normal = 1.0; // dimensionless
349  const NekDouble var_SERCA2a_pump__K_SR = (var_SERCA2a_pump__Diabetes == 0.0) ? var_SERCA2a_pump__K_SR_normal : (0.55 * var_SERCA2a_pump__K_SR_normal); // dimensionless
350  const NekDouble var_SERCA2a_pump__Ca_NSR = var_chaste_interface__intracellular_ion_concentrations__Ca_NSR; // millimolar
351  const NekDouble var_SERCA2a_pump__K_rb = 3.29; // millimolar
352  const NekDouble var_SERCA2a_pump__N_rb = 1.0; // dimensionless
353  const NekDouble var_SERCA2a_pump__rb = pow(var_SERCA2a_pump__Ca_NSR / var_SERCA2a_pump__K_rb, var_SERCA2a_pump__N_rb); // dimensionless
354  const NekDouble var_SERCA2a_pump__Vmaxr = 0.9; // millimolar_per_second
355  const NekDouble var_SERCA2a_pump__J_up = (var_SERCA2a_pump__K_SR * ((var_SERCA2a_pump__Vmaxf * var_SERCA2a_pump__fb) - (var_SERCA2a_pump__Vmaxr * var_SERCA2a_pump__rb))) / (1.0 + var_SERCA2a_pump__fb + var_SERCA2a_pump__rb); // millimolar_per_second
356  const NekDouble var_intracellular_and_SR_Ca_fluxes__tau_tr = 0.0005747; // second
357  const NekDouble var_intracellular_and_SR_Ca_fluxes__Ca_JSR = var_chaste_interface__intracellular_ion_concentrations__Ca_JSR; // millimolar
358  const NekDouble var_intracellular_and_SR_Ca_fluxes__Ca_NSR = var_chaste_interface__intracellular_ion_concentrations__Ca_NSR; // millimolar
359  const NekDouble var_intracellular_and_SR_Ca_fluxes__J_tr = (var_intracellular_and_SR_Ca_fluxes__Ca_NSR - var_intracellular_and_SR_Ca_fluxes__Ca_JSR) / var_intracellular_and_SR_Ca_fluxes__tau_tr; // millimolar_per_second
360  const NekDouble var_intracellular_and_SR_Ca_fluxes__Ca_ss = var_chaste_interface__intracellular_ion_concentrations__Ca_ss; // millimolar
361  const NekDouble var_intracellular_and_SR_Ca_fluxes__Ca_i = var_chaste_interface__intracellular_ion_concentrations__Ca_i; // millimolar
362  const NekDouble var_intracellular_and_SR_Ca_fluxes__tau_xfer = 0.0267; // second
363  const NekDouble var_intracellular_and_SR_Ca_fluxes__J_xfer = (var_intracellular_and_SR_Ca_fluxes__Ca_ss - var_intracellular_and_SR_Ca_fluxes__Ca_i) / var_intracellular_and_SR_Ca_fluxes__tau_xfer; // millimolar_per_second
364  const NekDouble var_intracellular_and_SR_Ca_fluxes__k_htrpn_plus = 200000.0; // per_millimolar_per_second
365  const NekDouble var_intracellular_and_SR_Ca_fluxes__k_htrpn_minus = 0.066; // per_second
366  const NekDouble var_intracellular_and_SR_Ca_fluxes__HTRPNCa = var_chaste_interface__intracellular_and_SR_Ca_fluxes__HTRPNCa; // millimolar
367  const NekDouble var_intracellular_and_SR_Ca_fluxes__HTRPN_tot = 0.14; // millimolar
368  const NekDouble var_intracellular_and_SR_Ca_fluxes__J_HTRPNCa = (var_intracellular_and_SR_Ca_fluxes__k_htrpn_plus * var_intracellular_and_SR_Ca_fluxes__Ca_i * (var_intracellular_and_SR_Ca_fluxes__HTRPN_tot - var_intracellular_and_SR_Ca_fluxes__HTRPNCa)) - (var_intracellular_and_SR_Ca_fluxes__k_htrpn_minus * var_intracellular_and_SR_Ca_fluxes__HTRPNCa); // millimolar_per_second
369  const NekDouble var_intracellular_and_SR_Ca_fluxes__LTRPNCa = var_chaste_interface__intracellular_and_SR_Ca_fluxes__LTRPNCa; // millimolar
370  const NekDouble var_intracellular_and_SR_Ca_fluxes__LTRPN_tot = 0.07; // millimolar
371  const NekDouble var_intracellular_and_SR_Ca_fluxes__k_ltrpn_plus = 40000.0; // per_millimolar_per_second
372  const NekDouble var_intracellular_and_SR_Ca_fluxes__k_ltrpn_minus = 40.0; // per_second
373  const NekDouble var_intracellular_and_SR_Ca_fluxes__J_LTRPNCa = (var_intracellular_and_SR_Ca_fluxes__k_ltrpn_plus * var_intracellular_and_SR_Ca_fluxes__Ca_i * (var_intracellular_and_SR_Ca_fluxes__LTRPN_tot - var_intracellular_and_SR_Ca_fluxes__LTRPNCa)) - (var_intracellular_and_SR_Ca_fluxes__k_ltrpn_minus * var_intracellular_and_SR_Ca_fluxes__LTRPNCa); // millimolar_per_second
374  const NekDouble var_intracellular_and_SR_Ca_fluxes__J_trpn = var_intracellular_and_SR_Ca_fluxes__J_HTRPNCa + var_intracellular_and_SR_Ca_fluxes__J_LTRPNCa; // millimolar_per_second
375  const NekDouble var_intracellular_and_SR_Ca_fluxes__d_HTRPNCa_d_environment__time = (var_intracellular_and_SR_Ca_fluxes__k_htrpn_plus * var_intracellular_and_SR_Ca_fluxes__Ca_i * (var_intracellular_and_SR_Ca_fluxes__HTRPN_tot - var_intracellular_and_SR_Ca_fluxes__HTRPNCa)) - (var_intracellular_and_SR_Ca_fluxes__k_htrpn_minus * var_intracellular_and_SR_Ca_fluxes__HTRPNCa); // 'millimole per litre per second'
376  const NekDouble var_intracellular_and_SR_Ca_fluxes__d_LTRPNCa_d_environment__time = (var_intracellular_and_SR_Ca_fluxes__k_ltrpn_plus * var_intracellular_and_SR_Ca_fluxes__Ca_i * (var_intracellular_and_SR_Ca_fluxes__LTRPN_tot - var_intracellular_and_SR_Ca_fluxes__LTRPNCa)) - (var_intracellular_and_SR_Ca_fluxes__k_ltrpn_minus * var_intracellular_and_SR_Ca_fluxes__LTRPNCa); // 'millimole per litre per second'
377  const NekDouble var_intracellular_ion_concentrations__Ca_i = var_chaste_interface__intracellular_ion_concentrations__Ca_i; // millimolar
378  const NekDouble var_intracellular_ion_concentrations__Ca_ss = var_chaste_interface__intracellular_ion_concentrations__Ca_ss; // millimolar
379  const NekDouble var_intracellular_ion_concentrations__Ca_JSR = var_chaste_interface__intracellular_ion_concentrations__Ca_JSR; // millimolar
380  const NekDouble var_intracellular_ion_concentrations__V_myo = 9.36e-06; // micro_litre
381  const NekDouble var_intracellular_ion_concentrations__V_JSR = 5.6e-07; // micro_litre
382  const NekDouble var_intracellular_ion_concentrations__V_NSR = 5.04e-06; // micro_litre
383  const NekDouble var_intracellular_ion_concentrations__V_SS = 1.2e-08; // micro_litre
384  const NekDouble var_intracellular_ion_concentrations__K_mCMDN = 0.00238; // millimolar
385  const NekDouble var_intracellular_ion_concentrations__K_mCSQN = 0.8; // millimolar
386  const NekDouble var_intracellular_ion_concentrations__K_mEGTA = 0.00015; // millimolar
387  const NekDouble var_intracellular_ion_concentrations__CMDN_tot = 0.05; // millimolar
388  const NekDouble var_intracellular_ion_concentrations__CSQN_tot = 15.0; // millimolar
389  const NekDouble var_intracellular_ion_concentrations__EGTA_tot = 10.0; // millimolar
390  const NekDouble var_intracellular_ion_concentrations__beta_i = 1.0 / (1.0 + ((var_intracellular_ion_concentrations__CMDN_tot * var_intracellular_ion_concentrations__K_mCMDN) / pow(var_intracellular_ion_concentrations__K_mCMDN + var_intracellular_ion_concentrations__Ca_i, 2.0)) + ((var_intracellular_ion_concentrations__EGTA_tot * var_intracellular_ion_concentrations__K_mEGTA) / pow(var_intracellular_ion_concentrations__K_mEGTA + var_intracellular_ion_concentrations__Ca_i, 2.0))); // dimensionless
391  const NekDouble var_intracellular_ion_concentrations__beta_SS = 1.0 / (1.0 + ((var_intracellular_ion_concentrations__CMDN_tot * var_intracellular_ion_concentrations__K_mCMDN) / pow(var_intracellular_ion_concentrations__K_mCMDN + var_intracellular_ion_concentrations__Ca_ss, 2.0))); // dimensionless
392  const NekDouble var_intracellular_ion_concentrations__beta_JSR = 1.0 / (1.0 + ((var_intracellular_ion_concentrations__CSQN_tot * var_intracellular_ion_concentrations__K_mCSQN) / pow(var_intracellular_ion_concentrations__K_mCSQN + var_intracellular_ion_concentrations__Ca_JSR, 2.0))); // dimensionless
393  const NekDouble var_intracellular_ion_concentrations__F = var_membrane__F; // coulomb_per_mole
394  const NekDouble var_intracellular_ion_concentrations__i_Na = var_sodium_current__i_Na; // nanoA
395  const NekDouble var_intracellular_ion_concentrations__i_Ca_L = var_L_type_Ca_channel__i_Ca_L; // nanoA
396  const NekDouble var_intracellular_ion_concentrations__i_B_Na = var_background_currents__i_B_Na; // nanoA
397  const NekDouble var_intracellular_ion_concentrations__i_NaCa = var_Na_Ca_ion_exchanger_current__i_NaCa; // nanoA
398  const NekDouble var_intracellular_ion_concentrations__i_NaK = var_sodium_potassium_pump__i_NaK; // nanoA
399  const NekDouble var_intracellular_ion_concentrations__i_f_Na = var_hyperpolarisation_activated_current__i_f_Na; // nanoA
400  const NekDouble var_intracellular_ion_concentrations__i_f_K = var_hyperpolarisation_activated_current__i_f_K; // nanoA
401  const NekDouble var_intracellular_ion_concentrations__i_B_K = var_background_currents__i_B_K; // nanoA
402  const NekDouble var_intracellular_ion_concentrations__i_K1 = var_inward_rectifier__i_K1; // nanoA
403  const NekDouble var_intracellular_ion_concentrations__i_t = var_Ca_independent_transient_outward_K_current__i_t; // nanoA
404  const NekDouble var_intracellular_ion_concentrations__i_ss = var_steady_state_outward_K_current__i_ss; // nanoA
405  const NekDouble var_intracellular_ion_concentrations__i_Ca_P = var_sarcolemmal_calcium_pump_current__i_Ca_P; // nanoA
406  const NekDouble var_intracellular_ion_concentrations__i_B_Ca = var_background_currents__i_B_Ca; // nanoA
407  const NekDouble var_intracellular_ion_concentrations__J_up = var_SERCA2a_pump__J_up; // millimolar_per_second
408  const NekDouble var_intracellular_ion_concentrations__J_rel = var_SR_Ca_release_channel__J_rel; // millimolar_per_second
409  const NekDouble var_intracellular_ion_concentrations__J_xfer = var_intracellular_and_SR_Ca_fluxes__J_xfer; // millimolar_per_second
410  const NekDouble var_intracellular_ion_concentrations__J_trpn = var_intracellular_and_SR_Ca_fluxes__J_trpn; // millimolar_per_second
411  const NekDouble var_intracellular_ion_concentrations__J_tr = var_intracellular_and_SR_Ca_fluxes__J_tr; // millimolar_per_second
412  const NekDouble var_intracellular_ion_concentrations__d_Na_i_d_environment__time = (-(var_intracellular_ion_concentrations__i_Na + var_intracellular_ion_concentrations__i_B_Na + (var_intracellular_ion_concentrations__i_NaCa * 3.0) + (var_intracellular_ion_concentrations__i_NaK * 3.0) + var_intracellular_ion_concentrations__i_f_Na)) / (var_intracellular_ion_concentrations__V_myo * var_intracellular_ion_concentrations__F); // 'millimole per litre per second'
413  const NekDouble var_intracellular_ion_concentrations__d_Ca_i_d_environment__time = var_intracellular_ion_concentrations__beta_i * (var_intracellular_ion_concentrations__J_xfer - (var_intracellular_ion_concentrations__J_up + var_intracellular_ion_concentrations__J_trpn + (((var_intracellular_ion_concentrations__i_B_Ca - (2.0 * var_intracellular_ion_concentrations__i_NaCa)) + var_intracellular_ion_concentrations__i_Ca_P) / (2.0 * var_intracellular_ion_concentrations__V_myo * var_intracellular_ion_concentrations__F)))); // 'millimole per litre per second'
414  const NekDouble var_intracellular_ion_concentrations__d_K_i_d_environment__time = (-(var_intracellular_ion_concentrations__i_ss + var_intracellular_ion_concentrations__i_B_K + var_intracellular_ion_concentrations__i_t + var_intracellular_ion_concentrations__i_K1 + var_intracellular_ion_concentrations__i_f_K + (var_intracellular_ion_concentrations__i_NaK * (-2.0)))) / (var_intracellular_ion_concentrations__V_myo * var_intracellular_ion_concentrations__F); // 'millimole per litre per second'
415  const NekDouble var_intracellular_ion_concentrations__d_Ca_ss_d_environment__time = var_intracellular_ion_concentrations__beta_SS * ((((var_intracellular_ion_concentrations__J_rel * var_intracellular_ion_concentrations__V_JSR) / var_intracellular_ion_concentrations__V_SS) - ((var_intracellular_ion_concentrations__J_xfer * var_intracellular_ion_concentrations__V_myo) / var_intracellular_ion_concentrations__V_SS)) - (var_intracellular_ion_concentrations__i_Ca_L / (2.0 * var_intracellular_ion_concentrations__V_SS * var_intracellular_ion_concentrations__F))); // 'millimole per litre per second'
416  const NekDouble var_intracellular_ion_concentrations__d_Ca_JSR_d_environment__time = var_intracellular_ion_concentrations__beta_JSR * (var_intracellular_ion_concentrations__J_tr - var_intracellular_ion_concentrations__J_rel); // 'millimole per litre per second'
417  const NekDouble var_intracellular_ion_concentrations__d_Ca_NSR_d_environment__time = ((var_intracellular_ion_concentrations__J_up * var_intracellular_ion_concentrations__V_myo) / var_intracellular_ion_concentrations__V_NSR) - ((var_intracellular_ion_concentrations__J_tr * var_intracellular_ion_concentrations__V_JSR) / var_intracellular_ion_concentrations__V_NSR); // 'millimole per litre per second'
418  const NekDouble var_chaste_interface__sodium_current_m_gate__d_m_d_environment__time_converter = var_sodium_current__sodium_current_m_gate__d_m_d_environment__time; // per_second
419  const NekDouble var_chaste_interface__sodium_current_m_gate__d_m_d_environment__time = 0.001 * var_chaste_interface__sodium_current_m_gate__d_m_d_environment__time_converter; // 'per millisecond'
420  const NekDouble var_chaste_interface__sodium_current_h_gate__d_h_d_environment__time_converter = var_sodium_current__sodium_current_h_gate__d_h_d_environment__time; // per_second
421  const NekDouble var_chaste_interface__sodium_current_h_gate__d_h_d_environment__time = 0.001 * var_chaste_interface__sodium_current_h_gate__d_h_d_environment__time_converter; // 'per millisecond'
422  const NekDouble var_chaste_interface__sodium_current_j_gate__d_j_d_environment__time_converter = var_sodium_current__sodium_current_j_gate__d_j_d_environment__time; // per_second
423  const NekDouble var_chaste_interface__sodium_current_j_gate__d_j_d_environment__time = 0.001 * var_chaste_interface__sodium_current_j_gate__d_j_d_environment__time_converter; // 'per millisecond'
424  const NekDouble var_chaste_interface__L_type_Ca_channel_d_gate__d_d_d_environment__time_converter = var_L_type_Ca_channel__L_type_Ca_channel_d_gate__d_d_d_environment__time; // per_second
425  const NekDouble var_chaste_interface__L_type_Ca_channel_d_gate__d_d_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_channel_d_gate__d_d_d_environment__time_converter; // 'per millisecond'
426  const NekDouble var_chaste_interface__L_type_Ca_channel_f_11_gate__d_f_11_d_environment__time_converter = var_L_type_Ca_channel__L_type_Ca_channel_f_11_gate__d_f_11_d_environment__time; // per_second
427  const NekDouble var_chaste_interface__L_type_Ca_channel_f_11_gate__d_f_11_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_channel_f_11_gate__d_f_11_d_environment__time_converter; // 'per millisecond'
428  const NekDouble var_chaste_interface__L_type_Ca_channel_f_12_gate__d_f_12_d_environment__time_converter = var_L_type_Ca_channel__L_type_Ca_channel_f_12_gate__d_f_12_d_environment__time; // per_second
429  const NekDouble var_chaste_interface__L_type_Ca_channel_f_12_gate__d_f_12_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_channel_f_12_gate__d_f_12_d_environment__time_converter; // 'per millisecond'
430  const NekDouble var_chaste_interface__L_type_Ca_channel_Ca_inact_gate__d_Ca_inact_d_environment__time_converter = var_L_type_Ca_channel__L_type_Ca_channel_Ca_inact_gate__d_Ca_inact_d_environment__time; // per_second
431  const NekDouble var_chaste_interface__L_type_Ca_channel_Ca_inact_gate__d_Ca_inact_d_environment__time = 0.001 * var_chaste_interface__L_type_Ca_channel_Ca_inact_gate__d_Ca_inact_d_environment__time_converter; // 'per millisecond'
432  const NekDouble var_chaste_interface__Ca_independent_transient_outward_K_current_r_gate__d_r_d_environment__time_converter = var_Ca_independent_transient_outward_K_current__Ca_independent_transient_outward_K_current_r_gate__d_r_d_environment__time; // per_second
433  const NekDouble var_chaste_interface__Ca_independent_transient_outward_K_current_r_gate__d_r_d_environment__time = 0.001 * var_chaste_interface__Ca_independent_transient_outward_K_current_r_gate__d_r_d_environment__time_converter; // 'per millisecond'
434  const NekDouble var_chaste_interface__Ca_independent_transient_outward_K_current_s_gate__d_s_d_environment__time_converter = var_Ca_independent_transient_outward_K_current__Ca_independent_transient_outward_K_current_s_gate__d_s_d_environment__time; // per_second
435  const NekDouble var_chaste_interface__Ca_independent_transient_outward_K_current_s_gate__d_s_d_environment__time = 0.001 * var_chaste_interface__Ca_independent_transient_outward_K_current_s_gate__d_s_d_environment__time_converter; // 'per millisecond'
436  const NekDouble var_chaste_interface__Ca_independent_transient_outward_K_current_s_slow_gate__d_s_slow_d_environment__time_converter = var_Ca_independent_transient_outward_K_current__Ca_independent_transient_outward_K_current_s_slow_gate__d_s_slow_d_environment__time; // per_second
437  const NekDouble var_chaste_interface__Ca_independent_transient_outward_K_current_s_slow_gate__d_s_slow_d_environment__time = 0.001 * var_chaste_interface__Ca_independent_transient_outward_K_current_s_slow_gate__d_s_slow_d_environment__time_converter; // 'per millisecond'
438  const NekDouble var_chaste_interface__steady_state_outward_K_current_r_ss_gate__d_r_ss_d_environment__time_converter = var_steady_state_outward_K_current__steady_state_outward_K_current_r_ss_gate__d_r_ss_d_environment__time; // per_second
439  const NekDouble var_chaste_interface__steady_state_outward_K_current_r_ss_gate__d_r_ss_d_environment__time = 0.001 * var_chaste_interface__steady_state_outward_K_current_r_ss_gate__d_r_ss_d_environment__time_converter; // 'per millisecond'
440  const NekDouble var_chaste_interface__steady_state_outward_K_current_s_ss_gate__d_s_ss_d_environment__time_converter = var_steady_state_outward_K_current__steady_state_outward_K_current_s_ss_gate__d_s_ss_d_environment__time; // per_second
441  const NekDouble var_chaste_interface__steady_state_outward_K_current_s_ss_gate__d_s_ss_d_environment__time = 0.001 * var_chaste_interface__steady_state_outward_K_current_s_ss_gate__d_s_ss_d_environment__time_converter; // 'per millisecond'
442  const NekDouble var_chaste_interface__hyperpolarisation_activated_current_y_gate__d_y_d_environment__time_converter = var_hyperpolarisation_activated_current__hyperpolarisation_activated_current_y_gate__d_y_d_environment__time; // per_second
443  const NekDouble var_chaste_interface__hyperpolarisation_activated_current_y_gate__d_y_d_environment__time = 0.001 * var_chaste_interface__hyperpolarisation_activated_current_y_gate__d_y_d_environment__time_converter; // 'per millisecond'
444  const NekDouble var_chaste_interface__SR_Ca_release_channel__d_P_O1_d_environment__time_converter = var_SR_Ca_release_channel__d_P_O1_d_environment__time; // per_second
445  const NekDouble var_chaste_interface__SR_Ca_release_channel__d_P_O1_d_environment__time = 0.001 * var_chaste_interface__SR_Ca_release_channel__d_P_O1_d_environment__time_converter; // 'per millisecond'
446  const NekDouble var_chaste_interface__SR_Ca_release_channel__d_P_O2_d_environment__time_converter = var_SR_Ca_release_channel__d_P_O2_d_environment__time; // per_second
447  const NekDouble var_chaste_interface__SR_Ca_release_channel__d_P_O2_d_environment__time = 0.001 * var_chaste_interface__SR_Ca_release_channel__d_P_O2_d_environment__time_converter; // 'per millisecond'
448  const NekDouble var_chaste_interface__SR_Ca_release_channel__d_P_C1_d_environment__time_converter = var_SR_Ca_release_channel__d_P_C1_d_environment__time; // per_second
449  const NekDouble var_chaste_interface__SR_Ca_release_channel__d_P_C1_d_environment__time = 0.001 * var_chaste_interface__SR_Ca_release_channel__d_P_C1_d_environment__time_converter; // 'per millisecond'
450  const NekDouble var_chaste_interface__SR_Ca_release_channel__d_P_C2_d_environment__time_converter = var_SR_Ca_release_channel__d_P_C2_d_environment__time; // per_second
451  const NekDouble var_chaste_interface__SR_Ca_release_channel__d_P_C2_d_environment__time = 0.001 * var_chaste_interface__SR_Ca_release_channel__d_P_C2_d_environment__time_converter; // 'per millisecond'
452  const NekDouble var_chaste_interface__intracellular_and_SR_Ca_fluxes__d_HTRPNCa_d_environment__time_converter = var_intracellular_and_SR_Ca_fluxes__d_HTRPNCa_d_environment__time; // ___units_26
453  const NekDouble var_chaste_interface__intracellular_and_SR_Ca_fluxes__d_HTRPNCa_d_environment__time = 0.001 * var_chaste_interface__intracellular_and_SR_Ca_fluxes__d_HTRPNCa_d_environment__time_converter; // 'millimolar per millisecond'
454  const NekDouble var_chaste_interface__intracellular_and_SR_Ca_fluxes__d_LTRPNCa_d_environment__time_converter = var_intracellular_and_SR_Ca_fluxes__d_LTRPNCa_d_environment__time; // millimole_per_litre_per_second
455  const NekDouble var_chaste_interface__intracellular_and_SR_Ca_fluxes__d_LTRPNCa_d_environment__time = 0.001 * var_chaste_interface__intracellular_and_SR_Ca_fluxes__d_LTRPNCa_d_environment__time_converter; // 'millimolar per millisecond'
456  const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Na_i_d_environment__time_converter = var_intracellular_ion_concentrations__d_Na_i_d_environment__time; // millimole_per_litre_per_second
457  const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Na_i_d_environment__time = 0.001 * var_chaste_interface__intracellular_ion_concentrations__d_Na_i_d_environment__time_converter; // 'millimolar per millisecond'
458  const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_i_d_environment__time_converter = var_intracellular_ion_concentrations__d_Ca_i_d_environment__time; // millimole_per_litre_per_second
459  const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_i_d_environment__time = 0.001 * var_chaste_interface__intracellular_ion_concentrations__d_Ca_i_d_environment__time_converter; // 'millimolar per millisecond'
460  const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_K_i_d_environment__time_converter = var_intracellular_ion_concentrations__d_K_i_d_environment__time; // millimole_per_litre_per_second
461  const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_K_i_d_environment__time = 0.001 * var_chaste_interface__intracellular_ion_concentrations__d_K_i_d_environment__time_converter; // 'millimolar per millisecond'
462  const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_ss_d_environment__time_converter = var_intracellular_ion_concentrations__d_Ca_ss_d_environment__time; // millimole_per_litre_per_second
463  const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_ss_d_environment__time = 0.001 * var_chaste_interface__intracellular_ion_concentrations__d_Ca_ss_d_environment__time_converter; // 'millimolar per millisecond'
464  const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_JSR_d_environment__time_converter = var_intracellular_ion_concentrations__d_Ca_JSR_d_environment__time; // millimole_per_litre_per_second
465  const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_JSR_d_environment__time = 0.001 * var_chaste_interface__intracellular_ion_concentrations__d_Ca_JSR_d_environment__time_converter; // 'millimolar per millisecond'
466  const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_NSR_d_environment__time_converter = var_intracellular_ion_concentrations__d_Ca_NSR_d_environment__time; // millimole_per_litre_per_second
467  const NekDouble var_chaste_interface__intracellular_ion_concentrations__d_Ca_NSR_d_environment__time = 0.001 * var_chaste_interface__intracellular_ion_concentrations__d_Ca_NSR_d_environment__time_converter; // 'millimolar per millisecond'
468  const NekDouble d_dt_chaste_interface__sodium_current_m_gate__m = var_chaste_interface__sodium_current_m_gate__d_m_d_environment__time; // 'per millisecond'
469  const NekDouble d_dt_chaste_interface__sodium_current_h_gate__h = var_chaste_interface__sodium_current_h_gate__d_h_d_environment__time; // 'per millisecond'
470  const NekDouble d_dt_chaste_interface__sodium_current_j_gate__j = var_chaste_interface__sodium_current_j_gate__d_j_d_environment__time; // 'per millisecond'
471  const NekDouble d_dt_chaste_interface__L_type_Ca_channel_d_gate__d = var_chaste_interface__L_type_Ca_channel_d_gate__d_d_d_environment__time; // 'per millisecond'
472  const NekDouble d_dt_chaste_interface__L_type_Ca_channel_f_11_gate__f_11 = var_chaste_interface__L_type_Ca_channel_f_11_gate__d_f_11_d_environment__time; // 'per millisecond'
473  const NekDouble d_dt_chaste_interface__L_type_Ca_channel_f_12_gate__f_12 = var_chaste_interface__L_type_Ca_channel_f_12_gate__d_f_12_d_environment__time; // 'per millisecond'
474  const NekDouble d_dt_chaste_interface__L_type_Ca_channel_Ca_inact_gate__Ca_inact = var_chaste_interface__L_type_Ca_channel_Ca_inact_gate__d_Ca_inact_d_environment__time; // 'per millisecond'
475  const NekDouble d_dt_chaste_interface__Ca_independent_transient_outward_K_current_r_gate__r = var_chaste_interface__Ca_independent_transient_outward_K_current_r_gate__d_r_d_environment__time; // 'per millisecond'
476  const NekDouble d_dt_chaste_interface__Ca_independent_transient_outward_K_current_s_gate__s = var_chaste_interface__Ca_independent_transient_outward_K_current_s_gate__d_s_d_environment__time; // 'per millisecond'
477  const NekDouble d_dt_chaste_interface__Ca_independent_transient_outward_K_current_s_slow_gate__s_slow = var_chaste_interface__Ca_independent_transient_outward_K_current_s_slow_gate__d_s_slow_d_environment__time; // 'per millisecond'
478  const NekDouble d_dt_chaste_interface__steady_state_outward_K_current_r_ss_gate__r_ss = var_chaste_interface__steady_state_outward_K_current_r_ss_gate__d_r_ss_d_environment__time; // 'per millisecond'
479  const NekDouble d_dt_chaste_interface__steady_state_outward_K_current_s_ss_gate__s_ss = var_chaste_interface__steady_state_outward_K_current_s_ss_gate__d_s_ss_d_environment__time; // 'per millisecond'
480  const NekDouble d_dt_chaste_interface__hyperpolarisation_activated_current_y_gate__y = var_chaste_interface__hyperpolarisation_activated_current_y_gate__d_y_d_environment__time; // 'per millisecond'
481  const NekDouble d_dt_chaste_interface__SR_Ca_release_channel__P_O1 = var_chaste_interface__SR_Ca_release_channel__d_P_O1_d_environment__time; // 'per millisecond'
482  const NekDouble d_dt_chaste_interface__SR_Ca_release_channel__P_O2 = var_chaste_interface__SR_Ca_release_channel__d_P_O2_d_environment__time; // 'per millisecond'
483  const NekDouble d_dt_chaste_interface__SR_Ca_release_channel__P_C1 = var_chaste_interface__SR_Ca_release_channel__d_P_C1_d_environment__time; // 'per millisecond'
484  const NekDouble d_dt_chaste_interface__SR_Ca_release_channel__P_C2 = var_chaste_interface__SR_Ca_release_channel__d_P_C2_d_environment__time; // 'per millisecond'
485  const NekDouble d_dt_chaste_interface__intracellular_and_SR_Ca_fluxes__HTRPNCa = var_chaste_interface__intracellular_and_SR_Ca_fluxes__d_HTRPNCa_d_environment__time; // 'millimole per litre per millisecond'
486  const NekDouble d_dt_chaste_interface__intracellular_and_SR_Ca_fluxes__LTRPNCa = var_chaste_interface__intracellular_and_SR_Ca_fluxes__d_LTRPNCa_d_environment__time; // 'millimole per litre per millisecond'
487  const NekDouble d_dt_chaste_interface__intracellular_ion_concentrations__Na_i = var_chaste_interface__intracellular_ion_concentrations__d_Na_i_d_environment__time; // 'millimole per litre per millisecond'
488  const NekDouble d_dt_chaste_interface__intracellular_ion_concentrations__Ca_i = var_chaste_interface__intracellular_ion_concentrations__d_Ca_i_d_environment__time; // 'millimole per litre per millisecond'
489  const NekDouble d_dt_chaste_interface__intracellular_ion_concentrations__K_i = var_chaste_interface__intracellular_ion_concentrations__d_K_i_d_environment__time; // 'millimole per litre per millisecond'
490  const NekDouble d_dt_chaste_interface__intracellular_ion_concentrations__Ca_ss = var_chaste_interface__intracellular_ion_concentrations__d_Ca_ss_d_environment__time; // 'millimole per litre per millisecond'
491  const NekDouble d_dt_chaste_interface__intracellular_ion_concentrations__Ca_JSR = var_chaste_interface__intracellular_ion_concentrations__d_Ca_JSR_d_environment__time; // 'millimole per litre per millisecond'
492  const NekDouble d_dt_chaste_interface__intracellular_ion_concentrations__Ca_NSR = var_chaste_interface__intracellular_ion_concentrations__d_Ca_NSR_d_environment__time; // 'millimole per litre per millisecond'
493 
494  const NekDouble var_membrane__Cm = 0.0001; // microF
495  const NekDouble var_membrane__i_Na = var_sodium_current__i_Na; // nanoA
496  const NekDouble var_membrane__i_Ca_L = var_L_type_Ca_channel__i_Ca_L; // nanoA
497  const NekDouble var_membrane__i_t = var_Ca_independent_transient_outward_K_current__i_t; // nanoA
498  const NekDouble var_membrane__i_ss = var_steady_state_outward_K_current__i_ss; // nanoA
499  const NekDouble var_hyperpolarisation_activated_current__i_f = var_hyperpolarisation_activated_current__i_f_Na + var_hyperpolarisation_activated_current__i_f_K; // nanoA
500  const NekDouble var_membrane__i_f = var_hyperpolarisation_activated_current__i_f; // nanoA
501  const NekDouble var_membrane__i_K1 = var_inward_rectifier__i_K1; // nanoA
502  const NekDouble var_background_currents__i_B = var_background_currents__i_B_Na + var_background_currents__i_B_Ca + var_background_currents__i_B_K; // nanoA
503  const NekDouble var_membrane__i_B = var_background_currents__i_B; // nanoA
504  const NekDouble var_membrane__i_NaK = var_sodium_potassium_pump__i_NaK; // nanoA
505  const NekDouble var_membrane__i_NaCa = var_Na_Ca_ion_exchanger_current__i_NaCa; // nanoA
506  const NekDouble var_membrane__i_Ca_P = var_sarcolemmal_calcium_pump_current__i_Ca_P; // nanoA
507  const NekDouble var_chaste_interface__membrane__i_Stim = 0.0;
508  const NekDouble var_membrane__i_Stim_converter = var_chaste_interface__membrane__i_Stim; // uA_per_cm2
509  const NekDouble var_membrane__chaste_interface__chaste_membrane_capacitance = 1.0; // uF_per_cm2
510  const NekDouble var_membrane__i_Stim = 1000.0 * ((var_membrane__i_Stim_converter * var_membrane__Cm) / var_membrane__chaste_interface__chaste_membrane_capacitance); // nanoA
511  const NekDouble var_membrane__d_V_d_environment__time = (-(var_membrane__i_Na + var_membrane__i_Ca_L + var_membrane__i_t + var_membrane__i_ss + var_membrane__i_f + var_membrane__i_K1 + var_membrane__i_B + var_membrane__i_NaK + var_membrane__i_NaCa + var_membrane__i_Ca_P + var_membrane__i_Stim)) / var_membrane__Cm; // 'millivolt per second'
512  const NekDouble var_chaste_interface__membrane__d_V_d_environment__time_converter = var_membrane__d_V_d_environment__time; // ___units_1
513  const NekDouble var_chaste_interface__membrane__d_V_d_environment__time = 0.001 * var_chaste_interface__membrane__d_V_d_environment__time_converter; // 'millivolt per millisecond'
514  d_dt_chaste_interface__membrane__V = var_chaste_interface__membrane__d_V_d_environment__time; // 'millivolt per millisecond'
515  outarray[0][i] = d_dt_chaste_interface__membrane__V;
516  outarray[1][i] = 0.0;
517  outarray[2][i] = d_dt_chaste_interface__sodium_current_m_gate__m;
518  outarray[3][i] = d_dt_chaste_interface__sodium_current_h_gate__h;
519  outarray[4][i] = d_dt_chaste_interface__sodium_current_j_gate__j;
520  outarray[5][i] = d_dt_chaste_interface__L_type_Ca_channel_d_gate__d;
521  outarray[6][i] = d_dt_chaste_interface__L_type_Ca_channel_f_11_gate__f_11;
522  outarray[7][i] = d_dt_chaste_interface__L_type_Ca_channel_f_12_gate__f_12;
523  outarray[8][i] = d_dt_chaste_interface__L_type_Ca_channel_Ca_inact_gate__Ca_inact;
524  outarray[9][i] = d_dt_chaste_interface__Ca_independent_transient_outward_K_current_r_gate__r;
525  outarray[10][i] = d_dt_chaste_interface__Ca_independent_transient_outward_K_current_s_gate__s;
526  outarray[11][i] = d_dt_chaste_interface__Ca_independent_transient_outward_K_current_s_slow_gate__s_slow;
527  outarray[12][i] = d_dt_chaste_interface__steady_state_outward_K_current_r_ss_gate__r_ss;
528  outarray[13][i] = d_dt_chaste_interface__steady_state_outward_K_current_s_ss_gate__s_ss;
529  outarray[14][i] = d_dt_chaste_interface__hyperpolarisation_activated_current_y_gate__y;
530  outarray[15][i] = d_dt_chaste_interface__SR_Ca_release_channel__P_O1;
531  outarray[16][i] = d_dt_chaste_interface__SR_Ca_release_channel__P_O2;
532  outarray[17][i] = d_dt_chaste_interface__SR_Ca_release_channel__P_C1;
533  outarray[18][i] = d_dt_chaste_interface__SR_Ca_release_channel__P_C2;
534  outarray[19][i] = d_dt_chaste_interface__intracellular_and_SR_Ca_fluxes__HTRPNCa;
535  outarray[20][i] = d_dt_chaste_interface__intracellular_and_SR_Ca_fluxes__LTRPNCa;
536  outarray[21][i] = d_dt_chaste_interface__intracellular_ion_concentrations__Na_i;
537  outarray[22][i] = d_dt_chaste_interface__intracellular_ion_concentrations__Ca_i;
538  outarray[23][i] = d_dt_chaste_interface__intracellular_ion_concentrations__K_i;
539  outarray[24][i] = d_dt_chaste_interface__intracellular_ion_concentrations__Ca_ss;
540  outarray[25][i] = d_dt_chaste_interface__intracellular_ion_concentrations__Ca_JSR;
541  outarray[26][i] = d_dt_chaste_interface__intracellular_ion_concentrations__Ca_NSR;
542  }
543 
544  }
545 
546  /**
547  *
548  */
550  {
551  SolverUtils::AddSummaryItem(s, "Cell model", "PanditGilesDemir03");
552  }
553 
554 }
555 
virtual void v_GenerateSummary(SummaryList &s)
Prints a summary of the model parameters.
static std::string className
Name of class.
int m_nq
Number of physical points.
Definition: CellModel.h:117
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:47
Cell model base class.
Definition: CellModel.h:65
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
PanditGilesDemir03(const LibUtilities::SessionReaderSharedPtr &pSession, const int nq)
Constructor.
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
Definition: Misc.cpp:50
static CellModelSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const int nq)
Creates an instance of this class.
double NekDouble
CellModelFactory & GetCellModelFactory()
Definition: CellModel.cpp:47
virtual void v_Update(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Computes the reaction terms $f(u,v)$ and $g(u,v)$.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:215