How to determine the Bending Moment Diagram for simply supported beam with UDL and two point loads???
조회 수: 8 (최근 30일)
이전 댓글 표시
Hi all,
I was to prepare the Shear force diagram and bending moment diagram for simply supported beam with UDL acting throughout the beam and two Point Loads anywhere on the beam. I was able to determine the Shear Force Diagram, but currently I'm struggling with the Bending moment diagram. I'm not too familiar with the Matlab I have to say, so if someone could assist me I will be grateful.
In this file user inputs the values for: Span UDl Point Load 1 Point Load 1 distance from LHS Point Load 2 Point Load 2 distance from LHS
I have it worked out on paper, but I cannot do it in Matlab.
Regards, Borys Szewczyk
PLEASE HELP
%This code will solve for simply supported beam with UDL and up to two
%point loads.
clear all, clc
%Data Input
Span=input('Please enter the length of the beam in meteres: ');
UDL=input('Please specify the magniture of UDL in kN/m: ');
P1=input('Please enter a magnitude of the Point Load 1 in kN: ');
PL1=input('Please enter the distance at which Point load 1 is acting from left hand side in meteres: ');
P2=input('Please enter a magnitude of the Point Load 2 in kN: ');
PL2=input('Please enter the distance at which Point load 2 is acting from left hand side in meteres: ');
PL3=(Span-PL2)/2;
%Calculate the Reactions
R1 = (P1*(Span-PL1)/Span)+(P2*(Span-PL2)/Span)+(UDL*Span/2) %Left Support Reaction
R2 = ((P1*PL1)+(P2*PL2)+(UDL*Span*(Span/2)))/10 %Right Support Reaction
%Create Beam array
n = 1000; %Number of discretization of x-axis.
D=Span/n; %Increment for discretization of x-axis.
x = (0:D:Span); %Generate column array for x-axis.
SF = zeros(size(x,1),1); %Shear force function of x.
BM = zeros(size(x,1),1); %Bending Moment function of x.
%Shear Force Calculations
for i=1:n+1
if x(i)<PL1 %Region 1
SF(i)=R1-(UDL*D*(i));
SFO(i)=0;
elseif x(i)<PL2 %Region 2
SF(i)=R1-(UDL*D*(i))-P1;
SFO(i)=0;
else SF(i)=R1-(UDL*D*(i))-P1-(UDL*(PL2-PL1))-(UDL*(Span-PL2))+R2;
SFO(i)=0;
end
end
%Bending Moment Calculations
for i=1:n+1
if x(i)<PL1 %Region 1
BM(i)=R1*x(i) ;
BMO(i)=0;
elseif x(i)<PL2 %Region 2
BMO(i)=R1*x(i)-UDL*((x(i)-PL1)^2)/2; ;
BMO(i)=0;
else BM(i)=(R1*D*(i))-(UDL*D*(i))-P1-(UDL*(PL2-PL1))-(UDL*(Span-PL2))+R2;
BMO(i)=0;
end
end
%SFD AND BMD PLOTTING
subplot(3,1,1)
plot(x,UDL,'b.-')
grid
title('Span of the Beam')
xlabel('Span (m)') %x-axis label
ylabel('UDL (kN/m)') %y-axis label
subplot(3,1,2)
plot(x,SF,'m',x,SFO,'b','linewidth',1.5)
grid
title('Shear Force Diagram')
xlabel('Span (m)') %x-axis label
ylabel('Shear Force (kN)') %y-axis label
subplot(3,1,3)
plot(x,BM,'m',x,BMO,'b','linewidth',1.5)
grid
title('Bending Moment Diagram')
xlabel('Span (m)') %x-axis label
ylabel('Bending Moment (kN-m)') %y-axis label
댓글 수: 1
Shadi Fakher
2021년 2월 7일
thing just doesnt make sense, the user cannot enter the length of the Uniform Distributed Load... the program allows him to enter the magnitude only , so how is this compatible to find the moments ? another question, what does the reaction equations be if i want to make the code also allow the user to enter the location of the supports?
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!