You are on page 1of 9

Computer Application

in Solving Statically
Determinate Truss
Problems Using FEA
and Matlab
JIAXIN ZHAO{
Department of Engineering, Indiana UniversityPurdue University Fort Wayne, Fort Wayne, Indiana 46805

Received 7 February 2007; accepted 5 May 2007

ABSTRACT: Finite Element Analysis (FEA) is a very powerful tool that is used in virtually
every area in the field of Mechanical Engineering and many other disciplines. It is beneficial for
the mechanical engineering students to have exposure to this tool as early as possible and as
frequently as possible in their engineering education. The earliest time comes when the
students are taught the truss problems in Statics. However, the traditional finite element
formulation uses the displacement as the solution variable, and the deformation theory is
generally not covered in a traditional Statics course. In this article, a MATLAB computer model
of FEA solution for truss problems is presented. Finite element formulations for truss problems
with the solution variables being the forces inside the truss members and the reaction forces at
the fixed and sliding joints are presented step by step. The property of the final assembled
coefficient matrix, with the boundary conditions applied, determines the truss problem at hand
to be statically determinate or statically indeterminate. Using this approach, students in
sophomore Statics course can be taught the FEA methodology, without knowing the
deformation theory. The computer implementation using Matlab also strengthens the students
knowledge of the software that they learned in a freshman Computer Tools For Engineers class
and their programming skills. 2009 Wiley Periodicals, Inc. Comput Appl Eng Educ 17: 363371, 2009;
Published online in Wiley InterScience (www.interscience.wiley.com); DOI 10.1002/cae.20168

Keywords:

FEA; numerical methods; Matlab; truss problem

INTRODUCTION
{

Assistant Professor.
Correspondence to J. Zhao (zhaoj@ipfw.edu).
2009 Wiley Periodicals Inc.

Finite Element Analysis (FEA) is a very powerful tool


that is used in virtually every area in the field of
363

364

ZHAO

Mechanical Engineering and many other disciplines


as well. Most institutions have an FEA course as a
technical elective in senior level [1] or even in
graduate level. However, it is beneficial for the
mechanical engineering students to have exposure to
this tool as frequently as possible in their engineering
education and as early as possible.
Many FEA textbooks use truss problems to
introduce the finite element methodology in an earlier
chapter. However, these formulations are based on
displacements at the joints and thus requiring the
knowledge of deformation theory. The forces in the
truss members are then calculated using the already
determined displacements. This approach dictates that
it can only be introduced in the Mechanics of
Materials course. The truss problem actually first
appears in the Statics course, where the simple
statically determinate trusses are discussed. If this
FEA approach is to be introduced in this course, the
deformation theory must be added into the Statics
course [2].
In this article, a force based finite element
formulation is developed for truss problems. This
approach does not require the knowledge of deformation theory at all and can be used to teach the students
the finite element methodology in the Statics course,
preferably right after the truss problems are discussed.
The instructional approach presented in this
article accomplishes several goals. At Indiana
UniversityPurdue University Fort Wayne, the firstyear engineering curriculum includes computer-tools
courses. Students learn MATLAB in a two-credit hour
Computer Tools For Engineers course and then they
take a two-credit hour programming course in which
they learn C/C. The computer work experience
presented in this article serves as a connection
between these first-year computer-tools courses and
engineering science courses. It strengthens the
students knowledge of the Matlab software as well
as their programming skills. Furthermore, a technical
elective FEA course is offered to the students in their
junior or senior year. This instructional approach
presented here is also aimed at increasing the
awareness and interest of the students so that they
would further their knowledge of finite element
method by eventually taking this course.

a plane truss problem is shown in Figure 1a with three


truss members, one fixed joint and one sliding joint,
which is sliding on the plane of angle ysliding to the x
axis. Each joint is numbered consecutively starting
from 1. The order assigned to number the joints does
not play a factor in the analysis as long as all the joint
numbers are consecutive starting from 1. Similarly,
each truss member is also numbered consecutively
starting from 1 and the number is denoted with a circle
around it to distinguish it from the joint number. The
conventional assumptions of smooth pin joints and
loads applied only at joints are followed. As a result,
each truss member is a two-force member as shown in
Figure 1b. As used in this figure and throughout this
article, the subscript of a variable denotes the joint
number while the superscript denotes the truss
member number. The sign convention used here is
that tension is positive. Thus a positive truss member
force Fe means a tensional force in truss member e
while a negative Fe means a compressional force. The
force acting on the sliding joint Rsliding is positive
pointing toward the sliding plane as shown in
Figure 1a. The two joints of the truss member e are
denoted as ie and je. The angle of the truss member is
then defined as the angle from the positive x
!
direction to the direction of ie je . The forces acting
on the truss member e at the ie and je joint locations
are then denoted as ~
Fiee and ~
Fjee , respectively, as shown
in Figure 1b. Consequently, reaction forces acting on
the joints by the truss member e are denoted by ~
Fiee
e
and ~
Fje as shown in Figure 1a.

THE LINEAR ALGEBRA FORMULATION


The traditional solution methods are Method of Joints
and Method of Sections, as typically taught in the
Statics course. However, these two methods will
become tedious if the number of truss members or
joints becomes large. A systematic approach to solve
this truss problem is then desirable and it is based on
the Method of Joints. The equations for all the joints
are gathered and then solved using linear algebra. The
force balance at all the joints gives:
Joint 1:

THE SIMPLE PLANE TRUSS PROBLEM:


STATICALLY DETERMINATE
A simple plane truss problem is statically determinate.
A general layout of the simplest configuration of such

F 1 cosy1 F 2 cosy2 Rfixed;x 0


F 1 siny1 F 2 siny2 Rfixed;y 0
Joint 2:
F 2 cosy2 F 3 cosy3 Fapplied cosyapplied 0
F 2 siny2 F 3 siny3 Fapplied sinyapplied 0

COMPUTER APPLICATION USING FEA AND MATLAB

365

Figure 1 (a) A simple truss structure layout and forces on the joints/nodes. (b) Notation and forces
on a truss member/element.

Joint 3:
F 3 cosy3  F 1 cosy1 Rsliding cosysliding  p=2 0
F 3 sin y3  F 1 sin y1 Rsliding sinysliding  p=2 0

We have six equations for this problem and also


six unknowns to solve for: three truss member forces
F1, F2, F3, two fixed joint reaction forces Rfixed,x,
Rfixed,y and one sliding joint reaction force Rsliding,
which is normal to the sliding plane. Moving the
known quantities to the right hand side of the
equations and putting the equations into matrix form
yields:
2

cosy1

cosy2

6
7
6 siny1
7
siny2
0
0 1
0
6
7
2
3
6 0
7
cosy
cosy
0
0
0
6
7
6
7
2
3
6 0
7
siny
0
0
0
siny
6
7
3
6 cosy1
7
0
cosy
0
0
cosy

p=2
sliding
4
5
siny1
0
siny3 0 0 sinysliding  p=2
|{z}

applied force vector from this simple linear algebra


formulation. The solution is then simply:
fFRg K1 fFAg

This direct solution of forces simply suggests that


a force based finite element formulation for truss
problem should be possible.

THE FEA FORMULATION


To derive the finite element formulation, the conventions of FEA are followed to name the truss
members as elements and the joints as nodes in this
analysis. These names are interchangeable from here
on in this article. Only the internal forces in the truss
members/elements and the reaction forces at the
joints/nodes are of concern. For each element, the
force inside the element Fe contributes to the load on
the joints as:

K

8
8
9
9
0
F1 >
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
0
F2 >
>
>
>
>
>
>
>
>
>
>
>
>
< F3 =
<F
=
applied cosyapplied

>
>
Fapplied sinyapplied >
> Rfixed;x >
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
0
R
>
>
>
>
fixed;y
>
>
>
>
:
:
;
;
0
Rsliding
|{z}
|{z}
fFRg

9
8
Fiee ;x >
>
>
=
< F e >

9 8
9
8 e
F cosye >
cosye >
>
>
>
>
>
>
= <
=
< e
F sinye
sinye
e
ie ;y

Fe
fFg
e
e
e
e
Fje ;x >
F cosy >
cosy >
>
>
>
>
>
>
>
>
>
; :
;
: F e ; :
F e sinye
sinye
je ;y
3

fFAg

where as [K] is the coefficient matrix, {FR} the


unknown reaction force vector, and {FA} the

Here {F}e is the elemental force vector that is


acting on the ie and je nodes of the element e. Note the
first two components are acting on the joint ie (the i
joint of the truss member e) while the last two
components are acting on the joint je.

366

ZHAO

On each joint i, we have the force balance of:


X
X
~
Fiee iie
~
Fjee ije ~
Ri;fixed
e
e
4
~
Ri;sliding ~
Fi;applied 0
The first two terms only exist if the i node (ie) or
the j node (je) of the element e is the current node of
interest i, respectively. The last three terms exist if the
current node of interest i is a fixed joint, a sliding
joint, or a joint with external force(s), respectively.
Applying this vector equation on all Nnode nodes will
give us a total of Neq 2Nnode independent equations.
To assemble all the equations into matrix form,
we first extend the elemental force vector {F}e of
element e (on nodes ie and je) in Equation (3) to the
global force vector {F}eG including force components
on all the nodes (1,2,3) in the problem. For element 1,
9
8
node 1; x component
cosy1 >
>
>
>
>
>
1 >
>
node 1; y component
>
>
siny
>
>
=
<
node 2; x component
0
1
1
F
fFgG
node 2; y component
>
>
0
>
>
>
1>
>
>
node 3; x component
>
>
cosy
>
>
;
:
node 3; y component
siny1
5
Note that the positions corresponding to forces on
node 2 are padded with zeros as element 1 is on nodes
1 (i node) and 3 (j node). Similarly, we have for
elements 2 and 3:
9
8
cosy2 >
>
>
>
>
>
>
>
>
siny2 >
>
>
<
2=
cosy
2
F2
fFgG
>
cosy2 >
>
>
>
>
>
>
>
0 >
>
>
;
:
0

9
0 >
>
>
0 >
>
>
3 =
cosy
3
F3
fFgG
siny3 >
>
>
>
>
3>
>
>
>
>
> cosy3 >
;
:
siny
8
>
>
>
>
>
>
<

6
The global reaction force vector for fixed joint(s)
can also be written including the force components on
all the nodes as:
9 8 9
8
8 9
1>
Rfixed;x >
0>
>
>
>
>
>
>
>
>
>
>
>
>
>0>
> >
>
> Rfixed;y >
>1>
>
>
>
>
>
>
>
>
>
>
>
= < =
=
<
< >
0
0
0
Rfixed;x

R
fRfixed gG
0 >
0 > fixed;y
>0>
>
>
>
>
>
>
> >
> >
>
>
> >
>
>
>
>
>
>
0 >
0>
>0>
>
>
>
>
>
;
: >
; >
;
:
: >
0
0
0
7
where as node 1 is the fixed node and the positions
corresponding to force on nodes 2 and 3 are padded

with zeros. Similarly, the global reaction force vector


for sliding joint(s) can be written as:

fRsliding gG

8
>
>
>
>
>
>
>
>
<

9
>
>
>
>
>
>
>
>
=

0
0
0

>
>
0
>
>
>
>
>
>
>
>
>
>
R
cosy

p=2
sliding
>
> sliding
>
>
;
:
Rsliding sinysliding  p=2
9
8
0
>
>
>
>
>
>
>
>
>
>
0
>
>
>
>
>
>
=
<
0
Rsliding

>
>
0
>
>
>
>
>
>
>
>
>
>
>
>
> cosysliding  p=2 >
;
:
sinysliding  p=2

as node 3 is the sliding node.


The global applied force vector can be written as:
8
>
>
>
>
>
>
>
>
<

0
0

9
>
>
>
>
>
>
>
>
=

Fapplied cosyapplied
>
Fapplied sinyapplied >
>
>
>
>
>
>
>
>
>
>
0
>
>
>
>
;
:
0
9
8
0
>
>
>
>
>
>
>
>
>
>
0
>
>
>
>
>
>
=
< cosy
applied
F

> applied
>
>
>
> sinyapplied >
>
>
>
>
>
>
0
>
>
>
>
;
:
0

fFapplied gG

as the external force is applied at node 2.


Applying the above global force vectors to
Equation (4), we have:
fFg1G fFg2G fFg3G fRfixed gG fRsliding gG
fF applied gG 0
10
or:
9
9
9
8
8
8
0 >
cosy1 >
cosy2 >
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
0 >
>
>
>
>
>
>
siny1 >
siny2 >
>
>
>
>
>
>
=
=
<
<
<
3 =
2
cosy
0
cosy
1
2
F
F3
F

3
2
siny
>
>
>
>
>
>
0
cosy
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
cosy3 >
>
>
>
>
>
>
cosy1 >
0 >
>
>
>
>
>
>
;
;
;
:
:
:
siny3
0
siny1

COMPUTER APPLICATION USING FEA AND MATLAB

8 9
8 9
1>
0>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
0>
1>
>
>
>
>
>
>
>
>
>
>
=
=
<0>
<0>
Rfixed;x
Rfixed;y

>
>
0>
>
>
>0>
>
>
>
>
>
>
>
>
>
>
>
>
>
>0>
>
0>
>
>
>
>
>
>
>
;
: ;
: >
0
0
9
8
0
>
>
>
>
>
>
>
>
>
>
0
>
>
>
>
>
>
=
<
0
Rsliding

>
>
0
>
>
>
>
>
>
>
>
>
cosysliding  p=2 >
>
>
>
>
;
:
sinysliding  p=2
9
8
0
>
>
>
>
>
>
>
>
>
>
0
>
>
>
>
>
>
=
< cosy
applied
Fapplied 0

>
sinyapplied >
>
>
>
>
>
>
>
>
>
>
0
>
>
>
>
;
:
0

the coefficient matrix [K] of the final system of


equations has the following properties:
*

11

Simplifying and moving the known applied force


vector to the right side of the equation, we have:
2

3
cosy1
cosy2
0
1 0
0
6
7
6 siny1
7
siny2
0
0 1
0
6
7
2
3
6 0
7
cosy
0
0
0
cosy
6
7
6
7
2
3
6 0
7
siny
0
0
0
siny
6
7
6 cosy1
7
3
0
cosy
0
0
cosy

p=2
4
5
sliding
0
siny3 0 0 sinysliding  p=2
siny1
|{z}
fFg1G fFg2G fFg3G fRfixed gG fRsliding gG
9
9
8
8
0
F1 >
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
0
F2 >
>
>
>
>
>
>
>
>
>
>
>
>
<
<
3 =
cosyapplied =
F

F
>
> applied
>
>
>
>
>
>
> Rfixed;x >
> sinyapplied >
>
>
>
>
>
>
>
>
>
>
>
0
Rfixed;y >
>
>
>
>
>
>
>
>
;
;
:
:
0
Rsliding
|{z}
|{z}
fFRg

367

fFapplied gG

The first Nelem columns correspond to the global


force vectors of the Nelem elements, without the
truss member forces as they are the unknowns.
The next 2Nfixed columns correspond to the
global force vectors of the Nfixed fixed joints,
without the x and y reaction force components as
they are the unknowns.
The last Nsliding columns correspond to the global
force vectors of the sliding joints, without the
normal (to the sliding plane) reaction forces as
they are the unknowns.

As a result, the coefficient matrix [K] can be


determined by simply assembling all the global force
vectors. So, the FEA process starts with getting the
force vector components due to the elemental forces
and put then into the corresponding column positions
in the coefficient matrix [K]. Then the two different
kinds of boundary conditions, namely the fixed and
sliding conditions, are applied and the related force
components are determined and put in the corresponding column positions in the coefficient matrix
[K]. Finally the loading information is gathered to
determine the global applied force vector {FA}.

STATIC DETERMINACY
The above FEA formulation can be applied to any
truss problem with any number of members or joints.
Note that there are Nunk Nelem 2Nfixed Nsliding
unknowns in the unknown force vector. The number
of equations we have is Neq 2Nnode due to both the x
and the y components of the force balance on each
node. Neq and Nunk are then the number of rows and
the number of columns for the coefficient matrix [K],
respectively. Now from the knowledge of linear
algebra, it can be determined that:

12

8
Neq > Nunk
>
>
which is exactly the same as Equation (1) from the
<
Neq Nunk and jKj 6 0
direct linear algebra formulation. A close examination
then
if
Neq Nunk and jKj 0
>
>
of the Equation (12) yields that by arranging the
:
Neq < Nunk
unknown reaction force vector as:
92
8
F1 >
>
>
>
>
>
>
F2 >
4
>
>
>
>
= Nelem ; number of truss members=elements
<
F3
fFRg
h
>
> Rfixed;x >
>
>
>
2Nfixed ; twice the number of joints=nodes x and y components
>
>
>
>
R
>
; Nsliding ; number of sliding joints=nodes
: fixed;y >
Rsliding

13

368

ZHAO

8
No Solution;
>
>
<
fFRg K1 fFAg;
No Solution;
>
>
:
No Solution;

mechanism with d:o:f:


statically determinate
statically indeterminate
statically indeterminate

The final assembled coefficient matrix [K] can


then go through the check as described in this
equation. Figure 2 is also shown to the students to
help further their understanding of the different
conditions here.
Compared with the traditional FEA formulation
using the deformation theory, the current force based
formulation is straightforward and does not involve
the coordinate transformation at all. The methodology
takes 1 h lecture to explain to the students. A
MATLAB computer model was developed and a copy
of the program is provided to the students. Students
can then modify the program for different statically
determinate truss problems. The program is included
in the appendix. The test case used in the program is
for Example Problem 6.1 in the Statics textbook by
Hibbeler [3], as shown in Figure 3. It should be noted
that the only part in this program that the students
need to modify for different problems is the first part
that gathers the FEA model information. The program
consists of 100 lines with only 40 lines of true
commands.

FURTHER NOTES FOR TEACHING


STUDENTS ABOUT FEA
After the above formulations are discussed, the
students can then be introduced to the general FEA

Figure 3

Sample truss problem from Hibbeler [3].

procedures, which consist of seven steps, and their


relation to the current analysis:
(1) Discretization: We have a naturally discretized
system in truss with truss members as elements
and joints as nodes.
(2) Interpolation: The truss member force is used
as it is, no need for approximation in this case.
(3) Elemental formulation: Determine the elemental force vectors for each element as in
Equation (3).

Figure 2 Different cases for a general truss problem.

COMPUTER APPLICATION USING FEA AND MATLAB

(4) Assembly: Extend the elemental force vectors


to global force vectors as in Equations (5) and
(6) and put them in corresponding columns of
the coefficient matrix [K].
(5) Applying boundary and loading conditions:
Generate the global reaction force vectors
as in Equations (7) and (8) and put them in
corresponding columns of the coefficient
matrix [K]. Generate the global applied force
vector as in Equation (9).
(6) Solution: Solve the problem using the matrix
manipulation.
(7) Getting other information: The stress, strain,
joint displacement can be determined given the
geometry and material properties of the truss
members, and of course the deformation
theory.
For the statically indeterminate truss problems,
the students are reminded that they will revisit
truss problems in Mechanics of Materials and
those problems can be solved using the deformation theory. After they learned the deformation
theory in that course, they will be able to use
FEA to solve both the statically determinate
and indeterminate truss problems, by incorporat-

369

ing the deformation theory in the elemental formulation.

CONCLUSION
In this article, a MATLAB computer model of FEA
solution for truss problems is presented. Force based
finite element formulation is introduced for truss
problems. This approach eliminates the requirement
of knowledge of deformation theory to apply FEA
to truss problems, as was traditionally done. The
property of the final assembled coefficient matrix,
with the boundary conditions applied, determines the
truss problem at hand to be statically determinate or
statically indeterminate. This formulation enables that
the FEA can be taught to sophomore students in the
Statics course and it also strengthens the students
understanding of static determinacy in truss problems.
The computer programming also strengthens the
students knowledge of the Matlab software they
learned before and their overall programming skills.
This approach increases the awareness and interest of
the students about the finite element method. It would
lead the students into later taking a formal FEA course
to further their knowledge of finite element method, as
well as to improve their programming skills.

APPENDIX
MATLAB Computer Model of FEA for Simple Plane Truss Problem

370

ZHAO

APPENDIX (Continued)

COMPUTER APPLICATION USING FEA AND MATLAB

371

APPENDIX (Continued)

REFERENCES
[1] W. E. Howard, J. C. Musto, and V. Prantil, Finite
Element Analysis in a Mechanics Course Sequence,
Proceedings of the 2001 American Society for Engineering Education Annual Conference & Exposition,
Session 2793, 2001.

[2] M. Pike, Introducing Finite Element Analysis in Statics,


Proceedings of the 1997 American Society for Engineering Education Annual Conference & Exposition,
Session 2268, 1997.
[3] R. C. Hibbeler, Statics, 10th edition, Prentice-Hall,
Upper Saddle River, NJ, 2004.

BIOGRAPHY
Dr. Jiaxin Zhao is an assistant professor of
Mechanical Engineering at Indiana University-Purdue University Fort Wayne. He
received his BS from the University of
Science and Technology of China, his MS

from the University of Missouri-Rolla, and his PhD from Purdue


University-West Lafayette. His research and teaching interests are
tribology, machine design, solid mechanics and numerical methods
including finite elements and parallel computing.

You might also like