You are on page 1of 4

2/10/23 10:10 PM C:\Users\Best Lap\Desktop\M...\slab.

m 1 of 4

clc;
clear all;

fprintf('\n Design of Slab');


fprintf('\n --------------');

%Inputs
Lx=input('\n Enter the shorter span dimension (m) = ' );
Ly=input('\n Enter the larger span dimension (m) = ');
Fck=input('\n Enter the compressive strength of concrete (N/sq.mm) = ' );
Fy=input('\n Enter the yield strength of steel (N/sq.mm) = ' );
LL=input('\n Enter the live load(kN/sq.mm) = ');
FF=input('\n Enter the floor finish(kN/sq.mm) = ');
cc=input('\n Enter the clear cover of slab (mm) = ');
d1=input('\n Enter the diameter of the reinforcement (mm) = ' );

if ((Ly/Lx)>2) % Check for design


fprintf('\n Type 1 : Cantiliver span');
fprintf('\n Type 2 : Simply supported spans');
fprintf('\n Type 3 : Continous spans');
Fixity=input('\n\n Enter the type of slab (1/2/3) = ');

if (Fixity==1)
a=7;
elseif (Fixity==2)
a=20;
else
a=26;
end

else
fprintf('\n Type 1 : Simply supported slab');
fprintf('\n Type 2 : Continous slab');
Fixity=input('\n\n Enter the type of slab (1/2) = ');
if (Fixity==1)
a=30;
else
a=32;
end
end

d2=(Lx*1000)/a;
D1=(d2+cc+(d1/2))-rem((d2+cc+(d1/2)),10)+5;
D=max(D1,120);
fprintf('\n Total depth of the slab =%7.2f %12.2f',D);
SW=0.025*D;
TL=LL+FF+SW;
Wu=1.5*TL;
fprintf('\n\n The total factored load Wu (kN/sq.mm) =%7.2f %12.2f ' ,Wu);

dx=D-cc-(d1/2);
dy=dx-d1;
2/10/23 10:10 PM C:\Users\Best Lap\Desktop\M...\slab.m 2 of 4

lx=Lx+(dx/1000);
ly=Ly+(dy/1000);
r=(ly/lx);
fprintf('\n\n Aspect ratio, r =%7.2f %12.2f',r);

if (r>2) %Design for one way slab

fprintf('\n\n This is a Oneway slab');


Mu=(Wu*lx^2)/8;
R=(Mu*10^6/(1000*(dx)^2));
Ast=(Fck/(2*Fy))*(1-(1-(4.6*R/Fck))^0.5)*1000*dx;
if (Ast<(0.0012*1000*D))
fprintf('\n\n Area of main reinforcement required (sq.mm) =%7.2f %12.2f' ,
0.0012*1000*D);
else
fprintf('\n\n Area of main reinforcement required (sq.mm) =%7.2f %12.2f' ,
Ast);
end

s=(1000*pi*d1^2)/(4*Ast);
if (s<300)
fprintf('\n\n Spacing povided for the main reinforcement along shorter span
(mm) =%7.2f %12.2f ',s-rem(s,10));
else
fprintf('\n\n Spacing provided for the secondary reinforcement along longer
span (mm) = 300 ');
end

s1=5*dx;
if (s1<450)
fprintf('\n\n Spacing provided for the secondary reinforcement along longer
span (mm) =%7.2f %12.2f ',s1-rem(s1,10));
else
fprintf('\n\n Spacing provided for the secondary reinforcement along longer
span (mm) =450 ');
end

else

fprintf('\n\n This is a Two way slab'); %Design for two way slab

if (Fixity==1)
alpha_x=(0.125*r^4)/(1+r^4);
alpha_y=(0.125*r^2)/(1+r^4);
Mx=alpha_x*Wu*lx^2;
My=alpha_y*Wu*lx^2;
else
Nd=input('\n\n Enter the number of discontinous edges = ' );
alpha_y=((4/3)*(24+2*Nd+1.5*Nd^2))/1000;

fprintf('\n Type 1 : Interior panels');


fprintf('\n Type 2 : One short edge discontinous');
2/10/23 10:10 PM C:\Users\Best Lap\Desktop\M...\slab.m 3 of 4

fprintf('\n Type 3 : One long edge discontinous');


fprintf('\n Type 4 : Two adjacent edges discontinous' );
fprintf('\n Type 5 : Two short edges discontinous' );
fprintf('\n Type 6 : Two long edges discontinous');
fprintf('\n Type 7 : Three edges discontinous (One long edge continous)' );
fprintf('\n Type 8 : Three edges discontinous (One short edge continous)' );
fprintf('\n Type 9 : Four edges discontinous');

T=input('\n\n Enter the type of slab = ');

if(T==1)
As=3.055;
Al=3.055;
elseif(T==2)
As=2.528;
Al=3.055;
elseif(T==3)
As=3.055;
Al=2.528;
elseif(T==4)
As=2.528;
Al=2.528;
elseif(T==5)
As=2;
Al=3.055;
elseif(T==6)
As=3.055;
Al=2;
elseif(T==7)
As=2;
Al=2.528;
elseif(T==8)
As=2.528;
Al=2;
elseif(T==9)
As=2;
Al=2;
else
fprintf('\n Invalid input')
end

alpha_x=(8/27)*(3-(sqrt(18*alpha_y)*As)/r)/(Al);
Mx=alpha_x*Wu*lx^2;
My=alpha_y*Wu*lx^2;

end

Rx=(Mx*10^6)/(1000*(dx)^2);
Ry=(My*10^6)/(1000*(dy)^2);
Astrx=(Fck/(2*Fy))*(1-(1-(4.6*Rx/Fck))^0.5)*1000*dx;
fprintf('\n\n Area of reinforcement required in shorter span(sq.mm) =%7.2f %
12.2f ',Astrx);
2/10/23 10:10 PM C:\Users\Best Lap\Desktop\M...\slab.m 4 of 4

Astry=(Fck/(2*Fy))*(1-(1-(4.6*Ry/Fck))^0.5)*1000*dy;
fprintf('\n\n Area of reinforcement required in longer span(sq.mm) =%7.2f %12.2
f ',Astry);

Sx=(1000*pi*d1^2)/(4*Astrx);
Sy=(1000*pi*d1^2)/(4*Astry);

if(Sx>300)
s4=3*dx-rem((3*dx),10);
fprintf('\n\n Spacing povided for the main reinforcement in shorter span
(mm) =%7.2f %12.2f',min(300,s4));
else
fprintf('\n\n Spacing povided for the main reinforcement in shorter span
(mm) =%7.2f %12.2f',Sx-rem(Sx,10));
end

if(Sy>300)
s3=3*dx-rem((3*dx),10);
fprintf('\n\n Spacing povided for the main reinforcement in shorter span
(mm) =%7.2f %12.2f',min(300,s3));
else
fprintf('\n\n Spacing povided for the main reinforcement in shorter span
(mm) =%7.2f %12.2f',Sy-rem(Sy,10));
end
s4=Sx-rem(Sx,10);
Astxp=(785.4*d1^2)/s4;
d2=(dx+dy)/2;
Vu=Wu*(0.5*Lx-d2);
Tv=(Mx)/(d2);
fprintf('\n Nominal shear stress Tv(KN) =%7.2f %12.2f' ,Tv);
Pt=(Astxp)/(10*d2);
B=(0.8*Fck)/(6.89*Pt);
Tc=(0.85*((0.8*Fck)^0.5)*(((1+5*B)^0.5)-1))/(6*B);
fprintf('\n Shear strength of concrete Tc(KN) =%7.2f %12.2f' ,Tc);
fprintf('\n Here kTc>Tv. There for the design is safe in shear' );

end

You might also like