We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
ele
clear
close all
XXproperties
A
E
3250e-6;
200e9;
X= [@ 3.6 7.2 10.8 95.4 1.8];
Y= (@ 000 3.118 3.118 3.118];
2imeshing
ne = 11;
nne = 23
nn = 75
dofn = 25
dofe = nne*dofn;
tdof = nn*dofn;
Kkassembly of stif
KG =
Fe =
Neonn
Conn
zeros(tdoF, tdof) ;
zeros(tdof,1);
12; 23; 3.4; 45; 5 335 636 336 756 257 257 115
zeros(ne,dofe) ;
le = zeros(ne,1);
theta = zeros(ne,1);
for
end
FC(2,1) =:
FC(4,1)
FC(6,1) =:
FC(8,1)
Kes
Fos
i= Line
Conn(i, :)=[Nconn(i,1)+(Nconn(i,1)-1) Neonn(i,1)*2 Nconn(i,2)+(Nconn(i,2)-1) Neonn(i,2)*2];
Le(i) =sqrt((¥(Nconn(i,2))-¥(Neonn(i,1)))*2 + (X(Neonn(4,2))-X(Neonn(i,1)))*2)5
theta(i) = atan2d(¥(Nconn(i,2))-¥(Neonn(i,1)),X(Nconn(4,2))-X(Nconn(i,1))) 5
ke = (A*E)/le(i) *[1 -15-1 115
Te = [cosd(theta(i)) sind(theta(i)) @ @; @ @ cosd(theta(i)) sind(theta(i))];
k= Te! * ke * Te;
for lofe
for k =1:dofe
KG(Conn(i,j),Conn(i,k)) = KG(Conn(i,§),Conn(i,k)) + K(3,k)5
end
end
KG;
= FC;XXBOUNDARY CONDITION
% UL = Vi = U2 = V2 =0
for be =[8 2 1]
ke(be,:) = []5
k6(:,be) = []5
FC(be,:) = [5
end
UG = Linsolve(KG, FC);
zeros(tdof, 1);
for
u(2,
idein;
end
3456791011 1213 14);
16(44,1);
%% horizontal nodal displacement
5-43
hori:
for
eros (7,1)5
12:(tdof-1)
hori (j,1)=u(i1)3
Sede
end
fprintf(“horizontal displacement of nodes:\n")
horizontal displacement of nodes
disp(hori)
e
7.a6040-04
2.3127¢-03
3.1334e-03,
-4.97360-05
1.sai6e-03
3.0836e-03,
%% vertical nodal displacement
n=1;
verti=zeros(7,1);
for 1=2:2:tdoF
verti(n,1)=u(i,1);
nent;
end
fprintf("vertical nodal displacenent:\n")
vertical nodal displacene!
disp(verti)
°
-6.5759¢-03
-6,9923e-03
e-3.7330e-03
-7.2363e-03
W% reaction force at R
fprintf("horizontal displacement at joint R:\n")
horizontal displacement at joint R:
disp(Us(5,1))
3.13340-03
fprintf("nodal displacement vectr:\n")
nodal displacement vectr:
disp(u)
e
e
7.a604e-04
-6.57590-03
2.3127¢-03
-6,9923e-03
3.33340-03,
e
-4,97360-05
-3.73300-03,
1.5916e-03
-7.2363e-03
3.08360-03,
-3.5033e-03,
%% stresses in element
stress = zeros(ne,1);
for i = line
Te = [cosd(theta(i)) sind(theta(i)) @ @; @ @ cosd(theta(i)) sind(theta(i))];
for j=1:dofe
v1.1)
end
u(Conn(i,5).1)5
Ue_l = Te*ul;
Ke = (A*E)/le(i) * (1 -15-1 1];
F = Ke*Ue_l;
Stress=F(2,1)/A;
fprintf(" FORCE IN MENMBER Xd", 4)
fprintf("= %d\n",F(2,1))
‘4% IF WANT TO DISPLAY STRESS
fprintf ("stress in each member %d",4)
fprintf ("= %d\n,",Stress)end
FORCE IN MENMBER 2
1.3470176405
stress in each member
4.1448690007
FORCE IN MENYBER 2
2.8287360+05
stress in each nenber
8. 7038040407
FORCE IN MENMBER 3
= 1.481719¢+05
stress in each menber
45591360407
FORCE IN MENYBER 4
-2, 963658105
stress in each member
-9.118948+07
FORCE IN MENYBER S
2.963658e+05
stress in each menber
= 9.a18948e+07
FORCE IN MENYBER 6
-2,963438e105
stress in each member
= -9,2182716007
FORCE IN MENYBER 7
= 2.69423se104
stress in each member
= 8,.2899530+06
FORCE IN MENMBER 8
= -2.694035e005
stress in each member
-8.2893378007
FORCE IN MENMBER 9
-2,694235e+08
stress in each member
= -8.2899526006
FORCE IN MENYBER 20
2.6942350405
stress in each nenber
8.289953e007
FORCE IN MENYBER 21
-2.6942350+05stress in each member 12
= -8.2899536007