-
Notifications
You must be signed in to change notification settings - Fork 0
/
INaCaAssignmentProcess.cpp
138 lines (92 loc) · 2.8 KB
/
INaCaAssignmentProcess.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#include "libecs.hpp"
#include "Process.hpp"
USE_LIBECS;
LIBECS_DM_CLASS( INaCaAssignmentProcess, Process )
{
public:
LIBECS_DM_OBJECT( INaCaAssignmentProcess, Process )
{
INHERIT_PROPERTIES( Process );
PROPERTYSLOT_SET_GET( Real,coef1 );
PROPERTYSLOT_SET_GET( Real,coef2 );
PROPERTYSLOT_SET_GET( Real,INaCa_gamma );
PROPERTYSLOT_SET_GET( Real,a0 );
PROPERTYSLOT_SET_GET( Real,a2 );
PROPERTYSLOT_SET_GET( Real,b12 );
PROPERTYSLOT_SET_GET( Real,b13 );
PROPERTYSLOT_SET_GET( Real,b2 );
PROPERTYSLOT_SET_GET( Real,c2 );
PROPERTYSLOT_SET_GET( Real,d0 );
PROPERTYSLOT_SET_GET( Real,d2 );
PROPERTYSLOT_SET_GET( Real,d3 );
}
INaCaAssignmentProcess()
{
;
}
SIMPLE_SET_GET_METHOD( Real,coef1 );
SIMPLE_SET_GET_METHOD( Real,coef2 );
SIMPLE_SET_GET_METHOD( Real,INaCa_gamma );
SIMPLE_SET_GET_METHOD( Real,a0 );
SIMPLE_SET_GET_METHOD( Real,a2 );
SIMPLE_SET_GET_METHOD( Real,b12 );
SIMPLE_SET_GET_METHOD( Real,b13 );
SIMPLE_SET_GET_METHOD( Real,b2 );
SIMPLE_SET_GET_METHOD( Real,c2 );
SIMPLE_SET_GET_METHOD( Real,d0 );
SIMPLE_SET_GET_METHOD( Real,d2 );
SIMPLE_SET_GET_METHOD( Real,d3 );
virtual void initialize()
{
Process::initialize();
Vm = getVariableReference( "Vm" ).getVariable();
RTF = getVariableReference( "RTF" ).getVariable();
Cao = getVariableReference( "Cao" ).getVariable();
Cai = getVariableReference( "Cai" ).getVariable();
Nao = getVariableReference( "Nao" ).getVariable();
Nai = getVariableReference( "Nai" ).getVariable();
GX = getVariableReference( "GX" ).getVariable();
I = getVariableReference( "I" ).getVariable();
}
virtual void fire()
{
Real theVm = Vm->getValue();
Real _RTF = RTF->getValue();
Real a_numerator = exp((theVm+a2)/_RTF) *
pow(Nai->getMolarConc()*1000.0,3.0) * Cao->getMolarConc()*1000.0 +
a0 * pow(Nao->getMolarConc()*1000.0,3.0) * Cai->getMolarConc()*1000.0;
Real c_denominator = exp((theVm+c2)/_RTF) *
pow(Nai->getMolarConc()*1000.0,3.0) * Cao->getMolarConc()*1000.0 +
pow(Nao->getMolarConc()*1000.0,3.0) * Cai->getMolarConc()*1000.0;
Real b_product = a_numerator /
(b2 + coef2 * c_denominator *
exp((theVm + b12)*(INaCa_gamma - b13)/_RTF));
Real _I = exp((theVm+d2)*(INaCa_gamma - d3)/_RTF) * coef1 * b_product + d0;
_I *= GX->getValue();
I->setValue( _I );
//setSingleNaCaEx(INaCa);
}
protected:
Variable* Vm;
Variable* RTF;
Variable* Cao;
Variable* Cai;
Variable* Nao;
Variable* Nai;
Variable* GX;
Variable* I;
Real coef1;
Real coef2;
Real INaCa_gamma;
Real a0;
Real a2;
Real b12;
Real b13;
Real b2;
Real c2;
Real d0;
Real d2;
Real d3;
private:
};
LIBECS_DM_INIT( INaCaAssignmentProcess, Process );