Location: Single PASMC model (Gosak et al 2014) @ 887894c158d4 / Components / buildsrc / JKi.txt

Author:
WeiweiAi <wai484@aucklanduni.ac.nz>
Date:
2022-06-13 11:44:41+12:00
Desc:
Modify the intracelluar K from 4.7 mM to 5.9 mM
Permanent Source URI:
https://models.cellml.org/workspace/83f/rawfile/887894c158d460d4505bd3fb26d23a7b939ca442/Components/buildsrc/JKi.txt

def model JKi as
    def import using "../cellLib/Components/units.cellml" for
        unit C_per_mmol using unit C_per_mmol;
        unit J_per_K_mol using unit J_per_K_mol;
        unit mM using unit mM;
        unit mV using unit mV;
        unit per_s using unit per_s;
        unit uM using unit uM;
        unit uM2 using unit uM2;
        unit uM_per_s using unit uM_per_s;
        unit uM_per_s_mV using unit uM_per_s_mV;
    enddef;

    def import using "../cellLib/Components/E_Nernst.cellml" for
        comp E_K using comp E_K;
    enddef;

    def comp JKi as
        var R: J_per_K_mol {pub: in, priv: out};
        var F: C_per_mmol {pub: in, priv: out};
        var T: kelvin {pub: in, priv: out};
        var G_Ki: uM_per_s_mV {pub: in};
        var v_K: mV {pub: out, priv: in};
        var wi_init: dimensionless {pub: in};
        var w_i: dimensionless {init: wi_init};
        var lambda: per_s {pub: in};
        var K_activationi: dimensionless ;
        var c_w: uM {pub: in};
        var v_Ca3: mV {pub: in};
        var R_K: mV {pub: in};
        var beta: uM2 {pub: in};
        var Ki: mM {pub: in, priv: out};
        var K_out: mM {pub: in, priv: out};
        var t: second {pub: in};
        var c_i: uM {pub: in};
        var v_i: mV {pub: in};
        var J_Ki: uM_per_s {pub: out};

        J_Ki=G_Ki*w_i*(v_i-v_K);
        ode(w_i,t)=lambda*(K_activationi-w_i);
        K_activationi = sqr(c_i+c_w)/(sqr(c_i+c_w)+beta*exp(-(v_i-v_Ca3)/R_K));

    enddef;

    def group as encapsulation for
        comp JKi incl
            comp E_K;
        endcomp;
    enddef;

    def map between E_K and JKi for
        vars E_K and v_K;
        vars R and R;
        vars F and F;
        vars T and T;
        vars Ki and Ki;
        vars Ko and K_out;
    enddef;

enddef;