Exercise_Chapter-3_Frame-Analysis-by-FEM-MatLab-coding
Exercise_Chapter-3_Frame-Analysis-by-FEM-MatLab-coding
L2=9 ( ft )=108(¿)
The vertical downward force at 2 nodes are -4000 lb and the momnents at node 1
and 2 are -80000 (lb-in) and 80000 (lb-in), respectively
Choosing point O as the origin, the coordinate of each node are
Node x (in) y (in)
1 0 108
2 120 108
3 120 0
The connectivity table
Element 1 2
1 1 2
2 3 2
[ ]
(1) T '( 1)
k =L k L
51 −51
0 0 0 0
800 800
17 17 −17 17
[ ]
T 0 0
1 0 0 0 0 0 12000 200 12000 200
0 1 0 0 0 0 17 34 −17 17
0 0
6 0 0 1 0 0 0 200 5 200 5
¿ 20∗10
0 0 0 1 0 0 −51 51
0 0 0 0
0 0 0 0 1 0 800 800
0 0 0 0 0 1 −17 −17 17 −17
0 0
12000 200 12000 200
17 17 −17 34
0 0
200 5 200 5
[ ]
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
[ ]
51 −51
0 0 0 0
800 800
17 17 −17 17
0 0
12000 200 12000 200
17 34 −17 17
0 0
(1) 6 200 5 200 5
k =20∗10
−51 51
0 0 0 0
800 800
−17 −17 17 −17
0 0
12000 200 12000 200
17 17 −17 34
0 0
200 5 200 5
[ ]
'( 2) 6
k =20∗10
7.65 −7.65
0 0 0 0
108 108
12∗204 6∗204 −12∗204 6∗204
0 0
1083 1082 1083 1082
6∗204 4∗204 −6∗204 2∗204
0 2
0 2
108 108 108 108
−7.65 7.65
0 0 0 0
108 108
−12∗204 −6∗204 12∗204 −6∗204
0 0
1083 1082 1083 1082
6∗204 2∗204 −6∗204 4∗204
0 0
108
2
108 108
2
108
[ ] [ ]
T 0 0
0 1 0 0 0 0 8748 162 8748 162 0 1 0 0 0 0
−1 0 0 0 0 0 17 68 −17 34 −1 0 0 0 0 0
0 0
6 0 0 1 0 0 0 162 9 162 9 0 0 1 0 0 0
¿ 20∗10
0 0 0 0 1 0 −17 17 0 0 0 0 1 0
0 0 0 0
0 0 0 −1 0 0 240 240 0 0 0 −1 0 0
0 0 0 0 0 1 −17 −17 17 −17 0 0 0 0 0 1
0 0
8748 162 8748 162
17 34 −17 68
0 0
162 9 162 9
[ ]
17 −17 −17 −17
0 0
8748 162 8748 162
17 −17
0 0 0 0
240 240
−17 68 17 34
0 0
(2) 162 6 9 162 9
k =20∗10
−17 17 17 17
0 0
8748 162 8748 162
−17 17
0 0 0 0
240 240
−17 34 17 68
0 0
162 9 162 9
[ ]
The global stiffness matrix:
51 −51
0 0 0 0 0 0 0
800 800
17 17 −17 17
0 0 0 0 0
12000 200 12000 200
17 34 −17 17
0 0 0 0 0
200 5 200 5
−51 51 17 17 −17 17
0 0 + 0 0+ 0
800 800 8748 162 8748 162
K=20∗10 6 −17 −17 17 17 −17 −17
0 0 + +0 0 0
12000 200 12000 240 200 240
17 17 17 −17 34 68 −17 34
0 0+ +0 + 0
200 5 162 200 5 9 162 9
−17 −17 17 −17
0 0 0 0 0
8748 162 8748 162
−17 +17
0 0 0 0 0 0 0
240 240
+17 34 −17 68
0 0 0 0 0
162 9 162 9
[ ]
51 −51
0 0 0 0 0 0 0
800 800
17 17 −17 17
0 0 0 0 0
12000 200 12000 200
17 34 −17 17
0 0 0 0 0
200 5 200 5
−51 51 17 17 −17 17
0 0 + 0 0
800 800 8748 162 8748 162
¿ 20∗106 −17 −17 289 −17 −17
0 0 0 0
12000 200 4000 200 240
17 17 17 −17 646 −17 34
0 0
200 5 162 200 45 162 9
−17 −17 17 −17
0 0 0 0 0
8748 162 8748 162
−17 17
0 0 0 0 0 0 0
240 240
17 34 −17 68
0 0 0 0 0
162 9 162 9
[]
The global load vector:
Rx 1
R y 1−4000
M 1−80000
0
{F }= −4000
80000
R x3
Ry 3
M3
[ ]
We have, F=KQ
51 −51
0 0 0 0 0 0 0
800 800
17 17 −17 17
0 0 0 0 0
{ }[ ]
12000 200 12000 200
17 34 −17 17
0 0 0 0 0 0 Rx 1
200 5 200 5
−51 51 17 17 −17 17 0 R y1−4000
0 0 + 0 0 0 M 1−80000
800 800 8748 162 8748 162
Q4 0
−17 −17 289 −17 −17
20∗ 0 0 0 0 Q5 = −4000
12000 200 4000 200 240
Q6 80000
17 17 17 −17 646 −17 34
0 0 0 Rx 3
200 5 162 200 45 162 9
−17 −17 17 −17 0 R y3
0 0 0 0 0 0 M3
8748 162 8748 162
−17 17
0 0 0 0 0 0 0
240 240
17 34 −17 68
0 0 0 0 0
162 9 162 9
Applying boundary conditions for node 1, we neglect 1st, 2nd and 3rd rows and columns, for
node 3, we neglect 7th, 8th, 9th rows and columns, then we have
[ ]
51 17 17
+ 0
{ }{ }
800 8748 162
Q4 0
289 −17
20∗106 0 Q5 = −4000
4000 200
80000
17 −17 646 Q6
162 200 45
Finally, the horizotal, vertical displacements and the rotation at node 2, or the
upper right corner can be calculated as
[ ]
−1
51 17 17
+ 0
{} { }{ }
800 8748 162 −4
Q4 0 −4.2687∗10 (¿)
1 289 −17
Q5 = 6
0 −4000 = −3
−2.4538∗10 (¿)
20∗10 4000 200
Q6 80000 −4
2.6723∗10 (rad )
17 −17 646
162 200 45
%Sectional properties
nodes=input('Enter the coordinates of the nodes in
the vector form: ');
conn=input('Enter the start and end nodes of each
element in the vector form: ');
isol=input('Input 1 if the DOFs is free and 0 if the
DOFs is fixed (all displacements and rotation)
following the order of DOFs in the vector form: ');
A=input('Input the cross-sectional area: '); %in^2
I=input('Input the moment of inertia: '); %in^4
E=input('Input the Young modulus: '); %psi;
Input:
[0,108;120,108;120,0]
[1,2;3,2]
[0 0 0 1 1 1 0 0 0]
7.65
204
20*10^6
Output:
Length of element 1 = 120[in]
Angle of elemnet 1=0 [degrees]