Using Spreadsheets to Demonstrate the Stiffness Method in Structural Analysis

Peter W. Hoadley[1]

Abstract

A course in matrix methods of structural analysis has become a standard elective for undergraduate civil engineering students especially since the advent of the personal computer. Teaching a student to program the stiffness method using FORTRAN or BASIC is a tedious task. Students often lose sight of the process as they struggle with logic and syntax. The spreadsheet is a tool that allows students to better visualize the logic and reduces the work necessary to eliminate syntax errors. . This paper describes how spreadsheet software was used to demonstrate the stiffness method of structural analysis to a class of senior level civil engineering students. The process is described for a simple truss, a simple frame and a shear wall. The success of using the spreadsheet is discussed along with some of the problems encountered.

Introduction

The heart of the stiffness method of structural analysis is the solution of a large system of equilibrium equations. This large system of equations is developed from simple element matrices that represent relationships between member forces and displacements in a global axis system. This process has been programmed in commercial software. The user need only provide information regarding geometry, material and cross-sectional properties, loads and boundary conditions. These software are useful in showing students what can be done with the stiffness method but are not useful in demonstrating the process involved.

The spreadsheet is the perfect tool to demonstrate the basics of the stiffness method. This paper describes how spreadsheet software was used to demonstrate the stiffness method of structural analysis to a class of senior level civil engineering students. A working knowledge of the stiffness method of structural analysis is assumed since space precludes a full description of the process. Detailed explanations of the stiffness method may be found in several texts (Laursen, 1988, Logan, 1992, McCormac and Nelson, 1997, McGuire, Gallagher and Ziemian, 2000). The stiffness method of structural analysis was developed fully in class for a simple truss, a frame and a shear wall. The development of the stiffness method for a simple truss is described here followed by a brief discussion of the frame and shear wall.

Development of the Stiffness Method for a Simple Truss

Analysis of 2D Trusses

The analysis of a simple truss using the stiffness method may be divided into eight steps:

  1. Development of the local member stiffness matrices, [LMSM]
  2. Development of the transformation matrices, [B], [B]T
  3. Development of the global member stiffness matrices, [GMSM]
  4. Development of the global structure stiffness matrix, [GSSM]
  5. Development of the load/reaction vector, {P}
  6. Modification for boundary conditions
  7. Solution of the final system of equations for nodal deformations
  8. Computation of member forces

Development of the local member stiffness matrices, [LMSM]

The local member stiffness matrix, [LMSM], for a truss is composed of the positive or negative value of the member stiffness, ± AE/L, where A is the cross-sectional area, E is the modulus and L is the length. The spreadsheet is an excellent tool to help a student organize the necessary input data. Figure 1 shows a spreadsheet that allows the user to input the necessary data to create the [LMSM] for each member of the simple three-bar truss shown. For example, the truss in Fig. 1 has nodes at (0,0), (5,9) and 12, 5) where units are in feet. The area (units in f2) and modulus (ksf) must be provided by the user. The spreadsheet computes the length of the member from the nodal coordinates then computes the member stiffness, as shown in bold the table. These stiffnesses are used to create the [LMSM]. The [LMSM] for member 1 is shown in Fig. 2.

Development of the transformation matrices, [B], [B]T

The local member stiffness matrix relates axial force, P, in a member to axial deformation, ∆. One must transform the [LMSM] into global coordinates that relate horizontal and vertical nodal displacements to horizontal and vertical forces. The matrices necessary to transform the [LMSM] consist of the cosine and sine of a member’s angle with respect to the horizontal. The angle is computed from nodal coordinates as shown in Fig. 1. Figure 2 shows the transformation matrices for displacement and force.

Development of the global member stiffness matrices, [GMSM]

The [LMSM] is pre-multiplied by the transformation matrix for force, [B]T, and post-multiplied by the transformation matrix for displacement, [B], to create the global member stiffness matrix, [GMSM]. These matrices can be created by the spreadsheet and all matrix operations can be performed by the spreadsheet. The resulting matrices are shown in Fig. 2. The [GMSM] relates nodal forces and displacements in the global axis system.


Development of the global member stiffness matrices, [GSSM]

The global structure stiffness matrix [GSSM] can be created by writing equilibrium equations at each node. The rows of the [GSSM] represent a given equilibrium equation. The terms in the [GSSM] come from the global member stiffness matrices [GMSM] for each member framing into a node.

In order to create the [GSSM] one begins with an empty matrix. The [GMSM] for each member is considered one at a time. The terms in the [GMSM] are placed in the appropriate place in the [GSSM]. The process is not described here but was demonstrated in detail in class. The spreadsheet is an ideal tool for executing this process. For a given configuration the process may be automated but the student was required to create the [GSSM] by hand given the [GMSM] for each member. The [GSSM] is shown in Fig. 3 for the current example.

Development of the load/reaction vector, {P}

As stated, the [GSSM] is composed of equilibrium equations at the nodes. The sum of the internal member forces must be in equilibrium with the external loads and reactions. At this point the load/reactions vector, {P} may be created. This is a relatively simple vector and can be generated by hand. Given a certain configuration, a spreadsheet may generate the {P} vector from the input data. Note that nodal forces F1 and F2 for the given example are shown in Figure 1 and must be provided by the student. Figure 3 shows the load and reaction vector for the current example.

Modification for boundary conditions

In order to solve this system of equations some of the equilibrium equations must be replaced by boundary conditions. The [GSSM] becomes a combination of equilibrium equations and boundary conditions and the {P} vector becomes a combination of known external loads and known displacements. This is a relatively simple process and may be done by hand. Given a certain configuration the spreadsheet can perform the operations automatically. Figure 3 shows the modified system of equations.

Solution of the final system of equations for global deformations at the nodes

This modified system of equations may be solved for the horizontal and vertical deformations at the nodes. The vector containing the known external loads and known deformations is pre-multiplied by the inverse of the modified [GSSM]. The spreadsheet is capable of performing all these computations. The nodal deformations for the current example are shown in Fig. 3.

Computation of member forces

The nodal deformations for each member may be obtained from the solution vector. These horizontal and vertical deformations may be transformed into axial deformations by pre-multiplying by the transformation matrix for displacement. The member axial load may be obtained by pre-multiplying the axial deformations by the local member stiffness matrix. All the information is contained in the spreadsheet and the spreadsheet may be programmed to perform all operations. This process is shown in Fig. 2 for member 1 for the current example. The example presented here may be found in an Excel© spreadsheet at “Three-bar truss.xls”.

Student Stumbling Blocks

The students had a difficult time understanding the repetitive nature of the [LMSM] and the power of the spreadsheet to make repetitive calculations. They had a tendency to treat every [LMSM] as a unique entity. Several students would compute member stiffnesses with their calculators and input the number into the [LMSM] rather than using the spreadsheet to make those calculations from the input data.

The students were happy to use the matrix multiplication capabilities of the spreadsheet be cause they realized that this is much too difficult to do with a calculator. At this point I often tell my students that when I was in their place I had to multiply matrices with a slide rule! It is inter-


esting to note that a student will take advantage of a spreadsheet’s capabilities only when it is too difficult to do the task by hand.

Students had difficulty understanding the process of building the global structure stiffness matrix, [GSSM]. This is understandable since it is a rather mysterious operation. The process consists of picking apart the member stiffness matrices and reassembling them into the global structural stiffness matrix. Once the process is begun neither the member matrix nor the structure matrix is recognizable. The [GSSM] is best comprehended when complete.

One who watches an artist create an impressionist painting has a similar problem. The artist places a dab of blue paint here and a dash of red paint there and so on. To the external observer, the patches of color make little sense but the artist understands the purpose of each dab of color since he has the entire painting in mind. The external observer might better understand the purpose of each stroke of the artist if he had the final painting before him. In the same way, it helps to present initially to the student the [GSSM] in its completed form and then demonstrate how it got that way.

Initially the students seemed to understand the modifications necessary for boundary conditions but many were unable to properly modify a [GSSM] given a different set of boundary conditions

Development of the Stiffness Method for a Simple Frame

Analysis of 2D Frames

The analysis of a simple frame using the stiffness method may be divided into eleven steps:

1. Development of the local member stiffness matrices, [LMSM]

2. Development of the local fixed-end moment vector (If member loads exist)

3. Development of the transformation matrices, [B], [B]T

4. Development of the global member stiffness matrices, [GMSM]

5. Development of the global fixed-end moment vector (If member loads exist)

6. Development of the global structure stiffness matrix, [GSSM]

7. Development of the structure fixed-end moment vector (If member loads exist)

8. Development of the load/reaction vector, {P}

9. Modification for boundary conditions

10. Solution of the final system of equations for global deformations at the nodes

11. Computation of member forces

The steps are the same as for the truss except for the case when a member is loaded between the nodes. Of course the terms of the matrices are different since axial load, shear and moment must be considered. The process is not described here but an example may be found in an Excel© spreadsheet at “Three-bar Frame – Nodal Loads.xls.”

The process is presented first with a frame with only nodal loads. The process is modified by considering how member loads change the equilibrium equations at the nodes. The process is not described here but an example may be found at ““Three-bar Frame – Member Loads.xls.”

Most students seemed to understand the process even though the local member stiffness matrix for a bending member is more complicated than that for a truss. The addition of member loads is difficult to understand because the equilibrium equations become more complicated. It seems that the best way to help students understand the process is to have them complete as many examples as possible. Students best become familiar with the process the more they use it.

Development of the Stiffness Method for a Continuum

Development of the CST

The structural analysis of a continuum, like a shear wall or a flat plate, is similar to that of a linear structure in that the goal is to relate forces and displacements; however, the process of developing these relationships is very different. For the continuum, the equilibrium equations are developed by using energy principles. This process is very difficult for undergraduates to understand but it is important to introduce this process since it is the foundation of the finite element method.

The development of the stiffness method for a continuum may be divided into eight steps:

1. Assume that the deformations at a specified number of points within a continuum are known.

2. Estimate deformations everywhere else within the continuum using interpolation functions.

3. Estimate strains everywhere within the continuum from the interpolation functions.

4. Estimate stresses everywhere within the continuum from the estimated strains.

5. Develop the equilibrium equations by equating internal work (strain energy) with external work.

6. Modify the equilibrium equations for boundary conditions.

7. Solve for nodal deformations.

8. Compute nodal stresses and strains.

Interpolation formulas

Before students can understand the finite element method they must understand interpolation functions. For simplicity, linear interpolation functions were used with a triangular continuum as shown in Fig. 4. If the in-plane horizontal and vertical deformations are known at the vertices of the triangle, the deformations everywhere within the triangle can be estimated using the following:

u(x,y) = a1 + a2x + a3y

v(x,y) = b1 + b2x + b3y

where u and v are horizontal and vertical deformations, x and y are coordinates of a point within the continuum and the coefficients a and b are a function of the nodal deformations. The computation of the coefficients a and b is discussed in class but will not be discussed here.

Since this is such an important concept for students to grasp it is useful to have the students plot the deformed shapes of triangles given deformations of the vertices and to compute deformations within the triangle. For example consider the triangle in Fig. 4 with the deformations at the vertices shown in Table 1. The deformed shape of the triangle is shown in the Fig. 4 and the interpolation functions are: