Download as pdf or txt
Download as pdf or txt
You are on page 1of 507

@seismicisolation

@seismicisolation
Matrix Structural Analysis and
the Finite Element Methods
Using Scilab and Octave
This book covers code development for structural analysis and includes topics from
finite element methods such as modeling and analysis of continuum structures. It
explains the concepts showing derivation of necessary equations, relationships, and
steps in solving structural analysis problems. It contains worked examples, problem
sets, and ample Scilab and Octave codes to teach structural analysis techniques using
these softwares.

Features:
• Enables readers to distinguish between the flexibility and the stiffness meth-
ods of structural analysis.
• Clarifies the procedures in the direct stiffness methods as applied to discrete
structures and use of these for the analysis of 2D and 3D structures.
• Presents treatment of Finite Element Methods as a logical extension of the
Direct Stiffness Method.
• Provides sufficient solved examples and didactic problems (with solutions)
focusing on the analysis of statically indeterminate structures.
• Treats discrete and continuum structural analysis using similar matrix anal-
ysis procedures.
Focused on problem solving through programming, this book guides senior under-
graduate and graduate students in structural and civil engineering.

@seismicisolation
@seismicisolation
@seismicisolation
@seismicisolation
Matrix Structural Analysis
and the
Finite Element Methods
Using Scilab and
Octave
A Problem-Solving Approach

Bedilu Habte

@seismicisolation
@seismicisolation
Designed cover image: Bedilu Habte

First edition published 2025


by CRC Press
2385 NW Executive Center Drive, Suite 320, Boca Raton FL 33431
and by CRC Press
4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN
CRC Press is an imprint of Taylor & Francis Group, LLC
© 2025 Bedilu Habte

Reasonable efforts have been made to publish reliable data and information, but the author and publisher
cannot assume responsibility for the validity of all materials or the consequences of their use. The
authors and publishers have attempted to trace the copyright holders of all material reproduced in this
publication and apologize to copyright holders if permission to publish in this form has not been
obtained. If any copyright material has not been acknowledged please write and let us know so we may
rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information storage
or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, access www.copyright.com or
contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923,
978-750-8400. For works that are not available on CCC please contact
mpkbookspermissions@tandf.co.uk
Trademark notice: Product or corporate names may be trademarks or registered trademarks and are used
only for identification and explanation without intent to infringe.
ISBN: 9781032359175 (hbk)
ISBN: 9781032359182 (pbk)
ISBN: 9781003329350 (ebk)

DOI: 10.1201/9781003329350
Typeset in Times
by Newgen Publishing UK

@seismicisolation
@seismicisolation
Dedication

I dedicate this book to my best friend and colleague Prof. Asrat


Worku Setegn as a reminder to our friendship. You have been
supportive ever since our freshman years and I am lucky and grateful
to have you on my side. You have also been my inspiration throughout
the writing of this book.

@seismicisolation
@seismicisolation
@seismicisolation
@seismicisolation
Contents
Preface.......................................................................................................................xi
Acknowledgments.................................................................................................... xv
List of Figures ........................................................................................................xvii
List of Tables...........................................................................................................xxi

SECTION I MATRIX STRUCTURAL ANALYSIS


Chapter 1 Introduction ..................................................................................... 3
1.1 Structural Classification.......................................................... 3
1.1.1 Plane Truss.............................................................. 3
1.1.2 Beam ....................................................................... 3
1.1.3 Plane Frame ............................................................ 5
1.1.4 Grid ......................................................................... 5
1.1.5 Space Truss ............................................................. 5
1.1.6 Space Frame............................................................ 5
1.2 Static/Kinematic Indeterminacy ............................................. 5
1.3 Matrix Structural Analysis....................................................10
1.3.1 The Flexibility Coefficient...................................... 10
1.3.2 The Stiffness Coefficients .......................................12
1.3.3 Flexibility and Stiffness Matrices ........................... 13
1.4 Scilab Software Environment ............................................... 15
1.5 Octave Software Environment .............................................. 19
1.6 Programming in Scilab and Octave ......................................22
1.6.1 Operators and Their Precedence............................. 23
1.6.2 Variables .................................................................23
1.6.3 Data Types .............................................................. 23
1.6.4 Expressions and Statements.................................... 24
1.6.5 If/Else Statement.....................................................24
1.6.6 While Statement...................................................... 25
1.6.7 For Statement..........................................................25
1.6.8 Branching/Case Statements ....................................26
1.6.9 User-Defined Functions .......................................... 27
1.6.10 Simple File Input/Output ........................................ 28
1.7 Problems ............................................................................... 29

Chapter 2 The Basic Methods ........................................................................ 35


2.1 The Basic Flexibility Method ............................................... 35
2.1.1 Solution Steps ......................................................... 37

@seismicisolation
@seismicisolation vii
viii Contents

2.1.2 Examples................................................................. 38
2.2 The Basic Stiffness Method.................................................. 59
2.2.1 Solution Steps ......................................................... 60
2.2.2 Examples................................................................. 61
2.3 Problems ............................................................................... 77

Chapter 3 The Formalized Methods............................................................... 81


3.1 The Formalized Flexibility Method...................................... 81
3.1.1 Member Flexibility ................................................. 81
3.1.2 Derivation of Structure Flexibility.......................... 85
3.1.3 Solving for AQ and Solution Steps ......................... 87
3.1.4 Examples................................................................. 89
3.2 The Formalized Stiffness Method....................................... 135
3.2.1 Member Stiffness....................................................136
3.2.2 Derivation of Structure Stiffness ............................139
3.2.3 Assembling Structure Stiffness...............................141
3.2.4 Solving for DJ and Solution Steps..........................142
3.2.5 Examples.................................................................143
3.3 Problems ............................................................................. 192

Chapter 4 The Direct Stiffness Method........................................................ 196


4.1 Introduction......................................................................... 196
4.2 Complete Member Stiffness ............................................... 197
4.2.1 Spring and Bar Elements ........................................197
4.2.2 Beam .......................................................................198
4.2.3 Plane Truss..............................................................199
4.2.4 Plane Frame ............................................................201
4.2.5 Grid Structure .........................................................203
4.2.6 Space Truss.............................................................204
4.2.7 Space Frame............................................................207
4.3 Solution Steps in the Direct Stiffness Method.................... 210
4.4 Examples............................................................................. 211
4.5 Problems ............................................................................. 281

Chapter 5 Special Cases in the Direct Stiffness Method.............................. 284


5.1 Introduction......................................................................... 284
5.2 Different Element Types in a Structure .............................. 284
5.3 Beam on Elastic Foundation ............................................... 285
5.3.1 Two-parameters Mechanical Model .......................286
5.4 Non-Prismatic Members..................................................... 287
5.5 Inclined Roller support ....................................................... 288
5.6 Member Discontinuities (Hinge/Roller) ............................. 291
5.7 Symmetric and Anti-symmetric Structures ........................ 292
5.8 Examples............................................................................. 293

@seismicisolation
@seismicisolation
Contents ix

5.9 Problems ............................................................................. 314

SECTION II FINITE ELEMENT METHODS

Chapter 6 Introduction and 1D Finite Element Analysis ............................. 319


6.1 Introduction......................................................................... 319
6.1.1 Nodes and Finite Elements .....................................319
6.1.2 A Brief History .......................................................322
6.1.3 An Overview...........................................................322
6.2 3D Elasticity ....................................................................... 325
6.3 Interpolation/Shape Function.............................................. 328
6.4 Element Stiffness Matrix .................................................... 329
6.4.1 Equivalent Nodal Loads Vector ..............................330
6.5 Common Steps in the FEM................................................. 330
6.6 Symbolic Computation ....................................................... 333
6.7 1D FE Analysis................................................................... 335
6.7.1 Stiffness of a Linear Bar Element...........................336
6.7.2 Stiffness of a Quadratic Bar Element .....................337
6.7.3 Beam Elements .......................................................350
6.7.4 DSM as a Special Case of the FEM........................353
6.8 Problems ............................................................................. 357

Chapter 7 2D Finite Element Analysis......................................................... 361


7.1 Introduction......................................................................... 361
7.2 Plane Stress, Plane Strain and Axisymmetric Problems..... 363
7.3 Constant Strain Triangle ..................................................... 365
7.3.1 Stiffness Matrix of a CST .......................................370
7.4 Linear Strain Triangle......................................................... 383
7.5 Bi-linear Rectangular Element ........................................... 403
7.6 Natural Coordinate & Isoparametric Representation ......... 409
7.6.1 Relationship between Global and Natural
Coordinates .............................................................411
7.7 Iso-P Representation for Quadrilateral Elements ............... 412
7.7.1 Derivative Relationships in 2D ...............................413
7.8 Numerical Integration Using Gauss Quadrature................. 419
7.9 Axisymmetric Problem....................................................... 423
7.10 Problems ............................................................................. 431

Chapter 8 3D Finite Element Analysis......................................................... 435


8.1 Introduction......................................................................... 435
8.2 Tertahedral Element............................................................ 435
8.2.1 Stiffness Matrix of a Tetrahedral Element ..............439

@seismicisolation
@seismicisolation
x Contents

8.3 Hexahedral Element............................................................ 449


8.3.1 Stiffness Matrix of a Hexahedral Element..............452
8.4 Problems ............................................................................. 468
Beam Deflection ...........................................................................................471
Fixed-End Actions .........................................................................................475
FPS vs SI Unit Conversion ............................................................................477
References ....................................................................................................479

Index...................................................................................................................... 483

@seismicisolation
@seismicisolation
Preface
The two topics Matrix Structural Analysis (MSA) and Finite Element Methods
(FEM) in Structural Analysis are usually offered as courses to senior undergrad-
uate or post graduate students in the civil, structural and mechanical engineering
programs. The Direct Stiffness Method (DSM), a major topic in MSA, deals with
structures composed of discrete elements, while the basis for the FEM in Structural
Analysis is, on the other hand, creating a mesh (discretization) of the given contin-
uum structure and then applying the procedures of the DSM on the resulting dis-
cretized structure. In this sense, the FEM in Structural Analysis is an extension of
the DSM, and that is the reason why this book has been written to integrate the fields
of MSA and FEM in a unified manner.
My journey around MSA and FEM started in the late 1980s during my MSc
courses and thesis work entitled “A Computer Program for the Elastic Analysis of
Plane Structures” [16] written in the FORTRAN programming language. Through
my experience and the many years of teaching these courses, I observed that it is
easy to understand the concepts in matrix methods. Still, using these concepts in
practically solving structural analysis problem becomes challenging. The main chal-
lenge is the difficulty in trying to track the steps and perform the essential matrix
operations to formulate and solve structural analysis problems manually (on paper).
Access to computing facilities has been increasing from time to time, and a typi-
cal college student nowadays owns a laptop or has access to a personal computer at
home or the college. Besides, there are appropriate software that assist in perform-
ing routine and complex matrix operations like matrix multiplication and inversion.
The second reason for writing this book is to overcome those difficulties associated
with formulating and solving structural analysis problems through programming or
coding on a suitable platform step by step and interactively.
The book aims to provide concise reading materials explaining the concepts and
showing the derivation of necessary equations, relationships and steps in solving
structural analysis problems. It also contains worked examples, problem sets and am-
ple Scilab and Octave code to teach structural analysis techniques using MSA/FEM.
Scilab and Octave are free and open-source software for scientific computation and
visualization. In addition to being free and open-source, they offer excellent plat-
forms for practicing computer-aided structural analysis tasks. Since the syntax for
Octave is identical to Matlab, the Octave program codes in this book can be exe-
cuted in Matlab directly without any modification.
There are several structural analysis software packages, but generally, they are
not appropriate to use in teaching MSA/FEM courses, at least in the initial phase.
The reason is the most of them focus primarily on problem definition (geometry, ma-
terial property and boundary condition) and the final step of colorfully displaying the
analysis results (displacements and stresses) performing all the other steps internally.
Such softwares are only recommended for use in the classroom to model complex

@seismicisolation
@seismicisolation xi
xii Preface

situations once the students have experienced the problem-solving skills discussed
in this book.
The book contains two sections and eight chapters. Section I comprises Chapters
1–5 focusing on the MSA, while Section II covers Chapters 6–8 discussing the FEM.
Chapter 1 gives a general introduction to structural classification, definition of flex-
ibility and stiffness coefficients and matrices, a description and a tutorial about the
Scilab and Octave platforms and also programming using these softwares. The basic
flexibility and stiffness methods are discussed in Chapter 2. Chapter 3 explains the
formalization of the flexibility and stiffness methods. Here, the structure property
is derived from the properties of its elements by using appropriate transformation
matrices from elements to the structure. The concept of partitioning the structure
equations to solve for the main unknowns and then back substitution to solve for the
element (internal) results using the main unknowns is also explained. Chapter 4 fo-
cuses on the DSM applied to prismatic structures. Starting with spring arrangements,
the chapter discusses how the DSM is used for 1D bar elements, beams, plane trusses,
plane frames, grid structures, space trusses and space frames. Special cases that cre-
ate difficulty in the straightforward application of the DSM are treated in Chapter
5, such as different element types within a structure, non-prismatic members and
inclined roller supports.
An introduction to the FEM is provided in Chapter 6. After a brief overview of
the method, the basic relationship for the derivation of the element stiffness matrix
in general is provided in Section 6.5. The chapter also covers some parts of one-
dimensional FEM analysis, as most of this has already been covered under the DSM
in Chapters 4 and 5 for ”naturally” discretized structures. The finite element analy-
sis of two-dimensional structures and three-dimensional structures are discussed in
Chapters 7 and 8, respectively. This edition of the book does not cover finite ele-
ment analysis of plate bending, shell structures and non-linear analysis. As a quick
reference, units conversion table (FPS to SI) is provided for some of the most com-
monly encountered units in Appendix. Formulae for simple and common cases of
“Beam Deflection” as well as “Fixed-End Actions” for some common loading are
also provided in Appendix.
This book differs from other similar literature in that it guides the readers to be
able to write their program code to solve structural analysis problems throughout the
book. Instead of depending on an existing black-box type software where users have
to prepare the problem data in a specified format and then submit it to the program
for the solution, users have full control of preparing and using their code, thereby
building the confidence needed for further application of the programming skills.
The features of this book that make it distinct from other similar works are that it:

• Uses both the international (SI) and imperial (FPS) system of units
• Focuses on the analysis of statically indeterminate structures
• Clarifies static and kinematic classification of structures
• Distinguishes between the flexibility and the stiffness methods of structural
analysis

@seismicisolation
@seismicisolation
Preface xiii

• Describes the procedure to use the basic and formalized approaches to both
the flexibility and the stiffness methods
• Clearly outlines the procedure for the DSM to analyze any type of prismatic
structure
• Treats discrete and continuum structures using the identical matrix meth-
ods, showing that the FEM for structural analysis is an extension of the
MSA
• Depends only on free and open-source software Scilab and Octave, and
provides worked examples that are supported by program codes prepared
in either one of these software
• Provides sufficient didactic problem sets at the end of each chapter

Focused on problem solving through programming, the book guides the reader
from first principles to advanced algorithms. By following the path recommended in
this book, students will acquire a very important programming skill that will serve as
a research toolkit during their studies and workplaces after graduation. The student
or practicing engineer will build the confidence and be able to better understand and
assess the performance of other structural analysis software packages.

@seismicisolation
@seismicisolation
@seismicisolation
@seismicisolation
Acknowledgments
My first thanks goes to Dr. Gagandeep Singh, Senior Publisher at CRC Press, for
the initiation, organization and continuous follow up of this project. Thanks to the
team of CRC Press for all the support and providing frequent essential information
for the project; specially to Mr. Shashi Kumar of CRC for the technical support and
guidance offered in using the LaTeX book template.
I would like to thank some of my friends and relatives for trying to proofread the
first draft of this work.
I thank my family, especially my wife Mekdes and my children Hirut and
Yonatan for giving me the time and space I needed during the preparation of this
book.
Finally, thank God for letting me start and for blessing me with the strength to
finish this work.

@seismicisolation
@seismicisolation xv
@seismicisolation
@seismicisolation
Figures
1.1 Classification of Prismatic Structures............................................................... 4
1.2 Primary Unknowns in the Flexibility and the Stiffness Methods ................... 11
1.3 Flexibility Coefficients of a Simple Beam...................................................... 11
1.4 The Stiffness Coefficients ............................................................................... 12
1.5 The Scilab Software Environment .................................................................. 16
1.6 The Octave Software Environment................................................................. 19
1.7 Problems Set 1 ................................................................................................ 31
2.1 Beam and Truss with Respective Primary Structures..................................... 36
2.2 Alternative Primary Structures ....................................................................... 37
2.3 Propped Cantilever Beam ............................................................................... 39
2.4 A Plane Truss with first Degree Statically Indeterminacy.............................. 40
2.5 Two-Span Beam with Primary Structure ........................................................ 43
2.6 Displacements DL and Flexibility Coefficients.............................................. 44
2.7 Reactions of the Two-Span Beam for w = 35 kN/m....................................... 45
2.8 Alternative Primary Structure for the Two-Span Beam.................................. 46
2.9 Displacements on Primary Structure DL and fi j ............................................. 47
2.10 (a) A Plane Frame and Loading and (b) A Particular Primary
Structure.......................................................................................................... 50
2.11 A Grid Structure ............................................................................................. 54
2.12 Analysis Results of the Grid Structure. .......................................................... 58
2.13 Basic Structure of a Beam and a Truss ........................................................... 60
2.14 Propped cantilever beam................................................................................. 62
2.15 Solution of a Propped Cantilever Beam ......................................................... 63
2.16 Basic Structure under Unit Displacements ..................................................... 64
2.17 Basic Stiffness Method for a Two-Span Beam ............................................... 68
2.18 Reactions of the Two-Span Beam Using Equivalent Nodal Load. ................. 70
2.19 Basic Structure for a Plane Frame. ................................................................. 72
2.20 Basic Structure for a Grid Structure. .............................................................. 75
2.21 Problems Set 2 ................................................................................................ 78
3.1 A Truss Member Subjected to Action am . ...................................................... 82
3.2 A Beam Member with Transverse and Rotational DOFs. .............................. 83
3.3 A Plane Frame Member with Three DOFs..................................................... 83
3.4 A Grid Member with Its Three DOFs............................................................. 84
3.5 The Six Possible DOFs of a Space Frame Member........................................ 85
3.6 Action Transformation Matrix, BMS . .............................................................. 88
3.7 (a) Plane truss and (b) Primary Structure with All Parameters Labeled......... 89
3.8 Analysis Result of the Plane Truss. ................................................................ 95
3.9 Statically Indeterminate Beam........................................................................ 96
3.10 Primary Structure of the Beam ....................................................................... 97
3.11 Analysis Result of the Beam......................................................................... 101

@seismicisolation
@seismicisolation xvii
xviii List of Figures

3.12 Plane Frame Having Three-Members........................................................... 103


3.13 (a) Primary Structure and (b) Member Actions of the Plane Frame............. 104
3.14 Analysis Result for the Plane Frame. ........................................................... 111
3.15 Grid Structure Having Three-Members........................................................ 113
3.16 (a) Primary Structure and (b) Member Actions of the Grid Structure.......... 114
3.17 Analysis Result for the Grid Frame. ............................................................. 119
3.18 (a) Given Space Frame and (b) Corresponding Primary Structure............... 122
3.19 Free-Joint Displacements of the Space Frame.............................................. 123
3.20 A Truss Member Subjected to Unit Displacement dm .................................. 136
3.21 A Beam Member with Transverse and Rotational DOFs. ............................ 137
3.22 A Plane Frame Member with Three DOFs................................................... 138
3.23 A Grid Member with Three DOFs................................................................ 138
3.24 The Six DOFs of a Space Frame Member. ................................................... 139
3.25 Displacement Transformation Matrix, CMS . ................................................. 143
3.26 Plane Truss.................................................................................................... 143
3.27 DJ s and AR s of the Plane Truss..................................................................... 144
3.28 Unit Displacements to Determine Cms. ....................................................... 146
3.29 Two-Span Beam............................................................................................ 152
3.30 Primary Structure of the Beam ..................................................................... 153
3.31 Structure Displacements D j s = 1 and DR s = 1. ........................................... 155
3.32 Plane Frame Having Three-Members........................................................... 160
3.33 (a) Free-Joint Displacements and Reactions and (b) Member Actions of
the Plane Frame. ........................................................................................... 161
3.34 Grid Structure Having Three-members. ....................................................... 169
3.35 Member Actions of the Grid Structure. ........................................................ 170
3.36 Space Frame Structure Having Three-Members. ......................................... 179
3.37 Basic Structure of the Space Frame.............................................................. 180
3.38 Free-Joint Displacements of the Space Frame.............................................. 181
3.39 Problems Set 3 .............................................................................................. 194
4.1 Spring Element. ............................................................................................ 197
4.2 Bar Element. ................................................................................................. 198
4.3 Beam Element............................................................................................... 199
4.4 Plane Truss Element. .................................................................................... 199
4.5 2D Vector Transformation. ........................................................................... 200
4.6 Plane Frame Element.................................................................................... 202
4.7 Grid Frame Element in X–Y Plane............................................................... 203
4.8 Space Truss Element..................................................................................... 205
4.9 Vector in 3D: (a) Global Components and (b) Local Components. ............. 206
4.10 Space Frame Element. .................................................................................. 209
4.11 Springs: (a) Spring System and Loading and (b) Global Nodes, Elements
and DOFs of the Spring System. .................................................................. 212
4.12 Bar Elements: (a) 1D Structure and Loading and (b) Its Global Nodes
and DOFs ...................................................................................................... 217
4.13 (a) Fixed-End-Actions and (b) Equivalent Nodal Loads Due to the
Temperature Increase.................................................................................... 219

@seismicisolation
@seismicisolation
List of Figures xix

4.14 Beam: (a) Beam and Loading and (b) All Nodal Displacement
Components. ................................................................................................. 222
4.15 Final Member End Actions, Am s. ................................................................. 226
4.16 Plane Truss (a) Plane Truss and Loading and (b) Nodes, Elements and
Global DOFs................................................................................................. 232
4.17 (a) Plane frame and Loading and (b) Nodes, Elements and Global DOFs... 240
4.18 (a) Grid Structure Having three-Members and (b) Its Nodes, Members
and Global DOFs. ......................................................................................... 250
4.19 (a) A Four Members Space Truss and (b) Nodes, Members and Global
DOFs............................................................................................................. 259
4.20 (a) A Single-Storey One-Bay Rectangular Space Frame and
(b) Members and Global DOFs of the Space Frame .................................... 269
5.1 A Plane Frame Structure with Mixed Element Types. ................................. 285
5.2 Beam on Elastic Foundation ......................................................................... 286
5.3 Beam on Elastic Foundation with Tension Force at Ends. ........................... 286
5.4 Non-prismatic elements ................................................................................ 287
5.5 A Plane Frame with Inclined Roller Support. .............................................. 289
5.6 Inclined Roller Support with Rotated Global Coordinate System................ 289
5.7 Inclined Roller Support Substituted by an Axially Rigid Member............... 290
5.8 Inclined Roller Support with Local and Global Coordinates. ...................... 290
5.9 Beam Having a Moment Discontinuity at Distance a from Node-1............. 292
5.10 Half of a Symmetric/Anti-Symmetric Frame Considered for Analysis. ...... 293
5.11 A Structure with Different Element Types. .................................................. 293
5.12 Problems Set 5 .............................................................................................. 315
6.1 Typical Finite Elements in Structural Analysis. ........................................... 320
6.2 A Circle with Diameter = 1 unit to Approximate π .................................... 321
6.3 A 3D Stressed Element................................................................................. 325
6.4 Deformed Shape of the Stress Block. ........................................................... 326
6.5 Linear Interpolation. ..................................................................................... 328
6.6 Idealization of a Plane Truss......................................................................... 331
6.7 Nodes and Elements of the Plane Truss........................................................ 331
6.8 Linear Interpolation of a Plane Truss. .......................................................... 332
6.9 Assembling Element Stiffness into Structure One. ...................................... 332
6.10 A Plot of the vertical Displacement of the Truss.......................................... 333
6.11 A 1D Bar Element ........................................................................................ 335
6.12 Quadratic Bar Element. ................................................................................ 338
6.13 (a) Tapered Bar Under Axial Load P, (b) Two Linear Elements and
(c) Single Quadratic Element........................................................................ 339
6.14 Plot of Exact and FEM Displacement Solutions. ......................................... 342
6.15 Stress Plot for the Three Cases. .................................................................... 343
6.16 Beam Element............................................................................................... 351
6.17 Shape Functions of a Beam Element. ........................................................... 352
6.18 Problems Set 6 .............................................................................................. 358
7.1 Plate Structure............................................................................................... 362
7.2 2D Plate Structure: (a) Meshed Plate (b) Typical Triangular Element......... 362

@seismicisolation
@seismicisolation
xx List of Figures

7.3 2D Stress Components.................................................................................. 362


7.4 Tapering Plate (with a Hole) as Typical Plane Stress Problem..................... 363
7.5 2D Section of a Retaining Wall as Typical Plane Strain Problem. ............... 365
7.6 Constant Strain Triangle. .............................................................................. 366
7.7 Shape Functions of a CST Element. ............................................................. 367
7.8 Area Coordinates. ......................................................................................... 368
7.9 Shape Functions for a CST. .......................................................................... 368
7.10 (a) Rectangular Plate and Loading and (b) Two CST Elements................... 376
7.11 Nodal Loading and Support Conditions. ...................................................... 377
7.12 Symmetrically Meshed Four CST Elements. ............................................... 380
7.13 Displacement u and Stress σx Distribution for 1024 CST Elements............ 381
7.14 A Linear Strain Triangle. .............................................................................. 383
7.15 Rectangular Plate Two LST Elements. ......................................................... 385
7.16 Integration Limits for the Two Elements. ..................................................... 390
7.17 Equivalent-Nodal-Load................................................................................. 396
7.18 Rectangular Element..................................................................................... 403
7.19 Plate as a Single Rectangular Element. ........................................................ 405
7.20 Coordinate Systems ...................................................................................... 410
7.21 Quadrilateral Element: (a) Global CS, (b) Iso-P Mapping in Natural CS .... 412
7.22 IsoP Mapping of a Rectangular Element. ..................................................... 415
7.23 Conical Hollow Structure as Typical Axisymmetric Problem...................... 423
7.24 Stresses for an axisymmetric problem.......................................................... 424
7.25 Axisymmetric Elements................................................................................ 425
7.26 Problems Set 7 .............................................................................................. 433
8.1 A 3D Structure and Loading......................................................................... 436
8.2 A Tetrahedral Element. ................................................................................. 436
8.3 Tetrahedral Element for Volume Coordinates .............................................. 437
8.4 Tetrahedral Element...................................................................................... 440
8.5 Nodal Forces and Reactions for the Tetrahedral Element. ........................... 446
8.6 Hexahedral/Brick Element............................................................................ 450
8.7 Hexahedral Element...................................................................................... 453
8.8 Problems Set 8 .............................................................................................. 470

@seismicisolation
@seismicisolation
Tables
1.1 Structural Classification.................................................................................... 6
1.2 Common Operators in Scilab/Octave ............................................................. 23
2.1 Virtual Work Principle .................................................................................... 41
2.2 Virtual Work Parameters for the Plane Frame ................................................ 50
2.3 Virtual Work Parameters for the Grid Structure ............................................. 55
2.4 Member Forces Due to Unit Displacements................................................... 65
2.5 Fixed-End-Actions Plus Actions Due to Nodal Displacements ..................... 70
3.1 Action Transformation Matrix for the 6 Bars Truss ....................................... 91
3.2 Fixed-End-Actions on the Beam .................................................................... 97
3.3 Action Transformation Matrix for the Beam.................................................. 98
3.4 Unassembled Structure Flexibility Matrix for the Plane Frame ................... 106
3.5 Action Transformation Matrix for the Plane Frame ..................................... 107
3.6 Fixed-End-Actions on the Members of the Grid Structure .......................... 114
3.7 Action Transformation Matrix for the Grid Structure .................................. 116
3.8 Action Transformation (BMS ) Matrix for the Space Frame Structure .......... 127
3.9 Displacement Transformation Matrix for the 6 Bars Truss .......................... 146
3.10 Displacement Transformation Matrix for the Beam..................................... 155
3.11 Displacement Transformation Matrix for the Plane Frame .......................... 164
3.12 Fixed-End-Actions on the Members of the Grid Structure .......................... 170
3.13 Unassembled Stiffness Matrix of the Three-Members Grid......................... 172
3.14 Displacement Transformation Matrix for the Grid Structure ....................... 173
3.15 Compatibility Matrix for the Space Frame Structure ................................... 185
4.1 Total Fixed-End-Actions on the Beam ......................................................... 223
4.2 Global DOFs of the Truss, Connectivity Matrix .......................................... 233
4.3 Total Fixed-End-Actions on the Plane Frame............................................... 245
4.4 Final Member-End-Actions ......................................................................... 247
4.5 Fixed-End-Actions on the Members of the Grid Structure .......................... 254
4.6 Final Member-End-Actions ......................................................................... 256
4.7 Global DOFs of the Truss, Connectivity Matrix .......................................... 260
4.8 Global DOFs of the Space Frame, Connectivity Matrix .............................. 270
4.9 Transformation Angles (in Degrees) of the Space Frame ............................ 271
5.1 Global DOFs of the Frame, Connectivity Matrix ......................................... 285
6.1 Approximating π from Inscribed Regular Polygons .................................... 321
7.1 Nodal Stresses of the Two-LSTs Plate ......................................................... 399
7.2 Gauss Quadrature Nodes and Weights.......................................................... 420
7.3 Numerical Integration Using Gauss Quadrature in 1D................................. 421
7.4 Numerical Integration Using Gauss Quadrature in 2D................................. 423

@seismicisolation
@seismicisolation xxi
@seismicisolation
@seismicisolation
Section I

MATRIX STRUCTURAL ANALYSIS

@seismicisolation
@seismicisolation
@seismicisolation
@seismicisolation
1 Introduction
At the end of this chapter, the reader will be able to:

• Classify structures based on the number of unknown actions and displace-


ments
• Differentiate between classical and matrix methods of structural analysis
and describe the main difference between the flexibility and stiffness meth-
ods
• Define and compute the flexibility and stiffness coefficients
• Determine the flexibility and stiffness matrices of members and simple
structures
• Use the Scilab or Octave software environments for matrix computations

1.1 STRUCTURAL CLASSIFICATION


The determination of reaction forces, member forces and the accompanying struc-
tural deformations are studied under structural analysis. It is performed on all engi-
neering structures usually during the inception and design stages of the structure’s
life. Matrix structural analysis (MSA) is concerned with the analysis of prismatic
structures – those that are made of long members with uniform and relatively small
cross-sectional dimensions and interconnected to each other at joints (nodes).
Prismatic structures are further classified based on how external action/loads are
carried by the members internally. Accordingly, there are the following classes of
prismatic structures.

1.1.1 PLANE TRUSS


All members and the corresponding loading of a plane truss lie in the same plane, see
Figure 1.1(a). A truss element carries only an axial force, since the joints are assumed
to be friction less. The joints of a plane truss structure have two possible independent
displacement components within the plane of the truss (translations along the global
x and y directions).

1.1.2 BEAM
Both shear force and bending moment are assumed to exist in each element of a
beam. Figure 1.1(b) shows a beam and the internal forces of a beam element. The
joints of a beam have two possible displacement components – transverse displace-
ment, which is translation normal to the beam axis and rotation about the normal to
the plane of the beam.

DOI:10.1201/9781003329350-2@seismicisolation
@seismicisolation 3
4 Matrix Structural Analysis and the Finite Element Methods

FIGURE 1.1 Classification of Prismatic Structures: (a) Plane Truss, (b) Beam,
(c) Plane Frame, (d) Grid Structure, (e) Space Truss and (f) Space Frame.

@seismicisolation
@seismicisolation
Introduction 5

1.1.3 PLANE FRAME


A plane frame is a structure made up of members rigidly connected at the joints.
Internally, the members are assumed to be subjected to axial force shear force and
bending moment. All members and the corresponding loading of a plane frame lie
in the same plane; see Figure 1.1(c). The joints of a plane frame have three possible
displacement components (translation along the global x, translation along the global
y and rotation about the normal to the plane of the frame).

1.1.4 GRID
Like a plane frame structure, a grid is also a structure made up of members rigidly
connected at the joints. All members of a grid structure lie in the same plane, however
it is subjected to transverse loading that causes the grid to experience an out-of-
plane bending. Internally, the members are assumed to be subjected to a shear force,
a torsion and a bending moment, as shown in Figure 1.1(d). The joints of a grid
structure have three possible displacement components (translation along the global
z (normal to the plane of the grid), rotation about x and y axes where x–y is the plane
of the grid).

1.1.5 SPACE TRUSS


Like in a plane truss, elements of a space truss are connected at frictionless joints and
the members carry only axial forces. The elements and loading of a space truss are
oriented freely in three dimensions, as shown in Figure 1.1(e). The joints of a space
truss structure have three possible displacement components (translations along the
three global coordinates).

1.1.6 SPACE FRAME


The most complex type of prismatic structure is the space frame. A space frame el-
ement is supposed to carry all six types of actions, namely an axial force, two shear
forces, a torsional moment and two bending moments; see Figure 1.1(f). The ele-
ments and loading of a space frame are oriented freely in three dimensions, as shown
in Figure 1.1(f). The joints of a space frame structure have six possible displacement
components (translations along and rotations about the three global coordinates).

1.2 STATIC/KINEMATIC INDETERMINACY


Structures can be classified into different categories based on the number of reac-
tion and member forces or displacement components that occur in a structure for
structural analysis purposes. The well-known static and kinematic classifications are
based on counting the number of reactions and free joint displacement in the struc-
ture. In MSA, it is important to adopt a classification that ranges from completely
restrained to unrestrained, as depicted in Table 1.1.

@seismicisolation
@seismicisolation
6 Matrix Structural Analysis and the Finite Element Methods

TABLE 1.1
Structural Classification
MSA Static Kinematic Reactions/Displacements
Completely Indeterminate Determinate All joints are completely restrained,
restrained no nodal movements are allowed.
Over- Indeterminate Indeterminate More than sufficient displacement
restrained components are restrained, some
nodal movements are allowed.
Sufficiently Determinate Indeterminate Minimum number of reaction
restrained forces are provided to maintain
structural stability and equilibrium.
Under- Unstable Unstable Not enough reactions are provided,
restrained structure becomes unstable.
Unrestrained Unstable Unstable All joints are completely free, struc-
ture is unstable.

Definition 1.1 (Static Indeterminacy) The static indeterminacy of a structure is the


number of unknown force components (actions) that exceed the number of available
equilibrium equations, also known as the degree of static indeterminacy.
A structure that is not completely restrained will have some free (unrestrained)
joint displacements. These unknown displacement components of a structure are re-
ferred as the degrees of freedom.
Definition 1.2 (Kinematic Indeterminacy) The kinematic indeterminacy of a struc-
ture is the number of unknown displacement components of a given structure, also
known as a degree of freedom.
The static indeterminacy of a sufficiently restrained structure is equals zero; like-
wise, the kinematic indeterminacy of a completely restrained structure is also zero.

Example 1.1 Determine the static and kinematic indeterminacies of each of the
structures shown in Figure 1.1.

SOLUTION
The truss in (a):
The number of members, m = 11
The number of external (support) reaction forces, r = 5
The number of joints, j = 6

Static classification
The total available joint equilibrium equations is 2 × j = 12, to be compared with
the total unknown actions, which is m + r = 16. Since the unknown forces are more
that the available equilibrium equations by 16 − 12 = 4, the plane truss is statically
indeterminate to the 4th degree.

@seismicisolation
@seismicisolation
Introduction 7

Kinematic classification
Unless restrained, every joint of a plane truss has two degrees of freedom (i.e., a
joint can move both in the X- and Y-axis). Total possible DOFs of the plane truss are
2 × j = 12, of which five are restrained (at the roller and two pin supports). Hence,
the given plane truss is kinematically indeterminate to the 12 − 5 = 7th degree.

The beam in (b):


The number of members, m = 2
The number of external (support) reaction forces, r = 4
The number of joints, j = 3

Static classification
The total available joint equilibrium equations (i.e., ∑ Fx = 0, ∑ Fy = 0, ∑ M = 0)
equals 3 × j = 9; to be compared with the total unknown actions (a beam member
can carry axial, shear and moment), which equals 3 ×m + r = 10. Since the unknown
forces are more that the available equilibrium equations by 10 − 9 = 1, the beam is
statically indeterminate to the 1st degree.

Kinematic classification
Assuming the axial movements are ignored, joints in a beam structure have two de-
grees of freedom (i.e., transverse displacement and rotation). Total possible DOFs of
the beam are 2 × j = 6; of which three are restrained (at the two rollers and the pin
supports). Hence, the given beam is kinematically indeterminate to the 6 − 3 = 3rd
degree.
Note: If axial displacement has to be considered, the kinematic indeterminacy be-
comes 3 + 2 = 5th degree, i.e., adding the two horizontal movements of the roller
supports.

The plane frame in (c):


The number of members, m = 10
The number of external (support) reaction forces, r = 9
The number of joints, j = 9

Static classification
The total available joint equilibrium equations (∑ Fx = 0, ∑ Fy = 0, ∑ M = 0) equals
3 × 9 = 27; to be compared with the total unknown actions (a plane frame member
can carry an axial-force, a shear-force and a bending moment), which equals 3×m+
r = 39. Since the unknown forces are more that the available equilibrium equations
by 39 − 27 = 12, the plane frame is statically indeterminate to the 12th degree.

Kinematic classification
The joints in a plane frame structure have three degrees of freedom (i.e., two linear
displacement in the X- and Y-direction and rotation). Total possible DOFs of the
plane frame are 3 × j = 27; of which nine are restrained (at the fixed supports).
Hence, the given plane frame is kinematically indeterminate to the 27 − 9 = 18th
degree. @seismicisolation
@seismicisolation
8 Matrix Structural Analysis and the Finite Element Methods

The grid structure in (d):


The number of members, m = 12
The number of joints, j = 9
The number of support reaction forces, r = 6 (the six vertical reactions at the pins);
or r = 18, three reactions at each pin support as a space frame structure.

Static classification
The total available joint equilibrium equations (sum of forces about Z = 0 and sum
of moments about both X- and Y-axis = 0) equals 3 × 9 = 27, to be compared with the
total unknown actions (a grid member can carry three forces: shear forces, a torque
and a bending moments), which equals 3 × m + r = 36 + 6 = 42. Since the unknown
forces are more that the available equilibrium equations by 42 − 27 = 15; hence, the
grid is statically indeterminate to the 15th degree.
Alternatively, the static classification of a grid structure can also be performed
similar to a space frame. The total available joint equilibrium equations (three
forces- and three moments-equilibrium about X-, Y- and Z-axis, respectively) equals
6 × 9 = 54, to be compared with the total unknown actions (a grid member can carry
six forces: three forces and three moments), which equals 6 × m + r = 90. Since the
unknown forces are more that the available equilibrium equations by 90 − 54 = 36;
hence the grid is statically indeterminate to the 36th degree.

Kinematic classification
The joints in a grid structure have three degrees of freedom (neglecting the in-plane
displacement and the rotation about the normal to the plane of the grid). Total pos-
sible DOFs of the grid are 3 × j = 27; of which six are restrained (transverse dis-
placements at the pin supports). Hence, the given plane frame is kinematically inde-
terminate to the 27 − 6 = 21st degree.
If all possible displacements were to be considered, the kinematic indeterminacy
becomes 6 × j − 6 × 3 = 54 − 18 = 36th degree.

The space truss in (e):


The number of members, m = 16
The number of joints, j = 9
The number of support reaction forces, r = 12, three reactions at each pin support.

Static classification
The total available joint equilibrium equations equals 3 × j = 27, to be compared
with the total unknown actions (a grid member can carry six forces: three forces and
three moments), which equals m+r = 28. Since the unknown forces are more that the
available equilibrium equations by 28 − 27 = 1; hence, the space truss is statically
indeterminate to the 1st degree.

Kinematic classification
The joints in a space truss structure have three degrees of freedom. Total possible
DOFs of the space truss are 3 × j = 27; of which twelve are restrained (at the pin
@seismicisolation
@seismicisolation
Introduction 9

supports). Hence, the given plane frame is kinematically indeterminate to the 27 −


12 = 15th degree.
The space frame in (f):
The number of members, m = 16
The number of joints, j = 12
The number of support reaction forces, r = 24, three reactions at each pin support.

Static classification
The total available joint equilibrium equations (three forces- and three moments-
equilibrium about X-, Y- and Z-axis, respectively) equals 6 × j = 72, to be compared
with the total unknown actions (a grid member can carry six forces: three forces and
three moments), which equals 6 × m + r = 120. Since the unknown forces are more
that the available equilibrium equations by 120 − 72 = 48; hence, the space frame
is statically indeterminate to the 48th degree.

Kinematic classification
The joints in a grid structure have six degrees of freedom. Total possible DOFs of the
space frame are 6 × j = 72; of which 24 are restrained (all six displacements at the
fixed supports). Hence, the given space frame is kinematically indeterminate to the
74 − 24 = 50th degree.

Practically unstable structures are unusable, whereas completely restrained cases


are commonly not encountered. If the structure to be analyzed is statically determi-
nate, the reaction forces can be computed by using equilibrium equations alone. In
the analysis of indeterminate structures, both the classical and the matrix methods
employ the three principles of structural analysis listed below.
• Equilibrium: the structure and any part thereof shall be in equilibrium,
• Compatibility: the displacements are continuous and they are the same for
all members connected at a joint,
• Stress–strain relationship: the material behavior relates the actions to
the corresponding displacements in a structure. A linear-elastic analysis
(straight-line relationship between stress and strain) is assumed throughout
this book.

The classical methods of structural analysis, also known in a nutshell as a theory


of structures employ explicit techniques to analyze a given structure. The consistent-
deformation, the conjugate beam, the slope deflection, the cross method of moment-
distribution, and Kani’s methods are some of the methods that are considered clas-
sical methods. These topics are usually covered in undergraduate structural analysis
courses, providing techniques each of which is applicable respectively to a group of
structures possessing a specified set of properties and characteristics. A number of
these methods are iterative approximations of the exact solution. Some of the tech-
niques treated in the classical methods are essential in establishing the flexibility and
stiffness characteristics of structures for the matrix methods.
The topics from fundamental structural analysis that are recommended for revi-
@seismicisolation
@seismicisolation
sion are static and kinematic classification, analysis of determinate structures, slope-
10 Matrix Structural Analysis and the Finite Element Methods

deflection equation, and the virtual work method using additional readings from rel-
evant sources such as [27, 28, 47, 49, 51].

1.3 MATRIX STRUCTURAL ANALYSIS


In matrix methods for structural analysis, MSA, in short, characteristics of members
as well as those of the whole structure are described in matrix form, while the un-
known member forces, support reactions and nodal displacements can be obtained
using prescribed matrix operations [5, 35, 40]. Based on the primary type of un-
known considered in a given structural analysis problem, matrix methods can further
be classified into the flexibility and stiffness methods. In the flexibility method, the
primary unknowns are the redundant actions on the structure, while in the stiffness
method, the unknown nodal displacements of a structure are taken as the primary
unknowns.

1.3.1 THE FLEXIBILITY COEFFICIENT


In the flexibility method, the DOFs (degrees of freedom) are considered to be those
displacement components aligned1 with the redundant actions that need to been
removed to render the structure statically determinate. The number of DOFs in this
method usually corresponds to the static indeterminacy of the structure. In Figure 1.2,
the vertical reaction force RB can be considered as the primary unknown; see Fig-
ure 1.2(b). Removing RB results in a cantilever beam, which is statically determinate;
hence, the DOF in this case would be the vertical displacement of the cantilever beam
at B. In this book, upward displacements and counterclockwise rotations in beams
are conventionally assumed to be the positive displacement directions.

Definition 1.3 (Flexibility Coefficient) The flexibility coefficient fi j is defined as


the displacement (linear or rotational) along the DOF i, that is, caused by a unit
action (force or moment) applied along DOF j.
Flexibility coefficients, of statically determinate structures, can be computed us-
ing basic relationships studied under theory of structures. Specifically, one has to
apply a unit action along the jth DOF and compute the corresponding displacement
along the ith DOF, which would then be the flexibility coefficient fi j . In Figure 1.3(a),
the given beam is indeterminate to the third degree. The vertical reactions at B and
C as well as the moment reaction at D are considered as the primary unknowns; the
corresponding DOFs are the vertical displacement at B and C as well as the rotation
at D, identified as 1, 2 and 3, respectively, as shown in Figure 1.3(b). In Figure 1.3(c),
(d) and (e), unit actions have been applied along the three DOFs, respectively, and
the flexibility coefficients along each of the three DOFs were determined.
The flexibility coefficients of the beam in Figure 1.3 – nine coefficients altogether
– are computed as displacements at the three DOFs, due to unit actions at those
DOFs. Out of these coefficients, f11 , f22 and f33 are said to be aligned since the unit
load and the displacement sought are along the same DOF.
1 Action and displacement are said to be aligned if they are at the same point and in the same direction.

@seismicisolation
@seismicisolation
Introduction 11

FIGURE 1.2 Primary Unknowns in the Flexibility and the Stiffness Methods:
(a) The given structure, (b) The vertical reaction force at B is taken as the pri-
mary unknown in the flexibility method and (c) The rotation of the beam at B is the
primary unknown in the stiffness method.

FIGURE 1.3 Flexibility Coefficients: (a) The given structure, (b) The three DOFs
considered, (c) Unit action along DOF-1, (d) Unit action along DOF-2 and (e) Unit
action along DOF-3. @seismicisolation
@seismicisolation
12 Matrix Structural Analysis and the Finite Element Methods

1.3.2 THE STIFFNESS COEFFICIENTS


In the stiffness method, the DOFs are the actual unknown displacement components
of the given structure, also referred to as the kinematic indeterminacy of the structure.
In Figure 1.2, the rotation at B is the unknown displacement, which is considered to
be the DOF of the given propped cantilever beam.
The three-span beam in Figure 1.4 has three unknown rotations at 1, 2 and 3, as
indicated in Figure 1.4(a). Unit rotations are applied along each of the three DOFs,
one at a time, as shown in Figure 1.4(b)–(d), respectively. The corresponding stiff-
ness coefficients were then determined along those three DOFs using equilibrium
requirements.
The stiffness coefficients of the beam in Figure 1.3 – totally nine coefficients –
can be computed as the actions needed at the three DOFs, in order to cause a unit
displacement at one of the DOFs, keeping all other DOFs restrained. s11 , s22 and s33
are said to be aligned since the unit displacement and the action sought are along the
same DOF.

Definition 1.4 (Stiffness Coefficient) The stiffness coefficient si j is defined as the


action (force or moment) that has to be applied along DOF i to cause a unit dis-
placement (linear or rotational, respectively) along DOF j, while keeping all other
displacements of the structure to zero.
For a given completely restrained (kinematically determinate) structure, the stiff-
ness coefficients of the structure corresponding to any specific DOF, can be computed

FIGURE 1.4 The Stiffness Coefficients


@seismicisolation
@seismicisolation
Introduction 13

using basic action-displacement relationships. This is performed by exerting a unit


displacement along the jth DOF and computing, from equilibrium, the necessary
actions along the ith DOF, to obtain the stiffness coefficient si j .

1.3.3 FLEXIBILITY AND STIFFNESS MATRICES


If a structure has n redundant actions to be removed to make it sufficiently restrained,
an n × n matrix of flexibility coefficients, known as flexibility matrix, could be estab-
lished as depicted in Equation (1.1). This matrix is an important characteristic of
the given structure that would be used in the flexibility method of MSA. Likewise,
for a structure that has n unknown displacement components, an n by n matrix of
stiffness coefficients, known as stiffness matrix, could be established, as shown in
Equation (1.1).
Some common characteristics of flexibility and stiffness matrices of a linear elas-
tic structure are as follows:
• For the same structure and a common set of DOFs, flexibility is the inverse
of stiffness and vice versa; F = S−1 and S = F −1
• For linear elastic structures the flexibility matrix is symmetric fi j = f ji ac-
cording to Maxwell’s reciprocal theorem [21, 31, 47]
• For linear elastic structures the stiffness matrix is also symmetric si j = s ji
because of the minimum-potential-energy principle [3, 20, 48]
• Values on the main diagonal of the flexibility as well as the stiffness ma-
trix should always be greater than 0, they can’t be 0 or negative (positive-
definite)
   
f11 f12 f13 s11 s12 s13
F =  f21 f22 f23  S = s21 s22 s23  (1.1)
f31 f32 f33 s31 s32 s33
Example 1.2 Determine the 3 × 3 flexibility matrix of the continuous beam in Fig-
ure 1.3(b) if each of the three spans are of 1.5 length units and they have a constant
EI.

SOLUTION
Using the various displacement computation methods, one can determine the dis-
placements due to unit loads. The deflection formulae provided in Appendix could
alternatively be used to determine the various deflections. In this example, the vir-
tual work method is used to compute the flexibility coefficients, as follows.
Z
mi m j dx
fi j =
L EI

where: fi j = flexibility coefficient (i − j); displacement along i caused by a


unit action along j
mi = bending moment due to unit action along i
m j = bending moment due to unit action along j
@seismicisolation
@seismicisolation
14 Matrix Structural Analysis and the Finite Element Methods

The bending moment equations due to the various unit actions are provided in
the following equation.

Span m1 (P1 = 1) m2 (P2 = 1) m3 (M = 1)

0 ≤ x ≤ 1.5 −2x/3 −x/3 x/4.5


1.5 ≤ x ≤ 3 x/3 − 1.5 −x/3 x/4.5
3 ≤ x ≤ 4.5 x/3 − 1.5 2x/3 − 3 x/4.5

The flexibility coefficients f11 and f23 ( f32 ) are computed as follows.

Z
m1 · m1 dx
f11 =
L EI
Z 1.5
(−2x/3)2 dx Z 3 (x/3 − 1.5)2 dx Z 4.5 (x/3 − 1.5)2 dx
= + +
0 EI 1.5 EI 3 EI
81
=
4EI

m2 · m3 dx
Z
f23 = f32 =
L EI
Z 1.5
(−x/3) ∗ (x/4.5)dx Z 3 (−x/3) ∗ (x/4.5)dx
= +
0 EI 1.5 EI
Z 4.5
(2x/3 − 3) ∗ (x/4.5)dx
+
3 EI
27
=−
4EI
And the complete 3 × 3 flexibility matrix of the given beam is as follows.

   
f11 f12 f13 324 243 −108
1 
f f22 f23  =  243 324 −108
  
F =
 21  16EI  
f31 f32 f33 −108 −108 72

Example 1.3 Determine the 3 × 3 stiffness matrix of the continuous beam in Fig-
ure 1.4(a) if each of the three spans are of 1.5 length units and they have a constant
EI.

SOLUTION
To cause only a unit rotation at one end of a fixed beam with span L and constant EI,
bending moments of ( 4EI 2EI
L ) and ( L ) are required at its near and far ends, respec-

@seismicisolation
@seismicisolation
Introduction 15

tively (see Fixed-End Actions in Appendix).

Accordingly, the stiffness coefficients S21 (S12 ) and s22 are computed by setting
θ2 = 1 as follows.

2EI 4EI
S21 = S12 = =
1.5 3
4EI 4EI 16EI
S22 = + =
1.5 1.5 3
Thus the complete 3 × 3 stiffness matrix of the given beam is shown below.

   
s11 s12 s13 8 4 0
 EI 
s s22 s23  = 4 16 4
 
S=
 21  3 
s31 s32 s33 0 4 8

1.4 SCILAB SOFTWARE ENVIRONMENT


Scilab is a free software for scientific computation and visualization. It provides a
command-line interface for user communication and contains a programming envi-
ronment and a set of tools that will expand its functionality. It can be downloaded
from the Scilab website; furthermore, an installation guide and getting-started tuto-
rials are available there. One can also refer to related online tutorials like the one
provided on the Scilab website at [11] and books such as [4, 18, 34].
Figure 1.5 shows the Scilab software environment. Menu bars and tool bars are
provided at the top, while the command window (Console) is docked to the left
and the SciNotes window (the code editor of Scilab) to the right. By default, Scilab
provides other windows like the file browser and variables browser windows, which
are not shown in Figure 1.5. For efficient use of the screen and the frequently used
parts for working with the contents of this book are the Console and the SciNotes.
Furthermore, the onscreen help window can be opened using the Help menu (?) on
the menu bar, which contains documentation of all the details about Scilab.
As a brief introduction, it is recommended to execute2 at the Scilab command
prompt for each of the statements provided in Listing 1.1. In the listing, there are
simple mathematical expressions, including a few built-in constants and functions,
followed by definitions of vectors and matrices, as well as how to perform different
mathematical operations on them. Note that any text on a line after // is a comment
and is ignored in Scilab. Immediate explanations and hints regarding the statements
in Listing 1.1 are provided in the form of such comments.
2 Statement(s) (lines) can be copied from the listing and pasted on the command prompt; by hitting

enter, the statement(s) can be executed.

@seismicisolation
@seismicisolation
16 Matrix Structural Analysis and the Finite Element Methods

FIGURE 1.5 The Scilab Software Environment

// This is a comment; single-line comments begin with //


// First-time users are advised to go through
// the "Getting-started" tutorial on Scilab Homepage

clear // Clear user defined variables from Scilab


// Mathematical expressions and calculations
9-3/(1/3)+1
-0.5^2+3.5/9 // x^y equals x raised to y

// Scilab contains built-in functions and constants


sqrt(2)+cos(%pi/3)
exp(-0.5^2) // e raised to -(0.5 squared)
// sqrt, cos, exp are built-in functions;
// %pi, %e are built-in constants

// Defining and using variables


n = 4, price = 30.65; c = "Total price = "

// Calculations using variables


d = n*price;

// Manipulating strings and displaying results


disp(c + string(d))

// COMPUTATION WITH VECTORS and MATRICES

@seismicisolation
@seismicisolation
Introduction 17

// Vectors and Matrices are to be


// enclosed in square brackets []
A = [1 2 3]
B = [4,3,2] // row vectors
// Space or comma separates each element in a row
C = [0.5; 1; 1.5] // use (;) for a new row
C1 = [0.5
1
1.5] // alternatively, new line used for new row

f = 2.05*A // multiply by a constant


S = A+B // addition, subtraction
dif = C-C1
At = A' // transpose a vector/matrix with (')
sc = A.*B // element wise product
s1 = sum(A) // add elements of a vector or matrix
s2 = A*B' // same as the dot product of vectors
rec = 1./B // element wise reciprocal

// Special vectors
a = [-1.5:4] // generates [-1.5,0.5,1.5,2.5,3.5];
// Column (":") is a range operator
// [x:y] = [x, x+1, ..., x+n]; where n = int(y - x)

b = [1:0.5:3.1] // results in [1,1.5,2,2.5,3]


// [x:r:y] = [x, x+r, x+2r ..., x+nr];
// where n = int((y-x)/r)

x = linspace(0,9,5) // results in [0, 2.25, 4.5, 6.75, 9]


// linspace(a,b,n) create an array of n
// equally spaced elements between a and b, inclusive

// MATRICES AND MATRIX OPERATIONS


A = [1 2 3 -5; 4,3,2 1; 0 -1 3, 2] // 3x4 matrix
// Sub-matrices can be created using range operator
s1 = A(1:2,2:3) // row 1 to 2; column 2 to 3 of A
s2 = A(1,:) // first row of A
s3 = A(:,3) // 3rd column of A
sz = size(A) // size of a matrix
D = diag(A) // the diag function in this case
// gives a column vector containg
// the main diagonals of A
// A*A would be illegal, unless A is square matrix
A(:,3) = [] // emptying (deleting) the 3rd column
// the size of matrix A is reduced

@seismicisolation
@seismicisolation
18 Matrix Structural Analysis and the Finite Element Methods

s2 = size(A) // gives 3x3

// Some matrix operations need compatible dimensions


e = A.*A // element-wise product of matrices;
S = A^2 // power of a matrix
d = det(A) // determinant of a matrix
Ainv = inv(A) // inverse of a matrix
A = [1 2 3 -5; 4,3,2 1; 0 -1 3, 2]
B = [-1 2.5 3; 1 1, 1]; // a 2x3 matrix
C = B*A; // matrix product
d = c - 2*B; // Error, c is not defined
// Scilab is case sensitive
// (c is not the same as C)

big1 = [A ; B] // Augmenting matrices into one


big2 = [A B']
// In big1 B is augmented column-wise to A, size = 5x3
// In big2 B' is augmented row-wise to A, size = 3x5

// Special matrices
cero = zeros(3,2) // a 3 by 2 matrix of all zeros
wan = ones(2,3) // a 2 by 3 matrix of all ones
ai = eye(4,3) // a 4 by 3 identity matrix;
// ai(i,i) = 1, else 0

S = [1 -.5; -.5 1] // s symmetric matrix


X = [1 -2 0.5 3 0; 2 -1 1 3 1] // arbitrary matrix
Symm = X'*S*X // gives a symmetric matrix!

v = [1 2 -1]
dia = diag(v) // a square diagonal matrix,
// the matrix dia has its diagonal elements = v, all others = 0
R = rand(3,3) // matrix of random elements in (0,1)
sym = R*inv(R) // Identity matrix expected
v = clean(sym) // discard very small values to zero
// Solution of simultaneous equations
b = [-1; 2.4; 3]
// To solve for A*x = b, use
sola = inv(A)*b // solution using the inverse function
solb = A \ b // or using \ (backslash) operator

Listing 1.1 Simple Computation in Scilab

@seismicisolation
@seismicisolation
Introduction 19

1.5 OCTAVE SOFTWARE ENVIRONMENT


Octave, also known as GNU Octave, is a high-level programming language primar-
ily intended for numerical computations. It is used for solving linear and nonlinear
equations, numerical linear algebra, statistical analysis and for performing other nu-
merical experiments [10]. It is open-source and available for any operating system.
It can be downloaded and installed from [46].
The Octave user interface is shown in Figure 1.6. Menu bars and tool bars are pro-
vided at the top, while the Console window is docked to the left and the Code Editor
window to the right. The onscreen help is also provided behind the command win-
dow. After installation, the default configuration of the Octave user interface looks
different, providing other windows like the file- and variable-browser windows. Most
of these components are closed in Figure 1.6 for efficient use of the screen. The
Console and the Code-editor are the most important windows for working with the
content of this book. Further readings are provided in these selected books [6, 33].
Listing 1.2 provides a brief introduction to the Octave software environment. It
is recommended that each statement provided in the listing be executed at the Octave
command prompt and the resulting output studied. It contains simple mathematical
expressions, including a few built-in constants and functions, followed by definitions
of vectors and matrices, as well as how to perform different mathematical operations
on them. Note that any text on a line after # or % is a comment and ignored in
Octave. Immediate explanations and hints regarding the statements in Listing 1.2 are
provided in the form of such comments.

% This is a comment; single-line comments begin with % or #

FIGURE 1.6 The Octave Software Environment

@seismicisolation
@seismicisolation
20 Matrix Structural Analysis and the Finite Element Methods

% First-time users are advised to go through


% the "Getting-started" tutorial on Octave Homepage

clear % Clear user defined variables from Octave


% Mathematical expressions and calculations
9-3/(1/3)+1
-0.5^2+3.5/8 % x^y equals x raised to y

% Octave contains built-in functions and constants


sqrt(2)+cos(pi/3)
exp(-0.5^2) % e raised to -(0.5 squared)
% pi, e are built-in constants
% sqrt, cos, exp are built-in functions;
% sin/cos/tan take angles in radian;
% sind, cosd are trig. functions taking angles in degree

% Defining and using variables


n = 4, price = 30.65; str = "Total price"

% Calculations using variables


d = n*price;

% Manipulating strings and displaying results


disp(strcat(str, " = ", num2str(d)))
% disp - to display; strcat - to concatenate;
% num2str - to convert number to string

% COMPUTATION WITH VECTORS and MATRICES


% Vectors and Matrices are to be
% enclosed in square brackets []
A = [1 2 3]
B = [4,3,2] % row vectors
% Space or comma separates each element in a row
C = [0.5; 1; 1.5] % use (;) for a new row
C1 = [0.5
1
1.5] % alternatively, new line used for new row

f = 2.05*A % multiply a matrix by a constant


S = A+B % matrix addition, subtraction
dif = C-C1
At = A' % transpose a vector/matrix with (')
sc = A.*B % element wise product
s1 = sum(A) % add elements of a vector or matrix
s2 = A*B' % same as the dot product of vectors

@seismicisolation
@seismicisolation
Introduction 21

rec = 1./B % element wise reciprocal

% Special vectors
a = [-1.5:4] % generates [-1.5,0.5,1.5,2.5,3.5];
% Column (":") is a range operator
% [x:y] = [x, x+1, ..., x+n]; where n = int(y - x)

b = [1:0.5:3.1] % results in [1,1.5,2,2.5,3]


% [x:r:y] = [x, x+r, x+2r ..., x+nr];
% where n = int((y-x)/r)

x = linspace(0,9,5) % results in [0, 2.25, 4.5, 6.75, 9]


% linspace(a,b,n) create an array of n
% equally spaced elements between a and b, inclusive

% MATRICES AND MATRIX OPERATIONS


A = [1 2 3 -5; 4,3,2 1; 0 -1 3, 2] % 3x4 matrix
% Sub-matrices can be created using range operator
s1 = A(1:2,2:3) % row 1 to 2; column 2 to 3 of A
s2 = A(1,:) % first row of A
s3 = A(:,3) % 3rd column of A
sz = size(A) % size of a matrix
D = diag(A) % the diag function in this case
% gives a column vector containg
% the main diagonals of A
% A*A would be illegal, unless A is square matrix
A(:,3) = [] % emptying (deleting) the 3rd column
% the size of matrix A is reduced
s2 = size(A) % gives 3x3

% Some matrix operations need compatible dimensions


e = A.*A % element-wise product of matrices;
S = A^2 % power of a matrix
d = det(A) % determinant of a matrix
Ainv = inv(A) % inverse of a matrix
A = [ 2 3 -5; 4,3,2 ; -1 3, 2]
B = [-1 2.5 3; 1 1, 1]; % a 2x3 matrix
C = B*A; % matrix product
d = c - 2*B; % Error, c is not defined
% Octave and Octave are case sensitive
% (c is not the same as C)

big1 = [A ; B] % Augmenting matrices into one


big2 = [A B']
% In big1 B is augmented column-wise to A, size = 5x3

@seismicisolation
@seismicisolation
22 Matrix Structural Analysis and the Finite Element Methods

% In big2 B' is augmented row-wise to A, size = 3x5

% Special matrices
cero = zeros(3,2) % a 3 by 2 matrix of all zeros
wan = ones(2,3) % a 2 by 3 matrix of all ones
ai = eye(4,3) % a 4 by 3 identity matrix;
% ai(i,i) = 1, else 0

S = [1 -.5; -.5 1] %% s symmetric matrix


X = [1 -2 0.5 3 0; 2 -1 1 3 1] %% arbitrary matrix
Symm = X'*S*X %% gives a symmetric matrix

v = [1 2 -1]
dia = diag(v) % a square diagonal matrix,
% the matrix dia has diagonal elements = v, all others = 0
R = rand(3,3) % matrix of random elements in (0,1)
id = R*inv(R) % Identity matrix expected
v = num2str (id, "%5.1f") % convert small values to zero

% Solution of simultaneous equations


b = [-1; 2.4; 3]
% To solve for A*x = b, use
sola = inv(A)*b % solution using the inverse function
solb = A \ b % or using \ (backslash) operator

Listing 1.2 Simple Computation in Octave

1.6 PROGRAMMING IN SCILAB AND OCTAVE


Programming is preparing a series of computer code (statements) to accomplish a
specific task. Both Scilab and Octave environments have many similar programming
features. The program code is written using the code editor and will be saved in a file.
Commonly, filenames with a file extension of .sci or .sce are associated with Scilab as
program files, while in Octave the file extension .m is used. After that the code in the
file is executed within the Scilab or Octave environment, respectively. Unlike some
other programming languages, no code compilation process is needed. If there’s any
syntax error (mistakes in the code), the program execution stops after displaying the
specific error message; otherwise, the program runs and finishes executing all the
statements sequentially.
The following set of programming elements and features apply to Scilab and
Octave; any discrepancy will be pointed out as it is encountered. Only a limited
number of features are discussed here that would be relevant to comfortably working
with the concepts in this book. The respective manuals and references can also be
used for additional information [4, 10, 17, 33, 34].

@seismicisolation
@seismicisolation
Introduction 23

TABLE 1.2
Common Operators in Scilab/Octave
Symbol Rank
Bracket () 1st
Transpose and exponent ' ∧ ** .∧ .** 2nd
Unary plus/minus, not + - ~ 3rd
Multiplication, division * / \ .* ./ 4th
Addition, subtract + - 5th
Relational < <= == >= > ~= 6th
Logical (and/or) || && 7th
Assignment = 8th

1.6.1 OPERATORS AND THEIR PRECEDENCE


A statement or a command is usually a line of computer code that can be executed
giving some output. Statements are constructed using variables and operators. Some
of the most common operators are shown in Table 1.2 according to their precedence
(rank). In any statement, brackets are to be handled first, while assignment comes
last. Those operators in the same rank will be executed left to right, so brackets
should be used to maintain the actual purpose of the statement.

1.6.2 VARIABLES
A variable is a character or set of characters (like A, var1, A_Somewhat_Very_Long_
Variable_Name, etc.) used as an identifier (name) intended to hold some value in
a given computational code. Variables can be assigned any type of value (numeri-
cal, string, boolean, array or matrix, etc.). In both Scilab and Octave environments,
a variable is assumed to be a matrix before it is assigned a specific value. In creating
variable names (variables), it is necessary to follow the rules listed below:

• Variables are case sensitive, A and a are different


• Must start with an alphabet A ... Z, a ... z, or underscore (_)
• Should contain only alphabets, numbers and underscore
• Avoid using reserved words or functions as variable name like or, sin, sqrt,
...
• Should not contain operators and special characters like :, $, ∧, *, &, ...
• The length is practically unlimited, but it is helpful to use shorter and mean-
ingful variable names

1.6.3 DATA TYPES


The basic built-in data types are numeric (integer and decimal numbers with single/-
double precision), character (string) and boolean (true or false). Variables need not
be declared to hold specific data types; they are dynamically switched to the type of

@seismicisolation
@seismicisolation
24 Matrix Structural Analysis and the Finite Element Methods

value they are assigned in a given program statement. When defining a vector/matrix,
all the individual elements need to be of or convertible to the same data type.
• A = [1 2.354 sqrt(3)] is acceptable
• B1 = [1 %T] in Scilab, B2 = [1 true] in Octave is acceptable
• C = ["Name:", "Habte"; "from:", 'AAiT'; 'year:', "2023"] is
acceptable; single or double quote is used for string constants
• D1 = ["T and", %F] (Scilab) and D2 = ["2^2= ", 2^2] do not
work
Note that the boolean constants are (%T / %F) in Scilab and (true / false)
in Octave. As it could be seen by executing the assignment statements B1 and B2
above, true is internally converted to a numerical value of 1; false to 0.

1.6.4 EXPRESSIONS AND STATEMENTS


Any combination of numbers, user-defined variables, operators, built-in constants/-
functions, etc., is defined as an expression. A program statement is written by putting
such expressions together to perform specific computer instructions. The most com-
mon statement is the assignment statement (=). In this case, the left-hand side of the
= sign should always be a variable, and whatever is the result of the expression on
the right-hand side is assigned to the variable on the left. Note that = has the lowest
rank in the operators list in Table 1.2. The code Listings 1.1 and 1.2 provided in the
earlier sections are full of assignment statements. In the following sections, some of
the essential flow control statements used to structure and organize a program are
explained.

1.6.5 If/Else STATEMENT


An if statement is conditional with the general form shown in the code below.
if EXPR1
STATEMENT(S)-1
elseif EXPR2
STATEMENT(S)-2
....
else
STATEMENT(S)-n
end
EXPR1, EXPR2, ... are conditional expressions like i < 5, A == b, ...
that evaluate to either true or false. Hence, if EXPR1 is true, then the program will ex-
ecute the corresponding statement or sets of statements (STATEMENT(S)-1) and then
go to the end expression to finish the if statement. Otherwise, successive elseif
expressions are tested and the program will execute the particular statement or sets
of statements (STATEMENT(S)-i) that correspond to the EXPRi, whichever evaluates
to true. However, if none of the EXPRi is true, the last statement (STATEMENT(S)-n)

@seismicisolation
@seismicisolation
Introduction 25

corresponding to else will be executed. It is not required to have an elseif or else


statement in an if statement; the following if statements are both acceptable.

a) if EXPR2
STATEMENT(S)-1
else
STATEMENT(S)-2
end

b) if EXPR STATEMENT(S) end

1.6.6 While STATEMENT


A while statement is a loop that executes the statement(s) in the body after testing the
given conditional expression. The code below shows the structure of a while state-
ment with a conditional expression EXPR. If the value of EXPR equals or evaluates to
true, then the program executes STATEMENT(S). This is performed repeatedly until
EXPR becomes false, at which time, the program goes to the end expression to finish
the while statement.

while EXPR
STATEMENT(S)
end

Here is a brief example that adds positive integers up to 10. The final result,
which is displayed as the output of the sum is 55.

sum2ten = 0; i = 0;
while i <= 10
sum2ten = sum2ten + i;
i = i + 1;
end
disp(sum2ten)

1.6.7 For STATEMENT


The for statement is another loop statement. Unlike the while statement, the state-
ment(s) inside a for loop will be executed a known number of times. The following
code shows the general structure of a for loop. EXPR is usually an array created us-
ing the colon operator (:), like 1:10, which means the ten integer values (1,2,3,...,10).
Every time the loop is executed, each value in the EXPR will be assigned to the var
variable, sequentially starting with the first. Then, the STATEMENT(S) block is ex-
ecuted for each case.

for var = EXPR


STATEMENT(S)
end

@seismicisolation
@seismicisolation
26 Matrix Structural Analysis and the Finite Element Methods

The code below shows the for loop in action to add the numbers up to 10, which
gives the same result as shown earlier in the case of the while statement.
sum2ten = 0;
for i = 1:10
sum2ten = sum2ten + i;
end
disp(sum2ten)

1.6.8 BRANCHING/CASE STATEMENTS


A branching statement is another code construct used to structure a program. It
is usually used instead of an if statement with several elseif parts. The codes
listing shown below provides the general structure of a branching statement in
both Scilab and Octave. With the exception of the keywords select/switch and
else/otherwise, they both are identical.
Scilab Octave
select EXPR switch EXPR
case ID -1 case ID -1
STATEMENT ( S ) -1 STATEMENT ( S ) -1
case ID -2 case ID -2
STATEMENT ( S ) -2 STATEMENT ( S ) -2
... ...
else otherwise
STATEMENT ( S ) - n STATEMENT ( S ) - n
end end
When running a branching statement, if the program finds an ID-i that equals
the given EXPR, the program executes the STATEMENT(S)-i under the particu-
lar ID-i case. Then, it goes to the end expression to finish the branching. Suppose
none of the ID-s match the expression (EXPR). In that case, the statement under the
else/otherwise case will be executed, if such a case exists (an else/otherwise
statement within a branching statement is optional). The following code gives an
example of the branching statement in action.

@seismicisolation
@seismicisolation
Introduction 27

Scilab Octave
AE = 1; L = 2; AE = 1; L = 2;
EI = 1; EI = 1;
elmt = 'BEAM'; elmt = 'TRUSS';
select elmt switch elmt
case 'TRUSS' case 'TRUSS'
f = L/AE; f = L/AE;
case 'BEAM' case 'BEAM'
f = [L^3/3 L^2/2 f = [L^3/3 L^2/2
L^2/2 L]/EI; L^2/2 L]/EI;
else otherwise
disp("Unknown type!") disp("Unknown type!")
end end

1.6.9 USER-DEFINED FUNCTIONS


Scilab and Octave have many predefined built-in functions like sin(), inv(), etc.
However, it is sometimes necessary to write one’s own functions that are used to
perform specific tasks. User-defined functions help to better organize a program,
increase re-usability and avoid code repetition. They are defined in a separate file or
together with other code. The general structure of a user-defined function is given in
the code shown below.

function[OUT1, OUT2, ...] = funcName(VAR1, VAR2, ...)


STATEMENT(S)
OUT1 = STATEMENT-1
OUT2 = STATEMENT-2
...
STATEMENT(S)
end

A user defined function contains the following parts:


• The keyword function
• Optional return value(s) OUT1, OUT2, ...
• Name of the function funcName that’ll later be used to call it in a program
• Optional input value(s) VAR1, VAR2, ...
• The closing key word end
Once a user function is defined, it can be called and used by its name (funcName),
just like other built-in functions. Here is an example of a user-defined function that
takes the (x,y) Cartesian coordinates of two points as input variables, then computes
and returns the length and the direction cosines of the line segment from point-1 to
point-2 as outputs.

1 function[L, c, s] = getLengthCS(p1, p2)


2 X = [p1(1) p2(1)]; Y = [p1(2) p2(2)];

@seismicisolation
@seismicisolation
28 Matrix Structural Analysis and the Finite Element Methods

3 L = sqrt((X(2)-X(1))^2 + (Y(2)-Y(1))^2);
4 c = (X(2)-X(1))/L;
5 s = (Y(2)-Y(1))/L;
6 end
7 -- a comment in Scilab
8 // Coordinates of the two points p1 and p2
9 -- a comment in Octave
10 %% Coordinates of the two points p1 and p2
11 point1 = [2,5]; point2 = [5,9];
12

13 [Length, Cos, Sin] = getLengthCS(point1, point2)


14

15 // Using the resulting output -- a comment in Scilab


16 %% Using the resulting output -- a comment in Octave
17 disp("The length from point-1 to point-2 is:"),
18 disp(Length)
19 disp("Cosine of the angle from X to line p1-p2 is:")
20 disp(Cos);
21 disp("Sine of the angle from X to line p1-p2 is:")
22 disp(Sin);

The function is defined in lines 1–6. Comments are provided in lines 7–10; use
the appropriate one for your platform. The two points are defined in line 11 and the
function is called with the two points as parameters in line 13. The three results are
saved in the vector of variables Length, Cos and Sin for further usage.

1.6.10 SIMPLE FILE INPUT/OUTPUT


Scilab and Octave have several built-in functions that can be used to read and write
files. In the codes below, the simplest functions are provided to store the contents of
a numeric matrix into an external file as well as to read the content of such a file.
Scilab Octave
write ( outfile , VAR ); dlmwrite ( outfile , VAR );
X = read ( infile ,r , c ); X = dlmread ( infile );
In Scilab, the read function requires the number of rows and columns of data
to be read from the file; if the size is unknown, use read(infile,-1) to read the
whole file. The outfile and infile are strings of the corresponding file names to write to
as well as to read from, respectively. These files must contain the full path unless the
files are placed in the same directory as the program using them. VAR is the variable
(matrix) whose content is to be written, while the contents of the infile are assigned
to the new variable X. Here is a simple file input/output example.

@seismicisolation
@seismicisolation
Introduction 29

Scilab Octave
ks = 20; ks = 20;
k = ks *[1 -1; -1 1]; k = ks *[1 -1; -1 1];
write ( ' k1 . txt ' ,k ); dlmwrite ( ' k1 . txt ' ,k );
k1 = read ( ' k1 . txt ' ,2 ,2); k1 = dlmread ( ' k1 . txt ' );

1.7 PROBLEMS
1.1 For the truss shown in Figure 1.1(a), determine the static and kinematic inde-
terminacy if (a) (any) three of the diagonal members are removed and (b) the pin
support on the right is removed.
1.2 For the beam shown in Figure 1.1(b), determine the static and kinematic indeter-
minacy if (a) a hinge is introduced just to the left of the middle support, (b) the roller
support on the right is changed to a fixed support and (c) there are two overhanging
segments on both sides.
1.3 For the plane frame shown in Figure 1.1(c), determine the static and kinematic
indeterminacy if (a) hinges are introduced at all the middle (1st level) joints, (b)
hinges are introduced at all the top level joints, (c) all the fixed supports are pin
supports.
1.4 For the grid structure shown in Figure 1.1(d), determine the static and kinematic
indeterminacy if (a) all the pin supports are fixed, (b) a hinge is introduced at the
central node o.

1.5 Define flexibility coefficient fi j . What is the flexibility matrix of a given structure
and what are its characteristics?
1.6 Define stiffness coefficient si j . What is the stiffness matrix of a given structure
and what are its characteristics?
1.7 If a plane truss has 7 nodes, 8 members as well as 5 (properly arranged) support
reactions, determine its static and kinematic indeterminacy.
1.8 If a beam has 7 nodes, 6 members, 5 support reactions and also two condition
equations, determine its static and kinematic indeterminacy.
1.9 If a plane frame has 7 nodes, 8 members as well as 9 (properly arranged) support
reactions, determine its static and kinematic indeterminacy.
1.10 For the frame in Problem 1.9, determine the static and kinematic indeterminacy
if there are 3 more condition equations.
1.11 If a grid structure has 5 nodes, 6 members, 7 (properly arranged) support re-
actions and 2 condition equations, determine its static and kinematic indeterminacy.

@seismicisolation
@seismicisolation
30 Matrix Structural Analysis and the Finite Element Methods

1.12 If a space truss has 10 nodes, 15 members as well as 10 (properly arranged)


support reactions, determine its static and kinematic indeterminacy.
1.13 If a space frame has 10 nodes, 15 members as well as 15 (properly arranged)
support reactions, determine its static and kinematic indeterminacy.
1.14 If an action A applied to a linear elastic structure along DOF-1 causes a dis-
placement of d along DOF-2, then an action B applied to the same structure along
DOF-2 would cause a displacement of along DOF-1.
1.15 If the response of an elastic structure to an arbitrary action A1 is y1, and its
response to a second independent action A2 is y2, then the response to the combined
action (c*A1 + d*A2) would be (c + d)*(y1 + y2) for any constant values c and d.
This statement is true / false, choose the correct one.

1.16 Given a linear elastic continuous beam, consider the two arbitrary points N
and M such that if a downward force of 10 F applied at N causes point M to displace
an amount of 0.02 D upwards (take F and D as units of measurement for force and
displacement, respectively):
• the flexibility coefficient of the beam fMN equals ,
• the flexibility coefficient of the beam fNM equals ,
• the stiffness coefficient of the beam sMN equals ,
• the flexibility coefficient of the beam fNN equals ,
• an upward force of 5 F applied at M would cause a displacement of
at N.

For Problems 1.17–1.30 assume, constant material and cross-sectional properties


(E, A, I, G, J) unless otherwise stated.
1.17 For the spring system shown in Figure 1.7(a), compute the 3×3 flexibility matrix
along the given DOFs. What is the corresponding stiffness matrix?
1.18 For the spring system shown in Figure 1.7(b), compute the 2×2 flexibility matrix
along the given DOFs. What is the corresponding stiffness matrix?
1.19 For the bar system shown in Figure 1.7(c), compute the 2 × 2 flexibility matrix
along the given DOFs. What is the corresponding stiffness matrix?
1.20 For the bar system shown in Figure 1.7(d), compute the 2 × 2 flexibility matrix
along the given DOFs. What is the corresponding stiffness matrix?
1.21 For the beam shown in Figure 1.7(e), compute the 2 × 2 flexibility matrix along
the given DOFs.
1.22 For the beam shown in Figure 1.7(f), compute the 2 × 2 flexibility matrix along
the given DOFs.

@seismicisolation
@seismicisolation
Introduction 31

FIGURE 1.7 Problems Set 1: (a, b) Spring Systems; (c, d) Bar Elements; (e) Can-
tilever Beam; (f) Cantilever Beam with Variable Moment of Inertia; (g) Fixed-
Continuous Beam; (h) Fixed Beam; (i) Two Bars Plane Truss; (j) Three Bars Plane
Truss; (k) Two Members Cantilever Plane Frame; (l) Two Members Fixed-Supported
Plane Frame; (m) Two Members Cantilever Grid Structure; (n) Two Members Fixed
Grid Structure.
@seismicisolation
@seismicisolation
32 Matrix Structural Analysis and the Finite Element Methods

1.23 For the beam shown in Figure 1.7(g), compute the 2 × 2 stiffness matrix along
the given DOFs.
1.24 For the beam shown in Figure 1.7(h), compute the 2 × 2 stiffness matrix along
the given DOFs.
1.25 For the beam shown in Figure 1.7(i), compute the 2 × 2 flexibility matrix along
the given DOFs. What is the corresponding stiffness matrix?

1.26 For the beam shown in Figure 1.7(j), compute the 2 × 2 stiffness matrix along
the given DOFs.
1.27 For the plane frame shown in Figure 1.7(k), compute the 3 × 3 flexibility matrix
along the given DOFs.

1.28 For the plane frame shown in Figure 1.7(l), compute the 3 × 3 stiffness matrix
along the given DOFs.
1.29 For the grid structure shown in Figure 1.7(m), compute the 3 × 3 flexibility
matrix along the given DOFs. Take Ix = Iy = I.

1.30 For the grid structure shown in Figure 1.7(n), compute the 3×3 stiffness matrix
along the given DOFs. Take Ix = Iy = I.
Answer the following problems only in reference to programming using Scil-
ab/Octave.
1.31 Which of the following are legal variable names?
m24 first&second last iJ 3D _XYZ sin Sin A_or_B A+B but

1.32 Given:
A = [1 0 2;2 1 -3]; B = [3 0 7;5 1 2]; C = [ 1 1 -1]; D = 1:4
Before running any of the given matrix operations, determine the size of the result
of the following code; if operation is not legal, say undefined.
A.*B; A*A’; B.*C; A+4; [A;B]; A+[C;C]; A*C’; C*B; D.∧2; B-C

1.33 Given the matrices A, B, C and D as above, evaluate E = [[A;B] D’].


What will be the size of the result of the following statements?
E(:,1:3); E([1,4],2:4); det(A); sqrt(B); inv([A C]);
det(B’*A); square([A;C]); inv(E)
1.34 The result of each of the following command line statements is (True/False),
choose one.
a) 5 > 4 > 1
b) result = -20; 0 <= result <= 10
1.35 The variable name used to store the result of the last command (expression) in
the console is, by default .

@seismicisolation
@seismicisolation
Introduction 33

1.36 The expression cos(90) is equal to 0. (True/False)

1.37 What are semicolons (;) used for in programming?


1.38 What is the output of the following program code?
for i = 5:15
disp(i)
if (i == 8)
break
end
end
1.39 What is the output of the following program code?

i = 10
while (i > 2)
disp(i)
if (i < 5)
break
end
i = i - 1
end
1.40 Write a program statement to compute each of the following: (a) cosine of 45
degrees, (b) natural logarithm of 12, (c) 5 raised to the power of square root of 3, (d)
inverse tangent (arc tan) of 0.8 and (e) the length of the line joining two points (x1,
y1, z1) and (x2, y2, z2) in space.
1.41 What is the output of each of the following statements executed sequentially?
a) 5D-2, b) 2e3, c) I = -1:3:10, d) A=2/3*9/2; B=A*A/A*A
e) C=sind(30)+1/2; D=1-C, f) E=A+B*C-D g) X = 1; atan(X)
h) r = linspace(2,6,9); [m,i] = max(r)

1.42 Scilab / Octave is an interpreted language, it is slow compared to compiled


programming languages. (True/False)
1.43 Write a series of expressions/statements to ask for the name of the user, accept
from the console a sting as Name and output the name preceded with Welcome; like
Welcome Habte.
1.44 key combination is used to stop (interrupt) the execution of a program
code or a command?
1.45 How is a cell array used to store material and cross-sectional properties of a
truss, beam, grid or space frame element? How are these values accessed? Write the
corresponding code block(s).

@seismicisolation
@seismicisolation
34 Matrix Structural Analysis and the Finite Element Methods

1.46 Assume three points P1 at (x1, y1, z1), P2 at (x2, y2, z2) and P3 at (x3,
y3, z3) are given in a global coordinate system X −Y − Z. Consider another (local)
−−→
coordinate system x̂ − ŷ − ẑ having the same origin but with x̂ directed along P1 P2
and point P3 is on the ŷ − ẑ plane. Write a Scilab/Octave program to compute and
print out all the direction cosines cos(θJi ) in which J is any one of the global axis (X,
Y or Z), i is the local axis (x̂, ŷ or ẑ) and θJi is the angle from the global axis J and to
the local axis i, as provided in the matrix below. Hint: Refer to vector algebra.
 
cos(θX x̂ ) cos(θY x̂ ) cos(θZ x̂ )
cos(θX ŷ ) cos(θY ŷ ) cos(θZ ŷ )
 

cos(θX ẑ ) cos(θY ẑ ) cos(θZ ẑ )

@seismicisolation
@seismicisolation
2 The Basic Methods
After studying the chapter, the reader will be able to:
• Identify the redundant actions and create a primary structure from a given
indeterminate structure
• Write the compatibility equations and use the basic flexibility method to
analyze different indeterminate structures
• Identify the nodal displacements and create a basic structure from a given
indeterminate structure
• Write the equilibrium equations and use the basic stiffness method to ana-
lyze different indeterminate structures
• Prepare the necessary Scilab or Octave software code to perform the calcu-
lations using the basic methods

2.1 THE BASIC FLEXIBILITY METHOD


The flexibility method aims to determine the redundant actions (either forces or mo-
ments) in a given statically indeterminate structure using compatibility and superpo-
sition behaviors of the structure. In this method, analysis is started by first converting
the given statically indeterminate structure into a statically determinate one called the
primary structure.

Definition 2.1 (Primary Structure) A primary structure is a stable and statically


determinate structure obtained from the given statically indeterminate structure by
removing an adequate number of appropriate action components (actions).
The action components may be redundant reaction forces or moments and/or re-
dundant internal (member) force components that have to be removed from the given
statically indeterminate structure to transform it into a determinate one; see the ex-
amples in Figure 2.1. For a primary structure to be achieved, the number of actions
that must be removed is always equal to the number of overall static indeterminacy
of the given structure. The propped cantilever beam in Figure 2.1(a) is statically in-
determinate to the second degree. Hence, as shown, two reaction forces (RB and RC )
have to be removed to make it a stable and statically determinate beam. The resulting
structure would be a simple cantilever beam, which is statically determinate.

DOI:10.1201/9781003329350-3@seismicisolation
@seismicisolation 35
36 Matrix Structural Analysis and the Finite Element Methods

FIGURE 2.1 (a) A Beam, (b) Its Primary Structure Removing Two Redundant Ac-
tions, (c) A Truss and (d) Its Primary Structure Removing One Internal Redundant
Action.

The truss in Figure 2.1(c) is statically indeterminate to the first degree. Notice
that the indeterminacy, in this case, is internal; i.e., there’s one more member than
the number of members, which would be required for the structure’s stability of the
truss. Cutting the top-chord member (T12 ), as shown in the figure, for example, would
render the truss stable and statically determinate.
Alternatively, Figure 2.2 shows some other possible forms of primary structures
for the structures shown in Figure 2.1. Accordingly, the choice of the redundant
action to be removed is usually immaterial. One can remove any of the redundant
actions as long as the resulting structure is stable and determinate. It is only a mat-
ter of preference as well as the ease with which analysis in the subsequent stages is
performed, such as in determining the specific flexibility coefficients. However, it is
very important to investigate the resulting structure for stability. For example, remov-
ing the horizontal reaction force at the fixed support together with any of the other
reaction forces in Figure 2.1(a) would be inappropriate. Similarly, removing one of
the horizontal reaction forces at the supports in Figure 2.1(c) leads to instability.

@seismicisolation
@seismicisolation
The Basic Methods 37

FIGURE 2.2 (a)–(c) Alternative Primary Structures for the Beam and (d)–(f) Alter-
native Primary Structures for the Truss in Figure 2.1.

2.1.1 SOLUTION STEPS


In the basic flexibility method of analyzing a given indeterminate structure, the es-
sential steps of the analysis are listed here followed by worked examples.
Step 1: Create a primary structure by removing an appropriate number of redun-
dant actions from the given structure. DOFs are chosen and redundant actions Aq
will now be identified.
Step 2: Compute the vector DLi – displacements corresponding to the DOFs on
the primary structures due to the applied actions; it will be a column vector [DL ].
Step 3: Compute all flexibility coefficients fi j , the displacements along each of
the DOFs corresponding to unit values of the redundant actions, applied on the pri-
mary structure one-at-a-time. This results in the flexibility matrix [F] of the structure.
These coefficients are determined using Definition 1.3 provided in Chapter 1, and
that’s the reason why this method is called the basic flexibility method. A different
and simpler method to determine the structure flexibility matrix will be discussed in
the next chapter.
Step 4: Write the displacement superposition equations. The total displacements
along each of the DOFs (Di ) that correspond to each redundant action equals the dis-
placement DLi plus the actual value of the unknown redundant actions Aq j multiplied
by the corresponding flexibility coefficients fi j .

@seismicisolation
@seismicisolation
38 Matrix Structural Analysis and the Finite Element Methods

Once the redundant actions are determined, the structure becomes determinate
and all other unknowns can be easily computed.

D1 = DL1 + f11 × Aq1 + f12 × Aq2 + f13 × Aq3 + · · · + f1n × Aqn


D2 = DL2 + f21 × Aq1 + f22 × Aq2 + f23 × Aq3 + · · · + f2n × Aqn
(2.1)
···
Dn = DLn + fn1 × Aq1 + fn2 × Aq2 + fn3 × Aq3 + · · · + fnn × Aqn

In matrix form, Equation (2.1) can also be written as follows.


       
D1 D L1 f11 f12 f13 ... f1n Aq1
D2  DL   f21 f22 f23 ... f2n  Aq 
 = 2  ×  2
 ...   ...  +  ... (2.2)
 
  ... 
Dn D Ln fn1 fn2 fn3 ... fnn Aqn

which can be written in compact form as follows:

[D] = [DL ] + [F][Aq ] (2.3)

Step 5: Write and solve the compatibility equation by equating the total displace-
ments to their actual value so that these become compatible with the given structure
(usually [D] = 0). It is now possible to solve for the unknown redundant actions
which are given by:

[Aq ] = −[F]−1 [DL ] (2.4)

2.1.2 EXAMPLES
Example 2.1 Analyze the propped cantilever beam shown in Figure 2.3(a) using
the basic flexibility method. Consider the vertical reaction at the roller support as
redundant.

SOLUTION
Step 1: The given structure is statically indeterminate to the first degree. Hence, a
primary structure is created by removing one reaction component (like the upward
vertical reaction RA , as shown in Figure 2.3(b)).
Step 2: The multiple integration, moment-area, conjugate beam or virtual work
methods (available in other basic structural analysis books like [27, 28, 47, 51]) can
be used to obtain the (upward) vertical displacement on the primary structure due to
the given uniformly distributed load w. This becomes:

w × L4
DL = −
8EI

Given in line #10 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
The Basic Methods 39

FIGURE 2.3 Propped Cantilever Beam: (a) the beam and loading and (b) the pri-
mary structure.

Step 3: Similarly, the (upward) vertical displacement on the primary structure


due to a unit value of the redundant action RA equals:

L3
fAA =
3EI

Given in line #13 of the Scilab/Octave code at the end.

Steps 4 and 5: The superposition and compatibility equations for the upward
(vertical) displacement of A on the structure are written and the redundant action,
RA , is solved as shown below. Note that the structure stiffness matrix is just a 1 × 1
matrix containing fAA . This is because the structure is statically indeterminate to the
first degree.
DA = DL + F × Aq

w × L3 L3
0=− + × RA
24EI 3EI
3w
RA = 8 ANS.

Given in line #16 of the Scilab/Octave code at the end.

Once the redundant action is found, the remaining reactions can be computed
using equilibrium equations. Displacement elsewhere can also be determined as a
determinate structure just found by superposing the displacement from the given
loading and the redundant action.

@seismicisolation
@seismicisolation
40 Matrix Structural Analysis and the Finite Element Methods

The corresponding Scilab code showing the complete solution steps is given in
the listing below. The specific values of w = 5.5 k/ft, L = 12ft and EI = 1 are used in
the computer code.

Scilab/Octave Code
// Example 2.1 - Propped cantilever beam
// Basic Flexibility Method
// Common units used for analysis: Force in kips, Length in ft
// Given parameters & constants:
w = 5.5; L = 12; EI = 1; // kips/ft; ft; kips-ft^2
// DL - displacement due to the given loading
DL = -w*L^4/(8*EI) // ft
// f - flexibility coefficient
f = L^3/(3*EI) // ft/kip
// Aq - the redundant action
Aq = -DL/f // kips
// END: ........... Example 2.1

Example 2.2 Analyze the truss shown in Figure 2.4 using the basic flexibility
method. The relative values of the cross-sectional area of each member is shown in
the figure, and it is assumed that the modulus of elasticity E is equal for all members.

FIGURE 2.4 (a) A Plane Truss with first Degree Statically Indeterminacy and (b)
Primary Structure of the Truss.

SOLUTION
Step 1: The truss is statically indeterminate to the first degree; its primary structure
can be created by cutting any one of the members, such as members 2–4, as shown
in Figure 2.4(a).

@seismicisolation
@seismicisolation
The Basic Methods 41

TABLE 2.1
Virtual Work Principle
Member AE L P q qPL/(AE) q2 L/(AE)
√ √ √ √
1–4 4AE/ 3 2L/ 3 P −1/ 3 −PL/(2 3AE) L/(6AE)
2–4 AE L 0 1 0 L/(AE)
√ √ √ √
3–4 2AE/ 3 2L/ 3 −P −1/ 3 PL/( 3AE) L/(3AE)


∑ PL/(2 3AE) 3L/(2AE)

Step 2: The virtual-work (unit-load) method (refer to [27, 28, 47, 51]) is used to
determine the relative displacement of the two cut ends. The computation of the gap
or overlap at the cut section due to the applied load P as well as the truss flexibility
are computed using Equations (2.5) and (2.6), respectively. Table 2.1 organizes the
various components in the work equations.

!
PL √
1 × DL = ∑ q = PL/( 3AE) (2.5)
AE

Given in line #11 of the Scilab/Octave code at the end.

Equation (2.5) sets the external work of the virtual load with the actual displace-
ment of the truss at the cut (redundant, 1 × DL ) to be equal to the sum of the internal
PL
work of the virtual member force (q) with the actual member deformation ( AE ).
Step 3: Similarly, the flexibility coefficient f , i.e., the relative displacement of the
cut ends due to a unit value of the redundant action itself is obtained using the virtual
work method as shown in Equation (2.6).
!
qL
1× f = ∑q = 3L/(2AE) (2.6)
AE

Given in line #14 of the Scilab/Octave code at the end.

Steps 4 and 5: The superposition and compatibility equation for the cut member
is written and solved to obtain the redundant member force T, which is given by
Equation (2.7).

D = DL + f × T
√ (2.7)
0 = PL/(2 3AE) + 3L/(2AE) × T

@seismicisolation
@seismicisolation
42 Matrix Structural Analysis and the Finite Element Methods

3P
⇒ T =− 9 ANS.

Given in line #17 of the Scilab/Octave code at the end.

Having determined the redundant member force in 2–4, the other member forces
can be easily computed using equilibrium equations.

The corresponding Octave code showing the complete solution steps is given in
the listing below. This code uses the following specific numerical values for the pa-
rameters: P = 100 kN, L = 4 m, E = 200 GPa, A = 200 mm2

Scilab/Octave Code
1 % Example 2.2 - Plane truss with three bars
2 % Basic Flexibility Method
3

4 % Common units used for analysis: Force in kN, Length in m


5

6 % Given parameters & constants:


7 P = 100; L = 4; E = 200; A = 2e-3;
8 % in kN, m, kN/m^2, m^2
9

10 % Displacement on primary structure due to loading


11 DL = P*L/(sqrt(3)*A*E) % m
12

13 % Flexibility coefficient
14 f = 3*L/(2*A*E) % m/kN
15

16 % Redundant Action
17 Aq = -DL/f % kN tension
18

19 % Member force 1-4


20 T1 = (200 - 2*Aq/sqrt(3))/2
21

22 % Member force 3-4


23 T3 = T1 + Aq*2/sqrt(3)
24 % END: ........... Example 2.2

Example 2.3 Analyze the two–span beam shown in Figure 2.5(a) using the basic
flexibility method. Assume the modulus of elasticity E and the moment of inertia I
are the same for both members.

@seismicisolation
@seismicisolation
The Basic Methods 43

FIGURE 2.5 (a) A Cantilever Beam Propped on Two Rollers and (b) Primary Struc-
ture of the Two-Span Beam.

As shown in Figure 2.2, there are different alternatives to create a primary struc-
ture for this beam (for an indeterminate structure in general). The following two
alternative primary structures will be used to solve this example.

SOLUTION 1
Step 1: The beam is statically indeterminate to the second degree; its primary struc-
ture can be created by removing any two of the reactions. The roller supports at nodes
2 and 3 are considered to create the primary structure, as shown in Figure 2.5(b).
Step 2: The vertical displacement on the primary structure due to the given uni-
formly distributed load w can be determined by double integration of the M/EI equa-
tion, as shown in Equation (2.8).

M = −2wL2 + 2wLx − 0.5wx2


!
Z Z
M
y = dx
EI (2.8)
− wL2 x2 wLx3 wx4
= + −
EI 3EI 24EI
Thus, the displacements DL1 and DL2 along the DOFs Aq1 and Aq2 due to the
given loading are obtained as given in Equation (2.9).

− 17wl 4 − 2wl 4
DL1 = and DL2 = (2.9)
24EI EI

Given in line #15–16 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
44 Matrix Structural Analysis and the Finite Element Methods

FIGURE 2.6 Displacements DL and Flexibility Coefficients.

Step 3: The flexibility coefficients along DOF-1 and DOF-2 on the primary struc-
ture due to unit values of Aq1 and Aq2 are provided in Equation (2.10).

l3 5l 3
f11 = , f12 =
3EI 6EI
(2.10)
5l 3 8l 3
f21 = , f22 =
6EI 3EI

Given in line #19–22 of the Scilab/Octave code at the end.

And the structure flexibility matrix of the beam becomes the 2×2 matrix given
below:
 3
5l 3

l
 3EI 6EI 
F =
 

 5l 3 8l 3 
6EI 3EI
Step 4: The superposition equations for the total displacements along DOF-1
and DOF-2 is thus given Equations (2.11).

! !
− 17wl 4 l3 5l 3
D1 = DL1 + f11 Aq1 + f12 Aq2 = + Aq1 + Aq2
24EI 3EI 6EI
! ! (2.11)
− 2wl 4 5l 3 8l 3
D2 = DL2 + f21 Aq1 + f22 Aq2 = + Aq1 + Aq2
EI 6EI 3EI

Step 5: Since the displacement at the roller supports must be zero, the compat-
ibility equation is obtained by setting both D1 and D2 in Step 3 above to zero. The

@seismicisolation
@seismicisolation
The Basic Methods 45

redundant actions Aq1 and Aq2 are then obtained by solving the resulting matrix
equation as follows:

D = DL + F × Aq

  3
− 17wl 4 5l 3
 
  l  
0  24EI   3EI Aq
6EI   1
⇒ = + ×
  
 − 2wl 4   5l 3 8l 3 
0 Aq2
EI 6EI 3EI
#−1
−17wl
" # " " # " #
Aq1 8 20 8wl/7
=− × = ANS.
Aq2 20 64 −48wl 11wl/28

Given in line #25 of the Scilab/Octave code at the end.

Having determined the redundant actions Aq1 and Aq2 , the other reaction com-
ponents can be easily computed using equilibrium equation.

If the value of w = 35 kN/m and L = 4 m, the corresponding reactions of the beam


are given in Figure 2.7.

The corresponding Scilab code showing the complete solution steps is given in
the listing below. The numerical values w = 35 kN/m, L = 4 m, E = 30 GPa, and I =
600 mm4 are used in this code.

Scilab/Octave Code
1 // Example 2.3-1 - Two-span beam (Solution 1)
2 // Basic Flexibility Method
3

4 // Common units used for analysis: Force in kN, Length in m


5

6 // Given parameters & constants:

FIGURE 2.7 Reactions of the Two-Span Beam for w = 35 kN/m.

@seismicisolation
@seismicisolation
46 Matrix Structural Analysis and the Finite Element Methods

7 w = 35; L = 4; E = 30; I = 600e6; // kN/m; m; GPa; mm^4


8

9 // Converting some parameters to compatible units


10 E = E*1e6 // kN/m^2
11 I = I*1e-12 // m^4
12 EI = E*I // kN-m^2
13

14 // DLs - displacements due to the given loading (STEP: 2)


15 DL(1) = -17*w*L^4/(24*EI) // m
16 DL(2) = -2*w*L^4/EI // m
17

18 // fij - flexibility coefficients (STEP: 3)


19 F(1,1) = L^3/(3*EI) // m/kN
20 F(1,2) = 5*L^3/(6*EI) // m/kN
21 F(2,1) = 5*L^3/(6*EI) // m/kN
22 F(2,2) = 8*L^3/(3*EI) // m/kN
23

24 // Aq - the redundant actions


25 Aq = -inv(F)*DL // kN
26

27 // Reactions @ the fixed-end are computed from equilibrium


28 V = w*2*L - sum(Aq) // Shear force
29 M = 2*w*L^2 - Aq(1)*L - Aq(2)*2*L // Moment
30 // END: ........... Example 2.3-1

SOLUTION 2
Step 1: The primary structure can alternatively be created by changing the fixed
support to a pin support and also introducing a hinge at the central roller support
(releasing the moments in both cases), as shown in Figure 2.8.
Step 2: The essential displacement components (rotations) needed for the basic
flexibility method are shown in Figure 2.9. Accordingly, the rotation (+ve if CCW)
along Aq1 and the angular change (opening) along Aq2 on the primary structure due
to the given uniformly distributed load w are computed as in Equation (2.12).

FIGURE 2.8 Alternative Primary Structure for the Two-Span Beam.

@seismicisolation
@seismicisolation
The Basic Methods 47

FIGURE 2.9 Displacements on Primary Structure DL and fi j .

− wl 3 wl 3
DL1 = and DL2 = (2.12)
24EI 12EI

Given in line #15–16 of the Scilab/Octave code at the end.

Step 3: The flexibility coefficients (rotations) along DOF-1 and DOF-2 on the
primary structure due to unit values of Aq1 and Aq2 are computed to be as provided
in Equation (2.13).

l −l
f11 = f12 =
3EI 6EI
(2.13)
−l 2l
f21 = f22 =
6EI 3EI

Given in line #18–21 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
48 Matrix Structural Analysis and the Finite Element Methods

Thus, the structure flexibility matrix is given by:


 
l −l
 3EI 6EI 
F =
 

 −l 2l 
6EI 3EI
Step 4: The superposition equations for the total displacements along DOF-1
and DOF-2 is thus given as shown in Equation (2.14).

! !
− wl 3 l −l
D1 = DL1 + f11 Aq1 + f12 Aq2 = + Aq1 + Aq2
24EI 3EI 6EI
! ! (2.14)
wl 3 −l 2l
D2 = DL2 + f21 Aq1 + f22 Aq2 = + Aq1 + Aq2
12EI 6EI 3EI

Step 5: Since there’s no displacement at the roller supports, the compatibility


equation is obtained by setting both D1 and D2 to zero in Step 3. The redundant
actions Aq1 and Aq2 are then obtained by solving the resulting matrix equation as
follows.

D = DL + F × Aq

− wl 3
   
  l −l  
0  24EI   3EI Aq
6EI 
  1
⇒ = + ×
  
 wl 3   − l 2l 
0 Aq2
12EI 6EI 3EI
#−1
−4 −wl 3 wl 2 /14
" # " " # " #
Aq1 8
=− × = ANS.
Aq2 −4 16 2wl 3 −3wl 2 /28

Given in line #24 of the Scilab/Octave code at the end.

Once the redundant actions Aq1 and Aq2 are known, the other reaction compo-
nents can be easily computed using equilibrium equation. For the specific value of
w = 35 kN/m and L = 4 m, the corresponding analysis results are as shown in Fig-
ure 2.7.
The corresponding Octave code showing the complete solution steps is given in
the listing below. The same numerical values for the parameters are used in this code
as in SOLUTION-1 above.

@seismicisolation
@seismicisolation
The Basic Methods 49

Scilab/Octave Code
1 % Example 2.3-2 - Two-span beam (Solution 2)
2 % Basic Flexibility Method
3

4 clear all;clc;
5 % Common units used for analysis: Force in kN, Length in m
6

7 % Given parameters & constants:


8 w = 35; L = 4; E = 30; I = 600e6; % kN/m; m; GPa; mm^4
9

10 % Converting some parameters to compatible units


11 E = E*1e6; I = I*1e-12 % kN/m^2; m^4
12 EI = E*I % kN-m^2
13

14 % DLs - displacements due to the given loading (STEP: 2)


15 DL(1,1) = -w*L^3/(24*EI); % rad
16 DL(2,1) = w*L^3/(12*EI); % rad
17 % fij - flexibility coefficients (STEP: 3)
18 F(1,1) = L/(3*EI); % rad/kN-m
19 F(1,2) = -L/(6*EI); % rad/kN-m
20 F(2,1) = -L/(6*EI); % rad/kN-m
21 F(2,2) = 2*L/(3*EI); % rad/kN-m
22

23 % Aq - the moments at fixed-end and the middle support


24 Aq = -inv(F)*DL % kN-m
25

26 % Reactions @ the supports are computed from equilibrium


27 R1 = (sum(Aq)+w*L^2/2)/L % kN
28 R3 = (Aq(2)+w*L^2/2)/L % kN
29 R2 = 2*w*L - R1 - R3 % kN
30 % END: ........... Example 2.3-2

NOTE: The above two alternative solutions show that the particular primary
structure used in analyzing a given indeterminate structure is irrelevant and the final
solution does not depend on the choice of the primary structure. However, a specific
primary structure might ease the determination of the necessary parameters, like
[DL ] and [F], required for the solution in the flexibility method.

Example 2.4 Analyze the plane frame shown in Figure 2.10 using the basic flexibil-
ity method. Use the following parameters for the members: A1 = 12 in2 , A2 = 10 in2 ,
I1 = 400 in4 , I2 = 500 in4 and E = 30,000 ksi for both members. Let P1 = 40 kips,
P2 = 25 kips and M = 75 k f t.

@seismicisolation
@seismicisolation
50 Matrix Structural Analysis and the Finite Element Methods

FIGURE 2.10 (a) A Plane Frame and Loading and (b) A Particular Primary
Structure.

SOLUTION
Step 1: The plane frame is statically indeterminate to the third degree; its primary
structure can be created by removing any combination of three of the reactions
and/or internal forces. The fixed support at node 1 is considered to create the primary
structure as shown in Figure 2.10(b).
Step 2: The three displacements on the primary structure along with the removed
redundant actions due to the given loads can be determined by using the virtual
work method, generally written in the form of Equation (2.15). Table 2.2 is used to
organize the various components in the work equations.
  Z 
qPL mMdx
1 × DL = ∑ +∑ (2.15)
EA EI

Thus, the displacements DL1 , DL2 and DL3 along the three DOFs due to the given
loading are obtained as given in Equation (2.16).

TABLE 2.2
Virtual Work Parameters for the Plane Frame
Member x q1 q2 q3 P m1 m2 m3 M
1–2 0–20 0 −1 0 0 −x 0 −1 0
2–3 0–30 −1 0 0 P1 0 x −1 P2*x + M

qi is the axial force and mi is the bending moment due to unit value of Aqi .

@seismicisolation
@seismicisolation
The Basic Methods 51
! !
q1 PL Z
m1 Mdx
DL1 = ∑ +∑ = −31.072
EA EI
! !
q2 PL Z
m2 Mdx
DL2 = ∑ +∑ = 29.808 (2.16)
EA EI
! !
q3 PL Z
m3 Mdx
DL3 = ∑ +∑ = −0.1296
EA EI

Given in line #12–14 of the Scilab/Octave code at the end.

Step 3: The flexibility coefficients along the DOFs on the primary structure due
to unit values of the redundant actions are computed and given in Equations (2.17)–
(2.19).

Due to Aq1 = 1
! !
q1 2 L Z
m1 2 dx
f11 = ∑ +∑ = 1.7671
EA EI
! !
q1 q2 L Z
m1 m2 dx (2.17)
f21 = ∑ +∑ = −1.0368
EA EI
! !
q1 q3 L Z
m1 m3 dx
f31 = ∑ +∑ = 8.16e − 3
EA EI

Due to Aq2 = 1
! !
q1 q2 L Z
m1 m2 dx
f12 = ∑ +∑ = −1.0368
EA EI
! !
q2 2 L Z
m2 2 dx (2.18)
f22 = ∑ +∑ = 1.0375
EA EI
! !
q2 q3 L Z
m2 m3 dx
f32 = ∑ +∑ = −4.32e − 3
EA EI

@seismicisolation
@seismicisolation
52 Matrix Structural Analysis and the Finite Element Methods

Due to Aq3 = 1
! !
q1 q3 L Z
m1 m3 dx
f13 = ∑ +∑ = 8.16e − 3
EA EI
! !
q2 q3 L Z
m2 m3 dx (2.19)
f23 = ∑ +∑ = −4.32e − 3
EA EI
! !
q3 2 L Z
m3 2 dx
f33 = ∑ +∑ = 4.4e − 05
EA EI

Given in line #17–27 of the Scilab/Octave code at the end.

⇒ D = DL + F × Aq
The structure flexibility matrix is therefore given by:
 
1.7671 −1.0368 8.16e − 3
 
F =  −1.0368 1.0375 −4.32e − 3
 
 
8.16e − 3 −4.32e − 3 4.40e − 5

Given in line #27 of the Scilab/Octave code at the end.

Step 4: The superposition equations for the total displacements along the three
DOFs is thus given Equation (2.20).

D1 = DL1 + f11 Aq1 + f12 Aq2 + f13 Aq3

D2 = DL2 + f21 Aq1 + f22 Aq2 + f23 Aq3


(2.20)
D3 = DL3 + f31 Aq1 + f32 Aq2 + f33 Aq3

Step 5: Since the net displacement at node 1 has to be zero, the compatibility
equation is obtained by setting both D1 , D2 and D3 in Step 3 above to zero. The
redundant actions Aq1 , Aq2 and Aq3 are then obtained by solving the resulting matrix
equation as follows:
   −1  
Aq1 1.7671 −1.0368 8.16e − 3 −31.056
     
Aq2  = −  −1.0368 1.0375 −4.32e − 3 ×  29.808 
     
     
Aq3 8.16e − 3 −4.32e − 3 4.40e − 5 −0.1296

@seismicisolation
@seismicisolation
The Basic Methods 53
   
Aq1 2.80 k
   
Aq2  =  −26.78 k  ANS.
   
   
Aq3 −203.50 k − f t

Given in line #30 of the Scilab/Octave code at the end.

Having determined the redundant actions Aq , the other reaction components


at node 3 are obtained using equilibrium equation as H3 = −42.803,V3 =
1.7772, M3 = −209.13.

The corresponding Octave code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 // Example 2.4 - Plane frame with two members
2 // Basic Flexibility Method
3

4 // Common units used for analysis: Force in kips, Length in in


5

6 // Given parameters & constants, in compatible units:


7 A1 = 12; A2 = 10; I1= 400; I2 = 500; // Ai in in^2; Ii in in^4
8 L1 = 20*12; L2 = 30*12; E = 30e3; // in; in; ksi;
9 P1 = 40; P2 = 25; M = 75*12; // kips; kips; kips-in;
10

11 // DLs - displacements due to the given loading (see STEP: 2)


12 DL = [P1*L2/(A2*E) - L1*(P2*L2^2/2+M*L2)/(I2*E) // in
13 1/(I2*E)*(P2*L2^3/3+M*L2^2/2) // in
14 -1*(P2*L2^2/2+M*L2)/(I2*E)]; // rad
15

16 // fi1 - flexibility coefficients (see STEP: 3)


17 F(1,1) = L1/(A1*E) + L1^3/(3*E*I1) + L1^2*L2/(E*I2);
18 F(2,1) = -L1*L2^2/(2*E*I2);
19 F(3,1) = L1^2/(2*E*I1) + L1*L2/(E*I2);
20 // fi2 - flexibility coefficients
21 F(1,2) = -L1*L2^2/(2*E*I2);
22 F(2,2) = L1/(A1*E) + L2^3/(3*E*I2);
23 F(3,2) = -L2^2/(2*E*I2);
24 // fi3 - flexibility coefficients
25 F(1,3) = L1^2/(2*E*I1) + L1*L2/(E*I2);
26 F(2,3) = -L2^2/(2*E*I2);
27 F(3,3) = L1/(E*I1) + L2/(E*I2)
28

@seismicisolation
@seismicisolation
54 Matrix Structural Analysis and the Finite Element Methods

29 // Aq - the redundant actions


30 Aq = -inv(F) * DL
31

32 // Reactions @ node 3 are computed from equilibrium


33 H3 = -P1 -Aq(1)
34 V3 = -P2 -Aq(2)
35 M3 = -Aq(1)*L1 + Aq(2)*L2 + P2*L2 + M - Aq(3)
36 // END: ........... Example 2.4

Example 2.5 Analyze the grid structure shown in Figure 2.11(a) using the basic
flexibility method. Both members have circular hollow sections with outer diameter
of 12.8 in and thickness of 1/4 in. Use E = 10,500 ksi and ν = 0.3. Use P = 12.5
kips, L1 = 16 ft and L2 = 10 ft.

SOLUTION
Step 1: The grid is statically indeterminate to the third degree; its primary struc-
ture can be created by removing any combination of three reactions and/or internal

FIGURE 2.11 (a) A Grid Structure and (b) Selected Primary Structure.

@seismicisolation
@seismicisolation
The Basic Methods 55

forces. Here, the fixed support at node 2 is released to create the primary structure,
as shown in Figure 2.11(b).
Some of the cross-sectional and material characteristics needed for the virtual
work computations are determined as follows.

Area(A) = π(Ro 2 − Ri 2 )

π
I1 = I2 = I = (Ro 4 − Ri 4 )
4
π
J1 = J2 = J = (Ro 4 − Ri 4 )
2
E
G=
2(1 + ν)

Given in line #8–15 of the Scilab/Octave code at the end.

Step 2: The three displacements on the primary structure along the removed
redundant actions due to the given loads can be determined using the virtual work
method. For a grid structure, this equation is written in the form of Equation (2.21).
Table 2.3 is used to organize the various components in the work equations.
  Z 
tT L mMdx
1 × DL = ∑ +∑ (2.21)
GJ EI

Thus, the displacements DL1 , DL2 and DL3 along the three DOFs due to the given
loading are obtained as given in Equation (2.22).

TABLE 2.3
Virtual Work Parameters for the Grid Structure
Member x t1 t2 t3 T m1 m2 m3 M
1–2 0 to L1 0 1 0 0 L1 − x 0 1 0
1–3 0 to L2 L1 0 −1 0 x −1 0 P*x
(ti is the torsion and mi is the bending moment due to unit value of Aqi .)

@seismicisolation
@seismicisolation
56 Matrix Structural Analysis and the Finite Element Methods

! !
t1 T L Z
m1 Mdx
DL1 = ∑ +∑ = −3.5322
GJ EI
! !
t2 T L Z
m2 Mdx
DL2 = ∑ +∑ = 0.0442 (2.22)
GJ EI
! !
t3 T L Z
m3 Mdx
DL3 = ∑ +∑ = 0
GJ EI

Given in line #18–23 of the Scilab/Octave code at the end.

Step 3: The flexibility coefficients along the DOFs on the primary structure due
to unit values of the redundant actions are computed and given in Equations (2.23)–
(2.25).

Due to Aq1 = 1
! !
t1 2 L Z
m1 2 dx
f11 = ∑ +∑ = 4.2612
GJ EI
! !
t1 t2 L Z
m1 m2 dx (2.23)
f21 = ∑ +∑ = −0.0035
GJ EI
! !
t1 t3 L Z
m1 m3 dx
f31 = ∑ +∑ = −0.0237
GJ EI

Due to Aq2 = 1
! !
t1t2 L Z
m1 m2 dx
f12 = ∑ +∑ = −0.0035
GJ EI
! !
t2 2 L Z
m2 2 dx (2.24)
f22 = ∑ +∑ = 0.0002
GJ EI
! !
t2 t3 L Z
m2 m3 dx
f32 = ∑ +∑ = 0
GJ EI

@seismicisolation
@seismicisolation
The Basic Methods 57

Due to Aq3 = 1
! !
t1t3 L Z
m1 m3 dx
f13 = ∑ +∑ = −0.0237
GJ EI
! !
t2 t3 L Z
m2 m3 dx (2.25)
f23 = ∑ +∑ = 0
GJ EI
! !
t3 2 L Z
m3 2 dx
f33 = ∑ +∑ = 0.0002
GJ EI

Given in line #23–33 of the Scilab/Octave code at the end.

Step 4: The superposition equations for the total displacements along the three
DOFs are thus given Equations (2.26).

D1 = DL1 + f11 Aq1 + f12 Aq2 + f13 Aq3

D2 = DL2 + f21 Aq1 + f22 Aq2 + f23 Aq3 (2.26)


D3 = DL3 + f31 Aq1 + f32 Aq2 + f33 Aq3

⇒ D = DL + F × Aq
Step 5: Since the net displacement at node 1 has to be zero, the compatibility
equation is obtained by setting both D1 , D2 and D3 in Step 3 above to zero. The
redundant actions Aq1 , Aq2 and Aq3 are then obtained by solving the resulting matrix
equation as follows:
   −1  
Aq1 4.2612 −0.0035 −0.0237 −3.5322
     
Aq2  = − −0.0035 0.0002 0  ×  0.0442 
     
     
Aq3 −0.0237 0 0.0002 0
   
Aq1 2.99 k
   
Aq2  = −185.17 k − in ANS.
   
   
Aq3 416.37 k − in

Given in line #8–15 of the Scilab/Octave code at the end.

Having determined the redundant actions Aq s, the other reaction components at


node 3 are obtained using equilibrium equation as V3 = 9.5 kips, T3 = −991.36 k −
in, M3 = 955.46 k − in, as shown in Figure 2.12.

@seismicisolation
@seismicisolation
58 Matrix Structural Analysis and the Finite Element Methods

FIGURE 2.12 Analysis Results of the Grid Structure.

The corresponding Octave code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 % Example 2.5 - Two-members grid structure
2 % Basic Flexibility Method
3

4 % Common units used for analysis: Force in kips, Length in inch


5

6 % Given parameters & constants, in compatible units:


7 R = 6.4, t = 1/4;
8 A = pi*(R^2-(R-t)^2); % in^2
9 I = pi/4*(R^4-(R-t)^4); % in^4
10 J = pi/2*(R^4-(R-t)^4); % in^4
11 E = 10500; nu = 0.3; % ksi; Poisson's ratio
12 G = E/(2*(1+nu)); % ksi, Shear modulud
13 P = -12.5; % kips
14 L1 = 12*16; L2 = 12*10;
15 EI = E*I; GJ = G*J;
16

17 % DLs - displacements due to the given loading (STEP: 2)


18 DL(1,1) = P*L2^3/(3*EI); % in
19 DL(2,1) = -P*L2^2/(2*EI); % rad
20 DL(3,1) = 0 % rad
21

22 % fi1 - flexibility coefficients (STEP: 3)


23 F(1,1) = L1^2*L2/(GJ) + (L1^3 + L2^3)/(3*EI);
24 F(2,1) = -L2^2/(2*EI);
25 F(3,1) = -L1*L2/(G*J) - L1^2/(2*EI);

@seismicisolation
@seismicisolation
The Basic Methods 59

26 % fi2 - flexibility coefficients


27 F(1,2) = -L2^2/(2*E*I);
28 F(2,2) = L1/(G*J) + L2/(E*I);
29 F(3,2) = 0;
30 % fi3 - flexibility coefficients
31 F(1,3) = -L1*L2/(GJ) - L1^2/(2*EI);
32 F(2,3) = 0;
33 F(3,3) = L2/(GJ) + L1/(EI)
34

35 % Aq - the redundant actions


36 Aq = -inv(F) * DL
37

38 % Reactions @ node 3 are computed from equilibrium


39 V3 = -P - Aq(1) % Vertical equilibrium
40 T3 = -Aq(1)*L1 - Aq(3) % Moment about X - axis
41 M3 = -(P+Aq(1))*L2 + Aq(2) % Moment about Y - axis @ 2
42

43 % END: ........... Example 2.5

2.2 THE BASIC STIFFNESS METHOD


The stiffness method aims to determine the structure displacements (either linear or
rotational) in a given statically indeterminate structure using equilibrium and com-
patibility characteristics. In this method, analysis is started by first identifying the
DOFs of the given structure and restraining the structure from all the possible dis-
placements (making it fully restrained, also known as basic structure).

Definition 2.2 (Basic Structure) A basic structure is a fully restrained structure ob-
tained from the given structure by providing additional (unknown) actions to prevent
all possible displacements.
The DOFs in a given structure are clearly known and unique. Thus, the cor-
responding quantity and type of actions required to fully restrain the structure are
clearly known at the outset. Some basic structures are provided as an example in
Figure 2.13. In a basic structure, the number of actions required to fully restrain the
given structure is always equal to the number of its kinematic indeterminacy. The
propped cantilever beam in Figure 2.13(a) is kinematically indeterminate to the sec-
ond degree – the rotations at B and C. Hence, two moments (MB and MC ) need to be
provided to make it fully restrained, as shown in Figure 2.13(b).
The truss in Figure 2.13(c) is kinematically indeterminate to the fifth degree,
horizontal and vertical displacements at nodes 1 and 2, as well as horizontal dis-
placement at node 4. Figure 2.13(d) shows the basic structure of the truss with all its
displacements restrained.

@seismicisolation
@seismicisolation
60 Matrix Structural Analysis and the Finite Element Methods

FIGURE 2.13 (a) A 2-Span Beam having Rotational DOFs at B and C, (b) The
Basic Structure Restraining the two DOFs, (c) A Truss with 5 DOFs and (d) The
corresponding Basic Structure Fully Restrained by the Additional Support reactions
at Joints 1, 2 and 4.

Contrary to the flexibility method, where alternative primary structures are pos-
sible, there’s a single basic structure in the stiffness method with no alternative.

2.2.1 SOLUTION STEPS


The steps are listed here in the basic stiffness method of analyzing a given indeter-
minate structure, followed by worked examples.

Step 1: Identify the degrees of freedom (DOFs or DJ s) of the structure; the ac-
tions provided on the structure along these DOFs need to be assembled as AJ s.

NOTE: If the structure is subjected to any member loads, these need to be con-
verted into work equivalent nodal actions known as equivalent nodal loads (EqNL).
To get the equivalent nodal loads, the fixed-end-actions (FEA) are computed and ap-
plied to the structure in the opposite direction, i.e., EqNL = −FEA. These are then
algebraically added to any other concentrated nodal actions to form the total nodal
load vector AJ s. The structural analysis will be performed using this total structure
nodal load vector.
@seismicisolation
@seismicisolation
The Basic Methods 61

Step 2: Create a basic structure by restraining the DJ s with appropriate additional


actions.
Step 3: Introduce unit displacements along each of the DJ s (on the basic structure
one-at-a-time) and compute all stiffness coefficients si j , the actions required along
each of the DOFs corresponding to unit values of the displacements. This results
in the stiffness matrix [S] of the structure. These coefficients are determined using
Definition 1.4 provided in Chapter 1; the method is thus called basic stiffness method.
Step 4: Write the equilibrium equations. Total actions provided along each of
the DOFs (AJi ) are kept in equilibrium by the sum of the internal (member) actions,
which equals the stiffness coefficients si j multiplied by the corresponding displace-
ment DJ j .

AJ1 = s11 × DJ1 + s12 × DJ2 + s13 × DJ3 + · · · + s1n × DJn


AJ2 = s21 × DJ1 + s22 × DJ2 + s23 × DJ3 + · · · + s2n × DJn
(2.27)
···
AJn = sn1 × DJ1 + sn2 × DJ2 + sn3 × DJ3 + · · · + snn × DJn
In matrix form, Equation (2.27) can also be written as follows.
     
AJ1 s11 s12 s13 ... s1n DJ1
AJ  s21 s22 s23 ... s2n  DJ 
2
 =  ×  2 (2.28)
 ...   ...   ... 
AJn sn1 sn2 sn3 ... snn DJn
which can be written in compact form as follows:

[AJ ] = [S][DJ ] (2.29)

Step 5: Solve for the unknown nodal displacements (DJ s), which is given by:

[DJ ] = [S]−1 [AJ ] (2.30)


Having obtained the DJ s, all other reactions and internal forces can be easily
computed.

2.2.2 EXAMPLES
Example 2.6 Analyze the propped cantilever beam shown in Figure 2.14(a) using
the basic stiffness method.

SOLUTION
Step 1: The given structure is kinematically indeterminate to the first degree; the
DOF (DJ ) is the counter clockwise rotation at the roller support (conventionally
counterclockwise rotation/moment are assumed positive). The corresponding action
AJ would be the given moment −M.

@seismicisolation
@seismicisolation
62 Matrix Structural Analysis and the Finite Element Methods

FIGURE 2.14 Propped cantilever (a) Beam and loading and (b) The basic structure.

Step 2: A basic structure is created by restraining or fixing the roller support, as


shown in Figure 2.14(b).
Step 3: The action on the basic structure required to cause a unit rotation along
the DOF as shown in Figure 2.14(c) equals:
4EI
SAA =
L

Given in line #10 of the Scilab/Octave code at the end.

Steps 4 and 5: The equilibrium equation along the DOF of the structure is writ-
ten, and the unknown displacement DJ is solved, as shown below.

AJ = S × DJ

Given in line #13 of the Scilab/Octave code at the end.


4EI
−M = × DJ
L

ML
DJ = − ANS
4EI

Given in line #16 of the Scilab/Octave code at the end.

Once the redundant action is found, the remaining reactions can be computed us-
ing static equilibrium equations. The complete solution is depicted in Figure 2.15(a).
If M = W L2 /12, the corresponding displacement and reactions are obtained as
shown in Figure 2.15b.

The corresponding Octave code showing the complete solution steps is given
below, with the following numerical values for the parameters: w = 5.5 k/ft, L = 12
ft and EI = 1.

@seismicisolation
@seismicisolation
The Basic Methods 63

FIGURE 2.15 The displacement DJ and the reaction forces (a) Due to applied mo-
ment M and (b) Due to M = W L2 /12.

Scilab/Octave Code
1 % Example 2.6 - Propped cantilever beam
2 % Basic Stiffness Method
3

4 % Common units used for analysis: Force in kips, Length in ft


5

6 % Given parameters & constants:


7 w = 5.5; L = 12; EI = 1;
8

9 % stiffness sAA
10 sAA = 4*EI/L % kips-ft/rad
11

12 % AJ
13 AJ = -w*L^2/12 % kips-ft
14

15 % DJ
16 DJ = AJ/sAA % rad, divide by actual EI
17

18 % Moment reaction @ B
19 M = -w*L^2/12 + 2*EI/L*DJ % kips-ft
20

21 % Force reaction @ A (moment equilibrium @ B)


22 RA = (w*L^2/2 + M)/L % kips
23 % END: ........... Example 2.6

Example 2.7 Analyze the truss shown in Figure 2.4 using the basic stiffness method.
The relative values of the cross-sectional area of each member are shown in the figure
and assume a constant modulus of elasticity E for all members.

@seismicisolation
@seismicisolation
64 Matrix Structural Analysis and the Finite Element Methods

SOLUTION
Step 1: The truss is kinematically indeterminate to the second degree, horizontal
(DJ1 ) and vertical
 (D  J2 ) displacements at node 4. The corresponding action AJ is
0
given by AJ = .
−P

Given in line #13 of the Scilab/Octave code at the end.

Step 2: The basic structure is created by introducing an additional support at


node 4 to restrain both the horizontal and vertical displacements.
Step 3: The stiffness coefficients, si j , of the structure are computed using equi-
librium equations for each DJ = 1 along the corresponding DOFs. As shown in Fig-
ure 2.16, the DJ s are subjected to unit displacements requiring the indicated struc-
ture stiffness. If any truss member j undergoesa displacement of δ j , the axial force
in the member is computed by Am j = δ j × AE L j.

The member forces of the given truss, for each case of unit displacement, are
shown in Table 2.4. For DJ1 = 1, equilibrium equations in the x and y directions are
used to obtain s11 and s21 , respectively as follows.

FIGURE 2.16 Basic Structure under Unit Displacements: (a) Truss under DJ1 = 1
(b) Forces due to DJ1 = 1 (c) Truss under DJ2 = 1 and (d) Forces due to DJ2 = 1.

@seismicisolation
@seismicisolation
The Basic Methods 65

TABLE 2.4
Member Forces Due to Unit Displacements
Member EA/L δ1 from DJ1 Am1 = δ AE/L δ2 from DJ2 Am2 = δ AE/L
√ √
1–4 2AE/L 3/2 3AE/L −1/2 −AE/L
2–4 AE/L 1 AE/L 0 0
√ √
3–4 AE/L 3/2 3AE/(2L) 1/2 AE/(2L)

√ √ √ √
∑ Fx = 0] ⇒ s11 − ( 3/2)( 3AE/L) − AE/L − ( 3/2)( 3AE/(2L)) = 0

⇒ s11 = 13AE/(4L)
√ √
∑ Fy = 0] ⇒ s21 + (1/2)( 3AE/L) − (1/2)( 3AE/(2L)) = 0

⇒ s21 = − 3AE/(4L)

Similarly for DJ2 = 1, the stiffness coefficients s12 and s22 are obtained as follows.
√ √
∑ Fx = 0] ⇒ s12 − ( 3/2)(−AE/L) − ( 3/2)(AE/(2L)) = 0

⇒ s12 = − 3AE/(4L)

∑ Fy = 0] ⇒ s22 + (1/2)(−AE/L) − (1/2)(AE/(2L)) = 0

⇒ s22 = 3AE/(4L)

The complete structure stiffness matrix is thus given by:


" √ #
AE 13 − 3
S= √
4L − 3 3

Given in line #21–35 of the Scilab/Octave code at the end.

Step 4: The equilibrium equation is written in matrix as shown below.

AJ = S × DJ
" #" √ # " #
0 AE 13 − 3 DJ1
= √ ×
−P 4L − 3 3 DJ2

@seismicisolation
@seismicisolation
66 Matrix Structural Analysis and the Finite Element Methods

Step 5: The equilibrium equation is then solved to obtain the structure displace-
ments as shown below.

DJ = S−1 × AJ

Given in line #38 of the Scilab/Octave code at the end.

" # "√ #
DJ1 − PL 3
= ANS
DJ2 9AE 13

With the DJ s now known, the member forces can be computed by scaling up and
combining the values in Table 2.4 as shown below.

√ √
3AE − 3PL − AE − 13PL 10P
Am14 = × + × =
L 9AE L 9AE 9
√ √
AE − 3PL − 13PL − 3P
Am24 = × + 0× =
L 9AE 9AE 9
√ √
3AE − 3PL AE − 13PL − 8P
Am34 = × + × =
2L 9AE 2L 9AE 9

Given in line #43 of the Scilab/Octave code at the end.

This result is in agreement with the earlier solution of Example 2.2 that was
solved using the basic flexibility method.

The corresponding Octave code showing the complete solution steps is given be-
low with numerical values of P = 100 kN, L = 4 m, E = 200 GPa and A = 2000 mm2 .

Scilab/Octave Code
1 // Example 2.7 - Plane truss with two bars
2 // Basic Stiffness Method
3

4 // Common units used for analysis: Force in kN, Length in m


5

6 // Given parameters & constants:


7 P = 100; L = 4; E = 200e6; A = 2e-3;
8 // in kN, m, kN-m^2, m^2
9 t=sqrt(3);
10

@seismicisolation
@seismicisolation
The Basic Methods 67

11 // Converting some parameters to compatible units


12 s = E*A/L; // kN/m, axial stiffness
13 Aj = [0;-P]; // kN
14

15 // Member cross-sectional areas


16 a = [4/t; 1; 2/t]
17 // Member lengths
18 l = [2/t; 1; 2/t]
19

20 // Member displacements due to Dj1=1


21 d1 = [t/2;1;t/2]
22 // Member displacements due to Dj2=1
23 d2 = [-1/2;0;1/2]
24

25 // Member forces for each case of unit displacement


26 T1 = s*((d1.*a)./l); // for Dj1 = 1
27 T2 = s*((d2.*a)./l); // for Dj2 = 1
28 T = [T1 T2] // in compact form (STEP 3:)
29

30 // Transformation matrix for s11 s21; s12 s22


31 // i.e, equilibrium equations along x- and y- axis
32 C = [t/2 1 t/2; -1/2 0 1/2];
33

34 // Strcture stiffness matrix (STEP 3:)


35 S = C*T
36

37 // Nodal displacement DJ of the truss (mm)


38 Dj = S^-1*Aj*1000
39 // Compare this with the result in the Example
40 // D = -P*L/(9*E*A)*[t; 13]*1000
41

42 // Member forces
43 Am = T*Dj/1000
44 // END: ........... Example 2.7

Example 2.8 Analyze the two-span beam shown in Figure 2.17a using the basic
stiffness method. Assume the modulus of elasticity E and the moment of inertia I are
constant for both members.

SOLUTION
Step 1: The beam is kinematically indeterminate to the second degree, and the ro-
tations at the two roller supports are the DOFs (conventionally, counterclockwise

@seismicisolation
@seismicisolation
68 Matrix Structural Analysis and the Finite Element Methods

rotation is assumed positive). As obtained using the equivalent-nodal-load concept,


the corresponding nodal action AJ on the structure is given as follows; see Fig-
ure 2.17(c) and (d) for the derivation.
 
0
AJ =  wL2 
12

Given in line #17 of the Scilab/Octave code at the end.

Step 2: The basic structure is created by restraining the rotational DOFs at nodes
2 and 3 (DJ1 and DJ2 ), as shown in Figure 2.17b.
Step 3: The stiffness coefficients along DOF-1 and DOF-2 on the basic struc-
ture required to cause unit values for DJ1 and DJ2 , respectively, are provided in the
equation below.

FIGURE 2.17 (a) Two-span beam under uniformly distributed load, (b) Correspond-
ing basic structure, (c) Negative of the fixed-end-actions as equivalent nodal loads
and (d) Net nodal load for the beam analysis (AJ ).

@seismicisolation
@seismicisolation
The Basic Methods 69

8EI 2EI
s11 = , s12 =
L L
2EI 4EI
s21 = , s22 =
L L
" #
EI 8 2L
S=
L 2 4

Given in line #20–23 of the Scilab/Octave code at the end.

Step 4: The equilibrium equation (AJ = S ∗ DJ ) along the DOFs is written in


matrix form as follows.
 
0 " # " #
8 2 DJ1
 EI
 wL2  = ×

L 2 4 DJ2
12
Step 5: The nodal displacements DJ1 and DJ2 are obtained by solving the above
matrix equation as follows:

− wL3
   
" # " #−1 0
DJ1 EI 8 2
  168EI 
= ×  2 = 
 wL3  ANS
 
L 2 wL
DJ2 4
12 42EI

Given in line #26 of the Scilab/Octave code at the end.

Once the displacement DJ1 and DJ2 are determined, the complete analysis result
is obtained by superimposing the fixed-end-actions (AmF ) and the member actions
corresponding to the computed nodal displacements (DJ s), as shown in Table 2.5 and
2
Figure 2.18. Finally, the support reactions of the beam are obtained to be M1 = wL
21 ,
R1 = 13wL 8wL 11wL
28 , R2 = 7 , R3 = 28 . This result is identical with the solution obtained
in Example 2.3.

Given in line #43–44 of the Scilab/Octave code at the end.

The corresponding Octave code showing the complete solution steps is given
below using numerical values of w = 35 kN/m, L = 4 m, E = 30 GPa and I = 600e6
mm4 .

@seismicisolation
@seismicisolation
70 Matrix Structural Analysis and the Finite Element Methods

TABLE 2.5
Fixed-End-Actions Plus Actions Due to Nodal Displacements
Joint MF M DJ Total M VF V DJ Total V

wL2 2 wL2 13wL


1 12 − wL
84 21
wL
2 − wL
28 28
2 2 2
2-L − wL
12 − wL
42 − 3wL
28
wL
2
wL
28
15wL
28

wL2 wL2 3wL2 wL 3wL 17wL


2-R 12 42 28 2 28 28
2 wL2 3wL 11wL
3 − wL
12 42 0 wL
2 28 28

FIGURE 2.18 Reactions of the Two-Span Beam Using Equivalent Nodal Load.

Scilab/Octave Code

1 % Example 2.8 - Two-span beam


2 % Basic Stiffness Method
3

4 % Common units used for analysis: Force in kN, Length m m

@seismicisolation
@seismicisolation
The Basic Methods 71

6 % Given parameters & constants:


7 w = 35; L = 4; E = 30; I = 600e6; % kN/m; m; GPa; mm^4
8

9 % Converting some parameters to compatible units


10 E = E*1e6; I = I*1e-12; % kN/m^2; m^4
11 EI = E*I; % kN-m^2
12

13 % Fixed-end-actions for both members (see STEP: 1)


14 Amf1 = [w*L/2 w*L^2/12 w*L/2 -w*L^2/12]'
15 Amf2 = [w*L/2 w*L^2/12 w*L/2 -w*L^2/12]'
16 % AJ - the applied nodal actions (Equivalent nodal load)
17 Aj = [-(Amf1(4)+Amf2(2)); -Amf2(4)] % kN-m
18

19 % Sij - stiffness coefficients (see STEP: 3)


20 S(1,1) = 8*EI/L; % m/kN
21 S(1,2) = 2*EI/L; % m/kN
22 S(2,1) = S(1,2); % m/kN
23 S(2,2) = 4*EI/L % m/kN
24

25 % Nodal displacements DJ in rad


26 Dj = inv(S)*Aj
27 % Compare with the DJ in the Example
28 % DJ = w*L^3*[-1/168;1/42]/EI
29

30 % Member actions due DJ


31 % Bending moments - Slope-deflection equation (kN-m)
32 AmDj1 (2,1) = 2*EI/L*Dj(1);
33 AmDj1 (4,1) = 2*EI/L*(2*Dj(1));
34 AmDj2 (2,1) = 2*EI/L*(2*Dj(1)+Dj(2));
35 AmDj2 (4,1) = 2*EI/L*(Dj(1)+2*Dj(2));
36 % Shear forces - Equilibrium (kN)
37 AmDj1 (1,1) = (AmDj1 (2,1) + AmDj1 (4,1))/L;
38 AmDj1 (3,1) = -AmDj1 (1,1)
39 AmDj2 (1,1) = (AmDj1 (2,1) + AmDj1 (4,1))/L;
40 AmDj2 (3,1) = -AmDj1 (1,1)
41

42 % Total member actions Am = Amf + AmDj


43 Am1 = Amf1 + AmDj1
44 Am2 = Amf2 + AmDj2
45

46 % The support reactions are therefore:


47 M1 = Am1(2)
48 R1 = Am1(1)
49 R2 = Am1(3)+Am2(1)

@seismicisolation
@seismicisolation
72 Matrix Structural Analysis and the Finite Element Methods

50 R3 = Am2(3)
51

52 % END: ........... Example 2.8


53

Example 2.9 Analyze the plane frame shown in Figure 2.10 using the basic stiffness
method. Use the following parameters for the members: A1 = 12 in2 , A2 = 10 in2 , I1
= 400 in4 , I2 = 500 in4 and E = 30,000 ksi for both members. Let P1 = 40 kips, P2
= 25 kips and M = 75 k f t.

SOLUTION
Step 1: The plane frame is kinematically indeterminate to the third degree, the hori-
zontal, vertical as well as rotational displacements (DJs) at node 2; see Figure 2.19.
The Nodal load is given by the expression below.
   
P1 40
AJ = P2 =  25 
M 900

Given in line #25 of the Scilab/Octave code at the end.

Step 2: The basic structure is created by restraining the three DOFs at node 2
(DJ1 , DJ2 and DJ3 ), as shown in Figure 2.19.
Step 3: The stiffness coefficients along the DOF-s on the basic structure required
to cause unit values for DJ1 , DJ2 and DJ3 , respectively, are provided in the equation
below.

FIGURE 2.19 Basic Structure for a Plane Frame.

@seismicisolation
@seismicisolation
The Basic Methods 73

12EI1 EA2 6EI1


s11 = + , s12 = 0, s13 =
L1 3 L2 L1 2
EA1 12EI2 6EI2
s21 = 0, s22 = + , s23 =
L1 L2 3 L2 2
6EI1 6EI2 4EI1 4EI2
s31 = , s32 = , s33 = +
L1 2 L2 2 L1 L2
 
843.75 0. 1250.
 
 0. 1503.858 694.444 
⇒S=



 
1250. 694.444 366666.67

Given in line #12–22 of the Scilab/Octave code at the end.

Step 4: The equilibrium equation (AJ = S ∗ DJ ) along the DOFs is written in


matrix form as follows.
     
40 843.75 0. 1250. DJ1
     
 25  =  0. 1503.858 694.444  × DJ2 
     
     
−900 1250. 694.444 366666.67 DJ3
Step 5: The displacements at node 2 (DJ1 , DJ2 and DJ3 ) are obtained by solving
the matrix equation as follows:
   
DJ1 0.0440372 in
   
DJ2  =  0.0155734 in  ANS
   
   
DJ3 0.0022749 rad

Given in line #28 of the Scilab/Octave code at the end.

Once the displacement DJ1 , DJ2 and DJ3 are determined, the complete analysis
result is obtained by computing the member actions corresponding to the computed
nodal displacements (DJ s). The support reactions of the given plane frame equal the
member forces at nodes 1 and 3.

The corresponding Octave code showing the complete solution steps is given in
the listing below.

@seismicisolation
@seismicisolation
74 Matrix Structural Analysis and the Finite Element Methods

Scilab/Octave Code
1 // Example 2.9 - Plane frame with two members
2 // Basic Stiffness Method
3

4 // Common units used for analysis:


5 // Force in kips, Length in inches
6

7 // Given parameters & constants, in compatible units:


8 A = [12, 10]; I = [400 500]; // in^2; in^4
9 L = [20*12; 30*12]; E = 30e3; // in; ksi;
10 P1 = 40; P2 = 25; M = -75*12; // kips; kips; kips-in;
11

12 // si1 - stiffness coefficients (STEP: 3)


13 S(1,1) = 12*E*I(1)/L(1)^3 + E*A(2)/L(2);
14 S(2,1) = 0;
15 S(3,1) = 6*E*I(1)/L(1)^2;
16 // si2 - stiffness coefficients
17 S(1,2) = 0;
18 S(2,2) = E*A(1)/L(1) + 12*E*I(2)/L(2)^3;
19 S(3,2) = 6*E*I(2)/L(2)^2;
20 // si3 - stiffness coefficients
21 S(1,3) = 6*E*I(1)/L(1)^2;
22 S(2,3) = 6*E*I(2)/L(2)^2;
23 S(3,3) = 4*E*I(1)/L(1) + 4*E*I(2)/L(2)
24

25 // AJ - the given nodal actions


26 AJ = [P1; P2; M]
27

28 // DJ - the nodal displacements


29 DJ = inv(S) * AJ
30

31 // Reactions @ node 3 are computed from equilibrium


32 H1 = -DJ(1)*12*E*I(1)/L(1)^3 - DJ(3)*6*E*I(1)/L(1)^2
33 V1 = -DJ(2)*E*A(1)/L(1)
34 M1 = DJ(1)*6*E*I(1)/L(1)^2 + DJ(3)*2*E*I(1)/L(1)
35

36 H3 = -DJ(1)*E*A(2)/L(2)
37 V3 = -DJ(2)*12*E*I(2)/L(2)^3 - DJ(3)*6*E*I(2)/L(2)^2
38 M3 = DJ(2)*6*E*I(2)/L(2)^2 + DJ(3)*2*E*I(2)/L(2)
39

40 // END: ........... Example 2.9

@seismicisolation
@seismicisolation
The Basic Methods 75

Example 2.10 Analyze the grid structure shown in Figure 2.11 using the basic stiff-
ness method. Both members have circular hollow sections with outer diameter of
320 mm and thickness of 5 mm. Use E = 70 GPa and ν = 0.3.

SOLUTION
Step 1: The grid structure is kinematically indeterminate to the third degree, the
vertical as well as two rotations about x- and y-axis (DJs) at node 1; see Figure 2.20.
The corresponding nodal load vector AJ is given as shown below.
 
−100
AJ =  0 
0

Given in line #30 of the Scilab/Octave code at the end.

Step 2: The basic structure is created by restraining the three DOFs at node 2
(DJ1 , DJ2 and DJ3 ), as shown in Figure 2.20.
Step 3: The stiffness coefficients along the DOF-s on the basic structure required
to cause unit values for DJ1 , DJ2 and DJ3 , respectively, are provided in the equation
below.

12EI 12EI 6EI 6EI


s11 = 3
+ 3
, s12 = 2 , s13 =
L1 L2 L2 L1 2
6EI GJ 4EI
s21 = , s22 = + , s23 = 0
L2 2 L1 L2
6EI GJ 4EI
s31 = , s32 = 0, s33 = +
L1 2 L2 L1

FIGURE 2.20 Basic Structure for a Grid Structure.

@seismicisolation
@seismicisolation
76 Matrix Structural Analysis and the Finite Element Methods

Given in line #17–27 of the Scilab/Octave code at the end.

 
843.75 0. 1250.
 
⇒ S =  0. 1503.858 694.444 
 
 
1250. 694.444 366666.67
Step 4: The equilibrium equation (AJ = S × DJ ) along the DOFs is written in
matrix form as follows.
     
−100 843.75 0. 1250. DJ1
     
 0  =  0. 1503.858 694.444  × DJ2 
     
     
0 1250. 694.444 366666.67 DJ3

Step 5: The displacements at node 2 (DJ1 , DJ2 and DJ3 ) are obtained by solving
the matrix equation as follows:
   
DJ1 0.0440372
   
DJ2  = 0.0155734 ANS
   
   
DJ3 0.0022749

Given in line #33 of the Scilab/Octave code at the end.

Once the displacement DJ1 , DJ2 and DJ3 are determined, the complete analysis
result is obtained by computing the member actions corresponding to the computed
nodal displacements (DJ s), shown earlier in Figure 2.12.

The corresponding Octave code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 % Example 2.10 - Two-members grid structure
2 % Basic Stiffness Method
3

4 % Common units used for analysis: Force in kN, Length in m


5

6 % Given parameters constants, in compatible units:


7 A = pi*(160^2-155^2)*1e-6; % m^2

@seismicisolation
@seismicisolation
The Basic Methods 77

8 I = pi/4*(160^4-155^4)*1e-12; % m^4
9 J = pi/2*(160^4-155^4)*1e-12; % m^4
10 E = 70e6; nu = 0.3; % kPa; Poisson's ratio
11 G = E/(2*(1+nu)); % kPa, Shear modulus
12 P = -100; % kN
13 L1 = 5; L2 = 3; % m
14 EI = E*I; GJ = G*J;
15

16 % si1 - stiffness coefficients (see STEP: 3)


17 S(1,1) = 12*EI/L1^3 + 12*EI/L2^3;
18 S(2,1) = 6*EI/L2^2;
19 S(3,1) = 6*EI/L1^2;
20 % si2 - stiffness coefficients
21 S(1,2) = 6*EI/L2^2;
22 S(2,2) = GJ/L1 + 4*EI/L2;
23 S(3,2) = 0;
24 % si3 - stiffness coefficients
25 S(1,3) = 6*EI/L1^2;
26 S(2,3) = 0;
27 S(3,3) = GJ/L2 + 4*EI/L1
28

29 % AJ - the given nodal actions


30 AJ = [P; 0; 0]
31

32 % DJ - the nodal displacements


33 DJ = inv(S) * AJ
34

35 % Reactions @ nodes 2 and 3 are computed


36 % using the displacements & equilibrium
37 V2 = -DJ(1)*12*EI/L1^3 - DJ(3)*6*EI/L1^2
38 T2 = -DJ(2)*GJ/L1
39 M2 = DJ(1)*6*EI/L1^2 + DJ(3)*2*EI/L1
40

41 V3 = -DJ(1)*12*EI/L2^3 - DJ(2)*6*EI/L2^2
42 T3 = -DJ(3)*GJ/L2
43 M3 = DJ(1)*6*EI/L2^2 + DJ(2)*2*EI/L2
44 % END: ........... Example 2.10

2.3 PROBLEMS
2.1 Analyze the spring system shown in Figure 2.21(a) using the basic flexibility
method if k1 = 115 lb/in, k2 = 55 lb/in, k3 = 140 lb/in and k4 = 85 lb/in (SI: k1 = 20
N/mm, k2 = 10 N/mm, k3 = 25 N/mm and k4 = 15 N/mm).

@seismicisolation
@seismicisolation
78 Matrix Structural Analysis and the Finite Element Methods

FIGURE 2.21 Problems Set 2.

2.2 Analyze the two-bar structure shown in Figure 2.21(b) using the basic flexibility
method and consider the right support as the redundant action. Take L = 2 m, A =
1300 mm2 , P = 500 N and E = 110 GPa (FPS: L = 6 ft, A = 2 in2 , P = 110 lb, E =
16e3 ksi).
2.3 Analyze the two-bar structure shown in Figure 2.21(c) using the basic flexibility
method considering the right support as the redundant action. Use a = 20 in, A =
0.5 in2 , P = 90 lb and E = 11,000 ksi (SI: a = 50 cm, A = 320 mm2 , P = 400 N and
E = 70 GPa).

@seismicisolation
@seismicisolation
The Basic Methods 79

2.4 Analyze the two-bar structure shown in Figure 2.21(d) using the basic flexibility
method. Use a = 20 in, A = 0.5 in2 , P = 90 lb, E = 11,000 ksi and the gap on the
right equals 0.02 in (SI: a = 50 cm, A = 320 mm2 and P = 400 N, E = 70 GPa and
the gap on the right equals 0.5 mm).
2.5 Analyze the two-span beam shown in Figure 2.21(e) using the basic flexibility
method considering the reactions at the two roller supports as the redundant actions.
Use L = 3 m, E = 207 GPa, I = 120e6 mm4 , M1 = 80 kN m and M2 = −50 kN-m
(FPS: L = 10 ft, E = 30,000 ksi, I = 290 in4 , M1 = 60 kip-ft and M2 = −36 kip-ft).
2.6 Analyze the two-span beams shown in Figure 2.21(f) using basic flexibility by
considering the reactions at the left fixed supports as redundant actions. Use a = 2m,
E = 30,000 ksi, I = 120 in4 , P = 25 kips and M = 20 kip-ft (SI: a = 2 m, E = 210
GPa, I = 50e6 mm4 , P = 120 kN and M = 30 kN m).

2.7 Analyze the plane truss shown in Figure 2.21(g) using the basic flexibility method
by taking the force in member 1–4 as the redundant action. Use L = 1.5 m, A1 = A2
= A3 = 16,000 mm2 , α = 30o , β = 60o , E = 110 GPa, P1 = 80 kN and P2 = 100 kN
(FPS: L = 5 ft, A1 = A2 = A3 = 25 in2 , α = 30o , β = 60o , E = 16,000 ksi, P1 = 18
kips and P2 = 20 kips).

2.8 Analyze the plane truss shown in Figure 2.21(h) using the basic flexibility
method. Use L = 6 ft, A = 10 in2 , E = 16,000 ksi, P1 = 16 kips, P2 = 12 kips,
P3 = 28 kips and α = 45o (SI: L = 2 m, A = 6000 mm2 , E = 110 GPa, P1 = 75 kN,
P2 = 55 kN, P3 = 125 kN and α = 45o ).

2.9 Analyze the plane frame shown in Figure 2.21(i) using the basic flexibility
method by taking the reactions at the pin support as the redundant actions. Use
L = 3 m, A1 = A2 = 20,000 mm2 , I = 150e6 mm4 , E = 120 GPa, P1 = 35 kN, P2
= 40 kN and M = 50 kN m (FPS: L = 10 ft, A1 = A2 = 30 in2 , I = 150e6 in4 , E =
17,500 ksi, P1 = 8 kips, P2 = 12 kips and M = 35 kip-ft).

2.10 Analyze the grid structure shown in Figure 2.21(j) using the basic flexibility
method. The two members 1–2 and 3–4 are rigidly connected at 2; with the cross-
sections of the members being hollow circular sections having an outer diameter Do
and a thickness t. Take L = 6 ft, Do = 6.5 in, t = 0.15 in, P = 25 kips, Mx = 40 kip-ft
and E = 30,000 ksi (SI: L = 2 m, Do = 160 mm, t = 4 mm, P = 100 kN, Mx = 55
kN m and E = 200 GPa).

2.11 Analyze the spring system in Problem 2.1 using the basic stiffness method.
2.12 Analyze the two-bar structure in Problem 2.2 using the basic stiffness method.
2.13 Analyze the two-bar structure in Problem 2.3 using the basic stiffness method.

2.14 Analyze the two-bar structure in Problem 2.4 using the basic stiffness method.
2.15 Analyze the two-span beam in Problem 2.5 using the basic stiffness method.

@seismicisolation
@seismicisolation
80 Matrix Structural Analysis and the Finite Element Methods

2.16 Analyze the two-span beam in Problem 2.6 using the basic stiffness method.

2.17 Analyze the plane truss in Problem 2.7 using the basic stiffness method.
2.18 Analyze the plane truss in Problem 2.8 using the basic stiffness method.
2.19 Analyze the plane frame in Problem 2.9 using the basic stiffness method.
2.20 Analyze the grid structure in Problem 2.10 using the basic stiffness method.

@seismicisolation
@seismicisolation
3 The Formalized Methods
After studying the chapter, readers will be able to:
• Create a primary structure from a given indeterminate structure releasing
the redundant actions
• Create a basic structure from a given indeterminate structure restraining the
DOFs of the structure
• Determine the action transformation matrix of a given primary structure
• Determine the displacement transformation matrix of a given basic struc-
ture
• Establish the structure flexibility and structure stiffness matrices and then
analyze an indeterminate structure using both methods
• Use Scilab or Octave software to perform the computations using formal-
ized flexibility and stiffness methods

3.1 THE FORMALIZED FLEXIBILITY METHOD


The structural analysis steps in the formalized flexibility method, as in the basic
flexibility method, begin by first identifying and releasing the redundant actions from
the given indeterminate structure, and thereby creating a primary structure.
However, in the formalized flexibility method the flexibility matrix [F] of the
primary structure shall not be evaluated by applying unit actions and computing the
corresponding displacements at the DOFs. Rather, they are assembled from the flex-
ibility matrices fmi of the individual members using action transformation relation-
ship and matrix operations. The displacement DL on the primary structure due to
the given loading is not required, since this will be taken care of through the ac-
tion transformation operations. Consequently, the steps in the formalized methods
become much simpler than those in the basic methods discussed in the previous
chapter. The solution procedure for the formalized methods will be explained in the
subsequent sections of this chapter.

3.1.1 MEMBER FLEXIBILITY


The relationship between the member displacements dm and the corresponding ac-
tions am can easily be formulated for any prismatic structural element. This relation-
ship is said to be a member flexibility equation, and it can be written in matrix form,
as shown in Equation (3.1).

dm = [ fm ] × am (3.1)

DOI:10.1201/9781003329350-4@seismicisolation
@seismicisolation 81
82 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.1 A Truss Member Subjected to Action am .

Truss Member
A (plane or space) truss member has a single DOF along its longitudinal axis, i.e.,
the axial deformation at node-2, as shown in Figure 3.1. The flexibility (the axial de-
formation due to a unit axial force) of a truss member having constant axial rigidity
EA is given by Equation (3.2). In the formalized method, a member is always con-
sidered statically determinate. This is achieved by restraining one end (node-1) and
releasing the other (node-2).
L
fm = (3.2)
EA

Beam Member
A beam member has two DOFs – transverse displacement and rotation at the free
end, as shown in Figure 3.2. The flexibility matrix of a beam member with constant
flexural rigidity EI is given by the 2 × 2 matrix shown in Equation (3.3). This is
determined by assigning unit values to the actions am1 and am2 , one at a time, and
computing the corresponding transverse displacement and rotational along the two
DOFs. This means the unknown member actions (am ) and/or displacements (dm )
occur at node-2.
 3
L2

L
 3EI 2EI 
fm =  (3.3)
 

 L2 L 
2EI EI

Plane Frame Member


A plane frame member has three DOFs – axial and transverse displacements as well
as rotation at the free end, as shown in Figure 3.3. The flexibility of a frame member
with constant axial rigidity EA and flexural rigidity EI is given by the 3 × 3 matrix
shown in Equation (3.4). This matrix is obtained by assigning unit values to the
actions am1 , am2 , and am3 , one at a time, and computing the corresponding axial
displacement, transverse displacement and rotational along the three DOFs. It is clear

@seismicisolation
@seismicisolation
The Formalized Methods 83

FIGURE 3.2 A Beam Member with Transverse and Rotational DOFs.

that a plane frame member combines the effects of a truss- and a beam-member,
which are treated above.
 
L
0 0 
 EA


 
L3 L2 
 
fm =  0 (3.4)



 3EI 2EI  
 
 L2 L 
0
2EI EI

FIGURE 3.3 A Plane Frame Member with Three DOFs.

@seismicisolation
@seismicisolation
84 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.4 A Grid Member with Its Three DOFs.

Grid Member
A grid structure is a framed structure lying in a plane but subjected to transverse
actions perpendicular to the plane of the structure. Each grid member has three DOFs
– transverse displacements, twisting and rotation at the free end, as shown in Figure
3.4. The double-headed arrow along DOF-2 represents the rotation about the member
axis, i.e., the twisting of the member. The flexibility of a grid member with constant
flexural rigidity EI and the rigidity against twist GJ 1 is given by the 3 × 3 matrix
shown in Equation (3.5).
 3 
L L2
0
 3EI 2EI 
 
 
L
 
fm =  0 (3.5)
 
0 

 GJ 

 
 L2 L 
0
2EI EI

Space Frame Member


A space frame member has all six DOFs – translation along and rotation about the
three coordinate axes at the free end as shown in Figure 3.5. Note that the double
headed arrows (4, 5 and 6) refer to the twisting (rotation about the X), bending about
the Z-axis and bending about the Y-axis, respectively. These rotations are assumed to
be positive in the directions indicated in the figure according to the right-hand rule.
The flexibility of a space frame member with constant axial, twisting and flex-
ural rigidities EA, GJ, EIz and EIy is given by the 6 × 6 matrix shown in Equation
(3.6). Note that (unit) actions along 2 and 6 cause bending of the member about the
Z-axis, requiring Iz in the flexibility matrix. Likewise, (unit) actions along 3 and 5
cause bending of the member about the Y-axis, in which case Iy is to be used.

1 G is the shear modulus of elasticity and J is the polar moment of inertia of the cross-section; hence

GJ is the shear rigidity of the section against twisting.

@seismicisolation
@seismicisolation
The Formalized Methods 85

FIGURE 3.5 The Six Possible DOFs of a Space Frame Member.

 
L
 EA 0 0 0 0 0 
 
L3 L2 
 

 0 0 0 0 

 3EIz 2EIz 

L3 L2
 
 
 0 0 0 − 0 
 3EIy 2EIy 
fm =   (3.6)
 L 
 0 0 0 0 0 
 
 GJ 
 
 L2 L 
 0 0 − 0 0 
2EIy EIy
 
 
L2
 
 L 
0 0 0 0
2EIz EIz

3.1.2 DERIVATION OF STRUCTURE FLEXIBILITY


In this section, the structure flexibility matrix will be derived using equilibrium re-
lationships and simple matrix operations. It is no more necessary to apply unit ac-
tion along each DOF and compute the corresponding displacements to determine F.
Additionally, computing the displacement due to the given loading on the primary
structure (DL ) is no more required.

Unassembled Structure Flexibility Matrix


The displacement vs action relationship of each member i of a given primary struc-
ture can be written by the set of matrix equations like those given earlier in Equa-
tion (3.1). For a structure containing n members, these equations can be gathered
together into a larger matrix relationship given in Equation (3.7). In this equation,
every member is considered independent of each other. The member connections are
neglected, and compatibility and equilibrium requirements have not been considered.

@seismicisolation
@seismicisolation
86 Matrix Structural Analysis and the Finite Element Methods

Thus, the corresponding flexibility matrix of the structure Fm in this case is termed
as the unassembled structure flexibility matrix and the equation is the unassembled
structure flexibility equation.
     
dm1 fm1 0 ... 0 am1
dm   0
 2 =  f m2 ... 0  am 
 ×  2
 ...   ... (3.7)
... ... ...   ... 
dmn 0 0 ... fmn amn
The unassembled structure flexibility equation is written in a compact form as
shown in Equation (3.8).

Dm = Fm × Am (3.8)

Action Transformation Matrix


For any structure, the structure actions vector As is composed of the actions applied at
the kinematic indeterminacies (DOFs) of the structure AJ and the redundant actions
AQ that have been identified and removed from the structure to create the primary
structure. The displacements vector Ds corresponding to the structure actions As is
also composed of the displacements at the DOFs of the structure DJ and the displace-
ment components corresponding to the released redundant actions, DQ .
Since the free end of every member corresponds to the identified structure nodal
actions (AJ or AQ ), the member actions Am can always be computed for any given set
of external (structure) actions As . In other words, there’s a relationship between Am
and As vectors, as provided in Equation (3.10).
   
AJ DJ
As = and Ds = (3.9)
AQ DQ
 
A
Am = BMS × As = BMS × J (3.10)
AQ
The matrix BMS is called the action transformation matrix or equilibrium matrix.
Subsequent sections will be provided detailed explanations on the relationship be-
tween Am and As for the different structure/member types and on how to determine
the coefficients in the action transformation matrix BMS .

Principle of Complementary Virtual Works


An arbitrary virtual external action δ AS on a given primary structure will cause a
corresponding set of virtual internal (member) actions δ AM , which is related to the
external virtual actions by the same action transformation matrix BMS , as shown in
Equation (3.11).
 
δ AJ
δ Am = BMS × δ As = BMS × (3.11)
δ AQ

@seismicisolation
@seismicisolation
The Formalized Methods 87

According to the principle of complementary virtual work [14, 49], the exter-
nal complementary virtual work δW ∗ of the primary structure, i.e., the virtual work
caused by the external virtual actions δ AS undergoing through the actual displace-
ments Ds is equal to the internal complementary virtual work δU ∗ , i.e., the virtual
work caused by the virtual member actions δ AM undergoing through the actual mem-
ber displacements DM .

δW ∗ = δU ∗

δ As T × Ds = δ AM T × DM

= (BMS × δ As )T × (FM × AM )

= δ As T × BMS T × FM × BMS × As

⇒ Ds = BMS T × FM × BMS × As

Assembling Structure Flexibility


From the above derivation, the assembled structure flexibility matrix is defined by
the relationship in Equation (3.12).

Fs = BMS T × FM × BMS (3.12)

Ds = Fs × As (3.13)
Equation (3.13) gives the external displacements Ds in terms of the external
actions As . This equation is termed as the assembled structure flexibility equation
(compared with the unassembled structure flexibility equation in Equation (3.8)).
Equation (3.13) can also be written in a partitioned form as given in Equation (3.14)
partitioning the Fs matrix and using the relationship for As and Ds given earlier in
Equation (3.9).
     
DJ F FJQ A
= JJ × J (3.14)
DQ FQJ FQQ AQ
Resulting in the two relationships provided in Equation (3.15).

DJ = FJJ × AJ + FJQ × AQ
(3.15)
DQ = FQJ × AJ + FQQ × AQ

3.1.3 SOLVING FOR AQ AND SOLUTION STEPS


Due to compatibility, the total (net) displacement components corresponding to the
released redundant actions must equal to zero (i.e., DQ = [0]). Hence, from the sec-
ond of Equation (3.15), one obtains the values of the redundant actions as given in
Equation (3.16).

@seismicisolation
@seismicisolation
88 Matrix Structural Analysis and the Finite Element Methods
−1
AQ = −FQQ × (FQJ × AJ ) (3.16)
This is the final step that provides the unknown redundant actions of the structure.

STEPS IN THE FORMALIZED FLEXIBILITY METHOD


The structure flexibility matrix Fs can be indirectly computed in the formalized flex-
ibility method to relate the structure nodal actions As and the corresponding dis-
placements Ds . The analysis steps according to the formalized flexibility method are
outlined as follows.

Step 1: Create a primary structure by removing an appropriate number of re-


dundant actions from the given structure. DOFs need to be numbered as D j s and
redundant actions Aq s as well as member actions Am s shall also be clearly identi-
fied and numbered. It is not important in what order these parameters are numbered,
but it is essential to be consistent with the chosen numbering system throughout the
analysis.
Step 2: Prepare the structure actions vector. The actions along D j shall be gath-
ered into the A j vector required for the analysis. Forces not at the nodes shall be
converted into equivalent nodal loads and combined with the A j s, as discussed in
Section 2.2.1 and demonstrated in Example 2.3.
Step 3: Gather the unassembled structure flexibility matrix FM for each member
in the given structure, as discussed in Section 3.1.1.
Step 4: Determine the action transformation matrix BMS . For a structure having
M member actions and S(= j + q) external (structure) actions, BMS would be an
M by S matrix. The coefficients of this matrix are computed by setting each As on
the primary structure to a unit value and computing the member actions AM from
equilibrium equations. For example, set A j1 = 1 and compute all member forces of
the primary structure bi1 (for i = 1 to m) and fill the first column of the BMS matrix,
etc. The determination of the BMS matrix is schematically shown in Figure 3.6.
Step 5: Compute the assembled structure flexibility matrix Fs using Equation
(3.12) and then partition the same into the four components FJJ , FJQ , FQJ and FQQ
based on the number of D j s and Aq s in the problem.

FIGURE 3.6 Action Transformation Matrix, BMS .

@seismicisolation
@seismicisolation
The Formalized Methods 89

Step 6: Solve for the unknown redundant actions Aq using Equation (3.16). Then
compute the member actions using Equation (3.12) and the nodal displacements us-
ing Equation (3.13). The remaining support reactions of the given structure are then
determined using equilibrium equations.

3.1.4 EXAMPLES
Example 3.1 Analyze the plane truss structure shown in Figure 3.7(a) using the
formalized flexibility method. All members have cross-sectional-area A = 5000 mm2
and E = 120 GPa, and let P1 = 60 kN and P2 = 80 kN.

FIGURE 3.7 (a) Plane truss and (b) Primary Structure with All Parameters Labeled.

@seismicisolation
@seismicisolation
90 Matrix Structural Analysis and the Finite Element Methods

SOLUTION
Step 1: The truss is statically indeterminate to the second degree. Hence, removing
two of the action components can create a primary structure. The nodes and members
are numbered 2 ; the roller support at node-4 and member 5 are removed to create a
primary structure. As shown in Figure 3.7(b), the four free-joint displacements (DJ1
to DJ4 ) and the two selected redundant actions (Aq1 and Aq2 ) on the given truss are
labeled, assumed positive in the direction indicated. The figure also shows how the
members are oriented, like member 1 runs from node-1 to node-2, member 4 runs
from node-4 to node-3, etc.
Step 2: The given nodal load vector A j of the structure is written as follows:
   
P1 60
 P2   80
   

Aj = 
 =  kN
 0   0
  

0 0

Given in line #32 of the Scilab/Octave code at the end.

Step 3: Each member of the truss has a flexibility coefficient (a 1 × 1 matrix)


given by Equation (3.2). Thus, the unassembled structure flexibility matrix FM of the
truss is thus given by:
 
L1 0 0 0 0 0 2 0 0 0 0 0
 
0 L 0 0 0 0  √ 
 2  0 2 2 0 0 0 0
   
0 0 L 0 0 0 0 0 2 0 0 0
 
1  3
 1  
FM = × = × √  m/kN
  
EA  0 0 0 L4 0 0  EA 0 0 0 2 2 0 0


   
 0 0 0 0 L5 0 
 
0 0 0 0 2 0


0 0 0 0 0 L6 0 0 0 0 0 2

Given in line #11–14 of the Scilab/Octave code at the end.

Step 4: The action-transformation matrix (BMS ) is determined by exerting a unit


value of each of the AJ s and Aq s on the primary structure and then computing the
corresponding member actions. The computed member actions are conventionally
assumed to be positive if there is tension. This operation is best shown as in Table
3.1.
2 Node numbers are circled while member numbers are inside a rectangle.

@seismicisolation
@seismicisolation
The Formalized Methods 91

TABLE 3.1
Action Transformation Matrix for the 6 Bars Truss
Member AJ1 = 1 AJ2 = 1 AJ3 = 1 AJ4 = 1 Aq1 = 1 Aq2 = 1

Am1 0 0 0 1 0 1
√ √
Am2 2 0 0 0 0 − 2
Am3 0 0 1 0 1 1
√ √
Am4 0 0 0 0 − 2 − 2
Am5 0 0 0 0 0 1
Am6 −1 1 0 0 0 1

The corresponding action transformation matrix BMS becomes as shown below.

 
0 0 0 1 0 1
√ √ 
 2
 0 0 0 0 − 2

 0 0 1 0 1 1 
 
BMS =  √ √ 
 0 0 0 0 − 2 − 2
 
 
 0 0 0 0 0 1 
 
−1 1 0 0 0 1

Given in line #17–22 of the Scilab/Octave code at the end.

Step 5: The assembled structure flexibility matrix FS is computed to be:


FS = BTMS × FM × BMS

7.657 −2.0 0 0 0 −7.657


 
 −2.0 2.0 0 0 0 2.0 
 
 
 0
1  0 2.0 0 2.0 2.0 
⇒ FS = ×  m/kN

EA  0 0 0 2.0 0 2.0 
 
 0 0 2.0 0 7.657 7.657 
 

−7.657 2.0 2.0 2.0 7.657 19.314

Given in line #25 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
92 Matrix Structural Analysis and the Finite Element Methods

The Fs matrix is then partitioned into four components as follows:

 
7.657 −2.0 0 0 0 −7.657
 
 −2.0
 
2.0 0 0 0 2.0 
   
 
fjj f jq  0 0 2.0 0 2.0 2.0 
Fs =  =



fq j fqq  0 0 0 2.0 0 2.0 
 
 
 0 0 2.0 0 7.657 7.657 
 
−7.657 2.0 2.0 2.0 7.657 19.314

Given in line #28–29 of the Scilab/Octave code at the end.

Step 6: Now the problem is ready to be solved, and since Dq = 0, the redundant
actions Aq are obtained as shown below.
−1
Aq = − fqq × fq j × A j

 
" #!−1 " # 60
1 7.657 7.657 1 0 0 2 0  80 
Aq = × ×
 0 

EA 7.657 19.314 EA −9.657 2 2 2
0
" # " #
Aq1 −35.98 kN
⇒ = ANS
Aq2 35.98 kN

Given in line #35 of the Scilab/Octave code at the end.

The reaction at the roller support is to the left (−35.98 kN), in contrast to the
initial assumption; however, the force in the top chord member is tension (35.98 kN).
Once the redundant actions Aq are determined, all the other unknowns can be
easily computed as follows.
The complete structure actions As is found by augmenting A j and Aq as follows:

@seismicisolation
@seismicisolation
The Formalized Methods 93

60
 

 80  
 
"
Aj
# 
 0 

As = =  kN
 
0
Aq 



 
 −35.98
 

35.98

Given in line #38 of the Scilab/Octave code at the end.

The member actions (forces) Am are obtained using Equation (3.10) as follows:

   
0 0 0 1 0 1 60
 √ √   
− 2  
   
 2 0 0 0 0 80 
   
   
 0 0 1 0 1 1   0 
Am = Bms × As =  √ √  
 ×  
0 − 2 − 2  
 
 0 0 0 0 
   
1   −35.98 
   
 0 0 0 0 0
   
−1 1 0 0 0 1 35.98
   
Am1 −24.02
   
   
 Am2   33.97 
   
   
 Am3   0 
⇒

=
 
 kN

 Am4   0 
   
   
 Am5   35.98 
   
Am6 55.98

Given in line #41 of the Scilab/Octave code at the end.

Finally, the structure nodal displacements Ds are computed using Equation


(3.13) as follows:

@seismicisolation
@seismicisolation
94 Matrix Structural Analysis and the Finite Element Methods

Ds = Fs × As
   
7.657 −2.0 0 0 0 −7.657 60
   
 −2.0
   
2.0 0 0 0 2.0   80 
   
   
1  0 0 2.0 0 2.0 2.0   0 
= × × 
EA 
 0 0 0 2.0 0
 
2.0   0


   
7.657   −35.98 
   
 0 0 2.0 0 7.657
   
−7.657 2.0 2.0 2.0 7.657 19.314 35.98

Using the given numerical values of E and A, the displacement vector Ds is ob-
tained as follows.
   
D j1 0.1199
   
   
 D j2   0.1866 
" #     
Dj  
 D j3   0


⇒ Ds = = =  mm
 D j4   −0.0801 
   
Dq
   
   
 Dq1   0 
   
Dq2 0

Given in line #44 of the Scilab/Octave code at the end.

The support reactions at nodes 1 and 2 can also be computed using equilibrium
equations. The complete analysis result is shown in Figure 3.8, and the correspond-
ing Octave code is given below.

The corresponding Octave code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 % Example 3.1 - Plane truss with three bars
2 % Formalized Flexibility Method
3

4 % Common units used for analysis: Force in kN, Length in m


5

6 % Given parameters constants:


7 P1 = 60; P2 = 80; E = 120e6; A = 5e-3;
8 % in kN, kN, kN-m^2, m^2
9 sq = sqrt(2)
10 % member lengths in m

@seismicisolation
@seismicisolation
The Formalized Methods 95

FIGURE 3.8 Analysis Result of the Plane Truss.

11 L = [2 2*sq 2 2*sq 2 2]
12 EA = E*A
13 % Unassembled structure flexibility, FM in m/kN
14 FM = diag(L)/EA
15

16 % Action-transformation matrix Bms


17 Bms = [-1 0 0 1 0 1
18 sq 0 0 0 0 -sq
19 0 0 1 0 1 1
20 0 0 0 0 -sq -sq
21 0 0 0 0 0 1
22 -1 1 0 0 0 1]
23

24 % Assembled structure flexibility matrix FS, in m/kN


25 FS = Bms'*FM*Bms % kN tension
26

27 % Partitioning
28 fjj = FS(1:4,1:4); fqq = FS(5:6,5:6);
29 fjq = FS(1:4,5:6); fqj = FS(5:6,1:4);
30

31 % Applied structure action vector Aj @ Djs (free joints)


32 Aj = [P1; P2; 0; 0]
33

34 % The redundant actions are

@seismicisolation
@seismicisolation
96 Matrix Structural Analysis and the Finite Element Methods

35 Aq = -inv(fqq)*fqj*Aj
36

37 % Complete Structure Actions As, in kN


38 As = [Aj;Aq]
39

40 % Member actions Am, in kN


41 Am = Bms*As
42

43 % Structure displacements Ds, in mm


44 Ds = FS*As*1e3
45

46 % END: ........... Example 3.1

Example 3.2 Analyze the beam shown in Figure 3.9 using the formalized flexibility
method. Use E = 29,000 ksi.

SOLUTION
Step 1: The beam is statically indeterminate to the second degree. A primary struc-
ture is created by removing two of the action components. In this example, the roller
supports at nodes 2 and 3 are removed to create a primary structure.
As shown in Figure 3.10(a), the two rotations at the roller supports are the free-
joint displacements of the beam (DJ1 and DJ2 ), and the redundant actions (Aq1 and
Aq2 ) on the beam are labeled. The two beam member actions and their orientations
are also shown in Figure 3.10(b). The actions AM11 and AM12 are the shear force
and bending moment on member 1 just to the left of the roller support at node-2;
likewise, AM21 and AM22 are the shear force and bending moment on member 2 just
to the left of node-3. AMi j refers to the action on member i along its jth DOFs due to
the respective external unit action (A j = 1 or Aq = 1).

FIGURE 3.9 Statically Indeterminate Beam.

@seismicisolation
@seismicisolation
The Formalized Methods 97

FIGURE 3.10 (a) Primary Structure of the Beam, (b) Member Actions Am and (c)
Fixed-Beam to Convert Member Forces to Equivalent-Nodal Load A j .

TABLE 3.2
Fixed-End-Actions on the Beam
Node 1 2L 2R 3

V F (k) 45 45 75 51
M F (k ft) 225 −225 350 −250

Aj −( 350 − 250 ) = −125 −(−250) = 250

Step 2: The fixed-end actions are given in Table 3.2. Accordingly, the member
fixed-end-action components AFm the (equivalent) nodal load vector A j which are the
negative of the fixed-end-actions are determined as follows.
" #
−125
Aj = k ft
250
 
45 k
 −225 k f t 
 
AFm =  

 51 k 

−250 k f t

Given in line #37–47 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
98 Matrix Structural Analysis and the Finite Element Methods

Step 3: The flexibility matrices of the two beam elements are computed below
using Equation (3.3).

L13 L12 L23 L22


   
 3EI1 2EI1   3EI2 2EI2 
Fm1 =   and Fm2 = 
   

 L2 L1   L2 L2 
1 2
2EI1 EI1 2EI2 EI2
The unassembled structure flexibility matrix FM of the beam is thus given by:
 3
L12

L1
 3EI1 2EI1 0 0 
 
 
 L2 L1 
1
0 0
" #   
Fm1 0  2EI1 EI1


FM = =  
0 Fm2  L23 2
L2 

 0 0 

 3EI2 2EI2  
 
 L22 L2 
0 0
2EI2 EI2

Given in line #16–21 of the Scilab/Octave code at the end.

Step 4: The action-transformation matrix (BMS ) is determined by exerting a unit


value of each of the AJ s and Aq s on the primary structure and then computing the
corresponding member actions. This operation is best performed as shown in Table
3.3.

TABLE 3.3
Action Transformation Matrix for the Beam
Member A j1 = 1 A j2 = 1 Aq1 = 1 Aq2 = 1

Am11 0 0 1 1
Am12 1 1 0 L2
Am21 0 0 0 1
Am22 0 1 0 0

The action transformation matrix for the beam is given as follows.

@seismicisolation
@seismicisolation
The Formalized Methods 99
  
0 0 1 1 0 0 1 1
1 1 0 L2  1 1 0 30
   
BMS = 
0
= 
 0 0 1  0
 0 0 1
0 1 0 0 0 1 0 0

Given in line #24–27 of the Scilab/Octave code at the end.

Step 5: The assembled structure flexibility matrix FS is computed to be:


FS = BTMS × FM × BMS
 
0.3724 0.3724 5.5862 16.7586
 0.3724 0.6207 5.5862
20.4828 
 
⇒ FS = 10−3 ×   5.5862

 5.5862 111.7241 279.3103
16.7586 20.4828 279.3103 856.5517

The Fs matrix is then partitioned into four components as follows:

Given in line #30 of the Scilab/Octave code at the end.

 
0.3724 0.3724 5.5862 16.7586
 
   
 0.3724 0.6207 5.5862 20.4828 
fjj f jq
 = 10−3 × 
 
Fs =  


fq j fqq  5.5862 5.5862 111.7241 279.3103
 
 
16.7586 20.4828 279.3103 856.5517

Given in line #33–34 of the Scilab/Octave code at the end.

Step 6: The redundant actions Aq are solved as shown below:


−1
Aq = − fqq × fq j × A j
" # " #
Aq1 13.79
⇒ = kips ANS
Aq2 −8.64

Given in line #50 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
100 Matrix Structural Analysis and the Finite Element Methods

The complete structure actions As is found by augmenting A j and Aq as follows:


 
−125 k f t
" # 
Aj  250 k f t 

As = =  13.79 k 

Aq  
−8.64 k

Given in line #53 of the Scilab/Octave code at the end.

The structure nodal displacements Ds are computed using Equation (3.13) as


follows:
   
D j1 −0.011 rad
   
   
 D j2   0.021 rad 
Ds =   = Fs × As =  
   
 Dq1   0 
   
Dq2 0

Given in line #56 of the Scilab/Octave code at the end.

Since the members are subjected to some loading between nodes, the member
actions Am obtained from Equation (3.10) must be modified to include the fixed-end-
action parts, as shown below.

     
45 0 0 1 1 −125
     
−225
     
F
   1 1 0 30   250 
Am = Am + Bms × As = 
 +
 
×
 


 47.67   0 0 0 1   13.79 
     
−250 0 1 0 0 −8.64
   
Am11 50.88 k
   
  −342.65 k f t
   
 Am12 
 = 
   
 Am21   39.58 k 
   
Am22 0

Given in line #59 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
The Formalized Methods 101

FIGURE 3.11 Analysis Result of the Beam.

Finally, the complete analysis result is shown in Figure 3.11.

The corresponding Scilab code used to analyze the two-span beam using the for-
malized flexibility method is given below.

Scilab/Octave Code
1 // Example 3.2 - 2-span Beam
2 // Formalized Flexibility Method
3

4 // Common units for analysis: Force in kips, Length in ft


5

6 // Given parameters constants:


7 w = 3; E = 29000*144; // in k/ft, k/ft^2
8 P = 36; a = 5; b = 30 - a // in k, ft, ft
9 I = [400 600]/(12^4); // in k/ft^2, ft^4, ft^4
10 L = 30; // in ft
11 nm = 2; // number of members
12

13 EI = E*[I(1) I(2)]
14

15 // Member flexibility equation


16 fm1 = [L^3/3 L^2/2;L^2/2 L]/EI(1);
17 fm2 = [L^3/3 L^2/2;L^2/2 L]/EI(2);
18 // Unassembled structure flexibility
19 FM = zeros(4,4); // Initialize FM with 0s
20 FM(1:2,1:2) = fm1; // Put member flexibility
21 FM(3:4,3:4) = fm2; // along the diadonal
22

23 // Action-transformation matrix Bms


24 Bms = [0 0 1 1
25 1 1 0 30
26 0 0 0 1
27 0 1 0 0]
28

@seismicisolation
@seismicisolation
102 Matrix Structural Analysis and the Finite Element Methods

29 // Assembled structure flexibility matrix FS


30 FS = Bms'*FM*Bms
31

32 // Partitioning
33 fjj = FS(1:2,3:4); fqq = FS(3:4,3:4);
34 fjq = FS(1:2,3:4); fqj = FS(3:4,1:2);
35

36 // Fixed-end actions equations


37 V11 = w*L/2; V12 = V11; // member 1 shear
38 M11 = w*L^2/12; M12 = -M11; // member 1 moment
39 vp1 = P*b^2*(L+2*a)/L^3; vp2 = P*a^2*(L+2*b)/L^3;
40 V21 = V11+vp1; V22 = V11+vp2; // member 2 shear
41 mp1 = P*a*b^2/L^2; mp2 = -P*a^2*b/L^2;
42 M21 = M11+mp1; M22 = -M11+mp2; // member 2 moment
43 // Fixed-end actions along Am11, Am12, Am21, Am22
44 Amf = [V12; M12; V22; M22];
45

46 // Applied structure action vector Aj @ Djs (free joints)


47 Aj = -[M12+M21;M22]
48

49 // The redundant actions are


50 Aq = -inv(fqq)*fqj*Aj
51

52 // Complete Structure Actions As, in k-ft


53 As = [Aj;Aq]
54

55 // Structure displacements Ds, in rad


56 Ds = clean(FS*As)
57

58 // Member actions Am, in k and k-ft


59 Am = Amf+Bms*As
60

61 // Remaining reactions using equilibrium


62 R3 = Am(3)
63 R2 = Am(1) + (P + w*L - R3)
64 R1 = P + 2*w*L - R2 - R3
65 M1 = 2*w*L^2 + P*(L+5) - R2*L - R3*2*L
66

67 // END: ........... Example 3.2

Example 3.3 Analyze the plane frame shown in Figure 3.12 using the formalized
flexibility method. Let P1 = 40 kN, P2 = 70 kN, M1 = 35 kN m, M2 = 30 kN m, L =
2 m. Use E = 72 GPa, I = 120e6 mm4 and A = 6000 mm2 for all members.

@seismicisolation
@seismicisolation
The Formalized Methods 103

FIGURE 3.12 Plane Frame Having Three-Members.

SOLUTION
Step 1: The plane frame is statically indeterminate to the first degree. A primary
structure is created by removing the roller reaction, as shown in Figure 3.13(a).
The figure also shows the eight free-joint displacements on the frame (DJ1 to DJ11 ),
and the only redundant action Aq1 properly labeled. The four member actions and
their orientations are also shown in Figure 3.13(b); the actions AMi1 , AMi2 and AMi3
being the axial force, shear force and bending moment in member i at its second
node. Note that the horizontal member is divided into two elements at the point of
application of the downward vertical force P2 . This is just to avoid having to deal
with the computation of fixed-end-actions and equivalent nodal load vector, etc.
Step 2: The nodal load vector A j is given as follows.
 
40
 0 
 
 
 −65 
 
 
 0 
 
 −100 
 
 
Aj =  0 
 
 
 0 
 
 
 0 
 
 
 80 
 
 0 
 

0
@seismicisolation
@seismicisolation
104 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.13 (a) Primary Structure and (b) Member Actions of the Plane Frame.

Given in line #64 of the Scilab/Octave code at the end.

Step 3: The flexibility matrices of each frame element are computed using Equa-
tion (3.4), as shown below.
 
Li
 EAi 0 0 
 
Li3 Li2 
 
fmi =  0



 3EIi 2EIi 

 Li2 Li 
0
2EIi EIi

@seismicisolation
@seismicisolation
The Formalized Methods 105

Given in line #28–39 of the Scilab/Octave code at the end.

The unassembled structure flexibility matrix FM of the plane frame is a 12 × 12


matrix given in Table 3.4.

Given in line #42–47 of the Scilab/Octave code at the end.

Step 4: The action-transformation matrix (BMS ) is determined by exerting on the


primary structure a unit value of each of the AJ s and Aq s and then computing the
corresponding member actions. This operation is prepared as shown in Table 3.5.

Given in line #54 of the Scilab/Octave code at the end.

Step 5: The assembled structure flexibility matrix FS is computed using the fol-
lowing equation:

FS = BTMS × FM × BMS

Fs is obtained to be as given in Equation (3.17).

@seismicisolation
@seismicisolation
106
TABLE 3.4
Unassembled Structure Flexibility Matrix for the Plane Frame
 
0.0069 0 0 0 0 0 0 0 0 0 0 0
 
 

 0 1.0417 0.5208 0 0 0 0 0 0 0 0 0 

 
 

 0 0.5208 0.3472 0 0 0 0 0 0 0 0 0 

Matrix Structural Analysis and the Finite Element Methods


 
 
 0 0 0 0.0046 0 0 0 0 0 0 0 0 
 
 
0 0 0 0 0.3086 0.2315 0 0 0 0 0 0
 
 
 
0 0 0 0 0.2315 0.2315 0 0 0 0 0 0
 
 
FM = 10−3 × 
 


 0 0 0 0 0 0 0.0046 0 0 0 0 0 

 
 

 0 0 0 0 0 0 0 0.3086 0.2315 0 0 0 

 
 
 0 0 0 0 0 0 0 0.2315 0.2315 0 0 0 
 
 
0 0 0 0 0 0 0 0 0 0.0065 0 0
 
 
 
 

 0 0 0 0 0 0 0 0 0 0 0.8730 0.4630 

 
0 0 0 0 0 0 0 0 0 0 0.4630 0.3274

@seismicisolation
@seismicisolation
The Formalized Methods
TABLE 3.5
Action Transformation Matrix for the Plane Frame

A j1 A j2 A j3 A j4 A j5 A j6 A j7 A j8 A j9 A j10 A j11 Aq1


√ √
Am11 0 1 0 0 1 0 0 1 0 2/2 0 2/2
√ √
Am12 −1 0 0 −1 0 0 −1 0 0 − 2/2 0 2/2
√ √
Am13 0 0 1 0 2 1 0 4 1 4 2 1 2 2
√ √
Am21 0 0 0 1 0 0 1 0 0 2/2 0 − 2/2
√ √
Am22 0 0 0 0 1 0 0 1 0 2/2 0 2/2
√ √
Am23 0 0 0 0 0 1 0 2 1 3 2 1 2
√ √
Am31 0 0 0 0 0 0 1 0 0 2/2 0 − 2/2
√ √
Am32 0 0 0 0 0 0 0 1 0 2/2 0 2/2

Am33 0 0 0 0 0 0 0 0 1 2 2 1 0
Am41 0 0 0 0 0 0 0 0 0 0 0 −1
Am42 0 0 0 0 0 0 0 0 0 1 0 0
Am43 0 0 0 0 0 0 0 0 0 0 1 0

107
@seismicisolation
@seismicisolation
108
 
1.042 0 −0.521 1.042 −1.042 −0.521 1.042 −2.083 −0.521 −2.210 −0.521 −2.210
 
 0 0.007 0 0 0.007 0 0 0.007 0 0.005 0 0.005 
 

 −0.521 0 0.347 −0.521 0.694 0.347 −0.521 1.389 0.347 1.596 0.347 1.350 

Matrix Structural Analysis and the Finite Element Methods


 

 1.042 0 −0.521 1.046 −1.042 −0.521 1.046 −2.083 −0.521 −2.206 −0.521 −2.213 

 

 −1.042 0.007 0.694 −1.042 1.704 0.926 −1.042 3.556 0.926 4.397 0.926 3.251 

−0.521 0 0.347 −0.521 0.926 0.579 −0.521 2.083 0.579 2.742 0.579 1.841 
 
FS = 10−3 × 



 1.042 0 −0.521 1.046 −1.042 −0.521 1.051 −2.083 −0.521 −2.203 −0.521 −2.216 

 

 −2.083 0.007 1.389 −2.083 3.556 2.083 −2.083 8.032 2.315 10.753 2.315 7.152 

 

 −0.521 0 0.347 −0.521 0.926 0.579 −0.521 2.315 0.810 3.560 0.810 2.005 

−2.210 0.005 1.596 −2.206 4.397 2.742 −2.203 10.753 3.560 16.988 4.023 9.162 
 

 

 −0.521 0 0.347 −0.521 0.926 0.579 −0.521 2.315 0.810 4.023 1.138 2.005 

−2.210 0.005 1.350 −2.213 3.251 1.841 −2.216 7.152 2.005 9.162 2.005 6.631
(3.17)

@seismicisolation
@seismicisolation
The Formalized Methods 109

Given in line #57 of the Scilab/Octave code at the end.

The Fs matrix is then partitioned into four components as follows:


 
f j j f jq
Fs =  
fq j fqq

Given in line #60–61 of the Scilab/Octave code at the end.

Step 6: The single redundant action Aq 1 is solved as shown in the following


equation.
−1
Aq = − fqq × fq j × A j
 
⇒ Aq1 = [−45.604] kN ANS

Given in line #67 of the Scilab/Octave code at the end.

The complete structure actions As is found by augmenting A j and Aq as follows:


 
40
 
 0 
 
 −65 
 
 

 0 

 
 −100 
" #  
Aj 0
 
 
As = = 
Aq  0 

 

 0 

 

 80 

0
 
 
 

 0 

−45.604

Given in line #70 of the Scilab/Octave code at the end.

The structure nodal displacements Ds are computed using Equation (3.13), as


shown below; the linear displacements are in m while the rotational ones are in
radian.

@seismicisolation
@seismicisolation
110 Matrix Structural Analysis and the Finite Element Methods
   
0.016187 D j1
   
−0.000262  
   
 D j2 
   
−0.009458  
   
 D j3 
   
   
 0.016037   D j4 
   
−0.008902  
   
 D j5 
   
   
 0.003725   D j5 
Ds = Fs × As = 

⇐
 


 0.015888   D j7 
   
   
 0.015468   D j8 
   
   
 0.018151   D j9 
   
   
 0.073510   D j10 
   
   
 0.018151   D j11 
   
0. Dq1

Given in line #73 of the Scilab/Octave code at the end.

Since there are no fixed-end actions, the member actions Am are obtained from
Equation (3.10), as shown below.
   
−37.68 kN Am11
   
 −7.68 kN   Am12 
   
   
 −15.72 kN · m   Am13 
   
   
 −32.32 kN   Am21 
   
   
 −37.68 kN   Am22 
   
   
 94.63 kN · m   Am23 
   
Am = Bms × As =  
⇐
  
 −32.32 kN   Am31 

   
   
 32.32 kN   Am32 
   
 30. kN · m   Am33 
   
   
 −45.7 kN   Am41 
   
   
   
 0   Am42 
   
0 Am43

@seismicisolation
@seismicisolation
The Formalized Methods 111

FIGURE 3.14 Analysis Result for the Plane Frame.

Given in line #76 of the Scilab/Octave code at the end.

Finally, the complete analysis result is shown in Figure 3.14.


The corresponding Scilab code showing all the solution steps is given in the fol-
lowing code listing.

Scilab/Octave Code
1 // Example 3.3 - Plane frame having four members
2 // Formalized Flexibility Method
3

4 // clear all user variables and also the screen


5 clear all; clc;
6

7 // Common units used for analysis: Force in kN, Length in m


8

9 // Given parameters & constants in appropriate units:


10 E = 72e6; // in kN/m^2
11 A = 6e-3; I = 120e-6; // in m^2, m^4
12 P1 = 40; P2 = 70; // in kN
13 M1 = 35; M2 = 30; // in kN-m
14

15 // Member lengths
16 Ls = [3, 2, 2, 2*sqrt(2)] // in m
17

18 EA = E*A; EI = E*I; // in kN and kN/m^2


19

20 // A plane frame member has 3-DOF @ the ends of the members

@seismicisolation
@seismicisolation
112 Matrix Structural Analysis and the Finite Element Methods

21 // number of joints and members in the problem are nj, nm


22 DOF = 3;
23

24 // Number of members, free-joint displacements, redundants


25 nm = 4; nj = 11; nq = 1;
26

27 // Function to compute frame element flexibility matrix


28 function [fm] = flex_pf(L, EA, EI)
29 fm = [L/EA, 0, 0;
30 0 L^3/(3*EI) L^2/(2*EI);
31 0 L^2/(2*EI) L/EI];
32 endfunction
33

34 // Flexibility matrix of each member;


35 // calling the 'flex_pf' function with parameters
36 fm1 = flex_pf(Ls(1),EA,EI);
37 fm2 = flex_pf(Ls(2),EA,EI);
38 fm3 = flex_pf(Ls(3),EA,EI);
39 fm4 = flex_pf(Ls(4),EA,EI);
40

41 // Unassembled structure flexibility


42 FM = zeros(DOF*nm,DOF*nm); // Initialize FM with 0s
43 // Place each member flexibility along FM diagonal
44 st = 1; FM(st:st+2,st:st+2) = fm1;
45 st = st + DOF; FM(st:st+2,st:st+2) = fm2;
46 st = st + DOF; FM(st:st+2,st:st+2) = fm3;
47 st = st + DOF; FM(st:st+2,st:st+2) = fm4;
48

49 // Read from file the action transformation matrix.


50 // It shall be prepared according to Table 3.4,
51 // separating each element with a space
52 // The file for this example is named "Ex3.3-BMS.txt".
53 // Action-transformation matrix Bms
54 Bms = fscanfMat("Ex3.3-BMS.txt")
55

56 // Assembled structure flexibility matrix FS


57 FS = Bms'*FM*Bms
58

59 // Partitioning the FS matrix


60 fjj = FS(1:nj,1:nj); fjq = FS(1:nj,nj+1:nj+nq);
61 fqj = FS(nj+1:nj+nq,1:nj); fqq = FS(nj+1:nj+nq,nj+1:nj+nq);
62

63 // Applied structure action vector Aj along Djs


64 Aj = [P1;0;-M1;0;-P2;0;0;0;M2;0;0];
65

@seismicisolation
@seismicisolation
The Formalized Methods 113

66 // The redundant actions are


67 Aq = -inv(fqq)*fqj*Aj
68

69 // Complete Structure Actions As, in k-m


70 As = [Aj;Aq]
71

72 // Structure displacements Ds, in rad


73 Ds = clean(FS*As)
74

75 // Member actions Am, in kN and kN-m


76 Am = Bms*As
77

78 // Other ractions are computed using equilibrium equations


79

80 // END: ........... Example 3.3

Example 3.4 Analyze the three members grid structure shown in Figure 3.15 using
the formalized flexibility method. All members have E = 29,000 ksi, G = 11,500 ksi;
I = 1350 in4 and J = 250 in4 .

SOLUTION
Step 1: The grid frame is statically indeterminate to the sixth degree. A primary
structure is created by removing two of the fixed supports, as shown in Figure 3.16(a).
The figure also shows the three free-joint displacements on the grid (D j1 to D j3 ) and
the redundant actions (Aq1 to Aq6 ) properly labeled. The member actions and their
orientations are also shown in Figure 3.16(b); the actions AMi1 , AMi2 and AMi3 are

FIGURE 3.15 Grid Structure Having Three-Members.

@seismicisolation
@seismicisolation
114 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.16 (a) Primary Structure and (b) Member Actions of the Grid Structure.

the shear force, twisting moment and bending moment in member i at its second
node, respectively.
Step 2: The fixed-end actions for the two members that are loaded is computed in
Table 3.6. Thus, the nodal load vector AFM and member fixed-end-action components
Am s given as follows.

TABLE 3.6
Fixed-End-Actions on the Members of the Grid Structure
Member 1 3

Joint 1 2 1 4

V F (k) 3 3 1.616 0.544


M F (k f t) 12.5 −12.5 3.694 −2.138

@seismicisolation
@seismicisolation
The Formalized Methods 115

−24.616
 

A j =  −3.694 
 

12.5

Given in line #61 of the Scilab/Octave code at the end.

 
3k
 

 0 

 −12.5 k f t
 

 

 0 

F
 
Am = 
 0 

 
 0 
 
 0.544 k f t
 

 

 0 

−2.138

Given in line #53–58 of the Scilab/Octave code at the end.

Step 3: The flexibility matrices of each frame element are computed using Equa-
tion (3.5) as shown below.

Li3 Li2
 
 3EIi 0
 2EIi 

Li
 
fmi =  0
 


 GJi 

 L2 Li 
i
0
2EIi EIi

Given in line #21–25 of the Scilab/Octave code at the end.

The unassembled structure flexibility matrix FM of the grid structure is a 9 × 9


matrix, as shown below.

@seismicisolation
@seismicisolation
116 Matrix Structural Analysis and the Finite Element Methods

Fm = 10−3
 
19.157 0 1.149 0 0 0 0 0 0
 

 0 1.252 0 0 0 0 0 0 0 

 1.149 0 0.092 0 0 0 0 0 0
 

 

 0 0 0 30.384 0 1.563 0 0 0 

 
×
 0 0 0 0 1.46 0 0 0 0 

 
 0 0 0 1.563 0 0.107 0 0 0 
 
0 0 0 0 0 0 4.138 0 0.4138
 
 
 

 0 0 0 0 0 0 0 0.7513 0 

0 0 0 0 0 0 0.4138 0 0.0552

Given in line #28–37 of the Scilab/Octave code at the end.

Step 4: Action-transformation matrix (BMS ) is determined by exerting a unit


value of each of the AJ s and Aq s on the primary structure and then computing the
corresponding member actions. This operation is best prepared, as shown in Table
3.7.

Given in line #43 of the Scilab/Octave code at the end.

TABLE 3.7
Action Transformation Matrix for the Grid Structure
A j1 A j2 A j3 Aq1 Aq2 Aq3 Aq4 Aq5 Aq6
Am11 −1 0 0 −1 0 0 −1 0 0
Am12 0 −1 0 −15 0 −1 −15 −0.8575 −0.5145
Am13 25 0 1 25 1 0 0 0.5145 −0.8575
Am21 0 0 0 0 0 0 1 0 0
Am22 0 0 0 0 0 0 0 1 0
Am23 0 0 0 0 0 0 0 0 1
Am31 0 0 0 1 0 0 0 0 0
Am32 0 0 0 0 1 0 0 0 0
Am33 0 0 0 0 0 1 0 0 0

@seismicisolation
@seismicisolation
The Formalized Methods 117

Step 5: The assembled structure flexibility matrix FS is computed using the fol-
lowing equation:
FS = BTMS × FM × BMS

Given in line #46 of the Scilab/Octave code at the end.

The Fs matrix is then partitioned into four components as follows:


 
fjj f jq 
Fs = 



fq j fqq

Given in line #49–50 of the Scilab/Octave code at the end.

Step 6: The redundant actions vector Aq s is obtained as shown below:


−1
Aq = − fqq × fq j × A j

18.63 k
 
 2.87 k f t 
 
 
−239.20 k f t 
⇒ Aq =   ANS
 
 −1.01 k 
 
 −2.47 k f t 
 

−28.87 k f t

Given in line #66 of the Scilab/Octave code at the end.

Note that this result is due to the joint displacements Dj alone; for the final sup-
port reactions, the fixed-end action components need to be included. The complete
structure actions vector As is found by augmenting A j and Aq as follows:

@seismicisolation
@seismicisolation
118 Matrix Structural Analysis and the Finite Element Methods
 
−24.62
 

 −3.69 
12.50 
 

 
" #  18.6249 
Aj
 
 
As = = 2.87 
Aq  
−239.20 
 

 
−1.01 
 

 

 −2.47 
−28.87

Given in line #69 of the Scilab/Octave code at the end.

The structure nodal displacements Ds are computed using Equation (3.13), as


shown below; the linear displacements are in m while the rotational ones are in
radian.
   
−0.06045 D j1
   
   
 0.00549   D j2 
   
 −0.00215   D j3 
   
   
   
 0   Dq1 
   
Ds = Fs × As =  ⇐
   
0 D 
  q2 
 

   
 0   Dq3 
   
   
0 D 
  q4 
  

   
 0   Dq5 
   
0 Dq6

Given in line #72 of the Scilab/Octave code at the end.

The member actions Am are obtained by adding the fixed-end actions to the value
computed from Equation (3.10), as shown below.

@seismicisolation
@seismicisolation
The Formalized Methods 119

Am = Am f + Bms × As
   
Am11 10 k
   
−4.38 k f t
   
 Am12   
   
−123.41 k f t 
   
 Am13  
   
−1.01 k
   
 Am21   
   
⇒  Am22  =  −2.47 k f t 
   
   
−28.87 k f t 
   
 Am23  
   
   
 Am31   19.17 k 
   
   
 Am32   2.87 k f t 
   
Am33 −241.34 k f t

Given in line #75 of the Scilab/Octave code at the end.

Finally, the complete analysis result is shown in Figure 3.17, and the correspond-
ing Scilab code is also given below.

Scilab/Octave Code
1 % Example 3.4 - 3-member Grid Structure
2 % Formalized Flexibility Method
3

4 % Common units for analysis: Force in kips, Length in ft


5

6 % Given parameters constants:

FIGURE 3.17 Analysis Result for the Grid Frame.

@seismicisolation
@seismicisolation
120 Matrix Structural Analysis and the Finite Element Methods

7 E = 29000*144; G = 11500*144; % in k/ft, k/ft^2


8 w = 0.24; P = 20; % in k/ft, k
9 I = 1350/(12^4); J = 250/(12^4); % in ft^4
10 Ls = [25,sqrt(25^2+15^2),15]; % in ft
11 a = 9; % ft, partially loaded
12 EI = E*I; GJ = G*J
13

14 % A grid member has 3-DOF; and 3 at each structure joints;


15 DOF = 3;
16

17 % Number of members, free-joint displacements, redundants


18 nm = 3; nj = 3; nq = 6;
19

20 % Function to compute grid element flexibility matrix


21 function [fm] = flex_grid(L, GJ, EI)
22 fm = [L^3/(3*EI) 0 L^2/(2*EI);
23 0 L/GJ 0;
24 L^2/(2*EI) 0 L/EI];
25 endfunction
26

27 % Unassembled structure flexibility


28 FM = zeros(DOF*nm,DOF*nm); % Initialize FM with 0s
29 % Flexibility matrix of each member is computed
30 % calling the 'flex_grid' function with parameters;
31 % member flexibility is placed in FM along the diagonal
32 start_at = 1 % begin at Member 1
33 st = start_at; % shorter name
34 for i=1:nm
35 FM(st:st+2,st:st+2) = flex_grid(Ls(i),GJ,EI); % Member i
36 st += DOF;
37 endfor
38

39 % Read the action transformation matrix from a file.


40 % It shall be prepared according to Table 3.4.
41 % The file for this example is named "Ex3.4-BMS.txt".
42 % Action-transformation matrix Bms
43 Bms = load("Ex3.4-BMS.txt")
44

45 % Assembled structure flexibility matrix FS


46 FS = Bms'*FM*Bms
47

48 % Partitioning the FS matrix


49 fjj = FS(1:nj,1:nj); fqq = FS(nj+1:nj+nq,nj+1:nj+nq);
50 fjq = FS(1:nj,nj+1:nj+nq); fqj = FS(nj+1:nj+nq,1:nj);
51

@seismicisolation
@seismicisolation
The Formalized Methods 121

52 % Fixed-end actions equations


53 V11 = w*Ls(1)/2; V12 = V11; % member 1 shear
54 M11 = w*Ls(1)^2/12; M12 = -M11; % member 1 moment
55 M31 = w*a^2*(6*Ls(3)^2-8*a*Ls(3)+3*a^2)/(12*Ls(3)^2);
56 M32 = -w*a^3*(4*Ls(3)-3*a)/(12*Ls(3)^2); % member 3 moment
57 V31 = (M31+M32+w*a*(Ls(3)-a/2))/Ls(3); % member 3 shear
58 V32 = w*a-V31;
59 % Fixed-end actions along member actions (Am's)
60 Amf = [V12;0; M12;0;0;0;V32;0; M32];
61

62 % Applied structure action vector Aj @ Djs (free joints)


63 Aj = [-(P+V11+V31);-M31;M11];
64

65 % The redundant actions are


66 Aq = -inv(fqq)*fqj*Aj
67

68 % Complete Structure Actions As, in k-m


69 As = [Aj;Aq]
70

71 % Structure displacements Ds, in rad


72 Ds = FS*As
73

74 % Member actions Am, in k and k-ft


75 Am = Amf+Bms*As
76

77 % Remaining reactions using equilibrium


78 V2 = Am(1)
79 T2 = Am(2)
80 M2 = Am(3)
81

82 % END: ........... Example 3.4

Example 3.5 Analyze the space frame structure shown in Figure 3.18(a) using the
formalized flexibility method. All members have E = 30 GPa, G = 12.5 GPa; Iy =
650e6 mm4 , Iz = 650e6 mm4 , J = 120e6 mm4 and A = 90,000 mm2 . Use P1 = 25 kN,
P2 = 10 kN, P3 = 80 kN, M1 = 30 kN m, M2 = 15 kN m and M3 = 25 kN m.

@seismicisolation
@seismicisolation
122 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.18 (a) Given Space Frame and (b) Corresponding Primary Structure.

SOLUTION
Step 1: The space frame is statically indeterminate to the third degree. A primary
structure is created by, for example, removing the pin-support at node-4, as shown
in Figure 3.18(b). The fifteen free-joint displacements on the frame (DJ1 to DJ15 ) are
shown properly labeled in Figure 3.19(a). The member actions and their orientations
are also shown in Figure 3.19(b); the member actions AMi s have six components: an
axial force, two shear forces, a twisting moment and two bending moments in mem-
ber i at the second node, respectively.

@seismicisolation
@seismicisolation
The Formalized Methods 123

FIGURE 3.19 Free-Joint Displacements of the Space Frame.

Step 2: There are no fixed-end actions for the space frame since all actions are
nodal loads. Thus, the structure joint actions vector A j is given by the following.

@seismicisolation
@seismicisolation
124 Matrix Structural Analysis and the Finite Element Methods
 
0
−P1 
 

 

 P2 
 

 0 
 

 M1 
0 
 

 

 0 
 
Aj = 
 0 
−P3 
 

 
M2 
 

 

 0 
 

 0 
 
 0 
 

 M3 
0

Given in line #66 of the Scilab/Octave code at the end.

Step 3: The flexibility matrices of each frame element is computed using Equation
(3.6) as shown below.
 
Li
 (EA) 0 0 0 0 0 
 i 

L 3 L 2 
i i
 
 0 0 0 0 

 3(EIz )i 2(EIz )i 

Li3 Li2
 



 0 0 0 0 
 3(EIy )i 2(EIy )i 
fmi =  
 Li 
 0 0 0 0 0 
 
 (GJ)i 
 2

 L i Li

 0 0 − 0 0 

 2(EIy )i (EIy )i 


 Li2 Li 

0 0 0 0
(EIz )i (EIz )i

Given in line #28–41 of the Scilab/Octave code at the end.

The unassembled structure flexibility matrix FM of the space frame is an 18 × 18


matrix given given in Equation (3.18).
@seismicisolation
@seismicisolation
The Formalized Methods
FM = 10−3 ×
 
0.011 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 
 0 50 0 0 0 25 0 0 0 0 0 0 0 0 0 0 0 0 
 
 
 0
 0 30 0 −15 0 0 0 0 0 0 0 0 0 0 0 0 0 

 
 0 0 0 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 
 
 0
 0 −15 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 

 
 0 25 0 0 0 16.67 0 0 0 0 0 0 0 0 0 0 0 0 
 
 
 0 0 0 0 0 0 0.007 0 0 0 0 0 0 0 0 0 0 0 
 
 0 0 0 0 0 0 0 14.81 0 0 0 11.11 0 0 0 0 0 0
 

 
 0 0 0 0 0 0 0 0 8.89 0 −6.67 0 0 0 0 0 0 0
 

 
 0 0 0 0 0 0 0 0 0 13.33 0 0 0 0 0 0 0 0
 

 
 0 0 0 0 0 0 0 0 −6.67 0 6.67 0 0 0 0 0 0 0
 

 
 0 0 0 0 0 0 0 11.11 0 0 0 11.11 0 0 0 0 0 0 
 
 
 0 0 0 0 0 0 0 0 0 0 0 0 0.011 0 0 0 0 0 
 
 
 0 0 0 0 0 0 0 0 0 0 0 0 0 50 0 0 0 25 
 
 
 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 30 0 −15 0 

 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20 0 0 
 
 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 −15 0 10 0 
(3.18)

 

125
0 0 0 0 0 0 0 0 0 0 0 0 0 25 0 0 0 16.67

@seismicisolation
@seismicisolation
126 Matrix Structural Analysis and the Finite Element Methods

Given in line #44–48 of the Scilab/Octave code at the end.

Step 4: Action-transformation matrix (BMS ) is determined by exerting on the pri-


mary structure a unit value of each of the AJ s and Aq s and then computing the cor-
responding member actions. This operation is best performed in a tabular format as
shown in Table 3.8.

Given in line #55 of the Scilab/Octave code at the end.

Step 5: The assembled structure flexibility matrix FS is computed using the fol-
lowing equation, the result is given in Equation 3.19.

FS = BTMS × FM × BMS

@seismicisolation
@seismicisolation
TABLE 3.8

The Formalized Methods


Action Transformation (BMS ) Matrix for the Space Frame Structure

A j1 A j2 A j3 A j4 A j5 A j6 A j7 A j8 A j9 A j10 A j11 A j12 A j13 A j14 A j15 Aq1 Aq2 Aq3


Am11 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
Am12 0 −1 0 0 0 0 0 −1 0 0 0 0 0 0 0 0 −1 0
Am13 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0
Am14 0 0 0 0 0 1 0 2 0 0 0 1 0 0 1 −3 2 0
Am15 0 0 0 0 −1 0 0 0 2 0 −1 0 0 −1 0 0 0 2
Am16 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 3
Am21 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0
Am22 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
Am23 0 0 0 0 0 0 0 −1 0 0 0 0 0 0 0 0 −1 0
Am24 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 3
Am25 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 −3 0 0
Am26 0 0 0 0 0 0 0 0 0 0 −1 0 0 −1 0 0 0 0
Am31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
Am32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Am33 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Am34 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
Am35 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

127
Am36 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0

@seismicisolation
@seismicisolation
128

0.462 0 0 0 0.231 0 0.462 0 −0.462 0 0.231 0

0 0.462 0 −0.231 0 0 0 0.462 0 −0.231 0 0



0 0 0.001 0 0 0 0 0 0.001 0 0 0





 0 −0.231 0 0.154 0 0 0 −0.231 0 0.154 0 0

 0.231
 0 0 0 0.154 0 0.231 0 −0.308 0 0.154 0

 0 0 0 0 0 2.000 0 4.000 0 0 0 2.000

Matrix Structural Analysis and the Finite Element Methods




 0.462
 0 0 0 0.231 0 0.462 0 −0.462 0 0.231 0

0 0.462 0 −0.231 0 4.000 0 8.598 0 −0.231 0 4.103



FS = 10−3 ×  −0.462 −0.308 −0.462 −0.410 ···

 0 0.001 0 0 0 0.753 0 0


 0 −0.231 0 0.154 0 0 0 −0.231 0 1.487 0 0
 0.231
 0 0 0 0.154 0 0.231 0 −0.410 0 0.256 0

0 0 0 0 0 2.000 0 4.103 0 0 0 2.103



−0.231 −0.231

 0 0 0.154 0 0 0 0 1.487 0 0


 0.231
 0 0 0 0.154 0 0.231 0 −0.410 0 0.256 0


 0 0 0 0 0 2.000 0 4.103 0 0 0 2.103
 0.462 0 0 0 0.231 −6.000 0.462 −12.308 −0.462 0 0.231 −6.308


−0.231 −0.231

 0 0.462 0 0 4.000 0 8.598 0 0 4.103

−0.462 −0.692 0.001 0.462 −0.308 0 −0.462 −0.692 0.753 4.462 −0.410 0

@seismicisolation
@seismicisolation
The Formalized Methods

0 0.231 0 0.462 0 −0.462

−0.231 0 0 0 0.462 −0.692 


0 0 0 0 0 0.001 


0.154 0 0 0 −0.231 0.462 


0 0.154 0 0.231 0 −0.308 


0 0 2.000 −6.000 4.000 0 


0 −0.462 

0 0.231 0 0.462


−0.231 0 4.103 −12.308 8.598 −0.692 


0 −0.410 0 −0.462 0 0.753 


1.487 0 0 0 −0.231 4.462 


0 0.256 0 0.231 0 −0.410 


0 0 2.103 −6.308 4.103 0 


1.641 0 0 0 −0.231 4.692 


0 −0.410 

0 2.256 0 0.231


0 0 2.256 −6.539 4.103 0 


0 0.231 −6.539 19.847 −12.308 −0.462 


−0.231 0 4.103 −12.308 8.599 −0.692 
(3.19)

129
4.692 −0.410 0 −0.462 −0.692 14.599

@seismicisolation
@seismicisolation
130 Matrix Structural Analysis and the Finite Element Methods

Given in line #58 of the Scilab/Octave code at the end.

The Fs matrix is then partitioned into four components as follows:


 
fjj f jq 
Fs = 



fq j fqq

Accordingly, the partitioned matrix fqq is 3 × 3 while fq j becomes 3 × 15, there


matrices are given below both divided by 1000.

19.8469 −12.3077 −0.4615


 

fqq = 10−3 × −12.3077 8.5994 −0.6923


 

−0.4615 −0.6923 14.5994

−6

0.4615 0 0 0 0.2308 0.4623
fq j = 10−3 × 0 0.4615 0 −0.2308 0 4 0 ...


−0.4615 −0.6923 0.0011 0.4615 −0.3077 0 −0.4615

−12.3077 −0.4615 −6.3077 −6.5385



0 0.2308 0 0.2308
8.5983 0 −0.2308 0 4.1026 −0.2308 0 4.1026 

−0.6923 0.7532 4.4615 −0.4103 0 4.6923 −0.4103 0

Given in line #62–63 of the Scilab/Octave code at the end.

Step 6: The redundant actions Aq s is solved as shown below:


−1
Aq = − fqq × fq j × A j

−27.905
 

⇒ Aq =  −40.938  kN ANS
 

−0.759

Given in line #69 of the Scilab/Octave code at the end.

The complete structure actions As is found by augmenting A j and Aq as follows:

@seismicisolation
@seismicisolation
The Formalized Methods 131

 
0
25
 
 
 
 −10 
 
 

 0 

 
 30 
 

 0 

 

 0 

 

 0 

" # 
Aj  −80 

As = =
 
Aq  15 

 

 0 

 

 0 

0
 
 
 

 25 

 

 0 

 −8.524 
 
 
 10.225 
 

−1.624

Given in line #72 of the Scilab/Octave code at the end.

The structure nodal displacements Ds are computed using Equation (3.13), as


shown below; the linear displacements are in m, while the rotational ones are in
radian.

@seismicisolation
@seismicisolation
132 Matrix Structural Analysis and the Finite Element Methods

   
0.03709 m D j1
   
−0.01029 m  
  

   D j2 
  
−0.00010 m  
 

   D j3 
  
0.00564 rad  
 

   D j4 
  
0.02687 rad  
 

   D j5 
  
0.00368 rad  
 

   D j6 
  
0.03707 m  
 

   D j7 
  
0.00005 m  
 

   D j8 
  
−0.06745 m  
 

  D j9 
Ds = Fs × As =  ⇐
 
 0.02260 rad   
D j10 
  
  
0.03772 rad  
 

   D j11 
  
0.00806 rad  
 

   D j12 
  
0.02243 rad  
 

   D j13 
  
0.08772 rad  
 

   D j14 
  
0.01450 rad  
 

   D j15 
  
0

   Dq1 

  
   
 0   Dq2 

  
   
0 Dq3

Given in line #75 of the Scilab/Octave code at the end.

Since there are no fixed-end actions, the member actions Am are obtained from
Equation (3.10), as shown below.

@seismicisolation
@seismicisolation
The Formalized Methods 133

   
−91.624 kN Am11
   
−35.225 kN  
   
 Am12 
   
−8.524 kN  
   
 Am13 
   
   
 5.121 kN m   Am14 
   
−215 kN m  
   
 Am15 
   
   
 10.127 kN m   Am16 
   
−8.524 kN  
   
 Am21 
   
−81.624 kN  
   
 Am22 
   
−10.225 kN  
   
 Am23 
Am = Bms × As = 

⇐
 


 10.127 kN m   Am24 
   
   
 25.572 kN m   Am25 
   
−25 kN m  
   
 Am26 
   
   
 10.225 kN m   Am31 
   
−1.624 kN m  
   
 Am32 
   
−8.524 kN m  
   
 Am33 
   
   
 0   Am34 
   
   
 0   Am35 
   
0 Am36

Given in line #78 of the Scilab/Octave code at the end.

Finally, the corresponding Scilab code used to analyze the space frame using the
formalized flexibility method is given below.

Scilab/Octave Code
1 // Example 3.5 - Space frame having three members
2 // Formalized Flexibility Method
3

4 // clear all user variables and also the screen


5 clear all; clc;
6

7 // Common units for analysis: Force in kN, Length in m


8

@seismicisolation
@seismicisolation
134 Matrix Structural Analysis and the Finite Element Methods

9 // Given parameters & constants in appropriate units:


10 E = 30e6; G = 12.5e6; // in kN/m^2
11 A = 90e-3; J = 120e-6; // in m^2, m^4
12 Iy = 650e-6; Iz = 650e-6; // in m^2, m^4
13 EA = E*A; GJ = G*J; EIy = E*Iy; EIz = E*Iz;
14

15 P1 = 25; P2 = 10; P3 = 80; // in kN


16 M1 = 30; M2 = 15; M3 = 25; // in kN-m
17

18 // Member lengths
19 Ls = [3, 2, 3] // in m
20

21 // Space frame member has 6-DOF @ each end


22 DOF = 6;
23

24 // Number of members, free-joint displacements, redundants


25 nm = 3; nj = 15; nq = 3;
26

27 // To compute flexibility matrix of a space frame element


28 function [fm] = flex_sf(L, EA, GJ, EIy, EIz)
29 fm = [L/EA, 0, 0, 0, 0, 0;
30 0 L^3/(3*EIz) 0 0 0 L^2/(2*EIz);
31 0 0 L^3/(3*EIy) 0 -L^2/(2*EIy) 0;
32 0, 0, 0, L/GJ, 0, 0;
33 0 0 -L^2/(2*EIy) 0 L/EIy 0;
34 0 L^2/(2*EIz) 0 0 0 L/EIz];
35 endfunction
36

37 // Flexibility matrix of each member;


38 // calling the above 'flex_sf' function with parameters
39 fm1 = flex_sf(Ls(1), EA, GJ, EIy, EIz);
40 fm2 = flex_sf(Ls(2), EA, GJ, EIy, EIz);
41 fm3 = flex_sf(Ls(3), EA, GJ, EIy, EIz);
42

43 // Unassembled structure flexibility


44 FM = zeros(DOF*nm,DOF*nm); // Initialize FM with 0s
45 // Place each member flexibility along FM diagonal
46 st = 1; FM(st:st+DOF-1,st:st+DOF-1) = fm1;
47 st = st + DOF; FM(st:st+DOF-1,st:st+DOF-1) = fm2;
48 st = st + DOF; FM(st:st+DOF-1,st:st+DOF-1) = fm3;
49

50 // Read from file the action transformation matrix.


51 // It shall be prepared according to Table 3.4,
52 // separating each element with a space
53 // The file for this example is named "Ex3.5-BMS.txt".

@seismicisolation
@seismicisolation
The Formalized Methods 135

54 // Action-transformation matrix Bms


55 Bms = fscanfMat("Ex3.5-BMS.txt")
56

57 // Assembled structure flexibility matrix FS


58 FS = Bms'*FM*Bms
59 // fprintfMat("Ex3.5-FS.txt", 1000*FS)
60

61 // Partitioning the FS matrix


62 fjj = FS(1:nj,1:nj); fqq = FS(nj+1:nj+nq,nj+1:nj+nq);
63 fjq = FS(1:nj,nj+1:nj+nq); fqj = FS(nj+1:nj+nq,1:nj);
64

65 // Applied structure action Aj along Djs (free joints)


66 Aj = [0; P1; -P2; 0; M1; 0; 0; 0; -P3; M2; 0; 0; 0; M3; 0];
67

68 // The redundant actions are


69 Aq = -inv(fqq)*fqj*Aj
70

71 // Complete Structure Actions As, in k-m


72 As = [Aj;Aq]
73

74 // Structure displacements Ds, in rad


75 Ds = clean(FS*As)
76

77 // Member actions Am, in kN and kN-m


78 Am = Bms*As
79

80 // Other reactions are computed using equilibrium conditions


81

82 // END: ........... Example 3.5

3.2 THE FORMALIZED STIFFNESS METHOD


The structural analysis steps in the formalized flexibility method, as in the basic
flexibility method, begin by first identifying and releasing the redundant actions from
the given indeterminate structure, and thereby creating a primary structure.
However, in the formalized stiffness method the stiffness matrix [S] of the pri-
mary structure shall not be evaluated by applying unit actions and computing the cor-
responding displacements at the DOFs. Rather, they are assembled from the member
stiffness matrices sm of the individual members using displacement transformation
and matrix operations. Calculating the displacements on the primary structure due to
the given loading DL is no longer required since this can be taken care of through the
transformation relationships. The solution procedure for the analysis of structures
using the formalized stiffness method will be described in the subsequent sections.

@seismicisolation
@seismicisolation
136 Matrix Structural Analysis and the Finite Element Methods

3.2.1 MEMBER STIFFNESS


For any prismatic structural element, the member actions am can be formulated as
the product of the member stiffness matrix sm and the corresponding displacements
dm . This relationship is said to be the member stiffness equation, and it is written in
matrix form, as shown in Equation (3.20).

am = [sm ] × dm (3.20)
The member stiffness matrix [sm ] for the different prismatic structural elements
are derived as follows.

Truss Member
A truss member has a single DOF, i.e., the axial deformation at node-2, as shown
PL
in Figure 3.20. The displacement δ in terms of an axial load P is given by δ = EA .
EA
To create a unit axial displacement (if δ = 1), an axial force of P = L is required.
Hence, the stiffness (the axial force needed to cause a unit axial displacement) of a
truss member having constant axial rigidity EA is given by Equation (3.21).
EA
sm = (3.21)
L

Beam Member
A beam member has two DOFs – transverse displacement and rotation at node-2, as
shown in Figure 3.21. The stiffness matrix of a beam member with constant flexural
rigidity EI is given by the 2 × 2 matrix shown in Equation (3.22). This is determined
by assigning unit values to the displacement and rotation (dm1 and dm2 ), one at a
time, and computing the corresponding actions (shear force and bending moment)
along the two DOFs.

FIGURE 3.20 A Truss Member Subjected to Unit Displacement dm .

@seismicisolation
@seismicisolation
The Formalized Methods 137

FIGURE 3.21 A Beam Member with Transverse and Rotational DOFs.

 
12EI − 6EI
 L3 L2 
sm =  (3.22)
 

 − 6EI 4EI 
L2 L

Plane Frame Member


A plane frame member has three DOFs – axial and transverse displacements as well
as rotation at the free end, as shown in Figure 3.22. The stiffness of a frame element
with constant axial and flexural rigidities EA and EI is given by the 3 × 3 matrix
shown in Equation (3.23). This matrix is obtained by assigning unit values to the
displacements dm1 , dm2 and dm3 , one at a time, and computing the corresponding
axial force, shear force and moment (the actions required along the three DOFs).
It is clear that a plane frame member combines the effects of a truss- and a beam-
member, which have been treated in the above two cases.

EA
 
 L 0 0 
 
 
 12EI − 6EI 
sm = 
 0
 (3.23)
L3 L2 


 
− 6EI 4EI
 
0
L2 L

@seismicisolation
@seismicisolation
138 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.22 A Plane Frame Member with Three DOFs.

FIGURE 3.23 A Grid Member with Three DOFs.

Grid Member
Grid structure is a framed structure lying in a plane but subjected to transverse ac-
tions perpendicular to the plane of the structure. Each grid member has three DOFs
– transverse displacements, twisting and rotation at the free end as shown in Fig-
ure 3.23. The double-headed arrow along DOF-2 represents the rotation about the
member axis, i.e., the twisting of the member. The stiffness of a grid member with
constant flexural rigidity EI and twisting rigidity GJ 3 is given by the 3 × 3 matrix
shown in Equation (3.24).

12EI − 6EI
 
 L3 0
 L2  
 
 GJ 
sm = 
 0 0  (3.24)
L

 
 
− 6EI 4EI
 
0
L2 L

Space Frame Member


A space frame member has all six DOFs – translations along and rotations about
the three coordinate axes at the free end as shown in Figure 3.24. Note that the
double-headed arrows (4, 5 and 6) refer to the twisting (rotation about the X), bend-
3G is the shear modulus of elasticity and J is the polar moment of inertia of the cross-section.

@seismicisolation
@seismicisolation
The Formalized Methods 139

FIGURE 3.24 The Six DOFs of a Space Frame Member.

ing about the Z-axis and bending about the Y-axis, respectively. These rotations are
assumed to be positive according to the right-hand-rule.
The stiffness of a space frame member with given constant axial, torsional shear
and flexural rigidities EA, GJ, EIz and EIy is given by the 6 × 6 matrix shown in
Equation (3.25). Note that (unit) actions along 2 and 6 cause bending of the member
about the Z-axis, requiring Iz in the stiffness matrix. Likewise, actions along 3 and 5
cause bending of the member about the Y-axis; thus, Iy is used.
 
EA
 L 0 0 0 0 0 
 
12EIz 6EIz 
 
− 2 

 0 0 0 0

 L3 L  
 12EIy 6EIy 
 0 0 0 0 
 
L3 L2
sm =  (3.25)
 


 0 GJ 
0 0 0 0 

 L 

 
 6EIy 4EIy 
 0 0 0 0 

 L2 L 

 6EIz 4EIz 
0 − 2 0 0 0
L L

3.2.2 DERIVATION OF STRUCTURE STIFFNESS


In this section, the structure stiffness will be derived using simple matrix operations
and compatibility relationships. Exerting unit displacement along each DOF and de-
termining the corresponding actions required to determine S is no longer necessary.

@seismicisolation
@seismicisolation
140 Matrix Structural Analysis and the Finite Element Methods

Unassembled Structure Stiffness Matrix


The action-displacement relationship of each member i of a given basic structure can
be written by the set of matrix equations given like in Equation (3.20). For a structure
containing n members, these equations can be gathered together into a larger matrix
relationship as shown in Equation (3.26). However, every member in this case is con-
sidered independent of each other. The member connections are ignored and compat-
ibility as well as equilibrium requirements have not been considered. Thus, the corre-
sponding stiffness matrix of the structure SM is termed as the unassembled structure
stiffness matrix, and the equation is the unassembled structure stiffness equation.
     
am1 sm1 0 ... 0 dm1
am   0 sm2 ... 0  dm 
 2 =   ×  2 (3.26)
 ...   ... ... ... ...   ... 
amn 0 0 ... smn dmn
The unassembled structure stiffness equation is written in a compact form as
shown in Equation (3.27).

Am = Sm × Dm (3.27)

Displacement Transformation (Compatibility) Matrix


For any structure, the structure displacements vector Ds is composed of the actual
free-joint displacements at the kinematic indeterminacy (DOFs) of the structure DJ
and displacements along all the support reactions DR 4 of the given structure. The
actions vector As corresponding to the structure displacements Ds is likewise com-
posed of the actions at the DOFs of the structure AJ and all the reactions, AR . These
expressions are given in Equation (3.28).
" # " #
AJ DJ
As = and Ds = (3.28)
AR DR
Since the displacements at the second node of every member can be related to
the identified structure displacements (DJ or DR ), the member displacements Dm can
always be obtained through compatibility once the external (structure) displacements
Ds are determined. In other words, there’s a linear relationship between the Dm and
Ds vectors as provided in the compatibility equation, Equation (3.29).
" #
DJ
Dm = CMS × Ds = CMS × (3.29)
DR
Subsequent sections will provide detailed explanations of the relationship be-
tween Dm and Ds for the different structure/member types and how to determine the
4 Note that, unlike the formalized flexibility method, there is no distinction between redundants and

other reactions (Aq was the redundant actions only, while in this case AR stands for all the reactions of the
structure). Hence, AR stand for the total number of independent reaction components of the structure and
DR represents all displacements along the reactions on the structure.

@seismicisolation
@seismicisolation
The Formalized Methods 141

coefficients in the displacement transformation matrix (also called the compatibility


matrix) CMS .

Principle of Virtual Works


An arbitrary virtual external displacement δ Ds on a given basic structure will cause a
corresponding set of virtual internal (member) displacements δ Dm , which is related
to the external virtual displacements by the same displacement transformation matrix
CMS , as shown in Equation (3.30).
" #
δ DJ
δ Dm = CMS × δ Ds = CMS × (3.30)
δ DR
According to the principle of virtual work [14, 31, 47, 49], the external virtual
work δW of the given structure, i.e., the virtual work caused by the structure actions
As undergoing through the virtual displacements δ Ds is equal to the internal virtual
work δU, i.e., the virtual work caused by the member actions Am undergoing through
the virtual member displacements δ Dm .

δW = δU

δ Ds T × As = δ Dm T × Am

= (CMS × δ Ds )T × (SM × DM )

= δ Ds T ×CMS T × SM ×CMS × Ds

⇒ As = (CMS T × SM ×CMS ) × Ds

3.2.3 ASSEMBLING STRUCTURE STIFFNESS


From the above derivation, the assembled structure stiffness matrix is defined by the
relationship in Equation (3.31).

Ss = CMS T × SM ×CMS (3.31)

As = Ss × Ds (3.32)
Equation (3.32) relates the structure actions As in terms of the corresponding struc-
ture displacements Ds . This equation is termed as the assembled structure stiffness
equation. It can also be written in partitioned form as given in Equation (3.34) parti-
tioning the Ss matrix and using the relationship for As and Ds given earlier.
" # " # " #
AJ SJJ SJR DJ
= × (3.33)
AR SRJ SRR DR

@seismicisolation
@seismicisolation
142 Matrix Structural Analysis and the Finite Element Methods

Equation (3.33) is equivalent to the two relationships provided in Equation (3.34).

AJ = SJJ × DJ + SJR × DR
(3.34)
AR = SRJ × DJ + SRR × DR

3.2.4 SOLVING FOR DJ AND SOLUTION STEPS


The displacement components corresponding to the reactions are known and usually
equal zero (i.e., DR = [0]). Hence, from the first of Equation (3.34), one obtains the
values of the unknown displacements DJ of the structure as given in Equation (3.35).

DJ = (SJJ )−1 × AJ (3.35)

STEPS IN THE FORMALIZED STIFFNESS METHOD


In the formalized stiffness method, the structure stiffness matrix Ss can be indirectly
computed to relate the structure nodal actions As and the corresponding displace-
ments Ds ; the analysis steps are outlined below.
Step 1: Identify and number the free joint DOFs (DJ s) and reactions AR s. Also,
specify and number the member actions Am s.
Step 2: Prepare the action vector on the structure; gather the actions along DJ
into the AJ vector required for the analysis. Forces not at the nodes are converted
into equivalent nodal loads and combined with the A j s, as discussed in Section 2.2.1.
Step 3: Gather the unassembled structure stiffness matrix SM for each member
in the given structure, as discussed in Section 3.2.1.
Step 4: Determine the displacement transformation matrix CMS . For a structure
having M internal (member) displacements and S(= J + R) external (structure) dis-
placements, CMS would be an M by S matrix. The coefficients of this matrix are
computed by setting each Ds on the basic structure to a unit value and computing
the member displacements DM , at node-2 of the member relative to node-1 using
compatibility. For example, set D j1 = 1 and determine all member displacements of
the basic structure ci1 (for i = 1 to m) and fill the first column of the CMS matrix, etc.
The determination of the CMS matrix is schematically shown in Figure 3.25.
Step 5: Compute the assembled structure stiffness matrix Ss using Equation
(3.31) and partition the same into the four components SJJ , SJR , SRJ and SRR based
on the number of DS s and AR s in the problem.
Step 6: Solve for the unknown displacements DJ using Equation (3.35) and then
compute the member displacements member actions using Equations 3.29 and 3.27,
respectively. Since DJ is known, so are the support reactions of the structure deter-
mined using the second part of Equation (3.34).

@seismicisolation
@seismicisolation
The Formalized Methods 143

FIGURE 3.25 Displacement Transformation Matrix, CMS .

3.2.5 EXAMPLES
The following examples have already been analyzed in Section 3.1 using the for-
malized flexibility method. Here, the solutions are carried out using the formalized
stiffness method in order to demonstrate how the formalized stiffness method can be
used and to show how the same solution can be obtained using both methods.
Example 3.6 Analyze the plane truss structure shown in Figure 3.26 using the for-
malized stiffness method. All members have cross sectional area A = 5000 mm2 and
E = 120 GPa, and let P1 = 60 kN and P2 = 80 kN.

SOLUTION
Step 1: The truss has four free DOFs (DJ s); a basic structure is created by restrain-
ing these. The nodes and members are labeled in Figure 3.27. The four free-joint

FIGURE 3.26 Plane Truss.

@seismicisolation
@seismicisolation
144 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.27 DJ s and AR s of the Plane Truss.

displacements (DJ1 to DJ4 ) and the four reactions (AR1 to AR4 ) on the given truss are
indicated, as positive in the direction shown. The figure also shows how the members
are oriented, like member 1 runs from node-1 to node-2, member 4 runs from node-4
to node-3, etc.
Step 2: The given nodal load vector A j of the structure is written as follows:
   
P1 60
 P2   80 
Aj =  0  =  0  kN
  

0 0

Given in line #34 of the Scilab/Octave code at the end.

Step 3: Each member of the truss has a stiffness coefficient (a 1 × 1 matrix) given
by Equation (3.21). The unassembled structure stiffness matrix SM of the truss is thus
given by:

@seismicisolation
@seismicisolation
The Formalized Methods 145

1/L1 0 0 0 0 0
 
 0 1/L2 0 0 0 0 
 
 
 0 0 1/L3 0 0 0 
SM = EA × 
 

 0 0 0 1/L4 0 0 
 
 0 0 0 0 1/L5 0 
 

0 0 0 0 0 1/L6

0.5 0 0 0 0 0
 
0 0.35355 0 0 0 0
 
 
0 0 0.5 0 0 0
⇒ SM = EA ×   kN/m
 
0 0 0 0.35355 0 0
 
0 0 0 0 0.5 0
 

0 0 0 0 0 0.5

Given in line #7–14 of the Scilab/Octave code at the end.

Step 4: Displacement transformation matrix (CMS ) is determined by exerting on


the basic structure a unit value of each of the DJ s and DR s and then evaluating the
corresponding member displacements, at node-2 of the member relative to node-1 us-
ing compatibility. The computed member displacements are conventionally assumed
positive if they produce member elongation. Each of the individual unit displace-
ments are shows in Figure 3.28 and the result is given in Table 3.9.
 
0 0 0 −1 0 0 1 0
√ √ √ √ 
 2/2
 2/2 0 − 2/2 0 − 2/2 0 0  
 0 0 1 0 0 −1 0 0 
 
CMS =  √ √ √ √ 
 0 0 2/2 0 − 2/2 0 2/2 2/2

 
 1
 0 0 0 −1 0 0 0  
0 1 0 0 0 0 0 −1

Given in line #17–22 of the Scilab/Octave code at the end.

Step 5: The assembled structure stiffness matrix Ss in kN/m is computed to be:

@seismicisolation
@seismicisolation
146 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.28 Unit Displacements to Determine Cms.

TABLE 3.9
Displacement Transformation Matrix for the 6 Bars Truss
Member DJ1 = 1 DJ2 = 1 DJ3 = 1 DJ4 = 1 DR1 = 1 DR2 = 1 DR3 = 1 DR4 = 1

Dm1 0 0 0 −1 0 0 1 0
√ √ √ √
Dm2 2/2 2/2 0 − 2/2 0 − 2/2 0 0
Dm3 0 0 1 0 0 −1 0 0
√ √ √ √
Dm4 0 0 2/2 0 − 2/2 0 2/2 2/2
Dm5 1 0 0 0 −1 0 0 0
Dm6 0 1 0 0 0 0 0 −1

@seismicisolation
@seismicisolation
The Formalized Methods
 
406.07 106.07 0 −106.07 −300 −106.07 0 0
−106.07 −106.07 −300 

 106.07 406.07 0 0 0

 

 0 0 406.07 0 −106.07 −300 106.07 −106.07

 
−106.07 −106.07 0 406.07 0 106.07 −300 0 
T × S ×C 3 
Ss = CMS MS = 10 × 

M 
 −300 0 −106.07 0 406.07 0 −106.07 106.07 
 
−106.07 −106.07 −300 106.07 0 406.07 0 0
 

 

 0 0 106.07 −300 −106.07 0 406.07 −106.07

0 −300 −106.07 0 106.07 0 −106.07 406.07

147
@seismicisolation
@seismicisolation
148
The Ss matrix is then partitioned into four components as follows:

Given in line #25 of the Scilab/Octave code at the end.


 
406.07 106.07 0 −106.07 −300 −106.07 0 0
 
 
 106.07 406.07 0 −106.07 0 −106.07 0 −300 

Matrix Structural Analysis and the Finite Element Methods


 
 
 

Ss = 

 0 0 406.07 0 −106.07 −300 106.07 −106.07
 


 
−106.07 −106.07 0 406.07 0 106.07 −300 0 

Sjj
Sr j
Ss = 103 × 
 

 −300 0 −106.07 0 406.07 0 −106.07 106.07 
 

S jr
Srr
 
 
−106.07 −106.07 −300 106.07 0 406.07 0 0 



 
 
 

 0 0 106.07 −300 −106.07 0 406.07 −106.07
 
0 −300 −106.07 0 106.07 0 −106.07 406.07

@seismicisolation
@seismicisolation
The Formalized Methods 149

Given in line #28–31 of the Scilab/Octave code at the end.

Step 6: Now the problem is ready to be solved, and the unknown nodal displace-
ments D j are solved for as follows.

D j = S−1
jj ×Aj
 −1  
406066.02 106066.02 0. −106066.02 60
 106066.02 406066.02 0. −106066.02   80 
   
Dj =   ×
 

 0. 0. 406066.02 0. 
  0 

−106066.02 −106066.02 0. 406066.02 0
   
D j1 0.12
D j2  0.19
   
⇒  =
    mm ANS
D j3   0 

D j4 0.08

Given in line #39 of the Scilab/Octave code at the end.

Once the displacements D j are determined, all the other unknowns can be easily
computed as follows. The support reactions are given by:
 
−35.98
 −24.02 
 
Ar = Sr j × D j = 
 −24.02  kN

 
−55.98

Given in line #42 of the Scilab/Octave code at the end.

The complete structure displacement vector Ds is found by augmenting D j and


Dr as follows:

@seismicisolation
@seismicisolation
150 Matrix Structural Analysis and the Finite Element Methods
 
0.12

 0.19 

 
 0 
 
   
 0.08 
Dj
Ds = =  mm
 
Dr  0 
 
 0 
 
 
 0 
 
0

Given in line #45 of the Scilab/Octave code at the end.

The member displacements and actions (Dm and Am ) are obtained using Equa-
tions 3.29 and 3.27, respectively, as follows:
 
−0.08
 
 
 0.16 
 
 
 
 0. 
Dm = Cms × Ds =   mm
 
 0. 
 
 
 
 0.12 
 
 
0.19

Given in line #48 of the Scilab/Octave code at the end.

   
Am1 −24.02
   
   
 Am2   33.98 
   
   
 Am3   0. 
⇒

 = Sm × Dm = 
 
 kN

 Am4   0. 
   
   
 Am5   35.98 
   
Am6 55.98

Given in line #49 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
The Formalized Methods 151

The complete analysis result has already been shown in Figure 3.8. The Scilab
code used for the current solution in the formalized stiffness method is given below.

Scilab/Octave Code
1 // Example 3.6 - Plane Truss Analysis
2 // Formalized Stiffness Method
3

4 // Common units for analysis: Force in kN, Length in m


5

6 // Given constants that define the problem


7 s = sqrt(2); L = 2; h = 1/L; d = h/s
8 E = 120e6; A = 5000e-6; EA = E*A;
9

10 // 1/L of all element (1-6) in the truss


11 elm = [h d h d h h ]
12

13 // Unassembled structure stiffness matrix


14 Sm = EA*diag(elm)
15

16 // Displacement transformation matrix


17 Cms = [0 0 0 -1 0 0 1 0
18 s/2 s/2 0 -s/2 0 -s/2 0 0
19 0 0 1 0 0 -1 0 0
20 0 0 s/2 0 -s/2 0 s/2 -s/2
21 1 0 0 0 -1 0 0 0
22 0 1 0 0 0 0 0 -1]
23

24 // Assembled structure stiffness matrix


25 Ss = Cms'*Sm*Cms
26

27 // Partitioning
28 Sjj = Ss(1:4,1:4)
29 Sjr = Ss(1:4,5:8) // Not actually required
30 Srj = Ss(5:8,1:4)
31 Srr = Ss(5:8,5:8)
32

33 // Free joint actions (Applied loading)


34 Aj = [60;80;0;0]
35

36 Dr = [0;0;0;0] // Displacements along the supports


37

38 // Free joint displacements


39 Dj = inv(Sjj)*Aj
40

@seismicisolation
@seismicisolation
152 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.29 Two-Span Beam.

41 // The reactions Ar are given by


42 Ar = Srj*Dj
43

44 // Augment Dj and Dr to obtain Ds


45 Ds = [Dj;Dr]
46

47 // Member displacements and actions


48 Dm = Cms*Ds
49 Am = Sm*Dm
50

51 // END: ........... Example 3.6

Example 3.7 Analyze the beam shown in Figure 3.9 using the formalized stiffness
method. Use E = 29,000 ksi.

SOLUTION
Step 1: The beam is kinematically indeterminate to the second degree. As shown in
Figure 3.30(a), the two rotations at the roller supports are the free-joint displace-
ments (DJ1 and DJ2 )5 , and the reactions (AR1 to AR4 ) on the beam are labeled. The
two beam member actions and their orientations are also shown in Figure 3.30(b).
The actions AM11 and AM12 are the shear force and bending moment on member 1
just to the left of the roller support at node-2; likewise, AM21 and AM22 are the shear
force and bending moment on member 2 just to the left of node-3.

5 Free-joint displacements (D s) for any kinematically indeterminate structure are always unique, there
J
is no alternative.

@seismicisolation
@seismicisolation
The Formalized Methods 153

FIGURE 3.30 (a) Primary Structure of the Beam, (b) Member Actions Am , (c) Fixed-
Beam to Convert Member Forces to Equivalent-Nodal Load for A j .

Step 2: The fixed-end actions were computed in Table 3.2. Accordingly, the
(equivalent) nodal load vector A j and member forces AFm and the reaction forces
AFR from fixed-end actions are given as follows.
" #
−125
Aj = k ft
250

Given in line #48 of the Scilab/Octave code at the end.

 
45 k
 −225 k f t
 
AFm

= 

 51 k 

−250 k f t

Given in line #44 of the Scilab/Octave code at the end.

 
45 k
 225 k f t
 
AFR = 


 120 k 
 
51 k

Given in line #45 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
154 Matrix Structural Analysis and the Finite Element Methods

Step 3: The stiffness matrices of the two beam elements are computed below
using Equation (3.22).
   
12EI1 − 6EI1 12EI2 − 6EI2
 L13 L12   L23 L22 
   
Sm1 = 

 and Sm2 = 
  
− 6EI 4EI − 6EI 4EI

 1 1   2 2 
L12 L1 L22 L2

Given in line #16–17 of the Scilab/Octave code at the end.

The unassembled structure stiffness matrix SM of the beam is thus given by:

12EI1 − 6EI1
 
 L3 0 0
 1 L12 

 
 − 6EI1 4EI1 
 0 0 
 L12 L1
" #  
Sm1 0 
SM = =
 
12EI2 − 6EI2 

0 Sm2 
 0 0 

 L23 L22 
 

 0 − 6EI2 4EI2 
0 
L22 L2

Given in line #41–45 of the Scilab/Octave code at the end.

 
35.80 −537.04 0 0
 −537.04
 
10740.74 0 0 
∴ SM = 
 
0 0 537 −805.56 


 
0 0 −805.56 16111.11

Given in line #41–45 of the Scilab/Octave code at the end.

Step 4: Displacement-transformation matrix (CMS ) is determined by exerting on


the basic structure a unit value of each displacement D j s and DR s and then eval-
uating the corresponding member displacement. Figure 3.31 shown the each of the
structure displacements having unit values respectively. The operation and the result
is shown in Table 3.10.

@seismicisolation
@seismicisolation
The Formalized Methods 155

FIGURE 3.31 Structure Displacements D j s = 1 and DR s = 1.

TABLE 3.10
Displacement Transformation Matrix for the Beam
Member D j1 = 1 D j2 = 1 DR1 = 1 DR2 = 1 DR3 = 1 DR4 = 1
Dm11 0 0 −1 −L1 1 0
Dm12 1 0 0 −1 0 0
Dm21 −L2 0 0 0 −1 1
Dm22 −1 1 0 0 0 0

 
0 0 −1 −30 1 0
−1
 
 1 0 0 0 0
⇒ CMS = 
 
−30 0 0 0 −1 1

 
−1 1 0 0 0 0

Given in line #24–27 of the Scilab/Octave code at the end.

Step 5: The assembled structure stiffness matrix Ss is computed to be:


T × S ×C
Ss = CMS M MS

Given in line #30 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
156 Matrix Structural Analysis and the Finite Element Methods

26.85 8.06 0.54 5.37 0.27 −0.81


 

 8.06 16.11 0 0−0.81
 0.81
 
 0.54 0 0.04 0.54 −0.04 0 
⇒ SS = 103 × 
 


 5.37 0 0.54 10.74 −0.54 0  
0.27 0.81 −0.04 −0.54 0.09 −0.05
 

−0.81 −0.81 0 0 −0.05 0.05
The Ss matrix is then partitioned into four components as follows:

 
26.85 8.06 0.54 5.37 0.27 −0.81
 
 
 8.06
 16.11 0 0 0.81 −0.81

   
 
Sjj S jr  0.54 0 0.04 0.54 −0.04 0 
Ss =   = 103 × 



Sr j Srr  5.37

0 0.54 10.74 −0.54 0 

 
 
 0.27
 0.81 −0.04 −0.54 0.09 −0.05

 
−0.81 −0.81 0 0 −0.05 0.05

Given in line #33–34 of the Scilab/Octave code at the end.

Step 6: The free joint displacements D j are solved as shown below:

D j = S−1
jj ×Aj
" # " #
D j1 −0.011
⇒ = rad ANS
D j2 0.021

Given in line #51 of the Scilab/Octave code at the end.

The complete structure displacement vector Ds is found by augmenting D j and


DR = [0; 0; 0; 0] as follows:

−0.011
 
 0.021 
 
" #  
Dj  0 
Ds = =
 

DR 
 0 

0
 
 
0

@seismicisolation
@seismicisolation
The Formalized Methods 157

Given in line #54 of the Scilab/Octave code at the end.

The member displacements vector Dm is given bt:


   
Dm11 0
 Dm12   −0.0110
   

Dm = Cms × Ds  =
   
 Dm21   0.3286


   
Dm22 0.0319

Given in line #60 of the Scilab/Octave code at the end.

Since the members are subjected to some loading between nodes, the member
actions Am obtained from Equation (3.29) must be modified to include the fixed-end-
action parts, as shown below.

Am = AFm + SM × Dm
   
Am11 45
   
Am12   −225 
   

 = +
   
 Am21   47.67 
   
Am22 −250
   
35.80 −537.04 0 0 0
   
 −537.04   −0.0110 
   
10.74e3 0 0
 × 
−805.56   0.3286 
   
 0 0 53.70
   
0 0 −805.56 16.11e3 0.0319
   
Am11 50.88 k
   
Am12   −342.65 k f t 
   

⇒

=
 


 Am21   39.58 k 
   
Am22 0

Given in line #63 of the Scilab/Octave code at the end.

The reaction forces AR are given by adding the fixed end actions along the four
reactions and the product Sr j × D j .

@seismicisolation
@seismicisolation
158 Matrix Structural Analysis and the Finite Element Methods

   
R1 39.12 k
   
   
 M1   166.18 k f t
 = AFr + Sr j × D j = 

 
   
 R2   137.30 k 
   
R3 39.58 k

Given in line #66 of the Scilab/Octave code at the end.

The complete analysis result is has already been shown in Figure 3.11. The Oc-
tave code for the formalized stiffness method used in this example is presented below.

Scilab/Octave Code
1 % Example 3.7 - 2-span Beam
2 % Formalized Stiffness Method
3

4 % Common units for analysis: Force in kips, Length in ft


5

6 % Given parameters constants:


7 w = 3; E = 29000*144; % in k/ft, k/ft^2
8 P = 36; a = 5; b = 30 - a; % in k, ft, ft
9 I = [400 600]/(12^4); % in k/ft^2, ft^4, ft^4
10 L = 30; % in ft
11 nm = 2; % number of members
12

13 EI = E*[I(1) I(2)]
14

15 % Member stiffnes equation


16 sm1 = EI(1)*[12/L^3 -6/L^2;-6/L^2 4/L];
17 sm2 = EI(2)*[12/L^3 -6/L^2;-6/L^2 4/L];
18 % Unassembled structure stiffnes
19 SM = zeros(4); % Initialize SM with 0s
20 SM(1:2,1:2) = sm1; % Put member stiffnes along
21 SM(3:4,3:4) = sm2; % the diadonal
22

23 % Displacement-transformation matrix Cms


24 Cms = [0 0 -1 -30 1 0
25 1 0 0 -1 0 0
26 -30 0 0 0 -1 1
27 -1 1 0 0 0 0]
28

29 % Assembled structure stiffnes matrix Ss

@seismicisolation
@seismicisolation
The Formalized Methods 159

30 Ss = Cms'*SM*Cms
31

32 % Partitioning
33 Sjj = Ss(1:2,1:2); Sjr = Ss(1:2,3:6);
34 Srj = Ss(3:6,1:2); Srr = Ss(3:6,3:6);
35

36 % Equations for Fixed-end actions


37 V11 = w*L/2; V12 = V11; % member 1 shear
38 M11 = w*L^2/12; M12 = -M11; % member 1 moment
39 vp1 = P*b^2*(L+2*a)/L^3; vp2 = P*a^2*(L+2*b)/L^3;
40 V21 = V11+vp1; V22 = V11+vp2; % member 2 shear
41 mp1 = P*a*b^2/L^2; mp2 = -P*a^2*b/L^2;
42 M21 = M11+mp1; M22 = -M11+mp2; % member 2 moment
43 % Fixed-end actions along Am11, Am12, Am21, Am22
44 Amf = [V12; M12; V22; M22];
45 Arf = [V11; M11; V12+V21; V22];
46

47 % Applied structure action vector Aj @ Djs (free joints)


48 Aj = -[M12+M21;M22]
49

50 % The unknown nodal displacements, Dj


51 Dj = inv(Sjj)*Aj
52

53 % Complete Structure Displacement vector Ds


54 Ds = [Dj;0;0;0;0]
55

56 % Structure Actions As is given by


57 As = Ss*Ds % All structure actions (Aj & Ar)
58

59 % Member displacements Dm, in in/rad


60 Dm = Cms*Ds
61

62 % Member actions Am, in k and k-ft


63 Am = Amf + SM*Dm
64

65 % Support Reaction Forces


66 Ar = Arf + Srj*Dj
67

68 % END: ........... Example 3.7

Example 3.8 Analyze the plane frame shown in Figure 3.32 using the formalized
stiffness method. Let P1 = 40 kN, P2 = 70 kN, M1 = 35 kN m, M2 = 30 kN m, L = 2
m. Use E = 72 GPa, I = 120e6 mm4 and A = 6000 mm2 for all members.

@seismicisolation
@seismicisolation
160 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.32 Plane Frame Having Three-Members.

SOLUTION
Step 1: The plane frame is kinematically indeterminate to the eighth degree. A basic
structure is created by restraining all the free joint displacements (D j s) shown in
Figure 3.33(a).

The figure shows the eight free-joint displacements on the frame (DJ1 to DJ8 ),
and the four reaction components (Ar1 to Ar4 ) properly labeled with their assumed
positive directions. The three-member actions and their orientations are also shown
in Figure 3.33(b); the actions AMi1 , AMi2 and AMi3 are the axial force, shear force
and bending moment in member i at its second node.

@seismicisolation
@seismicisolation
The Formalized Methods 161

FIGURE 3.33 (a) Free-Joint Displacements and Reactions and (b) Member Actions
of the Plane Frame.

Step 2: The central load on member 2 has to be transformed into equivalent nodal
load. This is done by computing the fixed-end actions which are given as follows:
   
V21 35.0 kN
   
   
 M21   35.0 kN m 
 = 
   
 V22   35.0 kN 
   
M22 −35.0 kN m

The fixed-end action AFm vectors needed to compute the member actions is thus
given by:

@seismicisolation
@seismicisolation
162 Matrix Structural Analysis and the Finite Element Methods

 
0
 
 0 
 
 0 
 
 
 0 
 
F
 
Am =  35 


 −35 
 
 
 0 
 
 
 0 
 
0

Given in line #14 of the Scilab/Octave code at the end.

The reaction AFr equals [0; 0; 0; 0] while the equivalent nodal load vector A j is
given by:
 
40
 −35 
 
 
 −70 
 
 
 0 
Aj = 
 

 −35 
 
 75 
 
 
 0 
 
0

Given in line #66 of the Scilab/Octave code at the end.

Step 3: The stiffness matrices of each frame element is computed below using
Equation (3.23).

EAi
 
 Li 0 0 
 
 12EIi − 6EIi 
smi =  0
 
Li3 Li2 


 
 − 6EIi 4EIi 
0
Li2 Li

@seismicisolation
@seismicisolation
The Formalized Methods 163

Given in line #31–41 of the Scilab/Octave code at the end.

The unassembled structure stiffness matrix SM of the plane frame is a 9×9 matrix
given as follows:
 
144 0 0 0 0 0 0 0 0
 
 0 3.84 −5.76 0 0 0 0 0 0
 

 
 0 −5.76 11.52 0 0 0 0 0 0 
 
 
 0 0 0 108 0 0 0 0 0 
 
 
3 
SM = 10 ×  0 −3.24

0 0 0 1.62 0 0 0 
 
−3.24
 
 0 0 0 0 8.64 0 0 0 
 
 
 0 0 0 0 0 0 152.74 0 0 
 
 
 0
 0 0 0 0 0 0 4.5821 −6.48

0 0 0 0 0 0 0 −6.48 12.22

Given in line #44–48 of the Scilab/Octave code at the end.

Step 4: Displacement-transformation matrix (CMS ) is determined by exerting on


the basic structure a unit value of each of the DJ s and DR s and then evaluating the
corresponding member displacements, at node-2 of the member relative to node-1
using compatibility. This operation is prepared as shown in Table 3.11.

@seismicisolation
@seismicisolation
164
TABLE 3.11
Displacement Transformation Matrix for the Plane Frame

D j1 D j2 D j3 D j4 D j5 D j6 D j7 D j8 Dr1 Dr2 Dr3 Dr4

Matrix Structural Analysis and the Finite Element Methods


Dm11 0 1 0 0 0 0 0 0 0 −1 0 0
Dm12 −1 0 0 0 0 0 0 0 1 0 −2 0
Dm13 0 0 1 0 0 0 0 0 0 0 −1 0
Dm21 −1 0 0 1 0 0 0 0 0 0 0 0
Dm22 0 −1 −4 0 1 0 0 0 0 0 0 0
Dm23 0 0 −1 0 0 1 0 0 0 0 0 0
Dm31 0 0 0 −0.7071 0 0 0 0 0 0 0 −1
Dm32 0 0 0 0 0.7071 −2.8284 1 0 0 0 0 0
Dm33 0 0 0 0 0 −1 0 1 0 0 0 0

@seismicisolation
@seismicisolation
The Formalized Methods 165

Given in line #55 of the Scilab/Octave code at the end.

Step 5: The assembled structure stiffness matrix SS is computed using the follow-
ing equation:
T × S ×C
Ss = CMS M MS

Given in line #58 of the Scilab/Octave code at the end.

The Ss matrix is then partitioned into its four components as follows:


 
S j j S jr 
Ss = 



Sr j Srr

Given in line #61–62 of the Scilab/Octave code at the end.

Step 6: The free joint displacements D j s are solved as shown below:

D j = S−1
jj ×Aj
 
16.19 mm
−0.26 mm
 
 
−9.46 rad 
 
 
 15.89 mm 
−3
⇒ D j = 10 ×   ANS
 
 15.47 mm 
 
 18.15 rad 
 
 
 73.51 mm 
 
18.15 rad

Given in line #69 of the Scilab/Octave code at the end.

The support reactions are thus obtained using:


 
−7.68 kN
 
 
 37.68 kN
Ar = AFr + Sr j × D j = 


 
 38.76 kN m 
 
45.71 kN

@seismicisolation
@seismicisolation
166 Matrix Structural Analysis and the Finite Element Methods

Given in line #72 of the Scilab/Octave code at the end.

The structure displacement Ds is found by augmenting D j and Dr = [0; 0; 0; 0] as


follows:
" #
Dj
Ds =
Dr

Given in line #76 of the Scilab/Octave code at the end.

The member displacements Dm are computed using Equation (3.30), as shown


below; the linear displacements are in mm while the rotational ones are in radian.
   
27.61 Dm11
   
 −0.30   Dm12 
   
   
   
 0.00   Dm13 
   
   
 0.00   Dm21 
   
Dm = Cms × Ds =  53.57  ⇐  Dm22 
   
   
   
 27.61   Dm23 
   
 −0.30   Dm31 
   
   
   
 0.00   Dm32 
   
0.00 Dm33

Given in line #79 of the Scilab/Octave code at the end.

The member actions Am are obtained by adding AFm to the one obtained from
Equation (3.29), as shown below.

@seismicisolation
@seismicisolation
The Formalized Methods 167

   
−37.68 kN Am11
   
 −7.68 kN   Am12
   

   
 −15.72 kN m   Am13
   

   
 −32.32 kN   Am21
   

   
Am = SM × Dm =  32.32 kN  ⇐  Am22
   

   
   
 30. kN m   Am23 
   
 −45.71 kN   Am31
   

   
   
 0   Am32 
   
0 Am33

Given in line #82 of the Scilab/Octave code at the end.

The complete analysis result is shown in Figure 3.14; the corresponding Octave
code for this solution is given below.

Scilab/Octave Code
1 % Example 3.8 - Plane frame having three members
2 % Formalized Stiffness Method
3

4 % Common units used for analysis: Force in kN, Length in m


5

6 % Given parameters & constants in appropriate units:


7 E = 72e6; L = 2; % in kN/m^2, m
8 A = 6e-3; I = 120e-6; % in m^2, m^4
9 P1 = 40; P2 = 70; % in kN
10 M1 = 35; M2 = 30; % in kN-m
11

12 % Fixed-end Actions on Member 2


13 Fx = [P2/2; P2*2*L/8;P2/2; -P2*2*L/8]
14 Amf = [0;0;0;0;35;-35;0;0;0]
15 Arf = [0;0;0;0]
16

17 % Member lengths of the three members


18 Ls = [1.5*L, 2*L, L*sqrt(2)] % in m
19

20 EA = E*A; EI = E*I; % in kN and kN/m^2


21

22 % A plane frame member has 3-DOF @ each end

@seismicisolation
@seismicisolation
168 Matrix Structural Analysis and the Finite Element Methods

23 % number of joints and members in the problem: nj, nm


24 DOF = 3;
25

26 % Number of members, free-joint displacements,


27 % and reaction forces
28 nm = 3; nj = 8; nr = 4;
29

30 % Function to compute frame element stiffness matrix


31 function [sm] = stiff_pf(L, EA, EI)
32 sm = [EA/L, 0, 0;
33 0 12*EI/L^3 -6*EI/L^2;
34 0 -6*EI/L^2 4*EI/L];
35 endfunction
36

37 % Stiffness matrix of each member;


38 % calling the above 'stiff_pf' function with parameters
39 Sm1 = stiff_pf(Ls(1),EA,EI);
40 Sm2 = stiff_pf(Ls(2),EA,EI);
41 Sm3 = stiff_pf(Ls(3),EA,EI);
42

43 % Unassembled structure stiffness


44 SM = zeros(DOF*nm); % Initialize FM with 0s
45 % Place each member stiffness along FM diagonal
46 st = 1; SM(st:st+2,st:st+2) = Sm1;
47 st = st + DOF; SM(st:st+2,st:st+2) = Sm2;
48 st = st + DOF; SM(st:st+2,st:st+2) = Sm3;
49

50 % Read from file the displacement transformation matrix.


51 % It shall be prepared according to Table 3.11,
52 % separating each element with a space
53 % The file for this example is named "Ex3.8-BMS.txt".
54 % Action-transformation matrix Cms
55 Cms = dlmread("Ex3.8-CMS.txt")
56

57 % Assembled structure stiffness matrix FS


58 SS = Cms'*SM*Cms
59

60 % Partitioning the SS matrix


61 Sjj = SS(1:nj,1:nj); Sjr = SS(1:nj,nj+1:nj+nr);
62 Srr = SS(nj+1:nj+nr,nj+1:nj+nr); Srj = SS(nj+1:nj+nr,1:nj);
63

64 % Applied structure action vector Aj along Djs (free joints)


65 % Equivalent nodal load
66 Aj = [P1;-Fx(1);-M1-Fx(2);0;-Fx(3);M2-Fx(4);0;0];
67

@seismicisolation
@seismicisolation
The Formalized Methods 169

68 % Structure free joint displacements Dj


69 Dj = inv(Sjj)*Aj
70

71 % The reactions are


72 Ar = Arf + Srj*Dj
73 Dr = [0 0 0 0]'; % Zero Displacements @ the reactions
74

75 % Complete Structure Displacements Ds are


76 Ds = [Dj;Dr]
77

78 % Member displacements Dm are


79 Dm = Cms*Ds
80

81 % Member actions Am, in kN and kN-m


82 Am = Amf + SM*Dm
83

84 % END: ........... Example 3.8

Example 3.9 Analyze the grid structure shown in Figure 3.34 using the formalized
stiffness method. All members have E = 29,000 ksi, G = 11,500 ksi; I = 1350 in4 and
J = 250 in4 .

SOLUTION
Step 1: The grid frame is kinematically indeterminate to the third degree. A basic
structure is created by restraining node-1 as shown in Figure 3.35(b).

FIGURE 3.34 Grid Structure Having Three-members.

@seismicisolation
@seismicisolation
170 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.35 Member Actions of the Grid Structure.

Figure 3.35(a) also shows the three free-joint displacements on the grid (DJ1 –
DJ3 ), and the redundant actions (Aq1 to Aq9 ) properly labeled. The member actions
and their orientations are also shown in Figure 3.35(b); the actions AMi1 , AMi2 and
AMi3 are the shear force, twisting moment and bending moment in member i at its
second node, respectively.
Step 2: The fixed-end actions for the two members that are loaded is computed
in Table 3.12. Thus, the nodal load vector A j s and member fixed-end-action compo-
nents AFm as well as AR f given as follows.

−24.616
 

A j =  −3.694 
 

12.5

TABLE 3.12
Fixed-End-Actions on the Members of the Grid Structure
Member 1 3
Joint 1 2 1 4

VF (k) 3 3 1.616 0.544


MF (k f t) 12.5 −12.5 3.694 −2.138
@seismicisolation
@seismicisolation
The Formalized Methods 171

Given in line #66 of the Scilab/Octave code at the end.

   
3k 3k
   

 0 


 0 

 −12.5 k · f t  12.5 k · f t
   
 
   

 0 


 0 

F F
   
Am = 
 0 
 and AR = 
 0 

   
 0   0 
   
 0.544 k · f t  0.544 k · f t
   
 
   

 0 


 0 

−2.138 −2.138

Given in line #63–64 of the Scilab/Octave code at the end.

Step 3: The stiffness matrices of each frame element is computed using Equation
(3.24) as shown below.

12EIi − 6EIi
 
 L3 0
 i Li2  
 Li 
smi =  0
 

 GJi 
 
 − 6EIi 4EIi 
0
Li2 Li

Given in line #23–27 of the Scilab/Octave code at the end.

The unassembled structure stiffness matrix SM of the grid frame is a 9 × 9 matrix


given in Table 3.13.

Given in line #30–39 of the Scilab/Octave code at the end.

Step 4: Displacement-transformation matrix (CMS ) is determined by exerting on


the primary structure a unit value of each of the DJ s and DR s and then computing the
corresponding member actions. This operation is prepared as shown in Table 3.14.

Given in line #45 of the Scilab/Octave code at the end.

Step 5: The structure stiffness matrix SS is computed using the following equa-
tion:
T × S ×C
SS = CMS M MS
@seismicisolation
@seismicisolation
172
TABLE 3.13
Unassembled Stiffness Matrix of the Three-Members Grid
 
208.80 0 −2610 0 0 0 0 0 0

Matrix Structural Analysis and the Finite Element Methods


 
 
 0 798.61 0 0 0 0 0 0 0 
 
 −2610
 
0 43500 0 0 0 0 0 0 
 
−1919.12
 
 0 0 0 131.65 0 0 0 0 
 
SM = 
 
0 0 0 0 684.80 0 0 0 0 
 
−1919.12
 
 0 0 0 0 37300.94 0 0 0 
 
−7250
 
 0 0 0 0 0 0 966.67 0 
 
 
 0 0 0 0 0 0 0 1331.02 0 
 
0 0 0 0 0 0 −7250 0 72500

@seismicisolation
@seismicisolation
The Formalized Methods
TABLE 3.14
Displacement Transformation Matrix for the Grid Structure

DJ1 DJ2 DJ3 DR1 DR2 DR3 DR4 DR5 DR6 DR7 DR8 DR9

Dm11 −1 0 25 1 0 0 0 0 0 0 0 0
Dm12 0 −1 0 0 1 0 0 0 0 0 0 0
Dm13 0 0 1 0 0 −1 0 0 0 0 0 0
Dm21 −1 −15 25 0 0 0 1 0 0 0 0 0
Dm22 0 −0.8575 −0.5145 0 0 0 0 1 0 0 0 0
Dm23 0 −0.5145 0.8575 0 0 0 0 0 1 0 0 0
Dm31 −1 −15 0 0 0 0 0 0 0 1 0 0
Dm32 0 0 −1 0 0 0 0 0 0 0 1 0
Dm33 0 −1 0 0 0 0 0 0 0 0 0 1

173
@seismicisolation
@seismicisolation
174

 
1.307 8.237 −4.256 −0.209 0 −2.610 −0.132 0 1.919 −0.967 0 7.25
 
 8.237 83.676 −16.154 0 −0.799 0 −0.987 −0.587 9.595 −7.25 0 36.25 
 
 −4.256 −16.154 72.439 2.610 0 21.750 1.646 −0.352 −15.992 0 −1.331 0 
 
 

 −0.209 0 2.610 0.209 0 2.610 0 0 0 0 0 0 

 

 0 −0.799 0 0 0.799 0 0 0 0 0 0 0 

 
 −2.610 0 21.750 2.610 0 43.5 0 0 0 0 0 0 
SS = 103 × 


 −0.132 −0.987 1.646 0 0 0 0.132 0 −1.919 0 0 0 

 

 0 −0.587 −0.352 0 0 0 0 0.685 0 0 0 0 

@seismicisolation
 

@seismicisolation

 1.919 9.595 −15.992 0 0 0 −1.919 0 37.301 0 0 0 

 
 −0.967 −7.25 0 0 0 0 0 0 0 0.967 0 −7.25 
 
 0 0 −1.331 0 0 0 0 0 0 0 1.331 0 
 
7.25 36.25 0 0 0 0 0 0 0 −7.25 0 72.5
Matrix Structural Analysis and the Finite Element Methods
The Formalized Methods 175

Given in line #48 of the Scilab/Octave code at the end.

The Ss matrix is then partitioned into four components as follows:


 
S j j S jr 
Ss = 



Sr j Srr

Given in line #51–53 of the Scilab/Octave code at the end.

Step 6: The unknown nodal displacements DJ s are solved as shown below:

D j = S−1
jj ×Aj

−0.06045
 

⇒ D j =  0.00549  ANS
 

−0.00215

Given in line #70 of the Scilab/Octave code at the end.

This is a downward displacement of 6.045 cm at node-1 of the structure associ-


ated with rotations of 0.00549 and −0.00215 radians about the global x and y axes,
respectively. The complete structure displacements vector Ds is found by augmenting
D j and Dr (9 zeros representing the fixed support displacements), as follows:
 
−0.06045
 
 0.00549 
 
 −0.00215 
 
 

 0 

 

 0 

" # 
Dj 0

 
Ds = = 
Dr 
 0 

 

 0 

 

 0 

0
 
 
 

 0 

0

@seismicisolation
@seismicisolation
176 Matrix Structural Analysis and the Finite Element Methods

Given in line #74 of the Scilab/Octave code at the end.

The structure reactions Ar are computed using Equation (3.13), as shown below:
 
10 k
 
 −4.39 k f t 
 
 
 
 123.41 k f t 
 
−1.01 k
 
 
 
F
Ar = Ar + Sr j × D j =  −2.47 k f t 
 
 
 −28.87 k f t 
 
 
 
 19.17 k 
 
 
 2.87 k f t 
 
−241.34 k f t

Given in line #83 of the Scilab/Octave code at the end.

The member actions Am are computed by adding the member fixed-end actions
AFm and the results obtained from (Dm = Cms × DS ), as shown below.
   
3. 7
   
  −4.38 
   
 0.
   
 −12.5   −110.91 
   
   
  −1.01 
   
 0.
   
Am = Am f + Sm ×Cms × Ds =   +  −2.47 
   
0.
   
  −28.87 
   
 0.
   
   
 0.544   18.62 
   
   
 0.   2.87 
   
−2.138 −239.2

@seismicisolation
@seismicisolation
The Formalized Methods 177
   
Am11 10 k
   
−4.38 k f t
   
 Am12   
   
−123.41 k f t 
   
 Am13  
   
−1.01 k
   
 Am21   
   
⇒ = −2.47 k f t 
   
Am22
   
−28.87 k f t 
   
 Am23  
   
   
 Am31   19.17 k 
   
   
 Am32   2.87 k f t 
   
Am33 −241.34 k f t

Given in line #80 of the Scilab/Octave code at the end.

Finally, the complete analysis result has been shown in Figure 3.17 of Example
3.4, and Scilab code for the current solution is as given below.

Scilab/Octave Code
1 clear;
2 // Example 3.9 - 3-member Grid Structure
3 // Formalized Stiffness Method
4

5 // Common units for analysis: Force in kips, Length in ft


6

7 // Given parameters constants:


8 E = 29000*144; G = 11500*144; // in k/ft^2
9 w = 0.24; P = 20; // in k/ft, k
10 I = 1350/(12^4); J = 250/(12^4); // in ft^4
11 Ls = [25,sqrt(25^2+15^2),15]; // in ft
12 a = 9;
13 // ft, partially loaded part
14 EI = E*I; GJ = G*J;
15

16 // A grid member has 3 DOFs at each strucure joints;


17 DOF = 3;
18

19 // Number of embers, free-joint displacements & reactions


20 nm = 3; ndj = 3; nr = 9;
21

22 // Function to compute grid element stiffness matrix


23 function [sm] = stiff_grid(L, GJ, EI)

@seismicisolation
@seismicisolation
178 Matrix Structural Analysis and the Finite Element Methods

24 sm = [12*EI/L^3 0 -6*EI/L^2;
25 0 GJ/L 0;
26 -6*EI/L^2 0 4*EI/L];
27 endfunction
28

29 // Unassembled structure stiffness matrix


30 SM = zeros(DOF*nm,DOF*nm); // Initialize SM with 0s
31 // Stiffness matrix of each member is computed calling
32 // the 'stiff_grid' function with parameters;
33 // each member stiffness is placed along the diagonal
34 start_at = 1 // begin at Member 1
35 st = start_at; // shorter name
36 for i=1:nm
37 SM(st:st+2,st:st+2) = stiff_grid(Ls(i),GJ,EI);
38 st = st + DOF;
39 end
40

41 // Read the displacement transformation matrix from a file.


42 // It shall be prepared according to Table 3.14.
43 // The file for this example is named "Ex3.9-CMS.txt".
44 // Displacement-transformation matrix Cms
45 Cms = fscanfMat("Ex3.9-CMS.txt")
46

47 // Assembled structure stiffness matrix SS


48 SS = Cms'*SM*Cms
49

50 // Partitioning the SS matrix


51 Sjj = SS(1:ndj,1:ndj); Sjr = SS(1:ndj,ndj+1:ndj+nr);
52 Srj = SS(ndj+1:ndj+nr,1:ndj);
53 Srr = SS(ndj+1:ndj+nr,ndj+1:ndj+nr);
54

55 // Fixed-end actions equations


56 V11 = w*Ls(1)/2; V12 = V11; // member 1 shear
57 M11 = w*Ls(1)^2/12; M12 = -M11; // member 1 moment
58 M31 = w*a^2*(6*Ls(3)^2-8*a*Ls(3)+3*a^2)/(12*Ls(3)^2);
59 M32 = -w*a^3*(4*Ls(3)-3*a)/(12*Ls(3)^2); // member 3 moment
60 V31 = (M31+M32+w*a*(Ls(3)-a/2))/Ls(3); // member 3 shear
61 V32 = w*a-V31;
62 // Fixed-end actions along member actions (Am's)
63 Amf = [V12;0; M12;0;0;0;V32;0; -M32];
64 Arf = [V12;0; -M12;0;0;0;V32;0; M32];
65

66 // Applied structure action vector Aj @ Djs (free joints)


67 Aj = [-(P+V11+V31);-M31;M11];
68

@seismicisolation
@seismicisolation
The Formalized Methods 179

69 // The redundant actions are


70 Dj = inv(Sjj)*Aj
71 Dr = zeros(9,1)
72

73 // Complete Structure Displacements Ds, in mm


74 Ds = [Dj;Dr]
75

76 // Member displacements Am, in mm/rad


77 Dm = Cms*Ds
78

79 // Member actions Am, in k and k-ft


80 Am = Amf + SM*Dm
81

82 // Remaining reaction forces


83 Ar = Arf + Srj*Dj
84

85 // END: ........... Example 3.9

Example 3.10 Analyze the space frame structure shown in Figure 3.36 using the
formalized stiffness method. All members have E = 30 GPa, G = 12.5 GPa; Iy =
650e6 mm4 , Iz = 650e6 mm4 , J = 120e6 mm4 , and A = 90,000 mm2 . Use P1 = 25 kN,
P2 = 10 kN, P3 = 80 kN, M1 = 30 kN m, M2 = 15 kN m and M3 = 25 kN m.

FIGURE 3.36 Space Frame Structure Having Three-Members.

@seismicisolation
@seismicisolation
180 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.37 Basic Structure of the Space Frame.

SOLUTION
Step 1: The space frame is kinematically indeterminate to the fifteenth degree. A
basic structure is created by restraining all these DOFs, as shown in Figure 3.37(a);
while the nine reaction forces of the space frame are labeled Ar1 to Ar9 in Figure
3.37(b). The fifteen free-joint displacements on the space frame (DJ1 to DJ15 ) are

@seismicisolation
@seismicisolation
The Formalized Methods 181

FIGURE 3.38 Free-Joint Displacements of the Space Frame.

shown properly labeled in Figure 3.38(a). The member actions and their orientations
are also shown in Figure 3.38(b); each member has six internal action components
Ami j .6
Step 2: There are no fixed-end actions for the space frame since all actions are
nodal loads, which is given by the following equation.
6 i stands for the member number while j is the one of the six DOFs of the member (axial, shear in y,

shear in z, torsion, moment about z, moment about y).

@seismicisolation
@seismicisolation
182 Matrix Structural Analysis and the Finite Element Methods
 
0
−P1 
 

 

 P2 
 

 0 
 

 M1 
0 
 

 

 0 
 
Aj = 
 0 
−P3 
 

 
M2 
 

 

 0 
 

 0 
 
 0 
 

 M3 
0

Given in line #65 of the Scilab/Octave code at the end.

Step 3: The stiffness matrices of each frame element is computed using Equation
(3.25) as shown below.

 
(EA)i
 L 0 0 0 0 0 
 i 
 
 12(EIz )i 6(EIz )i 
 0 0 0 0 − 

 Li3 Li2  
12(EIy )i 6(EIy )i
 
 
 0 0 0 0
Li3 Li2

 
smi =  

 0 (GJ)i 
0 0 0 0 
Li
 
 
 

 0 6(EIy )i 4(EIy )i 
0 0 0 

 Li2 Li 

6(EIz )i 4(EIz )i 
 

0 − 0 0 0
Li2 Li

@seismicisolation
@seismicisolation
The Formalized Methods 183

The unassembled structure stiffness matrix SM of the space frame is an 18 × 18


matrix given as shown below.

 
0.011 0 0 0 0 0
 
 

 0 50 0 0 0 25 

 
 
 0 0 30 0 −15 0 
sm1 = 10−3 × 
 

 
 0 0 0 20 0 0 
 
 
0 0 −15 0 10 0
 
 
 
 
0 25 0 0 0 16.67

 
0.007 0 0 0 0 0
 
 

 0 14.81 0 0 0 11.11 

 
 
 0 0 8.89 0 −6.67 0 
sm2 = 10−3 × 
 

 
 0 0 0 13.33 0 0 
 
 
0 0 −6.67 0 6.67 0 
 

 
 
0 11.11 0 0 0 11.11

 
0.011 0 0 0 0 0
 
 

 0 50 0 0 0 25 

 
 
 0 0 30 0 −15 0 
−3 
sm3 = 10 × 


0 0 0 20 0 0
 
 
 
 

 0 0 −15 0 10 0 

 
0 25 0 0 0 16.67

Given in line #26–39 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
184 Matrix Structural Analysis and the Finite Element Methods

 
sm1 0 0
 
 
⇒ SM = 
 0 sm2 0 

 
0 0 sm3

Given in line #43–47 of the Scilab/Octave code at the end.

Step 4: Displacement-transformation matrix (CMS ) is determined by exerting on


the basic structure a unit value of each of the DJ s and Dr s and then evaluating the
corresponding member displacements. This operation is prepared as shown in Table
3.15.

Given in line #54 of the Scilab/Octave code at the end.

Step 5: The assembled structure stiffness matrix SS is computed using the follow-
ing equation:
T × S ×C
SS = CMS M MS

Given in line #57 of the Scilab/Octave code at the end.

The SS matrix is a 24 × 24 matrix and will not be shown here; it is partitioned


into four components as follows, and the s j j matrix is shown in Equation (3.36).
 
s j j s jr 
Ss = 



sr j srr

@seismicisolation
@seismicisolation
The Formalized Methods
TABLE 3.15
Compatibility Matrix for the Space Frame Structure

D j1 D j2 D j3 D j4 D j5 D j6 D j7 D j8 D j9 D j10 D j11 D j12 D j13 D j14 D j15 Dr1 Dr2 Dr3 Dr4 Dr5 Dr6 Dr7 Dr8 Dr9
Dm11 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 −1 0 0 0 0 0 0
Dm12 0 −1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 −3 0 0 0 0 0
Dm13 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 −1 0 0 0 −3 0 0 0 0
Dm14 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 −1 0 0 0
Dm15 0 0 0 0 −1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
Dm16 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 −1 0 0 0 0 0
Dm21 −1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Dm22 0 0 −1 0 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Dm23 0 1 0 0 0 2 0 −1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Dm24 0 0 0 −1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Dm25 0 0 0 0 0 −1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Dm26 0 0 0 0 −1 0 0 0 0 0 −1 0 0 0 0 0 0 0 0 0 0 0 0 0
Dm31 0 0 0 0 0 0 0 −1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
Dm32 0 0 0 0 0 0 0 0 −1 −3 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Dm33 0 0 0 0 0 0 −1 0 0 0 0 3 0 0 0 0 0 0 0 0 0 1 0 0
Dm34 0 0 0 0 0 0 0 0 0 0 −1 0 0 1 0 0 0 0 0 0 0 0 0 0
Dm35 0 0 0 0 0 0 0 0 0 0 0 −1 0 0 1 0 0 0 0 0 0 0 0 0

185
Dm36 0 0 0 0 0 0 0 0 0 −1 0 0 1 0 0 0 0 0 0 0 0 0 0 0

@seismicisolation
@seismicisolation
186
s j j = 103 ×
 
1358.67 0 0 0 −13 0 −1350 0 0 0 0 0 0 0 0
0 36.583 0 11 0 29.25 0 −29.25 0 0 0 29.25 0 0 0 
 

 

 0 0 924.75 0 −24.75 0 0 0 −24.75 0 −24.75 0 0 0 0 

 

 0 11 0 22.75 0 0 0 0 0 −0.75 0 0 0 0 0 

 
−13 0 −24.75 0 59 0 0 0 24.75 0 16.5 0 0 0 0

Matrix Structural Analysis and the Finite Element Methods


 
 
0 29.25 0 0 0 39.5 0 −29.25 0 0 0 19.5 0 0 0 
 

 
 −1350 0 0 0 0 0 1358.67 0 0 0 0 −13 0 0 −13 
 
 

 0 −29.25 0 0 0 −29.25 0 929.25 0 0 0 −29.25 0 0 0 

0 −24.75
 
 0 0 24.75 0 0 0 32.08 11 24.75 0 11 0 0
 
0 0 0 −0.75 0 0 0 0 11 22.75 0 0 11 0 0 
 

 

 0 0 −24.75 0 16.5 0 0 0 24.75 0 33.5 0 0 −0.5 0 

 

 0 29.25 0 0 0 19.5 −13 −29.25 0 0 0 65 0 0 13 

 
 0 0 0 0 0 0 0 0 11 11 0 0 22 0 0
 

 0 0 0 0 0 0 0 0 0 0 −0.5 0 0 0.5 0 

0 0 0 0 0 0 −13 0 0 0 0 13 0 0 26
(3.36)

@seismicisolation
@seismicisolation
The Formalized Methods 187

Given in line #61–62 of the Scilab/Octave code at the end.

Step 6: The nodal displacements D j s is solved as shown below:

D j = s−1
jj ×Aj

   
0.037087 m D j1
−0.010292 m  D j2 
   
   
−0.000101 m  D 
   j3 
   
0.005635 rad   D j4 
   
   
0.026871 rad   D j5 
   
0.003675 rad   D j6 
   
   
 0.037066 m   D 
   j7 
   
 0.000045 m  ⇐  D j8 
Dj =  ANS
  
−0.067451 m  D j9 
   
   
0.022600 rad  D j10 
   
   
0.037718 rad  D 
   j11 
   
0.008062 rad  D j12 
   
   
0.022425 rad  D j13 
   
0.087718 rad  D 
   j14 
0.014502 rad D j15

Given in line #68 of the Scilab/Octave code at the end.

The complete structure displacements Ds is found by augmenting D j and (Dr =


zeros(9, 1)) as follows:

@seismicisolation
@seismicisolation
188 Matrix Structural Analysis and the Finite Element Methods

 
0.037087

−0.010292

 
−0.000101
 
 
 0.005635 
 
 
 0.026871 
 
 
 0.003675 
 
 0.037066 
 
 
 0.000045 
 
 
−0.067451
 

 0.0226 

 
 0.037718 
 
" #  
Dj  0.008062 
 
Ds = = 
Dr  0.022425 
 
 0.087718 
 
 
 0.014502 
 
 

 0 

 

 0 

0
 
 
 

 0 

 

 0 

 
 0 
 
0
 
 
 

 0 

0

The reaction forces Ar are computed using Equation (3.13), as shown below; the
linear displacements are in m while the rotational ones are in radian.

@seismicisolation
@seismicisolation
The Formalized Methods 189

 
27.91 kN
 
 
 15.94 kN 
 
 
 90.76 kN 
 
 −60.54 kN m
 

 
Ar = Sr j × D j =  −132.80 kN m
 

 
 −1.84 kN m
 

 
 −27.91 kN
 

 
 
 40.94 kN 
 
−0.76 kN

Given in line #74 of the Scilab/Octave code at the end.

Since there are no fixed-end actions, the member actions Am are obtained from
Equation (3.27), as shown below.

@seismicisolation
@seismicisolation
190 Matrix Structural Analysis and the Finite Element Methods

 
−90.76 kN
 
 

 15.94 kN 

 
 
 −27.9 kN 
 
 
 1.84 kN m
 

 
 
 −216.52 kN m 
 
 
 
 12.72 kN m 
 
 
 
 −27.9 kN 
 
 
 −80.76 kN
 

 
 

 40.94 kN 

Am = SM × Dm = SM × (Cms × Ds ) = 



 12.72 kN m 
 
 
 
 83.71 kN m 
 
 
 −25 kN m
 

 
 
 −40.94 kN 
 
 
 
 −0.76 kN 
 
 
 −27.9 kN
 

 
 
25 kN m
 
 
 
 

 0 

 
0

Given in line #77 of the Scilab/Octave code at the end.

Scilab/Octave Code
1 % Example 3.10 - Space frame having three members
2 % Formalized Stiffness Method
3

4 clear all; clc


5 % Common units used for analysis: Force in kN, Length in m

@seismicisolation
@seismicisolation
The Formalized Methods 191

7 % Given parameters & constants in appropriate units:


8 E = 30e6; G = 12.5e6; % in kN/m^2
9 A = 90e-3; J = 120e-6; % in m^2, m^4
10 Iy = 650e-6; Iz = 650e-6; % in m^2, m^4
11 EA = E*A; GJ = G*J; EIy = E*Iy; EIz = E*Iz;
12

13 P1 = 25; P2 = 10; P3 = 80; % in kN


14 M1 = 30; M2 = 15; M3 = 25; % in kN-m
15

16 % Member lengths
17 Ls = [3, 2, 3] % in m
18

19 % A space frame member has 6-DOF @ each end


20 DOF = 6;
21

22 % Number of members, free-joint displacements, reactions


23 nm = 3; nj = 15; nr = 9;
24

25 % Function to compute space frame element stiffness matrix


26 function [sm] = stiff_sf(L, EA, GJ, EIy, EIz)
27 sm = [EA/L, 0, 0, 0, 0, 0;
28 0 (12*EIz)/L^3 0 0 0 -(6*EIz)/L^2;
29 0 0 (12*EIy)/L^3 0 (6*EIy)/L^2 0;
30 0, 0, 0, GJ/L, 0, 0;
31 0 0 (6*EIy)/L^2 0 4*EIy/L 0;
32 0 -(6*EIz)/L^2 0 0 0 4*EIz/L];
33 endfunction
34

35 % Stiffness matrix of each member;


36 % calling the above 'stiff_sf' function with parameters
37 sm1 = stiff_sf(Ls(1), EA, GJ, EIy, EIz);
38 sm2 = stiff_sf(Ls(2), EA, GJ, EIy, EIz);
39 sm3 = stiff_sf(Ls(3), EA, GJ, EIy, EIz);
40

41 % Unassembled structure stiffness


42 % Initialize SM with 0s, square matrix
43 SM = zeros(DOF*nm);
44 % Place each member stiffness along SM diagonal
45 st = 1; SM(st:st+DOF-1,st:st+DOF-1) = sm1;
46 st = st + DOF; SM(st:st+DOF-1,st:st+DOF-1) = sm2;
47 st = st + DOF; SM(st:st+DOF-1,st:st+DOF-1) = sm3;
48

49 % Read from file the displacement transformation matrix.


50 % It shall be prepared in tabular format,

@seismicisolation
@seismicisolation
192 Matrix Structural Analysis and the Finite Element Methods

51 % separating each element with a space


52 % The file for this example is named "Ex3.10-CMS.txt".
53 % Displacement-transformation matrix Cms
54 Cms = load("Ex3.10-CMS.txt")
55

56 % Assembled structure stiffness matrix SS


57 SS = Cms'*SM*Cms
58 %csvwrite("Ex3.10-SS.txt",SS)
59

60 % Partitioning the SS matrix


61 sjj = SS(1:nj,1:nj); srr = SS(nj+1:nj+nr,nj+1:nj+nr);
62 sjr = SS(1:nj,nj+1:nj+nr); srj = SS(nj+1:nj+nr,1:nj);
63

64 % Applied structure action vector Aj along Djs (free joints)


65 Aj = [0; P1; -P2; 0; M1; 0; 0; 0; -P3; M2; 0; 0; 0; M3; 0];
66

67 % The unknown joint displacements are


68 Dj = inv(sjj)*Aj
69

70 % Complete Structure Displacement vector Ds


71 Ds = [Dj;zeros(9,1)]
72

73 % Structure reactions Ar are given by:


74 Ar = srj*Dj
75

76 % Member actions Am, in kN and kN-m


77 Am = SM*Cms*Ds
78

79 % END: ........... Example 3.10

3.3 PROBLEMS
3.1 List down the steps to analyze a structure using the formalized flexibility method.
What are the differences between the basic- and formalized-flexibility methods?
3.2 List down the steps to analyze a structure using the formalized stiffness method.
What are the differences between the basic- and formalized stiffness methods?
3.3 (a) What are primary and basic structures? (b) Define the action-transformation
matrix. (c) Define the displacement transformation matrix.
3.4 Analyze the two-span beam in Problem 2.5 using the formalized flexibility
method.

@seismicisolation
@seismicisolation
The Formalized Methods 193

3.5 Analyze the two-span beam in Problem 2.6 using the formalized flexibility
method.
3.6 Analyze the plane truss in Problem 2.7 using the formalized flexibility method.
3.7 Analyze the plane truss in Problem 2.8 using the formalized flexibility method.
3.8 Analyze the plane frame in Problem 2.9 using the formalized flexibility method.

3.9 Analyze the grid structure in Problem 2.10 using the formalized flexibility
method.
3.10 Analyze the two span beam in Problem 2.5 using the formalized stiffness
method.

3.11 Analyze the two span beam in Problem 2.6 using the formalized stiffness
method.
3.12 Analyze the plane truss in Problem 2.7 using the formalized stiffness method.
3.13 Analyze the plane truss in Problem 2.8 using the formalized stiffness method.

3.14 Analyze the plane frame in Problem 2.9 using the formalized stiffness method.
3.15 Analyze the grid structure in Problem 2.10 using the formalized stiffness
method.

3.16 Analyze the plane truss given in Figure 3.39(a) using the formalized flexibility
method considering that the reactions at node 1 and 4 as well as the force in member
3 are the redundant. Use L = 3.5 m, P1 = 20 kN and P2 = 35 kN and EA = 120e6
kN for all members (FPS: L = 12 ft, P1 = 4.5 kips and P2 = 8 kips and EA = 27e6
kips for all members).
3.17 Analyze the plane truss given in Figure 3.39(b) using the formalized flexibility
method considering the reactions at node 3 and the force in member 5 are redundant
actions. L = 12 ft, P1 = 4.5 kips, P2 = 8 kips and EA = 27e6 kips for all members (SI:
Use L = 3.5 m, P1 = 20 kN and P2 = 35 kN and EA = 120e6 kN for all members).
3.18 Analyze the beam given in Figure 3.39(c) using the formalized flexibility method
considering the reactions at nodes 2 and 3 are the redundant actions. Use L1 = L2
= 2(L3) = 6 m, w = 25 kN/m, E = 120 GPa and I1 = 2(I2)/3 = I3 = 50e6 mm4 (FPS:
Use L1 = L2 = 2(L3) = 20 ft, w = 2 kips/ft, E = 17,500 ksi and I1 = 2(I2)/3 = I3 =
120 in4 ).
3.19 Analyze the plane frame given in Figure 3.39(d) using the formalized flexibility
method considering the reactions at nodes 1, 4 and 6 are the redundant actions. Use
Use L = 20 ft, w = 1000 lb/ft, E = 30,000 ksi, A = 40 in2 and I = 150 in4 (SI: L = 4
m, w = 12 kN/m, P = 60 kN E = 207 GPa, A = 25,000 mm2 and I = 60e6 mm4 ).

@seismicisolation
@seismicisolation
194 Matrix Structural Analysis and the Finite Element Methods

FIGURE 3.39 Problems Set 3.

3.20 Analyze the grid structure shown in Figure 3.39(e) using the formalized flexi-
bility method considering the reactions at nodes 2, 6 and 7 as well as the internal
forces in member 4-5 are the redundant actions. Use L = 3 m, E = 210 GPa, P = 80
kN, Mx1 = Mx2 = 20 kN-m, I = 500e6 mm4 and J = 900e6 mm4 for members 2–3
and 4–5, I = 300e6 mm4 and J = 500e6 mm4 for remaining five members (FPS: Use
L = 10 ft, E = 30,000 ksi, P = 2 kips, Mx1 = Mx2 = 15 kip-ft, I = 1200 in4 and J =
2200 in4 for members 2–3 and 4–5, I = 720 in4 and J = 1200 in4 for remaining five
members).
3.21 Analyze the space truss given in Figure 3.39(f) using the formalized flexibility
method considering the force in members 1–4 is the redundant action. Use L = 18

@seismicisolation
@seismicisolation
The Formalized Methods 195

ft, B = 24 ft, H = 15 ft, Fx = 4.5 kips, Fy = 8 kips, Fz = 20 kips and A = 5 in2 , E =


30,000 ksi for all members (SI: Use L = 6 m, B = 8 m, H = 5 m, Fx = 20 kN, Fy =
35 kN, Fz = 90 kN and A = 3000 mm2 , E = 210e6 GPa for all members).
3.22 Analyze the space frame shown in Figure 3.39(g) using the formalized flexibility
method. Since the structure is statically indeterminate to the 24th degree, consider
the reactions at the fixed supports 1 and 4 and also the member forces in 6–7 and
5–8 are the redundant actions. Use w = 20 kN/m, L = 6 m, B = 4.5 m, H = 3.5 m, E =
120 GPa. The cross-sectional properties are A = 50,000 mm2 , Ix = Iy = 150e6 mm4 ,
J = 300e6 mm4 for the beams and A = 30,000 mm2 , Ix = Iy = 120e6 mm4 , J = 240e6
mm4 for the columns (FPS: w = 1.5 kip/ft, L = 20 ft, B = 15 ft, H = 11.5 ft, E =
17,500 ksi. The cross-sectional properties are A = 80 in2 , Ix = Iy = 360 in4 , J = 720
in4 for the beams and A = 45 in2 , Ix = Iy = 280 in4 , J = 560 in4 for the columns).

3.23 Analyze the plane truss given in Problem 3.16 using the formalized stiffness
method.
3.24 Analyze the plane truss given in Problem 3.17 using the formalized stiffness
method.

3.25 Analyze the beam given in Problem 3.18 using the formalized stiffness method.
3.26 Analyze the plane frame given in Problem 3.19 using the formalized stiffness
method.
3.27 Analyze the grid structure given in Problem 3.20 using the formalized stiffness
method.

3.28 Analyze the space truss given in Problem 3.21 using the formalized stiffness
method.
3.29 Analyze the space frame given in Problem 3.22 using the formalized stiffness
method.

@seismicisolation
@seismicisolation
4 The Direct Stiffness
Method
4.1 INTRODUCTION
The direct stiffness method (DSM) is the standard method in the matrix structural
analysis, and it serves as the basis for structural analysis using the displacement
method. The DSM starts analysis by selecting a global coordinate system (GCS) for
the whole structure. Then, identifying and numbering the elements as well as the
global (free and restrained) DOFs of the given structure is performed, followed by
computing element stiffness matrices of each member in the selected GCS relating
the displacements and actions at both ends of the member. This is quite, different
from what has been discussed as element stiffness in the previous chapter; where the
action am and displacement dm of the member at node-2 were related by the element
stiffness matrix Sm , see Equation (3.20). The assembly process (combining element
stiffness matrices into a large structure matrix) relates the displacements and actions
of the structure along the selected GCS, resulting in a singular matrix Ss . Applying
the support boundary conditions (Dr = 0) by partitioning this matrix results in a
non-singular modified structure stiffness matrix S j . After determining the nodal load
vector A j (both from applied joint loads and member fixed-end-actions converted
into equivalent nodal loads), the free joint displacements of the structure (D j ) can be
easily solved for using the Equation (4.1).
After studying the chapter, the reader will be able to:
• Identify and number the members, nodal displacements and the correspond-
ing actions in prismatic structures
• Derive the complete stiffness matrix of bar, spring and beam elements
• Derive the complete stiffness matrix of the plane truss, plane frame and grid
elements in the local and global coordinates
• Derive the complete stiffness matrix of space truss and space frame ele-
ments in the local and global coordinates
• Assemble the structure stiffness matrix by “selectively adding” the element
stiffness
• Assemble the nodal load vector of a given structure using the equivalent
nodal load principle
• Apply the given boundary conditions and solve for the nodal displacements
of any framed (prismatic) structure
• Determine the structure reaction forces and the member forces to complete
the structural analysis using the DSM

D j = S−1
j ×Aj (4.1)

DOI:10.1201/9781003329350-5@seismicisolation
@seismicisolation 196
The Direct Stiffness Method 197

FIGURE 4.1 Spring Element.

4.2 COMPLETE MEMBER STIFFNESS


This section derives the complete member stiffness matrix for the various prismatic
members encountered in matrix structural analysis.

4.2.1 Spring and Bar Elements


A spring element is a one-dimensional (1D) structural member that only only carries
tension or compression. The global coordinate for such members is along the axis of
the spring (directed from node-1 to node-2). It is assumed to have a constant spring
stiffness (k); i.e., a force of k is required to move one end of the spring relative to
the other; see Figure 4.1(a). In Figure 4.1(b) and (c), unit displacements along the
assumed +X direction have been exerted at nodes 1 and 2, respectively, and then the
actions required (stiffness) are determined.
Since a spring element has two degrees of freedom, its (complete) stiffness matrix
is the 2 × 2 matrix, as shown in Equation (4.2).
 
k −k
s= (4.2)
−k k
A bar element is also a 1D1 structural member that only carries tension or com-
pression. The global coordinate for such members is parallel to the line connecting
the two ends. Unlike springs, the stiffness of a bar element is dependent on the length
(L), cross-sectional area (A) and modulus of elasticity (E). Figure 4.2(a) shows a bar
element; in 4.2(b) and (c) unit displacements along the assumed +X coordinate have
been exerted at nodes 1 and 2, respectively. Thus, the forces needed to cause a unit
displacement at nodes 1 and 2 are s11 = s22 = E·A L , while the corresponding support
E·A
reactions are s12 = s21 = − L .

1 1D ⇒ Only one axis is needed to describe each member of the structure and also all the forces and

displacements involved.

@seismicisolation
@seismicisolation
198 Matrix Structural Analysis and the Finite Element Methods

FIGURE 4.2 Bar Element.

Since a bar element has two degrees of freedom, its stiffness matrix is the 2 × 2
matrix shown in Equation (4.3).
 
EA EA
 L −
L
s=
 EA
 (4.3)
EA 

L L

4.2.2 Beam
A beam element is a two-dimensional (2D) structural member that carries bending-
type actions and has two degrees of freedom at both ends (transverse displacement
and rotation). Figure 4.3(a) shows a beam element with the four DOFs, while in
4.3(b) through (e) show unit displacements exerted along each DOF. Note that d1 and
d3 are linear transverse displacements while d2 and d4 are rotations (conventionally
assumed positive in the counterclockwise direction).
The actions required, i.e., the stiffness of the beam, for each case are computed
and gathered in Equation (4.4).

 
12EI 6EI 12EI 6EI
 L3 −
 L2 L3 L2 
 
 6EI 4EI 6EI 2EI 

 
 L2 L2
 
L L 
s=


 (4.4)
 12EI 6EI 12EI 6EI 
− − 2 − 2
 L3 L L3 L 
 
 
 6EI 2EI 6EI 4EI 

L2 L L2 L

@seismicisolation
@seismicisolation
The Direct Stiffness Method 199

FIGURE 4.3 Beam Element.

4.2.3 Plane Truss


A plane truss element is also a 2D structural member that only carries tension or
compression. However, the end nodes can move in the member (axial) and the per-
pendicular (transverse) directions. Unlike a spring/bar or beam, a truss member’s
local coordinate is generally oriented at some angle to the global coordinate sys-
tem – which is common and unique for all members in the truss. Therefore, the
global stiffness of a truss element is dependent on the length (L), cross-sectional
area (A), modulus of elasticity (E) and its orientation from the global coordinate
system. Figure 4.4 shows a truss element in the global coordinate system. Its local
coordinate system is x̂ − ŷ and the member is inclined at an angle θ from the global
X-axis.2 Note that dˆ1 and dˆ3 are axial displacements while dˆ2 and dˆ4 are transverse
displacements, all in the local coordinate.

FIGURE 4.4 Plane Truss Element.


2 Counterclockwise angle θ is conventionally assumed positive.

@seismicisolation
@seismicisolation
200 Matrix Structural Analysis and the Finite Element Methods

A plane truss element has four degrees of freedom dˆ1 , dˆ2 , dˆ3 and dˆ4 , while the
corresponding force vector contains fˆ1 , fˆ2 , fˆ3 and fˆ4 . The element stiffness matrix
in the local coordinate system (ŝ) is a 4 × 4 matrix given by Equation (4.5) so that
fˆ = ŝ · d.ˆ The zeros in rows 2 and 4 make certain that the truss is not supposed to
carry shear force ( fˆ2 = fˆ4 = 0), while the zeros in columns 2 and 4 are required so
that lateral displacements (dˆ2 and dˆ4 ) do not contribute to member forces.
 
EA EA
 L 0 − 0
 L 
 
 0 0 0 0
ŝ =  (4.5)
 

 EA EA 
− 0 0
 
 L L 
0 0 0 0
Vector transformation equation is required to transform the local stiffness matrix
into the global coordinate system.

2D Vector Transformation
Figure 4.5 shows a given 2D vector v which can be transformed into any two Carte-
sian coordinates X −Y or x̂ − ŷ.
The relation between the global and local components of the vector v can be
derived as follows.
v̂x = vx · cos(θ ) + vy · sin(θ )
v̂y = vy · cos(θ ) − vx · sin(θ )
In matrix form, this becomes:
" # " # " # " #
v̂x cos(θ ) sin(θ ) vx vx
= × = T∗ × (4.6)
v̂y −sin(θ ) cos(θ ) vy vy

FIGURE 4.5 2D Vector Transformation.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 201

The local components are obtained by pre-multiplying (transforming) the global


vector components with the matrix T ∗ . Considering both ends of a plane truss mem-
ber, there are two displacement vectors require to be transformed as shown below.3
ˆ    
d1 cos(θ ) sin(θ ) 0 0 d1
ˆ 
d2  −sin(θ ) cos(θ ) 0 0  d2 
  
 = ×  (4.7)
ˆ  0 0 cos(θ ) sin(θ ) 
d3    d3 
 

dˆ4 0 0 −sin(θ ) cos(θ ) d4


The 4 × 4 matrix in Equation (4.7) is called the transformation matrix (T) used in
transforming displacement or force vectors of a plane truss element from the global
to the local coordinate system.
 
cos(θ ) sin(θ ) 0 0
−sin(θ ) cos(θ ) 0 0 
 
T =   (4.8)
 0 0 cos(θ ) sin(θ ) 
0 0 −sin(θ ) cos(θ )
The matrix T is orthogonal, i.e., a square matrix whose transpose is equal to its
inverse. Thus, the local displacement and force components are thus related by the
Equation shown below.

dˆ = T × d
(4.9)
fˆ = T × f
The stiffness matrix of the plane truss element in the global coordinate is thus
derived as follows starting with local stiffness equation.

fˆ = ŝ · dˆ
T · f = ŝ · T · d
T T · T · f = T T · ŝ · T · d
⇒ f = s×d
Where the global stiffness matrix of a plane truss element s is given by 4.10.

s = T T × ŝ × T (4.10)

4.2.4 Plane Frame


A plane frame element is a 2D structural member that carries axial force, shear
force and bending moment. It has three displacement components at each of its ends,
namely, axial displacement, transverse displacement and rotation, as shown in Figure
3 dˆ and dˆ are the local components of the displacement vector at node-1 while d and d are its global
1 2 1 2
components; likewise, dˆ3 and dˆ4 are the local components of the displacement vector at node-2 while d3
and d4 are the global components

@seismicisolation
@seismicisolation
202 Matrix Structural Analysis and the Finite Element Methods

FIGURE 4.6 Plane Frame Element.

4.6. It can be deduced from the previous discussions that a plane frame element can
be considered as combination of beam and plane truss elements. The global stiffness
of a plane frame element is dependent on the length (L), cross-sectional area (A),
moment of inertia (I), modulus of elasticity (E) and its orientation from the global
coordinate system (θ ).
The stiffness matrix of a plane frame element in the local coordinate is a 6 × 6
matrix given in Equation (4.11).

 
EA EA
 L 0 0 − 0 0 
 L 
 
 12EI 6EI 12EI 6EI 
 0 0 − 

 L3 L2 L3 L2 
6EI 4EI 6EI 2EI 
 

 0 0 − 
 L2 L L2 L 
ŝ =   (4.11)
 EA EA
 

− 0 0 0 0 
 L L 
 
12EI 6EI 12EI 6EI 
 
− 3 − − 2

 0 0

 L L2 L3 L 
 6EI 2EI 6EI 4EI 
0 0 −
L2 L L2 L

To transform the local stiffness matrix into a global one, it is required to use a
modified version of the transformation matrix used for a truss member in Equation
(4.5). Note that the rotation degree of freedoms dˆ3 and dˆ6 need no transformation due
to the member inclination. Thus, the transformation matrix for a plane frame element
is given by Equation (4.12).

@seismicisolation
@seismicisolation
The Direct Stiffness Method 203

cos(θ ) sin(θ )
 
0 0 0 0
 
−sin(θ ) cos(θ ) 0 0 0 0
 
 
 
 0 0 1 0 0 0
T = (4.12)
 

 0
 0 0 cos(θ ) sin(θ ) 0
 
0 −sin(θ ) cos(θ ) 0
 
 0 0
 
0 0 0 0 0 1
The global stiffness matrix of a plane frame element is obtained using the same
derivation as in Section 4.2.3 with corresponding values of ŝ from Equation (4.11)
and T from Equation (4.12). Thus, the global stiffness matrix of a plane frame ele-
ment is given by s = T T × ŝ × T .

4.2.5 Grid Structure


A grid element is a three-dimensional (3D) structural member that carries shear-
force, torsion and bending moment. It has three displacement components at each of
its ends, namely, transverse-displacement, twisting and rotation. The X −Y or x̂ − ŷ
plane is the plane of the grid frame while the Z- or ẑ-axis indicates the direction of
the transverse displacement, as shown in Figure 4.7.
Figure 4.7 shows a grid element in its local coordinate system (x̂ is along the
member), at some angle from the global X-axis. The global stiffness of a grid element
is dependent on the length (L), moment of inertia (I), polar moment of inertia (J),
modulus of elasticity (E) and its orientation from the global coordinate system. The

FIGURE 4.7 Grid Frame Element in X–Y Plane.

@seismicisolation
@seismicisolation
204 Matrix Structural Analysis and the Finite Element Methods

stiffness matrix of a grid element in the local coordinate is a 6 × 6 matrix given in


Equation (4.13).

12EI 6EI 12EI 6EI

 L3 0 − − 0 −
 L2 L3 L2 

GJ GJ
 

 
 0 0 0 0 

 L L 

 6EI 4EI 6EI 2EI 
− 2 0 0
 
 L L L2 L 

ŝ =   (4.13)
 12EI 6EI 12EI 6EI 
− 0 0 
 L3 L2 L3 L2 
 
 
 GJ GJ 
 0 − 0 0 0 

 L L 

 6EI 2EI 6EI 4EI 
− 2 0 0
L L L2 L
To transform the local stiffness matrix into a global one, it is required to use a
modified version of the transformation matrix used for a truss member in Equation
(4.5). Note that the transverse displacement degree of freedoms dˆ1 and dˆ4 need no
transformation due to the member inclination. Thus, the transformation matrix for a
grid element is given by Equation (4.14).
 
1 0 0 0 0 0
 
0 cos(θ ) sin(θ ) 0 0 0 
 
 
0 −sin(θ ) cos(θ ) 0
 
0 0 
T = (4.14)
 

0 0 0 1 0 0 
 
 
 
0 0 0 0 cos(θ ) sin(θ ) 
 
0 0 0 0 −sin(θ ) cos(θ )
The global stiffness matrix of a grid element is obtained using the same derivation
as in Section 4.2.3 with corresponding values of ŝ from Equation (4.13) and T from
Equation (4.14), given by s = T T × ŝ × T .

4.2.6 Space Truss


A space truss element is a 3D structural member that carries only an axial force.
However, it has three linear displacement components at each of its ends, one ax-
ial and two transverse displacements. Figure 4.8 shows a space truss element in
which the local coordinates x̂ − ŷ − ẑ are at some angles from the global coordinate
X −Y − Z.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 205

FIGURE 4.8 Space Truss Element.

The global stiffness of a space truss element is dependent on the length (L), cross-
sectional area (A), modulus of elasticity (E) and its orientations θI jˆ from the global
axis I to the local axis jˆ. The stiffness matrix of a space truss element in the local
coordinate is a 6 × 6 matrix given in Equation (4.15).
 
AE AE
 L 0 0 − 0 0
 L 
 0 0 0 0 0 0
 
 
 0 0 0 0 0 0
 
ŝ = 
  (4.15)
 AE AE


−
 L 0 0 L
0 0 
 
 0 0 0 0 0 0
 
0 0 0 0 0 0

3D Vector Transformation
A 3D vector transformation matrix is needed to transform the local stiffness matrix
into a global one.

@seismicisolation
@seismicisolation
206 Matrix Structural Analysis and the Finite Element Methods

FIGURE 4.9 Vector in 3D: (a) Global Components and (b) Local Components.

Figure 4.9 shows a given 3D vector v which is resolved into two Cartesian coor-
dinates X −Y − Z and x̂ − ŷ − ẑ .
Using the rotation angles provided in 4.8, the relation between the global and
local components of the vector v can be derived as follows.

v̂x = vx · cos(θxx̂ ) + vy · cos(θyx̂ ) + vz · cos(θzx̂ )


v̂y = vx · cos(θxŷ ) + vy · cos(θyŷ ) + vz · cos(θzŷ )
v̂z = vx · cos(θxẑ ) + vy · cos(θyẑ ) + vz · cos(θzẑ )

In matrix form, this becomes:

cos(θxx̂ ) cos(θyx̂ ) cos(θzx̂ )


       
v̂x vx vx
v̂y  = cos(θxŷ ) cos(θyŷ ) cos(θzŷ ) × vy  = λ × vy 
       

v̂z cos(θxẑ ) cos(θyẑ ) cos(θzẑ ) vz vz

cos(θxx̂ ) cos(θyx̂ ) cos(θzx̂ )


 

λ = cos(θxŷ ) cos(θyŷ ) cos(θzŷ ) (4.16)


 

cos(θxẑ ) cos(θyẑ ) cos(θzẑ )


The local components are obtained by pre-multiplying the global components
with the matrix λ given in Equation (4.16). Considering both ends of a space truss
member, there are two displacement vectors that require to be transformed, as shown
below. These are the displacement vector at node-1 whose components are d1 , d2 and
d3 globally (dˆ1 , dˆ2 and dˆ3 locally) as well as that at node-2 with components d4 , d5
and d6 globally (dˆ4 , dˆ5 and dˆ6 locally).

@seismicisolation
@seismicisolation
The Direct Stiffness Method 207

dˆ1
  
cos(θxx̂ ) cos(θyx̂ ) cos(θzx̂ ) 0 0 0 d1
  
ˆ 
d2  cos(θxŷ ) cos(θyŷ ) cos(θzŷ ) 0 0 0  d2  

     
ˆ 
d3  cos(θxẑ ) cos(θyẑ ) cos(θzẑ ) 0 0 0  d3  
 = × 

ˆ  0 0 0 cos(θxx̂ ) cos(θyx̂ ) cos(θzx̂ ) d4 
d4     
  
dˆ   0 0 0 cos(θ x ŷ ) cos(θ yŷ ) cos(θz ŷ )  d5 
  
 5
dˆ6 0 0 0 cos(θxẑ ) cos(θyẑ ) cos(θzẑ ) d6
(4.17)
" # " #
λ 0 λ 0
⇒ dˆ = × d and fˆ =
      
× f (4.18)
0 λ 0 λ
The 6 × 6 matrix in the displacements relationship of Equation (4.17) is called
the transformation matrix (T) used in transforming displacement or force vectors of
a space truss element from the global to the local coordinate system.

cos(θxx̂ ) cos(θyx̂ ) cos(θzx̂ ) 0 0 0


 
cos(θ ) cos(θ ) cos(θ ) 0 0 0 
 xŷ yŷ zŷ 
 
cos(θxẑ ) cos(θyẑ ) cos(θzẑ ) 0 0 0 
T = (4.19)
 

 0
 0 0 cos(θxx̂ ) cos(θyx̂ ) cos(θzx̂ )

 0 0 0 cos(θxŷ ) cos(θyŷ ) cos(θzŷ )
 

0 0 0 cos(θxẑ ) cos(θyẑ ) cos(θzẑ )

As usual, the global stiffness matrix of a space truss element is obtained using
the same derivation as in Section 4.2.3 with corresponding values of ŝ from Equation
(4.15) and T as obtained from Equation (4.19), given by s = T T × ŝ × T .

4.2.7 Space Frame


A space frame element is a 3D structural member that carries six actions: an axial,
two shear forces, a twisting moment and two bending moments. It also has three
linear displacement components and three rotations at each of its ends. Figure 4.10
shows a space frame element in which the local coordinates x̂ − ŷ − ẑ are at some
angles from the global coordinate X −Y − Z. The twelve nodal displacements in the
local coordinate are also shown in the figure with the double-headed arrows indicat-
ing rotation about the corresponding axis.
The global stiffness of a space frame element is dependent on the length (L),
cross-sectional area (A), moment of inertia (Iy and Iz ), polar moment of inertia (J),
modulus of elasticity (E) and its orientations θAb̂ from the global axis A to the local
axis b̂. In the local coordinate, the stiffness matrix of a space frame element is a
12 × 12 matrix given in Equation (4.20).

@seismicisolation
@seismicisolation
208
AE AE
 
0 0 0 0 0 − 0 0 0 0 0
 L L 
12EIẑ 6EIẑ 12EIẑ 6EIẑ
 
 
 0 0 0 0 0 − 3 0 0 0 
 L3 L2 L L2 
12EIŷ 6EIŷ 12EIŷ 6EIŷ
 
 
 0 0 0 − 0 0 0 − 0 − 0 
 L3 L2 L3 L2 
GJ GJ
 
 
 0 0 0 0 0 0 0 0 − 0 0 
 L L 
6EIŷ 4EIŷ 6EIŷ 2EIŷ
 

Matrix Structural Analysis and the Finite Element Methods


 
 0 0 − 0 0 0 0 0 0 
 L2 L L2 L 
6EIẑ 4EIẑ 6EIẑ 2EIẑ 
 

 0 0 0 0 0 − 0 0 0 
Ŝ = 
 L2 L L2 L 
 AE AE


 − 0 0 0 0 0 0 0 0 0 0 
 L L 
12EIẑ 6EIẑ 12EIẑ 6EIẑ 
 

 0 − 0 0 0 − 0 0 0 0 − 2 
 L3 L2 L3 L 
12EIŷ 6EIŷ 12EIŷ 6EIŷ
 
 
 0 0 − 0 0 0 0 0 0 
 L3 L2 L3 L2 
GJ GJ
 
 
 0 0 0 − 0 0 0 0 0 0 0 
 L L 
6EIŷ 2EIŷ 6EIŷ 4EIŷ
 
 
 0 0 − 0 0 0 0 − 0 0 
 L2 L L2 L 
6EIẑ 2EIẑ 6EIẑ 4EIẑ
 
0 0 0 0 0 − 0 0 0
L2 L L2 L
(4.20)

@seismicisolation
@seismicisolation
The Direct Stiffness Method 209

FIGURE 4.10 Space Frame Element.

Considering both ends of a space frame member, there are four displacement
vectors that require coordinate transformation, as shown below: d1 to d3 linear dis-
placement components at node 1, d4 to d6 rotation components at node 1, d7 to d9
linear displacement components at node 2, and d10 to d12 rotation components at
node 2.
 ˆ 
d1 
d1

 ˆ 
 d2   d2 
 
 
 ˆ   
 d3  d 
 3
 
 dˆ   
 d4 
 4  
  
 dˆ  λ 0 0 0
  
 d5 
 5  
  
 dˆ6   0 λ 0 0   d6 
  
 =
   ×  (4.21)
 dˆ7   0 0 λ 0  d7 
 
   
 dˆ8  0 0 0  d8 
 
λ  
   
 ˆ   d9 
 d9   
 
d10 
ˆ   
d10   
  d 
ˆ   11 
d11 
dˆ12 d12

@seismicisolation
@seismicisolation
210 Matrix Structural Analysis and the Finite Element Methods

⇒ dˆ = T × d and fˆ = T × f
      
(4.22)
The transformation matrix (T) for a space frame element shown in Equation
(4.23) is a 12 × 12 matrix composed of the 3 × 3 matrix λ given in Equation (4.16);
0 is a 3 × 3 matrix of all 0s. It is used to transform displacement or force vectors of
a space frame element from the global to the local coordinate system.
 
λ 0 0 0
0 λ 0 0
 
T = 0 0 λ 0
 (4.23)
 
0 0 0 λ
Again, the global stiffness matrix of a space frame element is obtained using the
same derivation as in Section 4.2.3 with corresponding values of ŝ from Equation
(4.20) and T as obtained from Equation (4.23), given by s = T T × ŝ × T .

4.3 SOLUTION STEPS IN THE DIRECT STIFFNESS METHOD


In the direct stiffness method (DSM), the structure stiffness matrix Ss can be directly
computed and assembled to relate the structure nodal actions As and the correspond-
ing displacements Ds in the global coordinate system. The suggested analysis steps
in the DSM are outlined below.

Step 1: Identify and number the global displacements (DJ s) and the reactions
AR s on the structure. Also, number the member, identify their orientation and their
corresponding local DOFs.
Step 2: Compute the global stiffness matrix for each member and index the rows
and columns of each matrices using the values established in Step 1.
Step 3: Assemble the element stiffnesses si into a global structure stiffness ma-
trix S, i.e., selectively add coefficients of all the nm element stiffness based on the
DOFs established in step 1.

nm
[S] = ∑ si (4.24)
i=1

Step 4: Prepare the action vector on the structure; assemble the actions along
DJ into the AJ vector required for the analysis. In the case of member forces (that
are not applied at the joints), compute member fixed-end actions ÂFm in the local
coordinate. These fixed-end actions can also be converted into equivalent nodal loads
in the global coordinates and combined with the nodal loads, as explained in previous
chapters.
Step 5: Partition the structure stiffness equation according to D j s and Ar s to
restrain the supports and solve for the unknown displacements D j s using, the Equa-
tion (4.25).

@seismicisolation
@seismicisolation
The Direct Stiffness Method 211

" # " # " #


Aj Sjj S jr Dj
= × (4.25)
Ar Sr j Srr Dr
This partitioned form can be easily generated using the so-called smart number-
ing, i.e., by numbering in Step 1 the D j components first and the Dr components
last or vice versa. Since displacements at support are often zero, Dj is determined as
shown in Equation (4.26).

D j = (S j j )−1 × A j (4.26)
Step 6: Once the free joint displacements D j s are determined, the support reac-
tions are computed using Equation (4.27). If any supported member is subjected to
a fixed-end actions AFr , the fixed-end action component shall also be added to the
reaction from nodal displacements.

Ar = Sr j × D j + AFr (4.27)

where: Ar = total reaction force


AFr = the fixed-end actions along the supported DOFs

Step 7: Finally, each member end action in the local coordinates can be de-
termined using Equation (4.28), by adding the member fixed-end actions (if any)
computed in Step 4 in the local coordinates.

fˆi = ŝi × (Ti × Dmi ) + ÂFmi (4.28)

where: ŝi = element local stiffness matrix of member i


Ti = transformation matrix of member i
Dmi = the global displacement vector of member i, solved as part of D j s in
Step 5
ÂFmi = the fixed-end actions of member i in the local coordinate, Step 4

4.4 EXAMPLES
This section contains examples of how to solve structural analysis of DSM type
structures using the direct stiffness method. The examples contain the different types
of elements explained in the previous section.
Example 4.1 Analyze the spring system shown in Figure 4.11(a) using the DSM
method. The spring constants are k1 = 500 N/mm, k2 = 600 N/mm, k3 = 400 N/mm,
k4 = 800 N/mm, k5 = 650 N/mm, and let P1 = 1kN and P2 = 2kN.

@seismicisolation
@seismicisolation
212 Matrix Structural Analysis and the Finite Element Methods

FIGURE 4.11 Springs: (a) Spring System and Loading and (b) Global Nodes, Ele-
ments and DOFs of the Spring System.

SOLUTION
Step 1: The members, nodes and global DOFs on the structure are numbered as
shown in Figure 4.11(b); the circled are node numbers, while the element numbers
are inside a rectangle. The displacement d1 is restrained (it corresponds to Ar ), while
d2 –d5 are all free joint displacements (D j s).
Step 2: Indexed global stiffness matrices of each member are given below.

1 2 2 3 1 3
" # " # " #
k1 −k1 1 k2 −k2 2 k3 −k3 1
s1 = s2 = s3 =
−k1 k1 2 −k2 k2 3 −k3 k3 3

" 3 4 # " 4 5 #
k4 −k4 3 k5 −k5 4
s4 = s5 =
−k4 k4 4 −k5 k5 5

Given in line #9 of the Scilab/Octave code at the end.

This provides the member connectivity information in the structure needed to


assemble its global stiffness matrix S. In a computer solution, it is helpful to prepare
the corresponding connectivity matrix sequentially, as provided below. Starting from
the first, each row specifies the global DOFs at node 1 and node 2 of each member.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 213

 
1 2

 2 3 

Connectivity = 
 1 3 

 3 4 
4 5

Step 3: Selectively adding the element stiffness matrix si into a global structure
stiffness matrix results in the following assembled stiffness matrix S.

1 2 3 4 5
 
k1 + k3 −k1 −k3 0 0 1
 −k1 −k2
 
k1 + k2 0 0 2
 
S =  −k3 −k2 k2 + k3 + k4 −k4 0 3
 
 
 0
 0 −k4 k4 + k5 −k5 
4
0 0 0 −k5 k5 5
Using the given numerical values, the global stiffness matrix of the system S and
the partitioned S j j and Sr j become.
 
900 −500 −400 0 0
−500 1100 −600
 
0 0 
 
S = −400 −600 1800 −800 0 
 
 
 0
 0 −800 1450 −650 
0 0 0 −650 650

Given in line #12–16 of the Scilab/Octave code at the end.

" #
Srr Sr j
S=
S jr Sjj
 
1100 −600 0 0
−600 1800 −800 0 
 
⇒ Sjj =  
 0
 −800 1450 −650

0 0 −650 650
 
Sr j = −500 −400 0 0

Given in line #19–20 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
214 Matrix Structural Analysis and the Finite Element Methods

Step 4: The spring system is supported at node 1 and loaded by P1 and P2 at


nodes 3 and 5, respectively. Thus, the action vector AJ in the global coordinates is
as shown below.
   
0 0
 P1   1000 
Aj = 
 0 = 0 
  

P2 2000

Given in line #23 of the Scilab/Octave code at the end.

Step 5: The structure stiffness equation and the partitioned (modified) version are
shown below, while the unknown displacements D j s are determined using Equation
(4.26) as shown below.
     
Ar 900 −500 −400 0 0 d1
 0  −500 1100 −600
     
0 0   d2 
     
 1000  = −400 −600 1800 −800 0  ×  d3 
     
     
 0   0
   0 −800 1450 −650   d4 
 

2000 0 0 0 −650 650 d5

   −1  
d2 1100 −600 0 0 0
 d3  −600 1800 −800 0   1000 
     
 d = 0
    ×
 
 4   −800 1450 −650
  0 

d5 0 0 −650 650 2000

   
d2 2.432
 d3   4.459 
   
⇒  =
 d   6.959 mm ANS

 4   
d5 10.036

Given in line #26 of the Scilab/Octave code at the end.

Step 6: The support reactions are computed using Equation (4.27).

⇒ Ar = [Sr j ] × [D j ] = 3000 N

Given in line #29 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 215

Step 7: Member forces in the local coordinates in Newtons are determined using
Equation (4.28), in which si is computed in Step 2, and Dmi are member displace-
ments identified from the D j s solved above, shown below.

[Ami ] = [si ] × [Dmi ]


where:
" # " # " #
0 2.432 0
Dm1 = , Dm2 = , Dm3 = ,
2.432 4.459 4.459
" # " #
4.459 6.959
Dm4 = , Dm5 =
6.959 10.036

Therefore, the member forces at both ends of each member in Newtons are given
in the following table:

Member 1 2 3 4 5
Node-1 −1216.216 −1216.216 −1783.783 −2000 −2000
Node-2 1216.216 1216.216 1783.783 2000 2000

Given in line #33–37 of the Scilab/Octave code at the end.

The corresponding Scilab code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 // Example 4.1 - Spring System
2 // Direct Stiffness Method
3

4 // Common units for analysis: Force in N, Length in mm


5

6 // Given parameters constants in appropriate units:


7 P1 = 1000; P2 = 2000; // in N
8 // Spring stiffnesses in N/mm
9 k1 = 500; k2 = 600; k3 = 400; k4 = 800; k5 = 650;
10

11 // Global stiffness matrix of the spring system


12 S = [ k1+k3 -k1 -k3 0 0
13 -k1 k1+k2 -k2 0 0
14 -k3 -k2 k2+k3+k4 -k4 0
15 0 0 -k4 k4+k5 -k5
16 0 0 0 -k5 k5]

@seismicisolation
@seismicisolation
216 Matrix Structural Analysis and the Finite Element Methods

17

18 // Partitioning S
19 Srj = S(1,2:5)
20 Sjj = S(2:5,2:5)
21

22 // Nodal actions
23 Aj = [0; P1; 0; P2]
24

25 // Nodal displacements of the system are


26 Dj = inv(Sjj)*Aj
27

28 // The support reaction at node 1 is


29 Ar = Srj*Dj
30

31 // Member forces are given as


32 s = [1 -1;-1 1];
33 Am1 = k1*s*[0;Dj(1)]
34 Am2 = k2*s*[Dj(1);Dj(2)]
35 Am3 = k3*s*[0;Dj(2)]
36 Am4 = k4*s*[Dj(2);Dj(3)]
37 Am5 = k5*s*[Dj(3);Dj(4)]
38

39 // END: ........... Example 4.1

Example 4.2 The bar structure Figure 4.12(a) is subjected to the force F = 4 kips
and a temperature increase of ∆T = 36o F on all members. Analyze the structure
using the DSM for A1 = 0.2 in2 , A2 = 0.15 in2 , A3 = 0.1 in2 , E = 29,000 ksi, and
coefficient of thermal expansion α = 6.67 × 10−6 /o F.

SOLUTION
Step 1: The members, nodes and global DOFs on the structure are numbered as
shown in Figure 4.12(b); the circled are node numbers, while the element numbers
are inside a square. Displacements d1 and d4 are restrained (they correspond to Ar ),
while d2 and d3 are free joint displacements (D j s).
Step 2: Indexed global stiffness matrices of each member are as given below.
1 2 2 3
 ! !   ! ! 
AE AE AE AE
− 1 − 2

 L L 

 L L 
1 1 2 2
s1 =  s2 = 
 
! !  ! ! 
AE AE AE AE
   
2 3
− −
 
L L L L
1 1 2 2

@seismicisolation
@seismicisolation
The Direct Stiffness Method 217

FIGURE 4.12 Bar Elements: (a) 1D Structure and Loading and (b) Its Global Nodes
and DOFs

3 4
 ! ! 
AE AE
− 3

 L L 
3 3
s3 = 

! ! 
AE AE
 
4


L L
3 3

Given in line #23–27 of the Scilab/Octave code at the end.

Step 3: Selectively adding the element stiffness matrix si into a global structure
stiffness matrix results in the following assembled stiffness matrix S.

1 2 3 4
 ! ! 
AE AE
− 0 0 1
L L

 
 1 1 
 ! ! ! ! 
AE AE AE AE
 
− −
 
+ 0 2
 L L L L 
 1 1 2 2 
S=
 ! ! ! ! 

 AE AE AE AE 
 0 − + − 3
 L L L L 
2 2 3 3
 

 ! ! 
 AE AE 
0 0 − 4
 
L L
3 3

@seismicisolation
@seismicisolation
218 Matrix Structural Analysis and the Finite Element Methods

 
1450 −1450 0 0
−1450 2900 −1450 0
 

S= 
 0
 −1450 2610 −1160

0 0 −1160 1160

Given in line # 30–34 of the Scilab/Octave code at the end.


This structure stiffness matrix S relates the action vector on the structure to the
corresponding displacements vector, as shown in the following equation.
   
Ar1 0
 A j1   D 
   
  = S ×  j1 
 A   D 
 j2   j2 
Ar2 0
Using the given numerical values, the global stiffness matrix of the system and
the partitioned S j j and Sr j become.
" #
2900 −1450
Sjj =
−1450 2610
" #
−1450 0
Sr j =
0 −1160

Given in line #37–38 of the Scilab/Octave code at the end.

Step 4: The bar members are all subjected to a temperature increase of 36o F.
Thus, the members are subjected to fixed-end actions (compressive forces) given by
the following relationship.

AFmi = α · ∆T · Ai · E

AFm1 = 1.3927 k
AFm2 = 1.0445 k
AFm3 = 0.6963 k

Given in line #42–44 of the Scilab/Octave code at the end.

The fixed-end actions and the equivalent nodal loads are shown in Figure 4.13
(a) and (b), respectively.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 219

FIGURE 4.13 (a) Fixed-End-Actions and (b) Equivalent Nodal Loads Due to the
Temperature Increase.

Thus, the total nodal actions vector Aj is given as follows.


" # " #
AFm1 − AFm2 0.3482
Aj = = k
F + AFm2 − AFm3 4.3482

Given in line #47 of the Scilab/Octave code at the end.


Step 5: The structure stiffness equations and the partitioned version are shown
below, while the unknown displacements D j s are determined using Equation (4.26)
as shown below.
     
Ar1 1450 −1450 0 0 0
 0.3482  −1450 2900 −1450 0   d2 
     
 = × 
 4.3482   0
   −1450 2610 −1160   d3 
 

Ar2 0 0 −1160 1160 0


" # " #−1 " #
d2 2900 −1450 0.3482
= ×
d3 −1450 2610 4.3482
" # " #
d2 1.3196
⇒ = × 10−3 in ANS
d3 2.3991

Given in line #50 of the Scilab/Octave code at the end.


Step 6: The support reactions are computed using Equation (4.27).
" #
F
−0.5207
⇒ Ar = [Sr j ] × [D j ] + [Ar ] = k
−3.4793

@seismicisolation
@seismicisolation
220 Matrix Structural Analysis and the Finite Element Methods

Given in line #53 of the Scilab/Octave code at the end.


Step 7: Member forces in the local coordinates in Newtons are determined using
Equation (4.28), as shown below.

[Ami ] = [si ] × [Dmi ] + [AFmi ]

Member 1 2 3
Node-1 −0.5207 −0.5207 3.4793
Node-2 0.5207 0.5207 −3.4793
(Tension) (Tension) (Compression)

Given in line #56–58 of the Scilab/Octave code at the end.

The corresponding Octave code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 % Example 4.2 - 1D Bar Structure
2 % Direct Stiffness Method
3 clc; clear
4 % Common units for analysis: Force in kips, Length in inches
5

6 % Given parameters constants in appropriate units:


7 F = 4; % in kips
8

9 % Modulus of elasticity, ksi


10 E = 29000
11

12 % Cross-sectional Area, in2


13 A1 = 0.2, A2 = 0.15, A3 = 0.1;
14

15 % Length, in
16 L1 = 4, L2 = 3, L3 = 2.5;
17

18 % Temperature increase and coefficient of thermal expansion


19 % Units: oF and /oF
20 dT = 36; alpha = 6.67e-6
21

22 % Element stiffnesse coefficients, k/in


23 k1 = A1*E/L1; k2 = A2*E/L2; k3 = A3*E/L3;
24

25 % Element stiffnesse matrices, k/in

@seismicisolation
@seismicisolation
The Direct Stiffness Method 221

26 s = [1 -1;-1 1];
27 s1 = k1*s; s2 = k2*s; s3 = k3*s;
28

29 % Global stiffness matrix of the spring system


30 S = zeros(4);
31

32 S(1:2,1:2) = s1;
33 S(2:3,2:3) = S(2:3,2:3) + s2;
34 S(3:4,3:4) = S(3:4,3:4) + s3
35

36 % Partitioning S into Sjj and Srj


37 Sjj = S(2:3,2:3)
38 Srj = [S(1,2:3);S(4,2:3)]
39

40 % Fixed-end actions from temperature increment, kips


41 % (all -ve ==> compressive)
42 AmF1 = alpha * dT * A1 * E
43 AmF2 = alpha * dT * A2 * E
44 AmF3 = alpha * dT * A3 * E
45

46 % Nodal actions
47 Aj = [AmF1 - AmF2; F + AmF2 - AmF3]
48

49 % Nodal displacements of the system are


50 Dj = inv(Sjj)*Aj
51

52 % The support reaction at node 1 is


53 Arj = Srj*Dj + [AmF1;-AmF3]
54

55 % Member forces are given as:


56 Am1 = s1*[0;Dj(1)] + [AmF1;-AmF1]
57 Am2 = s2*[Dj(1);Dj(2)] + [AmF2;-AmF2]
58 Am3 = s3*[Dj(2);0] + [AmF3;-AmF3]
59

60 % END: ........... Example 4.2

Example 4.3 Analyze the beam shown in Figure 4.14(a) using the DSM. The roller
support at B has undergone a downward settlement of ∆ = 4 mm. Use P = 80 kN, w
= 20 kN/m and EI = 2000 kN · m2 .

@seismicisolation
@seismicisolation
222 Matrix Structural Analysis and the Finite Element Methods

FIGURE 4.14 Beam: (a) Beam and Loading and (b) All Nodal Displacement
Components.

SOLUTION
Step 1: The beam has four nodes, three elements and eight possible global DOFs.
The members, nodes and global DOFs are numbered as shown in Figure 4.14(b);
the circled are node numbers while the element numbers are inside a square. The
displacements d1 , d2 , d3 and d5 are restrained (they correspond to Ar ), while d4 , d6 , d7
and d8 are free joint displacements (D j s).
Step 2: The element stiffness matrix of each member in the local/global is com-
puted using Equation (4.4).

Given in line #20–33 of the Scilab/Octave code at the end.

The connectivity matrix for the element and structure DOFs is given below, each
row corresponds to the DOFs of each beam element in the structure, starting with
the first element.
 
1 2 3 4
Connectivity =  3 4 5 6 
5 6 7 8

Step 3: Element stiffness matrices si are selectively added to determine the as-
sembled structure stiffness matrix shown below, S.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 223

 
0.0011 0.0033 −0.0011 0.0033 0 0 0 0

 0.0033 0.0133 −0.0033 0.0067 0 0 0 0 


 −0.0011 −0.0033 0.0040 0.0039 −0.0029 0.0072 0 0 

 0.0033 0.0067 0.0039 0.0373 −0.0072 0.012 0 0 
S= 

 0 −0.0029 −0.0072 0.0329 0.0228 −0.03 0.03 


 0 0 0.0072 0.012 0.0228 0.064 −0.03 0.02 

 0 0 0 0 −0.03 −0.03 0.03 −0.03 
0 0 0 0 0.03 0.02 −0.03 0.04

Given in line #36–40 of the Scilab/Octave code at the end.

This global stiffness matrix S relates the action vector on the structure to the
corresponding displacements vector as shown in the following equation.
   
Ar1 0
  
0

 Ar2   
   
 A   −4 mm 
 r3   
   
 A j1   D j1 
 = S×
   
 
 Ar4 
 

 0 

 A j2   D j2 
   
   
 A   D 
 j3   j3 
A j4 D j4

As shown in the next step, the −4mm support settlement at d3 can be set to 0 by
converting it into fixed-end actions. Then, the global stiffness matrix S of the beam
can be partitioned into S j j by removing its rows and columns corresponding to Ar .
Step 4: The beam members 1 and 2 are subjected to a support settlement at node
2, in addition to the member forces given. Thus, the members are subjected to fixed-
end actions given in Table 4.1 as computed using the following equations.

TABLE 4.1
Total Fixed-End-Actions on the Beam
Node 1 2L 2R 3L 3R 4

V F (kN) 40 40 50 50 20 20
M F (kN · m) 60 −60 41.67 −41.67 6.67 −6.67

@seismicisolation
@seismicisolation
224 Matrix Structural Analysis and the Finite Element Methods

Member − 1

F = 0.5P +
12EI F = 0.5P −
12EI
V12 ·∆ V21 ·∆
L13 L13

F = 0.125P · L +
6EI F = −0.125P · L +
6EI
M12 1 ·∆ M21 1 ·∆
L12 L12

Member − 2

F = 0.5w · L −
12EI F = 0.5w · L +
12EI
V23 2 ·∆ V32 2 ·∆
L23 L23

F =
w · L22 6EI F =−
w · L22 6EI
M23 − 2 ·∆ M32 − 2 ·∆
12 L2 12 L2

Member − 3

F = 0.5w · L
V34 F = 0.5w · L
V43
3 3

F =
w · L32 F =−
w · L32
M34 M43
12 12

The total nodal actions vector A j is given as follows.


 
19.88 kN · m
 37.88 kN · m 
 
Aj =  
 −20.0 kN 

6.67 kN · m

Given in line #75 of the Scilab/Octave code at the end.

Step 5: The modified (partitioned) structure stiffness equation to solve for the
unknown displacements D j s, as derived in Equation (4.26), is shown below.

Given in line #46–54 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 225

  
 −1  
d4 3.73 1.2 0 0 19.88
 d6   3  1.2 6.4 −3.0 2.0   37.88 
      
 d  = 10 ·  0 ×
     
 7    −3.0 3.0 −3.0 

 −20.0 
 
d8 0 2.0 −3.0 4.0 6.67
   
d4 5.62 rad
 d6   −0.92 rad 
   
⇒   = 10−3 × 
 −21.83 m  ANS

 d 
 7   
d8 −14.25 rad

Given in line #79 of the Scilab/Octave code at the end.

Step 6: The support reactions are computed using Equation (4.27).

 
42.32 kN
65.08 kN · m
 
⇒ [Ar ] = [Sr j ] × [D j ] + [AFr ] = 
 89.92 kN 

 
87.77 kN

Given in line #82 of the Scilab/Octave code at the end.

Step 7: As shown below, member forces in the local coordinates in kN and kN-m
are determined using Equation (4.28)

[Ami ] = [si ] × [Dmi ] + [AFmi ]

where,
     
0 0 0
0 d4  d6 
     
Dm1 = 
 0  , Dm2 =  0  and
   Dm3 = 
d 

     7
d4 d6 d8

The complete member forces for the beam are shown in Figure 4.15.

Given in line #85–87 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
226 Matrix Structural Analysis and the Finite Element Methods

FIGURE 4.15 Final Member End Actions, Am s.

The corresponding Octave code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 % Example 4.3 - Beam Structure
2 % Direct Stiffness Method
3 clc; clear
4 % Common units for analysis: Force in kN, Length in m
5

6 % Given parameters and constants in appropriate units:


7

8 % Flexural rigidity EI, kN-m2


9 ei = 2000
10 EI = [ei, 1.5*ei, ei]
11

12 % Length, m
13 len = [6, 5, 2]
14

15 % Applied loading, in kN, kN/m and settlement in m


16 P = 80; w = 20; delta = -4e-3
17

18 % Computing Element stiffness matrices


19 L = len(1);
20 s1 = EI(1)*[12/L^3 6/L^2 -12/L^3 6/L^2
21 6/L^2 4/L -6/L^2 2/L
22 -12/L^3 -6/L^2 12/L^3 -6/L^2
23 6/L^2 2/L -6/L^2 4/L]
24 L = len(2);
25 s2 = EI(2)*[12/L^3 6/L^2 -12/L^3 6/L^2
26 6/L^2 4/L -6/L^2 2/L
27 -12/L^3 -6/L^2 12/L^3 -6/L^2
28 6/L^2 2/L -6/L^2 4/L]
29 L = len(3);
30 s3 = EI(3)*[12/L^3 6/L^2 -12/L^3 6/L^2
31 6/L^2 4/L -6/L^2 2/L
32 -12/L^3 -6/L^2 12/L^3 -6/L^2
33 6/L^2 2/L -6/L^2 4/L]

@seismicisolation
@seismicisolation
The Direct Stiffness Method 227

34

35 % Assembling Global stiffness matrix of the beam


36 S = zeros(8);
37

38 S(1:4,1:4) = s1;
39 S(3:6,3:6) = S(3:6,3:6) + s2;
40 S(5:8,5:8) = S(5:8,5:8) + s3
41

42 % Restrained DOFs in decending order


43 res = [1 2 3 5]
44 count = length(res)
45 % Extract the Sjj matrix from S eliminating rows and columns
46 Sjj = S % Duplicate S into Sjj
47

48 %% Eliminating the rows and columns of restrained DOFs


49 Sjj(res,:) = [] % Delete the row j
50 Sjj(:,res) = [] % Delete the column j
51

52 % Gather the Srj matrix from S


53 Srj = [S(1:3, 4), S(1:3, 6:8);
54 S(5, 4),S(5,6:8)]
55

56 % Fixed-end actions from loading and support settlement


57 V12F = 0.5*P - 12*EI(1)*delta/len(1)^3
58 M12F = 0.125*P*len(1) - 6*EI(1)*delta/len(1)^2
59 V21F = 0.5*P + 12*EI(1)*delta/len(1)^3
60 M21F = -0.125*P*len(1) - 6*EI(1)*delta/len(1)^2
61 V23F = 0.5*w *len(2) + 12*EI(2)*delta/len(2)^3
62 M23F = w*len(2)^2/12 + 6*EI(2)*delta/len(2)^2
63 V32F = 0.5*w *len(2) - 12*EI(2)*delta/len(2)^3
64 M32F = -w*len(2)^2/12 + 6*EI(2)*delta/len(2)^2
65 V34F = 0.5*w *len(3)
66 M34F = w*len(3)^2/12
67 V43F = 0.5*w *len(3)
68 M43F = -w*len(3)^2/12
69

70 % The member fixed-end actions vector are:


71 AmF1 = [V12F;M12F;V21F;M21F]
72 AmF2 = [V23F;M23F;V32F;M32F]
73 AmF3 = [V34F;M34F;V43F;M43F]
74 % Nodal actions Aj, fixed-end actions along reactions ArF
75 Aj = -[AmF1(4)+AmF2(2); AmF2(4)+AmF3(2); AmF3(3); AmF3(4)]
76 ArF = [AmF1(1:2);AmF1(3)+AmF2(1);AmF2(3)+AmF3(1)]
77

78 % Nodal displacements of the beam are

@seismicisolation
@seismicisolation
228 Matrix Structural Analysis and the Finite Element Methods

79 Dj = inv(Sjj)*Aj
80

81 % The support reactions Ar are


82 Ar = Srj*Dj + ArF
83

84 % Member forces are given as:


85 Am1 = s1*[0;0;0;Dj(1)] + AmF1
86 Am2 = s2*[0;Dj(1);0;Dj(2)] + AmF2
87 Am3 = s3*[0;Dj(2);Dj(3);Dj(4)] + AmF3
88

89 % END: ........... Example 4.3

Alternative Solution

The support settlement in this example can be treated directly in the partitioned
structure stiffness equation given in Equation (4.25). Accordingly, for some pre-
scribed (non-zero) support settlement(s), the corresponding set of equations for the
actions and free-joint displacements is given in Equation (4.29).

Aj = S j j · D j + S jr · Dr
⇒ Dj = (S j j )−1 · (A j − S jr · Dr ) (4.29)
Ar = Sr j · D j + Srr · Dr + AFr

where: A j = Nodal actions vector


D j = Free-joint displacements vector
Dr = Support displacements (settlements) vector
Ar = Total reaction forces vector
AFr = Fixed-end actions along the restrained DOFs

The corresponding Octave code for the modified solution is given in the listing
below. Specifically line 20 shows how to formulate the Dr vector; lines 47–64 pro-
vide the partitioning of S into jj, jr, rj and rr; lines 67–82 indicate that the fixed-end
actions shall not include the effect of any support settlement; line 88 gives the so-
lution of D j ; lines 91–96 show how to introduce Dr in the computation of support
reactions Ar and element forces Ami .

Scilab/Octave Code
1 % Example 4.3a - Beam Structure
2 % Direct Stiffness Method
3 % Alternative treatment of support settlement delta
4 clc; clear
5 % Common units for analysis: Force in kN, Length in m

@seismicisolation
@seismicisolation
The Direct Stiffness Method 229

7 % Given parameters and constants in appropriate units:


8

9 % Flexural rigidity EI, kN-m2


10 ei = 2000
11 EI = [ei, 1.5*ei, ei]
12

13 % Length, m
14 len = [6, 5, 2]
15

16 % Applied loading, in kN, kN/m and settlement in m


17 P = 80; w = 20; delta = -4e-3
18

19 % Prescribed settlement considered as Dr component


20 Dr = [0;0;delta;0]
21

22 % Computing Element stiffness matrices


23 L = len(1);
24 s1 = EI(1)*[12/L^3 6/L^2 -12/L^3 6/L^2
25 6/L^2 4/L -6/L^2 2/L
26 -12/L^3 -6/L^2 12/L^3 -6/L^2
27 6/L^2 2/L -6/L^2 4/L]
28 L = len(2);
29 s2 = EI(2)*[12/L^3 6/L^2 -12/L^3 6/L^2
30 6/L^2 4/L -6/L^2 2/L
31 -12/L^3 -6/L^2 12/L^3 -6/L^2
32 6/L^2 2/L -6/L^2 4/L]
33 L = len(3);
34 s3 = EI(3)*[12/L^3 6/L^2 -12/L^3 6/L^2
35 6/L^2 4/L -6/L^2 2/L
36 -12/L^3 -6/L^2 12/L^3 -6/L^2
37 6/L^2 2/L -6/L^2 4/L]
38

39 % Assembling Global stiffness matrix of the beam


40 S = zeros(8);
41

42 S(1:4,1:4) = s1;
43 S(3:6,3:6) = S(3:6,3:6) + s2;
44 S(5:8,5:8) = S(5:8,5:8) + s3
45

46 % Restrained DOFs in decending order


47 res = [1 2 3 5]
48

49 % Extract the Sjj matrix from S


50 %% eliminating rows and columns

@seismicisolation
@seismicisolation
230 Matrix Structural Analysis and the Finite Element Methods

51 Sjj = S % Duplicate S into Sjj


52

53 %%
54 Sjj(res,:) = [] % Delete the row j
55 Sjj(:,res) = [] % Delete the column j
56 %%
57

58 % Gather the Srj, Sjr and Srr matrices from S


59 Srj = [S(1:3, 4), S(1:3, 6:8);
60 S(5, 4),S(5,6:8)]
61 Sjr = [S(4,1:3), S(4, 5);
62 S(6:8,1:3),S(6:8,5)]
63 Srr = [S(1:3,1:3), S(1:3,5);
64 S(5,1:3),S(5,5)]
65

66 % Fixed-end actions from loading only


67 V12F = 0.5*P
68 M12F = P*len(1)/8
69 V21F = 0.5*P
70 M21F = -P*len(1)/8
71 V23F = 0.5*w *len(2)
72 M23F = w*len(2)^2/12
73 V32F = 0.5*w *len(2)
74 M32F = -w*len(2)^2/12
75 V34F = 0.5*w *len(3)
76 M34F = w*len(3)^2/12
77 V43F = 0.5*w *len(3)
78 M43F = -w*len(3)^2/12
79 % The member fixed-end actions vector are:
80 AmF1 = [V12F;M12F;V21F;M21F]
81 AmF2 = [V23F;M23F;V32F;M32F]
82 AmF3 = [V34F;M34F;V43F;M43F]
83 % Nodal actions Aj, fixed-end actions along reaction forces ArF
84 Aj = -[AmF1(4)+AmF2(2); AmF2(4)+AmF3(2); AmF3(3); AmF3(4)]
85 ArF = [AmF1(1:2);AmF1(3)+AmF2(1);AmF2(3)+AmF3(1)]
86

87 % Nodal displacements of the beam are


88 Dj = inv(Sjj)*(Aj - Sjr*Dr)
89

90 % The support reactions Ar are


91 Ar = Srj*Dj + Srr*Dr + ArF
92

93 % Member forces are given as:


94 Am1 = s1*[0;0;Dr(3);Dj(1)] + AmF1
95 Am2 = s2*[Dr(3);Dj(1);0;Dj(2)] + AmF2

@seismicisolation
@seismicisolation
The Direct Stiffness Method 231

96 Am3 = s3*[0;Dj(2);Dj(3);Dj(4)] + AmF3


97

98 % END: ........... Example 4.3a

Example 4.4 Analyze the plane truss shown in Figure 4.16(a) using the DSM. The
cross-sectional area and the modulus of elasticity of all the members is A = 12 in2
and E = 10,000 ksi and let L = 12 ft and P = 80 kips.

SOLUTION
Step 1: The members, nodes and global DOFs on the truss are numbered as shown in
Figure 4.16(b). The displacement d2 , d3 , d4 and d7 are restrained (they correspond
to Ar ), while the remaining four are free joint displacements (D j s).
Step 2: Global stiffness matrices of each member are computed by transforming
the local stiffness matrix of each truss member using Equations (4.5) and (4.10), and
they are given as follows.

Member 1: L = 216 ′′ , θ = 0o , EA = 120,000 k

1 2 3 4
 
555.56 0 −555.56 0 1
0 0 0 0 2
 

s1 = 
−555.56 0

 555.56 3
0
0 0 0 0 4


Member 2: L = 144 2 ′′ , θ = 45o , EA = 120,000 k

1 2 5 6
 
294.63 294.63 −294.63 −294.63 1
 294.63 294.63 −294.63 −294.63 2
 
s2 = 
−294.63 −294.63 294.63

 294.63 
5
−294.63 −294.63 294.63 294.63 6

@seismicisolation
@seismicisolation
232 Matrix Structural Analysis and the Finite Element Methods

FIGURE 4.16 Plane Truss (a) Plane Truss and Loading and (b) Nodes, Elements
and Global DOFs.

Member 3: L = 144′′ , θ = 90o , EA = 120,000 k

1 2 7 8
 
0 0 0 0 1
0 833.33 0 −833.33 2
 
s3 = 
0

 0 0 0 7

0 −833.33 0 833.33 8

@seismicisolation
@seismicisolation
The Direct Stiffness Method 233

Member 4: L = 144 ′′ , θ = 0o , EA = 120,000 k

7 8 5 6
 
833.33 0 −833.33 0 7
0 0 0 0 8
 

s4 = 
−833.33 0 833.33

 5
0
0 0 0 0 6

Member 5: L = 72 · 22 + 32 , θ = 326.31o , EA = 120,000 k

7 8 3 4
213.35 7
 
320.02 −213.35 −320.02
8
−213.35 142.23 213.35 −142.23
s5 = 

−320.02 213.35 −213.35 3

320.02
213.35 −142.23 −213.35 142.23 4

Member 6: L = 72 · 12 + 22 , θ = 296.57o , EA = 120,000 k
3 4 5 6
149.07 −298.14 −149.07 298.14 3
 

4
−298.14 596.28 298.14 −596.28
s6 = 

−149.07 298.14 149.07 −298.14 5

298.14 −596.28 −298.14 596.28 6

Given in line #24–61 of the Scilab/Octave code at the end.

The element global DOFs are shown in Table 4.2.

TABLE 4.2
Global DOFs of the Truss, Connectivity Matrix
Element Node-1 Node-2
1 1 2 3 4
2 1 2 5 6
3 1 2 7 8
4 7 8 5 6
5 7 8 3 4
6 3 4 5 6

@seismicisolation
@seismicisolation
234 Matrix Structural Analysis and the Finite Element Methods

Given in line #15–21 of the Scilab/Octave code at the end.

Step 3: Selectively adding the element stiffness matrix si into a global structure
stiffness matrix results in the following assembled stiffness matrix S.

S=
 
850.18 294.63 −555.56 0 −294.63 −294.63 0 0
0 −294.63 −294.63 −833.33
 
 294.63 1127.96 0 0 
 
 −555.56 0 1024.65 −511.49 −149.07 298.14 −320.02 213.35 
 
 
 0 0 −511.49 738.52 298.14 −596.28 213.35 −142.23 
 
 −294.63 −294.63 −149.07 298.14 1277.03 −3.51 −833.33 0

 
 
 −294.63 −294.63 298.14 −596.28 −3.51 890.91 0 0 
 
0 −320.02 213.35 −833.33 −213.35
 
 0 0 1153.35 
0 −833.33 213.35 −142.23 0 0 −213.35 975.56

Given in line #65–92 of the Scilab/Octave code at the end.

The partitioned S j j and Sr j become.


 
850.18 −294.63 −294.63 0 −294.63
−294.63 1277.03 −3.51457 0 −294.63
 
Sjj =  
 −294.63 −3.51457 890.91 0 −149.07 

0 0 0 975.56 298.14
 
294.63 −555.56 0 0
 −294.63 −149.07 298.1424 −833.333
 
Sr j = 
 
 −294.63 298.1424 −596.28 0 

−833.333 213.3462 −142.23 −213.35

Given in line #95–106 of the Scilab/Octave code at the end.

Step 4: The plane truss is supported along DOFs 1, 3, 4 and 7 while it is loaded
by 2P and −P along DOF 5 and 6, respectively. Thus, the action vector AJ in the
global coordinates is as shown below.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 235

   
0 0
 2P   160 
 −P  =  −80 
Aj =    

0 0

Given in line #109 of the Scilab/Octave code at the end.

Step 5: The partitioned (modified) structure stiffness equation is shown below,


while the unknown displacements D j s are determined using Equation (4.26) as
shown below.

   
0 850.18 −294.63 −294.63 0
 160  −294.63 1277.03 −3.51 0
   

×Dj
 −80  = −294.63
  
   −3.51 890.91 0 

0 0 0 0 975.56

   −1  
d1 850.18 −294.63 −294.63 0 0
 d5  −294.63 1277.03 −3.51 0  160 
     

Dj = 
 =  ×
 
 d6  −294.63 −3.51 890.91 0  −80 
   

d8 0 0 0 975.56 0

   
d1 0.0154
 d5   0.1286 
   
⇒  =
 d   −0.0842  in ANS

 6   
d8 0.

Given in line #112 of the Scilab/Octave code at the end.

Step 6: The support reactions are computed using Equation (4.27).

@seismicisolation
@seismicisolation
236 Matrix Structural Analysis and the Finite Element Methods

 
−66.92
 −48.81 
 
[Ar ] = [Sr j ] × [D j ] = 
 84.02  kips

 
26.59

Given in line #115 of the Scilab/Octave code at the end.

Step 7: Member forces in the global coordinates in kips are determined using the
equation below that is similar to Equation (4.28), in which si is the global stiffness
matrix computed in Step 2, Dmi are member global displacements identified from the
D j s solved above. The procedure and the results are shown below.

[Âmi ] = [Ti ] × [si ] × [Dmi ]


where:
Ti is the transformation matrix of the element i
     
0.0154 0.0154 0.0154
 0  0  0 
     
 
Dm1 =  
 , Dm2 =  0.1286  , Dm3 =  0 
    
 0     
0 −0.0842 0
     
0 0 0
0 0 0
     
   
Dm4 = 
  , Dm5 =   , Dm6 = 
   
 0.1286  0  0.1286 
 

−0.0842 0 −0.0842

Therefore, the member forces at both ends of each member are given in kips in
the following table:

Member 1 2 3 4 5 6
Node-1 8.55 −12.09 0 −107.17 0 −99
Node-2 −8.55 12.09 0 107.17 0 99

Given in line #118–123 of the Scilab/Octave code at the end.

The corresponding Scilab code showing the complete solution steps is given in
the listing below.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 237

Scilab/Octave Code
1 // Example 4.4 - Plane Truss
2 // Direct Stiffness Method
3

4 // Common units for analysis: Force in kip, Length in inche


5

6 // Given parameters & constants in appropriate units:


7 P = 80 // in kips
8 P1 = 2*P; P2 = -P;
9 // Cross-sectional area in2
10 A = 12
11 // Modulus of elasticity, ksi
12 E = 10000
13

14 // Member connectivity matrix


15 conn = [1 2 3 4
16 1 2 5 6
17 1 2 7 8
18 7 8 5 6
19 7 8 3 4
20 3 4 5 6]
21

22 // Function to compute transformation matrix of an element


23 // theta is the angle in degrees from global X to local x
24 function [Tra] = getT(theta)
25 c = cosd(theta);
26 s = sind(theta);
27 Tra = [c s 0 0;-s c 0 0;0 0 c s;0 0 -s c]
28 endfunction
29

30 // Function to compute element stiffness matrix in local CS


31 function [s] = gets(E, A, L)
32 eal = E*A/L;
33 s = [eal 0 -eal 0;0 0 0 0;-eal 0 eal 0;0 0 0 0]
34 endfunction
35

36 Theta = [];
37 // Element stiffness matrices in global coordinate
38 // Element 1
39 L = 1.5*12*12; theta = 0
40 s1 = getT(theta)'*gets(E,A,L)*getT(theta)
41 Theta(1) = theta // save thetas for future use
42 // Element 2

@seismicisolation
@seismicisolation
238 Matrix Structural Analysis and the Finite Element Methods

43 L = sqrt(2)*12*12; theta = 45
44 s2 = getT(theta)'*gets(E,A,L)*getT(theta)
45 Theta(2) = theta
46 // Element 3
47 L = 12*12; theta = 90
48 s3 = getT(theta)'*gets(E,A,L)*getT(theta)
49 Theta(3) = theta
50 // Element 4
51 L = 12*12; theta = 0
52 s4 = getT(theta)'*gets(E,A,L)*getT(theta)
53 Theta(4) = theta
54 // Element 5
55 L = 12*sqrt(12^2+18^2); theta = 360 - atand(1/1.5)
56 s5 = getT(theta)'*gets(E,A,L)*getT(theta)
57 Theta(5) = theta
58 // Element 6
59 L = 12*sqrt(12^2+6^2); theta = 360 - atand(2)
60 s6 = getT(theta)'*gets(E,A,L)*getT(theta)
61 Theta(6) = theta
62

63 // A function to assemble element stiffness into


64 // the structure stiffness
65 function [S] = assemble(se,idx,S)
66 a = idx(1);b=idx(2);c=idx(3);d=idx(4);
67 S(a:b,a:b) = S(a:b,a:b) + se(1:2,1:2);
68 S(a:b,c:d) = S(a:b,c:d) + se(1:2,3:4);
69 S(c:d,a:b) = S(c:d,a:b) + se(3:4,1:2);
70 S(c:d,c:d) = S(c:d,c:d) + se(3:4,3:4);
71 endfunction
72

73 // Assemble the global stiffness matrix of the truss


74 S = zeros(8,8)
75 // indices for element 1
76 idx = conn(1,:);
77 S = assemble(s1,idx,S);
78 // indices for element 2
79 idx = conn(2,:);
80 S = assemble(s2,idx,S);
81 // indices for element 3
82 idx = conn(3,:);
83 S = assemble(s3,idx,S);
84 // indices for element 4
85 idx = conn(4,:);
86 S = assemble(s4,idx,S);
87 // indices for element 5

@seismicisolation
@seismicisolation
The Direct Stiffness Method 239

88 idx = conn(5,:);
89 S = assemble(s5,idx,S);
90 // indices for element 6
91 idx = conn(6,:);
92 S = assemble(s6,idx,S);
93

94 // Partitioning S; restrained DOFs


95 res = [2 3 4 7];
96 Sjj = S // Duplicate S into Sjj
97

98

99 Sjj(res,:) = [] // Delete the row j


100 Sjj(:,res) = [] // Delete the column j
101

102

103 // Gather the Srj matrix from S


104 Srj = [ S(1,2:4), S(1,7);
105 S(5:6,2:4),S(5:6,7);
106 S(8,2:4),S(8,7)]
107

108 // Nodal actions


109 Aj = [0; P1; P2; 0]
110

111 // Nodal displacements of the system are


112 Dj = inv(Sjj)*Aj
113

114 // The support reaction at node 1 is


115 Ar = Srj*Dj
116

117 // Member forces in the local coordinate are given as


118 Am1 = getT(Theta(1))*s1*[Dj(1);0;0;0]
119 Am2 = getT(Theta(2))*s2*[Dj(1);0;Dj(2);Dj(3)]
120 Am3 = getT(Theta(3))*s3*[Dj(1);0;0;Dj(4)]
121 Am4 = getT(Theta(4))*s4*[0;Dj(4);Dj(2);Dj(3)]
122 Am5 = getT(Theta(5))*s5*[0;Dj(4);0;0]
123 Am6 = getT(Theta(6))*s6*[0;0;Dj(2);Dj(3)]
124

125 // END: ........... Example 4.4

Example 4.5 Analyze the plane frame shown in Figure 4.17(a) using the DSM. For
all members, take E = 200 GPa, A = 13,000 mm2 and I = 760e6 mm4 .

@seismicisolation
@seismicisolation
240 Matrix Structural Analysis and the Finite Element Methods

SOLUTION
Step 1: The plane frame has four nodes, three elements and twelve possible global
DOFs. The members, nodes and global DOFs are numbered as shown in Figure
4.17(b); the circled are node numbers, while the element numbers are inside a
square. The displacements d1 , d2 , d3 , d7 , d1 0, d1 1 and d1 2 are restrained (they cor-
respond to Ar ), while d4 , d5 , d6 and d8 are free joint displacements (D j s).
Step 2: The element stiffness matrix of each plane frame member in the global
coordinate system is computed from Equation (4.11) transforming it using Equation
4.12, and they are given as follows.

FIGURE 4.17 (a) Plane frame and Loading and (b) Nodes, Elements and Global
DOFs.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 241

Member 1: L = 12 2 m, θ = 45o , E = 200e6 kN/m2 , A = 13e−3 m2 , I = 760e−6 m4

1 2 3 4 6 5
76.88 76.32 -3.36 -76.88 -76.32 -3.36 1
 
 76.32 76.88 3.36 -76.32 -76.88 3.36 
 2
 
 -3.36 3.36 53.74 3.36 3
-3.36 26.87
s1 = 103 × 


-76.88 -76.32
 3.36 76.88 76.32 3.36  4
-76.32 -76.88 -3.36 76.32 76.88 -3.36  5
 

-3.36 3.36 26.87 3.36 -3.36 53.74 6

Member 2: L = 12 m, θ = 45o , E = 200e6 kN/m2 , A = 13e−3 m2 , I = 760e−6 m4

4 5 6 7 8 9
216.67 0 0 −216.67 0 4
0
 

 0 1.06 6.33 0 −1.06 6.33  5

 
 0 6.33 50.67 0 −6.33 25.33 
6
s2 = 103 × 


−216.67 0 0 216.67 0 0 
 7
0 −1.06 −6.33 0 1.06 −6.33 8
 

0 6.33 25.33 0 −6.33 50.67 9

Member 3: L = 12 m, θ = 45o , E = 200e6 kN/m2 , A = 13e-3 m2 , I = 760e-6 m4

7 8 9 10 11 12
1.06 0 6.33 −1.06 0 6.33 7
 
 0
 216.67 0 0 −216.67 0 8
 
 6.33 0 50.67 −6.33 0 25.33 
9
s3 = 103 × 


−1.06 0 −6.33 1.06 0 −6.33
  10
 0 −216.67 0 0 216.67 0  11
 

6.33 0 25.33 −6.33 0 50.67 12

Given in line #20–48 of the Scilab/Octave code at the end.

The connectivity matrix for the elements and the structure DOFs is given below.

@seismicisolation
@seismicisolation
242 Matrix Structural Analysis and the Finite Element Methods

 
1 2 3 4 5 6
Connectivity =  4 5 6 7 8 9 
 

7 8 9 10 11 12

Step 3: Element stiffness matrices si are selectively added to determine the as-
sembled structure stiffness matrix S shown below.

Given in line #51–55 of the Scilab/Octave code at the end.

This global stiffness matrix S relates the action vector on the structure to the cor-
responding displacements vector as shown in the following equation.

   
Ar1 0
   
 Ar2   0 
   

 Ar3  
 0  
   

 A j1 
 
 D j1 

   

 A j2 


 D j2 

A j3  D j3 
   
 
  = S× 

 Ar4  
 0  
   

 A j4 


 D j4 

   

 A j5 


 D j5 

Ar5  0 
   
 
   

 Ar6  
 0  
Ar7 0

Then, the global stiffness matrix S of the plane frame can be partitioned into
S j j , Sr j , S jr and Srr by selecting appropriate rows and columns corresponding to
A j orAr , as listed below.

 
656.33 210.33 26.87 0 0
210.33 231.44 −1.54 −8.44
 
25.33 
 
S j j = 103 ×  26.87 −1.54 253.33 −25.33 50.67 
 
 
 0
 −8.44 −25.33 441.78 −25.33
0 25.33 50.67 −25.33 202.67

@seismicisolation
@seismicisolation
 
76.88 76.32 -3.36 -76.88 -76.32 -3.36 0 0 0 0 0 0
 
 76.32 76.88 3.36 -76.32 -76.88 3.36 0 0 0 0 0 0 
The Direct Stiffness Method

 
 -3.36 3.36 53.74 3.36 -3.36 26.87 0 0 0 0 0 0 
 
 
 -76.88
 -76.32 3.36 293.55 76.32 3.36 -216.67 0 0 0 0 0 

 
 -76.32
 -76.88 -3.36 76.32 77.94 2.97 0 -1.06 6.33 0 0 0 

 
 -3.36 3.36 26.87 3.36 2.97 104.41 0 -6.33 25.33 0 0 0 
S = 103 × 


 0 0 0 -216.67 0 0 217.72 0 6.33 -1.06 0 6.33 

 

 0 0 0 0 -1.06 -6.33 0 217.72 -6.33 0 -216.67 0 

@seismicisolation
@seismicisolation
 

 0 0 0 0 6.33 25.33 6.33 -6.33 101.33 -6.33 0 25.33 

 
 0 0 0 0 0 0 -1.06 0 -6.33 1.06 0 -6.33 
 
 0 0 0 0 0 0 0 -216.67 0 0 216.67 0 
 
0 0 0 0 0 0 6.33 0 25.33 -6.33 0 50.67
243
244 Matrix Structural Analysis and the Finite Element Methods

−223 −210.33 −26.87


 
0 0
−210.33 −223 26.87 0 0
 

 
 26.87
 −26.87 76 0 0  
3 
 
Sr j = 10 × −433.33 0 0 0 25.33 

−25.33
 
 0 0 0 0
 
0 0 0 −433.33 0 
 

0 0 0 0 50.67

 
−223 −210.33 26.87 −433.33 0 0 0
 −210.33 −223 −26.87
 
0 0 0 0 
 
3 
S jr = 10 ×  −26.87 26.87 76 0 0 0 0


 

 0 0 0 0 0 −433.33 0 

0 0 0 25.33 −25.33 0 50.67

210.33 −26.87
 
223 0 0 0 0
 210.33 223 26.87 0 0 0 0
 

 
−26.87 26.87 152 0 0 0 0 
 
3 
 
Srr = 10 ×  0 0 0 441.78 −8.44 0 25.33 

−8.44 −25.33
 
 0 0 0 8.44 0
 
 0 0 0 0 0 433.33 0 
 

0 0 0 25.33 −25.33 0 101.33

Given in line #59–75 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 245

TABLE 4.3
Total Fixed-End-Actions on the Plane Frame
Node 1 2L 2R 3L 3R 4

FxF (kN) −144 −144 0 0 0 0


FyF (kN) 144 144 62.5 62.5 0 0
M F (kN · m) 576 −576 187.5 −187.5 0 0

Step 4: The plane frame members 1 and 2 are subjected to fixed-end actions given
in Table 4.3 as computed using the following equations.

Member − 1 (in the local coordinate!)


F = 0.5w · L
V12 F = 0.5w · L
V21
1 1

F =
w · L12 F =−
w · L12
M12 M21
12 12

Member − 2
F = 0.5P
V23 F = 0.5P
V32

F = 0.125P · L
M23 F = −0.125P · L
M32
2 2

The fixed-end actions in the local coordinate for member 1 have to be trans-
formed into the global coordinate using the following transformation relationship:
AFglobal = T T × AFlocal .

Given in line #78–93 of the Scilab/Octave code at the end.

The total nodal actions vector A j is given as follows.


   
144 kN 144.
 −144 − 62.5 kN  −206.5
   
   
A j = 576 − 187.5 kN · m =  388.5 
   
   

 −62.5 kN   −62.5 
  
187.5 kN · m 187.5

Given in line #99 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
246 Matrix Structural Analysis and the Finite Element Methods

Step 5: The modified (partitioned) structure stiffness equation to solve for the
unknown displacements D j s, as derived in Equation (4.26), is shown below.

    −1  
d4 656.33 210.33 26.87 0 0 144.
210.33 231.44 −1.54 −8.44 −206.5
      
d5   25.33 
      
   3 
d6  = 10 ·  26.87 −1.54 253.33 −25.33 50.67  ×  388.5 
  
      
d  
 8 
 0
 −8.44 −25.33 441.78 −25.33 

 −62.5 
 
d9 0 25.33 50.67 −25.33 202.67 187.5

   
d4 1.61 m
d5  −4.46 m
   
   
⇒ d6  = 3.48 rad  × 10−3
   
   
d  −0.17 m
 8  
d9 1.25 rad

Given in line #102 of the Scilab/Octave code at the end.


Step 6: The support reactions are computed using Equation (4.27).
 
61.13 kN
 375.93 kN 
 
 
 690. kN · m 
 
[Ar ] = [Sr j ] × [D j ] + [AFr ] = 
 
−341.23 kN 

 −7.90 kN 
 
 
 37.07 kN 
 

31.61 kN · m

Given in line #105 of the Scilab/Octave code at the end.

Step 7: Member forces in the local coordinates in Newtons are determined using
Equation (4.28), as shown below.

[Ami ] = [si ] × [Dmi ] + [AFmi ]

@seismicisolation
@seismicisolation
The Direct Stiffness Method 247

TABLE 4.4
Final Member-End-Actions
Member 1 2 3
Node 1 2 1 2 1 2

Axial Force (kN) 309.05 −309.05 349.13 −349.13 37.07 −37.07


Shear Force (kN) 222.60 184.70 87.93 37.07 7.90 −7.90
Bending Moment (kN · m) 690.00 −368.41 368.41 −63.22 63.22 31.61

Accordingly, the member end forces are given in Table 4.4.

Given in line #108–110 of the Scilab/Octave code at the end.

The corresponding Scilab code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 // Example 4.5 - Plane Frame
2 // Direct Stiffness Method
3

4 // Common units for analysis: Force in N, Length in mm


5

6 // Given parameters constants in appropriate units:


7 // Modulus of elasticity
8 E=200e6; // kN/m2
9 // Length, cross-sectional area & moment of inertia
10 L = 6; A=13e-3;I = 760e-6; // m, m2, m4
11 // Loadings, w and P
12 w=24; P = 125; // kN/m2
13

14 // Function to compute ELEMENT stiffness properties


15 // (T,sh & s) in local and global coordinates (S)
16 // Taking modulus of elasticity (E), x-sectional
17 // area, moment-of-inertia and length (A,I,L) and
18 // member inclination angle (theta) in degrees
19 // from global X to local x
20 function [Tra,sh,s] = stiff2Dframe(L,E,A,I,theta)
21 co = cosd(theta);
22 sn = sind(theta);
23 Tra = [ co sn 0 0 0 0;-sn co 0 0 0 0;0 0 1 0 0 0;
24 0 0 0 co sn 0;0 0 0 -sn co 0; 0 0 0 0 0 1];

@seismicisolation
@seismicisolation
248 Matrix Structural Analysis and the Finite Element Methods

25

26 EA = E*A; EI = E*I;
27 sh =[EA/L 0 0 -EA/L 0 0
28 0 (12*EI)/L^3 (6*EI)/L^2 0 (-12*EI)/L^3 (6*EI)/L^2
29 0 (6*EI)/L^2 (4*EI)/L 0 -(6*EI)/L^2 (2*EI)/L
30 -EA/L 0 0 EA/L 0 0
31 0 -(12*EI)/L^3 -(6*EI)/L^2 0 (12*EI)/L^3 (-6*EI)/L^2
32 0 (6*EI)/L^2 (2*EI)/L 0 -(6*EI)/L^2 (4*EI)/L]
33

34 s = Tra'*sh*Tra;
35 endfunction
36

37 // Element stiffness matrices


38 // Member 1: length in m and inclination angle in degrees
39 Len(1) = 2*L*sqrt(2); theta = 45;
40 [T1,sh1,s1] = stiff2Dframe(Len(1),E,A,1.5*I,theta)
41

42 // Member 2: length in m and inclination angle in degrees


43 Len(2) = 2*L; theta = 0;
44 [T2,sh2,s2] = stiff2Dframe(Len(2),E,A,I,theta)
45

46 // Member 1: length in m and inclination angle in degrees


47 Len(3) = 2*L; theta = 270;
48 [T3,sh3,s3] = stiff2Dframe(Len(3),E,A,I,theta)
49

50 // Assembling global stiffness matrix of the plane frame


51 S = zeros(12,12);
52

53 S(1:6,1:6) = S(1:6,1:6) + s1;


54 S(4:9,4:9) = S(4:9,4:9) + s2;
55 S(7:12,7:12) = S(7:12,7:12) + s3;
56

57 // Partitioning S; restrained DOFs


58 res = [1 2 3 7 10 11 12];
59 Sjj = S // Duplicate S into Sjj
60

61

62 Sjj(res,:) = [] // Delete the row j


63 Sjj(:,res) = [] // Delete the column j
64

65

66 // Gather the Srj matrix from S


67 Srj = [ S(1:3,4:6), S(1:3,8:9);
68 S(7,4:6), S(7,8:9);
69 S(10:12,4:6), S(10:12,8:9)]

@seismicisolation
@seismicisolation
The Direct Stiffness Method 249

70

71 Sjr = Srj';
72

73 Srr = [ S(1:3,1:3), S(1:3,7), S(1:3,10:12);


74 S(7,1:3), S(7,7), S(7,10:12)
75 S(10:12,1:3), S(10:12,7),S(10:12,10:12)];
76

77 // Fixed-end actions from loading and support settlement


78 V12F = 0.5*w*Len(1)
79 M12F = w*Len(1)^2/12
80 V21F = 0.5*w *Len(1)
81 M21F = -w*Len(1)^2/12
82 V23F = 0.5*P
83 M23F = 0.125*P*Len(2)
84 V32F = 0.5*P
85 M32F = -0.125*P*Len(2)
86

87 // Fixed-end actions of Member-1 in global CS


88 AF1 = T1'*[0; V12F; M12F; 0; V21F; M21F]
89

90 // Member fixed-end actions, in local coordinate


91 Amf1 = [0 V12F M12F 0 V21F M21F]'
92 Amf2 = [0 V23F M23F 0 V32F M32F]'
93 Amf3 = [0; 0; 0; 0; 0; 0]
94

95 // Fixed-end actions at the reactions


96 Arf = [AF1(1:3); 0; 0; 0; 0]
97

98 // Nodal actions (from quivalent nodal load)


99 Aj = [-AF1(4);-(AF1(5)+V23F);-(AF1(6)+M23F);-V32F;-M32F]
100

101 // Nodal displacements of the system are


102 Dj = inv(Sjj)*Aj
103

104 // The support reaction are


105 Ar = Srj*Dj + Arf
106

107 // Member forces in the local coordinate are given as


108 Am1 = T1*s1*[0;0;0;Dj(1);Dj(2);Dj(3)] + Amf1
109 Am2 = T2*s2*[Dj(1);Dj(2);Dj(3);0;Dj(4);Dj(5)] + Amf2
110 Am3 = T3*s3*[0;Dj(4);Dj(5);0;0;0]
111

112 // END: ........... Example 4.5

@seismicisolation
@seismicisolation
250 Matrix Structural Analysis and the Finite Element Methods

FIGURE 4.18 (a) Grid Structure Having three-Members and (b) Its Nodes, Members
and Global DOFs.

Example 4.6 Analyze the grid structure shown in Figure 4.18 using the formalized
stiffness method. All members have E = 29,000 ksi, G = 11,500 ksi; I = 1350 in4 and
J = 250 in4 .

SOLUTION
Step 1: The grid structure has four nodes, three elements and twelve possible global
DOFs. The members, nodes and global DOFs are numbered as shown in Figure
4.18(b); the circled are node numbers, while the element numbers are inside a
square. The displacements d1 , d2 and d3 are free joint displacements (D j s), while
d4 –d12 are restrained (they correspond to Ar ).
Step 2: The element stiffness matrix of each grid member in the global coordinate
system is computed from Equation (4.13) transforming it using Equation (4.14), and
they are given as follows.
Member 1: L = 25 f t, θ = 0o , E = 29, 000 × 144 k/ f t 2 , G = 11, 500 ×
144 k/ f t 2 , I = 1350/124 f t 4 , J = 250/124 f t 4

@seismicisolation
@seismicisolation
The Direct Stiffness Method 251

1 2 3 4 5 6
0.21 −2.61 0.00 −0.21 −2.61 0.00 1
 
−2.61 43.50 0.00 2.61 21.75 0.00  2


 
 0.00 0.00 0.80 0.00 0.00 −0.80
3
s1 = 103 × 


−0.21 2.61 0.00 0.21 2.61 0.00 
 4
−2.61 21.75 0.00 2.61 43.50 0.00  5
 

0.00 0.00 −0.80 0.00 0.00 0.80 6



Member 2: L = 5 5 + 3 f t, θ = 30.964o ,
2 2 E = 29, 000×144 k/ f t 2 , G = 11, 500×
144 k/ f t 2 , I = 1350/124 f t 4 , J = 250/124 f t4
1 2 3 7 8 9
0.28 −1.65 −0.24 −0.28 −1.65 1 0.24
 
−1.65 37.30 −0.99 1.65 18.65 0.99  2


 
−0.24 −0.99 0.54 0.24 −0.99 −0.54
3 3
s2 = 10 × 


−0.28 1.65 0.24 0.28 1.65 −0.24
 7
−1.65 18.65 −0.99 1.65 37.30 0.99  8
 

0.24 0.99 −0.54 −0.24 0.99 0.54 9


Member 3: L = 15 f t, θ = 90o , E = 29, 000 × 144 k/ f t 2 , G = 11, 500 ×
144 k/ f t 2 , I = 1350 f t 4 , J = 250/124 f t 4

1 2 3 10 11 12
1.33 0.00 0.00 −1.33 0.00 10.00
 
 0.00
 72.50 −7.25 0.00 36.25 7.25  2

 
 0.00 −7.25 0.97 0.00 −7.25 −0.973
s3 = 103 × 


−1.33 0.00 0.00 1.33 0.00 0.00 
  10
 0.00 36.25 −7.25 0.00 72.50 7.25  11
 

0.00 7.25 −0.97 0.00 7.25 0.97 12

Given in line #19–46 of the Scilab/Octave code at the end.


The connectivity matrix for the elements and the structure DOFs is given below.
 
1 2 3 4 5 6
Connectivity =  1 2 3 7 8 9 
 

1 2 3 10 11 12
Step 3: Element stiffness matrices si are selectively added to determine the as-
sembled structure stiffness matrix S shown below.

@seismicisolation
@seismicisolation
252

 
1.82 −4.26 −0.24 −0.21 −2.61 0.00 −0.28 −1.65 0.24 −1.33 0.00 0.00
 
 −4.26 153.30 −8.24 2.61 21.75 0.00 1.65 18.65 0.99 0.00 36.25 7.25 
 
 −0.24 −8.24 2.30 0.00 0.00 −0.80 0.24 −0.99 −0.54 0.00 −7.25 −0.97 
 
 

 −0.21 2.61 0.00 0.21 2.61 0.00 0.00 0.00 0.00 0.00 0.00 0.00 

 

 −2.61 21.75 0.00 2.61 43.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 

 
 0.00 0.00 −0.80 0.00 0.00 0.80 0.00 0.00 0.00 0.00 0.00 0.00 
S = 103 × 


 −0.28 1.65 0.24 0.00 0.00 0.00 0.28 1.65 −0.24 0.00 0.00 0.00 

 

 −1.65 18.65 −0.99 0.00 0.00 0.00 1.65 37.30 0.99 0.00 0.00 0.00 

@seismicisolation
 

@seismicisolation

 0.24 0.99 −0.54 0.00 0.00 0.00 −0.24 0.99 0.54 0.00 0.00 0.00 

 
 −1.33 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.33 0.00 0.00 
 
 0.00 36.25 −7.25 0.00 0.00 0.00 0.00 0.00 0.00 0.00 72.50 7.25 
 
0.00 7.25 −0.97 0.00 0.00 0.00 0.00 0.00 0.00 0.00 7.25 0.97
Matrix Structural Analysis and the Finite Element Methods
The Direct Stiffness Method 253

Given in line #49–58 of the Scilab/Octave code at the end.

This global stiffness matrix S relates the action vector on the structure to the
corresponding displacements vector as shown in the following equation.
   
A j1 D j1
   
 A j2   D j2 
   
 A   D 
 j3   j3 
   
 Ar1   0 
   
   
 Ar2   0 
   
 Ar3   0 
   
  = S× 
 A   0 
 r4   
   
 Ar5   0 
   
   
 Ar6   0 
   
 Ar7   0 
   
   
 A   0 
 r8   
Ar9 0
Then, the global stiffness matrix S of the grid can be partitioned into S j j , Sr j , S jr
and Srr by selecting appropriate rows and columns corresponding to A j or Ar , as
listed below.

−4.26 −0.24
 
1.82
S j j = 103 × −4.26 153.30 −8.24
 

−0.24 −8.24 2.30


 
−0.21 2.61 0.00
 
−2.61 21.75 0.00 
 
 0.00 0.00 −0.80
 
 
−0.28 1.65 0.24 
 
3 
 
Sr j = 10 × −1.65 18.65 −0.99

0.99 −0.54
 
 0.24
 
−1.33 0.00 0.00 
 
 
 0.00 36.25 −7.25
 
0.00 7.25 −0.97

@seismicisolation
@seismicisolation
254 Matrix Structural Analysis and the Finite Element Methods

S jr = SrTj

 
0.21 2.61 0.00 0.00 0.00 0.00 0.00 0.00 0.00
 
2.61 43.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00
 
0.00 0.00 0.80 0.00 0.00 0.00 0.00 0.00 0.00
 
 
0.00 0.00 0.00 0.28
 1.65 −0.24 0.00 0.00 0.00
3 
 
Srr = 10 × 0.00 0.00 0.00 1.65 37.30 0.99 0.00 0.00 0.00 
0.00 0.00 0.00 −0.24 0.99
 
0.54 0.00 0.00 0.00
 
0.00 0.00 0.00 0.00 0.00 0.00 1.33 0.00 0.00
 
 
0.00 0.00 0.00 0.00 0.00 0.00 0.00 72.50 7.25
 
0.00 0.00 0.00 0.00 0.00 0.00 0.00 7.25 0.97

Given in line #61–66 of the Scilab/Octave code at the end.


Step 4: The grid members 1 and 3 are subjected to fixed-end actions given in
Table 4.5 as computed using the following equations.
Member-1
F = 0.5w · L
V12 F = 0.5w · L
V21
1 1

F =
w · L12 F =−
w · L12
M12 M21
12 12
Member-2

F =
w · a2 · (6L32 − 8a · L3 + 3a2 ) F =−
w · a3 (4L3 − 3a)
M14 M 41
12L32 12L32
F =
M14 + M41 + w · a(L3 − 0.5a) F = w · a −V
V14 V41 14
L3

TABLE 4.5
Fixed-End-Actions on the Members of the Grid Structure
Member 1 3

Joint 1 2 1 4

VF (k) 3 3 1.616 0.544


M F (k · f t) 12.5 −12.5 3.694 −2.138

@seismicisolation
@seismicisolation
The Direct Stiffness Method 255

The fixed-end actions in the local coordinate for member 1 have to be trans-
formed into the global coordinate using the following transformation relationship:
AFglobal = T T × AFlocal .

Given in line #69–81 of the Scilab/Octave code at the end.


The total nodal actions vector A j is given as follows.

−24.616
 

A j =  −3.694 
 

12.5

Given in line #84 of the Scilab/Octave code at the end.


Step 5: The modified (partitioned) structure stiffness equation to solve for the
unknown displacements D j s, as derived in Equation (4.26), is shown below.

−1 
−4.26 −0.24 −24.616 k
    
d1 1.82
   3 
d2  = 10 × −4.26 153.30 −8.24 × −3.694 k − f t 
  

d3 −0.24 −8.24 2.30 12.50 k − f t

−60.45 in
   
d1
⇒ d2  = 10−3 ×  5.49 rad 
   

d3 −2.15 rad

Given in line #90 of the Scilab/Octave code at the end.


Step 6: The support reactions are computed using Equation (4.27).

 
10.0 k
 
 8.12 k · f t 
 
 110.91 k · f t 
 
 
 −1.0 k 
 
F
 
[Ar ] = [Sr j ] × [D j ] + [Ar ] =  −16.97 k · f t 


 23.49 k · f t 
 
 
 19.16 k 
 
 
−239.20 k · f t 
 
0.73 k · f t

@seismicisolation
@seismicisolation
256 Matrix Structural Analysis and the Finite Element Methods

TABLE 4.6
Final Member-End-Actions
Member 1 2 3
Local Node 1 2 1 2 1 2
Shear Force (k) −4. 10.0 1.01 −1.01 −17.01 19.17
Twisting Moment (k · f t) 4.38 −4.38 2.47 −2.47 −2.87 2.87
Bending Moment (k · f t) 76.56 98.41 −58.27 28.87 43.86 237.07

Given in line #93 of the Scilab/Octave code at the end.


Step 7: Member forces in the local coordinates in kips and k-ft are determined
using Equation (4.28), as shown below.

[Ami ] = [si ] × [Dmi ] + [AFmi ]


Accordingly, the member end forces are given in Table 4.6

Given in line #96–98 of the Scilab/Octave code at the end.

The corresponding Octave code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code

1 % Example 4.6 - Grid Structure


2 % Direct Stiffness Method
3

4 % Common units for analysis: Force in kip, Length in ft


5 clear all;
6 % Given parameters constants:
7 E = 29000*144; G = 11500*144; % in k/ft^2
8 w = 0.24; P = 20; % in k/ft, k
9 I = 1350/(12^4); J = 250/(12^4); % in ft^4
10 Len = [25,sqrt(25^2+15^2),15]; % in ft
11 a = 9; % in ft, for the
12 % ... partially loaded section
13 % Function to compute ELEMENT stiffness properties
14 % (T,sh & s) in local and global coordinates (s),
15 % Parameters (E,G,L,I,J,theta) modulus of elasticity,
16 % shear modulus, length, moment-of-inertia,
17 % polar moment-of-inertia and member inclination angle

@seismicisolation
@seismicisolation
The Direct Stiffness Method 257

18 % in degrees from global X to local x


19 function [Tra,sh,s] = stiffGrid(L,E,I,G,J,theta)
20 co = cosd(theta); sn = sind(theta);
21 Tra = [1 0 0 0 0 0; 0 co sn 0 0 0;0 -sn co 0 0 0;
22 0 0 0 1 0 0;0 0 0 0 co sn; 0 0 0 0 -sn co];
23

24 EI = E*I; GJ = G*J;
25 sh =[12*EI/L^3 0 -6*EI/L^2 -12*EI/L^3 0 -6*EI/L^2
26 0 GJ/L 0 0 -GJ/L 0
27 -6*EI/L^2 0 4*EI/L 6*EI/L^2 0 2*EI/L
28 -12*EI/L^3 0 6*EI/L^2 12*EI/L^3 0 6*EI/L^2
29 0 -GJ/L 0 0 GJ/L 0
30 -6*EI/L^2 0 2*EI/L 6*EI/L^2 0 4*EI/L]
31

32 s = Tra'*sh*Tra;
33 endfunction
34

35 % Element stiffness matrices


36 % Member 1: length in ft and inclination angle in degrees
37 theta = 0;
38 [T1,sh1,s1] = stiffGrid(Len(1),E,I,G,J,theta)
39

40 % Member 2: length in m and inclination angle in degrees


41 theta = atand(0.6);
42 [T2,sh2,s2] = stiffGrid(Len(2),E,I,G,J,theta)
43

44 % Member 3: length in m and inclination angle in degrees


45 theta = 90;
46 [T3,sh3,s3] = stiffGrid(Len(3),E,I,G,J,theta)
47

48 % Assembling global stiffness matrix of the grid structure


49 S = zeros(12);
50

51 S(1:6,1:6) = S(1:6,1:6) + s1;


52 S(1:3,1:3) = S(1:3,1:3) + s2(1:3,1:3) + s3(1:3,1:3);
53 S(1:3,7:9) = S(1:3,7:9) + s2(1:3,4:6);
54 S(7:9,1:3) = S(7:9,1:3) + s2(4:6,1:3);
55 S(7:9,7:9) = S(7:9,7:9) + s2(4:6,4:6);
56 S(1:3,10:12) = S(1:3,10:12) + s3(1:3,4:6);
57 S(10:12,1:3) = S(10:12,1:3) + s3(4:6,1:3);
58 S(10:12,10:12) = S(10:12,10:12) + s3(4:6,4:6);
59

60 % Partitioning S; restrained DOFs


61 Sjj = S(1:3,1:3) % Duplicate S into Sjj
62

@seismicisolation
@seismicisolation
258 Matrix Structural Analysis and the Finite Element Methods

63 % Gather the Srj matrix from S


64 Srj = S(4:12,1:3)
65 Sjr = S(1:3,4:12)
66 Srr = S(4:12,4:12)
67

68 % Fixed-end actions from loading and support settlement


69 V12 = 0.5*w*Len(1)
70 M12 = w*Len(1)^2/12
71 V21 = 0.5*w *Len(1)
72 M21 = -w*Len(1)^2/12
73 M14 = w*a^2*(6*Len(3)^2-8*a*Len(3)+3*a^2)/(12*Len(3)^2)
74 M41 = -w*a^3*(4*Len(3)-3*a)/(12*Len(3)^2);
75 V14 = (M41+M14+w*a*(Len(3)-a/2))/Len(3);
76 V41 = w*a-V14;
77

78 % Member fixed-end actions, in local coordinate


79 Amf1 = [V12 0 M12 V21 0 M21]'
80 Amf2 = [0; 0; 0; 0; 0; 0]
81 Amf3 = [V14 0 M14 V41 0 M41]'
82

83 % Applied structure action vector Aj @ Djs (free joints)


84 Aj = [-(P+V12+V14);-M14;M12];
85

86 % Fixed-end actions at the reactions


87 Arf = [V21;-M21;0; 0;0;0;V41;0; M41];
88

89 % Nodal displacements of the system are


90 Dj = inv(Sjj)*Aj
91

92 % The support reaction are


93 Ar = Srj*Dj + Arf
94

95 % Member forces in the local coordinate are given as


96 Am1 = T1*s1*[Dj(1);Dj(2);Dj(3);0;0;0] + Amf1
97 Am2 = T2*s2*[Dj(1);Dj(2);Dj(3);0;0;0] + Amf2
98 Am3 = T3*s3*[Dj(1);Dj(2);Dj(3);0;0;0] + Amf3
99

100 % END: ........... Example 4.6

Example 4.7 Analyze the space truss shown in Figure 4.19(a) using the DSM. All
members have E = 200 GPa, A = 2500 mm2 , and use a = 1 m, b = 1.5 m, c = 2 m, d
= 1.5 m, H = 1.2 m and P = 100 kN.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 259

FIGURE 4.19 (a) A Four Members Space Truss and (b) Nodes, Members and Global
DOFs.

SOLUTION
Step 1: The members, nodes and global DOFs on the space truss are numbered as
shown in Figure 4.19(b). Only the three displacement components at node 1 are free
joint displacements (D j s), while all others (at the pin supports) are restrained.

The element global DOFs are shown in Table 4.7.

@seismicisolation
@seismicisolation
260 Matrix Structural Analysis and the Finite Element Methods

TABLE 4.7
Global DOFs of the Truss, Connectivity Matrix
Element Node-1 Node-2
1-2 1 2 3 4 5 6
1-3 1 2 3 7 8 9
1-4 1 2 3 10 11 12
1-5 1 2 3 13 14 15

Step 2: Global stiffness matrices of each member are computed by transforming


the local stiffness matrix of each truss member using Equations (4.15) and (4.19),
and they are given as follows. Note that the transformation matrix for a space truss
element could only contain the first and fourth rows, as shown in the following ma-
trix.

cos(θxx̂ ) cos(θyx̂ ) cos(θzx̂ ) 0 0 0


 
 0 0 0 0 0 0 
 
 
 0 0 0 0 0 0 
T =
 

 0
 0 0 cos(θxx̂ ) cos(θ yx̂ ) cos(θ )
zx̂ 

 0 0 0 0 0 0 
 

0 0 0 0 0 0

Member 1-2: From (0, 0, H) m to (−a, −c, 0) m, E = 200 GPa, A = 2500 mm2

1 2 3 4 5 6
30.59 61.19 −36.71 1
36.71 −30.59 −61.19
 
 61.19
 122.38 73.43 −61.19 −122.38 −73.432
 
 36.71 73.43 44.06 −36.71 −73.43 −44.06 3
s1 = 


−30.59 −61.19 −36.71 30.59 61.19 36.71 
 4
−61.19 −122.38 −73.43 61.19 122.38 73.43  5
 

−36.71 −73.43 −44.06 36.71 73.43 44.06 6

Member 1-3: From (0, 0, H)m to (b, −c, 0)m, E = 200 GPa, A = 2500 mm2

@seismicisolation
@seismicisolation
The Direct Stiffness Method 261

1 2 3 7 8 9
52.75 −70.34 −42.20 −52.75 70.34 1
42.20
 
−70.34 93.79 56.27 70.34 −93.79 −56.27 2


 
−42.20 56.27 33.76 42.20 −56.27 −33.763
s2 = 


−52.75 70.34 42.20 52.75 −70.34 −42.20
 7
 70.34 −93.79 −56.27 −70.34 93.79 56.27  8
 

42.20 −56.27 −33.76 −42.20 56.27 33.76 9

Member 1-4: From (0, 0, H)m to (b, d, 0)m, E = 200GPa, A = 2500 mm2

1 2 3 10 11 12
77.71 77.71 −62.17 −77.71 −77.71 62.17 1
 
 77.71
 77.71 −62.17 −77.71 −77.71 62.17  2

 
−62.17 −62.17 49.73 62.17 62.17 −49.733
s3 = 


−77.71 −77.71 62.17 77.71 77.71 −62.17
  10
−77.71 −77.71 62.17 77.71 77.71 −62.17 11
 

62.17 62.17 −49.73 −62.17 −62.17 49.73 12

Member 1-5: From (0, 0, H)m to (−a, d, 0)m, E = 200GPa, A = 2500 mm2

1 2 3 13 14 15
49.23 −73.84 59.07 −49.23 73.84 −59.07 1
 
−73.84 110.76 −88.61 73.84 −110.76 88.61 
 2
 
 59.07 −88.61 70.89 −59.07 88.61 −70.893
s4 = 


−49.23 73.84 −59.07 49.23 −73.84 59.07 
  13
 73.84 −110.76 88.61 −73.84 110.76 −88.61 14
 

−59.07 88.61 −70.89 59.07 −88.61 70.89 15

Given in line #38–100 of the Scilab/Octave code at the end.

Step 3: Selectively adding the element stiffness matrix si into a global structure
stiffness matrix results in the following assembled stiffness matrix S, in kN/m.

@seismicisolation
@seismicisolation
262 Matrix Structural Analysis and the Finite Element Methods


210.29 −5.28 −8.58 −30.59 −61.19 −36.71 −52.75
−5.28 404.64 −21.08 −61.19 −122.38 −73.43 70.34




 −8.58 −21.08 198.44 −36.71 −73.43 −44.06 42.20


 −30.59 −61.19 −36.71 30.59 61.19 36.71 0


 −61.19 −122.38 −73.43 61.19 122.38 73.43 0
−36.71 −73.43 −44.06 36.71 73.43 44.06 0




 −52.75 70.34 42.20 0 0 0 52.75

S=
 70.34 −93.79 −56.27 0 0 0 −70.34 ...
−56.27 −33.76 −42.20

 42.20 0 0 0

−77.71 −77.71 62.17 0 0 0 0




 −77.71 −77.71 62.17 0 0 0 0


 62.17 62.17 −49.73 0 0 0 0
−49.23 73.84 −59.07

 0 0 0 0


 73.84 −110.76 88.61 0 0 0 0
−59.07 88.61 −70.89 0 0 0 0


70.34 42.20 −77.71 −77.71 62.17 −49.23 73.84 −59.07
−93.79 −56.27 −77.71 −77.71 62.17 73.84 −110.76 88.61 


−56.27 −33.76 62.17 62.17 −49.73 −59.07 88.61 −70.89 


0 0 0 0 0 0 0 0 


0 0 0 0 0 0 0 0 

0 0 0 0 0 0 0 0 


−70.34 −42.20 0 0 0 0 0 0 


93.79 56.27 0 0 0 0 0 0 


56.27 33.76 0 0 0 0 0 0 

0 0 77.71 77.71 −62.17 0 0 0 


0 0 77.71 77.71 −62.17 0 0 0 


0 0 −62.17 −62.17 49.73 0 0 0 

−73.84

0 0 0 0 0 49.23 59.07 

0 0 0 0 0 −73.84 110.76 −88.61 

0 0 0 0 0 59.07 −88.61 70.89

@seismicisolation
@seismicisolation
The Direct Stiffness Method 263

Given in line #27–33 and #71 of the Scilab/Octave code at the end.

The partitioned S j j and Sr j become.

210.29 −5.28 −8.58


 

S j j =  −5.28 404.64 −21.08


 

−8.58 −21.08 198.44


 
−30.59 −61.19 −36.71
−61.19 −122.38 −73.43
 
 
−36.71 −73.43 −44.06
 
 
−52.75 70.34 42.20 
 
 
 70.34
 −93.79 −56.27 

 42.20 −56.27 −33.76
 
Sr j = 
−77.71 −77.71

 62.17 
 
−77.71 −77.71 62.17 
 
 
 62.17
 62.17 −49.73 

−49.23 73.84 −59.07
 
 
 73.84 −110.76 88.61 
 
−59.07 88.61 −70.89

Given in line #103–106 of the Scilab/Octave code at the end.


Step 4: The space truss is subjected to the single downward load of −100 kN at
nodes 1. The action vector AJ in the global coordinates is thus given by:
   
0 0
Aj =  0  =  0 
−P −100

Given in line #109 of the Scilab/Octave code at the end.


Step 5: The structure stiffness equation and the partitioned (modified) version are
shown below, while the unknown displacements D j s are determined using Equation
(4.26) as shown below.
−1
−5.28 −8.58
 
  
d1 210.29 0
 d2  =  −5.28 404.64 −21.08 × 0
     

d3 −8.58 −21.08 198.44 −100

@seismicisolation
@seismicisolation
264 Matrix Structural Analysis and the Finite Element Methods

−0.0214
   
d1
⇒  d2  =  −0.0267  mm ANS
   

d3 −0.5076

Given in line #112 of the Scilab/Octave code at the end.

Step 6: The support reaction components at the pin supports are computed using
Equation (4.27).

[Ar ] = [Sr j ] × [D j ]
 
20.93
 
 41.86 
 
 25.11 
 
 
−22.18
 
 
 29.57 
 
 17.74 
 
⇒ Ar = 
−27.82 kN

 
 
−27.82
 
 
 22.26 
 
 29.07 
 
 
−43.61
 
34.89

Given in line #115 of the Scilab/Octave code at the end.

Step 7: Member forces in the local coordinates (axial forces) in kN are deter-
mined using the equation below that is similar to Equation (4.28), in which si is
the global stiffness matrix obtained in Step 2, Dmi are member global displacements
identified from the D j s solved above. The procedure and the results are shown below.

[Âmi ] = [ŝi ] × [Ti ] × [Dmi ]


where:
ŝi is the stiffness matrix in the local coordinate, Ti is the transformation matrix of
the element i; and the displacement components of all the elements are given by:

@seismicisolation
@seismicisolation
The Direct Stiffness Method 265

 
Dj
0
 
Dm1 = Dm2 = Dm3 = Dm4 = 
0

 
0
Therefore, the member forces at both ends of the four members are given in in kN
the following table (all members are under compression as expected).

Member 1 2 3 4
Node-1 53.11 41.00 45.21 62.96
Node-2 −53.11 −41.00 −45.21 −62.96

Given in line #119–122 of the Scilab/Octave code at the end.

The corresponding Scilab code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 // Example 4.7 - Space Truss
2 // Direct Stiffness Method
3

4 // Common units for analysis: Force in kN, Length in mm


5

6 // Given parameters & constants in appropriate units:


7 P = 100; // in kN
8 A = 2500; // Cross-sectional area mm2
9 E = 200; // Modulus of elasticity, kN/mm2
10 Px = 0; Py = 0, Pz = -P;
11

12 // Dimensions in m
13 H = 1.2; a = 1; b = 1.5; c = 2; d = 1.5;
14

15 // Nodal coordinates, in mm
16 coord = [ 0 0 H
17 -a -c 0
18 b -c 0
19 b d 0
20 -a d 0]*1000;
21

22 // Member-node connectivity matrix


23 conn = [1 2; 1 3; 1 4; 1 5];

@seismicisolation
@seismicisolation
266 Matrix Structural Analysis and the Finite Element Methods

24

25 // Function to assemble space truss element stiffness


26 // into the structure stiffness matrix
27 function [S] = assemble(se,idx,S)
28 k1 = 3*idx(1); k2 = 3*idx(2);
29 S(k1-2:k1,k1-2:k1) = S(k1-2:k1,k1-2:k1) + se(1:3,1:3);
30 S(k1-2:k1,k2-2:k2) = S(k1-2:k1,k2-2:k2) + se(1:3,4:6);
31 S(k2-2:k2,k1-2:k1) = S(k2-2:k2,k1-2:k1) + se(4:6,1:3);
32 S(k2-2:k2,k2-2:k2) = S(k2-2:k2,k2-2:k2) + se(4:6,4:6);
33 endfunction
34

35 // Function to compute member length, transformation matrix


36 // and global stiffness matrix of a space truss element
37 // given coordinates of the two nodes, E and A
38 function [L, Tra, s, sg, S] = getTLs(p1, p2, E, A, idx, S)
39 // Length of member
40 dx = p2(1)-p1(1);
41 dy = p2(2)-p1(2);
42 dz = p2(3)-p1(3);
43 L = sqrt(dx^2+dy^2+dz^2);
44

45 // Unit vector along the member


46 vecx = [dx dy dz]/L;
47

48 // An arbitrary point on the y'-z' plane


49 // containing (0,0,H) Ax+By+Cz=d; Dot product
50 // say (1,1,za) where
51 za = -(vecx(1)+vecx(2))/vecx(3) + H;
52

53 // Unit vector along y'


54 vecy = [1 1 za]/(1+1+za^2);
55

56 // Unit vector along z'


57 temp = cross(vecx, vecy);
58 vecz = temp/norm(temp);
59

60 // Direction cosines
61 // dcos = [vecx;0 0 0;0 0 0]
62 dcos = [vecx;vecy;vecz]
63 z = zeros(3,3);
64 Tra = [dcos z;z dcos];
65 eal = E*A/L;
66 s = eal*[1 0 0 -1 0 0;0 0 0 0 0 0; 0 0 0 0 0 0
67 -1 0 0 1 0 0;0 0 0 0 0 0;0 0 0 0 0 0];
68 sg = Tra'*s*Tra;

@seismicisolation
@seismicisolation
The Direct Stiffness Method 267

69

70 // Assemble the global stiffness matrix


71 S = assemble(sg,idx,S);
72 endfunction
73

74 // Global stiffness matrix of the space truss


75 S = zeros(15,15)
76

77 // Element stiffness matrices in global coordinate


78 // Element 1-2
79 p1 = coord(conn(1,1),:);
80 p2 = coord(conn(1,2),:);
81 idx = conn(1,:); // indices for element 1
82 [L1,T1,s1,sg1,S] = getTLs(p1, p2, E, A, idx, S)
83

84 // Element 1-3
85 p1 = coord(conn(2,1),:);
86 p2 = coord(conn(2,2),:);
87 idx = conn(2,:); // indices for element 2
88 [L2,T2,s2,sg2,S] = getTLs(p1, p2, E, A, idx, S)
89

90 // Element 1-4
91 p1 = coord(conn(3,1),:);
92 p2 = coord(conn(3,2),:);
93 idx = conn(3,:); // indices for element 3
94 [L3,T3,s3,sg3,S] = getTLs(p1, p2, E, A, idx, S)
95

96 // Element 4
97 p1 = coord(conn(4,1),:);
98 p2 = coord(conn(4,2),:);
99 idx = conn(4,:); // indices for element 4
100 [L4,T4,s4,sg4,S] = getTLs(p1, p2, E, A, idx, S)
101

102 // Partitioning S; restrained DOFs


103 Sjj = S(1:3,1:3) // Duplicate S into Sjj
104

105 // Gather the Srj matrix from S


106 Srj = S(4:15,1:3)
107

108 // Nodal actions


109 Aj = [Px; Py; Pz]
110

111 // Nodal displacements of the system are


112 Dj = inv(Sjj)*Aj
113

@seismicisolation
@seismicisolation
268 Matrix Structural Analysis and the Finite Element Methods

114 // The support reaction at nodes 2, 3, and 4 are


115 Ar = Srj*Dj
116

117 // Member forces in the local coordinate are given as


118 Ds = [Dj;0;0;0];
119 Am(1,:) = s1*T1*Ds
120 Am(2,:) = s2*T2*Ds
121 Am(3,:) = s3*T3*Ds
122 Am(4,:) = s4*T4*Ds
123

124 // END: ........... Example 4.7

Example 4.8 Analyze the space frame shown in Figure 4.20(a) using the DSM. Use
L = 15 ft, B = 8 ft, H = 12 ft, E = 30,000 ksi, G = 11,500 ksi, w = 3 kips/ft, P1
= 25 kips and P2 = 40 kips. The members have rectangular hollow cross-section
of size 8 × 6 × 3/8′′ for the longer beams, 6 × 6 × 3/16′′ for the shorter beams and
6 × 6 × 3/8′′ for the columns.

SOLUTION
Step 1: The global DOFs, the free joint displacements (DJ s) and the member identi-
fying their orientation is shown in Figure 4.20(b). Cross-sectional properties of the
three sections (long beams, short beams and columns) respectively are obtained as
shown below.

A=[ 0.069010, 0.030273, 0.049371] f t 2


Iz = [ 4.3055e − 03, 1.1850e − 03, 1.8540e − 03] f t 4
Iy = [ 2.7284e − 03, 1.1850e − 03, 1.8540e − 03] f t 4
J = [ 7.0338e − 03, 2.3700e − 03, 3.7080e − 03] f t 4

Given in line #15–28 of the Scilab/Octave code at the end.

Step 2: The 12 × 12 local stiffness matrix for each member is computed accord-
ing to Equation (4.20) using the given values and those cross-sectional properties
obtained above. The element connectivity matrix of the space frame structure is as
given in Table 4.8.

Given in line #34 of the Scilab/Octave code at the end.

The transformation angles for each section are shown in Table 4.9.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 269

FIGURE 4.20 (a) A Single-Storey One-Bay Rectangular Space Frame and (b) Mem-
bers and Global DOFs of the Space Frame.

@seismicisolation
@seismicisolation
270 Matrix Structural Analysis and the Finite Element Methods

Accordingly, the 3 × 3 vector transformation matrices (direction cosines) for the


long beams, short beams and columns are as given below.

0 0 −1
     
1 0 0 0 1 0
λ1 = 0 1 0 ; λ2 = 0 1 0  ; λ3 = 0 0 1
     

0 0 1 1 0 0 1 0 0
And the 12 × 12 transformation matrices Ti for each element is composed by
repeating the λi four times along the diagonal, with all the other elements of Ti
equal zero. And the global stiffness matrix of each frame element is obtained by the
equation si = TiT × ŝi × Ti . Thus, the global stiffness matrix for the columns is S1 , for
the long beams S2 and for the short beams S3 are given below.

TABLE 4.8
Global DOFs of the Space Frame, Connectivity Matrix
Element Node-1 Node-2
1 (5-1) 25 26 27 28 29 30 1 2 3 4 5 6
2 (6-2) 31 32 33 34 35 36 7 8 9 10 11 12
3 (7-3) 37 38 39 40 41 42 13 14 15 16 17 18
4 (8-4) 43 44 45 46 47 48 19 20 21 22 23 24
5 (1-2) 1 2 3 4 5 6 7 8 9 10 11 12
6 (4-3) 19 20 21 22 23 24 13 14 15 16 17 18
7 (2-3) 7 8 9 10 11 12 13 14 15 16 17 18
8 (1-4) 1 2 3 4 5 6 19 20 21 22 23 24

@seismicisolation
@seismicisolation
The Direct Stiffness Method 271

TABLE 4.9
Transformation Angles (in Degrees) of the Space Frame
Elements θX x̂ θY x̂ θZ x̂ θX ŷ θY ŷ θZ ŷ θX ẑ θY ẑ θZ ẑ
Long beams 0 90 90 90 0 90 90 90 0
Short beams 90 90 180 90 0 90 0 90 0
Columns 90 0 90 90 90 0 0 90 90


17773 0 0 0 0 0 −17773

 0 55.62 0 0 333.72 0 0
0 −333.72

 0 0 55.62 0 0


 0 0 0 511.7 0 0 0
0 333.72 0 0 2669.7 0 0



 0 0 −333.72 0 0 2669.7 0
S1 = 
 −17773
 0 0 0 0 0 17773 ...
0 −55.62 0 0 −333.72 0 0




 0 0 −55.62 0 0 333.72 0

 0 0 0 −511.7 0 0 0
0 333.72 0 0 1334.9 0 0


0 0 −333.72 0 0 1334.9 0


0 0 0 0 0
−55.62 0 0 333.72 0 

0 −55.62 0 −333.72 

0

0 0 −511.7 0 0 

−333.72 0 0 1334.9 0 


0 333.72 0 0 1334.9 

0 0 0 0 0 

55.62 0 0 −333.72 0 


0 55.62 0 0 333.72 

0 0 511.7 0 0 

−333.72 0 0 2669.7 0 

0 333.72 0 0 2669.7

@seismicisolation
@seismicisolation
272 Matrix Structural Analysis and the Finite Element Methods


41.91 0 0 −314.31 0 0 −41.91

 0 66.13 0 0 495.99 0 0


 0 0 19875 0 0 0 0

 −314.31 0 0 3143.1 0 0 314.31



 0 495.99 0 0 4959.9 0 0
0 0 0 0 0 776.53 0 ...


S2 = 
 −41.91
 0 0 314.31 0 0 41.91


 0 −66.13 0 0 −495.99 0 0


 0 0 −19875 0 0 0 0
 −314.31 0 0 1571.5 0 0 314.31



 0 495.99 0 0 2480 0 0
0 0 0 0 0 −776.53 0


0 0 −314.31 0 0
−66.132

0 0 495.99 0 

0 −19875 0 0 0 


0 0 1571.5 0 0 


−495.99 0 0 2480 0 

0 0 0 0 −776.53 


0 0 314.31 0 0 


66.132 0 0 −495.99 0 


0 19875 0 0 0 

0 0 3143.1 0 0 


−495.99 0 0 4959.9 0 

0 0 0 0 776.53

@seismicisolation
@seismicisolation
The Direct Stiffness Method 273


119.98 0 0 −479.93 0 0 −119.98

 0 16348 0 0 0 0 0

 0 0 119.98 0 0 479.93 0

 −479.93 0 0 2559.6 0 0 479.93

0 0 0 0 490.6 0 0



 0 0 479.93 0 0 2559.6 0 ...
S3 = 
 −119.98
 0 0 479.93 0 0 119.98
0 −16348 0 0 0 0 0




 0 0 −119.98 0 0 −479.93 0
 −479.93 0 0 1279.8 0 0 479.93

0 0 0 0 −490.6 0 0


0 0 479.93 0 0 1279.8 0


0 0 −479.93 0 0
−16348 0 0 0 0 

0 −119.98

0 0 479.93 

0 0 1279.8 0 0 

0 0 0 −490.6 0



0 −479.93 0 0 1279.8 

0 0 479.93 0 0 

16348 0 0 0 0



0 119.98 0 0 −479.93 

0 0 2559.6 0 0 

0 0 0 490.6 0


0 −479.93 0 0 2559.6

Given in line #40–81 of the Scilab/Octave code at the end.

Step 3: Assemble the element stiffness matrices si into the structure stiffness ma-
trix S, i.e., selectively adding coefficients of all the nm element stiffness based on the
DOFs established in step 1 and connectivity matrix. The structure stiffness matrix
has a size of 48 × 48; it is computed in the complete Octave code at the end of this
example and it will not be shown here in the text.

Given in line #84–172 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
274 Matrix Structural Analysis and the Finite Element Methods

Step 4: The action vector AJ on the structure is assembled from the fixed-end
actions and the given nodal loads. For the uniformly distributed load of the long
beams, the fixed-end actions ÂFm in the local coordinate are given as follows.

VLF = VRF = 0.5w · L1 = 22.5 kips

w · L12
MLF = −MRF = = 56.25 kips f t
12
Combining these equivalent nodal loads to the given nodal actions, the action
vector AJ is given by:
 
0

−22.5 k

 
 −25 k 
 
 
 0 
 
 
 0 
 
 −56.25 
 
 
 0 
 
 
 −22.5 
 
 
 0 
 

 0 

 
 0 
 
 
 56.25 
AJ = 
 

 −40 
 
 −22.5 
 
 
 0 
 
 
 0 
 
 
 0 
 
 56.25 
 
 
 0 
 
 
 −22.5 
 
 
 0 
 
 0 
 
 
 0 
 
−56.25

@seismicisolation
@seismicisolation
The Direct Stiffness Method 275

Given in line #175–182 of the Scilab/Octave code at the end.

Step 5: The structure stiffness equation is partitioned into D j s and Ar s to restrain


the supports and solve for the unknown displacements D j s by using Equation (4.25).
Accordingly, DOFs 1–24 are free while 25–48 are restrained.

SJJ = S(1 : 24, 1 : 24)


−1
DJ = SJJ × AJ
The free joint displacements are thus obtained to be as follows.

 
2.34E − 05 in

−4.88E + 00 in 


 
−8.13E + 00 in 
 

 

 −4.63E − 05 rad 

 

 −3.78E − 02 rad 

6.86E − 02 rad 
 

 
−7.75E − 05 in 
 

 

 −1.37E + 01 in 
 

 −8.13E + 00 in 
1.35E − 04 rad 
 

 

 −8.55E − 02 rad 

 
 8.26E − 02 rad 
⇒ DJ =   ANS
 

 −2.69E − 02 in 
−1.37E + 01 in 
 

 

 −2.70E + 00 in 
 

 2.43E − 04 rad 

 

 −8.55E − 02 rad 

4.43E − 02 rad 
 

 

 −3.69E − 06 in 
 

 −4.88E + 00 in 
−2.70E + 00 in 
 

 
6.18E − 05 rad 
 

 

 −3.78E − 02 rad 

3.04E − 02 rad

@seismicisolation
@seismicisolation
276 Matrix Structural Analysis and the Finite Element Methods

Given in line #184–188 of the Scilab/Octave code at the end.

Step 6: The support reactions are computed using Equation (4.27). If any sup-
ported member is subjected to a fixed-end actions AFr , this shall also be added to the
reaction from nodal displacements.

Given in line #191–195 of the Scilab/Octave code at the end.

Step 7: Member end action in the local coordinates can be determined using
Equation (4.28), by adding the member fixed-end actions computed in Step 4 in the
local coordinates.
Given in line #198–204 of the Scilab/Octave code at the end.

The corresponding Octave code showing the complete solution steps is given in
the listing below.
Scilab/Octave Code
1 % Example 4.8 - Single Storey, One Bay Space Frame
2 % Direct Stiffness Method
3

4 % Common units for analysis: forces in kips, length in ft


5 clear;
6 % Given parameters constants:
7 E = 30000; G = 11500; % in ksi
8 w = 0.25; P1 = 25; P2 = 40; % in k/in, k
9

10 % Lengths in " (columns, long beams, short beams)


11 Len = [12*12, 15*12, 8*12];
12 % Sections dimensions (h, b, t) of elements type in "
13 Sec = [6 6 5/16; 8 6 3/8; 6 6 3/16];
14

15 function [A, Iz, Iy, J] = secProp(s)


16 h = s(1); b = s(2); t = s(3);
17 A = b*h - (b-2*t)*(h-2*t);
18 Iz = b*h^3/12 - (b-2*t)*(h-2*t)^3/12;
19 Iy = h*b^3/12 - (h-2*t)*(b-2*t)^3/12;
20 J = Iz + Iy;
21 endfunction
22

23 % Compute section properties for all sections


24 IJ = [];
25 for i = 1 : length(Sec)
26 s = Sec(i,:)
27 [A(i), Iz(i), Iy(i), J(i)] = secProp(s)
28 endfor

@seismicisolation
@seismicisolation
The Direct Stiffness Method 277

29

30 % Member connectivity matrix


31 % Elements 1-4 are the four columns
32 % Elements 5 & 6 are the long beams
33 % Elements 7 & 8 are the short beams
34 conn = [5 1; 6 2; 7 3; 8 4; 1 2; 4 3; 2 3; 1 4]
35

36 % Function to compute ELEMENT local stiffness matrix (s)


37 % parameters: (L, A, E, G, Iy, Iz, J )==> length , area,
38 % elastic modulus, shear modulus, moments-of-inertia,
39 % and polar moment-of-inertia, respectively
40 function [s] = stiffSpaceFrame(L, A, E, G, Iz, Iy, J)
41 EIy = E*Iy; EIz = E*Iz; GJl = G*J/L; AEl = A*E/L;
42 ddz = 12*EIz/L^3; ddy = 12*EIy/L^3;
43 rrz = 4*EIz/L; rry = 4*EIy/L;
44 drz = 6*EIz/L^2; dry = 6*EIy/L^2;
45

46 s =[AEl, 0, 0, 0, 0, 0, -AEl, 0, 0, 0, 0, 0
47 0, ddz, 0, 0, drz, 0, 0, -ddz, 0, 0, drz, 0
48 0, 0, ddy, 0, 0, -dry, 0, 0, -ddy, 0, 0, -dry
49 0, 0, 0, GJl, 0, 0, 0, 0, 0, -GJl, 0, 0
50 0, drz, 0, 0, rrz, 0, 0, -drz, 0, 0, rrz/2, 0
51 0, 0, -dry, 0, 0, rry, 0, 0, dry, 0, 0, rry/2
52 -AEl, 0, 0, 0, 0, 0, AEl, 0, 0, 0, 0, 0
53 0, -ddz, 0, 0, -drz, 0, 0, ddz, 0, 0, -drz, 0
54 0, 0, -ddy, 0, 0, dry, 0, 0, ddy, 0, 0, dry
55 0, 0, 0, -GJl, 0, 0, 0, 0, 0, GJl, 0, 0
56 0, drz, 0, 0, rrz/2, 0, 0, -drz, 0, 0, rrz, 0
57 0, 0, -dry, 0, 0, rry/2, 0, 0, dry, 0, 0, rry]
58 endfunction
59

60 % Element global stiffness matrices


61 % Members 1,2,3,4: columns
62 s1 = stiffSpaceFrame(Len(1),A(1),E,G,Iz(1),Iy(1),J(1))
63 temp = cosd([0 90 90; 90 0 90; 90 90 0]);
64 T1 = zeros(12,12);
65 T1(1:3,1:3) = T1(4:6,4:6) = T1(7:9,7:9) = ...
66 T1(10:12,10:12) = temp;
67 sg1 = T1'*s1*T1;
68

69 % Members 5,6: long beams


70 s2 = stiffSpaceFrame(Len(2),A(2),E,G,Iz(2),Iy(2),J(2))
71 temp = cosd([90 90 180; 90 0 90; 0 90 90]);
72 T2(1:3,1:3) = T2(4:6,4:6) = T2(7:9,7:9) = ...
73 T2(10:12,10:12) = temp;

@seismicisolation
@seismicisolation
278 Matrix Structural Analysis and the Finite Element Methods

74 sg2 = T2'*s2*T2;
75

76 % Members 7,8: short beams


77 s3 = stiffSpaceFrame(Len(3),A(3),E,G,Iz(3),Iy(3),J(3))
78 temp = cosd([90 0 90; 90 90 0; 0 90 90 ]);
79 T3(1:3,1:3) = T3(4:6,4:6) = T3(7:9,7:9) = ...
80 T3(10:12,10:12) = temp;
81 sg3 = T3'*s3*T3;
82

83 % Assembling global stiffness matrix of the grid structure


84 S = zeros(48,48);
85

86 % Element %1 - column
87 idx = conn(1,:); i = idx(1); k = idx(2);
88 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) = ...
89 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) + sg1(1:6,1:6);
90 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) = ...
91 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) + sg1(1:6,7:12);
92 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) = ...
93 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) + sg1(7:12,1:6);
94 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) = ...
95 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) + sg1(7:12,7:12);
96

97 % Element %2 - column
98 idx = conn(2,:); i = idx(1); k = idx(2);
99 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) = ...
100 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) + sg1(1:6,1:6);
101 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) = ...
102 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) + sg1(1:6,7:12);
103 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) = ...
104 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) + sg1(7:12,1:6);
105 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) = ...
106 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) + sg1(7:12,7:12);
107

108 % Element %3 - column


109 idx = conn(3,:); i = idx(1); k = idx(2);
110 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) = ...
111 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) + sg1(1:6,1:6);
112 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) = ...
113 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) + sg1(1:6,7:12);
114 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) = ...
115 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) + sg1(7:12,1:6);
116 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) = ...
117 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) + sg1(7:12,7:12);
118

@seismicisolation
@seismicisolation
The Direct Stiffness Method 279

119 % Element %4 - column


120 idx = conn(4,:); i = idx(1); k = idx(2);
121 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) = ...
122 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) + sg1(1:6,1:6);
123 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) = ...
124 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) + sg1(1:6,7:12);
125 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) = ...
126 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) + sg1(7:12,1:6);
127 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) = ...
128 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) + sg1(7:12,7:12);
129

130 % Element %5 - long beam


131 idx = conn(5,:); i = idx(1); k = idx(2);
132 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) = ...
133 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) + sg1(1:6,1:6);
134 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) = ...
135 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) + sg1(1:6,7:12);
136 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) = ...
137 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) + sg1(7:12,1:6);
138 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) = ...
139 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) + sg1(7:12,7:12);
140

141 % Element %6 - long beam


142 idx = conn(6,:); i = idx(1); k = idx(2);
143 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) = ...
144 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) + sg1(1:6,1:6);
145 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) = ...
146 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) + sg1(1:6,7:12);
147 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) = ...
148 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) + sg1(7:12,1:6);
149 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) = ...
150 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) + sg1(7:12,7:12);
151

152 % Element %7 - short beam


153 idx = conn(7,:); i = idx(1); k = idx(2);
154 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) = ...
155 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) + sg1(1:6,1:6);
156 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) = ...
157 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) + sg1(1:6,7:12);
158 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) = ...
159 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) + sg1(7:12,1:6);
160 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) = ...
161 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) + sg1(7:12,7:12);
162

163

@seismicisolation
@seismicisolation
280 Matrix Structural Analysis and the Finite Element Methods

164 % Element %8 - short beam


165 idx = conn(8,:); i = idx(1); k = idx(2);
166 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) = ...
167 S(6*(i-1)+1:6*i,6*(i-1)+1:6*i) + sg1(1:6,1:6);
168 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) = ...
169 S(6*(i-1)+1:6*i,6*(k-1)+1:6*k) + sg1(1:6,7:12);
170 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) = ...
171 S(6*(k-1)+1:6*k,6*(i-1)+1:6*i) + sg1(7:12,1:6);
172 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) = ...
173 S(6*(k-1)+1:6*k,6*(k-1)+1:6*k) + sg1(7:12,7:12);
174

175 % Fixed-end actions for Nodal actions vector, Aj


176 V = w*Len(2)/2; M = w*Len(2)^2/12;
177

178 % Fixed-end actions on members 5 and 6 (local coordinate)


179 Amf = [0 V 0 0 0 M 0 V 0 0 0 -M]';
180

181 Aj = zeros(24,1);
182 Aj(2)=-V; Aj(3)=-P1; Aj(6)=-M; Aj(8)=-V; Aj(12)=M;
183 Aj(13)=-P2; Aj(14)=-V; Aj(18)=M; Aj(20)=-V; Aj(24)=-M;
184

185 Sjj = S(1:24,1:24);


186 csvwrite("stiffOct.csv",Sjj)
187

188 % Nodal displacements of the system are


189 Dj = inv(Sjj)*Aj
190

191 % The support reaction are


192 As = S*[Dj;zeros(24,1)]
193

194 Ar = As(25:48)
195

196 AR = reshape(Ar,6,4)
197

198 %%% Member forces in the local coordinate are given as


199 z = zeros(6,1);
200 Am1 = reshape(sg1*[z;Dj(1:6)],6,2);
201 Am2 = reshape(sg1*[z;Dj(7:12)],6,2);
202 Am3 = reshape(sg1*[z;Dj(13:18)],6,2);
203 Am4 = reshape(sg1*[z;Dj(19:24)],6,2);
204

205 [Am1 Am2 Am3 Am4]'


206 % END: ........... Example 4.8

@seismicisolation
@seismicisolation
The Direct Stiffness Method 281

4.5 PROBLEMS
4.1 What are the differences between the DSM and the Formalized Stiffness Method?
4.2 What are the differences between the transformation matrix used in the Formal-
ized Stiffness Method vs the DSM?
4.3 List down the steps used to analyze a plane frame using the DSM.
4.4 Can the matrix given below represent the stiffness matrix of a real elastic struc-
ture (Yes/No)? If No, why?
12 3 3 12 3 10
 
 3 0 4 9 0 5 
 
 
 3 4 22 5 0 3 
 
 
−12 9 5 −32 5 13 
 
 3 0 0 5 2 −10 
 

10 5 3 3 −10 1000
4.5 A given structure, having five possible degrees of freedom (d1 , d2 , d3 , d4 , and
d5 ) is found to have the following assembled master stiffness matrix (in force/length
units). DOFs 2 and 4 are the only unrestrained DOFs. Determine the free joint dis-
placements and the support reactions if a single force of 100 units is applied on the
structure along DOF 2.
1 2 3 4 5
20 35 −6 7 −2 1
 
 35 40 5 11 1 
 2
S = −6 5 15.5 8 −20 3
 
 
 7 11 8 30 5 4
−2 1 −20 5 10 5
4.6 A linear spring element with stiffness k equals 20 N/mm is subjected to the nodal
displacements shown below. Determine the force in the member for each of the cases.

Case Node-1 Node-2


1 0.5 2
2 0 −6
3 −3 0
4 −2 2
5 0 6
4.7 Analyze the spring system given in Problem 2.1 using the DSM.

4.8 Analyze the spring system given in Problem 2.11 using the DSM.

@seismicisolation
@seismicisolation
282 Matrix Structural Analysis and the Finite Element Methods

4.9 Analyze the two-bar structure given in Problem 2.3 using the DSM.

4.10 A plane truss element having an axial stiffness (AE) equals 1600 force units
has its nodal location and partial information (about the nodal displacements and
actions) is given in the table below. Determine the unknown parameters of the ele-
ment (indicated by the ? sign) in each of the cases. Also compute the axial force in
the element. Note that (x, y) are nodal locations in length units, (dx , dy ) are nodal
displacements in ×10−3 length units and ( fx , fy ) are nodal forces, all in a global
coordinate system x-y.
Node-1 Node-2
Case
x y dx dy fx fy x y dx dy fx fy
1 2 1.2 0.75 2 ? ? 5 5.2 −3 4.8 ? ?
2 5 0 0 0 ? 100 1 4 ? ? ? ?
3 −2 5 −0.5 −1 ? ? 1 1 3 −4 ? ?
4 6 8 2 0 ? ? 2 4 ? ? 75 ?
5 2 −1.2 ? ? −50 ? 5 −5.2 5 3 ? ?
6 0 8 1 −5 ? ? 0 4 4 1 ? ?

4.11 A plane frame element has an axial stiffness (AE) of 1600 force units and flex-
ural rigidity (EI) of 200e3 in units of force times length squared. The element has
its nodal locations and incomplete information about the nodal displacements and
actions as given in the table below. Determine the unknown parameters of the el-
ement (indicated by the ? sign) in each of the cases. Also compute the axial force,
shear force and bending moment in the element. Note that (x, y) are nodal loca-
tions in length units, (dx , dy ) are nodal displacements in ×10−3 length units, ( fx , fy )
are nodal forces, all in a global coordinate system x–y and (θ1 , θ2 ) are rotations in
×10−3 radians at nodes 1 and 2, respectively. Note that counterclockwise rotations
are positive.

@seismicisolation
@seismicisolation
The Direct Stiffness Method 283

Node-1
Case
(x, y) dx dy θ1 fx fy m1
1 2, 1.2 1 −2 0.1 ? ? ?
2 5, 0 0 0 0 ? ? ?
3 2, 5 −0.5 −1 −0.2 ? ? ?
4 6, 8 ? ? ? −75 −100 150
5 2, −1.2 ? ? ? 50 ? 25
6 0, 8 1 −5 ? ? ? 0
Node-2
(x, y) dx dy θ2 fx fy m2
1 5, 5.2 1 −2 −0.014 ? ? ?
2 1, 4 ? ? ? 20 −50 20
3 1, 1 1 3 −0.4 ? ? ?
4 2, 4 −1 2.5 −0.5 ? ? ?
5 5, −5.2 −2.5 5 0.3 ? 20 25
6 0, 4 4 4 0.1 ? ? ?

4.12 Analyze the plane truss given in Problem 3.16 using the DSM.

4.13 Analyze the plane truss given in Problem 3.17 using the DSM.
4.14 Analyze the two span beam in Problem 2.6 using the DSM.
4.15 Analyze the beam given in Problem 3.18 using the formalized stiffness method.
4.16 Analyze the grid structure given in Problem 3.20 using the DSM. Members 2–3
and 4–5 are subjected to a uniformly distributed load of 12.5 kN/m (FPS: 1 kip/ft) in
addition to the given loading.
4.17 Analyze the space truss given in Problem 3.21 using the DSM.
4.18 Analyze the space frame given in Problem 3.22 using the DSM.

@seismicisolation
@seismicisolation
5 Special Cases in the Direct
Stiffness Method
5.1 INTRODUCTION
The direct stiffness method (DSM) treated in previous chapter considered only reg-
ular cases with prismatic members supported along the global coordinate direction.
Some special cases and how they could be treated in the DSM are presented here,
like mixed elements in a structure, inclined roller support, using symmetry to ease
the computation, curved or stepped members in a structure.
After studying this chapter, the reader will be able to model and analyze struc-
tures that require special treatment in the DSM. Specifically he/she will be able to:
• Assemble the stiffness matrix of different types of elements within a given
structure
• Analyze a beam supported on soil medium by replacing the supporting soil
with equivalent Winkler’s springs, or use a two parameters-model to con-
sider the shear effect of the soil medium on the beam
• Determine the stiffness matrix of a non-prismatic element using the flexi-
bility approach
• Use different techniques to analyze a structure supported on inclined roller
support(s)
• Modify the stiffness matrix of elements containing some form of disconti-
nuity or release
• Reduce the problem size in the case of symmetric or anti-symmetric struc-
tures

5.2 DIFFERENT ELEMENT TYPES IN A STRUCTURE


It is normal to have mixed elements in a given structure like a beam supported by
springs or a frame structure braced by cable ties or truss elements etc. Due to the
difference in the number of degrees of freedom for each member, some members do
not have stiffness against specified DOFs. Consider the plane frame in Figure 5.1
shown below. Members 1–4 and 2–5 are truss (bar) members with two DOFs at each
node; while the rest are plane frame elements and have three DOFs at both ends. A
frame element has a 6 × 6 stiffness matrix, while a truss member on the other hand
has a 4 × 4 stiffness matrix.
The plane frame given in Figure 5.1 has 19 possible degrees of freedoms. Anal-
ysis procedure of such a structure in the DSM requires no additional step, except
noting that some members do not have contributions to specific DOFs at a node even
if such members are connected to that node. The stiffness of the truss members are
added to DOFs 1, 2, 8, 9, 3, 4, 11 and 12; they have no contribution to the rotational

DOI:10.1201/9781003329350-6@seismicisolation
@seismicisolation 284
Special Cases in the Direct Stiffness Method 285

FIGURE 5.1 A Plane Frame Structure with Mixed Element Types.

TABLE 5.1
Global DOFs of the Frame, Connectivity Matrix
Element DOFs @ Node-1 DOFs @ Node-2
1-4 1 2 8 9
2-5 3 4 11 12
3-4 5 6 7 8 9 10
4-5 8 9 10 11 12 13
5-6 11 12 13 14 15 16
6-7 14 15 16 17 18 19

DOFs at nodes 4 and 5. The connectivity matrix of the elements of the frame in
Figure 5.1 is provided in Table 5.1.

5.3 BEAM ON ELASTIC FOUNDATION


If a beam is supported by an elastic foundation or soil, the later exerts on the beam
a distributed reaction. It is a common practice to substitute this reaction with elastic
springs as shown in Figure 5.2 . The value of ks depends on the compressing strength
of the elastic foundation and has units of force per unit area.
To analyze such a structure, the beam is divided into a number of segments and
the effect of the foundation is then applied as a supporting spring at the ends of
each segment. The stiffness of the spring is obtained by multiplying the foundation
stiffness ks by the tributary area of the segment. These spring stiffness are added to
the vertical DOF of the beams only.
@seismicisolation
@seismicisolation
286 Matrix Structural Analysis and the Finite Element Methods

FIGURE 5.2 (a) Beam on Elastic Foundation and (b) Spring on a Beam Segment.

5.3.1 TWO-PARAMETERS MECHANICAL MODEL


The substitution of the soil by vertical springs is known as single parameter (Win-
kler’s) mechanical model. According to this method, the soil property is highly sim-
plified and it is assumed to have only normal stress resistance, the shear capacity is
neglected. As a consequence, each vertical soil block acts separately with no inter-
action among neighboring blocks. This is actually flawed and a realistic approach
would be to consider a multi-parameters mechanical model for the soil. Worku and
Habte (2020) [53] proposed a model that uses tensile forces T at the two ends of the
beam in order to incorporate the shear stress effect of the soil to the supported beam;
see Figure 5.3.
In this case, the stiffness matrix of each beam element (i) is determined by com-
bining the elastic and geometric stiffness matrices as shown Equation (5.1).

FIGURE 5.3 Beam on Elastic Foundation with Tension Force at Ends.

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 287

Si = se + sg

12 6L −12 6L 36 3L −36 3L
   
   
 6L
EI  4L2 −6L 2L2 
 T 
 3L 4L2 −3L −L2 

=   +  
L3 
−12 −6L 12 −6L
 30L 
−36 −3L 36 −3L

   
6L 2L2 −6L 4L2 3L −L2 −3L 4L2
(5.1)

Apart from the determination of the element stiffness matrix, the analysis of
beams on elastic foundation using the suggested two parameter model is identical to
the Winkler’s single parameter model. The background information for this model,
the determination of the tensile force, – the subgrade modulus, ks, and model cal-
ibration factors with worked example are discussed in detail in Worku and Habte
(2020) [53]. The model derivation based on continuum idealization of the soil under
the beam is given in detail by Worku (2014) [52].

5.4 NON-PRISMATIC MEMBERS


Structural members are said to be prismatic members if they are straight and have
uniform material (E, G, ν) and cross-sectional properties (A, I, J). The structures and
solutions treated in the previous chapters were all applicable to prismatic members.
If a member is curved or if there’s any change in the material or cross-sectional
property of the member, it becomes non-prismatic. Figure 5.4 shows some of the
common non-prismatic elements that a structure can have.
In order to use the DSM for a structure containing such member(s), it is essential
to determine the stiffness matrix of all the elements in the global coordinate system.

FIGURE 5.4 Non-Prismatic Elements: (a) Stepped Element, (b) Tapered Element
and (c) Curved Element.

@seismicisolation
@seismicisolation
288 Matrix Structural Analysis and the Finite Element Methods

One of the best solutions to tackle this kind of situation is to determine the flex-
ibility matrix of the element and invert it to obtain the element stiffness as outlined
in the following steps:
1. Take out the non-prismatic element and fix one end as a cantilever
2. Apply unit action(s) along the required DOFs (axial force, shear force, bending
moment, torsion; one at a time)

3. Determine the corresponding flexibility coefficients and establish the flexibil-


ity matrix (see Sections 2.2 and 3.1)
4. Invert the flexibility matrix to get the corresponding stiffness matrix
5. Determine the element stiffness matrix at both ends by repeating the above
steps for the other end and also using equilibrium conditions (see Section 4.2)
Another common method is to subdivide such a non-prismatic element into sev-
eral elements, that become or could be assumed prismatic with some simplification.
A stepped member can be divided into separate elements at the intersection of the
different properties. Dividing a tapered element into a number of smaller segments
and assuming each one to have a uniform cross-sectional/material property gives an
approximation of its behavior. Similarly, a curved member could be divided into a
number of smaller and straight segments to obtain an approximate result of its be-
havior.

5.5 INCLINED ROLLER SUPPORT


If a roller support is inclined at some angle from the global coordinate, the boundary
condition can’t be applied easily. Figure 5.5 shows a plane frame supported on an
inclined roller. This support restrains neither the movement along DOF 10 nor along
DOF 12, causing a difficulty in providing the support condition to solve the matrix
stiffness equation of the structure.
One possible solution is to use a global coordinate system that is parallel or per-
pendicular to the rolling surface, as shown in Figure 5.6. In this case, the roller sup-
port restrains the movement along the new DOF-11. This technique is applicable
only if there’s a single roller or the rollers within the structure are either parallel or
orthogonal to each other.
A second method to incorporate inclined rollers in the DSM is to substitute the
roller by an additional member as shown in Figure 5.7. This element shall be selected
to have a relatively large axial rigidity (AE ≈ ∞), very small flexural rigidity (EI ≈ 0),
and relatively smaller length perpendicular to the rolling surface. The global DOFs
10–12 are all free and it is fully restrained at the other end. Such a computation is
supposed to result inq a zero displacement perpendicular to the rolling surface and a
displacement of d = 2 + d 2 along the roller surface (see Solution A: of Example
d10 11
5.3).

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 289

FIGURE 5.5 A Plane Frame with Inclined Roller Support.

FIGURE 5.6 Inclined Roller Support with Rotated Global Coordinate System.

The third and elegant approach would be to use a vector transformation matrix to
modify some of the coefficients of the structure stiffness matrix that correspond to the
roller. Figure 5.8 shows the relation between the global and local (roller) coordinates
for vectors transformation. Assume Si is the part of the structure stiffness matrix S
that corresponds to the inclined roller in the global coordinate system. The following
set of relationships hold:

@seismicisolation
@seismicisolation
290 Matrix Structural Analysis and the Finite Element Methods

FIGURE 5.7 Inclined Roller Support Substituted by an Axially Rigid Member.

FIGURE 5.8 Inclined Roller Support with Local and Global Coordinates.

   
fx dx
= Si × (5.2)
fy i
dy i
Recall the discussions and derivations in Section 4.3 that the local and global vec-
tors are related by the a transformation (rotation) matrix Ri as shown in the following
relationship.

fˆx dˆx
       
fx dx
= Ri × and = Ri ×
fˆy i fy i dˆy i dy i

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 291

where
 
cos θ sin θ
Ri =
− sin θ cos θ
Using the above relationships and noting that RTi = R−1 i , Equation (5.2) can be
used to modify Si , a portion of the global structure stiffness matrix S corresponding
to the roller at i as follows.

fˆx dˆx
   
Ri T = Si × Ri
T
×
fˆy i dˆy i

multiplying both sides of the equation by Ri , we get:

fˆx dˆx
   
T
= Ri × Si × Ri × (5.3)
fˆy i
dˆy i

Si∗ = Ri × Si × Ri T (5.4)

At this stage, it is possible to apply the restrained DOF at the roller dˆy = 0 as
usual. It is helpful to follow the underlying steps to use this method. Also see Solu-
tion B of Example 5.3.

1. Prepare the global structure stiffness matrix S normally


2. Identify the part of S that belongs to the inclined roller, say Si
3. For the inclined roller support, compute the transformation matrix Ri
4. Modify Si into Si∗ using Equation (5.4)
5. Replace Si in S with Si∗ , so that the boundary condition for the inclined roller
can be applied in the local coordinate
6. Solve the matrix equation normally, displacement on the rolling surface and
rotation, if any, are obtained together with all other displacements on the struc-
ture

5.6 MEMBER DISCONTINUITIES (HINGE/ROLLER)


If a structural member has some form of discontinuity (release), the element stiffness
matrix need to be derived anew. Consider the beam element in Figure 5.9. The corre-
sponding stiffness matrix of this beam is dependent on the location of the hinge, and
it can be derived by computing the actions required for each unit displacement d1 to
d4 , as given in Equation (5.5).

@seismicisolation
@seismicisolation
292 Matrix Structural Analysis and the Finite Element Methods

FIGURE 5.9 Beam Having a Moment Discontinuity at Distance a from Node-1.

−1 L−a
 
1 a
a a2 −a
a(L − a) 
 
3EI 
s= 3
  (5.5)
L  −1
 −a 1 −(L − a)
(L − a) a(L − a) −(L − a) (L − a)2
For a specific case where the hinge is at the left support (a = 0), the corresponding
element stiffness matrix becomes as shown in Equation (5.6).
 
1 0 −1 L
3EI  0 0 0 0 
 
s= 3   (5.6)
L  −1 0 1 −L

L 0 −L L2

5.7 SYMMETRIC AND ANTI-SYMMETRIC STRUCTURES


If a given structure is symmetric/anti-symmetric1 about a given axis, it is sufficient
to analyze half of the structure with proper boundary condition along the axis of
symmetry. The symmetric frame show in Figure 5.10-A(a) can be reduced to half of
the frame shown in Figure 5.10-A(b).
The anti-symmetric frame show in Figure 5.10-B(a) can be reduced to half of the
frame shown in Figure 5.10-B(b), while the other half is subjected to the negative of
the loading −P resulting in displacements (rotations) equal but opposite in sign with
the first half.
1 If a symmetric structure is loaded by equal and opposite loading about the axis of symmetry, it is

termed an anti-symmetric structure.

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 293

FIGURE 5.10 Half of a Symmetric/Anti-Symmetric Frame Considered for Analysis.

5.8 EXAMPLES
Example 5.1 The cantilever and the simply supported beans shown in Figure 5.11
are connected by a bar element 2-4. Analyze the structure using the direct stiffness
method. Use E = 120 GPa, A = 12,000 mm2 , I = 500e6 mm4 for the cantilever beam;
E = 70 GPa, A = 13,000 mm2 for the truss member; E = 120 GPa, A = 20,000 mm2 ,
I = 1200e6 mm4 for the simply supported beam and let w = 24 kN/m.

SOLUTION
Step 1: All the nodes of the given structure have three possible DOFs. The only
special case is to note that the truss member 2–4 doesn’t have a contribution to the
rotational DOFs at the two nodes.
Step 2: The member connectivity matrix for the frame showing the global DOFs is
provided in the following table.

FIGURE 5.11 A Structure with Different Element Types.

@seismicisolation
@seismicisolation
294 Matrix Structural Analysis and the Finite Element Methods

Element Type DOFs @ Node-1 DOFs @ Node-2


1-2 Frame 1 2 3 4 5 6
2-4 Truss 4 5 − 10 11 −
3-4 Frame 7 8 9 10 11 12
4-5 Frame 10 11 12 13 14 15

The element stiffness matrix of each plane frame member is computed from Equa-
tion (4.11). For the truss element, the stiffness matrix in the global coordinate system
is calculated from 4.5 transforming it using Equation (4.7), and they are given as
follows.

Member 1: frame L = 5 m, E = 30e6 kN/m2 , A = 12,000 mm2 , I = 500e6 mm4


1 2 3 4 5 6
72 0 0 −72 0 0 1
 
 0
 1.44 3.6 0 −1.44 3.6
2
 
3
 0 3.6 12 0 −3.6 6
3
s1 = 10 × 


−72 0 0 72 0 0
 4
 0 −1.44 −3.6 0 1.44 −3.6 5
 

0 3.6 6 0 −3.6 12 6

Member 2: truss L = 7.5 m, E = 72e6 kN/m2 , A = 13,000 mm2


5 6 10 11
 
53.85 −129.23 −53.85 129.23 5
−129.23 310.15 129.23 −310.15 6
 
s2 = 103 ×  −53.85

 129.23 53.85 −129.23  10
129.23 −310.15 −129.23 310.15 11

Member 3: frame L = 5 m, E = 120e6 kN/m2 , A = 20,000 mm2 , I = 1200e6 mm4


7 8 9 10 11 12
480 0 0 −480 0 0 1
 

 0 13.82 34.56 0 −13.82 34.56
2
 
3
 0 34.56 115.2 0 −34.56 57.6
3
s3 = 10 × 


−480 0 0 480 0 0
 4
0 −13.82 −34.56 0 13.82 −34.56 5
 

0 0 0 0 0 115.2 6

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 295

Member 4: frame L = 5 m, E = 120e6 kN/m2 , A = 20,000 mm2 , I = 1200e6 mm4

10 11 12 13 14 15
480 0 0 −480 0 0 1
 

 0 13.82 34.56 0 −13.82 2
34.56
 
 0 34.56 115.2 0 −34.56 3
57.6
s4 = 103 × 


−480 0 0 480 0 0
 4
0 −13.82 −34.56 0 13.82 −34.56 5
 

0 0 0 0 0 115.2 6

Given in line #14–43 of the Scilab/Octave code at the end.


Step 3: Selectively adding the element stiffness matrix si into a global structure
stiffness matrix results in the assembled stiffness matrix S which becomes a 15 × 15
matrix.

Given in line #46–56 of the Scilab/Octave code at the end.

The free-joint displacements (DOFs) of the structure are (d4 , d5 , d6 ) at node 2,


(d9 ) at node 3, (d10 , d11 , d12 ) at node 4 and (d15 ) at node 5; the others are restrained.
After applying the boundary conditions, the modified stiffness matrix S j j is obtained
as shown below.

92.71 −49.70 0.00 0.00 0.00 −20.71

 −49.70 120.73 −3.60 0.00 0.00 49.70

0.00 −3.60 12.00 0.00 0.00 0.00




 0.00 0.00 0.00 480.00 0.00 −480.00
3 

S j j = 10 ×  0.00 0.00 0.00 0.00 115.20 0.00 ...
 −20.71 0.00 −480.00

49.70 0.00 980.71

 49.70 −119.29 0.00 0.00 −34.56 −49.70



 0.00 0.00 0.00 0.00 57.60 0.00
0 0 0 0 0 0

@seismicisolation
@seismicisolation
296 Matrix Structural Analysis and the Finite Element Methods

49.70 0.00 0.00

−119.29 0.00 0.00 

0.00 0.00 0.00 


0.00 0.00 0.00 


−34.56 57.60 0.00 

−49.70

0.00 0.00 

146.94 0.00 34.56 


0.00 230.40 57.60 

34.56 57.6 115.2

Given in line #60–66 of the Scilab/Octave code at the end.

Step 4: The fixed-end actions and the equivalent nodal loads for the uniformly
distributed loading are computed.

Given in line #69–77 of the Scilab/Octave code at the end.

The structure action vector AJ (along the free-joint displacements) in the global
coordinates is obtained using equivalent nodal loads as shown below.
 T
Aj = 0. 0 0. 0. −50. 0. −120. 0. 50.

Given in line #80 of the Scilab/Octave code at the end.

Step 5: The structure stiffness equation is then solved for the free joint displace-
ments as shown below.

D j = S−1
jj ×Aj

 
0.0428 m
 

 −20.5486 
 m
−6.1646 rad
 
 
 

 −0.0064 
 m
−3
 
D j = 10 × 
 −6.6234 
 rad ANS
−0.0064
 
  m
 
−20.6311 m
 
 
 

 0 
 rad
6.6234 rad

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 297

Given in line #83 of the Scilab/Octave code at the end.

Step 6: The support reactions are computed using Equation (4.27); where Ar f is
the fixed end reactions from member loading and Ar is the support reaction.

 
−3.08 Ar (kN)
7.40 Ar (kN)
 
 
 

 36.99 
 Ar (kN m)
 

 0 
 A j (kN)
 

 0 
 A j (kN)
0 A j (kN)
 
 
 

 0 
 A j (kN)
 
[As ] = [S] × [Ds ] + [Ar f ] = 
 116.30 
 Ar (kN)
−50
 
  A j (kN m)
 
0 A j (kN)
 
 
 

 −120 
 A j (kN)
 

 0 
 A j (kN m)
Ar (kN)
 
 3.08 
 

 116.3 
 Ar (kN)
50 A j (kN m)

Given in line #86–89 of the Scilab/Octave code at the end.

Step 7: Member forces in the local coordinates are determined using Equation
(4.28), in which si is computed in Step 2 and Dmi are member displacements identified
from the D j s solved above, shown below.

[Ami ] = [si ] × [Dmi ] + [AFmi ]


where:
0
 
 

 0 
 −20.5486
 
0  −6.1646 
   
−3
Dm1 = 10 ×  −3
, D = 10 × 
 
 0.0428  m2
 
   −6.6234 

−20.5486 −0.0064
 

−6.1646

@seismicisolation
@seismicisolation
298 Matrix Structural Analysis and the Finite Element Methods

−0.0064 −0.0064
   

 − 

−20.6311
 
   
 −6.6234   0 
−3
Dm3 = 10 ×  −3
, Dm4 = 10 × 
   

 −0.0064   0 
   
−20.6311 0
   
   
− 6.6234

Therefore, the member forces at both ends of each member are given in the fol-
lowing table:

Member Axial force (kN) Shear force (kN) Bending Moment (kN m)
Node-1 −3.08 7.40 36.99
1
Node-2 3.08 7.40 0
Node-1 −8.01 0 −
2
Node-2 8.01 0 −
Node-1 0 116.30 0
3
Node-2 0 3.70 281.51
Node-1 −3.08 3.70 −281.51
4
Node-2 3.08 116.30 0

Given in line #92–95 of the Scilab/Octave code at the end.

The corresponding Scilab code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 // Example 5.1 - Plane frame with a bar element mixed-in
2 // Direct Stiffness Method (Special cases)
3 clear; clc;
4

5 // Common units for analysis: Force in N, Length in mm


6

7 // Given parameters in appropriate units:


8 // Modulus of elasticity
9 LL = 2.5; H = 6; w = 24; // in kN/m2, m, kN/m
10

11 // Computing stiffness matrix of plane frame element


12 // using length, modulus of elasticity, x-sectional

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 299

13 // area, moment-of-inertia (L, E, A, I)


14 function s = stiff2Dframe(L, E, A, I)
15 EAL = E*A/L; EI = E*I;
16 s =[EAL 0 0 -EAL 0 0
17 0 12*EI/L^3 6*EI/L^2 0 -12*EI/L^3 6*EI/L^2
18 0 6*EI/L^2 4*EI/L 0 -6*EI/L^2 2*EI/L
19 -EAL 0 0 EAL 0 0
20 0 -12*EI/L^3 -6*EI/L^2 0 12*EI/L^3 -6*EI/L^2
21 0 6*EI/L^2 2*EI/L 0 -6*EI/L^2 4*EI/L]
22 endfunction
23

24 // Element stiffness matrices


25 // Member 1 (Frame): length in m and angle in degrees
26 L = 2*LL; A = 12e-3; I = 500e-6; E = 30e6;
27 s1 = stiff2Dframe(L, E, A, I)
28

29 // Member 2 (Truss): length in m and angle in degrees


30 L = sqrt(LL^2+H^2); A = 13e-3; E = 70e6;
31 theta = 360 - atand(H/LL);
32 eal = E*A/L;
33 s2h = [eal 0 -eal 0;0 0 0 0;-eal 0 eal 0;0 0 0 0];
34 c = cosd(theta); s = sind(theta);
35 T = [c s 0 0;-s c 0 0;0 0 c s;0 0 -s c];
36 s2 = T'*s2h*T
37

38 // Member 3 (Frame): length in m and angle in degrees


39 L = 2*LL; A = 20e-3; I = 1.2e-3; E = 120e6;
40 s3 = stiff2Dframe(L, E, A, I)
41

42 // Member 4 (Frame): length in m and angle in degrees


43 s4 = s3
44

45 // Assembling global stiffness matrix of the plane frame


46 S = zeros(15,15);
47

48 S(1:6,1:6) = s1; // Cantilever


49 S(7:12,7:12) = s3; // Simply supported beam 1 & 2
50 S(10:15,10:15) = S(10:15,10:15) + s4;
51 // Assembling the stiffness of the truss member
52 i = 4; j = 5; k = 10; m = 11;
53 S(i:j,i:j) = S(i:j,i:j) + s2(1:2,1:2);
54 S(i:j,k:m) = S(i:j,k:m) + s2(1:2,3:4);
55 S(k:m,i:j) = S(k:m,i:j) + s2(3:4,1:2);
56 S(k:m,k:m) = S(k:m,k:m) + s2(3:4,3:4);
57

@seismicisolation
@seismicisolation
300 Matrix Structural Analysis and the Finite Element Methods

58 // Partitioning S;
59 // restrained DOFs are
60 res = [1 2 3 8 13 14];
61

62 // Complete structure stiffness matrix


63 Sjj = S // Duplicate S into Sjj
64

65 Sjj(res,:) = [] // Delete the row j


66 Sjj(:,res) = [] // Delete the column j
67

68 // Fixed-end actions from loading and support settlement


69 V34F = w*L/2; V43F = V34F; V45F = V34F; V54F = V34F;
70 M34F = w*L^2/12; M43F = -M34F; M45F = M34F; M54F = -M34F;
71

72 // Member fixed-end actions, (in local coordinate)


73 Amf3 = [0 V34F M34F 0 V43F M43F]';
74 Amf4 = [0 V45F M45F 0 V54F M54F]';
75

76 // Fixed-end actions at the reactions


77 Arf = [0 0 0 0 0 0 0 V34F 0 0 0 0 0 V54F 0]';
78

79 // Nodal actions (from quivalent nodal load)


80 Aj = [0 0 0 0 -M34F 0 -2*V34F 0 -M54F]';
81

82 // Nodal displacements of the system are


83 Dj = inv(Sjj)*Aj;
84

85 // The complete structure displacement vector is


86 Ds = [0; 0; 0; Dj(1:4);0;Dj(5:8);0;0;Dj(9)];
87

88 // The complete structure actions vector is


89 As = S*Ds + Arf
90

91 // Member forces in the local coordinate


92 Am1 = s1*Ds(1:6)
93 Am2 = T*s2*[Ds(4:5);Ds(10:11)]
94 Am3 = s3*Ds(7:12) + Amf3
95 Am4 = s4*Ds(10:15) + Amf4
96

97 // END: ........... Example 5.1

Example 5.2 A tapered bar element has its radius equals R at the free end (on the
left) and 2R at the fixed end (on the right). If its length L and modulus of elasticity E
are constants, determine the axial stiffness of the bar element.
@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 301

SOLUTION
The displacement due to unit axial force applied at the free end (i.e., the member
flexibility) can be determined easily as shown below. The inverse of flexibility is thus
the stiffness.
At a distance x from the free-end, the radius and the cross-sectional area are
computed as follows:
 x  x 2
r = R× 1+ , and Ax = π × r 2 = π × R2 × 1 +
L L

Given in line #12 of the Scilab/Octave code at the end.


σx 1
The strain at x from the free end would be εx = =
E E × Ax

Given in line #15 of the Scilab/Octave code at the end.

After integrating the strain over the length of the member, the displacement (flex-
ibility) is obtained as follows.
Z L Z L
dx L
u= f = εx dx = =
0 0 E × Ax 2πR2 E
2πR2 E
Therefore, the axial stiffness coefficient of the member is given by, s =
L

Given in line #18 of the Scilab/Octave code at the end.

And, if a given structure has one/some of its members tapered like this, the corre-
sponding 2 × 2 axial stiffness matrix to be used in the DSM is given by the following
expression.
" #
2πR2 E 1 −1
⇒S=
L −1 1

Given in line #21–24 of the Scilab/Octave code at the end.

Compare this result with the prismatic case.

The corresponding Octave code showing the complete solution steps is given
in the listing below. This particular Octave code is based on symbolic computation
which will be well explained in Section 6.6.

@seismicisolation
@seismicisolation
302 Matrix Structural Analysis and the Finite Element Methods

Scilab/Octave Code
1 %% Example 5.2 - Axial stiffness of tapered member
2 %% Direct Stiffness Method (Special cases)
3 clear; clc;
4

5 %% Load symbolic package (comment this for Matlab)


6 pkg load symbolic
7

8 %% Symbolic variables
9 syms E L R x real
10

11 %% Expression for cross-sectional area at x


12 Ax = pi*R^2*(1+x/L)^2
13

14 %% Strain equation at x
15 ex = 1/(E * Ax)
16

17 %% Displacement due to unit load (as flexibility)


18 f = int(ex,0,L)
19

20 %% Axial stiffness coefficient is 1/f


21 k = f^(-1)
22

23 %% The 2 x 2 stiffness matrix (as a bar/truss member)


24 S = k*[1 -1;-1 1]
25

26 %% END: ........... Example 5.2

Example 5.3 Analyze the plane frame structure shown in Figure 5.5 using the DSM.
The length of the members are 15 ft, 20 ft and 8 ft for the long column, beam and
short column, respectively. Use E = 29,000 ksi, A = 10 in2 and I = 220 in4 for all
members. Consider a concentrated load of 25 kips applied along DOF-4 together
with a counter clockwise moment of 80 k-ft along DOF-9 as shown in the figure
below; and the roller surface is inclined at 45o .

SOLUTION A
The first solution will be done using the member replacement method. The roller will
be replaced by an additional axially rigid frame member having√a comparable length
to the other members in the structure (for this example L = 5 2, A = 1e8 in2 , I =
1e-6 in4 and E = 29,000 ksi).

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 303

Step 1: The DOFs are indicated in Figure 5.8. The additional rigid member (4-5)
to replace the roller support requires a new node (#5) which shall be fully restrained.
Step 2: The member connectivity matrix for the frame showing the global DOFs
is provided in the following table. Note that all members, including the substituted
member, are frame elements.

Element DOFs @ Node-1 DOFs @ Node-2


1-2 1 2 3 4 5 6
2-3 4 5 6 7 8 9
3-4 7 8 9 10 11 12
4-5 10 11 12 13 14 15

The element global stiffness matrix of each plane frame member is computed
from Equation (4.11) and Equation (4.12) using the expression s = T T × ŝ × T . For
the truss element, the stiffness matrix in the global coordinate system is calculated
from Equation (4.5) transforming it using Equation (4.7), and they are given as fol-
lows.

Member 1: frame L = 180′′ , E = 29,000 ksi, A = 10 in2 , I = 220 in4 , theta = 90

1 2 3 4 5 6
0.013 0 −1.181 −0.013 0 −1.181 1
 

 0 1.611 0 0 −1.611 0
2
 
−1.181 0 141.778 1.181 0 70.889
3
s1 = 103 × 


−0.013 0 1.181 0.013 0 1.181
 4
0 −1.611 0 0 1.611 0 5
 

−1.181 0 70.889 1.181 0 141.778 6

@seismicisolation
@seismicisolation
304 Matrix Structural Analysis and the Finite Element Methods

Member 2: frame L = 240′′ , E = 29,000 ksi, A = 10 in2 , I = 220 in4 , theta = 0

4 5 6 7 8 9
1.208 0 0 −1.208 0 0 4
 

 0 0.006 0.665 0 −0.006 5
0.665
 
 0 0.665 106.333 0 −0.665 6
53.167
s2 = 103 × 


−1.208 0 0 1.208 0 0
 7
0 −0.006 −0.665 0 0.006 −0.665 8
 

0 0.665 53.167 0 −0.665 106.333 9

Member 3: frame L = 96′′ , E = 29,000 ksi, A = 10 in2 , I = 220 in4 , theta = 270

7 8 9 10 11 12
0.087 0 4.154 −0.087 0 7
4.154
 

 0 3.021 0 0 −3.021 0 8

 
 4.154 0 265.833 −4.154 9
0 132.917
s3 = 103 × 


−0.087 0 −4.154 0.087 0 −4.154
  10
0 −3.021 0 0 3.021 0 11
 

4.154 0 132.917 −4.154 0 265.833 12

√ ′′
Member 4: frame L = 2 , E = 29,000 ksi, A = 1e6 in2 , I = 1e-6 in4 , theta = 315

10 11 12 13 14 15
205.06 −205.06 0 −205.06 205.06 0 10
 
−205.06 205.06 0 205.06 −205.06 0
  11
 
 0 0 0 0 0 0
 12
s4 = 106 × 


−205.06 205.06 0 205.06 −205.06 0
  13
 205.06 −205.06 0 −205.06 205.06 0 14
 

0 0 0 0 0 0 15

Given in line #13–47 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 305

Step 3: Selectively adding the element stiffness matrix si into a global structure
stiffness matrix results in the assembled stiffness matrix S.

Given in line #50–54 of the Scilab/Octave code at the end.

The free-joint displacements (DOFs) of the structure are (d4 to d12 ) at nodes 2,
3, and 4; Nodes 1 and the newly added node 1 are fixed. After applying the boundary
conditions, the modified stiffness matrix S j j is obtained as shown below.


1.221 0 1.181 −1.208 0

 0 1.617 0.665 0 −0.006
 1.181
 0.665 248.111 0 −0.665
 −1.208 0 0 1.295 0
S j j = 103 × 

 0 −0.006 −0.665 0 3.026 ...

 0 0.665 53.167 4.154 −0.665

 0 0 0 −0.087 0
 0 0 0 0 −3.021
0 0 0 4.154 0


0 0 0 0
0.665 0 0 0 

53.167 0 0 0 

4.154 −0.087 0 4.154 

−0.665 0 −3.021 0 

372.167 −4.154 0 132.917 

−4.154 10253048 −10253048 −4.154 
0 −10253048 10253051 0 
132.917 −4.154 0 265.833

Given in line #57 of the Scilab/Octave code at the end.

Step 4: The structure action vector AJ (along the free-joint displacements) in the
global coordinates is obtained using equivalent nodal loads as shown below.
 T
Aj = 25 0 0 0 0 50 0 0 0

@seismicisolation
@seismicisolation
306 Matrix Structural Analysis and the Finite Element Methods

Given in line #60 of the Scilab/Octave code at the end.

Step 5: The modified structure stiffness equation is then solved for the free joint
displacements as shown below.

D j = S−1
jj ×Aj
 
1.63 in
 

 0.01 
 in
0.00 rad
 
 
 

 1.62 
 in
= 10−3 × 
 
 1.85 
 in
 
 0.01  rad
 
1.85 in
 
 
 

 1.85 
 in
0.00 rad


The roller moves up the surface 1.852 + 1.852 = 2.616 inches, and the rotation
of the roller end of the structure is actually 0.353e-3 rad, depicted as 0.00 above in
the Dj vector because of rounding the small number.

Given in line #63 of the Scilab/Octave code at the end.

Step 6: Once the displacements are determined, the complete structure actions
vector As (A j together with the support reactions) is computed using the following
relationship.

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 307

 
−16.36 Ar (k)
 −8.63  Ar (k)
 
 
 1622.26  A (k in)
  r
 
 25.  A j (k)
 
 
 0  A j (k)
 
0  A j (k in)
 

 
 A j (k)
0 


 
[As ] = [S] × [Ds ] = 

 A j (k)
0 
 
 80.  A j (k in)
 
0  A j (k)
 

 
 A j (k)
0 


 
 A j (k in)
0 


 −8.63  Ar (k)
 
 
 Ar (k)
8.63 


0 Ar (k in)

p
The reaction force at the roller becomes (−8.63)2 + 8.632 = 12.21 kips.

Given in lines #66–69 of the Scilab/Octave code at the end.

Step 7: Member forces in the local coordinates are determined using Equation
(4.28), in which si is computed in Step 2 and Dmi are member displacements identified
from the Ds s solved above, shown below.

[Ami ] = [si ] × [Dmi ]


where:
0 1.6259941
   

 0 

 0.0053597 
 
   
0 −0.0042154
   
Dm1 =   , Dm2 = 
 

 1.6259941   1.6188479 
   
 0.0053597   1.8494538 
   

−0.0042154 0.0065897

@seismicisolation
@seismicisolation
308 Matrix Structural Analysis and the Finite Element Methods

1.6188479 1.8523123
   
1.8494538 1.8523123
   
   
0.0065897  0353 
Dm3 =   , Dm4 = 
   

1.8523123  0 
   
1.8523123 0
   
 
0353 0

The element forces at both ends of each member are given in the following table:

Member Axial force(k) Shear force(k) Bending Moment (k-in)


Node-1 −8.63 16.36 1622.26
1
Node-2 8.63 −16.36 1323.44
Node-1 8.64 −8.63 −1323.44
2
Node-2 −8.64 8.63 −748.96
Node-1 8.63 8.64 828.96
3
Node-2 −8.63 −8.64 0
Node-1 12.21 0 0
4
Node-2 −12.21 0 0

Given in line #72–75 of the Scilab/Octave code at the end.

The corresponding Scilab code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code

1 // Example 5.3A - Plane frame with inclined roller support


2 // Direct Stiffness Method (Special cases)
3 clear; clc;
4

5 // Common units for analysis: Force - kips, Length - in


6

7 // Given loading
8 P = 25; M = 80; // in kips and k-in units
9

10 // Computing stiffness matrix for plane frame element


11 // using length, modulus of elasticity, x-sectional
12 // area, moment-of-inertia (L,E,A,I,theta)

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 309

13 function [sh,T,S] = stiff2Dframe(L, E, A, I, theta)


14 EAL = E*A/L; EI = E*I;
15 sh =[EAL 0 0 -EAL 0 0
16 0 12*EI/L^3 6*EI/L^2 0 -12*EI/L^3 6*EI/L^2
17 0 6*EI/L^2 4*EI/L 0 -6*EI/L^2 2*EI/L
18 -EAL 0 0 EAL 0 0
19 0 -12*EI/L^3 -6*EI/L^2 0 12*EI/L^3 -6*EI/L^2
20 0 6*EI/L^2 2*EI/L 0 -6*EI/L^2 4*EI/L];
21 c = cosd(theta); s = sind(theta);
22 T = [c s 0 0 0 0; -s c 0 0 0 0; 0 0 1 0 0 0
23 0 0 0 c s 0; 0 0 0 -s c 0; 0 0 0 0 0 1];
24 S = T'*sh*T;
25 endfunction
26

27 // Element stiffness matrices


28 // Member 1 (Frame): length in in and angle in degrees
29 L = 15*12; theta = 90;
30 // Area in in^2; I in in^4 and E in ksi
31 A = 10; I = 220; E = 29000;
32 [sh1,t1,s1] = stiff2Dframe(L, E, A, I, theta);
33

34 // Member 2 (Frame): length in in and angle in degrees


35 L = 20*12; theta = 0;
36 [sh2,t2,s2] = stiff2Dframe(L, E, A, I, theta);
37

38 // Member 3 (Frame):
39 L = 8*12; theta = 270;
40 [sh3,t3,s3] = stiff2Dframe(L, E, A, I, theta);
41

42 // Member 4 (Roller replacement)


43 // length in in and angle in degrees
44 L = 10*sqrt(2); theta = 315;
45 // Area in in^2; I in in^4
46 A = 1e7; I = 1e-7;
47 [sh4,t4,s4] = stiff2Dframe(L, E, A, I, theta);
48

49 // Assembling global stiffness matrix of the plane frame


50 S = zeros(15,15);
51 S(1:6,1:6) = s1;
52 S(4:9,4:9) = S(4:9,4:9) + s2;
53 S(7:12,7:12) = S(7:12,7:12) + s3;
54 S(10:15,10:15) = S(10:15,10:15) + s4;
55

56 // Partitioning S;
57 Sjj = S(4:12,4:12);

@seismicisolation
@seismicisolation
310 Matrix Structural Analysis and the Finite Element Methods

58

59 // Nodal actions (from quivalent nodal load)


60 Aj = [P 0 0 0 0 M 0 0 0]';
61

62 // Nodal displacements of the system are


63 Dj = inv(Sjj)*Aj
64

65 // The complete structure displacement vector is


66 Ds = [0; 0; 0; Dj; 0; 0; 0]
67

68 // The complete structure actions vector is


69 As = S*Ds
70

71 // Member forces in the local coordinate are given as


72 Am1 = sh1*t1*Ds(1:6)
73 Am2 = sh2*t2*Ds(4:9)
74 Am3 = sh3*t3*Ds(7:12)
75 Am4 = sh4*t4*Ds(10:15)
76

77 // END: ........... Example 5.3A

SOLUTION B
In this method, the structure stiffness matrix is modified by transforming the coeffi-
cients corresponding to the roller support. Recall the vector transformation matrix
T* given in Equation (4.6). A rotation matrix R is computed
 using the inclination of
cos(θ ) sin(θ )
the rolling surface; in this case R = , where θ is 45o .
−sin(θ ) cos(θ )

The assembled structure stiffness matrix for the three members frame is obtained
following the same steps as in Solution A. This matrix is shown in the following
equation.

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 311

0.013 0 −1.182 −0.013 0 −1.182

 0 1.611 0 0 −1.611 0
 −1.182

0 141.778 1.182 0 70.889

 −0.013 0 1.182 1.222 0 1.182

0 −1.611 0 0 1.617 0.665



−1.182 0 70.889 1.182 0.665 248.111
S = 103 × 

...

 0 0 0 −1.208 0 0
0 0 0 0 −0.006 −0.665




 0 0 0 0 0.665 53.167

 0 0 0 0 0 0
0 0 0 0 0 0


0 0 0 0 0 0


0 0 0 0 0 0
0 0 0 0 0 0 


0 0 0 0 0 0 

−1.208 0 0 0 0 0 

0 −0.006 0.665 0 0 0 


0 −0.665 53.167 0 0 0 

1.295 0 4.154 −0.087 0 4.154 

0 3.026 −0.665 0 −3.021 0 


4.154 −0.665 372.167 −4.154 0 132.917 

−0.087 0 −4.154 1.554 1.467 −4.154 
0 −3.021 0 1.467 1.554 0 

4.154 0 132.917 −4.154 0 265.833

Given in line #13–47 of the Scilab/Octave code at the end.

The part of S to be transformed corresponds to the x- and y- displacements at


the roller (DOF-10 and DOF-11). The sub-matrix requiring transformation is given
by S(10:11,10:11); and the table below shows before and after the transformation of
this sub-matrix.

sub s* = R×sub× RT
10 11 x̂ ŷ
" # " #
10 86.534 0 1553.7 1467.1 x̂
11 0 3020.8 1467.1 1553.7 ŷ

@seismicisolation
@seismicisolation
312 Matrix Structural Analysis and the Finite Element Methods

Given in line #57–60 of the Scilab/Octave code at the end.

Back substituting the transformed s* matrix into the structure stiffness matrix
and applying the boundary conditions by restraining the ŷ as well as DOFs 1–3 at
node 1, the resulting 8 × 8 modified stiffness matrix of the structure is shown in the
equation below.

S j j = 103
 
1.22 0 1.18 −1.21 0 0 0 0
−0.01
 
 0 1.62 0.67 0 0.67 0 0 
 
 1.18
 0.67 248.11 0 −0.67 53.17 0 0 

 
 −1.21 0 0 1.30 0 4.15 −0.09 4.15 
×
 


 0 −0.01 −0.67 0 3.03 −0.67 0 0 

0 0.67 53.17 4.15 −0.67 372.17 −4.15 132.92 
 

 

 0 0 0 −0.09 0 −4.15 1.55 −4.15 
0 0 0 4.15 0 132.92 −4.15 265.83

Given in line #63–66 of the Scilab/Octave code at the end.

After solving the modified structure stiffness equation, almost identical displace-
ments and actions are obtained as in the previous solution; these are not repeated
here.

The corresponding Octave code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 %% Example 5.3B - Plane frame with inclined roller support
2 %% Direct Stiffness Method (Special cases)
3 clear; clc;
4

5 %% Common units for analysis: Force in kips, Length in in


6

7 %% Given loading
8 P = 25; M = 80;
9

10 %% Computing stiffness matrix for plane frame element


11 %% using length, modulus of elasticity, x-sectional
12 %% area, moment-of-inertia (L,E,A,I,theta)

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 313

13 function [sh,T,S] = stiff2Dframe(L, E, A, I, theta)


14 EAL = E*A/L; EI = E*I;
15 sh =[EAL 0 0 -EAL 0 0
16 0 12*EI/L^3 6*EI/L^2 0 -12*EI/L^3 6*EI/L^2
17 0 6*EI/L^2 4*EI/L 0 -6*EI/L^2 2*EI/L
18 -EAL 0 0 EAL 0 0
19 0 -12*EI/L^3 -6*EI/L^2 0 12*EI/L^3 -6*EI/L^2
20 0 6*EI/L^2 2*EI/L 0 -6*EI/L^2 4*EI/L];
21 c = cosd(theta); s = sind(theta);
22 T = [c s 0 0 0 0; -s c 0 0 0 0; 0 0 1 0 0 0
23 0 0 0 c s 0; 0 0 0 -s c 0; 0 0 0 0 0 1];
24 S = T'*sh*T;
25 endfunction
26

27 %% Element stiffness matrices


28 %% Member 1 (Frame): length in in and angle in degrees
29 L = 15*12; theta = 90;
30 %% Area in in^2; I in in^4 and E in ksi
31 A = 10; I = 220; E = 29000;
32 [sh1,t1,s1] = stiff2Dframe(L, E, A, I, theta);
33

34 %% Member 2 (Frame): length in in and angle in degrees


35 L = 20*12; theta = 0;
36 [sh2,t2,s2] = stiff2Dframe(L, E, A, I, theta);
37

38 %% Member 3 (Frame): length in in and angle in degrees


39 L = 8*12; theta = 270;
40 [sh3,t3,s3] = stiff2Dframe(L, E, A, I, theta);
41

42 %% Assembling global stiffness matrix of the plane frame


43 S = zeros(12,12);
44

45 S(1:6,1:6) = s1;
46 S(4:9,4:9) = S(4:9,4:9) + s2;
47 S(7:12,7:12) = S(7:12,7:12) + s3;
48

49 %% Taking the roller support through rotation matrix


50 ang = 45; %% the angle from global X to the local x
51 r = [cosd(ang) sind(ang); -sind(ang) cosd(ang)];
52

53 % Transforming the stiffness coefficients for the roller


54 % Rotation matrix r = [c s; -s c] is used such that
55 %% X-Y transformed (along - normal) to the roller surface
56 disp("Before ...")
57 sub = S(10:11,10:11)

@seismicisolation
@seismicisolation
314 Matrix Structural Analysis and the Finite Element Methods

58 sub2 = r*sub*r';
59 disp("... After")
60 S(10:11,10:11) = sub2
61

62 %% Partitioning S; (Sjj is 8 by 8)
63 Sjj = S;
64 Sjj(:,11)=[]; Sjj(11,:)=[];
65 %% Restrained normal to the roller surface (y_hat)
66 Sjj = Sjj(4:11,4:11);
67

68 %% Nodal actions (from quivalent nodal load)


69 Aj = [P 0 0 0 0 M 0 0]';
70

71 %% Nodal displacements of the system are


72 Dj = inv(Sjj)*Aj
73

74 %% The complete structure displacement vector is


75 Ds = [0; 0; 0; Dj(1:7); 0; Dj(8)]
76

77 %% The complete structure actions vector is


78 As = S*Ds
79

80 %% Member forces in the local coordinate are given as


81 Am1 = sh1*t1*Ds(1:6)
82 Am2 = sh2*t2*Ds(4:9)
83 Am3 = sh3*t3*Ds(7:12)
84

85 %% END: ........... Example 5.3B

5.9 PROBLEMS
5.1 The two simply supported beams shown in Figure 5.12(a) have equal length and
E = 17,200 ksi. They are connected by the two springs with stiffness ks = 25 k/in.
Analyze the structure using the DSM if the top beam has I = 110 in4 , the bottom has
I = 230 in4 , w = 5 k/ft and L = 10 ft. (SI: E = 72 GPa, ks = 5 kN/mm, I = 50e6 mm4
and I = 100e6 mm4 for the top and bottom beams, respectively, w = 60 kN/m and L
= 3.5 m).

5.2 The strip footing shown in Figure 5.12(b) having the dimensions 0.5 m
thick, 1.2 m width and 20 m length, carries a wall load of w = 40 kN/m. Analyse the
beam by dividing it into 5 segments supported on Winkler’s springs at the nodes (to
replace the soil foundation), take Ec = 30 GPa for the beam and analyze using the
DSM if the subgrade-reaction of the soil ks equals 50,000 kN/m3 . (FPS: t = 20 in, b

@seismicisolation
@seismicisolation
Special Cases in the Direct Stiffness Method 315

FIGURE 5.12 Problems Set 5.

= 4 in, L = 60 ft, w = 3 k/ft, Ec = 4350 ksi and ks = 100 lb/in3 ).


5.3 Derive the 6 × 6 stiffness matrix of the stepped plane frame element shown in
Figure 5.12(c). Take E is constant for both members and give your solution in terms
of E, A, I and L.
5.4 Derive the 6 × 6 stiffness matrix of the tapered plane frame element shown in
Figure 5.12(d). The cross-section of the beam is rectangular with constant width
b and the height h reduces linearly from 2H at node-1 to H at node-2. Take E is
constant and give your solution in terms of b, H, E, and L.

5.5 The curved plane frame element shown in Figure 5.12(e) is circular with
a radius R and extending to 90o . Derive its 6×6 stiffness matrix if the cross-sectional
area A and moment of inertia I, and modulus of elasticity E are all constants. Give
your solution in terms of E, A, I and R.

5.6 The plane frame shown in Figure 5.12(f) has four different special cases
to be considered. The horizontal member has a moment released at the middle, while
the curved member is circular with its center at node-4 and extending for 90o . Use
vector transformation technique for the inclined roller and analyze the frame using
the DSM. Let H = 4 m, L = 7.5 m, A = 15,000 mm2 , I = 720e6 mm4 , E = 200 GPa,
P = 110 kN and w = 24 kN/m (FPS: H = 12 ft, 22 ft, A = 25 in2 , I = 1750 in4 , E =
29,000 ksi, P = 25 kips and w = 2 k/ft).

@seismicisolation
@seismicisolation
@seismicisolation
@seismicisolation
Section II

FINITE ELEMENT METHODS

@seismicisolation
@seismicisolation
@seismicisolation
@seismicisolation
6 Introduction and 1D Finite
Element Analysis
6.1 INTRODUCTION
In Section I, the analysis of structures that are made up of interconnected discrete line
(1D) elements was covered. In this second part, the analysis of continuum structures
that do not necessarily have distinct nodes will be treated.
Analysis of continuum structures can be mathematically formulated in the form
of differential equations with some specified boundary conditions. The closed-form
(analytical) solution of these governing differential equations becomes very difficult
because of the use of complicated or discontinuous geometry of the structure, hav-
ing complex loading, using several materials within the same structure, etc. In such
cases, it would be essential to resort to a numerical solution technique, like the finite
element method, that generates approximate solutions to the problems described in
the form of (ordinary or partial) differential equations.
After studying the chapter, the reader will be able to

• Describe the basic idea behind the FEM


• List the general procedure employed in the FEM
• Understand and identify bar (1D) elements and their associated loading
• Derive the governing differential equation for a 1D element
• Determine the linear shape functions of a bar element
• Determine higher order (quadratic, cubic) shape functions for bar elements
• Analyze 2D and 3D trusses, beams, grids and 2D and 3D frames using the
FEM
• Octave or Scilab is used to compute element stiffness matrix and analyze
1D structures

6.1.1 NODES AND FINITE ELEMENTS


In the FEM, the problem domain (both the boundary and interior of the structure) is
subdivided into a number of smaller regions called finite elements, connected to each
other by a group of joints known as nodes . The behavior of an individual element
can be described with a simple set of equations. According to the FEM, assembling
the element equations into a large set is supposed to describe the behavior of the
whole structure.
Thus, the initial step in the finite element method is to subdivide the given struc-
ture into finite elements, a process known as discretization or meshing; the elements
so obtained are called the finite element mesh.

DOI:10.1201/9781003329350-8@seismicisolation
@seismicisolation 319
320 Matrix Structural Analysis and the Finite Element Methods

FIGURE 6.1 Typical Finite Elements in Structural Analysis.

Figure 6.1 shows some common finite elements used in structural analysis. In
1D elements, the cross-sectional area is very small compared to the length of the
element. Accordingly, 1D elements are represented by a line having two end nodes,
as shown in (a) or one/more additional nodes as in (b).
Example 6.1 It is required to determine the perimeter of a circle having a unit di-
ameter (radius = 21 unit).
This is a trivial problem, but assuming that the value of π is unknown, the perime-
ter of the circle (which equals π) can be approximated by the perimeter of a regular
polygon inscribed in the circle.
Analogous to the approximation technique using the finite element method, the
points A, B, C, D, E, ... in Figure 6.2 are the nodes that all lie on the given circle, and
the line segments connecting the adjacent nodes are the elements approximating the
curved line of the circle. The perimeter of the circle as approximated by that of the
n-sided inscribed regular polygon is given by Equation (6.1).

perimeter = π ×1
(6.1)

360o
≈ n × sin 2n

In general, the higher the number of elements, the better the approximation of
the perimeter of the circle would be. Table 6.1 shows the convergence of the approx-
imation, compared with the exact value of π.

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 321

FIGURE 6.2 A Circle with Diameter = 1 to Approximate π (a) Nodes and Elements
and (b) Typical Regular Polygon Inscribed in the Circle.

TABLE 6.1
Approximating π from Inscribed Regular Polygons
No. of sides Perimeter Error, (%)

3 2.598076211 17.301
4 2.828427125 9.968
5 2.938926261 6.451
8 3.061467459 2.550
16 3.121445152 0.641
32 3.136548491 0.161
64 3.140331157 0.040
128 3.141277251 0.010
1000 3.141587486 0.000
10000 3.141592602 0.000

As shown in the preceding example, the finite element method employs dis-
cretization and assembly as the core concept for solving complex engineering prob-
lems. The given problem has infinite degrees of freedom (DOF), while the discretized
model has a finite number of DOF, which is the origin of the name finite element
method.

@seismicisolation
@seismicisolation
322 Matrix Structural Analysis and the Finite Element Methods

6.1.2 A BRIEF HISTORY


The finite element method in the field of structural engineering is said to have begun
in the 1940s as indicated by the works of, among others, Hrennikoff (who presented
the discretization of a continuous domain into several elements using the lattice anal-
ogy to model membrane structures) and Courant (who presented his work based on
constant strain triangular elements using the Ritz method and a procedure which
could be used in the minimization of the total potential energy of the problem). The
mathematical foundations of FEM for solving structural analysis problems are said
to be established at this time. The term “finite element” first appeared in a paper en-
titled “The Finite Element Method in Plane Stress Analysis” by Clough in 1960. The
first book on the finite element method was published by O. Zienkiewicz, R.L. Taylor
and J. Zhu in 1962. In the late 1960s and 1970s, the FEM became an important nu-
merical approximation method for problems other than structural applications. Many
commercial finite element programs started in the 1980s [8, 13, 15, 41].

6.1.3 AN OVERVIEW
Application Areas
Finite element analysis (FEA) is applicable in a variety of fields where the physical
problem can be described in the form of (partial) differential equations the mathe-
matical solution of which is difficult.
FEM applications include structural stress analysis, vibration and dynamic anal-
ysis, thermal analysis in solid; slope stability and soil structure interactions, seepage
of fluids in soils and rocks; electrical network analysis, electromagnetic analysis,
dynamic analysis of motors as well as heat analysis in electrical equipment; simu-
lation of chemical processes and chemical reaction; climate and wind predictions;
simulation of various human organs, etc. [25, 39, 42].

Available Software for FEA


It is impossible to perform finite element analysis of a real size problem without
the use of appropriate software. There are many software for finite element analysis,
and it is difficult to have a complete list. Wikipedia [50] lists down a number of
the software available, some of which have a general purpose and applicable to any
problem area. In contrast, others are used only for specific problem areas. This source
indicates that FE software can be broadly categorized into proprietary as well as free
and open-source groups. For solid and structural analysis purposes ADINA, ANSYS,
ABAQUS, COMSOL, DIANA, ETABS, NASTRAN, RFEM and SAP2000 are a few
of the notable proprietary software types, while CalculiX, Code-Aster, FreeFEM++,
OpenFOAM, OpenSees and Z88 are in the free and open-source category.

Pros and Cons of FEM


Using FEM, it is possible to model structures with complex geometries as well as
complicated loading and boundary conditions. It is also easy to model structures

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 323

with composite or multiple material types. Models in FEM can be easily refined for
improved accuracy of the analysis result by varying the element size and/or element
type. Time dependent and dynamic effects can be included in FEA; likewise, non-
linear effects can also be properly accommodated. The computation in the FEM re-
quires a lot of time especially as the mesh becomes finer. Therefore, a good-capacity
computer – both in memory and speed – will be needed to obtain an analysis result
within a reasonable time [7, 25].

Linear and Nonlinear FE Analysis


Finite element analysis can be classified into linear and nonlinear analysis. In linear
finite element analysis, there’s a linear relation between applied forces and displace-
ments. This applies to structural problems in which the displacements caused are
very small, and the stresses are in the linear elastic range of the materials used. A
constant stiffness matrix is considered in a linear finite element and some of the
basic assumptions in the linear analysis are:

• Under a given loading, the structure is subjected to small and insignificant


changes in shape
• The structure returns to its original configuration when its loading is re-
moved
• There is no change in the direction or magnitude of the loading
• The material properties remain constant
• The deformation and strain are very small

In nonlinear analysis, the relation between applied forces and displacements is


not linear; the stiffness matrix is also not a constant. Equation (6.2) shows the rela-
tionship between linear and nonlinear stiffness equations.

Linear Nonlinear
[F] = [K] × [d] [F] = [K] × [d]
(6.2)
[F] ̸= f (d) [F] = f (d)
[K] ̸= f (d) [K] = f (d)

where: F = Nodal forces vector,


d = Nodal displacements vector,
K = Stiffness matrix of the structure.

Some common cases of nonlinear analysis are geometric non-linearity (in which
the deformation is large and the relation between displacement and strain is nonlin-
ear), material non-linearity (when the stress and strain relationship of the material
is not linear), boundary or contact non-linearity (when the displacement boundary
condition is displacement dependent) and dynamic problems (when the structure is
subjected time-dependent actions or deformations) [3, 9, 26, 42].

@seismicisolation
@seismicisolation
324 Matrix Structural Analysis and the Finite Element Methods

Error Sources
There are three categories of error sources in the finite element computations. The
first is modeling error, which is due to the simplifying assumptions in the mathe-
matical models of the actual structure. For example, when using beam elements, it
is assumed that the cross-sections stay planar and do not change in shape. The sec-
ond is called discretization error, which is due to piece-wise approximation that can
be minimized by using higher-order shape functions or smaller elements. The final
type is numerical error, which occurs due to the limited number of significant digits
stored by the computer.

Other Contending Numerical Methods


Brief notes on some other numerical methods for solving partial differential equa-
tions are provided as follows. Some of these methods have been developed as inde-
pendent numerical methods during or before the finite element method evolved. At
the same time, the others are based on the FEM and have been developed in order to
overcome specific shortcomings of the FEM.

The Finite Difference Method


The finite-difference method is normally defined on a regular grid, and it is therefore
not conducive to irregular geometries. At a point in space, the continuum represen-
tation of the given differential equation is replaced by a set of finite-difference equa-
tions, leading to a numerical solution of differential equations. FDM tries to solve
equation(s) directly searching for the strong form solution. The method was first in-
troduced by Brook Taylor in 1715 [30].

The Boundary Element Method


The boundary-element method is used to solve partial differential equations that have
been formulated as boundary integral equations. The method uses the given bound-
ary conditions to fit boundary values into the integral equation, rather than values
throughout the space defined by the partial differential equation. Fredholm was the
first to use singular boundary integral equations in 1903 to find the unknown bound-
ary quantities for problems of potential theory. The method is also known as the
boundary integral method – BIM or the boundary integral equation method – BIEM
[22].

Finite Volume
The Finite Volume Method (FVM) is another numerical method to transform and
solve partial differential equations into discrete algebraic equations over finite vol-
umes. The FVM is widely used in modeling fluid flow problems as computational
fluid dynamics. The development of the FVM is attributed to its CFD application at
the Imperial College in 1970s [12, 43].

Meshless or Meshfree Method


The meshfree method is used to create a set of algebraic equations for the given prob-
lem using nodes scattered within the domain without requiring to mesh the domain.
@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 325

There are many mesh-free methods, but one of the earliest application of the method
is the smoothed particle hydrodynamics in 1977 by Libersky. Some of the reasons for
the development of this method are: low accuracy of stresses especially at element
boundary; difficulty in adaptive analysis; limitation in the analyses of problems like
large deformation, crack growth and material rupture [24].

Extended Finite Element Method (XFEM)


The motivation for the development of XFEM is the cumbersome nature of updat-
ing the mesh topology to conform to the geometry of models having discontinuities.
XFEM was first used by Belytschko to model fracture and discontinuity propagation
in 1999. The rationale was on adding enrichment functions to the approximation al-
lowing the crack to be aligned within the mesh [23].

Applied Element Method


The applied element method (AEM) is a numerical method for the analysis of struc-
tures considering their continuum and discrete behavior. AEM considers cracking
by following the structural collapse stages: elastic, crack initiation and propaga-
tion in tension-weak materials, reinforcement yield, element separation, element
contact and collision, as well as collision with the ground and adjacent structures.
The method was first published in 2000 in a paper called “Applied element method
for structural analysis: Theory and application for linear materials” by Meguro and
Tagel-Din [2].

6.2 3D ELASTICITY
The governing differential equation is derived mostly through equilibrium and com-
patibility relationships in structural analysis. Figure 6.3 shows a solid differential
element found within a stressed structure. The equilibrium equations are given in

FIGURE 6.3 A 3D Stressed Element.

@seismicisolation
@seismicisolation
326 Matrix Structural Analysis and the Finite Element Methods

Equations (6.3), in which, Xb ,Yb and Zb are body forces in the element along the
three coordinate axes.

∂ σx ∂ τyx ∂ τzx
+ + + Xb = 0
∂x ∂y ∂z
∂ τxy ∂ σy ∂ τzy
+ + +Yb = 0 (6.3)
∂x ∂y ∂z
∂ τxz ∂ τyz ∂ σz
+ + + Zb = 0
∂x ∂y ∂z
Displacement functions in a structure along the x, y and z directions are usually
expressed as u, v and w, respectively. Figure 6.4 shows the deformed configuration
of the 3D stress-block in the X–Y plane only. Accordingly, the strain–displacement
relationship for the 3D element in the linear elasticity case is given by the set of
equations in Equation (6.4).

∂u ∂v ∂w
εx = , εy = , εz = ,
∂x ∂y ∂z
(6.4)
∂u ∂v ∂u ∂w ∂v ∂w
γxy = + , γxz = + , γyz = +
∂y ∂x ∂z ∂x ∂z ∂y

FIGURE 6.4 Deformed Shape of the Stress Block.

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 327

This can be written in compact form as ε = ∂U where U = [u v w]T ; the ∂


(derivative) operator is given in Equation (6.5).
∂ 

εx

∂x 0 0
   ∂

ε   0 0  

 y  ∂y
   u

 
∂ 
 εz   0 0
  
∂z   
 
 =
   ×v (6.5)
γ   ∂ ∂
0
  
 xy   ∂ y ∂x
w
   
  ∂ 
∂ 
γxz  
   ∂z 0 ∂x 

γyz ∂ ∂
0 ∂z ∂y
The stress–strain relationship, also known as the constitutive equation, that re-
lates the six stresses and the six strains for the linear elastic case is given by Equation
(6.6) or Equation (6.7). [D] is the constitutive matrix that described the linear elastic
material property.

1−ν ν 0 0 0
     
σx ν εx
     
σ   ν 1−ν ν 0 0 0 
  εy 
 
 y 
     
ν 1−ν 0 0 0   εz 
     
 σz  E  ν
 =  ×   (6.6)
     
τ  (1 + ν)(1 − 2ν)  0

1−2ν
 xy   0 0 2 0 0 
 γxy 
 
     
  
 0 1−2ν   
τxz  0 0 0 2 0  γxz 
     
1−2ν
τyz 0 0 0 0 0 2
γyz

⇒ [σ ]6×1 = [D]6×6 × [ε]6×1

−ν −ν
     
εx 1 0 0 0 σx
     
ε  −ν 1 −ν 0 0 0  σ 
 y    y
     
 εz  1 −ν −ν
     
1 0 0 0   σz 
 =  ×  (6.7)
     
γ  E  0 0 0 2(1 + ν) 0 0  τ 
 xy     xy 
     
     
γxz   0 0 0 0 2(1 + ν) 0  τxz 
     
γyz 0 0 0 0 0 2(1 + ν) τyz

⇒ [ε] = [D]−1 × [σ ]

@seismicisolation
@seismicisolation
328 Matrix Structural Analysis and the Finite Element Methods

6.3 INTERPOLATION/SHAPE FUNCTION


Interpolation is a procedure used to derive additional values between two or more
prescribed values. If the number of known values is two, it is said to be a linear
interpolation; for three known values along the same axis, it becomes quadratic in-
terpolation, etc. In the FEM, the shape function or interpolation function is a function
used to approximate the value of a given point within the element in terms of the pre-
scribed values. Figure 6.5 shows a two-noded bar element having linear interpolation
functions.

x
u = d1 + · (d2 − d1 )
L
x x
= (1 − ) · d1 + · d2
L L
= N1 · d1 + N2 · d2 (6.8)
" #
d1
= [N1 N2 ] ·
d2

= [N] · [d]
x
N1 = (1 − )
L
x
⇒ N2 =
L
" ! #
x x
N = [N1 N2 ] = 1−
L L
A distinction needs be made between u – the continuous displacement function
over the element and d – the (unknown) displacement vector prescribed at the nodes.
The nodal displacements vector d is termed as the known-unknowns in the rest of this

FIGURE 6.5 Linear Interpolation.

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 329

book for obvious reasons.1 The functions N1 and N2 are the linear shape functions
for the nodes 1 and 2, respectively. They do not depend on the known-unknowns;
they are always dependent on the element’s geometry, the location of the selected
nodes for the element and the coordinate system used. Using a similar procedure,
corresponding shape functions can be derived for quadratic or higher-order interpo-
lation.
If an element contains more than two nodes along the same axis, the shape func-
tions can be derived using the Lagrange Interpolation Polynomial (product quotient)
given in Equation (6.9).
j=n
x−xj
Ni = ∏ (6.9)
j=1 xi − x j
i̸= j

The general characteristics of the n shape functions of a given element are listed
as follows:
• Ni = 1 at node i; Ex. N1 = 1 at node #1
• Ni = 0 at node j such that j ̸= i; Ex. N1 = 0 at node #2
• ∑ni=1 Ni = 1 anywhere on the element.

6.4 ELEMENT STIFFNESS MATRIX


Strain–displacement matrix B is defined as the derivative of the shape function ∂ N
such that [ε] = [B] · [d]. The strain–displacement matrix for 2 – noded bar element in
the previous section is a constant vector given by B = [ −1 1
L L ].

In general, the element stiffness matrix is obtained using Equation (6.10), see
[3, 9, 25, 42, 48] for the derivation of this equation.2

Z
k= BT · D · B dv (6.10)
V

where: B = Strain–displacement matrix


D = Constitutive matrix of the element
V = Integrated over the volume of the element
dv = Integrate with respect to volume of the element

1 The d vector is unknown nodal displacements, yet it is used to express the displacement function over
the element u, as if it were known. That’s why the name known-unknowns is fitting.
2 In FEM, the element stiffness matrix is commonly denoted by k. Recall that s was used exclusively

in Section I of this book; both notations will be used hereafter interchangeably to refer to the element
stiffness matrix.

@seismicisolation
@seismicisolation
330 Matrix Structural Analysis and the Finite Element Methods

6.4.1 EQUIVALENT NODAL LOADS VECTOR


Like the direct stiffness method (DSM), any type of loading distributed within the
element must be converted into an equivalent nodal load. The finite element method,
this is done based on the shape function, as provided in Equation (6.11).

Z Z
f =P + N T · Xb dv + N T · T dS (6.11)
V S

where: f = Total equivalent nodal loads vector


P = Applied loading at the Node
N = Shape function
Xb = Distributed body force function within the element volume V
dv = Integrate with respect to element volume
T = Surface force function distributed over the element surface S
dS = Integrate with respect to element surface

6.5 COMMON STEPS IN THE FEM


In using the finite element method, especially for structural analysis, the following
general procedure are commonly used [7, 26].

PREPROCESSING
• Step 1. Idealize the Problem Domain The given problem needs to be
idealized based on engineering judgment; the governing equation must be
known or established. The main aim is to simplify a real engineering prob-
lem into a problem that can be solved by FEM. Purlin and rafters are re-
placed by the load they exert on the truss, supporting girders by appropriate
supports, as provided in Figure 6.6.
• Step 2. Discretize Sub-divide the solution domain into finite elements, i.e.,
into elements and nodes. These types of structures are said to be naturally
discretized, elements and nodes are clearly identifiable, as show in Figure
6.7.
• Step 3. Select an Interpolation Function Assume an interpolation (shape)
function to represent the physical behavior of an element. For a two-noded
truss member, a linear interpolation function describes the displacement
over the element in terms of the nodal displacements, as given in Figure
6.8.
• Step 4. Develop Element Equations Derive relationships between the un-
known and given parameters at the nodes of the elements; for example,
u = N1 · d1 + N2 · d2 and f = k · d, where f and d are the nodal force and
displacements of the element. The following relationship shows the element
stiffness equation of a truss member.

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 331

FIGURE 6.6 Idealization of a Plane Truss: (a) Actual Structure with Full of Details
and (b) Idealized Truss Model for FE Analysis.

FIGURE 6.7 Nodes and Elements of the Plane Truss.

" # " # " #


f1 EA 1 −1 d1
= ×
f2 L −1 1 d2

• Step 5. Assemble Structure Equation Arrange and selectively add the


element stiffness (equations) to represent the entire system and obtain the
global structure equation. This process is depicted in Figure 6.9, leading to
the structure stiffness equation given by [F]∗ = [K]∗ × [U]∗ .
• Step 6. Apply Boundary Conditions Apply support boundary conditions
and loads. Some essential boundary conditions that directly affect DOFs
need to be imposed on the displacement vector U. For the above truss ex-
ample, the displacements at the pin supports 1, 7 and 13 are all zero. With-

@seismicisolation
@seismicisolation
332 Matrix Structural Analysis and the Finite Element Methods

FIGURE 6.8 Linear Interpolation of a Plane Truss.

FIGURE 6.9 Assembling Element Stiffness into Structure One.

out sufficient number of such restraints, the structure becomes unstable; for
example K ∗ is singular since no boundary condition has been introduced.

Singular Non-singular
(6.12)
[F]∗ = [K]∗ × [U]∗ ⇒ [F] = [K] × [U][1ex]

SOLUTION
• Step 7. Solve for the Primary (nodal) Unknowns Solve the resulting set
of simultaneous equations to obtain the unknown nodal displacements.

[U] = [K]−1 × [F] (6.13)

POSTPROCESSING
• Step 8. Compute Other Values of Interest Obtain secondary or derived
values of interest using the nodal results computed, such as support reac-
tions, member forces, stresses, strains, etc.
• Step 9. Interpret the Results Plot graphs of the different results, and assess
(estimate) errors.

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 333

FIGURE 6.10 A Plot of the vertical Displacement of the Truss.

6.6 SYMBOLIC COMPUTATION


Symbolic computation is performing algebraic expressions using just symbols or
variables rather than values. For example, when solving the linear equation a·x +b =
0 for x, the result becomes x = − ba . By not working in numbers, symbolic compu-
tation reduces rounding off errors and thereby increasing the precision of the calcu-
lation involved. Symbolic computation can be performed using a Computer Algebra
System (CAS), which is available in some software to perform and get analytical
results out of symbolic expressions. The Octave Symbolic Package [37] is one such
CAS system that extends the functionalities of the Octave software so that it can be
used to perform symbolic computations. The package must be installed in the Octave
software and must be loaded before starting any symbolic computation.
Various other software provide CAS for symbolic computation including Max-
ima [29], and Matlab and Sage [44]. Unfortunately, at the time of writing of this
book, Scilab does not offer symbolic computation. There were successful attempts
in the past to use additional open-source toolboxes that enable Scilab to commu-
nicate with Maxima and provide symbolic computation capability within the Scilab
environment [45, 1]. These toolboxes are not functioning currently since they haven’t
been maintained for a long time.
Most of the equations and relationships in the finite element method require a
lot of symbolic computation. The shape function, the strain-displacement matrix and
even the stiffness matrix are some of the examples that need symbolic computation.
For the remaining part of the book, this package is used in all the examples that re-
quire symbolic computation. Here is a few lines of code hard demonstrating how to
use symbolic computation in Octave.

1 %% Example 6_Sym - Prismatic beam


2 %% Flexibility/Stiffness matrices
3 clear, clc
4

5 %% The Octave Symbolic package is used to


6 %% perform analytical operations including
7 %% calculus.
8

9 pkg load symbolic

@seismicisolation
@seismicisolation
334 Matrix Structural Analysis and the Finite Element Methods

10 syms L EI real
11

12 % Flexibility of a cantilever beam


13 f = [L^3/(3*EI) L^2/(2*EI); L^2/(2*EI) L/EI]
14

15 % Stiffness as inverse of Flexibility


16 s = inv(f)
17

18 %% END: ........... Example 6_Sym


The flexibility of a cantilever beam has been derived earlier in Equation (3.3)
and the stiffness in Equation (3.22). Using the basic idea that flexibility and stiffness
have an inverse relationship to each other, this example evaluates the stiffness matrix
by inverting its flexibility matrix.
In the above code, line #9 loads the symbolic package, while L and EI are de-
clared in line #10 as (real-valued) symbolic variables. The flexibility matrix of a
prismatic beam element having length L and flexural rigidity EI is given in line #13.
The symbolic inv function is used in line #16 to determine the stiffness. The list of
symbolic functions available in the Octave Symbolic package are provided on the
website [36]. Running the above octave code displays the flexibility and the stiffness
matrices of the cantilever beam as shown below.

f = (sym 2x2 matrix)

[ 3 2 ]
[ L L ]
[---- ----]
[3*EI 2*EI]
[ ]
[ 2 ]
[ L L ]
[---- -- ]
[2*EI EI ]

s = (sym 2x2 matrix)

[12*EI -6*EI ]
[----- ------]
[ 3 2 ]
[ L L ]
[ ]
[-6*EI 4*EI ]
[------ ---- ]
[ 2 L ]
[ L ]

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 335

A concise tutorial on how to use the octave symbolic package is also available
on the Octave Wiki-site [38].

6.7 1D FE ANALYSIS
A bar (1D) element is a structural element in which the longitudinal dimension
(length) is much larger than the cross-sectional dimension. It resists an internal axial
force along its longitudinal dimension, shown in Figure 6.11.
A bar element has at least two nodes (start node i and the end node j), a coordinate
axis X directed from i to j, a cross-sectional area A(x) and a modulus of elasticity E.
Forces fi and f j as well as the displacements di and d j are assumed to be prescribed
(as known-unknowns) at the two nodes of the element. The element may also be
subjected to an arbitrary loading q(x) applied longitudinally.
Because the member, the loading and the displacements are directed along the
member axis (X), structures of this type are termed as 1D problems. Beams, grid
structures, plane or space trusses, plane or space frames have usually similar pris-
matic elements. Still, they are not 1D problems, since they require more than one
axis to describe at least one of the following: geometry, loading or the displaced
configuration of the structure.
Governing equation(s) are differential equations that describe a given problem in
a mathematical form which must be satisfied for every part of the given structure.
For a 1D – (bar-) element, the governing equation can be derived using equilibrium
of an infinitesimal element taken out of the bar as shown in Figure 6.11(c) and based
on the following general assumptions:

FIGURE 6.11 (a) A 1D Bar Element and Loading (b) Two-Noded (Linear) Finite
Element and (c) Actions on a 1D Infinitesimal Element.

@seismicisolation
@seismicisolation
336 Matrix Structural Analysis and the Finite Element Methods

• The bar must be in equilibrium


• It must satisfy the elastic stress–strain law (Hooke’s law)
• The displacement field must be compatible
• Strain is expressed in terms of nodal displacements
The following is the derivation of the governing differential equation for a 1D bar
element having a cross-sectional area A(x) and subjected to a longitudinal internal
loading.

∑ Fx = 0
!
∂ σx
σx + · dx · A(x) + q(x) · dx − σx · A(x) = 0
∂x
!
∂ σx ∂ σx
∴ + q(x) · dx = 0 ⇒ + q(x) = 0
∂x ∂x
Let u(x) be the displacement function over the bar; the strain is then given by
ε = ∂∂ ux . Using Hook’s law, σ = Eε and from the equilibrium of the infinitesimal
element, the governing differential equation is given by Equation (6.14).
!
∂ ∂u
E · A(x) · + q(x) = 0 (6.14)
∂x ∂x
Since the problem involves only a single coordinate axis x, the partial differen-
tial equation becomes the 2nd-degree order ordinary differential equation given in
Equation (6.15).
!
d du
E · A(x) · + q(x) = 0 (6.15)
dx dx

For the complete description of a given problem in this form, appropriate (dis-
placement and force) boundary conditions should also be specified together with the
differential equation. This form of problem description (as a differential equation
along with the corresponding boundary conditions) is called the strong form of the
problem. The solution of the governing differential equation is obviously the dis-
placement function u(x).

6.7.1 STIFFNESS OF A LINEAR BAR ELEMENT


The direct method can be used to derive the stiffness matrix of a linear (two-noded)
bar element of length L with a constant cross-sectional area A and a modulus of
elasticity E. In the previous matrix structural analysis part of this book, the stiffness
coefficient si j has already been defined as the action required along DOF i to cause a
unit displacement at j while all displacements at other nodes are zero; see Definition
1.4.

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 337

The following is the relationship provided in the integral Equation (6.10): The
stiffness matrix of a two-noded bar element with constant E and A is obtained as
follows. Note that the resulting stiffness matrix is isentical to the one given under the
DSM in Chapter 4.

Z
k = BT · D · B dv
V

−1
" # Z L
L
= 1
· E · [ −1
L
1
L] · A dx
0
L

−1
" #
E ·A 1
=
L −1 1

6.7.2 STIFFNESS OF A QUADRATIC BAR ELEMENT


Figure 6.12 shows a three-noded (quadratic) bar element with an additional node at
the center of the bar.3 It is essential to derive the shape function of such an element,
which is computed using the Lagrange Interpolation Polynomial given in Equation
(6.9).
Applying this to the given quadratic bar, the three shape functions N1 , N3 and N3
are computed as follows.

x − x2 x − x3 3x 2x2
N1 = · = 1− + 2
x1 − x2 x1 − x3 L L
x − x1 x − x3 4x 4x 2
N2 = · = − 2
x2 − x1 x2 − x3 L L
x − x1 x − x2 − x 2x2
N3 = · = + 2
x3 − x1 x3 − x2 L L

And the strain–displacement matrix B is given by:


 
dN 3 4x 4 8x −1 4x
B= = − + 2, − 2, + 2 (6.16)
dx L L L L L L
For a quadratic (three-noded) bar element of length L having a constant cross-
sectional area A and a modulus of elasticity E, the stiffness matrix can be derived
following the relationship provided in Equation (6.10). Since E and A are constants,
the stiffness matrix of the quadratic element can now be computed as follows:
3 Location of the third node could be anywhere between the end nodes.

@seismicisolation
@seismicisolation
338 Matrix Structural Analysis and the Finite Element Methods

FIGURE 6.12 Quadratic Bar Element.

Z
k = BT · D · B dv
V

Z L
= E ·A BT · B · dx
0
 
7 −8 1
E ·A 
=  −8 16 −8 
 
3L  
1 −8 7
Example 6.2 Given the linearly tapered bar shown in Figure 6.13(a), it is required
to compare the exact displacement function with different FE solutions. Use E =
100 GPa, L = 2 m, P = 80 kN, A0 = 0.6 cm2 , AL = 1 cm2 to:

(a) Derive the governing differential equation (SF), and find the analytical (exact)
solution of the DE, i.e., find u(x)
(b) Determine a numerical solution using the finite element method with the fol-
lowing set of mesh:
• Two linear elements of equal lengths vs a single quadratic element
• Eight linear elements of equal lengths vs four quadratic element
(c) Plot all solutions together and compare the results

SOLUTION
(a) Let’s assume common units of m for length and N for force for this problem. Area
is varying linearly and it is given below in m2 :

A(x) = A0 + (AL − A0 ) · Lx

= (6 + 2x) · 10−5

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 339

FIGURE 6.13 (a) Tapered Bar Under Axial Load P, (b) Two Linear Elements and
(c) Single Quadratic Element.

The governing differential equation is obtained as follows (see Equation (6.15)):


!
d du
E · A(x) · =0
dx dx
!
d −5
du
E · 10 · (6 + 2x) · =0
dx dx
!
d du
106 · (6 + 2x) · =0
dx dx

Integrating once, and noting that EA dudx is the internal force (which equals P),
results in:
du
106 · (6 + 2x) · = C1 = P
dx
Rewriting this equation and further integrating gives the solution u as shown
below:
106 dx
· du =
80, 000 (6 + 2x)
1
12.5u = ln |6 + 2x| +C2
2

@seismicisolation
@seismicisolation
340 Matrix Structural Analysis and the Finite Element Methods

Using the boundary condition u = 0 at x = 0, the second constant of integration


C2 = −0.5 ln 6. The exact displacement function, in m, is thus given as follows:

ln (1 + x/3)
u=
25

Given in line #19 of the Scilab/Octave code at the end.

The displacement at the free-end equals 0.020433 m. Assuming the bar has an
average uniform cross-sectional area of ((1 + 0.6)/2)e − 5, the approximate dis-
PL
placement at the free-end becomes AE = 0.2 m. Let’s investigate how FE analysis
fare.

(b)i. Figure 6.13(b) shows the two linear elements mesh of the given tapered bar.
The stiffness matrices of the two linear elements is computed as follows.
For the first element:

1 −1 Z 0.5L 1 −1
" # " #
E
k1 = ((6 + 2x) · 10−5 ) dx = 7 · 106 ·
0.5L −1 1 0 −1 1

For the second element:


1 −1 Z L −1
" # " #
E 1
−5 6
k2 = ((6 + 2x) · 10 ) dx = 9 · 10 ·
0.5L −1 1 0.5L −1 1

Given in line #27–28 of the Scilab/Octave code at the end.

The assembled stiffness matrix and the load vector, where R is the support reac-
tion, are given as follows.
   
7 −7 0 R
   
K = 106 · −7 16 −9 A =  0 
   
   
0 −9 9 80, 000

Given in line #31–33 of the Scilab/Octave code at the end.

Applying the boundary condition that d1 = 0, the solution is as given below.


#−1 "
−9
" # " # " #
d2 16 0 0.01143
−6
= 10 · · = m
d3 −9 9 80, 000 0.02032

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 341

Given in line #35 of the Scilab/Octave code at the end.

The displacement functions over the tapered bar (u1 for the first half and u2 for
the second half), are obtained as follows:
" #
  0 2x
u1 = N1 N2 · =
0.01143 175
" #
  0.01143 14x + 4
u2 = N2 N3 · =
0.02032 1575

Given in line #37–38 of the Scilab/Octave code at the end.

Figure 6.13(c) shows the single quadratic element mesh of the given tapered bar.
The stiffness matrices of a quadratic element is computed as follows.
Z L
k = BT · D · B A · dx
0
Z L
= E· BT · B ((6 + 2x) · 10−5 ) dx
0

The strain–displacement matrix B is given earlier in Equation (6.16). The stiff-


ness matrix is thus obtained to be as follows.

 
24 −28 4
106  
K= −28 64 −36
 
3  
4 −36 32

Given in line #47–62 of the Scilab/Octave code at the end.

This matrix is already the assembled stiffness matrix of the given bar; the load
vector for the three nodes is as given in the previous case [R, 0, 80, 000]T . Applying
the boundary condition that d1 = 0, the solution is as follows.
#−1 "
−36
" # " # " #
d2 64 0 0.01149
−6
= 3 × 10 · · = m
d3 −36 32 80, 000 0.02043

Given in line #65 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
342 Matrix Structural Analysis and the Finite Element Methods

·10−2

2 Exact
Two Linear FEs
One Quadratic FE

1.5
Displacement u (m)

0.5

0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Length x (m)

FIGURE 6.14 Plot of Exact and FEM Displacement Solutions.

The displacement function over the tapered bar for this case is thus obtained as
follows.
 
0
    3x(10 − x)
u = N1 N2 N3 · 0.01143 =
2350
0.02032

Given in line #68 of the Scilab/Octave code at the end.

Graphs of the three results is shown in Figure 6.14.

Given in line #73–84 of the Scilab/Octave code at the end.

Figure 6.15 shows the stress diagrams in the bar for the three cases.

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 343

Exact
Stress σ × 1000 MPa

Two Linear
1.2
One Quadratic

0.8

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2


Length x (m)

FIGURE 6.15 Stress Plot for the Three Cases.

Given in line #71 of the Scilab/Octave code at the end.

(b)ii. Using similar approach used in the above solution, the stiffness matrices
for the eight linear and four quadratic elements are obtained as shown in the follow-
ing tables.

Eight Linear Elements


Member

Member

x1 x2 le ki x1 x2 le ki
−25 −29
" # " #
L L 25 2L 3L L 29
1 0 3
8 8 −25 25 8 8 8 −29 29
27 −27 31 −31
" # " #
L 2L L 3L 4L L
2 4
8 8 8 −27 27 8 8 8 −31 31
Member

Member

x1 x2 le ki x1 x2 le ki
−33 −37
" # " #
4L 5L L 33 6L 7L 37
5 7 0
8 8 8 −33 33 8 8 −37 37
35 −35 −39
" # " #
5L 6L L 7L L 39
6 8 L
8 8 8 −35 35 8 8 −39 39

@seismicisolation
@seismicisolation
344 Matrix Structural Analysis and the Finite Element Methods

The assembled stiffness matrix becomes:


 
25 −25 0 0 0 0 0 0 0
 
−25 52 −27 0 0 0 0 0
0 
 
 0 −27 56 −29 0 0 0 0 0 
 
 
 0
 0 −29 60 −31 0 0 0 0 

K = 106 · 
 
 0 0 0 −31 64 −33 0 0 0 

−33 68 −35
 
 0 0 0 0 0 0 
 
 0 0 0 0 0 −35 72 −37 0 
 
 
 0
 0 0 0 0 0 −37 76 −39
0 0 0 0 0 0 0 −39 39

Given in line #88–95 of the Scilab/Octave code at the end.

The nodal load vector is:


 
R
 

 0 

0 
 

 

 0 

 
A=
 0 
N
 
 0 
 
0 
 

 

 0 

80, 000

Applying the boundary condition that d1 = 0, the solution is as given below.


   
d2 3.20
  
 6.16 

d3 
   
d   8.92 
 4  
   
d5  11.50
  = 10−3 ·  m
   
d6  13.93
   
d7  16.21
   
   
d  18.37
 8  
d9 20.43

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 345

Given in line #100 of the Scilab/Octave code at the end.

Four Quadratic Elements

Member x1 x2 x3 le ki
 
87 −100 13
L L L 106  
1 0 · −100 208 −108
 
8 4 4 3  
13 −108 95
 
101 −116 15
L 3L L L 6
10   
2 · −116 240 −124

4 8 2 4 3  
15 −124 109
 
115 −132 17
L 5L 3L L 106  
3 · −132 272 −140
 
2 8 4 4 3  
17 −140 123
 
129 −148 19
3L 7L L 106  
4 L · −148 304 −156
 
4 8 4 3  
19 −156 137

The assembled stiffness matrix becomes:


 
87 −100 13 0 0 0 0 0 0
 
−100 208 −108 0 0 0 0 0 0 
 
 13 −108 196 −116 15 0 0 0 0 
 
 
 0 0 −116 240 −124 0 0 0 0 
106 
 

K= · 0 0 15 −124 224 −132 17 0 0 
3  
−132 −140
 
 0 0 0 0 272 0 0 
 
 0 0 0 0 17 −140 252 −148 19 
 
 
 0
 0 0 0 0 0 −148 304 −156
0 0 0 0 0 0 19 −156 137

Given in line #103–121 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
346 Matrix Structural Analysis and the Finite Element Methods

The structure nodal load vector is given by


 
R
 

 0 

0
 
 
 

 0 

 
A=  0 N

 
 0 
 
0
 
 
 

 0 

80, 000

Applying the boundary condition that d1 = 0, the solution is as given below.


   
d2 3.20
  
 6.17 

d3 
   
d   8.93 
 4  
   
d5  11.51
−3 
  = 10 ·  m
  
d6  13.93
   
d7  16.22
   
   
d  18.38
 8  
d9 20.43

Given in line #126 of the Scilab/Octave code at the end.

Summary of the eight linear elements and four quadratic elements solutions com-
pared to the exact solution (in mm) is as shown the following table.

x 0 0.25 0.5 0.75 1 1.25 1.5 1.75 2


Exact 0 3.203 6.166 8.926 11.507 13.932 16.219 18.381 20.433
Linear 0 3.2 6.163 8.922 11.502 13.927 16.212 18.374 20.426
Quadratic 0 3.202 6.166 8.926 11.507 13.932 16.219 18.381 20.433

This result shows that as the number of finite elements used in the analysis is
higher, the FE result approaches the exact result; similarly, the higher the order of
the element (quadratic instead of linear), the better the approximation.

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 347

The corresponding Octave4 code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 %% Example 6.2 - Tappered 1D Bar Analysis
2 %% 1D Finite Element Method
3 clear, clc
4 warning("off")
5 %% The Symbolic package in Octave is used
6 %% to perform calculus operations like
7 %% differentiation and integration.
8

9 pkg load symbolic


10 syms x real
11

12 P = 80000; %% in N
13 E = 100e9; %% in N/m2
14 L = 2; %% in m
15

16 s = [1 -1;-1 1];
17 A = (6 + 2*x)*1e-5 %% in m2
18 % (a) %%%%%%%%%%%%%%%%%%%%%%%%%%%
19 % Exact solution
20 u = log(1+x/3)/25;
21

22 stress = (E/(25*x+75))/1e6 %% in MPa


23

24 % (b) %%%%%%%%%%%%%%%%%%%%%%%%%%%
25 % 2 Linear elements
26 le = L/2;
27 k1 = double(int(A,x,0,le)*E/le*s); %% Element-1
28 k2 = double(int(A,x,le,2*le)*E/le*s); %% Element-2
29

30 %% Assembling the structure stiffness matrix


31 K = zeros(3,3);
32 K(1:2,1:2) = k1;
33 K(2:3,2:3) = K(2:3,2:3) + k2;
34

35 D1 = inv(K(2:3,2:3)) * [0;P]
36 le = 1;
37 u1 = x/le*D1(1)
4 This example uses the Symbolic package to perform differentiation and integration. Scilab doesn’t

have this kind of Computer Algebra System (CAS), hence in Scilab differentiation and integration may
need to be performed manually.

@seismicisolation
@seismicisolation
348 Matrix Structural Analysis and the Finite Element Methods

38 u2 = [(L-x)/le (x-le)/le]*D1
39

40 % Stresses in the two elements


41 stress1 = E*diff(u1,x)/1e6
42 stress2 = E*diff(u2,x)/1e6
43

44 % Single Quadratic element


45 le = L
46

47 x1 = 0; x2 = L/2; x3 = L;
48 % Shape function for 3-noded (quadratic) bar element;
49 N(1) = (x - x2)/(x1 - x2)*(x - x3)/(x1 - x3);
50 N(2) = (x - x1)/(x2 - x1)*(x - x3)/(x2 - x3);
51 N(3) = (x - x1)/(x3 - x1)*(x - x2)/(x3 - x2);
52

53 expand (N);
54

55 %% Strain-disp. matrix of the 3-noded element


56 B = diff(N,x);
57

58 % Expression to be integrated
59 EXPR = B'*E*B*A;
60

61 % Integrate to get the stiffness of 3-noded element;


62 K2 = double(int(EXPR,x,0,le))
63

64 % Solving for the nodal displacements


65 D2 = inv(K2(2:3,2:3)) * [0;P]
66

67 % Displacement function over the element


68 u3nd = N*[0;D2]
69

70 % Stress over the element


71 stress3nd = factor(E*B*u3nd)/1e6
72

73 X = [0;L/2;L]; % x-array
74 D_exact = log(1+X./3)/25;
75

76 % Plot Exact (u), D1, and D2


77 plot(X,D_exact,'r',X,[0;D1],':k', ...
78 X,[0;D2],'--g');
79 xlabel('Length (m)',"fontsize", 18);
80 ylabel('Displacement (m)',"fontsize", 18);
81 set (gca, "xaxislocation", "origin");
82 % gets the current axes

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 349

83 legend('Exact Solution','2 Linear FEs', ...


84 '1 Quadratic FE')
85

86 % (c) %%%%%%%%%%%%%%%%%%%%%%%%%%%
87 % 8 Linear elements
88 K8 = zeros(9);
89 le = L/8;
90 for i=1:8
91 b = i*le; a = b - le;
92 ke = double(int(A,x,a,b))*E/le^2*s;
93 K8(i:i+1,i:i+1) = K8(i:i+1,i:i+1) + ke;
94 disp(ke/1e6);
95 endfor
96

97 disp(K8/1e6)
98

99 % The nodal displacements


100 D8 = inv(K8(2:9,2:9))*[0;0;0;0;0;0;0;P]
101

102 % 4 Quadratic elements


103 K4 = zeros(9);
104 le = L/4;
105 for i=1:4
106 b = i*le; a = b - le;
107 x1 = a; x2 = (a+b)/2; x3 = b;
108 % Shape function for 3-noded (quadratic) element;
109 N(1) = (x - x2)/(x1 - x2)* (x - x3)/(x1 - x3);
110 N(2) = (x - x1)/(x2 - x1)* (x - x3)/(x2 - x3);
111 N(3) = (x - x1)/(x3 - x1)* (x - x2)/(x3 - x2);
112

113 B = diff(N,x);
114

115 Expr = E*B'*B*A;


116

117 ke = double(int(Expr,x,a,b));
118 j1 = 2*i-1; j2 = 2*i+1;
119 K4(j1:j2,j1:j2) = K4(j1:j2,j1:j2) + ke;
120 disp(3*ke/1e6);
121 endfor
122

123 disp(K4/1e6)
124

125 % Nodal displacements


126 D4 = inv(K4(2:9,2:9))*[0;0;0;0;0;0;0;P]
127

@seismicisolation
@seismicisolation
350 Matrix Structural Analysis and the Finite Element Methods

128 dx = L/8; % increment


129 X = 0:dx:L; % x-array
130 D_exact = log(1+X./3)/25;
131

132 disp("Press a key to continue...")


133 pause
134 % Plot D8, D4 and Exact
135 plot(X,D_exact,'r',X,[0;D8],':k','linewidth',2, ...
136 X,[0;D4],'--c','linewidth',2);
137 xlabel('Length (m)',"fontsize", 18);
138 ylabel('Displacement (m)',"fontsize", 18);
139 set (gca, "xaxislocation", "origin");
140 % gets the current axes
141 legend('Exact Solution','8 Linear Elements', ...
142 '4 Quadratic Elements')
143

144 %% END: ........... Example 6.2

6.7.3 BEAM ELEMENTS


A spatial beam element is a bar-like member designed to resist a combination of
actions such as bending, transverse shears, axial tension or compression, and possibly
torsion. A beam is prismatic if it is straight and its cross section is constant. A plane
beam primarily resists transverse loading on a specified longitudinal plane, which
causes bending of the beam.
In the analysis of beams, different simplifying theories are employed. The Euler-
Bernoulli’s beam theory, also known as the elastic beam theory is based on the fol-
lowing assumptions:
• Cross-sections that are plane and normal to the longitudinal axis remain
plane and normal to it after deformation,
• Shear deformations are neglected,
• Beam deflections are small.
A plane beam element has a total of four unknown displacement components
(transverse displacements – d1 and d3 , and rotation – d2 and d4 ) at both of its nodes;
see Figure 6.16. The shape function of a beam element can not be derived using the
Lagrange polynomial function provided in Equation (6.9).
To derive the shape functions, let’s assume the elastic curve (displaced shape of
the beam) is represented by a polynomial function having four unknown constants
to be determined. Accordingly, the vertical displacement v of the beam and its cor-
responding slope θ are given as follows.

v = a1 + a2 · x + a3 · x2 + a4 · x3
(6.17)
dv
θ = = a2 + 2a3 · x + 3a4 · x2
dx

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 351

The following matrix relation is obtained using the four known-unknowns (v1 θ1
at x = 0 and v2 θ2 at x = L).
     
1 0 0 0 a1 v1
 
0 1 0 0   a  θ 
  

2
  2  1
3 ×  =  
1 L L L

  a3   v2 
 
0 1 2·L 3·L 2
a4 θ2
Solving this equation for a1 to a4 in terms of the known-unknowns, we obtain
the following coefficients.
   v1

a1
   
   θ1 
a2    

  
  =  3v 2θ1 3v2 θ2 

1
a3  − 2 − + 2− 
  
   L L L L

  
2v1 θ1 2v2 θ2 
a4 − + −
L3 L2 L3 L2
Back substituting this into 6.17 and rearranging, we get the expression for v in
terms of the nodal displacements v1 , θ1 , v2 and θ2 as follows.

3v1 2θ1 3v2 θ2 2 2v1 θ1 2v2 θ2


v = v1 + θ1 · x + (− − + 2 − ) · x + ( 3 − 2 + 3 − 2 ) · x3 (6.18)
L2 L L L L L L L
Since u = N × d, and recalling one of the properties of shape functions that states
Ni = 1 at DOF i and Ni = 0 at other DOFs, the shape functions for the beam element
are finally obtained from 6.18. N1 is found by setting the values v1 = 1 and θ1 = v2 =
θ2 = 0; and for N2 , set θ1 = 1 and all others equal to 0, etc., as shown below.

FIGURE 6.16 Beam Element.

@seismicisolation
@seismicisolation
352 Matrix Structural Analysis and the Finite Element Methods

FIGURE 6.17 Shape Functions of a Beam Element.

   3x2 2x3

N1 1 − +
  
   L2 L3 

2x2 x3 
    
N2  
   x− + 2
L L 
 = (6.19)
   
   3x2 2x3 
N3   −
   L2 − L3 

   

  
x 2 3
x 
N4 − + 2
L L
The strain displacement matrix B of a beam element is derived as follows.

dv
u = −y ·
dx
du
εx =
dx
d2v
= −y ·
dx2
ε is thus given by the 2nd derivative of the shape functions as shown below.

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 353

d2v
B =
dx2
1
B = [(12x − 6L) L(6x − 4L) (6L − 12x) L(6x − 2L)]
L3
The stiffness matrix of a beam element is obtained to be as given in Equation
(6.20), which is identical to the one given in Equation (4.4) earlier in Chapter 4.
Z L
k = BT · (EI) · B dx
0
 
12EI 6EI 12EI 6EI
 L3 − 3
 L2 L L2 
 
 6EI 4EI 6EI 2EI 


 (6.20)
 L2 L2
 
L L 
= 



 12EI 6EI 12EI 6EI 
− − − 2
 L3 L2 L3 L 
 
 
 6EI 2EI 6EI 4EI 

L2 L L2 L

6.7.4 DSM AS A SPECIAL CASE OF THE FEM


In the previous treatment of the DSM in Chapter 4, the elements were assumed to
be ‘naturally discretized.’ This means that the nodal locations are well identified as
being either supports, points where loads are applied or member properties change.
For this reason, the DSM is considered to be a special case of the FEM, which is
dependent on a discretized structure. The results obtained according to these nodal
locations do not provide a full picture of what happens within the member. For ex-
ample, the location and magnitude of maximum responses to the given action require
further analysis.
Using the finite element method principle, “artificial” additional nodes could be
introduced to have further results of interest within each member, as demonstrated in
Example 6.3.
Example 6.3 Analyze a simply supported beam of span length 20 ft and carrying a
uniformly distributed load of 4 k/ft. Assume the modulus of elasticity of the member
is 16,000 ksi and its moment of inertia is 552 in4 .

SOLUTION
The analytical solution shows that the support reactions, mid-span (max) deflection
and the joint rotations at the supports are computed using the appropriate equations
as follows.

@seismicisolation
@seismicisolation
354 Matrix Structural Analysis and the Finite Element Methods

Support reaction is:


w×L
RA = RB = = 40k
2
Bending moment at mid-span:
w · L2
Mmax = − = 200k f t (downward)
8
Mid-span deflection:
5 · w · L4
ymax = − = −1.630435 in (downward)
384 · EI
Rotations at the two supports are found to be:
w · L3
θA = −θB = − = −0.021739 rad
24 · EI
The numerical solution using the finite element method is dependent on the addi-
tional nodes introduced within the element. If one node is inserted at the center, the
beam will have three nodes and each of the two elements having a length of 0.5 L,
will have an identical stiffness matrix computed using Equation (6.20), as shown be-
low.
 
61.33 3680 −61.33 3680
3680 294400 −3680 147200 
 

s1 = s2 =   −61.33 −3680

 61.33 −3680  
3680 147200 −3680 294400
The assembled structure stiffness matrix S will be a 6 × 6 matrix given in the
equation below.
61.33 3680 −61.33 3680 0 0
 

 3680 294400 −3680 147200 0 0 
 
 −61.33 −3680 122.67 0 −61.33 3680 
S=
 


 3680 147200 0 588800 −3680 147200 

0 0 −61.33 −3680 61.33 −3680 
 

0 0 3680 147200 −3680 294400
Applying the two boundary conditions d1 = d5 = 0 for the vertical displacements
at the two supports, the modified stiffness matrix reduces to a 4 × 4 matrix given be-
low.
 
294, 400 −3680 147, 200 0
 −3680 122.67 0 3680 
 
Sjj =  
 147, 200 0 588, 800 147, 200  
0 3680 147, 200 294, 400

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 355

The nodal load vector at the free joints A j is obtained from equivalent nodal
loads as given below.
k in
 
−400
 −40 
  k
Aj =  

 0  k in
400 k in

The following results are obtained by solving the modified stiffness equation S j j ×
D j = A j for the unknown displacements D j .
   
d2 −0.021739 rad
d3   −1.630435  in
   
Dj =   = 
   
d4   0  rad

   
d6 0.021739 rad

The forces in member 1 are computed using Am = s1 × D1 + AFm as shown below.


    
0 200

61.33 3680 −61.33 3680
  −0.021739  
  400 

3680 294, 400 −3680 147, 200  


Am1 =  × 
+
  
−1.630435 200
 −61.33 
 −3680 61.33 −3680  
  
 
 

3680 147, 200 −3680 294, 400 0 −400

 
40.00 kips
 
 0.00  kips in
=
 
0.00  kips


 
2400.00 kips in

The numerical solution found using the finite element method is exactly identi-
cal to the analytical one. If additional intermediate results are required, more node
shall be inserted as necessary and the analysis is performed in the same manner as
demonstrated here.

The corresponding Scilab code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 // Example 6.3 - Beam Structure
2 // Direct Stiffness Method
3 clc; clear
4 // Common units for analysis: Force in kip, Length in in

@seismicisolation
@seismicisolation
356 Matrix Structural Analysis and the Finite Element Methods

6 // Given parameters and constants in appropriate units:


7

8 // Prperties E: k-in2; I: in^4


9 E = 16000; I = 552;
10 EI = E*I;
11

12 // Length, in
13 L = 20*12;
14

15 // Applied loading, in k/in


16 w = -4/12;
17

18 //////////////////////////////////////////////////
19 //// Analytical solution
20 Mmax = w*L^2/8;
21 ymax = 5*w*L^4/(384*EI);
22 angA = w*L^3/(24*EI);
23 //////////////////////////////////////////////////
24

25 // Numner of elements for FE analysis


26 N = 2;
27

28 // A Function to computing beam element stiffness matrix


29 function [s, vf, mf] = getStiff(le, EI, w)
30 s = [12/le^3 6/le^2 -12/le^3 6/le^2
31 6/le^2 4/le -6/le^2 2/le
32 -12/le^3 -6/le^2 12/le^3 -6/le^2
33 6/le^2 2/le -6/le^2 4/le]*EI;
34 // Fixed-end actions from loading and support settlement
35 vf = w *le;
36 mf = w*le^2/12;
37 disp('Element stiffness, s');
38 disp(s);
39 end
40

41 // Assemble and solve


42 // Assembling Global stiffness matrix of the beam
43 dim = 2*(N+1)
44 S = zeros(dim,dim);
45

46 // Stiffness matrix for an elements, fixed-end actions as well


47 [s, vf, mf] = getStiff(L/N, EI, w);
48

49 // Nodal actions (Equivalent nodal loads

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 357

50 Aj = zeros(2*N,1);
51

52 // Assembling structure stiffness matrix and load vector


53 for i=1:N
54 S(2*i-1:2*i+2,2*i-1:2*i+2) = ...
55 S(2*i-1:2*i+2,2*i-1:2*i+2) + s;
56 Aj(2*i) = vf;
57 end
58 disp('Assembled Structure stiffness, S');
59 disp(S);
60

61 // Restrained DOFs; only the supports at the ends


62 res = [2*N+1 1];
63 count = length(res);
64 // Extract Sjj matrix from S eliminating rows and columns
65 Sjj = S; // Duplicate S into Sjj
66 for i=1:count
67 j = res(i);
68 Sjj(j,:) = []; // Delete the row j
69 Sjj(:,j) = []; // Delete the column j
70 end
71 disp('Modified Structure stiffness, Sjj');
72 disp(Sjj)
73 // Support moments using equivalent nodal load
74 Aj(1) = mf; Aj(2*N) = -mf;
75 disp('Load vector, Aj')
76 disp(Aj)
77

78 // Nodal displacements of the beam are


79 Dj = inv(Sjj)*Aj;
80

81 disp('Analytical, ymax, angA');


82 disp([ymax, angA]) // Analytical solution
83 disp('Finite element, ymax, angA');
84 disp([min(Dj), Dj(1)]) // FE Result
85

86 // END: ........... Example 6.3

6.8 PROBLEMS

6.1 Like a regular polygon, a regular “Polyparab” is defined as a series of


equal parabolic segments arranged to form a closed region that fits a circle. Suppose
the circumference of a unit circle (i.e., the value of pi) is to be approximated by a
regular Polyparab. How many such segments would be required to approximate the

@seismicisolation
@seismicisolation
358 Matrix Structural Analysis and the Finite Element Methods

FIGURE 6.18 Problems Set 6.

value of π up to 10−6 accuracy? Note that a polyparab segment intersects with the
circle at three locations (at its ends and the center of the segment).
6.2 The tapered bar shown in Figure 6.18 is subjected to only an axial force P at
the free end. Compute and compare the different displacement solutions based on the
following cases.
• Derive the governing differential equation (SF) and find the analytical so-
lution (uexact )
• Use the FEM to determine a numerical solution by dividing the bar into
five equal segments (finite elements) respectively as follows:
• Two-noded five elements (2N5)
• Three-noded five elements (3N5), respectively
2
Also compute the TPE for each of the three cases. Use L = 2.5 m, A = 5 − 2x L cm2 ,
E = 200 GPa, P = 180 kN; note that x is measured to the right from the support. (FPS:
2 2
L = 7.5 ft, A = 2 − 0.75x
L in , E = 30,000 ksi, P = 40 kips.)

6.3 Consider the tapered bar given in Problem 6.2. Solve the problem if a variable
distributed load q = 0.6(x) kips/ft is acting instead of the point load P. Use L = 7.5

@seismicisolation
@seismicisolation
Introduction and 1D Finite Element Analysis 359
2
ft, A = 2 − 0.75x
L in2 , E = 29,000 ksi. Note that x is measured to the right from the
2
support. (SI: L = 2.5 m, A = 5 − 2xL cm2 , E = 200 GPa and q = 26(x) kN/m.)
6.4 Consider the tapered beam shown in Figure 6.18(c), which has a constant mo-
ment of inertia E and width b while the depth reduces from 2 h at node 1 to h at node
2. Determine the stiffness matrix of the beam using Equation (6.10); note that the
shape function is provided in Equation (6.19). Provide your solution in terms of E,
L, b, and h.
6.5 For the tapered beam provided in Problem 6.5c, consider node 1 is fixed while
an upward force of P is applied at node 2. Determine the exact displacement and
rotation at node 2 and compare these with the result obtained using the stiffness
matrix derived in Problem 6.5. Take L = 2.5 m, h = 5 cm, b = 5 cm and E = 15 GPa.
(FPS: L = 8 ft, h = 2 in, b = 2 in and E = 2200 ksi.)
6.6 For the fixed beam in Figure 6.18d subjected to the given triangular loading,
determine the location and magnitude of the maximum vertical displacement using
the finite element method (use a mesh of elements and convert the load on each
element into equivalent nodal load). How many equal-sized beam elements would be
required to bring down the error below 1e−3? Use w = 1.1 k/ft, L = 9 ft, E = 1450
ksi and I = 500 in4 . (SI: w = 15 kN/m, L = 3 m, E = 10 GPa and I = 300e6 mm4 .)

6.7 Analyze the fixed beam in Problem 6.6 using the finite element method and de-
termine the support reactions using two, four and eight elements.
6.8 Analyze the simply supported beam given in Figure 6.18e using the finite element
method. Use only the five elements as shown in the figure. Identify the node corre-
sponding to the highest vertical displacement and compare the result with the exact
location of maximum vertical displacement. Take w1 = 10 kN/m, w2 = 15 kN/m, E =
110 GPa, L = 6 m, I = 15e6 mm4 . (FPS: w1 = 32 kips/ft, w2 = 45 kips/ft, E = 16,000
ksi, L = 18 ft, I = 2500 in4 .)
6.9 Analyze the cantilever curved member given in Figure 6.18f using the finite
element method and determine the displacements along 1, 2 and 3 for only two, four
and eight elements. Compare the analysis results with the exact values. Note that the
curve has a radius of R and subtends a 90o angle. Use th following data: p1 = 20
kips, p2 = 45 kips, m3 = 10 kip-ft, E = 20,000 ksi, R = 10 ft, I = 1500 in4 . (SI: p1 =
80 kN, p2 = 200 kN, m3 = 15 kN-m, E = 140 GPa, R = 3 m, I = 620e6 mm4 .)
6.10 A three-noded (quadratic) bar element with a length L and constant axial rigid-
ity AE has displaced of 0.1, 0.02 and −0.2 at nodes 1, 2 and 3, respectively. Assuming
the origin of the coordinate system is at node 1 and the middle node is at the center,
determine the displacement equation u over the element in terms of x and L. Also,
compute the member forces at the three nodes in terms of AE, x and L.
6.11 A beam element having a length L and constant flexural rigidity EI has under-
gone the nodal displacement shown in the table below. Assuming the origin of the

@seismicisolation
@seismicisolation
360 Matrix Structural Analysis and the Finite Element Methods

coordinate system is at node 1, determine the displacement equation u over the ele-
ment for each case in terms of x and L. Also, determine the displacement and rotation
at the center and the member end actions in terms of EI and L.

Node-1 Node-2
Case
v1 θ1 v2 θ2
1 0.1 0 0.2 0
2 0.1 −0.002 −0.2 0.001
3 0 .0005 −0.1 0
4 −0.05 −0.00125 0 0
5 0 0 0.002(L) 0.003

@seismicisolation
@seismicisolation
7 2D Finite Element Analysis
7.1 INTRODUCTION
Two-dimensional (2D) structures are flat plates subjected to in-plane actions. They
are assumed to have very small thickness, t compared to their lateral dimensions.
To describe a point within the plate, two coordinates are required, hence 2D, see
Figure 7.1. It is assumed that the loading and support conditions as well as material
properties are symmetric about the middle surface of the plate. The area at the middle
surface is considered for a finite element analysis, while the value of the thickness
would be used in the computation of the stiffness matrix of the elements [7, 32].
After studying this chapter, the reader will be able to
• Identify and model 2D membrane problems
• Understand the difference between plane-stress and plane strain conditions
• Derive the equations for three-node (constant strain triangle – CST, linear)
triangles
• Use area coordinates to derive element equations of CSTs
• Compute the equivalent nodal loads for surface and body forces
• Derive the equations for axisymmetric three-node triangular elements
• Derive the equations for six-node (LST, quadratic) triangles
• Derive the equations for rectangular and quadrilateral elements
• Perform numerical integration for 1D and 2D elements using Gaussian
quadrature
• Create higher-order (quadratic and cubic) elements
• Use Scilab or Octave to analyze simple 2D problems
• Understand the general steps in using any appropriate software to model
and analyze complex 2D problems
Unlike 1D discrete structures in which the nodes and elements are easily iden-
tifiable (they are “naturally” discretized), 2D structures are continuum structures,
and they don’t usually possess clearly marked nodes and elements. To analyze a 2D
structure in the finite element method, the structure needs to be discretized (meshed)
by creating nodes and elements, as shown in Figure 7.2. In so doing, the continuous
(infinite) displacement over the plate area is approximated by the displacements at
the finite number of nodes created. It is clear that the larger the number of nodes and
elements used in the mesh, the closer the result would be to the continuum solution.
Stress components in 2D structures is composed of the three stresses in the plane
of the plate as shown in Figure 7.3.
The 2D strain components have been shown earlier in Figure 6.4. The stress and
strain vectors in 2D are given by Equation (7.1). In the elastic analysis of 2D struc-

DOI:10.1201/9781003329350-9@seismicisolation
@seismicisolation 361
362 Matrix Structural Analysis and the Finite Element Methods

FIGURE 7.1 Plate Structure.

FIGURE 7.2 2D Plate Structure: (a) Meshed Plate (b) Typical Triangular Element.

FIGURE 7.3 2D Stress Components.

@seismicisolation
@seismicisolation
2D Finite Element Analysis 363

tures, a 3 × 3 constitutive matrix [D] will be used to relate these two vectors such that
[σ ] = [D] × [ε].
   
σx εx
[σ ] =  σy  [ε] =  εy  (7.1)
   

τxy γxy

7.2 PLANE STRESS, PLANE STRAIN AND AXISYMMETRIC PROBLEMS


Definition 7.1 (Plane Stress Problem) Plane stress is a 2D stress state in which all
the stresses directed normallay to the plane of the structure are assumed to be zero;
see Figure 7.4. For the 2D structure in a x–y plane, this implies that the z-stresses
σz = τxz = τyz = 0.
Such structures are physically very thin plates in which the transverse displace-
ment (Poisson’s effect), as a result of in plane deformation, is not negligible (εz ̸= 0).
Accordingly, the relationship between stresses and strains in the plane stress case can
be derived using Equation (6.6) as follows.

1−ν 0 0 0
     
σx ν ν εx
     
σ 
 y
 ν
 1−ν ν 0 0 0 
  εy 
 
     
1−ν 0 0 0   εz 
     
0 E  ν ν
 = × 
     
τ  (1 + ν)(1 − 2ν)  0

1−2ν
 xy   0 0 2 0 0 
 γxy 
 
     
 
0

 0 1−2ν   
0 0 0 2 0  γxz 
     
0 1−2ν
0 0 0 0 0 2
γyz

FIGURE 7.4 Tapering Plate (with a Hole) as Typical Plane Stress Problem.

@seismicisolation
@seismicisolation
364 Matrix Structural Analysis and the Finite Element Methods

The following results are obtained.

ν
εz = − · (εx + εy )
1−ν
E
σx = (εx + ν · εy )
1 − ν2
E
σy = (εy + ν · εx )
1 − ν2
E
τxy = · γxy
2(1 + ν)

Re-writing the last three expressions in matrix form, the constitutive matrix for a
plane stress case is finally obtained as follows.

1 0
 
  ν  
σx εx
   
  E ν 1 0 
 σy  = · ×
  
2
 εy 
  1−ν     
1−ν
 
τxy 0 0 γxy
2
(7.2)
1 0
 
ν
 
E  ν 1 0 
⇒D=  for plane stress.
1 − ν2  
1−ν
 
0 0
2

Definition 7.2 (Plane Strain Problem) Plane strain is a 2D state of strain in which
the strains directed normallay to the plane of the structure are assumed to be zero;
see Figure 7.23. For a 2D structure in the x–y plane, this implies that the z-strains
εz = γxz = γyz = 0.
These structures actually are 3D and they have a larger dimension perpendicular
to the plane of investigation. They are considered as 2D by taking a unit thickness to
represent the 2D behavior of the structure. Following a similar procedure as that of
the plane stress case, the stress—strain relationship in the plane strain case can also
be derived using Equation (6.7).

@seismicisolation
@seismicisolation
2D Finite Element Analysis 365

FIGURE 7.5 2D Section of a Retaining Wall as Typical Plane Strain Problem.

The constitutive matrix for the plane strain case is thus given by Equation (7.3).
1−ν 0
   
  ν
σx εx
   
  E  ν 1−ν 0   

 σy  = · ×
 
εy 
  (1 + ν)(1 − 2ν)    
1 − 2ν

τxy 0 0 γxy
2
(7.3)
1−ν 0
 
ν
 
E  ν 1−ν 0 
⇒D=   for plane strain.
(1 + ν)(1 − 2ν)  
1 − 2ν
 
0 0
2

7.3 CONSTANT STRAIN TRIANGLE


The simplest finite element type for a 2D mesh is a three-nodded triangular element
also known as CST. A CST has six unknown displacements - two displacement com-
ponents at each node, as shown in Figure 7.6.
The displacement function over the three noded triangular element is a plane
function as given in Equation (7.4), with the arbitrary constants ai and bi to be de-
termined.

u = a1 + a2 · x + a3 · y
(7.4)
v= b1 + b2 · x + b3 · y

@seismicisolation
@seismicisolation
366 Matrix Structural Analysis and the Finite Element Methods

FIGURE 7.6 Constant Strain Triangle.

Instead of arbitrary constants a1 , a2 , a3 , b1 , b2 and b3 , the displacement over the


CST at any interior point (x, y) can be written in terms of the known-unknowns and
shape functions N1 , N2 and N3 , as shown below.

u1
 
v 
 1
" # " #  
u N1 0 N2 0 N3 0 u2 
= ·  (7.5)
 
v 0 N1 0 N2 0 N3 v2 
 
u3 
 

v3

Figure 7.7 shows the three shape functions N1 , N2 and N3 as being functions of
a plane surface in x–y.

AREA COORDINATES
The area of a triangle with vertices at (x1 , y1 ), (x2 , y2 ) and (x3 , y3 ) is given by the
following determinant.

1 1 1
1
A = x1 x2 x3 (7.6)
2
y1 y2 y3
For an arbitrary point p(x,y) inside the triangle 1-2-3, the three partial areas
A1 , A2 and A3 are given as follows.

@seismicisolation
@seismicisolation
2D Finite Element Analysis 367

FIGURE 7.7 Shape Functions of a CST Element.

1 1 1 1 1 1 1 1 1
1 1 1
A1 = 2 x x2 x3 A2 = 2 x1 x x3 A3 = 2 x1 x2 x (7.7)
y y2 y3 y1 y y3 y1 y2 y

The area coordinates L1 , L2 and L3 are special area ratios computed for any point
within the triangle. They attain values between 0 and 1 (0 ≤ Li ≤ 1) as computed
using Equation (7.8), in which the areas A1 , A2 and A3 are provided in Figure 7.7.
Area coordinates are used to linearly interpolate values within the triangle, in terms
of the three nodal values.
A1
L1 =
A
A2
L2 = (7.8)
A
A3
L3 =
A
The shape functions for a CST are the same as the area coordinates discussed
above and they are given in Equation (7.9).

1
N1 = L1 = (α1 + β1 x + γ1 y)
2A
1
N2 = L2 = (α2 + β2 x + γ2 y) (7.9)
2A
1
N3 = L3 = (α3 + β3 x + γ3 y)
2A
The coefficients α, β and γ are all constants that depend on the locations of the
three nodes of the CST and is given as follows.

@seismicisolation
@seismicisolation
368 Matrix Structural Analysis and the Finite Element Methods

FIGURE 7.8 Area Coordinates.

α1 = x2 · y3 − y2 · x3 ; β1 = y2 − y3 ; γ1 = x3 − x2
α2 = x3 · y1 − y3 · x1 ; β2 = y3 − y1 ; γ2 = x1 − x3 (7.10)
α3 = x1 · y2 − y1 · x2 ; β3 = y1 − y2 ; γ3 = x2 − x1

Example 7.1 For the three-noded triangular element shown in the Figure 7.9, com-
pute the three shape functions N1 , N2 and N3 at point P. If the area is subjected to
a temperature field such that T1 = 60o F, T2 = 80o F and T3 = 90o F, estimate the
temperature at a point P (50, 40) in.

SOLUTION
The shape functions are computed using the area coordinates as follows.

FIGURE 7.9 Shape Functions for a CST.

@seismicisolation
@seismicisolation
2D Finite Element Analysis 369

Total area of the triangular region and each part areas are:

1 1 1 1 1 1
1 1
A = x1 x2 x3 = 15 70 40 = 1187.5 in2
2 2
y1 y2 y3 20 35 70

1 1 1 1 1 1
1 1
A1 = x p x2 x3 = 50 70 40 = 275 in2
2 2
yp y2 y3 40 35 70

1 1 1 1 1 1
1 1
A2 = x1 xp x3 = 15 50 40 = 625 in2
2 2
y1 yp y3 20 40 70

1 1 1 1 1 1
1 1
A3 = x1 x2 xp = 15 70 50 = 287.5 in2
2 2
y1 y2 yp 20 35 40

Accordingly, the shape functions are:

A1
N1 = = 0.2316
A

A2
N2 = = 0.5263
A

A3
N3 = = 0.2421
A

Given in line #13–23 of the Scilab/Octave code at the end.

The temperature over the area is assumed to vary linearly; hence, the tempera-
ture at point P is obtained as follows.
3
Tp = ∑ Ni · Ti
i=1

=0.2316 × 60 + 0.5263 × 80 + 0.2421 × 90


=77.789o F

Given in line #26–29 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
370 Matrix Structural Analysis and the Finite Element Methods

The corresponding Scilab code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 // Example 7.1 - 2D Element
2 // Constant Strain Triangle
3 clc; clear
4 // Common units for analysis: Force - k, Length - in
5

6 // Coordinates of the three points of the triangle:


7 co = [15, 20; 70 35; 40 70] // inches
8

9 // The given point inside the triangle


10 P = [50 40]
11

12 // Cross-sectional Areas A, in in2


13 A = 0.5*det([1 1 1; (co(:,1))'; (co(:,2))'])
14 // and areas A1, A2 and A3 @ P in in2
15 A1 = 0.5 * det([1 1 1; P(1) (co(2:3,1))'; ...
16 P(2) (co(2:3,2))'])
17 A2 = 0.5 * det([1 1 1; co(1,1) P(1) co(3,1); ...
18 co(1,2) P(2) co(3,2)])
19 A3 = 0.5 * det([1 1 1; (co(1:2,1))' P(1); ...
20 (co(1:2,2))' P(2)])
21

22 // Shape functions of the CST @ P


23 N = [A1 A2 A3]/A
24

25 // Value to be interpolated is temperature in oF


26 T = [60; 80; 90] // at the nodes 1,2 and 3
27

28 // The estimated temperature @ P equals


29 Tp = sum(N*T)
30

31 // END: ........... Example 7.1

7.3.1 STIFFNESS MATRIX OF A CST


The stiffness matrix of a three-nodded triangular element can be obtained using
Equation (6.10). To obtain the strain–displacement matrix B containing the partial
derivatives of the shape function, it needs to be computed first.

@seismicisolation
@seismicisolation
2D Finite Element Analysis 371

A version of Equation (6.5) modified for a 2D element is given in Equation (7.11)


below.
 

 
∂x 0
εx 

 " #
  
∂
 u
 εy  =  0 × (7.11)
  
  
 ∂ y
 v
γxy ∂ ∂
∂y ∂x
For a CST element, the partial derivatives of the shape functions are all constants
given as follows.
∂ N1 β1 ∂ N1 γ1
= , =
∂x 2A ∂y 2A
∂ N2 β2 ∂ N2 γ2
= , = (7.12)
∂x 2A ∂y 2A
∂ N3 β3 ∂ N3 γ3
= , =
∂x 2A ∂y 2A
The strain–displacement matrix B for plane stress and plane strain problems is
derived from the following strain expressions.

εx = (β1 · u1 + β2 · u2 + β3 · u3 )/2A
εy = (γ1 · v1 + γ2 · v2 + γ3 · v3 )/2A
γxy = (γ1 · u1 + β1 · v1 + γ2 · u2 + β2 · v2 + γ3 · u3 + β3 · v3 )/2A

which, in matrix form becomes


 
u1
    v 
εx β1 0 β2 0 β3 0  1
1    u2 
 εy  = · 0 0 0 γ3  × 
 
γ1 γ2 
 v2 
2A  
γxy γ1 β1 γ2 β2 γ3 β3 u3 
v3
⇒ [ε] = [B] × [d]
 T
d is the vector of known-unknowns u1 v1 u2 v2 u3 v3 and the B ma-
trix is given in Equation (7.13). The name CST came from this fact of constant strain
expression of the three nodded element.
 
β1 0 β2 0 β3 0
1 
[B] = · 0 0 0 (7.13)

γ1 γ2 γ3 
2A
γ1 β1 γ2 β2 γ3 β3

@seismicisolation
@seismicisolation
372 Matrix Structural Analysis and the Finite Element Methods

The stiffness matrix of a CST under plane stress or plane strain is given by Equa-
tion (7.14).

ZZZ
k = BT · D · B dv
V
ZZ
= BT · D · B (t · dA) (7.14)
A

= BT · D · B · t · A

where: B = Strain–displacement matrix


D = Constitutive matrix of the element
t = Element thickness, assumed constant
A = Area of the CST
ZZ
and (t · dA) = t · A
A

Example 7.2 For the triangular element given in Example 7.1, compute the stiff-
ness matrix for both the plane stress and plane strain cases. Assume t = 0.1in, E =
29,000 ksi and µ = 0.3.

SOLUTION
The area of the triangle was already computed earlier as A = 1187.5 in2 . The strain-
displacement matrix B is computed as shown below.

β1 = y2 − y3 = −35

β2 = y3 − y1 = 50

β3 = y1 − y2 = −15

γ1 = x3 − x2 = −30

γ2 = x1 − x3 = −25

γ3 = x2 − x1 = 55

−35 −15
 
0 50 0 0
1 
B=  0 −30 0 −25 0 55 

2A
−30 −35 −25 50 55 −15

Given in line #13–25 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
2D Finite Element Analysis 373

The constitutive matrix D is computed for both plane stress and plane strain
cases as follows.
For plane stress:

1 0
 
ν  
31.8681 9.5604 0
 
E  ν 1 0 

 = 103 × 

D1 =  9.5604 31.8681 0 

1 − ν2    
1−ν
 
0 0 0 0 11.1538
2

For plane strain:

1−ν 0
 
ν
 
E  ν 1−ν 0 
D2 =  
(1 + ν)(1 − 2ν)  
1 − 2ν
 
0 0
2

 
39.0385 16.7308 0
 
= 103 × 16.7308 39.0385 0 
 
 
0 0 11.1538

Given in line #29–31 of the Scilab/Octave code at the end.

The stiffness matrix in kips/in for the plane stress case is given as follows.

k = BT · D · B · t · A

1291.50 572.37 −1247.47 −220.14 −44.03 −352.23


 

 572.37 1114.34 −120.55 115.31 −451.82 −1229.65 

 
 −1247.47 −120.55 2280.04 −681.39 −1032.57 801.95 
k1 = 
 

 −220.14 115.31 −681.39 1257.95 901.53 −1373.27 
 
 −44.03 −451.82 −1032.57 901.53 1076.60 −449.72 
 

−352.23 −1229.65 801.95 −1373.27 −449.72 2602.91

Using the same equation, the stiffness matrix in kips/in for the plane strain case
is given as follows.

@seismicisolation
@seismicisolation
374 Matrix Structural Analysis and the Finite Element Methods
 
1522.65 770.50 −1577.68 −55.04 55.04 −715.46

 770.50 1284.16 −403.59 256.83 −366.90 −1540.99 

−1577.68 −403.59 2751.77 −917.26 −1174.09 1320.85 
 
k2 = 

−55.04 256.83 −917.26 972.29 −1632.72 

 1375.89
 
 55.04 −366.90 −1174.09 972.29 1119.05 −605.39 
−715.46 −1540.99 1320.85 −1632.72 −605.39 3173.71

Given in line #34–37 of the Scilab/Octave code at the end.

The corresponding Octave code showing the complete solution steps is given in
the listing below.
Scilab/Octave Code
1 % Example 7.2 - 2D Element Stiffness
2 % Constant Strain Triangle
3 clc; clear
4 % Common units for analysis: Force in k, Length in in
5

6 % Coordinates of the three points of the triangle:


7 co = [15, 20; 70 35; 40 70] % in inches
8

9 % Material Properties E in ksi and t in inches


10 E = 29000, nu = 0.3, t = 1/8
11

12 % X-Y coordinates of the three nodes


13 x = co(:,1), y = co(:,2)
14

15 % Cross-sectional Areas A, in in2


16 A = 0.5 * det([1 1 1; x'; y'])
17

18 % beta (b) and gamma (c) coefficients


19 b = [y(2)-y(3) y(3)-y(1) y(1)-y(2)]
20 c = [x(3)-x(2) x(1)-x(3) x(2)-x(1)]
21

22 % Strain displacement matrix


23 B = [b(1) 0 b(2) 0 b(3) 0;
24 0 c(1) 0 c(2) 0 c(3);
25 c(1) b(1) c(2) b(2) c(3) b(3)]/(2*A)
26

27 %Constitutive matrix
28 % plane stress D1,
29 D1=E/(1-nu^2)*[1 nu 0;nu 1 0; 0 0 (1-nu)/2]
30 % plane strain D2

@seismicisolation
@seismicisolation
2D Finite Element Analysis 375

31 D2=E/((1+nu)*(1-2*nu))*[1-nu nu 0;nu 1-nu 0;0 0 (1-2*nu)/2]


32

33 % Stiffness matrix of CST, plane stress case


34 K1 = B'*D1*B*t*A
35

36 % Stiffness matrix of CST, plane strain case


37 K2 = B'*D2*B*t*A
38

39 % END: ........... Example 7.2

Example 7.3 For the thin plate shown in Figure 7.10(a) (i) determine the global
stiffness matrix for the structure; (ii) determine the unknown nodal displacements;
(iii) determine the support reactions; and (iv) compute the stress developed at the
centroid of each triangular element. Use E = 210 GPa, ν = 0.3 and t = 1 mm. Use
the two elements mesh given in Figure 7.10(b).

SOLUTION
The first step would be to mesh the plate into smaller finite elements. Consider the
given two CSTs and the four nodes for this case, as shown in Figure 7.10(b). Global
node numbers 1, 2, 3 and 4 are shown circled, while the local node numbers of each
triangle are shown inside each element.
Accordingly, the element connectivity matrix is given as follows. Note that there
are two DOFs at each node of such 2D elements.

Element Node-1 Node-2 Node-3


1 1 2 3 4 5 6
2 1 2 5 6 7 8

Given in line #16–45 of the Scilab/Octave code at the end.

The stiffness matrix of each element is computed using Equation (7.14) as fol-
lows, to be multiplied by 103 .
Element #1:
1 2 3 4 5 6
−86.54 −34.62
 
86.54 0 34.62 0
1
 

 0 30.29 40.38 −30.29 −40.38 0 2

 
 −86.54 40.38 140.38 −75.00 −53.85 34.62 3
k1 = 
 

 34.62 −30.29 −75.00 184.13 40.38 −153.85 4
 
5
 

 0 −40.38 −53.85 40.38 53.85 0 
6
−34.62 0 34.62 −153.85 0 153.85

@seismicisolation
@seismicisolation
376 Matrix Structural Analysis and the Finite Element Methods

FIGURE 7.10 (a) Rectangular Plate and Loading and (b) Two CST Elements.

and Element #2:

1 2 5 6 7 8
53.85 0 0 −40.38 −53.85 40.38 1
 

 0 153.85 −34.62 0 34.62 −153.85 2

 
 0 −34.62 86.54 0 −86.54 34.62 5
k2 = 
 

 −40.38 0 0 30.29 40.38 −30.29 6
 
 −53.85 34.62 −86.54 40.38 140.38 −75.00 7
 

40.38 −153.85 34.62 −30.29 −75.00 184.13 8

@seismicisolation
@seismicisolation
2D Finite Element Analysis 377

FIGURE 7.11 Nodal Loading and Support Conditions.

The global assembled stiffness matrix K of the plate is an eight by 8 × 8 given


below. The coefficients of Element #1 occupy the first 6 × 6 of K while the shaded
cells indicate the coefficients coming from Element #2.

K = 103
 
140.38 0.00 −86.54 34.62 0.00 −75.00 −53.85 40.38
 0.00 184.13 40.38 −30.29 −75.00 34.62 −153.85 
 
0.00
 
 −86.54 40.38 140.38 −75.00 −53.85 34.62 0.00 0.00 
 
 
 34.62 −30.29 −75.00 184.13 40.38 −153.85 0.00 0.00 
×
 

 0.00 −75.00 −53.85 40.38 140.38 0.00 −86.54 34.62 
 
 −75.00 0.00 34.62 −153.85 0.00 184.13 40.38 −30.29 
 
 
 −53.85 34.62 0.00 0.00 −86.54 40.38 140.38 −75.00 
 
40.38 −153.85 0.00 0.00 34.62 −30.29 −75.00 184.13

Given in line #48–55 of the Scilab/Octave code at the end.

Since the left edge is fixed, the support boundary condition is such that both x and
y displacements at nodes 1 and 4 are zero. The distributed load over the right edge
can be easily converted into concentrated nodal load of magnitude P = (150 MPa ×
600 mm2 )/2 = 45 kN, as shown in Figure 7.11.
Applying the boundary condition, the modified (reduced) stiffness equation of the
plate is given as follows.

@seismicisolation
@seismicisolation
378 Matrix Structural Analysis and the Finite Element Methods
     
45, 000 140.38 −75 −53.85 34.62 u2
 0  −75 184.13 40.38 −153.85  v2 
     
3 

45, 000 = 10 ×  −53.85
  × 
   40.38 140.38 0 
 u3 
 

0 34.62 −153.85 0 184.13 v3

Given in line #58–60 of the Scilab/Octave code at the end.

The nodal displacements of the plate are obtained as follows.

Given in line #63 of the Scilab/Octave code at the end.


   
u2 0.5792
v2   0.1085 
   
 =
u   0.5115  mm

 3  
v3 −0.0182

Given in line #66 of the Scilab/Octave code at the end.

The support reactions can be computed from the loading vector of the structure
AS = K × D, shown below.

     
R1 0 −45
  
0
 
  18.26 

 R2  
     
A j   0.5792   45 
 1    
     
A j2   0.1085   0 
  = K × =  kN
     
A j3   0.5115   45 
     
A j4  −0.0182  0 
     
     
R   0   −45 
 3    
R4 0 −18.26

Given in line #69 of the Scilab/Octave code at the end.

The stresses in the two elements are computed using s = D · B · d of the plate is
given as follows.

@seismicisolation
@seismicisolation
2D Finite Element Analysis 379

Element #1:
−1.25
 
0 1.25 0 0 0
−3 
B1 = 10 ×  0 0 0 −1.67 0 1.67

0 −1.25 −1.67 1.25 1.67 0

0
 

 0 

 
 0.5792 
d1 = 
 

 0.1085 
 
 0.5115 
 

−0.0182

and the stresses are


   
σx 152.45
⇒  σy  = D × B1 × d1 =  1.38  MPa
   

τxy 1
1.84

Element #2:
−1.25
 
0. 0. 1.25 0. 0.
B2 = 10−3 ×  0. −0.1.67 0. 0. 0. 0.1.67
 

−1.67 0. 0. 1.25 0.1.67 − 1.25

0
 

 0 

 
 0.5115 
d2 = 
 

−0.0182
 
0
 
 
0

   
σx 147.54
⇒  σy  = D × B2 × d2 =  44.26  MPa
   

τxy 2
−1.84

@seismicisolation
@seismicisolation
380 Matrix Structural Analysis and the Finite Element Methods

FIGURE 7.12 Symmetrically Meshed Four CST Elements.

Given in line #72–73 of the Scilab/Octave code at the end.

Due to symmetry, it is expected that u2 = u3 and v2 = −v3; but the result shows
slight variation. A much better accuracy will be obtained if the symmetric four-
elements mesh shown in Figure 7.12 is used for the FE analysis.
Mesh refinement improves the result, and Figure 7.13(a) and (b) shows the dis-
placement (u) and the stress (σx ) distribution contour when the plate is meshed into
1024 elements.
The corresponding Scilab code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 // Example 7.3 - 2D Plane stress analysis of plate
2 // Using two CSTs
3 clc; clear
4 // Common units for analysis: Force in N, Length in mm
5

6 // Coordinates of the four corners of the plate:


7 co = [0, 0; 800 0; 800 600; 0 600] // in mm
8

9 // Connectivity matrix, nodes of each element CCW


10 con = [1,2,3;1,3,4]
11

12 // Material Properties E in MPa and t in mm


13 E = 210000, nu = 0.3, t = 1
14

15 // Constitutive matrix plane stress D (N/mm2)


16 D = E/(1-nu^2)*[1 nu 0;nu 1 0; 0 0 (1-nu)/2]

@seismicisolation
@seismicisolation
2D Finite Element Analysis 381

FIGURE 7.13 Displacement u and Stress σx Distribution for 1024 CST Elements.

17

18 // To compute stiffness matrix of a 3-nodded


19 // plane area (2D) element
20 function [k,B] = cstPlaneStiffness(x,y,t,D)
21 // Cross-sectional Areas A, in in2
22 A = 0.5 * det([1 1 1; x'; y'])
23

24 // beta (b) and gamma (c) coefficients


25 b = [y(2)-y(3) y(3)-y(1) y(1)-y(2)]
26 c = [x(3)-x(2) x(1)-x(3) x(2)-x(1)]
27

@seismicisolation
@seismicisolation
382 Matrix Structural Analysis and the Finite Element Methods

28 // Strain displacement matrix


29 B = [b(1) 0 b(2) 0 b(3) 0;
30 0 c(1) 0 c(2) 0 c(3);
31 c(1) b(1) c(2) b(2) c(3) b(3)]/2/A
32

33 // Element stiffness matric


34 k = B'*D*B*t*A
35 endfunction
36

37 // X-Y coordinates of the three nodes for element 1


38 x = co(1:3,1), y = co(1:3,2)
39 // k and B for element 1
40 [k1, B1] = cstPlaneStiffness(x,y,t,D)
41

42 // X-Y coordinates of the three nodes for element 1


43 x = [0;co(3:4,1)], y = [0;co(3:4,2)]
44 // k and B for element 1
45 [k2, B2] = cstPlaneStiffness(x,y,t,D)
46

47 // Assembled stiffness matrix of the plate


48 K = zeros(8,8)
49

50 // Assembling the global stiffness matrix (Posting)


51 K(1:6,1:6) = k1;
52 K(1:2,1:2) = K(1:2,1:2) + k2(1:2,1:2);
53 K(1:2,5:8) = K(1:2,5:8) + k2(1:2,3:6);
54 K(5:8,1:2) = K(5:8,1:2) + k2(3:6,1:2);
55 K(5:8,5:8) = K(5:8,5:8) + k2(3:6,3:6);
56

57 // Applying boundary condition to obtain the modified K


58 Km = K;
59 Km([1,2,7,8],:) = []; // remove rows for DOFs 1,2,7 & 8
60 Km(:,[1,2,7,8]) = []; // remove columns for DOFs 1,2,7 & 8
61

62 // The action vector, from equivalent nodal load


63 Aj = [45000; 0; 45000; 0]
64

65 // Solving the stiffness equation Km x d = A;


66 d = Km\Aj
67

68 // Reactions
69 As = K*[0;0;d;0;0]
70

71 // The stress in the two elements are


72 s1 = D*B1*[0;0;d] // MPa

@seismicisolation
@seismicisolation
2D Finite Element Analysis 383

73 s2 = D*B2*[0;0;d(3:4);0;0]
74

75 // END: ........... Example 7.3

7.4 LINEAR STRAIN TRIANGLE


A linear strain triangle is a triangular element with six nodes and twelve DOFs; see
Figure 7.14. It uses a second-order (quadratic) interpolation function to determine
the displacement within the triangle.
The displacement function over the six node triangular element is a quadratic
function as given in Equation (7.4), with the arbitrary constants ai and bi to be de-
termined.

u = a1 + a2 · x + a3 · y + a4 · x2 + a5 · x · y + a6 · y2
(7.15)
v= b1 + b2 · x + b3 · y + b4 · x2 + b5 · x · y + b6 · y2

The polynomial terms in the displacement field are usually determined from the
Pascal’s triangle shown in Equation (7.16). Accordingly, for the quadratic LST el-
ement, the complete polynomial terms are 1, x, y, x2 , x · y and y2 . The next four
terms shall be included for a cubic element resulting in a 10-terms polynomial for

FIGURE 7.14 A Linear Strain Triangle.

@seismicisolation
@seismicisolation
384 Matrix Structural Analysis and the Finite Element Methods

the displacement function.


Constant (n = 0): 1
↙↘
Linear (n = 1): x y
↙↘ ↙↘
Quadratic (n = 2): x2 x·y y2 (7.16)
↙↘ ↙↘ ↙↘
Cubic (n = 3): x3 x2 · y x · y2 y3
↙↘ ↙↘ ↙↘ ↙↘
Quartic (n = 4): x4 x3 · y x 2 · y2 x · y3 y4

In terms of the known-unknowns, the displacement over the LST at any point (x,
y) within the triangle is given as follows.
 
u1
 v1 
 
 
 u 
 2 
 
 v2 
 
 
 u3 
" # " 
# 
u N1 0 N2 0 N3 0 N4 0 N5 0 N6 0  v3 

=  
v 0 N1 0 N2 0 N3 0 N4 0 N5 0 N6   u4 

 
 v4 
 
 
 u5 
 
 v5 
 
 
 u 
 6 
v6
(7.17)
The quadratic shape functions of the LST are derived using the area coordinates
of Equation (7.8) and the properties of shape functions (Ni = 1 at i and Ni = 0 at all
other nodes j ̸= i). Thus, Equation (7.18) gives the six shape functions in terms of
the area coordinates discussed in the previous section.
N1 = L1 (2 · L1 − 1); N4 = 4 · L1 · L2

N2 = L2 (2 · L2 − 1); N5 = 4 · L2 · L3 (7.18)

N3 = L3 (2 · L3 − 1); N6 = 4 · L1 · L3
All the shape functions are quadratic functions both in x and y, whose first par-
tial derivatives with respect to x or y becomes linear functions. The name linear-

@seismicisolation
@seismicisolation
2D Finite Element Analysis 385

FIGURE 7.15 Rectangular Plate Two LST Elements.

strain-triangle came from this fact since strains are expressed in-terms of the partial
derivatives of the shape functions as given in Equation (7.19).
! ! !
6 ∂ Ni 6 ∂ Ni 6 ∂ Ni ∂ Ni
εx = ∑ · u i εy = ∑ · vi γxy = ∑ · ui + · vi (7.19)
i=1 ∂x i=1 ∂y i=1 ∂y ∂x

The strain–displacement matrix B is a 3 × 12 matrix given by Equation (7.20),


with all the terms being linear functions.
 
∂ N1 ∂ N2 ∂ N3 ∂ N4 ∂ N5 ∂ N6
 ∂x 0 0 0 0 0 0
 ∂x ∂x ∂x ∂x ∂x 

 ∂ N1 ∂ N2 ∂ N3 ∂ N4 ∂ N5 ∂ N6 
[B] = 
 0 0 0 0 0 0 
 ∂y ∂y ∂y ∂y ∂y ∂y 
 ∂ N1 ∂ N1 ∂ N2 ∂ N2 ∂ N3 ∂ N3 ∂ N4 ∂ N4 ∂ N5 ∂ N5 ∂ N6 ∂ N6 
∂y ∂x ∂y ∂x ∂y ∂x ∂y ∂x ∂y ∂x ∂y ∂x
(7.20)

The stiffness matrix of an LST is then given by Equation (7.14) as given below.
ZZ
k=t· BT · D · B dA
A

Example 7.4 For the plate given in Example 7.3 (a) determine the global stiffness
matrix of the plate; (b) determine the unknown nodal displacements; and (c) compute
the stress developed at the centroid of each triangular element. Use two linear strain
triangles as shown in Figure 7.15.

@seismicisolation
@seismicisolation
386 Matrix Structural Analysis and the Finite Element Methods

SOLUTION
As shown in Figure 7.15 the two LSTs the nine node with circled global node numbers
from 1 to 9. Accordingly, the element connectivity matrix is given as follows. Note
that there are two DOFs at each node of such 2D elements.

Element #1 Element #2
Node-1 1 1
Node-2 2 3
Node-3 3 4
Node-4 5 9
Node-5 6 7
Node-6 9 8

To compute the shape functions, the area-coordinates of the triangles need to be


computed first.

Element #1:

1 1 1
1
A = 2 0 800 800 = 240, 000
0 0 600

1 1 1
1
A1 = 2 x 800 800 = 240, 000 − 300 · x − 50 · y
y 0 600

1 1 1
1
A2 = 2 0 x 800 = 300 · x − 400 · y
0 y 600

1 1 1
1
A3 = 2 0 800 x = 400 · y
0 0 y

Given in line #24–31 of the Scilab/Octave code at the end.

The area coordinates are given by:

@seismicisolation
@seismicisolation
2D Finite Element Analysis 387

A1
L1 =
A
A2
L2 =
A
A3
L3 =
A

Given in line #34–36 of the Scilab/Octave code at the end.

The shape functions are then given by the following expressions.

x2 3·x
N1 = L1 · (2L1 − 1) = − +1
320, 000 800
x2 y2 x·y x y
N2 = L2 · (2L2 − 1) = + − − +
320, 000 180, 000 120, 000 800 600
y2 y
N3 = L3 · (2L3 − 1) = −
32, 000 600
x2 x·y x y
N4 = 4 · L1 · L2 =− + + −
160, 000 120, 000 200 150
y2 x·y
N5 = 4 · L2 · L3 =− −
90, 000 120, 000
x·y y
N6 = 4 · L1 · L3 =− +
120, 000 150
∂N ∂N
and required in the strain–displacement matrix B are derived as follows.
∂x ∂y

Given in line #48–49 of the Scilab/Octave code at the end.

∂ N1 x 3
= −
∂x 160, 000 800
∂ N2 x y 1
= − −
∂x 160, 000 120, 000 800
∂ N3
= 0
∂x
∂ N4 x y 1
= − + +
∂x 80, 000 120, 000 200
∂ N5 y
=
∂x 120, 000
∂ N6 y
= −
∂x 120, 000

@seismicisolation
@seismicisolation
388 Matrix Structural Analysis and the Finite Element Methods

and

∂ N1
= 0
∂y
∂ N2 y x 1
= − +
∂y 90, 000 120, 000 600
∂ N3 y 1
= −
∂y 90, 000 600
∂ N4 x 1
= −
∂y 120, 000 150
∂ N5 y x
= − +
∂y 45, 000 120, 000
∂ N6 x 1
= − +
∂y 120, 000 150

Given in line #48–49 of the Scilab/Octave code at the end.

The B matrix for Element #1 becomes a 3 × 12 matrix which is given as follows.


x 15 x y 5

 160 − 4 0 − −
160 120 4
0 0 0

y x 5 y 5
B1 = 10−3 

0 0 0 − + 0 −

 90 120 3 90 3
 x 15 y x 5 x y 5 y 5
0 − − + − − − 0
160 4 90 120 3 160 120 4 90 3

x y y y 
− + +5 0 0 − 0
80 120 120 120

x 20 y x x 20 
0 − 0 − + 0 − +

120 3 45 120 120 3 

x 20 x y y x y x 20 y

− − + +5 − + − + −
120 3 80 120 45 120 120 120 3 120
(7.21)

Given in line #52–55 of the Scilab/Octave code at the end.

The elasticity (constitutive) matrix for a plane stress case is given below.

1 0
 
ν  
3000 900 0
 
E  ν 1 0  1   
D=  = 13 ·  900 3000 0  (7.22)

1 − ν2   
1−ν
 
0 0 0 0 1050
2

@seismicisolation
@seismicisolation
2D Finite Element Analysis 389

Given in line #59 of the Scilab/Octave code at the end.

REMARK: The following is to show the error in computing K at the centroid of


an element, as suggested by Logan [25]. For element #1 centroid is at (1600/3200)
of the triangular, and the strain–displacement matrix B is found to be a simplified
constant matrix shown below.
−1/2400

0 1/2400 0 0 0
Bc =  0 0 0 −1/1800 0 1/1800 · · ·

0 −1/2400 −1/1800 1/2400 1/1800 0

−1/600

0 0 1/600 0 0
0 −1/450 0 0 0 1/450 

−1/450 0 0 1/600 1/450 −1/600

The corresponding stiffness matrix is thus obtained (just like a CST element) us-
ing Equation (7.14), K = BTc · D · Bc · t · A. But the resulting element stiffness matrix,
shown in Equation (7.23), is incorrect.

k1c =

9.62 0 −9.62 3.85 0 −3.85 0 15.38
−3.37 −4.49

 0 3.37 4.49 0 17.95 0

 −9.62 4.49 15.6 −8.33 −5.98 3.85 23.93 −15.38



 3.85 −3.37 −8.33 20.46 4.49 −17.09 −17.95 68.38


 0 −4.49 −5.98 4.49 5.98 0 −23.93 0
 −3.85 0 3.85 −17.09 0 17.09 0 −68.38



 0 17.95 23.93 −17.95 −23.93 0 95.73 0

 15.38
 0 −15.38 68.38 0 −68.38 0 273.5

 −38.46 0 38.46 −15.38 0 15.38 0 −61.54

0 −13.46 −17.95 13.46 17.95 0 −71.79 0



 38.46 −17.95 −62.39 33.33 23.93 −15.38 −95.73 61.54

−15.38 13.46 33.33 −81.84 −17.95 68.38 71.79 −273.5

@seismicisolation
@seismicisolation
390 Matrix Structural Analysis and the Finite Element Methods

−38.46 0 38.46 −15.38
−13.46 −17.95

0 13.46 

38.46 −17.95 −62.39 33.33 


−15.38 13.46 33.33 −81.84 


0 17.95 23.93 −17.95 

15.38 0 −15.38 68.38


 (7.23)
0 −71.79 −95.73 71.79 


−61.54 0 61.54 −273.5 


153.85 0 −153.85 61.54 

0 53.85 71.79 −53.85



−153.85 71.79 249.57 −133.33 

61.54 −53.85 −133.33 327.35

Given in line #52–55 of the Scilab/Octave code at the end.

The correct stiffness matrix of Element #1 is obtained by integrating each term


of the 12 × 12 (BT · D · B · t) expressions within the limits (0 to 0.75x) for y and then
(0 to 800) for x; see Figure 7.16(a).

FIGURE 7.16 Integration Limits for the Two Elements.

@seismicisolation
@seismicisolation
2D Finite Element Analysis
K1 =

 
1 2 3 4 5 6 9 10 11 12 17 18
−11.54 −115.38 −46.15
 
 86.54 0 28.85 0 11.54 46.15 0 0 0 1 
 
0 30.29 −13.46 10.1 13.46 0 53.85 −40.38 0 0 −53.85 0 2 
 

 

 28.85 −13.46 140.38 −75 17.95 −11.54 −115.38 53.85 −71.79 46.15 0 0 3 

 
 −11.54 10.1 −75 184.13 −13.46 51.28 46.15 −40.38 53.85 −205.13 0 0 4 
 
−13.46 −71.79 −53.85
 

 0 13.46 17.95 53.85 0 0 0 53.85 0 5 

11.54 0 −11.54 51.28 0 153.85 0 0 46.15 −205.13 −46.15 0 6 
 

 
 −115.38 53.85 −115.38 46.15 0 0 374.36 −100 0 −100 −143.59 100 9 
 
 

 46.15 −40.38 53.85 −40.38 0 0 −100 491.03 −100 0 100 −410.26 10 

 

 0 0 −71.79 53.85 −71.79 46.15 0 −100 374.36 −100 −230.77 100 11 

0 0 46.15 −205.13 53.85 −205.13 −100 0 −100 491.03 100 −80.77 12 
 

 

 0 −53.85 0 0 0 −46.15 −143.59 100 −230.77 100 374.36 −100 17 

−46.15 0 0 0 −53.85 0 100 −410.26 100 −80.77 −100 491.03 18
(7.24)

391
@seismicisolation
@seismicisolation
392 Matrix Structural Analysis and the Finite Element Methods

Given in line #65–74 of the Scilab/Octave code at the end.

A similar procedure is used to determine the six shape functions and their partial
derivatives with respect to x and y for Element #2. Using these values, the strain-
displacement matrix B2 for Element #2 is given by the following expression.

x 5 x y 5
 0 0 − 0 − + 0
 160 4 160 120 4


B2 = 10−3  0
 y x y 5
−5 0 0 0 + −

 90 120 90 3

 y x 5 x y 5 x y 5
−5 0 0 − − + − − −
90 160 4 120 90 3 160 120 4


y x y y
5− 0 − + 0 −5 0
120 80 120 120




x x x y 20 
0 − 0 0 − + 
120 120 120 45 3 


x y x x y x y 20 y 
5− − + − + −5
120 120 120 80 120 120 45 3 120
(7.25)

Given in line #80 of the Scilab/Octave code at the end.

The stiffness matrix of Element #2 is also obtained by integrating each term of


the 12 × 12 (BT · D · B · t) expressions within the limits (0.75x to 600) for y and then
(0 to 800) for x; see Figure 7.16(b).

@seismicisolation
@seismicisolation
2D Finite Element Analysis
K2 =

 
1 2 5 6 7 8 17 18 13 14 15 16
−13.46 −53.85 −71.79
 
 53.85 0 0 13.46 17.95 0 0 0 53.85 1 
 
0 153.85 11.54 0 −11.54 51.28 −46.15 0 0 0 46.15 −205.13 2 
 

 

 0 11.54 86.54 0 28.85 −11.54 0 −46.15 −115.38 46.15 0 0 3 

 
 13.46
 0 0 30.29 −13.46 10.1 −53.85 0 53.85 −40.38 0 0 4 

−11.54 −13.46 −75 −115.38 −71.79
 
 17.95 28.85 140.38 0 0 53.85 46.15 7 
 
 −13.46 51.28 −11.54 10.1 −75 184.13 0 0 46.15 −40.38 53.85 −205.13 8 
 
 

 0 −46.15 0 −53.85 0 0 374.36 −100 −143.59 100 −230.77 100 17 

 
 −53.85 0 −46.15 0 0 0 −100 491.03 100 −410.26 100 −80.77 18 
 
 

 0 0 −115.38 53.85 −115.38 46.15 −143.59 100 374.36 −100 0 −100 13 

0 0 46.15 −40.38 53.85 −40.38 100 −410.26 −100 491.03 −100 0 14 
 

 
 −71.79 46.15 0 0 −71.79 53.85 −230.77 100 0 −100 374.36 −100 15 
 
53.85 −205.13 0 0 46.15 −205.13 100 −80.77 −100 0 −100 491.03 16
(7.26)

393
@seismicisolation
@seismicisolation
matrix K is obtained as given in Equation (7.27).

394
By “selectively adding” K1 and K2, the 18 × 18 assembled structure stiffness
1 2 3 4 5 6 7 8


 140.38 0 28.85 −11.54 0 25.00 17.95 −13.46

Given in line #83–90 of the Scilab/Octave code at the end.


0 184.13 −13.46 10.10 25.00 0 −11.54 51.28




 28.85 −13.46 140.38 −75.00 17.95 −11.54 0 0


 −11.54 10.10 −75.00 184.13 −13.46 51.28 0 0
−13.46 −11.54

 0 25.00 17.95 140.38 0 28.85

25.00 0 −11.54 51.28 0 184.13 −13.46 10.10

Matrix Structural Analysis and the Finite Element Methods





 17.95 −11.54 0 0 28.85 −13.46 140.38 −75.00


 −13.46 51.28 0 0 −11.54 10.10 −75.00 184.13
−115.38 −115.38

K= 53.85 46.15 0 0 0 0


 46.15 −40.38 53.85 −40.38 0 0 0 0


 0 0 −71.79 53.85 −71.79 46.15 0 0


 0 0 46.15 −205.13 53.85 −205.13 0 0
0 0 0 0 −115.38 53.85 −115.38 46.15




 0 0 0 0 46.15 −40.38 53.85 −40.38


 −71.79 46.15 0 0 0 0 −71.79 53.85


 53.85 −205.13 0 0 0 0 46.15 −205.13
0 −100 0 0 0 −100 0 0


−100 0 0 0 −100 0 0 0
(7.27)

@seismicisolation
@seismicisolation
2D Finite Element Analysis
9 10 11 12 13 14 15 16 17 18

−115.38 46.15 0 0 0 0 −71.79 53.85 0 −100 1 

53.85 −40.38 0 0 0 0 46.15 −205.13 −100 0 2 


−115.38 53.85 −71.79 46.15 0 0 0 0 0 0 3 


46.15 −40.38 53.85 −205.13 0 0 0 0 0 0 4 

−71.79 −115.38 −100

0 0 53.85 46.15 0 0 0 5 

0 0 46.15 −205.13 53.85 −40.38 0 0 −100 0 6 


0 0 0 0 −115.38 53.85 −71.79 46.15 0 0 7 


0 0 0 0 46.15 −40.38 53.85 −205.13 0 0 8 

−100 −100 0 −143.59

374.36 0 0 0 0 100 9 

−100 491.03 −100 0 0 0 0 0 100 −410.26 10 


0 −100 374.36 −100 0 0 0 0 −230.77 100 11 


−100 0 −100 491.03 0 0 0 0 100 −80.77 12 

0 0 0 0 374.36 −100 0 −100 −143.59 100 13 


0 0 0 0 −100 491.03 −100 0 100 −410.26 14 


0 0 0 0 0 −100 374.36 −100 −230.77 100 15 


0 0 0 0 −100 0 −100 491.03 100 −80.77 16 

−143.59 100 −230.77 100 −143.59 100 −230.77 100 748.72 −200 17 

100 −410.26 100 −80.77 100 −410.26 100 −80.77 −200 982.05 18

395
@seismicisolation
@seismicisolation
396 Matrix Structural Analysis and the Finite Element Methods

FIGURE 7.17 Equivalent-Nodal-Load.

Given in line #93–113 of the Scilab/Octave code at the end.

To convert the uniformly distributed load on the face 2–3 into an equivalent nodal
load at the global node numbers 2, 6 and 3, the third part of Equation (6.11) is used
according to the S coordinate shown in Figure 7.17.
The corresponding shape function is derived as follows.
s − s2 s − s3 (s − 300) × (s − 600)
N1 = · =
s1 − s2 s1 − s3 180, 000
s − s1 s − s3 s × (s − 600)
N2 = · =
s2 − s1 s2 − s3 −90, 000
s − s1 s − s2 s × (s − 300)
N3 = · =
s3 − s1 s3 − s2 180, 000

N = [N1 , N2 , N3 ]

Z 600
Performing the integration le f t( N T · q · dsright) for the given load q = 150
0
N/mm, the three equivalent loads are obtained to be:
f1 = A j3 = 15 kN

f2 = A j11 = 60 kN

f3 = A j5 = 15 kN

Given in line #116–123 of the Scilab/Octave code at the end.

Nodes 1, 4 and 8 are restrained, hence the rows and columns corresponding to
DOFs 1, 2, 7, 8, 15 and 16 need to be removed to obtain the modified stiffness matrix
of the structure as shown below.
@seismicisolation
@seismicisolation
2D Finite Element Analysis
K1 =

 
3 4 5 6 9 10 11 12 13 14 17 18
−75 −11.54 −115.38 −71.79
 
 140.38 17.95 53.85 46.15 0 0 0 0 3 
 
−75 184.13 −13.46 51.28 46.15 −40.38 53.85 −205.13 0 0 0 0 4 
 

 

 17.95 −13.46 140.38 0 0 0 −71.79 53.85 −115.38 46.15 0 −100 5 

 
 −11.54 51.28 0 184.13 0 0 46.15 −205.13 53.85 −40.38 −100 0 6 
 
 −115.38 −100 −100 −143.59
 
 46.15 0 0 374.36 0 0 0 100 9 

53.85 −40.38 0 0 −100 491.03 −100 0 0 0 100 −410.26 10 
 

 
 −71.79 53.85 −71.79 46.15 0 −100 374.36 −100 0 0 −230.77 100 11 
 
 

 46.15 −205.13 53.85 −205.13 −100 0 −100 491.03 0 0 100 −80.77 12 

 

 0 0 −115.38 53.85 0 0 0 0 374.36 −100 −143.59 100 13 

0 0 46.15 −40.38 0 0 0 0 −100 491.03 100 −410.26 14 
 

 

 0 0 0 −100 −143.59 100 −230.77 100 −143.59 100 748.72 −200 17 

0 0 −100 0 100 −410.26 100 −80.77 100 −410.26 −200 982.05 18
(7.28)

397
@seismicisolation
@seismicisolation
398 Matrix Structural Analysis and the Finite Element Methods

Given in line #130–134 of the Scilab/Octave code at the end.

Solving for the free joint displacements using D j = inv(Km) × A j gives the fol-
lowing values, all in mm.

All D js o f the Plate Element #1 Element #2


           
D j3 0.567 D1 0 D1 0
           
 D j4   0.086   D2   0   D2   0 
           
 D j5   0.565   D j3   0.567   D j5   0.565 
           
           
 D j6  −0.053  D j4   0.086   D j6  −0.053
           
           
 D j9   0.289   D j5   0.565   D7   0 
           
D j10  0.069   D j6  −0.053  D8   0 
           
 =   =   = 
D j11  0.559   D j9   0.289  D j17  0.270 
           
           
D j12  0.018  D j10  0.069  D j18  0.008 
           
           
D j13  0.270  D j11  0.559  D j13  0.270 
           
D j14 −0.051 D j12  0.018  D j14 −0.051
           
           
D j17  0.270  D j17  0.270   D15   0 
           
D j18 0.008 D j18 0.008 D16 0
(7.29)

Given in line #127, 137–141 of the Scilab/Octave code at the end.

The stresses (σx , σy , τxy ) for each element at their respective nodes are obtained
using the relationship σ = D · B · d, where B is the strain–displacement matrix to be
evaluated using the (x, y) coordinate of each node in Equations (7.21) and (7.25), D
is the constitutive matrix computed in Equation (7.22) and d is the vector of nodal
displacements provided in Equation (7.29); and Table 7.1 summarizes these nodal
stress computation results.

Given in line #144–154 of the Scilab/Octave code at the end.

This result shows that according to the finite element analysis, while displace-
ments must be unique at common nodes, stresses may not be exactly equal at such
nodes, observe the results at global DOFs 1, 3 and 9 in Table 7.1.

The corresponding Octave code showing the complete solution steps is given in
the listing below.

@seismicisolation
@seismicisolation
2D Finite Element Analysis 399

TABLE 7.1
Nodal Stresses of the Two-LSTs Plate
Element #1 Element #2
Global
σx σy τxy Local σx σy τxy Local
1 157.13 9.70 9.14 1 147.93 44.38 8.40 1
2 141.98 −4.51 −6.01 2
3 153.85 −3.53 −0.91 3 151.21 −36.87 4.70 2
4 147.90 44.37 −15.32 3
5 149.56 2.60 1.56 4
6 147.91 −4.02 −3.46 5
7 149.56 3.75 −5.31 5
8 147.91 44.37 −3.46 6
9 155.49 3.09 4.12 6 149.57 3.76 6.55 4

Scilab/Octave Code
1 % Example 7.4 - 2D Plane stress analysis of plate
2 % Using Two Linear Strain Triangles
3 clc
4 clear all
5 warning off
6

7 % Solution uses symbolic computation


8 pkg load symbolic;
9 syms x y real;
10

11 %% Units are in kN and mm


12 E = 210; t = 1; % in kN/mm2, mm
13 nu = 3/10;
14

15 % Connectivity matrix - in terms of DOFs of each element


16 con = [1 2 3 4 5 6 9 10 11 12 17 18;
17 1 2 5 6 7 8 17 18 13 14 15 16];
18

19 % Function to compute strain-displacement matrix B


20 % Given the X-Y coordinates of the six nodes

@seismicisolation
@seismicisolation
400 Matrix Structural Analysis and the Finite Element Methods

21 function B = getB(XY)
22 syms x y real;
23 % Total Area for use in Area coordinates
24 A = det([1 1 1;XY(1,1) XY(2,1) XY(3,1); ...
25 XY(1,2) XY(2,2) XY(3,2)])/2;
26 A1 = det([1 1 sym(1); x XY(2,1) XY(3,1); ...
27 y XY(2,2) XY(3,2)])/2;
28 A2 = det ([1 1 sym(1); XY(1,1) x XY(3,1); ...
29 XY(1,2) y XY(3,2)])/2;
30 A3 = det ([1 1 sym(1); XY(1,1) XY(2,1) x; ...
31 XY(1,2) XY(2,2) y])/2;
32

33 % Area coordinates for CST


34 L1 = A1/A;
35 L2 = A2/A;
36 L3 = A3/A;
37

38 % Shape functions for the quadratic triangular element


39 N(1) = L1*(2*L1-1);
40 N(2) = L2*(2*L2-1);
41 N(3) = L3*(2*L3-1);
42 N(4) = 4*L1*L2;
43 N(5) = 4*L2*L3;
44 N(6) = 4*L1*L3;
45

46 simplify(N);
47 % Partial derivatives
48 Nx = diff(N,x);
49 Ny = diff(N,y);
50

51 % The strain displacement matrix B


52 B = [Nx(1) 0 Nx(2) 0 Nx(3) 0 Nx(4) 0 Nx(5) 0 Nx(6) 0
53 0 Ny(1) 0 Ny(2) 0 Ny(3) 0 Ny(4) 0 Ny(5) 0 Ny(6)
54 Ny(1) Nx(1) Ny(2) Nx(2) Ny(3) Nx(3) ...
55 Ny(4) Nx(4) Ny(5) Nx(5) Ny(6) Nx(6)];
56 endfunction
57

58 % Stiffness matrix, kN/mm2


59 D = sym(E/(1-nu^2)*[1 nu 0;nu 1 0; 0 0 (1-nu)/2]);
60

61 % Coordinates, in mm for Element %1


62 XY1 = [0, 0; 800, 0; 800, 600;
63 400,0 ; 800, 300; 400, 300];
64

65 B1 = getB(XY1);

@seismicisolation
@seismicisolation
2D Finite Element Analysis 401

66 % Integrand for Element %1


67 fun = B1'*D*B1*t;
68

69 % y - Limits
70 y1 = sym(3)*x/4;
71 Int1 = int(int(fun,y,0,y1),x,0,800);
72

73 % Stiffness matrix of the 1st quadratic (6-noded) triangle


74 K1 = double(Int1)
75

76 % Coordinates, in mm for Element %2


77 XY2 = [0, 0; 800, 600; 0, 600;
78 400, 300; 400, 600; 0, 300];
79

80 B2 = getB(XY2);
81

82 % Integrand for Element %1


83 fun = B2'*D*B2*t;
84

85 % y - Limits
86 y1 = sym(3)*x/4;
87 Int1 = int(int(fun,y,y1,600),x,0,800);
88

89 % Stiffness matrix of the 2nd quadratic (6-noded) triangle


90 K2 = double(Int1)
91

92 % Assemble the master stiffness matrix


93 K = zeros(18,18);
94

95 % Assembling Element %1
96 for m = 1:12
97 r = con(1,m);
98 for n = 1:12
99 c = con(1,n);
100 disp([r,c]);
101 K(r, c) = K(r, c) + K1(m,n);
102 endfor;
103 endfor;
104

105 % Assembling Element %2


106 for m = 1:12
107 r = con(2,m);
108 for n = 1:12
109 c = con(2,n);
110 disp([r,c]);

@seismicisolation
@seismicisolation
402 Matrix Structural Analysis and the Finite Element Methods

111 K(r, c) = K(r, c) + K2(m,n);


112 endfor;
113 endfor;
114

115 % Equivalent nodal load for the distributed load


116 syms s real;
117 n_1 = (s-300) * (s-600)/180000;
118 n_2 = s * (s-600)/-90000;
119 n_3 = s * (s-300)/180000;
120 n = [n_1, n_2, n_3] % Quadratic shape function
121 % The distributed loading is
122 q = 150; t = 1; % in MPa and mm
123 F = int((n')*q*t,s,0,600)/1000 % in kN
124

125 % Free Joints: 3 4 5 6 9 10 11 12 13 14 17 18


126 % The load vector corresponding to the Free joints is:
127 Aj = double([F(1) 0 F(3) 0 0 0 F(2) 0 0 0 0 0]');
128

129 % Modified stiffness matrix


130 Km = K
131 res = [1 2 7 8 15 16] % Restrained DOFs
132

133 Km(res,:) = []; % Remove rows


134 Km(:,res) = []; % Remove columns
135

136 % The nodal displacements are found as follows


137 Dj = double(Km\Aj);
138

139 % Displacements of each elements


140 d1 = [0;0;Dj(1:8);Dj(11:12)];
141 d2 = [0;0;Dj(3:4);0;0;Dj(11:12);Dj(9:10);0;0];
142

143 % Stress D*B*d


144 S1 = D*B1*d1*1000;
145 S2 = D*B2*d2*1000;
146 stress1 = zeros(3,6);
147 stress2 = zeros(3,6);
148

149 for i = 1:6


150 Stress1 = double(subs(S1,{x y},{XY1(i,1) XY1(i,2)}));
151 stress1(:,i)=Stress1;
152 Stress2 = double(subs(S2,{x y},{XY2(i,1) XY2(i,2)}));
153 stress2(:,i)=Stress2;
154 endfor;
155

@seismicisolation
@seismicisolation
2D Finite Element Analysis 403

156 [stress1' stress2']


157

158 % END: ........... Example 7.4

7.5 BI-LINEAR RECTANGULAR ELEMENT


A rectangular element is a special case of quadrilateral elements in finite element
analysis, see Figure 7.18. It consists of four nodes and has eight degrees of freedom.
The four shape functions of a rectangular element given in Equation (7.30) are
obtained by product of two linear functions in x and y. That is the reason why such
elements are also called bi-linear rectangular elements.

(a − x)(b − y)
N1 =
4ab
(a + x)(b − y)
N2 =
4ab
(7.30)
(a + x)(b + y)
N3 =
4ab
(a − x)(b + y)
N4 =
4ab
In terms of the known-unknowns, the displacement at any point (x, y) within the
rectangular region is given by 7.31.

FIGURE 7.18 Rectangular Element.

@seismicisolation
@seismicisolation
404 Matrix Structural Analysis and the Finite Element Methods
 
u1
v1 
 

 

 u2 

" # " # 
u N1 0 N2 0 N3 0 N4 0  v2 
= (7.31)
 
 
v 0 N1 0 N2 0 N3 0 N4 
 u3 

v3 
 

 

 u4 

v4

The strain displacement matrix B is also derived as follows.

∂ N1 − (b − y) ∂ N1 − (a − x)
= =
∂x 4ab ∂y 4ab
∂ N2 (b − y) ∂ N2 − (a − x)
= =
∂x 4ab ∂y 4ab
(7.32)
∂ N3 (b + y) ∂ N3 (a + x)
= =
∂x 4ab ∂y 4ab
∂ N4 − (b + y) ∂ N4 (a − x)
= =
∂x 4ab ∂y 4ab

y−b b−y b+y −b − y


 
0 0 0 0
1 
B= 0 x−a 0 −a − x 0 a+x 0 a−x 

4ab

x−a y−b −a − x b−y a+x −b − y
b+y a−x
(7.33)
The stiffness matrix of the rectangular element is then obtained using the same
Equation (7.14) as given below.

ZZ
k=t· BT · D · B dA
A

Example 7.5 For the plate given in Example 7.3, determine the element stiffness
matrix, nodal displacements and the stresses at the center of considering it as a
single rectangular element.

SOLUTION
The rectangular element has four nodes and eight DOFs (two at each node); see
Figure 7.19.

@seismicisolation
@seismicisolation
2D Finite Element Analysis 405

FIGURE 7.19 Plate as a Single Rectangular Element.

The shape functions of the rectangular element are determined using Equation
(7.30) as shown below.
(400 − x)(300 − y)
N1 =
480, 000
(400 + x)(300 − y)
N2 =
480, 000
(400 + x)(300 + y)
N3 =
480, 000
(400 − x)(300 + y)
N4 =
480, 000

Given in line #18–21 of the Scilab/Octave code at the end.

The strain–displacement matrix B is given as follows.


y − 300 300 − y

0 0 300 + y
1 
B= 0 x − 400 0 −400 − x 0 ···
4800

x − 400 y − 300 −400 − x 300 − y 400 + x

−300 − y

0 0
400 + x 0 400 − x 

300 + y 400 − x −300 − y

@seismicisolation
@seismicisolation
406 Matrix Structural Analysis and the Finite Element Methods

Given in line #24–30 of the Scilab/Octave code at the end.

The constitutive matrix D, for a plane stress problem, is given in Equation (6.10).
The stiffness matrix is obtained by integrating each term of the 8 × 8 (BT · D · B · t)
expressions within the limits (−400 to 400) for x and (−300 to 300) for y.

K=
 
93.59 37.50 −39.74 −2.88 −46.79 −37.50 −7.05 2.88
31.09 −37.50 −61.38 −2.88 −92.47 

37.50 122.76 2.88


 

 −39.74 2.88 93.59 −37.50 −7.05 −2.88 −46.79 37.50 

 

 −2.88 31.09 −37.50 122.76 2.88 −92.47 37.50 −61.38 

 

 −46.79 −37.50 −7.05 2.88 93.59 37.50 −39.74 −2.88 

−37.50 −61.38 −2.88 −92.47 37.50 122.76 2.88 31.09 
 

 

 −7.05 −2.88 −46.79 37.50 −39.74 2.88 93.59 −37.50 

2.88 −92.47 37.50 −61.38 −2.88 31.09 −37.50 122.76
(7.34)

Given in line #33–44 of the Scilab/Octave code at the end.

The equivalent nodal load for the uniformly distributed is 150 × 600/2000 = 45,
to be applied at nodes 2 and 3 to the right.
 
45
0
 
⇒ Aj =  45 kN

 
0

Given in line #47–52 of the Scilab/Octave code at the end.

Nodes 1 and 4 are restrained, hence the rows and columns corresponding to
DOFs 1, 2, 7 and 8 are removed to obtain the modified stiffness matrix of the plate
as shown below.
 
93.59 −37.50 −7.05 −2.88
−37.50 122.76 2.88 −92.47
 
Km =   
 −7.05 2.88 93.59 37.50 
−2.88 −92.47 37.50 122.76

@seismicisolation
@seismicisolation
2D Finite Element Analysis 407

Given in line #18–21 of the Scilab/Octave code at the end.

Solving for the nodal displacements using D j = inv(Km) · A j gives the following
values.    
D j1 0.556
D j2  0.089 
   
= (7.35)
D j3  0.556  mm
 
   
D j4 −0.089

Given in line #65 of the Scilab/Octave code at the end.

For all the nodes, the complete structure displacement vector d is given as fol-
lows.  
0

 0 

 
 0.556 
 
 
 0.089 
d=  mm (7.36)
 
 0.556 
 
−0.089
 
 
 0 
 
0

Given in line #68 of the Scilab/Octave code at the end.

The stresses (σx , σy , τxy ) for the element at the center are obtained as given
below using the relationship σ = D · B · d, where B is the strain–displacement matrix
to be evaluated at the center (0, 0), D is the constitutive matrix and d is the complete
vector of nodal displacements provided in Equation (7.36).
   
σx 150.0
 σy  = D × B × d = 13.72 MPa (7.37)
   

τxy 0

Given in line #71–74 of the Scilab/Octave code at the end.

The corresponding Octave code showing the complete solution steps is given in
the listing below.

@seismicisolation
@seismicisolation
408 Matrix Structural Analysis and the Finite Element Methods

Scilab/Octave Code
1 % Example 7.5 - 2D Stress Analysis
2 % Using Rectangular Element
3 clc
4 clear all
5 warning off
6 %% Units are in kN and mm
7 E = 210; t = 1; % in kN/mm2, mm
8 v = 3/10; % nu = 0.3
9

10 % Solution uses symbolic computation


11 pkg load symbolic
12 syms x y real
13

14 % Half dimensions of the rectangle


15 a = 400; b = 300;
16

17 %% The four shape functions


18 N(1) = (a-x)*(b-y)/(4*a*b);
19 N(2) = (a+x)*(b-y)/(4*a*b);
20 N(3) = (a+x)*(b+y)/(4*a*b);
21 N(4) = (a-x)*(b+y)/(4*a*b);
22

23 %% Derivatives of shape functions


24 Nx = diff(N,x);
25 Ny = diff(N,y);
26

27 %% Strain displacement matrix, B (3x8)


28 B = [Nx(1) 0 Nx(2) 0 Nx(3) 0 Nx(4) 0
29 0 Ny(1) 0 Ny(2) 0 Ny(3) 0 Ny(4)
30 Ny(1) Nx(1) Ny(2) Nx(2) Ny(3) Nx(3) Ny(4) Nx(4)];
31

32 %% Constitutive matrix D (plane stress)


33 D = E/(1-v^2)*[1 v 0;v 1 0; 0 0 (1-v)/2];
34

35 %% Determine the stiffness matrix


36 %% Integrand ...
37 INT = simplify(t*B'*D*B);
38 %%
39 %%%% Integrate w.r.t x from -a to a
40 Int1 = int(INT, x, -a, a);
41 %%
42 %%%% Integrate w.r.t y from -b to b
43 %%%% The stiffness matrix

@seismicisolation
@seismicisolation
2D Finite Element Analysis 409

44 K = double(int(Int1, y, -b, b))


45

46 % Equivalent nodal load for the distributed load


47 F = (150*600)/2000 % in kN
48

49 % Restrained DOFs : 1 2 7 8
50 % Free Joints: 3 4 5 6
51 % The load vector corresponding to the Free joints is:
52 Aj = double([F 0 F 0]')
53

54 % Modified stiffness matrix


55 Km = K;
56 res = [1 2 7 8];
57

58 for i=1:length(res)
59 d = sort(res,"descend");
60 Km(d(i),:) = []; % Remove rows
61 Km(:,d(i)) = []; % Remove columns
62 endfor;
63

64 % The nodal displacements are found as follows


65 Dj = double(Km\Aj)
66

67 % Complete Displacements vector of the element


68 d = [0;0;Dj;0;0];
69

70 % Stress D*B*d in N/mm2


71 S = D*B*d*1000;
72

73 % Stresses at the centroid (0,0)


74 Stress = double(subs(S,{x y},{0 0}))
75

76 % END: ........... Example 7.5

7.6 NATURAL COORDINATE & ISOPARAMETRIC REPRESENTATION


Natural Coordinates
For a more general treatment of the finite element method, it is essential to use a
non-dimensional element coordinate system that is different from the global (struc-
ture) coordinate system (X, Y , Z). A natural coordinate system is a local coordinate
system that allows to locate a point within the element using a dimensionless number
between −1 and 1. Referring to Figure 7.20 (a), the 1D element is located between

@seismicisolation
@seismicisolation
410 Matrix Structural Analysis and the Finite Element Methods

FIGURE 7.20 Coordinate Systems: (a) Global CS, (b) Local CS, (c) Natural CS.

Xi and Xj in the global coordinate system X–Y which is used to describe all the nodes
and elements of the structure. A local Cartesian coordinate system x–y is used in Fig-
ure 7.20(b), in which the same element now runs from 0 (at node i) to L (at node j).
In Figure 7.20(c), on the other hand, a natural coordinate system s-t is used such that
the element assumes values −1 and 1 at the two end nodes i and j, respectively.
The natural coordinate system has several advantages; to mention a few, it:
• Enables to describe each element in a mesh using a uniform dimensionless
expression irrespective of the element’s location and size
• Makes the derivation of shape functions simple
• Facilitates numerical integration to simplify computations like the stiffness
matrix and nodal load vector
• Is used to describe elements having any non-orthogonal shapes including
those with curved edges
There is always a clear relationship between the global, local and natural coor-
dinate systems. For the 1D element given in Figure 7.20, noting that (X j –Xi ) is the
element length L, the global and natural coordinate systems are related using the
following expressions.
L 2(X − Xi)
X = Xi + · (s + 1) or s = −1 (7.38)
2 L
The linear shape function for the 1D element in terms of the natural coordinate
is given by:
1−s 1+s
Ni = , Nj = (7.39)
2 2

Iso-Parametric Representation
Isoparametric representation is the way in which the same shape function is used to
interpolate the geometry of an element and also its nodal displacements. The shape

@seismicisolation
@seismicisolation
2D Finite Element Analysis 411

functions in the Iso-P case are required to be in the natural coordinate system. The
relationship between X and s given in Equation (7.38) can also be obtained by inter-
polation of the element geometry using X = Ni · Xi + N j · X j as outlined below.
1−s
X = 2 · Xi + 1+s
2 · Xj
Xi +X j X j −Xi
= ( 2 )+( 2 )·s
(7.40)
= (Xi + L2 ) + L
2 ·s

⇒X = Xi + L2 · (1 + s)

For a given n-noded 2D element, the isoparametric representation is given by


Equation (7.41) in which N1 ...Nn are the shape functions of the element in terms of
the natural coordinates.
   
1 1 1 ... 1  
    N1
x x1 x2 ... xn   
    N2 
y = y1 y2 ... yn  ×  (7.41)
    
  
u u u ... u 
   ... 

   1 2 n
Nn
v v1 v2 ... vn
In compact form, this equation results in:
n n
x = ∑ Ni · xi y = ∑ Ni · yi
i=1 i=1

n n
u = ∑ Ni · ui v = ∑ Ni · vi
i=1 i=1

7.6.1 RELATIONSHIP BETWEEN GLOBAL AND NATURAL COORDINATES


If displacement is interpolated in terms shape functions not using the global coordi-
nates, the strain expressions and further FE computations all require proper coordi-
nate transformation. Consider the 1D case provided in Equations (7.39) and (7.40).
The strain–displacement matrix B is computed using the chain rule as given below.
dN
B =
dx
dN ds
= ·
ds dx
dN (7.42)
= /J
ds
" # " #
−1/2 −1/L
= · (2/L) =
1/2 1/L

@seismicisolation
@seismicisolation
412 Matrix Structural Analysis and the Finite Element Methods

where J = dxds = L/2 is termed as the Jacobian matrix, and it provides the deriva-
tive relationship between the global and natural coordinates.
The stiffness matrix of a two-noded bar element can also be determined using the
natural coordinates as shown below:

Z
k = BT · D · B · A · dx
L

−1
" # Z 1
L
= 1
· E · [ −1
L
1
L] · A · J · ds
−1
L

−1
" #
E ·A 1
L
= 2 2 · s|1−1
L −1 1

−1
" #
E ·A 1
=
L −1 1

This result is the same as that derived previously in Section 6.7.1; showing that
the stiffness matrix is independent of the coordinate system selected for the element.

7.7 ISO-P REPRESENTATION FOR QUADRILATERAL ELEMENTS


A four-noded planar element has eight degrees of freedom (two at each node). Fig-
ure 7.21 shows a quadrilateral element and its isoparametric mapping.
The shape functions of a quadrilateral element in the natural coordinate system
are given by Equation (7.43).

FIGURE 7.21 Quadrilateral Element: (a) Global CS, (b) Iso-P Mapping in Natural
CS.

@seismicisolation
@seismicisolation
2D Finite Element Analysis 413

(1 − r)(1 − s)
N1 =
4
(1 + r)(1 − s)
N2 =
4
(7.43)
(1 + r)(1 + s)
N3 =
4
(1 − r)(1 + s)
N4 =
4
The corresponding displacement functions u and v as well as the geometry x
and y are obtained by interpolating the four nodal values using the shape functions
derived in Equation (7.43), as shown in Equation (7.44).
x = N1 · x1 + N2 · x2 + N3 · x3 + N4 · x4
y = N1 · y1 + N2 · y2 + N3 · y3 + N4 · y4
(7.44)
u = N1 · u1 + N2 · u2 + N3 · u3 + N4 · u4
v = N1 · v1 + N2 · v2 + N3 · v3 + N4 · v4

7.7.1 DERIVATIVE RELATIONSHIPS IN 2D


The derivatives of a given function f (r, s) (in which r and s are functions of x and y
or vise versa) are determined using the chain rule as follows.
∂f ∂ f ∂x ∂ f ∂y
= · + ·
∂r ∂x ∂r ∂y ∂r
(7.45)
∂f ∂ f ∂x ∂ f ∂y
= · + ·
∂s ∂x ∂s ∂y ∂s
In matrix form, Equation (7.45) becomes as shown below, which is used to solve
for the partial derivatives of f w.r.t. x and y; see Equation (7.46). The 2 × 2 matrix
containing derivatives of x and y w.r.t. r and s is called the Jacobian matrix (J).
  
∂f ∂x ∂y ∂f ∂x ∂y
    
 ∂ r   ∂ r ∂ r  ∂ x  ∂ r ∂ r

 = · ; J= 
 ∂ f   ∂ x ∂ y  ∂ f 

  ∂ x ∂ y
∂s ∂s ∂s ∂y ∂s ∂s
∂y ∂y
 
 ∂ s − ∂ r
       
∂f ∂f  ∂x ∂x  ∂ f

 ∂ x  ∂r
 ∂r
 
  = [J]−1 ·  = ∂s ∂r · 
(7.46)
∂ f  ∂f  ∂x ∂y  ∂ f
∂y ∂s ∂r ∂r ∂s
∂x ∂y
∂s ∂s

@seismicisolation
@seismicisolation
414 Matrix Structural Analysis and the Finite Element Methods

Thus, the partial derivatives of a function f w.r.t x and y are thus given by Equa-
tion (7.47). !
∂f 1 ∂y ∂ f ∂y ∂ f
= · · − ·
∂ x |J| ∂s ∂r ∂r ∂s
! (7.47)
∂f 1 ∂x ∂ f ∂x ∂ f
= · − · + ·
∂ y |J| ∂s ∂r ∂r ∂s
The general relationship to determine the stiffness matrix given in Equation
(6.10) is modified for the isoparametric quadrilateral element as shown in Equation
(7.48). ZZZ
k = B(x, y)T · D · B(x, y) dv
V
ZZ
= B(x, y)T · D · B(x, y) · t dxdy (7.48)
A
Z 1Z 1
= B(r, s)T · D · B(r, s) · t |J|drds
−1 −1
The following example demonstrates the isoparametric formulation using a rect-
angular element.
Example 7.6 For the plate given in Example 7.3, use isoparametric representation
and determine:
a) x, y in terms of r, s; consider the lower left node to be origin of the global CS
b) The Jacobian matrix and its determinant
c) Displacement functions u and v in-terms of r and s

d) The strain–displacement matrix B in r and s


e) The stiffness matrix of the plate; how does this result differ from the one computed
in Example 7.5?

SOLUTION
The isoparametric mapping of the rectangular element is shown in Figure 7.22.
The shape functions of the element in the natural coordinate system are given in

@seismicisolation
@seismicisolation
2D Finite Element Analysis 415

FIGURE 7.22 IsoP Mapping of a Rectangular Element.

Equation (7.43) repeated here under.


(1 − r)(1 − s)
N1 =
4
(1 + r)(1 − s)
N2 =
4
(1 + r)(1 + s)
N3 =
4
(1 − r)(1 + s)
N4 =
4

Given in line #21–24 of the Scilab/Octave code at the end.

The x–y coordinates of the four nodes are:


Node 1 is @ (0, 0)

Node 2 is @ (800, 0)

Node 3 is @ (800, 600)

Node 4 is @ (0, 600)


(a) the expressions for x and y in-terms of r and s is given by:
4
x = ∑ (Ni · xi ) = 400(1 + r)
i=1
4
y = ∑ (Ni · yi ) = 300(1 + s)
i=1

@seismicisolation
@seismicisolation
416 Matrix Structural Analysis and the Finite Element Methods

Given in line #27–34 of the Scilab/Octave code at the end.

(b) Computing the partial derivatives, the Jacobian matrix is determined as fol-
lows.  
∂x ∂y " #
 ∂ r ∂ r 400 0
J=   =
∂ x ∂ y 0 300
∂s ∂s

Given in line #40–41 of the Scilab/Octave code at the end.

|J| = 400 × 300 = 120, 000


This value is a quarter of the rectangular area.

Given in line #44 of the Scilab/Octave code at the end.

(c) Displacements are obtained by interpolating the known-unknowns, as shown


below.
4
u = ∑ (Ni · ui )
i=1
4
v = ∑ (Ni · vi )
i=1
(d) Partial derivatives u,x , u,y , v,x , v,y , that are needed for the strain–
displacement matrix B, are determined using Equation (7.47) as follows.

∂u 1
= · (−u1 (1 − s) + u2 (1 − s) + u3 (1 + s) − u4 (1 + s))
∂ x 1600
∂u 1
= · (−u1 (1 − r) − u2 (1 + r) + u3 (1 + r) + u4 (1 − r))
∂ y 1200
∂v 1
= · (−v1 (1 − s) + v2 (1 − s) + v3 (1 + s) − v4 (1 + s))
∂ x 1600
∂v 1
= · (−v1 (1 − r) − v2 (1 + r) + v3 (1 + r) + v4 (1 − r))
∂ y 1200

The strain–displacement matrix B is thus given as follows.

3 ∗ (s − 1) −3 ∗ (s − 1)

0 0
1 
B= 0 4 ∗ (r − 1) 0 −4 ∗ (r + 1) · · ·
4800

4 ∗ (r − 1) 3 ∗ (s − 1) −4 ∗ (r + 1) −3 ∗ (s − 1)

@seismicisolation
@seismicisolation
2D Finite Element Analysis 417

3 ∗ (s + 1) −3 ∗ (s + 1)

0 0
0 4 ∗ (r + 1) 0 −4 ∗ (r − 1)  (7.49)

4 ∗ (r + 1) 3 ∗ (s + 1) −4 ∗ (r − 1) −3 ∗ (s + 1)

(e) The constitutive matrix D is given in Equation (7.22). All the terms of the
expression (BT · D · B) in Equation (6.10) have quadratic functions in r and s. The
stiffness matrix is obtained by integrating each term of this 8 × 8 expressions within
the limits (−1 to 1) for both r and s.
K=
 
93.59 37.50 −39.74 −2.88 −46.79 −37.50 −7.05 2.88
31.09 −37.50 −61.38 −2.88 −92.47 

 37.50 122.76 2.88

 
 −39.74 2.88 93.59 −37.50 −7.05 −2.88 −46.79 37.50 
 
 
 −2.88 31.09 −37.50 122.76 2.88 −92.47 37.50 −61.38 
 
 
 −46.79 −37.50 −7.05 2.88 93.59 37.50 −39.74 −2.88 
 
 −37.50 −61.38 −2.88 −92.47 37.50 122.76 2.88 31.09 
 
 
 −7.05 −2.88 −46.79 37.50 −39.74 2.88 93.59 −37.50 
 
2.88 −92.47 37.50 −61.38 −2.88 31.09 −37.50 122.76
(7.50)

This result is identical to the one computed in Equation (7.34).

The corresponding Octave code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 % Example 7.6 - 2D Element Stiffness
2 % Rectangular Element using Natural Coordinate System
3 clc
4 clear all
5 warning off
6 %% Units are in kN and mm
7 E = 210; th = 1; % in kN/mm2, mm
8 nu = 3/10; % nu = 0.3
9

10 % Coordinates, in mm
11 XY = [0, 0; 800, 0; 800, 600; 0, 600];
12

13 pkg load symbolic;


14

@seismicisolation
@seismicisolation
418 Matrix Structural Analysis and the Finite Element Methods

15 syms x y r s u1 u2 u3 u4 v1 v2 v3 v4 B real;
16

17 %% Constitutive matrix D (plane stress)


18 D = E/(1-nu^2)*[1 nu 0;nu 1 0; 0 0 (1-nu)/2];
19

20 % The shape functions in Natural coordinates


21 N(1) = (1-r)*(1-s)/4;
22 N(2) = (1+r)*(1-s)/4;
23 N(3) = (1+r)*(1+s)/4;
24 N(4) = (1-r)*(1+s)/4;
25

26 % x and y in-terms of s & t


27 x = 0; y = 0;
28 for i = 1:4
29 x = x + XY(i,1)*N(i);
30 y = y + XY(i,2)*N(i);
31 end
32

33 x = simplify(x)
34 y = simplify(y)
35

36 % Partial derivatives of x,y with respect to r,s


37 xr = diff(x,r); xs = diff(x,s);
38 yr = diff(y,r); ys = diff(y,s);
39

40 % Jacobian matrix and its determinant


41 J = [xr yr;xs ys]; Jd = det(J)
42

43 % u and v in-terms of s & t


44 u = u1*N(1)+u2*N(2)+u3*N(3)+u4*N(4);
45 v = v1*N(1)+v2*N(2)+v3*N(3)+v4*N(4);
46

47 % Partial derivatives of N with respect to r,s


48 Nr = diff(N,r); Ns = diff(N,s);
49

50 % Partial derivatives of u,v with respect to x,y


51 %% Each term to be multiplied by the known-unknowns
52 ux = (ys*Nr - yr*Ns)/Jd
53 vy = (-xs*Nr + xr*Ns)/Jd
54

55 %% The strain displacement matrix is thus obtained


56 B = [ux(1) 0 ux(2) 0 ux(3) 0 ux(4) 0
57 0 vy(1) 0 vy(2) 0 vy(3) 0 vy(4)
58 vy(1) ux(1) vy(2) ux(2) vy(3) ux(3) vy(4) ux(4)]
59

@seismicisolation
@seismicisolation
2D Finite Element Analysis 419

60 %% Prepare the integrand for stiffness matrix (B'*D*B)


61 BtB = B'*D*B
62

63 %% Including the thickness times times Jacobian determinant


64 %% the integrand is given as follows
65 Integ = BtB*th*Jd
66

67 % The stiffness matrix is thus obtained as follows.


68 K = double(int(int(Integ,r,-1,1),s,-1,1))
69

70 % END: ........... Example 7.6

7.8 NUMERICAL INTEGRATION USING GAUSS QUADRATURE


As shown in the previous section, the element stiffness matrix and the corresponding
load vector are uniformly expressed as definite integrals of some function within the
limits −1 and 1. It is difficult and sometimes impossible to evaluate such integrals
analytically.

Consider the definite integral I given in Equation (7.51).


Z 1
I= f (x)dx (7.51)
−1

If the anti-derivative of f is difficult to determine or does not exist, it may be nec-


essary to use numerical integration to approximate I. Among the various numerical
integration techniques, Gauss quadrature provides comparatively the best result, and
it is generally adopted in finite element computations [9, 19, 25, 48]. According to
the Gauss Quadrature, the integral in Equation (7.51) is approximately evaluated as
given in Equation (7.52).

Z 1 n
I= f (x)dx ≈ ∑ wi · f (xi ) (7.52)
−1 i=1

where: xi : Selected ith integration point,


f (xi ) : f evaluated at the integration point xi ,
wi : Tabulated weighting value for the integration point.

An n-point Gauss quadrature rule, also called Gauss-Legendre quadrature, is a


rule that gives an exact result for polynomials of degree 2n–1 or less.
The integration points xi are taken as the roots of Legendre (orthogonal) polynomials
[19] and the weighting values wi add up to 2. These values are available up to a

@seismicisolation
@seismicisolation
420 Matrix Structural Analysis and the Finite Element Methods

TABLE 7.2
Gauss Quadrature Nodes and Weights
n xi wi

1 0 2
1
2 ±√ 1
3
8
0
3 r 9
3 5
±
5 9
s r √
3 2 6 18 + 30
± −
4 7 7 5 36
s r √
3 2 6 18 − 30
± +
7 7 5 36
128
0
225
5 s r √
1 10 322 + 13 70
± 5−2
3 7 900
s r √
1 10 322 − 13 70
± 5+2
3 7 900

limited number of integration points in books [3, 25, 42, 48], and on the internet
[19] for a large set of integration points including the background on how these
values are derived. For the first five Gauss quadrature rules, the integration points
and corresponding weighting values are listed in Table 7.2.

Example 7.7 Using the Gauss quadrature determine the integral I.

3x2
Z 12
I= dx
4 ln(x − 1)

SOLUTION
Before considering the Gauss quadrature, the limits of integration need to be con-
verted into the range −1 to 1. This can be accomplished by using the coordinate
transformation as discussed earlier in the IsoP section. Accordingly, x and s (global
and natural coordinates) are related as follows.

@seismicisolation
@seismicisolation
2D Finite Element Analysis 421

x − x1 x − 4 s − (−1)
= =
x2 − x1 8 2
⇒ x = 4s + 8
dx
and J = =4
ds
The given integral I expressed in terms of the natural coordinates s becomes as
given below.
Z 12
3x2
Z 1
3(4s + 8)2 n
I= dx = 4 ds ≈ ∑ wi · f (si )
4 ln(x − 1) −1 ln(4s + 7) 1

(4s + 8)2
where: f (s) = 12
ln(4s + 7)
The numerical integration according to the Gauss quadrature is performed in
Table 7.3 for up to five integration points. The result 823.6722774679 is accurate to
10 decimal places obtained, which is computed for 15 integration points.

TABLE 7.3
Numerical Integration Using Gauss Quadrature in 1D
n x f (x) w w ∗ f (x) In

1 0.0000000000 394.6739269400 2.0000000000 789.3479 789.3478539


−0.5773502692 251.4266180192 1.0000000000 251.4266
2 823.0944142
0.5773502692 571.6677962174 1.0000000000 571.6678
−0.7745966692 211.7759997782 0.5555555556 117.6533
3 0.0000000000 394.6739269400 0.8888888889 350.8213 823.5904481

0.7745966692 639.2085236117 0.5555555556 355.1158


−0.8611363116 196.3179807300 0.3478548451 68.29016
4 −0.3399810436 305.8489191897 0.6521451549 199.4579 823.6601560
0.3399810436 495.0898231346 0.6521451549 322.8704
0.8611363116 669.9394253974 0.3478548451 233.0417
−0.9061798459 188.8376752992 0.2369268851 44.74072
−0.5384693101 259.8728203441 0.4786286705 124.3826
5 823.6704863
0.0000000000 394.6739269400 0.5688888889 224.5256
0.5384693101 558.7694114289 0.4786286705 267.4431
0.9061798459 686.1969643220 0.2369268851 162.5785

@seismicisolation
@seismicisolation
422 Matrix Structural Analysis and the Finite Element Methods

GAUSS QUADRATURE IN 2D
Consider the double integral – with limits from −1 to 1 for both the variables r and s
– given in Equation (7.53).
Z 1Z 1
I= f (r, s)drds (7.53)
−1 −1

This can be numerically evaluated by integrating first with respect to r and then
with respect to s, as shown in Equation (7.54).
Z 1Z 1
I= f (r, s)drds
−1 −1
Z 1 n
≈ ∑ wri · f (ri , s)ds
−1 i=1

m n
≈ ∑ ws j ∑ wri · f (ri , s j )
j=1 i=1

m n
≈ ∑ ∑ wri ws j · f (ri , s j ) (7.54)
j=1 i=1

where:
m and n are the number of integration points along the axes r and s, respectively.

Example 7.8 Consider the rectangular plate in 7.6. The stiffness matrix was evalu-
ated by integrating the expression B′ · D · B · th · |J| (where th is the thickness and |J|
is the determinant of the Jacobian matrix) within the limits −1 to 1 for both r and s,
as shown in Equation (7.50). The corresponding function to be integrated for k(1,1)
is given by the expression below.
Z 1Z 1
25
28r2 − 56r + 45s2 − 90s + 73 drds

k(1, 1) =
−1 −1 104
Evaluate this integral using a 2 × 2 Gauss quadrature.

SOLUTION
q
For a 2 × 2 Gauss quadrature, the integration points are at ± 13 and the weights
equal 1. The numerical integration of k(1, 1) using a 2 × 2 Gauss quadrature is per-
formed in Table 7.4.

@seismicisolation
@seismicisolation
2D Finite Element Analysis 423

TABLE 7.4
Numerical Integration Using Gauss Quadrature in 2D
(r, s) f (r, s) wr × ws wr · ws · f (r, s) k(1, 1)
 
− √13 , − √13 43.6602 1 × 1 = 1 43.6602
 
√1 , − √1 28.1161 1 × 1 = 1 28.1161 93.5897
3 3
√1 , √1 3.1347 1 × 1 = 1 3.1347
 3 3 
− √13 , √13 18.6787 1 × 1 = 1 18.6787

7.9 AXISYMMETRIC PROBLEM


Definition 7.3 (Axisymmetric Problem) These are solids of revolution loaded and
supported symmetrically about the axis of revolution and which can be modeled and
analyzed as a 2D structure; see Figure 7.23. Unlike the plane stress and plane strain
cases, an axisymmetric problem has a fourth strain/stress (εθ /σθ ) component in the
circumferential direction as shown in Figure 7.24.
The stress–strain relationship for an axisymmetric case is given in Equation
(7.55).
du dv
εx = εr =
dx dr
v du dv
εθ = γxr = + ;
r dr dx

FIGURE 7.23 Conical Hollow Structure as Typical Axisymmetric Problem.

@seismicisolation
@seismicisolation
424 Matrix Structural Analysis and the Finite Element Methods

FIGURE 7.24 Stresses for Axisymmetric Problem (a) Annulated Rectangular Ele-
ment dx × dr (b) Differential Stress Block dx × dr × dθ and (c) Stress Components
on the Differential Block.

 

σx
 1−ν ν ν 0 
εx

     
σ 
 r
 ν
 1−ν ν 0   
  εr 
E    
= · × 
  
σθ  (1 + ν)(1 − 2ν) 
 
 ν ν 1−ν 0    εθ 
     
   
 1 − 2ν 
τxr 0 0 0 γxr
2
 
1−ν ν ν 0
 
 ν
 1−ν ν 0 

E  
⇒D=   for axisymmetric.
(1 + ν)(1 − 2ν) 
 ν ν 1−ν 0  
 
 1 − 2ν 
0 0 0
2
(7.55)
Example 7.9 For the three-noded triangular axisymmetric elements shown in the
figure below, determine the element stresses and also the nodal forces. Let E = 105
GPa and ν = 0.25. The dimensions of the element are in mm and the nodal displace-
ments are u1= 0.05 mm, w1 = 0.03 mm; u2 = 0.01 mm, w2 = 0.01 mm; u3 = 0.0 mm,
w3 = 0.0 mm.

SOLUTION
To determine the stresses, first the strain–displacement matrix B need to be eval-
uated, which depends on the shape function of the element. To compute the shape

@seismicisolation
@seismicisolation
2D Finite Element Analysis 425

FIGURE 7.25 Axisymmetric Elements.

functions, the area-coordinates method will be used as follows.


1 1 1
1
A = 2 0 60 60 = 1500
0 0 50
1 1 1
1
A1 = 2 r 60 60 = 1500 − 25r
z 0 50
1 1 1
1
A2 = 2 0 r 0 = 25r − 30z
0 z 50
1 1 1
1
A3 = 2 0 60 r = 30z
0 60 z

Given in line #17–24 of the Scilab/Octave code at the end.

The shape functions are then given by the following expressions.


A1 r
N1 = = 1−
A 60
A2 r z
N2 = = −
A 60 50
A3 z
N3 = =
A 50

@seismicisolation
@seismicisolation
426 Matrix Structural Analysis and the Finite Element Methods

Given in line #27–29 of the Scilab/Octave code at the end.

The displacements u and w are thus given by


3
u = ∑ Ni · ui
i=1

3
w = ∑ Ni · wi
i=1

The four strains (εr , εz , εθ and γrz ) are expressed in terms of the known-unknowns
as follows.
  ∂ 
εr ∂r 0
   
ε   0 ∂∂z 
 " #
 z  u
 = ×
 
  1
 εθ   r 0 w
   
γrz ∂ ∂
∂z ∂r
The strain–displacement matrix B is thus derived as follows.
1 1
 
− 0 0 0 0
 60 60 
 
 1 1 
 0 0 0 − 0 
 50 50 
B=  60 − r
 (7.56)
50r − 60z z 
 0 0 0
 60r 3000r 50r
 

 1 1 1 1 
0 − − 0
60 50 60 50

Given in line #37–40 of the Scilab/Octave code at the end.

The B matrix, especially the εθ components are not constant and they are depen-
dent both on r and z. Furthermore, these elements of B become undefined at r = 0. To
compute the stresses over the element, the centroid of the triangular element – (r,z)
= (40,50/3) – is taken as representative point. B computed at the centroid yields the
following.

@seismicisolation
@seismicisolation
2D Finite Element Analysis 427

1 1
 
− 0 0 0 0
 60 60 
 
 1 1
 0 0 0 − 0 
 50 50 
Bc = 
 1

1 1 
 0 0 0
 120 120 120
 

 1 1 1 1 
0 − − 0
60 50 60 50

Given in line #80 of the Scilab/Octave code at the end.

The constitutive matrix D is computed as follows.


 
1−ν ν ν 0
 
 ν
 1−ν ν 0

E  
D= 
1−ν

0
(1 + ν)(1 − 2ν) 
 ν ν 
 
 1 − 2ν 
0 0
2
 
141.35 60.58 60.58 0
 
 60.58 141.35 60.58 0 
 
=


 60.58 60.58 141.35 0 
 
0 0 0 40.38

Given in line #44–48 of the Scilab/Octave code at the end.

The given nodal displacements are d = [0.05 0.03 0.01 0.01 0.0 0.0]T ; using
which, the stresses over the element are obtained as shown below.

[σ ] = [D][Bc ] × [d]

@seismicisolation
@seismicisolation
428 Matrix Structural Analysis and the Finite Element Methods
   
σr 141.35 60.58 60.58 0
   
σ   60.58 141.35 60.58 0 
 z
  = 103 × 
 
×
   
σθ   60.58 60.58 141.35 0 
   
τrz 0 0 0 40.38
 
0.05
1 1
 
− 0 0 0 0  
 60
 60  
 0.03
 1 1  
 0 0 0 − 0   
0.01
50 50 
  
 ×



 1 1 1  
 0 0 0 
 0.01
 120 120 120

  
 1 1 1 1   0.0 


0 − − 0  
60 50 60 50
0.0

−76.06
  
σr
   
 σ  −38.37
 z  
⇒
 =
   MPa

σθ   18.17 
   
τrz −21.54

Given in line #83 of the Scilab/Octave code at the end.

The stiffness matrix for an axisymmetric element can be obtained from Equation
(6.10) as follows. ZZZ
k = BT · D · B dv
V

Z 2π ZZ 
T
= B · D · B dA dθ
0 A (7.57)
ZZ
= 2π BT · D · B dA
A

Some of the terms in k can not be integrated at r = 0. Thus, the same B at the
centroid is used to compute an approximate element stiffness matrix, as follows.

k = 2πBTc · D · Bc A

@seismicisolation
@seismicisolation
2D Finite Element Analysis 429

Given in line #87–88 of the Scilab/Octave code at the end.

The corresponding Octave code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 %% Example 7.9 - Axisymmetric Element
2 %% Stiffness matrix of a 3-noded axisymmetric element
3 clc
4 clear all
5 warning off
6 %% Units are in kN and mm
7 E = 105 % in kN/mm2, mm
8 nu = 3/10;
9

10 % Solution uses symbolic computation


11 pkg load symbolic;
12 syms r z s real;
13

14 function [N,B,As] = getB(XY)


15 syms r z real;
16 % Total Area for use in Area coordinates
17 A = det([1 1 1;XY(1,1) XY(2,1) XY(3,1); ...
18 XY(1,2) XY(2,2) XY(3,2)])/2;
19 A1 = det([1 1 sym(1); r XY(2,1) XY(3,1); ...
20 z XY(2,2) XY(3,2)])/2;
21 A2 = det([1 1 sym(1); XY(1,1) r XY(3,1); ...
22 XY(1,2) z XY(3,2)])/2;
23 A3 = det([1 1 sym(1); XY(1,1) XY(2,1) r; ...
24 XY(1,2) XY(2,2) z])/2;
25 As = [A,A1,A2,A3]
26 % The shape functions using Area coordinates for CST
27 N(1) = A1/A;
28 N(2) = A2/A;
29 N(3) = A3/A;
30

31 simplify(N);
32

33 Nr = diff(N,r);
34 Nz = diff(N,z);
35

36 % The strain displacement matrix B


37 B = [Nr(1) 0 Nr(2) 0 Nr(3) 0
38 0 Nz(1) 0 Nz(2) 0 Nz(3)

@seismicisolation
@seismicisolation
430 Matrix Structural Analysis and the Finite Element Methods

39 N(1)/r 0 N(2)/r 0 N(3)/r 0


40 Nz(1) Nr(1) Nz(2) Nr(2) Nz(3) Nr(3)];
41 endfunction
42

43 %% Stiffness matrix, kN/mm2


44 D=sym(E/((1+nu)*(1-2*nu))*[
45 1-nu nu nu 0
46 nu 1-nu nu 0
47 nu nu 1-nu 0
48 0 0 0 (1-2*nu)/2])
49

50 % Coordinates, in mm for Element


51 XY = [40, 10; 100, 10; 100, 60];
52

53 [N,B,As] = getB(XY);
54

55 % Structure displacements
56 d = [0.05 0.03 0.01 0.01 0.0 0.0]';
57

58 % Integrand for stiffness matrix of the element


59 fun = 2*pi*B'*D*B;
60

61 % z - Limits, change the two variables (r,z) into one, r


62 z1 = sym(5)*r/6 -70/3;
63 IntR = simplify(int(fun,z,0,z1))
64

65 Kexact = double(int(IntR,40,100))
66

67 f = @(t) 175*pi*(t^3-140*t^2+7500*t-140000)/936/t^2
68 III = quad(f,40,100)
69

70 %% IsoP representation -1 <= s <= 1; r ==> s


71 %% preparing for numerical integration
72 IntS = subs(30*IntR,r,30*(s+1)+40);
73

74 % Stiffness matrix of the axisymm. element


75 Kgaussq = double(subs(IntS,s,-1/sqrt(3))+ ...
76 subs(IntS,s,1/sqrt(3)))
77

78 %% Since B is undefined @ (0,0), compute it's value at


79 %% the centroid (80, 50/3)
80 Bc = subs(B,{r z},{80 10+50/3})
81

82 % Stress D*B*d in MPa


83 Stress = double(D*Bc*d*1000)

@seismicisolation
@seismicisolation
2D Finite Element Analysis 431

84

85 % Using Bc at the centroid, the stiffness matrix is


86 % k = 2*pi*B'*D*B*A;
87 ke = 2*pi*Bc'*D*Bc*As(1);
88 Kcentroid = double(ke)
89

90 % The structure actions are found as follows


91 Ax = Kexact*d;
92 Ag = Kgaussq*d;
93 Ac = Kcentroid*d;
94 [Ax Ag Ac]
95

96 % END: ........... Example 7.9

7.10 PROBLEMS
7.1 The coordinates of three nodded triangular elements are given in the table below.
In each case, determine the shape functions and also the stiffness matrix as a single
plane stress element if E = 72 GPa, ν = 0.29 and thickness = 5 mm (FPS: E = 10,500
ksi, ν = 0.29 and thickness = 0.2 in).

Node-1 Node-2 Node-3


Case
x1 y1 x2 y2 x3 y3
mm – SI
SI–1 0 0 100 0 0 200
SI–2 50 75 200 300 250 600
SI–3 450 100 600 200 200 300
SI–4 100 0 500 0 300 300
SI–5 0 0 200 0 300 250
in – FPS
FPS–1 0 0 4 0 0 8
FPS–2 2 3 8 12 10 24
FPS–3 18 4 24 8 8 12
FPS–4 4 0 20 0 12 12
FPS–5 0 0 8 0 12 10

7.2 For the triangular elements in Problem 7.1, further information regarding the
nodal displacements and forces is given in the table below. For each of the five ele-
ments and each of the four load/displacement data, determine the unknown parame-
ters identified in the table? Also compute displacements and stresses at the element’s
centroid.
@seismicisolation
@seismicisolation
432

Node-1 Node-2 Node-3


Case
dx1 dy1 fx1 fy1 dx2 dy2 fx2 fy2 dx3 dy3 fx3 fy3
mm/N – SI
A1 0 0 ? ? 0 0.2 ? ? 0 0 ? ?
A2 0.05 −0.3 ? ? 0 0.25 ? ? −0.1 0.03 ? ?
A3 ? ? 100 −100 ? ? 350 0 ? ? 200 200
A4 0 ? ? 250 0 0.2 ? ? 0 ? ? −100
in/lb – FPS
B1 0 0 ? ? 0 8e−3 ? ? 0 0 ? ?

@seismicisolation
@seismicisolation
B2 2e−3 −0.012 ? ? 0 0.01 ? ? −4e−3 1.2e-3 ? ?
B3 ? ? 22.5 −22.5 ? ? 80 0 ? ? 45 45
B4 0 ? ? 56 0 8e−3 ? ? 0 ? ? −22.5
Matrix Structural Analysis and the Finite Element Methods
2D Finite Element Analysis 433

7.3 Analyze the cantilever plate shown in Figure 7.26a using the finite element
method dividing the plate into two CSTs both along 1–3 and 2–4. Compare the dis-
placement and stress results with that obtained analytically as a cantilever beam.
Use P = 45 kips, E = 30,000 ksi, ν = 0.3, L = 20 in and thickness = 0.5 in. (SI: P =
200 kN, E = 207 GPa, ν = 0.3, L = 500 mm and thickness = 12 mm).

FIGURE 7.26 Problems Set 7.

7.4 Solve Problem 7.3 by dividing the plate into two LSTs both along 1–3 and 2–4.
Compare the displacement and stress results with the one obtained in Problem 7.3.
Use the same values for the parameters.
7.5 Solve Problem 7.3 as a single bi-linear rectangular element. Compare the dis-
placement and stress results with those obtained in Problems 7.3 and 7.4. Use the
same values for the parameters.
7.6 Determine the equivalent nodal load and analyze the linear strain triangle
shown in Figure 7.26b as a single finite element. The plate is supported such that
nodes 1, 4 and 2 are restrained against vertical movement while nodes 1, 6 and 3 are
also held against any horizontal movement. Use t = 0.25 in, E = 30e6 psi, ν = 0.3,
w1 = 1.5 ksi and w2 = 2.5 ksi. (SI: t = 6 mm, E = 200e6 GPa, ν = 0.3, w1 = 10 MPa
and w2 = 15 MPa).

@seismicisolation
@seismicisolation
434 Matrix Structural Analysis and the Finite Element Methods

7.7 Derive all the shape functions of the eight nodded rectangular elements
shown in Figure 7.26c.
7.8 The x–y coordinates of quadrilateral elements are given in the table below. In
each case, answer the problems following the table if E = 72 GPa, ν = 0.29 and
thickness = 5 mm (FPS: E = 10,500 ksi, ν = 0.29 and thickness = 0.2 in).

Node-1 Node-2 Node-3 Node-4


Case
x1 y1 x2 y2 x3 y3 x4 y4
mm – SI
SI–1 0 0 100 0 100 200 0 200
SI–2 0 0 100 0 250 200 0 200
SI–3 0 50 300 0 300 450 0 500
SI–4 50 75 200 −150 350 300 0 200
in – FPS
FPS–1 0 0 4 0 4 8 0 8
FPS–2 0 0 4 0 8 8 0 8
FPS–3 0 2 12 0 12 18 0 20
FPS–4 2 3 8 −6 14 12 4 8
As a single plane stress element, determine the:
a) Relationship between global (x–y) and the natural (r–s) coordinates,
b) Jacobian matrix and it’s determinant
c) 3 × 8 strain–displacement matrix B

d) stiffness matrix of the quadrilateral as a plane stress element.


7.9 Analyze each of the quadrilateral elements in Problem 7.8 as a single finite
element if nodes 1 and 2 are pin supported while a loads P3x = 30 kN at node-3 in
the x-direction and P4y = 40 kN at node-4 in the y-direction. (FPS: P3x = 6.5 kips
and P4y = 9 kips.)

7.10 Perform a 2 × 2 Gauss quadrature to estimate the integral given below over
the quadrilateral area of Problem 7.8 (SI–4 or FPS–4).
Z
3 · y · x3 − 6 · y2 − 12 · x · y + 5 · x
dA
A 2·x+y

7.11 For each of the quadrilateral elements given in Problem 7.8, determine
the strain–displacement B and the stiffness matrix of the elements if used in an axis-
symmetric problem.

@seismicisolation
@seismicisolation
8 3D Finite Element Analysis
8.1 INTRODUCTION
Volume (3D) elements are the most general types of finite elements that are used
to analyze structures without any dimensional simplification. In the case of one-
dimensional (1D) analysis, the cross-sectional areas of the members of a given struc-
ture are assumed to be very small – compared to the length of the members; hence
line (1D) finite elements were used. In the case of two-dimensional (2D) analysis,
the thickness of the plate structure is assumed to be very small – compared to the
other dimensions of the structure; hence, area (2D) finite elements were used. As
an example, a simple beam-like structure that doesn’t fall into a 1D or 2D structure
type is shown in Figure 8.1. In spite of the difficulty associated with geometry and
mesh creation as well as the high computational demand, all kinds of structures can
be modeled using three-dimensional (3D) elements.
After studying this chapter, the reader will be able to
• Identify and model 3D solid problems
• Use volume coordinates to derive element equations of a tetrahedral ele-
ment
• Compute the equivalent nodal loads for surface and body forces in 3D
• Derive the equations for eight-node hexahedral elements
• Perform numerical integration for 3D elements using Gaussian quadrature
• Derive the element equations for a ten-noded tetrahedral element
• Use of Scilab or Octave to analyze simple 3D problems

8.2 TERTAHEDRAL ELEMENT


The simplest 3D finite elements are tetrahedral elements. A tetrahedral element has
four nodes and three degrees of freedom at each node, as shown in Figure 8.2.
The displacement functions over the tetrahedral element will be functions of
plane surfaces in x, y and z, as given in Equation (8.1), with the arbitrary constants
ai , bi and ci to be determined.

u= a1 + a2 · x + a3 · y + a4 · z
v= b1 + b2 · x + b3 · y + b4 · z (8.1)
w = c1 + c2 · x + c3 · y + c4 · z
In terms of the known-unknowns, the displacement at any interior point (x, y,
and z) can also be given as provided in Equation (8.2). The strains over a tetrahedral
element – (which depend on the first partial derivatives of the displacements u, v, and
w, see Equation (6.4) – are all constants. Such an element is also called a Constant
Strain Tetrahedral Element (CSTet).

DOI:10.1201/9781003329350-10@seismicisolation
@seismicisolation 435
436 Matrix Structural Analysis and the Finite Element Methods

FIGURE 8.1 A 3D Structure and Loading.

FIGURE 8.2 A Tetrahedral Element.

 
u1
 
 v1 
 
w1 
 
 
     u2 
u N1 0 0 N2 0 N4 0 0  
 
  .. 
v =  0 N1 0 0 ... 0 0 N4 0 · .  (8.2)
  
 
w 0 0 N1 0 N3 0 0 N4  
w3 
 
 u4 
 
 
v 
 4
w4

@seismicisolation
@seismicisolation
3D Finite Element Analysis 437

VOLUME COORDINATES
The shape functions of a tetrahedral element can be derived in the same way as that
of the constant strain triangle treated in Section 7.3. In place of area coordinates,
volume coordinates will be employed in the case of a CSTet, as discussed below.
The volume of a tetrahedron with vertices at (x1 , y1 , z1 ), (x2 , y2 , z2 ), (x3 , y3 , z3 ) and
(x4 , y4 , z4 ) is given by the determinant in Equation (8.3).

1 1 1 1
1 x1 x2 x3 x4
V= (8.3)
6 y1 y2 y3 y4
z1 z2 z3 z4
For an arbitrary point P (x,y,z) inside the tetrahedron, there will be four partial
tetrahedral elements, as shown in Figure 8.3. The volumes of these four tetrahedral
parts V1 , V2 , V3 and V4 are given as follows.

1 1 1 1 1 1 1 1

1
x x2 x3 x4 1
x1 x x3 x4
V1 = 6 V2 = 6
y y2 y3 y4 y1 y y3 y4
z z2 z3 z4 z1 z z3 z4

FIGURE 8.3 Tetrahedral Element for Volume Coordinates: (a) Point P Inside the
Tetrahedron 1-2-3-4, (b) Part Volume V1 (P-2-3-4), (c) Part Volume V2 (1-P-3-4),
(d) Part Volume V3 (1-2-P-4), and (e) Part Volume V4 (1-2-3-P).

@seismicisolation
@seismicisolation
438 Matrix Structural Analysis and the Finite Element Methods

1 1 1 1 1 1 1 1

1
x1 x2 x x4 1
x1 x2 x3 x
V3 = 6 V4 = 6 (8.4)
y1 y2 y y4 y1 y2 y3 y
z1 z2 z z4 z1 z2 z3 z
The volume coordinates L1 , L2 , L3 and L4 are defined as volume ratios for any
point P within the tetrahedron. These ratios will have values between 0 and 1 (0 ≤
Li ≤ 1) as computed using Equation (8.5), in which the areas V1 , V2 , V3 and V4 are
parts of the total volume shown in Figure 8.3. Volume coordinates are used to linearly
interpolate values within the tetrahedral element, in terms of the four nodal values.
V1 V2
L1 = , L2 =
V V (8.5)
V3 V4
L3 = , L4 =
V V
The shape functions for a CSTet are the same as the volume coordinates discussed
above, and they are given in Equation (8.6).

1
N1 = L1 = (α1 + β1 x + γ1 y + δ1 z)
6V
1
N2 = L2 = (α2 + β2 x + γ2 y + δ2 z)
6V (8.6)
1
N3 = L3 = (α3 + β3 x + γ3 y + δ3 z)
6V
1
N4 = L4 = (α4 + β4 x + γ4 y + δ4 z)
6V
The coefficients αi , βi , γi and δi are all constants that depend on the locations of
the four nodes of the CSTet. They can be obtained from the volume coordinates, as
shown in Equations (8.7)–(8.10).

x2 x3 x4 x1 x3 x4
1
α1 = 6 y2 y3 y4 α2 = − 16 y1 y3 y4
z2 z3 z4 z1 z3 z4

x1 x2 x4 x1 x2 x3
1
α3 = 6 y1 y2 y4 α4 = − 16 y1 y2 y3 (8.7)
z1 z2 z4 z1 z2 z3

1 1 1 1 1 1
β1 = − 16 y2 y3 y4 β2 = 1
6 y1 y3 y4
z2 z3 z4 z1 z3 z4

@seismicisolation
@seismicisolation
3D Finite Element Analysis 439

1 1 1 1 1 1
β3 = − 16 y1 y2 y4 β4 = 1
6 y1 y2 y3 (8.8)
z1 z2 z4 z1 z2 z3

1 1 1 1 1 1
1
γ1 = 6 x2 x3 x4 γ2 = − 16 x1 x3 x4
z2 z3 z4 z1 z3 z4

1 1 1 1 1 1
1
γ3 = 6 x1 x2 x4 γ4 = − 16 x1 x2 x3 (8.9)
z1 z2 z4 z1 z2 z3

1 1 1 1 1 1
δ1 = − 16 x2 x3 x4 δ2 = 1
6 x1 x3 x4
y2 y3 y4 y1 y3 y4

1 1 1 1 1 1
δ3 = − 16 x1 x2 x4 δ4 = 1
6 x1 x2 x3 (8.10)
y1 y2 y4 y1 y2 y3

8.2.1 STIFFNESS MATRIX OF A TETRAHEDRAL ELEMENT


The strain vector contains the six strains provided in Equation (6.5). Accordingly, the
strain displacement-matrix (B) becomes a 6 × 12 matrix shown in Equation (8.11).

0 0 0 0 0 0 0 0
 
β1 β2 β3 β4

 0 γ1 0 0 γ2 0 0 γ3 0 0 γ4 0 
 
1  0 0 δ1 0 0 δ2 0 0 δ3 0 0 δ4 
B= (8.11)
 
6V 
 
 γ1 β1 0 γ2 β2 0 γ3 β3 0 γ4 β4 0 
0 0 0 0
 
 δ1 β1 δ2 β2 δ3 β3 δ4 β4 
0 δ1 γ1 0 δ2 γ2 0 δ3 γ3 0 δ4 γ4

The 12 × 12 stiffness matrix of a (constant strain) tetrahedral element is thus


obtained by Equation (8.12).

@seismicisolation
@seismicisolation
440 Matrix Structural Analysis and the Finite Element Methods
ZZZ
k = BT · D · B dv
V
ZZZ
= BT · D · B dv (8.12)
V
= BT · D · B ·V

where: B = Strain–displacement matrix (6 × 12)


D = The complete six by six constitutive matrix; Equation (6.6)
V = Volume of the Tetrahedron

Example 8.1 For the tetrahedral element supported and loaded as shown in Figure
8.4, determine the
• Shape functions
• Element stiffness matrix
• Displacements at node 4
• Reactions at the supports
• Stresses over the element
Assume that it is made up of a one element solid structure and E = 29,000 ksi and
µ = 0.3. The nodes 1,2,3 and 4 are located at (0,0,0), (2,0,0), (0,3,0) and (0,0,3)
inches respectively. Take nodes 1,2 and 3 to be pin-supported while the force compo-
nents F4x = 100 kips, F4y = 90 kips and F4z = -175 kips act at node 4.

SOLUTION
The volume of the tetrahedral element is computed using Equation (8.3) as A =
3 in3 . The αi , βi , γi and δi required for the shape functions N as well as the strain-
displacement matrix B are also computed using Equations (8.7) to (8.10) as shown
below.

FIGURE 8.4 Tetrahedral Element.

@seismicisolation
@seismicisolation
3D Finite Element Analysis 441

18 −9 −6 −6
 
 
α1 β1 γ1 δ1
   
 0 9 0 0
α β2 γ2 δ2  
 2 
 = 
   
α3 β3 γ3 δ3   0 0 6 0
   
α4 β4 γ4 δ4 0 0 0 6

Given in line #22–85 of the Scilab/Octave code at the end.

The shape functions and the strain displacement matrix are, thus, given as fol-
lows.

 
x y z x y z
N = (1 − − − )
2 3 3 2 3 3

Given in line #92–95 of the Scilab/Octave code at the end.

The strain displacement matrix B is:

1 1
 
0 0 0 0 0 0 0 0 0 0 
 2 2
1 1
 
 
 0 − 0 0 0 0 0 0 0 0 0 
 3 3 
1 1 
 

 0 0 − 0 0 0 0 0 0 0 0 
B=
 3 3 
1 1 1 1

 
 − − 0 0 0 0 0 0 0 0 
 3 2 2 3 
1 1 1 1
 
 
 − 0 − 0 0 0 0 0 0 0 
 3 2 2 3 
1 1 1 1
 
0 − − 0 0 0 0 0 0 0
3 3 3 3

Given in line #99–104 of the Scilab/Octave code at the end.

The constitutive matrix D for general 3D element is computed using Equation


(6.6) and found to be as shown below.

@seismicisolation
@seismicisolation
442 Matrix Structural Analysis and the Finite Element Methods

39.04 16.73 16.73 0 0 0


 
 
16.73 39.04 16.73 0 0 0 
 
 
16.73 16.73 39.04 0 0 0 
 

D = 103 × 
 

 0 0 0 11.15 0 0 
 
 
 0 0 0 0 11.15 0 
 
 
 
0 0 0 0 0 11.15

Given in line #108–113 of the Scilab/Octave code at the end.

The stiffness matrix for the tetrahedral element is obtained using the following
equation and result is shown in Equation (8.13)

K = BT · D · B ·V

@seismicisolation
@seismicisolation
3D Finite Element Analysis
 
36.71 13.94 13.94 −29.28 −5.58 −5.58 −3.72 −8.37 0 −3.72 0 −8.37
−8.37 −8.37 −5.58 −13.01 −3.72 0 −3.72 −5.58 
 
 13.94 25.10 9.29 0
 

 13.94 9.29 25.10 −8.37 0 −8.37 0 −5.58 −3.72 −5.58 −3.72 −13.01 

 

 −29.28 −8.37 −8.37 29.28 0 0 0 8.37 0 0 0 8.37 

 

 −5.58 −8.37 0 0 8.37 0 5.58 0 0 0 0 0 

−5.58 0 −8.37 0 0 8.37 0 0 0 5.58 0 0 
 

K = 103 ×   k/in

 −3.72 −5.58 0 0 5.58 0 3.72 0 0 0 0 0 

 

 −8.37 −13.01 −5.58 8.37 0 0 0 13.01 0 0 0 5.58 

 

 0 −3.72 −3.72 0 0 0 0 0 3.72 0 3.72 0 

−3.72 0 −5.58 0 0 5.58 0 0 0 3.72 0 0 
 

 

 0 −3.72 −3.72 0 0 0 0 0 3.72 0 3.72 0 

−8.37 −5.58 −13.01 8.37 0 0 0 5.58 0 0 0 13.01
(8.13)

443
@seismicisolation
@seismicisolation
444 Matrix Structural Analysis and the Finite Element Methods

Given in line #116 of the Scilab/Octave code at the end.

Since nodes 1,2 and 3 are restrained, the modified structure stiffness matrix is
given by:
 
3.72 0 0
Km = K(10 : 12, 10 : 12) = 103 ×  0 3.72 0 
 

0 0 13.01

Given in line #119 of the Scilab/Octave code at the end.

The given force vector Aj at node 4 equals [100, 90, −175]T kips. The nodal
displacement is obtained as follows.
 
100
A j =  90  kips
 

−175

 
0.0269
D j = Km−1 ∗ A j =  0.0242  in
 

−0.0134

Given in line #122–125 of the Scilab/Octave code at the end.

The complete structure nodal displacements vector is:


 
0
 
 0 
 

 0 

 

 0 

 

 0 

0
 
 
d=   in
 0 

 

 0 

 

 0 

 0.0269 
 
 
 0.0242 
 
−0.0134

@seismicisolation
@seismicisolation
3D Finite Element Analysis 445

Given in line #128–129 of the Scilab/Octave code at the end.

The support reactions are obtained from the complete structure action vector As
using the following relationship.
" #
Ar
As = = K ×d
Aj
 
12.5
−15 
 

 

 −65  
 
 −112.5 
 
 

 0 

150 
 

=
  kips
 0 

 

 −75  
 

 90 

100 
 

 

 90 

−175

Given in line #131 of the Scilab/Octave code at the end.

The constant stresses over the tetrahedral element are computed as follows.

−75.
   
σx
 σ   −75. 
 y  
   
 σz  −175.
Stress = D × B × d =   =   ksi
   
τxy   0. 
   
τxz   100. 
   

τyz 90.

Given in line #134 of the Scilab/Octave code at the end.

The corresponding Scilab code showing the complete solution steps is given in
the listing below.

@seismicisolation
@seismicisolation
446 Matrix Structural Analysis and the Finite Element Methods

FIGURE 8.5 Nodal Forces and Reactions for the Tetrahedral Element.

Scilab/Octave Code
1 // Example 8.1 - 3D Stress analysis
2 // Tetrahedral element using Volume coordinates
3 clear all
4 // Coordinates, in inches
5 X = [0, 0, 0
6 2, 0, 0
7 0, 3, 0
8 0, 0, 3];
9

10 // Material properties
11 E = 29000; nu = 3/10;
12 // Total volume of the ter=trahedron
13 V = 1/6*det([1 1 1 1
14 X(1,1) X(2,1) X(3,1) X(4,1)
15 X(1,2) X(2,2) X(3,2) X(4,2)
16 X(1,3) X(2,3) X(3,3) X(4,3)])
17

18 x = X(:,1);
19 y = X(:,2);
20 z = X(:,3);
21

@seismicisolation
@seismicisolation
3D Finite Element Analysis 447

22 Alpha(1) = det([x(2) x(3) x(4)


23 y(2) y(3) y(4)
24 z(2) z(3) z(4)]);
25

26 Alpha(2) = -det([ x(1) x(3) x(4)


27 y(1) y(3) y(4)
28 z(1) z(3) z(4)]);
29

30 Alpha(3) = det([ x(1) x(2) x(4)


31 y(1) y(2) y(4)
32 z(1) z(2) z(4)]);
33

34 Alpha(4) = -det([ x(1) x(2) x(3)


35 y(1) y(2) y(3)
36 z(1) z(2) z(3)]);
37

38

39 Beta(1) = -det([ 1 1 1
40 y(2) y(3) y(4)
41 z(2) z(3) z(4)]);
42

43 Beta(2) = det([ 1 1 1
44 y(1) y(3) y(4)
45 z(1) z(3) z(4)]);
46

47 Beta(3) = -det([ 1 1 1
48 y(1) y(2) y(4)
49 z(1) z(2) z(4)]);
50

51 Beta(4) = det([ 1 1 1
52 y(1) y(2) y(3)
53 z(1) z(2) z(3) ]);
54

55 Gamma(1) = det([ 1 1 1
56 x(2) x(3) x(4)
57 z(2) z(3) z(4)]);
58

59 Gamma(2) = -det([ 1 1 1
60 x(1) x(3) x(4)
61 z(1) z(3) z(4)]);
62

63 Gamma(3) = det([ 1 1 1
64 x(1) x(2) x(4)
65 z(1) z(2) z(4)]);
66

@seismicisolation
@seismicisolation
448 Matrix Structural Analysis and the Finite Element Methods

67 Gamma(4) = -det([ 1 1 1
68 x(1) x(2) x(3)
69 z(1) z(2) z(3)]);
70

71 Delta(1) = -det([ 1 1 1
72 x(2) x(3) x(4)
73 y(2) y(3) y(4)]);
74

75 Delta(2) = det([ 1 1 1
76 x(1) x(3) x(4)
77 y(1) y(3) y(4)]);
78

79 Delta(3) = -det([ 1 1 1
80 x(1) x(2) x(4)
81 y(1) y(2) y(4)]);
82

83 Delta(4) = det([ 1 1 1
84 x(1) x(2) x(3)
85 y(1) y(2) y(3) ]);
86

87 //Coeffs = [Alpha Beta Gamma Delta]'


88

89 // The shape functions


90 //Bcoeff = Coeffs/6/V;
91

92 N(1) = "1 - x/2 -y/3 -z/3";


93 N(2) = "x/2";
94 N(3) = "y/3";
95 N(4) = "z/3"
96

97 b = Beta/(6*V); c = Gamma/(6*V); d = Delta/(6*V);


98 // Strain-displacement matrix
99 B = [b(1) 0 0 b(2) 0 0 b(3) 0 0 b(4) 0 0
100 0 c(1) 0 0 c(2) 0 0 c(3) 0 0 c(4) 0
101 0 0 d(1) 0 0 d(2) 0 0 d(3) 0 0 d(4)
102 c(1) b(1) 0 c(2) b(2) 0 c(3) b(3) 0 c(4) b(4) 0
103 d(1) 0 b(1) d(2) 0 b(2) d(3) 0 b(3) d(4) 0 b(4)
104 0 d(1) c(1) 0 d(2) c(2) 0 d(3) c(3) 0 d(4) c(4)]
105

106

107 // Stress-Strain matrix


108 D = E/(1+nu)/(1-2*nu)*[ 1-nu nu nu 0 0 0
109 nu 1-nu nu 0 0 0
110 nu nu 1-nu 0 0 0
111 0 0 0 (1-2*nu)/2 0 0

@seismicisolation
@seismicisolation
3D Finite Element Analysis 449

112 0 0 0 0 (1-2*nu)/2 0
113 0 0 0 0 0 (1-2*nu)/2]
114

115 // The stiffness matrix of the CSTet is given by


116 k = B'*D*B*V
117

118 // Modified stiffness matrix


119 km = k(10:12,10:12)
120

121 // Applied nodal load vector


122 Aj = [100; 90; -175] // kips
123

124 // Free joint displacement


125 Dj = km\Aj
126

127 // Complete displacement vector


128 d = [[0; 0; 0; 0; 0; 0; 0; 0; 0]
129 Dj]
130 // Structure actions
131 As = k*d
132

133 // Stresses
134 S = D*B*d
135

136 // END: ........... Example 8.1

8.3 HEXAHEDRAL ELEMENT


A hexahedron or brick element is another typical finite element type used in 3D FE
analysis. A hexahedron is a solid/volume element that has eight nodes with three
degrees of freedom at each node, a total of 24 DOFs. Figure 8.6 shows a hexahedral
element with the global (x, y, z) and the natural (r, s, t) coordinate systems.
The shape functions of a brick element in the natural coordinate system are given
by Equation (8.14).

(1 − r)(1 − s)(1 − t) (1 − r)(1 − s)(1 + t)


N1 = , N5 =
8 8
(1 + r)(1 − s)(1 − t) (1 + r)(1 − s)(1 + t)
N2 = , N6 =
8 8
(8.14)
(1 + r)(1 + s)(1 − t) (1 + r)(1 + s)(1 + t)
N3 = , N7 =
8 8
(1 − r)(1 + s)(1 − t) (1 − r)(1 + s)(1 + t)
N4 = , N8 =
8 8

@seismicisolation
@seismicisolation
450 Matrix Structural Analysis and the Finite Element Methods

FIGURE 8.6 Hexahedral (Brick) Element and its Isoparametric Mapping.

The geometry x, y and z as well as the corresponding displacement functions u,


v and w within the brick element are obtained by interpolating the eight nodal values
using the shape functions derived in Equation (8.14), as shown in Equation (8.15).
8 8 8
x = ∑ Ni · xi , y = ∑ Ni · yi , z = ∑ Ni · zi (8.15)
i=1 i=1 i=1
8 8 8
u = ∑ Ni · ui , v = ∑ Ni · vi , w = ∑ Ni · wi (8.16)
i=1 i=1 i=1

DERIVATIVE RELATIONSHIPS IN 3D
The set of partial derivatives of a given 3D function f (r, s,t), in which r, s and t are
functions of x, y and z or vise versa, are determined using the chain rule as follows.

∂f ∂ f ∂x ∂ f ∂y ∂ f ∂z
= · + · + ·
∂r ∂x ∂r ∂y ∂r ∂z ∂r
∂f ∂ f ∂x ∂ f ∂y ∂ f ∂z
= · + · + · (8.17)
∂s ∂x ∂s ∂y ∂s ∂z ∂s
∂f ∂ f ∂x ∂ f ∂y ∂ f ∂z
= · + · + +
∂t ∂ x ∂t ∂ y ∂t ∂ z ∂t

In matrix form, Equation (8.17) becomes as shown below, which is used to solve
for the partial derivatives of f w.r.t. x, y and z; see Equation (8.18). The 3 × 3 matrix
containing the partial derivatives of x, y, and z with respect to r, s, and t is called the
Jacobian matrix (J).

@seismicisolation
@seismicisolation
3D Finite Element Analysis 451

∂f ∂f
       
∂x ∂y ∂z ∂x ∂y ∂z
 ∂r  ∂r ∂r ∂ r  ∂ x ∂r ∂r ∂ r
       
∂ f ∂x ∂y ∂ z  ∂ f  ∂x ∂y ∂ z
       
 = · ; ⇒ J =  
 ∂ s  ∂ s ∂s ∂ s  ∂ y ∂s ∂s ∂ s
       
  ∂x ∂y ∂z ∂f ∂x ∂y ∂ z
∂f
  
∂t ∂t ∂t ∂t ∂z ∂t ∂t ∂t
∂f ∂f
   
 ∂ x  ∂r
   
∂ f ∂ f
   
  = [J]−1 ·   (8.18)
 ∂ y  ∂ s
   
∂ f
∂f
 
∂z ∂t

Thus, the partial derivatives of a function f with variables x, y, z are obtained by


the determinant rations given in Equations (8.19)–(8.21).

∂f ∂y ∂z
∂r ∂r ∂r
∂f ∂y ∂z
∂s ∂s ∂s
∂f ∂y ∂z
∂f ∂t ∂t ∂t
= (8.19)
∂x |J|
∂x ∂f ∂z
∂r ∂r ∂r
∂x ∂f ∂z
∂s ∂s ∂s
∂x ∂f ∂z
∂f ∂t ∂t ∂t
= (8.20)
∂y |J|
∂x ∂y ∂f
∂r ∂r ∂r
∂x ∂y ∂f
∂s ∂s ∂s
∂x ∂y ∂f
∂f ∂t ∂t ∂t
= (8.21)
∂z |J|

@seismicisolation
@seismicisolation
452 Matrix Structural Analysis and the Finite Element Methods

8.3.1 STIFFNESS MATRIX OF A HEXAHEDRAL ELEMENT


The six strains of a brick element can be determined by substituting the expressions
from Equations (8.15) and (8.16) into the above equations. For example, εx and γxy
are given by

∂u ∂y ∂z
∂r ∂r ∂r
∂u ∂y ∂z
∂s ∂s ∂s
∂u ∂y ∂z
∂u ∂t ∂t ∂t
εx = =
∂x |J|
∂x ∂u ∂z ∂v ∂y ∂z
∂r ∂r ∂r ∂r ∂r ∂r
∂x ∂u ∂z ∂v ∂y ∂z
∂s ∂s ∂s ∂s ∂s ∂s
∂x ∂u ∂z ∂v ∂y ∂z
∂u ∂v ∂t ∂t ∂t ∂t ∂t ∂t
γxy = + = +
∂y ∂x |J| |J|

Therefore, the strain–displacement matrix B(r, s, t) can be assembled from the


strain-expressions to be a 6 × 24 matrix where each term is a function of r and/or s
and/or t. The general relationship to determine the stiffness matrix given in Equation
(6.10) is modified for the isoparametric hexahedral element as shown in Equation
(8.22). ZZZ
k = B(x, y, z)T · D · B(x, y, z) dv
V
Z 1Z 1Z 1 (8.22)
T
= B(r, s,t) · D · B(r, s,t) · |J|drdsdt
−1 −1 −1

Using Gauss quadrature, the integral in Equation (8.22) can be approximated by


an L by M by N points integration as shown in the following equation.
Z 1Z 1Z 1
K = B(r, s,t)T · D · B(r, s,t) · |J|drdsdt
−1 −1 −1

L M N
(8.23)
= ∑ ∑ ∑ wi · w j · wk · f (ri , s j ,tk )
i=1 j=1 k=1

where: f (ri , s j ,tk ) = (B(r, s,t)T · D · B(r, s,t) · |J|) evaluated at the integration points
wi = weighting value corresponding to ri
w j = weighting value corresponding to s j

@seismicisolation
@seismicisolation
3D Finite Element Analysis 453

wk = weighting value corresponding to tk


L, M and N = number of integration points along r, s, and t, respectively
(8.24)
Example 8.2 For the rectangular prism supported and loaded as shown in Fig-
ure 8.7 determine the following considering it as a single hexahedral element solid
structure.
• Isoparametric shape functions
• x,y,z in terms of natural coordinates
• Jacobian matrix and its determinant
• Strain–displacement matrix
• Element stiffness matrix
• Nodal displacements
• Support reactions
• Stresses at the centroid of the tetrahedron

FIGURE 8.7 Hexahedral Element.

@seismicisolation
@seismicisolation
454 Matrix Structural Analysis and the Finite Element Methods

Take E = 200 GPa and µ = 0.3. The dimensions are in cm and consider nodes
1–4 are all pin-supported. Use line load along the edge 6–7 qx = 200 N/mm, the
surface load on the face 5-6-7-8 wz = 20 N/mm2 , F7y = 200 N and F8z = 175 N. Use
the nodal locations in cm as given in the following table:

Node x y z
1 0 0 0
2 2 0 0
3 2 1.5 0
4 0 1.5 0
5 0 0 4
6 2 0 4
7 2 1.5 4
8 0 1.5 4

SOLUTION
The volume of the tetrahedral element is computed using Equation (8.3) as V =
12 cm3 . The αi , βi , γi and δi required for the shape functions N as well as the strain-
displacement matrix B are also computed using Equations (8.7)–(8.10) as shown
below.
The shape functions
The shape functions are determined using Equation 8.14 as follows.

(1 ± r) (1 ± s) (1 ± t)
Ni = × ×
2 2 2

Given in line #19–26 of the Scilab/Octave code at the end.

Geometry interpolation: x,y and z as functions of r,s and t


The geometry is computed using Equation (8.15), as shown below.
8
x = ∑ Ni · xi = 10r + 10
i=1
8
y = ∑ Ni · yi = 7.5s + 7.5
i=1
8
z = ∑ Ni · zi = 20t + 20
i=1

Given in line #32–40 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
3D Finite Element Analysis 455

The Jacobian matrix and its determinant


The Jacobian matrix is based on the partial derivatives of the geometry functions
x, y and z in terms of r, s and t, as shown below.
 
∂x ∂y ∂z
 10 0 0

 ∂ r ∂ r ∂ r

 ∂ x ∂ y ∂ z 
  
J= = 0 7.5 0 
 ∂ s ∂ s ∂ s  
 
 ∂ x ∂ y ∂ z 0 0 20
∂t ∂t ∂t

Given in line #43–49 of the Scilab/Octave code at the end.

The determinant of the Jacobian matrix |J| is 1500.

Given in line #52 of the Scilab/Octave code at the end.

Strain–displacement Relation
The six strains can be obtained using the determinant ratios provided in Equa-
tions (8.19)–(8.21). Since the natural coordinates are used to interpolate the dis-
placements, the corresponding computation for the case of εx is shown below.
∂u ∂y ∂z
∂r ∂r ∂r
∂u ∂y ∂z
∂s ∂s ∂s
∂u ∂y ∂z
∂u ∂t ∂t ∂t
εx = =
∂x |J|

u1


 u2 

u3
 
  



f1 f2 f3 f4 f5 f6 f7 f8  u4 
⇒ εx = ×  (8.25)
80 
 u5 

u6
 
 
 
 u7 
u8
where
f1 = −(1 − s)(1 − t), f5 = −(1 − s)(1 + t)

f2 = (1 − s)(1 − t), f6 = (1 − s)(1 + t)

@seismicisolation
@seismicisolation
456 Matrix Structural Analysis and the Finite Element Methods

f3 = (1 + s)(1 − t), f7 = (1 + s)(1 + t)

f4 = −(1 + s)(1 − t), f8 = −(1 + s)(1 + t)

The corresponding computation for the case of εy is shown below.

∂x ∂v ∂z
∂r ∂r ∂r
∂x ∂v ∂z
∂s ∂s ∂s
∂x ∂v ∂z
∂v ∂t ∂t ∂t
εy = =
∂y |J|
 
v1
 
 v2 
 

 v3 

   
g1 g2 g3 g4 g5 g6 g7 g8  v4 
⇒ εy = × (8.26)
 
60


 v5 

v6 
 

 

 v7 

v8
where

g1 = −(r − 1) × (t − 1), g2 = (r + 1) × (t − 1)

g3 = −(r + 1) × (t − 1), g4 = (r − 1) × (t − 1)

g5 = (r − 1) × (t + 1), g6 = −(r + 1) × (t + 1)

g7 = (r + 1) × (t + 1), g8 = −(r − 1) × (t + 1)

And the computation for the case of εz is shown below.

∂x ∂y ∂w
∂r ∂r ∂r
∂x ∂y ∂w
∂s ∂s ∂s
∂x ∂y ∂w
∂w ∂t ∂t ∂t
εz = =
∂z |J|

@seismicisolation
@seismicisolation
3D Finite Element Analysis 457

 
w1
 

 w2 

 
 

 w3 

  
w4 
 
h1 h2 h3 h4 h5 h6 h7 h8  
⇒ εz = ×  (8.27)
160 


w5 
 
 

 w6 

 
 
 w7 
 
w8
where

h1 = −(r − 1) × (s − 1), h2 = (r + 1) × (s − 1)

h3 = −(r + 1) × (s + 1), h4 = (r − 1) × (s + 1)

h5 = (r − 1) × (s − 1), h6 = −(r + 1) × (s − 1)

h7 = (r + 1) × (s + 1), h8 = −(r − 1) × (s + 1)

Strain–displacement Matrix B
The strain displacement matrix B is a 6 × 24 matrix relating the six strains
(εx , εy , ..., γyz ) and the 24 nodal displacements (u1 , v1 , w1 , u2 , ..., w8 the known-
unknowns). The expressions in Equations (8.25), (8.26) and (8.27) and the three
shear strains (not shown here) need to be placed at their appropriate locations in
the B matrix as shown below so that the strain–displacement matrix will be fully
populated.
−(1 − s)(1 − t) −(1 − s)(1 + t)
B(1, 1) = , B(1, 13) =
80 80
(1 − s)(1 − t) (1 − s)(1 + t)
B(1, 4) = , B(1, 16) =
80 80
(1 + s)(1 − t) (1 + s)(1 + t)
B(1, 7) = , B(1, 19) =
80 80
−(1 + s)(1 − t) −(1 + s)(1 + t)
B(1, 10) = , B(1, 22) =
80 80

Note that all the other terms of the first, like B(1,2) B(1,3), B(1,5) ... equal zero.
Hence, the complete strain–displacement matrix B becomes as shown below.

@seismicisolation
@seismicisolation
458 Matrix Structural Analysis and the Finite Element Methods





B(3, 24)


0  

B(1, 22)

B(3, 24) B(2, 23)
0
0
... B(2, 23)

B(1, 22)
0

0
...

...
...
...
...
B(3, 6)

B(3, 6) B(2, 5)
0
0

0
0
B(2, 5)

B(2, 5) B(1, 4)
B(3, 6)
0

0
B(1, 4)
0
0

0
0
B(3, 3)

B(1, 1)
B(3, 3) B(2, 2)
0
0

0
B(2, 2)

B(2, 2) B(1, 1)
0

0
B(1, 1)

B(3, 3)
 0
 0

0




B=


(8.28)

Given in line #55–83 of the Scilab/Octave code at the end.

The Constitutive Matrix


The constitutive matrix D for general 3D element is computed using Equation
(6.6) and found to be as shown below.
 
43.08 18.46 18.46 0 0 0
18.46 43.08 18.46 0 0 0 
 
 
18.46 18.46 43.08 0 0 0 
D = 103 ×   N/mm2
 
 0 0 0 12.31 0 0 
 
 
 0 0 0 0 12.31 0 
 
0 0 0 0 0 12.31

@seismicisolation
@seismicisolation
3D Finite Element Analysis 459

Given in line #86–91 of the Scilab/Octave code at the end.

The Stiffness Matrix


The first of Equation (8.23) will be used to compute the stiffness matrix of the
hexahedral element by explicitly integrating the terms in the integrand. Alternatively,
the integration can be performed numerically using Gauss quadrature as given in
the second part of Equation (8.23). In any case, the integrand is a 24 × 24 matrix of
expressions of (r, s, t), determined by the following product.

Kint = B(r, s,t)T · D · B(r, s,t) · |J|

Given in line #94–97 of the Scilab/Octave code at the end.

The very first term of this matrix is, for example, shown below.
1
Kint(1, 1) = 28125(r · s − r − s + 1)2 + 200, 000(r · t − r − t + 1)2 +
39
393750(s · t − s − t + 1)2


Using either the analytical or numerical method of Equation (8.23), the same
result is obtained (within an accuracy of ±5e − 11) for the stiffness matrix of the
Hexahedron, which is given in Equation (8.29).

Given in line #97–106 of the Scilab/Octave code at the end.

Modified Structure Stiffness Matrix


Since nodes 1–4 are restrained, the modified structure stiffness matrix is ob-
tained by eliminating rows and columns 1–12 of the element stiffness matrix, i.e.,
km = k(13 : 24, 13 : 24).

Given in line #113 of the Scilab/Octave code at the end.

Equivalent Nodal Loads Vector


The distributed loads along edge 6-7 and surface 5-6-7-8 need to be converted
into equivalent nodal loads using Equation (6.11).

F6x = F7x = 150 N


F5z = F6z = F7z = 300 N
F8z = 300 + 175 = 475 N
F7y = 200 N

@seismicisolation
@seismicisolation
460 Matrix Structural Analysis and the Finite Element Methods

The complete nodal load vector Aj at the free nodes is given by:
 
0
 
 0 
 
 300 
 
 
 150 
 
 
 0 
 
 300 
 
Aj =  N
 150

 
 200 
 
 
 300 
 
 0 
 
 
 0 
 
475

Given in line #116 of the Scilab/Octave code at the end.

The Nodal Displacement


The nodal displacement vector is obtained as follows.

D j = km−1 · A j
 
9.84
 
 3.85 
 
 1.14 
 
 
10.90
 
 
11.46
 
5.30
 
−3
 
= 10 ·   mm
 5.31 

 
13.16
 
 
 9.69 
 
 3.30 
 
 
 4.04 
 
5.68

@seismicisolation
@seismicisolation
3D Finite Element Analysis 461

Given in line #120 of the Scilab/Octave code at the end.

The complete structure nodal displacements vector has 24 elements (12 sup-
ported (= 0) and 12 D j s), as shown below.
 
0
0
 
0
 
0
 
0
 
0
 
d= 0

0
 
0
 
0
 
0
 
0
Dj

Given in line #123 of the Scilab/Octave code at the end.

Structure Actions Vector As


The applied forces (equivalent-nodal loads) and the support reactions are ob-
tained using As = k · d as provided in the table below.
Sum

0
0
0
4
145.91
165.55 −314.36 −249.78
300 300 300 475 181.98 −248.65 −951.35 −356.98
Support Reactions (N)
3
24.25 −242.50 −227.67
2
1

0 198.60
Applied Forces (N)
8
0
7
0 150 150
0 200
6
5

0
Node
Fx
Fy
Fz

@seismicisolation
@seismicisolation
462 Matrix Structural Analysis and the Finite Element Methods

Note that the moment equilibrium of the element can also be easily verified.

Given in line #126–130 of the Scilab/Octave code at the end.

Stresses at the Centroid of the Hexahedral Element


To compute stresses at the centroid of the hexahedral element, the strain-
displacement matrix Bo needs to be evaluated at (r, s, t) = (0, 0, 0). Once this is
computed, the required stresses are evaluated as shown below.

σ = D · Bo · d

Given in line #134 of the Scilab/Octave code at the end.

−0.284
   
σx
 σ   −0.455 
 y  
   
 σz   −4.583 
⇒ =  MPa
   
τxy   0.085 
   
−1 
   
τxz  
τyz −0.667

Given in line #137 of the Scilab/Octave code at the end.

@seismicisolation
@seismicisolation
3D Finite Element Analysis
k = 103 ×

226.78 102.56 38.46 −101.99 20.51 7.69 −105.7 −102.56 3.85 3.99 −20.51 19.23
 102.56
 306.55 51.28 −20.51 91.74 25.64 −102.56 −145.58 5.13 20.51 −229.63 10.26

 38.46 51.28 149.86 −7.69 25.64 13.39 −3.85 −5.13 −48.01 19.23 −10.26 −34.47
 −101.99 −20.51 −7.69 226.78 −102.56 −38.46 3.99 20.51 −19.23 −105.7 102.56 −3.85


 20.51 91.74 25.64 −102.56 306.55 51.28 −20.51 −229.63 10.26 102.56 −145.58 5.13

 7.69 25.64 13.39 −38.46 51.28 149.86 −19.23 −10.26 −34.47 3.85 −5.13 −48.01
 −105.7 −102.56 −3.85 3.99 −20.51 −19.23 226.78 102.56 −38.46 −101.99 20.51 −7.69

 −102.56 −145.58 −5.13 20.51 −229.63 −10.26 102.56 306.55 −51.28 −20.51 91.74 −25.64


 3.85 5.13 −48.01 −19.23 10.26 −34.47 −38.46 −51.28 149.86 7.69 −25.64 13.39

 3.99 20.51 19.23 −105.7 102.56 3.85 −101.99 −20.51 7.69 226.78 −102.56 38.46
 −20.51 −229.63 −10.26 102.56 −145.58 −5.13 20.51 91.74 −25.64 −102.56 306.55 −51.28

 19.23 10.26 −34.47 −3.85 5.13 −48.01 −7.69 −25.64 13.39 38.46 −51.28 149.86
 ···

 98.01 51.28 7.69 −58.69 10.26 38.46 −56.7 −51.28 19.23 −5.7 −10.26 3.85

 51.28 137.89 10.26 −10.26 38.18 5.13 −51.28 −76.64 25.64 10.26 −122.51 51.28
 −7.69 −10.26 21.08 38.46 −5.13 −20.23 19.23 25.64 −37.46 −3.85 51.28 −44.16

 −58.69 −10.26 −38.46 98.01 −51.28 −7.69 −5.7 10.26 −3.85 −56.7 51.28 −19.23


 10.26 38.18 5.13 −51.28 137.89 10.26 −10.26 −122.51 51.28 51.28 −76.64 25.64
 −38.46 −5.13 −20.23 7.69 −10.26 21.08 3.85 51.28 −44.16 −19.23 25.64 −37.46

 −56.7 −51.28 −19.23 −5.7 −10.26 −3.85 98.01 51.28 −7.69 −58.69 10.26 −38.46

 −51.28 −76.64 −25.64 10.26 −122.51 −51.28 51.28 137.89 −10.26 −10.26 38.18 −5.13

 −19.23 −25.64 −37.46 3.85 −51.28 −44.16 7.69 10.26 21.08 −38.46 5.13 −20.23


 −5.7 10.26 3.85 −56.7 51.28 19.23 −58.69 −10.26 38.46 98.01 −51.28 7.69
 −10.26 −122.51 −51.28 51.28 −76.64 −25.64 10.26 38.18 −5.13 −51.28 137.89 −10.26
−3.85 −51.28 −44.16 19.23 −25.64 −37.46 38.46 5.13 −20.23 −7.69 10.26 21.08

463
@seismicisolation
@seismicisolation
464

98.01 51.28 −7.69 −58.69 10.26 −38.46 −56.7 −51.28 −19.23 −5.7 −10.26 −3.85
51.28 137.89 −10.26 −10.26 38.18 −5.13 −51.28 −76.64 −25.64 10.26 −122.51 −51.28 

7.69 10.26 21.08 −38.46 5.13 −20.23 −19.23 −25.64 −37.46 3.85 −51.28 −44.16 

−58.69 −10.26 38.46 98.01 −51.28 7.69 −5.7 10.26 3.85 −56.7 51.28 19.23 

10.26 38.18 −5.13 −51.28 137.89 −10.26 −10.26 −122.51 −51.28 51.28 −76.64 −25.64 

38.46 5.13 −20.23 −7.69 10.26 21.08 −3.85 −51.28 −44.16 19.23 −25.64 −37.46 

−56.7 −51.28 19.23 −5.7 −10.26 3.85 98.01 51.28 7.69 −58.69 10.26 38.46 

−51.28 −76.64 25.64 10.26 −122.51 51.28 51.28 137.89 10.26 −10.26 38.18 5.13 

19.23 25.64 −37.46 −3.85 51.28 −44.16 −7.69 −10.26 21.08 38.46 −5.13 −20.23 

Matrix Structural Analysis and the Finite Element Methods



−5.7 10.26 −3.85 −56.7 51.28 −19.23 −58.69 −10.26 −38.46 98.01 −51.28 −7.69 

−10.26 −122.51 51.28 51.28 −76.64 25.64 10.26 38.18 5.13 −51.28 137.89 10.26 

3.85 51.28 −44.16 −19.23 25.64 −37.46 −38.46 −5.13 −20.23 7.69 −10.26 21.08 

226.78 102.56 −38.46 −101.99 20.51 −7.69 −105.7 −102.56 −3.85 3.99 −20.51 −19.23 

102.56 306.55 −51.28 −20.51 91.74 −25.64 −102.56 −145.58 −5.13 20.51 −229.63 −10.26 

−38.46 −51.28 149.86 7.69 −25.64 13.39 3.85 5.13 −48.01 −19.23 10.26 −34.47 

−101.99 −20.51 7.69 226.78 −102.56 38.46 3.99 20.51 19.23 −105.7 102.56 3.85 

20.51 91.74 −25.64 −102.56 306.55 −51.28 −20.51 −229.63 −10.26 102.56 −145.58 −5.13 

−7.69 −25.64 13.39 38.46 −51.28 149.86 19.23 10.26 −34.47 −3.85 5.13 −48.01 

−105.7 −102.56 3.85 3.99 −20.51 19.23 226.78 102.56 38.46 −101.99 20.51 7.69 

−102.56 −145.58 5.13 20.51 −229.63 10.26 102.56 306.55 51.28 −20.51 91.74 25.64 

−3.85 −5.13 −48.01 19.23 −10.26 −34.47 38.46 51.28 149.86 −7.69 25.64 13.39 

3.99 20.51 −19.23 −105.7 102.56 −3.85 −101.99 −20.51 −7.69 226.78 −102.56 −38.46 

−20.51 −229.63 10.26 102.56 −145.58 5.13 20.51 91.74 25.64 −102.56 306.55 51.28 
−19.23 −10.26 −34.47 3.85 −5.13 −48.01 7.69 25.64 13.39 −38.46 51.28 149.86
(8.29)

@seismicisolation
@seismicisolation
3D Finite Element Analysis 465

The corresponding Octave code showing the complete solution steps is given in
the listing below.

Scilab/Octave Code
1 % Example 8.2 - 3D Solid Structure
2 % HEXAHEDRAL ELEMENT
3 clear all; close all; clc;
4 tic() % Time started
5 warning off;
6 pkg load symbolic; % Load sym package
7 syms s r t real; %sym variables as real
8 %% Common units: length in mm, force in kN
9

10 %% GIVEN Parameters
11 %% Nodal coordinates in cm
12 xy = [0 0 0;2 0 0;2 1.5 0;0 1.5 0;
13 0 0 4;2 0 4;2 1.5 4;0 1.5 4]
14

15 v=3/10;
16 E=200e3; %units are in N/mm2
17

18 %% SHAPE FUNCTION N
19 N(1) = (1-r)*(1-s)*(1-t)/8;
20 N(2) = (1+r)*(1-s)*(1-t)/8;
21 N(3) = (1+r)*(1+s)*(1-t)/8;
22 N(4) = (1-r)*(1+s)*(1-t)/8;
23 N(5) = (1-r)*(1-s)*(1+t)/8;
24 N(6) = (1+r)*(1-s)*(1+t)/8;
25 N(7) = (1+r)*(1+s)*(1+t)/8;
26 N(8) = (1-r)*(1+s)*(1+t)/8;
27

28 % Converting Dimension to mm
29 xy *= 10;
30

31 %% Interpolating geometry (x,y,z) vs (r,s,t) relationship


32 sx = 0
33 for i=1:8 sx += N(i)*xy(i,1) end
34 X = simplify(sx)
35 sx = 0
36 for i=1:8 sx += N(i)*xy(i,2) end
37 Y = simplify(sx)
38 sx = 0
39 for i=1:8 sx += N(i)*xy(i,3) end

@seismicisolation
@seismicisolation
466 Matrix Structural Analysis and the Finite Element Methods

40 Z = simplify(sx)
41

42 %% ELEMENTS JACOBIAN MATRIX


43 Xr = diff(X,r); Yr = diff(Y,r); Zr = diff(Z,r);
44 Xs = diff(X,s); Ys = diff(Y,s); Zs = diff(Z,s);
45 Xt = diff(X,t); Yt = diff(Y,t); Zt = diff(Z,t);
46

47 J = [Xr Yr Zr
48 Xs Ys Zs
49 Xt Yt Zt];
50

51 %DETRMINANT OF JACOBIAN MATRIX


52 Jd = det(J)
53

54 %% Derivatives of N w.r.t. r, s and t


55 Nr = diff(N,r); Ns = diff(N,s); Nt = diff(N,t);
56

57 %STRAIN functions and


58 %STRAIN DISPLACMENT MATRIX B
59 B = sym(zeros(6,24));
60

61 for i=1:8 % for each node


62 ux(i) = det([Nr(i) Yr Zr
63 Ns(i) Ys Zs
64 Nt(i) Yt Zt])/Jd;
65

66 vy(i) = det([Xr Nr(i) Zr


67 Xs Ns(i) Zs
68 Xt Nt(i) Zt])/Jd;
69

70 wz(i) = det([Xr Yr Nr(i)


71 Xs Ys Ns(i)
72 Xt Yt Nt(i)])/Jd;
73

74 B(1,3*(i-1)+1) = ux(i);
75 B(2,3*(i-1)+2) = vy(i);
76 B(3,3*i) = wz(i);
77 B(4,3*(i-1)+1) = vy(i);
78 B(4,3*(i-1)+2) = ux(i);
79 B(5,3*(i-1)+1) = wz(i);
80 B(5,3*i) = ux(i);
81 B(6,3*(i-1)+2) = wz(i);
82 B(6,3*i) = vy(i);
83 end
84

@seismicisolation
@seismicisolation
3D Finite Element Analysis 467

85 %% CONSTITUTIVE MATRIX
86 D= E/(1+v)*(1-2*v)*[ (1-v) v v 0 0 0
87 v (1-v) v 0 0 0
88 v v (1-v) 0 0 0
89 0 0 0 (1-2*v)/2 0 0
90 0 0 0 0 (1-2*v)/2 0
91 0 0 0 0 0 (1-2*v)/2]
92

93 %% STIFFNESS MATRIX expression in NATURAL COORDINATES


94 Kint = B'*D*B*Jd;
95

96 %% DEFINITE INTEGRAL, exact integration


97 Kex = double(int(int(int(Kint,r,-1,1),s,-1,1),-1,1));
98

99 %% Write stiffness into csv file


100 csvwrite ('hexStiff_exact.csv', Kex/1000)
101

102 %% NUMERICAL INTEGRATION, two-point Gaussian quadrature,


103 p=1/sqrt(3)
104 F = function_handle(Kint,'vars',[r,s,t]);
105 Kg = F(-p,-p,-p) + F(p,-p,-p) + F(p,p,-p) + F(-p,p,-p) + ...
106 F(-p,-p,p) + F(p,-p,p) + F(p,p,p) + F(-p,p,p);
107 %%
108

109 %% Write stiffness info csv file


110 csvwrite ('hexStiff_Gauss.csv', Kg/1000)
111

112 %% Modified stiffness matrix


113 km = Kex(1:12,1:12)
114

115 %% The nodal load vector at the free nodes equals


116 Aj = [0 0 300 150 0 300 150 200 300 0 0 475]'
117

118 %% Nodal displacements are solved using


119 %% Dj = inv(km) * Aj or
120 Dj = km\Aj
121

122 %% Complete Structure displacements vector


123 d = [Dj;zeros(12,1)]
124

125 %% Structure action forces As are given by


126 As = Kex*d
127

128 %% Fx, Fy and Fz components at each node are obtained


129 %% by reshaping As vector as follows

@seismicisolation
@seismicisolation
468 Matrix Structural Analysis and the Finite Element Methods

130 F = reshape(As, 3, 8)
131 %% Each column gives the three forces at each node
132

133 %% B computed at (0,0,0) becomes


134 Bo = subs(subs(subs(B,r,0),s,0),t,0)
135

136 %% Stresses at the centroid of the hexahedral element


137 Stress = double(D*Bo*d)
138 toc() % Time finished (toc-tic)
139

140 % END: ........... Example 8.2

8.4 PROBLEMS

8.1 The x–y–z coordinates of tetrahedral elements are given in the table below. In
each case, answer the problems following the table if E = 110 GPa, ν = 0.33 (FPS:
E = 16,000 ksi, ν = 0.33).

Node-1 Node-2 Node-3 Node-4


Case
(x1 , y1 , z1 ) (x2 , y2 , z2 ) (x3 , y3 , z3 ) (x4 , y4 , z4 )
mm/kN – SI
SI–1 (50, 0, 0) (125, 0, 0) (0, 100, 0) (0, 0, 100)
SI–2 (75, 75, 25) (250, 50, 150) (225, 50, 50) (200, 150, 175)
SI–3 (375, 0, 0) (750, 0, 0) (500, 625, 0) (500, 0, 0)
in/kips – FPS
FPS–1 (2, 0, 0) (5, 0, 0) (0, 4, 0) (0, 0, 4)
FPS–2 (3, 3, 1) (10, 2, 6) (9, 2, 2) (8, 6, 5)
FPS–3 (15, 0, 0) (30, 0, 0) (20, 25, 0) (20, 0, 20)

As a single solid tetrahedral element, determine the:

a) Shape functions
b) Strain displacement matrix
c) Stiffness matrix of the element

8.2 For the tetrahedral elements in Problem 8.1, further information regarding the
nodal displacements (dx , dy , and dz ) and nodal forces ( fx , fy , and fz ) is given in the
table below. For each of the three elements and each of the three load/displacement
data, determine the unknown parameters identified in the table? Also compute the

@seismicisolation
@seismicisolation
3D Finite Element Analysis 469

stresses on the element.

Case Node-1 Node-2 Node-3 Node-4


mm/kN – SI
A–1 (d) (?, 0, 0) (?, 0, 0.5) (?, ?, 1) (0, 0, ?)
A–1 (f) (50, ?, ?) (125, ?, ?) (0, −100, ?) (?, ?, 100)
A–2 (d) (?, 0.75, ?) (0, ?, ?) (−2, 0.5, 0) (0, ?, 1)
A–2 (f) (75, ?, 25) (?, 50, −150) (?, ?, ?) (?, 150, ?)
A–3 (d) (?, ?, 0) (−1.5, ?, 0) (2, ?, 0) (?, 0, 0)
A–3 (f) (50,375,?) (?, 125, ?) (?, 100, ?) (400, ?, ?)
in/kips – FPS
B–1 (d) (?, 0, 0) (?, 0, 0.02) (?, ?, 0.04) (0, 0, ?)
B–1 (f) (11, ?, ?) (28, ?, ?) (0, −22.5, ?) (?, ?, 22.5)
B–2 (d) (?, 0.06, ?) (0, ?, ?) (−0.08, 0.02, 0) (0, ?, 0.04)
B–2 (f) (17, ?, 6) (?, 11, −34) (?, ?, ?) (?, 34, ?)
B–3 (d) (?, ?, 0) (−0.12, ?, 0) (0.08, ?, 0) (?, 0, 0)
B–3 (f) (11, 84, ?) (?, 28, ?) (?, 22, ?) (90, ?, ?)

8.3 Given a six node hexahdral element having its nodes are in mm #1 @ (0, 0, 0),
#2 @ (20, 0, 0), #3 @ (20, 20, 0), #4 @ (0, 20, 0), #5 @ (0, 0, 20), #6 @ (20, 0, 20),
#7 @ (20, 20, 20) and #8 @ (0, 20, 20) [For FPS in inches the nodes are #1 @ (0, 0,
0), #2 @ (0.8, 0, 0), #3 @ (0.8, 0.8, 0), #4 @ (0, 0.8, 0), #5 @ (0, 0, 0.8), #6 @ (0.8,
0, 0.8), #7 @ (0.8, 0.8, 20) and #8 @ (0, 0.8, 0.8)]. As a single solid element:

a) Determine its shape functions in the natural coordinates r, s, and t


b) Express x, y and z in terms of natural coordinates
c) Evaluate the Jacobian matrix and its determinant

d) Determine the strain–displacement matrix


e) Compute the element stiffness matrix

8.4 Derive the shape functions of a ten-nodded (quadratic) tetrahedral ele-


ment shown in Figure 8.8(a):
Vi
a) as general expressions in terms of the volume coordinates Li = , in
V
which i = 1, 2, 3, 4

@seismicisolation
@seismicisolation
470 Matrix Structural Analysis and the Finite Element Methods

FIGURE 8.8 Problems Set 8.

b) if the coordinates of the corner nodes (1, 2, 3 and 4) are at (0, 0, 0), (1, 0,
0), (0, 1, 0) and (0, 0, 1) units, while the remaining nodes are at the center
of respective edges

8.5 Derive the shape functions of a 20-nodded quadratic hexahedral element


shown in Figure 8.8(b) which has three nodes along all the edges. The coordinates
of the corner nodes are #1 @ (0, 0, 0), #2 @ (20, 0, 0), #3 @ (20, 20, 0), #4 @ (0,
20, 0), #5 @ (0, 0, 20), #6 @ (20, 0, 20), #7 @ (20, 20, 20) and #8 @ (0, 20, 20);
all the other nodes are located at the center of the corresponding edges. (For FPS in
inches the corner nodes are #1 @ (0, 0, 0), #2 @ (0.8, 0, 0), #3 @ (0.8, 0.8, 0), #4
@ (0, 0.8, 0), #5 @ (0, 0, 0.8), #6 @ (0.8, 0, 0.8), #7 @ (0.8, 0.8, 20) and #8 @ (0,
0.8, 0.8)).

@seismicisolation
@seismicisolation
Beam Deflection
Cantilever Beam Under Uniformly Distributed Loading

w · L3 w
θmax = θx = · (L3 − x3 )
6EI 6EI
w · L4 w
ymax = − yx = − · (3 · L4 − 4 · x · L3 + x4 )
8EI 24EI

Cantilever Beam Under Concentrated Load

P · L2 P · (L2 − x2 )
θmax = − θx = −
2EI 6EI
P · L3 P · (L − 3 · x · L2 − x3 )
3
ymax = yx =
3EI 6EI

@seismicisolation
@seismicisolation 471
472 Beam Deflection

Cantilever Beam Under Bending Moment

M·L P · (L2 − x2 )
θmax = − θx = −
EI 6EI
M · L2 M · (L2 − 2 · x · L + x2 )
ymax = − yx = −
2EI 2EI

Simply Supported Beam Under Uniformly Distributed Loading

w · L3 w
θ1 = −θ2 = − θx = − (L3 − 6L · x2 + 4 · x3 )
24EI 24EI
5 · w · L4 w · x · (L3 − 2 · L · x2 + x3 )
ymax = − yx = −
384EI 24EI

@seismicisolation
@seismicisolation
Beam Deflection 473

Simply Supported Beam Under Concentrated Load

P · a · b · (L + b) P · a · b(L + a)
θ1 = − θ2 =
6LEI 6LEI
P·b
θx1 = − · (L2 − b2 − 3 · x2 )
6LEI
P·b·x
yx1 = · (L2 − b2 − x2 ) 0≤x≤a
6LEI" #
P·b L
yx2 = · (x − a)3 + x · (L2 − b2 ) − x3 a<x≤L
6LEI b

L
For the case where a = :
2
P · L2 P · L2
θ1 = − θ2 =
16EI 16EI
P · L2
θx1 = −
16EI
!
P·x 3 · L2
yx1 = · − x2
12EI 4
L
0≤x≤
2

@seismicisolation
@seismicisolation
474 Beam Deflection

Simply Supported Beam Under Bending Moment

M M
θ1 = (3b2 − L2 ) θ2 = (3a2 − L2 )
6LEI 6LEI
M
θx1 = − (L2 − 3 · b2 − 3 · x2 )
6LEI
M·x 2
yx1 = − (L − 3 · b2 − x2 ) 0≤x≤a
6LEI
M·x 2
yx2 = [(L − 3 · b2 − x2 ) + 3L · (x − a)2 ] a < x ≤ L
6LEI
L
For the case where a = b = :
2
M·L
θ1 = θ2 = −
24EI
!
M L2
θx1 = − 3 · x2
6LEI 4
!
M·x L2 L
yx1 = − x2 0≤x≤
6LEI 4 2
 ! !2 
M L2 L
yx2 = x · − x2 + 3L · x −  a≤x≤L
6LEI 4 2

@seismicisolation
@seismicisolation
Fixed-End Actions
Loading Node-1 Node-2

wL2 wL2
M1 = M2 = −
12 12

wL wL
V1 = V2 =
2 2

Pab2 Pba2
M1 = M2 = −
L2 L2

Pb2 (3a + b) Pa2 (3b + a)


V1 = V2 =
L3 L3

M(2ab − b2 ) M(2ab − a2 )
M1 = M2 =
L2 L2

6Mab 6Mab
V1 = V2 = −
L3 L3

wL2 wL2
M1 = M2 = −
30 20

3wL 7wL
V1 = V2 =
20 20

@seismicisolation
@seismicisolation 475
476 Fixed-End Actions

Loading Node-1 Node-2

wa2
M1 = (6L2 − 8aL + 3a2 )
12L2

wa
V1 = (2L3 − 2a2 L + a3 )
2L3

wa3
M2 = − (4L − 3a)
12L2

wa3
V2 = − (2L − a)
2L3

6EI∆ 6EI∆
M1 = M2 =
L2 L2

12EI∆ 12EI∆
V1 = V2 = −
L3 L3

4EIθ 2EIθ
M1 = M2 =
L L

6EIθ 6EIθ
V1 = V2 = −
L2 L2

@seismicisolation
@seismicisolation
FPS vs SI Unit Conversion
Appendix

From To Multiply by
meter (m) to ft 3.28084
Length

meter (m) to in 39.37008


inch (in) to millimeter (mm) 25.4
ft to m 0.30480
in2 to mm2 645.16
Area

f t2 to m2 0.09290
m2 to f t2 10.76387
m2 to in2 1550.00310
kips to kilo-newton (kN) 4.44822
Force/length Force

kN to kips 0.22481
pound/ft (lb/ft) to newton/meter(N/m) 14.59390
pound/in (lb/in) to kilo-newton/meter(N/m) 0.17513
kN/m to lb/ft 68.52178
kN/m to lb/in 5.71015
Moment

kips-foot to kilo-newton-meter (kN-m) 1.35581


kN-m to kips-ft 0.73756
N-m to lb-in 8.85075
mega-Pascal (MPa) to kips/in2 (ksi) 0.14504
Stress

kips/in2 (ksi) to mega-Pascal (MPa, 106 Pa) 6.89476


giga-Pascal (GPa, 109 Pa) to kips/in2 (ksi) 145.03773

@seismicisolation
@seismicisolation 477
@seismicisolation
@seismicisolation
References
1. A. Sengupta. Symbolic Toolbox for Scilab, 2024. https://github.com/sengupta/
scilab-maxima/tree/master.

2. AEM. Applied Element Method, 2023. www.appliedelementmethod.org/.

3. K. J. Bathe. Finite Element Procedures. Prentice Hall, NJ, 1996.

4. S. L. Campbell, J.-P. Chancelier and R. Nikoukhah. Modeling and Simulation in Scil-


ab/Scicos with ScicosLab 4.4. Springer, NY, USA, 2010.

5. S. Chandrasekaran. Advanced Structural Analysis with MATLAB. CRC Press, Boca


Raton, FL, USA, 2019.

6. A. Pajankar and S. Chandu. GNU Octave by Example – A Fast and Practical Approach
to Learning GNU Octave. Apress, U.K., 2020.

7. S. W. Lee and P. W. Chung. Finite Element Method for Solids and Structures: A Concise
Approach. Cambridge University Press, 2021.

8. R. W. Clough. Early history of the finite element method from the view point of a
pioneer. International Journal for Numerical Methods in Engineering, 483–487, 2004.

9. R. D. Cook. Finite Element Modelling for Stress Analysis. John Wiley & Sons, Canada,
1994.

10. J. W. Eaton, D. Bateman, S. Hauberg and R. Wehbring. GNU Octave Version 8.2.0 Man-
ual: A High-Level Interactive Language for Numerical Computations, 2022, https:
//docs.octave.org/v8.2.0/.

11. ESI Group. Scilab, 2024. Website: www.scilab.org/tutorials.

12. F. Moukalled, et al. The Finite Volume Method in Computational Fluid Dynamics, Fluid
Mechanics and Its Applications. Springer, 2016.

13. C. A. Felippa. A historical outline of matrix structural analysis: a play in three acts.
Computers & Structures, 79(14):1313–1324, 2001.

14. W. McGuire, R .H. Gallagher and R. D. Ziemian. Matrix Structural Analysis. Wiley,
New York, 2015.

15. K. K. Gupta and J. L. Meek. A brief history of the beginning of the finite element
method. International Journal for Numerical Methods in Engineering, 47:3761–3774,
2000.

16. B. Habte. A Computer Program for the Elastic Analysis of Plane Structures. Addis
Ababa University, Unpublished MSc thesis, 1988.

17. J. S. Hansen. GNU Octave: Beginner’s Guide. Packt, Birmingham, UK – Mumbai, India
2011.

@seismicisolation
@seismicisolation 479
480 References

18. C. Jain. Advanced Programming in SCILAB. Alpha Science International Ltd., Oxford,
2017.

19. Mike Pomax Kamermans. Gaussian quadrature weights and abscissae, 2011. https:
//pomax.github.io/bezierinfo/legendre-gauss.html.

20. A. Kassimali. Matrix Analysis of Structures. Cengage, Stamford, CT, 2012.

21. A. Kassimali. Structural Analysis. Cengage, Boston, MA, 2020.

22. J. T. Katsikadelis. The Boundary Element Method for Engineers and Scientists – Theory
and Applications. Elsevier, 2016.

23. A. R. Khoei. Extended Finite Element Method Theory and Applications. John Wiley &
Sons, 2015.

24. G. R. Liu. Meshfree Methods — Moving Beyond the Finite Element Method. CRC Press,
Boca Raton, FL, 2010.

25. D. L. Logan. A First Course in the Finite Element Method. Cengage Learning, 2017.

26. D. Madier. Practical Finite Element Analysis for Mechanical Engineering. FEA
Academy, 2020.

27. P. Marti. Theory of Structures: Fundamentals of Framed Structures, Plates and Shells.
Wilhelm Ernst & Sohn, Berlin, 2013.

28. S. T. Mau. Introduction to Structural Analysis: Displacement and Force Methods. CRC
Press, Berlin, 2012.

29. Maxima CAS Foundation. Maxima CAS, 2024. https://maxima.sourceforge.io/.

30. S. Mazumder. Numerical Methods for Partial Differential Equations – Finite Difference
and Finite Volume Methods. Elsevier, U.K., 2016.

31. J. C. McCormac. Structural Analysis: Using Classical and Matrix Methods. John Wiley
and Sons, 2007.

32. K. B. Mustapha. Finite Element Computations in Mechanics with R. Taylor & Francis
Group, Boca Raton, FL, USA, 2018.

33. S. Nagar. Introduction to Octave: For Engineers and Scientists. Apress, NY, 2017.

34. S. Nagar. Introduction to Scilab: For Engineers and Scientists. Apress, 2017.

35. P. Nagarajan. Matrix Methods of Structural Analysis. CRC Press, Boca Raton, FL, 2019.

36. Octave Package. Octave Symbolic Functions, 2024. https://octave.sourceforge.


io/symbolic/overview.html.

37. Octave Package. The Octave Symbolic Package, 2024. https://gnu-octave.


github.io/packages/symbolic/.

38. Octave-Wiki. Octave Wiki, 2024. https://wiki.octave.org/Symbolic_package.

@seismicisolation
@seismicisolation
References 481

39. E. Onate. Structural Analysis with the Finite Element Method (Linear Statics) Volume 1.
Basis and Solids. International Center for Numerical Methods in Engineering (CIMNE),
2009.

40. M. Paz and W. Leigh. Integrated Matrix Analysis of Structures: Theory and Computa-
tion. Alpha Science International Ltd., Oxford, 2017.

41. T. H. H. Pian. Some notes on the early history of hybrid stress finite element method.
International Journal for Numerical Methods in Engineering, 47:419–425, 2000.

42. S. S. Rao. The Finite Element Method in Engineering. Elsevier Ltd., 2018.

43. A. Runchal. Origins and development of the finite volume CFD method at Imperial Col-
lege. ICHMT International Symposium on Advances in Computational Heat Transfer,
pp. 923–924, 2017.

44. Sage Software. Sage Software Manual, 2024. https://www.sagemath.org/tour-


quickstart.html.

45. Scilab India. Scilab Symbolic Toolbox, (n.d.). https://scilab.in/scilab-


symbolic-toolbox.

46. The Octave Project. GNU Octave Manual, 2024. https://octave.org.

47. J. D. Todd. Structural Theory and Analysis. The Macmillan Press Ltd., London, 1974.

48. O. C. Zienkiewicz and R. L. Tylor. Structural Analysis withthe Finite Element Method
(Linear Statics) Volume 1. Basis and Solids. Elsevier Ltd., 2013.

49. W. Weaver and J. M. Gere. Matrix Analysis of Framed Structures. Van Nostrand Rein-
hold, New York, 1990.

50. Wikimedia Foundation. Wikipedia Website, 2024. //https://en.wikipedia.org/


wiki/List_of_finite_element_software_packages.

51. A. Williams. Structural Analysis: In Theory and Practice. Elsevier, 2009.

52. A. Worku. Development of a calibrated pasternak foundation model for practical use.
International Journal of Geotechnical Engineering, 8(1):26–33, 2014.

53. A. Worku & B. Habte. Analytical formulation and finite-element implementation tech-
nique of a rigorous two-parameter foundation model to beams on elastic foundations.
Geomechanics and Geoengineering, 17(2):547–560, 2022.

@seismicisolation
@seismicisolation
@seismicisolation
@seismicisolation
Index
1D governing differential equation 336; other
A numerical methods 340; postprocessing 349;
preprocessing 346; pros and cons 322; 3D
action transformation matrix (BMS) 86
elasticity equation 325–7; 3D elements 325;
axisymmetric problems 363
steps in 330; 2-noded bar element 336–7; 2D
B continuum structure 361–3
flexibility coefficient 10
basic flexibility method 35; solution steps 37
flexibility matrix 13
basic stiffness method 59; solution steps 60
formalized flexibility method 81; beam element
basic structure 59–60
flexibility 82; grid element flexibility 84; plane
beam on elastic foundation 285
frame element flexibility 83; redundant actions
bi-linear rectangular element 403; shape functions
(AQ) 86; space frame element flexibility 85;
of 403; strain-displacement matrix 404
truss element flexibility 82; solution steps 88
brick element see hexahedral element
formalized stiffness method 138; beam element
C stiffness 139; grid element stiffness 141; plane
frame element stiffness 140; solution steps 146;
classical methods 9 space frame element stiffness 142; truss element
compatibility matrix see displacement stiffness 139
transformation matrix
constant strain tetrahedral element (CSTet) 435 G
constant strain triangle (CST) 365; area
coordinates 366; shape function 367; stiffness Gauss quadrature 419–20; in 2D 422
matrix 370–2; strain-displacement matrix 371 governing differential equation 336
constitutive matrix: plane strain element 364;
plane stress element 365; 3D element 327 H
hexahedral element 449; shape functions of 449
D
direct stiffness method (DSM) 196; bar element I
stiffness 197; beam element stiffness 198; grid inclined roller support 288–91
element stiffness 203; plane frame element interpolation function 328; for beam element
stiffness 201; plane truss element stiffness 199; 352; characteristics of 329; linear 332, 410; for
space frame element stiffness 207; space truss tetrahedral element 438
element stiffness 204; spring element stiffness isoparametric representation 410; isoparametric
197; solution steps 210 mapping 412; for 1D elements 410;
displacement transformation matrix (CMS) 140–1 quadrilateral element 412; for 2D elements
412–13
E
equilibrium matrix see action transformation J
matrix
Jacobian matrix 412–13; of hexahedral element
equivalent nodal loads 60, 330
450–1; of quadrilateral element 438
F
K
finite element method 319; application areas 322;
available software 322; beam element 350; kinematic indeterminancy 5
brief history 322; discretization 319; element
stiffness matrix 329; error sources 324; mesh L
319; node 319; quadratic bar element 337–8; linear strain triangle 383; shape functions of 384;
known-unknowns 328; nonlinear analysis 323; strain-displacement matrix 385

@seismicisolation
@seismicisolation 483
484 Index

M shape function see interpolation function


matrix structural analysis (MSA) 3, 10 static indeterminancy 5
member discontinuity 291 stiffness coefficient 12
stiffness matrix 13
N strain displacement matrix (B) 329; of beam
element 370
natural coordinates 409; 1D shape functions 410; strong form 336
quadrilateral element 412 structural classification 3; beam 3; grid 5; plane
non-prismatic element 287 frame 5; plane truss 3; space frame 5; space truss 5
numerical integration 419; see also Gauss structure flexibility matrix: assembled 87;
quadrature unassembled 85
structure stiffness equation: assembled 141;
O unassembled 140; partitioning and solving 142
Octave software 19 symbolic computation 333
symmetric and anti-symmetric structures 292
P
T
Pascal’s triangle 383–4
plane strain problem 364 tetrahedral element 435
plane stress problem 363 transformation matrix in DSM: for grid element
primary structure 35 204; for plane frame element 203; for plane
principle of virtual works 141 truss element 201; for space frame element 209;
prismatic structures 3 for space truss element 207
programming in Scilab/Octave 22; branching or typical finite elements 320
case statement 26; data types 23; expression
24; file input/output 26; if/else statement 24; U
perator precedence 23; for statement 24, 25; unassembled structure flexibility equation 86
user defined functions 27; variables 23; while unassembled structure stiffness equation 140
statement 25
V
S vector transformation for 2D 200; for 3D 205–6
Scilab software 15 volume coordinates 437

@seismicisolation
@seismicisolation

You might also like