clear;
clc;
%循环变量的控制
bcl=1500;
beats=2;
S2=0;
%**************************************
% *** Ion Valences **
zNa=1; % Na valence
zK=1; % K valence
zCa=2; % Ca valence
%***************************************
l=0.1; %Length of the cell (cm)
a=0.0008; %Radius of the cell (cm)
pi=3.1415926;
%*************************************
R=8314.3;
Frdy=96485.0;
Temp=310.0;
Cm=100.0;
%************************************************************************
%***************************主 程 序*********************************
%************************************************************************
%/* Cell Geometry */ % zzh
Vcell = 1000000*pi*a*a*l; % /* 3.801e-5 uL */
Ageo = 2*pi*a*a+2*pi*a*l;
Acap = Ageo*2; % /* 1.534e-4 cm^2 */
Vmyo = Vcell*0.68;
Vmito = Vcell*0.26;
Vsr = Vcell*0.06;
VCaup = Vcell*0.0552;
VCarel = Vcell*0.0048;
for SNPN=1:2 % zzh start
% Time Loop Conditions
t=0; % Time(ms)
udt=0.01; % Time step (ms)
steps=(S2+bcl*beats)/udt; % Number of ms
st=0; % Stimulus
tstim=100; % Time to begin stimulus % zzh 10
stimtime=10; % Initial Condition for Stimulus
v= -81.4245326713734; % Initial Voltage (mv) % v=-81.2;
%v=0.0;
% Beginning Ion Concentrations
Nai=11.1360769014440; % Nai = 11.2; % Initial Intracellular Na (mM)
Nao=140; % Na0 = 140; % Initial Extracellular Na (mM)
Ki=138.982665394038; % Ki = 139; % Initial Intracellular K (mM)
Ko=5.4; % Ko = 4.5 cpp % Initial Extracellular K (mM)
Cai=1.231228966480658E-004; % Cai = 0.000102; % Initial Intracellular Ca (mM)
Cao=1.8; % Cao = 1.8; % Initial Extracellular Ca (mM)
% Initial Gate Conditions
m=2.792720804957358E-003; % m = 0.00291;
h=0.966739930182481; % h = 0.965;
j=0.978747933746599; % j = 0.978;
d=1.325975315099967E-004; % uaCal = 0.000137;
f=0.920916435494746; % uiCal = 0.999837;
fca=0.739739954822672; % uicaCal= 0.775;
xs=1.906521485229892E-002; % xs = 0.0187;
xr=3.803895853885543E-003; % xr = 0.0000329;
%xr=3.80;
ato=3.002738680382986E-002; % ato = 0.0304;
iito=0.999276496543150; % iito = 0.999;
uakur=4.842619909896894E-003;% uakur = 0.00496;
uikur=0.985694901379158; % uikur = 0.999;
Irel=0.0;
y=0.0;
%***************************************
Kup=0.00092; % Kmup = 0.00092 % Half-saturation concentration of iup kmup
Caupmax=15.0; % G_NSRleak = 15; % /* Max. [Ca] in Caup (mM) */
Krel=30.0; % G_JSRrel = 30 % /* Rate constant of Ca release from Carel due to overload (ms^-1)*/
Csqnmax=10.0; % G_csqn = 10 % /* Max. [Ca] buffered in CSQN (mM)*/
Kmcsqn=0.8; % Kmcsqn = 0.8 % /* Equalibrium constant of buffering for CSQN (mM)*/
Tautr = 180.0; % tau_tr = 180 % /* Time constant of Ca transfer from Caup to Carel (ms)*/
Cmdnmax=0.050; % G_cmdn = 0.050 % /* Max. [Ca] buffered in CMDN (mM) */
Trpnmax=0.070; % G_trpn = 0.070 % /* Max. [Ca] buffered in TRPN (mM) */
Kmcmdn=0.00238; % Kmcmdn = 0.00238 % /* Equalibrium constant of buffering for CMDN (mM) */
Kmtrpn=0.0005; % Kmtrpn = 0.0005 % /* Equalibrium constant of buffering for TRPN (mM) */
%**************************************************************************
Ach=0.0; % ach = 0.0 % const double ach = 0.0; /* Acetylcholine concentration */
Kmna=87.50; % kmnancx = 87.5; % /* Na saturation constant for NaCa exchanger */
Ksat=0.1; % ksatncx = 0.1; % /* Saturation factor for NaCa exchanger */
Kmca=1.38; % Kmcancx = 1.38 % /* Ca saturation factor for NaCa exchanger */
gammas=0.35; % gammas = 0.35 % /* Position of energy barrier controlling voltage dependance of inaca */
%**************************************************************************
%*************************************************************************
Kmnai=10.0; % Kmnai = 10 % /* Half-saturation concentration of NaK pump (mM) */
Kmko=1.5; % Kmko = 1.5 % /* Half-saturation concentration of NaK pump (mM) */
Kmpca=0.0005; % Kmpca = 0.0005 % /* Half-saturation concentration of sarcolemmal Ca pump (mM) */
%gNa=7.8; % G_Na = 7.8;
gTo=0.1652; % G_To1 = 0.1652;
gKr=0.0294; % G_Kr = 0.0294;
gKs=0.12941176; % G_ks = 0.129;
gKach=0.135; % G_Kach = 0.135;
Gcal=0.1238; % G_CaL = 0.1238 % Maximal ICa,L conductance
gKi=0.09; % G_K1 = 0.09
gbNa=0.0006744375; % G_NaB = 0.000674;
gbCa=0.001131; % G_CaB = 0.00113;
Ipcamax=0.275; % G_CaP = 0.275; % /* Max. Ca current through sarcolemmal Ca pump (uA/uF) */
Inakmax=0.59933874; % G_NaK = 0.6 % /* Max. current through Na-K pump (uA/uF) */ zzh (1.0933)
Iupmax=0.005; % G_JSRup = 0.005 % Max. current through iup channel (mM/ms) iupbar
%gsusmax=0.18; % 新加的
% INitial Conditions
Carel=1.65951050783633; % JSRi=1.49;
Caup=1.69624913718951; % NSRi=1.49; zzhg
urel=0.00; % uuJrel=0.00;
vrel=1.00000000000000; % uvJrel=1.00;
wrel=0.999209945059219; % uwJrel=0.999;
yach=4.092183820454861E-002; % xkach=0.0254;
Trpn_Cai=0.0118;
Cmdn_Cai=0.00205;
Csqn_Cai=6.51;
boolien=1; % zzh
%utsc=50;
%iky=0.6;
dt=udt;
i=-1;
is=1;
is0=1;
%***********************************************************************
if(SNPN==1)
spNa=1.0;%0.06;
gNa=0;
spCal=0.68;
spto=0.40;
spKur=0.26;
spKr=0.45;
spKs=0.69;
spKi=0.37;
spNaca=0.74;
spSRrel=0.31;
spSRup=0.30;
d_T=0.99988473099370; % zzh 0.106;
f_T=2.4205561901364e-05; % zzh 0.119;
gCaT=0.214;%2.14e-3; % zzh 张氏兔子c % zzh e-4
% gf=75.0e-3;
% gbNa=0.0006744375;
% gbCa=0.001131;
% gKach=0.135;
else
spNa=0.49;
gNa=7.8;
spCal=0.68*0.510/0.197;
spto=0.40*0.329/0.144;
spKur=0.26;
spKr=0.45*0.589/0.101;
spKs=0.69*0.129/0.014;
spKi=0.37;
spNaca=0.74;
spSRrel=0.31;
spSRup=0.30;
d_T=0.01725;
f_T=0.436;
gCaT=0.214;%6.94e-3; % zzh 张氏兔子p
% gf=75.0e-3*0.105/0.022;
% gbNa=0.0006744375*0.341/1.343;
% gbCa=0.001131*2.248/2.225;
% gKach=0.135*1.341/1.343;
end
%**********************************************************************
gNa=gNa*spNa;
gKr=gKr*s