Professional Documents
Culture Documents
Submitted By Received By
Name: Muhammad Abdullah Name: Muhammad Naeem Khan
Reg #: 938-FET/BSME/F20 Signature: ___________________
Date: ____________________ Date: _______________________
Engr. Muhammad Naeem Khan Open Ended Activity
Contents
Question ....................................................................................................................................................... 2
Solution ........................................................................................................................................................ 2
MATLAB Code ........................................................................................................................................... 4
OUTPUT ...................................................................................................................................................... 6
Question
For the spring assemblage with arbitrarily numbered nodes shown in Figure 2–9, obtain
Solution
a. We begin by making use of Equation to express each element stiffness matrix as follows:
[𝑘] = [ 𝑘 −𝑘
]
−𝑘 𝑘
[𝑘 2 ] = [ 2000 −2000
]
−2000 2000
[𝑘 3 ] = [ 3000 −3000
]
−3000 3000
where the numbers above the columns and next to each row indicate the nodal degrees of freedom
associated with each element. For instance, element 1 is associated with degrees of freedom u1
and u3. Also, the local element x axis coincides with the global x axis for each element. Using the
concept of superposition (the direct stiffness method), we obtain the global stiffness matrix as
[K] =[k1] + [k2] + [k3]
1000 0 −1000 0
0 3000 0 −3000
[𝐾] = [ ]
−1000 0 1000 + 2000 −2000
0 −3000 −2000 3000 + 2000
b. The global stiffness matrix, Equation, relates global forces to global dis placements as
follows:
𝐹1𝑥 1000 0 −1000 0 𝑢1
𝐹2𝑥 0 3000 0 −3000 𝑢2
{ }=[ ] {𝑢 }
𝐹3𝑥 −1000 0 1000 + 2000 −2000 3
𝐹4𝑥 0 −3000 −2000 3000 + 2000 𝑢4
Applying the homogeneous boundary conditions u1 = 0 and u2 = 0 to Equation, substituting applied
nodal forces, and partitioning the first two equations of Equation (or deleting the first two rows of
[F] and [d] and the first two rows and columns of [K] corresponding to the zero-displacement
boundary conditions), we obtain
0 3000 −2000 𝑢3
{ }=[ ]{ }
5000 −2000 −5000 𝑢4
Solving Equation, we obtain the global nodal displacements
10
𝑢3 = 𝑖𝑛
11
15
𝑢4 = 𝑖𝑛
11
c. To obtain the global nodal forces (which include the reactions at nodes 1and 2), we back-
substitute Equation and the boundary conditions u1 = 0 and u2 = 0 into Equation. This
substitution yields
0
𝐹1𝑥 1000 0 −1000 0 0
𝐹2𝑥 0 3000 0 −3000 10
{ }=[ ]
𝐹3𝑥 −1000 0 1000 + 2000 −2000 11
𝐹4𝑥 0 −3000 −2000 3000 + 2000 15
{11}
Multiplying matrices in Equation and simplifying, we obtain the forces at each node
−10000
𝐹1𝑥 = 𝑙𝑏
11
−45000
𝐹2𝑥 = 𝑙𝑏
11
𝐹3𝑥 = 0𝑙𝑏
55000
𝐹4𝑥 = 𝑙𝑏
11
From these results, we observe that the sum of the reactions F1x and F2x is equal in magnitude but
opposite in direction to the applied force F4x. This result verifies equilibrium of the whole spring
assemblage.
MATLAB Code
1. clear
2. clc
3. format short g
4. %% Asking for Element properties
5. % No. of nodes
6. n=4;
7. % Element connectivity
8. Elements=[1 3;3 4;4 2];
9. [N,i]=size(Elements);
10. % Stiffness of elements
11. k1=1000;
12. k2=2000;
13. k3=3000;
14. k=[k1 k2 k3]';
15. %
16. Stiffness_k=k;
17. Element=[1:N]';
18. Connectivity=Elements;
19. fprintf('Given, no. of nodes = %d',n)
20. fprintf('\nNo. of elements = %d\n\n',N)
21. fprintf('Units are in inch, lb\n')
22. disp(table(Element, Connectivity, Stiffness_k))
23. %% Stiffness Matrix
24. for i=1:N
25. K{i}=k(i)*[1 -1;-1 1];
26. fprintf('Stiffness matrix of Element-%d\n',i)
27. disp(K{i})
28. end
OUTPUT
Given, no. of nodes = 4
No. of elements = 3
1 1 3 1000
2 3 4 2000
3 4 2 3000
1000 0 -1000 0
0 3000 0 -3000
-1000 0 3000 -2000
0 -3000 -2000 5000
0
0
0
5000
0
0
0.90909
1.3636
-909.09
-4090.9
-4.5475e-13
5000
Department Of Mechanical Engineering & Technology