fbpx

Truss Analysis using the Direct Stiffness Method

In this tutorial we are going to take a close look at how to use the Direct Stiffness Method to perform truss analysis. By the end of this, you should understand:

  • the basic ideas behind why the direct stiffness method works.
  • how to execute the analysis technique for truss structures that experience axial forces (2D plane trusses).
  • the scalability of the technique and why it’s the main process that powers commercial structural analysis software.

The technique is based on a couple of simple concepts, the first we’ll consider is Hooke’s Law; this simply states that the change in length of an axially loaded element, \delta will be proportional to the force causing it, F. The constant of proportionality between the force and resulting change in length is the stiffness of the element, k

(1)   \begin{equation*}F = k\times \delta\end{equation*}

1.0 Element Stiffness Matrix

When we’re introduced to Hooke’s law, it’s usually in the context of a spring, in which case the stiffness is simply the spring constant. Here we’re focusing on structures that resist axial forces only – truss structures. Now consider a single structural member extracted from a truss, we’ll refer to this as an axially loaded bar, Fig. 1 below. Now, let’s take Hooke’s law and map it onto our axially loaded bar. 

Axially loaded bar | DegreeTutors.com
Fig. 1. Axially loaded bar element

Our axially loaded bar is subjected to two forces, one at each end or node, F_{x,1} and F_{x,2}. Remember, we’ve extracted this bar from a larger structure so it’s possible that each end will be subject to different magnitude forces. From Hooke’s law, we know these forces will induce displacements, u_{x,1} and u_{x,2} at nodes 1 and 2 respectively. Our task now is to get an expression along the lines of Hooke’s law that relates the forces F_{x,1} and F_{x,2} with the displacements u_{x,1} and u_{x,2}

This turns out to be relatively easy once we know that the stiffness of an axially loaded bar is, 

(2)   \begin{equation*}k_{\text{bar}} = \frac{EA}{L}\end{equation*}

where E is Young’s modulus, A is the cross-sectional area and L is the length of the bar. Now we can apply what we know to each node in turn. Considering node 1 first we can state the force-displacement relationship as,

(3)   \begin{equation*}F_{x,1} = \frac{EA}{L}(u_{x_1}-u_{x_2})\end{equation*}


(4)   \begin{equation*}F_{x,1} = \frac{EA}{L}u_{x_1} - \frac{EA}{L}u_{x_2}\end{equation*}

And for node 2,

(5)   \begin{equation*}F_{x,2} = \frac{EA}{L}(u_{x_2}-u_{x_1})\end{equation*}


(6)   \begin{equation*}F_{x,2} = -\frac{EA}{L}u_{x,1} + \frac{EA}{L}u_{x,2}\end{equation*}

We can combine both of these equations together and represent them in matrix form as,

(7)   \begin{equation*}\underbrace{\begin{Bmatrix}F_{x,1}\\F_{x,2}\\\end{Bmatrix}}_{\{F_L\}} = \underbrace{\frac{EA}{L}\begin{bmatrix}1&-1\\-1&1\end{bmatrix}}_{\text{Stiffness matrix}, [K_L]}\underbrace{\begin{Bmatrix}u_{x,1}\\u_{x,2}\end{Bmatrix}}_{\{u_L\}}\end{equation*}

Notice that the element stiffness that relates force to displacement has been replaced by a matrix. This is known as the Local Element Stiffness Matrix, [K_L] and relates the forces applied to each node, \{F_L\} with the corresponding nodal displacements, \{u_L\}. This is the fundamental unit of direct stiffness method analysis, it is literally the basic building block that we use to assemble our model of the structure. For more sophisticated structural elements, this matrix gets larger and more complex, but keep in mind it’s always just relating the actions (forces, moments) applied to an element to the corresponding displacement and rotations. 

2.0 Direct Stiffness Method – Basic Concept

As I mentioned at the top, this technique is built upon two basic ideas, Hooke’s law, which we’ve now covered and this next one. Once you grasp it, you’ll recognise just how simple this analysis technique really is. So here goes; wrapped up in matrix equation (7) was the force displacement relationship for both nodes of the member. But recall that we said this member was ‘extracted’ from a larger structure. And so it could easily be the case that node 2 has 2, 3 or n other members connected to it. Each of those members will also have a force-displacement relationship that must be obeyed.

So, to solve for the displacement of node 2, we need to take into consideration all of the members that meet at that node and simultaneously obey all of their individual force-displacement relationships. Mathematically, this corresponds to solving simultaneous equations for the value of displacement at node 2 that satisfies all of the members that connect into this node. If you can grasp this concept, you understand the direct stiffness method, everything else is just implementation details!

To implement this method in practice, we first build one big matrix to represent the entire structure, we call this the Primary Structure Stiffness Matrix. Although this is a much bigger matrix, it still just relates nodal displacements and nodal forces…but for the whole structure instead of a single member. To do this we combine element stiffness matrices together such that all of the members contributing to each node, get added together at the same location in the overall structure stiffness matrix. In this way we end up with one big set of simultaneous equations, (neatly packaged together into a matrix equation) that models the force-displacement behaviour of the structure. Then it’s just a matter of solving these equations for the unknown structural displacements using the usual techniques (i.e. a computer!) to solve matrix equations. 

3.0 Direct Stiffness Method for Truss Analysis

We can only discuss this at a concept level for so long, to really get to grips with it and all of the implementation details, we need to roll up our sleeves and analyse a structure from start to finish. To that end, consider the three-bar truss in Fig. 2. I’ve numbered each node from 1 to 4 and labelled each member from A to C. Note that this structure is a 2D plane truss, but everything we’re about to discuss can readily be expanded to 3D structures.

Three-bar truss | DegreeTutors.com
Fig. 2. Simple 3-bar plane truss

Our first task is to identify each possible displacement, ignoring the influence of supports (for now), each node could undergo two orthogonal displacements, Fig. 3. We’ll call these degrees of freedom, our structure therefore has 8 degrees of freedom. This will come up again later when we’re building the primary structure stiffness matrix.

Truss degrees of freedom | DegreeTutors.com
Fig. 3. Degrees of freedom

3.1 Global Element Stiffness Matrix

In order to combine our element stiffness matrices together, we must first account for the fact that they are all orientated at different angles. This means that an axial force for member A for example cannot currently be directly added to an axial for from member B as they are orientated at different angles. So we need to perform a transformation that maps forces and displacements from each member into a common global reference frame. For this we use a transformation matrix, [T]. Now this can be easily derived but in the interest of brevity, for now we simply state the following relationship between coordinates in a local member reference frame and the corresponding coordinates in a global structure reference frame,

(8)   \begin{equation*}\underbrace{\begin{Bmatrix}u_{x,L,1}\\u_{x,L,2}\end{Bmatrix}}_{\text{local coords},\{u_L\}}= \underbrace{\begin{bmatrix}\cos\theta & \sin \theta &0 &0\\0&0&\cos\theta&\sin\theta\end{bmatrix}}_{\text{Transformation matrix},[T]}\underbrace{\begin{Bmatrix}u_{x,G,1}\\u_{y,G,1}\\u_{x,G,2}\\u_{y,G,2}\end{Bmatrix}}_{\text{global coords}, \{u_G\}}\end{equation*}

where u_{x,L,1} and u_{x,L,2} are the local axial displacements at nodes 1 and 2. We can summarise this as \{u_L\} = [T]\{u_G\}. The transformation matrix [T] acts as a bridge between local and global coordinates provided we use a method of determining the angle of orientation of the member in question, \theta, and stick to it for all members. We can use the exact same technique to bridge between forces in a local element reference frame F_L and their values F_G in the common (to all members) global reference frame.

(9)   \begin{equation*}\underbrace{\begin{Bmatrix}F_{x,G,1}\\F_{y,G,1}\\F_{x,G,2}\\F_{y,G,2}\\\end{Bmatrix}}_{\{F_G\}} = \underbrace{\begin{bmatrix}\cos\theta &0\\\sin\theta &0\\0&\cos\theta\\0&\sin\theta\\\end{bmatrix}}_{[T]^T}\underbrace{\begin{Bmatrix}F_{x,L,1}\\F_{x,L,2}\end{Bmatrix}}_{\{F_L\}}\end{equation*}

Again it will help us to summarise this relationship as \{F_G\} = [T]^T\{F_L\}. Now that we have the link between:

  • forces in a local and global reference frame
  • displacements in a local and global reference frame

we need to finally link up forces in a global reference frame with displacements in a global reference frame. Trust me, this is going somewhere! Consider equation (7) that relates local element force and displacement, 

(10)   \begin{equation*}\{F_L\} = [K_L]\{u_L\}\end{equation*}

We can substitute this equation into equation (9), replacing \{F_L\} to get,

(11)   \begin{equation*}\{F_G\} =[T]^T[K_L]\{u_L\}\end{equation*}

Now using equation (8) to replace \{u_L\} yields,

(12)   \begin{equation*}\underbrace{\{F_G\}}_{\text{global forces}} = [T]^T[K_L][T]}\underbrace{\{u_G\}}_{\text{global displacements}}\end{equation*}

Therefore we can identify [T]^T[K_L][T] as the Global Element Stiffness Matrix, [K_G] that relates forces defined in a global reference frame to displacements also defined in a global reference frame. For clarity, let’s now define c=\cos\theta and s=\sin\theta. After performing the matrix multiplication, [T]^T[K_L][T], we obtain [K_G] as,

(13)   \begin{equation*}[K_G] = [T]^T[K_L][T] = \frac{EA}{L}\begin{bmatrix}c^2 &cs & -c^2 &-cs\\cs &s^2 & -cs &-s^2\\-c^2 & -cs & c^2 & cs\\-cs &-s^2 & cs & s^2\end{bmatrix}\end{equation*}

Now we can calculate a global element stiffness matrix for each element in our structure that encodes the orientation of the member. Once calculated, these can then be directly combined to build the primary structure stiffness matrix. 

3.2 Element A – Global Element Stiffness Matrix

Consider element A, Fig. 4. Note that the degrees of freedom at nodes 1 and 4 are shown in the local element reference frame. 

Truss-member-A | DegreeTutors.com
Fig. 4. Element A showing degrees of freedom in a local reference frame

For a member between nodes i and j, we define the angle of orientation, \theta as the angle (in radians) measured counter-clockwise between the positive global x-axis and the local x-axis, with node i at the origin where i<j. In this case, that makes \theta = 5.3 radians (303.7^\circ). Noting that element A is 7.211 m long, we can use equation 13 to obtain the global element stiffness matrix, 

(14)   \begin{equation*}[K_{G,A}] = EA\begin{bmatrix}0.0427 & -0.0640 & -0.0427 & 0.0640\\-0.0640 & 0.0960 & 0.0640 & -0.0960\\-0.0427 & 0.0640 & 0.0427 & -0.0640\\0.0640 & -0.0960 & -0.0640 & 0.0960\end{bmatrix}\end{equation*}

3.3 Element B – Global Element Stiffness Matrix

For element B, Fig. 5, we have \theta=4.71 radians (270^\circ). With a length of 6 m, we have,

(15)   \begin{equation*}[K_{G,B}] = EA\begin{bmatrix}0.0000 & 0.0000 & 0.0000 & 0.0000\\0.0000 & 0.1667 & 0.0000 & -0.1667\\0.0000 & 0.0000 & 0.0000 & 0.0000\\0.0000 & -0.1667 & 0.0000 & 0.1667\end{bmatrix}\end{equation*}

Truss-member-B | DegreeTutors.com
Fig. 5. Element B showing degrees of freedom in a local reference frame

3.4 Element C – Global Element Stiffness Matrix

Element C, Fig. 6, has an angle of orientation \theta = 4.12 radians (236^\circ) and length of  7.211 m. This gives us a global element stiffness matrix of,

(16)   \begin{equation*}[K_{G,C}] = EA\begin{bmatrix}0.0427 & 0.0640 & -0.0427 & -0.0640\\0.0640 & 0.0960 & -0.0640 & -0.0960\\-0.0427 & -0.0640 & 0.0427 & 0.0640\\-0.0640 & -0.0960 & 0.0640 & 0.0960\end{bmatrix}\end{equation*}

Truss-member-C | DegreeTutors.com
Fig. 6. Element C showing degrees of freedom in a local reference frame

3.5 Building the Primary Structure Stiffness Matrix

Next we’ll work our way through building the primary structure stiffness matrix. This is usually the part of the process most prone to error so we’ll approach it in a methodical step-by-step fashion to cut down the likelihood of errors.

Step 1: Break the element stiffness matrices into quadrants

Each element stiffness matrix is 4\times 4, so we’ll break each one up into 2\times 2 quadrants. So element A for example would be divided as follows,

(17)   \begin{equation*}[K_{G,A}] = EA\begin{bmatrix}0.0427 & -0.0640 & -0.0427 & 0.0640\\-0.0640 & 0.0960 & 0.0640 & -0.0960\\-0.0427 & 0.0640 & 0.0427 & -0.0640\\0.0640 & -0.0960 & -0.0640 & 0.0960\end{bmatrix} =EA\begin{bmatrix}K_A11 & K_A12\\K_A21 & K_A22\end{bmatrix}\end{equation*}

where, 

(18)   \begin{equation*}[K_A11] = EA\begin{bmatrix}0.0427 & -0.0640 \\-0.0640 & 0.0960 \\\end{bmatrix}\end{equation*}

(19)   \begin{equation*}[K_A12] = EA\begin{bmatrix}-0.0427 & 0.0640\\0.0640 & -0.0960\\\end{bmatrix}\end{equation*}

(20)   \begin{equation*}[K_A21] = EA\begin{bmatrix}-0.0427 & 0.0640\\0.0640 & -0.0960\end{bmatrix}\end{equation*}

(21)   \begin{equation*}[K_A22] = EA\begin{bmatrix}0.0427 & -0.0640\\-0.0640 & 0.0960\end{bmatrix}\end{equation*}

The same subdivision process is repeated for each member of our structure.

Step 2: Set up the primary stiffness matrix template

Now we can set up a template for the primary stiffness matrix that will make it easy to see where the quadrants of our element stiffness matrices slot in. Since our structure has 4 nodes, our template will be 4\times 4, for now we can fill it with placeholders as follows,

(22)   \begin{equation*}[K_P] = \begin{bmatrix}k_{11} & k_{12} & k_{13} & k_{14}\\k_{21} & k_{22} & k_{23} & k_{24}\\k_{31} & k_{32} & k_{33} & k_{34}\\k_{41} & k_{42} & k_{43} & k_{44}\\\end{bmatrix}\end{equation*}

Each element in the template above actually represents a 2\times 2 matrix, so this template actually represents an 8\times 8 primary structure stiffness matrix, when filled in. 

Step 3: Fill in the template with the quadrants of the element stiffness matrices

Now we can take the quadrants of the element stiffness matrices and slot them into the relevant positions in the primary stiffness matrix template. For each member, identify the node numbers at each end of the member, this defines the rows and columns into which that member’s quadrants fit. More specifically, the quadrants of the element stiffness matrix are positioned at the intersection of the rows and columns identified by the node numbers. Consider member A as an example; it joins nodes 1 and 4, and so it contributes to the primary stiffness matrix as follows, 

Stiffness-member-A | DegreeTutors.com
Fig. 7. Contribution of element A to the primary stiffness matrix template

We follow the exact same process to add all of the element stiffness matrices into the primary stiffness matrix. Notice that every time we add the contribution from another member, we end up adding to element k44. Based on our earlier discussion of the direct stiffness method concept, this makes sense as all members meet at node 4 and therefore contribute to the behaviour of that node. We can see how the primary stiffness matrix evolves with the addition of each member. After adding element A, we have,

(23)   \begin{equation*}K_P = EA\begin{bmatrix}0.0427 & -0.0640 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & -0.0427 & 0.0640\\-0.0640 & 0.0960 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0640 & -0.0960\\0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000\\0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000\\0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000\\0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 &0.0000\\-0.0427 & 0.0640 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0427 & -0.0640\\0.0640 & -0.0960 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & -0.0640 & 0.0960\end{bmatrix}\end{equation*}

Notice that the matrix is full of zeros, except for the quadrants (four corners) associated with nodes 1 and 4. After adding element B we obtain,

(24)   \begin{equation*}K_P = EA\begin{bmatrix}0.0427 & -0.0640 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & -0.0427 & 0.0640\\-0.0640 & 0.0960 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0640 & -0.0960\\0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000\\0.0000 & 0.0000 & 0.0000 & 0.1667 & 0.0000 & 0.0000 & 0.0000 & -0.1667\\0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000\\0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0000\\-0.0427 & 0.0640 & 0.0000 & 0.0000 & 0.0000 & 0.0000 & 0.0427 & -0.0640\\0.0640& -0.0960 & 0.0000 & -0.1667 & 0.0000 & 0.0000 & -0.0640 & 0.2627\end{bmatrix}\end{equation*}

Finally after adding element C we have the full primary element stiffness matrix. This matrix is essentially our structural model and the link between force and displacement for the entire structure,

(25)   \begin{equation*}K_P = EA\begin{bmatrix}0.0427& -0.0640& 0.0000& 0.0000& 0.0000& 0.0000& -0.0427& 0.0640\\-0.0640& 0.0960& 0.0000& 0.0000& 0.0000& 0.0000& 0.0640& -0.0960\\0.0000& 0.0000& 0.0000& 0.0000& 0.0000& 0.0000& 0.0000& 0.0000\\0.0000& 0.0000& 0.0000& 0.1667& 0.0000& 0.0000& 0.0000& -0.1667\\0.0000& 0.0000& 0.0000& 0.0000& 0.0427& 0.0640& -0.0427& -0.0640\\0.0000& 0.0000& 0.0000& 0.0000& 0.0640& 0.0960& -0.0640& -0.0960\\-0.0427& 0.0640& 0.0000& 0.0000& -0.0427& -0.0640& 0.0853& 0.0000\\0.0640& -0.0960& 0.0000& -0.1667& -0.0640& -0.0960& 0.0000& 0.3587\end{bmatrix}\end{equation*}

3.6 Imposing Boundary Conditions on our Model

At this stage it’s worth taking stock of where we are; we’ve fully modelled the force displacement relationship for our structure and we effectively have the hard work done. Now it’s just a matter of crunching the numbers to solve for our deflections, reactions and member forces.

Taking another look at our problem, we note that we have 14 variables which consist of 8 degrees of freedom/displacements and 6 reactions. But we haven’t taken into consideration yet the fact that 6 of our degrees of freedom are constrained to be zero by our supports, i.e. degree of freedom 1, 2, 3, 4, 5, and 6 are fully restrained by pin supports at nodes 1, 2 and 3. As a result, we actually only have 14-6 = 8 unknowns to solve for. This ties up nicely with the fact that we have a system of 8 simultaneous equations we can use to identify our unknowns. Our system of 8 simultaneous equations is as follows,

(26)   \begin{equation*}\begin{Bmatrix}F_{x,G,1}\\F_{y,G,1}\\F_{x,G,2}\\F_{y,G,2}\\F_{x,G,3}\\F_{y,G,3}\\F_{x,G,4}\\F_{y,G,4}\\\end{Bmatrix}= \underbrace{EA\begin{bmatrix}0.0427& -0.0640& 0.0000& 0.0000& 0.0000& 0.0000& -0.0427& 0.0640\\-0.0640& 0.0960& 0.0000& 0.0000& 0.0000& 0.0000& 0.0640& -0.0960\\0.0000& 0.0000& 0.0000& 0.0000& 0.0000& 0.0000& 0.0000& 0.0000\\0.0000& 0.0000& 0.0000& 0.1667& 0.0000& 0.0000& 0.0000& -0.1667\\0.0000& 0.0000& 0.0000& 0.0000& 0.0427& 0.0640& -0.0427& -0.0640\\0.0000& 0.0000& 0.0000& 0.0000& 0.0640& 0.0960& -0.0640& -0.0960\\-0.0427& 0.0640& 0.0000& 0.0000& -0.0427& -0.0640& 0.0853& 0.0000\\0.0640& -0.0960& 0.0000& -0.1667& -0.0640& -0.0960& 0.0000& 0.3587\end{bmatrix}}_{\text{Primary structure stiffness matrix}}\begin{Bmatrix}u_{x,G,1}\\u_{y,G,1}\\u_{x,G,2}\\u_{y,G,2}\\u_{x,G,3}\\u_{y,G,3}\\u_{x,G,4}\\u_{y,G,4}\\\end{Bmatrix}\end{equation*}

Before we try and solve this system of equations, we have one more issue to take care of. We need to impose the known displacements onto our system of equations. Again, we do this in quite a systematic way by placing 1 in the diagonal corresponding to known zero displacement and 0 in all other elements of corresponding rows and columns of the primary stiffness matrix.  We also place 0 in the corresponding elements of the force vector. So in our case, considering the x and y displacement for nodes 1, 2 and 3, (corresponding to degrees of freedom 16) are zero, our system of equations becomes,

(27)   \begin{equation*}\begin{Bmatrix}0\\0\\0\\0\\0\\0\\F_{x,G,4}\\F_{y,G,4}\\\end{Bmatrix}= \underbrace{EA\begin{bmatrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0.0853 & 0.0000\\0 & 0 & 0 & 0& 0 & 0 & 0.0000 & 0.3587\end{bmatrix}}_{\text{Structure stiffness matrix},[K_S]}\begin{Bmatrix}u_{x,G,1}\\u_{y,G,1}\\u_{x,G,2}\\u_{y,G,2}\\u_{x,G,3}\\u_{y,G,3}\\u_{x,G,4}\\u_{y,G,4}\\\end{Bmatrix}\end{equation*}

We define this ‘reduced’ stiffness matrix, the Structure Stiffness Matrix, [K_S], dropping the ‘primary’ to differentiate it from the original primary stiffness matrix. We can see that placing zeros in the primary stiffness matrix rows imposes the boundary conditions,

(28)   \begin{align*}0=&1\times u_{x,G,1}\\0=&1\times u_{y,G,1}\\0=&1\times u_{x,G,2}\\0=&1\times u_{y,G,2}\\0=&1\times u_{x,G,3}\\0=&1\times u_{y,G,3}\\\end{align*}

While placing zeros in the primary stiffness matrix columns ensures known displacements remain zero in subsequent calculations, e.g. consider row 7,

(29)   \begin{equation*}F_{x,G,2} = EA[(0\times u_{x,G,1}) + (0\times u_{y,G,1}) + (0\times u_{x,G,2}) + (0\times u_{y,G,2}) + (0\times u_{x,G,3}) + (0\times u_{y,G,3}) + (0.0853\times u_{x,G,4}) + (0.3587\times u_{y,G,4})]\end{equation*}

After our boundary conditions are imposed, we can condense our system of equations and substitute in values for the forces at node 4, 

(30)   \begin{equation*}\begin{Bmatrix}100\times 10^3\\-100\times 10^3\end{Bmatrix}=EA\begin{bmatrix}0.0853 & 0.0000\\0.0000 & 0.3587\end{bmatrix}\begin{Bmatrix}u_{x,G,4}\\u_{y,G,4}\end{Bmatrix}\end{equation*}

We can then solve this system of 2 simultaneous equations by inverting the structure stiffness matrix,

(31)   \begin{equation*}\underbrace{\frac{1}{EA}\begin{bmatrix}0.0853 & 0.0000\\0.0000 & 0.3587\end{bmatrix}}_{[K_S]^{-1}}\underbrace{\begin{Bmatrix}100\times 10^3\\-100\times 10^3\end{Bmatrix}}_{F_G} = \underbrace{\begin{Bmatrix}u_{x,G,4}\\u_{y,G,4}\end{Bmatrix}}_{u_G}\end{equation*}

(32)   \begin{equation*}\begin{Bmatrix}u_{x,G,4}\\u_{y,G,4}\end{Bmatrix} = \frac{1}{EA}\begin{Bmatrix}1172\times 10^3\\-279\times 10^3\end{Bmatrix}\end{equation*}

Note that the horizontal displacement is positive, indicating that it acts to the right, according to our global axis system. Similarly the negative value for vertical displacement indicates a downward pointing displacement.

Remember that these are the values of displacement that simultaneously satisfy the force-displacement model for each member that connects into node 4. It’s also worth noting that at no point did the fact that the truss us statically indeterminate feature in our discussion. This is one of the great advantages that this analysis technique has over other analysis methods that rely on equations of equilibrium (method of sections and joint resolution). Before we can call this analysis complete, we need to work out our reactions and internal member forces. 

3.7 Calculating Reactions

Calculating reactions is simply a matter of substituting our known displacements back into our full structural model, i.e. the force-displacement relationship that uses the primary structure stiffness matrix,

(33)   \begin{equation*}\begin{Bmatrix}F_{x,G,1}\\F_{y,G,1}\\F_{x,G,2}\\F_{y,G,2}\\F_{x,G,3}\\F_{y,G,3}\\F_{x,G,4}\\F_{y,G,4}\end{Bmatrix}= \underbrace{EA\begin{bmatrix}0.0427& -0.0640& 0.0000& 0.0000& 0.0000& 0.0000& -0.0427& 0.0640\\-0.0640& 0.0960& 0.0000& 0.0000& 0.0000& 0.0000& 0.0640& -0.0960\\0.0000& 0.0000& 0.0000& 0.0000& 0.0000& 0.0000& 0.0000& 0.0000\\0.0000& 0.0000& 0.0000& 0.1667& 0.0000& 0.0000& 0.0000& -0.1667\\0.0000& 0.0000& 0.0000& 0.0000& 0.0427& 0.0640& -0.0427& -0.0640\\0.0000& 0.0000& 0.0000& 0.0000& 0.0640& 0.0960& -0.0640& -0.0960\\-0.0427& 0.0640& 0.0000& 0.0000& -0.0427& -0.0640& 0.0853& 0.0000\\0.0640& -0.0960& 0.0000& -0.1667& -0.0640& -0.0960& 0.0000& 0.3587\end{bmatrix}}_{\text{Primary structure stiffness matrix}}\underbrace{\begin{Bmatrix}0\\0\\0\\0\\0\\0\\\frac{1172\times 10^3}{EA}\\\frac{-279\times 10^3}{EA}\\\end{Bmatrix}}_{\text{Known displacements}}\end{equation*}

From this we directly obtain the vector of forces which contain the reactions,

(34)   \begin{equation*}\begin{Bmatrix}F_{x,G,1}\\F_{y,G,1}\\F_{x,G,2}\\F_{y,G,2}\\F_{x,G,3}\\F_{y,G,3}\\F_{x,G,4}\\F_{y,G,4}\\\end{Bmatrix} = \begin{Bmatrix}-67.84\times 10^3\\101.77\times 10^3\\0\\46.47\times 10^3\\-32.16\times 10^3\\-48.23\times 10^3\\100\times 10^3\\-100\times 10^3\\\end{Bmatrix}\end{equation*}

At this stage, it’s helpful to visualise these on the structure, Fig. 8.

Truss-reactions | DegreeTutors.com
Fig. 8. Truss reactions

3.8 Solving for Truss Member Forces

In order to solve for the internal axial force in each member, we return back to where it all began…recall equation 1,

(35)   \begin{equation*}F = k\times \delta\end{equation*}

To be a little more precise, we can say that the force in the element between nodes i and j is given by,

(36)   \begin{equation*}F_{i,j} = \frac{EA}{L}(u_{x,L,j}-u_{x,L,i})\end{equation*}

This requires us to convert our calculated global displacements at node i and j back into local displacements measured in the local element reference frame using our transformation matrix from above.

(37)   \begin{equation*}\begin{Bmatrix}u_{x,L,1}\\u_{x,L,4}\\\end{Bmatrix}= [T]\begin{Bmatrix}u_{x,G,1}\\u_{y,G,1}\\u_{x,G,4}\\u_{y,G,4}\\\end{Bmatrix} = [T]\begin{Bmatrix}0\\0\\\frac{1172\times 10^3}{EA}\\\frac{-279\times 10^3}{EA}\\\end{Bmatrix}\end{equation*}

So for element A with \theta=5.3 radians, we have,

(38)   \begin{equation*}\begin{Bmatrix}u_{x,L,1}\\u_{x,L,4}\\\end{Bmatrix}= \frac{1}{EA}\begin{Bmatrix}0\\882\times 10^3\end{Bmatrix}\end{equation*}

Using these displacements in equation 36, we obtain the axial force in element A, 

(39)   \begin{equation*}F_{1,4} &= \frac{EA}{7.211}(\frac{882\times 10^3}{EA})\\\end{equation*}


(40)   \begin{equation*}F_{1,4} &= 122.31\:kN\end{equation*}

We can repeat the exact same process for elements B and C to obtain their axial forces as F_{2,4} = 46.47\:kN and F_{3,4} = -57.97\:kN respectively. The negative sign here indicating compression rather than tension in the element. 

That more or less wraps up our example analysis – we’ve solved for all unknown displacements, reactions and member forces. As a final task, we can substitute in values for Young’s modulus E=200\times 10^9 \:N/m^2 and cross-sectional area A=0.005\:m^2. Doing this we obtain the following deflections for node 4 (obviously the reactions and member forces are unchanged) ,

(41)   \begin{equation*}\begin{Bmatrix}u_{x,G,4}\\u_{y,G,4}\\\end{Bmatrix} =\begin{Bmatrix}1.17\times 10^{-3}\:m\\-0.28\times 10^{-3}\:m\\\end{Bmatrix}\end{equation*}

We can visualise these results below, Fig. 9.

Truss-analysis-plots | DegreeTutors.com
Fig. 9. (Top) Deflected shape with \times 200 magnification. (Bottom) Axial force diagram in which reds indicate compression and blues indicate tension. Produced using codes from The Direct Stiffness Method for Truss Analysis with Python online course.

3.9 Implementing the Direct Stiffness Method in Practice

As you can see, once we nail down the basic underlying principles, the direct stiffness method really is quite a simple analysis technique. You might also have recognised the one major bottleneck with this approach…inverting the structure stiffness matrix. In our example, this was a 2\times 2 matrix, relatively trivial to invert. But as the number of nodes in our structure increases, so too does the size of the matrix we need to invert. We very quickly reach a point where we need to resort to computers to do the computational heavy lifting.

The upside here is that once we implement the solution process in an algorithm, the task of solving structures we wouldn’t even consider by hand, becomes quick and easy! You essentially implement your own structural analysis software. The 3D transmission tower, Fig. 10. is analysed using the same methods we discussed above. It’s really only when we implement the direct stiffness method in an algorithm that its power and scalability really shine through. 

Transmission-tower | DegreeTutors.com
Fig. 10. Three dimensional model of a transmission tower analysed using the direct stiffness method. This analysis is an extract from the online course 3D Space Frame Analysis using Python and Blender.

4.0 Implementing the Direct Stiffness Method – Where to Next?

Now that you understand conceptually how the direct stiffness method works, why not build on this and build a practical implementation. In the three DegreeTutors courses listed below, we work our way through building out a complete suite of analysis codes using Python (if you’re new to Python – no problem!). We start with with 2D plane trusses, then move on to beam and frame structures that experience bending and shear before expanding into full 3D space frame structures. After completing this suite of courses you’ll have the knowledge and practical tools to analyse a huge range of structures without resorting to commercial structural analysis software. And if you do use commercial software, you’ll understand exactly how it’s working behind the scenes.

Save 35% with the Direct Stiffness Method Bundle

The Direct Stiffness Method for Truss Analysis with Python | DegreeTutors.com
Play Video

The Direct Stiffness Method for Truss Analysis with Python

Build your own finite element truss analysis software using Python and tackle large scale structures.

After completing this course…

  • You’ll understand how to use the Direct Stiffness Method to build complete structural models that can be solved using Python.
  • You’ll have your own analysis programme to identify displacements, reactions and internal member forces for any truss.
  • You’ll understand how common models of elastic behaviour such as plane stress and plane strain apply to real-world structures.
Play Video

Beam & Frame Analysis using the Direct Stiffness Method in Python

Build a sophisticated structural analysis software tool that models beams and frames using Python.

After completing this course…

  • You’ll understand how to model beam elements that resist axial force, shear forces and bending moments within the Direct Stiffness Method.
  • You’ll have your own analysis software that can generate shear force diagrams, bending moment diagrams, deflected shapes and more.
  • You’ll understand how to model rotational pins within your structures, inter-nodal distributed loading and realistic flexible supports.
Play Video

3D Space Frame Analysis using Python and Blender

Develop tools to model and analyse complex 3D space frame structures using Python.

After completing this course…

  • You’ll understand how to apply the Direct Stiffness Method to solve 3D space frame structures.
  • You’ll have your own analysis programme to identify displacements, reactions and internal member forces for any 3D space frame.
  • You’ll be able to use Blender, a powerful open source 3D modelling software to build, visualise and export your structural models.