0% found this document useful (0 votes)
203 views17 pages

A Transformational Approach To Teaching Matrix Structural Analysis

A Transformational Approach to Teaching Matrix Structural Analysis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
203 views17 pages

A Transformational Approach To Teaching Matrix Structural Analysis

A Transformational Approach to Teaching Matrix Structural Analysis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

18th Analysis and Computation Specialty Conference © 2008 ASCE

A Transformational Approach to Teaching Matrix Structural Analysis,


and Visual Implementation using Mathcad

Author:

Finley A. Charney, Virginia Tech, Blacksburg VA, [email protected]

INTRODUCTION

At most universities, matrix methods of structural analysis are taught in the senior year, or in the
first year of graduate study. For students taking the course, the material may be very challenging
because it has been several semesters since they have taken the prerequisite courses (generally
linear algebra and theory of structures). More problematically the course is challenging because
many of the students have had little exposure to computer programming.
At Virginia Tech, the course Computer Methods of Structural Analysis I (CEE 4404) has
been designed to minimize these challenges, but still provide a firm theoretical basis in matrix
structural analysis. The theoretical basis of the course is rooted in the concepts of equilibrium,
compatibility, and superposition (requiring linear-elastic constitutive laws), and is presented in
the context of four different levels of “Scope” within a structure. A key aspect of the course is a
heavy reliance on a variety of mathematical transformations that relate the levels of scope to
each other. Because of the reliance on transformations, the methodology described in this paper
is termed the “Transformational Approach” to teaching matrix structural analysis.
The implementation of the method is facilitated through the use of the commercial
mathematics program Mathcad 1 . Mathcad is used in two ways; first as a visual matrix
manipulation tool, and second, as a framework for writing complete structural analysis programs.
While a variety of programming platforms could be used (e.g. C++, C#, Visual Basic, Matlab 2 ,
Mathematica 3 ) Mathcad was chosen because it is highly visual, relatively easy to learn, and is
widely used in the structural engineering profession.
By the end of the semester, quite complex problems may be solved with Mathcad, including
any two-dimensional structure incorporating frame or truss elements. Practically any type of
loading may be considered; shear deformations, rigid ends, and member end-releases may be
included; and a variety of constraints may be modeled. Aside from Mathcad, no commercial
structural analysis software is used in the course.

THEORETICAL BASIS

The theoretical material in the course is taught from the perspective of mathematical
transformations. These transformations are presented on the first day of class in the context of
the basic equilibrium equations (1a), and an expanded version of the same equations (1b).

KΔ = F (1a)

1
Product Development Company , Needham, MA.
2
The MathWorks, Inc., Natick, MA.
3
Wolfram Research, Champaign, IL.
18th Analysis and Computation Specialty Conference © 2008 ASCE

⎡ nels ⎤ nels

⎢∑ i i i i i i i ⎥
BU b k a T A Δ = P − ∑ BU ˆ
i i qi (1b)
⎣ i =1 ⎦ i =1

In (1a), K is the system stiffness matrix, F is a vector of nodal loads, and Δ is a vector
containing the displacements at the various degrees of freedom (DOF). In the expanded form,
the matrix product in the summation on the left hand side represents a progressive change of
scope, starting with the most fundamental "reduced" element stiffness k , and ending with the
same element ready for assembly into the system's global stiffness matrix. This expansion is
facilitated by displacement transformations a, T, and A, and by corresponding force
transformations b, U, and B. Similarly, the matrix product in the summation on the right hand
side expands the element fixed-end forces q̂ , enabling them to be added into the global force
vector. The limit nels in the summations of (1b) is the number of elements in the structure.
While (1b) is initially intimidating to most students, it may be easily explained through a
description of the various transformations that are involved. Each transformation relates two
adjacent levels of scope. For any element of any structure, there are only four levels of scope, as
indicated in Table 1, and as illustrated in Figure 1. Each level of scope consists of two parts; the
chosen degree-of-freedom set, and the reference coordinate system.

Level of Scope DOF Set Reference Coordinate Diacritical Identifier


System
1 (narrowest) Reduced Element Local Tilde (~)
2 Full Element Local Carat (^)
3 Full Element Global Overbar (-)
4 (broadest) Structure Global none
TABLE 1 - Levels of Scope used in Analysis of Any Structure

At Level 1, a reduced element DOF set is used. The physical model for this level of scope is
presented in Figure 1a for an element of a planar frame. All variables referring to this element
are presented with a tilde (~) diacritical mark. The term “reduced” indicates that a partial set of
element DOF are utilized. The basic requirements in choosing the reduced DOF set are that the
element be stable and statically determinate. For most elements there is some choice in the
selection of the active DOF set in the reduced element [McGuire, et al., 2000].
The first step in the Level 1 analysis is to develop the flexibility matrix d of the element.
Each column of d is found by applying a unit force at DOF j and computing the resulting
displacements di , j at each degree of freedom i. Once the flexibility matrix is found, the principle
of superposition is invoked to show that any displacement pattern can be represented as a linear
combination of the displacements arising from the unit forces:

δ =d f (2)

where δ is the nodal displacement vector resulting from applied nodal forces f . If the
individual terms in d are computed using virtual work, it is easy to show that d must be
18th Analysis and Computation Specialty Conference © 2008 ASCE

symmetric, because the only difference between di , j and d j ,i is that the real and virtual loadings
are switched when computing these terms.

(a) LEVEL-1 (b) LEVEL-2 ⎧ δˆi , x ⎫


2 2 5 ⎪ ⎪
⎪ δˆi , y ⎪
⎧δ x ⎫ ⎪ˆ ⎪
1 ⎪ ⎪
δ = ⎨δ y ⎬
3 6
4 ⎪ δi ,z ⎪
1 δˆ = ⎨ ⎬
⎪δ j , x ⎪
⎪δ ⎪ ˆ
y 3 ⎩ z⎭ ⎪ˆ ⎪
i y j ⎪δ j , y ⎪
x ⎪δˆ ⎪
x ⎩ j,z ⎭
z z

⎧ i ⎫
(c) LEVEL-3 (d) LEVEL-4 ⎪ i ⎪
⎧δi,X ⎫ ⎪ ⎪
⎪ ⎪ ⎪ i ⎪
⎪ δ i ,Y ⎪ ⎪ ⎪
5 ⎪⎪ δ ⎪⎪ ⎪δ K , X ⎪
δ = ⎨ i,Z ⎬ s ⎪ δ K ,Y ⎪
⎪δ j , X ⎪ ⎪ ⎪
6
4 ⎪ δ j ,Y ⎪
t ⎪ δ K ,Z ⎪
r ⎪ i ⎪
⎪ ⎪
⎩⎪δ j , Z ⎭⎪ e ⎪⎪
δ =⎨ i ⎬
⎪⎪
2 j f
M
3 ⎪ i ⎪
1 d ⎪ ⎪
⎪δ M , X ⎪
⎪ ⎪
i K M ⎪ δ M ,Y ⎪
Y K ⎪δ M , Z ⎪
Y ⎪ ⎪
⎪ i ⎪
X X ⎪ i ⎪
Z Z ⎪ ⎪
⎩⎪ i ⎭⎪

FIGURE 1 - Levels of Scope for 2-D Frame Element

If both sides of (2) are premultiplied by the d −1 = k , the equilibrium equations for the
reduced element are formed:
kδ = f (3)

Before moving to the next level of scope, it is important to make a few points about the work
done at Level 1:

• Physically, the displacements δ in the element represent the deformations in the element.
• The flexibility d will also be used for the formulation of element fixed end forces
• Direct formulation of k is possible by imposing unit displacements at the various DOF.
In some cases, however, a statically indeterminate analysis is required. This difficulty is
avoided by forming d and inverting to form k (in which case the indeterminate nature of
the problem is handled "automatically" through the inversion process).
18th Analysis and Computation Specialty Conference © 2008 ASCE

At Level 2, a full element DOF set is used. Element DOF numbers are used, and the forces
and displacements are referenced in the element’s local coordinate system. Figure 1b shows the
Level 2 configuration for an element of a planar frame. At this level, all symbols referring to the
element are identified using a diacritical carat (^). The relationship between element forces and
displacements is as follows:

kˆδˆ = fˆ (4)

The element stiffness k̂ is singular because the element is completely unrestrained (allowing
rigid body displacements). The relationship between forces and displacements in the Level 1 and
Level 2 element reference systems are:

δ = aδˆ (5)
fˆ = bf (6)

where a is a displacement transformation matrix, and b is a force transformation matrix.


Equation 5 is a statement of compatibility, and equation 6 is a statement of equilibrium. Note
that the displacement transformation narrows the scope, and the force transformation broadens
the scope. This property is true for the displacement and force transformation pairs used at each
level.

Using (3) through (6), it may be seen that

k̂ = bka (7)

from which it is clear that transformations a and b must be the transpose of each other to
maintain symmetry in the stiffness. Hence,

a = bT (8)

This property, called contragradiency, is present for any pair of force and displacement
transformations (a and b, T and U, A and B), and may be proven mathematically using real work.
A mathematical proof for a = bT is presented the Appendix.

At Level 3, a full element DOF set is used, just as in Level 2, but the displacements and
forces are referenced in the global coordinate system instead of the element's local system. This
scope, illustrated in Figure 1c, is referenced by a diacritical overbar (-). The relationship
between element forces and displacements at Level 3 is:

kδ = f (9)

The order of the element stiffness matrix is always equal to the total number of element DOF
(e.g. six (6) for the planar frame element), and the element stiffness k is singular because the
18th Analysis and Computation Specialty Conference © 2008 ASCE

element is unrestrained. The relationship between forces and displacements in the Level 2 and
Level 3 reference systems is:

δˆ = T δ (10)
f = Ufˆ (11)

where T transforms displacements from global to local coordinates, and U transforms forces
from local to global coordinates. Equation 10 is a statement of compatibility, and equation 11 is
a statement of equilibrium. Contragradiency requires that the U and T transformations satisfy the
following relationship
U = TT (12)

For the planar frame element, T and U are square matrices, and satisfy the orthogonality
condition

U UT = T TT = I (13)

Using the equations presented above, it may be seen that

k = UkT
ˆ = UbkaT (14)

At Level 4, the full element DOF set is used. Displacements and forces are referenced in the
global coordinate system using the structure’s DOF set (using the structure's DOF numbering).
At this level of scope, variables are presented without a diacritical mark because the scope is at
the highest possible level. The Level 4 scope for a planar frame element is illustrated in Figure
1d.

The relationship between element forces and displacements at the Level 4 scope is:

kδ = f (15)

The order of k in (15) is neq by neq, where neq is the number of degrees of freedom in the
structure. The displacement vector, δ, is in essence a copy of the global displacement vector
Δ (only the displacements at the relevant DOF are included, all others are zero). At this scope, k
is extremely sparse for large systems. In actual computer programs, this form of the element
stiffness is never explicitly formed. This fact will be elaborated upon later. The relationship
between forces and displacements in the Level 3 and Level 4 reference systems are:

δ = Aδ (16)
f = Bf (17)

where A is a displacement transformation and B is a force transformation. The use of the capital
"A" for the displacement transformation is a reminder that the principal use of this transformation
is Assembly. The A transformation maps structural DOF numbers to element DOF numbers, and
18th Analysis and Computation Specialty Conference © 2008 ASCE

enforces displacement compatibility at the nodes. The B transformation maps element DOF
numbers to structural DOF numbers, and enforces nodal equilibrium. As before, A and B satisfy
the contragradiency requirement

B=AT (18)

Using the equations presented above, it may be seen that

k = BkA = BUkTA
ˆ = BUbkaTA (19)

As mentioned earlier, k is sparse, as are the transformations A and B. The number of rows of
A is equal to the number of DOF in the Level 3 element, and the number of columns of A is equal
to the number of DOF in the structure. Term Ai,j maps the i DOF of the element to the j DOF in
the structure, and contains a one (1) if the structural degree of freedom is unrestrained. All other
terms in A are zero. A two-dimensional frame element, with six unrestrained DOF, will contain
at most six ones in it’s A transformation.
Use of A transformations and the element stiffness k is, of course, inefficient for analysis of
large structures. However, A is useful in explaining the assembly of the element into the
structure’s stiffness matrix, and is used as an explicit transformation early in the semester. Later,
A is abandoned in favor of the development of custom Mathcad routines (e.g. ADDK) that serve
the same function without wasting storage. For this reason, the A (and B) transformations are
referred to as “symbolic” when used in the context of (1b).

Assembly of Global Stiffness Matrix

In computer applications, only one transformation (e.g. only T is needed because U=TT) is
required at each level. Using only the displacement transformations, the structure’s stiffness
matrix is formed by summing the Level 4 stiffness at each element

nels nels
K = ∑ ki = ∑ AiT Ti T aiT ki aiTi Ai (20)
i =1 i =1

where nels is the number of elements in the structure. Note that the expanded summation in (20)
begins with the Level 1 element stiffness k . If desired, the expansion can begin one step back
with the reduced element flexibility d , which may be necessary for nonprismatic elements or
when shear deformations are to be included. In practice, the expansion typically begins at Level
2, wherein k̂ is used instead of aT ka .
The system stiffness matrix K will be singular if all DOF are unrestrained. To avoid
singularity, the structure must be restrained to eliminate rigid body displacements.

Member Loads

Member loads are handled through the use of fixed end forces and equivalent nodal loads. Fixed
end forces, q̂ , are typically implemented at the Level 2 scope. However, the derivation of the
18th Analysis and Computation Specialty Conference © 2008 ASCE

fixed end forces typically begins at Level 1, and is facilitated by the use of the reduced element
flexibility, d .
The fixed end forces are transformed first into the global coordinate system by use of TT (or
U), and then to the global system by AT (or B). Hence, each element's contribution to the global
fixed end force vector is
qi = BUqˆi = AT T T qˆi (21)

and the equivalent nodal force vector as contributed by all elements is:

nels
Q = −∑ qi (22)
i =1

The negative sign in front of the summation in (22) is physically related to the fact that the
equivalent nodal forces are effectively equilibrium unbalances that are imposed on the system by
the element fixed end forces. (These are the same unbalances that are iteratively eliminated in
the moment distribution procedure.)

Solving the Equilibrium Equations

In CEE 4404, very little information is given regarding the solution of the equilibrium equations
(1a). This is because Mathcad has several built-in functions for solving the equations. Students
are informed, however, that using the explicit inverse of K is extremely inefficient, and that some
form of Gaussian elimination (e.g. Choleski decomposition) is typically used to find the
displacements. Additionally, some information is also provided on efficient storage of K (e.g
using bandwidth minimization routines), and on the use of solvers that take advantage of the
sparseness of K. Frontal solvers and iterative solvers are also mentioned.

Recovering Element Forces

For structural design purposes, element forces are desired in the Level 2 system. These forces
consist of two parts. The first part is based on the element stiffness and the computed global
displacements:
ˆ δ = kTA
fˆ = kT ˆ δ (23)

where δ is the same as the global displacement vector, Δ. While the above operation could be
formed with actual A matrices, it is more efficient from a programming standpoint to write a
procedure to extract the relevant displacements δ from the global displacement vector.
The second part of the element force is the fixed-end force, q̂ . The total element force is the
sum of the parts;

fˆtotal = fˆ + qˆ (24)

After the element forces are found, the reactions are calculated by summing the element
forces at each DOF:
18th Analysis and Computation Specialty Conference © 2008 ASCE

nels
F = ∑ AiT Ti T ftotali (25)
i =1

Additional Transformations and Operations

In CEE 4404, two additional capabilities are provided on the element level. These include rigid
end zones and element end-releases. Rigid end zones are facilitated through the use of a separate
displacement transformation H. This transformation is applied at Level 2 as follows:

kˆE = H T kH
ˆ (25)

where the E subscript indicates that a rigid end formulation has been used.
End releases are provided not by transformations, but rather by three separate Mathcad
functions that incorporate a static condensation procedure developed by [Wilson, 2005]. The
first function operates on the element fixed-end forces, the second operates on the element
stiffness, and the third calls the first two in the proper sequence. This procedure, which is
executed in a recursive manner, allows any combination of end releases to be used.
While not formally a transformation, the incorporation of releases is represented
mathematically as a transformation as follows:

kˆR = RT kˆR (26)

where the R subscript indicates that a release has been applied. If the release operation is
performed after the rigid end transformation, the releases occur at the outer ends of the rigid
ends. If the release transformation is applied before the rigid end transformation, the releases are
placed at the interior ends of the rigid ends.
In addition to the features listed above, it is relatively easy to incorporate other features such
as spring supports, imposed nodal displacements, and nodal constraints.

Types of Structures Analyzed

In CEE 4404, the stiffness method is introduced through a hierarchy of increasingly complex
structures as follows (reading from left to right and then down):

1-D Bars 2-D Trusses 3-D Trusses


Continuous Beams 2-D Frames Planar Grids
3-D Space Frames

Complete structures are analyzed for all systems except Space Frames. For space frames the
element stiffness matrices k and k̂ , transformations a and b, and the displacement
transformation matrices T and U are derived, but are not used in the analysis of complete
structures. The main purpose of the discussion on 3-D Space frames relates to the mathematical
definition of the local axis set (using the well known k-node approach).
18th Analysis and Computation Specialty Conference © 2008 ASCE

IMPLEMENTATION IN MATHCAD

The direct stiffness method of structural analysis was developed for implementation on a
digital computer, and only a minimal amount of programming knowledge is needed to create
software that can analyze quite complex structural systems. There are a variety of programming
languages and methodologies that can be used, ranging from object oriented C++ at one extreme,
to mathematical scripting languages like Mathcad and Mathematica at the other extreme.
Programming languages like Matlab and Visual Basic (or Visual Basic for Applications as
implemented within Microsoft EXCEL) fall in between the two extremes.
Because most civil engineering students have had little or no programming experience prior
to taking a matrix structural analysis class, the mathematical scripting languages are the best
choice. After thoroughly reviewing the capabilities of all the potential programming
environments, Mathcad was chosen for use in CEE 4404 because it is easy to learn, and its
interface is highly visual in a "what you see is what you get" sense. This visual interface is
excellent from a teaching perspective because diagrams, code, manipulation of code, and
comments can be positioned almost arbitrarily on a worksheet.
Before continuing it is noted that many professors choose Matlab for use in matrix analysis
classes. This program was seriously considered for CEE 4404, but was ultimately not used
because its interface is rather cryptic compared to Mathcad. Additionally an informal survey of
fourteen major consulting firms indicated that Matlab is rarely used (only one firm used Matlab),
while Mathcad is quite common (ten of the firms used Mathcad).
An example of Mathcad's visual interface is given in Figure 2, which illustrates a routine for
calculating the fixed forces for a beam with a partial uniform load. This figure illustrates how
drawings, code, calculation, and commentary can be shown on the same worksheet. Note also
the explicit use of integrals in the routine in Figure 2, as well as the entry and formatting of
matrices inside the routine.
In CEE 4404, Mathcad is used two ways. In the beginning of the semester, it is used as a
matrix manipulation tool, wherein small structures are analyzed by direct manipulation of
matrices and transformations. In this sense, the program is used much like CAL [Hoit, 1995] and
SMIS [Meek, 1971], albeit in a more visual and convenient manner. An example analysis of a
simple two-span beam is shown in Figure 3. About three weeks into the semester, some
problems are solved through various levels of programming, and by the end of the semester, the
complete analysis is done by use of a set of Mathcad routines that are called in the proper
sequence. An example of some of the simple programming constructs are shown in Figure 4,
where a simple two-dimensional truss is being analyzed. In this routine, custom functions are
used to determine the length and stiffness of each element. Note that element stiffnesses (2 by 2
matrices) are themselves stored in an array.
It is noted that most of the Mathcad routines are provided by the instructor, but the student is
responsible for understanding how each routine works. To enforce this understanding, students
are required to modify the routines to meet the specific needs of the problem type being solved.
For example, one homework assignment requires that a complete set of routines used for
analyzing a 2D planar frame be converted into a new set of routines that can analyze a planar
grid. Modification of only two of the twelve are routines are required to make this conversion.
When the routines are used, all "input" is organized into arrays, as demonstrated for a 2D
frame in Table 2. This table lists only the most basic information. Additional arrays necessary
18th Analysis and Computation Specialty Conference © 2008 ASCE

to represent rigid ends and element releases may be easily added. Figure 5 provides an example
of all of the data required to analyze a simple two-story frame.
While most of the arrays listed in Table 2 are straight forward, the R and the CON arrays
require some discussion. The R array contains information about nodal restraints. The number
of rows is equal to the number of nodes in the structure, and the number of columns is equal to
the number of degrees of freedom that are available at each node. Entry (i,j) of the array is "0"
if degree freedom j of node i is unrestrained, and "1" if the degree of freedom is restrained. The
R array may also accommodate simple node-to-node constraints. The array will be automatically
converted to an equation number array, as described later. The CON array contains, for each
element, its connectivity (I node and J node), its material type, its property type, and its loading
type. This is one of the few cases where data in one array is used as a pointer to data in another
array.

ORIGIN:= 1 Use beginning index of 1 for all arays

Fixed end forces for partial uniform load:

a⋅ L

⎮ w⋅x
2
FEFwpart( w , a , L) := dw ← ⎮ ⋅ [ L⋅ ( 1 − a) + x] dx


2
0
a⋅ L

⎮ w⋅x
2
rw ← ⎮ ⋅ 1 dx


2
0

⎛ 3 ⎞ 2

L

L ⎛ −41.856⎞
⎜ ⎟
d←⎜
3 2 ⎟ −629.76⎟
⎜ ⎟ FEFwpart( 1 , 0.4, 120) = ⎜
2 ⎜ −6.144 ⎟
⎜ L
L ⎟ ⎜ 215.04 ⎟
⎝ 2 ⎠ ⎝ ⎠
−1⎛ dw ⎞
qj ← −d ⋅ ⎜ ⎟
⎝ rw ⎠
⎡ −( qj + w ⋅ a⋅ L) ⎤
⎢ 1

qi ← ⎢ ⎛ 2 2 ⎞⎥
w⋅a ⋅L
⎢−⎜ qj1⋅ L + qj2 + ⎟⎥
⎣ ⎝ 2 ⎠⎦
q ← stack ( qi , qj)
q

Explanation:
First two lines use virtual work to find displacement and rotation at end of beam
Next two lines find forces at right end using reducd flexibility matrix
Fifth line uses statics to find forces at left end
Last two lines present results

FIGURE 2. Example Demonstrating Mathcad's Visual Interface


18th Analysis and Computation Specialty Conference © 2008 ASCE

Two span continuous beam example

Units are
inches and
kips

Basic Matrices: ⎡ P⋅ a⋅ ( L − a) 2 ⎤
⎢ ⎥ ⎛ W ⋅ L2 ⎞
⎜ ⎟
E⋅ I ⎛ 4 2 ⎞ ⎢ 2 ⎥
qhatW ( W , L) := ⎜ ⎟
L 12
khat ( E, I , L) := ⎜ ⎟ qhatP ( P , a , L) := ⎢ ⎥
⎝2 4⎠ ⎜ ⎟
L
⎢ −P⋅ a2⋅ ( L − a) ⎥ 2
⎜ −W ⋅ L ⎟
⎢ 2 ⎥ ⎝ 12 ⎠
⎣ L ⎦
Problem data. All units kips and inches:

E := 30000 I1 := 800 I2 := 1000 P := 16 W := 0.15


L1 := 160 L2 := 240

Form element stiffnesses:

⎛ 6 × 105 3 × 105 ⎞ ⎛ 5 × 105 2.5 × 105 ⎞


khat1 := khat ( E, I1, L1) = ⎜ ⎟ khat2 := khat ( E, I2, L2) = ⎜ ⎟
⎜ 5 5⎟ ⎜ 5 5 ⎟
⎝ 3 × 10 6 × 10 ⎠ ⎝ 2.5 × 10 5 × 10 ⎠
Compute Fixed-end forces:

qhat1 := qhatP ( 16, 0.5⋅ L1, L1) = ⎜


⎛ 320 ⎞ ⎛ 720 ⎞
⎟ qhat2 := qhatW ( W , L2) = ⎜ ⎟
⎝ −320 ⎠ ⎝ −720 ⎠

Enter assembly matrices and form global stiffness:

⎛ 6 × 105 3 × 105 ⎞
⎛1 0⎞ ⎛0 1⎞
K := A1 ⋅ khat1⋅ A1 + A2 ⋅ khat2⋅ A2 = ⎜ ⎟
T T
A1 := ⎜ ⎟ A2 := ⎜ ⎟
⎝0 1⎠ ⎝0 0⎠ ⎜ 5 6⎟
⎝ 3 × 10 1.1 × 10 ⎠
Find equivalent load vector and compute displacements (rotations in radians):

⎛ −4.07 × 10− 4 ⎞
( T T
Q := − A1 ⋅ qhat1 + A2 ⋅ qhat2 = ⎜ ) ⎛ −320 ⎞
⎟ D := K
−1
⋅Q = ⎜ ⎟
⎝ −400 ⎠ ⎜ −4⎟
⎝ −2.526 × 10 ⎠
Find element forces (moments in inch-kips):

⎛ 0 ⎞ ⎛ 593.684 ⎞
f1 := khat1⋅ A1⋅ D + qhat1 = ⎜ ⎟ f2 := khat2⋅ A2⋅ D + qhat2 = ⎜ ⎟
⎝ −593.684⎠ ⎝ −783.158⎠
FIGURE 3 - Full Analysis of 2-Span Continuous Beam
18th Analysis and Computation Specialty Conference © 2008 ASCE

ORIGIN:= 1

Units = inches and kips throughout.

⎛⎜ 0 0
⎟⎞ MAT := ( 10000)
XY := ⎜ ⎟
108 0
⎜ 192 0 ⎟ PROP := ⎜
⎛6⎞
⎜ 0 ⎟ ⎟
⎝ 144 ⎠ ⎝ 12 ⎠

Rows of CON give:


⎛1 4 1 1⎞ I end
CON := ⎜ 2 4 1 1 ⎟ J end
⎜ ⎟ Material
⎝3 4 1 2⎠ Property

Routine to find element lengths


L( XY , CON) := nels ← rows ( CON)
for i ∈ 1 .. nels
iend ← CON
i, 1
jend ← CON
i, 2 ⎛ 144 ⎞
dx ← XY
jend , 1
− XY
iend, 1 LEN := L( XY , CON) = ⎜ 180 ⎟
⎜ ⎟
dy ← XY − XY ⎝ 240 ⎠
jend , 2 iend, 2
2 2
L ← dx + dy
i
L

Routine to find array of local (Level-2) element stiffness


khat ( CON, MAT , PROP, L) := nels ← rows ( CON)
for i ∈ 1 .. nels
khat := khat ( CON, MAT , PROP, LEN)
E ← MAT
( CON i , 3)
A ← PROP
( CON i , 4) khat =
⎛ 416.667 −416.667⎞
⎜ ⎟
L ← LEN
1
⎝ −416.667 416.667 ⎠
i

⎛ 1 −1 ⎞ ⋅ A ⋅ E
k ← ⎜ ⎟ ⎛ 500 −500 ⎞
i
⎝ −1 1 ⎠ L khat = ⎜ ⎟
k
3
⎝ −500 500 ⎠
FIGURE 4. Partial Example of the Analysis of a Simple Truss.

The basic Mathcad routines required for the analysis of a simple planar frame are described
in Table 3. As may be observed, only twelve routines are needed. Each of these routines has a
variety of arguments that represent input data, or information that is created by one of the other
18th Analysis and Computation Specialty Conference © 2008 ASCE

functions. The most complex routines in the Table 3 are ID and ADDK, and it is these routines
that are key to the understanding of the direct stiffness method of analysis. The ID function
begins with the R array, and systematically replaces each "1" with a zero, and replaces each "0"
with an integer that represents the equation number for the particular DOF. The process is
demonstrated in Figure 6 for the two-story frame of Figure 5. This example illustrates the use of
constraints which are handled by special coding of the data in the R array. In the example, the
X-displacement of node 4 is to be slaved to the X-displacement of node 3, so a -3 code (note the
minus sign) is placed in the first column of the fourth row of R. In this case, all unconstrained
DOFs would be numbered first, and then in a second pass, the X-DOF of node 4 would be set
equal to the DOF number that was generated in the first pass for the X-DOF of node 3.

Array Name # of Rows # of Columns Description


XY # of nodes 2 Global X-Y coordinates of each node
R # of nodes 3 Nodal restraints: 1=fixed, 0=free. May also be used
to specify constraints.
MAT # of matls 3 Material Properties: E, G, alpha
PROP # of props 3 Member Properties: A, I, Av
MLOAD # of mloads varies Member loads (data, as required for uniform,
concentrated, and temperature loads)
CON # of nels 5 Member connectivity and properties: I end, J end,
Material , Property, Load
P # of nodes 3 Nodal loads, FX, FY, MZ
TABLE 2 - Minimum Required Input for Mathcad Analysis of 2D Frame Structures

Routine Name and Argument List Purpose


LEN(CON,XY) Return an array L of element lengths
ANG(CON,XY) Return an array ANG of element orientation angles
T(ANG) Return an array T of element global to local
coordinate transformation matrices
Khat(CON,LEN,PROP,MATL) Return an array Khat of element stiffness matrices
Qhat(CON,LOADS) Return an array Qhat of element fixed end force
vectors.
ID (R) Convert the restraint array into an array of
equation numbers
FORMATF(P,R) Convert a table of nodal loads into a vector of
forces at the various DOF.
ADDK(K,n,CON,R,Khat) Assemble element stiffness into the global
stiffness matrix K
ADDQ(Qhat,CON,R) Assemble element fixed end forces into a force
vector Q
FORMATD(Δ,R) Convert the computed displacement vector Δ into
a table of nodal displacements
ELEMF(CON,R,Δ,Khat,Qhat,T) Find element forces ELEMF
REACT(CON,IR, ELEMF) Find reactions from element forces
TABLE 3 - Custom Mathcad Functions needed for Direct Stiffness Analysis
18th Analysis and Computation Specialty Conference © 2008 ASCE

The ADDK routine is used for assembling the element stiffness into the global stiffness
matrix. This routine is used in lieu of A transformations, which as indicated earlier are not
efficient in complete analysis programs. ADDK relies on the equation number information that
is present in the R array (having already been processed by the ID routine). The ADDK routine
is shown in Figure 7. Note that similar code is used in ADDQ, FORMATF, and FORMATD, as
each of these routines also rely on the equation number information present in R.

Beams are axially rigid


2k
5 6
12k
⎛ 0 0 ⎞ ⎛1 1 0⎞ ⎛0 0 0⎞
⎜ 240 0 ⎟ ⎜0 1 0⎟ ⎜0 0 0⎟
6 ⎜ ⎟ ⎜ ⎟ ⎜ ⎟
XY := ⎜
180 ⎟
R := ⎜
0⎟
P := ⎜
0 0 0 0 0 0⎟
3 4
⎜ 240 180 ⎟ ⎜ −3 0 0⎟ ⎜6 0 0⎟
2k
⎜ 0 360
⎟ ⎜0 0 0
⎟ ⎜0 0 0

180” 3 4 ⎜ ⎟ ⎜ ⎟ ⎜ ⎟
6k ⎝ 240 360 ⎠ ⎝ −5 0 0⎠ ⎝ 12 0 0⎠
5
MAT := ( 29000 0.3 0 ) ⎛1 3 1 1 0⎞
1 2 ⎜2 4 1 1 0⎟
⎜ ⎟
⎛ 2500 40 35 ⎞
PROP := ⎜ CON := ⎜
3 5 1 1 0⎟
⎟ ⎜4
180” 1 2 ⎝ 3500 30 25 ⎠ 6 1 1 0⎟
⎜3 5 1 2 1

MLOAD := ( 0 −2 0.3) ⎜ ⎟
⎝5 6 1 2 1⎠
240”

FIGURE 5 - Sample Input data for simple 2-story frame

ID( R) := nr ← rows ( R)
nc ← cols ( R)
ID ← 0⋅ R
sum ← 0
for i ∈ 1 .. nr
for j ∈ 1 .. nc
⎛0 0 1 ⎞
ID ← 0 if R 1 ⎜2 ⎟
i, j i, j 0 3
sum ← sum + 1 if R 0
⎜ ⎟
ID( R) = ⎜
i, j 4 5 6 ⎟
ID ← sum if R 0 ⎜4 7 8 ⎟
i, j i, j ⎜9 ⎟
10 11
for i ∈ 1 .. nr ⎜ ⎟
⎝9 12 13 ⎠
for j ∈ 1 .. nc
if R <0
i, j
m ← −R
i, j
ID ← ID
i, j m, j
ID

FIGURE 6 - Use of the ID routine to create an equation number array (see Figure 4)
18th Analysis and Computation Specialty Conference © 2008 ASCE

ADDK( K , n , CON, ID, k) := nr ← rows ( k)


iend ← CON
n, 1
jend ← CON
n, 2
gn ← ID
1 iend , 1
gn ← ID
2 iend , 2
gn ← ID
3 iend , 3
gn ← ID
4 jend , 1
gn ← ID
5 jend , 2
gn ← ID
6 jend , 3
for i ∈ 1 .. nr
for j ∈ 1 .. nr
r ← gn
i
s ← gn
j
test ← r⋅ s
if test ≠ 0
kadd ← k
i, j
K ←K + kadd
r, s r, s
K

FIGURE 7 - A routine for assembling an element into a global stiffness matrix.

NOTES ABOUT HOMEWORK AND EXAMS

In CEE 4404, about one-third of the homework problems use a hand solution technique (where
Mathcad may be used as a calculator), and the remainder are solved using the Mathcad routines
provided by the author. In many cases, the student is responsible for modifying the supplied
routines before they can be used for the homework. Students are encouraged to work together on
some of the longer programming assignments.

For exams, Mathcad is not available, and most of the problems are simple hand problems that
test the student's grasp of theory. For example, the truss shown in Figure 4 was to be analyzed as
part of a recent midterm exam. Prior to the midterm, students are warned not to rely on the use
of the same procedures that are employed in the Mathcad routines (e.g forming matrices and
computing pentuple products of matrices), because while these procedures are highly efficient in
computers, they are cumbersome when attempted by hand. To make sure the students are
comfortable with the hand computation approaches, a set of old exam problems (without
solutions) are provided, and some old exam problems are assigned for homework.
18th Analysis and Computation Specialty Conference © 2008 ASCE

MORE ADVANCED CLASSES

At Virginia Tech, two advanced courses depend on the knowledge and experience gained from
CEE 4404. In the first of these courses, Computer Methods 2 (CEE 5424), the capabilities of the
Mathcad routines are expanded to include shear deformations, beam-column joint deformations,
simple virtual-work based sensitivity analysis, P-Delta effects (using both linearized and
consistent geometric stiffness), buckling analysis, stability analysis (using various approaches),
analysis of pretensioned cable networks, and event-to-event static pushover analysis.
The second advanced course, Computational Dynamics (CEE 6404), extends the routines for
dynamic analysis, including modal analysis, response spectrum analysis, and response history
analysis. Included in this course are a variety of methodologies for integrating the equations of
motion, and for representing inherent damping. Both classical and nonclassical damping are
included in the class. The material on nonclassical damping requires the use of complex
numbers, and this is easily facilitated in Mathcad.

AVAILABILITY OF ROUTINES

The author will provide readers of this paper full access to the entire library of Mathcad routines
used for CEE 4404, 5424, and 6404. These routines and related examples are posted to an FTP
site, and can be accessed after obtaining password authorization by e-mail ([email protected]).
All that is asked for the use of these routines is that any idiosyncrasies, errors, additions, and
ideas for improvements be provided to the author of this paper.

SUMMARY AND CONCLUSIONS

This paper has demonstrated a "Transformational" approach to teaching the theory of matrix
structural analysis, and a methodology for implementing the procedure in Mathcad. While it is
noted that there is nothing new in the technology of the approach, it is believed that the
presentation of the approach from the perspective of equation (1b) is unique. In CEE 4404, all
problems are presented from this perspective, and it is shown that once the procedure is
understood, the only thing that changes as problems become more complex (e.g. from a 2-D to a
3-D truss) is the physical size of the various matrices and transformations that are used.
By integrating the Mathcad programming into the course, the student not only understands
the concepts, but experiences the implementation of the theory. While one might argue that
there is little need for the engineer to know how a commercial program works to use it properly,
the author respectfully disagrees. Understanding how the program works is a requirement for
fluency in computer-based structural analysis. The best one can expect from student that is
simply exposed to commercial programs is familiarity with that program.
Another advantage of the transformational approach utilized in CEE 4404 is that, remarkably,
the most complicated structure that ever need be analyzed by hand is a cantilever beam. Simple
statics is all that is necessary for understanding the force transformations b, U, and B, and an
understanding of compatibility of deformations (or in another sense, the relationship between
deformations and displacements) is all that is required to grasp the displacement transformations
a, T, and A. Concepts of work and energy, which are often difficult for students, are relied on
only for computing simple displacements (using virtual work), or proving contragradiency (using
real work). Betti's law, and Maxwell's reciprocal theorem arise visually from nothing more than
the recognition of patterns in virtual loading systems.
18th Analysis and Computation Specialty Conference © 2008 ASCE

ACKNOWLEDGEMENTS

This paper was reviewed by thirty of the students of the fall 2007 class CEE 4404. The
comments provided by these students were very insightful, and improved the paper considerably.

REFERENCES

Hoit, M.A. (1995), Computer Assisted Structural Analysis and Modeling, Prentice Hall, Englewood Hills, New
Jersey.

McGuire, W., Gallagher, R.G., and Ziemian, R., Matrix Structural Analysis, 2nd Edition, John Wiley and Sons, New
York, New York.

Meek, J.L, (1971), Matrix Structural Analysis, McGraw-Hill, New York, New York.

Wilson, E.L. (2001), Three Dimensional Static and Dynamic Analysis of Structures, Computers and Structures, Inc.,
Berkeley, California.

APPENDIX

Proof of Contragradiency (between Levels 1 and 2)

1 T
The real work done at the Level 1 system is W1 = f δ.
2

1 ˆT ˆ
Similarly, the real work done in the Level 2 reference system is W2 = f δ.
2

Conservation of energy requires that the total work done is the same for each reference system,
hence, f T δ = fˆ T δˆ .

Substituting from equations 5 ( δ = aδˆ ) it is seen that f T aδˆ = fˆ T δˆ , from which it is clear
that f T a = fˆ T .

Transposing both sides and reversing the sides of the equation gives fˆ = a T f .

From equation 6 ( fˆ = bf ) it is clear that aT = b.

You might also like