Setting up global equations directly
Now that you’ve seen the final matrix formulation, let’s set up a procedure to find it directly!
We’ll do that for the same structure as before:
Fig. 10 Extension bar with nodal load
1. Identify degrees of freedom
The nodal displacement are the degrees of freedom. Let’s define all of them, even though some seem to be fixed:
2. Initialize the system with zeros
As the amount of degrees of freedom is known, the size of our global matrices and vectors are defined and they can be initialized with zeros:
\[\begin{split}
\begin{bmatrix}
0 & 0 & 0\\[12pt]
0 & 0 & 0\\[12pt]
0 & 0 & 0\\
\end{bmatrix}
\begin{bmatrix}
u_1\\[12pt]u_2\\[12pt]u_3
\end{bmatrix}
=
\begin{bmatrix}
0\\[12pt]0\\[12pt]0
\end{bmatrix}
\end{split}\]
3. Assemble stiffness, element by element
Now let’s add the local stiffness matrices element by element. We can use the default stiffness matrix \(\cfrac{EA}{\ell}\begin{bmatrix} 1&-1\\-1&1 \end{bmatrix}\) and places its parts in the global stiffness matrix where the index of the displacement (columns) and forces (rows) match.
Element \((1)\)
The first element links the first and second nodal displacement with the first and second nodal forces:
\[\begin{split}
\begin{bmatrix}
\cA{\cfrac{EA_1}{\ell_1}} & \cA{-\cfrac{EA_1}{\ell_1}} & 0\\[12pt]
\cA{-\cfrac{EA_1}{\ell_1}} & \cA{\cfrac{EA_1}{\ell_1}} & 0\\[12pt]
0 & 0 & 0\\
\end{bmatrix}
\begin{bmatrix}
u_1\\[12pt]u_2\\[12pt]u_3
\end{bmatrix}
=
\begin{bmatrix}
0\\[12pt]0\\[12pt]0\\
\end{bmatrix}
\end{split}\]
Element \((2)\)
Now let’s add the second element, linking the second and third nodal displacements with the second and third nodal forces:
\[\begin{split}
\begin{bmatrix}
\cA{\cfrac{EA_1}{\ell_1}} & \cA{-\cfrac{EA_1}{\ell_1}} & 0\\
\cA{-\cfrac{EA_1}{\ell_1}} & \cA{\cfrac{EA_1}{\ell_1}} + \cB{\cfrac{EA_2}{\ell_2}} & \cB{-\cfrac{EA_2}{\ell_2}}\\
0 & \cB{-\cfrac{EA_2}{\ell_2}} & \cB{\cfrac{EA_2}{\ell_2}}\\
\end{bmatrix}
\begin{bmatrix}
u_1\\[12pt]u_2\\[12pt]u_3
\end{bmatrix}
=
\begin{bmatrix}
0\\[12pt]0\\[12pt]0
\end{bmatrix}
\end{split}\]
4. Apply external loads
Now, the external loads can be applied. These external loads are called Neumann boundary conditions. These act directly on our nodes, so can be directly added to the global force vector. The sign of the forces to be added aligns with the positive direction of the nodal displacements.
\[\begin{split}
\begin{bmatrix}
\cA{\cfrac{EA_1}{\ell_1}} & \cA{-\cfrac{EA_1}{\ell_1}} & 0\\
\cA{-\cfrac{EA_1}{\ell_1}} & \cA{\cfrac{EA_1}{\ell_1}} + \cB{\cfrac{EA_2}{\ell_2}} & \cB{-\cfrac{EA_2}{\ell_2}}\\
0 & \cB{-\cfrac{EA_2}{\ell_2}} & \cB{\cfrac{EA_2}{\ell_2}}\\
\end{bmatrix}
\begin{bmatrix}
u_1\\[12pt]u_2\\[12pt]u_3
\end{bmatrix}
=
\begin{bmatrix}
0\\[12pt]0\\[12pt]F
\end{bmatrix}
\end{split}\]
5. Apply prescribed displacements
Now, the external loads can be applied. These external loads are called Neumann boundary conditions. These act directly on our nodes, so can be directly added to the global force vector. The sign of the forces to be added aligns with the positive direction of the nodal displacements.
The Neumann boundary condition causes a prescribed displacement \(u_1 = 0\)
\[\begin{split}
\begin{bmatrix}
\cA{\cfrac{EA_1}{\ell_1}} & \cA{-\cfrac{EA_1}{\ell_1}} & 0\\
\cA{-\cfrac{EA_1}{\ell_1}} & \cA{\cfrac{EA_1}{\ell_1}} + \cB{\cfrac{EA_2}{\ell_2}} & \cB{-\cfrac{EA_2}{\ell_2}}\\
0 & \cB{-\cfrac{EA_2}{\ell_2}} & \cB{\cfrac{EA_2}{\ell_2}}\\
\end{bmatrix}
\begin{bmatrix}
0\\[12pt]u_2\\[12pt]u_3
\end{bmatrix}
=
\begin{bmatrix}
0\\[12pt]0\\[12pt]F
\end{bmatrix}
\end{split}\]
However, it also adds a force:
\[\begin{split}
\begin{bmatrix}
\cA{\cfrac{EA_1}{\ell_1}} & \cA{-\cfrac{EA_1}{\ell_1}} & 0\\
\cA{-\cfrac{EA_1}{\ell_1}} & \cA{\cfrac{EA_1}{\ell_1}} + \cB{\cfrac{EA_2}{\ell_2}} & \cB{-\cfrac{EA_2}{\ell_2}}\\
0 & \cB{-\cfrac{EA_2}{\ell_2}} & \cB{\cfrac{EA_2}{\ell_2}}\\
\end{bmatrix}
\begin{bmatrix}
0\\[12pt]u_2\\[12pt]u_3
\end{bmatrix}
=
\begin{bmatrix}
H\\[12pt]0\\[12pt]F
\end{bmatrix}
\end{split}\]
6. Solve for the unknown nodal displacements
Finally, we can solve for the unknown nodal displacements. For now, we can solve this system by only taking into account the second and third row:
\[\begin{split}
\begin{bmatrix}
\cA{\displaystyle\cfrac{EA_1}{\ell_1}} + \cB{\displaystyle\cfrac{EA_2}{\ell_2}} & \cB{-\displaystyle\cfrac{EA_2}{\ell_2}}\\
\cB{-\displaystyle\cfrac{EA_2}{\ell_2}} & \cB{\displaystyle\cfrac{EA_2}{\ell_2}}\\
\end{bmatrix}
\begin{bmatrix}
u_2\\[14pt]u_3
\end{bmatrix}
=
\begin{bmatrix}
0\\[14pt]F
\end{bmatrix}
\end{split}\]
This results in:
\( u_2 = \displaystyle\cfrac{F\ell_1}{EA_1}\)
\(u_3 = \displaystyle\cfrac{F\left(EA_1\ell_2 + EA_2\ell_1\right)}{EA_1\,EA_2}\)
Later on, we’ll introduce another way of solving the system of equations which allows for nonzero Dirichlet boundary conditions.