You are on page 1of 7

%SFD BMD of simply supported beam

%17114052_Raunaq_Purohit, 17114030_HeeraChand_Khutiyare, Sulara bhaskar


%rao_17114068
length=input('Enter length of beam = ');
Type=input('Enter type of loading(1: Conc. load ; 2: UDL) = ');
if Type==1
W=input('Conc. load in KN = ');
a=input('load at a distance = ');
b=length-a;
R1 = W*b/length;
R2 = W-R1;
else if Type==2
W=input('UDL = ');
R1=W*length/2;
R2=W*length/2;
else
fprintf('Invalid Type \n')
end
end

if Type==2
p=linspace(0,length,25);
s=R1-W*p;
r=R1*p-W*p.*p/2;
subplot(2,1,1)
plot(p,s);
title('SFD');
xlabel('Beam position in mm');
ylabel('SF in N');

subplot(2,1,2)
plot(p,r);
title('BMD');
xlabel('Beam position in mm');
ylabel('BM in N.m');

else if Type == 1
p=linspace(0,length,25);
q=p-a;
u=max(0,q);

r=R1*p-W*u;
s=R1*(p<=a)-R2*(p>=a);
subplot(2,1,1)
plot(p,s);
title('SFD');
xlabel('Beam position in mm');
ylabel('SF in N')

subplot(2,1,2)
plot(p,r);
title('BMD');
xlabel('Beam position in mm');
ylabel('BMD in N.m');

end
end
Command Window

>> SS_beams
Enter length of beam =
10
Enter type of loading(1: Conc. load ; 2: UDL) =
1
Conc. load in KN =
10
load at a distance =
5

>> SS_beams
Enter length of beam =
10
Enter type of loading(1: Conc. load ; 2: UDL) =
2
UDL =
10
>> 2
10
SFD
5
SF in N

-5
0 2 4 6 8 10
Beam position in mm
BMD
25

20
BMD in N.m

15

10

0
0 2 4 6 8 10
Beam position in mm
SFD
50
SF in N

-50
0 2 4 6 8 10
Beam position in mm
BMD
150

100
BM in N.m

50

0
0 2 4 6 8 10
Beam position in mm

You might also like