import nsrunit; unit conversion on; unit msec=.001 second^1; unit joule_per_kelvin_per_kilomole=.001 kilogram^1*meter^2*second^(-2)*kelvin^(-1)*mole^(-1); //Warning: unit um_ renamed from um, as the latter is predefined in JSim with different fundamental units. unit um_=1E-6 mole^1; unit um2=1E-12 mole^2; unit cm2_per_sec=1E-4 meter^2*second^(-1); unit liters_per_msec=1 meter^3*second^(-1); unit mM=1 meter^(-3)*mole^1; unit mM4=1 meter^(-12)*mole^4; unit mS_per_uF=1E3 second^(-1); unit cm_per_sec=.01 meter^1*second^(-1); unit mM_per_msec=1E3 meter^(-3)*second^(-1)*mole^1; unit per_mM_per_msec=1E3 meter^3*second^(-1)*mole^(-1); unit coulomb_per_mole=1 second^1*ampere^1*mole^(-1); unit uA_per_uF=1 kilogram^1*meter^2*second^(-4)*ampere^(-1); unit per_msec=1E3 second^(-1); unit mV=.001 kilogram^1*meter^2*second^(-3)*ampere^(-1); unit mV2=1E-6 kilogram^2*meter^4*second^(-6)*ampere^(-2); unit per_mV=1E3 kilogram^(-1)*meter^(-2)*second^3*ampere^1; unit per_mV2=1E6 kilogram^(-2)*meter^(-4)*second^6*ampere^2; unit per_mM2_per_msec=1E3 meter^6*second^(-1)*mole^(-2); unit liters_per_femtoliter=1E15 meter^3*mole^(-3); unit uF_per_mS=1E-3 second^1; unit correction_factor=100 kilogram^1*meter^4*second^(-4)*ampere^(-2); math main { realDomain time msec; time.min=0; extern time.max; extern time.delta; real I_app(time) uA_per_uF; real V_m(time) mV; when(time=time.min) V_m=-8.09763e1; real epi dimensionless; real R joule_per_kelvin_per_kilomole; real Frdy coulomb_per_mole; real Temp kelvin; real FoRT per_mV; real Cmem farad; real Qpow dimensionless; real cellLength um_; real cellRadius um_; real junctionLength um_; real junctionRadius um_; real distSLcyto um_; real distJuncSL um_; real DcaJuncSL cm2_per_sec; real DcaSLcyto cm2_per_sec; real DnaJuncSL cm2_per_sec; real DnaSLcyto cm2_per_sec; real Vcell liter; real Vmyo liter; real Vsr liter; real Vsl liter; real Vjunc liter; real SAjunc um2; real SAsl um2; real J_ca_juncsl liters_per_msec; real J_ca_slmyo liters_per_msec; real J_na_juncsl liters_per_msec; real J_na_slmyo liters_per_msec; real Fjunc dimensionless; real Fsl dimensionless; real Fjunc_CaL dimensionless; real Fsl_CaL dimensionless; real Cli mM; real Clo mM; real Ko mM; real Nao mM; real Cao mM; real Mgi mM; real ena_junc(time) mV; real ena_sl(time) mV; real ek(time) mV; real eca_junc(time) mV; real eca_sl(time) mV; real ecl mV; real GNa mS_per_uF; real GNaB mS_per_uF; real IbarNaK uA_per_uF; real KmNaip mM; real KmKo mM; real Q10NaK dimensionless; real Q10KmNai dimensionless; real pNaK dimensionless; real gkp mS_per_uF; real GClCa mS_per_uF; real GClB mS_per_uF; real KdClCa mM; real pNa cm_per_sec; real pCa cm_per_sec; real pK cm_per_sec; real Q10CaL dimensionless; real IbarNCX uA_per_uF; real KmCai mM; real KmCao mM; real KmNai mM; real KmNao mM; real ksat dimensionless; real nu dimensionless; real Kdact mM; real Q10NCX dimensionless; real IbarSLCaP uA_per_uF; real KmPCa mM; real GCaB mS_per_uF; real Q10SLCaP dimensionless; real Q10SRCaP dimensionless; real Vmax_SRCaP mM_per_msec; real Kmf mM; real Kmr mM; real hillSRCaP dimensionless; real ks per_msec; real koCa per_mM2_per_msec; real kom per_msec; real kiCa per_mM_per_msec; real kim per_msec; real ec50SR mM; real Bmax_Naj mM; real Bmax_Nasl mM; real koff_na per_msec; real kon_na per_mM_per_msec; real Bmax_TnClow mM; real koff_tncl per_msec; real kon_tncl per_mM_per_msec; real Bmax_TnChigh mM; real koff_tnchca per_msec; real kon_tnchca per_mM_per_msec; real koff_tnchmg per_msec; real kon_tnchmg per_mM_per_msec; real Bmax_CaM mM; real koff_cam per_msec; real kon_cam per_mM_per_msec; real Bmax_myosin mM; real koff_myoca per_msec; real kon_myoca per_mM_per_msec; real koff_myomg per_msec; real kon_myomg per_mM_per_msec; real Bmax_SR mM; real koff_sr per_msec; real kon_sr per_mM_per_msec; real Bmax_SLlowsl mM; real Bmax_SLlowj mM; real koff_sll per_msec; real kon_sll per_mM_per_msec; real Bmax_SLhighsl mM; real Bmax_SLhighj mM; real koff_slh per_msec; real kon_slh per_mM_per_msec; real Bmax_Csqn mM; real koff_csqn per_msec; real kon_csqn per_mM_per_msec; real Na_j(time) mM; when(time=time.min) Na_j=9.06; real Na_sl(time) mM; when(time=time.min) Na_sl=9.06; real K_i(time) mM; when(time=time.min) K_i=120; real Ca_j(time) mM; when(time=time.min) Ca_j=1.737475e-4; real Ca_sl(time) mM; when(time=time.min) Ca_sl=1.031812e-4; real mss(time) dimensionless; real taum(time) msec; real ah(time) dimensionless; real bh(time) dimensionless; real tauh(time) msec; real hss(time) dimensionless; real aj(time) dimensionless; real bj(time) dimensionless; real tauj(time) msec; real was_jss(time) dimensionless; real m(time) dimensionless; when(time=time.min) m=1.405627e-3; real h(time) dimensionless; when(time=time.min) h=9.867005e-1; real j(time) dimensionless; when(time=time.min) j=9.91562e-1; real I_Na_junc(time) uA_per_uF; real I_Na_sl(time) uA_per_uF; real I_Na(time) uA_per_uF; real I_nabk_junc(time) uA_per_uF; real I_nabk_sl(time) uA_per_uF; real I_nabk(time) uA_per_uF; real sigma dimensionless; real fnak(time) dimensionless; real I_nak_junc(time) uA_per_uF; real I_nak_sl(time) uA_per_uF; real I_nak(time) uA_per_uF; real gkr mS_per_uF; real xrss(time) dimensionless; real tauxr(time) msec; real x_kr(time) dimensionless; when(time=time.min) x_kr=8.641386e-3; real rkr(time) dimensionless; real I_kr(time) uA_per_uF; real kp_kp(time) dimensionless; real I_kp_junc(time) uA_per_uF; real I_kp_sl(time) uA_per_uF; real I_kp(time) uA_per_uF; real eks(time) mV; real gks_junc mS_per_uF; real gks_sl mS_per_uF; real xsss(time) dimensionless; real tauxs(time) msec; real x_ks(time) dimensionless; when(time=time.min) x_ks=5.412034e-3; real I_ks_junc(time) uA_per_uF; real I_ks_sl(time) uA_per_uF; real I_ks(time) uA_per_uF; real Na_i(time) mM; when(time=time.min) Na_i=9.06; real GtoSlow mS_per_uF; real GtoFast mS_per_uF; real xtoss(time) dimensionless; real ytoss(time) dimensionless; real tauxtos(time) msec; real tauytos(time) msec; real x_to_s(time) dimensionless; when(time=time.min) x_to_s=4.051574e-3; real y_to_s(time) dimensionless; when(time=time.min) y_to_s=9.945511e-1; real I_tos(time) uA_per_uF; real tauxtof(time) msec; real tauytof(time) msec; real x_to_f(time) dimensionless; when(time=time.min) x_to_f=4.051574e-3; real y_to_f(time) dimensionless; when(time=time.min) y_to_f=9.945511e-1; real I_tof(time) uA_per_uF; real I_to(time) uA_per_uF; real aki(time) dimensionless; real bki(time) dimensionless; real kiss(time) dimensionless; real I_ki(time) uA_per_uF; real I_ClCa_junc(time) uA_per_uF; real I_ClCa_sl(time) uA_per_uF; real I_ClCa(time) uA_per_uF; real I_Clbk(time) uA_per_uF; real fss(time) dimensionless; real dss(time) dimensionless; real taud(time) msec; real tauf(time) msec; real d(time) dimensionless; when(time=time.min) d=7.175662e-6; real f(time) dimensionless; when(time=time.min) f=1.000681; real f_Ca_Bj(time) dimensionless; when(time=time.min) f_Ca_Bj=2.421991e-2; real f_Ca_Bsl(time) dimensionless; when(time=time.min) f_Ca_Bsl=1.452605e-2; real fcaCaMSL dimensionless; real fcaCaj dimensionless; real ibarca_j(time) uA_per_uF; real ibarca_sl(time) uA_per_uF; real ibark(time) uA_per_uF; real ibarna_j(time) uA_per_uF; real ibarna_sl(time) uA_per_uF; real I_Ca_junc(time) uA_per_uF; real I_Ca_sl(time) uA_per_uF; real I_Ca(time) uA_per_uF; real I_CaK(time) uA_per_uF; real I_CaNa_junc(time) uA_per_uF; real I_CaNa_sl(time) uA_per_uF; real I_CaNa(time) uA_per_uF; real I_Catot(time) uA_per_uF; real Ka_junc(time) dimensionless; real Ka_sl(time) dimensionless; real s1_junc(time) mM4; real s1_sl(time) mM4; real s2_junc(time) mM4; real s3_junc(time) mM4; real s2_sl(time) mM4; real s3_sl(time) mM4; real I_ncx_junc(time) uA_per_uF; real I_ncx_sl(time) uA_per_uF; real I_ncx(time) uA_per_uF; real I_pca_junc(time) uA_per_uF; real I_pca_sl(time) uA_per_uF; real I_pca(time) uA_per_uF; real I_cabk_junc(time) uA_per_uF; real I_cabk_sl(time) uA_per_uF; real I_cabk(time) uA_per_uF; real MaxSR dimensionless; real MinSR dimensionless; real kCaSR(time) dimensionless; real koSRCa(time) per_mM2_per_msec; real kiSRCa(time) per_mM_per_msec; real RI(time) mM; real Ry_Rr(time) mM; when(time=time.min) Ry_Rr=8.884332e-1; real Ry_Ro(time) mM; when(time=time.min) Ry_Ro=8.156628e-7; real Ry_Ri(time) mM; when(time=time.min) Ry_Ri=1.024274e-7; real J_SRCarel(time) mM_per_msec; real J_serca(time) mM_per_msec; real J_SRleak(time) mM_per_msec; real Ca_sr(time) mM; when(time=time.min) Ca_sr=0.1e-1; real Ca_i(time) mM; when(time=time.min) Ca_i=8.597401e-5; real Na_Bj(time) mM; when(time=time.min) Na_Bj=3.539892; real Na_Bsl(time) mM; when(time=time.min) Na_Bsl=7.720854e-1; real dNa_Bj_dt(time) mM_per_msec; real dNa_Bsl_dt(time) mM_per_msec; real Tn_CL(time) mM; when(time=time.min) Tn_CL=8.773191e-3; real Tn_CHc(time) mM; when(time=time.min) Tn_CHc=1.078283e-1; real Tn_CHm(time) mM; when(time=time.min) Tn_CHm=1.524002e-2; real CaM(time) mM; when(time=time.min) CaM=2.911916e-4; real Myo_c(time) mM; when(time=time.min) Myo_c=1.298754e-3; real Myo_m(time) mM; when(time=time.min) Myo_m=1.381982e-1; real SRB(time) mM; when(time=time.min) SRB=2.143165e-3; real J_CaB_cytosol(time) mM_per_msec; real SLL_j(time) mM; when(time=time.min) SLL_j=9.566355e-3; real SLL_sl(time) mM; when(time=time.min) SLL_sl=1.110363e-1; real SLH_j(time) mM; when(time=time.min) SLH_j=7.347888e-3; real SLH_sl(time) mM; when(time=time.min) SLH_sl=7.297378e-2; real J_CaB_junction(time) mM_per_msec; real J_CaB_sl(time) mM_per_msec; real Csqn_b(time) mM; when(time=time.min) Csqn_b=1.242988; real I_Na_tot_junc(time) uA_per_uF; real I_Na_tot_sl(time) uA_per_uF; real I_Na_tot_sl2(time) uA_per_uF; real I_Na_tot_junc2(time) uA_per_uF; real I_K_tot(time) uA_per_uF; real I_Ca_tot_junc(time) uA_per_uF; real I_Ca_tot_sl(time) uA_per_uF; real I_Na_tot(time) uA_per_uF; real I_Cl_tot(time) uA_per_uF; real I_Ca_tot(time) uA_per_uF; real I_tot(time) uA_per_uF; // I_app=(if ((time>=0) and (time<=5)) 9.5 else if ((time>=310) and (time<=315)) 9.5 else 0); // // // epi=1; R=(8314 joule_per_kelvin_per_kilomole); Frdy=(96485 coulomb_per_mole); Temp=(310 kelvin); FoRT=(Frdy/(R*Temp)); Cmem=(1.381E-10 farad); Qpow=((Temp-(310 kelvin))/(10 kelvin)); cellLength=(100 um_); cellRadius=(10.25 um_); junctionLength=(.16 um_); junctionRadius=(.015 um_); distSLcyto=(.45 um_); distJuncSL=(.5 um_); DcaJuncSL=(1.6399999999999998E-6 cm2_per_sec); DcaSLcyto=(1.22E-6 cm2_per_sec); DnaJuncSL=(1.09E-5 cm2_per_sec); DnaSLcyto=(1.7899999999999998E-5 cm2_per_sec); Vcell=(3.141592653589793*cellRadius^2*cellLength*(1E-15 liters_per_femtoliter)); Vmyo=(.65*Vcell); Vsr=(.035*Vcell); Vsl=(.02*Vcell); Vjunc=(.0539*.01*Vcell); SAjunc=(20150*3.141592653589793*2*junctionLength*junctionRadius); SAsl=(3.141592653589793*2*cellRadius*cellLength); J_ca_juncsl=(8.241300000000001E-13 liters_per_msec); J_ca_slmyo=(3.2743000000000003E-12 liters_per_msec); J_na_juncsl=(1.8313E-14 liters_per_msec); J_na_slmyo=(1.6386000000000001E-12 liters_per_msec); Fjunc=.11; Fsl=(1-Fjunc); Fjunc_CaL=.9; Fsl_CaL=(1-Fjunc_CaL); Cli=(15 mM); Clo=(150 mM); Ko=(5.4 mM); Nao=(140 mM); Cao=(1.8 mM); Mgi=(1 mM); ena_junc=(1/FoRT*ln(Nao/Na_j)); ena_sl=(1/FoRT*ln(Nao/Na_sl)); ek=(1/FoRT*ln(Ko/K_i)); eca_junc=(1/FoRT/2*ln(Cao/Ca_j)); eca_sl=(1/FoRT/2*ln(Cao/Ca_sl)); ecl=(1/FoRT*ln(Cli/Clo)); GNa=(23 mS_per_uF); GNaB=(5.97E-4 mS_per_uF); IbarNaK=((1 uA_per_uF)*1.8); KmNaip=(11 mM); KmKo=(1.5 mM); Q10NaK=1.63; Q10KmNai=1.39; pNaK=.01833; gkp=(2*(.001 mS_per_uF)); GClCa=((.5 mS_per_uF)*.109625); GClB=(1*(.009000000000000001 mS_per_uF)); KdClCa=(.1 mM); pNa=((.5 cm_per_sec)*1.5000000000000002E-8); pCa=((.5 cm_per_sec)*5.400000000000001E-4); pK=((.5 cm_per_sec)*2.7E-7); Q10CaL=1.8; IbarNCX=(1*(4.5 uA_per_uF)); KmCai=(.00359 mM); KmCao=(1.3 mM); KmNai=(12.29 mM); KmNao=(87.5 mM); ksat=.32; nu=.27; Kdact=(1.5E-4 mM); Q10NCX=1.57; IbarSLCaP=(.0673 uA_per_uF); KmPCa=(5E-4 mM); GCaB=(5.513E-4 mS_per_uF); Q10SLCaP=2.35; Q10SRCaP=2.6; Vmax_SRCaP=(.0053114 mM_per_msec); Kmf=(2.46E-4 mM); Kmr=(1.7 mM); hillSRCaP=1.787; ks=(25 per_msec); koCa=(10 per_mM2_per_msec); kom=(.06 per_msec); kiCa=(.5 per_mM_per_msec); kim=(.005 per_msec); ec50SR=(.45 mM); Bmax_Naj=(7.561 mM); Bmax_Nasl=(1.65 mM); koff_na=(.001 per_msec); kon_na=(1E-4 per_mM_per_msec); Bmax_TnClow=(.07 mM); koff_tncl=(.019600000000000003 per_msec); kon_tncl=(32.7 per_mM_per_msec); Bmax_TnChigh=(.14 mM); koff_tnchca=(3.2E-5 per_msec); kon_tnchca=(2.37 per_mM_per_msec); koff_tnchmg=(.00333 per_msec); kon_tnchmg=(.003 per_mM_per_msec); Bmax_CaM=(.024 mM); koff_cam=(.23800000000000002 per_msec); kon_cam=(34 per_mM_per_msec); Bmax_myosin=(.14 mM); koff_myoca=(4.6E-4 per_msec); kon_myoca=(13.8 per_mM_per_msec); koff_myomg=(5.7E-5 per_msec); kon_myomg=(.0157 per_mM_per_msec); Bmax_SR=((19 mM)*9.000000000000001E-4); koff_sr=(.06 per_msec); kon_sr=(100 per_mM_per_msec); Bmax_SLlowsl=((.0374 mM)*Vmyo/Vsl); Bmax_SLlowj=((.0046 mM)*Vmyo/Vjunc*.1); koff_sll=(1.3 per_msec); kon_sll=(100 per_mM_per_msec); Bmax_SLhighsl=((.0134 mM)*Vmyo/Vsl); Bmax_SLhighj=((.00165 mM)*Vmyo/Vjunc*.1); koff_slh=(.03 per_msec); kon_slh=(100 per_mM_per_msec); Bmax_Csqn=((.14 mM)*Vmyo/Vsr); koff_csqn=(65 per_msec); kon_csqn=(100 per_mM_per_msec); // mss=(1/(1+exp((-1)*((56.86 mV)+V_m)/(9.03 mV)))^2); taum=((.1292 msec)*exp((-1)*((V_m+(45.79 mV))/(15.54 mV))^2)+(.06487 msec)*exp((-1)*((V_m-(4.823 mV))/(51.12 mV))^2)); ah=(if (V_m>=((-1)*(40 mV))) 0 else .057*exp((-1)*(V_m+(80 mV))/(6.8 mV))); bh=(if (V_m>=((-1)*(40 mV))) .77/(.13*(1+exp((-1)*(V_m+(10.66 mV))/(11.1 mV)))) else 2.7*exp((.079 per_mV)*V_m)+3.1E5*exp((.3485 per_mV)*V_m)); tauh=((1 msec)/(ah+bh)); hss=(1/(1+exp((V_m+(71.55 mV))/(7.43 mV)))^2); aj=(if (V_m>=((-1)*(40 mV))) 0 else ((-1)*(25428 per_mV)*exp((.2444 per_mV)*V_m)-(6.948E-6 per_mV)*exp((-1)*(.04391 per_mV)*V_m))*(V_m+(37.78 mV))/(1+exp((.311 per_mV)*(V_m+(79.23 mV))))); bj=(if (V_m>=((-1)*(40 mV))) .6*exp((.057 per_mV)*V_m)/(1+exp((-1)*(.1 per_mV)*(V_m+(32 mV)))) else .02424*exp((-1)*(.01052 per_mV)*V_m)/(1+exp((-1)*(.1378 per_mV)*(V_m+(40.14 mV))))); tauj=((1 msec)/(aj+bj)); was_jss=(1/(1+exp((V_m+(71.55 mV))/(7.43 mV)))^2); m:time=((mss-m)/taum); h:time=((hss-h)/tauh); j:time=((was_jss-j)/tauj); I_Na_junc=(Fjunc*GNa*m^3*h*j*(V_m-ena_junc)); I_Na_sl=(Fsl*GNa*m^3*h*j*(V_m-ena_sl)); I_Na=(I_Na_junc+I_Na_sl); // I_nabk_junc=(Fjunc*GNaB*(V_m-ena_junc)); I_nabk_sl=(Fsl*GNaB*(V_m-ena_sl)); I_nabk=(I_nabk_junc+I_nabk_sl); // sigma=((exp(Nao/(67.3 mM))-1)/7); fnak=(1/(1+.1245*exp((-1)*.1*V_m*FoRT)+.0365*sigma*exp((-1)*V_m*FoRT))); I_nak_junc=(Fjunc*IbarNaK*fnak*Ko/(1+(KmNaip/Na_j)^4)/(Ko+KmKo)); I_nak_sl=(Fsl*IbarNaK*fnak*Ko/(1+(KmNaip/Na_sl)^4)/(Ko+KmKo)); I_nak=(I_nak_junc+I_nak_sl); // gkr=((.035 mS_per_uF)*sqrt(Ko/(5.4 mM))); xrss=(1/(1+exp((-1)*(V_m+(10 mV))/(5 mV)))); tauxr=(550/(1+exp(((-1)*(22 mV)-V_m)/(9 mV)))*(6 msec)/(1+exp((V_m-(-1)*(11 mV))/(9 mV)))+(230 msec)/(1+exp((V_m-(-1)*(40 mV))/(20 mV)))); x_kr:time=((xrss-x_kr)/tauxr); rkr=(1/(1+exp((V_m+(74 mV))/(24 mV)))); I_kr=(gkr*x_kr*rkr*(V_m-ek)); // kp_kp=(1/(1+exp(7.488-V_m/(5.98 mV)))); I_kp_junc=(Fjunc*gkp*kp_kp*(V_m-ek)); I_kp_sl=(Fsl*gkp*kp_kp*(V_m-ek)); I_kp=(I_kp_junc+I_kp_sl); // eks=(1/FoRT*ln((Ko+pNaK*Nao)/(K_i+pNaK*Na_i))); gks_junc=(.0035 mS_per_uF); gks_sl=(.0035 mS_per_uF); xsss=(1/(1+exp((-1)*(V_m+(3.8 mV))/(14.25 mV)))); tauxs=((990.1 msec)/(1+exp((-1)*(V_m+(2.436 mV))/(14.12 mV)))); x_ks:time=((xsss-x_ks)/tauxs); I_ks_junc=(Fjunc*gks_junc*x_ks^2*(V_m-eks)); I_ks_sl=(Fsl*gks_sl*x_ks^2*(V_m-eks)); I_ks=(I_ks_junc+I_ks_sl); // GtoSlow=(if (epi=1) (1 mS_per_uF)*.13*.12 else (.13 mS_per_uF)*.3*.964); GtoFast=(if (epi=1) (1 mS_per_uF)*.13*.88 else (.13 mS_per_uF)*.3*.036); xtoss=(1/(1+exp((-1)*(V_m-(19 mV))/(13 mV)))); ytoss=(1/(1+exp((V_m+(19.5 mV))/(5 mV)))); tauxtos=((9 msec)/(1+exp((V_m+(3 mV))/(15 mV)))+(.5 msec)); tauytos=((800 msec)/(1+exp((V_m+(60 mV))/(10 mV)))+(30 msec)); x_to_s:time=((xtoss-x_to_s)/tauxtos); y_to_s:time=((ytoss-y_to_s)/tauytos); I_tos=(GtoSlow*x_to_s*y_to_s*(V_m-ek)); tauxtof=((8.5 msec)*exp((-1)*((V_m+(45 mV))/(50 mV))^2)+(.5 msec)); tauytof=((85 msec)*exp((-1)*(V_m+(40 mV))^2/(220 mV2))+(7 msec)); x_to_f:time=((xtoss-x_to_f)/tauxtof); y_to_f:time=((ytoss-y_to_f)/tauytof); I_tof=(GtoFast*x_to_f*y_to_f*(V_m-ek)); I_to=(I_tos+I_tof); // aki=(1.02/(1+exp((.2385 per_mV)*(V_m-ek-(59.215 mV))))); bki=((.49124*exp((.08032 per_mV)*(V_m+(5.476 mV)-ek))+exp((.06175 per_mV)*(V_m-ek-(594.31 mV))))/(1+exp((-1)*(.5143 per_mV)*(V_m-ek+(4.753 mV))))); kiss=(aki/(aki+bki)); I_ki=(1*(.35 mS_per_uF)*sqrt(Ko/(5.4 mM))*kiss*(V_m-ek)); // I_ClCa_junc=(Fjunc*GClCa/(1+KdClCa/Ca_j)*(V_m-ecl)); I_ClCa_sl=(Fsl*GClCa/(1+KdClCa/Ca_sl)*(V_m-ecl)); I_ClCa=(I_ClCa_junc+I_ClCa_sl); I_Clbk=(GClB*(V_m-ecl)); // fss=(1/(1+exp((V_m+(35 mV))/(9 mV)))+.6/(1+exp(((50 mV)-V_m)/(20 mV)))); dss=(1/(1+exp((-1)*(V_m+(5 mV))/(6 mV)))); taud=((1 msec)*dss*(1-exp((-1)*(V_m+(5 mV))/(6 mV)))/((.035 per_mV)*(V_m+(5 mV)))); tauf=((1 msec)/(.0197*exp((-1)*((.0337 per_mV)*(V_m+(14.5 mV)))^2)+.02)); d:time=((dss-d)/taud); f:time=((fss-f)/tauf); f_Ca_Bj:time=((1.7 per_msec)*Ca_j/(1 mM)*(1-f_Ca_Bj)-(.0119 per_msec)*f_Ca_Bj); f_Ca_Bsl:time=((1.7 per_msec)*Ca_sl/(1 mM)*(1-f_Ca_Bsl)-(.0119 per_msec)*f_Ca_Bsl); fcaCaMSL=0; fcaCaj=0; ibarca_j=(pCa*(4 correction_factor)*V_m*Frdy*FoRT*(.341*Ca_j*exp(2*V_m*FoRT)-.341*Cao)/(exp(2*V_m*FoRT)-1)); ibarca_sl=(pCa*(4 correction_factor)*V_m*Frdy*FoRT*(.341*Ca_sl*exp(2*V_m*FoRT)-.341*Cao)/(exp(2*V_m*FoRT)-1)); ibark=(pK*V_m*Frdy*FoRT*((.75 correction_factor)*K_i*exp(V_m*FoRT)-(.75 correction_factor)*Ko)/(exp(V_m*FoRT)-1)); ibarna_j=(pNa*V_m*Frdy*FoRT*((.75 correction_factor)*Na_j*exp(V_m*FoRT)-(.75 correction_factor)*Nao)/(exp(V_m*FoRT)-1)); ibarna_sl=(pNa*V_m*Frdy*FoRT*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t; dNa_Bsl_dt=(kon_na*Na_sl*(Bmax_Nasl-Na_Bsl)-koff_na*Na_Bsl); // Tn_CL:time=(kon_tncl*Ca_i*(Bmax_TnClow-Tn_CL)-koff_tncl*Tn_CL); Tn_CHc:time=(kon_tnchca*Ca_i*(Bmax_TnChigh-Tn_CHc-Tn_CHm)-koff_tnchca*Tn_CHc); Tn_CHm:time=(kon_tnchmg*Mgi*(Bmax_TnChigh-Tn_CHc-Tn_CHm)-koff_tnchmg*Tn_CHm); CaM:time=(kon_cam*Ca_i*(Bmax_CaM-CaM)-koff_cam*CaM); Myo_c:time=(kon_myoca*Ca_i*(Bmax_myosin-Myo_c-Myo_m)-koff_myoca*Myo_c); Myo_m:time=(kon_myomg*Mgi*(Bmax_myosin-Myo_c-Myo_m)-koff_myomg*Myo_m); SRB:time=(kon_sr*Ca_i*(Bmax_SR-SRB)-koff_sr*SRB); J_CaB_cytosol=(kon_tncl*Ca_i*(Bmax_TnClow-Tn_CL)-koff_tncl*Tn_CL+kon_tnchca*Ca_i*(Bmax_TnChigh-Tn_CHc-Tn_CHm)-koff_tnchca*Tn_CHc+kon_tnchmg*Mgi*(Bmax_TnChigh-Tn_CHc-Tn_CHm)-koff_tnchmg*Tn_CHm+kon_cam*Ca_i*(Bmax_CaM-CaM)-koff_cam*CaM+kon_myoca*Ca_i*(Bmax_myosin-Myo_c-Myo_m)-koff_myoca*Myo_c+kon_myomg*Mgi*(Bmax_myosin-Myo_c-Myo_m)-koff_myomg*Myo_m+(kon_sr*Ca_i*(Bmax_SR-SRB)-koff_sr*SRB)); // SLL_j:time=(kon_sll*Ca_j*(Bmax_SLlowj-SLL_j)-koff_sll*SLL_j); SLL_sl:time=(kon_sll*Ca_sl*(Bmax_SLlowsl-SLL_sl)-koff_sll*SLL_sl); SLH_j:time=(kon_slh*Ca_j*(Bmax_SLhighj-SLH_j)-koff_slh*SLH_j); SLH_sl:time=(kon_slh*Ca_sl*(Bmax_SLhighsl-SLH_sl)-koff_slh*SLH_sl); J_CaB_junction=(kon_sll*Ca_j*(Bmax_SLlowj-SLL_j)-koff_sll*SLL_j+(kon_slh*Ca_j*(Bmax_SLhighj-SLH_j)-koff_slh*SLH_j)); J_CaB_sl=(kon_sll*Ca_sl*(Bmax_SLlowsl-SLL_sl)-koff_sll*SLL_sl+(kon_slh*Ca_sl*(Bmax_SLhighsl-SLH_sl)-koff_slh*SLH_sl)); // Csqn_b:time=(kon_csqn*Ca_sr*(Bmax_Csqn-Csqn_b)-koff_csqn*Csqn_b); Ca_sr:time=(J_serca-(J_SRleak*Vmyo/Vsr+J_SRCarel)-(kon_csqn*Ca_sr*(Bmax_Csqn-Csqn_b)-koff_csqn*Csqn_b)); // I_Na_tot_junc=(I_Na_junc+I_nabk_junc+3*I_ncx_junc+3*I_nak_junc+I_CaNa_junc); I_Na_tot_sl=(I_Na_sl+I_nabk_sl+3*I_ncx_sl+3*I_nak_sl+I_CaNa_sl); I_Na_tot_sl2=(3*I_ncx_sl+3*I_nak_sl+I_CaNa_sl); I_Na_tot_junc2=(3*I_ncx_junc+3*I_nak_junc+I_CaNa_junc); Na_j:time=((-1)*I_Na_tot_junc*Cmem/(Vjunc*Frdy)+J_na_juncsl/Vjunc*(Na_sl-Na_j)-dNa_Bj_dt); Na_sl:time=((-1)*I_Na_tot_sl*Cmem/(Vsl*Frdy)+J_na_juncsl/Vsl*(Na_j-Na_sl)+J_na_slmyo/Vsl*(Na_i-Na_sl)-dNa_Bsl_dt); Na_i:time=(J_na_slmyo/Vmyo*(Na_sl-Na_i)); // I_K_tot=(I_to+I_kr+I_ks+I_ki-2*I_nak+I_CaK+I_kp); K_i:time=(0 mM_per_msec); // I_Ca_tot_junc=(I_Ca_junc+I_cabk_junc+I_pca_junc-2*I_ncx_junc); I_Ca_tot_sl=(I_Ca_sl+I_cabk_sl+I_pca_sl-2*I_ncx_sl); Ca_j:time=((-1)*I_Ca_tot_junc*Cmem/(Vjunc*2*Frdy)+J_ca_juncsl/Vjunc*(Ca_sl-Ca_j)-J_CaB_junction+J_SRCarel*Vsr/Vjunc+J_SRleak*Vmyo/Vjunc); Ca_sl:time=((-1)*I_Ca_tot_sl*Cmem/(Vsl*2*Frdy)+J_ca_juncsl/Vsl*(Ca_j-Ca_sl)+J_ca_slmyo/Vsl*(Ca_i-Ca_sl)-J_CaB_sl); Ca_i:time=((-1)*J_serca*Vsr/Vmyo-J_CaB_cytosol+J_ca_slmyo/Vmyo*(Ca_sl-Ca_i)); // I_Na_tot=(I_Na_tot_junc+I_Na_tot_sl); I_Cl_tot=(I_ClCa+I_Clbk); I_Ca_tot=(I_Ca_tot_junc+I_Ca_tot_sl); I_tot=(I_Na_tot+I_Cl_tot+I_Ca_tot+I_K_tot); V_m:time=((-1)*(I_tot-I_app)); }