- Author:
- Shelley Fong <sfon036@UoA.auckland.ac.nz>
- Date:
- 2022-05-23 13:19:19+12:00
- Desc:
- Move channel state calculations to channel component
- Permanent Source URI:
- https://models.fieldml.org/workspace/881/rawfile/611538ed9fe9c2672c6d8f932d27b2f7612686e6/parameter_finder/output/TEMP.cellml.txt
def model individual_CHE as
def import using "units_and_constants/units_BG.cellml" for
unit mM using unit mM;
unit fmol using unit fmol;
unit per_fmol using unit per_fmol;
unit J_per_mol using unit J_per_mol;
unit fmol_per_sec using unit fmol_per_sec;
unit C_per_mol using unit C_per_mol;
unit fF using unit fF;
unit fC using unit fC;
unit per_second using unit per_second;
unit per_sec using unit per_sec;
unit J_per_K_per_mol using unit J_per_K_per_mol;
unit fmol_per_L using unit fmol_per_L;
unit pL using unit pL;
enddef;
def import using "units_and_constants/constants_BG.cellml" for
comp constants using comp constants;
enddef;
def comp environment as
var time: second {pub: out};
// initial values
var q_OH_i: fmol {init: 1e-888, pub: out};
var q_OH_o: fmol {init: 1e-888, pub: out};
var q_Cl_i: fmol {init: 1e-888, pub: out};
var q_Cl_o: fmol {init: 1e-888, pub: out};
var q_S1_CHE: fmol {init: 1e-888, pub: out};
var q_S2_CHE: fmol {init: 1e-888, pub: out};
var q_S3_CHE: fmol {init: 1e-888, pub: out};
var q_S4_CHE: fmol {init: 1e-888, pub: out};
var q_S5_CHE: fmol {init: 1e-888, pub: out};
var q_S6_CHE: fmol {init: 1e-888, pub: out};
// From submodule
var v_R61_CHE: fmol_per_sec {pub: in};
var v_R12_CHE: fmol_per_sec {pub: in};
var v_R23_CHE: fmol_per_sec {pub: in};
var v_R34_CHE: fmol_per_sec {pub: in};
var v_R45_CHE: fmol_per_sec {pub: in};
var v_R56_CHE: fmol_per_sec {pub: in};
ode(q_OH_i, time) = vvv;
ode(q_OH_o, time) = vvv;
ode(q_Cl_i, time) = vvv;
ode(q_Cl_o, time) = vvv;
ode(q_S1_CHE, time) = vvv;
ode(q_S2_CHE, time) = vvv;
ode(q_S3_CHE, time) = vvv;
ode(q_S4_CHE, time) = vvv;
ode(q_S5_CHE, time) = vvv;
ode(q_S6_CHE, time) = vvv;
enddef;
def comp CHE_parameters as
var kappa_R61_CHE: fmol_per_sec {init: 8.77838, pub: out};
var kappa_R12_CHE: fmol_per_sec {init: 0.031295, pub: out};
var kappa_R23_CHE: fmol_per_sec {init: 50940.7, pub: out};
var kappa_R34_CHE: fmol_per_sec {init: 0.000192726, pub: out};
var kappa_R45_CHE: fmol_per_sec {init: 2.96501e+06, pub: out};
var kappa_R56_CHE: fmol_per_sec {init: 1.82153e+06, pub: out};
var K_OH_i: per_fmol {init: 0.0253475, pub: out};
var K_OH_o: per_fmol {init: 7203.46, pub: out};
var K_Cl_i: per_fmol {init: 0.015572, pub: out};
var K_Cl_o: per_fmol {init: 0.00442538, pub: out};
var K_S1_CHE: per_fmol {init: 0.749449, pub: out};
var K_S2_CHE: per_fmol {init: 22.527, pub: out};
var K_S3_CHE: per_fmol {init: 9298.74, pub: out};
var K_S4_CHE: per_fmol {init: 159.758, pub: out};
var K_S5_CHE: per_fmol {init: 0.014999, pub: out};
var K_S6_CHE: per_fmol {init: 0.0128605, pub: out};
enddef;
def comp CHE as
var time: second {pub: in};
var R: J_per_K_per_mol {pub: in};
var T: kelvin {pub: in};
// parameters
var kappa_R61_CHE: fmol_per_sec {pub: in};
var kappa_R12_CHE: fmol_per_sec {pub: in};
var kappa_R23_CHE: fmol_per_sec {pub: in};
var kappa_R34_CHE: fmol_per_sec {pub: in};
var kappa_R45_CHE: fmol_per_sec {pub: in};
var kappa_R56_CHE: fmol_per_sec {pub: in};
var K_OH_i: per_fmol {pub: in};
var K_OH_o: per_fmol {pub: in};
var K_Cl_i: per_fmol {pub: in};
var K_Cl_o: per_fmol {pub: in};
var K_S1_CHE: per_fmol {pub: in};
var K_S2_CHE: per_fmol {pub: in};
var K_S3_CHE: per_fmol {pub: in};
var K_S4_CHE: per_fmol {pub: in};
var K_S5_CHE: per_fmol {pub: in};
var K_S6_CHE: per_fmol {pub: in};
// Input from global environment
var q_OH_i: fmol {pub: in};
var q_OH_o: fmol {pub: in};
var q_Cl_i: fmol {pub: in};
var q_Cl_o: fmol {pub: in};
var q_S1_CHE: fmol {pub: in};
var q_S2_CHE: fmol {pub: in};
var q_S3_CHE: fmol {pub: in};
var q_S4_CHE: fmol {pub: in};
var q_S5_CHE: fmol {pub: in};
var q_S6_CHE: fmol {pub: in};
// Constitutive parameters
var mu_OH_i: J_per_mol;
var mu_OH_o: J_per_mol;
var mu_Cl_i: J_per_mol;
var mu_Cl_o: J_per_mol;
var mu_S1_CHE: J_per_mol;
var mu_S2_CHE: J_per_mol;
var mu_S3_CHE: J_per_mol;
var mu_S4_CHE: J_per_mol;
var mu_S5_CHE: J_per_mol;
var mu_S6_CHE: J_per_mol;
var v_R61_CHE: fmol_per_sec {pub: out};
var v_R12_CHE: fmol_per_sec {pub: out};
var v_R23_CHE: fmol_per_sec {pub: out};
var v_R34_CHE: fmol_per_sec {pub: out};
var v_R45_CHE: fmol_per_sec {pub: out};
var v_R56_CHE: fmol_per_sec {pub: out};
mu_OH_i = R*T*ln(K_OH_i*q_OH_i);
mu_OH_o = R*T*ln(K_OH_o*q_OH_o);
mu_Cl_i = R*T*ln(K_Cl_i*q_Cl_i);
mu_Cl_o = R*T*ln(K_Cl_o*q_Cl_o);
mu_S1_CHE = R*T*ln(K_S1_CHE*q_S1_CHE);
mu_S2_CHE = R*T*ln(K_S2_CHE*q_S2_CHE);
mu_S3_CHE = R*T*ln(K_S3_CHE*q_S3_CHE);
mu_S4_CHE = R*T*ln(K_S4_CHE*q_S4_CHE);
mu_S5_CHE = R*T*ln(K_S5_CHE*q_S5_CHE);
mu_S6_CHE = R*T*ln(K_S6_CHE*q_S6_CHE);
v_R61_CHE = kappa_R61_CHE*(ppp);
v_R12_CHE = kappa_R12_CHE*(ppp);
v_R23_CHE = kappa_R23_CHE*(ppp);
v_R34_CHE = kappa_R34_CHE*(ppp);
v_R45_CHE = kappa_R45_CHE*(ppp);
v_R56_CHE = kappa_R56_CHE*(ppp);
enddef;
def map between environment and CHE for
vars time and time;
vars q_OH_i and q_OH_i;
vars q_OH_o and q_OH_o;
vars q_Cl_i and q_Cl_i;
vars q_Cl_o and q_Cl_o;
vars q_S1_CHE and q_S1_CHE;
vars q_S2_CHE and q_S2_CHE;
vars q_S3_CHE and q_S3_CHE;
vars q_S4_CHE and q_S4_CHE;
vars q_S5_CHE and q_S5_CHE;
vars q_S6_CHE and q_S6_CHE;
vars v_R61_CHE and v_R61_CHE;
vars v_R12_CHE and v_R12_CHE;
vars v_R23_CHE and v_R23_CHE;
vars v_R34_CHE and v_R34_CHE;
vars v_R45_CHE and v_R45_CHE;
vars v_R56_CHE and v_R56_CHE;
enddef;
def map between CHE and CHE_parameters for
vars kappa_R61_CHE and kappa_R61_CHE;
vars kappa_R12_CHE and kappa_R12_CHE;
vars kappa_R23_CHE and kappa_R23_CHE;
vars kappa_R34_CHE and kappa_R34_CHE;
vars kappa_R45_CHE and kappa_R45_CHE;
vars kappa_R56_CHE and kappa_R56_CHE;
vars K_OH_i and K_OH_i;
vars K_OH_o and K_OH_o;
vars K_Cl_i and K_Cl_i;
vars K_Cl_o and K_Cl_o;
vars K_S1_CHE and K_S1_CHE;
vars K_S2_CHE and K_S2_CHE;
vars K_S3_CHE and K_S3_CHE;
vars K_S4_CHE and K_S4_CHE;
vars K_S5_CHE and K_S5_CHE;
vars K_S6_CHE and K_S6_CHE;
enddef;
def map between constants and CHE for
vars R and R;
vars T and T;
enddef;
enddef;