Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

8/10/23 9:18 PM C:\Users\Best Lap\Desktop\...\column.

m 1 of 2

clc;
clear all;

fid=fopen('column.txt','w');
fprintf(fid,'Design of columns');
fprintf(fid,'\n----------------');

%inputs
Dx=input('\n Enter the lateral dimension 1 (mm) = ');
Dy=input('\n Enter the lateral dimension 2 (mm) = ');
l=input('\n Enter the unsupported length of column (m) = ' );
w=input('\n Enter the axial load over the column (kN) = ' );
fck=input('\n Enter the grade of concrete used (N/sq.mm) = ' );
fy=input('\n Enter the grade of steel used (N/sq.mm) = ' );
d1=input('\n Enter the diameter of compression reinforcement (mm) = ' );

%slenderness ratio
sl1=l*1000/Dx;
sl2=l*1000/Dy;

if (sl1<12 && sl2<12)


fprintf(fid,'\n The given column is a short column');
ex=l/500+Dx/30;
ey=l/500+Dy/30;
m1=0.05*Dx;
m2=0.05*Dy;
if (m1>ex && m2>ey) %min eccentricity
fprintf(fid,'\n\n The code formula for axially loaded column can be used' );
else
fprintf(fid,'\n\n The code formula for axially loaded column cannot be
used');
end
Pu=1.5*w;
Asc=(Pu*1000-(.4*fck*Dx*Dy))/(0.67*fy-0.4*fck); %area of compression steel
fprintf(fid,'\n\n Area of steel required in compression= %6.3f sq.mm' ,Asc);
n=ceil((4*Asc)/(pi*d1^2));
fprintf(fid,'\n\n Number of compression reinforcement provided = %6.1f sq.mm' ,
n);

Ascp=(n*pi*d1^2)/4; % area of compression steel provided


fprintf(fid,'\n\n Area of compression reinforcement provided = %6.3f sq.mm' ,
Ascp);
p=(100*Ascp)/(Dx*Dy);

if(p>0.8)
fprintf(fid,'\n\n The design is OK');
else
fprintf(fid,'\n\n Redidesign');
end

else
fprintf(fid,'\n\n The given column is long column');
8/10/23 9:18 PM C:\Users\Best Lap\Desktop\...\column.m 2 of 2

end

d2=max(d1/4,6); % design for dia of lateral ties

if (d2==6)
fprintf(fid,'\n\n Diameter of laetral ties = 6 mm');
elseif (d2<=8)
fprintf(fid,'\n\n Diameter of lateral ties = 8 mm');
else
fprintf(fid,'\n\n Diameter of lateral ties = 10 mm');
end

s1=min(Dx,Dy); % design for spacing of lateral ties


s2=min(s1,16*d1);
if (s2>300)
fprintf(fid,'\n\n Spacing provided for the lateral ties = 300 mm' );
else
fprintf(fid,'\n\n Spacing provided for the lateral ties = %6.3f mm' ,s2-rem(s2,
10));
end

You might also like