# I am unable to get the deflection of beam correctly and the plot is incorrect.Even when i am using the right code. Also i tryed to distribute my beam into sections.

5 Ansichten (letzte 30 Tage)
Vruddhi am 12 Feb. 2024
Kommentiert: VBBV am 14 Feb. 2024
% Plot the bending of a beam with rectangular cross section
% The cross section is in the plane of y-z
% The longitudinal axis of the beam is parallel to the x axis
scale=50;
E= 1.999*10^11; % N/m2
nu = 0.3;
I= 7.74.*10^-7; % m^4
H = 0.0762;% m
R1 = 2224; % N
R2 = 2224; % N
P = 2224; % N
L = 3.0; % m
L1= 0.91; % m
L2= 2.09; %m
N=20;
x=(0:L/N:L);
DIM =size(x);
y= zeros(DIM);
figure(1)
plot(x,y,'.-')
axis equal
hold on
xlabel('Distance(m)')
ylabel('vertical deformation (m)')
title('Deformation of a beam')
xd=x;
yd=y;
for ii=1:length(x)
v=(1/E*I).*(2224*x(ii).^3/6)-(2208.021*x(ii)-(2224*(x(ii)-L1).^3/6)...
-(2224*(x(ii)-L2).^3/6));
yd(ii) = y(ii)+scale.*v;
end
figure(1)
plot(xd,yd,'o-')
axis equal
hold on
##### 1 Kommentar-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden
Chuguang Pan am 12 Feb. 2024
The plot like a sine curve, maybe the code to calculate the deflecction of beam is incorrect.

Melden Sie sich an, um zu kommentieren.

### Antworten (1)

VBBV am 12 Feb. 2024
Bearbeitet: VBBV am 12 Feb. 2024
scale = 50;
E= 1.999*10^11; % N/m2
nu = 0.3;
I= 7.74.*10^-7; % m^4
H = 0.0762;% m
R1 = 2224; % N
R2 = 2224; % N
P = 2224; % N
L = 3.0; % m
L1= 0.91; % m
L2= 2.09; %m
N=50;
x=(0:L/N:L);
DIM =size(x);
y= zeros(DIM);
% figure(1)
% plot(x,y,'.-')
% axis equal
% yyaxis right
xd=x;
yd=y;
for ii=1:length(x)
v=(1/(E*I)).*((2224*x(ii)^3)/6-2208.021*x(ii)-(2224*(x(ii)-L1)^3)/6 ...
-(2224*(x(ii)-L2)^3)/6);
yd(ii) = y(ii)+scale.*v;
end
figure(1)
plot(xd,real(yd),'o-')
axis equal
xlabel('Distance(m)')
ylabel('vertical deformation (m)')
title('Deformation of a beam')
##### 3 Kommentare1 älteren Kommentar anzeigen1 älteren Kommentar ausblenden
Vruddhi am 12 Feb. 2024
It is a simply supported beam with two point loads equidistant from the support. And i am new to use this software. Kindly share the code of solving deflection in sections. As the value of deflection at ends will be zero.
VBBV am 14 Feb. 2024
The code which you shared in question is modified to give outputs as shown in this thread. If you run the code, you would get a deflection curve shown from modified code with correct values. To obtain defelction in sections you need to split the equation as below
scale = 50;
E= 1.999*10^11; % N/m2
nu = 0.3;
I= 7.74.*10^-7; % m^4
H = 0.0762;% m
R1 = 2224; % N
R2 = 2224; % N
P = 2224; % N
L = 3.0; % m
L1= 0.91; % m
L2= 2.09; %m
N=50;
x=(0:L/N:L);
DIM =size(x);
y= zeros(DIM);
% figure(1)
% plot(x,y,'.-')
% axis equal
% yyaxis right
xd=x;
yd=y;
for ii=1:length(x)
v=(1/(E*I)).*((2224*x(ii)^3)/6-2208.021*x(ii)-(2224*(x(ii)-L1)^3)/6 ...
-(2224*(x(ii)-L2)^3)/6);
yd(ii) = y(ii)+scale.*v;
v1(ii) = (1/(E*I)).*(2224*x(ii)^3)/6; % section 1
v2(ii) = (1/(E*I)).*(-2208.021*x(ii)); % section 2
v3(ii) = (1/(E*I)).*(-2224*(x(ii)-L1)^3)/6; % section 3
v4(ii) = (1/(E*I)).*(-2224*(x(ii)-L2)^3)/6; % section 4
end
disp([v1.', v2.', v3.', v4.'])
0 0 0.0018 0.0219 0.0000 -0.0009 0.0015 0.0200 0.0000 -0.0017 0.0012 0.0183 0.0000 -0.0026 0.0009 0.0167 0.0000 -0.0034 0.0007 0.0152 0.0001 -0.0043 0.0005 0.0137 0.0001 -0.0051 0.0004 0.0124 0.0002 -0.0060 0.0003 0.0112 0.0003 -0.0069 0.0002 0.0100 0.0004 -0.0077 0.0001 0.0089 0.0005 -0.0086 0.0001 0.0079 0.0007 -0.0094 0.0000 0.0070 0.0009 -0.0103 0.0000 0.0062 0.0011 -0.0111 0.0000 0.0054 0.0014 -0.0120 0.0000 0.0047 0.0017 -0.0128 0.0000 0.0040 0.0021 -0.0137 -0.0000 0.0035 0.0025 -0.0146 -0.0000 0.0029 0.0030 -0.0154 -0.0000 0.0025 0.0035 -0.0163 -0.0000 0.0021 0.0041 -0.0171 -0.0001 0.0017 0.0048 -0.0180 -0.0001 0.0014 0.0055 -0.0188 -0.0002 0.0011 0.0063 -0.0197 -0.0002 0.0009 0.0072 -0.0206 -0.0004 0.0007 0.0081 -0.0214 -0.0005 0.0005 0.0091 -0.0223 -0.0007 0.0004 0.0102 -0.0231 -0.0009 0.0002 0.0114 -0.0240 -0.0011 0.0002 0.0126 -0.0248 -0.0014 0.0001 0.0140 -0.0257 -0.0017 0.0001 0.0154 -0.0265 -0.0021 0.0000 0.0170 -0.0274 -0.0025 0.0000 0.0186 -0.0283 -0.0029 0.0000 0.0203 -0.0291 -0.0035 0.0000 0.0222 -0.0300 -0.0040 -0.0000 0.0241 -0.0308 -0.0047 -0.0000 0.0262 -0.0317 -0.0054 -0.0000 0.0284 -0.0325 -0.0062 -0.0000 0.0307 -0.0334 -0.0070 -0.0000 0.0331 -0.0343 -0.0079 -0.0001 0.0357 -0.0351 -0.0089 -0.0001 0.0383 -0.0360 -0.0100 -0.0002 0.0411 -0.0368 -0.0112 -0.0003 0.0441 -0.0377 -0.0124 -0.0004 0.0472 -0.0385 -0.0137 -0.0005 0.0504 -0.0394 -0.0152 -0.0007 0.0537 -0.0402 -0.0167 -0.0009 0.0572 -0.0411 -0.0183 -0.0012 0.0609 -0.0420 -0.0200 -0.0015 0.0647 -0.0428 -0.0219 -0.0018
figure(1)
plot(xd,real(yd),'o-')
axis equal
xlabel('Distance(m)')
ylabel('vertical deformation (m)')
title('Deformation of a beam')

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

R2023b

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by