MATLAB Code For Flexural Design of R
MATLAB Code For Flexural Design of R
In this post, I am going to present an extremely simplified MATLAB code for carrying out flexural
design of reinforced concrete beams (rectangular or flanged) according to Eurocode 2. Before you
can use this code, you must carry out your analysis and obtain your design forces and moments.
You can just copy the code and paste on your MATLAB script. There are no external functions to be
called for the program.
clc
disp('THIS PROFORMA WAS WRITTEN BY O.U.R UBANI')
disp('DOWNLOADED FROM WWW.STRUCTVILLE.COM')
disp('ANALYSIS AND DESIGN OF BEAMS PER EUROCODE 2')
CV = input('Is the beam is flanged? (1) for YES and (0) for NO = ')
if CV == 1
disp('S is the ratio of beff/bw')
S = b/bw
bn = (11-(b/bw))/10
if S >= 3.0;
K_deflection = Bs*0.8* I_deflection
else
K_deflection = Bs*bn* I_deflection
end
if L>7000
Limiting_deflection = (7000/L)*K_deflection
else
Limiting_deflection = K_deflection
end
end
else
Limiting_deflection = Bs*I_deflection
end
Actual_deflection = L/d
if
Limiting_deflection > Actual_deflection
disp('Deflection is satisfactory')
else
disp('DEFLECTION IS NOT SATISFACTORY !!!!! Increase depth of beam, or
increase area of steel, or both. Then rerun proforma')
end
% MATERIALS PROPERTIES
Fck = input('Enter the grade of concrete (N/mm^2) = ');
Fyk = input('Enter the yield strength of steel (N/mm^2) = ');
% SECTION PROPERTIES
h = input('Enter the depth of beam (mm) = ');
bw = input('Enter the beam width (mm) = ');
Cc = input('Enter concrete cover (mm) = ');
dr = input('Enter the diameter of reinforcement (mm) = ');
dl = input('Enter the diameter of links = ')
d = h-Cc-(dr/2)-dl % Effective depth
do = Cc+dl+(dr/2)
Asprov1= input('Enter the area of steel provided in the shear zone (mm^2)
= ') % The reinforcement must exceed the design anchorage length by at
least the effective depth
Crd = 0.12
k1= 1+sqrt(200/d)
if k1>2
k1=2
end
disp('Reinforcement ratio')
P1 = (Asprov1/(bw*d))
if P1>0.02
P1 = 0.02
end