CEPS  24.01
Cardiac ElectroPhysiology Simulator
CRN98.cpp
Go to the documentation of this file.
1 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2  This file is part of CEPS.
3 
4  CEPS is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  CEPS is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with CEPS (see file LICENSE at root of project).
16  If not, see <https://www.gnu.org/licenses/>.
17 
18 
19  Copyright 2019-2024 Inria, Universite de Bordeaux
20 
21  Authors, in alphabetical order:
22 
23  Pierre-Elliott BECUE, Florian CARO, Yves COUDIERE(*), Andjela DAVIDOVIC,
24  Charlie DOUANLA-LONTSI, Marc FUENTES, Mehdi JUHOOR, Michael LEGUEBE(*),
25  Pauline MIGERDITICHAN, Valentin PANNETIER(*), Nejib ZEMZEMI.
26  * : currently active authors
27 
28 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
31 
32 
34  Unknown* u,
35  const CepsSet<CepsAttribute>& attrs,
36  InputParameters* params
37 ):
38  AbstractIonicModel(u,attrs)
39 {
40 
41  m_name = "Courtemanche-Ramirez-Nattel 1998";
42  m_nStateVars = 20;
43  m_stateVarNames = {
44  "Na_i [millimolar]",
45  "m [adim]",
46  "h [adim]",
47  "j [adim]",
48  "K_i [millimolar]",
49  "oa [adim]",
50  "oi [adim]",
51  "ua [adim]",
52  "ui [adim]",
53  "xr [adim]",
54  "xs [adim]",
55  "Ca_i [millimolar]",
56  "d [adim]",
57  "f [adim]",
58  "f_Ca [adim]",
59  "Ca_rel [millimolar]",
60  "u [adim]",
61  "v [adim]",
62  "w [adim]",
63  "Ca_up [millimolar]"
64  };
65 
66  // ================================================================================
67  // Default parameters
68  m_constants = ceps::newArray<CepsReal>(43);
69  m_constants[_R ] = 8.3143;
70  m_constants[_T ] = 310;
71  m_constants[_F ] = 96.4867;
72  m_constants[_vcell ] = 20100;
73  m_constants[_vi ] = 0.68 *m_constants[_vcell];
74  m_constants[_vup ] = 0.0552*m_constants[_vcell];
75  m_constants[_vrel ] = 0.0048*m_constants[_vcell];
76  m_constants[_ko ] = 5.4;
77  m_constants[_nao ] = 140;
78  m_constants[_cao ] = 1.8;
79  m_constants[_gna ] = 7.8;
80  m_constants[_gk1 ] = 0.09;
81  m_constants[_gto ] = 0.1652;
82  m_constants[_gkr ] = 0.029411765;
83  m_constants[_gks ] = 0.12941176;
84  m_constants[_gcal ] = 0.12375;
85  m_constants[_gbca ] = 0.001131;
86  m_constants[_gbna ] = 0.0006744375;
87  m_constants[_inakmax ] = 0.59933874;
88  m_constants[_inacamax] = 1600;
89  m_constants[_icapmax ] = 0.275;
90  m_constants[_iupmax ] = 0.005;
91  m_constants[_kq10 ] = 3;
92  m_constants[_sigma ] = 1./7.*std::expm1(m_constants[_nao]/67.3);
93  m_constants[_kmnai ] = 10;
94  m_constants[_kmko ] = 1.5;
95  m_constants[_kmna ] = 87.5;
96  m_constants[_kmca ] = 1.38;
97  m_constants[_ksat ] = 0.1;
98  m_constants[_krel ] = 30;
99  m_constants[_kup ] = 0.00092;
100  m_constants[_caupmax ] = 15;
101  m_constants[_cmdnmax ] = 0.05;
102  m_constants[_trpnmax ] = 0.07;
103  m_constants[_csqnmax ] = 10;
104  m_constants[_kmcmdn ] = 0.00238;
105  m_constants[_kmtrpn ] = 0.0005;
106  m_constants[_kmcsqn ] = 0.8;
107  m_constants[_taufca ] = 2;
108  m_constants[_tautr ] = 180;
109  m_constants[_gbk ] = 0;
110  m_constants[_gamma ] = 0.35;
111  m_constants[_tauu ] = 8;
112 
113  // ================================================================================
114  // Parameters from text inputs, if any
115  if (ceps::isValidPtr(params))
116  setupWithParameters(params,nullptr);
117 
118  // Assuming a radius of 10um. Vcell is in um3
119  m_cellSurface = 2*m_constants[_vcell]/10 + 2*M_PI*100; // in um2
120  m_cellSurface *= 1.e-8; // in cm2
121 
122  m_paperCm = 100; //pF
123  m_paperStim = 2000; //pA
124 
125 }
126 
127 void
129 {
130  *v = -81.18;
131  y[_nai ] = 1.117e+1;
132  y[_m ] = 2.908e-3;
133  y[_h ] = 9.649e-1;
134  y[_j ] = 9.775e-1;
135  y[_ki ] = 1.390e+2;
136  y[_oa ] = 3.043e-2;
137  y[_oi ] = 9.992e-1;
138  y[_ua ] = 4.966e-3;
139  y[_ui ] = 9.986e-1;
140  y[_xr ] = 3.296e-5;
141  y[_xs ] = 1.869e-2;
142  y[_cai ] = 1.013e-4;
143  y[_d ] = 1.367e-4;
144  y[_f ] = 9.996e-1;
145  y[_fca ] = 7.755e-1;
146  y[_carel] = 1.488e+0;
147  y[_caup ] = 1.488e+0;
148  y[_u ] = 2.35e-112;
149  y[_v ] = 1;
150  y[_w ] = 0.9992;
151 }
152 
153 void
155  CepsReal t,
156  CepsReal* y,
157  CepsReal* vm,
158  CepsReal* dtyLin,
159  CepsReal* dtyNLin,
160  CepsReal* dtv,
161  DegreeOfFreedom* dof
162 ) const
163 {
164 
165  using std::exp;
166  using std::expm1;
167  using std::pow;
168  using ceps::approxEquals;
169 
170  CepsReal* c = m_constants;
171  CepsReal v = *vm;
172 
173  CepsReal cm = getCmInternal(t,dof);
174  CepsReal RTF = c[_R]*c[_T]/c[_F];
175 
176  CepsReal fCaInf = 1/(1+y[_cai]/0.00035);
177  dtyLin [_fca] = -1/c[_taufca];
178  dtyNLin[_fca] = fCaInf/c[_taufca];
179 
180  CepsReal dInf = 1/(1+exp(-0.125*(v+10)));
181  CepsReal texp = expm1(-(v+10.)/6.24);
182  CepsReal taud = approxEquals(v,-10,1.e-10) ? 4.579/(2+texp) : -texp/(0.035*(v+10.)*(2+texp));
183  dtyLin [_d] = -1/taud;
184  dtyNLin[_d] = dInf/taud;
185 
186  CepsReal fexp = exp(-(v+28.)/6.9);
187  CepsReal fInf = fexp/(1+fexp);
188  CepsReal tauf = 9./(0.02+0.0197*exp(-pow(0.0337*(v+10.),2)));
189  dtyLin [_f] = -1/tauf;
190  dtyNLin[_f] = fInf/tauf;
191 
192  CepsReal wexp = expm1(-(v-7.9)/5.);
193  CepsReal tauw = approxEquals(v,7.9,1.e-10) ? 1.2/1.3 : -6.*wexp/(1.3+0.3*wexp)/(v-7.9);
194  CepsReal wInf = 1-1/(1+exp(-(v-40)/17.));
195  dtyLin [_w] = -1/tauw;
196  dtyNLin[_w] = wInf/tauw;
197 
198  CepsReal alpham = approxEquals(v,-47.13,1.e-10) ? 3.2 : -0.32*(v+47.13)/expm1(-0.1*(v+47.13));
199  CepsReal betam = 0.08*exp(-v/11.);
200  dtyLin [_m] = -alpham-betam;
201  dtyNLin[_m] = alpham;
202 
203  CepsReal alphah = v<-40 ? 0.135*exp(-(v+80)/6.8) : 0.;
204  CepsReal betah = v<-40 ? 3.56*exp(0.079*v) + 3.1e5*exp(0.35*v) : 1/(0.13*(1+exp(-(v+10.66)/11.1)));
205  dtyLin [_h] = -alphah-betah;
206  dtyNLin[_h] = alphah;
207 
208  CepsReal alphaj = v<-40 ? (-127140.*exp(0.2444*v)-3.474e-5*exp(-0.04391*v))*(v+37.78)
209  /(1+exp(0.311*(v+79.23))) : 0.;
210  CepsReal betaj = v<-40 ? 0.1212*exp(-0.01052*v)/(1+exp(-0.1378*(v+40.14)))
211  : 0.3*exp(-2.35e-7*v)/(1+exp(-0.1*(v+32)));
212  dtyLin [_j] = -alphaj-betaj;
213  dtyNLin[_j] = alphaj;
214 
215  CepsReal alphaoa = 0.65/(exp(-(v+10)/8.5)+exp(-(v-30)/59.));
216  CepsReal betaoa = 0.65/(2.5+exp((v+82)/17.));
217  CepsReal tauoa = 1/(alphaoa+betaoa) /c[_kq10];
218  CepsReal oaInf = 1/(1+exp(-(v+20.47)/17.54));
219  dtyLin [_oa] = -1/tauoa;
220  dtyNLin[_oa] = oaInf/tauoa;
221 
222  CepsReal alphaoi = 1/(18.53+exp((v+113.7)/10.95));
223  CepsReal betaoi = 1/(35.56+exp(-(v+1.26)/7.44));
224  CepsReal tauoi = 1/(alphaoi+betaoi) /c[_kq10];
225  CepsReal oiInf = 1/(1+exp((v+43.1)/5.3));
226  dtyLin [_oi] = -1/tauoi;
227  dtyNLin[_oi] = oiInf/tauoi;
228 
229  CepsReal tauua = tauoa;
230  CepsReal uaInf = 1/(1+exp(-(v+30.3)/9.6));
231  dtyLin [_ua] = -1/tauua;
232  dtyNLin[_ua] = uaInf/tauua;
233 
234  CepsReal alphaui = 1/(21+exp(-(v-185.)/28.));
235  CepsReal betaui = exp((v-158)/16.);
236  CepsReal tauui = 1/(alphaui+betaui) /c[_kq10];
237  CepsReal uiInf = 1/(1+exp((v-99.45)/27.48));
238  dtyLin [_ui] = -1/tauui;
239  dtyNLin[_ui] = uiInf/tauui;
240 
241  CepsReal alphaxr = approxEquals(v,-14.10,1.e-10) ? 0.0015
242  : -3.e-4*(v+14.10)/expm1(-0.2*(v+14.10));
243  CepsReal betaxr = approxEquals(v,3.3328,1.e-10) ? 0.000378361
244  : 7.3898e-5*(v-3.3328)/expm1((v-3.3328)/5.1237);
245  CepsReal tauxr = 1/(alphaxr+betaxr);
246  CepsReal xrInf = 1/(1+exp(-(v+14.1)/6.5));
247  dtyLin [_xr] = -1/tauxr;
248  dtyNLin[_xr] = xrInf/tauxr;
249 
250  CepsReal alphaxs = approxEquals(v,19.9,1.e-10) ? 6.80e-4 : -4e-5*(v-19.9)/expm1(-(v-19.9)/17);
251  CepsReal betaxs = approxEquals(v,19.9,1.e-10) ? 3.15e-4 : 3.5e-5*(v-19.9)/expm1((v-19.9)/9);
252  CepsReal tauxs = 0.5/(alphaxs+betaxs);
253  CepsReal xsInf = 1/std::sqrt(1+exp(-(v-19.9)/12.7));
254  dtyLin [_xs] = -1/tauxs;
255  dtyNLin[_xs] = xsInf/tauxs;
256 
257  CepsReal Ek = RTF*std::log(c[_ko]/y[_ki]);
258  CepsReal ik1 = cm*c[_gk1]*(v-Ek)/(1+exp(0.07*(v+80)));
259  CepsReal ito = cm*c[_gto]*y[_oa]*y[_oa]*y[_oa]*y[_oi]*(v-Ek);
260  CepsReal gkur = 0.005+0.05/(1+exp(-(v-15)/13));
261  CepsReal ikur = cm*gkur*y[_ua]*y[_ua]*y[_ua]*y[_ui]*(v-Ek);
262  CepsReal ikr = cm*c[_gkr]*y[_xr]*(v-Ek)/(1+exp((v+15)/22.4));
263  CepsReal iks = cm*c[_gks]*y[_xs]*y[_xs]*(v-Ek);
264  CepsReal fnak = 1/(1+0.1245*exp(-0.1/RTF*v)+0.0365*c[_sigma]*exp(-v/RTF));
265  CepsReal inak = cm*fnak*c[_inakmax]/(1+pow(c[_kmnai]/y[_nai],1.5)) * c[_ko]/(c[_ko]+c[_kmko]);
266  CepsReal ibk = cm*c[_gbk]*(v-Ek);
267  dtyLin [_ki] = 0.;
268  dtyNLin[_ki] = (2*inak-ik1-ito-ikur-ikr-iks-ibk)/(c[_vi]*c[_F]);
269 
270  CepsReal ena = RTF*std::log(c[_nao]/y[_nai]);
271  CepsReal ina = cm*c[_gna]*y[_m]*y[_m]*y[_m]*y[_h]*y[_j]*(v-ena);
272  CepsReal inaca = cm*c[_inacamax]*
273  (
274  exp(c[_gamma]*v/RTF)*y[_nai]*y[_nai]*y[_nai]*c[_cao]
275  -exp((c[_gamma]-1)*v/RTF)*c[_nao]*c[_nao]*c[_nao]*y[_cai]
276  ) / (
277  (c[_kmna]*c[_kmna]*c[_kmna] + c[_nao]*c[_nao]*c[_nao])*(c[_kmca]+c[_cao])
278  *(1+c[_ksat]*exp((c[_gamma]-1)*v/RTF))
279  );
280  CepsReal ibna = cm*c[_gbna]*(v-ena);
281  dtyLin [_nai] = 0.;
282  dtyNLin[_nai] = (-3*inak-3*inaca-ibna-ina)/(c[_vi]*c[_F]);
283 
284  CepsReal ical = cm*c[_gcal]*y[_d]*y[_f]*y[_fca]*(v-65);
285  CepsReal icap = cm*c[_icapmax]*y[_cai]/(5.e-4+y[_cai]);
286  CepsReal eca = 0.5*RTF*std::log(c[_cao]/y[_cai]);
287  CepsReal ibca = cm*c[_gbca]*(v-eca);
288 
289  CepsReal iStim = getStimulation(dof,t);
290  CepsReal iIon = -(ina+ik1+ito+ikur+ikr+iks+ibna+ibca+inak+icap+inaca+ical);
291  #ifdef DEBUG
292  ceps::checkNanOrInf(iIon,
293  "Ionic current on DoF " + CepsString(dof->getGlobalIndex() + " at time" + CepsString(t))
294  );
295  #endif
296 
297  *dtv = iIon + iStim;
298  *dtv /= cm;
299 
300  CepsReal irel = c[_krel]*y[_u]*y[_u]*y[_v]*y[_w]*(y[_carel]-y[_cai]);
301  CepsReal itr = (y[_caup]-y[_carel])/c[_tautr];
302  dtyLin [_carel] = 0.;
303  dtyNLin[_carel] = (itr-irel)/(1+(c[_csqnmax]*c[_kmcsqn])/pow(y[_carel]+c[_kmcsqn],2));
304 
305  CepsReal fn = 1.e-12*(c[_vrel]*irel-0.5/c[_F]*(0.5*ical-0.2*inaca));
306  CepsReal uInf = 1/(1+exp(-(fn-3.4175e-13)/1.367e-15));
307  dtyLin [_u] = -1/c[_tauu];
308  dtyNLin[_u] = uInf/c[_tauu];
309 
310  CepsReal tauv = 1.91+2.09/(1+exp(-(fn-3.4175e-13)/1.367e-15));
311  CepsReal vInf = 1-1/(1+exp(-(fn-6.835e-14)/1.367e-15));
312  dtyLin [_v] = -1/tauv;
313  dtyNLin[_v] = vInf/tauv;
314 
315  CepsReal iup = c[_iupmax]/(1+c[_kup]/y[_cai]);
316  CepsReal iupleak = (c[_iupmax]*y[_caup])/c[_caupmax];
317  dtyLin [_caup] = 0.;
318  dtyNLin[_caup] = iup-(iupleak+(itr*c[_vrel])/c[_vup]);
319 
320  CepsReal b1 = (2*inaca-(icap+ical+ibca)) / (2*c[_vi]*c[_F])
321  + (c[_vup]*(iupleak-iup)+irel*c[_vrel])/c[_vi];
322  CepsReal b2 = 1 + c[_trpnmax]*c[_kmtrpn]/pow(y[_cai]+c[_kmtrpn],2)
323  + c[_cmdnmax]*c[_kmcmdn]/pow(y[_cai]+c[_kmcmdn],2);
324  dtyLin [_cai] = 0.;
325  dtyNLin[_cai] = b1/b2;
326 
327 }
328 
329 CepsReal
331 {
332  return i*m_cellSurface*1.e6;
333 }
334 
335 CepsReal
337 {
338  return 1.e6*m_cellSurface*cm;
339 }
340 
341 CepsReal
343 {
344  return cm/m_cellSurface*1.e-6;
345 }
346 
347 void
349 {
350 
351  m_constants[_R ] = params->getReal("CRN98 R ",m_constants[_R ]);
352  m_constants[_T ] = params->getReal("CRN98 T ",m_constants[_T ]);
353  m_constants[_F ] = params->getReal("CRN98 F ",m_constants[_F ]);
354  m_constants[_vcell ] = params->getReal("CRN98 vcell ",m_constants[_vcell ]);
355  m_constants[_vi ] = params->getReal("CRN98 vi ",m_constants[_vi ]);
356  m_constants[_vup ] = params->getReal("CRN98 vup ",m_constants[_vup ]);
357  m_constants[_vrel ] = params->getReal("CRN98 vrel ",m_constants[_vrel ]);
358  m_constants[_ko ] = params->getReal("CRN98 ko ",m_constants[_ko ]);
359  m_constants[_nao ] = params->getReal("CRN98 nao ",m_constants[_nao ]);
360  m_constants[_cao ] = params->getReal("CRN98 cao ",m_constants[_cao ]);
361  m_constants[_gna ] = params->getReal("CRN98 gna ",m_constants[_gna ]);
362  m_constants[_gk1 ] = params->getReal("CRN98 gk1 ",m_constants[_gk1 ]);
363  m_constants[_gto ] = params->getReal("CRN98 gto ",m_constants[_gto ]);
364  m_constants[_gkr ] = params->getReal("CRN98 gkr ",m_constants[_gkr ]);
365  m_constants[_gks ] = params->getReal("CRN98 gks ",m_constants[_gks ]);
366  m_constants[_gcal ] = params->getReal("CRN98 gcal ",m_constants[_gcal ]);
367  m_constants[_gbca ] = params->getReal("CRN98 gbca ",m_constants[_gbca ]);
368  m_constants[_gbna ] = params->getReal("CRN98 gbna ",m_constants[_gbna ]);
369  m_constants[_inakmax ] = params->getReal("CRN98 inakmax ",m_constants[_inakmax ]);
370  m_constants[_inacamax] = params->getReal("CRN98 inacamax",m_constants[_inacamax]);
371  m_constants[_icapmax ] = params->getReal("CRN98 icapmax ",m_constants[_icapmax ]);
372  m_constants[_iupmax ] = params->getReal("CRN98 iupmax ",m_constants[_iupmax ]);
373  m_constants[_kq10 ] = params->getReal("CRN98 kq10 ",m_constants[_kq10 ]);
374  m_constants[_sigma ] = params->getReal("CRN98 sigma ",m_constants[_sigma ]);
375  m_constants[_kmnai ] = params->getReal("CRN98 kmnai ",m_constants[_kmnai ]);
376  m_constants[_kmko ] = params->getReal("CRN98 kmko ",m_constants[_kmko ]);
377  m_constants[_kmna ] = params->getReal("CRN98 kmna ",m_constants[_kmna ]);
378  m_constants[_kmca ] = params->getReal("CRN98 kmca ",m_constants[_kmca ]);
379  m_constants[_ksat ] = params->getReal("CRN98 ksat ",m_constants[_ksat ]);
380  m_constants[_krel ] = params->getReal("CRN98 krel ",m_constants[_krel ]);
381  m_constants[_kup ] = params->getReal("CRN98 kup ",m_constants[_kup ]);
382  m_constants[_caupmax ] = params->getReal("CRN98 caupmax ",m_constants[_caupmax ]);
383  m_constants[_cmdnmax ] = params->getReal("CRN98 cmdnmax ",m_constants[_cmdnmax ]);
384  m_constants[_trpnmax ] = params->getReal("CRN98 trpnmax ",m_constants[_trpnmax ]);
385  m_constants[_csqnmax ] = params->getReal("CRN98 csqnmax ",m_constants[_csqnmax ]);
386  m_constants[_kmcmdn ] = params->getReal("CRN98 kmcmdn ",m_constants[_kmcmdn ]);
387  m_constants[_kmtrpn ] = params->getReal("CRN98 kmtrpn ",m_constants[_kmtrpn ]);
388  m_constants[_kmcsqn ] = params->getReal("CRN98 kmcsqn ",m_constants[_kmcsqn ]);
389  m_constants[_taufca ] = params->getReal("CRN98 taufca ",m_constants[_taufca ]);
390  m_constants[_tautr ] = params->getReal("CRN98 tautr ",m_constants[_tautr ]);
391  m_constants[_gbk ] = params->getReal("CRN98 gbk ",m_constants[_gbk ]);
392  m_constants[_gamma ] = params->getReal("CRN98 gamma ",m_constants[_gamma ]);
393  m_constants[_tauu ] = params->getReal("CRN98 tauu ",m_constants[_tauu ]);
394  m_cellSurface = params->getReal("CRN98 cell surface", m_cellSurface );
395 
396  return;
397 }
std::basic_string< CepsChar > CepsString
C++ format string.
Definition: CepsTypes.hpp:128
std::set< _Type, _Compare, _Alloc > CepsSet
C++ set.
Definition: CepsTypes.hpp:209
float CepsReal
Need single precision floating point.
Definition: CepsTypes.hpp:100
Represents a ionic model for a group of cells, i.e. multiple systems of ODEs.
CepsReal m_paperStim
Original stim amplitude.
CepsUInt m_nStateVars
Dimensionality of the ODE system, -1 for vm.
CepsReal * m_constants
Constant parameters of the model, from inputs.
CepsReal getStimulation(DegreeOfFreedom *x, CepsReal t) const
Get the sum of all stimulations at time t and dof x.
CepsVector< CepsString > m_stateVarNames
Names of state variables.
CepsReal getCmInternal(CepsReal t, DegreeOfFreedom *dof) const
Get either the value of cm on dof, or the default value from the paper.
CepsReal m_paperCm
Original value of Cm.
CepsString m_name
A label for display.
static constexpr const CepsInt _ua
Index alias.
Definition: CRN98.hpp:155
CRN98(Unknown *u, const CepsSet< CepsAttribute > &attrs={}, InputParameters *params=nullptr)
Constructor (sets constants)
Definition: CRN98.cpp:33
static constexpr const CepsInt _h
Index alias.
Definition: CRN98.hpp:150
static constexpr const CepsInt _F
Index alias.
Definition: CRN98.hpp:105
static constexpr const CepsInt _f
Index alias.
Definition: CRN98.hpp:161
static constexpr const CepsInt _vrel
Index alias.
Definition: CRN98.hpp:109
static constexpr const CepsInt _gkr
Index alias.
Definition: CRN98.hpp:116
static constexpr const CepsInt _kmcsqn
Index alias.
Definition: CRN98.hpp:140
void getInitialCondition(CepsReal *v, CepsReal *y) const final
Sets initial values of state variables and transmembrane voltage for a single point....
Definition: CRN98.cpp:128
void computeRates(CepsReal t, CepsReal *y, CepsReal *v, CepsReal *dtyL, CepsReal *dtyNL, CepsReal *dtv, DegreeOfFreedom *dof) const final
Get the linear and non linear part of the evolution function f. Also computes the ionic current.
Definition: CRN98.cpp:154
static constexpr const CepsInt _gbna
Index alias.
Definition: CRN98.hpp:120
static constexpr const CepsInt _ui
Index alias.
Definition: CRN98.hpp:156
static constexpr const CepsInt _kmko
Index alias.
Definition: CRN98.hpp:128
static constexpr const CepsInt _kmtrpn
Index alias.
Definition: CRN98.hpp:139
static constexpr const CepsInt _sigma
Index alias.
Definition: CRN98.hpp:126
static constexpr const CepsInt _icapmax
Index alias.
Definition: CRN98.hpp:123
static constexpr const CepsInt _caupmax
Index alias.
Definition: CRN98.hpp:134
CepsReal m_cellSurface
surface used to scale current to CEPS unit.
Definition: CRN98.hpp:100
static constexpr const CepsInt _vup
Index alias.
Definition: CRN98.hpp:108
static constexpr const CepsInt _iupmax
Index alias.
Definition: CRN98.hpp:124
CepsReal convertCmFromCepsUnit(const CepsReal &cm) const override
Convert capacitance from ceps units (uF/cm2) to ionic model units. Does nothing by default.
Definition: CRN98.cpp:336
static constexpr const CepsInt _kmnai
Index alias.
Definition: CRN98.hpp:127
static constexpr const CepsInt _xs
Index alias.
Definition: CRN98.hpp:158
static constexpr const CepsInt _T
Index alias.
Definition: CRN98.hpp:104
static constexpr const CepsInt _R
Index alias.
Definition: CRN98.hpp:103
static constexpr const CepsInt _xr
Index alias.
Definition: CRN98.hpp:157
static constexpr const CepsInt _gna
Index alias.
Definition: CRN98.hpp:113
static constexpr const CepsInt _v
Index alias.
Definition: CRN98.hpp:165
static constexpr const CepsInt _kq10
Index alias.
Definition: CRN98.hpp:125
static constexpr const CepsInt _nao
Index alias.
Definition: CRN98.hpp:111
static constexpr const CepsInt _ki
Index alias.
Definition: CRN98.hpp:152
static constexpr const CepsInt _u
Index alias.
Definition: CRN98.hpp:164
static constexpr const CepsInt _w
Index alias.
Definition: CRN98.hpp:166
static constexpr const CepsInt _cao
Index alias.
Definition: CRN98.hpp:112
static constexpr const CepsInt _vcell
Index alias.
Definition: CRN98.hpp:106
static constexpr const CepsInt _vi
Index alias.
Definition: CRN98.hpp:107
static constexpr const CepsInt _tauu
Index alias.
Definition: CRN98.hpp:145
static constexpr const CepsInt _oi
Index alias.
Definition: CRN98.hpp:154
static constexpr const CepsInt _gto
Index alias.
Definition: CRN98.hpp:115
static constexpr const CepsInt _j
Index alias.
Definition: CRN98.hpp:151
void setupWithParameters(InputParameters *p, FunctionDictionary *dico)
Sets the constants and the space dependant parameters from text inputs.
Definition: CRN98.cpp:348
static constexpr const CepsInt _nai
Index alias.
Definition: CRN98.hpp:148
static constexpr const CepsInt _cai
Index alias.
Definition: CRN98.hpp:159
static constexpr const CepsInt _gks
Index alias.
Definition: CRN98.hpp:117
static constexpr const CepsInt _kmna
Index alias.
Definition: CRN98.hpp:129
static constexpr const CepsInt _gk1
Index alias.
Definition: CRN98.hpp:114
static constexpr const CepsInt _tautr
Index alias.
Definition: CRN98.hpp:142
static constexpr const CepsInt _krel
Index alias.
Definition: CRN98.hpp:132
static constexpr const CepsInt _d
Index alias.
Definition: CRN98.hpp:160
CepsReal convertCurrentFromCepsUnit(const CepsReal &i) const override
Convert from uA per cm2 to pA.
Definition: CRN98.cpp:330
static constexpr const CepsInt _kmca
Index alias.
Definition: CRN98.hpp:130
static constexpr const CepsInt _gcal
Index alias.
Definition: CRN98.hpp:118
static constexpr const CepsInt _kmcmdn
Index alias.
Definition: CRN98.hpp:138
static constexpr const CepsInt _carel
Index alias.
Definition: CRN98.hpp:163
static constexpr const CepsInt _taufca
Index alias.
Definition: CRN98.hpp:141
static constexpr const CepsInt _ko
Index alias.
Definition: CRN98.hpp:110
static constexpr const CepsInt _kup
Index alias.
Definition: CRN98.hpp:133
CepsReal convertCmToCepsUnit(const CepsReal &cm) const override
Convert capacitance from ionic model units to ceps units (uF/cm2). Does nothing by default.
Definition: CRN98.cpp:342
static constexpr const CepsInt _cmdnmax
Index alias.
Definition: CRN98.hpp:135
static constexpr const CepsInt _csqnmax
Index alias.
Definition: CRN98.hpp:137
static constexpr const CepsInt _inacamax
Index alias.
Definition: CRN98.hpp:122
static constexpr const CepsInt _gbk
Index alias.
Definition: CRN98.hpp:143
static constexpr const CepsInt _inakmax
Index alias.
Definition: CRN98.hpp:121
static constexpr const CepsInt _m
Index alias.
Definition: CRN98.hpp:149
static constexpr const CepsInt _gamma
Index alias.
Definition: CRN98.hpp:144
static constexpr const CepsInt _oa
Index alias.
Definition: CRN98.hpp:153
static constexpr const CepsInt _caup
Index alias.
Definition: CRN98.hpp:167
static constexpr const CepsInt _fca
Index alias.
Definition: CRN98.hpp:162
static constexpr const CepsInt _ksat
Index alias.
Definition: CRN98.hpp:131
static constexpr const CepsInt _trpnmax
Index alias.
Definition: CRN98.hpp:136
static constexpr const CepsInt _gbca
Index alias.
Definition: CRN98.hpp:119
A degree of freedom for any kind of problem The dof can be associated to a geometrical element or not...
FunctionDictionary that holds functions which can be used to define source terms, boundary conditions...
Reads and stores simulation configuration.
CepsReal getReal(const keyType &key) const
Reads a floating point value from configuration.
A class used to defined an unknown of a PDE problem The unknown can be defined on a specific region,...
Definition: Unknown.hpp:45
const CepsGlobalIndex & getGlobalIndex() const
Get the index
CepsBool approxEquals(CepsReal a, CepsReal b, CepsReal epsilon)
Approximate equality with epsilon tolerance.
Definition: Precision.hpp:67
CepsBool isValidPtr(_Type *ptr)
Tells if pointer is not null.
Definition: CepsMemory.hpp:61
void checkNanOrInf(CepsReal v, CepsString message="")
Stops if value is NaN or infty.