0% found this document useful (0 votes)
520 views

School of Engineering and Mathematical Sciences: by Umar Draz Ahmad

The document describes a project to develop a structural analysis program called SABSM using MATLAB. The program uses the direct stiffness method to analyze 2D and 3D trusses and frames. It features a graphical user interface to guide students through each step of the analysis. The program was developed to improve students' understanding of the direct stiffness method and allow them to verify the calculations at each step. It was tested on sample problems and shown to match hand calculations and literature solutions.

Uploaded by

Kim Daryl Rasay
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
520 views

School of Engineering and Mathematical Sciences: by Umar Draz Ahmad

The document describes a project to develop a structural analysis program called SABSM using MATLAB. The program uses the direct stiffness method to analyze 2D and 3D trusses and frames. It features a graphical user interface to guide students through each step of the analysis. The program was developed to improve students' understanding of the direct stiffness method and allow them to verify the calculations at each step. It was tested on sample problems and shown to match hand calculations and literature solutions.

Uploaded by

Kim Daryl Rasay
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 116

School of Engineering and Mathematical Sciences

Development of a Structural analysis program


(SABSM) using MATLAB featuring graphical user
interface
by

Umar Draz Ahmad

Project for the Degree of MSc

Civil Engineering Structures

Supervisor: Dr.Agathoklis Giaralis

London

13 September 2013

1
Project Title: Development of a Structural analysis program (SABSM) using MATLAB
featuring graphical user interface

Student: Umar Draz Ahmad

Supervisor: Dr.Agathoklis Giaralis 13 September 2013

Abstract
Linear static analysis of 2D and 3D rigid jointed frames and trusses by direct
stiffness method can be performed by many commercial structural analysis
softwares available in the market. The majority of them follow the basic steps
of the direct stiffness method (DSM) to solve linear structures. However, they
sacrifice transparency of the underlying methodological steps of DSM for
ease of use which is a common need in industry. To this aim, they usually
provide a user friendly CAD-like interface and, in many cases, they put
forward a black box type of approach in analysis. In this context, many
steps involved in the DSM are notionally skipped as they are done
automatically by commercial software packages. Such an approach does not
facilitate the learning of DSM and, thus, the use of commercial programs for
education purposes is still under debate.

To this end, this project concerns the development of a MATLAB-based


program featuring a GUI which takes the user explicitly through all steps of
the DSM and targets an undergraduate audience.

MATLAB is specifically chosen as it is specifically designed for matrix


operations and direct stiffness method involves mostly matrix operations. Its
very popular nowadays in many engineering applications so it can enhance
the knowledge of students to graphical user interface development and help
them better understand how to employ MATLAB in structural engineering
related problems to solve them more efficiently.

Graphical user interface is developed to interact with program which


simplifies the structural data input following the standard DSM method as
commonly taught to undergraduate students. MATLAB reports back all
stages of calculations which students can readily verify via hand
calculations.

2
The program results have been verified by hand calculations at each step of
the direct stiffness method (DSM) and also compared with the standard
solutions available in the books. All steps are identical to hand calculations
and each step of SABSM has been verified.

Keywords: Linear static structural analysis, Direct stiffness method, MATLAB


graphical user interface

3
Acknowledgements

I am very thankful to my parents for their continuous support and my father


specifically supported me for completion of this project.

My supervisor, Dr.Agathoklis Giaralis from city university London: who


always encouraged me throughout this project and his timely quick response
made it possible to complete the work in specified time schedule.

Finally all those friends and relatives who helped me by listening.

4
Table of Contents

Abstract 2

Acknowledgements 4

Contents 5

Abbreviations 7

1. Introduction 9
1.1 Overview 9
1.2 Aims and Objectives 10
1.3 Organization of Thesis 10
2. Literature Review 12
2.1 Overview 12
2.2 Available MATLAB Programs 12
3. Theoretical Background 18
3.1 Overview 18
3.2 Coordinate System 18
3.3 Sign Conventions 19
3.4 Degree of Freedom(DOF) 20
3.5 Element Stiffness Matrix 21
3.6 Structural Stiffness Matrix 21
3.7 Load Vector[P] 21
3.8 Displacement Vector[U] 22
3.9 Calculation of Unknown Displacements and Reactions 22
3.10 Member Forces 22
3.11 Planar Truss 23
3.12 Space Truss 23
3.13 Planar Frame 24
3.14 Space Frame 25
4. Methodology 28
4.1 Introduction 28
4.2 Overview 28

5
4.3 Pre-processing 29
4.4 Processing 33
4.5 Post-Processing 37
5. Program Overview With Solution Of Selected Problems 39
5.1 Program Architecture 39
5.2 Preprocessing 40
5.3 Processing 43
5.4 Post processing 43
5.5 Sample Problems Solved By SABSM 43
6. Verification Of Results 78
6.1 2D Truss 78
6.2 3D Truss 85
6.3 2D Frame 95
6.4 3D Frame 105
7. Concluding Remarks 113
8. References 115
9. Appendix 116
9.1 Fixed End Forces 116

6
Abbreviations
A Cross sectional area

E Modulus of elasticity

DOF Degree of freedom

I Moment of Inertia

Moment of Inertia about y-axis

Moment of Inertia about z-axis

J Polar moment of inertia

G Shear modulus

DSM Direct stiffness method

SABSM Structural analysis by stiffness method

2D Two dimensional

3D Three dimensional

Direction cosines

U Translation in global X-axis

V Translation in global Y-axis

W Translation in global Z-axis

Rotation about global X-axis

Rotation about global Y-axis

Rotation about global Z-axis

R Reaction in global axis

u Translation in local x-axis

v Translation in local y-axis

w Translation in local z-axis

Rotation in global & local axis

s Truss member force in local axis

7
p Frame member force in local x-axis

q Frame member force in local y-axis

r Frame member force in local z-direction

Frame member force about local x-axis

Frame member force about local y-axis

Frame member force about local z-axis

8
1.0 Introduction
1.1 Overview
Structural analysis is the backbone of any engineering design by letting one
knows ahead of time the behaviour of any engineering structure under
different loading conditions to which structure will come across throughout its
life. This report demonstrates how a structure could be defined and analyzed
using the program named structural analysis by stiffness method
(SABSM).Moreover how a user can use this program as a learning tool for
direct stiffness method specifically by going through each step of the solution
reported back by the SABSM.

SABSM is developed for static elastic structural analysis of 2D and 3D pin


and rigid jointed frames and a learning tool for direct stiffness method.
Structure could have any geometry and different end conditions. Reinforced
concrete frames and transmission towers are typical examples as shown in
the figure below.

Fig 1.1 Frames and Trusses

SABSM is divided into three main parts.

Preprocessing Defining structure geometry and properties

9
Processing Structural analysis using correct equations
Post processing viewing the results

In the preprocessing stage each node number is entered initially with the x ,y
and z coordinates of each, then nodes are connected to define the elements
which are drawn onscreen so that user can verify it . Then element properties
are defined depending on type of structure and allotted to each element. Now
completion of geometry leads the user to define nodal constraints and nodal
or non-nodal loads depending on the type of structure. Once all the data
input is complete next stage follows.

In processing stage, data input is used to prepare element stiffness matrices


and then transformation of each into global coordinate system before
summation to get global structural stiffness matrix. Load and displacement
matrix is prepared. Then by using the standard force displacement
relationship and matrix partitioning, unknown displacements, reactions and
member forces are calculated.

In the post processing stage results can be viewed on screen.

1.2 Aims and Objectives


The aim of this project is to develop a MATLAB based structural analysis
program with a user friendly graphical interface. Moreover it is envisioned
that use of this program sideways with the theory of DSM can facilitate the
learning of the DSM in class and during self study as a tool to verify results
and experiment with different arrangements to gain a better understanding of
the principles of DSM.

1.3 Organization of Thesis


This thesis has been organized in a way whose layout can be elaborated as
.Chapter 2 contains a literature review of 9 programs written in MATLAB with
different features and their comparison. Chapter 3 explains all theory backing
the project. Chapter 4 explains the methodology adopted by the MATLAB
program for analysis of 2D and 3D structures. Chapter 5 explains the
Program overview and solution of selected problems. Chapter 6 covers the
10
verification of sample problem results by hand calculations. Chapter 7 covers
the Concluding Remarks. Chapter 8 is References.Chapter 10 contains
Appendices.

11
2.0 Literature Review
2.1 Overview
Matrix structure analysis is a very powerful tool which evolved from classical
methods to current computer aided analysis. Use of MATLAB in structural
analysis has long been started and a lot of programs are already available for
structural analysis by using MATLAB.Some books are specifically written on
this topic one such book is MATLAB codes for finite element analysis [11].
Some of the available programs are described here

2.2 Available MATLAB Programs


Matrix Structural Analysis (MSA) [1] is a computer program developed by
Hossein Rahami from University of Tehran-Iran in 2010 using MATLAB and
is an open source for research. This program can perform elastic static
analysis of hinged and rigid jointed 2D and 3D frames .Input has to be
prepared in the form of a MATLAB m.file. This input is then saved in a
structured array. The structured array is then used by a simple MATLAB
function to calculate the member internal forces and moments in local
coordinates, deflections and reactions. Program needs the user to be fully
conversant with MATLAB programming to develop the input file for the
structure.

There is a chance of error during the input definitions which user may not
notice at input entry time and can lead to error in Analysis results. As this
does not have any graphics to intimate the user about member dimensions
so user can not visualize the structure to confirm structural shape as defined
by input file. Moreover Program does not contain the functionality to draw
shear force, bending moment diagrams and deflected shape.

2D-Truss with GUI Program [2] was developed by Asare stephen & Yan Lou
from China in May 2009 using MATLAB and is open source. It can perform
elastic static analysis of 2D trusses only with loads applied at Nodes. As it
has Graphical user interface where user can input structure data and

12
visualize it so chances of error during input definitions are minimized.
Graphical user interface displays only deflected shapes and member forces
can be visualized in MATLAB command window only.

Limitation of this program is that it can only analyze 2D trusses. There is no


provision for the analysis of 3D trusses, 2D and 3D rigid jointed frames.

Beam and Truss Analysis utilities [3] program was developed by Roee Lahav
from Israel in June 2005 using MATLAB and is open source. Program is able
to perform structural analysis of beams and 2D trusses. Structural input is in
the form of a MATLAB m.file which then saves into MATLAB mat. File. The
program contains some predefined mat files which user can modify to
analyze any structure of ones own choice. Graphical user interface can run
any selected mat file and produce the results which appear on screen in GUI.

Program performs the stability check on the structure and intimates the user
if it is unstable. Reactions, member forces and deflected shapes can be
visualized on the screen. Main limitation of the program is that GUI is not
very well defined as user can hardly visualize all the buttons available for
analysis. User cannot modify any structural property. This program cannot
analyze 3D trusses, 2D and 3D rigid jointed Frames.

Structure analysis [4] program was developed by Yasser Bigdeli in 2012


using MATLAB and is open source. Program performs the static elastic
analysis of plane trusses, space trusses, grids, plane frames and space
frames. It is composed of only 1 m. file. It doesnt have Graphical user
interface even then Command window interface helps the user to input
structural data.

Interface is not very well defined even it contains too much spell mistakes
which is difficult for the user to understand. User cannot edit, once in
between the data input mode. For any correction, program has to be
launched again. Program has no functionality to draw shear force, bending
moment diagrams and deflected shapes which make it less user friendly in

13
the sense to visualize the structure to have a better structural input hence
leading to the correct analysis results.

Truss Analysis [5] program was developed by Frank McHugh in September


2012 using MATLAB and is open source. It performs the analysis of 2D and
3D Trusses by direct stiffness method. Basically this is an update of a part of
Matrix Structural Analysis (MSA) developed by Hossein Rahami. It contains
an ST additional function which is reformatted for readability and extensive
comments but the original code is unchanged.

It is limited to the analysis results in the command window and no Graphical


input and output is incorporated. User which is not well conversant with
MATLAB will have difficulty to understand it. There are more chances of error
during the input file building. It is not possible to edit any input once program
is running. To make any changes one has to edit the input file and re launch
the program.

Matrix Analysis of Three Dimensional Bar Structures MABS3D [6] program


was developed by Marcos Cesar Ruggeri in May 2010 using MATLAB. This
program is able to perform analysis of 3D bar elements with load applied on
the nodes. This program uses Microsoft Excel files for input data storage
rather than an m.file to get input data which makes it easy for user to
understand as these input files are predefined and no prior knowledge of
MATLAB is required to amend the data in input file. Only one has to replace
his values with the given ones.

Main Limitation of this program is that it does not have any Graphical input
for the user to have an idea that how the defined structure looks like. It is
incapable of analyzing rigid jointed frames. However Structure deflected and
original shapes are drawn at the end of analysis with the results shown in
command window. Load applied at nodes is also not visible in the graph
which makes difficult for the user to visualize the location of applied load,
which if applied at wrong location or direction can lead to the incorrect
analysis results.

14
Space Truss Systems as Linear Static Analysis [7] program was developed
by Ali Ozgul from Turkey in 2003 using MATLAB. Program mainly targets the
analysis of Space Trusses. It is composed of only one m.file containing input
data file as well. This program contains five predefined space truss problems
input data which user can modify as per his own requirement and run the
program to get the results. This require user to be well conversant with
MATLAB to analyze the structure.

This program does not support the Graphical user interface functionality
where user can easily visualize the structural shape. Results are only
available in command window making it difficult for the user to understand
and visualize the deflected shapes.

3D truss analysis\user interface in FEM [8] program was developed by


Balajee Ananthasayanam in January 2005 which was revised in February
2005 using MATLAB interface. Once the program is launched it guides the
user to MATLAB command window where user can input structure
data.However, the GUI does not follow a rational step-by-step approach in
entering analysis data and, thus, it is not friendly and error prone.

Even available MATLAB code does not contain any comments about the
specific inputs. Program performs the analysis of both 2D and 3D trusses
with output in the Graphical form where one can have a look on the original
structure and deflected shape. But still user can not visualize the load
application location which can lead wrong application of load or correct load
in wrong direction, hence incorrect analysis results.

MASTAN2 [9] program was developed by Ronald D. Ziemian (Professor of


civil Engineering at Becknell University) and William McGuire (Professor of
civil Engineering at Emeritus Cornell University) in 2010 using MATLAB
Graphical User Interface. It is capable of analyzing 2D, 3D trusses and
frames .It has the capability of 1st and 2nd order linear and non linear
analysis. Structural input is provided in the Graphical interface which is saved
into mat. File, which is then loaded by the MATLAB code and no MATLAB

15
prior knowledge, is required by the user to use this program. Program
interface is very well defined and easily understandable.

This program contains mostly p. files so it is not an open source for


research/modifications. Only one can have an idea how to design the
Graphical Interface using Menu buttons. Program has the capability to
present shear force, bending moment diagrams and deflected shapes so that
user can have better idea about the structural behavior.

All the above stated programs contain different functionalities and can well
analyze the different structures but no such program is available that
supports the Graphical user interfaces and is open for research which could
be used for teaching purpose as well as is more User friendly Graphical
Interface.

In view of the above, this project develops a static elastic structural analysis
program for 2D and 3D pin jointed and rigid jointed frames supported by a
friendly Graphical user interface.The program will be open source for
research students which could be further extended for non-linear static and
dynamic analysis. The program requires no previous MATLAB knowledge by
the user.However, the underlying MATLAB code is very well commented so
that its very easily understandable by a user who doesnt have any MATLAB
knowledge. The following table shows a comparison between the existing
Structural analysis programs by MATLAB and SABSM.

One major difference between SABSM and all available programs is that
SABSM only provides learning environment for direct stiffness method by
performing and displaying the number of nodes ,direction of elements with
DOF at each node, element stiffness matrix in local coordinates and
transformation matrix ,element stiffness matrix in global coordinates
,structure stiffness matrix etc

16
Table 2.1 Comparison of 9 Available MATLAB programs with SABSM

Truss Frame GUI Load


Program 2- 3- 2- Only Temperatu
3D Input Output
D D D Static re Effects
1-Matrix
Structural X X X
Analysis
2-2D Truss
with GUI X X X X
Program
3-Beam and
Truss
X X X X X
Analysis
Utilities
4-Structure
X X X
Analysis
5-
X X X X X
TrussAnalysis
6-MABS3D
X X X X X
7-Space
Truss X X X X X
Systems
8-3D Truss
X X X X X
Analysis
9-MASTAN2
X
10-SABSM
X

17
3.0 Theoretical Background

3.1 Overview

For analysis of any structure, it is modeled as a set of simple, idealized


elements connected at nodes. Analysis by direct stiffness method can be
divided into following steps.

1. Formulation of element stiffness matrix in local Coordinates ( ).


2. Formation of element transformation matrix T.

3. Transformation of element stiffness matrix in global Coordinates ( ).

4. Addition of all element stiffness matrices at pertinent DOF to form a


structural stiffness matrix (K).

5. Formation of Nodal load vector (P) in global coordinates.

6. Formation of Element load Vector ( ) in local coordinates for frames


only.

7. Transformation of Element load vector in global coordinates for frames


only.

8. Formation of Nodal displacement vector (U).

9. Solving to get unknown displacements at unconstrained joints.

10. Making use of displacements for step 6 to get reactions at constrained


joints.

11. Transformation of global displacements to local displacements to


calculate the member forces.

3.2 Coordinate System


Global: Structure Nodes are always described in global coordinates. It could
be expressed by uppercase letters of X, Y and Z.

18
Fig 3.1 Global Coordinates

Local: Element internal forces are described in the local coordinates. It is


represented by lowercase letters of x,y and z.

Fig 3.2 Local Coordinates

2D structures will be defined in X-Y plane where as 3D structures will be


defined in X-Y-Z plane.

3.3 Sign Conventions

19
Horizontal force is positive if directed to right side, vertical force is positive
upward and moment is positive in the counterclockwise direction as shown in
the Fig 3.3.

Fig 3.3 Sign Conventions

3.4 Degrees Of Freedom(DOF)


It is defined as an independent displacement of a node along X, Y or Z
axis.These displacements are always independent of each other.For
example a hinge support can have only one displacement (rotation
.Displacement is being used in a generalized context here as it could be
rotation as well as translation.Displacement in a structure depends upon
structure type as there could be one, two or none.

DOF in both local and global coordinate system remains same for a particular
case. But in case of trusses this is not the case as there is only one axial
deformation in local coordinates and two or three translations at each node in
2D and 3D trusses respectively. Degrees of freedom associated with each
type of element and its numbering can be summarized as shown in the Fig
(3.4)

20
Fig 3.4 Typical Degrees of Freedom for various types of elements

3.5 Element Stiffness Matrix


Each element stiffness properties are calculated based on the nature of element
DOF at each node, these properties are grouped together to form an element
stiffness matrix.

3.6 Structural Stiffness Matrix


Element stiffness matrices are then augmented into a single matrix which governs
the behaviour of the entire idealized structure, known as structural stiffness matrix.
This is obtained by multiplication of element stiffness matrix to transformation matrix
as in (3.1a)

3.7 Load Vector


Load vector is calculated such that known forces and Unknown reactions are
arranged as

21
3.8 Displacement Vector [U]
Displacement Vector is obtained by placement of unknown displacement on
the top and after that known displacements as

3.9 Calculation of Unknown Displacements and Reactions


Structural stiffness matrix is rearranged with respect to unknown
displacements and then partitioned with respect to unknown and known
displacements such that

3.10 Member Forces


Once the nodal displacements are known, member forces are calculated by
using the following standard equation

22
3.11 Planar Truss
A plane truss is a pin jointed structure which lies only in a single plane(X-Y).
Plane truss is made up of members connected at hinges. They generally
form a triangulated pattern with loading and member lying in the same plane
at joints which are termed as nodes.

3.11.1 Element stiffness matrix


A hinge connection can only transmit forces from one member to another
member but not the moment. For analysis purpose, the truss is loaded at the
joints. In the local coordinate system element stiffness matrix of a planar
truss element can be denoted by

3.11.2 Transformation matrix


Transformation matrix of a planar truss is denoted by the standard formula as

3.12 Space Truss


A space truss is a pin jointed structure which lies in a three dimensional
plane (X, Y, and Z).Space truss is made up of prismatic members connected
at joints. Like plane trusses space trusses are also loaded at their joints only
with members having tension or compression forces in it. Structural analysis
of space and plane trusses is identical.

In space truss, location of each node is represented by three global


coordinates(X, Y, and Z). Each node in a space truss can translate in any
direction in a three dimensional space so it is important to find all three
displacements in X ,Y, and Z directions to completely define the deflected
23
shape of the structure. It means a space truss has three degrees of freedom
at each joint and three structural coordinates at each joint to completely
analyze the structure.

Joints of a space truss can be numbered in any fashion, However the


degrees of freedom are numbered such that at first node of each element
first number will go to X ,second number will be for Y and third number will be
awarded to Z direction. Similar fashion will be carried out at each joint to
number the degrees of freedom.

3.12.1 Element stiffness matrix


In the local coordinate system element stiffness matrix of a Space truss element can
be denoted by

3.12.2 Transformation matrix


Transformation matrix of a Space truss is denoted by the standard formula as

is the angle between element local x-axis and global X-axis

is the angle between element local y-axis and global Y-axis

is the angle between element local z-axis and global Z-axis

3.13 Planar Frame


A plane frame is composed of straight elements joined together by rigid or
hinged connections. They have loading and reactions which always act in the
plane of the structure. Due to loads the frame may be subjected to axial force
as well as shear and bending moments. So frame exhibits the behavior of
both truss and beam. Stiffness matrix of frame can be obtained by
combination of beam and plane truss element stiffness.

24
A rigid joint can transmit axial, shear and bending moment forces. Element
can be loaded at nodes as well as between the nodes both by point loads as
well as uniformly distributed loads which could be transferred to nodal loads
by the standard formulas.

3.13.1 Element stiffness matrix


In the local coordinate system element stiffness matrix of a plane frame
element can be denoted by

3.12.2 Transformation matrix


Transformation matrix of a planar frame is denoted by the standard formula
as

3.14 Space Frame


Space frames are the structures whose members could be directed in any
direction in the space and could be connected by connections of both rigid
and flexible type. External loading on joints as well as on members can be in
any arbitrary direction in three dimensional space. As a result of applied
external loading these structures are subjected to bending moments about its
both principal axes, axial forces, torsion and shearing forces in both principal
directions.

25
Any unsupported joint of a three dimensional frame can translate as well as
rotate in any direction. So six degrees of freedom are always attached to any
joint of a frame structure out of which three are translations in X, Y and Z
directions and other three are rotations about the above axes.

Joints of a space frame can be numbered in any fashion, However the


degrees of freedom are numbered such that at first node of each element
first number will go to X translation ,second number will be for Y translation
and third number will be awarded to Z direction translation. Similarly fourth
number will be for rotation about X, fifth number will be for rotation about Y
and sixth numbering will be given to Z direction rotation. Similar fashion will
be carried out at each joint to number the degrees of freedom

3.14.1 Element stiffness matrix


In the local coordinate system element stiffness matrix of a space frame element
can be denoted by a 12x12 three dimensional bisymmetric element

-
1 I I 1 I I
-
1 I I 1 I I
- - -
G G
-
I I I I
-
I I I I
-
( 3.17)
-
1 I I 1 I I
- - -
1 I I 1 I I
-
G G
-
I I I I
-
I I I I
-

3.14.2 Transformation matrix


Transformation matrix of a space frame is denoted by the standard formula as

26
Where r is the rotation matrix which depends upon the angle between local y-
axis and global Y-axis of the element. Element start node is and end node
is .Z

Standard formula for the rotation of a 3D element with angle zero between
local y and global Y axis is given by

Standard formula for the rotation of a 3D element with angle 90 or 270


between local y and global Y axis is given by

27
4.0 Methodology
4.1 Introduction
This section presents a brief overview of the procedure adopted in writing MATLAB
code to program the stiffness method for SABSM.

4.2 Overview
SABSM can be divided into three different sections as shown in the flow chart
below.

Fig 4.1 Flowchart Program Methodology

Pre-processing stage defines the structural analysis problem which includes


definition of geometry, physical properties of the section, applied loads and
nodal constraints.

28
Processing stage solves the problem defined in the pre-processing stage
using direct stiffness method. Solution contains the unknown nodal
displacements and reaction forces at the constrained nodes.

Post-processing stage involves the calculations of the member forces using


the nodal displacements obtained from the processing stage and displays
bending moment and shear force values for the frame/beam members.
Moreover a complete step by step solution of each structure is available in
the command window.

4.3 Pre-processing
Pre-processing stage defines the problem in terms of different input data as
shown

Fig 4.2 Flowchart Preprocessing

4.3.1 Structure type


First step in the creation of geometry is to select the Structure type as shown
in the flow chart below.

29
Fig 4.3 Flowchart Program startup

Structure type tells the program to decide which element stiffness matrix and
transformation matrix to use to construct the global stiffness matrix.

4.3.2 Define nodal data


Problem geometry is defined in terms of nodes and elements. Nodes act
three fold purposes in the analysis and these are

1. Used to define Element connectivity


2. Used to apply load
3. Used to apply boundary conditions /constraints

Structure type decides the number of nodes to be input in the program. For
2D structures only X and Y coordinates are required but Z coordinate is
required only for 3D structures.

Fig 4.4 Flowchart Joint coordinates

30
When 2D- geometry is selected program sets the default X-Y plane for the
geometry input with global Y-axis in vertical direction and X-axis in horizontal
direction.

When 3D- geometry is selected program sets the default X-Y plane for the
geometry input with global Y-axis in vertical direction and X-axis in horizontal
direction and Z-axis acts out of paper plane by using the right hand rule.

4.3.3 Define elements/ nodal connectivity

Fig 4.5 Flowchart Element connectivity

Element length and direction cosines required for the construction of element
stiffness matrices and transformation matrices are calculated using the end
node coordinates .Element length for a 2D element is calculated by (4.1) and
3D element is calculated by (4.2). and are the coordinates of start node
and and are the coordinates of end node where as and are only
incase of 3D elements.

31
Fig 4.6 Flowchart Element properties

Area and elastic modulus are required for the 2D and 3D trusses.2D frame
element properties are area, elastic modulus and moment of inertia.3D frame
properties for the element are elastic modulus, area, moment of inertia about
z-axis, moment of inertia about y-axis, polar moment of inertia and shear
modulus.

4.3.4 Define loading

Fig 4.7 Flowchart Types of Loading

Trusses are assumed to carry only nodal loads. Frames are assumed to
carry both nodal loads as well as element loads. Nodal loads are always
considered in global coordinate system where as element loads will be
32
considered in the local coordinate system. Element loads considered are of
only two types i.e. point load and uniformly distributed load. Element loads
are converted into equivalent nodal loads by standard formulas.

4.3.5 Define nodal constraints


Nodal constraints represent the type of support and are of three types, fixed
hinged or roller.

Fig 4.8 Flowchart Nodal constraints

4.4 Processing
It involves the major part of computation from element stiffness matrix to
member force.

33
Fig 4.9 Flowchart Analysis Stage

4.4.1 Element stiffness matrix in global coordinates


For each element, stiffness matrix is transformed into global coordinates
using the transformation matrix. The purpose of this transformation is to
convert all stiffness matrices into one coordinate system so that they can be
combined.

34
Fig 4.10 Flowchart Element stiffness Formation

4.4.2 Element transformation matrix


Transformation matrix for each element is prepared which could be used to
transform element stiffness matrices, displacement vectors and force vectors
from local to global coordinates and from global to local coordinates
whenever required.

Fig 4.11 Flowchart Transformation Matrix Formation

4.4.3 Construction of structure stiffness matrix

35
Each element stiffness matrix is combined into a single global stiffness matrix
K, which represents the stiffness of the whole structure. This stiffness matrix
will be used to calculate the unknowns in the system.

4.4.4 Partitioning of structural stiffness matrix


Global structural stiffness matrix is partitioned into four parts such that rows
and columns with known applied forces and unknown displacements are
separated to get part, rows and columns with known applied forces and
zero or known displacements are separated as part. Similarly rows and
columns with unknown applied forces or reactions and known displacements
are separated as part where as rows and columns with unknown
reactions and zero or known displacements are separated as .

4.4.5 Prepare displacement vector


Nodal displacements at each node are tabulated into a vector form. Each row
in the vector represents the DOF at the respective node in global coordinate
system. Degree of freedom at each node depends on the type of analysis i.e.

1-2D truss---2DOF at each node. (

2-3D truss---3DOF at each node. (

3-2D Frame---3DOF at each node. (

4-3D Frame---6DOF at each node. (

4.4.6 Partitioning of displacement vector


Displacement vector is rearranged in such a way that all known and unknown
DOF are grouped together and displacement vector is divided into two
vectors. One portion represents unknown displacements ( ) and another
represents known displacements ( ).

4.4.7 Prepare load vector/partition load vector


Load vector for each element is individually prepared and added up to get the
structure load vector before partitioning.

36
Fig 4.12 Flowchart Load Vector Formation and Partition

4.5 Post-processing
In post-processing stage user can view the results in the following two
formats.

4.5.1 Results report


User can view the results in the graphical interface window in the form of
predefined tables which shows displacements, reactions and member forces
for the structure.

37
4.5.2 Command window step by step problem solution for learning
of direct stiffness method.
This is the most interesting part of the results as user can switch to command
window and a complete step by step solution by direct stiffness method is
available here. User can compare each part of the hand calculations and
verify his results. This part can be used for teaching direct stiffness method in
the class.

38
5.0 Structural Analysis Program by Stiffness Method
(SABSM)

This chapter describes the Structural Analysis Program by Stiffness Method


(SABSM) developed for the structural analysis of 2D and 3D trusses and
frames. The program was written by using the MATLAB, a very popular
computational environment to treat matrices and vectors .The main program
and each of the subroutines are described in detail from pre-processing to
post-processing.

5.1 Program Architecture

The structural analysis program by stiffness method (SABSM) calculates the


nodal displacements, reactions and member forces of a two dimensional and
three dimensional structure composed of beam/ or truss elements. The
program can consider the application of nodal loads in global axis and point
loads and uniformly distributed element loads in the local axis of the element.
Depending upon the type of element (2D truss, 3D truss, 2D frame, 3D
frame) different inbuilt subroutines are used by the program to deal with each
individually. For the structure type (SBSM_New) ; nodal coordinates
(SBSM_Add_Node) ; node drawing (plot_all_Node); element definition
(SBSM_Add_Elem) ; element drawing (plot_all_Element) ; application of
supports or nodal constraints definition (SBSM_Add_ND_Fixity) ; defining
material properties group (SBSM_Def_Mat_G) ; assigning material properties
individually to elements or all same (SBSM_Assign_Elem_GRP) ; defining
nodal load in the element global axis (SBSM_Add_ND_Load) ; defining
element point load (SBSM_Add_Elem_PL) ; defining element distributed load
in the element local axis (SBSM_Add_Elem_UDL) ; drawing point
load(arrows) ; drawing distributed load (Draw_UDL_LA) ; structural analysis
of 2D truss (solve_2D_Truss),3D truss (solve_3D_Truss) , 2D frame
(solve_2D_Frame), 3D frame (solve_3D_Frame) , result file
(SBSM_Elem_Report) deflected shape of the structure (plot_def_shape) .

39
The first step is to make the SABSM file available in the attached CD as
current directory of MATLAB and write SABSM on the command line to
launch the SABSM and then select the type of structure after which nodal
coordinates, nodal connectivity, element material properties, type of
constraints on the nodes and type of load is applied on the nodes and
elements. Subsequently analysis is carried out which leads to the results in
the form of a report having nodal deflections, reactions and element forces.
Another result file is available in the command window which is a step by
step solution of the problem by direct stiffness method to facilitate the
learning of direct stiffness method.

Fig 5.1 SABSM welcome screen

5.2 Preprocessing

This involves the selection of type of structure to be analyzed, defining the


nodal coordinates, defining the nodal connectivity to form the structural
elements, defining the nodal constraints, defining and assigning the element
properties. Last step in the preprocessing is to define the nodal and element
loads.

5.2.1 Type of structure

40
First step is the selection of structure type so that program can use the
predefined subroutines specific to each type of structure.

Fig 5.2 Selection of Structure Type

5.2.2 Nodal coordinates and connectivity

User can input nodal coordinates and nodal connectivity depending upon the
analytical model and SABSM will draw each node and user can continue
entering nodes in add node window until all nodes in the structure are
defined and drawn. Then all nodes can be connected by using the add
element, each element is drawn once its connectivity is entered.

Fig 5.3 Nodal Coordinates and Connectivity


41
5.2.3 Nodal constraints and material properties

Once the structure is drawn user can define the constraints at each node and
material properties group then assign the groups to each individual element.

Fig 5.4 Nodal Supports and Material properties

5.2.4 Structure loads

Last part is the load application which is of three different types .Types of
loading could be nodal load, element point load and element distributed load.
Nodal load will always be applied in global coordinates and element loads
are always applied in local element coordinates.

Fig 5.5 Structure Loads


42
5.3 Processing

This involves running the SABSM to carry out the structural analysis based
on the type of structure selected and defined. This prepares the file
containing the element stiffness matrix of each element in local coordinates,
transformation matrix of each element, element stiffness matrix of each
element in global coordinates, formation of structure stiffness matrix, partition
of stiffness matrix to get , , , ,formation of load vector and
partition of load vector, computation of displacements at unconstrained
degrees of freedom and reactions at constrained degrees of freedom,
computation of displacements in local coordinate system and at the end
computation of member forces.

5.4 Post processing

Results can be viewed in the results window and a step by step solution can
be viewed in MATLAB command window whose main purpose is to use
these results for education.

Fig 5.6 Analysis Results

5.5 Sample Problems Solved by SABSM

43
Four questions have been selected for structural analysis by SABSM
Program each 2D truss, 3D truss, 2D frame and 3D frame from structural
analysis book [10] and results obtained at each step are verified by hand
calculations in chapter 6.

5.5.1 2D truss

Find out nodal displacements, reactions and member forces for the plane
truss.

Fig 5.7 2D Truss Problem

Fig 5.8 Analytical Model

44
Truss is composed of 4 nodes and 3 elements and origin is at node 2.Input
file for SABSM is

Table 5.1 Nodal Coordinates

Node X (in) Y (in)


1 144 192
2 0 0
3 144 0
4 288 0

Table 5.2 Nodal Connectivity

Element Start End


1 2 1
2 3 1
3 4 1

Table 5.3 Material Properties

Elastic Modulus Cross-Sectional Area


(E) (A)

29000 As shown in Fig (5.7)

Table 5.4 Nodal Constraints

Node DOF-X DOF-Y


1 Free Free
2 Fix Fix
3 Fix Fix
4 Fix Fix

45
Table 5.5 Nodal Loads

Node
1 150 -300

5.5.1.1 Preprocessing

Truss is defined completely by SABSM with exactly same number of nodes


and number of elements marked in Fig 5.8

Fig 5.9 Preprocessing Complete

5.5.1.2 Processing

Analysis is carried out and SABSM intimates the user with the message that
analysis is complete and results can be viewed in the result file and a step by
step solution by direct stiffness method is available in MATALB command
window.

46
Fig 5.10 Analysis Complete

5.5.1.3 Post processing

Deflected shape of the structure will be drawn automatically once the


analysis intimation message box is closed. This deflected shape is based on
nodal displacements as shown in the Fig 5.11

Fig 5.11 Deflected Shape

5.5.1.4 Command window results

Command window shows the element number with start and end node in the
brackets. Next line shows the horizontal DOF as U and vertical DOF as V at
both start and end node. Next line displays the length of element.
Subsequently transformation matrix, element stiffness matrix in local

47
coordinates and global coordinates are displayed as shown in Fig 5.12 to Fig
5.14.

Fig 5.12 Element 1

Fig 5.13 Element 2


48
Fig 5.14 Element 3

Then structure stiffness matrix is displayed with degree of freedom marked


as column numbers.as shown in Fig 5.15

Fig 5.15 Structure Stiffness Matrix

Then constrained and unconstrained DOF are displayed according to Fig 5.8

49
Fig 5.16 Constrained and Unconstrained DOF

Then structure stiffness matrix is partitioned and each part is displayed


individually as shown in Fig 5.17, also nodal load vector is displayed as
shown in the Fig 5.18.

Fig 5.17 Partitioned matrices

50
Fig 5.18 Load Vector

Then nodal displacements and reactions are displayed as shown in the Fig
5.19 before the last step which shows the member forces in local coordinates
as shown in the Fig 5.20.

Fig 5.19 Displacements and Reactions


51
Fig 5.20 Member Forces

5.5.2 Space truss

Find out nodal displacements, reactions and member forces for the space
truss.

Fig 5.21 3D Truss Problem

52
Fig 5.22 Analytical Model

Truss is composed of 4 nodes and 3 elements. Input file for SABSM is

Table 5.6 Nodal Coordinates

Node X (mm) Y (mm) Z (mm)


1 -3000 0 5000
2 9000 0 6000
3 2000 0 -3000
4 0 12000 0

Table 5.7 Nodal Connectivity

Element Start End


1 1 4
2 2 4
3 3 4

Table 5.7 Material Properties

53
Elastic Modulus Cross-Sectional Area
(E) (A)

70 2000

Table 5.8 Nodal Constraints

Node DOF-X DOF-Y DOF-Z


1 Fix Fix Fix
2 Fix Fix Fix
3 Fix Fix Fix
4 Free Free Free

Table 5.9 Nodal Loads

Node
4 75 -150

5.5.2.1 Preprocessing

Truss is defined completely by SABSM with exactly same number of nodes


and number of elements marked in Fig 5.22

Fig 5.23 Fully Defined Structure ready for Analysis


54
5.5.2.2 Processing

Analysis is carried out and SABSM intimates the user with the message that
analysis is complete and results can be viewed in the result file and a step by
step solution by direct stiffness method is available in MATALB command
window.

Fig 5.24 Analysis Complete

5.5.2.3 Post processing

Deflected shape of the structure will be drawn automatically once the


analysis intimation message box is closed. This deflected shape is based on
nodal displacements as shown in the Fig 5.25

55
Fig 5.25 Deflected Shape

5.5.2.4 Command window results

Command window shows the element number with start and end node in the
brackets. Next line shows the horizontal DOF as U and vertical DOF as V
and DOF in Z direction as W at both start and end node. Next line displays
the length of element. Subsequently transformation matrix, element stiffness
matrix in local coordinates and global coordinates are displayed as shown in
Fig 5.26 to Fig 5.28.

Fig 5.26 Element 1

56
Fig 5.27 Element 2

Fig 5.28 Element 3

Then structure stiffness matrix is displayed with degree of freedom marked


as column numbers as shown in Fig 5.15

57
Fig 5.29 Structure Stiffness Matrix

Then constrained and unconstrained DOF are displayed according to Fig


5.22

Fig 5.30 Constrained and Unconstrained DOF

Then structure stiffness matrix is partitioned and each part is displayed


individually as shown the Fig 5.31-Fig 5.33, also nodal load vector is
displayed as shown in the Fig 5.34.

58
Fig 5.31 Partitioned matrices

Fig 5.32 Partitioned matrices

59
Fig 5.33 Partitioned matrices

Fig 5.34 Nodal Loads

60
Then nodal displacements and reactions are displayed as shown in the Fig
5.35 before the last step which shows the member forces in local coordinates
as shown in the Fig 5.36.

Fig 5.35 Displacements and Reactions

Fig 5.36 Member Forces

61
5.5.3 Plane frame

Find out nodal displacements, reactions and member forces for the plane
frame.

Fig 5.37 2D Frame

Fig 5.38 Analytical Model

Frame is composed of 3 nodes and 2 elements. Input file for SABSM is

Table 5.10 Nodal Coordinates

62
Node X (m) Y (m)
1 0 8
2 6 0
3 18 0

Table 5.11 Nodal Connectivity

Element Start End


1 2 1
2 2 3

Table 5.12 Material Properties

Elastic Modulus Cross-Sectional Area Moment of Inertia


(E) (A) (I)

0.013

Table 5.13 Nodal Constraints

Node DOF-X DOF-Y ROT-Z


1 Fix Fix Fix
2 Free Fix Free
3 Fix Fix Free

Table 5.14 Nodal Loads

Node
2 -150

Table 5.8 Element Point Loads

Distance from
Element
Start Node (m)
1 125 5
63
Table 5.15 Element Distributed Loads

Distance from Length of Distributed


Element
Start Node (m) Load (m)
2 -24 0 12

5.5.3.1 Preprocessing

Frame is defined completely by SABSM with exactly same number of nodes


and number of elements marked in Fig 5.38

Fig 5.39 Fully Defined Structure ready for Analysis

5.5.3.2 Processing

Analysis is carried out and SABSM intimates the user with the message that
analysis is complete and results can be viewed in the result file and a step by
step solution by direct stiffness method is available in MATALB command
window.

64
Fig 5.40 Analysis Complete

5.5.3.3 Post processing

Deflected shape of the structure will be drawn automatically once the


analysis intimation message box is closed. This deflected shape is based on
nodal displacements as shown in the Fig 5.41

Fig 5.41 Deflected Shape

5.5.3.4 Command window results

Command window shows the element number with start and end node in the
brackets. Next line shows the horizontal DOF as U and vertical DOF as V
and DOF around Z direction as Mz at both start and end node. Next line
displays the length of element. Subsequently transformation matrix, element
stiffness matrix in local coordinates and global coordinates are displayed as
shown in Fig 5.42 to Fig 5.45.

65
Fig 5.42 Element 1

Fig 5.43 Element 1

66
Fig 5.44 Element 2

Fig 5.45 Element 2

Then structure stiffness matrix is displayed with degree of freedom marked


as column numbers as shown in Fig 5.46

67
Fig 5.46 Structure Stiffness Matrix

Then constrained and unconstrained DOF are displayed according to Fig


5.47

Fig 5.47 Constrained and Unconstrained DOF

Then structure stiffness matrix is partitioned and each part is displayed


individually as shown the Fig 5.48-Fig 5.49, also nodal load vector is
displayed.
68
Fig 5.48 Partitioned Matrix

Fig 5.49 Partitioned Matrix and Nodal load vector

Then nodal displacements and reactions are displayed as shown in the Fig
5.50 before the last step which shows the member forces in local coordinates
as shown in the Fig 5.51.

69
Fig 5.50 Displacements and Reactions

Fig 5.51 Member Forces

5.5.4 Space frame

Find out the rotation matrix of each element and part of the structure
stiffness matrix

70
Fig 5.52 3D Frame

Fig 5.53 Analytical Model

Frame is composed of 4 nodes and 3 elements. Input file for SABSM is

71
Table 5.16 Nodal Coordinates

Node X (in) Y (in) Z (in)


1 240 0 0
2 0 0 0
3 240 -240 0
4 240 0 -240

Table 5.17 Nodal Connectivity

Element Start End


1 2 1
2 3 1
3 4 1

Table 5.7 Material Properties

Element 1 2 3

Elastic Modulus (E) 29000 29000 29000

Cross-Sectional Area (A) 32.9 32.9 32.9

Moment of Inertia ( 236 236 236

Moment of Inertia ( 716 716 716

Polar moment of Inertia ( 15.1 15.1 15.1

Shear Modulus(G) 11500 11500 11500

Angle between local & global Y(deg) 0 90 30

Table 5.18 Nodal Constraints

Node DOF-X DOF-Y DOF-Z ROT-X ROT-Y ROT-Z


1 Free Free Free Free Free Free
2 Fix Fix Fix Fix Fix Fix

72
3 Fix Fix Fix Fix Fix Fix
4 Fix Fix Fix Fix Fix Fix

Table 5.19 Nodal Loads

Node
1 -1800 1800

Table 5.20 Element Distributed Loads

Distance from Length of Distributed


Element
Start Node (in) Load (in)
1 -0.25 0 240

5.5.4.1 Preprocessing

Frame is defined completely by SABSM with exactly same number of nodes


and number of elements marked in Fig 5.53

Fig 5.54 Fully Defined Structure ready for Analysis

73
5.5.4.2 Processing

Analysis is carried out and SABSM intimates the user with the message that
analysis is complete and results can be viewed in the result file and a step by
step solution by direct stiffness method is available in MATALB command
window.

Fig 5.55 Analysis Complete

5.5.3.3 Post processing

Deflected shape of the structure will be drawn automatically once the


analysis intimation message box is closed. This deflected shape is based on
nodal displacements as shown in the Fig 5.56

74
Fig 5.56 Deflected Shape

5.5.4.1 Command window results

Command window shows the element number with start and end node in the
brackets. Next line shows the horizontal DOF as U and vertical DOF as V
and DOF in Z direction as W and three rotations around X ,Y and Z axis
respectively at both start and end node. Next line displays the length of
element. Subsequently rotation matrix is displayed as shown in Fig 5.57 to
Fig 5.59.

Fig 5.57 Element 1

75
Fig 5.58 Element 2

Fig 5.59 Element 3

Then constrained and unconstrained DOF along with part will appear as
shown in the Fig 5.60

76
Fig 5.60 DOF and Partitioned Matrix

77
6.0 Verification Of Results

All the sample problems have been solved by hand to verify and explain each
and every step carried out by the SABSM program.

6.1 2D Truss

Fig 6.1 2D Truss Problem

Fig 6.2 Analytical Model

Solution

Units:

78
2D truss has two degrees of freedom marked 1 & 2 at joint 1,which are
translations in X and Y directions. Restrained degrees of freedom are marked
as 3 through 8.

Element 1

Joint 2 is the start node and joint 1 is the end node for this element from the
analytical model. By applying (4.1)

Substituting E= 29000 and A=8 in (3.11)

By using (3.12) transformation matrix for element 1 is

By using the (3.1a) global stiffness matrix for element 1 can be calculated as

79
Element 2

Joint 3 is the start node and joint 1 is the end node for this element from the
analytical model. By applying (4.1)

Substituting E= 29000 and A=6 in (3.11)

By using (3.12) transformation matrix for element 1 is

By using the (3.1a) global stiffness matrix for element 2 can be calculated as

80
Element 3

Joint 4 is the start node and joint 1 is the end node for this element from the
analytical model. By applying (4.1)

Substituting E= 29000 and A=8 in (3.11)

By using (3.12) transformation matrix for element 3 is

By using the (3.1a) global stiffness matrix for element 3 can be calculated as

81
Structure stiffness matrix can be calculated by adding the element stiffness
matrix at each pertinent degree of freedom

Nodal Load Vector

By inspection of structure stiffness matrix part of the matrix is pertaining to


the degree of freedom 1 and 2 and will be given by

82
By using the standard equation unknown displacements at
node 1 can be calculated

By using the equation unknown reactions at node 2, 3 and 4


can be calculated

Element End Displacements and Forces

Element 1

Global element displacements are

83
By using u=TU local displacements are

Element 1 is in Tension

Element 2

Global element displacements are

By using u=TU local displacements are

84
Element 2 is in Compression

Element 3

Global element displacements are

By using u=TU local displacements are

Element 3 is in Compression

6.2 3D Truss

85
Fig 6.3 3D Truss Problem

Fig 6.4 Analytical Model


86
Solution:

Units:

The space truss has three degrees of freedom, which are translations of joint
4 in the global X, Y, and Z directions. These are numbered 10, 11, and 12
respectively. Restrained degrees of freedom are numbered through 1 to 12 in
the Fig 6.4.

Element 1

Joint 1 is the start node and joint 4 is the end node, for this element. By
applying (4.2)

By substituting E= 70 and A=2000 in the (3.13)

By using (3.14) transformation matrix for element 1 is

By using the (3.1a) global stiffness matrix for element 1 can be calculated as

87
Element 2

Joint 2 is the start node and joint 4 is the end node, for this element. By
applying (4.2)

By substituting E= 70 and A=2000 in the (3.13)

By using (3.14) transformation matrix for element 2 is

By using (3.1a) global stiffness matrix for element 2 can be calculated as

88
Element 3

Joint 3 is the start node and joint 4 is the end node, for this element. By
applying (4.2)

By substituting E=70 and A=2000 in the (3.13)

By using (3.14) transformation matrix for element 3 is

By using the (3.1a) global stiffness matrix for element 3 can be calculated as

89
Structure stiffness matrix can be calculated by adding the element stiffness
matrix at each pertinent degree of freedom

Columns 1 through 6

90
Columns 7 through 12

Nodal Load Vector

By inspection of structure stiffness matrix part of the matrix is pertaining to


the degree of freedom 10, 11 and 12 and will be given by

91
By using the standard equation unknown displacements at
node 4 can be calculated

By using the equation unknown reactions at node 1, 2 and 3


can be calculated

92
Element End Displacements and Forces

Element 1

Global element displacements are

By using u=TU local displacements are

Element 1 is in Tension

Element 2

Global element displacements are

93
By using u=TU local displacements are

Element 2 is in Compression

Element 3

Global element displacements are

By using u=TU local displacements are

94
Element 3 is in compression

6.3 2D Frame

Fig 6.5 2D Frame

95
Fig 6.6 Analytical Model

Solution:

Units:

The plane frame has three degrees of freedom, which are translations and a
rotation of joint 2 in the global Xian Z directions and rotation of joint 3 in Z
direction. These are numbered 4, 6, and 9 respectively. Restrained degrees
of freedom are numbered through 1 to 3, 5, 7 & 8 in the Fig (6.6).

Element 1

Joint 2 is the start node and joint 1 is the end node for this element from the
analytical model. By applying (4.1)

96
Substituting , A=0.013 and in

the (3.15)

By using (3.16) transformation matrix for element 3 is

By using the ( 3.1a) global stiffness matrix for element 1 can be calculated as

97
Element 2

Joint 2 is the start node and joint 3 is the end node for this element from the
analytical model. By applying ( 4.1)

Substituting , A=0.013 and in

the ( 3.15)

98
By using the (3.1a) global stiffness matrix for element 1 can be calculated as

Structure stiffness matrix can be calculated by adding the element stiffness


matrix at each pertinent degree of freedom

Nodal Load Vector

Element Load Vector ( )

99
For element 1 in local coordinates by using Fig (9.2)

For element 1 in Global coordinates by using the. (

For element 2 in local coordinates by using Fig (9.1)

For element 2 in Global coordinates by using the (

100
By inspection of structure stiffness matrix part of the matrix is pertaining to
the degree of freedom 4, 6 and 9 and will be given by

By using the standard equation unknown

displacements at node 2 and 3 can be calculated

By using the equation unknown reactions at node 1, 2


and 3 can be calculated

101
Element End Displacements and Forces

Element 1

Global element displacements are

By using u=TU local displacements are

102
Element 2

Global element displacements are

103
By using u=TU local displacements are

104
6.4 3D Frame

Find out the rotation matrix of each element and part of structure stiffness
matrix.

Fig 6.7 3D Frame

105
Fig 6.8 Analytical Model

Solution

Units:

The space frame has six degrees of freedom, which are translations and
rotations of joint 1 in the global X, Y and Z directions. These are numbered 1,
2,3,4,5 and 6 respectively. Restrained degrees of freedom are numbered
through 7 to 24 in the figure.

Element 1

Joint 2 is the start node and joint 1 is the end node for this element from the
analytical model. By applying ( 4.2)

106
Angle between local y-axis and global Y-axis, =0

By using the (3.19) rotation matrix is given by

Transformation matrix for element 1 will be calculated using (3.20)

Element 2

Joint 3 is the start node and joint 1 is the end node for this element from the
analytical model. By applying (4.2)

107
Angle between local y-axis and global Y-axis, =90 deg

By using the (3.20) rotation matrix is given by

Transformation matrix for element 2 will be calculated using (3.18)

Element 3

Joint 3 is the start node and joint 1 is the end node for this element from the
analytical model. By applying (4.2)

108
Angle between local y-axis and global Y-axis, =30 deg

.86603

By using ( 3.19) rotation matrix is given by

Transformation matrix for element 2 will be calculated using (3.18)

Results Verification 2D Truss

Results of 2D truss computed by SABSM has been compared by the hand


calculations as shown in the Table 6.1

Table 6.1 2D Truss Displacements and Reactions

SABSM Hand
DOF Description % Error
output Calculations

109
1 Displacement 0.21552 0.2155 0.0093
2 Displacement -0.13995 -0.1399 0.0357
3 Reaction -10.062 -10.0804 -0.1828
4 Reaction -13.416 -13.440 -0.1788
5 Reaction 7.7662e-015 0 0
6 Reaction 126.83 126.7844 0.0359
7 Reaction -139.94 -139.9076 0.0231
8 Reaction 185.58 186.5439 -0.5193

Table 6.2 2D Truss Member Forces

SABSM Hand
Element Description % Error
output Calculations
1 F21 -16.77 -16.82 -0.2981
2 F31 126.832 126.7844 0.0375
3 F41 233.23 233.1608 0.0296

The comparison of 2D Truss results shows that there is only a maximum


error of 0.55 %.

Results Verification 3D Truss

Results of 3D truss computed by SABSM has been compared by the hand


calculations as shown in the Table 6.3

Table 6.3 3D Truss Displacements and Reactions

SABSM Hand
DOF Description % Error
output Calculations
10 Displacement 17.871 17.87 0.006
11 Displacement -5.0794 -5.079 0.008
12 Displacement -7.7663 -7.766 0.039
1 Reaction -5.5693 -5.569 0.005
2 Reaction -22.277 -22.28 -0.013

110
3 Reaction 9.2822 9.28 0.024
4 Reaction -52.351 -52.35 0.002
5 Reaction 69.802 69.80 0.003
6 Reaction -34.901 -34.90 0.003
7 Reaction -17.079 -17.08 -0.003
8 Reaction 102.48 102.48 0
9 Reaction 25.619 25.62 -0.003

Table 6.4 3D Truss Member Forces

SABSM Hand
Element Description % Error
output Calculations
1 F14 -24.768 -24.7718 -0.015
2 F24 93.764 93.9763 -0.226
3 F34 107.001 106.9927 0.008

The comparison of 3D Truss results shows that there is only a maximum


error of 0.23 %.

Results Verification 2D Frame

Results of 2D Frame computed by SABSM has been compared by the hand


calculations as shown in the Table 6.5

Table 6.5 2D Frame Displacements and Reactions

SABSM Hand
DOF Description % Error
output Calculations
10 Displacement -0.00026195 -0.0002619 0.019
11 Displacement -0.0043172 -0.004317 0.004
12 Displacement 0.0078279 0.007827 0.011
1 Reaction 43.244 43.241 0.007
2 Reaction -18.648 -18.641 0.038
3 Reaction 26.577 26.570 0.026

111
4 Reaction 259.94 259.54 0.154
5 Reaction 56.756 56.75 0.011
6 Reaction 121.71 121.70 0.008

Table 6.6 2D Frame Member Forces

SABSM Hand
Element Description % Error
output Calculations
p21 40.864 40.863 0.003
q21 -101.594 -101.593 0.003
Mz21 -417.513 -417.512 0.003
1
p12 -40.684 -40.683 0.003
q12 -23.406 -23.405 0.003
Mz12 26.577 26.576 0.003
p23 -56.756 -56.755 0.003
q23 166.293 166.292 0.003
Mz23 267.513 267.512 0.003
2
p32 56.756 56.755 0.003
q32 121.707 121.706 0.003
Mz32 0 0 0.003

The comparison of 2D Frame results show that there is only a maximum


error of 0.003 %

Results Verification 3D Frame

Comparison of rotation matrices for each element and part of structure


stiffness matrix shows that there is only a maximum error of 0.003

112
7.0 Concluding Remarks

SABSM can perform linear static analysis of 2D/3D trusses and frames by
using direct stiffness method. Main features of the program are:-

SABSM is able to analyze any 2D/3D truss and frame with n number
of elements and n number of nodes with any cross-sectional
properties and different end conditions.
SABSM facilitates the user to Add or delete any node or element if
entered incorrectly which means no need to restart the program.
SABSM can display the distance between any two nodes and length
of any element during the geometry definition to keep the user
updated when required.
SABSM provides the learning environment for direct stiffness method
in the command window by displaying the complete information of the
structure. Structure solution is available with complete detail so that it
can be used to verify the hand calculations
SABSM has been checked at various stages of computations and by
solution of different example by hands.
Comparison of results by hand calculations and SABSM show less
than 0.55 % error.
Hence SABSM can be used not only for structural analysis of 2D and
3D frames but also used as a tool for teaching direct stiffness method
in class and is more user friendly than the available programs written
in MATLAB to date.

Program can be extended to do following tasks in future

More than one element loads can be applied on an element.


Nodal loads can be applied in any arbitrary direction.
DOF can be marked for better understanding of the user in the
structure graphics.
Deflected shapes can be drawn based on the displacement variation
along the element length.

113
Shear force, axial force, bending moments and reactions can be
drawn.
Program code can be extended to consider the secondary effects
such as temperature changes, fabrication errors and support
settlements.
Program code can be extended to non-linear structural analysis of
framed structures.
Program code can be extended to the dynamic analysis of structures
Program code can be extended to deal with structures of variable
cross-sections.

114
8.0 References

Web sites:

[3] [Online].Available:
http://www.mathworks.co.uk/matlabcentral/fileexchange/index?utf8=%E2%9
C%93&term=truss

[4] [Online].Available:
http://www.mathworks.co.uk/matlabcentral/fileexchange/39491-structure-
analysis

[5] [Online].Available:
http://www.mathworks.co.uk/matlabcentral/fileexchange/38044-truss-analysis

[6] [Online].Available:
http://www.mathworks.co.uk/matlabcentral/fileexchange/27452-matrix-
analysis-of-three-dimensional-bar-structures-mabs3d

[7] [Online].Available:
http://www.mathworks.co.uk/matlabcentral/fileexchange/14020-space-truss-
systems-as-linear-static-analysis/all_files

[8] [Online].Available:
http://www.mathworks.co.uk/matlabcentral/fileexchange/6832-3d-truss-
analysisuser-interface-in-fem

[9] [Online]. Available: http://www.mastan2.com

Books:

[10] Aslam Kassimali, MATRIX ANALYSIS Of STRUCTURES, 2nd ed.

[11] A.J.M.Ferreira, MATLAB Codes for Finite Element Analysis (Solids


and Structures), 2000.

115
9.0 Appendix
9.1 Fixed End Forces
d/2 d/2
w
M1 M2

a b

V1 V2
L=a+b

wd
M1 = 12ab2 + L 3b d2
12L2
wd
M2 = 12a2 b + L 3a d2
12L2
wdb M1 + M2
V1 = +
L L
wda M1 + M2
V2 =
L L

Fig 9.1 Fixed End Forces UDL

P
M1 M2

a b

V1 V2
L=a+b

Pab2
M1 =
L2
Pa2 b
M2 =
L2
Pb2
V1 = b + 3a
L3
Pa2
V2 = a + 3b
L3

Fig 9.2 Fixed End Forces Point Load

116

You might also like