0% found this document useful (0 votes)
42 views25 pages

%steel Input%

This code performs nonlinear analysis of reinforced concrete columns subjected to axial load and bending moment. It contains functions to calculate: 1) Strain distribution along the column based on applied axial strain 2) Axial load and moment capacity of unconfined concrete cover 3) Axial load and moment capacity of confined concrete core 4) Axial force and moment contribution of reinforcing steel The main code loops through increasing axial strain values, calls the above functions to calculate load-moment values at different locations along the column, and plots the resulting interaction diagram. Additional functions are included to model the behavior of reinforcing steel under tension and compression.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views25 pages

%steel Input%

This code performs nonlinear analysis of reinforced concrete columns subjected to axial load and bending moment. It contains functions to calculate: 1) Strain distribution along the column based on applied axial strain 2) Axial load and moment capacity of unconfined concrete cover 3) Axial load and moment capacity of confined concrete core 4) Axial force and moment contribution of reinforcing steel The main code loops through increasing axial strain values, calls the above functions to calculate load-moment values at different locations along the column, and plots the resulting interaction diagram. Additional functions are included to model the behavior of reinforcing steel under tension and compression.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

clear all;clc

clear;
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);

Ec=57000*sqrt(Fc);
Esec=Fc/Eco;
r=Ec/(Ec-Esec);

ST=(0:1:6)*10.^-3;
Ac=316;
Pc1=zeros(10000,1);
%Steel input%
Es=29000000;
Fy=60000;
Fu=100000;
Ey=0.002;
Esh=0.013;
Esu=0.09;
Eru=0.18;
Fsh=Fy+(Esh-Ey)*0.015*Es;
As=8;
Asc=3;
Ast=3;
b=1;
k=1;
d1=2.5;
d=15.5;
h=18;
n=zeros(200,1);
m=zeros(200,1);
a=zeros(200,1);
Pn1=zeros(200,1);
Mn1=zeros(200,1);
Pn=zeros(200,1);
Mn=zeros(200,1);

en=zeros(200,1);
j=zeros(200,1);

A=316;
scc=4;
dtr=(4/8);
dlong=9/8;
sclr=scc-dtr;
bc=15-dtr;
dc=15-dtr;
io=zeros(200);
Aconf=(bc*dc);
pcc=(As/(bc*dc));
w1= (15-2*dtr-3*dlong)/2;
ke=((1-((8*w1^2)/(6*bc*dc)))*(1-(sclr/(2*bc)))^2)/(1-pcc);
Asx=2*.785*dtr^2;
fl1=(ke*(Asx/(scc*dc)))*Fy;
Fcc1=Fc*(-1.254+2.254*sqrt(1+(7.94*fl1/Fc))-2*fl1/Fc);
Px=Asx/(scc*bc);
Ecu=0.004+0.14*2*Px*(Fy/Fc);
Ecc=Eco*(1+5*(Fcc1/Fc-1));
Esec1=Fcc1/Ecc;
r1=Ec/(Ec-Esec1);
A1=A-Aconf;
j1=120;

t=10;
g=h/t;
b=1;
o=zeros(100);
fconc= zeros(200,1);
fstl = zeros(200,1);

Pn(1,1)= Fc*Ac+ Fy*As;


Mn(1,1)=0;
for ei=-0.0034:0.0001:0
for j=1:1:10
di(j)= 0.9*(2*j-1);
io= strainlay(di(j),ei)
strain(b,j)=io;
if di(j)==0.9 || di(j)==17.1
[k,l]= cover(di(j),io)
Pn(b,j)=k;
Mn(b,j)=l;

else

[k,l] =confined(di(j),io)
Pn(b,j)=k;
Mn(b,j)=l;
end

if di(j)==2.7 || di(j)==8.1 || di(j)==17.1


[k1,l1] =strsteel(di(j),io)
Pn(b,j)= Pn(b,j)+ k1;
Mn(b,j)= Mn(b,j)+l1;

end
Pn1(b)=sum (Pn(b,j));
Mn1(b)=sum (Mn(b,j));

b=b+1;
end
plot(Mn1,Pn1)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function str = strainlay(o,e)

h=18;
str= (((e+0.0035)/h)*o)-0.0035;
end

function [fc, Mom ] = cover(o,ei)


Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);
Acover=1.8*18;

fc=(Fc-s*(ei-ec0));
Fc=fc*Acover;
Mom=fc*o;

end

function [fcc, Mom ] = confined(o,ei)


Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);

Ec=57000*sqrt(Fc);
Esec=Fc/Eco;
r=Ec/(Ec-Esec);

ST=(0:1:6)*10.^-3;
Ac=316;
Pc1=zeros(10000,1);
%Steel input%
Es=29000000;
Fy=60000;
Fu=100000;
Ey=0.002;
Esh=0.013;
Esu=0.09;
Eru=0.18;
Fsh=Fy+(Esh-Ey)*0.015*Es;
As=8;
Asc=3;
Ast=3;
b=1;
k=1;
d1=2.5;
d=15.5;
h=18;

A=316;
scc=4;
dtr=(4/8);
dlong=9/8;
sclr=scc-dtr;
bc=15-dtr;
dc=15-dtr;
io=zeros(200);

Aconf=(bc*dc);
pcc=(As/(bc*dc));
w1= (15-2*dtr-3*dlong)/2;
ke=((1-((8*w1^2)/(6*bc*dc)))*(1-(sclr/(2*bc)))^2)/(1-pcc);
Asx=2*.785*dtr^2;
fl1=(ke*(Asx/(scc*dc)))*Fy;
Fcc1=Fc*(-1.254+2.254*sqrt(1+(7.94*fl1/Fc))-2*fl1/Fc);
Px=Asx/(scc*bc);
Ecu=0.004+0.14*2*Px*(Fy/Fc);
Ecc=Eco*(1+5*(Fcc1/Fc-1));
Esec1=Fcc1/Ecc;
r1=Ec/(Ec-Esec1);
A1=A-Aconf;
j1=120;
x=ei/Ecc;
fci= (Fcc1*x*r1)/(r1-1+x^r1);
fcc=fci;
Mom=fcc*o;
end

function [Fs,Mom] = strsteel(o,ei)


Es=29000000;

fs=ei*Es;
if(o==2.7 || o==17.1)
Fs=fs*3;
Mom=Fs*o;
else
Fs=fs*3;
Mom=Fs*o;

end
end
Code 1
clear all;clc
clear;
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);

Ec=57000*sqrt(Fc);
Esec=Fc/Eco;
r=Ec/(Ec-Esec);

ST=(0:1:6)*10.^-3;
Ac=316;
Pc1=zeros(10000,1);
%Steel input%
Es=29000000;
Fy=60000;
Fu=100000;
Ey=0.002;
Esh=0.013;
Esu=0.09;
Eru=0.18;
Fsh=Fy+(Esh-Ey)*0.015*Es;
As=8;
Asc=3;
Ast=3;
b=1;
k=1;
d1=2.5;
d=15.5;
h=18;
n=zeros(200,1);
m=zeros(200,1);
a=zeros(200,1);
Pn1=zeros(200,1);
Mn1=zeros(200,1);
Pn=zeros(200,1);
Mn=zeros(200,1);

en=zeros(200,1);
j=zeros(200,1);
A=316;
scc=4;
dtr=(4/8);
dlong=9/8;
sclr=scc-dtr;
bc=15-dtr;
dc=15-dtr;
io=zeros(200);
t=10;
g=h/t;
b=1;
o=zeros(100);
fconc= zeros(200,1);
fstl = zeros(200,1);

Pn(1,1)= Fc*Ac+ Fy*As;


Mn(1,1)=0;
for ei=-0.0034:0.0001:0
for j=1:1:10
di(j)= 0.9*(2*j-1);
io= strainlay(di(j),ei)
strain(b,j)=io;
if di(j)==0.9 || di(j)==17.1
[k,l]= coverc(di(j),io)
Pn(b,j)=k;
Mn(b,j)=l;
else

[k,l] =confined(di(j),io)
Pn(b,j)=k;
Mn(b,j)=l;

end
if di(j)==2.7 || di(j)==8.1 || di(j)==17.1
[k1,l1] =strsteel(di(j),io)
Pn(b,j)= Pn(b,j)+ k1;
Mn(b,j)= Mn(b,j)+l1;

end

Pn1(b)=sum (Pn(b,j));
Mn1(b)=sum (Mn(b,j));

end
b=b+1;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for ei=0:0.0001:0.0138

for j=1:1:10
di(j)= 0.9*(2*j-1);
io= strainlay(di(j),ei)
strain(b,j)=io;
if di(j)==0.9
[k,l]= coverc(di(j),io)
Pn(b,j)=k;
Mn(b,j)=l;
else

[k,l] =confined2(di(j),io)
Pn(b,j)=k;
Mn(b,j)=l;
end
if di(j)==2.7 || di(j)==8.1 || di(j)==17.1
[k1,l1] =strsteel1(di(j),io)
Pn(b,j)= Pn(b,j)+ k1;
Mn(b,j)= Mn(b,j)+l1;
end

Pn1(b)=sum (Pn(b,j));
Mn1(b)=sum (Mn(b,j));

end
b=b+1;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function str = strainlay(o,e)

h=18;
str= (((e+0.0035)/h)*o)-0.0035;
end

function [fc, Mom] = coverc(o,ei)

ei=abs(ei);
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);
Acover=1.8*18;

fc=(Fc-s*(ei-ec0));
fc=fc*Acover;
Mom=fc*o;
end

function [fcc, Mom ] = confined(o,ei)


ei=abs(ei);
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);

Ec=57000*sqrt(Fc);
Esec=Fc/Eco;
r=Ec/(Ec-Esec);

ST=(0:1:6)*10.^-3;
Ac=316;
Pc1=zeros(10000,1);
%Steel input%
Es=29000000;
Fy=60000;
Fu=100000;
Ey=0.002;
Esh=0.013;
Esu=0.09;
Eru=0.18;
Fsh=Fy+(Esh-Ey)*0.015*Es;
As=8;
Asc=3;
Ast=3;
b=1;
k=1;
d1=2.5;
d=15.5;
h=18;

A=316;
scc=4;
dtr=(4/8);
dlong=9/8;
sclr=scc-dtr;
bc=15-dtr;
dc=15-dtr;
io=zeros(200);

Aconf=(bc*dc);
pcc=(As/(bc*dc));
w1= (15-2*dtr-3*dlong)/2;
ke=((1-((8*w1^2)/(6*bc*dc)))*(1-(sclr/(2*bc)))^2)/(1-pcc);
Asx=2*.785*dtr^2;
fl1=(ke*(Asx/(scc*dc)))*Fy;
Fcc1=Fc*(-1.254+2.254*sqrt(1+(7.94*fl1/Fc))-2*fl1/Fc);
Px=Asx/(scc*bc);
Ecu=0.004+0.14*2*Px*(Fy/Fc);
Ecc=Eco*(1+5*(Fcc1/Fc-1));
Esec1=Fcc1/Ecc;
r1=Ec/(Ec-Esec1);
A1=A-Aconf;
j1=120;
x=ei/Ecc;
fci= (Fcc1*x*r1)/(r1-1+x^r1);
fcc=fci;
Mom=fcc*o;
end

function [fcc, Mom ] = confined2(o,ei)


z=ei;
ei=abs(ei);
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);

Ec=57000*sqrt(Fc);
Esec=Fc/Eco;
r=Ec/(Ec-Esec);

ST=(0:1:6)*10.^-3;
Ac=316;
Pc1=zeros(10000,1);
%Steel input%
Es=29000000;
Fy=60000;
Fu=100000;
Ey=0.002;
Esh=0.013;
Esu=0.09;
Eru=0.18;
Fsh=Fy+(Esh-Ey)*0.015*Es;
As=8;
Asc=3;
Ast=3;
b=1;
k=1;
d1=2.5;
d=15.5;
h=18;

A=316;
scc=4;
dtr=(4/8);
dlong=9/8;
sclr=scc-dtr;
bc=15-dtr;
dc=15-dtr;
io=zeros(200);

Aconf=(bc*dc);
pcc=(As/(bc*dc));
w1= (15-2*dtr-3*dlong)/2;
ke=((1-((8*w1^2)/(6*bc*dc)))*(1-(sclr/(2*bc)))^2)/(1-pcc);
Asx=2*.785*dtr^2;
fl1=(ke*(Asx/(scc*dc)))*Fy;
Fcc1=Fc*(-1.254+2.254*sqrt(1+(7.94*fl1/Fc))-2*fl1/Fc);
Px=Asx/(scc*bc);
Ecu=0.004+0.14*2*Px*(Fy/Fc);
Ecc=Eco*(1+5*(Fcc1/Fc-1));
Esec1=Fcc1/Ecc;
r1=Ec/(Ec-Esec1);
A1=A-Aconf;
j1=120;
x=ei/Ecc;
fci= (Fcc1*x*r1)/(r1-1+x^r1);
if z<=0
fcc=fci;
Mom=fcc*o;

else
fcc=0;
Mom=fcc*o;
end
end

function [Fs,Mom] = strsteel(o,ei)


Es=29000000;
ei=abs(ei);

fs=ei*Es;
if(o==2.7 || o==17.1)
Fs=fs*3;
Mom=Fs*o;
else
Fs=fs*2;
Mom=Fs*o;

end
end

function [Fs,Mom] = strsteel1(o,ei)


Es=29000000;
fy=0.00207;
z=ei;
ei=abs(ei);

fs=ei*Es;
if z<=0
Fs=fs*3;
Mom=Fs*o;
Elseif z>0 && z<0.00207
Fs=fs*3*-1;
Mom=Fs*o;
else
Fs=fy*Es*3*-1;
Mom=Fs*o;
end

end

Code 3
clear all;clc
clear;
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);

Ec=57000*sqrt(Fc);
Esec=Fc/Eco;
r=Ec/(Ec-Esec);

ST=(0:1:6)*10.^-3;
Ac=316;
Pc1=zeros(10000,1);
%Steel input%
Es=29000000;
Fy=60000;
Fu=100000;
Ey=0.002;
Esh=0.013;
Esu=0.09;
Eru=0.18;
Fsh=Fy+(Esh-Ey)*0.015*Es;
As=8;
Asc=3;
Ast=3;
b=1;
k=1;
d1=2.5;
d=15.5;
h=18;
n=zeros(200,1);
m=zeros(200,1);
a=zeros(200,1);
Pn1=zeros(200,1);
Mn1=zeros(200,1);
Pn=zeros(200,1);
Mn=zeros(200,1);

en=zeros(200,1);
j=zeros(200,1);

A=316;
scc=4;
dtr=(4/8);
dlong=9/8;
sclr=scc-dtr;
bc=15-dtr;
dc=15-dtr;
io=zeros(200);
t=10;
g=h/t;
b=1;
o=zeros(100);
fconc= zeros(200,1);
fstl = zeros(200,1);

Pn(1,1)= Fc*Ac+ Fy*As;


Mn(1,1)=0;
for ei=-0.0034:0.0001:0
for j=1:1:10
di(j)= 0.9*(2*j-1);
io= strainlay(di(j),ei)
strain(b,j)=io;
if di(j)==0.9 || di(j)==17.1
[k,l]= coverc(di(j),io)
Pn(b,j)=k;
Mn(b,j)=l;
else

[k,l] =confined(di(j),io)
Pn(b,j)=k;
Mn(b,j)=l;

end
if di(j)==2.7 || di(j)==8.1 || di(j)==17.1
[k1,l1] =strsteel(di(j),io)
Pn(b,j)= Pn(b,j)+ k1;
Mn(b,j)= Mn(b,j)+l1;

end

Pn1(b)=sum (Pn(b,j));
Mn1(b)=sum (Mn(b,j));
Mn1(b)= Mn1(b)-Pn1(b)*(h/2);

end
b=b+1;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

for ei=0:0.0001:0.138

for j=1:1:10
di(j)= 0.9*(2*j-1);
io= strainlay(di(j),ei)
strain(b,j)=io;
if di(j)==0.9
[k,l]= coverc(di(j),io)
Pn(b,j)=k;
Mn(b,j)=l;
else

[k,l] = confined2(di(j),io)
Pn(b,j)=k;
Mn(b,j)=l;
end
if di(j)==2.7 || di(j)==8.1 || di(j)==17.1
[k1,l1] = strsteel1(di(j),io)
Pn(b,j)= Pn(b,j)+ k1;
Mn(b,j)= Mn(b,j)+l1;
end

Pn1(b)=sum (Pn(b,j));
Mn1(b)=sum (Mn(b,j));
Mn1(b)= Mn1(b)-Pn1(b)*(h/2);

end
b=b+1;
end
plot(Mn1,Pn1)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function str = strainlay(o,e)

h=18;
str= (((e+0.0035)/h)*o)-0.0035;
end

function [fc, Mom] = coverc(o,ei)

ei=abs(ei);
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);
Fcp=4500;
Eco=0.002;
Esec=Fcp/Eco;
Ec=57000*sqrt(Fcp);
r=Ec/(Ec-Esec);

Acover=1.8*18;
if ei>=0.002

fc=(Fc-s*(ei-ec0));
fc=fc*Acover;
Mom=fc*o;
else
fc=(Fcp*r*(a/Eco))/(r-1+((a/Eco)^r));
fc=fc*Acover;
Mom=fc*o;
end

end

function [fcc, Mom ] = confined(o,ei)


ei=abs(ei);
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);

Ec=57000*sqrt(Fc);
Esec=Fc/Eco;
r=Ec/(Ec-Esec);

Ac=316;
Pc1=zeros(10000,1);
%Steel input%
Es=29000000;
Fy=60000;
Fu=100000;
Ey=0.002;
Esh=0.013;
Esu=0.09;
Eru=0.18;
Fsh=Fy+(Esh-Ey)*0.015*Es;
As=8;
Asc=3;
Ast=3;
b=1;
k=1;
d1=2.5;
d=15.5;
h=18;

A=316;
scc=4;
dtr=(4/8);
dlong=9/8;
sclr=scc-dtr;
bc=15-dtr;
dc=15-dtr;
Aconf=(bc*dc);
pcc=(As/(bc*dc));
w1= (15-2*dtr-3*dlong)/2;
ke=((1-((8*w1^2)/(6*bc*dc)))*(1-(sclr/(2*bc)))^2)/(1-pcc);
Asx=2*.785*dtr^2;
fl1=(ke*(Asx/(scc*dc)))*Fy;
Fcc1=Fc*(-1.254+2.254*sqrt(1+(7.94*fl1/Fc))-2*fl1/Fc);
Px=Asx/(scc*bc);
Ecu=0.004+0.14*2*Px*(Fy/Fc);
Ecc=Eco*(1+5*(Fcc1/Fc-1));
Esec1=Fcc1/Ecc;
r1=Ec/(Ec-Esec1);
A1=A-Aconf;
j1=120;
x=ei/Ecc;
fci= (Fcc1*x*r1)/(r1-1+x^r1);
fcc=fci*1.8*18;
Mom=fcc*o;
end

function [fcc, Mom ] = confined2(o,ei)


z=ei;
ei=abs(ei);
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);

Ec=57000*sqrt(Fc);
Esec=Fc/Eco;
r=Ec/(Ec-Esec);

Ac=316;
Pc1=zeros(10000,1);
%Steel input%
Es=29000000;
Fy=60000;
Fu=100000;
Ey=0.002;
Esh=0.013;
Esu=0.09;
Eru=0.18;
Fsh=Fy+(Esh-Ey)*0.015*Es;
As=8;
Asc=3;
Ast=3;
b=1;
k=1;
d1=2.5;
d=15.5;
h=18;
A=316;
scc=4;
dtr=(4/8);
dlong=9/8;
sclr=scc-dtr;
bc=15-dtr;
dc=15-dtr;
io=zeros(200);

Aconf=(bc*dc);
pcc=(As/(bc*dc));
w1= (15-2*dtr-3*dlong)/2;
ke=((1-((8*w1^2)/(6*bc*dc)))*(1-(sclr/(2*bc)))^2)/(1-pcc);
Asx=2*.785*dtr^2;
fl1=(ke*(Asx/(scc*dc)))*Fy;
Fcc1=Fc*(-1.254+2.254*sqrt(1+(7.94*fl1/Fc))-2*fl1/Fc);
Px=Asx/(scc*bc);
Ecu=0.004+0.14*2*Px*(Fy/Fc);
Ecc=Eco*(1+5*(Fcc1/Fc-1));
Esec1=Fcc1/Ecc;
r1=Ec/(Ec-Esec1);
A1=A-Aconf;
j1=120;
x=ei/Ecc;
fci= (Fcc1*x*r1)/(r1-1+x^r1);
if z<=0
fcc=fci*1.8*18;
Mom=fcc*o;

else
fcc=0;
Mom=fcc*o;
end
end

function [Fs,Mom] = strsteel(o,ei)


Es=29000000;
ei=abs(ei);

fs=ei*Es;
if(o==2.7 || o==17.1)
Fs=fs*3;
Mom=Fs*o;
else
Fs=fs*2;
Mom=Fs*o;

end
end

function [Fs,Mom] = strsteel1(o,ei)


Es=29000000;
fy=0.00207;
z=ei;
ei=abs(ei);

fs=ei*Es;
if z<=0
Fs=fs*3;
Mom=Fs*o;
elseif z>0 && z<0.00207
Fs=fs*3*-1;
Mom=Fs*o;
else
Fs=fy*Es*3*-1;
Mom=Fs*o;
end

end

Code 4
clear all;clc
clear;
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);

Ec=57000*sqrt(Fc);
Esec=Fc/Eco;
r=Ec/(Ec-Esec);

ST=(0:1:6)*10.^-3;
Ac=316;
Pc1=zeros(10000,1);
%Steel input%
Es=29000000;
Fy=60000;
Fu=100000;
Ey=0.002;
Esh=0.013;
Esu=0.09;
Eru=0.18;
Fsh=Fy+(Esh-Ey)*0.015*Es;
As=8;
Asc=3;
Ast=3;
b=1;
k=1;
d1=2.5;
d=15.5;
h=18;
n=zeros(200,1);
m=zeros(200,1);
a=zeros(200,1);
Pn1=zeros(200,1);
Mn1=zeros(200,1);
Pn=zeros(200,1);
Mn=zeros(200,1);

en=zeros(200,1);
j=zeros(200,1);

A=316;
scc=4;
dtr=(4/8);
dlong=9/8;
sclr=scc-dtr;
bc=15-dtr;
dc=15-dtr;
io=zeros(200);
t=10;
g=h/t;
b=1;
o=zeros(100);
fconc= zeros(200,1);
fstl = zeros(200,1);

Pn(1,1)= Fc*Ac+ Fy*As;


Mn(1,1)=0;
for ei=-0.0034:0.0001:0
for j=1:1:10
di(j)= 0.9*(2*j-1);
io= strainlay(di(j),ei);
strain(b,j)=io;
if di(j)==0.9 || di(j)==17.1
[k,l]= coverc(di(j),io);
Pn(b,j)=k;
Mn(b,j)=l;
else

[k,l] =confined(di(j),io);
Pn(b,j)=k;
Mn(b,j)=l;

end
if di(j)==2.7 || di(j)==8.1 || di(j)==17.1
[k1,l1] =strsteel(di(j),io);
Pn(b,j)= Pn(b,j)+ k1;
Mn(b,j)= Mn(b,j)+l1;

end

Pn1(b)=sum (Pn(b,j));
Mn1(b)=sum (Mn(b,j));
Mn1(b)= Mn1(b)-Pn1(b)*(h/2);

end
b=b+1;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

for ei=0:0.0001:0.138

for j=1:1:10
di(j)= 0.9*(2*j-1);
io= strainlay(di(j),ei)
strain(b,j)=io;
if di(j)==0.9
[k,l]= coverc(di(j),io)
Pn(b,j)=k;
Mn(b,j)=l;
else

[k,l] = confined2(di(j),io)
Pn(b,j)=k;
Mn(b,j)=l;
end
if di(j)==2.7 || di(j)==8.1 || di(j)==17.1
[k1,l1] = strsteel1(di(j),io)
Pn(b,j)= Pn(b,j)+ k1;
Mn(b,j)= Mn(b,j)+l1;
end

Pn1(b)=sum (Pn(b,j));
Mn1(b)=sum (Mn(b,j));
Mn1(b)= Mn1(b)-Pn1(b)*(h/2);

end
b=b+1;
end
plot(Mn1,Pn1)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function str = strainlay(o,e)

h=18;
str= (((e+0.0035)/h)*o)-0.0035;
end

function [fc, Mom] = coverc(o,ei)

ei=abs(ei);
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);
Fcp=4500;
Eco=0.002;
Esec=Fcp/Eco;
Ec=57000*sqrt(Fcp);
r=Ec/(Ec-Esec);

Acover=1.8*18;
if ei>=0.002

fc=(Fc-s*(ei-ec0));
fc=fc*Acover;
Mom=fc*o;
else
fc=(Fcp*r*(ei/Eco))/(r-1+((ei/Eco)^r));
fc=fc*Acover;
Mom=fc*o;
end
end

function [fcc, Mom ] = confined(o,ei)


ei=abs(ei);
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);

Ec=57000*sqrt(Fc);
Esec=Fc/Eco;
r=Ec/(Ec-Esec);

Ac=316;
Pc1=zeros(10000,1);
%Steel input%
Es=29000000;
Fy=60000;
Fu=100000;
Ey=0.002;
Esh=0.013;
Esu=0.09;
Eru=0.18;
Fsh=Fy+(Esh-Ey)*0.015*Es;
As=8;
Asc=3;
Ast=3;
b=1;
k=1;
d1=2.5;
d=15.5;
h=18;

A=316;
scc=4;
dtr=(4/8);
dlong=9/8;
sclr=scc-dtr;
bc=15-dtr;
dc=15-dtr;

Aconf=(bc*dc);
pcc=(As/(bc*dc));
w1= (15-2*dtr-3*dlong)/2;
ke=((1-((8*w1^2)/(6*bc*dc)))*(1-(sclr/(2*bc)))^2)/(1-pcc);
Asx=2*.785*dtr^2;
fl1=(ke*(Asx/(scc*dc)))*Fy;
Fcc1=Fc*(-1.254+2.254*sqrt(1+(7.94*fl1/Fc))-2*fl1/Fc);
Px=Asx/(scc*bc);
Ecu=0.004+0.14*2*Px*(Fy/Fc);
Ecc=Eco*(1+5*(Fcc1/Fc-1));
Esec1=Fcc1/Ecc;
r1=Ec/(Ec-Esec1);
A1=A-Aconf;
j1=120;
x=ei/Ecc;
fci= (Fcc1*x*r1)/(r1-1+x^r1);
fcc=fci*1.8*18;
Mom=fcc*o;
end

function [fcc, Mom ] = confined2(o,ei)


z=ei;
ei=abs(ei);
Fc=4500;
ec0=0.002;
Eco=0.002;
e50=(3+0.002*Fc)/(Fc-1000);
s=(Fc-0.5*Fc)/(e50-0.002);

Ec=57000*sqrt(Fc);
Esec=Fc/Eco;
r=Ec/(Ec-Esec);

Ac=316;
Pc1=zeros(10000,1);
%Steel input%
Es=29000000;
Fy=60000;
Fu=100000;
Ey=0.002;
Esh=0.013;
Esu=0.09;
Eru=0.18;
Fsh=Fy+(Esh-Ey)*0.015*Es;
As=8;
Asc=3;
Ast=3;
b=1;
k=1;
d1=2.5;
d=15.5;
h=18;

A=316;
scc=4;
dtr=(4/8);
dlong=9/8;
sclr=scc-dtr;
bc=15-dtr;
dc=15-dtr;
io=zeros(200);

Aconf=(bc*dc);
pcc=(As/(bc*dc));
w1= (15-2*dtr-3*dlong)/2;
ke=((1-((8*w1^2)/(6*bc*dc)))*(1-(sclr/(2*bc)))^2)/(1-pcc);
Asx=2*.785*dtr^2;
fl1=(ke*(Asx/(scc*dc)))*Fy;
Fcc1=Fc*(-1.254+2.254*sqrt(1+(7.94*fl1/Fc))-2*fl1/Fc);
Px=Asx/(scc*bc);
Ecu=0.004+0.14*2*Px*(Fy/Fc);
Ecc=Eco*(1+5*(Fcc1/Fc-1));
Esec1=Fcc1/Ecc;
r1=Ec/(Ec-Esec1);
A1=A-Aconf;
j1=120;
x=ei/Ecc;
fci= (Fcc1*x*r1)/(r1-1+x^r1);
if z<=0
fcc=fci*1.8*18;
Mom=fcc*o;

else
fcc=0;
Mom=fcc*o;
end
end

function [Fs,Mom] = strsteel(o,ei)


Es=29000000;
ei=abs(ei);

fs=ei*Es;
if(o==2.7 || o==17.1)
Fs=fs*3;
Mom=Fs*o;
else
Fs=fs*2;
Mom=Fs*o;

end
end

function [Fs,Mom] = strsteel1(o,ei)


Es=29000000;
fy=0.00207;
z=ei;
ei=abs(ei);

fs=ei*Es;
if z<=0
Fs=fs*3;
Mom=Fs*o;
elseif z>0 && z<0.00207
Fs=fs*3*-1;
Mom=Fs*o;
else
Fs=fy*Es*3*-1;
Mom=Fs*o;
end

end

You might also like