%DESIGN OF A SINGLY REINFORCED BEAM
%inputs
mu= input('enter the value of factored bending moment in KNm: '); %the unit should be KNm
fck= input('enter the compressive strength of concrete in N/sq.mm: '); %value of fck
fy= input('enter the yeild strength of steel in N/sq.mm (must be given as 415 for this code): '
D= input('enter the overall depth of the beam in mm: '); %value of D
d= input('enter the effective depth of the beam in mm: '); %value of d
b= input('enter the width of the beam in mm: '); %value of b
%calculation of mu_lim
mu_lim= (0.138*fck*b*(d^2))/(10^6); %10 to the power of 6 is for conversion of units
%comparision of values of mu and mu_lim
if mu < mu_lim
m = mu;
else
fprintf ('DESIGN A DOUBLE REINFORCED BEAM');
end
DESIGN A DOUBLE REINFORCED BEAM
%solving quadratic equation to get two values of Ast
A= ((0.87*(fy^2)*d)/(fck*b*d)); %coff A
B1= (-(0.87*fy*d)); %coff B
C= (m*(10^6)); %coff C
Ast1= ((-B1 + (sqrt((B1^2)-(4*A*C)))) / (2*A) );
Ast2= ((-B1 - (sqrt((B1^2)-(4*A*C)))) / (2*A) );
%final Ast
if Ast1 < Ast2
Ast = Ast1;
else
Ast = Ast2;
end
%calculation of Ast_min and Ast_lim
Ast_min= ( (0.85*b*d)/(fy) );
Ast_lim= (0.04*b*D);
%check for Ast wrt Ast_min and Ast_lim
if Ast < Ast_min
Ast = Ast_min;
end
if Ast > Ast_lim
Ast = Ast_lim;
end
1
fprintf('required area of steel is %f sq.mm',Ast)
required area of steel is 1517.470508 sq.mm
%number of bars
dia= input('Enter the diameter of steel bars: ')
dia = 20
area= (pi/4)*(dia^2)
area = 314.1593
N= (Ast/area);
N= round(N);
Ast_provided= N*area;
fprintf ('Provide %f bars at appropriate centre to centre distance',N)
Provide 5.000000 bars at appropriate centre to centre distance
fprintf ('The area of steel provided is %f',Ast_provided)
The area of steel provided is 1570.796327