0% found this document useful (0 votes)
31 views10 pages

Practical 4: 1200 LB/FT 5000 LB

This document contains MATLAB code to analyze the deflection of a beam subjected to a point load. It defines the geometry, material properties, and applied load of the beam. It then assembles the global stiffness matrix KG and force vector FG by iterating through each element. The code solves for the displacements u, and plots the displacement and deflection curves along the length of the beam.

Uploaded by

Sahil jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views10 pages

Practical 4: 1200 LB/FT 5000 LB

This document contains MATLAB code to analyze the deflection of a beam subjected to a point load. It defines the geometry, material properties, and applied load of the beam. It then assembles the global stiffness matrix KG and force vector FG by iterating through each element. The code solves for the displacements u, and plots the displacement and deflection curves along the length of the beam.

Uploaded by

Sahil jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

PRACTICAL 4

1200 lb/ft
5000 lb

5ft 5ft 8ft 6ft

clear all
clc
E=3e7;
I=305;
ne=24;

axis=[0 1.25 2.5 3.75 5 6.25 7.5 8.75 10 11 12 13 14 15 16 17 18 18.75 19.5 20.25 21 21.75 22.5
23.25 24];
a=[1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1 1 1 1 1 1 1 1 0.75 0.75 0.75 0.75 0.75 0.75 0.75
0.75];
q=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1200 -1200 -1200 -1200 -1200 -1200 -1200 -1200];

KG=zeros(2*(ne+1));
FG=zeros(2*(ne+1),1);
for i=1:ne
index=[2*i-1 2*i 2*(i+1)-1 2*(i+1)];
ke=(E*I/a(i)^3)*[12 6*a(i) -12 6*a(i);6*a(i) 4*(a(i)^2) -6*a(i) 2*(a(i)^2);-12 -6*a(i) 12 -
6*a(i);6*a(i) 2*(a(i)^2) -6*a(i) 4*(a(i)^2)];
fe=[q(i)*a(i)/2;q(i)*(a(i)^2)/12;q(i)*a(i)/2;-q(i)*(a(i)^2)/12];
for j=1:4
for k=1:4
KG(index(j),index(k))=KG(index(j),index(k))+ke(j,k);
end
FG(index(j),1)=FG(index(j),1)+fe(j,1);
end
end
KG
FG
for i=1:50
KG(i,1)=0;
KG(i,2)=0;
KG(i,17)=0;
KG(i,33)=0;
KG(i,49)=0;
KG(1,i)=0;
KG(2,i)=0;
KG(17,i)=0;
KG(33,i)=0;
KG(49,i)=0;
end
FG(9,1)=FG(3,1)-5000;
FG(1,1)=0;
FG(2,1)=0;
FG(17,1)=0;
FG(33,1)=0;
FG(49,1)=0;

KG(1,1)=1;
KG(2,2)=1;
KG(17,17)=1;
KG(33,33)=1;
KG(49,49)=1;

u=inv(KG)*FG
disp=u(1:2:50);
def=u(2:2:50);

plot(axis,disp);
hold on
plot(axis,def);
ylabel('BEAM DISPLACEMENT AND DEFLECTION');
xlabel('LENGTH OF BEAM');

You might also like