The Finite Element Method
using MATLAB
Young WW. won
Hyochoong Bang
CRC PressCRC MECHANICAL
ENGINEERING SERIES
Edited by Frank A. Kulacki, University of Minnesota
Published
Entropy Generation Minimization
Adrian Bejan, Duke University
The Finite Element Method Using MATLAB
Young W. Kwon, Naval Postgraduate Schoo!
Hyochoong Bang, Korea Aerospace Research Institute
To be Published
Fundamentals of Environmental Discharge Modeling
Lorin R. Davis, Oregon State University
Mechanics of Composite Materials
Autar K. Kaw, University of South Florida
Nonlinear Analysis of Structures
M. Sathyamoorthy, Clarkson University
Mechanics of Solids and Shells
Gerald Wempter, Georgia Institute of Technology
Viscoelastic Solids
Roderic Lakes, University of lowaLIMITED WARRANTY
CRC Press warrants the physical diskette(s) enclosed herein to be free of defects in materials and workmanship
for a period of thirty days from the date of purchase. If within the warranty period CRC Press receives written
notification of defects in materials or workmanship, and such notification is determined by CRC Press to be correct,
CRC Press will replace the defective diskette(s).
The entire and exclusive liability and remedy for breach of this Limited Warranty shall be limited to replacement
of defective diskette(s) and shall not include or extend to any claim for or right to cover any other damages, including
but not limited to, loss of profit, data, or use of the software, or special, incidental, or consequential damages or other
similar claims, even if CRC Press has been specifically advised of the possibility of such damages. In no event will
the liability of CRC Press for any damages (o you or any other person ever exceed the lower suggested list price or
actual price paid for the software, regardless of any form of the claim.
CRC Press specifically disclaims all other warranties, express or implied, including but not limited to, any implied
warranty of merchantability or fitness for a particular purpose. Specifically, CRC Press makes no representation or
warranty that the software is fit for any particular purpose and any implied warranty of merchantability is limited to
the thirty-day duration of the Limited Warranty covering the physical diskette(s) only (and not the software) and is
otherwise expressly and specifically disclaimed,
Since some states do not allow the exclusion of incidental or consequential damages, or the limitation on how long
an implied warranty lasts, some of the above may not apply to you.
DISCLAIMER OF WARRANTY AND LIMITS OF LIABILITY: The author(s) of this book have used their best
efforts in preparing this material. These efforts include the development, research, and testing of the theories and
programs to determine their effectiveness. Neither the author(s) nor the publisher make warranties of any kind,
express or implied, with regard to these programs or the documentation contained in this book, including without
limitation warranties of merchantability or fitness for a particular purpose. No liability is accepted in any event for
any damages, including incidental or consequential damages, lost profits, costs of lost data or program material, or
otherwise in connection with or arising out of the furnishing, performance, or use of the programs in this book.
Library of Congress Cataloging-in-Publication Data
Kwon, Young W.
The finite element method using MATLAB / by Young W. Kwon and Hyochoong Bang.
p. cm. — (The mechanical engineering series)
Includes bibliographical references and index.
ISBN 0-8493-9653-0 (alk. paper)
1. Finite clement method—Data processing. 2. MATLAB I. Bang, Hyochoong.
IL Title IIL. Series: Advanced topics in mechanical engineering series.
TA347.F5K86 1996
624.1'7'028553—de20 96-19091
cr
This book contains information obtained from authentic and highly regarded sources. Reprinted material is quoted
with permission, and sources are indicated. A wide variety of references are listed. Reasonable efforts have been made
to publish reliable data and information, but the author(s) and the publisher cannot assume responsibility for the
validity of all materials or for the consequences of their use.
Neither this book nor any part may be reproduced or transmitted in any form or by any means, electronic or
mechanical, including photocopying, microfilming, and recording, or by any information storage or retrieval system,
‘without prior permission in writing from the publisher.
The consent of CRC Press LLC does not extend to copying for general distribution, for promotion, for creating
new works, or for resale. Specific permission must be obtained in writing from CRC Press LLC for such copying.
Direct all inquiries to CRC Press LLC, 2000 Corporate Blvd. N.W., Boca Raton, Florida 33431.
© 1997 by CRC Press LLC
No claim to original U.S. Goverment works
Intemational Standard Book Number 0-8493-9653-0
Library of Congress Card Number 96-19091
Printed in the United States of America 34567890
Printed on acid-free paperTABLE OF CONTENTS
CHAPTER 1. INTRODUCTION TO MATLAB
Lt
12
1.3
L4
1.5
1.6
4 Hd
18
19
1.10
Ba
1.12
1.13
114
115
Finite Element Method
Overview of the Book
About MATLAB
Vector and Matrix Manipulations
Matrix Functions
Data Analysis Functions
Tools for Polynomials
Making Complex Numbers
Nonlinear Algebraic Equations
Solving Differential Equations
Loop and Logical Statement
Writing Function Subroutines
File Manipulation
Basic Input-Output Functions
Plotting Tools
CHAPTER 2. APPROXIMATION TECHNIQUES
21
2.2
2.3
24
25
2.6
27
Methods of Weighted Residual
Weak Formulation
Piecewise Continuous Trial Function
Galerkin’s Finite Element Formulation
Variational Method
Rayleigh-Ritz Method
Rayleigh-Ritz Finite Element Method
Problems
CHAPTER 3. FINITE ELEMENT PROGRAMMING
3.1
3.2
3.3
34
3.5
CHAPTER 4. DIRECT APPROACH WITH SPRING SYSTEM
4l
42
4.3
Overall Program Structure
Input Data
Assembly of Element Matrices and Vectors
Application of Constraints
Example Programs
Problems
Linear Spring
‘Axial Member
Torsional Member
PRVVEE EEE
RSSSRUSRESSanwnmee
31
34
37
42
42
43
46
51
52
54
69
31
51
7144
Other Systems
Problems
CHAPTER 5. LAPLACE’S AND POISSON’S EQUATIONS
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.10
5.11
5.12
Governing Equation
Linear Triangular Element
Bilinear Rectangular Element
Boundary Integral
‘Transient Analysis
Time Integration Technique
Axisymmetric Analysis
‘Three-Dimensional Analysis
MATLAB Application to 2-D Steady State Analysis
MATLAB Application to Axisymmetric Analysis
MATLAB Application to Transient Analysis
MATLAB Application to 3-D Steady State Analysis
Problems
CHAPTER 6. ISOPARAMETRIC ELEMENTS
One-Dimensional Elements
Quadrilateral Elements
‘Triangular Elements
Gauss Quadrature
MATLAB Application to Gauss Quadrature
MATLAB Application to Laplace Equation
Problems
CHAPTER 7. TRUSS STRUCTURES
ae
7.2
7.3
74
15
7.6
One-Dimensional Truss
Plane Truss
Space Truss
MATLAB Application to Static Analysis
MATLAB Application to Eigenvalue Analysis
MATLAB Application to Transient Analysis
Problems
CHAPTER 8. BEAM AND FRAME STRUCTURES
8.1
8.2
8.3
8.4
8.5
Euler-Bernoulli Beam
Timoshenko Beam
Beam Elements With Only Displacement Degrees of Freedom
Mixed Beam Element
Hybrid Beam Element
17
80
83
86
90
92
96
101
103
107
119
124
148
153
157
160
168
170
176
183
193
197
199
203
204
215
223
231
235
242
245
249
253
83
157
197
2358.6
8.7
8.8
8.9
8.10
8.11
8.12
8.13
8.14
Composite Beams
Two-Dimensional Frame Element
Three-Dimensional Frame Element
MATLAB Application to Static Analysis
MATLAB Application to Eigenvalue Analysis
MATLAB Application to Transient Analysis
MATLAB Application to Modal Analysis of Undamped System
MATLAB Application to Modal Analysis of Damped System
MATLAB Application to Frequency Response Analysis
Problems
CHAPTER 9. ELASTICITY PROBLEM
91
9.2
9.3
9.4
9.5
9.6
9.7
9.8
9.9
Plane Stress and Plane Strain
Force Vector
Energy Method
Three-Dimensional Solid
Axisymmetric Solid
Dynamic Analysis
MATLAB Application to 2-D Stress Analysis
MATLAB Application to Axisymmetric Analysis
MATLAB Application to 3-D Stress Analysis
Problems
CHAPTER 10. PLATE STRUCTURES
10.1
10.2
10.3
10.4
10.5
10.6
10.7
Classical Plate Theory
Classical Plate Bending Element
Shear Deformable Plate Element
Plate Element With Displacement Degrees of Freedom
Mixed Plate Element
Hybrid Plate Element
MATLAB Application
Problems
CHAPTER 11. CONTROL OF FLEXIBLE STRUCTURES
ILL
11.2
11.3
11.4
11.5
11.6
11.7
11.8
11.9
11.10
Introduction
Stability Theory
Stability of Multiple Degrees of Freedom Systems
Analysis of a Second Order System
State Space Form Description
Transfer Function Analysis
Control Law Design for State Space Systems
Linear Quadratic Regulator
Modal Control for Second Order Systems
Dynamic Observer
256
259
264
265
280
284
288
296
299
304
307
311
313
315
318
320
321
334
345
356
361
364
366
368
373
378
382
391
393
394
398
401
406
417
427
438
448
451
307
393PREFACE
The finite element method has become one of the most important and useful
engineering tools for engineers and scientists. This book presents introductory and
some advanced topics of the Finite Element Method (FEM). Finite element theories,
formulations, and various example programs written in MATLAB! are presented. The
book is written as a textbook for upper level undergraduate and lower level graduate
courses, as well as a reference book for engineers and scientists who want to write
quick finite element analysis programs.
Understanding basic program structures of the Finite Element Analysis (FEA) is
an important part for better comprehension of the finite element method. MATLAB
is especially convenient to write and understand finite element analysis programs
because a MATLAB program manipulates matrices and vectors with ease. These
algebraic operations constitute major parts of the FEA program. In addition,
MATLAB has built-in graphics features to help readers visualize the numerical results
in two- and/or three-dimensional plots. Graphical presentation of numerical data is
important to interpret the finite element results. Because of these benefits, many
examples of finite element analysis programs are provided in MATLAB.
The book contains extensive illustrative examples of finite element analyses using
MATLAB program for most problems discussed in the book. Subroutines (MATLAB
functions) are provided in the appendix and a computer diskette which contains all
the subroutines and example problems is also provided.
Chapter 1 has a brief summary of useful MATLAB commands which can be
used in programming FEA. Readers may refer to MATLAB manuals for additional
information. However, this chapter may be a good start for readers who have no
experience with MATLAB.
Subsequent chapters are presented in a logical order. Chapter 2 discusses the
weighted residual method which is used for the formulation of FEA in the remaining
chapters. Initially, continuous trial functions are used to obtain approximate solutions
using the weighted residual method. Next, piecewise continuous functions are selected
to achieve approximate solutions. Then, FEM is introduced from the concept
of piecewise continuous functions. Finally, classical variational formulations are
compared with the weighted residual formulations.
Chapter 3 shows the basic program structure of FEA using ordinary differential
equations for an one-dimensional system. MATLAB programs are provided to explain
the programming. Both program input and output as well as internal program
structure are fully discussed. A direct FEM approach using simple mechanics is
presented in Chapter 4. This chapter: presents the basic concept of FEM using an
intuitive and physical approach.
MATLAB is a registered trademark of The MathWorks, Inc. For additional
informationa contact:
The MathWorks, Inc.
24 Prime Park Way
Natick, MA 01760
phone: (508) 647-7000, fax: (508) 647-7001Finite element formulations for partial differential equations are presented in
Chapter 5. This chapter explains not only domain integration for computation of
the finite element matrices but also boundary integration to compute column vectors.
Applications of Laplace’s equation to two- and three-dimensional domains as well
as an axially symmetric domain are presented for both steady-state and transient
problems.
Chapter 6 shows concepts and programming of isoparametric finite elements.
Because a complex shape of domain with curved boundary can be easily handled using
isoparametric finite elements, these elements are very useful and common in FEA.
Both one-dimensional and two-dimensional isoparametric elements are presented. A
numerical technique and its programming concept are also discussed. As a program
example, Laplace’s equation is solved using isoparametric elements.
Chapters 7 and 8 discuss truss and frame structures. Static, dynamic, and
eigenvalue problems are solved. In addition, one-, two- and three-dimensional
structures are considered. As a result, coordinate transformation from local to global
axes is explained. In particular, various formulations for the beam structure are
compared; the relative advantages and disadvantages of each are cited. Modeling of
laminated beams with embedded cracks is also discussed. Further, Chapter 8 presents
the modal analysis and Fast Fourier Transform.
Elasticity is studied im chapter 9. Plane stress/strain, axisymmetric and three
dimensional problems are included. Both static and dynamic analyses are presented.
The finite element formulations are presented in terms of the weighted residual
method. However, an energy method is also discussed for comparison. Plate
bending is given in Chapter 10. Similar to beam formulations, different plate bending
formulations are presented for comparison.
Finally, structural control using FEM is presented in Chapter 11. This chapter
is intended to provide a broad understanding of the basic concepts of control law in
conjunction with FEM. Due to limited space, only a few major control theories are
presented. It is assumed that readers are already familiar with fundamentals of linear
dynamic systems analysis.
This book contains more material than can be covered in a one-semester. Thus,
materials may be selected depending on course objectives. For an introductory FEM
course, Chapters 2 through 9 are recommended. Depending on the desired course
contents, some sections may be deleted.
We would like to thank individuals who have contributed to this book. The
authors would like to express our appreciation to Professor Aleksandra Vinogradov
for reviewing the manuscript and providing us with many useful suggestions. We
are also indebted to the staffs of CRC Press for their professional guidance in the
production of this book. Finally but not lastly the authors sincerely appreciate the
lifelong support and encouragement by their parents.
YY. W. Kwon
H. C. BangCHAPTER ONE
INTRODUCTION TO MATLAB
1.1 Finite Element Method
In order to analyze an engineering system, a mathematical model is developed to
describe the system. While developing the mathematical model, some assumptions are
made for simplification. Finally, the governing mathematical expression is developed
to describe the behavior of the system. The mathematical expression usually consists
of differential equations and given conditions.
These differential equations are usually very difficult to obtain solutions which
explain the behavior of the given engineering system. With the advent of high perfor-
mance computers, it has become possible to solve such differential equations. Various
numerical solution techniques have been developed and applied to solve numerous en-
gineering problems in order to find their approximate solutions. Especially, the finite
element method has been one of the major numerical solution techniques. One of the
major advantages of the finite element method is that a general purpose computer
program can be developed easily to analyze various kinds of problems. In particular,
any complex shape of problem domain with prescribed conditions can be handled with
ease using the finite element method.
The finite element method requires division of the problem domain into many
subdomains and each subdomain is called a finite element. Therefore, the problem
domain consists of many finite element patches.
1.2 Overview of the Book
‘This book is written as a textbook for engineering students as well as a reference
book for practicing engineers and researchers. The book consists of two parts: theory
and program. Therefore, each chapter has initial sections explaining fundamental
theories and formulations of the finite element method, and subsequent sections
showing examples of finite element programs written in the MATLAB program. The
collection of MATLAB function files (ie. m-files) used in the example programs is
summarized in Appendix A and provided in a separate computer disc.
12 Introduction to MATLAB Chapter 1
A brief summary of some of MATLAB commands is provided in the following
sections for readers who are not familiar with them. Those are the commands which
may be used in finite element programs. Especially, the MATLAB commands for
matrix operation and solution are most frequently used in the programs. For visual-
ization of the finite element solution, some plotting commands are also explained.
1.3 About MATLAB
MATLAB is an interactive software which has been used recently in various areas
of engineering and scientific applications. It is not a computer language in the normal
sense but it does most of the work of a computer language. Writing a computer code
is not a straightforward job; typically boring and time consuming for beginners. One
attractive aspect of MATLAB is that it is relatively easy to learn. It is written on
an intuitive basis and it does not require in-depth knowledge on operational principle
of computer programming like compiling and linking in most of other programming
languages. This could be regarded as a disadvantage since it prevents users from
understanding the basic principle in computer programming. The interactive mode
of MATLAB may reduce computational speed in some applications.
The power of MATLAB is represented by the length and simplicity of the code.
For example, one page of MATLAB code may be equivalent to many pages of other
computer language source codes. Numerical calculation in MATLAB uses collections
of well written scientific/mathematical subroutines such as LINPACK and EISPACK.
MATLAB provides Graphical User Interface (GUI) as well as three-dimensional
graphical animation.
In general, MATLAB is a useful tool for vector and matrix manipulations.
Since the majority of the engineering systems are represented by matrix and vector
equations, we can relieve our workload to a significant extent by using MATLAB.
The finite element method is a well defined candidate for which MATLAB can be
very useful as a solution tool. Matrix and vector manipulations are essential parts in
the method. MATLAB provides help menu so that we can type help command when
we need help to figure out a command. The help utility is quite convenient for both
beginners and experts.
1.4 Vector and Matrix Manipulations
Once we get into the MATLAB, we meet a prompt >> called MATLAB prompt.
This prompt receives a user command and processes it providing the output on the
next line. Let us try the following command to define a matrix.
>> A= [1,3,6;2,7,8;0,3,9]
Then the output appears in the next line as shown below.
136
A=2 7 8
039Section 1.4 Vector and Matrix Manipulations 3
Thus, a matrix is entered row by row, and each row is separated by the semi-colon(;).
Within each row, elements are separated by a space or the comma(,). Commands
and variables used in MATLAB are case-sensitive. That is, lower case letters are
distinguished from upper case letters. The size of the matrix is checked with
>> size(A)
ans=3 3
‘Transpose of a matrix In order to find the transpose of matrix A, we type
>> A’
The result is
2
2
&
ul
orm
Cn
owe
Column or row components MATLAB provides columnwise or rowwise operation
of a matrix. The following expression
>> A(:,3)
yields
6
ans= 8
9
which is the third column of matrix A. In addition,
>> A(1,:)
represents the first row of A as
ans=1 3 6
We can also try
>> A(1,:) + A(3,:)
as addition of the first and third rows of A with the result
ans=1 6 15
Now let us introduce another matrix B as
>> B = [8,4,5;6,7,2;8, 1,0];
‘Then there seems to be no output on the screen. MATLAB does not prompt output
on the screen when an operation ends with the semi-colon(;) at the end.
If we want to check the B matrix again, we simply type
>>B
The screen output will be4 Introduction to MATLAB Chapter 1
wy
"
wae
Ba
oun
Matrix addition Adding two matrices is straightforward like
>>C=A+B
at Al
C=8 14 10
84 9
Thus we defined a new matrix C as sum of the previous two matrices.
Matrix subtraction In order to subtract matrix B from matrix A, we type
>>C=A-B
2 -1 1
Cc=-4 0 6
8 2 9
Note that C is now a new matrix not the summation of A and B any more.
Matrix multiplication Similarly, matrix multiplication can be done as
>>C=AxB
69 31 IL
C= 112 65 24
90 30 6
1.5 Matrix Functions
Manipulation of matrices is a key feature of the MATLAB functions. MATLAB
is a useful tool for matrix and vector manipulations. Collections of representative
MATLAB matrix functions are listed in Table 1.5.1. Examples and detailed explana-
tions are provided for each function below.
Matrix inverse The inverse of a matrix is as simple as
>> inv(A)
ans
1.8571 -0.4286 -—0.8571
—0.8571 0.4286 0.1905
0.2857 —0.1429 0.0476
In order to verify the answer, we can try
>> Axinv(A);Section 1.5 Matrix Functions 5
Table 1.5.1 Basic Matrix Functions
Symbol Explanations
inv inverse of a matrix
det determinant of a matrix
rank rank of a matrix
cond condition number of a matrix
eye(n) the n by n identity matrix
trace summation of diagonal elements of a matrix
zeros(n,m) the n by m matrix consisting of all zeros
which should be a 3 by 3 identity matrix.
Determinant of a matrix
>> d=det(A)
produces the determinant of the matrix A. That is,
d= 21
Rank of a matrix The rank of a matrix A, which is the number of independent
rows or columns, is obtained from
>>rank(A);
Identity matrix
>> eye(3)
yields
100
ans=0 1 0
001
eye(n) produces an identity matrix of size n by n. This command is useful when we
initialize a matrix.
Matrix of random numbers A matrix consisting of random numbers can be
generated using the following MATLAB function.
>>rand(3, 3)
0.2190 0.6793 0.5194
ans = 0.0470 0.9347 0.8310
0.6789 0.3835 0.03466 Introduction to MATLAB Chapter 1
That is, rand(3,3) produces a 3 by 3 matrix whose elements consist of random
numbers. The general usage is rand(n, m).
trace Summation of diagonal elements of a matrix can be obtained using the trace
operator.
For example,
>>Ca[l 39; 672 8 -1 -3;
Then, trace(G) produces 6, which is the sum of diagonal elements of C.
zero matrix
>> zeros(5,4)
produces a 5 by 4 matrix consisting of all zero elements. In general, zeros(n,m) is
used for an n by m zero matrix.
condition number The command cond(A) is used to calculate the condition
number of a matrix A. The condition number represents the degree of singularity
of a matrix. An identity matrix has a condition number of unity, and the condition
number of a singular matrix is infinity.
>>cond(eye(6))
ans =
1
An example matrix which is near singular is
The condition number is
>>cond(A)
ans =
4.0000€+006
Further matrix functions are presented in Table 1.5.2. They do not include all
matrix functions of the MATLAB, but represent only a part of the whole MATLAB
functions. Readers can use the MATLAB Reference’s Guide or help command to
check when they need more MATLAB functions.
Matrix exponential The expm(A) produces the exponential of a matrix A. In
other words,
>> A=rand(3, 3)
0.2190 0.6793 0.5194
A= 0.0470 0.9347 0.8310
0.6789 0.3835 0.0346Section 1.5 Matrix Functions
Table 1.5.2 Basic Matrix Functions (Continued)
Explanations
expm exponential of a matrix
eig a rrr~—r—S
lu LU decomposition of a matrix
svd singular value decomposition of a matrix
ar QR decomposition of a matrix
\ used to solve a set of linear algebraic equations
>>expm(A)
1.2448 0.0305 0.6196
ans = 1.0376 1.5116 1.3389
1.0157 0.1184 2.0652
Eigenvalues The eigenvalue problem of a matrix is defined as
Ag = AG
where 2 is the eigenvalue of matrix A, and ¢ is the associated eigenvector.
>> e =eig(A)
gives the eigenvalues of A, and
>> [V, D] =eig(A)
produces V matrix, whose columns are eigenvectors, and the diagonal matrix D whose
values are eigenvalues of the matrix A.
For example,
>> A=[5 32% 146; 97 2
>> [V, D] =eig(A)
0.4127 0.5992 0.0459
V = 0.5557 -0.7773 —0.6388
0.7217 0.1918 0.7680
12.5361 0 0
eee 1.7486. 0
0 0 —3.2847
LU Decomposition The LU decomposition command is used to decompose a
matrix into a combination of upper and lower triangular matrices, respectively.
>>Aa[l 35 248 47 3);
>> [L,U] =hu(A)8 Introduction to MATLAB Chapter 1
0.2500 1.0000 0
L= 0.5000 0.4000 1.0000
1.0000 0 0
4.0000 7.0000 3.0000
U= 0 1.2500 4.2500
0 0 4.8000
In order to check the result, we try
>> LeU
135
ans=|2 4 8
473
The lower triangular matrix L is not perfectly triangular. There is another command
available
>> [L,U, P] =lu(A)
1.0000 0 0
L= 0.2500 1.0000 0
0.5000 0.4000 1.0000
4.0000 7.0000 3.0000
U= 0 1.2500 4.2500
0 4.8000
P=
roo O°
1
0
0
Borneo
Here, the matrix P is the permutation matrix such that P+ A= L+U.
Singular value decomposition The svd command is used for singular value
decomposition of a matrix. For a given matrix,
A=UxV’
where ¥ is a diagonal matrix consisting of non-negative values. For example, we define
a matrix D like
>> D=[1 37; 29 5 28 5
The singular value decomposition of the matrix is
>> [U, Sigma, V] =svd(D)
which results in
0.4295 0.8998 +—-0.0775
U = | 0.6629 —0.3723 —0.6495
0.6133 ~0.2276 0.7564Section 1.5 Matrix Functions 9
15.6492 0 0
Sigma = 0 4.13330
0 0 0.1391
0.7771 —0.5982 —0.1956
0.1905 -0.0726 0.9790
~ [0.5999 0.7980 —0.0576
QR decomposition A matrix can be also decomposed into a combination of an
orthonormal matrix and an upper triangular matrix. In other words,
A=QR
where Q is the matrix with orthonormal columns, and 2 is the upper triangular
matrix. The QR algorithm has wide applications in the analysis of matrices and
associated linear systems. For example,
0.0470 0.9347 0.8310
0.2190 0.6793 0.5194
A=
0.6789 0.3835 0.0346
Application of the qr operator follows as
>> [Q, R] =ar(A)
yields
—0.3063 —0.4667 —0.8297
Q= | -0.0658 —0.8591 0.5076
—0.9497 0.2101 0.2324
0 —1.0395 0.9490
—0.7149 —0.6338 —0.2466
R=
0 0 —0.0011
Solution of linear equations The solution of a linear system of equations is
frequently needed in the finite element method. The typical form of a linear system
of algebraic equations is written as
Ar=y
and the solution is obtained by
>> # =inv(A) *y
or we can use \ sign as
>>e= Aly
For example
>>A=[1 3 4 5 7 8; 23 5)10 Introduction to MATLAB Chapter 1
Table 1.6.1 Data Analysis Functions
Symbol Explanations
min(max) minimum(maximum) of a vector
sum sum of elements of a vector
std standard deviation of a data collection
sort sort the elements of a vector
mean mean value of a vector
used for componentwise operation of a vector
and
>> y= [10;
5 8);
Let us compare two different approaches.
>> [inv(A)*y A\y]
4.2500 —4.2500
ans= 1.7500 ‘1.7500
2.2500 2.2500
1.6 Data Analysis Functions
Up to now, we discussed matrix related functions and operators of MATLAB.
MATLAB has also data analysis functions for a vector or a column of a matrix. In
Table 1.6.1, some operators for data manipulation are listed.
Minimum (maximum) The min (max) finds a minimum (maximum) value of a
given vector. For example,
>>v=[ll 23 73 25 49 92 28 23);
>>min(v)
yields
ans =
PFE
>>max(v)
ans =
92
sum The sum command produces the summation of elements of a vector. For
example,Section 1.6 Data Analysis Functions nay
>> sum(v)
yields
ans =
924
Standard deviation The std command calculates the standard deviation of a
vector. For example,
>> std({l 4.10 —5 6 9 —20))
ans =
10.4517
Sort a vector The sort command is used to sort a vector in the ascending order.
>> sort([l 4 10 -5 6 9 —20))
ans =
20-5 1469 10
Mean value of a vector The mean calculates the mean value of a vector.
>> mean([1 4 10 -5 6 9 —20))
ans =
0.7143
Vector componentwise operation Let us define two vectors
>> v1 = [1,5,6, 7]; v2 = (0, 2,3, 5);
Sometimes we want to multiply components of v; with the corresponding components
of v2. The operation is
>> Ug = U1. * v2
ans =
0 10 18 35
In other words, ( ).*( ) represents the componentwise multiplication of two vectors.
Another useful operator is
>> v4 = 2./11
with
vg=0 0.4 0.5 0.7143
Note that the data analysis tools explained in the above are applicable to matrices
too. Each matrix column is regarded as a vector for data analysis.12 Introduction to MATLAB Chapter 1
Table 1.7.1 Polynomial Functions
Symbol Explanations
poly converts collection of roots into a polynomial equation
roots finds the roots of a polynomial equation
polyval evaluates a polynomial for a given value
conv multiply two polynomials
deconv | decompose a polynomial into a dividend and a residual
polyfit curve fitting of a given polynomial
1.7 Tools for Polynomials
Polynomials are frequently used in the analysis of linear systems. MATLAB
provides some tools for handling polynomials. The summiary of polynomial functions
is provided in Table 1.7.1.
Roots of a polynomial equation A polynomial equation is given by
ayn” age") 4--- ane + any) =0
‘The roots of the polynomial equation is solved using roots command
roots([a: a2 --- dn an4i])
For example,
24 +429 — 52? +62-9=0
>>roots([1 4 —5 6 —9])
yields
ans =
5.2364
1.2008
0.0178 + 1.1963
0.0178 - 1.19631
Generation of a polynomial equation using roots The poly command takes
the roots, and converts them into a polynomial equation. For instance, if we know
[ru ray +++) te] in
n=1
(2 —1ri)(@ — 2) ++ (@ = ta) = 2" + a2"? + age”? 4+ pant + dn
thenSection 1.7 Tools for Polynomials 13
>>poly([ni, 72, +++, tal)
provides us the coeflicients( (a1, a2, -++,n]) of the polynomial equation. For example,
>>poly([-1 -—2+2*i —2-2*i -—5+7*i —5-7«i))
produces
ans =
1 15 136 498 968 592
In order to check the result, we use roots command again.
>>roots([1 15 136 498 968 592])
The result should be [-1 —24+2+i —2-2*i -5+7*i —5-7+i].
Polynomial value When we want to calculate the value of a polynomial at a certain
point, we can use polyval.
>> y=polyval({1 3 4 —5 ],2)
ans =
23
which evaluates the polynomial s‘ + 367 + 4s —5 at s = 2.
Multiplication of two polynomials The conv command is used to multiply two
polynomials. For example,
a(s)=s8?4+3s—1, 0(s) = 6? 287 +. 68-7
The multiplication of a(s) and 6(s) follows as
>>c=conv([l 3 ~1],[1 -2 6 —7)
ice
1 1 -1 13 -27 7
In other words, we obtain the coefficient vector c of the product of a(s) and 6(s).
Decomposition of a polynomial The deconv is used to decompose a polynomial
as a multiplicand and a residue. Let
a(s) = b(s)m(s) + r(s)
That is, the polynomial a(s) is represented in terms of a multiplicand m(s) and a
residue r(s) via b(s). The MATLAB command is
>> [m,r] =deconv(a, b)
where the parameters are coefficient vectors for given polynomials. An example is
given by
>> [m,r] =deconv({1 —2 6 —7},{1 3 —1])
m=14 Introduction to MATLAB Chapter 1
=
0 0 22 -12
If we change the order of polynomials,
>> [m,r] =deconv([l 3 -1],[1 -2 6 -7)
m=
0
r=
13 -1
Polynomial fit The polyfit command is to generate a polynomial curve which fits
a given set of data. The polynomial is obtained by minimizing the error between the
polynomial and the given data set. The synopsis is
p = polyfit(z, y,n)
where # and y are vectors of the given data set in (2, y) form, and n is the order of the
desired polynomial to fit the data set. The output result is p, the coefficient vector of
the fitting polynomial. An example is provided below,
>>ar=f[1 23 45 6);
>>y=(-1 352 -3 I];
>> p =polyfit(z, y, 1)
p=
2.1714 -1.2667
A linear curve fitting is performed for data set (2, y).
1.8 Making Complex Numbers
In order to make a complex number 2+ 3 * i, we use
>> 2+ 384i
or
>> 2+ 3aj
MATLAB takes i and j as a pure complex number. In case i or j is defined already,
we can use V/—1 as
=sqrt(—1)
i= 0+ 1.00001
>>Section 1.9 Nonlinear Algebraic Equations 15
Table 1.9.1 Functions for Nonlinear Algebraic Equations
Symbol Explanations
fmin finds minimum of a function of one variable
fzero solves a nonlinear algebraic equation of one variable
abs, angle For a given complex number, we use abs and angle commands to find
out the magnitude (abs) and phase angle (angle) of the given complex number. For
example, if
>>pe=-l+i;
then
>> abs(c)
ans = 1.4142
>> angle(c)
ans = 2.3562
Real, imaginary parts of a complex number The real and imag are used to
take the real and imaginary parts of a complex number. For example,
>>e= 104987
>> [real(c),imag(c)]
ans =—10 9
Conjugate The conj command is used to generate a complex conjugate number.
For example
>> conj(—1 +5 * i)
ans = —1—54i
1.9 Nonlinear Algebraic Equations
Nonlinear algebraic equations are frequently adopted in many different areas.
‘The nonlinear equations are different from linear equations, and there is no unique
analysis tool to the nonlinear equations. MATLAB is equipped with some functions
which can handle nonlinear equations. The list is presented in Table 1.9.1.
Minimum of a function The MATLAB command fmin minimizes a function by
finding out a value which minimizes the given function. The synopsis is
fmin(' func’, 21,22)16 Introduction to MATLAB Chapter 1
Table 1.10.1 Numerical Techniques for Differential Equations
Symbol Explanations
ode23 solution using the 2nd/3rd order Runge-Kutta algorithm
ode45 solution using the 4th/5th order Runge-Kutta algorithm
where *func’ is the name of a function to be minimized and 21(z2) represents a
lower(upper) limit of the interval of the function argument. For example,
>>fmin('z + cos(2)’, -2,2)
produces
ans = —0.8603
Solution of a nonlinear algebraic equation When a nonlinear algebraic equation
is written as
2° 43+ sin(z)— 25 =0
the MATLAB function fzero can be used to find a solution of the nonlinear algebraic
equation. The synopsis is
>> sol =fzero(' function’, 20)
where ’function’ is a MATLAB function subroutine and 20 is an initial condition
vector of the variables. For the given example, we write a function subroutine fetn.m
as
function [f] =fctn(z);
f= 2°34 2 xcos(z) — 42;
Then, we use fzero command as
>> sol =fzero('fetn’,—5)
sol = -2.1281
In order to check the solution
>>fetn(—2.1281)
ans =
1.91920-004
The error is due to the numerical format error. The number is truncated for screen
display purpose, even if it is calculated using double precision format inside MATLAB.
1.10 Solving Differential Equations
Linear and nonlinear differential equations can be also solved using MATLAB.
List of numerical techniques solving differential equations is in Table 1.10.1.Section 1.11 Loop and Logical Statement 17
Runge-Kutta second and third order algorithm MATLAB uses the Runge-
Kutta algorithm to solve a differential equation or a set of differential equations. The
general synopsis is
{t,2] = ode23(' func’, t0, tf, 20);
where ’func’ is a function containing the derivative information, t0 (tf) is the initial
(final) time, and 20 is an initial condition vector. The outputs are ¢, which contains
the returned time points, and x which is the integrated output.
For example, we want to solve
# + sin(z) =0
which can be rewritten as
ay = 22
2 = —sin(z1)
where z; = 2 and 22 =. The ’func’ function should be provided as an independent
function subroutine as func.m in a directory, which MATLAB can locate. Now we
execute the ode23 command
>> [t,2] =ode23(’ func’, 0, 10, 20);
{3
is an initial condition and func.m is provided as
function [f] =func(t,x);
[f] = zeros(2,1);
F(1) = 2(2);
f(2) = —sin(x(1));
Runge-Kutta Fourth and Fifth order algorithm There is another Runge-Kutta
algorithm ode45 which is more accurate than ode23.
where
[t, 2] = ode45(/ func’ ,t0,tf, 20)
The same calling synopsis as ode23 can be applied to make use of the ode45
function.
1.11 Loop and Logical Statement
There are some logical statements available in MATLAB which help us writing
combinations of MATLAB commands. Furthermore, loop commands can be used as,
in other programming languages. In fact, we can duplicate the majority of existing
programs using MATLAB commands, which significantly reduces the size of the source18 Introduction to MATLAB Chapter 1
Table 1.11.1 Loop and Logical Statements
Symbol Explanations
for loop command similar to other languages
while used for a Joop combined with conditional statement
if produces a conditional statement
elseif, else used in conjunction with if command
break breaks a loop when a condition is satisfied
codes. A collection of loop and logical statements in MATLAB is presented in Table
1.11.1.
for loop The for is a loop command which ends with end command.
>> for i=1:100
a(i,i) = 2* 4;
end
In the above example, jis a loop index which starts from 1 and ends at 100. There
may be also multiple loops.
>> for i=1:100
for j=1:
for k= 1:50
a(é, f) = 8(,B) #o(b, 3) +a(4,3)5
end
end
end
while The while command is useful for an infinite loop in conjunction with a
conditional statement. The general synopsis for while command is as follows
while condition
statements
end
For example,
i=l
while (i < 100)
i=i4];
end
Another example of the while command is
n= 1000;
var = [];Section 1.11 Loop and Logical Statement 19
while (n > 0)
n=n/2-1;
var = var, n];
end
The result is
var =
Columns 1 through 6
4.9900e+002 2.4850e+002 1.2325e+002 6.0625e+001 2.9313e+001 1.3656e+001
Columns 7 through 9
5.8281e+000 1.9141e+000 -4.2969e-002
where we used [ ] in order to declare an empty matrix.
if, elseif, else The if, elseif, and else commands are conditional statements which
are used in combination.
if condition #1
statement #1
elseif condition #2
statement #2
else
statement #3
end
For example,
n= 100;
if (rem(n,3) == 0)
2=0;
elseif (rem(n,3) == 1)
z=
else
z
end
where rem(x,y) is used to calculate the remainder of z divided by y.
break The break command is used to exit from a loop such as if and while. For
example,
for i= 1: 100
i=i+];
if(i == 10) break;
end
end20 Introduction to MATLAB Chapter 1
Table 1.11.2 Loop and Logical Statements
Symbol Explanations
two conditions are equal
i two conditions are not equal
<= (=) one is less (greater) than or equal to the other
<(>) one is less (greater) than the other
& and operator - two conditions are met
not operator
I or operator - either one condition is met
Logical and relational operators The logical and relational operators of
MATLAB are as listed in Table 1.11.2.
The above command sets are used in combination.
1.12 Writing Function Subroutines
MATLAB provides a convenient tool, by which we can write a program using
collections of MATLAB commands. This approach is similar to other common
programming languages. It is quite useful especially when we write a series of
MATLAB commands in a text file. This text file is edited and saved for later use.
The text file should have filename.m format normally called m-file. That is,
all MATLAB subroutines should end with .m extension, so that MATLAB recognizes
them as MATLAB compatible files. The general procedure is to make a text file using
any text editor. If we generate a file called func/.m, then the file funci.m should start
with the following file header
function[ovy , ov,
= funel(iv;,iv2,...)
where iv, iv9,... are input variables while ov,0v2,... are output variables. The
input variables are specific variables and the output variables are dummy variables,
for which we can use any variables.
For example, let us solve a second order algebraic equation.
az? +br4+e=0
‘The solution is given in analytical form as
_ -b+t VP — Teac
2
QeaSection 1.12 Writing Function Subroutines 21
We want to write an m-file with the name secroot.m, which produces the analytical
solution.
function [r1,r2]=secroot(a, b,c);
%
% Find Determinant —— Any command in MATLAB which starts with
% % sign is a comment statement
Det =b2—-4+a%c;
if (Det <0),
r1 = (—b + j * sgrt(—Det))/2/a;
r2= (-b — j * sqrt(—Det))/2/a;
disp('The two roots are compler conjugates’);
elseif( Det
rl = —b/2/a;
72 = —b/2/a;
disp('There are two repeated roots’);
else(Det > 0)
rl = (—b + sqrt(Det))/2/a;
—b — sqrt(Det))/2/a;
disp('The two roots are real’);
end
Some commands appearing in the above example will be discussed later. Once the
secroot.m is created, we call that function as
>> [r1,r2]=secroot(3, 4,5)
or
>> [pl, p2] =secroot(3, 4,5)
One thing important about the function command is to set up the m-file
pathname. The m-file should be in the directory which is set up by MATLAB
configuration set up stage. In the recent version of MATLAB, the set up procedure is
relatively easy by simply adding a directory which we want to access in a MATLAB
configuration file.
‘Another function subroutine fet.m is provided below.
function [f] =fct(z)
fs(l-2/2;
The above function represents f(z) = (1— 2). In the MATLAB command prompt,
we call the function as
>> y =fet(9);
The function subroutine utility of MATLAB allows users to write their own subrou-
tines. It provides flexibility of developing programs using MATLAB.22 Introduction to MATLAB Chapter 1
Table 1.13.1 File Manipulation Commands
Symbol Explanations
save save current, variables in a file
load load a saved file into MATLAB environment,
diary save screen display output in text format
1.13 File Manipulation
Manipulating files is another attractive feature of MATLAB. We can save
MATLAB workspace, that is, all variables used, in a binary file format and/or a
text file format. The saved file can be also reloaded in case we need it later on. The
list of file manipulation commands is presented in Table 1.13.1.
save The save command is used to save variables when we are working in MATLAB.
The synopsis is as follows
save filename var; varz ...
where filename is the filename and we want to save the variables, var;, vara, .... The
filename generated by save command has extension of .mat, called a mai-file. If we
do not include the variables name, then all current variables are saved automatically.
In case we want to save the variables in a standard text format, we use
save filename vary varz .../ascii/double
load The load command is the counter-part of save. In other words, it reloads
the variables in the file which was generated by save command, The synopsis is as
follows
load filename var, vary ...
where filename is a mat-file saved by save command. Without the variables name
specified, all variables are loaded. For example,
>>a=([l 3 4];
>> b=3;
>>save test
>>clear all % clear all variables
>>who % display current variables being used
>>load test
>>who
diary Using diary command, we can capture all MATLAB texts including command
and answer lines which are displayed on the screen. The texts will be saved in a file,
so that we can edit the file later. For example,
>>diary onSection 1.14 Basic Input/Output Functions 23
Table 1.14.1 Input-Output Functions
Symbol Explanations
input save current variables in a file
disp load a saved file into MATLAB environment.
format check the file status in the directory
>pa=lb=4e
>>[a be)
>>d=axb
>>e=geh
>>diary off
Now we can use any text editor to modify the diary file. The diary command is
useful displaying the past work procedures. Also, it can be used to save data in a text
format.
1.14 Basic Input-Output Functions
Input/output functions in MATLAB provide MATLAB users a friendly pro-
gramming environment. Some input/output functions are listed in Table 1.14.1.
input The input command is used to receive a user input from the keyboard. Both
numerical and string inputs are available. For example,
>> age= input(/How Old are you?’)
>> name =input('What is your name’, s')
The ’s’ sign denotes the input type is string.
disp The disp command displays a string of text or numerical values on the screen. It
is useful when we write a function subroutine in a user-friendly manner. For example,
>> disp(‘This is a MATLAB tutorial!)
>> c=3%;
>> disp('The computed value of c turns out to be’)
>>e
format The format command is used to display numbers in different formats.
MATLAB calculates floating numbers in the double precision mode. We do not want
to, in some situations, display the numbers in the double precision format on the
screen. For a display purpose, MATLAB provides following different formats
>>2=1/924 Introduction to MATLAB Chapter 1
Table 1.15.1 Plotting Commands
Symbol Explanations
plot basic plot command
xlabel(ylabel) attach label to x(y) axis
axis manually scale x and y axes
text place a text on the specific position of graphic screen
title place a graphic title on top of the graphic
ginput produce a coordinate of a point on the graphic screen
gtext receives a text from mouse input
grid add a grid mark to the graphic window
pause hold graphic screen until keyboard is hit
subplot breaks a graphic window into multiple windows
x=0.10111
>>format short e
w= 1,111le-001
>>format long
O.10111111111111
>>format long e
@ = 1.111111111111111e — 001
>>format hex
z = 3fbeTleTle71e7le
1.15 Plotting Tools
MATLAB supports some plotting tools, by which we can display the data in
a desired format. The plotting in MATLAB is relatively easy with various options
available. The collection of plotting commands is listed in Table 1.15.1.
‘A sample plotting command is shown below.
>>t=0:0.1: 10;
>> y= sin(t);
>> plot(y)
>> title(’plot(y)’)Section 1.15 Plotting Tools 25,
The resultant plot is presented at the top of Fig. 1.15.1.
Soe oe
>> y= sin(t);
>> plot(t, y)
>> title(’plot(t,y)’)
The resultant plot is presented at the bottom of Fig. 1.15.1. In the above example,
= 0: 0.1: 10 represents a vector ¢ which starts from 0 and ends at 10 with an
interval of 0.1. We can use just y or both y and ¢ together. In the first case, the
horizontal axis represents number of data, from 0 to 101. In the second case, the
horizontal axis is the actual time scale ¢ in the plot(t,y) command.
Plotting multiple data We plot multiple data sets as shown below.
>>t=0:1: 100;
>> yl = sin(t).*t;
>> y2 = cos(t). +t;
>> plot(t,y/,-4t,y2,’-))
where ’-’ and -’ represent line styles. The line styles, line marks, and colors are
listed in Table 1.15.2.
For example, if we want to plot a data in a dashed blue line, the command becomes
>> plot(y,’-b’);
xlabel, ylabel The xlabel(’ter’) and ylabel(’tez?’) are used to label the x and y
axes.
axis The axis command sets up the limits of axes. The synopsis is
aXis[2min, maz; Ymin Yaz]
text The text command is used to write a text on the graphic window at a designated
point. The synopsis is
text(z,y,’text contents’)
where 2, y locates the z,y position of the "tert contents’. In case we want to normalize
the graphic window size from 0 to 1, we use
text(z,y, teat contents! sc’)
ginput This command allows us to pick up any point on a graphic window. The
synopsis is
[z,y] = ginput26 Introduction to MATLAB Chapter 1
plot(y)
os}
og
oa
02]
oat
ast
ast
3}
plat(ty)
ot
oa
02}
04}
as}
oa}
Figure 1.15.1 A Sample Plot
We can pick as many points as we want on the graphic screen. The vector [z, y] then
contains all the points.
gtext The gtext command is used to place a text on the graphic window using the
mouse input. The synopsis is
gtext(‘teat’)Section 1.15 Plotting Tools 27
Table 1.15.2 Line, Mark, and Color Styles
Style Line marks Color
solid point. red
dashed star * green
dotted ° circle 0 blue b
dashdot ™-.” plus + white w
xmark x | invisible i
Once the above command is entered or read in a function subroutine, the cursor on
the graphic window is activated waiting for the mouse input, so that the “tezt’ is
located at the point selected by the mouse.
grid The grid command adds grids to the graphic window. It is useful when we
want to clarify axis scales.
An example plot constructed using some of the commands described above is
presented in Fig, 1.15.2. The following commands are used for the plot output.
>> t=0:0.1:20;
>> plot(t, sin(t))
>> xlabel('Time(sec)’))
>> ylabel('ydata’)
>> title('This is a plot example’)
>> grid
>> gtext('sin(t)’)
>> axis([0 20 — 1.5 1.5))
pause This command is useful when we display multiple graphic windows sequen-
tially, It allows us to display one at a time with the keyboard interrupt.
subplot The subplot is used to put multiple plots on the same MATLAB figure
window. The command is
>> subplot(pgr)
The plot size is adjusted by a p by q matrix on the whole size of the graphic window.
Then the third index r picks one frame out of the p by q plot frames. An example
subplot is presented in Fig. 1.15.3 with the following commands entered.
>> 2=0:0.1:depi;
>> subplot(222)
>> plot(z,y)
>> title(’x and y’)
>> subplot(223)
>> plot(z, z)
= sin(2); z = cos(z);28 Introduction to MATLAB Chapter 1
This sa plot example
SaaS elated,
Time(s00)
Figure 1.15.2 A Plot Example With Some Commands
xand y
4
0)
of
05
a) 5 70
xandz
1
os]
|
08
a) $ 10
Figure 1.15.3 A Subplot Example
>> title(’x and 2’)
>> subplot(224)
>> plot(z,y,'—',2,2,'-—')Section 1.15 Plotting Tools
>> title(’x and ly 2}’)
where pi is an internally defined variable equivalent to 7.
2CHAPTER TWO
APPROXIMATION TECHNIQUES
2.1 Methods of Weighted Residual
Methods of weighted residual are useful to obtain approximate solutions to a
differential governing equation. In order to explain the methods, we consider the
following sample problem:
| aaa O<2<1 (2.1.1)
u(0) =0, and u(1) =0
The first step in the methods of weighted residual is to assume a trial function which
contains unknown coefficients to be determined later. For example, a trial function,
fi = az(1— 2), is selected as an approximate solution to Eq. (2.1.1). Here, ~ denotes
an approximate solution which is usually different from the exact solution. The trial
function is chosen here such that it satisfies the boundary conditions (i.e., (0) = 0
and @i(1) = 0), and it has one unknown coefficient a to be determined.
In general, accuracy of an approximated solution is dependent upon proper
selection of the trial function. However, a simple form of trial function is selected for
the present example to show the basic procedure of the methods of weighted residual.
Once a trial function is selected, residual is computed by substituting the trial function
into the differential equation. That is, the residual R becomes
n= SS aye -20—aa(—2) +2 (2.1.2)
Because i is different from the exact solution, the residual does not vanish for all
values of z within the domain. The next step is to determine the unknown constant a
such that the chosen test function best approximates the exact solution. To this end,
a test (or weighting) function w is selected and the weighted average of the residual
over the problem domain is set to zero. That is,
1 oo,
r= f wR de = f w( G3 -a+2)de
fo fo | \ da?
‘i
=f w{—2a-az(1— 2) +2}d2 =0 (21.3)
5
3132 Approximation Techniques Chapter 2
Table 2.1.1 Comparison of Solution to Eq. (2.1.1) at x=0.5
a
Exact Solution Collocation Least Squares Galerkin
0.0566 0.0556 0.0576 0.0568
‘The next step is to decide the test function. The resulant approximate solution
differs depending on the test function. The methods of weighted residual can be
classified based on how the test function is determined. Some of the methods of
weighted residual are explained below. Readers may refer to Refs [1-3] for other
methods.
1, Collocation Method. The Dirac delta function, (2 — 24), is used as the test
function, where the sampling point 2; must be within the domain, 0 < 2; < 1.
In other words,
w= 6(z— 2) (2.1.4)
Let 2; = 0.5 and we substitute the test function into the weighted residual,
Eq. (2.1.3), to find a = 0.2222. Then, the approximate solution becomes
i = 0.2222e(1 — 2).
2. Least Squares Method. The test function is determined from the residual such
that
dR
da
Applying Eq.(2.1.5) to Eq. (2.1.2) yields w = ~2—z(1—z). Substitution of the
test function into Eq, (2.1.3) results in a = 0.2305. Then i = 0.23052(1 —z).
3. Galerkin’s Method. For Galerkin’s method, the test function comes from the
chosen trial function. That is,
(2.1.5)
di
da
For the present trial function, w = 2(1— 2). Applying this test function to
Eq. (2.1.3) gives a = 0.2272 so that a = 0.22722(1— x). Comparison of these
three approximate solutions to the exact solution at z = 0.5 is provided in Table
2.1.1. As seen in the comparison, all three methods result in reasonably accurate
approximate solutions to Eq. (2.1.1).
(2.1.6)
In order to improve the approximate solutions, we can add more terms to
the previously selected trial function. For example, another trial function is @ =
a,2(1 — 2) + a9z7(1 — z). This trial function has two unknown constants to be
determined. Computation of the residual using the present trial function yields
R=a,(-2—24+27)+4,(2—- 62-27 +25) +2 (2.1.7)
We need the same number of test functions as that of unknown constants so that the
constants can be determined properly. Table 2.1.2 summarizes how to determine testSection 2.1 Methods of Weighted Residual 33
Table 2.1.2 Test Functions for Methods of Weighted Residual
Method Description
Collocation w; = 6(@—2)), 7=1,2,.40
where 2; is a point within the domain
Least Squares w; = OR/da;, i= 1,2,...,n,
where F is the residual and
q; is an unknown coefficient in the trial function
Galerkin w; = 04/80;, = 1,2,..,.0
where @ is the selected trial function
functions for a chosen trial function which has n unknowns coefficients. Application
of Table 2.1.2 to the present trial function results in the following test functions for
each method.
Collocation Method : wi = 6(z— 21), w2 = 6(e — 22) (2.1.8)
Least Squares Method : w, = —-2—a2+27, we=2-6r—27 42° (2.1.9)
Galerkin’s Method : w, =2(1—2), w2=27(1-2) (2.1.10)
For the collocation method, 2; an zz must be selected such that the resultant weighted
residual, ie. Eq. (2.1.3), can produce two independent equations to determine
unknowns a; and az uniquely. The least squares method produces a symmetric matrix
regardless of a chosen trial function. Example 2.1.1 shows symmetry of the matrix
resulting from the least squares method. Galerkin’s method does not result in a
symmetric matrix when it is applied to Eq. (2.1.1). However, Galerkin’s method may
produce a symmetric matrix under certain conditions as explained in the next section.
4 Example 2.1.1 A differential equation is written as
Lu) =f (2.1.11)
where L is a linear differential operator. A trial solution is chosen such that
(2.1.12)
in which g; is a known function in terms of the spatial coordinate system and it
is assumed to satisfy boundary conditions. Substitution of Eq. (2.1.12) into Eq.34 Approximation Techniques Chapter 2
(2.1.11) and collection of terms with the same coefficient a; yield the residual as
seen below;
fn
R= ahs +p (2.1.18)
i=
Here, hj and p are functions in terms of the spatial coordinate system. Test
functions for the least squares method are
wy = hj, G=1,2...50 (2.1.14)
‘The weighted average of the residual over the domain yields the matrix equation
:
r= f wRan= Aya 4, can (2.1.15)
a =1
where
Ay f hihjdQ (2.1.16)
In
Equation (2.1.16) shows that Ajj = Aji (symmetry). {
2.2 Weak Formulation
We consider the previous sample problem, Eq. (2.1.1), again. The formulation
described in the preceeding section is called the strong formulation of the weighted
residual method. The strong formulation requires evaluation of fj w(8?i/Ox”)dz,
which includes the highest order of derivative term in the differential equation. The
integral must have a non-zero finite value to yield a meaningful approximate solution
to the differential equation. This means a trial function should be differentiable twice
and its second derivative should not vanish.
So as to reduce the requirement for a trial function in terms of order of
differentiability, integration by parts is applied to the strong formulation. Then Eq.
(2.1.3) becomes
1 2a
=f wo (G3 -a+2)ae
lo
1/ dwdi di)’
al (-Ge-wirew)ates [WE] =0 (2.2.1)
As seen in Eq. (2.2.1), the trial function needs the first order differentiation instead
of the second order differentiation, As a result, the requirement for the trial function
is reduced for Eq. (2.2.1). This formulation is called the weak formulation.
Weak formulation has an advantage for Galerkin’s method where test functions
are obtained directly from the selected trial function. If a governing differential equa-
tion is the self-adjoint operator, Galerkin’s method along with the weak formulationSection 2.3 Piecewise Continuous Trial Function 35
Tet Ties
i,
Figure 2.3.1 Piecewise Linear Functions
Figure 2.3.2 Piecewise Linear Trial Function
results in a symmetric matrix in terms of unknown coefficients of the trial function.
Using a trial function # = az(1—) for the weak formulation, Eq. (2.2.1) results
in the same solution as obtained from the strong formulation as expected. However,
when a piecewise function is selected as a trial function, we see the advantage of the
weak formulation over the strong formulation.
2.3 Piecewise Continuous Trial Function
Regardless of the weak or strong formulation, the accuracy of an approximate
solution so much depends on the chosen trial function. However, assuming a proper
trial function for the unknown exact solution is not an easy task. This is especially
true when the unknown exact solution is expected to have a large variation over
the problem domain, the domain has a complex shape in two-dimensional or three-
dimensional problems, and/or the problem has complicated boundary conditions. In
order to overcome these problems, a trial function can be described using piecewise
continuous functions.
Consider piecewise linear functions in an one-dimensional domain as defined
below:
(e-aia/he forma Sasa
i(2) = 4 (tig —2)/higr for ay So < aig: (2.3.1)
0 otherwise
The function defined in Eq. (2.3.1) is plotted in Fig. 2.3.1 and Example 2.3.1
illustrates the use of the function as a trial function.36
Approximation Techniques Chapter 2
& Example 2.3.1 Consider the same problem as given in Eq. (2.1.1). It is
rewritten here
@u
#4 -us-2, 0<2<1 4
{ (0) = 0, and u(1) = 0 (2.1.4)
The weak formulation is also rewritten as below:
oe
Pi.
t= o( G3 -a+2)ée
=[ ee az +[v%]' =o (2.2.1
=/, de dg 7 Witew “al,= 1)
A trial function is chosen such that d = a1¢1(z) + a2@0(z) in which ay and a2
are unknown constants to be determined, and ¢; and ¢o are defined as below:
3a,
or(z) = { 2-32,
(2.3.2)
canta ©
IAIAIA
Rae
IAIAIA
Heontaim
0,
$2(z) = { 32-1, (2.3.3)
3-32,
cansame ©
IAINIA
eas
IAIAIA
onto
gi(x) and ¢o(z) are plotted in Fig. 2.3.2. For the present trial function,
the problem domain is divided into three subdomains and two piecewise linear
functions are used. Of course, more piecewise functions can be used along with
more subdomains to improve accuracy of the approximate solution. The trial
function can be rewritten as
a,(3z), O
= (4.2.1)
Rewriting Eq. (4.2.1) gives
(4.2.2)
As a result, the equivalent spring constant for the axial bar is
bey = (4.2.3)Section 4.2 Axial Member 15
Uy Us
Figure 4.2.1 Axial Members Represented by Equivalent Springs
& Example 4.2.1 Axial members can be represented by serial and/or
parallel linear springs. For example, a bar of telescoped shape can be replaced
by a series of springs as shown in Fig. 4.2.1. There are three linear spring
elements and each element has matrix expression as shown in Eq. (4.1.4) with
proper spring constant kj. Assembling them gives
ko ky 0 0 uy fi
-k kth -b 0} )ul_)o
0 ky ketks —ks| ) us f=) 0 (42.4)
0 0 —kg ks U4 P
4;2: and fy is the unknown reaction force at the left end support.
Instead, u; = 0 is given as the boundary condition. Solution of Eq. (4.2.4) with
this boundary condition will result in f = —P which can be also obtained from
the static equilibrium. However, the finite element formulation already includes
equations of static equilibrium so that we may not use additional equilibrium
equations. These equations are redundant.
& Example 4.2.2 Consider a statically indeterminant system as shown in
Fig. 4.2.2, The axial member can be replaced by two linear springs as seen in
the figure. The finite element matrix equation for this system is
0.5k —0.5k 0 wy fi
05k 15k -k]iu}= 20 (4.2.5)
0 -k kJ lus fs
where k = 42 and f; and f3 are the unknown forces at the supports. Because
the system is statically indeterminate, we cannot find the forces from the static76 Direct Approach With Spring System Chapter 4
Dy) Migr peat
4
Uy Ue us
2L L
Figure 4.2.2 A Statically Indeterminate Axial Member
y AE
yk
“AE Y
P be | P
a ee
/
Rigid Plate
Figure 4.2.3 A Spring Representing a Statically Indeterminate System
equilibrium equation only. However, the finite element formulation includes not
only equilibrium but also geometric compatibility (compatibility of deformation).
Therefore, Eq. (4.2.5) along with boundary conditions u; = u3 = 0 can solve
the deformation as well as the reaction forces.
Another statically indeterminate system made of axial rods can be represented
by a spring constant as shown in Fig. 4.2.3. tSection 4.4 Other Systems 17
Figure 4.3.1 Torsional Members
4.3 Torsional Member
A circular rod subjected to a twisting moment produces an angle of twist
TL
"a (43.1)
in which @ is the angle of twist, T is the applied torque, L is the length of the member,
G is the shear modulus, and J is the polar moment of inertia of the circular cross-
section. Rewriting the equation yields
GI
T=6
(4.3.2)
‘The equivalent spring constant is keg = $2. Torque T corresponds to the spring force
F and angle of twist @ to the spring displacement u. As examples, both statically
determinate and indeterminate torsional members are shown in Fig. 4.3.1 along with
their equivalent spring systems.
4.4 Other Systems
Other frequently used engineering systems, which can be easily substituted with
a spring system, are heat conduction, simple fluid flow along pipes and electric cir-
cuits. For one-dimensional heat conduction, heat flux is proportional to temperature78 Direct Approach With Spring System Chapter 4
ky ky
—— i — —
ky ih
Figure 4.4.1 Mechanical Forces From Newton’s Third Law
difference. That is, heat flux q is
q=—-kAT (4.4.1)
where k; is the heat conduction coefficient and AT is the temperature difference
between two end points of a one-dimensional bar. The minus sign in the equation
denotes heat flux is in the opposite direction as the temperature increases along the
positive axis. The equivalent spring system has the spring constant key = —ke, the
spring force F = q and the spring displacement u = T.
Fluid flow rate through a pipe of constant cross-section is proportional to the
pressure difference of the two ends. That is,
Q=~-kpAp (442)
Here, Q is the flow rate, Ap is the pressure difference, and kp is the proportional
constant. For a laminar flow, the proportional constant can be expressed as
__ndt
~ 128nL
where yp is the fluid viscocity, d is the pipe diameter, and L is the pipe length. The
equivalent spring system has the spring constant keq = —kp, the spring force F = Q
and the spring displacement u = p.
Electric current flow é through a resistance R is
ae
i=R (44.4)
where V is voltage. The equivalent spring system has spring constant key = 4, force
F = i, and displacement u = V. One may think what about V =i R such that
F =V, key = Rand u=i. Which one is correct? Is the equivalent spring constant
Ror #? One is right and the other is wrong. One way to select the right form is
to understand the nature of spring force and to find the parameter equivalent to the
force. Then, the rest of parameters can be determined accordingly.
When two springs are separated each other, internal forces occur between the
two springs. These forces are equal in magnitude and opposite in direction. When the
two springs are put together, the forces cancel each other and become zero if there is
no external force applied at the joint as seen in Fig. 4.4.1. This is known as Newton’s
third law. When considering electric current, its sum at the joint of resistants (i.e.
the middle point in Fig. 4.4.2) is also zero like the force. However, voltage does not
vanish at such a joint. As a result, electric current is similar to the mechanical force.
‘Therefore, the equivalent spring constant for the electric circuit is 4 but not R.
kp (4.4.3)Section 4.4 Other Systems 79
k = 16
Figure 4.4.2, Flow Through a Pipe System
# Example 4.4.1 Consider a pipe system for fluid flow as seen in Fig.
44.2, The pressure at the inlet is 200 while the flow rate at the outlet is 50.
The proportional constants kp in Eq. (4.4.2) are given in the figure. All units
are assumed consistent. We want to determine the flow rate between node 3 and
node 4.
Using the linear spring equivalency, the matrix equation becomes
-1 1 0 0 0 O4fm a
i is ¢ 3 6 0 lle 0
0 4 -2 2 16 0 | Jos 0
oer UCU 0 (445)
0 0 1 1 49 32 | |p 0
0 0 0 o 32 —32d bog Qo = 50
Applying the known pressure pi = 200 to this equation yields the following
pressure at each node.
P2 = 150, ps = 142.2, pa = 147.6, ps = 139.6, po = 138
‘Therefore, the flow rate between nodes 3 and 4 is
Qs-4 = —2 x (147.6 — 142.2) = -10.8
Hence, the flow is upward with rate of 10.8. t80
Direct Approach With Spring System Chapter 4
Figure P4.1 Problem 4.1
41
42
43
44
45
46
Problems
Find the system of equations for the spring system shown in Fig. P4.1. Solve
the matrix equation to find the displacements of the nodal points.
A circular shaft is made of two different materials and fixed at both ends. It is
subjected to torsions as shown in Fig. P4.2. The diameter of the shaft is 0.1 m.
Find the angles of twist at the nodal points.
For the given mass-spring system (see Fig. P4.3), (a) develop the system mass
and stiffness matrices to determine natural frequencies of the system. (b) Apply
the given boundary conditions to the matrix equations.
An electric circuit is shown in Fig. P44, Find the current flow using the
equivalent spring system.
For a laminar pipe flow, the flow rate is proportional to pressure difference.
Construct the system of equations for the given pipe flow as shown in Fig. P4.5
in order to find the flow rate through each pipe.
Heat conduction through a circular pipe is expressed as
___2kL
1 =~ inro/ny
in which & is the heat conduction coefficient, L is the length of the cylinder, and
7) and r; are the outer and inner radii of the cylinder, respectively. Therefore,
two concentric cylinders with radii r, < rg < rg can be represented by two
springs in serial connection. Find the equivalent spring constants for the two
linear springs in Fig. P4.6 and construct the system of equations.Problems 81
22 KN-m 22 KN-m
— —
Fixed elem #1 elem #2 | elem #3 | Fixed
2m en 1.5m
Diameter = O01 m
Element 1 & 2: G = 80 GPa
Element 3: G = 40 GPa
Figure P4.2 Problem 4.2
rigid bar
igi ks
k a:
i 4
downs } WinWi-Tap Lt
6
fin —t
rigid bar
1 [ue Lug Leu [> Us
Figure P4.3 Problem 4.3
-—> u.
10 volts
Figure P4.4 Problem 4.4Chapter 4
Direct Approach With Spring System
82
Figure P4.5 Problem 4.5
BES ERROR
%
Re
BS
see
SO
x
<
>
SS
=] y2-os vs— un now up (5.2.4)
or
a3 23-22 2-23 22-21 us
where
1 lan
A= 5det|1 2 wn (5.2.5)
1 ts Ys
Magnitude of A is equal to the area of the linear triangular element. However, its value
is positive if the element node numbering is in the counter-clockwise direction andSection 5.2 Linear Triangular Element 87
(=3, v3)
Uy
(=, %)
(22, Y2)
Figure 5.2.1 Linear Triangular Element
negative otherwise. For the finite element computation, the element nodal sequence
must be in the same direction for every element in the domain.
Substitution of Eq. (8.2.4) into Eq. (5.2.2) produces
= Ay(z,y)uy + Ho(2, y)ue + a(x, y)us (5.2.6)
in which H(z, y) is the shape function for linear triangular element and it is given
below:
H,= Filles — zay2) + (y2 — ya)z + (29 — 22)y] (5.2.7)
Hy = gilleam — 198) + vs wd + (#1 —25)al 628)
Hs= Fille — ays) + (yr — yo) 2 + (22 — 21)y] (5.2.9)
These shape functions also satisfy the conditions
Hi(xj,93) = 85 (5.2.10)
and
3
Vaal (5.2.11)
ia
Here, 6;; is the Kronecker delta. That is,
{a i ay (6.2.12)
A problem domain is discretized into a number of finite elements using the linear
triangular elements. An example of finite element mesh discretization is illustrated in
Fig. 5.2.2. As seen in the discretization, the actual curved boundary is approximated
by a piecewise linear boundary. The crude mesh in the figure may be refined for88 Laplace’s and Poisson’s Equations Chapter 5
Figure 5.2.2 Finite Element Discretization
closer approximation of the actual boundary using linear triangular elements. Another
alternative is to use higher order finite elements which can fit the curved boundary
using higher order of polynomial expressions.
For a linear triangular element shown in Fig, 5.2.1, the element matrix is
computed as derived below.
oh
a f (8m du, Owdu a
wie f (Geet Seseane J [ie
a \¢ os atte 4p y)an (5.2.13)
E
a
€
+
where 9° is the clement domain.
Performing integration after substituting the shape functions Eqs (5.2.7) through
(5.2.9) into Eq. (5.2.13) gives
ki kia kis
[k= [ kao ‘| (5.2.14)
ka: a2 koa
in which
ku = Filles — 22)? + (y2 — ys)" (5.2.15)
k= Filles ~ ©2)(21 — 23) + (ye — ys)(ys — v1)] (5.2.16)
his = Ules — 22)(22— 21) + (y2 — ¥s)(¥1 — ¥2)] (6.2.17)
kay = hie (5.2.18)Section 5.2 Linear Triangular Element 89
(0,1)
(0,0) (1,0)
Figure 5.2.3 Triangular Domain With One Element
1
kan = Gyl(ti — 23)” + (vs — n)*)] (5.2.19)
1
bas = Galler ~ #5)(22 — 21) + (vs — 1)(v1 — ¥2)] (5.2.20)
kay = his (5.2.21)
kso = kos (5.2.22)
1 : .
ss = gyl(e2 — 21)? + (1 ~ v2))) (5.2.23)
Because 42 and 9! are constant for the linear triangular element, the integrand
in Eq. (5.2.18) is constant. As a result, the integration in Eq. (5.2.13) becomes the
integrand multiplied by the area of the element domain and the result is given in Eqs
(5.2.15) through (5.2.23).
& Example 5.2.1 We compute the element matrix for Poisson’s equation
for the linear triangular element shown in Fig. 5.2.3. Element node numbering
is in the counter-clockwise direction. The area of the triangular element is 0.5
and the element matrix is
10 -0.5 -05
[k]=]-05 05 0 (5.2.24)
05 0 05
‘The other domain integral term to be evaluated in Eq. (5.1.18) is
f wa(z,y)Q (5.2.25)
In90 Laplace’s and Poisson’s Equations Chapter 5
This integration results in a column vector as shown below. Computation of this
integral over each linear triangular element yields
Ay
if {ie} xen (5.2.26)
ine | Hy
Analytical integration may not be simple depending on function g(z,y). Then, a
numerical integration technique may be applied to compute this integral. Some
numerical techniques are discussed in Chapter 6.
5.3 Bilinear Rectangular Element
The bilinear rectangular element is shown in Fig. 5.3.1. The shape functions
for this element can be derived from the following interpolation function:
u= a; +92 + agy + ay (5.3.1)
This function is linear in both z and y. Applying the same procedure as used in the
previous section results in
m= Eb-2He-v) 6.8.2)
ie xe Tae 9) (5.3.3)
Age Hor avlery) (5.3.4)
Ha= xe ~2)(e+y) (5.3.8)
where 2b and 2c are length and height of the element, respectively.
The shape functions Eqs (5.3.2) through (5.3.5) can be obtained by product of
two sets of one-dimensional shape functions. Let the linear shape functions in the
«-direction with nodes located at = —b and z = b be
dle) = 20-2) (6.3.6)
and
d2(z) xt A) (5.3.7)
Similarly, the linear shape functions in the y-direction are
he) = Ze-9) 638)
and
vale) = E(e+) (5.3.9)Section 5.3 Bilinear Rectangular Element 91
Figure 5.3.1 Bilinear Element
Product of Eqs (5.3.6) and (5.3.7) and Eqs (5.3.8) and (5.3.9) yields Eqs (5.3.2)
through (5.3.5). The shape functions obtained by products as shown above are called
the Lagrange shape functions.
@ Example 5.3.1 We want to compute the element matrix for Poisson's
equation using the bilinear shape functions.
oy
ft
de
re) — Or 4 5H: 1H s
ula f () ae tee Ye ae
id 2:
oat,
Ox
oH,
by
Ha
y oH, 8, @Hx 98s) \ a0 5.3.10)
ans ( U'ey Oy ot) (5.3.10)
ai
ey
where H; is the bilinear shape function. This will be a matrix of 4x4, The first
component is
OH, OH, + oh OW,
wie [) Lae ee + a ae ane
= LL agizalle— 0? + vaya
_ e+e
~ 8be
Performing integrations for all terms results in the following element matrix for
the bilinear rectangular element.
(5.3.11)
ir kia hig hia
ey. | Az boo kos hog
[kK] = be is is is (5.3.12)
hig koa kaa haa92 Laplace’s and Poisson’s Equations
in which
BP+e?
k= abe
BF — 2c?
re
bbe
e+e?
hig = She
co? — 26?
hua =
kag = hy
kos = kia
koa = his,
egg = yy
kes = kia
kag = yy
t
The other domain integral becomes
b A
ola,
ja H, [Up vidude
Hy
This is similar to that in Eq. (5.2.26).
5.4 Boundary Integral
The boundary integral in Eq. (5.1.18) is
au au
[egar=D [wie
Chapter 5
(6.3.13)
(5.3.14)
(5.3.15)
(5.3.16)
(5.3.17)
(5.3.18)
(5.3.19)
(5.3.20)
(5.3.21)
(5.3.22)
(5.3.23)
(5.4.1)
where subscript n denotes the natural boundary and superscript ¢ indicates the
element boundary. Here, the summation is taken over the elements which are locatedSection 5.4 Boundary Integral 93
BK =gwen
Qu =piven
Figure 5.4.1 Elements at Boundary
at the boundary of the domain and whose element boundaries are subjected to the
natural boundary condition as shown in Fig. 5.4.1.
For simplicity, we consider an element boundary which is parallel to the z-axis
as seen in Fig. 5.4.2. The element boundary is subjected to a positive constant
flux. That is, the flux is in the outward direction which is assumed to be positive.
Since linear triangular elements are used for the domain discretization, the element
boundary has two nodes as shown in Fig. 5.4.2. As a result, linear one-dimensional
shape functions are used to interpolate the element boundary. The boundary integral
along the element boundary becomes
(5.4.2)
where
hig = 2} — 2; :length of the element boundary (5.4.3)
This colume vector is added to locations associated with nodes i and j. If the element
boundary is along the y-axis or is in an arbitrary orientation about the zy-axes, the
result is obtained as long as i; is the length of the element boundary.
& Example 5.4.1 We consider a heat conduction problem with a triangular
shape of domain which is discretized into four linear triangular elements (see
Fig. 5.4.3). There are six nodes in the domain. One boundary is insulated or
symmetric so that there is no flux (34 = 0) through the boundary. Another
boundary has a constant heat flux and the third boundary has a known
temperature. Find the temperature at the nodal points.
Each element matrix can be obtained from Eqs (5.2.14) through (5.2.23). The
local and global node numbering is shown for each element in Fig. 5.4.4. The94 Laplace’s and Poisson’s Equations Chapter 5
‘J=constant
Figure 5.4.2 Triangular Element Subjected to Constant Flux
global node numbering is used to identify what nodes are associated with each
element while the local node numbering is related to the assignment of shape
functions to the nodes. Therefore, the local node numbers are always 1, 2 and
3 for the linear triangular clement. For the present elements, element matrices
are the same and one of them is given below:
05 -0.5 0.0
{K]}=|-05 10 -05 (5.4.4)
0.0 -05 05
If the local node numbering changes for each element, the element matrix
becomes different from that in Eq. (5.4.4). Assembling the element matrices
into the system matrix based on the global node numbers results in
05 -05 00 00 00 00
0.5 20 -10 -05 00 00
00 -10 20 00 -10 00
00 -05 00 10 -05 0.0
0.0 00 -1.0 -05 20 -0.5
00 00 00 00 -05 05
[K]= (5.4.5)
for the system nodal vector { u; Uz Us U4 Us ts }.
‘The system column vector is obtained from the boundary integration of the given
flux. Element boundaries with specified nonzero flux are boundaries 4 — 5 and
5 —6. Using Eq. (5.4.2), the equivalent nodal fluxes are
(8-0) eso
(8)-(3 een
andSection 5.4 Boundary Integral 95
Figure 5.4.3 A Triangular Domain
On the other hand, element boundaries 1 ~ 3 and 3 — 6 have zero nodal fluxes
because they are insulated. Combining all these vectors yields the system column
vector
{F}={F Fh 0.0 Fy 4.0 2.0}7 (6.4.8)
where Fy, Fp and F4 are unknown nodal fluxes. At node 4 flux is known at the
edge 4 — 5 but it is not known at the edge 2— 4. The nodal flux at node 4 is
affected by fluxes at the both edges and one of them is not known. As a result,
Fy is unknown. The same explanation holds for F,. Since temperature is known
at nodes 1, 2 and 4, we can solve the matrix equation
[K]{u} = {F} (5.4.9)
with tu = 0.0, uz = 0.0 and ug = 0.0. The solution gives us = 3.0, us = 6.0
and ug = 10.0. ¢
4 Example 5.4.2 One common boundary condition in heat transfer is heat
convection at the boundary. This boundary condition is expressed as
Ou
rae a(u— to) (5.4.10)
where @ is the heat convection coefficient and u, is the ambient temperature.
‘That is, heat flux is proportional to the temperature difference of the body
surface and the environment. Rewriting this in a more general expression gives
& =autb (5.4.11)96 Laplace’s and Poisson’s Equations Chapter 5
global node #
/ local node #
AAVA
element ° Cen 7 element #3 aan 7
Figure 5.4.4 Elements With Local and Global Node Numbers
where @ and b are known functions because Us is a known value, Substituting
Eq. (5.4.11) into the element boundary integral in Eq. (5.4.1) results in
f . wotar = iE wia(z, yu + (2, y)}dP (5.4.12)
Whenever there is a product of test function and trial function, the term becomes
a matrix while the test function only produces a vector. As a result, the first
term of Eq. (5.4.12) becomes using linear shape functions to interpolate the
element boundary
yar { a (6.4.13)
uy
where s; and s; are the coordinate values of the local axis located along the
element boundary as seen in Fig. 5.4.4, and u; and u, are the nodal variables at
the element boundary. This integral results in a matrix of 2 x 2 for an element
with two nodes on the boundary. This matrix should be added to the system
matrix. The rest term in Eq. (5.4.12) can be dealt in the same way described in
this section {
5.5 Transient Analysis
The governing equation for transient heat conduction is
24 9?
& L(+ *) inQ (5.5.1)
where ¢ denotes time and a is a known function. Usually, for heat conduction problems
with constant material properties a is equal to “€ where k is the coefficient of heatSection 5.5 Transient Analysis 97
conduction, p is density and cp is specific heat. Here, heat. generation or heat sink is
neglected.
Applying the method of weighted residual to Eq. (5.5.1) in the same way as
given in Section 5.1 gives
84 a9 dw du , dw du 1 6u
t= [we +2 (Fests Bat og au) aa a 5 ar (6.5.2)
As noticed here, the method of weighted residual is applied to the spatial domain but
not to the temporal domain regardless it is a steady state or a transient problem. As
a result, the difference between the transient and steady state problems is the first
term in Eq. (5.5.2). The other difference is, of course, the variable u is a function of
both space and time for the transient problem.
The variable u = u(z,y,t) is interpolated within a finite element in a similar
way as before using shape functions.
ulesnt) = Mile, wus) (65.3)
:
where H;(z, y) is the shape function and n is the number of nodes per element. One
thing to be noted here is that the shape functions are used to interpolate the spatial
variation within the element while the temporal variation is related with the nodal
variables. Applying Eq. (5.5.3) to the first term in Eq. (5.5.2) yields
A i
[ue] = i He \{Hi Hy He}dQd ty (55.4)
i Las re
for a linear triangular element. On the other hand, the matrix and vector obtained
from the second and third integrals of Eq. (5.5.2) are the same as those developed in
the previous sections other than that a should be included in the matrix.
Computation of Eq. (5.5.4) results in
eteeeneceas
mi=4 : 2 | (5.5.5)
eee iecan
where A is the area of the triangular element. Similarly, the bilinear rectangular
element yields
4212
2 eee
36/12 4 2 65.6)
2124
‘Therefore, the final matrix equation for Eq. (5.5.1) becomes
(M]{a}' + [K]{u}! = (FY (5.5.7)98 Laplace’s and Poisson’s Equations Chapter 5
Because this equation should be true at any time, we put superscript ¢ in Eq. (5.5.7)
to denote the time when the equation is satisfied. Furthermore, matrices [M] and [K]
are independent of time. Now, the parabolic differential equation has transformed
into a set of ordinary differential equations using the finite element method. In order
to solve the equations, we use the finite difference method for the time derivative.
The next sections show the solution techniques.
5.6 Time Integration Technique
First of all, we explain the forward difference method for time derivative. The
forward difference is expressed as
oye {upttat —{u}?
wee (5.6.1)
Substitution of Eq. (5.6.1) into Eq. (5.5.7) results in
[M]{u}*4* = Ae({r} — fA] {u}) + [Ml {uy* (5.6.2)
In the above equation, all the terms defined at time ¢ are put on the right-hand
side of the equation while the term associated with time ¢ + At is at the left-hand
side, Equation (5.6.2) can be solved from the given initial condition {u}° and known
boundary conditions {F}* as explained below:
1. Setting t = 0 in Eq. (5.6.2) can find the solution for {u}4* from {u}° and {F}°.
2. Once {u}4* is found, we can continue the previous step again by setting t = A¢
in Eq. (5.6.2) in order to determine {u}?4'. This step is repeated until the
solution reaches the final time.
The forward difference technique in Eq. (5.6.1) has the local truncation error
O(At?) and the global truncation error O(At) where O denotes the order of error.
The forward difference technique is conditionally stable so that a proper size of time
step At should be used to have a stable solution.
‘The next technique is the backward difference technique. For this technique,
Eq. (5.5.7) can be rewritten at time t + At.
[MI{u}'t4t + [K]{u}t4! = (Fy +4t (5.6.3)
The time derivative in the backward difference is
payee = oO Go an
Use of Eq. (5.6.4) with Eq. (5.6.3) results in
([M] + Ae(K]){u}*4t = Aetry +4! + [M}{u}* (6.6.5)Section 5.6 Time Integration Technique 99
The solution procedure is similar to that for the forward difference technique. The
local and global truncation errors are also the same as those for the forward difference
technique. However, the backward difference technique is unconditionally stable.
Therefore, any size of At can be used without worrying about stability. However,
the time step size is, of course, important for accuracy because of the truncation
error.
The other technque is the Crank-Nicolson method. For this technique, we write
Eq. (5.5.7) at time t + 4¢ instead of t. Then,
[Muy + [uy ® = (rye (5.6.6)
The time derivative term is expressed using the central difference technique like
jt {u}ttd* — {apt
xi (5.6.7)
On the other hand, the other terms are computed as average like
tate = Supt + tuys) (668)
and
(ryt = Lccey + (ry) (63)
Substitution of Eqs (5.6.7) through (5.6.9) into Eq. (5.6.6) yields
(2(M] + At[K]){u}'t4t = An({F} + (FF +4) + (2[M] - At{K]{u}! (6.6.10)
‘The Crank-Nicolson method is also unconditionally stable and the global truncation
error is O(At?) so that it is one-order higher than the other two techniques.
4 Example 5.6.1 Let us solve the following set of ordinary differential
equations using the backward difference method.
[M]{u} + [K]{u} = {F} (5.6.11)
where
2100
ot
M=slo iad (5.6.12)
ot
ed)
-1 2 -1 0
ele (5.6.13)
0 0 -1 1100 Laplace’s and Poisson’s Equations Chapter 5
and
{F}={Fi 00 Fi}? (5.6.14)
Here, F, and Fy are unknown while u; = 100 and tq = 100 are known
as boundary conditions. In addition, the initial condition states {u}° = 0.
Substitution of Eqs (5.6.12) throngh (5.6.14) into Eq. (5.6.5) yields
d4At 2-At 0 0 ee
tat Pyoat t-ar 0 uptat
0 Gm At 4426 i oe (ee
0 0 fat §4+Ael Cujtet
dui + qua+ Fit
dul + 2uh + #4
guy + 5g + uy
duh + Bul + Fat
Applying the boundary conditions with At = 1 as the time step size, Eq. (5.6.15)
(5.6.15)
becomes
ty ute 100
-§ 8 _§ 9 ubtat Lyt 4 2uf 4 Lut
5 os 2 a=) gut gua + ous
oF wel yagtar =) fab + dug + bad oe
0 0 0 1 uatat 100
Let t = 0 in Eq. (5.6.16) and use the initial condition to find the solution at
t= 1. The solution is
{ul ub ub wl}={100 45.5 45.5 100} (5.6.17)
where superscript 1 denotes the solution at time ¢ = 1. To continue the solution,
let t = 1 in Eq. (5.6.16) and use the previous solution in Eq. (5.6.17). Then,
the solution at time t = 2 is
{u? uZ u2 w2}={100 75.4 75.4 100} (5.6.18)
‘This process continues until the final time. As expected, the solution approaches
to the steady state of uniform value of 100. {
4 Example 5.6.2 Let us solve Example 5.6.1 using the Crank-Nicolson
method. Applying Eqs (5.6.12) through (5.6.14) to Eq. (5.6.10) yields
24at }-At 0 0 Chey
3-At $+2At 4-At 0 ubtat |
0 oA fas gaat] Y agtar 0 =
0 0 g-At 3+Atl Luft
0 0 us
t4+At 0 al
ano jtat us
44At $-Atl Caf
At(F} + Fit4*)
0
: (6.6.19)
Ai (Fi + Fi*4*)Section 5.7 Axisymmetric Analysis 101
Figure 5.7.1 Cylindrical Coordinate
Applying the boundary conditions uj = 100 and u4 = 100 with At = 1 results
in the following matrix equation.
1 0 0 9 tee 100
7 0 Hat age ae
= oe us guj — 2uh + fu!
ye z. = i ? ; 5.6.20
Wp 3) agra =) ab da dh i
O00 1 utr 100
Applying the initial condition with ¢ = 0 yields the solution at time t = 1.
{ul ul uf ul}={100 25 25 100} (5.6.21)
‘The solution at the next step, ie. t= 2, becomes
{uz u} ug ul} ={100 81.3 81.3 100} (5.6.22)
using the solution in Eq. (5.6.21) and t = 2 for Eq. (5.6.20). ¢
5.7 Axisymmetric Analysis
Laplace’s equation in the cylindrical coordinate system is written as below:
au
pa 9 (57.1)
oe
Or?
where r, ¢ and z are the radial, circumferential, and axial axes, respectively, as
shown in Fig. 5.7.1. For the axisymmetric problem, variable w is independent of the
circumferential axis ¢. This is the case where the domain is axisymmetric and all the
described loading and/or boundary conditions are also axisymmetric. Therefore, the
governing equation is simplified to
Ou lou, eu
or * sort O27 — 9 (67.2)
for the axisymmetric analysis.102 Laplace’s and Poisson’s Equations Chapter 5
Let us apply the weighted residual method. The integral becomes
au, 1du, Oe
fo $1 4S aaa (8.7.3)
The first two terms in Eq. (5.7.3) can be rewritten as
10 a
Lota 3) toa
Now, the domain integral can be expressed as
[sosan= ff [ toarasiras
=2n i f rf(r2)drdz (5.7.5)
}an (6.7.4)
where f(r, 2) is any function which is independent of ¢. Applying Eq. (5.7.5) to Eq.
(5.7.4) gives
arf fw {Z(-$) +-Sz}an (5.7.6)
‘The weak formulation of Eq. (5.6.7) using the integration by parts becomes
dw du, dw du du
~on f f+ (3 oe + eee aed + fru Star (6.7.2)
where the boundary integral is on the rz-plane and n is also the outward normal unit
vector to the boundary.
Equation (5.7.7) is now expressed in terms of the radial and axial axes, ie. r
and z. As a result, we need a finite element discretization in the rz-plane like a
two-dimensional analysis. The same kinds of shape functions can be used for both
two-dimensional and axisymmetric analyses of Laplace’s equation. However, there is
one difference between the two formulations. The axisymmetric analysis contains r
within the integral while the two-dimensional analysis does not include r. Let us use
the linear triangular element for the axisymmetric analysis. The element matrix for
the triangular element can be written as
wma f ((
ce
+ Sia) (oh Oe fp }) are (6.7.8)
a
$BSection 5.8 Three-Dimensional Analysis 103
(tq) 23)
ty 22)
(ty 24)
r
Figure 5.7.2. Triangular Axisymmetric Element
where H; is given in Eqs (5.2.7) through (5.2.9) with replacing x and y by r and
z. The element is shown in Fig. 5.7.2. As discussed in Sec. 5.2, #4 and 44 are
independent of r and z. We also know that
[ / rdrdz = Are (5.7.9)
fe
where A is the area of the triangular element as defined in Eq. (5.2.5), and
re = 3(ry +12 +1) is the r coordinate value of the centroid of the triangle as seen in
Fig. 5.7.2. Consequently, the element matrix for the linear triangular axisymmetric
element is
ki kia kis
[K*] =2nr, | kor koe kes (5.7.10)
ks kaa kag
in which kj; is the same as given in Eqs (5.2.15) through (5.2.23) except that 2; and
ui are replaced by r; and 2 for the axisymmetric analysis.
‘The flux at the boundary is also handled in the similar way as the two-
dimensional analysis. However, the boundary integral for the axisymmetric analysis
also contains r. If there is a uniform flux on the boundary of a linear triangular
element for the axisymmetric problem as shown in Fig. 5.7.3, the equivalent nodal
flux vector becomes rFgl{1 1}7 where # = 3(r;+1j) is the average r coordinate value
of the two boundary nodes é and j, q is the value of uniform flux per unit area, and /
is the side length of the element as seen in Fig. 5.7.3.
5.8 Three-Dimensional Analysis
For the three-dimensional analysis of Poisson’s equation, Eq. (5.1.18) can be
extended directly into
du Ou, Owdu , dw du du
ram f Fer + ere + Fee an f walen.2)an+ [wear (6.8.1)104 Laplace’s and Poisson’s Equations Chapter 5
wral
Figure 5.7.3. Flux on Axisymmetric Element
After discretization of the domain into finite elements, we can compute element
matrices and vectors as before. For further explanation, we use a tetrahedral element
as shown in Fig. 5.8.1. The variable interpolation for this element is assumed
u={X}7{c} (5.8.2)
where
{C}={er co 03 c}" (5.8.3)
and
{xX}={1 2 y z}? (5.8.4)
That is, the interpolation function is assumed to be linear in terms of every axis.
Evaluation of the variable at the nodal points gives
uw lmym aye
el ele (68.5)
ug 1 zg ys 23] ) ¢3
U4 1 ozq yg zd Leg
or Eq. (5.8.5) can be put in the following way
{u} = [X]{C} (5.8.6)
in which :
{u}={u uz us wu} (5.8.7)
After taking the inverse of matrix [X] and pre-multiplying it to both sides of Eq.
(5.8.6), we substitute the resulting expression into Eq. (5.8.2). Then we obtain
w= {X)"RP a) = 17 (a) (68.8)
where
{HJ ={Hi Ho Hz Ha} ={X}"[X]? (5.8.9)Section 5.8 Three-Dimensional Analysis
y
(qty %)
eg
(%y Vy %)
7s
oe
@ J
ou WY, Fy Mes %)
z
Figure 5.8.1 Tetrahedral Element
are the shape functions for the tetrahedral element with four nodes.
105
Substitution of the shape functions into Eq. (5.8.1) with element discretization
results in an element matrix which is
oH,
2
OH,
tt bz OH; OH;
wel= f () ae pe
ne ac
oHs
€
s
7
afseBelget
411 12 413° 14
[xy} = [a2 022 25 ane
431 432 433 G34
44) 442 443 O44
Then, the shape functions can be expressed as
Ay(2,y,2) = a1 + ane + aay + an2
Ha(z,y, 2) = ay2 + az2z + agoy + Ganz
Hg(x,y, z) = ay3 + ao32 + aggy + @432
Ha(z,y, 2) = a14 + azqz + agay + a44z
Inserting Eqs (5.8.12) through (5.8.15) into Eq. (5.8.10) yields
ku hia his kag
kor koa kas koa
kay ks2 kag kaa
kay kan ag hag
[K‘]}=V
Co
os OHay
oy
(5.8.10)
(5.8.11)
(5.8.12)
(5.8.13)
(5.8.14)
(5.8.15)
(5.8.16)106
in which
Laplace’s and Poisson’s Equations
kur = (an)? + (aan)? + (aan)?
hz = G42 + 43192 + 41042
hig = a21a23 + @31033 + 441043
Big = 21424 + 431094 + 041045
kay = kia
kop = (a22)? + (ase)? + (az)?
kos = az2d23 + 432033 + G42043
kag = Qo2a24 + 432034 + a42044
kay = is,
kegp = kas
kg = (a25)? + (as)? + (ass)?
aq = @zadz4 + G33034 + 43044
ka = kis
a2 = koa
kag = kaa
kag = (az4)? + (34)? + (asa)?
Furthermore, V is the element volume.
‘The flux boundary condition on the three-dimensional analysis can be treated in
the following way. For a uniform flux on one side of the tetrahedral element, the flux
column vector becomes 4¢2{1 1 1}7 for the nodes on the element boundary as shown
in Fig. 5.8.2. Here, A, is the surface area of the element side on which a uniform flux
of q is applied.
The element matrix for the transient term (i.e. $4) is
w= 5
heee
Hewes
1
1
1
2.
Beee
Chapter
(5.8.17)
(6.8.18)
(5.8.19)
(5.8.20)
(6.8.21)
(5.8.22)
(5.8.23)
(5.8.24)
(5.8.25)
(5.8.26)
(5.8.27)
(5.8.28)
(6.8.29)
(5.8.30)
(5.8.31)
(5.8.32)
(5.8.33)Section 5.9 MATLAB Application to 2-D Steady State 107
Figure 5.8.2. Triangular Boundary With Constant Flux
u=100sin( TE
Figure 5.9.1 Mesh With Linear Triangular Elements
for the tetrahedral element.
5.9 MATLAB Application to 2-D Steady State Analysis
This section shows some examples for two-dimensional steady state problems
using MATLAB programs. Both linear triangular and bilinear rectangular elements
are used.108
Laplace’s and Poisson’s Equations Chapter 5
& Example 5.9.1 We want to solve the two-dimensional Laplace equation
for the following given conditions. The domain and the finite element discretiza-
tion is shown in Fig. 5.9.1.
au | tu
bz? * By?
for 0 < 2 <5 and 0 < y < 10. The boundary conditions are u(z,0) = 0
for 0 <2 < 5, u(0,y) = 0 for 0 < y < 10, u(2,10) = 100sin(x2/10) for
0 <2 <5, and “5M = 0 for 0 < y < 10. The MATLAB main program
along with function programs are listed below. Some function programs listed
in previous chapters are not listed here. Appendix A liste all the function files.
%-
% EX5.9.1.m
% to solve the two-dimensional Laplace equation given as
% u,xx + wyy =0,0 node no. and j-> x or y
—
gcoord(1,1)=0.0; gcoord(1,2)=0.0;
0 (6.9.1)Section 5.9 MATLAB Application to 2-D Steady State
gcoord(2,1)=1.25; geoord(2,2)=0.0;
.75; gcoord(4,2)=0.0;
gcoord(5,1)=5.0; gcoord(5,2)=0.0;
gcoord(6,1 coord (6,2
gcoord(7,1)=1.25; gcoord(7,2)=2.55
gcoord(8,1)=2.5; gcoord (8,2
gcoord(9,1)=3.75; gcoord(9,2)=2.5;
gcoord(10,1)=5.0; gcoord(10,2
gcoord(11,1)=0.0; gcoord(11,2
gcoord(12,1)=1.25; gcoord(12,2)=5.0;
gcoord(13,1}=2.5; gcoord(13,2)
gcoord(14,1)=3.’
gcoord(15,1)=5.
gcoord(16,1)=0.
gcoord(17,1)=1.
gcoord(18,1)=2.5:
gcoord(19,1)=3.
gcoord(20,1)=5.
gcoord(21,1)=0.
gcoord(22,1)=1.
gcoord(23,1)=2:
gcoord(24,1)=3.
‘gcoord(25,1)=5.
%
| aan
% input data for nodal connectivity for each element
% nodes(igj) where i-> element no. and j-> connected nodes
$$$
nodes(1,1)=1; nodes(1,;
nodes(2,1)=2; nodes(2,
nodes(3,1)=3; nodes(3;;
nodes(4,1)=4; nodes(4,:
nodes(19,1)=13; nodes(19,2)=14; nodes(19,3)=19;
109110
Laplace’s and Poisson’s Equations Chapter 5
nodes(20,1)=14; nodes(20,2)=15; nodes(20,3)=!
nodes(21,1)=11; nodes(21,2)=17; nodes(21,3)=16;
5 nodes(22,3)
}=19; nodes(23,3)=18;
10; nodes( 24,3):
7; nodes(25,3)=22;
7; nodes(26,2)=18; nodes(26,3)
nodes(27,; odes(27,3):
nodes(28,2)=20; nodes(28;;
6; nodes(29,2)=22; nodes(29,3)=21;
=17; nodes(30,2)=23; nodes(30,3)=22;
nodes(31,2)=24; nodes(31,3)=23;
9; nodes(32,2)=25; nodes(32,3)=24;
% input data for boundary conditions
(saan <=
bedof(1)=1; % first node is constrained
beval(1)=0; % whose described value is 0
bedof(2) % second node is constrained
beval(2): % whose described value is 0
bedof(3)=3; % third node is constrained
beval(3)=0; % whose described value is 0
bedof(4)=4; % 4th node is constrained
beval(4)=0; % whose described value is 0
bedof(5) % Sth node is constrained
beval(5): % whose described value is 0
bedof(6)=6; % 6th node is constrained
beval(6)=0; % whose described value is 0
bedof(7)=11; % 11th node is constrained
beval(7) % whose described value is 0
bedof(8)=16; % 16th node is constrained
beval(8)=0; % whose described value is 0
bedof(9)=21; % 2st node is constrained
beval(9): % whose described value is 0
bedof(10 % 22nd node is constrained
beval(10)=38.2683; % whose described value is 38.2683
bedof(11 % 23rd node is constrained
beval(11)=70.7107; % whose described value is 70.7107
bedof(12 % 24th node is constrained
beval (12)
bedof(13
beval(13)
%
%—
% initialization of matrices and vectors
———————————
ff=zeros(sdof,1); % initialization of system force vector
% whose described value is 92.3880
% 25th node is constrained
% whose described value is 100Section 5.9 MATLAB Application to 2-D Steady State
kk=zeros(sdof,sdof); % initialization of system matrix
index=zeros(nnel*ndof,1); % initialization of index vector
%
_
% computation of element matrices and vectors and their assembly
%——__— SSS
for iel=1:nel % loop for the total number of elements
%
nd(1)=nodes(iel,1); % Ast connected node for (iel)-th element
nd(2)=nodes(iel,2); % 2nd connected node for (iel)-th element
nd(3)=nodes(iel,3); % 3rd connected node for (iel)-th element
coord(nd(1),1); yl=geoord(nd(1),2); _-% coord values of Ist node
x2=gcoord(nd(2),1); y2=gcoord(nd(2),2); _% coord values of 2nd node
x3=gcoord(nd(3),1); y3=gcoord(nd(3),2); -% coord values of 3rd node
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
k=felp2dt3 (x1,y1,x2,y2,x3,y3); % compute element matrix
%
kk=feasmbl1 (kk,k,index); % assemble element matrices
%
end
%
A
% apply boundary conditions
%— —$_____
[kk, ff]=feaplyc2(kk,ff, bedof, beval);
%
~%—
% solve the matrix equation
%—
faol=kk\ ff;
%
go
% analytical solution
%
for node
x=gcoord(i,1); y=gcoord(i,2);
esol(i)=100*sinh (0.31415927*y)*sin(0.31415927*x) /sinh(3.1415927);
end
%
——$—$ $$ $$
% print both exact and fem solutions
it112
Laplace’s and Poisson’s Equations Chapter 5
function [kk]=feasmbll (kk,k,index)
me —
% Purpose:
% Assembly of element matrices into the system matrix
%
% Synopsis:
% (kk]=feasmbl1(kk,k,index)
%
% Variable Description:
% kk - system matrix
% k - element matri
% index - d.o.f. vector associated with an element
function [index]=feeldof(nd nnel,ndof)
% Purpose:
% Compute system dofs associated with each element.
%
% Synopsis:
% {index]=feeldof(nd,nnel,ndof)
%
% Variable Description:
% index - system dof vector associated with element ie!
% nd - element node numbers whose system dofs are to be determined
% nnel - number of nodes per element
% ndof - number of dofs per node
%Section 5.9 MATLAB Application to 2-D Steady State
end
end
%
function (kJ=felp2dt3(x1,y1,x2,y2,x3,y3)
%
% Purpose:
% clement matrix for two-dimensional Laplace’s equation
% using three-node linear triangular element
%
% Synopsis:
% [k}=felp2dt3(x1,y1x2,y2,x3,y3)
%
% Variable Description:
% - element stiffness matrix (size of 3x3)
% x1, yl - x and y coordinate values of the first node of element
% x2, y2 - x and y coordinate values of the second node of element
% x3, y3 - x and y coordinate values of the third node of element
%
%
% element matrix
%
A=0.5"(x2*y3-+x1 *y2+x3*y1-x2*y1-x1 *y3-x3*y2);
% % area of the triangle
K(1,1)=((x3-x2)*(x3-x2)+(y2-y3)*(y2-y3))/(4*A);
K(1,2)=((x3-x2)*(x1-x3)+ (y2-y3)*(y3-y1))/(4*A);
K (1,3) = ((x3-x2)*(x2-x1) + (y2-y3)*(y1-y2))/(4*A);
(2,1) =k(1,2)
4 (2,2)=((x1-x3)*(x1-x3)+-(y3-y1)*(y3-y1))/(4*A);
ke (2,3)=((x1-x3)*(x2-x1) +(y3-y1)*(y1-y2))/(4*A);
k(3,1)=k(1,3);
k(3,2)=k(2,3);
K(3,3)=((x2-x1)*(x2-x1) + (y1-y2)*(y1-y2))/(4*A);
%
‘The finite element and analytical solutions are compared below:
store =
dof # femsol exact
1.0000 0.0000 0.0000
2.0000 0.0000 0.0000
3.0000 0.0000 0.0000
4.0000 0.0000 0.0000
5.0000 0.0000 0.0000
6.0000 0.0000 0.0000
7.0000 3.6896, 2.8785,
8.0000 6.5689 5.3187114
Figure 5.9.2 Mesh With Bilinear Elements
9.0000
10.000
11.000
12.000
13.000
14.000
15,000
16.000
17.000
18.000
19.000
20.000
21,000
22,000
23.000
24,000
25.000
Laplace’s and Poisson’s Equations
pele
[|e
oo
8.4046
9.0361
0.0000
10.621
17.312
21.626
23.124
0.0000
14.044
37.568
46.108
49.199
0.0000
38.268,
70.711
92.388
100.00
& Example 5.9.2
[elelele|
6.9492
7.5218
0.0000
7.6257
14.090
18.410
19.927
0.0000
17.324
32.010
41.823
45.269
0.0000
38.268
70.711
92.388
100.00
sielo
Chapter 5
% at x=3.75 and y=
% at x=5.00 and
% at x=2.50 and y:
% at x=3.75 and
% at: x=5.00 and y=5.
% at x=0.00 and
% at x=1.25 and
% at x=2.50 and y:
% at. x=3.75 and
% at x=5.00 and y:
% at x=0.00 and
% at x=1.25 and y=
% at x=2.50 and
% at x=3.75 and y=10.
% at: x=5.00 and y=10.
BBSaecaeeeeeees
We solve the same problem as given in Example 5.9.1
using bilinear rectangular elements. The mesh is shown in Fig. 5.9.2 and the
MATLAB programs are listed below.
%
% EX5.9.2.mSection 5.9 MATLAB Application to 2-D Steady State 115
% to solve the two-dimensional Laplace equation given as
% uxx + yy =0,0 node no. and j-> x or y
———_Z—_~——Ee———
gcoord(1,
gcoord(2,
gcoord(3,1)=2.5; gcoord(3,2)
gcoord(4,1)=3.75; gcoord(4,2)=0.0;
0; gcoord(5,2)
.0; gcoord(1,2)
.75; gcoord(14,2)=5.0;
; gcoord (15,2)Laplace’s and Poisson’s Equations Chapter 5
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no. and j-> connected nodes
0; nodes(4,4)=9;
nodes(5,4)=11;
3; nodes(6,4)=12;
4; nodes(74)=13;
nodes(8,1)=9; nodes(8,2)=10; nodes(8,3)=15; nodes(8,4)=14;
; nodes(9,2)=12; nodes(9,3)=17; nodes(9,4)=16;
}=12; nodes(10,2)=13; nodes(10,3)=18; nodes(10,4)=
; nodes(11,2)=14; nodes(11,3)=19; nodes(11,4)
14; nodes(12,2)=15; nodes(12,3)=20; nodes(12,4):
; nodes(13,2)=17; nodes(13,3)=22; nodes(13,4):
17; nodes(14,2)=18; nodes(14,3)=23; nodes(14,4)
nodes(15,1)=18; nodes(15,2)=19; nodes(15,3)=24; nodes(15,4)=23;
nodes(16, ; nodes(16,2)=20; nodes(16,3)=25; nodes(16,4)=24;
%
oe
% input data for boundary conditions
% first node is constrained
% whose described value is 0
% second node is constrained
% whose described value is 0
% third node is constrained
% whose described value is 0
% Ath node is constrained
% whose described value is 0
% Sth node is constrained
% whose described value is 0
% 6th node is constrained
% whose described value is 0
bedof(7)=11; % 11th node is constrainedSection 5.9 MATLAB Application to 2-D Steady State
% whose described value is 0
% 16th node is constrained
% whose described value is 0
% 2st node is constrained
% whose described value is 0
bedof(10)=22; % 22nd node is constrained
beval(10)=38.2683; % whose described value is 38.2683
% 23rd node is constrained
% whose described value is 70.7107
bedof(12)=24; % 24th node is constrained
beval(12)=92.3880; % whose described value is 92.3880
bedof(13)=25; % 25th node is constrained
beval(1. 5 % whose described value is 100
%
—E—
% initialization of matrices and vectors
a
%
ff=zeros(sdof,1); alization of system force vector
kk=zeros(sdof,sdof); % initialization of system matrix
index=zeros(nnel*ndof,1); % initialization of index vector
%
%
% computation of element matrices and vectors and their assembly
% loop for the total number of elements
% loop for number of nodes per element
‘% extract connected node for (iel)-th element
x(i)=gcoord(nd(i),1); % extract x value of the node
y(i)=gcoord (nd (i),2); % extract y value of the node
end
%
xleng = x(2)-x(1); % length of the element in x-axis
yleng = y(4)-y(1); % length of the element in y-axis
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
k=felp2dr4(xleng,yleng); % compute element matrix
%
kk=feasmbl1(kk,k,index); % assemble element matrices
%
end
%
%
% apply boundary conditions
ges
[kk, ff]=feaplyc2 (kk, ff, bedof, beval);
%
117118
Laplace’s and Poisson’s Equations Chapter 5
%—
% solve the matrix equation
Ee
feol=kk\ ft;
%
%
% analytical solution
%—
for i=1:nnode
x=gcoord(i,1); y=gcoord(i,2);
esol(i)=100*sinh(0.31415927*y) *sin(0.31415927*x)/sinh(3.1415927);
end
%
%—
% print both exact and fem solutions
%
num=1:1:sdof;
store=[num’ fsol esol’]
%
function [k]=felp2dr4(xleng,yleng)
%—
% Purpose:
% element matrix for two-dimensional Laplace’s equation
% using four-node bilinear rectangular element
%
% Synopsis:
% [k]=felp2dr4(sleng,yleng)
%
% Variable Description:
% k - element stiffness matrix (size of 4x4)
% xleng - element size in the x-axis
% yleng - element size in the y-axis
(a
%
% element matrix
%
k(1,1)=(xleng*xleng+yleng*yleng) /(3*xleng*yleng);
k(1,2)=(xleng*xleng-2*yleng*yleng) /(6*xleng*yleng);
k(1,3)=-0.5*k(1,1);
k(1,4)=(yleng* yleng-2*xleng*xleng)/(6*xleng*yleng);
k(2,1)=k(1,2); k(2,2)=k(1,1)5 k(2,3)=k(1,4); k(2,4)=k(1,3);
k(3,1)=k(1,3); k(3,2)=k(2,3); k(3,3)=k(1,1); k(3,4)=k(1,2);
k(4,1)=k(1,4); k(4,2)
%
(2,4); k(4,3)=k(3,4); k(4,4)=k(1,1);Section 5.10 MATLAB Application to Axisymmetry 119
‘The finite element solution is shown below. The same number of nodes were
used for this case as that in the previous example. By comparing the two finite
element solutions using either linear triangular elements or bilinear rectangular
elements, we see that the rectangular elements produced more accurate solution
in the present example.
store =
dof # femsol exact.
1.0000 0.0000 0.0000 % at x=0.00 and y=0.0
2.0000 0.0000 0.0000
3.0000 0.0000 0.0000
4.0000 0.0000 0.0000
5.0000 0.0000 0.0000
6.0000 0.0000 0.0000
7.0000 = 2.6888 2.8785
8.0000 4.9683 5.3187
9.0000 6.4914 69492
10.000 7.0263 «7.5218
11.000 0.0000 9.0000
12.000 7.2530 7.6257
13.000 13.402 14.090
14.000 17.510 18.410
15.000 18.953 19.927
16.000 0.0000 ~—0.0000
17.000 16.876 17.324
18.000 31.182 32.010
19.000 40.742 41.823
20,000 44,098 45.269
21.000 0.0000 0.0000
5
22.000 38.268 «38.268 % at x=1.25 and y=10.
23.000 = 70.711 70.711 % at x=2.50 and
24.000 92.388 «92.388 % at x=3.75 and
25.000 100.00 100.00 % at x:
5.10 MATLAB Application to Axisymmetric Analysis
This section shows an example of an axisymmetric steady state problem using
MATLAB programs. Linear triangular elements are used.
# Example 5.10.1 An axisymmetric Laplace equation is solved using
linear triangular elements. ‘The governing equation is given in Eq. (5.7.2) for a
cylinder whose inside and outside radii are 4 and 6, and whose height is 1. The
finite element mesh used for the present analysis is shown in Fig. 5.10.1. The
boundary conditions are u = 100 at the inside of the cylinder and 34 = 20120 Laplace’s and Poisson’s Equations Chapter 5
ean
©| /®
Ne
Af Od 04 0 Od 04
Figure 5.10.1 An Infinite Cylinder Modeled With Symmetric Boundaries
at the outside of the cylinder. Both top and bottom surfaces of the cylinder
have 2% = 0, ie. insulated. Ten triangular elements with 12 nodes are used
and the MATLAB programs are provided below. As seen in the main program,
the constant flux at the outside surface is converted into the nodal flux at the
outside surface. Each node takes a half of the total flux over the element which
is 2nFql = 240m where 7=6, ¢=20 and [=1 as explained in Sec. 5.7.
%
% EX5.10.1.m
% to solve the axisymmetric Laplace equation given as
% ure + (ujr)/r + ujzz =0,4<1<6,0<2<1
% w(4,z) = 100, u,r(6,z) = 20
% u,x(2,0) = 0, u,2(r,1) = 0
% using linear triangular elements
%(see Fig. 5.10.1 for the finite element mesh)
%
% Variable descriptions
% k = element matrix
% { = element vector
% kk = system matrix
% ff = system vector
% gcoord = coordinate values of each node
% nodes = nodal connectivity of each element
% index = a vector containing system dofs associated with each element
% bedof = a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
% the dofs in bedof
%
%
—$$$$ $$$
% input data for control parameters
aSection 5.10 MATLAB Application to Axisymmetry 121
nel: % number of elements
nnel=; % number of nodes per element
ndot % number of dofs per node
nnode=12; % total number of nodes in system
sdof=nnode*ndof; % total system dofs
%
G6
% imput data for nodal coordinate values
% gcoord(i,j) where i-> node no, and j-> x or y
%
scoord(1;1)=4.0; gooord(1,2)=0.; gcoord(2,1)=4.0; gcoord(2,2)=1.05
gcoord(3,1)=4.4; gcoord(3,2)=0.
gcoord(5,
gcoord(7,1
gcoord(9, .6; gcoord (10,2)=1.0;
gcoord(11,1)=6.0; gcoord(11,2)=0.0; gcoord(12,1)=6.0; gcoord(12,2)=1.0;
%
%
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no. and j-> connected nodes
rr
nodes(8,3)
=12; nodes(9,3)=1
11; nodes(10,3)
% input data for boundary conditions
%
bedof(1 % first node is constrained
beval(1)=100; % whose described value is 100
% second node is constrained
beval(2)=100; % whose described value is 100
%
—$
% initialization of matrices and vectors
—
ff=zeros(sdof,1); % initialization of system force vector
kk=zeros(sdof,sdof); % initialization of system matrix
index=zeros(nnel*ndof,1); % initialization of index vector
%
pi=d*atan(1); % define pi122
Laplace’s and Poisson’s Equations
#€(11)=120* pi;
f€(12)=120* pi;
%
%
%
for iel=1:nel
%
nd(1)=nodes(iel,1);
nd(2)=nodestiel,2);
nd(3)=nodes(iel,3);
% nodal flux at the outside boundary
% nodal flux at the outsdie boundary
% computation of element matrices and vectors and their assembly
% loop for the total number of elements
% Ast connected node for (iel)-th element
% 2nd connected node for (iel)-th element
% 3rd connected node for (iel)-th element
coord(nd(1),1); 1=gcoord(nd(1),2); % coordinate of Ist node
coord(nd(2),1); 22=gcoord(nd(2),2); % coordinate of 2nd node
13=gcoord(nd(3),1); 23=gcoord(nd(3),2); % coordinate of 3rd node
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
k=felpaxt3(rl,z1,12,22,x3,23); % compute element matrix
%
Kk=feasmbl1 (kk,k,index); % assemble element matrices
%
end
%
ices oc
% apply boundary conditions
%&—________
{kk,ff]=feaplyc2 (kk, ff, bedof,bcval);
%
———_____——_——
% solve the matrix equation
a
faol=kk\ff;
%
%e
% analytical solution
%
for
inode
r=gcoord(i,1); z=gcoord(i,2);
00-6*20*1og(4)+6*20*log(r);
esol (i)=
end
%
——
% print both exact and fem solutions
(ee
num=1:1:sdof;
store=[num’ fsol esol’]
%
%
Chapter 5Section 5.10 MATLAB Application to Axisymmetry
function (k]=felpaxt3(r1,z1,12,22,13,23)
%
% Purpose:
% element matrix for axisymmetric Laplace equation
% using three-node linear triangular element
%
% Synopsis:
% [k)=felpaxt3(r1,21,12,22,13,23)
%
% Variable Description:
% k - element stiffness matrix (size of 3x3)
% 11, 21 - x and z coordinate values of the first node of element
% 12, 22 - x and z coordinate values of the second node of element
% 13, 23 - x and z coordinate values of the third node of element
%
%
% element matrix
%
A=0.5*(12*23-+11*22-+13*21-12*2 1-11 *23-13*22);
twopirc=8*atan(1)*r0;
(1,1) = ( (r3-r2)* (13-12)-+(22-23)*(22-23))/(4*A);
4 (1,2}=({(r3-12)*(r1-13)+(22-23)*(23-21))/(4"A);
k(1,3)=((r3-r2)*(r2-11) +(22-23)*(21-22))/(4"A);
k(2,1)=k(1,2);
k(2,2)=((r1-r3)" (r1-13)+ (23-21)"(23-21))/(4*A);
K(2,3)=((r1-18)* (12-1) +(23-21)*(21-22))/(4*A);
K(3,1}=k(1,3);
k(3,2)=k(2,3);
1e(3,3)=((x2-11)* (r2-11)+(21-22)*(21-22))/(4*A);
k=twopirc*k;
%
%e
% area of the triangle
1+12413)/3; % x coordinate value of the element centroid
‘The results are
store =
dof # femsol — exact
1.0000 100.000 100.000
2.0000 100.000 100.000
3.0000 = 111.413 111.437
4.0000 111.444 111.437
5.0000 121.839 121.879
6.0000 121.889 121.879
7.0000 = 131.427 131.484
8.0000 = 131.501 :131.484
9.0000 140.290 140.377
10.000 140.417 140.377
11.000 148.510 148.656
% at r=4.0 and z=0.0
% at r=4.0 and 2=1.0
4 and
4 and
8 and
8 and
eS
Se5o5558
123124 Laplace’s and Poisson’s Equations Chapter 5
Figure 5.11.1 Mesh With Triangular Element
12.000 148.749 148.656 % at r=6.0 and 2=1.0
5.11 MATLAB Application to Transient Analysis
Examples are given for some transient analyses using MATLAB programs.
Forward difference, backward difference and Crank-Nicolson techniques are used.
@ Example 5.11.1 The transient Laplace equation as described below
is solved using the forward difference technique for time integration. The
differential equation is
ou Ou Pu
Oa? t By?
over a rectangular domain defined by 0 < 2 <5 and 0 < y < 2. The whole
domain has the initial value of u = 0, and suddenly the left and right boundaries
(i.e. edges with x=0 and x=5) are maintained at u = 100. On the other hand,
the top and bottom boundaries (i.e. edges with y=0 and y=2) are insulated (i.e.
Ea = 0). We want to find the solution as a function of time. A finite element
(6.11.1)
mesh of the domain is shown in Fig. 5.11.1 using 16 linear triangular elements.
The finite element analysis program is shown below.
%-
% EXS.11.1.m
% to solve the transient two-dimensional Laplace’s equation
Hut =uxx + ayy, Onode no. and j->x or y126
Laplace’s and Poisson’s Equations
gcoord(8,1)=2.5; gcoord(8,2)=1.0;
gcoord(11,1)=0.0; gcoord(11,2)=2.
geoord(12,1
gcoord(13,1):
gcoord(14,1):
gcoord(15,1):
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no. and j-> connected nodes
— eee
nodes(2,1)
nodes(3,1)=:
nodes(5,1)=1;
nodes(6,1):
nodes(7,1):
nodes(8,1)
nodes(9,1)
nodes(10,1)=7; nodes(10,2)=
nodes(11,1)=8; nodes(11,2’
nodes(13,1)=6; nodes(13,2'
nodes(14,1)=7; nodes(14,2
nodes(15,1)=8; nodes(15,2)
nodes(16,1)=9; nodes(16,2
%
— —_——————
% input data for boundary conditions
%—
bedof(1)
Chapter 5
4 % Ist node is constrained
beval(1)=100; % whose described value is 100
bedof(2)
% 5th node is constrained
beval(2)=100; % whose described value is 100
% 6th node is constrained
% whose described value is 100
% 10th node is constrained
% whose described value is 100
% 11th node is constrained
% whose described value is 100
bedof(6)=15; % 15th node is constrained
beval(6)=.
%
—
% initialization of matrices and vectors
10; % whose described value is 100Section 5.11 MATLAB Application to Transient Analysis
%—— -
ff=zeros(sdof,1); % initialization of system vector
fn=zeros(sdof,1); % initialization of effective system vector
fsol=zeros(sdof,1); % solution vector
ros(2,ntime+1); % vector containing time history solution
kk=zeros(sdof,sdof); % initialization of system matrix
mm-=zeros(sdof,sdof); % initialization of system matrix
index=zeros(nnel*ndof,1); % initialization of index vector
%
6
% computation of element matrices and vectors and their assembly
$$
for iel=1:nel % loop for the total number of elements
%
nd(1)=nodes(iel,1); % Ist connected node for (iel)-th element
nd(2)=nodes(iel,2); % 2nd connected node for (iel)-th element
nd(3)=nodes(iel,3); % 3rd connected node for (iel)-th element
x1=gcoord(nd(1),1); yl=gcoord(nd(1),2); _% coord values of Ist node
coord(nd(2),1); y2=gcoord(nd(2),2); % coord values of 2nd node
coord(nd(3),1); y3=gcoord(nd(3),2); _% coord values of 3rd node
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
k=felp2dt3(x1,y1,x2,y2,x3,y3); % compute element matrix
m=felpt 2t3(x1,y1,x2,y2,x3,y3); % compute element matrix
%
kk=feasmbl1(kk,k,index); % assemble element matrices
mm=feasmbl1(mm,m index); % assemble element matrices
%
end
%
%
% loop for time integration
% initial condition
sol(1,1)=fs0l(8); % store time history solution for node no. 8
sol(2,1)=fs0l(9); % store time history solution for node no. 9
a it=1:ntime % start loop for time integration
ieee ae % compute effective column vector
net ae a % apply boundary condition
%
fsol=mm\fn; % solve the matrix equation
127128
Laplace’s and Poisson’s Equations Chapter 5
%
sol(1,it+1)=fsol(8); % store time history solution for node no. 8
sol(2,it+1)=fsol(9); ‘% store time history solution for node no. 9
%
end
%
—————___———.
% plot the solution at nodes 8 and 9
%—___— =
time=0:deltt:ntime*deltt;
plot(time,sol(1,:),",time,sol(2,:),"~");
xlabel(’Time’)
ylabel(’Solution at nodes’)
%
%:
function (m]=felpt2t3(x1,y1,x2,y2,x3,y3)
%—
% Purpose:
% element matrix for transient term of two-dimensional
% Laplace’s equation using linear triangular element
%
% Synopsis:
% (m)=felpt2t3(x1,y1,x2,y2,x3,y3)
%
% Variable Description:
% m - element stiffness matrix (size of 3x3)
% x1, yl - x and y coordinate values of the first node of element
% x2, y2 - x and y coordinate values of the second node of element
% x3, y3 - x and y coordinate values of the third node of element
%— Secale ela cts eects ee cee CeCe eeC eee EREUEEE
%
% element matrix
%
A=0.5*(x2*y3-4-x1 *y2-+x3*y1-x2*yl-x1*y3-x3*y2);
% area of the triangle
%
m = (A/12)* [211
121;
112);
%:
The finite element solutions are plotted in Fig. 5.11.2 and Fig. 5.11.3. Time-
history of nodes 8 and 9 in Fig. 5.11.1 is plotted in both figures. While At = 0.1
was used for Fig. 5.11.2, At = 0.12 was used for Fig. 5.11.3. As noticed, the
finite element solution is unstable when At = 0.12 is used because the forward
difference technique is conditionally stable.
tSection 5.11 MATLAB Application to Transient Analysis 129
Figure 5.11.2 Finite Element Solution With At=0.1
Figure 5.11.3 Finite Element Solution With At=0.12
& Example 5.11.2 The same example as Example 5.11.1 is solved using
bilinear rectangular elements. The mesh is the same as that shown in Fig. 5.11.1
except that 8 rectangular elements are used instead of 16 triangular elements.
%—
% EX5.11.2.m
% to solve the transient two-dimensional Laplace’s equation
Hut =uxx + ayy, 0 —<_—————_—____—__——
% number of elements
% number of nodes per element
% number of dofs per node
nnode=15; % total number of nodes in system
sdof=nnode*ndof; % total system dofs
delt % time step size for transient analysis
stime=0.0; % initial time
ime=10; % termination time
=fix((ftime-stime)/deltt); % number of time increment
% input data for nodal coordinate values
% gcoord(i,j) where i->node no. and j->x or y
gcoord(7,1)=1.25; gcoord(7,2)=1.0;
coord (8,2)=1.0;Section 5.11 MATLAB Application to Transient Analysis
gcoord(12,1)=1.25; gcoord(i2,
gcoord(13,1)=2.5; gcoord(13,2):
gcoord(14,1)=3.75; gcoord(14,2)=2.
gcoord(15,1)=5.0; gcoord(15,2)=2.0;
%
(a
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no. and j-> connected nodes
% initialization of matrices and vectors
%
ff=ner08(sdof,1);
in=zeros(sdof,1);
fsol=zeros(sdof,1);
sol=zeros(2,ntime+1);
mm=zeros(sdof,sdof);
index=zeros(nnel*ndof,1);
%
%-
nodes(5,3)=
nodes(6,3)=13; nodes(6,4)=12;
nodes(7,3)=14; nodes(7,4)=13;
2; nodes(5,4)=11;
% st node is constrained
% whose described value is 100
% Sth node is constrained
% whose described value is 100
% 6th node is constrained
% whose described value is 100
% 10th node is constrained
% whose described value is 100
% 11th node is constrained
% whose described value is 100
% 15th node is constrained
%- whose described value is 100
% initialization of system vector
% initialization of effective system vector
% solution vector
% vector containing time history solution
% initialization of system matrix
% initialization of system matrix
% initialization of index vector
% computation of element matrices and vectors and their assembly
——
131Laplace’s and Poisson’s Equations Chapter 5
for iel=1:nel
%
nd(1)=nodes(iel,1);
nd(2)=nodes(iel,2);
nd(3)=nodes(iel,3);
nd(4)=nodes(iel,3);
% loop for the total number of elements
% Ist connected node for (iel)-th element
% 2nd connected node for (iel)-th element
% 3rd connected node for (iel)-th element
% 4th connected node for (iel)-th element
coord (nd(1),1); y
xleng=x2-x1;
yleng=y4-y1;
%
index=feeldof(nd,nnel,ndof);%
k=felp2dr4(xleng,yleng);
m=felpt2r4(xleng,yleng);
%
kk=feasmbl1 (kk,k,index);
mm=feasmbl1(mm,m,index);
%
end
%
%
% loop for time integration
%
%
for in=1:sdof
fsol(in)=0.0;
end
%
sol(1,1)=fs0l(8);
sol(2,1)=f80l(9);
%
in=deltt*f+(mm-deltt*kk)*fsol;
%
{mm, fn]=feaplyc2(mm, fn, bedof,beval);
%
fsol=mm\fn;
%
sol(1,it-+1
sol(2,it-+1
%
end
%
7
% analytical solution at node 8
coord(nd(1),2);
% coord values of Ist node
scoord(nd(2), coord(nd(2),2); % coord values of 2nd node
=gcoord(nd(3),2); % coord values of 3rd node
coord(nd(4),2); % coord values of 4th node
% element size in x-axis
% element size in y-axis
% time-independent element matrix
% transient element matrix
% assemble element matrices
% assemble element matrices
% initial condition
% store time history solution for node no. 8
% store time history solution for node no. 9
% start loop for time integration
% compute effective column vector
% apply boundary condition
% solve the matrix equation
% store time history solution for node no. 8
% store time history solution for node no. 9Section 5.11 MATLAB Application to Transient Analysis 133
%—__—
pi=4*atan(1);
esol=zeros(1,ntime+1);
x=2.5; x1=5;
esol (ii)=esol(ii)+(1/i)*exp(-iti*pi* pi*ti/(x1*xl))*sin(i*pi*xx/xl);
end
end
esol=100-(100*4/pi)*esol;
%
——
% plot fem and exact solutions at node 8
YX $$$ ——————_—_————
time=0:deltt:ntime*deltt;
plot(time,sol(1,:),"*’,time,esol,’-’);
xlabel(’Time’)
ylabel(’Solution at nodes’)
%
%
function {m]=felpt2r4(xleng,yleng)
%—
% Purpose:
% element matrix of transient term for two-dimensional Laplace’s
% equation using four-node bilinear rectangular element
%
% Synopsis:
% (m]=felpt2r4(xleng,yleng)
%
% Variable Description:
% m - element stiffness matrix (size of 4x4)
% xleng - clement size in the x-axis
% yleng - element size in the y-axis
%
%
% element matrix
%
m=(xleng*yleng/36)*[4 2 1 2;
2421;
1242;
2124),
%
‘The finite clement solution obtained using rectangular elements is comparable
to that obtained using triangular elements. Figure 5.11.4 compares the finite134 Laplace’s and Poisson’s Equations Chapter 5
Figure 5.11.5 Time History of Nodes 8 and 9
clement solution to the exact solution at node 8 (see Fig. 5.11.1). The finite
element solution approaches the steady state solution slower than the exact
solution. This is due to the very crude mesh in the 2:
t
irection.
Example 5.11.3 The present example solves the same problem as that
in Example 5.11.1 using the backward difference technique for time integration.
Because this technique is unconditionally stable, we use a time step size At = 0.4
which exceeds the critical time step size for the forward difference technique.
Figure 5.11.5 shows the time-history of nodes 8 and 9.
SS
% EX5.11.3.mSection 5.11 MATLAB Application to Transient Analysis 135
% to solve the transient two-dimensional Laplace’s equation
Hut =uxxtuyy,0node no. and j->x or y
gcoord(1,1)=0.0; gcoord(1,2):
gcoord(2,1)=1.25; gcoord(2,
gcoord(3,1)=2.5; gcoord(3,2)
0;136
Laplace’s and Poisson’s Equations Chapter 5
geoord(4,1)=3.75; gcoord(4,2)=0.
gcoord(5,1)=5.0; gcoord(5,2)=0.0;
gcoord(7,1)=1.25; gcoord(7,2)=1.0;
5; gcoord(8,2)=1.0;
gcoord(12,1)=1.25; gooord(12,2)=2.0;
gcoord(13,1)=2.5; gcoord(13,2)=2.
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no. and j-> connected nodes
%—.——
nodes(1,1)=1; nodes(1,2)=:
nodes(2,1)=2; nodes(2,2):
nodes(3,1)=3; nodes(3,2):
nodes(5,1)=1; nodes(5,2):
nodes(6,1)=2; nodes(6,2)=
nodes(12,1
nodes(13,1)=6; nodes(13,2)=12; nodes(13,3)=11;
nodes(16,1)=9; nodes(16,2)=15; nodes(16,3)=14;
%
§——$
% input data for boundary conditions
————————
bedof(1): % Ist node is constrained
beval(1)=100; % whose described value is 100
bedof(2): % Sth node is constrained
beval(2)=100; % whose described value is 100
bedof(3) % 6th node is constrained
beval(3)=100; % whose described value is 100
bedof(4)=10; % 10th node is constrained
beval(4)=100; % whose described value is 100
bedof(5)= % 11th node is constrained
beval(S)=100; % whose described value is 100
bedof(6)=15; % 15th node is constrainedSection 5.11 MATLAB Application to Transient Analysis
beval(6)=100; - % whose described value is 100
%
—— $$ $$$
% initialization of matrices and vectors
% ee
ff=zeros(sdof,1); % initialization of system vector
fn=zeros(sdof,1); % initialization of effective system vector
fsol=zeros(sdof,1); % solution vector
jeros(2,ntime+1); % vector containing time history solution
ros(sdof,sdof); % initialization of system matrix
mm=zeros(sdof,sdof); % initialization of system matrix
index=zeros(nnel*ndof,1); % initialization of index vector
%
——————————
% loop for the total number of elements
% Ist connected node for (iel)-th clement
% 2nd connected node for (iel)-th element
% 3rd connected node for (iel)-th element
oord(nd(1),1); y1=gcoord(nd(1); % coord values of Ist node
x2=gcoord(nd(2),1); y2=gcoord (nd(2), % coord values of 2nd node
oord(nd(3),1); y3=gcoord(nd(3),2); _% coord values of 3rd node
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
k=felp2dt3(x1,y1,x2,y2,x3,y3); % compute element matrix
m=felpt2t3(x1,y1,x2,y2,x3,y3); % compute element matrix
%
kk=feasmbl1(kk,k,index); % assemble element matrices
mm=feasmbl1(mm,m, index); % assemble element matrices
%
end
%
Cu
% loop for time integration
% initial condition
% sol contains time-history solution of node 8
% sol contains time-history solution of node 9
kk=mm4deltt*kk;
%
for it:
137138 Laplace’s and Poisson’s Equations Chapter 5
3
insulated
0.02m
pe —_—_ adem
Figure 5.11.6 Finite Element Mesh
%
fn=deltt*ff-+mm*fsol; % compute effective column vector
%
[kk,fn]=feaplyc2(kk,fn, bedof, beval); % apply boundary condition
%
fsol=kk\ fn; % solve the matrix equation
%
sol(1,it+1)=fs0l(8); % sol contains time-history solution of node 8
sol(2,it-+1)=fs0l(9); % sol contains time-history solution of node 9
%
end
%
— ee
% plot the solution at nodes 8 and 9
————————————
time=0:deltt:ntime*deltt;
plot(time,sol(1,:),*°,time,sol(2,:),-”);
xlabel(’Time’)
ylabel(’Solution at nodes’)
%
%
@ Example 5.11.4 A plate of size 0.02 m by 0.01 m, whose heat conduction
coefficient is k = 0.3 W/mC, is initially at a temperature of 300 C. While its left
and right sides are maintained at the same temperature of 300 C, the bottom
side is insulated and the top side is subjected to heat convection with convection
coefficient of he = 100 W/m? C and the ambient temperature of 50 C. The
material has also density p=1600 Kg/m? and specific heat c=0.8 J/KgC. TheSection 5.11 MATLAB Application to Transient Analysis 139
a a
Figure 5.11.7 Time History Plot
MATLAB program using the backward difference technique is listed below and
the mesh is shown in Fig. 5.11.6. The time-history of the solution of node 8 is
given in Fig. 5.11.7.
%
% EX5.11.4.m
% to solve the transient two-dimensional Laplace’s equation
% atu,t = uxx + wyy,0 node no. and j-> x or y
—————————
0.0; gcoord(1,2):
.005; gcoord(2,2)
gcoord(4,
gcoord(5,1)=0.020; gcoord(5,2)=0.0;
gcoord(6,1)=0.0; gcoord(6,2)=0.005;
gcoord(7,1)=0.005; gcoord(7,2)
gcoord(8,1)=0.010; gcoord(8,2)
gcoord(9,
gcoord(10,1
gcoord(11,1
gcoord(12,1)=0.005; gcoord(12,2)=0.01;
gcoord(13,1)=0.
%&—
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no. and j-> connected nodes
% ee
nodes(1,1)=1;
nodes(2,1Section 5.11 MATLAB Application to Transient Analysis
nodes(4,1)
nodes(5,1):
nodes(6,1)
nodes(4,3)=10; nodes(4,
nodes(5,3)=12; nodes(5,4)=
% Ast node is constrained
% whose described value is 300
% 5th node is constrained
% whose described value is 300
% 6th node is constrained
% whose described value is 300
% 10th node is constrained
% whose described value is 300
% 11th node is constrained
% whose described value is 300
% 15th node is constrained
% whose described value is 300
% input for flux boundary conditions
% nfix(ij) where i-> element no. and j-> two side nodes
% nodes on 1st element side with flux
% nodes on 2nd element side with flux
% nodes on 3rd element side with flux
nfix(4,1)=14; nfix(4,2)=15; % nodes on 4th element side with flux
%
b=100; c=50; %
%——______—
% initialization of matrices and vectors
Ca
ff=zeros(sdof,1); % system vector
fn=zeros(sdof,1); % effective system vector
fsol=zeros(sdof,1); % solution vector
sol=zeros(1,ntime+1); ‘% time-history of a selected node
kk=zeros(sdof,sdof); % of system matrix
mm=zeros(sdof,sdof); % system matrix
index=zeros(nnel*ndof,1); % index vector
fl=zeros(nnels*ndof,1); % clement flux vector
k1=zeros(nnels*ndof,nnels*ndof); % flux matrix
index1=zeros(nnels*ndof,1); % flux index vector
%
Ge
% computation of element matrices and vectors and their assembly
141142
Laplace’s and Poisson’s Equations Chapter 5
%
for iel=1:nel % loop for the total number of elements
%
nd(1)=nodes(iel,1); % Ast connected node for (iel)-th element
% 2nd connected node for (iel)-th element
% 3rd connected node for (iel)-th element
% 4th connected node for (iel)-th element
=gcoord(nd(1),2); % coord values of Ist node
oord(nd(2),1); y2=gcoord(nd(2),2); % coord values of 2nd node
% coord values of 3rd node
% coord values of 4th node
% element size in x-axis
% clement size in y-axis
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
k=felp2dr4(xleng,yleng); % compute element matrix
m=a*felpt2r4(xleng,yleng); % compute element matrix
%
kk=feasmbl1 (kk,k,index); % assemble element mat
mm=feasmbl1(mm,m,index); % assemble element matrices
%
end
%
eee dela aeeaee eee eee eatec eC eee eueas
% additional computation due to flux boundary condition
%— ————————
for ifx=I:nf
%
nds(1)=nflx(ifx,1); % node with flux BC for (ifx)-th element
nds(2)=nflx(ifx,2); % node with flux BC for (ifx)-th element
x1=gcoord(nds(1),1); y1=gcoord(nds(1),2); % nodal coordinate
cord (nds(2),1); y2=gcoord(nds(2),2); % nodal coordinate
eleng=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));_-% element side length
oe % find related system dots
ee % compute element matrix due to flux
fl=b*c*fefll(0,eleng); % compute element vector due to flux
oe jindex1); % assembly
%
end
%
%
% loop for time integrationSection 5.11 MATLAB Application to Transient Analysis 143
fsol(in)=300.0; % initial condition
end
%
sol(1)=fs0l(8); % sol contains time-history solution at node 8
kk=mm-+deltt*kk; % effective system matrix
%
for it=1:ntime
%
fn=deltt*ff+mm*fsol; % compute effective column vector
%
[kk,fn]=feaplyc2(kk, fn, bcdof, beval); % apply boundary condition
%
fsol=kk\ fn; % solve the matrix equation
%
sol(it-+-1)=fsol(8); % sol contains time-history solution at node 8
%
end
%
eo
% plot the solution at node 8
%—
time=0:deltt:ntime*deltt;
plot(time,sol);
xlabel(’Time’)
ylabel(’Solution at the center’)
%
%-
function [k]=feflxl2(eleng)
%
% Purpose:
% element matrix for Cauchy-type boundary such as du/dn=a(u-b)
% using linear element where a and b are known constants.
nh
% Synopsis:
% [k]=feflxl2(eleng)
%
% Variable Description:
% k - element vector (size of 2x2)
% eleng - length of element side with given flux
%
*
% element matrix
%
k=(eleng/6)*[ 21;144 Laplace's and Poisson’s Equations Chapter 5
‘sen at ca
Seeeee ss
8
OTe at
Figure 5.11.8 Transient Finite Element Solution
123;
%
%
& Example 5.11.5 We use the Crank-Nicolson technique to solve the
following problem.
yp?
o0s3t = ea oe (5.11.2)
‘The problem domain is the same as that shown in Fig. 5.9.1 and the boundary
conditions are the same as those described in Example 5.9.1. The initial condition
is 100. The transient solution is plotted in Fig. 5.11.8. The steady state solution
is that obtained in Example 5.9.1. As a result, the present solution must approach
the steady state solution. The program is given below.
%—
% EX5.11.5.m
% to solve the two-dimensional Laplace’s equation given as
% 0.04*u,t = uxx + wyy ,0 node no. and j-> x or y
gcoord(9,1)=3.75; gcoord(9,2)=2.5;
gcoord(10,1)=5.0; gcoord(10,2)=2.5;
gcoord(11,1)=0.
gcoord(12,1)=1.25; gcoord(12,2)
gcoord(13,1)=2.5; gcoord(13,2)=5.0;
gcoord(14,1)=3.75; gcoord(14,2)=5.0;
gcoord(15,1) .
gcoord(16,1)=0.0; gcoord(16,2)=7.5;
gcoord(17,1)=1.25; gcoord(17,2)
gcoord(18,1)=2.5; gcoord(18,2)=7.Laplace’s and Poisson’s Equations Chapter 5
gcoord(19,1)=3.75; gcoord(19,2)=7.: 5;
gcoord(20,1)=
.75; gcoord(24,2)=10,
gcoord(25,1)=5.0; gcoord(25,2)=
%
a
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no. and j-> connected nodes
—_—_&_——_—__—_—
nodes(2,1
nodes(4,1)=4; nodes(4 2)=5; nodes(4,3)=10; nodes(4,4)=9;
nodes(5,1)=6; nodes(5,2 2; nodes(5,4)=11;
nodes(6,1)=7; nodes(6,2)=8;
nodes(7,1)=8; nodes(7,2
nodes(8,1)=9; nodes(8,2
nodes(9,1
nodes(13,1)=16; nodes(13,2)=1
nodes(14,1)=17; nodes(14,2):
nodes(15,1)=18; nodes(15,2)
nodes(16,1)=19; nodes(16,2)=:
%
See eeeee cae e seeare cece
% input data for boundary conditions
_
bedof(1
4; nodes(15,4
5; nodes(16,4)
% Ast node is constrained
% whose described value is 0
% 2nd node is constrained
% whose described value is 0
‘% 3rd node is constrained
% whose described value is 0
% 4th node is constrained
% whose described value is 0
% 5th node is constrained
‘% whose described value is 0
% 6th node is constrained
% whose described value is 0
% 11th node is constrained
% whose described value is 0
% 16th node is constrained
% whose described value is 0Section 5.11 MATLAB Application to Transient Analysis
bedof(9)=23; % 2st node is constrained
% whose described value is 0
% 22nd node is constrained
% whose described value is 38.2683
% 23rd node is constrained
% whose described value is 70.7107
% 24th node is constrained
% whose described value is 92.3880
% 25th node is constrained
% whose described value is 100
% initialization of matrices and vectors
eros(sdof,1); % system vector
In=seros(edef, 1); % effective system vector
% solution vector
seen ntime+1); % time-history solution
kk=zeros(sdof,sdof); % initialization of system matrix
mm-=zeros(sdof,sdof); % initialization of system matrix
kn=zeros(sdof,sdof); % effective system matrix
index=zeros(nnel*ndof,1); % initialization of index vector
%
Gs
% computation of element matrices and vectors and their assembly
——_
for iel=1:nel % loop for the total number of elements
%
nd(1)=nodes(iel,1); % Ist connected node for (iel)-th element
nd(2)=nodes(iel,2); % 2nd connected node for (iel)-th element
nd(3)=nodes(iel,3); % 8rd connected node for (iel)-th element
nd(4)=nodes(iel,4); % 4th connected node for (iel)-th element
x1=gcoord(nd(1),1); y’
x2=gcoord(nd(2),1); y
x3=gcoord(nd(3),1); y3:
x4=gcoord(nd(4),1); y:
oord(nd(1),2); % coord values of Ist node
coord(nd(2),2); % coord values of 2nd node
coord(nd(3),2); % coord values of 3rd node
‘oord(nd(4),2); % coord values of 4th node
xleng=x2-x1; % element size in x-axis
yleng=y4-y1; % element size in y-axis
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
k=felp2dr4(xleng,yleng); % compute element matrix
m=a*felpt2r4(xleng,yleng); % compute element matrix
%
asmbl1 (kk,k,index); % assemble element matrices
=feasmbl1 (mm,m,index); % assemble element matrices
147148 Laplace’s and Poisson’s Equations Chapter 5
%
a
% loop for time integration
a
for in=1:sdof
fsol(in)=100.0; % initial condition
end
%
sol(1)=fsol(13); % sol contains time-history solution at node 13
%
kn=2*mm-+deltt*kk; % compute effective system matrix
fn=deltt*ff+(2*mm-deltt*kk)*fsol; % compute effective vector
%
fin, fn]=feaplyc2(kn, fn, bedof, beval); % apply boundary condition
%
fsol=kn \fn; % solve the matrix equation
%
sol(it+1)=fsol(13); % sol contains time-history at node 13
%
end
%
%
% plot the solution at node 13
G——$ $$$
time=0:deltt:ntime*deltt;
plot(time,sol);
xlabel("Time’)
ylabel(’Solution at the center’)
%
%—
5.12 MATLAB Application to 3-D Steady State Analysis
4 Example 5.12.1 A pyramid shape of three-dimensional domain as seen
in Fig. 5.12.1 is analyzed for the Laplace equation. The bottom face of the
pyramid has specified nodal variables as given in the figure while the side faces
ou
have no flux (i.e. 55 = 0), Four tetrahedral elements are used for the present
three-dimensional analysis. The MATLAB program is also listed.Section 5.12 MATLAB Application to 3-D Steady State 149
(0.5,0.5,1)
ug=100
Figure 5.12.1 A Pyramid With Four Tetrahedral Elements
%—
% EX5.12.1.m
% to solve the three-dimensional Laplace equation
% for a pyramid shape of domain
% using four-node tetrahedral elements.
% Bottom face has essential boundary condition and the
% side faces are insulated.
%(see Fig. 5.12.1 for the finite element mesh)
%
% Variable descriptions
% k = element matrix
% { = element vector
% kk = system matrix
% ff = system vector
% gcoord = coordinate values of each node
% nodes = nodal connectivity of each element
% index = a vector containing system dofs associated with each element
% bedof = a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
. the dots in bedof
% number of elements
% number of nodes per element
% number of dofs per node
% total number of nodes in system
sdof=nnode*ndof; % total system dofs
%150
Laplace’s and Poisson’s Equations Chapter 5
$$$ $
% input data for nodal coordinate values
% gcoord(i,j) where i-> node no, and j-> x or y
EE
% input data for nodal connectivity for each element
% nodes(ij) where i-> element no. and j-> connected nodes
—
nodes(1,1)=4; nodes(1,2)=1; nodes(1,3)=3; nodes(1,4)=«
nodes(2,1)=1; nodes(2,2)=2; nodes(2,3)=3; nodes(2,4)
nodes(3,1)=2; nodes(3,2)=5; nodes(3,3)=3; nodes(3,4)
nodes(4,1)=5; nodes(4,2)=4; nodes(4,3)=3; nodes(4,4):
%
—————
% input data for boundary conditions
ee
bedof(1): % Ast node is constrained
beval(1) % whose described value is 0
bedof(2): % 2nd node is constrained
beval(2): % whose described value is 20
bedof(3): % 4th node is constrained
beval(3)=50; % whose described value is 50
bedof(4)=5; % 5th node is constrained
beval(4)=100; % whose described value is 100
h
%——— $$ __—_—_—_
% initialization of matrices and vectors
%— =
ff=zeros(sdof,1); % system vector
kk=zeros(sdof,sdof); % system matrix
index=zeros(nnel*ndof,1); % index vector
%
% computation of element matrices and vectors and their assembly
% loop for the total number of elements
% 1st connected node for (iel)-th element
% 2nd connected node for (iel)-th element
% 3rd connected node for (iel)-th element
% 4th connected node for (iel)-th elementSection 5.12 MATLAB Application to 3-D Steady State 151
x(1)=gcoord(nd(1),1); y(1)=gcoord(nd(1),2);
2(1)=gcoord(nd(1),3); % coordinate of Ist node
x(2)=gcoord(nd(2),1); y(2)=gcoord(nd(2),2);
2(2)=gcoord(nd(2),3); % coordinate of 2nd node
x(3)=gcoord(nd(3),1); y(3)=gcoord(nd(3),2);
2(3)=gcoord(nd(3),3); % coordinate of 3rd node
x(4)=gcoord(nd(4),1); y(4)=gcoord(nd(4),2);
2(4)=gcoord(nd(4),3); % coordinate of 4th node
wh
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
k=felp3dt4(x,y,2); % compute element matrix
kk=feasmbl! (kk,k,index); % assemble element matrices
%
end
%
qe
% apply boundary conditions
%———$______—-
[kk, ff] =feaplyc2(kk,ff,bedof, beval);
%
%—
% solve the matrix equation
%—
faol=kk\ ft;
%—_——
% print both exact and fem solutions
a
num:
sdof;
store=[num’ fsol]
%
%—
function [k]=felp3dt4(x,y,z)
%— Se
% Purpose:
% element matrix for three-dimensional Laplace’s equation
% using four-node tetrahedral element
%
% Synopsis:
% [k}=felp3dta(x,y,z)
%
% Variable Description:
% k - element matrix (size of 4x4)Laplace’s and Poisson’s Equations Chapter 5
% x - x coordinate values of the four nodes
% y - y coordinate values of the four nodes
% 2 - & coordinate values of the four nodes
%e
%
xbar= [1 x(1) y(1) 2(1);
1 x(2) y(2) 2(2)5
1 x(3) y(3) 2(3)5
1 x(4) y(4) 2(4) Js
xinv = inv(xbar);
vol = (1/6)*det(xbar); %
% element matrix
%
K(1,1)=xinv(2,1)*xinv(2,1)-+xinv(3,1)*xinv(3,1)+xinv(4,1)*xinv(4,1);
k(1,2)=xinv(2,1)*xinv(2,2)+xinv(3,1)*xinv(3,2)+xinv(4,1)*xinv(4,2);
k(1,3)=xinv(2,1)*xinv(2,3)-+xinv(3,1)*xinv(3,3)+xinv(4,1)*xinv(4,3);
k(1,4)=xinv(2,1)*xinv(2,4)+xinv(3,1)*xinv(3,4)+xinv(4,1)*xinv(4,4);
k(2,1}=k(1,2);
k(2,2)=xinv(2,2)*xinv(2,2)-+xinv(3,2)*xinv(3,2)+xinv(4,2)*xinv(4,2);
k(2,3)=xinv(2,2)*xinv(2,3)+xinv(3,2)*xinv(3,3)+xinv(4,2)*xinv(4,3);
k(2,4)=xinv(2,2)*xinv(2,4)+xinv(3,2)*xinv(3,4)+xinv(4,2)*xinv(4,4);
k(3,1)=k(1,3);
k(3,2)=k(2,3);
k(3,3)=xinv(2,3)*xinv(2,3)4+xinv(3,3)*xinv(3,3)+xinv(4,3)*xinv(4,3);
K(3,4 v(2,3)*xinv(2,4)-+xinv(3,3)*xinv(3,4)-+xinv(4,3)*xinv(4,4);
k(4,1 1,4);
K(4,2)=k(2,4);
=k(3,4);
inv(2,4)*xinv(2,4)-+xinv(3,4)*xinv(3,4)-+xinv(4,4)*xinv(4,4);
The finite element solution is
store =
node no. fem sol
1.0000 0.00000
2.0000 20.0000
3.0000 42.5000
4.0000 50.0000
5.0000 100.000
6.0000 42.50005.1
5.2
5.3
54
5.5
5.6
5.7
5.8
5.9
Problems 153
Problems
Repeat Example 5.1.1 to derive Eq. (5.1.14).
A square domain is modeled using either one bilinear element or two linear
triangular elements as shown in Fig. P5.2. Compute the system matrix for the
Laplace equation for each discretization.
Flux through an element boundary is shown in Fig. P5.3. Determine the
equivalent nodal fluxes.
A uniformly distributed flux is given on a side of a biquadratic element as shown.
in Fig P5.4. Compute the boundary integral to determine the equivalent nodal
flux. The interpolation functions for the boundary nodes are
F(e—1e-2)
H(z) = 2(2- 2)
A(z
Ha(2) = hols — 1)
A linear triangular element has three vertices like (#1, y1), (#2,y2) and (23, ys)
Evaluate Eq. (5.2.26) for the element vector if a concentrated source of
magnitude Q is located at (z,,y,) which lies within the element.
Explain how to incorporate the boundary condition given at the edge of Fig.
P5.6 into the finite element equation for the Laplace equation.
Apply the Galerkin method and the Crank-Nicolson method to solve the
following parabolic partial differential equation.
du 1 du
St ~ 0ae? = 10 0<2<3
Initially u is 50 all over the domain and the domain is subjected to boundary
conditions u=100 at the left end and 24 = 100e~t at the right end. Using At=1,
find the nodal solution at time t=1. The domain is discretized into two linear
elements. As a result, the three nodal points are located at 71=0, z2=1, and
z3=3, respectively.
Redo Prob, 5.7 using the backward difference method.
For a thermally orthotropic material, the two-dimensional heat conduction
equation is
a ou a
(5 és) + By (Hy) += °
where ky and ky are heat conduction coefficients along the orthotropic axes 2
and y, respectively. Q is heat generation per unit volume. Develop the element
matrix equation using linear triangular elements.154 Laplace's and Poisson’s Equations Chapter 5
Ww pry
Figure P5.2 Problem 5.2
}-—_1__-.]
domain
Figure P5.3 Problem 5.3
¥
@ = constant
Figure P5.4 Problem 5.4
5.10 Repeat Example 5.9.1 for various mesh patterns shown in Fig. P5.10 using the
computer program. Compare the salutions at the center of the domain.
5.11 A domain is normalized such that 0< z <1 and 0< y <1. Solve the LaplaceProblems 155.
$e =-10U+Sxe-10
Figure P6.6 Problem 5.6
Figure PG.10 Probie 5.19
equation over the domaio using the provided program and 16 bilinear elements
(4 elements in the x and y-axis, respectively), The boundary conditions are u=0
at 2=0, U=100 at e=1, u=D at yD, and u=200 at y=)
5.12 Solve the Laplace equation for the demain shown in Fig, P§.12. The boundary
condition is 4lso shown in the figure.
5.13 Redo Prob. §.11 using the transient analysis assuming initia! condition u=0 all
over the domain. Use the forward difference time integration technique
5.14 Redo Prob. 5,11 using the transient analysis assuming initial condition u=0 all
over the domain. Use the backward difference time integration technique.
§.15 Redo Prob. §.11 using the transient analysis assuming initis] condition u=0 all
over the domain, Use the Crank-Nicolson time integration technique.
5.16 Redo Prob. 5.12 using the transient analysis with initial condition u=400. Use
the Crank-Nicolson technique for time integration.186 Laplace's and Poisson's Equations Chapter 5
Insuoted
on
Figure PS.12 Problem 5.12
R20
eet
I) am
TnsvkatedCHAPTER SIX
ISOPARAMETRIC ELEMENTS
6.1 One-Dimensional Elements
[eoparametric elernents [10] use mathematical mapping from one coordinate
system into the other coordinate system. The former coordinate system ia called the
neturnl coordinate system while the lalter is called the physical coordinate system.
The problem domain is provided in the physical coordinate system denoted xyz-axes
in the following discussion. On the other hand, element shape functions are defined
in terms of the natural coordinate system denoted €{-axee. As a result, mapping is
needed between the two coordinate systems.
‘We consider a linear one-dimensional isoparametric element to discuss the basic
characteristics of isoparametric elements. Multi-dimensional isoparametric elements
will be discussed in the subsequent sections. Shape functions for the isopatametric
element are given in terms of the natural coordinate system as seen in Fig. 6.1.1.
The two nodes are located at £ = —1.0 and & = 1.6. These nodal positions are
arbitrary but the proposed selection is very useful for numerical integration because
the element in the natural coordinate system is normalized between -] and 1. The
shape functions can be written aa
tig) = 30-8) (BAM)
and '
Ha{G) = 5(1 +8) (8.1.2)
The physical linear element may be located at any position in the physical coordinate
system aa shown in Fig. 6.1.2, The element has two nodal coordinate values x, and
‘2z with corresponding nodal variables u; and up.
Any point between € = —1.0 and & = 1.0 in the natural coordinate system can
be mapped onto a point between x; and zz in the physical coordinate system nsing
the shape functions defined in Eqs (6.1.1) and (6.1.2).
z= Hil€)2i + Ha(€)z2 (6.1.3)
17158 Iscparametric Elements Chapter 6
node ft node 2 t
——_+—__—__+—___-
#=-t t=?
Figure 6.1.1 Linear Element In the Natural Coordinate
Figure 6.1.2 Linear Element in the Physical Coordinate
The eame shape functions are also used to interpolate the variable u within the
element
us Hi(g)us + Halé)us (6.1.4)
If the same shape functions are used for the geometric mapping as well at nodal
variable interpolation such as Eqe (6.1.3) and (6.1.4), the element is called the
isoparametric element.
In order to compute #2, which is necessary in most cases to compute ¢lement
masrices, we use the chain rule such that
HO, , SHD,,
= HOd,, + te) fu (6.1.5)
where the expression requires $ which ia the inverse of ¥. The latter can be
computed from Eq. (6.1.3).
ad an,
= ani, : oO), . flea a) 6.16)
Substituting Eq. (6.1.6) into Ea, (6.1.5) yields
ao
tne ae. (6.1.7)
Ae a result, derivatives of shape functions with reapect to the physical coordinate
eyetem are
ani
dz mom ue)
aie)
de mm (6.1.8)
in which A; = (22 — 21) ia the element size in the physical coordinate system.
‘These detivative values are identical to those obtained directly from the linear shape
functions expressed in terms of the physical coordinate system like Eqs (2.4.7) and
(2.4.8).Section 6.1 One-Dimensional Elements 159
Figure @.1.3 Quadratic Isoparametric Element
Let us compute the following integral using the linear isoparametric element.
fe (2S swu)ae (6.1.10)
The integration is in terms of the physical coordinate system while the integrand
is expressed in terms of the nafuraf coordinate aystem because isoparametric shape
functions are used for the trial and test functions u and w. Hence, we want to write
the integral in terms of the nadura/ coordinate system. To this end, we obtain
[ (B8+6 1) 2a (6.1.11)
where J = 4 is called the Jacobian.
Substitution of the isoparametric shape functions for both u and w resulta in
LGs[e te ter) )ee(e}
Lk BVIG) wo
ate hte
This expression is the same as that obtained from the conventional linear element.
At this point, the isoparametric clement does not seem to have an advantage over
the conventional element because the isoparametric element requires more procedures
such as mapping and chain rule. The major advantage of isoparametric elements
comes when analytical integration to compute element matrices and column vectors is
either very complicated or almost impossible. This is the case either element shapes
in the physical dormain are oot regular such as in the rmulti-dimensional problem
or the differential equation is quite complex. Therefore, (he numerical integration
technique is needed. Because each isoparametric element is defined in terma of the
normalized domain such a8 £ = —1 and £j = 1, it is much easier to apply any
numerical integration technique. The application of numerical integration technique
is discussed later in this chapter.
@Example 6.1.1 Let us consider a quadratic one-dimensional isoparametric
clement ag seen in Fig 6.1.3, Shape functions for this element are
@-8
z
Ai(E) = (6.1.13}160 Isoparametric Elements Chapter 6
#,(é)=1-@ (6.1.14)
and
Hs(€) = @+8 (6.1.15)
‘The variable u can be interpolated using these shape functions.
u= Hy(€)us + Ho(é)u2 + Ha(é)us (6.1.16)
Geometric mapping from the natural coordinate to the physical coordinate is
2 = Hy(€)e1 + Ho(é)22 + Ho(€)z9 (6.1.17)
The Jacobian becomes
ae
dé
o. dHi(€)
J ae
t; = (€-0.5)z — 2x2 + (+0.5)25 (6.1.18)
i=
If the mid-node 22 is located between the two end-nodes 2; and 23 (ie.
22 = ©1429)), the Jacobian becomes 4+ in which h; = £3 — 2; is the element
length.
Derivatives of the shape functions, Eqs (6.1.13) through (6.1.15), are
ay) _ diy _ 1
ie TE = 5-0 (6.1.19)
dHy(6) _ dH __4e
ee (6.1.20)
dH3(€)__1dH3 1
“al oa = B+ (6.1.21)
6.2 Quadrilateral Elements
‘The shape functions for the bilinear isoparametric element, are given below:
1
An(E,m) = g(1— (1-0) (6.2.1)
th{Gn) = 70 +9000) (62.2)
Hg(6,n) = F040 +0) (623)Section 6.2 Quadrilateral Elements 161
Figure 6.2.1 Bilinear Element in the Natural Coordinate
(23,4)
(anu,
(22, Ue)
(4%)
Figure 6.2.2 Bilinear Element in the Physical Coordinate
Han) = 40-900) (62.4)
for the nodes shown in Fig. 6.2.1. These shape functions are defined in terms of the
normalized natural domain (ie. ~1 < € <1 and -1< <1).
While the element shape is a square in the natural coordinate system, it can be
mapped into a general quadrilateral shape with distortion as seen in Fig. 6.2.2. When
this mapping is undertaken, the relative positions of nodal points should be consistent
between the two elements in the natural and physical domains. In other words, the
second node is next to the first node in the counter-clockwise direction and similarly
for the rest of the nodes. Then, a point (€,7) within the natural element is mapped
into a point (z,y) within the physical element using the shape functions given in Eqs
(6.2.1) through (6.2.4) as shown below:
4
=o Hien) (6.2.5)
rf
4
y= Ain) (6.2.6)
is162 Isoparametric Elements Chapter 6
in which 2; and y, are the coordinate values of the i** node. Similarly, any physical
variable can be interpolated using the same shape functions.
4
u= SHE nu (6.2.7)
in which u; is the nodal variable at node i.
Let us apply this bilinear isoparametric element to the Laplace equation dis-
cussed in Chapter 5. Then, we need to compute 2462) and 2462), respectively.
In order to compute these derivatives, we use the chain rule, again.
Oo _ bbe, bby
BE = Be aE * By dE (628)
000s, aby
35 7 82 On * By On
Rewriting these in the matrix form provides
(2)-18
af=|ar 4 & } (6.2.10)
on band bay
Here, the derivative shown in the left-hand-side column vector is called local deriva-
tive while that in the right-hand-side column vector is called global derivative. Fur-
thermore, the square matrix in this equation is called the Jacobian matrix for the
two-dimensional domain and denoted as
(6.2.9)
Jun Jn] [8% &
Ae = 6.2.11
v=[3 e)=[8 & Sy
The Jacobian matrix can be easily extended for the three-dimensional domain.
Inverse of the Jacobian matrix is denoted by
i =py = [2 ral
Ra Rar ae
Then, Eq. (6.2.10) can be rewritten as
a 2.
ve | _ [Ru re { aE }
{ a } ~ [Ra Ral le (6.2.13)
As a result, the derivatives of shape functions with respect to x and y can be obtained
from the above equation.
BH; OH,
ez \ _ [Ru Rar i}
(H}= [Be Be] (239
IsSection 6.2 Quadrilateral Elements 163
(ad) (od)
(a,b) (e.b)
2
Figure 6.2.3 Rectangular Element
The components in the Jacobian matrix are computed as shown below:
eo an one), . (6.2.15)
i te x oH, 1) . (6.2.16)
. Ray ony ED (6.2.17)
ce be > $286, n) | (6.2.18)
1
Substitution of bilinear shape functions, Eqs (6.2.1) through (6.2.4), into the above
expressions yields
T= ia —n)ei+ ia = n)z2+ ia +n)z3— 5a +n)ea (6.2.19)
Ja =—FO- mu + Z0= nant 0am FO + nue (62.20)
Jn = Her H(t Gea + FL 4 Os + Hl - fee (6.2.21)
Jn =-H0-On-F0FOm+ FIFO v4 TA-Ou (6.2.22)
These components are in general a function of € and n. However, they may be constant
for a special case as shown in the following example. Once the Jacobian matrix is
computed from Eqs (6.2.19) through (6.2.22), global derivatives of shape functions
are computed as
as (6.2.28)
outa a. BEG a + Ry) (6.2.24)
OH) _ Ry He) + RD)164
Isoparametric Elements Chapter 6
& Example 6.2.1 Let us compute the Jacobian matrix for the physical
element shown in Fig. 6.2.3. Substituting the nodal coordinate values into Eqs
(6.2.19) through (6.2.22) yields the following matrix.
= (F | (6.2.25)
‘As seen in this example, the Jacobian matrix becomes a diagonal matrix (i.e.
all off-diagonal components vanish) when the element in the physical domain is
a rectangular shape. In addition, the diagonal components are constant not a
function of € and 7.
The inverse of the Jacobian matrix becomes
3 (0
=| e-4 2.
(2) [ 7 2 (6.2.26)
The global derivatives of shape functions become
(62.27)
(6.2.28)
oe = We (6.2.29)
os = me (6.2.30)
ee =-3a = (6.2.31)
= Ha (6.2.32)
ae = Cea (6.2.33)
os 7 Wen (6.2.34)
& Example 6.2.2 Let us compute the following integral using the same
element as given in Example 6.2.1.
Le y+ He) dedy (6.2.35)Section 6.2 Quadrilateral Elements 165
On. #)
3)
24 01,-%)
Figure 6.2.4 Element of Trapezoidal Shape
Substitution of Eqs (6.2.27) and (6.2.31) into Eq. (6.2.35) results in
dope
1 : 1 F
i i lz Sarl 9? + qa pa - 8" |dedy (6.2.36)
‘The lower and upper limits of the integrals can be changed using
dedy = \J\dEdn (6.237)
where |J| is the determinant of the Jacobian matrix and is equal to ==")
for the present element. That is, |.J| is a constant value for a rectangular shape
of physical element. Then, we obtain
Aa ae.
LL laetap 9+ gt 07] oe Dicin (6.2.88)
Integration of Eq. (6.2.87) finally yields “2PHe-H"
# Example 6.2.3. Fine the Jacobian matrix for the quadrilateral element
shown in Fig. 6.2.4. Equations (6.2.19) through (6.2.22) along with the nodal
coordinate values as specified in the figure yield
1 40+ 3|
J] = [ 6.2.39)
Vl=]o tis4e) ( )
The determinant of Jacobian is |J| = See which is always positive for
—1<€ <1. Inverting the matrix gives
(6.2.40)166 Isoparametric Elements Chapter 6
Figure 6.2.5 Element of Quadrilateral Shape
‘The determinant of the Jacobian matrix is |J| = }(3 + €).
In order to compute the integration as given in Eq. (6.2.35) for the present
element, we first compute
arn
Ox
(6.2.41)
(6.2.42)
‘The expression for the integral becomes
ie [f-pge Cote (E11) St Dace (6.2.43)
‘This integral can be conducted analytically. However, if the shape of the physical
element has more severe distortion, the integral becomes more complicated and
may be beyond the analytical computation. Even if analytical integration may
be possible, performing the analytical integration for every element of different
shape is not pratically possible. Therefore, the numerical integration technique
is used along with the isoparametric element.
& Example 6.2.4 — The physical element has a severe distortion as seen in
Fig. 6.2.5. The corresponding Jacobian matrix is
1-32
| (6.2.44)
7
wi=[4, Se
14
and its determinant is 3(2—3€ —3n). This determinant can be zero or negative
for -1 < € < 1 and —1 < 9 < 1. Hence, this shape of element should be
avoided in discretizing the physical domain. +Section 6.2
Quadrilateral Elements
167
Some other popular quadrilateral isoparametric elements are eight-node and
nine-node elements as shown in Fig. 6.2.6. Their shape functions are given below.
Eight-node element:
Nine-node element:
= }0-90-n(-1-€-0)
Hy = H+ 90-1 +E-)
Hy = Fa+9+n\(-1+e+m)
y= fa-9a +n)(-1-£+9)
Hy = h0-@)1-1)
He= hasan)
a= }a-e)a4n)
we=ia-9a-1)
he ie - 6x? ~ 0)
Hy = HE +O(0?-1)
Hy = E4607 +1)
Hy= Hey" +1)
Hy = 30 -@)(7? =)
He= HE +002)
Hy =$- E07? +9)
We=1@-90-17)
Hg = (1-€*)(1—17)
(6.2.45)
(6.2.46)
(6.2.47)
(6.2.48)
(6.2.49)
(6.2.50)
(6.2.51)
(6.2.52)
(6.2.53)
(6.2.54)
(6.2.55)
(6.2.56)
(6.2.57)
(6.2.58)
(6.2.59)
(6.2.60)
(6.2.61)168 Isoparametric Elements Chapter 6
n
Figure 6.2.6 Eight-Node Isoparametric Element
Figure 6.2.7 Nine-Node Isoparametric Element
6.3 Triangular Elements
Like quadrilateral isoparametric elements, triagular isoparametric elements can
be defined. Shape functions of the linear triangular element are in terms of the natural
coordinate system
My =1-€-n (6.3.1)
Hy =€ (6.3.2)
Hs=n (6.3.3)
for the nodes shown in Fig. 6.3.1. The quadratic triangular element has the following
shape functions with reference to Fig. 6.3.2.
Hy = (1—€ - )(1 — 2€ — 2n) (6.3.4)
Hy = &(2€ - 1) (6.3.5)
Hs = (2-1) (6.3.6)
Hy = 4€(1—€—7) (6.3.7)Section 6.3 ‘Triangular Elements 169
2
f=1
Figure 6.3.1 Three-Node Triangular Element in the Natural Coordinate
(0,0) (0.5,0) (1,0)
Figure 6.3.2 Six-Node Triangular Element in the Natural Coordinate
Hs = 4€q (6.3.8)
He = 4n(1—~n) (6.3.9)
& Example 6.3.1 Consider an element as shown in Fig. 6.3.3. The Jacobian
matrix for the element is
= f2-t wW-H
m=[278 nae (6.3.10)
and its determinant is |J| = (22 — 21)(ys — y1) — (@3 — 21)(yo — y1) which
equals twice the triangular area in the physical domain. {170 Isoparametric Elements Chapter 6
Figure 6.3.3 Three-Node Triangular Element in the Physical Coordinate
6.4 Gauss Quadrature
Integral is defined as
5 a
f[ S(2)dz = im YY f(zi)das (6.4.1)
ie i=
This is shown in Fig. 6.4.1. In the numerical integration, we take a finite number of
calculations. Therefore, Eq. (6.4.1) is approximated as
b N
f[ F(a)de = So flei)Azi (6.4.2)
7 i=
where N is a finite number. Rewriting this expression in a general way gives
6 M
[ F(z)de = S* f(2:) Wi (6.4.3)
7 i=l
in which M is the number of integration points, 2; is the integration point (or sampling
point), and W; is called the weighting coefficient. The weighting coefficient can be interpreted
as the width of the rectangular strip whose height is f(z;) by comparing Eqs (6.4.2) and
(6.4.3). Any numerical integration may be expressed in this form. In order to derive
standard values for the integration points and weighting coefficients, the integration domain
is normalized such that —1 < x <1. Of course, there are other ways for normalization.
#& Example 6.4.1 Let us find the proper integration points and weighting
coefficients for the two point trapezoidal rule. The trapezoidal rule gives
[ : 9()dé = (g(—1) + 9(1)) (6.4.4)Section 6.4 Gauss Quadrature 171
Figure 6.4.1 Integration
Comparing Eq. (6.4.4) to Eq. (6.4.3) indicates that the integration points for
this case are 21 = —1 and zz = 1 while the weighting coefficients are W; = 1
and W,=1. ¢
4 Example 6.4.2 Repeat Example 6.4.1 using Simpson’s 4 rule with three
point integration. This integration results in
;
J st6de = Glo(-2) + 49(0) +900) (6.4.5)
Therefore, we obtain 2} = —1, 22 = 0, 23 = 1, Wi = 3, We = 4, and
Gauss-Legendre quadrature is very useful for integration of polynomial func-
tions. It can integrate a polynomial function of order 2n — 1 using the n-point
quadrature exactly. Integration points and weighting coefficients for Gauss-Legendre
quadrature are provided in Table 6.4.1. Similarly, Table 6.4.2 gives integration points
and weighting coefficients for the triangular domain shown in Fig. 6.3.1 and Fig.
6.3.2. If the integrand is not a polynomial expression, Gauss-Legendre quadrature
gives an approximate result. In this case, an optimal number of integration points
should be selected in consideration of accuracy and computational cost. The next
example shows how to determine the integration points and weighting coefficients for
the Gauss-Legendre quadrature.
4 Example 6.4.3 This example shows a way how to compute the sampling
points and weighting coefficients for Gauss-Legendre quadrature. Let us integrate172
Isoparametric Elements Chapter 6
Table 6.4.1 Sampling points and weights in Gauss-Legendre numerical integration
2
Int.Point Weight
1 0. 0.00000 00000 00000 2.00000 00000 00000
2 = +£0.57735 02691 89626 1.00000 00000 00000
3 +£0.77459 66692 41483 0.55555 55555 55556
0.00000 00000 00000 0.88888 88888 88889
4 +0.86113 63115 94053 0.34785 48451 37454
0.33998 10435 84856 0.65214 51548 62546
5 0.90617 98459 38664 0.23692 68850 56189
+£0.53846 93101 05683 0.47862 86704 99366
0.0000 00000 00000 0.56888 88888 88889
6 +£0.93246 95142 03152 0.17132 44923 79170
+0.66120 93864 66265 0.36076 15730 48139
0.23861 91860 83197 0.46791 39345 72691
a cubic polynomial as shown in Fig. 6.4.2. In Gauss-Legendre quadrature, we
want to make the integration of the cubic polynomial the same as that of a linear
function. In other words, the two different hatched areas in Fig. 6.4.2 are the
same (i.e. Area(A)=Area(B) in Fig. 6.4.2). Then we can write
ie i: 2
[feds [aed = I) (6.4.6)
where
F(x) = a9 + a2 + agz? + agz® (6.4.7)
9(2) = co + et (6.4.8)
and W, and 2, are the weighting coefficient and sampling point for the two
point Gauss-Legendre quadrature because the two point rule integrates a cubic
polynomial exactly.
Let us rewite the cubic polynomial in the following way.
F(z) = co +12 + (2 — 2)(z — 22)(bo + 612) (6.4.9)
In this expression, 21 and 2» are fixed constants to be determined later. However,
there are still four general constants co, c1, bo and 6; to be determined to makeSection 6.4 Gauss Quadrature 173
Table 6.4.2 Numerical integrations over triangular domains
Int.
order___€-coordinate n-coordinate Weight
0.16666 66666 667 0.16666 66666 667 0.33333 33333 333
S-points 0.66666 66666 667 0.16666 66666 667 0.33333 33333 333
0.16666 66666 667 0.66666 66666 667 0.33333 33333 333
0.10128 65073 235 0.10128 65073 235 0.12593 91805 448
0.79742 69853 531 0.10128 65073 235 0.12593 91805 448
0.10128 65073 235 0.79742 69853 531 0.12503 91805 448
T-points 0.47014 20641 051 0.05971 58717 898 0.13239 41527 885
0.47014 20641 051 0.47014 20641 051 0.18239 41528 885
0.05971 58717 898 0.47014 20641 051 0.13239 41528 885
0.33333 33333 333 0.33333 33333 333 0.22500 00000 000
0.06513 01029 022 0.06513 01029 022 0.05334 72356 088
0.86973 97941 956 0.06513 01029 022 0.05334 72356 088
0.06513 01029 022 0.86973 97941 956 0.05334 72356 088
0.31286 54960 049 0.04869 03154 253 0.07711 37608 903
0.63844 41885 698. 0.31286 54960 049 0.07711 37608 903
13-points 0.04869 03154 253 0.63844 41885 698 0.07711 37608 903
0.63844 41885 698. 0.04869 03154 253 0.0711 37608 903
0.31286 54960 049 0.63844 41885 698 0.0711 37608 903
0.04869 03154 253. 0.04869 03154 253 0.0711 37608 903
0.26034 59660 790 0.26034 59660 790 0.17561 52574 332
0.47930 80678 419 0.26034 59660 790 0.17561 52574 332
0.26034 59660 790 0.47930 80678 419 0.17561 52574 332
0.33333 33333 333 0.88333 33833 333. -0.14957 00444 67
Eq. (6.4.9) the same as Eq. (6.4.7) for arbitrary constants a;. Substitution of
Eq. (6.4.9) into Eq. (6.4.6) states
[ *(e—21)(2— 22)(b0 + bi2)d2 =0 (6.4.10)
:174
Isoparametric Elements Chapter 6
B
Gf )=00+ ey
Sa)=ap+ a2 + a22?+ age*
A
Pte
“=f 1
Figure 6.4.2. Two-Point Gauss-Legendre Quadrature
Equation (6.4.10) must be true independent of bo and 6; because the integration
rule holds for a general cubic polynomial. Therefore,
4
iy (2 —21)(2—22)d2 = 0 (6.4.11)
=1
and
1
f{ 2(0 — 21)(e — 22)de = 0 (6.4.12)
aa
‘These two equations determine 2) = —Js and 22 = a ‘These are two
sampling points for the two-pont Gauss-Legendre quadrature. In order to find
the corresponding weighting coefficients, we integrate
1
I | (co + c12)dz = 2c (6.4.13)
1
From Eq. (6.4.6), this integration is equal to
2
T= DWF (22) = Walco + crzr) + Walco + e122)
i
= ¢o(Wi + Wa) — Fa —We) (6.4.14)
Equating Eq. (6.4.13) and Eq, (6.4.14) yields two weighting coefficients W, = 1
and W=1.
4 Example 6.4.4 Perform the following integral:
[cites setae (6.4.18)Section 6.4 Gauss Quadrature 175
Because the order of polynomial is 2, 2n — 1 = 2. From this, we get n = 1.5
‘The number of integration points should be an integer. So, we use the two
point quadrature rule. From Table 6.4.1, the two integration points are “KR
and Jz with weighting coefficient 1 for each point, respectively. The numerical
integration becomes
‘
iL (1+ 2€ + 3€%)de =
o
(I+ ARF) +I T) + LAI +AGI=A 6A.16)
‘This is the exact solution. If we use the three point quadrature to integrate Eq.
(6.4.15) (ie. & = —“48, & = 0, & = GS, W = §, We = 8, and Ws = 8),
we also obtain the same exact solution. Therefore, the quadrature rule using two
or higher number of integration points will always yield the exact solution for
this problem. +
The quadrature rule can be extended for multi-dimensional integration. For ex-
ample, numerical integral in the normalized two-dimensional domain can be conducted
in the following way.
ce
ff senedn
fe
1M.
=/ DY Wial&sn)dn
7
Ma M
= Ly DY Wis(€75)
fee
Mi Ma
= VL wWj9(G 15) (6.4.17)
421551
in which M, and M2 are the number of integration points in the € and 7 axes,
respectively. In addition, (&;,n;) are the integration points and W; and W; are
weighting coefficients. Table 6.4.1 can be used for these values. Similarly, numerical
integration in three-dimension becomes
1 1 us Mi Mz Ms i
I, i a 96, ,C)ddnde = S11 S| Wis Wea Gis m5) (6.4.18)
j=1k=1
4 Example 6.4.5 Integrate the following expression:
[ ; f ; 9€ paddy (6.4.19)176 Isoparametric Elements Chapter 6
‘The integrand is the second order in terms of € and 1, respectively. That is,
2M, —1 = 2Mz—1 = 2 for both axes. Therefore, we use two point quadrature
in both € and 7 directions. The integration points are £; = m1 = -#
and & = jm = Te The weighting coefficients are W,; = W, = 1 and
Wo = Wo = 1. Applying these values to Eq. (6.4.17) results in 4. t
& Example 6.4.6 We want to integrate
[ : [ : 15€2n*dédy (6.4.20)
‘The integrand is the second order in terms of € and fourth order in terms of
n. Therefore M; = 2 and Mz = 3. Using the two point quadrature in the
€ direction and three point quadrature in the 7) direction from Table 6.4.1, we
obtain the solution of 4. {
6.5 MATLAB Application to Gauss Quadrature
This section shows MATLAB examples for numerical integration of one-, two-
or three-dimensional functions using Gauss-Legendre quadrature. The domain of
integration is normalized between -1 and 1 for every axis.
# Example 6.5.1 We want to integrate
F(x) = 142? — 329 4425 (6.5.1)
over the domain —1 < z < 1 using Gauss-Legéndre quadrature. Because the
highest order of polynomial is 5, we need the 3-point quadrature rule for exact
integration from 2n — 1 = 5. The numerical result is §. The MATLAB program
is shown below.
%e
% Example 6.5.1
% Gauss-Legendre quadrature of a function in 1-dimension
%
% Problem description
% Integrate f(x)=1+x?-3x344x* between x=-1 and x=1
% Variable descriptions
% point1 = integration (or sampling) points
% weight! = weighting coefficients
% ngl = number of integration pointsSection 6.5 MATLAB Application to Gauss Quadrature 177
%-
%
ngl=3; % (2*ngl-1)=5
%
[point ,weight1]=feglqd1 (ngl); % extract sampling points and weights
%
%
% summation for numerical integr:
%
%
value=0.0;
%
for int=1:1
x=point (int);
wt=weight1 (int);
+x3-3*x3444x5; % evaluate function at sampling point
‘value+func*wt;
% print the solution
function [point1,weight1]=feglqdi (ngl)
%-
% Purpose:
% determine the integration points and weighting coefficients
% of Gauss-Legendre quadrature for one-dimensional integration
%
% Synopsi
% (point ,weight1]=feglqd1 (ngl)
h
% Variable Description:
% ngl - number of integration points
% point - vector containing integration points
% weight! - vector containing weighting coefficients
ee
wh
% initialization
%
point1=zeros(ngl,1);
weight1=zeros(ngl,1);
%
% find corresponding integration points and weights
%
if ngl=: % 1-point quadrature rule178
Isoparametric Elements Chapter 6
pointl(1)=0.0;
weight}(1)=2.0;
%
elseif ngl==2 % 2-point quadrature rule
point1(1)=-0.577350269189626;
point (2)=-point1(1);
weight1(1)=
weight1(2)
% 3-point quadrature rule
0.774596669241483;
point1(3)=-point1(1);
weight 1 (1)=0.555555555555556;
weight (2)=0.888888888888889;
weightl(3)=weight1(1);
%
elseif ngl==4 % 4-point quadrature rule
point1(1)=-0.861136311594053;
point (2)=-0.339981043584856;
point] (3)=-point1(2);
point1(4)=-pointl(1);
weight1(1)=0.347854845137454;
weight1(2)=0.652145154862546;
weight] (3)=weight1 (2);
weight1(4)=weight1(1);
%
else % 5-point quadrature rule
point] (1)=-0.906179845938664;
point] (2)=-0.538469310105683;
point1(3)=0.0;
point] (4)=-point1(2);
point1(5)=-pointl (1);
weight (1)=0.236926885056189;
weight (2)=0.47862867049936
weight 1(3)=0.568888888888889;
weight1(4)=weight1(2);
weight1(5)=weight1(1);
%
end
%—Section 6.5 MATLAB Application to Gauss Quadrature 179
& Example 6.5.2 Use Gauss-Legendre quadrature for integration of
J(z,y) = 1+ dey — 327y? + 2ty® (6.5.2)
over the domain —1 < z < 1 and —1 < y < 1. We use 3.point quadrature
rule along the x-axis and 4-point quadrature rule along the y-axis. The result is
2.7810.
~%—
% Example 6.5.2
% Gauss-Legendre quadrature of a function in 2-dimension
%
% Problem description
% Integrate {(x,y)=1+4xy-3x?y?-+x4y® over -1 ngly
ngl=nglx;
else
ngl=ngly;
end
%
% initialization
%
point2=zeros(ngl,2);
weight2=zeros(ngl,2);
h
% find corresponding integration points and weights
%
{pointx,weightx]=feglqd1 (nglx); [pointy,weighty]=feglad1 (ngly); %
% quadrature for two-dimension
%
for intx=1:nglx point2(intx,1)=pointx(intx);
weight2(intx,1)=weightx(intx);
end
%
for inty=I:ngly point2(inty,2)=pointy(inty);
weight2(inty,2)=weighty (inty);
end
%
%Section 6.5 MATLAB Application to Gauss Quadrature 181
4 Example 6.5.3 The following three-dimensional function is integrated
using Gauss-Legendre quadrature.
F(2,y,z) = 1+ 4n?y? — 30224 + yte® (6.6.3)
over the normalized domain —1 < z < 1, —1 < y< land -1 ngly
if nglx > nglz
ngl=nglx;
else
ngl=nglz;
end
else
if ngly > nglz
ngl=ngly;
else
ngl=nglz;
end
end
%
‘% initialization
%
point3=zeros(ngl,3);
weight3=zeros(ngl,3);
%
% find corresponding integration points and weights
%Section 6.6
MATLAB Application to Laplace Equation
[pointx, weightx]=feglad1 (nglx);
[pointy,weighty]=feglqd1(ngly);
% quadrature rule for x-axis
% quadrature rule for y-axis
183
[pointz, weightz]=feglqd1(nglz); % quadrature rule for z-axis
%
% quadrature for two-dimension
% quadrature in x-axis
pointx(intx);
=weightx(intx);
end
for inty=1: % quadrature in y-axis
point3(inty,2)=pointy(inty);
weight3(inty,2)=weighty (inty);
end
%
for intz=1:nglz % quadrature in z-axis
point3(intz,3)=pointz(intz);
weight3(intz,3)=weightz(intz);
end
%
%—
6.6 MATLAB Application to Laplace Equation
Isoparametric elements are used to solve the Laplace equation which was
discussed in Chapter 5.
#& Example 6.6.1 This example shows how to compute the element matrix
for the Laplace equation. The clement matrix is expressed as
Ree cael
Ine | Oz Ox
dy dy
‘The element domain is shown in Fig. 6.2.4. The MATLAB program is listed
below to evaluate the element matrix.
(6.6.1)
%—
% Example 6.6.1
% Compute element matrix for two-dimensional Laplace equation
%
% Problem description
% Determine the element matrix for Laplace equation using
% isoparametric four-node quadrilateral element and Gauss-Legendre184
Isoparametric Elements
% quadrature for a single element shown in Fig. 6.2.4.
%
% Variable descriptions
% k - element matrix
% point2 - integration (or sampling) points
% weight2 - weighting coefficients
% nglx - number of integration points along x-axis
% ngly - number of integration points along y-axis
% xcoord - x coordinate values of nodes
% ycoord - y coordinate values of nodes
% jacob2 - Jacobian matrix
% shape - four-node quadrilateral shape functions
Chapter 6
% dhdr - derivatives of shape functions w.r.t. natural coord. r
% dhds - derivatives of shape functions w.r.
natural coord. s
% dhdx - derivatives of shape functions w.r.t. physical coord. x
% dhdy - derivatives of shape functions w.r.t. physical coord. y
%-
%
nnel: % number of nodes per element,
ndof=1; % degrees of freedom per node
edof=nnel*ndof; % degrees of freedom per element
%
nglx=2; ngl % use 2x2 integration rule
%
xcoord=[-1 1 1-1}; % x coordinate values
ycoord=[-0.75 -0.75 1.25 0.25); % y coordinate values
%
[point2,weight2]=feglqd2(nglx,ngly); % sampling points & weights
%
os
% numerical integra
%—
k=zeros(edof,edof); % initialization to zero
%
for intx=I:nglx
x=point2(intx,1); % sampling point in x-axis
wix=weight2(intx,1); % weight in x-axis
for inty=1:ngly
y=point2(inty,2); % sampling point in y-axis
wly=weight2(inty,2) ; % weight in y-axis
%
[shape,dhdr,dhds]=feisoq4(x,y); % compute shape functions and
% derivatives at sampling point
%
jacob2=fejacob2(nnel,dhdr,dhds,xcoord,ycoord); % compute Jacobian
detjacob=det(jacob2); % determinant of Jacobian
% inverse of Jacobian matrixSection 6.6 MATLAB Application to Laplace Equation 185
{dhdx,dhdy]=federiv2(nnel,dhdr,dhds,invjacob); % derivatives w.r.t.
% physical coordinate
%
%—
% element matrix loop
%
for i=Liedof
for j=1:edof
k(i,j)=k(i,j) + (dhdx(i)*dhdx(j)+dhdy (i)*dhdy(j))*wtx*wty*detjacob;
end
end
% end of numerical integration loop
% print the element matrix
RRO wWG Sx
are
function [dhdx,dhdy]=federiv2(nnel,dhdr,dhds,invjacob)
%:
% Purpose:
% determine derivatives of 2-D isoparametric shape functions with
% respect to physical coordinate system
%
% Synopsis:
% (dhdx,dhdy)=federiv2(nnel,dhdr,dhds,invjacob)
%
% Variable Description:
% dhdx - derivative of shape function w.r. | coordinate x
% ahdy - derivative of shape function w.r.
% nnel - number of nodes per element
% dhdr - derivative of shape functions w.r.t. natural coordinate r
% dhds - derivative of shape functions w.r.t. natural coordinate s
. physi
. physical coordinate y
% invjacob - inverse of 2-D Jacobian matrix
dhdy (i)=invjacob(2,1)*dhdr(i)+invjacob(2,2)*dhds(i);
end
nh
%186
Isoparametric Elements Chapter 6
function [shapeq4,dhdrq4,dhdsq4]=feisoq4(rvalue,svalue)
%
% Purpose:
% compute isoparametric four-node quadrilateral shape functions
% and their derivatves at the selected (integration) point
% in terms of the natural coordinate
%
% Synopsis:
% [shapes dhdrq4,dhdsq4]=feisoq4(rvalue,svalue)
%
% Variable Description:
% shapeqd - shape functions for four-node element
% dhdra4 - derivatives of the shape functions w.r.t. r
% dhdsqé - derivatives of the shape functions w.r.t. 8
% rvalue - r coordinate value of the selected point
% svalue - s coordinate value of the selected point
%
% Notes:
% Ast node at (-1,-1), 2nd node at (1,1)
% 3rd node at (1,1), 4th node at (-1,1)
%
%
% shape functions
%
shapeq4(1)=0.25*(1-rvalue)*(1-svalue);
shapeq4(2)=0.25*(1+rvalue)*(1-svalue);
shapeq4(3)=0.25*(1-+rvalue)*(1-+svalue);
shapeq4(4)=0.25*(1-rvalue)*(1+svalue);
%
% derivatives
%
dhdrq4(1)=-0.25*(1-svalue);
dhdrq4(2)=0.25*(1-svalue);
dhdrq4(3)=0.25*(14svalue);
dhdrq4(4)=-0.25*(1+svalue);
%
dhdsq4(1)=-0.25*(1-rvalue);
.25*(14rvalue);
dhdsq4(3)=0.25¢(1+rvalue);
dhdsq4(4)=0.25*(1-rvalue);
%
%—
% Purpose:Section 6.6 MATLAB Application to Laplace Equation. 187
% determine the Jacobian for two-dimensional mapping
%
% Synopsis:
% [jacob2]=fejacob2(nnel,dhdr,dhds,xcoord,ycoord)
%
% Variable Description:
% jacob2 - Jacobian for one-dimension
% nnel - number of nodes per element
% dhdr - derivative of shape functions w.r.t. natural coordinate r
% dhds - derivative of shape functions w.r.t. natural coordinate s
% xcoord - x axis coordinate values of nodes
% ycoord - y axis coordinate values of nodes
%—
%
jacob2=zeros(2,2);
jacob2(1,1)+dhdr(i)*xcoord(i);
jacob2(1,2)+dhdr(i)*ycoord(i);
jacob2(2,1)+dhds(i)*xcoord(i);
The computed element matrix is
0.7500 0.0000 + —0.2500 —0.5000
0.0000 0.7500 + —0.2500 —0.5000
—0.2500 —0.2500 0.5000 0.0000
—0.5000 -—0.5000 0.0000 1.0000
[K]= (6.6.2)
& Example 6.6.2 Repeat Example 5.9.2 using isoparametric elements.
Four-node quadrilateral elements are used. The finite element solution is the
same as that obtained in Example 5.9.2. As a result, the solution is not repeated
here. The MATLAB program is shown below.
% Example 6.6.2
% to solve the two-dimensional Laplace’s equation given as
% w,xx + wyy =0,0 node no. and j-> x or y
%Section 6.6 MATLAB Application to Laplace Equation 189
gcoord(7,1)=1.25; gcoord(7,2)=2.5;
gcoord(8,1)=2.5; gcoord(8,2)=2.5;
gcoord(9,1
gcoord(10,1)=5.0; gcoord(10,2)=2.5;
gcoord(11,1)=0.0; gcoord(11,2)=5.0;
gcoord(12,1)=1.25; gcoord(12,2)=5.0;
gcoord(13,1)=2.5; gcoord(13,2)=8.0;
gcoord(14,1)=3.75; gcoord(14,2)
gcoord(15,1)=5.0; gcoord(15,2)=5.0;
gcoord(16,1)=0.0; gcoord(16,2)=7.5;
geoord(17,1)=1.25; gcoord(17,2)=7.5;
gcoord(18,1)=2.5; gcoord(18,2)=7.
geoord(19,1)=3.75; gcoord(19,2
gcoord(20,1)=8.0; gcoord(20,2)=7.
gcoord(21,1)=0.0; gcoord(21,2)=I10.
gcoord(22,1)=1.25; gcoord(22,2
gooord(23,1)=2.5; gcoord(23,2)=10.
gcoord(24,1)=3.75; gcoord(24,2)=10.;
gcoord(25,1)=5.0; gcoord(25,2)=10.;
%
cece
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no. and j-> connected nodes
%¥
nodes(1,1)=1; nodes(1,2)=2; nodes(1,3)=7; nodes(1,4)=6;
nodes(2,1)=2; nodes(2,2)=3; nodes(2,3)=8; nodes(2,4):
nodes(3,1)=3; nodes(3,2)=4; nodes(3,3)=9; nodes(3,4)=8;
nodes(4,1)=4; nodes(4,2)=5; nodes(4,3)=10; nodes(4,4)=9;
nodes(5,1)=6; nodes(5,2)=7; nodes(5,3)=12; nodes(5,4)
nodes(6,1)=7; nodes(6,2)=8; nodes(6,3)=13; nodes(6,4)
nodes(8,1)=9; nodes(8,2)=10; nodes(8,3)=15; nodes(8,4)=!
nodes(9,1)=11; nodes(9,2)=12; nodes(9,3)
nodes(10,1)
nodes(11,1 19; nodes(11,4)=18;
nodes(12,1 0; nodes( 12,4}
nodes(13,1 22; nodes(13,4)=21;
nodes(14,1 3; nodes(14,4)=22;
nodes(15,1)=18; nodes(15,2)=19; nodes(15,3)=24; nodes(15,4)=23;
nodes(16,1)=19; nodes(16,2)=20; nodes(16,3)=25; nodes(16,4)=24;
%
EE
% input data for boundary conditions
(ee
%
bedof(1)=1; % first node is constrained
% whose described value is 0
% second node is constrained190
Isoparametric Elements Chapter 6
beval(2) % whose described value is 0
bedof(3)=: % third node is constrained
% whose described value is 0
% 4th node is constrained
‘% whose described value is 0
% 5th node is constrained
% whose described value is 0
bedof(6)=6; % 6th node is constrained
% whose described value is 0
% 11th node is constrained
beval(7)=0; % whose described value is 0
bedof(8)=16; % 16th node is constrained
beval(8)=0; % whose described value is 0
bedof(9)=21; % 21st node is constrained
% whose described value is 0
% 22nd node is constrained
% whose described value is 38.2683
% 2rd node is constrained
% whose described value is 70.7107
% 24th node is constrained
% whose described value is 92.3880
% 25th node is constrained
beval(13)=100; % whose described value is 100
%
————————————
% initialization of matrices and vectors
beval(9):
a
ff=zeros(sdof,1); % initialization of system force vector
kk=zeros(sdof,sdof); % initialization of system matrix
index=zeros(nnel*ndof,1); % initialization of index vector
%
> —$— $$
% \oop for computation and assembly of element matrices
%— ee
[point2,weight2]=feglqd2(nglx,ngly); % sampling points & weights
%
for iel=1:nel % loop for the total number of elements
%
for i=1:nnel
nd(i)=nodes(iel,i); % extract connected node for (iel)-th element
xcoord(i)=gcoord(nd(i),1); % extract x value of the node
ycoord(i)=gcoord(nd(i),2); % extract y value of the node
end
%
k=zeros(edof,edof); ialization of element matrix to zero
%
%—
% numerical integrationSection 6.6 MATLAB Application to Laplace Equation 191
%——_—.
for intx=1:nglx
x=point2(intx,1); % sampling point in x-axis
wtx=weight2(intx,1); % weight in x-axis
for inty=l:ngly
y=point2(inty,2); % sampling point in y-axis
wty=weight2(inty,2) ; % weight in y-axis
%
[shape,dhdr,dhds]=feisoq4(x,y); % compute shape functions and
% derivatives at sampling point
%
jacob2=fejacob2(nnel,dhdr,dhds,xcoord,ycoord); % compute Jacobian
%
detjacob=det (jacob2); % determinant of Jacobian
invjacob=inv(jacob2); % inverse of Jacobian matrix
%
[dhdx,dhdy]=federiv2(nnel,dhdr,dhds,invjacob); % derivatives w.r.t.
% physical coordinate
%
——
% compute element matrix
k(i,j)=k(ij) + (dhdx (i)*dhdx(j) +dhdy (i)*dhdy(j))*wtx*wty*detjacob;
end
end
%
end
end % end of numerical integration loop
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
%— a
% assemble element matrices
————_—
%
kk=feasmblI (kk,k,index);
%
end %
%—
% apply boundary conditions
%—__—_—____—
[kk, ff] =feaplyc2 (Kk, ff, bcdof, beval);
%
G————$_—_—_—___—_—
% solve the matrix equation
%—192
Isoparametric Elements
fsol=Kk\ ft;
%
ae
% analytical solution
%
for i=I:node
x=gcoord(i,1); y=gcoord (1,2);
esol(i)=100*sinh(0.31415927*y)*sin(0.31415927*x) /sinh(3.1415927);
end
%
G3 —_-
% print both exact and fem solutions
Chapter 66.1
6.2
6.3
6.4
6.5
6.6
6.7
68
Problems 193
Problems
Compute the following integral using the quadratic isoparametric element:
b= [BY sw
The shape functions are given in Eqs (6.1.13) through (6.1.15) and the element
has nodes z;=2, z2=4, and 23=6 in the physical coordinate system,
Consider one-dimensional isoparametric shape functions as given in Eqs (6.1.13)
through (6.1.15). The isoparametric element is mapped into a physical domain
with nodal points located at 2; = 0, z2 =a, and zy = 4, where a = 1.5, a= 1,
or a= 0.5. Compute the Jacobian J and its inverse for these cases.
Compute the Jacobian matrix for the following bilinear element shown in Fig.
P6.3 and evaluate
Oth Oy , Oth 2)
wan [Bee de * ay Oy)
Using the isoparametric element and 3 by 3 Gauss-Legendre quadrature. The
shape functions are provided in Eqs (6.2.1) through (6.2.4).
For the linear triangular isoparametric element shown in Fig. P6.4, (a) compute
the Jacobian matrix and (b) find 9 in which H; is given in Eq. (6.3.1).
Evaluate the Jacobian matrix for the four-node element shown in Fig. P6.5
using the bilinear isoparametric element.
Gauss-Legendre quadrature rule is used to evaluate the integral
|
ff e@naste miata
in which H, and Hz are quadratic shape functions of € and 9, respectively.
What order of integration is necessary for exact integration of the integral if the
element has no distortion (i.e. a rectangular shape of element in the physical
domain)?
‘Two different isoparametric elements are used together as shown in Fig. P6.7.
There is an interelement boundary between (z,y)=(1,1) and (z, y)=(2,2). Show
that variable is continuous across the interface boundary. In other words,
variable interpolation from the quadrilateral element is the same as that from
the triangular element at the interface.
Consider two elements shown in Fig. P6.7 again. For the elements, we use the
following interpolation for each element. For the triangular element, we use
= ao +aiz tay194 Isoparametric Elements
Figure P6.3 Problem 6.3
eA)
(42)
a
Figure P6.4 Problem 6.4
and for the quadrilateral element we use
usb +bzt boy tbsry
Is u compatible at the element interface of the two elements?
Chapter 6
6.9 Two kinds of quadrilateral isoparametric elements are utilized together to mesh
a domain as seen in Fig. P6.9. One is a bilinear element and the other is a
biquadratic element. Is it compatible between the element interface?
6.10 Solve Prob. 5.11 using isoparametric elements and computer programs provided
in this chapter.
6.11 Solve Prob. 5.12 using isoparametric elements and MATLAB programs.Figure P6.5
Figure P6.7
Problems
_
45,2) (25,2)
a e,)
Ls
Problem 6.5
<<
(2,2)
ay
x
Problem 6.7
Figure P6.9 Problem 6.9
195CHAPTER SEVEN
TRUSS STRUCTURES
7.1 One-Dimensional Truss
‘The one-dimensional truss is also called a rod or an axial bar which was described
in Chapter 4. The governing equation to describe the motion of rod is derived below.
Let E, A and p indicate the elastic modulus, cross-sectional area and density of the
rod, respectively. Applying Newton’s second law to the free body diagram shown in
Fig. 7.1.1 gives
au ap
pAds ay = (e+ a) -P (7.1.1)
where u is the axial displacement along the rod direction, and z and ¢ are the spatial
and temporal axes, respectively. Hooke’s law states
P
qa (7.1.2)
The strain-displacement relation is
Ou
cae (7.1.3)
Substituting Eq. (7.1.3) into Eq. (7.1.2) and the result into (7.1.1) yields
ae
Ga a ou
pAaea = £ (s0%) (7.1.4)
In Eq. (7.1.4), p, A and E may vary as a function of z.
‘The weak formulation for Eq. (7.1.4) is
- eu Ow du dul”
I =[ (raw? + ABS ae - [sewgel (7.1.5)
197198 ‘Truss Structures Chapter 7
Figure 7.1.1 Free Body Diagram for Axial Member
in which w is the test function. The first term is the inertia term and the second term
is the stiffness term. Discretization of the domain into a number of elements breaks
the global integral in Eq. (7.1.5) into element integrals over the element domains.
Use of Galerkin’s method and linear shape functions for a rod element whose
length is I results in the following stiffness matrix:
1 aH,
wel= [ae {ge} Mae (73.6)
b
for the element nodal degrees of freedom {u; ug} as shown in Fig. 7.1.2. Superscript
e denotes element. Here H; is the linear shape function which is
(7.1.2)
Hy = ; (7.1.8)
Substitution of these shape functions into Eq. (7.1.6) results in the element stiffness
matrix for rod.
[x]
AE[1 -1
mi 4 l (7.1.9)
This is the same as given in Chapter 4.
‘The element mass matrix for rod is obtained from the first term in Eq. (7.1.5)
using the linear shape functions.
[Me] oe [; al (7.1.10)
for the constant density and cross-sectional area. This is called the consistent mass
matrix for rod. The lumped mass matrix is
pal (0 ‘| (7.1.11)
¢
MI="F lo 1
This is obtained by lumping the distributed mass within the element into the
concentrated masses at the two nodal points as seen in Fig. 7.1.3.Section 7.2 Plane Truss 199
Figure 7.1.2 Two-Node Axial Bar
PA
LLLILLLILLLLLLLL
PAL PAL
S 4
Figure 7.1.3 Equivalent Spring-Mass System
7.2 Plane Truss
‘The truss is a structure which consists of axial members connected by pin joints.
Therefore, each member of the truss structure supports the external load through its
axial force and it does not undergo the bending deformation. The stiffness matrix for
a truss member shown in Fig. 7.2.1 is given in Eq. (7.1.9). However, the matrix size
becomes 4x 4 because the nodal degrees of freedom of the truss element are expressed
as
{d°}={ur v1 uz v2)" (7.2.1)
Here superscript e denotes the element level. The corresponding stiffness matrix is
k 0 -k 0
0000
[l=], 9 bo (7.2.2)
0000
in which
ri 4? (7.2.3)
For a uniform member, A and E are the area of the cross-section and the elastic
modulus, respectively. In addition, I is the length of the member. The second
and fourth columns and rows of the stiffness matrix associated with the transverse
displacement v are null since the truss member has axial deformation only.
The plane truss structure consists of axial members in different orientations. For
example, Fig. 7.2.2 shows that members a, b and c lie in three different directions.
In order to assemble the stiffness matrices related to these truss members, we need200 ‘Truss Structures Chapter 7
y |
AE "
Ue
p—___L________
Figure 7.2.1 Two-Dimensional Truss Element
Figure 7.2.2. Triangular Truss
to have the element degrees of freedom given in terms of the common reference axes.
In other words, the element nodal displacements are expressed in terms of the fixed
global coordinate system.
Figure 7.2.3 shows a plane truss element oriented in an arbitrary angle 2 with
respect to the horizontal axis 2. The figure shows two sets of nodal displacements.
One set has nodal displacements along and perpendicular to the element axis (i.e. u
and v) while the other set has the displacements in terms of the global reference axes
(ie. & and 0). Because the element stiffness matrix Eq. (7.2.2) is expressed in terms
of u and v, it should be transformed such that the stiffness matrix is expressed in
terms of & and 0.
To the end, we find the relationship between zy- and 29-coordinate systems.
This relationship is called the coordinate transformation and the same relationship
holds for the two sets of nodal displacements (i.e. u, v and i, 3). The relationship is
uy ¢ 8 0 07 (mH
ile jes e 0 Ol) a
ee (1.2.4)
v2 0 0 -s ¢ ta
where ¢ = cosf and s = sin@. Let us rewrite Eq. (7.2.4) as
{d°} = (THa"} (7.2.5)Section 7.2 Plane Truss 201
Figure 7.2.3 Generalized Two-Dimensional Truss Element
To transform the element stiffness matrix from the zy-coordinate system to
Zy-coordinate system, consider the concept of strain energy. The strain energy is
expressed as
v= hati} (728)
in terms of the zy-coordinate system. If we substitute Eq. (7.2.5) into Eq. (7.26),
we obtain :
u = hey ore) (722)
‘The strain energy is now expressed in terms of the #j-coordinate system.
Lyceytecer cz
U= Haye} (7.2.8)
in which [K¢] is the transformed element stiffness matrix in terms of the 24-coordinate
system. The strain energy in Eq. (7.2.8) should be the same as that in Eq. (7.2.7)
because strain energy is independent of the coordinate system. Equating Eq. (7.2.7)
to Eq. (7.2.8) shows that
(R= I (7.29)
Substitution of Eqs (7.2.2) and (7.2.4) into Eq. (7.2.9) results in the transformed
stiffness matrix
food cs —c? -cs
ze) AE} cs 5? ~cs —s?
lege) 3
—c8 3? cs 8?
(2.7.10)
for the nodal degrees of freedom
{a 0, t 2} (7.2.11)
This element stiffness matrix can be assembled into the global matrix as usual for the
shared nodal points.202
write
‘Truss Structures
Example 7.2.1
Chapter 7
Let us compute element stiffness matrices for the truss
structure shown in Fig. 7.2.2. The structure has three elements (a, b and c)
and three nodes (1, 2 and 3). Let each truss member have the same material
and geometric properties. In the following derivation, the superimposed (") is
omitted for simplicity
Member a: Let i=1 and j=:
The element stiffness matrix is
AE
{k= 4
oocco
Member b: Let i=2 and j=3. Then @ =
s =sin B=“. The element stiffness matrix is
0.250 -0.433
AE | -0.433 0.750
a io
{R= —F | 9.250 0.433
0.433 -0.750
Member c: Let i=1 and j=3, Then 8
8
0.250
AE | 0.433
ey 2
{Ky = tT | -0.250
—0.433
sin 8=%8. The element stiffness matrix is
0.433
0.750
—0.433
. Then 8=0 so that c = cos #=0 and s = sin 8=0.
(7.2.12)
oro
coco
35 so that ¢ = cosf=-0.5 and
—0.250 0,433
0.433 —0.750
0.250 ~0.433 (72.13)
—0.433 0.750
= £ so that ¢ = cos§=0.5 and
0.250 -0.433
0.433 0.750
0.250 0.433 (7.2.14)
0.750 0.433 0.750
The element mass matrix for the plane truss member can be calculated using
the same coordinate transformation. Using the kinetic energy expression, as similar
to the strain energy expression for derivation of the element stiffness matrix, we can
(M°] = ("MIT
(7.2.15)
Carrying out this matrix multiplication using the consistent mass matrix gives
2c? 2s
6
PAL | 2cs
¢
cs
2s?
cs
2
2
es
2
css
a (7.2.16)
2cs 2s?Section 7.3 Space Truss 203
The lumped mass matrix can be obtained similarly and shown below:
2 ce 0 0
pAl|cs 8? 0 0
OF 0) 0 ce ce
00 ca a2
(M‘] = (7.2.17)
7.3 Space Truss
Development of the element stiffness matrix for the space truss member is similar
to that for the plane truss member. The element stiffness matrix in terms of the global
Cartesian coordinate system is obtained in the same way as given in Eq. (7.2.9).
However, the sizes of both the transformation matrix and the element stiffness matrix
in terms of the body coordinate system are 6x6 for the space truss member. Here, the
body coordinate system denotes the coordinate system one of whose axes lies along
the member direction. The stiffness matrix in terms of the body coordinate system is
-1
1
0
AE| 0
7-—
od
(7.3.1)
eoocoo
eoooce
coHnoo
ooooce
ccococe]
0
0
for the nodal degrees of freedom of
{a }={u v1 wi tu v2 wa} (7.3.2)
where u is the displacement along the z-axis as shown in Fig. 7.3.1.
The transformation matrix between the two coordinate systems is given below:
fo G0 0 0
re
old
(Nelo 0 0 a a 6 (73.3)
0 0 0 m m ns
60 0 a a G
where {1 m 1} is the direction cosines of Z-axis with respect to zyz-coordinate
system. Similarly, {€2 nz ¢2} and {€3 m3 Ca} are the direction cosines of g- and
Z-axis with respect to zyz-coordinate system, respectively. Conducting the matrix
manipulation yields
G && fb - hbo —bks
a(S 8 o8 “Be 8 ap
rey — 13 &aks “hfs —S2bs —&3
Pee ee fel ee cen Ge (734)
-a@ -¢ -66 && @ 66
-i& -66 -@ 4& &&204 ‘Truss Structures Chapter 7
Figure 7.3.1 Generalized Three-Dimensional Truss Element
The corresponding clement degrees of freedom are
{#}={th t th i t we} (7.3.5)
‘The consistent mass matrix for the space truss element is
27 ib Wk EF fb ffs
Miko 26 Mobs bbe GF babs
PAL | 215 rls 265 ibs baka 3
6 | & Ges Eile 2? sky riko ee
aids Geka ee 28F Uae
fla Gals GE res 268
while the lumped mass matrix is
@& && 4 0 0 0
lie Bop oo 8
a eAl|éé Gf @ 0 0 0
MI="S]"o 0 0 ike ids (73.7)
0 0 0 && & &2f3
0 0 0 ce bee
7.4 MATLAB Application to Static Analysis
The static analysis of a truss structure is to solve the following matrix equation:
[K]{a} = {F} (7.4.1)
where the system stiffness matrix [K] and the system force vector {F} are obtained
by assembling each element: matrix and vector. This section shows some examples of
MATLAB programs and m-files for static analyses of tao-dimensional ttiiss structures.Section 7.4 MATLAB Application to Static Analysis 205
@ azo.sint B=30x10" pet
@ 4=0.4int
E=30x10° psi
1000 w&
Figure 7.4.1 Truss With Two Axial Members
4 Example 7.4.1 Figure 7.4.1 shows a simple truss structure made of
two members. Each member has elastic modulus of E=30x 10° psi and cross-
sectional areas are A=0.4 in? and A2=0.5 in? where subscript indicates the
element number as shown in the figure. A 1000 Ib force is applied at the tip in
the downward direction. Find the displacements and stresses of members. The
MATLAB program and m-files are provided below.
%—
% Example 7.4.1
% to solve static 2-D truss structure
%
% Problem description
% Find the deflection and stress of the truss made of two members
% as shown in Fig. 7.4.1.
%
% Variable descriptions
% k = element stiffness matrix
% kk = system stiffness matrix
% ff = system force vector
% index = a vector containing system dofs associated with each element
% gcoord = global coordinate matrix
% disp = nodal displacement vector
% elforce = element force vector
% eldis) element nodal displacement
% stress = stress vector for every element
% elprop = element property matrix
% nodes = nodal connectivity matrix for each element
a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
% the dofs in bedof
%-206
‘Truss Structures Chapter 7
%
eects!
% control input data
% number of elements
% number of nodes per element
% number of dofs per node
% total number of nodes in system
sdof=nnode*ndof; % total system dofs
%
6
% nodal coordinates
%—
% x, y-coordinate of node 1
% x, y-coordinate of node 2
gcoord(3,1)=0.0; gcoord(3,2)=10.0; % x, y-coordinate of node 3
%
———
% material and geometric properties
SS
elprop(1,1)=30000000; % elastic modulus of Ist element
elprop(1,2)=0.4; % cross-section of Ist element
elprop(2,1)=30000000; % elastic modulus of 2nd element
elprop(2,2)=0.5; % cross-section of 2nd element
%
%
% nodal connectivity
% nodes associated with element 1
% nodes associated with element 2
% Ast dof (horizontal displ) is constrained
% whose described value is 0
% 2nd dof (vertical displ) is constrained
% whose described value is 0
% Sth dof (horizontal displ) is constrained
% whose described value is 0
% 6th dof (vertical displ) is constrained
% whose described value is 0
% initialization to zero
%&————___—_———__—
ff=zeros(sdof,1); % system force vector
kk=zeros(sdof,sdof); % system stiffness matrixSection 7.4 MATLAB Application to Static Analysis
index=zeros(nnel*ndof,1); % index vector
elforce=zeros(nnel*ndof,1); % element force vector
eldisp=zeros(nnel*ndof,1); % element nodal displacement vector
k=zeros(nnel*ndof,nnel*ndof); % element stiffness matrix
stress=zeros(nel,1); % stress vector for every element
%
%—_______—_-
% applied nodal force
%—__—_____—.
ff(4)=-1000; % 2nd node has 1000 Ib in downward direction
%
a
% loop for elements
%—_________—
for iel=1:nel % loop for the total number of elements
%
nd(1)=nodes(iel,1); % Ast connected node for the (iel)-th element
nd(2)=nodes(iel,2); % 2nd connected node for the (iel)-th element
%
xl=gcoord(nd(1),1); yl=gcoord(nd(1),2); % coordinate of ist node
x2=gcoord(nd(2),1); y2=gcoord(nd(2),2); % coordinate of 2nd node
%
leng=sqrt((x2-x1)*2+(y2-y1)*2); % element length
%
if (x2-x1)==0;
beta=2*atan(1); % angle between local and global axes
else
beta=atan((y2-y1)/(x2-x1));
% extract elastic modulus
aren=elprop( el; 2); % extract cross-sectional area
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
k=fetruss2(el,Jeng,area,0,beta,1); % compute element matrix
%
kk=feasmbl1 (kk,k,index); % assemble into system matrix
%
end
%
%——_—___—__—-
% apply constraints and solve the matrix
Cena canna
[kk,ff]=feaplyc2(kk,ff,bedof, beval); % apply boundary conditions
%
disp=kk\ff; % solve matrix equation for nodal displacements
%
207208
Truss Structures
%—_—_____——
% post computation for stress calculation
for iel=1:nel
%
nd(1)=nodes(iel,1);
nd(2)=nodes(iel,2);
%
x1=gcoord(nd(1),1); yl=gcoord(nd(1),2);
coord (nd(2),1); y2=gcoord(nd(2),2);
%
leng=sqrt((x2-x1)"2+(y2-y1)"2);
%
if (x2-x1)==0;
beta=2*atan(1);
else
beta=atan((y2-y1)/(x2-x1));
end
%
el=elprop(iel,1);
area=elprop(iel,2);
%
index=feeldof(nd,nnel,ndof);
%
k=fetruss2(el,leng,area,0,beta,1);
%
for nel*ndof)
eldisp(i)=disp(index(i));
end
%
elforce=k*eldisp;
stress(iel)=sqrt(elforce(1)3-+elforce(2)2)/area;
%
if ((x2-x1)*elforce(3)) < 0;
stress(iel)=-stress(iel);
end
%
end
%
—
% print fem solutions
(ee
of;
displ=[num’ disp]
%
numm=!
nel;
stresses=[numm’ stress]
%
Chapter 7
% loop for the total number of elements
% Ast connected node for the (iel)-th element
% 2nd connected node for the (iel)-th element
% coordinate of 1st node
% coordinate of 2nd node
% element length
% angle between local and global axes
% extract elastic modulus
% extract cross-sectional area
% extract system dofs for the element
% compute element matrix
% extract displacements associated with
% (iel)-th element
% element force vector
% stress
% check if tension or compression
% print displacements
% print stressesSection 7.4 MATLAB Application to Static Analysis 209
%—
function {k,m]=fetruss2(el,leng,area,tho, beta,ipt)
%
% Purpose:
% Stiffness and mass matrices for the 2-D truss element
% nodal dof { wl v-1u.2 v.2}
%
% Synopsis:
% (k,m]=fetruss2(cl,leng,area,tho,beta,ipt)
%
% Variable Description:
% k - clement stiffness matrix (size of 4x4)
% m - element mass matrix (size of 4x4)
% el - elastic modulus
% Jeng - element length
% area - area of truss cross-section
% tho - mass density (mass per unit volume)
% beta - angle between the local and global axes
% Positive if local axis is in cew direction from
% the global axis
% ipt = 1 - consistent mass matrix
% ipt = 2 - lumped mass matrix
%
%
% stiffness matrix
%
c=cos(beta); s=sin(beta);
k= (area*el/leng)*[ ctc cts
-s s*s
-cte -cts
acts -sts
%
% consistent mass matrix
%
if ipt==1
%
m=(rho*area*leng/6)*[2 01
07 2) 0
10 2
0 1 0
%
% lumped mass matrix
%
else
%210 ‘Truss Structures Chapter 7
%
end
%
%
‘The results from the finite element analysis are given below. The minus sign in
the stress indicates compressive stress.
displ =
dofs displacement
1.0000 0.0000 % horizontal displ. of node 1
2.0000 0.0000 % vertical displ. of node 1
3.0000 -0.0008 % horizontal displ. of node 2
4.0000 -0.0027 % vertical displ. of node 2
5.0000 0.0000 % horizontal displ. of node 3
6.0000 0.0000 % vertical displ. of node 3
stresses =
element stress.
1.00000 -2500. % compressive stress for element 1
2.00000 2828. % tensile stress for element 2
4 Example 7.4.2 Find the stresses of the truss structure shown in Fig.
7.4.2. All members have elastic modulus of 200 GPa and cross-sectional area of
2.5 x 10-3 m?.Section 7.4 MATLAB Application to Static Analysis 211
%-
% Example 7.4.2
% to solve static 2-D truss structure
%
% Problem description
% Find the deflection and stress of the truss made of two members
% as shown in Fig. 7.4.2.
%
% Variable descriptions
% k = element stiffness matrix
% kk = system stiffness matrix
% ff = system force vector
% index = a vector containing system dofs associated with each element
% gcoord = global coordinate matrix
% disp = nodal displacement vector
% elforce = element force vector
% eldisp = clement nodal displacement
% stress = stress vector for every element
% prop = material and geometric property matrix
% nodes = nodal connectivity matrix for each element
% bedof = a vector containing dofs associated with boundary conditions
vector containing boundary condition values associated with
% the dofs in bedof
% number of elements
% number of nodes per element
% number of dofs per node
nnode=6; % total number of nodes in system
sdof=nnode*ndof; % total system dofs
%
%—
% nodal coordinates
%
gcoord(1,,
gcoord(2,.
gcoord(3,1
gcoord(4,,
gcoord (5,
gcoord(6,
%
%— ee
% material and geometric properties
———
prop(1)=200e9; % elastic modulus212
‘Truss Structures Chapter 7
prop(2)=0.0025; % cross-sectional area
%
a
% nodal connectivity
nodes(4,1)=2;
nodes(5,1)=3; nodes(5,2)
nodes(6,1)=3; nodes(6,2)=!
nodes(7,1)=4; nodes(7,2):
nodes(8,1)=4; nodes(8,2):
nodes(9,1)=5; nodes(9,2):
%
%— _—_____—.
% applied constraints
——
bedof(1): % Ast dof (horizontal displ) is constrained
beval(1) % whose described value is 0
bedof(2): % 2nd dof (vertical displ) is constrained
beval(2)=0; % whose described value is 0
bedof(3)=12; % 12th dof (vertical displ) is constrained
beval(3)=0; % whose described value is 0
%
oe
% initialization to zero
oe Ss
ff=zeros(sdof,1); % system force vector
kk=zeros(sdof,sdof); % system stiffness matrix
index=zeros(nnel*ndof,1); % index vector
elforce=zeros(nnel*ndof,1); % element force vector
eldisp=zeros(nnel*ndof,1); % element nodal displacement vector
k=zeros(nnel*ndof,nnel*ndof); % element stiffness matrix
stress=zeros(nel,1); % stress vector for every element
%—
% applied nodal force
% 4th node has 600 N in downward direction
% 5th node has 200 N in r-h.s. direction
% loop for elements
%—
for iel=1:nel % loop for the total number of elements
%
nd(1)=nodes(iel,1); % Ist connected node for the (iel)-th elementSection 7.4 MATLAB Application to Static Analysis
nd(2)=nodes(iel,2); % 2nd connected node for the (iel)-th element
%
x1=gcoord(nd(1),1); yl=gcoord(nd(1),2); % coordinate of Ist node
x2=gcoord(nd(2),1); y2=gcoord(nd(2),2); % coordinate of 2nd node
%
leng=sqrt((x2-x1)"2+(y2-y1)°2); % element length
%
if (x2x ;
eet, % angle between local and global axes
else
beta=atan((y2-y1)/(x2-x1));
end
%
el=prop(1); % extract elastic modulus
area=prop(2); % extract cross-sectional area
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
k=fetruss2(el,leng,area,0,beta,1); % compute element matrix
%
kk=feasmbl1(kk,k,index); % assemble into system matrix
%
end
%
————
% apply constraints and solve the matrix
[kk,ft]=feaplyc2(kk,ff, bedof, bcval); % apply boundary conditions
%
disp=kk\ ff; % solve matrix equation to find nodal displacements
%
%
% post computation for stress calculation
6——— $$ $$$ __________
%
for iel=1:nel % loop for the total number of elements
%
nd(1)=nodes(iel,1); % Ast connected node for the (iel)-th element
nd(2)=nodes(iel,2); % 2nd connected node for the (iel)-th element
%
x1=geoord(nd(1),1); yl=gcoord(nd(1),2); % coordinate of Ist node
x2=gcoord(nd(2),1); y2=gcoord(nd(2),2); % coordinate of 2nd node
%
leng=sqrt((x2-x1)"2+(y2-y1)°2); % element length
%
if (x2-x1
ect, % angle between local and global axes
else
213214
Truss Structures
beta=atan((y2-y1)/(x2-x1));
end
%
Chapter 7
el=prop(1); % extract elastic modulus
area=prop(2); % extract cross-sectional area
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
k=fetruss2(el,Jeng,area,0,beta,1); % compute element matrix
%
for
eldisp(i
end
%
(nnel*ndof) ‘% extract displacements associated with
isp(index(i)); % (iel)-th element
elforce=k*eldisp; % element force vector
stress(iel)=sqrt(clforce(1)2+elforce(2)3)/area;
%
% stress
if ((x2-x1)*elforce(3)) < 0; % check if tension or compression
stress(iel)=-stress(iel);
end
%
end
%
%—
% print fem solutions
The nodal displacements and stresses of members are shown below.
displ =
dofs displacement
1.0000 0.0000e-0
2.0000 0.0000e-5
3.0000 0.3200e-5
4.0000 -1.5700e-5
5.0000 0.8650e-5
6.0000 —-1.5700e-5
7.0000 0,6400e-5
8.0000 —--2.2867e-5
9.0000 0,5450e-5
10.000 -2.0167e-5
% print displacements
% print stressesSection 7.5
0
MATLAB Application to Eigenvalue Analysis
ee @
set'ne — B=2006Pa
i. p=7860kg/m
Figure 7.5.1 Finite Element Discretization
11.000 1.1200e-5
12.000 ——-0.0000e-5
stresses =
element stress
1.0000 160000
2.0000 100000
3.0000 000000
4.0000 160000
5.0001 100000
6.0001 -160000
7.0001 180000
8.0001 240000
9.0001 — -300000
215
7.5 MATLAB Application to Eigenvalue Analysis
Once the system mass and stiffnes matrices are computed for the truss structure,
the matrix equation becomes
[M]{i} + [A]{u} = 0 (75.1)
In order to compute natural frequencies of the structure, we assume a harmonic motion
for the displacement. The resultant equation is the eigenvalue problem given as
([K] ~ w?[M]){a} = 0 (7.5.2)
where w is the circular natural frequency and {i} is the vector for mode shape.
4 Example 7.5.1 Determine the natural frequency of a free bar using the
finite element method. The bar is shown in Fig. 7.5.1 and it has elastic modulus
of 200 GPa, cross-sectional area of 0.001 m?, and density of 7860 Kg/m°.216
‘Truss Structures Chapter 7
%
% Example 7.5.1
% to solve natural frequency of 1-D bar structure
%
% Problem description
% Find the natural frequency of a bar structure
% as shown in Fig. 7.5.1.
%
% Variable descriptions
% k = element stiffness matrix
% m = element mass matrix
% kk = system stiffness matrix
% mm = system mass vector
% index = a vector containing system dofs associated with each element
% gcoord = global coordinate matrix
% prop = element property matrix
% nodes = nodal connectivity matrix for each element
% bedof = a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
% the dofs in bedof
% number of elements
% number of nodes per element
% number of dofs per node
% total number of nodes in system
sdof=nnode*ndof; % total system dofs
%
————————_—_————
% nodal coordinates
%—
gcoord(1,1
geoord(2,1)=1.
gcoord(3,1)=2.0;
gcoord(4,1)=3.
gcoord(5,1)=4.0;
%
%
% material and geometric properties
——
prop(1)=200e9; % elastic modulus
% cross-sectional area
% densitySection 7.5
% nodal connectivity
%e
nodes(1,1)=1; nodes(1,2):
nodes(2,1)=2; nodes(2,2)=3;
nodes(3,1)=3; nodes(3,2)
nodes(4,1)=4; nodes(4,2)
%
%
% initialization to zero
%—
kk=zeros(sdof,sdof);
mm=zeros(sdof,sdof);
index=zeros(nnel*ndof,1);
%
%—
% loop for elements
%—
MATLAB Application to Eigenvalue Analysis
% system stiffness matrix
% system mass matrix
% index vector
for iel=1:nel % loop for the total number of elements
%
nd(1)=nodes(iel,1);
nd(2)=nodes(iel,2);
% Ast connected node for the (iel)-th element
% 2nd connected node for the (iel)-th element
Teng=(x2-x1);
% coordinate of 1st node
% coordinate of 2nd node
% element length
%
el=prop(1); % extract elastic modulus
area=prop(2); % extract cross-sectional area
tho=prop(3); % extract mass density
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
ipt=1; % flag for consistent mass matrix
[k,m]=fetruss1 (el,leng,area,tho,ipt);
%
Kk=feasmbl1(kk,k,index);
mm=feasmbl1 (mm,m,index);
%
end
%
es
% solve for eigenvalues
ee
faol=cig(Ikk,mm
faol=sqrt(fsol);
%
%
% element matrix
% assemble system stiffness matrix
% assemble system mass matrix
217218
‘Truss Structures Chapter 7
% print fem solutions
ae
num=l:1:sdof;
freqcy=[num’ fsol] % print natural frequency
%
%
function [k,m]=fetruss1 (el,leng,area,rho,ipt)
% Purpose:
% Stiffness and mass matrices for the 1-D truss element
% nodal dof { u-1 u-2 }
%
% Synopsis:
% (k,m]=fetruss1 (el,leng,area,tho,ipt)
%
% Variable Description:
% k - element stiffness matrix (size of 4x4)
% m - element mass matrix (size of 4x4)
% el - elastic modulus
% leng - element length
% area - area of truss cross-section
% cho - mass density (mass per unit volume)
% ipt = 1 - consistent mass matrix
% ipt = 2 - lumped mass matrix
%e
%
% stiffness matrix
%
k= (area*el/leng)*[ 1
ok
%
% consistent mass matrix
%
if ipt:
%
m=(rho*area*leng/6)*[ 2
1
2};
%
% lumped mass matrix
%
else
%
m=(rho*area*leng/2)*[ 1
0
%
endSection 7.5 MATLAB Application to Eigenvalue Analysis 219
%
%
The natural frequencies are computed from the finite clement analysis and
compared to the exact solution.
freqcy =
mode nat. freq.
1.00 0.0000 % exact 0.0000
2.00 4060.0 % exact 3962.0
3.00 8737.0 % exact 7924.0
4.00 14198. % exact 11895.
5.00 17474. % exact 15847,
# Example 7.5.2 We want to find the natural frequency of the truss
structure shown in Fig. 7.4.2. Each member has density of 7860 Kg/m°.
——————
% Example 7.5.2
% to solve natural frequency of 2-D truss structure
%
% Problem description
% Find the natural frequency of a truss structure
% as shown in Fig. 7.4.2.
%
% Variable descriptions
% k = element stiffness matrix
% m = element mass matrix
% kk = system stiffness matrix
% mm = system mass vector
% index = a vector containing system dofs associated with each element
% gcoord = global coordinate matrix
% prop = element property matrix
% nodes = nodal connectivity matrix for each element
% bedof = a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
% the dofs in *bcdof”
%
%
a
% control input data
% number of elements
% number of nodes per element
% number of dofs per node220
‘Truss Structures Chapter 7
mnode=6; % total number of nodes in system
sdof=nnode*ndof, % total system dofs
%
a
% nodal coordinates
gcoord(5,1)=8.0; gcoord(5,2)=3.0;
gcoord(6,1)=12.; gcoord (6,2):
%
%— —————
% material and geometric properties
K-——_ ——_—
prop(1)=200e9; % elastic modulus
prop(2)=0.0025; % cross-sectional area
prop(3)=7860; % density
%
—
% nodal connectivity
nodes(2,1)=1; nodes(2,2)=:
nodes(9,1)=5; nodes(9,2)=
%
%—
% applied constraints
% Ast dof (horizontal displ) is constrained
% whose described value is 0
% 2nd dof (vertical displ) is constrained
% whose described value is 0
% 12th dof (vertical displ) is constrained
% whose described value is 0
% initialization to zero
%— a
kk=zeros(sdof,sdof); % system stiffness matrix
mm=zeros(sdof,sdof); % system mass matrixSection 7.5 MATLAB Application to Eigenvalue Analysis
index=zeros(nnel*ndof,1); % index vector
%
———
% loop for elements
%—__—____—
for iel=1:nel % loop for the total number of elements
%
nd(1)=nodes(iel,1); % Ast connected node for the (iel)-th element
nd(2)=nodes(iel,2); % 2nd connected node for the (iel)-th element
%
xl=gcoord(nd(1),1); yl=geoord(nd(1),2); % coordinate of Ist node
x2=gcoord(nd(2),1); y2=gcoord(nd(2),2); % coordinate of 2nd node
%
leng=saqrt((x2-x1)*2+(y2-y1)"2); % element length
%
if (x2-x1)==0;
beta=2*atan(1); % angle between local and global axes
else
beta=atan((y2-y1)/(x2-x1));
end
%
el=prop(1); ‘% extract elastic modulus
area=prop(2); % extract cross-sectional area
tho=prop(3); % extract mass density
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
ip’ % flag for consistent mass matrix
[k,m]=fetruss2(el,leng,area,rho,beta,ipt); % element matrix
%
kk=feasmbl1(kk,k,index); % assemble system stiffness matrix
mm=feasmbl1(mm,m,index); % assemble system mass matrix
%
end
%
Ee
% apply constraints and solve
%&
[kk,mm]=feaplycs(kk,mm,bedof); % apply the boundary conditions
%
fsol=eig(kk,mm);
fsol=sqrt (fsol);
%
%—_——___—_——_——
% print fem solutions
sdof;
freqcy=[num’ fsol] % print natural frequency
221222
Truss Structures
Chapter 7
function [kk,mm]=feaplycs(kk,mm,bcdof)
%—
‘% Purpose:
% Apply constraints to eigenvalue matrix equation
% (kk}x=lambda[mm]x
%
% Synopsis:
% [kk,mm]=feaplycs(kk,mm,bedof)
%
% Variable Description:
% kk - system stiffness matrix before applying constraints
% mm - system mass matrix before applying constraints
% bedof - a vector containing constrained d.o.f
%
‘% Notes:
% This program does not reduce the matrix size depending on
% the number of constraints. Instead the system matrix size
% is preserved regardless of constraints. As a result, the
% matrix obtained after applying the constraints contain fictitious
% zero eigenvalues as many as the number of constraints in
% addition to actual eigenvalues. Users neglect the zero
% fictitious eigenvalues from the results.
————————“——_——_
%
n=length(bedof);
sdof=size(kk);
%
for i=1:n
c=bedof(i);
mm(j,c)=0;
end
%
mm(c,c)=1;
end
%
%
The first five natural frequencies of the truss structure are provided below.Section 7.6 MATLAB Application to Transient Analysis 223
Ist frequency = 240.9 rad/s
Ind frequency = 467.9 rad/s
3rd frequency = 739.8 rad/s
4th frequency = 1243. rad/s
Sth frequency = 1633. rad/s
7.6 MATLAB Application to Transient Analysis
The dynamic equation of motion for the truss structure is
[Ma + La}! = (76.1)
with prescribed initial conditions which are usually initial displacements and initial
velocities. We apply the central difference technique for time integration of Eq.
(7.6.1). The details of the techniques are described in Sec. 8.11 and are omitted
here. In particular, the summed form of central difference technique is used for the
following examples.
& Example 7.6.1 A bar is fixed at the left end and it is subjected to a step
function of magnitude of 200 N (see Fig. 7.5.1). The bar has elastic modulus
of 200 GPa, cross-sectional area of 0.001 m?, and density of 7860 Kg/m*. It is
initially at rest. The MATLAB program is shown below.
%
% Example 7.6.1
% to solve transient response of 1-D bar structure
%
% Problem description
% Find the dynamic behavior of a bar structure,
% as shown in Fig. 7.5.1, subjected to a step
% force function at the right end.
%
% Variable descriptions
% k = clement stiffness matrix
% element mass matrix
% kk = system stiffness matrix
% mm = system mass vector
% ff = system force vector
% index = a vector containing system dofs associated with each element
% gcoord = global coordinate matrix
% prop = element property matrix
nodal connectivity matrix for each element
a vector containing dofs associated with boundary conditions224
‘Truss Structures Chapter 7
% beval = a vector containing boundary condition values associated with
% the dofs in bedof
—
%
%—
% control input data
% number of elements
% number of nodes per element
% number of dofs per node
% total number of nodes in system
% total system dofs
% time step size
% initial time
% final time
nt=fix((t£ti)/dt); % number of time steps
%
Ip
% nodal coordinates
gcoord(1,
gcoord(2,
gcoord(3,
gcoord(4,
gcoord(5,
gcoord(6,
gcoord(7,
gcoord(8,
gcoord(9,
gcoord(10,1)=9,
gcoord(11,1)=10.0;
% material and geometric properties
La
prop(1)=200e9; % elastic modulus
prop(2)=0.001; % cross-sectional area
prop(3)=7860; % density
%
&—
% nodal connectivitySection 7.6 MATLAB Application to Transient Analysis
nodes(10,1)=10; nodes(10,2)=11;
%
%~——
% applied constraints
%
nbe=1; % number of constraints
bedof(1)=1; % Ast dof is constrained
%
~%—
% initialization to zero
oo ae
kk=zeros(sdof,sdo! % system stiffness matrix
mm=zeros(sdof,sdof); % system mass matrix
fl=zeros(sdof,1); % system force vector
index=zeros(nnel*ndof,1); % index vector
acc=zeros(sdof,nt); % acceleration matrix
vel=zeros(sdof,nt); % velocity matrix
disp=zeros(sdof,nt); % displacement matrix
%
%—
% loop for elements
(eee
for iel=1:nel % loop for the total number of elements
%
nd(1)=nodes(iel,1); % Ast connected node for the (iel)-th element
nd(2)=nodes(iel,2); % 2nd connected node for the (iel)-th element
%
coord (nd(1),1); % coordinate of Ist node
x2=gcoord(nd(2),1); % coordinate of Ind node
%
leng=(x2-x1); % clement length
%
el=prop(1); % extract elastic modulus
area=prop(2); % extract cross-sectional area
tho=prop(3); % extract mass density
index=feeldof(nd,nnel,ndof); ‘% extract system dofs for the element.
%
ipt=1; % flag for consistent mass matrix
[k,m]=fetruss1 (el,leng,area,tho,ipt); % element matrix
%
kk=feasmbl1(kk,k,index); % assemble system stiffness matrix
mim=feasmbli(mm,m,index); % assemble system mass matrix
%
end
225226
‘Truss Structures Chapter 7
%
% initial condi
ee
vel(:,1)=2eros(sdof,1); % initial zero velocity
disp(:,1)=zeros(sdof,1); % initial zero displacement
%
fi(11)=200; % step force at node 11
%
¢—$ $$$
% central difference scheme for time integration
a
mm=iav(mm); % invert the mass matrix
%
for it=1:nt
%
ace(;,it)=mm*(ff-kk*disp(;,it)); % compute acceleration
%
for i=1:nbe
ibc=bedof(i); % apply constraints
ace(ibe,it)=0;
end
% compute velocity
% compute displacement
acc(:,nt-4+1)=mm*(ff-kk*disp(:,nt+1)); % acceleration at last step
%
time=O0:dt:nt*dt;
plot(time,disp(11,:))
xlabel(*Time(seconds)’)
ylabel("Tip displ. (m)’)
%
%%——
‘The tip displacement at the right end (i.e. node 11) is plotted in Fig. 7.6.1. as a
function of time. As expected, the displacement has oscillation about the static
displacement.
& Example 7.6.2 Find the transient response of the truss structure as
shown in Fig. 7.4.2. The structure has the same geometric and material data as
those given Example 7.5.2. However, the load is applied at node 5 in the upward
direction as a step function. The load magnitude is 200 N. The response of the
same node where the load is applied is plotted in Fig. 7.6.2.Section 7.6 MATLAB Application to Transient Analysis
r
Jo
Pod
4 ify
a a a
“Tinatecot)
Figure 7.6.2 Time History of Node 5
a
% Example 7.6.2
‘% to solve transient response of 2-D truss structure
%
% Problem description
% Find the dynamic behavior of a truss structure,
% as shown in Fig. 7.4.2, subjected to a step
% force function at node 5 in the upward direction.
%
% Variable descriptions
% k = element stiffness matrix
% m = element mass matrix
% kk = system stiffness matrix
% mm = system mass vector
% ff = system force vector
227228
Truss Structures Chapter 7
% index = a vector containing system dofs associated with each element
% gcoord = global coordinate matrix
% prop = element property matrix
% nodes = nodal connectivity matrix for each element
% bedof = a vector containing dofs associated with boundary conditions
% beval vector containing boundary condition values associated with
% the dofs in bedof
6 $$$ ______________-%
es
% control input data
% number of elements
% number of nodes per element
% number of dofs per node
% total number of nodes in system
sdof=nnode*ndof; % total system dofs
dt=0.0005; % time step size
i=0; % initial and final times
nt=fix((t£ti)/dt); % number of time steps
%
%
% nodal coordinates
% elastic modulus
% cross-sectional area
% density
% nodal connectivity
%—
nodes(1,1)=1; nodes(1,2Section 7.6
MATLAB Application to Transient Analysis
nodes(9,1)=5; nodes(9,2)=6;
%
%
% applied constraints
bedof(3)=12;
beval(3)=0;
%
———————————
% initialization to zero
%
kk=zeros(sdof,sdof);
mm=zeros(sdof,sdof);
ff=zeros(sdof,1);
index=zeros(nnel*ndof,1);
% number of constraints
% Ast dof (horizontal displ) is constrained
% whose described value is 0
% 2nd dof (vertical displ) is constrained
% whose described value is 0
% 12th dof (horizontal displ) is constrained
% whose described value is 0
% system stiffness matrix
% system mass matrix
% system force vector
% dots index vector
acc=zeros(sdof,nt); % acceleration matrix
vel=zeros(sdof,nt); % velocity matrix
disp=zeros(sdof,nt); % displacement matrix
%
%
% loop for elements
‘% loop for the total number of elements
% \st connected node for the (iel)-th element
% 2nd connected node for the (iel)-th element
% coordinate of ist node
% coordinate of 2nd node
leng=sqrt((x2-x1)"2+(y2-yl)*2); % element length
%
if (x2-x1)==0;
beta=2*atan(1); % angle between local and global axes
else
beta=atan((y2-y1)/(x2-x1));
end
%
el=prop(1); % extract elastic modulus
area=prop(2); % extract cross-sectional area
rho=prop(3); % extract mass density
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
229230
‘Truss Structures Chapter 7
%
ipt=1; % flag for consistent mass matrix
[k,m]=fetruss2(el,leng,area,rho, beta,ipt); % element matrix
kk=feasmbl1 (kk,k,index); % assemble system stiffness matrix
mm=feasmbli (mm,m,index); % assemble system mass matrix
%
end
%
%—
% initial condition
%
vel( eros(sdof,1 % initial zero velocity
disp(:,1)=zeros(sdof,1); % initial zero displacement
%
1(10)=200; % step force at 10th dof
%
%—
% central difference scheme for time integration
———————
mm=inv(mm); % invert the mass matrix
%
for it=I:nt
%
acc(:,it)=mm*(ff-kk*disp(,it)); % compute acceleration
%
for i=1:nbe
ibe=bedof(i); % apply constraints
acc(ibe,it)=0;
end
%
vel(:,it-4+1)=vel(:,it)-+acc(:,it)*dt; % compute velocity
disp(;,it-+1)=disp(:,it)+-vel(:,it-+1)*dt; % compute displacement
%
end
%
ace(:nt-+1)=mm*(ff-kk*disp(:;nt-+1)); % acceleration at last step
%
time=0:dt:nt*dt;
plot (time,disp(10,;)) % displacement. plot
xlabel(’Time(seconds)’)
ylabel(’Tip displ. (m)’)
%
%TA
72
73
74
75
76
LT
78
79
7.10
TAL
Problems 231
Problems
(a) Develop the element stiffness matrix for the one-dimensional axial rod using
quadratic shape functions. (b) Apply the stiffness matrix to solve an axial
member whose one end is fixed and the other end is subjected to a force P.
The member has elastic modulus E and cross-sectional area A, respectively.
Use one quadratic element to model the axial member. (c) Compare the nodal
displacement at the center of the member to the end displacement.
A telescope shape of axial member (see Fig. P7.2) is modeled using a single
linear element. Derive the element stiffness matrix.
A taper shape of axial member (Fig. P7.3) is modeled as a single linear element.
Derive the element stiffness matrix.
Develop the element mass matrix for the one-dimensional axial member using
quadratic shape functions.
Develop the element mass matrix for Prob. 7.2.
Develop the element mass matrix for Prob. 7.3.
For the truss structure shown in Fig. P7.7, derive the finite element matrix
equation using two elements. Find the displacements and stresses in the member.
One-dimensional wave equation for an axial member is given as
Guo _
ot On?
The second order equation can be rewritten as
a Pu
era
using two first order equations in time. These two equations are solved using
one linear finite element and the backward difference method for time derivative.
The member is initially displaced such that u(z,0)=0.001z. The left end of the
member is held fixed all the time while the right end is released at time 0 from
the initial displacement. Find the displacement u and velocity v at the right
end at time t=1 sec. using a time step size At=1.
Redo Prob. 7.8 using the central finite difference method for time derivative.
Find the critical time step size for stability.
Solve the truss structure shown in Fig. P7.10 using the computer programs.
Compare the finite element solution to the analytical solution obtained from
statics.
Obtain the natural frequencies of the structures in Fig, P7.10 using the computer
programs232 ‘Truss Structures Chapter 7
Figure P7.2 Problem 7.2
E, Asaxtle
++}
Figure P7.3 Problem 7.3
2m
Figure P7.7 Problem 7.7
800 N
250 N
1.2m
e
mM.
tm tm. tm. Im
B=70GPA
Figure P7.10 Problem 7.10
7.12 If the structure in Fig. P7.10 is initially at rest and the forces are appliedsuddenly at time 0, determine the dynamic response of the structure using the
computer programs.CHAPTER EIGHT
BEAM AND FRAME STRUCTURES
8.1 Euler-Bernoulli Beam
The Euler-Bernoulli equation for beam bending is
Ov ay
5a t (23) = 4(z,¢) (8.1.1)
where v(z,£) is the transverse displacement of the beam, p is mass density per volume,
EI is the beam rigidity, q(z, 7) is the externally applied pressure loading, and ¢ and z
indicate time and the spatial axis along the beam axis. We apply one of the methods
of weighted residual, Galerkin’s method, to the beam equation, Eq. (8.1.1) to develop
the finite element formulation and the corresponding matrix equations.
‘The averaged weighted residual of Eq. (8.1.1) is
Le 2, 2 2,
I =f (ae + we") - 1) ode =0 (8.1.2)
where L is the length of the beam and w is a test function. The weak formulation
of Eq. (8.1.2) is obtained from integrations by parts twice for the second term of the
equation. In addition, discretization of the beam into a number of finite elements
gives
dv dw aw
xf, pgudes BS Side f aude] + [rm] =0 (8.1.3)
where V = £1(8*v/dz°) is the shear force, M = E'1(8*v/8z?) is the bending moment,
Q° is an element domain and n is the number of elements for the beam.
We consider shape functions for spatial interpolation of the transverse deflection,
v, in terms of nodal variables. Interpolation in terms of the time domain will be
discussed later. To this end, we consider an element which has two nodes, one at each
235236 Beam and Frame Structures Chapter 8
‘|
“| ws as
——————— |
2,=0 t=
Figure 8.1.1 Two-Noded Beam Element
end, as shown in Fig. 8.1.1. The deformation of a beam must have continuous slope
as well as continuous deflection at any two neighboring beam elements. To satisfy
this continuity requirement each node has both deflection, v; and slope, 0;, as nodal
variables. In this case, any two neighboring beam elements have common deflection
and slope at the shared nodal point. This satisfies the continuity of both deflection
and slop. The Euler-Bernoulli beam equation is based on the assumption that the
plane normal to the neutral axis before deformation remains normal to the neutral
axis after deformation (see Fig. 8.1.2). This assumption denotes 8 = du/dz (i.e.
slope is the first derivative of deflection in terms of x), Because there are four nodal
variables for the beam element, we assume a cubic polynomial function for v(x)
v(x) = eo + ere + cz? + cgx* (8.1.4)
From the assumption for the Euler-Bernoulli beam, slope is computed from Eq. (8.1.4)
O(x) = cy + cox + 3cgzx? (8.1.5)
Evaluation of deflection and slope at both nodes yields
(0) =co= 11
(0) = e1 =
U(1) = cg + e4! + cpl? + esl = v9 (8.1.6)
(1) = c1 + 2cal + 3egl? = 02
Solving Eq. (8.1.6) for ¢: in terms of the nodal variables u; and 6; and
substituting the results into Eq. (8.1.4) give
v(z) = Hi(z)vr + Ho(2)01 + Ha(2)u2 + Ha(2)92 (8.1.7)
where
(8.1.8)Section 8.1 Euler-Bernoulli Beam 237
i
Figure 8.1.2 Euler-Bernonlli Beam
Figure 8.1.3 Hermitian Beam Element
The functions H;(2) are called Hermitian shape functions and shown in Fig. 8.1.3.
The Hermitian shape functions are of C-type which means they make both v and
4v/ Oz continuous between two neighboring elements. Further discussion on C-type
continuity, where n is an integer equal to or larger than zero, is provided in Chapter
12,
Application of Hermitian shape functions and Galerkin’s method to the second
term of Eq. (8.1.3) results in the stiffness matrix of the beam element. That is,
1
tx] = [ weraiee (19)
;
where
(B= (ay my ag HY) (e.110)
and the corresponding element nodal degrees of freedom is {d°} = {v; 61 v2 A2}”. In
Eq. (8.1.10), double prime denotes the second derivative of the function and J in Eq.
(8.1.9) is the length of a beam element. Assuming the beam rigidity EJ is constant238 Beam and Frame Structures Chapter 8
within the element, the element stiffness matrix is
ne 6l -12 61
TEL | Gl 42 6) on
Wleae | 20 8 (1.11)
6 2-61 ~4P
In case the beam rigidity is not constant within a beam element, the integral in Eq.
(8.1.9) must be evaluated including EJ as a function of z. If the beam element is
relatively short, for example in a refined mesh, the average value of EI for the element
may be used with Bq. (8.1.11) for a simple and reasonable approximation.
The third term in Eq. (8.1.3) results in the element force vector. For a generally
distributed pressure loading, we need to compute
Hy
1
f= [ a) a dz (8.1.12)
Ha
in which {F*} is the element force vector. If we have a uniform pressure load go
within the element, the element force vector becomes
(ih 6l
a A 9) P
(P) =a [ Bi hde= 8 a (8.1.13)
: e
Another common load type is a concentrated force within a beam element as shown
in Fig. 8.1.4. In this case, the element force vector is
, mh Hy (20)
{FI} = / Po6(z — 20) 2 dz = Py ey (8.1.14)
Hy H,(z0)
where Po is the concentrated force applied at x = 2 and 6(z — 29) is the Dirac delta
function. Element force vectors for some other cases are summarized in Fig. 8.1.4.
The last term in Eq. (8.1.3) is the boundary conditions of shear force and
bending moment at the two boundary points, z = 0 and z = L, of the beam. If
these boundary conditions are known, the known shear force and/or bending moment
are included in the system force vector at the two boundary nodes. Otherwise,
they remain as unknowns. However, deflection and/or slope are known as geometric
boundary conditions for this case. For static bending analyses of beams, the first term
in Eq. (8.1.3) which is the inertia force term is neglected. As a result, assembling
the element stiffness matrices and vectors results in the system matrix equation given
below:
{K] {4} = {F} (8.1.15)Section 8.1 Euler-Bernoulli Beam 239
[F°] He 16 oy
ie
UP T=P, Ll) Hy) Ha) Hy]
(FEM, [4x (mrt) UC-tap30,)
baat) ab (90521)
(F*|-as zat sil.
Figure 8.1.4 Element Force Vectors for Various Pressure Loads
Given boundary conditions are applied to Eq. (8.1.15) and the matrix equations are
solved for the unknown nodal variables, deflections and slopes. An example is given
in Example 8.1.1.
& Example 8.1.1 Solve a cantilever beam subjected to a tip load as shown in
Fig. 8.1.5. Let us use one Hermitian beam element to solve the tip deflection. In
this case, the element stiffness matrix is the same as the system stiffness matrix.
The resultant element matrix equations
12 6b ~i2 6h] (% Yi
EI| 6L 42? ~6L 21? alo jm
T |-12 -62 12 -6L|)uf(7~)-P (8.1.16)
6b 2? ~6L 417) la, 0
In this equation, Vj and My are unknown reactions at the clamped support.
The minus sign indicates the tip force is applied to the opposite direction to the
deflection. The boundary conditions prescribed in terms of nodal variables are
v1 = 0 and 6; = 0. Applying these conditions to Eq. (8.1.16) as described in240 Beam and Frame Structures Chapter 8
P
Figure 8.1.5 Cantilever Beam
the previous chapter and solving the resultant equation yield
PLS
oan (8.1.17)
v=
which is the exact solution for the cantilever beam. The reason the finite element
analysis with one element results in the exact solution is the following. The
Hermitian shape functions are based on a general cubic polynomial as seen in
Eq. (8.1.4). The exact solution for the cantilever beam with a tip force is also
a cubic function. As a result, the Hermitian shape functions can result in the
exact solution. f
For dynamic analyses of beams, the inertia force needs to be included. In this
case, the transverse deflection is a function of z and ¢. The deflection is interpolated
within a beam element as given below:
o(z, t) = Hi(x)ui(t) + Ho(x)01(t) + Ha(x)vo(t) + Ha(x)O2(¢) (8.1.18)
Equation (8.1.18) states that the shape functions are used to interpolate the deflection
in terms of the spatial domain and the nodal variables are functions of time. The first
term in Eq. (8.1.3) becomes
ff otnitunaetéy (8.1.19)
b
where
[H] = [Fy Hy He Ha) (8.1.20)
and superimposed dot denotes temporal derivative. From Eq. (8.1.19), the element
mass matrix becomes
1
[Mw] = f pA" [Haz
156 22154-1381
_pAl| 221 4P 13l -37
420} 54 131 156 -22I (8.1.21)
-131 —3 221 4Section 8.1 Euler-Bernoulli Beam 241
The mass matrix in Eq. (8.1.21) is called the consistent mass matrix. Archer [11,12]
is credited for the first development of the consistent mass matrix. Adding the
components in the mass matrix, which are associated with only the displacement
nodal variables (i.e. v; and v2), yields pAl, total mass of the beam element. The
beam element conserves the mass in terms of its translational degrees of freedom.
In the dynamic analysis, the system mass matrix is usually required to be in-
verted. From this aspect, a diagonalized mass matrix has a computational advantage.
One such matrix is
1
ey. PAL | 0
IM}=]5 (8.1.22)
This matrix is called the lumped mass matrix, which was developed earlier than the
consistent mass matrix. This matrix has half of the element mass at each translational
nodal degree of freedom. Both mass matrices conserve the mass associated with their
translational degrees of freedom.
Another way to develop a diagonalized mass matrix from the consistent mass
matrix is summarized below[13}.
1. Add the diagonal components of the consistent mass matrix associated with the
translational degrees of freedom, i.e. the first and third diagonal components
for the present beam element. The sum is called «.
2, Divide the diagonal components by @ and also multiply them by the element
total mass.
3. Set all off-diagonal components to zero.
Applying this procedure to Eq. (8.1.21) results in
390 0 0
pAl}o PF 0 0
7/0 0 39 0 (8.1.28)
oo00P
This matrix is called the diagonal mass matrix and also conserves the mass for the
translational degrees of freedom. Another technique to develop a diagonalized mass
matrix is discussed in Refs [14,15] using numerical quadrature points located only at
the nodes.
‘The clement stiffness matrix does not change for the dynamic analysis because
the shape functions are the same for both static and dynamic analyses. However, the
force term may vary as function of time. The force vector is for the dynamic analysis
1
{F*()} = i a(z,)[H]" dz (8.1.24)
Thus, Eq. (8.1.24) is in general different from Eq. (8.1.12). As a result, the matrix
equation for a dynamic beam analysis is after assembly of element matrices and vectors
(Mi{a} + [K]{d} = {F@)} (8.1.25)242 Beam and Frame Structures Chapter 8
For free vibration of a beam, the eigenvalue problem is [16].
({K] - w?[M]) {4} =0 (8.1.26)
where w is the angular natural frequency in radians per second and {d} is the mode
shape. Example problems for static, dynamic, and eigenvalue analyses of beams are
provided at later sections using the MATLAB program.
8.2 Timoshenko Beam
The Timoshenko beam theory includes the effect of transverse shear deformation.
As a result, a plane normal to the beam axis before deformation does not remain
normal to the beam axis any longer after deformation. Figure 8.2.1 shows the
deformation in contrast to that in Fig. 8.1.2. While Galerkin’s method was used
to derive the finite element matrix equation for the Euler-Bernoulli beam equation,
the energy method is used for the present formulation for the Timoshenko beam.
Let u and v be the axial and transverse displacements of a beam, respectively.
Because of the transverse shear deformation, the slope of the beam @ is different from
dv/dz. Instead, the slope equals (dv/dz) — y where is the transverse shear strain.
As a result, the displacement field in the Timoshenko beam can be written as
u(z, y) = —y0(z) (8.2.1)
v(2)=0 (8.2.2)
where the z-axis is located along the neutral axis of the beam and the beam is not
subjected to an axial load such that the neutral axis does not have the axial strain. A
beam subjected to both axial and transverse loads is considered in a next section for
frame structures. From Eq. (8.2.1) and Eq. (8.2.2), the axial and shear strains are
do
feeias (8.2.3)
dy
yao4@ (624)
As explained in the previous chapter on the energy method, the element stiffness
matrix can be obtained from the strain energy expression for an element. The strain
energy for an element of length / is
b 1 ph/2 bp 1 ph/2
U= $f [ Ee dy de + of f{ yPGy dy de (8.2.5)
2So Jenje 2 Jo J-nj2
in which the first term is the bending strain energy and the second term is the shear
strain energy. Moreover, b and h are the width and height of the beams respectively,
and pis the correction factor for shear energy whose value is normally 2.Section 8.2 Timoshenko Beam 243
Yu
Figure 8.2.1 Timoshenko Beam
First, substituting Eq. (8.2.3) and Eq. (8.2.4) into Eq. (8.2.5) and taking
integration with respect to y gives
OND af dy\* dv
U= A) (2) a(Z) dy dz + gf (-0+) ca(-0422) dy dz (8.2.6)
where J and A are the moment of inertia and area of the beam cross-section.
In order to derive the element stiffness matrix for the Timoshenko beam, the
variables v and @ need to be interpolated within each element. As seen in Eq. (8.2.6), »
and @ are independent variables. That is, we can interpolate them independently using
proper shape functions. This results in satisfaction of inter-element compatibility, i.e.
continuity of both the transverse displacement v and slope @ between two neighboring
elements. As a result, any kind of C° shape functions can be used for the present
beam element. Shape functions of order C* are much easier to construct than shape
functions of order C1. It is especially very difficult to construct shape functions of
order C? for two-dimensional and three-dimensional analyses such as the classical
plate theory.
‘We use the simple linear shape functions for both variables. That is,
v= [Hy Hy] { . } (8.2.7)
6 = [Hy Ho] { 5 } (8.2.8)
where H; and Hy are linear shape functions. The linear element looks like that
in Fig. 8.1.1, but the shape functions used are totally different from those for the
Hermitian beam element, Using Eq. (8.2.7) and Eq. (8.2.8) along with the strain244 Beam and Frame Structures Chapter 8
energy expression Eq. (8.2.6) yields the following element stiffness matrix for the
Timoshenko beam:
[K*] = [Kj] + [Ky] (8.2.9)
where
0000
EI}0 1 0 -1
KSl=T lo 0 0 0 (8.2.10)
0-10 1
4 2% -4 @
BGA | 2 aoa
4l |-4 -21 4 -2
2 ie
[Ki]= (8.2.11)
One thing to be noted here is that the bending stiffness term, Eq. (8.2.10), is obtained
using the exact integration of the bending strain energy but the shear stiffness term,
Eq. (8.2.11), is obtained using the reduced integration technique [17,18]. For the
present calculation, the one-point Gauss quadrature rule is used as shown in the
example given below. The major reason is if the beam thickness becomes so small
compared to its length, the shear energy dominates over the bending energy. As seen
in Eq. (8.2.10) and Eq. (8.2.11), the bending stiffness is proportional to ** while the
transverse shear stiffness is proportional to hl, where h and | are the thickness and
length of a beam element, respectively. Hence, as 4 becomes smaller for a very thin
beam, the bending term becomes negligible compared to the shear term. This is not
correct in the physical sense. As the beam becomes thinner, the bending strain energy
is more significant than the shear energy. This phenomenon is called shear locking. In
order to avoid the shear locking, the shear strain energy is under-integrated. Because
of the under-integration the present beam stiffness matrix is rank deficient. That is,
it contains some fictitious rigid body modes (i.e. zero energy modes). Example 8.2.1
shows the computation of the shear stiffness term.
#& Example 8.2.1 We use the linear isoparametric element to integrate the
shear energy term in Eq. (8.2.6) to produce the shear stiffness matrix Eq.
(8.2.11). Using the concept of isoparametric mapping explained in Chapter 6,
the shear stiffness term becomes
-1/l
1—ry2]} fii
nsce [-G [-3
(l+ny2
[KS
The expression is a quadratic polynomial in terms of r so that the two-point
Gauss quadrature will evaluate the integration exactly. For under-integration
of one order less, we use the one-point Gauss quadrature rule. The integration
point is 0 and the weight is 2. Applying this to Eq. (8.2.12) results in Eq.
(8.2.11). ¢Section 8.3 Beam Elements with Only Displacement 245
‘These kinds of beam elements can be derived for any order of shape functions
higher than one. That is, beam elements can have three or larger number of nodes per
clement depending on the order of shape functions. For each case, the shear stiffness
matrix should be under-integrated consistently. The order of integration for the shear
stiffness matrix is one less than what is required for exact integration.
The consistent mass matrix for the Timoshenko beam is computed from
1
f[ PAIN] [Jaz (8.2.13)
0
where
(8.2.14)
2010
ALI0 0 0 0
Ima PEt i720 (8.2.15)
0000
‘The same lumped and diagonal mass matrices as given in Eq, (8.1.22) can be used for
the present beam element.
8.3 Beam Elements with Only Displacement Degrees of Freedom
In this section, we develop a family of beam elements which have only displace-
ments as nodal degrees of freedom and no slope as nodal degrees of freedom [19]. In
this aspect, these beam elements are similar to plane stress elements as given in Chap-
ter 9. Therefore, when a beam needs to be discretized along its thickness direction
as well as along its axial direction, these beam elements can be easily applied for the
mesh. Figure 8.3.1 shows one example which uses stacked beam elements along the
beam thickness. If there are multiple embedded cracks in a beam like interlaminar
delamination in a laminated composite beam, it may require more beam elements
through its thickness. If we plan to use beam elements which have displacements
and rotations as nodal degrees of freedom for this application, we need special care
at the interface of the neighboring top and bottom beam elements. As seen in Fig.
8.3.2, complicated constraint equations should be applied to maintain the continuous
deformation across interface.
Let us derive a linear beam element with displacement degrees of freedom only,
which is the simplest element of this family. The element has six degrees of freedom
which are axial and lateral displacements. There are axial displacements at the four
corner points and lateral displacements at the two ends of the element as seen in Fig.
8.3.3.
In Fig. 8.3.3 and the subsequent formulation, u represents the axial displace-
ments at the corner points and v represents the lateral displacements at the ends.246 Beam and Frame Structures Chapter 8
Crack
Poy fh
Figure 8.3.1 A Beam with an Imbedded Crack (L >> h)
The subscripts ‘1’ and ‘2’ refer to the left and right ends while the superscripts ‘”
and ‘b’ indicate the top and bottom sides of the element, respectively.
The displacement field of the element is
("Go } taney (3a)
where [N] is the matrix of shape functions and {d°} is a vector of nodal displacements.
The axial displacement is assumed to vary linearly along both axial and lateral
directions. It can be written as
2
u(z, y) = > Ni(2) [Hi(y)uf + Ho(y)ul] (8.3.2)
=I
= Ni(z)Ha(y)uh + Ni(2)Ho(u)ul + No(2)Ha(y)uh + No(w)Ha(y)uy
The lateral displacement, which is assumed to be constant through the thickness
of the element, varies linearly along the axial direction and can be written as
2
oe) = OMe)
1
= Ni(z)vi + Na(z)v2 (8.3.3)
Here, Nj and H; are the linear shape functions in the axial and lateral directions. The
beam element may use a higher order shape function for the axial direction if there
are more nodal points in the axial direction, and the linear shape function for lateral
direction. However, in this study, the linear shape function is used for both N; and
H; for simplicity. That is,
(8.3.4)Section 8.3 Beam Elements with Only Displacement 247
J
4a Up
Dome. Ma w= Us
+ eo
Continuity at Interface hy
on! ty 7 ert Mag= - dy
4 Ay ea
Dos aD Pe Boe ~ BH
Figure 8.3.2 Continuity Requirements at the Interface for Conventional Beam Elements
¥
“u Uy
it t
nL us
b
La | Ug x
0 U
Figure 8.3.3 Four-Noded Beam Element with Six Degrees of Freedom
where | and h are the length and height of the beam element, respectively, if the beam
is a rectangular shape.
For simplicity, notations, Nj, No, Hi and Hy will be used instead of Ni(z),
N2(z), Hi(y), and Ho(y) in the following derivation. Axial normal strain can be
written as
du ON, ON,
Ge one Ge a+ at
ONa
“Oz
Hyud + ON? srt (8.3.5)
t
aus + Oz
and the shear strain is
du | av
ay = Het (83.6)248 Beam and Frame Structures Chapter 8
_ OH, OHi | 0H; ON ON;
| dy Nou, + oy Not + Gout ae
oH:
Mul + Beal + %
The element stiffness matrix can be obtained by minimizing the total strain en-
ergy which contains both bending and the transverse shear energy. This minimization
yields the following element stiffness matrix
{K*] = [K6] + [3] (8.3.7)
where the subscripts ‘b’ and ‘s’ indicate bending and the transverse shear, respectively.
‘The bending and transverse shear stiffness matrices are given as
tooph
tsl= fl [10097 2 (B) dude (638)
tooph
tesla fi [18.97 6B.) aude (639)
where E and G are the elastic and shear modulii of the beam and the vectors {Bs}
and {B,} are derived below.
The strain-displacement relationship for the axial strain and shear strain can be
written as from Eqs (8.3.5) and (8.3.6)
ée = {Bs} {d°} (8.3.10)
and
rey = {By} {a} (8.3.11)
where
{By} = {fn My, 0 en, Many 0 of
=) (OH, — OH; ON, 0H; 0H, ON;
{By} = {me Oy Nag: Gost Uae oy Na i my (8.3.12)
me
{d°} = {ub uf v1 ub uf v2}
‘The bending stiffness matrix can be obtained by carrying out the integration in Eq.
(8.3.8) which will result in
oo ecceReccueaeecceeaeccke
1 2
en 20 00 0 aa
(K= alo -10 2 1.0 (8.3.18)
pee kcceweeceteeccce: oe
0 0 0 0 0 0.
For Eq. (8.3.9) the reduced integration technique is used along the z-axis to
prevent shear locking which occurs when the ratio of beam length to beam thicknessSection 8.4 Mixed Beam Element 249
is large. That is, one-point Gauss quadrature is used for integration in the z-direction.
This integration yields the transverse shear stiffness matrix of the form
GP -GP Gh. GP GP — 2th
-GP Ge -2Glh -GI? Ge 2GIh
ee 2GIh =-2GlIh 4Gh? 2GlIh =-2GIh -4Gh?
(K=gR| ce -ce acin ‘Ge -cr -2Gn| &44)
-G? GP -2Gth -GP GP OGth
-2GIh 2GIh —4Gh? —2GIh 2th 4h?
The element stiffness matrix, which is obtained by adding the bending and
transverse stiffness matrices, can be expressed in the following form
a,+2a3 -a,;+a@3 a4 @;—2a3 ~a;—a3 —a4
=a; +43 a; +2a3 —aq —a—a3 a1 —2a3 ay
Ik]=| % Ss = os (8.3.15)
a, —2ay —a;—ay ag a +203 a, +03 —ay
=a;—a3 a,—2d3 -a4 a, +03 a1 +203 ay
a4 a4 a2 a4 a4 a2
where each symbol denotes
ac ene
ee
ay
(8.3.16)
The mass matrix can be derived similarly as shown in previous sections. The
lumped mass matrix for the linear element is
100000
010000
(00 20 00
M"l="Flo 00100 (83.17)
C000 10
000002
Here pab is the element mass, and the element is assumed to have a unit width.
Otherwise, the matrix is multiplied by the beam width.
8.4 Mixed Beam Element
‘This section develops mized beam elements {20,21]. The elements have the
transverse deflection and bending moment as primary degrees of freedom. In the finite
element method, the primary variables are more accurate than secondary variables
which are usually obtained from derivatives of the primary variables, When the
transverse deflection and slope are the primary variables, bending stress is a secondary
variable which is related to derivative of the primary variables. On the other hand,
the mized beam elements have the bending moment as a primary variable and the250 Beam and Frame Structures Chapter 8
bending stress is computed directly from the bending moment without taking any
derivative. As a result, there is no loss in accuracy in computing the bending stress
in the mized beam elements. The bending stress is usually one of the most important
solutions needed in the beam analysis.
In order to derive the mized elements, we consider the governing equations shown
below:
M_ @&
BI a= (4.
aM
casa e (8.4.2)
Galerkin’s method is applied to Eq. (8.4.1) and (8.4.2) using the same shape functions
for both v and M. Then, for an element of length /, we obtain
#H i ‘INITLN] de [M] + f : (ey [4] de [v] = [re]. (8.4.3)
[ [z= my [= dz [M) = -f [N]fq dz + [rv (8.4.4)
in which [NV] is the vector of shape functions, and @ and V are the slope and shear
force, respectively. The element stiffness matrix from these equations becomes
[KJ = FS a (8.4.5)
where
1
[Ku] = a i [NFPIN] de (8.4.6)
(Kia) = [Kai]? = [2 wy" [ae | 2 (8.4.7)
For the linear mized beam element shown in Fig. 8.4.1, Eq. (8.4.5) becomes
(K*\{a"} = {f°} (8.4.8)
where
21 I 6EI —6EI
1 T 20 -6EI «6EI
(l= Gani | enr -6er 0 0 (8-49)
-6EI 6EI 0 0
{d°} = {Mi Mz v1 02)" (8.4.10)
{f°} = {01 2 U-Q: Vi-Q:}” (8.4.11)
and Q; is the equivalent pressure load applied to the nodal points.Section 8.4
Figure 8.4.1 Linear Mixed Beam Element
Mixed Beam Element 251
Boundary conditions are applied to the element in the following way. For a
simply supported node, both displacement v and bending moment M are set to zero
while only displacement v and @ are set to zero at a clamped node. If a node is free
without any applied moment, moment M is zero at the node, Example 8.4.1 shows
the application of these boundary conditions. Any higher order shape functions may
be introduced to Eq. (8.4.3) and Eq. (8.4.4) to obtain a stiffness matrix for a higher
order mized beam element.
# Example 8.4.1 Figure 8.4.2 shows a beam whose half is modeled using
two linear mized beam elements. The left end is either simply supported or
clamped and the right end is symmetric. Assembly of two beam elements gives
the following system matrix equation.
2 1 0 G6EI -6EI 0 My, cn
1 4 1 ~6BI 12EI -6EI| | M2 0
1 0 1 2 0 -6BI 6EI||Ms|_| 0
6E1| 6£I -6EI 0 0 0 0 wu} [UW +05
-~6EI 12EI -6GEI 0 0 0 v2 1.0
0 -6EI 6EI 0 0 0 v3 0.5
(8.4.12)
Since the right end is symmetric in this problem, the slope at the right end node
(ie. the third node in Fig. 8.4.2) which corresponds to the third component in
the right-hand-side column vector in this equation is set to zero, On the other
hand, the slope at the left end (i.e. the first node) is given as 61 while the
shear force at the left end support is given as Vj. Depending on the boundary
condition, the slope may or may not be known.
First of all, let us consider the simply supported left end. In this case,
vy
conditions to Eq. (8.4.12) gives
4 1 12EI —6EI
ole 2 -6EI 6EI
6EI | 12EI -—6ET 0 0
-6EI 6EI 0 0
0 and M; = 0. However, 6) and Vi are unknowns. Applying these
Mz 0
Ms 0
. a (8.4.13)252 Beam and Frame Structures Chapter 8
INfn Beam Rigidity =B7
node [ node 2 node 3
[m 1m 2m
Figure 8.4.2 A Uniformly Loaded Beam Modeled Using Two Linear Mixed Beam Elements
Solving this matrix equation provides v2 = —qBy and vg = —; for
deflections, and also gives bending moments of 1.5 and 2 at nodes 2 and 3.
Substituting these solutions back into Eq. (8.4.12) gives the shear force at the
support equal to 2. These shear force and bending moments are exact solutions.
Next, we consider the clamped left end. The corresponding boundary
condition is v; = 0 and 6; = 0. Applying these conditions to Eq. (8.4.12)
results in
2 1 0 ~6EI My, 0
1 1 4 1 12EI a M, 0
a 1 2 of ser Mz| =| 0 (8.4.14)
-6EI 12EI —6EI v2 1.0
0 -6EI 6EI v3 05
The nodal deflections from this matrix equation are v2 = —g$7 and v3 = — 327.
The bending moments are M; = —§, Mz = } and Mg = 3. The shear force at
the left support is 2. In this case the shear force turns out to be exact but the
bending moment is not exact. {
The formulation provided above is based on the Euler-Bernoulli beam assump-
tion. If the transverse shear deformation is included in the formulation, the governing
equations are modified as given in Ref. [22}
Pol eed (8.4.15)
ot ag (8.4.2)
where pt is the shear correction factor, h is the beam thickness and the beam is assumed
to have unit width. Application of Galerkin’s method to these equations yields the
element matrix shown as
gey [Ku Ki
vey = [fn Z (8.4.16)Section 8.5 Hybrid Beam Element 253
where
[Ku] = a [orm + falas) dz (8.4.17)
r
(K12] = (Kail? = i : [¢ [= dz (8.4.18)
‘Again, the same shape functions are used for v and M in Eq. (8.4.17) and Eq. (8.4.18).
For the linear element, Eq. (8.4.18) becomes
+a P-a 6EI -6EI
a P-a W2+a -6EI 6EI
- ceeeeeeeeees
(k 6EIl | 6£I —-6EI 0 0 (8.4.19)
-6EI 6EI 0 0
where i
°= Gh (8.4.20)
We call the latter the thick beam element and the former the thin beam element
because the effect of transverse shear deformation increases as the plate thickness to
length ratio increases. Table 8.4.1 compares the thin beam and thick beam solutions
for various loading and boundary conditions.
The lumped mass matrix for the linear mized beam element is
tut] = 2A
z (8.4.21)
sooo
0 0
00
10
01
coco
8.5 Hybrid Beam Element
A hybrid beam element is introduced in this section. The hybrid element is
based on the assumed strains within the beam element [23]. This element requires
C® continuity. The formulation is based on a modified potential energy expression as
given below for a beam with unit width
1 1
I= ii (-}4 Dees — FE Dies + FDilald} + EDsbald}) de — f[ {a}? {q} de
5 A
(8.5.1)
where :
ae (8.5.2)
a= -04% (8.5.3)254
Beam and Frame Structures
Chapter 8
Table 8.4.1 Thin and Thick Beam Solutions for Various Beams with Unit Width
ee
Configuration Maximum deflections
3
P Thin Beam 1 Waa BEE
g fl
Thick Beam:
PE, PL
L ae ‘Wrae= SEI * 10GT
: q : cs
Y 4 Thin Beam :w,,= BET
Thick Beam:
L oh
Tt Wma BET * OG
a “
re
Dt ee i ut
CL “Waa 38481" BOGT
3
/: Thin Be =?e
L/2 4 in Beam : w,> 788
7 Thick Beam: ee. pat
Z Wat “4gEr * 4061
y 4 aut
QUTTTTTy —|n Beem ae seat
j}—________ Thick Beam: Sate
L - aw a
7A-_—__—_________-} le Waa S641 BOGI
P 3
y L/2 = PL
Y Thin Beam :wi> ie2Er
Thick Beam: 7 2
L PL PLY
Se ‘Wrae= 19281 * 406K
(E: Elastic modulus, G: Shear modulus, I: Moment of inertia of cross section)Section 8.5 Hybrid Beam Element. 255
{d} = {9 v}7 (8.5.4)
and other parameters are defined below: Dy is the bending stiffness equal to EI,
D, is the shear stiffness equal to uGA, Ly is the bending strain-displacement
operator and L, is the shear strain-displacement operator. Invoking a stationary
value of the equation results in the equilibrium equation and the generalized strain-
displacement relation. In order to obtain the finite element model, generalized strains
and displacements are discretized as the following:
= [Ba]{as} (8.5.5)
&s = [B]{as} (8.5.6)
{a} = [N]{d} (8.5.7)
where generalized strains are assumed independently within each element and gener-
alized displacements are interpolated using generalized nodal displacement {d}. Thus,
[By] and [B,] are matrices (or vectors for the beam problem) consisting of the poly-
nomial terms of the generalized strain parameter vectors {a} and {a,}, respectively.
Substituting Eq. (8.5.5) through Eq. (8.5.7) into Eq. (8.5.1) yields
W=~ Has}TGilton} - Has}Geltas} + fou)" Hila}
+ fo} LH}{d} — {a}? {F} (8.5.8)
where
1
[Gi] = f [Bi]? Ds[Bolde (8.5.9)
1
(G)= fe." DB, Jae (85.10)
A
1
t= [teal Dstolm es (65.11)
1
t= [Ba D,clw lee (65.12)
0
and
1
{F}= f INT? (q}dz (8.5.13)
0
Invoking stationary values of Eq. (8.5.8) with respect to ay and a, respectively
results in :
—[Ge] {as} + [Ho}{a} = 0 (8.5.14)
~[Gslas} + [Hs]{d} = 0 (8.5.15)
Eliminating {ay} and {a5} from Eq. (8.5.8), Eq (8.5.14) and Eq, (8.5.15) gives
T= Stay? (aol Gal) + (HF Gs} -— {(T{F} (8.5.16)256 Beam and Frame Structures Chapter 8
Equation (8.5.16) finally gives the following finite element system of equations
(K}{d} = {F} (8.5.17)
in which
(K] = [)" (Gi) el + (417 1G.) 1) (8.5.18)
For a linear beam element, the generalized strain vectors are assumed as
[B.) =[1 2] (8.5.19)
and
[B,) =1 (8.5.20)
‘These expressions represent that the bending strain varies linearly and the shear strain
is constant within the linear beam element. Example 8.5.1 shows the derivation of
the stiffness matrix for the linear beam element. The hybrid beam element can be
also generalized for general higher order shape functions.
& Example 8.5.1 Substituting the generalized strain vectors, Eq. (8.5.19)
and Eq. (8.5.20), into Eq. (8.5.9) through (8.5.12) gives
[@] = a [= | (8.5.21)
[Ge] = wGAt (8.5.22)
v= 3p at i] (8.5.23)
[A = AL» 7 (8.5.24)
Applying these expressions into Eq. (8.5.18) yields the same element stiffness
matrices as in Eqs (8.2.9) through (8.2.11). The first term in Eq. (8.5.18)
results in Eq. (8.2.10) while the second term in Eq. (8.5.18) yields that in
Eq. (8.2.11). However, no reduced integration technique is used for the present
stiffness matrix. }
8.6 Composite Beams
Laminated composite beams are made of multiple layers which have in general
different material properties. More general cases are dealt with in the chapter for
plates and shells. In this section, we consider a simple case. The laminated beam is
symmetric about the midplane axis so that there is no coupling between the inplane
deformation and bending deformation. For this simple case, the beam formulations
developed in the previous sections are directly applicable to the laminated beam. OneSection 8.6 Composite Beams 257
Figure 8.6.1 Laminated Beam
thing to be generalized for the laminated beam is the beam rigidity. For a symmetric
laminated composite beam with unit width, the equivalent beam rigidity is computed
as
(EDerie = 5 2 Ble? — af) (86.1)
Here, n is the number of layers, and yi-1 and y; are the y—coordinate values of the
bottom and top planes of the i** layer as seen in Fig. 8.6.1. In addition E; is the
elastic modulus in the 2—direction of the i** layer. This equivalent beam rigidity
is substituted into the previous beam elements to compute the stiffness matrices for
laminated composite beams.
However, one more important fact in laminated beam applications is the effect of
transverse shear. Composite beams are not usually isotropic and their shear modulus
is in general much lower than the elastic modulus. In this case, the shear deformation
plays an important role [24,25]. For example, see Fig. 8.4.3. As the shear modulus
G becomes much smaller than the elastic modulus in the thick beam solutions, the
thick beam solutions deviate much more from thin beam solutions. As a result, thin
beam solutions may not be accurate any more. In other words, the Euler-Bernoulli
beam equation may not be suitable any more especially for rather thick laminated
composite beams.
As a result, the beam formulations including the effect of shear deformation can
be used for analyses of laminated composite beams. In this case, the equivalent shear
modulus is computed from
(GA)egiv = D> bGi(yi — wi-1) (8.6.2)
i=l
where b is the width of the beam. The bending stress in a laminated composite beam
can be determined from
__MEBy
(EDeriv
(8.6.3)
Oo258 Beam and Frame Structures Chapter 8
Figure 8.6.2 Laminated Beam Element
where g; is the bending stress in the i** layer and y is a coordinate value in the i*® layer.
Example 8.6.1 shows an application of beam elements with displacement degrees of
freedom only developed in section 8.3 to an analysis of a laminated composite beam.
# Example 8.6.1 Two different techniques can be used to model a laminated
beam using beam elements with displacement degrees of freedom only. The
first technique discretizes respective layers in the finite element analysis. As
a result, the total number of elements is proportional to the number of layers
in a laminated beam. The condensation technique can be applied to reduce
the number of total degrees of freedom by eliminating internal layers degrees
of freedom. This modeling technique is computationally expensive but it can
describe a general shape of inplane deformation through the beam thickness. The
second technique uses one beam element through the beam thickness regardless of
the number of layers. This technique is computationally efficient but it assumes
a linear deformation through the beam thickness. The development of this
technique is described in the following paragraphs.
Let uy and vp represent the axial and lateral displacements of the k* layer
and let h be the beam thickness while hy and hy41 represent heights of the top
and bottom sides of the k*" layer measured from the bottom of the beam (see
Fig. 8.6.2). The relationship between the layer displacements and the global
beam displacements can be written as
ub, = eau} + cou} (8.6.4)
ub, = coud + cau (8.6.5)
ve =O (8.6.6)
ub, = cud + cou} (8.6.7)
ub a = esud + cauh (8.6.8)
Ub,2 = 02 (8.6.9)Section 8.7 Two-Dimensional Frame Element 259
where constants c’s are
h-h
a= (8.6.10)
h
a=e (8.6.11)
h-h
=H (8.6.12)
h
ca = “HH (8.6.13)
This relationship can be expressed in the matrix form
ub cr e000 On pet
uh 3400 0 01 [ul
mil | 0 0 1 0 0 0) |
wef = ]0 0 0 q e 0] Ju ee
tha 0 0 0 cs co Of |us
Oe 0000 01) by
or in a short notation
{a*) = (rita (86.18)
where {d*} and {d} are the displacement vectors of the k*” layer and the beam,
respectively. [7] is the transformation matrix shown in Eq. (8.6.14). Now, the
stiffness and mass matrices of a laminated beam element can be expressed as
be] = ere (8.6.15)
feed:
we) = Seren (8.6.16)
&
Here, [K*] and [M*] are the stiffness and mass matrices of the k** layer,
respectively. Using this technique, a single beam element can include all the
layers of a laminated beam.
Figure 8.6.3 illustrates a simply supported laminated beam with four
layers. The elastic modulus E} is assumed to be either 20 or 100 times greater
than E2. The finite element solutions are provided in Fig. 8.6.4. Figure 8.6.5
also shows the solutions for the same beam but with eight layers. t
8.7 Two-Dimensional Frame Element
A frame structure is made of many beam members connected together. It may
be of planar or spatial geometry. For a planar frame structure, each beam member is
generally subjected to both bending and axial loads as illustrated in Fig. 8.7.1. As a260 Beam and Frame Structures Chapter 8
Le
'P/2 P/e
Figure 8.6.3 Simply Supported Laminated Beam with Four Layers
*." EXACT solution
*** FEM solution
displacement, m.
*.* EXACT solution
*** FEM solution
displacement, m.
bo e+
ot
10 20 30 rn 80 @
length, m.
Figure 8.6.4 Static Deflections of the Laminated Composite Beam with 4 Layers:
E /E2=20, 100 for top and bottom
result, a planar (2-D) frame element must include both axial and bending deformation.Section 8.7 Two-Dimensional Frame Element 261
*-* EXACT solution
E001 + FEM solution
:
52.09
3
3
20,09]
1.
- 10 20 30 0 50 60
length, m.
x10"
*.* EXACT solution
"** FEM solution
0 10 2 40 50 60
0
length, m.
Figure 8.6.5 Static Deflections of the Laminated Composite Beam with 8 Layers:
E,/E2=20, 100 for top and bottom
If the deformation is small, we may neglect the coupling between the two deformations.
As a result, the element stiffness matrix for a 2-D frame element can be constructed by
superimposing both axial and bending stiffnesses. For example, the stiffness matrix
of a linear 2-D frame element is using Hermitian beam element
AP 0 0 -AP 0 0
0 lar GIL 0 -12I 6Il
0 el 41? 0 oll 2m?
-AP 0 Oe Ale 0 0
0 -12r -6Il 0 121-611
0 Git ai 0 -6ll 4IP
IK] = Zz (87.1)
for the element degrees of freedom {u; v1 0; tp U2 42} as seen in Fig. 8.7.2. Other
C° type beam elements may be used to develop a frame stiffness matrix.
In general, a beam member is inclined to the global coordinate system as
shown in Fig. 8.7.3. In this case, the element stiffness matrix requires the planar
transformation. Figure 8.7.4 shows two coordinate systems: local and global systems.262 Beam and Frame Structures Chapter 8
P P
PL
PL
B c B G
—
P
A A
Figure 8.7.1 A Planar Frame Structure with Free Body Diagrams
‘|
| Y Uv,
_==———
Figure 8.7.2 A Linear Frame Element
The global system is denoted by a superimposed bar on both coordinate axes and
displacements. The relation between the local and global displacements is
uy coe 00 0 01 fa,
n esc 0 0 0 01 |e
0 01 0 0 ol |e
wf = |o0 00 ¢ s 0| ja Co)
v2 000 -s ¢ 0| |e
0 02000 Oni ve,
where ¢ = cos and s = sin. In a short notation, Eq. (8.7.2) can be written as
{a°} = [THa} (8.7.3)
Then, the stiffness matrix for a planar frame element is expressed in terms of the
global coordinate system as given below:
(Ke) = EP] (8.7.4)
Carrying out the matrix multiplication gives
a3 a4 Oe seeere ei ere cree
a4 ag a7 a4 —ag a7
[kK] = | oF as Tar (8.7.5)
—a3 —G4 —ds a3 a4 —ds5
aq —dg —a7 a4 ag az
as a7 43 45 — a7Section 8.7 Two-Dimensional Frame Element
YU
VU
2 zu
Zu
Figure 8.7.4 Coordinate Transformation
where
ay = AEE
ol
2EI
a = ———
ao (A)2 + (BE)e
6EI
w= (%2)c
263
(8.7.6)
(8.7.7)
(8.7.8)
(8.7.9)
(8.7.10)
(8.7.11)
(8.7.12)264 Beam and Frame Structures Chapter 8
8.8 Three-Dimensional Frame Element
A beam member in a spatial (3-D) frame is generally subjected to axial, bending
and torsional loads as illustrated in Fig. 8.8.1. If beam members have circular cross-
sections, the element stiffness in a local axis is as seen in Fig. 8.8.2
Ki, Ke
K« i Fi 8.8.1
w= [ih ae]
where
a, 0 0 0 0 0
0 bh 0 0 by
Flo 0 ¢ 0 © oO
(Knl=|9 9 — oO (8.8.2)
ee eee ey
0 & 0 0 0 2%s
-a, 0 0 0 0 0
0 -bh O 0 0 by
eye 0 0 -a 0 -e 0
Hho 0 we oo (8.8.3)
0 0 co 0 cs (0
0 -b 0 0 0 b;
0 0 0 0 Oo
of oo 0 —b
-)./0 0 « 0 « 0
Kel=|9 9 0 a 0 0 (68.4)
0 0 @ 0 2% 0
0 -b, 0 0 0 2s
eo (8.8.5)
12EI, 6EI, 2E1,
ba, EE ya (88.8)
a= Eh y= Se, y= ME (88.7)
In these equations, Jy and I; are moments of inertia of the cross-section about y—
and z—axes and J is the polar moment of inertia. The corresponding element degrees
of freedom is
{d*} = {ur v1 wi 0: 62 83 ur v2 tw 05 04 85)” (8.8.8)
in which @; and 64 are the rotational degrees of freedom associated with the twisting
moment, and 62, 43, 0s and 8¢ are slopes associated with bending moments. This
stiffness matrix in terms of a local coordinate system needs to be transformed into
that in terms of the global coordinate system in the same way as shown in Eq. (8.7.4).
In this case, the transformation matrix [T] is of size 12 x 12.Section 8.9 MATLAB Application to Static Analysis 265
Figure 8.8.1 A Simply Supported Beam
Figure 8.8.2. Spatial Frame Element
8.9 MATLAB Application to Static Analysis
The static analysis of a beam or a frame is to solve the following matrix equation:
[K]{q} = {F} (8.9.1)
where the system stiffness matrix [K] and the system force vector {#} are obtained
by assembling each element matrix and vector. Several m-files are written to compute
an element stiffness matrix and a mass matrix, which is used for dynamic problems266 Beam and Frame Structures Chapter 8
100 0b
clement 12 3 4 |
gett {in
node7m 2 3 4 5 6
i | ii :
(| Cross section
Be10X 10 PS!
Figure 8.9.1 A Simply Supported Beam
in the next section, for various beam and frame elements formulated in this chapter.
The names of m-files are given below:
febeami.m : Hermitian beam element (see Sec. 8.1)
{febeam2.m : Timoshenko beam element (see Sec. 8.2)
febeam§.m : beam element with displacement degrees of freedom (see Sec. 8.3)
febeam4.m : mixed beam element (see Sec. 8.4)
feframe2.m: 2D frame element (see Sec. 8.7)
Detailed informations regarding these m-files are provided in Appendix A. The
following examples show computer programs for finite element analyses of beam and
frame structures written in MATLAB and the m-files described above.
Example 8.9.1 Figure 8.9.1 shows a simply supported beam whose length
is 20 in. The beam has also elastic modulus of 10 x 10° psi and its cross-section
is 1 in. by 1 in. The beam is subjected to a center load of 100 Ib. We use 5
Hermitian beam elements for one half of the beam due to symmetry to find the
deflection of the beam. Figure 8.9.1 shows the finite element discretization. The
constraints applied to this problem are no deflection at the left boundary support
(ie v1 = 0) and zero slope at the symmetric node (i.e. 05 = 0). Their system
degrees of freedom are 1 and 12, respectively, in the present mesh. Furthermore,
only a half of the center load is applied at the symmetric node because of
symmetry. The finite element analysis program for the present static problem is
listed below.
%
% BX891.m: MATLAB program to solve a static beam deflection using
% Hermitian beam elements
%
% Variable descriptions
% k = element stiffness matrixSection 8.9 MATLAB Application to Static Analysis
% kk = system stiffness matrix
% ff = system force vector
% index = a vector containing system dofs associated with each element
% bedof = a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
the dofs in bedof
% number of elements
% number of nodes per element
% number of dofs per node
nnode=(nnel-1)*nel-+1; % total number of nodes in system
ode*ndof; % total system dofs
% elastic modulus
% moment of inertia of cross-section
% length of a half of the beam
0/nel; % element length of equal size
% cross-sectional area of the beam
% mass density (arbitrary value for this problem because
% it is not used for the static problem)
% option for mass matrix (arbitrary value and not used here)
% first dof (deflection at left end) is constrained
% whose described value is 0
bedof(2)=12; % 12th dof (slope at the symmetric end) is constrained
% whose described value is 0
ff=2eros(sdof,1); % initialization of system force vector
er0s(sdof,sdof); % initialization of system matrix
=zeros(nnel*ndof,1); % initialization of index vector
50; % because a half of the load is applied due to symmetry
nel % loop for the total number of elements
=feeldofi(iel,nnel,ndof); _% extract system dofs for each element
k=febeam1(el,xi,leng,area,tho,ipt);_% compute element stiffness matrix
kk=feasmbl1 (kk,k,index); % assembly into system matrix
end
[kk,ff]=feaplyc2(kk,ff,bcdof,bcval); _-% apply the boundary conditions
fool=kk\ff; % solve the matrix equation
§-——_—________
% Analytical solution
1)*2;
c=P/(48*e*xi);
k=(i-1)*ndof+1;
esol(k}=c*(3*1"2-4*x"2)*x;
esol(k-+1)=c*(3#1°2-12*x"2);
end
%—
% Print both exact and fem solutions
267Beam and Frame Structures Chapter 8
function {k,m]=febeam1(el,xi,leng,area,tho,ipt)
%
% Purpose:
% Stiffness and mass matrices for Hermitian beam element
% nodal dof v; theta: v2 thetay
%
% Synopsis:
% [k,m]=febeam (el, xi,leng,area,tho,ipt)
%
% Variable Description:
% k - element stiffness matrix (size of 4x4)
% m - element mass matrix (size of 4x4)
% el - elastic modulus
% xi - second moment of inertia of cross-section
% leng - element length
% area - area of beam cross-section
% tho - mass density (mass per unit volume)
% ipt = 1: consistent mass matrix
% — 2 lumped mass matrix
% — otherwise: diagonal mass matrix
ae
%
% stiffness matrix
%
c=el*xi/(leng3);
k=c*[12 6*leng -12 6"leng;...
6*leng 4*leng? -6*leng 2*leng?;
-12 -6*leng 12 -6*leng;...
6*leng 2*leng? -6*leng 4*leng3];
%
% consistent mass matrix
tho*area*leng/420;
m*[156 22*leng 54 -13*len;
22*leng 4*leng? 13*leng -3*leng:
54 18"leng 156 -22*leng;...
-13+leng -3*leng? -22+leng 4*leng3];
%
% lumped mass matrix
%
elseif ipt==2Section 8.9 MATLAB Application to Static Analysis
ol
ros( 4,4);
mass=rho*area*leng;
ag({mass/2 0 mass/2 0));
m=
%
% diagonal mass matrix
ros(4,4);
mass=rho*area*leng;
m=mass*diag( [1/2 leng2/78 1/2 leng3/78]);
%
end
oe
The finite element solution obtained from this MATLAB program as well as the
exact solution are
store =
dof # femsol exact
1.0000 0.0000 0.0000 % deflection at node 1
2.0000 0.0030 0.0030 % slope at node 1
3.0000 0.0059 0.0059 % deflection at node 2
4.0000 0.0029 0.0029 % slope at node 2
5.0000 0.0114 0.0114 % deflection at node 3
6.0000 0.0025 0.0025 % slope at node 3
7.0000 0.0158 0.0158 % deflection at node 4
8.0000 0.0019 0.0019 % slope at node 4
9.0000 0.0189 0.0189 % deflection at node 5
10.000 0.0011 0.0011 % slope at node 5
11.000 0.0200 0.0200 % deflection at node 6
12.000 0.0000 0.0000 % slope at node 6
4 Example 8.9.2 We want to solve Example 8.9.1 using Timoshenko beam
elements. The computer program is almost the same as that given in Example
8.9.1. Instead of calling febeam1.m we need to call febeam2.m to compute the
element stiffness matrix. In the beginning of the program list shown in Example
8.9.1, we add
sh=3.8*10°6; % shear modulus of the beam
and the following line
k=febeami (el,xi,leng,area,rho,ipt);
is replaced by
269270
Beam and Frame Structures Chapter 8
k=febeam2(el,xi,leng,sh,area,tho,ipt);
The computed solution is also compared to the exact answer below.
store =
dof# femsol exact
1.0000 0.0000 0.0000 % deflection at node 1
2.0000 0.0030 0.0030 % slope at node 1
3.0000 0.0059 0.0059 % deflection at node 2
4.0000 0.0029 0.0029 % slope at node 2
5.0000 0.0113 0.0114 % deflection at node 3
6.0000 0.0025 0.0025 % slope at node 3
7.0000 0.0158 0.0158 % deflection at node 4
8.0000 0.0019 0.0019 % slope at node 4
9.0000 0.0188 0.0189 % deflection at node 5
10.000 0.0011 0.0011 % slope at node 5
11.000 0.0200 0.0200 % deflection at node 6
12.000 0.0000 0.0000 % slope at node 6
4 Example 8.9.3 This example again solves the same problem in Example
8.9.1 using beam elements with displacement degrees of freedom. This beam
clement is different from the beam elements used in previous examples. As a
result, the complete program is included in the following.
‘%
% EX893.m: MATLAB program to solve a static beam deflection using
% beam elements with displacement degrees of freedom only
%
% Variable descriptions
% k = element stiffness matrix
% kk = system stiffness matrix
% ff = system force vector
% index = a vector containing system dofs associated with each element
% bedof = a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
the dofs in bedof
% number of elements
% number of nodes per element
% number of dofs per node
nel-1)*nel-+1; % total number of nodes in system
sdof=nnode*ndof, % total system dofs
% elastic modulus
% shear modulus
% length of a half of the beamSection 8.9 MATLAB Application to Static Analysis
leng=10/nel; % element length of equal size
: % height of the beam
% width of the beam
% mass density (arbitrary value for this problem because
‘% it is not used for the static problem)
bedof(1)=3; % deflection at left end is constrained
beval(1): % whose described value is 0
bedof(2)=16; % inplane displ. at the right end is constrained
% whose described value is 0
bedof(3)=17; % inplane displ. at the right end is constrained
beval(3)=0; % whose described value is 0
ff=zeros(sdof,1); % initialization of system force vector
kk=zeros(sdof,sdof); % initialization of system matrix
eros(nnel*ndof,1); % initialization of index vector
% because a half of the load is applied due to symmetry
% loop for the total number of elements
index=feeldof1(iel,nnel,ndof); ‘% extract system dofs for each element
k=febeam3(el,sh,leng,heig,width,tho); % compute element matrix
kk=feasmbl1 (kk,k,index); % assembly into system matrix
end
[kk,ff]=feaplyc2(kk,ff,bedof,beval); -% apply the boundary conditions
fsol=kk\ ff; % solve the matrix equation
%
% Analytical solution
)*2;
/(48*e*xi);
k=(i-1)*ndof+1;
esol(k-+2)=c¥(3*1°2-44x"2)*x;
esol(k-+1)=c*(3*1"2-12*x"2)*(-0.5);
esol(k)=c*(3*1°2-12*x"2)*(0.5);
end
ee
% print both exact and fem solutions
Inum? fsol esol’)
function [k,m]=febeam3(el,sh,leng,heig, width,tho)
%—__—_
% Purpose:
% Stiffness and mass matrices for beam element with displacement
% degrees of freedom only
% nodal dof ue uf v; ub ub ve
%
271Beam and Frame Structures Chapter 8
% Synopsis:
% (km]=febeam | (el,sh,leng,heig,tho,area,ipt)
%
% Variable Description:
% k - element stiffness matrix (size of 6x6)
% m - element mass matrix (size of 6x6)
% el - elastic modulus
% sh - shear modulus
% leng - element length
% heig - clement thickness
% width - width of the beam element
% tho - mass density of the beam element (mass per unit volume)
% lumped mass matrix only
%
%
% stiffness matrix
%
al=(ch*leng* width)/(4*heig);
a2=(sh*heig* width) /leng;
a3=(el*heig* width) /(6*leng);
a4=sh*width/2;
k= [ a1+2*a3 -al+a3 a4 al-2*a3 -al-a3 -a4s...
-al+a3 al+2*a3 -a4 -al-a3 al-2*a3 a4;...
ad -ad a2 a4 -ad -a2;...
al-2*a3 -al-a3 a4 al+2*a3 -al+a3 -a4;.
-al-a3 al-2*a3 -ad -al+a3 al+2*a3 a
-ad ad -a2 -ad ad a2];
%
% lumped mass matrix
%
m=zeros(6,6);
mass=rho*heig*width*leng/4;
m=mass*diag([1 1211 2]);
ann
The solution output is
store =
dof # — femsol exact.
1,0000 0.0015 0.0015 % axial displ. at bottom side of node 1
2.0000 -0.0015 — -0.0015 % axial displ. at top side of node 1
3.0000 0.0000 0.0000 % transverse displ. at node 1
4.0000 0.0014 0.0014 % axial displ. at bottom side of node 2
5.0000 -0.0014 -0.0014 % axial displ. at top side of node 2
6.0000 0.0059 (0.0059 % transverse displ. at node 2
7.0000 0.0013 (0.0013 % axial displ. at bottom side of node 3
8.0000 -0.0013 -0.0013 % axial displ. at top side of node 3
9.0000 0.0113 0.0114 % transverse displ. at node 3
10.000 0.0010 0.0010 % axial displ. at bottom side of node 4Section 8.9 MATLAB Application to Static Analysis
11.000 -0.0010 += -0.0010 % axial displ. at top side of node 4
12.000 0.0158 0.0158 % transverse displ. at node 4
13.000 0.0005 0.0005, % axial displ. at bottom side of node 5
14.000 = -0.0005 = -0.0005 % axial disp|. at top side of node 5
15.000 0.0188 ~——0.0189 % transverse displ. at node 5
16.000 0.0000 0.0000 % axial displ. at bottom side of node 6
17,000 0.0000 0.0000 % axial displ. at top side of node 6
18.000 0.0199 0.0200 % transverse displ. at node 6
# Example 8.9.4 Solve the same example again using the mixed beam
elements. The computer program list is provided below.
%
% EX804.m: MATLAB program to solve a static beam deflection
% problem using mixed beam elements
%
% Variable descriptions
% k = element stiffness matrix
% kk = system stiffness matrix
% ff = system force vector
% index = a vector containing system dofs associated with each element
% bedof = a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
% the dofs in bedof
%e
nel=5; % number of elements
% number of nodes per element
ndof=2; % number of dofs per node
nnode=(nnel-1)*nel-+1; % total number of nodes in system
% total system dofs
% bending moment at node 1 is constrained
% whose described value is 0
% deflection at node 1 is constrained
% whose described value is 0
ff=zeros(sdof,1); % initialization of system force vector
kk=zeros(sdof,sdof); % initialization of system matrix
index=zeros(nnel*ndof,1); % initialization of index vector
% because a half of the load is applied due to symmetry
% \oop for the total number of elements
index=feeldofi(iel,nnelndof); _-% extract system dofs for each element
k=febeam4(10°7,0.083333,2,0,1,1,1); % compute element stiffness matrix
kk=feasmbl1 (kk, k,index); % assembly into system matrix
end
[kk, ff] =feaplyc2(kk, ff, bedof,beval); % apply the boundary conditionsBeam and Frame Structures Chapter 8
fsol=kk\ ff; % solve the matrix equation
%$——_——_—__—
% analytical solution
for i = I:nnode
2;
c=P/(48*e*xi);
)*ndof+1;
esol (k-+1)=c*(341°2-4*x"2)*x;
esol(k)=-50*x;
end
%&——
% print both exact and fem solutions
store=[num’ fsol esol’]
‘% —
function [k,m]=febeamd(el,xi,leng,sh,heig,tho,ipt)
%—
% Purpose:
% Stiffness and mass matrices for mixed beam element
% bending moment and deflection as nodal degrees of freedom
% nodal dof Mi v1 M2 v2
%
% Synopsis:
% [k,m]=febeam4(el,xi,leng,sh,heig,tho,ipt)
%
% Variable Description:
% k - element stiffness matrix (size of 4x4)
% m - element mass matrix (size of 4x4)
% el - elastic modulus
% xi - second moment of inertia of cross-section
% \eng - length of the beam element
% sh - shear modulus
% heig - beam thickness
% tho - mass density of the beam element (mass per unit volume)
% ipt = 1 - lumped mass matrix
% — = otherwise - diagonalized mass matrix
%
%
% stiffness matrix
%
if sh =:
%
% thin beam (no shear deformation)Section 8.9
%
MATLAB Application to Static Analysis
I/leng 0 -1/leng 0;...
leng/(6*el*xi) -1/leng leng/(3*el*xi) 1/leng;...
-I/leng 0 1/leng 0 J;
else
%
% thick beam (includes shear deformation)
%
a=6/(5*sh*leng*heig);
k= [ 1/(3*el*xi) +a 1/leng 1/(6*el*xi)
Tfleng 0 -1/leng 0;..
1/(6*el*xi)-a -1/leng 1/(3*el*xi)-+a 1/leng;...
-I/leng 0 i/leng 0 J;
%
end
%
% lumped mass matrix
%
if ip
%
m=zreros(4,4);
mass=rho*heig*leng/2;
m=diag([0 1 0 1);
% diagonal mass matrix
%
else
%
m=zeros(4,4);
mass=rhotheig*leng/2;
m=mass*diag({1 1 1 1));
%
end
%
[leng/(3*el*xi) 1 /leng leng/(6*el*xi) -1 /leng;...
-1/leng;...
The solution from the computer program is given below.
store =
dof #
1.0000
2.0000
3.0000
4.0000
5.0000
6.0000
7.0000
8.0000
fem sol
0.0000
0.0000
-100.00
0.0059
200.00
0.0114
-300.00
0.0158
exact
0.0000
0.0000
100.00
0.0059
200.00
0.0114
-300.00
0.0158
% bending moment at node 1
% deflection at node 1
% bending moment at node 2
% deflection at node 2
% bending moment at node 3
% deflection at node 3
% bending moment at node 4
% deflection at node 4
275276 Beam and Frame Structures Chapter 8
y
20 in
2 @ le»
1 in
Cross section
60 in
E=10X10° psi
( 4 elements at 15 in each)
Figure 8.9.2 An L-Shaped Frame
9.0000 -400.00 -400.00 % bending moment at node 5
10.000 0.0189 0.0189 % deflection at node 5
11.000 -500.00— -500.00 % bending moment at node 6
12.000 0.0200 0.0200 % deflection at node 6
4 Example 8.9.5 Find the deflection of a frame of L-shape (see Fig. 8.9.2)
which is made of two beams of lengths of 60 in. and 20 in., respectively. Both
beams have cross-sections of 2 in. height by 1 in. width, The elastic modulus is
30 x 10° psi. The frame is subjected to a concentrated load of 60 Ib at the end
of the smaller beam and one end of the long member is fixed. Use 6 elements to
find the deflection of the frame. The MATLAB program is written below using
2-D frame elements.
%
% EX895.m: MATLAB program to solve static deflection for a 2-D frame
%
% Variable descriptions
% x and y = global x and y coordinates of each node
% k = element stiffness matrix
% kk = system stiffness matrix
% ff = system force vector
% index = a vector containing system dofs associated with each element
% bcdof = a vector containing dofs associated with boundary conditions
% beval = a. vector containing boundary condition values associated with
% the dofs in bedof
%Section 8.9 MATLAB Application to Static Analysis
% number of elements
% number of nodes per element
% number of dofs per node
nnode=(nnel-1)*nel+1; % total number of nodes in system
sdof=nnode*ndof, % total system dofs
x(1)=0; y(1): % x, y coords, of node 1 in terms of the global axis
% x, y coords. of node 2 in terms of the global axis
% x, y coords. of node 3 in terms of the global axis
% x, y coords. of node 4 in terms of the global axis
% x, y coords. of node 5 in terms of the global axis
% x, y coords. of node 6 in terms of the global axis
% x, y coords. of node 7 in terms of the global axis
% elastic modulus
% cross-sectional area
% moment of inertia of cross-section
% mass density per volume (dummy value for static analysis)
% transverse deflection at node 1 is constrained
% whose described value is 0
% axial displacement at node 1 is constrained
% whose described value is 0
% slope at node 1 is constrained
% whose described value is 0
ff=zeros(sdof,1); % initialization of system force vector
r08(sdof,sdof); % initialization of system matrix
index=zeros(nnel*ndof,1); % initialization of index vector
% load applied at node 7 in the negative y direction
for iel=1: % \oop for the total number of elements
index=feeldofl (iel,nnel,ndof); % extract system dofs for each element
nodel=iel; % starting node number for element “ie!”
node2=iel+1; % ending node number for element ‘ie!’
nodel); v1:
‘nodel); % x and y coordinate values of ’nodel’
x2=x(node2); y2=y(node2); % x and y coordinate values of ’node2”
leng=sqrt((x2-x1)*2+(y2-y1)°2); % length of element ‘ie!’
if (x2-x1 % compute the angle between the local and global axes
beta=pi/2;
else
beta=atan((y2-y1)/(x2-x1));
end
k=feframe2(cl,xi,leng,area,tho,beta,1); % compute element matrix
kk=feasmbl1 (kk,k,index); % assembly into system matrix
end
{kk,f{]=feaplyc2(kk,ff,bedof,beval); _-% apply the boundary conditions
fsol=kk\ ff; % solve the matrix equation and print
% ae
% Print both exact and fem solutions
store=[num’ fsol]Beam and Frame Structures Chapter 8
%
function [k,m]=feframe?2(el,xi,leng,area,rho, beta ipt)
%
% Purpose:
% Stiffness and mass matrices for the 2-D frame element
% nodal dof u; vi theta; uz v2 thetag
%
% Synopsis:
% (k,m}=feframe2(el,xi,leng,area,tho,beta,ipt)
%
% Variable Description:
% k - element stiffness matrix (size of 6x6)
% m - element mass matrix (size of 6x6)
% el - elastic modulus
% xi - second moment of inertia of cross-section
% leng - element length
% area - area of beam cross-section
% rho - mass density (mass per unit volume)
% beta - angle between the local and global axes
% is positive if the local axis is in the ccw direction from
% — the global axis
‘% ipt = 1 - consistent mass matrix
% = 2- lumped mass matrix
% = 3-~ diagonal mass matrix
%
%
% stiffness matrix at the local axis
%
a=el*area/leng;
0 12%c 6*leng*c 0 -12* c 6*leng*c;...
0 G*leng*c 4*leng*2*c 0 -6*leng*c 2*leng“2*c;...
-200200;.,
0 -12%c -6*leng*c 0 12*c -6*leng*c;...
0 Gtleng*c 2*leng”2*c 0 -6*leng*c 4*leng”2*c];
%
% rotation matrix
%
t=[ cos(beta) sin(beta) 000
-sin(beta) cos(beta) 0 0 0 0}...
0010060;...
0.0 0 cos(beta) sin(beta) 0;.
0.0 0 -sin(beta) cos(beta) 03...
000001);
%
% stiffness matrix at the global axisSection 8.9 MATLAB Application to Static Analysis
%
kar'*kl*y;
% consistent mass matrix
%
if ip'
%
mm=rtho*area*leng/420;
ma=tho*area*leng/6;
ml=[2*ma 0 0 ma 0 03...
0 156*mm 22*leng*mm 0 54*mm -13*leng*mm;...
0 224leng*mm 4*leng"2*mm 0 13*leng*mm -3*leng”2*mm;...
ma 0 0 2*ma 0 0;...
0 54*mm 13*leng*mm 0 156*mm -22*leng*mm;...
0 -13*leng*mm -3*leng”2*mm 0 -22*leng*mm 4*leng”2*mm);
%
% lumped mass matrix
a
elseif ipt==2
%
ml=zeros(6,6);
mass=tho*area*leng;
ml=mass*diag({[0.5 0.5 0 0.5 0.5 0));
%
% diagonal mass matrix
%
else
%
ml=zeros(6,6);
mass=rtho*area*leng;
ml=mass*diag({0.5 0.5 leng”2/78 0.5 0.5 leng”2/78]);
end
%
% mass in the global system
%
m=r*ml*r,
%—
The finite clement solution is compared to the exact solution at some selected
nodes as given below:
store =
dof # — femsol —_ exact
1.0000 0.0000 0.0000 % horizontal displ. at node 1
2.0000 0.0000 0.0000 % vertical displ. at node 1
3.0000 0.0000 0.0000 % slope at node 1
4.0000 0.0068 % horizontal displ. at node 2
5.0000 0.0000 % vertical displ. at node 2
6.0000 —-0.0009 % slope at node 2
279280 Beam and Frame Structures Chapter 8
7.0000 0.0270 % horizontal displ. at node 3
8.0000 0.0000 % vertical displ. at node 3
13.000 0.1080 0.1080 % horizontal displ. at node 5
14.000 -0.0001 % vertical displ. at node 5
15.000 -0.0036 —-0.0036 % slope at node 5
16.000 0.1080 % horizontal displ. at node 6
17.000 -0.0386 % vertical displ. at node 6
18.000 0.0040 % slope at node 6
19.000 0.1080 0.1080 % horizontal displ. at node 7
20.000 -0.0801 0.0801 % vertical displ. node 7
21.000 -0.0042 -0.0042 % slope at node 7
8.10 MATLAB Application to Eigenvalue Analysis
Eigenvalue problems of a beam or a frame structure are solved using the finite
element method written in MATLAB programs. The m-files described in the previous
section compute both the element stiffness and mass matrices so that they are used
in the present programs in order to compute the natural frequencies of a beam or a
frame structure. To this end, we need to assemble element stiffness and mass matrices
into the system stiffness and mass matrices. One m-file used here is
feaplycs.m : application of constraints to both mass and stiffness matrices
This m-file modifies the eigenvalue matrix equation with given constraints. Instead
of redimensioning the matrix size because of the constraints, the original matrix size
is conserved. However, the modified eigenvalue matrix equation will contain fictitious
zero eigenvalues in the same number of the constraints. As a result, the user should
exclude these zero eigenvalues from the computer solution. Except for these, the
structure of computer programs is the same as that in examples in the last section.
The following examples show the computer programs written in MATLAB to compute
the natural frequencies.
4 Example 8.10.1 Find the natural frequencies of a free beam of unit
Jength. It has a cross-section 1 by 1 and it has also mass density of 1. The
elastic modulus of the beam is 12. All the units are consistent. Use 4 elements
to model the whole beam so that nonsymmetric mode shapes can be included.
Use Hermitian beam elements and consistent mass matrices. The computer
program is listed below:
%-
% EX8101.m: MATLAB program to find the natural frequencies of a freeSection 8.10 MATLAB Application to Eigenvalue Analysis
% beam using Hermitian elements
%
% Variable descriptions
% k = element stiffness matrix
% m = element mass matrix
% kk = system stiffness matrix
% mm = system mass matrix
% index = a vector containing system dofs associated with each element
% bcdof = a vector containing dofs associated with boundary conditions
vector containing boundary condition values associated with
the dofs in bedof
% number of elements
% number of nodes per element
% number of dofs per node
nnode=(nnel-1)*nel-+1; % total number of nodes in system
sdof=nnode*ndof; % total system dots
% elastic modulus
% moment of inertia of cross-section
% mass density
% total length of the beam
Jeng=tleng/nel; % uniform mesh (equal size of elements)
area=1; % cross-sectional area
i : % flag for consistent mass matrix
eros(sdof,sdof); % initialization of system stiffness matrix
mm=zeros(sdof,sdof); % initialization of system mass matrix
index=zeros(nnel*ndof,1); % initialization of index vector
for iel=1:nel % loop for the total number of elements
index=feeldofl(iel,nnel,ndof); _% extract system dofs for each element
[k,m]=febeam 1 (el,xi,leng,area,rho,ipt); % compute element matrices
kk=feasmbl1 (kk,k,index); % assembly of system stiffness matrix
mm=feasmbl1(mm,m,index); % assembly of system mass matrix
end
fsol=eig(kk,mm); % solve the eigenvalue problem
fsol=sqrt(fsol) % print circular frequencies
A— $e
The finite element solution is compared to the exact solution below:
mode # femsol = exact
0 0.0000 0.0000 % rigid body mode
a 0.0000 0.0000 % rigid body mode
2 22.400 22.373 % first non-zero circular frequency
3 62.060 61.673 % second non-zero circular frequency
4 121.86 120.90 % third non-zero circular frequency
5 223.29 178.27 % fourth non-zero circular frequency
‘As seen in the comparison, the two solutions agree well for lower frequencies.
However, the discrepancy becomes larger for higher natural frequencies. In order282
Beam and Frame Structures Chapter 8
to obtain more accurate higher modes, the finite element model should have a
refined mesh to represent the corresponding mode shapes properly. As a result,
if we want to improve the fourth non-zero frequency in this example, we need to
refine the mesh. t
Example 8.10.2 Find the natural frequencies of a cantilever beam whose
length is 1 m long. The beam has the cross-section of 0.02 m by 0.02 m and the
mass density is 1000 Kg/m®. The elastic and shear moduli are 100 GPa and 40
GPa, respectively. Use 4 elements. The MATLAB program is shown below.
%
% EX8102.m: MATLAB program to solve the natural frequencies of
% a beam using beam elements with displacement degrees of
% freedom only
%
% Variable descriptions
‘% k = element stiffness matrix
% kk = system stiffness matrix
% m = element mass matrix
% mm = system mass matrix
% index = a vector containing system dofs associated with each element
% bedot vector containing dofs associated with boundary conditions
% number of elements
% number of nodes per element
ndof=3; % number of dofs per node
nnode=(nnel-1)*nel-+1; % total number of nodes in system
sdof=nnode*ndof; % total system dofs
el=100*10°9; % elastic modulus
% shear modulus
% total beam length
% same size of beam elements
% height (or thickness) of the beam
% width of the beam
% mass density of the beam
% bottom inplane displ. at node 1 is constrained
bedof(2): % top inplane displ. at node 1 is constrained
bedof(3)=3; % transverse displ. at node 1 is constrained
kk=zeros(sdof,sdof); % initialization of system stiffness matrix
mm=zeros(sdof,sdof); % initialization of system mass matrix
index=zeros(nnel*ndof,1); % initialization of index vector
for iel=1:nel % loop for the total number of elements
index=feeldofl(iel,nnel,ndof); _% extract system dofs for each element
[k,m]=febeam3(el,sh,leng,heig,width,tho); _% compute element matrices
kk=feasmbli (kk,k,index); % assembly of system stiffness matrix
mm=feasmbl1(mm,m,index); % assembly of system mass matrixSection 8.10 MATLAB Application to Eigenvalue Analysis
end
[kk,mm]=feaplycs(kk,mm,bedof); % apply the boundary conditions
fsol=eig(Ikk,mm); % solve the matrix equation and print
fsol=sqrt(fsol)
%—
The natural frequencies obtained from the finite element program are compared
to the exact solutions
mode # fem sol —_exact
1 200.00 203.00 % first circular natural frequency
2 1260.0 1272.0 % second circular natural frequency
3 4040.0 3562.0 % third circular natural frequency
Example 8.10.3 Find the natural frequencies of a frame of L-shape which
is made of two beams of length of 1 m each as seen in Fig. 8.9.2. Both beams
have cross-sections of 0.01 m by 0.01 m. The elastic modulus is 100 GPa. The
beam has mass density of 1000 Kg/m*. Use 10 elements.
%
% EX8103.m: MATLAB program to find the natural frequencies for a 2-D
% frame using frame elements
%
% Variable descriptions
% x and y = global x and y coordinates of each node
% k = element stiffness matrix
% kk = system stiffness matrix
% m = clement mass matrix
% mm = system mass matrix
% index = a vector containing system dofs associated with each element
% bedof = a vector containing dofs associated with boundary conditions
% number of elements
% number of nodes per clement
% number of dofs per node
nel-1)*nel+1; % total number of nodes in system
node*ndof; % total system dofs
x(1)=0; y(1 % x, y coord. of node 1 in terms of the global axis
% x, y coord. of node 2 in terms of the global axis
% x, y coord. of node 3 in terms of the global axis
% x, y coord. of node 4 in terms of the global axis
% x, y coord. of node § in terms of the global axis
% x, y coord. of node 6 in terms of the global axis
% x, y coord. of node 7 in terms of the global axis
% x, y coord. of node 8 in terms of the global axis
% x, y coord. of node 9 in terms of the global axis
283284 Beam and Frame Structures
el=100*10°9;
Chapter 8
; % x,y coord. of node 10 in terms of the global axis
% x, y coord. of node 11 in terms of the global axis
% clastic modulus
area=0.0001; % cross-sectional area
xi:
8.3333*10°(-10); % moment of inertia of cross-section
% mass density per volume
% transverse deflection at node 1 is constrained
% axial displacement at node 1 is constrained
% slope at node 1 is constrained
% initialization of system stiffness matrix
% initialization of system mass matrix
eros(nnel*ndof,1); % initialization of index vector
‘1:nel % loop for the total number of elements
index=fecldofl(iel,nnelndof); _% extract system dofs for each element
% starting node number for element ’iel’
% ending node number for element ’iel’
% x and y coordinate values of ’nodel’
% x and y coordinate values of ’node2’
leng=sqrt((x2-x1)"2+(y2-y1)°2); % length of element ‘ie!’
if (x2-x1)==0; — % compute the angle between the local and global axes
beta=pi/2;
else
beta=atan((y2-y1)/(x2-x1));
end
[k,m]=feframe2(el,xi,leng,area,tho,beta,1); % element matrix
kk=feasmbl1 (kk,k,index); % assembly of system stiffness matrix
mm=feasmbl1(mm,m,index); % assembly of system mass matrix
end
[kk,mm]=feaplycs(kk,mm,bedof); % apply the boundary conditions
fsol=eig(kk,mm); % solve the matrix equation and print
fsol=sqrt(fsol)
%
‘The numerical solutions are
mode # fem sol.
1 34 % first circular natural frequency
2 92 % second circular natural frequency
3 455 % third circular natural frequency
4 667 % fourth circular natural frequency
8.11 MATLAB Application to Transient Analysis
In the transient analysis of a structure, the equation of motion at time t is
[MI{d}‘ + [C}{dy + Ka}! = {FY
(8.11.1)Section 8.11 MATLAB Application to Transient Analysis 285
where [M], [C] and [K] are the system mass, damping, and stiffness matrices and they
are assumed to be independent of time. Superscript t denotes time. We will present
the direct time integration scheme to solve Eq. (8.11.1). There are many integration
techniques which can be applied to the matrix equation, Readers may refer to Refs
[16-18]. In this section, the central difference scheme is explained because it is one of
the most popular techniques in the structural mechanics application.
‘There are two versions of the central difference scheme. The first method is
summarized below. Detailed derivation of this technique is provided in (16].
1. Compute system matrices like [M], [C], and [K].
2. Solve for the initial acceleration {d}° from
{a}° = [M}"? ({F}° — [C]{a}° — [K]{4}°)
where {d}° and {d}° are the initial displacement and velocity vector.
3. Compute the fictitious displacement at time At from
{d}~4* = {d}° — (As){dy? + 4 (a)?
4, Compute the effective mass matrix.
[M1] = ail] + zaq(C]
5. Repeat 6 through 9 for each time step.
6. Compute the effective force vector.
{F}t = {F}' — ((K] ~ dalM)){u}! — (gM) — sag [C]) {a}
7. Find the displacement at time t + At from
{d}ttat ale [Fy
8. Find the acceleration at time t.
{d}' = gia({a}tt — 2{d} + {a} 44)
9. Find the velocity at time t.
{a} = ha(taytt4t ~ {ayers
where At is the time step size.
‘The second form of the central difference scheme, called summed form [19], is described
below.
1. Repeat 2 through 4 for each time step.
2. Compute the acceleration.
{d}t = [MI-({F} — [C]{d}* — [K]{4}*)
3. Compute the velocity from the acceleration.
{dyt+0-5at — {dyt-0.50 4 At(dyt
4. Compute the displacement from the velocity.
{d}itOt = {a}t 4 At{d}tto-sat
‘The both central difference techniques are conditionally stable. The critical time step
size for stability is
Aterst = Fain (8.11.2)
where Tmin is the smallest period of the discretized system with finite degrees of
freedom. Therefore, the time step size At must be smaller than or equal to this
critical size to maintain numerical stability.
Comparison of the two central difference techniques are discussed below.
(1) ‘The first technique computes nodal displacements, velocities, and accelerations
at the same time steps while the second technique computes them at different time286 Beam and Frame Structures Chapter 8
steps. That is, nodal displacements and accelerations are determined at the same time
steps but velocities are found at the middle of the time steps. As a result, in order
to compute both kinetic and strain energies, for example, at the same time step, an
interpolation technique is used for the second central difference scheme to have both
displacements and velocities at the same time steps.
(2) The first technique does not have to calculate nodal velocities and accelerations
to march along the time if a user does not need them. On the other hand, the second
technique needs to computes all of them to progress along the time.
(3) In terms of computer programming, the second method is much easier than the
first method.
(4) Both techniques require initial solutions at some fictitious time steps. The first
scheme needs the displacements at time —At while the second requires the velocities
at time —0.5A¢ to initiate the computations. The first technique has the consistent
way to determine the solution at the fictitious time step but the second technique does
not have that. Hence, the first technique can be used to find the velocity solution
at the fictitious time step for the second technique and the procedure for the second
scheme is used after that. In other words, we compute {d}~“ from the first central
difference technique. Then the fictitious velocity vector {d}-°*4* is obtained from
jy-o.sas _ {a}? — {dh
{dyosat = SO (8.11.3)
Numerical experimentation was conducted in Ref. [30]. Both central difference
schemes were applied to a crack propagation problem. The study showed that
solutions from the both schemes were almost identical. In the study, the fictitious
velocity for the second technique was assumed to be the same as the initial velocity
at time 0. The solution obtained with this assumption and the second method was
almost identical to the solution from the first method. The following example shows
the second central difference scheme applied to a beam problem.
# Example 8.11.1 Find the transient response of a cantilever beam whose
length is 1 m long. The beam has the cross-section of 0.02 m by 0.02 m and
the mass density is 1000 Kg/m*. The elastic modulus is 100 GPa. The beam
is initially at rest and subjected to a constant tip load of 100 N at time 0.
‘The following computer program uses the second central difference method to
determine the transient response. Four Hermitian beam elements are used. The
critical time step size for this finite clement system is 1.149 x 10~* sec. The
program uses At = 1 x 1074 sec. The program is listed below.
ee
% EX8111.m: MATLAB program to find the transient response
% of a cantilever beam with a tip load
%
% Variable descriptions
% k = element stiffness matrix
% kk = system stiffness matrixSection 8.11 MATLAB Application to Transient Analysis
% m = clement mass matrix
% mm = system mass matrix
% index vector containing system dofs associated with each element
% bedof = a vector containing dofs associated with boundary conditions
% acc = acceleration of nodal variables
% vel = velocity of nodal variables
% disp = displacement of nodal variables
%-
% number of elements
% number of nodes per element
% number of dofs per node
nnode=(nnel- 1)*nel-+1; % total number of nodes in system
sdof=nnode*ndof; % total system dofs
el=100*10°9; % elastic modulus
tleng=1; % total beam length
leng=tleng/nel; % same size of beam elements
xi=0.02°4/12; % height (or thickness) of the beam
area=0.004; % cross-sectional area of the beam
% mass density of the beam
ipt=1; % option flag for mass matrix (consistent mass matrix)
dt=0.0001; % time step size
i % initial time
% final time
% number of time steps
% number of constraints
% transverse displ. at node 1 is constrained
% slope at node 1 is constrained
kk=zeros(sdof sdof); % initialization of system stiffness matrix
mm=xeros(sdof,sdof); % initialization of system mass matrix
force=zeros(sdof,1); % initialization of force vector
index=zeros(nnel*ndof,1); % initialization of index vector
acc=zeros(sdof,nt); % initialization of acceleration matrix
08 (sdof,nt); % initialization of velocity matrix
-zeros(sdof,nt); ‘% initialization of displ. matrix
vel(:,1)=zeros(sdof,1); % initial zero velocity
disp(:,1)=zeros(sdof,1); % initial zero displacement
force(9)=100; % tip load of 100
for iel=1:nel % loop for the total number of elements
index=feeldof1 (iel,nnel,ndof); % extract system dofs for each element
[k,m]=febeam1(el,xi,leng,area,tho,ipt); % compute element matrices
kk=feasmbl1(kk,k,index); % assembly of system stiffness matrix
mm-=feasmbl1(mm,m,index); % assembly of system mass matrix
end
mminy=inv(mm); % invert the mass matrix
% central difference scheme for time integration
mt % time integration loop
it)=mminy* (force-kk*disp(;,it)); % compute acceleration
% application of constrained conditions
287288 Beam and Frame Structures Chapter 8
for i=1:nbe % loop for number of constraints
ibe=bedof(i); % nodal dof where constraint is applied
acc(ibe,it)=0; % acceleration at the constrained dof set to 0
end
+1)=vel(:,it) +acc(:,it)*dt; % compute velocity
disp (:,it+1)=disp(;,it)+vel(:,it +1) *dt; % compute displacement
end
ace(:,nt-+1)=mminv*(force-kk*disp(:,nt+1)); % accel. at last time step
%— Se
% plot of the tip deflection
plot(time,disp(9,;:))
xlabel("Time(seconds)’)
ylabel(’Tip displ. (m)’)
%—
The plot of the tip deflection is shown in Fig. 8.11.1. The tip deflection shows
an oscillation around the static deflection. Figure 8.11.1 also shows the same
deflection when the time step size is 1.15 x 1074. Because the time step size is
larger than the critical step size, the deflection becomes unstable and diverges.
t
8.12 MATLAB Application to Modal Analysis of Undamped System
In this section, the dynamic analysis of multiple degrees of freedom systems
is presented and applied to beam structure examples. The multiple degrees of
freedom systems are quite different from single degrees of freedom systems in terms
of mathematical formulations and associated time responses. For multiple degrees of
freedom system, we define modes which represent each component of overall dynamic
responses. The modes are essential in describing the nature of motion and provide
physical understanding of the dynamic behavior of the system.
The modes are characterized by so-called eigenvalues and eigenvectors of the
system. The eigenvaules are related to usually natural frequencies and eigenvectors
to mode shapes of the given system. Unfortunately, these eigenvalues and eigenvectors
are limited mostly to linear systems. This limitation is not significant, in fact, the
majority of the dynamic systems are represented by linear systems. There are also
plenty of computer software tools available to linear system analyses.
Some key concepts are introduced in this section including a solution technique
for cigenvalue/eigenvector problems, which is sometimes called the modal analysis.
‘The time response of a system is obtained in a straightfoward manner once the modal
analysis results are ready. We consider an undamped system here and a damped
system is discussed in the subsequent section.Section 8.12 Modal Analysis of Undamped System 289
Te displ. (m)
Rooe ae
e
04
‘Time(seconds)
Tip dispt. (m)
of 02
‘Time(seconds)
Figure 8.11.1 Time Responses using Central Difference Method
For a given n degree of freedom linear second order system, the governing
differential equation of motion is described by the second order matrix equation as
(MI{d} + (K] {d} = {F} (8.12.1)
We seek to find the natural motion of the system, i.e. response without any forcing
function. The form of response or solution is assumed as
{d(t)} = {a} e** (8.12.2)
where {4} is the mode shape (eigenvector) and w is the natural frequency of the
motion. In other words, the motion is assumed to be purely sinusoidal due to zero
damping in the system. The general solution turns out to be a linear combination of
each mode as
{d(i)} = erro" + co{da}eet + ---+ en{dn ent (8.12.3)
where each constant(c;) is evaluated from initial conditions. Substituting Eq. (8.12.2)
into Eq. (8.12.1) with {F} = 0 yields [31,32]
(-w?[M] + [K]){d}el" = 0 (8.12.4)
The above equation has a nontrivial solution if (—w?[M] + [K]) becomes singular. In
other words, there exist n number of ws which satisfy
|= 4?[M) + [AJ] = | — AM] + [KJ] =0 (8.125)290 Beam and Frame Structures Chapter 8
where A = w? is the eigenvalue of the system. Equation (8.12.5) produces solutions,
w},w3,...,w2. Since the mass matrix is positive definite and the stiffness matrix is
at least positive semidefinite, all w;s are nonnegative. This can be easily proven from
w[M]{ $i} = (K] {60} (8.12.6)
for the i eigenvalue and eigenvector. Let us multiply {4:}7 on both sides of the
equation
oP {bs} IMO.) = {60} KOs} (8.12.7)
According to the general property of mass and stiffness matrix in the form
{x}"[M]{x} > 0, {x}"[K]{x} >0 for {x} #0
In addition, the eigenvectors are orthogonal to each other, which can be easily shown
from
wP[M]{ds} = [KV b} (8.12.8)
a3 [M]{4j} = [K]{ 65} (8.12.9)
For proof, we premultiply {¢;}7 on both sides of Eq. (8.12.8) and subtract the
transpose of Eq. (8.12.9) which is post-multiplied by {di}. The result becomes
(w} — 9} ){O5} IM Gi} = (45) LANG} — (45) [A] {06} = 0 (8.12.10)
Therefore, if i # j
{6;}(MI{4s} = {45}? [KI{i} = 0 (8.12.11)
and the eigenvectors are orthogonal with respect to the mass and stiffness matrices.
The above orthogonality property includes systems with non-repeated rigid body
degrees of freedom. For multiple rigid body modes, for example a three dimensional
translational motion, a special form of orthogonality exists (see Ref. [16] for the
special form). Orthogonality of eigenvectors in conjunction with positive and positive
semidefiniteness of mass and stiffness matrices of a vibrational system is one of the
distinct features of linear dynamic systems.
The orthogonality of eigenvectors provides a useful normalization technique in
the form
{bi} IMHO} =1, {45} [KM{0s} = 0? (8.12.12)
Once the eigenvectors are normalized, the following coordinate transformation is
proposed
{d} = (®] {n} (8.12.13)
where
[2] = [61, $2, ---s bal (8.12.14)
is called modal matriz whose columns consist of normalized eigenvectors, and {n} =
[n1,72)-.-)m]” is the vector of modal coordinates. Substitution of Eq. (8.12.14) into
Eq. (8.12.1) yields
(MI[O]{n) + [X18] {n} = (F} (8.12.15)Section 8.12 Modal Analysis of Undamped System 291
Next, we premultipy &7 on both sides of Eq. (8.12.15), so that
[8]? Min} + [8] [KIA] {n} = 07 (F} (8.12.16)
According to the orthogonality in Eq. (8.12.12), Eq. (8.12.16) can be rewritten as
{n} + diaglu?] {n} = 87 {F} = {fi} (8.12.17)
In other words, the system of equations are decoupled.
tie tw Pn = fi (8.12.18)
where i = 1,2,...,n, and f; is the i** row of 67{F}. Equation (8.12.18) represents the
modal coordinate form of equations of motion, for which each independent vibrational
mode is described by a decoupled second order differential equation. The modal
coordinate equations are so useful since they provide the analytical solution for each
mode. Also, the input function into the i** modal coordinate (f;) represents how
much the mode is excited from the external input.
4 Example 8.12.1 Consider a Euler-Bernoulli beam model with one end
fixed asin Fig. 8.12.1. For simplicity, the beam is modeled by two finite elements
using the consistent mass matrix. The numerical data for the structure are p
(linear mass density)=0.024 kg/m, EJ= 6.09 N-m?, and D=1.27 m. AMATLAB
m-file called femodal.m produces the following mass and stiffness matrices after
applying the boundary condition
0.0929 0 0.0161 -0.0967
0 1.4881 0.0967 ~0.5580
(I= 0161 0.0967 0.0464 ~0.1637
—0.0967 -0.5580 -—0.1637 0.7440
and
0.0052 0 —0.0026 0.0326
[kK] = 104 x 0 1.0880 -0.0326 0.2720
—0.0026 -0.0326 0.0026 —-0.0326
0.0326 0.2720 0.0326 0.5440
‘The corresponding degrees of freedom for these matrices are {v1 01 v2 62} as
shown in Fig. 8.12.1. The natural frequency and modal matrix are computed
from the MATLAB function file femodal.m as follows
1 3.6692 1.3594 ~2.9157 —0.4570 1.9102
we | _ } 23.1786 [8] = —0.0931 0.0351 0.6871 0.7852
w3{ ) 78.3943 [* ~ | 4.0089 4.0304 4.4925 7.5441
w4 227.5337 —0.1102 0.3890 -0.8665 2.9165292 Beam and Frame Structures Chapter 8
<
S
il
4
SSS
Figure 8.12.1 Two Elements Beam Model
and the modal input force matrix
[®]" {F} = [-4.0039 4.0394 — 4.4995 7.5441)"
where the original input influence matrix is given by
{F}=[0 01 of”
‘The MATLAB source file is provided below as a reference
function [Omega,Phi, ModF]=femodal(M,K,F);
%o
% Purpose
% ‘The function subroutine femodal.m calculates modal parameters
h for a given structural system. It calculates natural frequency and
% eigenvector. The eigenvectors are normalized so that the modal
% mass matrix becomes an identity matrix.
%
% Synopsis:
% — (Omega, Phi, ModF]=femodal(M,K,F)
%
% Variable Description:
% Input parameters -
h M, K - Mass and stiffness matrices
% F - Input or forcing function
% Output parameters -
% Omega - Natural frequency(rad/sec) in ascending order
% Phi - Modal matrix with each column corresponding to
% the eigenvector.
% ModF - Modal input matrices.
————
disp(’ ’)
disp(’Please wait! - The job is being performed.’)Section 8.12 Modal Analysis of Undamped System 293
% Btseacsiaeeaetecnte ates eee EEEESE
% Solve the eigenvalue problem and normalized the eigenvectors
O———————————————_—_—————————
[n,n]=size(M);[n,m]=size(F);
[V,D]=cig(K,M);
[lambda,k]=sort(diag(D)); V=V(:k)s
Factor=diag(V*M*V);
Phi=V*inv(sqrt(diag(Factor)));
Omega=diag(sqrt(Vnorm’*K*Vnorm));
Modf=Vnorm”*F;
%e
Note that each modal coordinate or finite element degree of freedom can be taken
as the output variables of femodal.m
t
In order to find out the solution to Eq. (8.12.18), the Laplace transformation
technique is used.
(0) + (0) ’
nafs) = HO + HO), fils)
aot | ar (8.12.19)
where 7;(0) and %(0) are related to the initial conditions as explained below. Taking
the inverse Laplace transform of Eq. (8.12.19) yields the time domain solution
)
U3
wy
;
mult) = ni(O)cosuit + 9 sinwit + i A sinui(t —r)fi(r\dr (8.12.20)
oi
‘As one might have expected, the solution consists of two parts: i) excitation by initial
condition and ii) response due to the external forcing input, The convolution integral
in the solution is not easy to evaluate in general, except for some special cases such
as impulse and step inputs.
‘As shown above the initial conditions (7(0), 1(0)) for the modal coordinate
are needed for the complete solution. This information can be directly obtained from
the original transformation equation, Eq. (8.12.13). That is,
{d(0)} = [8] {n(0)} (8.12.21)
so that
{n(0)} = [©]? (Mf) {4(0)} (8.12.22)
Similarly
{4(0)} = [6 Lanta) {410} (8:12.23)
Now the solution of each modal coordinate is combined together to produce the
solution in physical coordinates.
{d(t)} = [8] {n()} (8.12.24)294 Beam and Frame Structures Chapter 8
ee
ee
i
1,
025 0.1 02 03 04 06 O7 0.8 og 1
05
Time(sec)
Response at the tip
a
Vertical displacement
¢
$6
=
05 06 07 08 08 1
Time(sec)
Figure 8.12.2 Impulse Responses by Modal Analysis
In other words,
a(t) = S> bing (t), for i=1,2,...,n (8.12.25)
j=l
# Example 8.12.2 _ In this example, the same model is used as in Example
8.12.1 to demonstrate the evaluation of impulse response of the beam. The
impulsive force is applied at the tip of the beam. The analytical solution,
Eq. (8.12.20), is incorporated into a MATLAB m-file feiresp.m. The initial
conditions, {d(0)} and {d(0)} are set to zero.
‘The time response results are presented in Fig. 8.12.2. Note that the response
time interval is so critical to show higher modes in the response. If the time
interval is too large, higher modes will not show up in the response. This issue
will be discussed later in frequency response analysis in Sec. 8.14.
The source MATLAB m-file is presented below:
function [eta,yim]=feiresp(M,K,F,u,t,C,q0,dq0);
Ps
% Purpose:
% — The function subroutine feiresp.m calculates impulse response
% — for a given structural system using modal analysis. It uses modal
% — coordinate equations to evaluate modal responses anaytically, then
% convert modal coordinates into physical responses
%Section 8.12 Modal Analysis of Undamped System 295
Synopsis:
[eta, yim]=feiresp(M,K,F,u,t,C,q0,dq0)
Variable Description:
Input parameters -
M, K - Mass and stiffness matrices
F - Input or forcing function
u- Index for excitation
+ - Time period of evaluation
C- Output matrix
0, dq0 - Initial conditions
Output parameters -
eta - modal coordinate response
yim - physical coordinate response
RRM Me ae a ST ak a a
disp(’”)
disp(’Please wait
ee
% Solve the eigenvalue problem and normalized the eigenvectors
ee
[n.n]=size(M);[n,m]=size(F);
ine (”);
J=cig(K,M);
flambda,k]=sort(diag(D)); V=V(k);
ag(V*M*V);
V*inv (sqrt(diag(Factor)));
omega=diag(sqrt(Vnorm’*K*Vnorm));
Fnorm=Vnorm’*F;
oo
% Find out impulse response of each modal coordinate analy tically
_————— ee
norm”*M%q0; detad:
n phase=omega(i)*t;
ta0(i)*cos(phase’)-+deta0(i)*sin(phase’)/omega(i)+...
sin(phase’)*Fnorm(i,u);
end
% Convert into physical coordinates
yim=C*Vnorm*eta’;
%
- The job is being performed:”)
‘norm’*M*dq0; eta=zeros(nstep,n);296 Beam and Frame Structures Chapter 8
8.13 MATLAB Application to Modal Analysis of Damped System
For an degree of freedom system with inherent damping, the governing equation
of motion can be written as
(Md) + (1d) + [KI{d} = {F) (8.13.1)
where [C] is a n by n damping matrix. The above system is stable due to the
introduction of the damping term as explained below. The damping can be classified
into inherent structural damping or damping by active control. The stability of the
above system can be discussed by taking the total energy(kinetic plus potential) of
the system
U = FAT ned) + Hae (8.13.2)
Assuming free vibration with {F}=0, the time rate of change of U becomes
oF = tanta + 1K) (6.13.3)
furthermore, using Eq. (8.13.1)
@ = ay (0Ktd} (8.13.4)
Therefore, as long as the damping matrix [C] satisfies
{d}[Cl{d} > 0, for {d} #0 (8.13.5)
it follows
& <0 (8.13.6)
and the system is stable with respect to the equilibrium state ({d},{d}) = (0,0).
Estimating the damping matrix for a physical system is not easy in general. ‘There
are some methods of modeling the damping matrix. One of the special cases is to use
so-called proportional damping or Rayleigh damping in the form
[C] = o[M] + 61K] (8.13.7)
where a and f are constants. In other words, the damping matrix is proportional
to the mass and/or stiffness matrix. The proportional damping has an advantage of
possessing the same characteristic as the mass or stiffness matrix. The eigenvectors
obtained from the mass and stiffness matrices conserve orthogonality with respect to
the damping matrix. That is
{JIC} =0, for 145 (8.13.8)
and []7 [C][®] becomes a diagonal matrix. Now, the original governing equation, Eq.
(8.13.1), can be rewritten in the modal coordinate form
ik + awit twin = fi (8.13.9)Section 8.13 Modal Analysis of Damped System 297
Application of the Laplace transform yields
mi(O) + (8 + 2s mi(0) + Fils)
(8) = (62 + wis +0?)
(8.13.10)
‘The inverse Laplace transform of n;(s) becomes
&
nit) =ni(O)e"S**coswat + (f(0) — ni(0))e~%"** sin(wat)
i
+ + eS) ginwa(t — 7) f(r)dr (8.13.11)
a Jo
where wa = wi/1— G is the damped natural frequency and w; is the undamped
natural frequency. In most practical cases, the modal damping ratio ¢; is less than
unity so that the damped natural frequency is smaller than the undamped natural
frequency. The modal coordinate solution in Eq.(8.13.11) can be used to produce the
solution of the physical coordinates
{d(t)} = [®1{n(@)} (8.13.12)
where [6] is the modal matrix obtained from the damped system.
4 Example 8.13.1 In this example, we test the impulse response of a damped
system. The system damping matrix is assumed as a proportional damping,
and the mass and stiffness matrices are the same as in Example 8.12.1. The
proportional constants are chosen as @=0.2, =0.005. The same unit impulsive
force at the tip, as in Example 8.12.1, is applied. A MATLAB fediresp.m file is
written as presented below.
The simulation results are presented in Fig. 8.13.1. They show the damped
responses at the two different positions of the beam.
function [eta,yim]=fediresp(M,K,F,u,t,C,q0,dq0,a,b);
xz
% Purpose:
% — The function subroutine fediresp.m calculates impulse response
% for a damped structural system using modal analysis. It uses modal
% coordinate equations to evaluate modal responses anaytically, then
% convert modal coordinates into physical responses
Synopsis:
[eta, yim]=fediresp(M,K,F,u,t,C,q0,dq0,a,b)
RRL
ee
Variable Description:
% Input parameters : M, K - Mass and stiffness matrices
F - Input or forcing influence matrix
u- Index for excitation
RR298 Beam and Frame Structures Chapter 8
x10" Middle response
2 - —
i
8 Wer}
3 |
ee ae 1012141818 20
Timetsoe)
Ar Tip response
Vertical displacement
oy
2
rs
of
*
|
5 12 14 16 18 20
10
Time(se0)
Figure 8.13.1 Impulse Responses for a Damped System
% t - Time of evaluation
% u - Index for the excitation
% C - Output matrix
% 40, dq0 - Initial conditions
% a, b- Parameters for proportional damping [C]=a[M]+b[K]
% Output parameters : eta - modal coordinate response
% yim - physical coordinate response
%
disp(’ ’)
disp(’Please wait!! - The job is being performed.’)
6—
% Solve the eigenvalue problem and normalized the eigenvectors
%— ee =
{n,n]=size(M);[n,m]=size(F);
nstep=size(t’)};
[V,D}=eig(K,M);
[lambda,k]=sort(diag(D)); % Sort the cigenvaules and eigenvectors
=V(:,k);
Factor=diag(V*M*V);
Vnorm=V*inv(sqrt(diag(Factor))); % Eigenvectors are normalized
omega=diag(sqrt(Vnorm’*K*Vnorm)); % Natural frequencies
Fnorm=Vnorm’*F;
———————————
% Compute modal damping matrix from the proportional damping matrix
%
Modamp=Vnorm’*(a*M-+b*K)*Vnorm;Section 8.14 Frequency Response Analysis 299
zeta=diag((1/2)*Modamp*inv(diag(omega)))
if (max(zeta) >= 1),
disp(’Warning - Maximum damping ratio is greater than or equal to 1’)
disp(’You have to reselect a and b ’)
pause
disp(‘If you want to continue, type return key’)
end
eta0=Vnorm’*M*q0; % Initial conditions for modal coordinates
deta0=Vnorm’*M*dq0; % - both displacement and velocity
eros(nstep,n);
mm % Responses are obtained for n modes
-omega(i)*sqrt(1-zeta(i)"2);
phase=omegad*t;
tcons=zeta(i)*omega(i)*t;
eta(:,i)=exp(-tcons)’.*(eta0(i)*(cos(phase’)+-zeta(i)/sqrt(1-zeta(i)"2)*...
sin(phase’))-+deta0 (i)*sin(phase’) /omegad+sin(phase’)*Fnorm(i,u)...
/omegad);
end
% ee
% Convert modal coordinate responses to physical coordinate responses
————————
yim=C*Vnorm*eta’;
%
8.14 MATLAB Application to Frequency Response Analysis
‘The previous modal analysis of a system is mainly based upon the time domain
approach. ‘The eigenvalues and eigenvectors directly produce solutions in time domain
in the form of time response functions. Modal coordinates make it possible to derive
sets of decoupled equations of motion. Each individual modal coordinate solution is
combined to result in the physical coordinate solution. The modal analysis provides
very convenient tools for understanding behavior of multiple degrees of dynamic
systems.
Sometimes, the time domain analysis is not the best choice, especially for modal
testing and other applications. One supplementary approach is the frequency domain
analysis. The frequency domain method has major advantages over the counterpart,
ie., time domain analysis. In fact, it is being more widely adopted in signal processing,
active control system design, modal testing, etc.
Most of the vibrational systems can be characterized by their inherent frequency
components which dictate both time and frequency responses. One key advantage of
the frequency domain analysis is that one can span a whole range of frequencies
which is not possible or impractical in the time domain analysis. Conversion of time
domain signals into frequency domain signals and vice versa is relatively easy due300 Beam and Frame Structures Chapter 8
to the modern computational power. In this section, discussion on the frequency
domain analysis is presented. The Fast Fourier Transform (FFT) and evaluation of
the frequency response function for multiple degrees of freedom systems are presented.
Consider a general continuous time domain signal given by z(t). The signal z(t)
can be periodic or nonperiodic. It can be represented in the following expression
2-2 i X(M)ea0 (8.14.1)
2s
where X(Q) is the Fourier transform of the time signal z(t)
c2
X(Q) = i x(t)e** de (8.14.2)
‘The time signal z(t) is also called the inverse Fourier transform of X(Q). For the
existence of the Fourier transform the following condition should be satisfied for x(t):
[ * Ie(d)ldz (8.14.3)
should have a finite value. The above constraint is not strict in the sense that it covers
a wide range of signals of actual dynamic systems. On the other hand, introducing a
new variable f = 9/2n, we have
2(t) = i X(feledg (8.14.4)
and
X(f)= [ (the FOr dt (8.14.5)
Since the Fourier transform involves integral of general time varying complex vari-
ables, it is not easy to carry out the integration. Except for some special cases, a
numerical integration technique is needed. One efficient algorithm is to use the Dis-
crete Fourier transform. The numerical integration is conducted by a finite number
of summation at discrete points.
Assume that there are N sampled values as
m=x(t), te=kAt, &=0,1,2,...,.N-1 (8.14.6)
Based upon the sample data points, we assume that the time domain data project
into the corresponding frequency domain data. In other words, the Fourier transform
is defined for the N discrete frequency points.
(fy fas. fn) (8.14.7)
where the frequency points should be in the range of the so-called Nyquist critical
frequency
feat (8.14.8)Section 8.14 Frequency Response Analysis 301
In other words, the sampling period (At) should be at least a half of the period of a
signal to sufficiently represent the signal.
oo N-1
X(fn) = [ a(t olde ~ J ape at ar (8.14.9)
k=0
The above equation is called the Discrete Fourier transform. The Discrete Fourier
transform (DFT) has the symmetry property with respect to the input frequency (fa).
In other words,
n
X(fn)=X(fr-n), fa = War
n=—
vz
N
ye (8.14.10)
and only a half of the transform is needed to represent all frequency components. The
maximum frequency rage is given by
1
0 Hi(2,y)us (9.1.16)
i=l
3
o(2,u) = Yo Hie, ude (9.1.17)310 Elasticity Problem Chapter 9
‘These displacements can be also expressed as
ul_[Hh 0 He 0 Hs 0]}wl_
{t}= [ 0m 0 mM 0 a = [N]{a} (9.1.18)
where {d} ={u: 0 uz v2 ug 03)" is the nodal displacement vector. Use of
this expression for strains yields
ou Oh 9 a 9 Og
3 [oh 9 ek on
pa] 0 Be 0 ho al ty (9.1.19)
auf bv OH, Sif, 0H, OF, pH, Olle
dy + br dy Os tye By
We use symbol [B] to denote the matrix expression in the above equation. That is,
ou
oe
{j= { eB \ = [B\{d} (9.1.20)
‘oy + be
Galerkin’s method states w) = Hi (i = 1,2,3) and w, = H; (i = 1,2,3).
Applying these weighting functions and Eq. (9.1.20) into Eq. (9.1.15) gives for the
finite element domain integral
farina (9.1.21)
iE
in which Q¢ denotes the element domain. As a result, the element stiffness matrix for
elasticity can be expressed as
[kK] = i (ei payaa (9.1.22)
Equation (9.1.22) holds for any kind of element in any dimension.
Evaluation of the linear shape function provides
1 [ (2-4) 0 (ys— 1%) 0 (vi = v2) 0
Bl=a (223) 0 (21 ~ 23) 0 (22-21)
(t3— 22) (Ye—ys) (21-23) (ys—m) (t2-21) (t —¥2)
(9.1.23)
Substitution of Eq.(9.1.23) into Eq. (9.1.22) results in
[Kk] = f. i [B]" [D][B\do = [By] [D][B\A (9.1.24)Section 9.2 Force Vector 3ll
since both [B] and {D] are constant matrices independent of z and y. Here A is the
area of the element. This expression is true for both plane stress and plane strain
conditions. The material property matrix [D] is selected properly for plane stress (i.e.
Eq. (9.1.6)) and plane strain (i.e. Eq. (9.1.7)) conditions. We assume a unit thickness
for the plane stress condition because the solution is independent of the thickness
direction for this case. However, if we want to include the thickness, the matrix in
Eq. (9.1.24) is multiplied by the thickness. When other kinds of shape functions
are used for the plane stress/strain condition, we just need to develop matrix [B] as
shown in Eq. (9.1.20) and put it into Eq. (9.1.22). The size of row of [B] is always
three for the plane stress/strain condition while the size of column equals twice the
number of nodes per element because there are two degrees of freedoms per node.
9.2 Force Vector
The two right-hand-side terms in Eq. (9.1.15) are the force vector. The first
term is due to body forces and the other is due to tractions. The body force term is a
domain integral. As a result, the same computation can be performed to this term as
the stiffness matrix. Applying Galerkin’s method to this term in an element domain
yields
ine foi }o= fle 2l{g}eo=Lor{z}e ean
where [WV] is defined in Eq. (9.1.18).
On the other hand, the traction vector is a boundary integral. This boundary
integral is very similar to what is described in Sec. 5.4. Let us consider a traction as
shown in Fig. 9.2.1. The traction term can be evaluated as given below:
Cee ae
where sm and 8 ate the coordinate values along the temporary boundary axis s, and
m and n are the two nodes on the element boundary where the traction is described.
If the traction is constant, the traction vector becomes
Um sq@cos0
tm | _ 1) sabsino
tn { ~ 2) sabcos0 (9.2.3)
Um sabsind
in which 84 = 8m — Sm is the length of the boundary segment and @ is a constant
traction value.312 Elasticity Problem Chapter 9
n ge
oO
™m
=Gcosv
Pa? Ss Gy =Fsind
s ——
— .
Sn td
+
Sm
Sm
Figure 9.2.1 Boundary Traction
4 Example 9.2.1 Find the nodal displacements in Fig. 9.2.2. We use two
linear triangular elements as seen in the figure. Each element is also shown in a
separate figure indicating global node numbers and local node numbers necessary
for construction of the element stiffness matrix. Using the plane stress condition,
the element stiffness matrix for the first element is given below along with the
associated nodal displacements:
73° 3.3 -5.3 -20 -20 -137 (uy
3.3 7.38 13 -2.0 -2.0 -5.3] ] »
53 -13 53 00 00 13 us
-20 -20 00 20 20 00 03,
20 -20 00 20 20 00 U2
-13 -5.3 13 00 00 53 v2
{K"]{d'} = 10° (9.2.4)
‘The stiffness matrix of the second clement is the same as that given in Eq, (9.2.4)
because the two elements have the same size and shape as well as the same way
of local node numbering.
Assembling the elements and computing the nodal forces from the given traction
using Eq. (9.2.3) results in
[K]{d} =
73° 33 -2.0 -13 -53 —2.0 00 0.0 UL
3.3 7.3 -20 -5.3 -13 -2.0 00 0.0 v1
2.0 -20 73 00 00 33 -53 -13 uz
10° -13 -53 00 73 33 00 -20 -20 ae
-5.3 -13 00 33 73 00 -20 -20 us
—20 -20 33 00 00 73 -13 -5.3 v3
0.0 00 -53 -2.0 -20 -13 73 33 U4
0.0 00 -13 -20 -20 -53 33 7.3 04Section 9.3 Energy Method 313
: $= 10° N/m
—— — }
2m
{ 3
Vo
2m.
+="
20 2® 4 Q + local node number
global node number
F=10 Cpa
v 20,25
unit thickness
10 3@ 3@
Figure 9.2.2 Square Plate With Tangential Traction
= (9.2.5)
where Fir, Fiy, Fae and Fay are unknown forces while the essential boundary
conditions state uj=v1=u3=v3=0. Applying these conditions to Eq. (9.2.5) and
solving for the unknown nodal displacements give u2=6.135 x 1077, v9=1.450
x 1077, u4=6.975 x 1077 and v4=-1.660 x 1077. This is a very crude mesh
so that these solutions are not accurate. {
9.3 Energy Method
The total potential energy denoted by II consists of two parts: internal energy
U and external energy W which is equal to work done by external loads. That is,
T=U-w (9.3.1)314 Elasticity Problem Chapter 9
The internal energy is the strain energy caused by deformation of the body and can
be written as
= ; f fo}? {an (9.3.2)
in
where {c} = {or oy Tey}? denotes the stress and {ce} = {€ €y yey}7 is the
strain. Equation (9.3.2) also holds for three-dimensional state of stresses. Use of
the constitutive equation for Eq. (9.3.2) gives
| ; i {9 (Wigan (9.3.3)
since [D] = (DJ.
On the other hand, the external work can be written as
we ftw oH{f bane ftw on{ Se bar (9.3.4)
Substitution of Eqs (9.3.3) and (9.3.4) into Eq. (9.3.1) and discretization of the
domain into a number of finite element domains yields
a=>om (9.3.5)
oat
i [ie le
m=} f corwnaan—f tw oy {han [ te ofS bar @s0)
For each finite element, applying Eqs (9.1.18) and (9.1.20) to Eq. (9.3.6) gives
m= Hay? [tor orwiantay (a? [wr {4} an
~ {at f NP {% } ar (9.3.2)
In order to find the equilibrium solution, we apply the principle of minimum
total potential energy. The principle states:
Of all kinematically admissible configurations, the deformation producing the mini-
mum total potential energy is the stable equlibrium condition,
Invoking the stationary value for Eqs (9.3.5) and (9.3.7) using this energy principle,
we obtain
ome eS
—= [K*]{d} — {F} — {}) =0 9.3.8
Lama Xt Hd} — {F} - {8}) (9.3.8)
where
[K‘]= LE (B}? (/DI[Byan (9.3.9)Section 9.4 Three-Dimensional Solid 315
(y= [we ie } ao (9.3.10)
{8} = [wr {bar (9.3.11)
Here, Eqs (9.3.9), (9.3.10) and (9.3.11) are the element stiffness matrix, body force
vector and surface traction vector, respectively. By comparing Eq. (9.1.22) to Eq.
(9.3.9), it can be shown that Galerkin’s method results in the same matrix equation
as the energy method. In addition, the force terms are identical to those obtained
from Galerkin’s method. Especially, Eq. (9.3.11) looks different from Eq. (9.2.2) but
they are the same when actual calculation is performed.
9.4 Three-Dimensional Solid
The governing equations for three-dimensional elasticity are given below.
Equations of equilibrium:
Oe, Arey Ores
et ay t +fe=0 (9.4.1)
Orey , dey , OT
ay Sy ae =
toe (9.4.2)
Dror | Oe oe +f =0 (9.4.3)
Oz ay *
where stresses are shown in Fig. 9.4.1 in the positive direction and fy, fy and f, are
body forces per unit volume.
Constitutive equation for an isotropic material:
{o} = [Dl{e} (9.4.4)
where
fo}= {os oy os Tey Ty: Tex)” (9.4.5)
{e}={te fy & tev Ws Yes)” (9.4.6)
1 yov 0 0 0
Poly 0 0 |
= E y eo 0) 0 0
Borie) 0 F 0 ee GG ee
0 0 o 6 ee oO
0 0 0 0 0 Te316 Elasticity Problem Chapter 9
2 OG;
Figure 9.4.1 Three Dimensional State of Stress
Kinematic equation for small displacements:
(9.4.8)
reese
+ + + oats
seeker
skelesle
where u, v and w are displacements in the z, y and z directions, respectively.
Traction boundary condition:
B, = 0gNz + TeyNy + Tet; = Ge (9.4.9)
By = TeyNz + OyNy + Ty2Mz = By (9.4.10)
®, = Tez + Tysty +O, =O, (9.4.11)
where n,, ny and n, are cosine directions of the outward unit normal vector on the
traction surface and $ is the known value.
‘We want to derive the element stiffness matrix for a tetrahedron element as seen
in Fig. 9.4.2. The element has four nodes. The shape functions for this element can
be derived as given below: Let us assume a linear function in terms of z, y and z.
ay
az
ob =x} (9.4.12)
a4
u=[l ¢ y 2]Section 9.4 Three-Dimensional Solid
Gung
: (pg %3)
pups)
(Cap Uyr 2)
z
Figure 9.4.2 Tetrahedron Element
Evaluation of u at every node yields
{u} = [X]{A}
where
lan a
1 22 yo ze
1 23 ys 23
1 24 vs %
=
317
(9.4.18)
(9.4.14)
Inverse of matrix [X] in Eq. (9.4.13) and substitution of the resulting expression into
Eq. (9.4.12) gives
u= (XIX) {u} = [A ]{u}
where the shape functions are
(H)=(Ai(e,y,z) He(2,y,z) Ha(z,y,z) Ha(z,y,2)]
We use the same shape functions for the three displacements.
= (I{d}
(9.4.18)
(9.4.16)
(9.4.17)318 Elasticity Problem Chapter 9
where {d} is the nodal displacement vector. Substituting Eq. (9.4.17) into the three
dimensional kinematic equation Eq. (9.4.8) results in
fe} = [B]{4} (9.4.18)
in which
m o 0 #% o 0 % 0 0 4 o 0
0 Yo Go MH 0 0 Hh 0 Oo MO
0 0 0 0 4 0 0 3 oO 0 oH
[B]=] om om G om of 9 Hs Os G Oh Oe
ay ar ‘Oy or oy or ‘Oy oz
0 8h oh 9 Ha 9H, Q OH, OH, Q SHy OMe
oz by Oz by oz by Oz 3:
2H 9 OH 2H, Q Ola Hs 9 OH Se OMe
Or Or oz oz Or Or oz oz
(9.4.19)
Putting matrix [D] from Eq. (9.4.7) and matrix [B] from Eq. (9.4.19) into Eq.
(9.1.22) computes the element stiffness matrix.
[K*] = [B]" [DI[BV (9.4.20)
where V is the volume of the tetrahedron element.
9.5 Axisymmetric Solid
When the elasticity problem degenerates from three-dimension to axisymmetry,
two shearing stress components vanish. These vanishing components due to symmetry
are 7-9 and 7z9 in the r@z coordinate system where r is the radial direction, @ is the
circumferential direction, and z is the axial direction. Hence, the remaining stress
components are
{o}={o, 09 0: Tz} (9.5.1)
Similarly, the remaining strains are
fe}={e € €: re} (9.5.2)
The material property matrix [D] for the axisymmetric problem is
l-v ov
E vd
[D] = —————. 9.5.3)
1p] (l+v)(1-2v)] v v (95:3)
0 0
The kinematic equation is
& e
8 =
= ig 9.5.4
& ge (9.5.4)
ee eaeSection 9.5 Axisymmetric Solid 319
:
L\-
Figure 9.5.1 Free Body Diagram of Two-Dimensional Body
“S (q1Y9)
Pw
)
:
(py,
where u and w are the radial and axial displacements, respectively.
Example 9.5.1 Let us determine the circumferential strain ¢. If a hoop
of radial r is uniformly displaced along the radial direction by displacement u.
‘Then, the deformed hoop has a uniform strain along the circumferential direction
and the strain is computed as
ex 2n(r+u)—2ar _u
a : (9.5.5)
In order to develop the element stiffness matrix, we use the linear triangular
clement again. We substitute # and y in the shape functions, Eqs (5.2.7) through
(5.2.9), with r and z for the axisymmetric problem. In addition, the axisymmetric
element is a ring element as shown in Fig. 9.5.1. Substitution of the shape functions
into the kinematic equation Eq. (9.5.4) gives
Se
Ey fy gk |
=] > om bom bam | =D (9.5.6)
on, 9H, oH, Ot, ons Oils
—
The element matrix can be expressed as
[K*]= J ii J [B? [DI[B]d0 dr dz = 20 { [ “BIT [DI[Blar dz (9.5.7)
Because of the term 4 in matrix [B], the matrix is not a constant matrix like the
plane stress/strain case. As a result, the integration needs to be undertaken. One320 Elasticity Problem Chapter 9
simple approximation for the integration is to evaluate [B] at the centroid of the
element. That is, we calculate #4) where # = S4t#t3 and z= 4422423. Then,
the element stiffness matrix can be written as
[K*] = 2aF AB] [DI[B) (9.5.8)
in which [B] is the matrix [B] evaluated at the centroid of the element cross-section
and A is its area.
9.6 Dynamic Analysis
While previous sections consider static problems, this section considers dynamic
problems. That is, we include the inertia force in equations of equilibrium. These
equations are also called equations of motion. For the two-dimensional case, these
equations are
Ou O02 , Ot
ane te +o
Fz = Be + fe (9.6.1)
fal a Oty [ Oey
ot? Oz oy
thy (9.6.2)
where ¢ indicates time and p is the mass density. It can be easily extended to the
three-dimensional case. Therefore, the finite element formulation for the dynamic
problem contains one extra term compared to that for the static problem and the
term is derived as follows using Galerkin’s method.
[{mgh ae vf lfc a] (if eo (9.6.3)
eal
in which superimposed dot denotes temporal derivative.
Using linear triangular elements, the accelerations can be interpolated as
ty
by
#]_[m 0 m0 m ojJuel_, is
ls Hy 0 Fa 0 Hs|)i, f= (96-4)
tig
3
In Eq. (9.6.4) we assume that the shape functions are functions of spatial variables
only and the nodal displacements are functions of time. Hence, the temporal derivative
is performed for the nodal variable. Substituting Eq. (9.6.4) into Eq. (9.6.3) for each
element results in
fools a] fe} [ orrenenra (96.5)Section 9.7 MATLAB Application to 2-D Stress Analysis 321
As a result, the mass matrix is defined as
we]= f owitiman (68)
B
This is the consistent mass matrix and it becomes for the linear triangular element
2) 0120.1 0
O20 01
_PA}1 02010
M= "51010201 (96.7)
nO. 1022720
Ot 01 O22
This matrix is based on unit thickness of the element. Otherwise, it should be
multiplied by the plate thickness. On the other hand, the lumped mass matrix for the
linear triangular element is
iu) = Ain (0.68)
where [1] is the identity matrix of size 6.
The consistent mass matrix for the bilinear element as shown in Fig. 5.3.1 is
4020 10 20
04020102
2 eee
n»_pAlo 2040201
Ml=35]1 0204020 (9.6.9)
01020402
201020 40
720102 0 4
This matrix is based on unit thickness of the element. Otherwise, it should be
multiplied by the plate thickness. The lumped mass matrix for this element is
[M‘) = ean (9.6.10)
where [J] is the identity matrix of size 8.
9.7 MATLAB Application to 2-D Stress Analysis
Two-dimensional stress analyses are performed using both conventional finite
elements and isoparametric elements in the following examples.
4 Example 9.7.1 A strip shown in Fig. 9.7.1 is subjected to an axial load.
A MATLAB program is written to solve the problem using linear triangular
elements. Eight elements are used as seen in the figure.322 Elasticity Problem Chapter 9
B=10°psi, v0.3
Figure 9.7.1 Plate Subjected to Axial Load
%o
% Example 9.7.1
% plane stress analysis of a solid using linear triangular elements
% (see Fig. 9.7.1 for the finite element mesh)
%
% Variable descriptions
% k = element matrix
% { = element vector
% kk = system matrix
% ff = system vector
% disp = system nodal displacement vector
% eldisp = element nodal displacement vector
% stress = matrix containing stresses
% strain = matrix containing strains
% gcoord = coordinate values of each node
% nodes = nodal connectivity of each element
% index = a vector containing system dofs associated with each element
% bedof = a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
% the dofs in bedof
%
%
G——__ ——.
% input data for control parameters
% number of elements
% number of nodes per element
% number of dofs per node
% total number of nodes in system
% total system dofs
% degrees of freedom per element
% elastic modulus
poisson=0.3; % Poisson’s ratioSection 9.7 MATLAB Application to 2-D Stress Analysis
%
6——$$ $$$ __________—
% input data for nodal coordinate values
% gcoord(ij) where i-> node no. and j-> x ory
(hl
gcoord=[0.0 0.0; 0.0 1.0; 1.0 0.0; 1.0 1. 5
2.0 1.0; 3.0 0.0; 3.0 1.0; 4.0 0.0; 4.0 1.0};
%
%
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no. and j-> connected nodes
%— ee
nodes=[1 3 4; 14 2; 356; 36 4;
57 8; 5 8 6;7 9 10; 7 10 8);
%
Cus
% input data for boundary conditions
% first three dofs are constrained
% whose described values are 0
% initialization of matrices and vectors
oo
f=zeros(sdof,1); % system force vector
kk=zeros(sdof,sdof); % system matrix
i % system displacement vector
% element displacement vector
% matrix containing stress components
% matrix containing strain components
% index vector
% kinematic matrix
matmtx=zeros(3,3); ‘% constitutive matrix
%—
% force vector
% force applied at node 9 in x-axis
% force applied at node 10 in x-axis
matmtx=fematiso(1,emodule, poisson); % constitutive matrix
%
for iel=1:nel % loop for the total number of elements
%
nd(1)=nodes(iel,1); % Ast connected node for (iel)-th element
323324 Elasticity Problem Chapter 9
nd(2)=nodes(iel,2); % 2nd connected node for (iel)-th element
nd(3)=nodes(iel,3); % ard connected node for (iel)-th element
%
x1=geoord(nd(1),1); yl=gcoord(nd(1),2); -% coord values of Ist node
x2=gcoord(nd(2),1); y2=gcoord(nd(2),2); -% coord values of 2nd node
x3=gcoord(nd(3),1); y3=gcoord(nd(3),2); % coord values of 3rd node
”
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
~%—
% find the derivatives of shape functions
6.
area=0.5*(x1*y2+x2*y3+x3*y 1-x1*y3-x2*y1-x3*y2); % area of triangule
area*2;
‘1 /area2)*[(y2-y3) (y3-y1) (y1-y2)]; % derivatives w.r.t. x
dhdy=(1/area2)*[(x3-x2) (x1-x3) (x2-x1)}; % derivatives w.t.t. y
%
kinmtx2=fekine2d(nnel,dhdx,dhdy); % kinematic matrix
%
k=kinmtx2”*matmtx*kinmtx2*area; % element stiffnes matrix
%
kk=feasmbl1(kk,k,index); % assemble element matrices
%
end % end of loop for the total number of elements
%
oa
% apply boundary conditions
kk, ff]=feaplyc2({ck,ff,bedof, beval);
”
%—_________—
% solve the matrix equation
%——__—___—__—.
disp=kk\ ff
%
6
% element stress computation (post computation)
(eee ees
for ielp=1:nel % loop for the total number of elements
%
nd(1)=nodes(ielp,1); % Ist connected node for (iel)-th element
odes(ielp,2); % tnd connected node for (iel)-th element
odes(ielp,3); % 8rd connected node for (iel)-th element
oord(nd(1),1); yl=gcoord(nd(1),2); -% coord values of Ist node
gcoord(nd(2),1); y2=gcoord(nd(2),2); % coord values of 2nd node
x3=gcoord(nd(3),1); y3=gcoord(nd(3),2); % coord values of 3rd node
%Section 9.7 MATLAB Application to 2-D Stress Analysis 325
index=feeldof(nd,nnel,ndof); % extract system dofs for the element.
%
ee
% extract element displacement vector
Oe
for
eldisp(i
end
%
area=0.5*(x1*y2+x2*y3-+x3*y1-x1*y3-x2*yl-x3*y2); % area of triangle
area2=area*2;
of
isp(index(i));
dhdx=(1/area2)*[(y2-y3) (y3-y1) (yl-y2)]; % derivatives w.r.t. x
dhdy=(1/area2)*[(x3-x2) (x1-x3) (x2-x1)]; % derivatives wart. y
%
kinmtx2=fekine2d (nnel,dhdx,dhdy); % kinematic matrix
%
estrain=kinmtx2*eldisp; % compute strains
estress=matmtx*estrain; % compute stresses
%
for
strain(ielp,i % store for each element
stress(ielp,i)=estress(i); % store for each element
end
%
end
%
%—
% print fem solutions
% print nodal displacements
stresses~[i stress(i,:)] % print stresses
end
%
%
function [kinmtx2]=fekine2d(nnel,dhdx,dhdy)
%
% Purpose:
% determine the kinematic equation between strains and displacements
% for two-dimensional solids
%
% Synopsis
% (kinmtx2]=fekine2d(nnel,dhdx,dhdy)326
Elasticity Problem Chapter 9
%
% Variable Description:
% nnel - number of nodes per element
% dhdx - derivatives of shape functions with respect to x
% dhdy - derivatives of shape functions with respect to y
kinmtx2(3,i2)=dhdx(i);
end
%
—
function [matmtrx]=fematiso(iopt,elastic,poisson)
%-
% Purpose:
% determine the constitutive equation for isotropic material
%
% Synopsis:
% {matmtrx]=fematiso(iopt,elastic,poisson)
%
% Variable Description:
‘% elastic - elastic modulus
% poisson - Poisson’s ratio
- plane stress analysis
~ plane strain analysis
- axisymmetric analysis
% plane stress
elastic/(1-poisson*poisson)*
[1 poisson 0:
poisson 1 0; ...
0 0 (1-poisson) /2];
%
elseif iopt==2 % plane strain
matmtrx= elastic/((1+poisson)*(1-2*poisson))* ...
[(1-poisson) poisson 0;
poisson (1-poisson) 0;
0 0 (1-2*poisson)/2];Section 9.7
lastic/((1+poisson)*(1-2*poisson))* ...
[(1-poisson) poisson poisson 0;
poisson (1-poisson) poisson 0;
poisson poisson (1-poisson) 0;
0 00 (1-2*poisson)/2];
%
else
matmtrx= elastic/((1+poisson)*(1-2*poisson))* ...
[(-poisson) poisson poisson 0 0 0;
poisson (1-poisson) poisson 0 0 0;
poisson poisson (1-poisson) 0 0 0;
0 0.0 (1-2*poisson)/2 0 0;
0.0 00 (1-2*poisson)/2 0;
0.000 0 (1-2*poisson)/2];
%
end
%
%-
MATLAB Application to 2-D Stress Analysis
% axisymmetry
% three-dimension
‘The nodal displacements are listed below and they agree with the analytical
solutions. On the other hand, the state of stress of each element is cz = 1000
and oy = Tey = 0 as expected.
displace =
dof, displ.
1.0000 0.0000 % x-displacement of node 1
2.0000 0,000 % y-displacement of node 1
3.0000 0.0000 % x-displacement of node 2
4.0000 —--0.0030 % y-displacement of node 2
5.0000 0.0100 % x-displacement of node 3
6.0000 0.0000 % y-displacement of node 3
7.0000 0.0100 % x-displacement of node 4
8.0000 -0.0030 % y-displacement of node 4
9.0000 0.0200 % x-displacement of node 5
10.000 —-0,0000 % y-displacement of node 5
11.000 0.0200 % x-displacement of node 6
12.000 -0.0030 % y-displacement of node 6
13.000 0.0300 % x-displacement of node 7
14.000 0.0000 % y-displacement of node 7
15.000 0.0300 % x-displacement of node 8
16.000 0.0030 % y-displacement of node &
17.000 0.0400 % x-displacement of node 9
18.000 0,000 % y-displacement of node 9
19.000 0.0400 % x-displacement of node 10
20,000 -0.0030 % y-displacement of node 10
327328 Elasticity Problem Chapter 9
Ftp, »=03
Figure 9.7.2 Cantilever Beam Subjected to a Tip Load
Example 9.7.2 We want to analyze a short cantilever beam using two-
dimensional isoparametric elements assuming plane stress condition. To this end,
the beam is modeled using ten four-node quadrilateral elements as seen in Fig.
9.7.2.
%
% Example 9.7.2
% plane stress analysis of a cantilever beam using isoparametric
% four-node elements
% (see Fig. 9.7.2 for the finite element mesh)
%
% Variable descriptions
% k = element matrix
% { = element vector
% kk = system matrix
system vector
system nodal displacement vector
% eldisp = element nodal displacement vector
% strain = matrix containing strains
% gcoord = coordinate values of each node
% nodes = nodal connectivity of each element
% index = a vector containing system dofs associated with each element
matrix containing sampling points
% weight2 = matrix containing weighting coefficients
% bedof = a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
% the dofs in bedof
%
%
%-
% input data for control parametersSection 9.7 MATLAB Application to 2-D Stress Analysis
% number of elements
% number of nodes per element
% number of dofs per node
nnode=18; % total number of nodes in system
sdof=nnode*ndof; % total system dofs
edof=nnel*ndof; % degrees of freedom per element
emodule=le6; % clastic modulus
% Poisson’s ratio
% 2x2 Gauss-Legendre quadrature
nglxy=nglx*ngly; % number of sampling points per element
%
fo
% input data for nodal coordinate values
% gcoord(i,j) where i-> node no. and j-> x or y
el
gcoord=[0.0 0.0; 0.0 1.0; 0.5 0.0; 0.5 1.0; 1.0 0.0;
1.0 1.0; 1.5 0.0; 1.5 1.0; 2.0 0.0; 2.0 1.0;
2.5 0.0; 2.5 1.0; 3.0 0.0; 3.0 1.05 3.5 0.0;
3.5 1.0; 4.0 0.0; 4.0 1.0);
%
eee
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no. and j-> connected nodes
%— a —
nodes=[1 3 42; 35 6 4;578 6; 79 108;
9 11 12 10; 11 13 14 12; 13 15 16 14; 15 17 18 16];
%
———
% input data for boundary conditions
% first four dofs are constrained
% whose described values are 0
% system force vector
% system matrix
disp=zeros(sdof,1); % system displacement vector
eldisp=zeros(edof,1); % element displacement vector
stress=zeros(nglxy,3); % matrix containing stress components
strain=zeros(nglxy,3); % matrix containing strain components
index=zeros(edof,1); % index vector
kinmtx=zeros(3,edof); % kinematic matrix
matmtx=zeros(3,3); % constitutive matrix
%
%——__—_——
329330
Elasticity Problem Chapter 9
% force vector
oo
f1(34)=500; % force applied at node 17 in y-axis
fi(36)=500; % force applied at node 18 in y-axis
%
%— a
% compute element matrices and vectors, and assemble
%—
{point2,weight2]=feglqd2(nglx,ngly); % sampling points & weights
matmtx=fematiso(1,emodule, poisson); % constitutive matrix
%
for iel=1:nel % loop for the total number of elements
% extract nodes for (iel)-th element
% extract x value of the node
% extract y value of the node
k=zeros(edof,edof); % initialization of element matrix
%
oo
% numerical integration
%——_—.
for intx=I:nglx
x=point2(intx,1); % sampling point in x-axis
wtx=weight2(intx,1); % weight in x-axis
for inty=I:ngly
y=point2(inty,2); % sampling point in y-axis
wty=weight2(inty,2) ; % weight in y-axis
%
[shape,dhdr,dhds]=feisoq4(x,y); % compute shape functions and
% derivatives at sampling point
%
jacob2=fejacob2(nnel,dhdr,dhds,xcoord,ycoord); _% compute Jacobian
%
detjacob=det(jacob2); % determinant of Jacobian
inyjacob=inv(jacob2); % inverse of Jacobian matrix
%
[dhdx,dhdy]=federiv2(nnel,dhdr,dhds,invjacob); % derivatives w.r.t.
% physical coordinate
%
kinmtx2=fekine2d(nnel,dhdx,dhdy); % compute kinematic matrix
%
Cea
% compute element matrix
goatee
k=k-++kinmtx2”*matmtx*kinmtx2*wtx*wty*detjacob; % element matrixSection 9.7 MATLAB Application to 2-D Stress Analysis
%
end
end % end of numerical integration loop
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
kk=feasmbl1 (kk,k,index); % assemble element matrices
%
end % end of loop for the total number of elements
%
—————
% apply boundary conditions
i —_—_--—_—_—
[kk, ff] =feaplyc2(kk,ff, bedof, beval);
q
ee
% solve the matrix equation
%—
disp=kk\ ff
%
num=1:1:sdof;
displace=[num’ disp] % print nodal displacements
—%—
% element stress computation
——————_—____—_—_———
for ielp=1:nel % loop for the total number of elements
nd(i)=nodes(ielp,i); % extract nodes for (iel)-th element
xcoord(i)=gcoord(nd(i),1); % extract x value of the node
yeoord(i)=gcoord(nd(i), % extract y value of the node
end
%
oo
% namerical integration
for intx=I:nglx
x=point2(intx,1); % sampling point in x-axis
wtx=weight2(intx,1); % weight in x-axis
for inty=I:ngly
y=point2(inty,2); % sampling point in y-axis
wty=weight2(inty,2) ; % weight in y-axis
intp=intp+1;
%
{shape,dhdr,dhds]=feisoq4(x,y); % compute shape functions and
% derivatives at sampling point
331332
Elasticity Problem Chapter 9
%
jacob2=fejacob2(nnel,dhdr,dhds,xcoord,ycoord); _% compute Jacobian
%
detjacob=det(jacob2); % determinant of Jacobian
inyjacob=inv(jacob2); % inverse of Jacobian matrix
%
[dhdx,dhdy]=federiv2(nnel,dhdr,dhds,invjacob); % derivatives w.r.t.
% physical coordinate
%
kinmtx2=fekine2d(nnel,dhdx,dhdy); % kinematic matrix
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
%—
% extract element displacement vector
=
for i=l:edof
eldisp(i)=disp(index(i));
end
%
kinmtx2=fekine2d(nnel,dhdx,dhdy); % compute kinematic matrix
% compute strains
estress: i % compute stresses
for i:
strain(intp,i)=estrain(i); % store for each sampling point
stress(intp,i)=estress(i); % store for each sampling point
end
%
location=[ielp,intx,inty] % print location for stress
stress(intp,:) % print stress values
%
end
end % end of integration loop
%
end % end of loop for total number of elements
%
—%—
‘As expected, the displacements in the z-axis are positive at the bottom side of
the strip and negative at the top side because of bending. The tip displacement
in the y-axis is 0.2238 in. while the beam bending theory gives 0.256. As a result,
the mesh needs to be refined to improve the accuracy. On the other hand, the
bending stress oz is 11950 psi at the integration point nearest to the fixed edge.
The point is located 0.1057 in, away from the fixed edge in the z-axis and 0.2887
in. above from the midplane in the y-axis. The beam theory gives bending stress
of 13820.Section 9.7
MATLAB Application to 2-D Stress Analysis
displace =
dof. displ.
1.0000 0.0000
2.0000 0.0000
3.0000 0.0000
4,0000 0.0000
5.0000 0.0094
6.0000 0.0060
7.0000 -0.0094
8.0000 0.0060
9.0000 0.0176
10.000 0.0208
11.000 -0.0176
12.000 0.0208
13.000 0.0245
14.000 0.0431
15,000 -0.0245
16.000 0.0431
17.000 0.0301
18.000 0.0717
19.000 -0.0301
20.000 © 0.0717
21,000 0.0345
22.000 0.1534
23,000 -0.0345
24.000 (0.1053
25,000 0.0377
26.000 0.1427
27.000 -0.0377
28.000 0.1427
29.000 0.0395
30.000 0.1826
31.000 -0.0395
32.000 0.1826
33.000 0.0402
34.000 0.2238
35.000 -0.0402
36.000 0.2238
% x-displacement of node 1
% y-displacement of node 1
% x-displacement of node 2
% y-displacement of node 2
% x-displacement of node 3
% y-displacement of node 3
% x-displacement of node 4
% y-displacement of node 4
% x-displacement of node 5
% y-displacement of node 5
% x-displacement of node 6
% y-displacement of node 6
% x-displacement of node 7
% y-displacement of node 7
% x-displacement of node 8
% y-displacement of node 8
% x-displacement of node 9
% y-displacement of node 9
% x-displacement of node 10
% y-displacement of node 10
% x-displacement of node 11
% y-displacement of node 11
% x-displacement of node 12
% y-displacement of node 12
% x-displacement of node 13
% y-displacement of node 13
% x-displacement of node 14
% y-displacement of node 14
% x-displacement of node 15
% y-displacement of node 15
% x-displacement of node 16
% y-displacement of node 16
% x-displacement of node 17
% y-displacement of node 17
% x-displacement of node 18
% y-displacement of node 18
333334 Elasticity Problem Chapter 9
fh
B20" psi
v =0.25
Figure 9.8.1 Axisymmetric Solid With Triangular Elements
9.8 MATLAB Application to Axisymmetric Analysis
The same axisymmetric solid is analyzed using both conventional triangular
elements and isoparametric quadrilateral elements.
& Example 9.8.1 A thick walled cylinder is subjected to a uniform internal
pressure of 2000 psi. The cylinder has inside radius of 10 in. and outside radius
of 15 in. It is made of steel whose elastic modulus is 28x10® psi and Poisson’s
ratio is 0.3. Figure 9.8.1 shows the finite element mesh using 10 triangular
elements. For the present analysis, the cylinder is assumed to be constrained
along the axial direction. The resultant force applied on the inside surface is
2000 x 2x x 10 = 20,0007 assuming unit length along the axial direction. As
a result, nodes 1 and 2 at the inside boundary has a concentrated nodal force
of 10, 000m along the radial direction, respectively. The value is provided to the
force vector in the finite element analysis program.
%
% Example 9.8.1
% axisymmetric analysis of a solid subjected to an internal
% pressure using linear triangular elements
% (see Fig. 9.8.1 for the finite element mesh)
%
% Variable descriptions
% k = element matrix
% { = element vector
% kk = system matrix
% ff = system vector
% disp = system nodal displacement vector
% eldisp = element nodal displacement vectorSection 9.8 MATLAB Application to Axisymmetric Analysis 335
% stress = matrix containing stresses
% strain = matrix containing strains
% gcoord = coordinate values of each node
% nodes = nodal connectivity of each element
% index = a vector containing system dofs associated with each element
% bedof = a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
% the dofs in bcdof
%
%
%-
% input data for control parameters
%
% number of elements
% number of nodes per element
% number of dofs per node
% total number of nodes in system
% total system dofs
% degrees of freedom per element
emodule=28e6; % elastic modulus
poisson=0.25; % Poisson’s ratio
%
Go
% input data for nodal coordinate values
% gcoord(ij) where i-> node no. and j-> x or y
%———__—_. EES
gcoord=[10. 0.; 10. 15 11. 0. 11. 15 12. 05 12. 15
oo ete te Oe ee ee
%
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no. and j-> connected nodes
—-—————— cq
nodes=[1 34; 142; 35 6; 3645578;
5 8 6;7 9 10; 7 10 8; 9 11 12; 9 12 10);
%
ge
% input data for boundary conditions
bedof=[2 4 6 8 10 12 14 16 18 20 22 24); % axial motion constrained
beval=[0 00000000000); % constrained values are 0
%
%— ———.
% initialization of matrices and vectors
%——___—__—_____——.
ff=zeros(sdof,1); % system force vector
kk=zeros(sdof,sdof); % system matrix336
Elasticity Problem Chapter 9
disp=zeros(sdof,1); % system displacement vector
eldisp=zeros(edof,1); % element displacement vector
stress=zeros(nel,4); % matrix containing stress components
strain=zeros(nel,4); % matrix containing strain components
index=zeros(edof,1); % index vector
kinmtax=zeros(4,edof); % kinematic matrix
matmtx=zeros(4,4); % constitutive matrix
%
%
% force vector
%
.0*atan(1); % pi=3.141592
%
ff(1)=2e3*pi*2*10; % force applied at node 1 in x-axis
ff(3)=2e3*pit2*10; % force applied at node 2 in x-axis
%
—
matmtx=fematiso(3,emodule,poisson); % constitutive matrix
%
for iel=1:nel % \oop for the total number of elements
%
nd(1)=nodes(iel,1); % Ist node for (iel)-th element
nd(2)=nodes(iel,2); % 2nd node for (iel)-th element
nd(3)=nodes(iel,3); % 3rd node for (iel)-th element
%
x1=geoord(nd(1),1); yl=geoord(nd(1),2); -% coord values of Ist node
x2=gcoord(nd(2),1); y! ‘oord(nd(2),2); % coord values of 2nd node
x3=gcoord(nd(3),1); y8=gcoord(nd(3),2); % coord values of 3rd node
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
%
% find the derivatives of shape functions
%—
area=0.5*(x1*y2-+x2*y3-+x3*y1-x1*y3-x2*y1-x3*y2); % area of triangle
area2=area*2;
xcenter=(x1-+x2+x3)/3; % x-centroid of triangle
yeenter=(yl+y2+y3)/3; % y-centroid of triangle
%
shape(1)=((x2*y3-x3*y2)+(y2-y3)*xcenter+(x3-x2)*ycenter) /area2;
shape(2)=((x3*y1-x1*y3)+(y3-y1)*xcenter+(x1-x3)*ycenter) /area2;
shape(3)=((x1*y2-x2*y1)+(yl-y2)*xcenter-+(x2-x1)*ycenter) /area2;
%
dhdx=(1/area2)*({(y2-y3) (y3-y1) (y1-y2)}; % derivatives w.r.t. x
dhdy=(1/area2)*[(x3-x2) (x1-x3) (x2-x1)]; % derivatives w.r.t. y
%Section 9.8 MATLAB Application to Axisymmetric Analysis 337
kinmtax=fekineax(nnel,dhdx,dhdy,shape,xcenter); _% kinematic matrix
%
k=2*pi*xcenter*area*kinmtax’*matmtx*kinmtax; _-% element matrix
%
kk=feasmbl1 (kk,k,index); % assemble element matrices
%
end % end of loop for total number of elements
%
———
% apply boundary conditions
ge oa
{kk, ff] =feaplyc2(kk, ff, bedof, beval);
%
——————
% solve the matrix equation
%
disp=kk\ fi;
%
%——— ——
% clement stress computation (post-computation)
(ee
for iel) el % loop for the total number of elements
%
nd(1)=nodes(ielp,1); % 1st node for (iel)-th element
nd(2)=nodes(ielp,2); % 2nd node for (iel)-th element
nd(3)=nodes(ielp,3); % 3rd node for (iel)-th element
%
coord(nd(1),2); % coord values of 1st node
coord(nd(2),2); % coord values of 2nd node
x3=geoord(nd(3),1); y3=gcoord(nd(3),2); _% coord values of 3rd node
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
ee
% extract element displacement vector
% Se
for i=1:edof
eldisp(i)=disp(index(i));
end
%
area=0.5*(x1*y2+x2*y3-+4x3*yl-x1l*y3-x2*y1-x3*y2); % area of triangle
area2=area*2;
x1+x24x3)/3; % x-centroid of triangle
yeenter=(y1+y2-+y3)/3; % y-centroid of triangle
%
shape(1)=((x2*y3-x3*y2)+(y2-y3)*xcenter-+(x3-x2)*ycenter)/area2;
shape(2)=((x3*yl-x1*y3)+(y3-y1)*xcenter+(x1-x3)*ycenter) /area2;
shape(3)=((x1*y2-x2*y1)+(y1-y2)*xcenter-+(x2-x1)*ycenter)/area2;Elasticity Problem Chapter 9
1/area2)*[(y2-y3) (y3-y1) (y1-y2)}; % derivatives w.r.t. x
1 /area2)*((x3-x2) (x1-x3) (x2-x1)}; % derivatives w.r.t. y
kinmtax=fekineax(nnel,dhdx,dhdy,shape,xcenter); % kinematic matrix
% compute strains
% compute stresses
strain (ielp,i)=estrain(i); % store for each element
stress(ielp,i)=estress(i); % store for each element
end
%
end
%
%-
% print fem solutions
—b——_———
:sdof;
displace=[num’ disp] % print nodal displacements
num=:
% print stresses
function [kinmtxax]=fekineax(nnel,dhdx,dhdy,shape,tadist)
%—
% Purpose:
% determine kinematic equations between strains and displacements
% for axisymmetric solids
%
% Synopsis:
% (kinmtxax]=fekineax(nnel,dhdx,dhdy,shape,radist)
%
% Variable Description:
% mel - number of nodes per element
% shape - shape functions
% dhdx - derivatives of shape functions with respect to x
% dhdy - derivatives of shape functions with respect to y
% radist - radial distance of integration point or central point
% for hoop strain component
%
%Section 9.8
MATLAB Application to Axisymmetric Analysis
for i=1:nnel
i1=(i-1)*241;
i2=i141;
kinmtxax(1,i1)=dhdx(i);
kinmtxax(2,
kinmtxax(3,i2
kinmtxax(4,i1)=dhdy(i);
kinmtxax(4,i2)=dhdx(i);
end
%
%—
‘The results are
displace
dof. displ.
1.0000 9.0039 % radial displacement of node 1
2.0000 90,0000
3.0000 0.0039 % radial displacement of node 2
4.0000 0.0000
5.0000 0.0037 % radial displacement of node 3
6.0000 0.0000
7.0000 0.0037 % radial displacement of node 4
8.0000 0.0000
9.0000 0,035 % radial displacement of node 5
10.000 0.0000
11.000 0.0035 % radial displacement of node 6
12.000 9.0000
13.000 0.0034 % radial displacement of node 7
14.000 0.0000
15.000 0.0034 % radial displacement of node 8
16.000 0.0000
17.000 0.0033 % radial displacement of node 9
18.000 0.0000
19.000 0.0033 % radial displacement of node 10
20.000 9.0000
21.000 0.0032 % radial displacement of node 11
22.000 0.0000
23.000 0.0032 % radial displacement of node 12
24.000 0.0000
stresses =
elem radial © hoop -—axial
1.00 -3277, 9486. 1552.
2.00 -3408. 100001649.
300-2281. 8434. «1538.
4.00 -2221. 8877. 1664.
500-1457. 7637. «1545.
6.00 -1368. 7995. 1657.
339340 Elasticity Problem Chapter 9
B=2.8X10 psi
v=0.25
Figure 9.8.1 Axisymmetric Solid With Rectangular Elements
7.00 -783.0 7017. «1558.
8.00 -724.0 7295. 1643.
9.00 213.0 6529. 1579.
10.0 -242.0 6727. 1621.
& Example 9.8.2 Example 9.8.1. is solved using isoparametric elements.
‘The same number of nodes is used but the number of element is 5 as seen in Fig.
9.8.2
%—
% Example 9.8.2
% axisymmetric analysis of a thick walled cylinder
% subjected to internal pressure using isoparametric
% four-node elements
% (see Fig. 9.8.2 for the finite element mesh)
%
% Variable descriptions
% k = element matrix
element vector
system matrix
system vector
% disp = system nodal displacement vector
% eldisp = element nodal displacement vector
% stress = matrix containing stresses
% strain = matrix containing strains
% gcoord = coordinate values of each nodeSection 9.8 MATLAB Application to Axisymmetric Analysis 341
% nodes = nodal connectivity of each element
% index = a vector containing system dofs associated with each element
% point2 = matrix containing sampling points
matrix containing weighting coefficients
a vector containing dofs associated with boundary conditions
a vector containing boundary condition values associated with
the dofs in bedof
% input data for control parameters
% number of elements
% number of nodes per element
% number of dofs per node
% total number of nodes in system
% total system dofs
nel*ndof; % degrees of freedom per element
emodule=28.0e6; % elastic modulus
poisson=0.2: % Poisson’s ratio
nglx=2; ngly=2; % 2x2 Gauss-Legendre quadrature
nglxy=nglx*ngly; % number of sampling points per element
—————
% input data for nodal coordinate values
% gcoord(i,i) where i-> node no. and j-> x or y
——————————————
geoord=[10. 0.5 10. 15 11. 0.5 11.
13, 05 13. 15 14. 05 14. 15 15. 0,5 15. 1);
%
ee
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no. and j-> connected nodes
%
nodes=[1 3 4 2; 35 6 4; 5 78 6; 79 10 8; 9 11 12 10}
%
ee
% input data for boundary conditions
eS ee
bedof=[2 4 6 8 10 12 14 16 18 20 22 24); % axial motion constrained
beval=[0 00000000000); % constrained values are 0
% initialization of matrices and vectors
ros(sdof,1); % system force vector
eros(sdof,sdof); % system matrix
-zeros(sdof,1); % system displacement vector342
Elasticity Problem Chapter 9
eldisp=zeros(edof,1); % element displacement vector
stress=zeros(nglxy,4); % matrix containing stress components
strain=zeros(nglxy,4); % matrix containing strain components
index=zeros(edof,1); % index vector
kinmtx=zeros(4,edof); % kinematic matrix
matmtx=zeros(4,4); % constitutive matrix
%
[ace
% force vector
Os
pi=4.0*atan(1.0); % pi=3.141592
%
$€(1)=2e3*2*pi*10; % force applied at node 1 in x-axis
ff(3)=2e3*2* pi*10; % force applied at node 2 in x-axis
%
%—
% compute element matrices and vectors, and assemble
%—
[point2, weight2]=feglqd2(nglx,ngly); % sampling points & weights
matmtx=fematiso(3,emodule, poisson); % constitutive matrix
%
for iel=1:nel % \oop for the total number of elements
% extract node for (iel)-th element
% extract x value of the node
yeoord(i % extract y value of the node
end
%
k=zeros(edof,edof); % initialization of element matrix
%
%—
% numerical integration
%— _——_——_—
for intx=1:nglx
x=point2(intx,1); % sampling point in x-axis
wtx=weight2(intx,1); % weight in x-axis
for inty=I:ngly
y=point2(inty,2); % sampling point in y-axis
wty=weight2(inty,2) ; % weight in y-axis
%
[shape,dhdr,dhds]=feisoad(x,y); % compute shape functions and
% derivatives at sampling point
%
jacob2=fejacob2(nnel,dhdr,dhds,xcoord,ycoord); _% compute Jacobian
% determinant of Jacobian
% inverse of Jacobian matrixSection 9.8 MATLAB Application to Axisymmetric Analysis
%
[dhdx,dhdy]=federiv2(nnel,dhdrdhds,invjacob); _-% derivatives w.r.t.
% physical coordinate
‘% x-coordinate value
xcenter=xcenter+shape(i)*xcoord(i); % of the integration point
end
%
kinmtx=fekineax(nnel,dhdx,dhdy,shape,xcenter); _% kinematic matrix
%
ra
% compute element matrix
eee
k=k+2*pi*xcenter*kinmtx’*matmtx*kinmtx*wtx* wty*detjacob;
% element matrix
%
end
end % end of numerical integration loop
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
kk=feasmbl1(kk,k,index); % assemble element matrices
%
end % end of loop for total number of elements
%
——
% apply boundary conditions
$—__________—-
[kk ff] =feaplyc2(kk, ff,bedof, beval);
%
———
% solve the matrix equation
eee
disp=kk\ ff;
%
num=:
dof,
displace={num’ disp] % print nodal displacements
%
%
% element stress computation
% loop for the total number of elements
% extract node for (iel)-th element
% extract x value of the node
% extract y value of the node
343344 Elasticity Problem
end
%
%
% numerical integration
x=point2(intx,1);
wtx=weight2(intx,1);
for inty=I:ngly
y=point2(inty,2);
wty=weight2(inty,2) ;
intp=intp+1;
%
[shape,dhdr,dhds]=feisoa4(x,y);
%
jacob2=fejacob2(nnel,dhdr,dhds,xcoord,ycoord);
%
detjacob=det(jacob2);
invjacob=inv(jacob2);
%
[dhdx,dhdy]=federiv2(nnel,dhdr,dhds,invjacob);
for i=I:nnel
xcenter=xcenter+shape(i)*xcoord(i);
end
%
kinmtx=fekineax(nnel,dhdx,dhdy,shape,xcenter);
%
index=feeldof(nd,nnel,ndof);
%
—————————————_————
‘% extract element displacement vector
(ee
for i=1:edof
eldisp(i)=disp(index(i));
inmtx*eldisp;
atmtx*estrain;
strain(intp,i)=estrain(i);
stress(intp,i)=estress(i);
end
Chapter 9
% sampling point in x-axis
% weight in x-axis
% sampling point in y-axis
% weight in y-axis
% compute shape functions and
‘% derivatives at sampling point
% compute Jacobian
% determinant of Jacobian
% inverse of Jacobian matrix
‘% derivatives w.r.t.
% physical coordinate
% x-coordinate value
% of the integration point
% kinematic matrix
% extract system dofs for the element
% compute strains
% compute stresses
% store for each element
% store for each elementSection 9.9 MATLAB Application to 3-D Stress Analysis
%
end
end % end of integration loop
%
for j=1:nglxy
stresses:
end
%
end ‘% end of loop for total number of elements
%
%
ielp stress(j,:)] % print stresses
‘The nodal displacements are the same as those obtained from Example 9.8.1.
‘The stresses are also very similar but a little different. Stresses for the first two
elements are listed below. They are printed for each integration point. Because
2x2 quadrature was used for numerical integration, there are four integration
points for each element.
stresses for element 1 =
Ist integration point
radial stress=-3146. hoop stress=10289 axial stress=1786
2nd integration point
radial stress=-3146. hoop stress=10289 axial stress=1786.
3rd integration point
radial stress=-3505. hoop stress=9211. axial stress=1426.
4th integration point
radial stress=-3506. hoop stress=9211. axial stress=1426.
stresses for element 2 =
Ast integration point
radial stress=-2104. hoop stress=9066. axial stress=1741.
2nd integration point
radial stress=-2104. hoop stress=9066. axial stress=1741.
3rd integration point
radial stress=-2377. hoop stress=8245. axial stress=1467.
Ath integration point
radial stress=-2377. hoop stress=8245. axial stress=1467.
9.9 MATLAB Application to 3-D Stress Analysis
@ Example 9.9.1 A unit cube is subjected to a uniform load as shown in
Fig. 9.9.1, We use one eight-node isoparametric solid element for the problem.
%
% Example 9.9.1
345346 Elasticity Problem Chapter 9
a (O11).
Gant)
(0,01,
(4,1,0)
(0,0,0) (1,0,0)
Figure 9.9.1 A Cubic Solid
% three-dimensional analysis of a cube using isoparametric
% eight-node elements
% (see Fig. 9.9.1 for the finite element mesh)
%
% Variable descriptions
% k = element matrix
% £ = element vector
% kk = system matrix
% ff = system vector
% disp = system nodal displacement vector
% eldisp = element nodal displacement vector
% stress = matrix containing stresses
% strain = matrix containing strains
% gcoord = coordinate values of each node
% nodes = nodal connectivity of each element
% index = a vector containing system dofs associated with each element
% point3 = matrix containing sampling points
% weight3 = matrix containing weighting coefficients
% bcdof = a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
% the dofs in bedof
%
%
—EE
% input data for control parameters
%
nel:
% number of elements
anel % number of nodes per element
ndof: % number of dofs per node
nnode=8; % total number of nodes in system
sdof=nnode*ndof; % total system dotsSection 9.9
MATLAB Application to 3-D Stress Analysis
edof=nnel*ndof; % degrees of freedom per element
% elastic modulus
% Poisson’s ratio
5 nglz=: % 2x2x2 Gauss-Legendre quadrature
nglxyz=nglx*ngly*ngl; % number of sampling points per element
%
7
% input data for nodal coordinate values
% gcoord(i,j) where i-> node no. and j-> x or y
(ee
gcoord=[0.0 0.0 0.0; 1.0 0.0 0.0; 1.0 1.0 0.0; 0.0 1.0 0.0;
0.0 0.0 1.0; 1.0 0.0 1.0; 1.0 1.0 1.0; 0.0 1.0 1.0};
%
6
% input data for nodal connectivity for each element
% nodes(i) where i-> element no. and j-> connected nodes
nodes=[1 2 3 45 6 7 8);
%
A —-
% input data for boundary conditions
Ce
bedof=[1 23 56 9 12};
0000000);
°—————_————_
% initialization of matrices and vectors
%— a
fi=zer0s(sdof,1);
ros(sdof,sdof);
disp=zeros(sdof,1);
% constrained dofs
‘% constrained values
% system force vector
% system matrix
% system displacement vector
eldisp=zeros(edof,1); % element displacement vector
% matrix containing stress components
% matrix contai
g strain components
% index vector
% kinematic matrix
% constitutive matrix
% force applied at node § in z-axis
% force applied at node 6 in z-axis
% force applied at node 7 in z-axis
% force applied at node 8 in z-axis
% compute element matrices and vectors, and assemble
347348
Elasticity Problem Chapter 9
———— $$$
[point3,weight3]=feglqd3(nglx,nglynglz); _% sampling points & weights
matmtx=fematiso(4,emodule,poisson); % compute constitutive matrix
%
for iel=1:nel % loop for the total number of elements
% extract node for (iel)-th element
% extract x value of the node
‘% extract y value of the node
zcoord(i)=gcoord(nd(i),3); % extract z value of the node
end
%
k=zeros(edof,edof); % initialization of element matrix
%
%—
% numerical integration
%—
for intx=I:nglx
x=point3(intx,1); % sampling point in x-axis
wtx=weight3(intx,1); % weight in x-axis
for inty=l:ngly
y=point3(inty,2); % sampling point in y-axis
wty=weight3(inty,2) ; % weight in y-axis
for intz=1:nglz
2=point3(intz,3); % sampling point in z-axis
wtz=weight3(intz,3) ; % weight in z-axis
%
[shape,dhdr,dhds dhdt]=feisos8(x,y,z); % compute shape functions
% and derivatives at sampling point
%
jacob3=fejacob3(nnel,dhdr,dhds,dhdt,xcoord,ycoord,zcoord);
% compute Jacobian
% determinant of Jacobian
% inverse of Jacobian matrix
[dhdx,dhdy,dhdz]=federiv3(nnel,dhdr,dhds,dhdt,invjacob);
% derivatives w.r.t. physical coordinate
%
kinmtx=fekine3d(nnel,dhdx,dhdy,dhdz); % kinematic matrix
%
%— ———__——
% compute element matrix
je
k=k-+kinmtx’*matmtx*kinmtx*wtx*wty*wtz*detjacob; % element
%
endSection 9.9 MATLAB Application to 3-D Stress Analysis
end
end % end of numerical integration loop
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
kk=feasmbl1(kk,k,index); % assemble element matrices
%
end % end of loop for total number of elements
%
a
% apply boundary conditions
&¢——$________
kk, ff] =feaplyc2(kk,ff, bedof, beval);
%
%
% solve the matrix equation
anima
disp=kk\ ft
displace=[num’ disp] % print nodal displacements
%
%
% element stress computation
(ee
for ielp=1:nel % loop for the total number of elements
odes(ielp,i); % extract node for (iel)-th element
xcoord(i)=gcoord(nd(i),1); % extract x value of the node
% extract y value of the node
% extract z value of the node
Linglx
x=point3(intx,1); % sampling point in x-axis
wtx=weight3(intx,1); % weight in x-axis
for inty=1:ngly
y=point3(inty,2); % sampling point in y-axis
wty=weight3(inty,2) ; % weight in y-axis
for intz=1:nglz
z=point3(intz,3); % sampling point in z-axis
wtz=weight3{intz,3) ; % weight in z-axis
intp=intp+1;
349350
Elasticity Problem Chapter 9
%
[shape,dhdr,dhds,dhdt]=feisos8(x,y,2); % compute shape functions
% and derivatives at sampling point
%
jacob3=fejacob3(nnel,dhdr,dhds,dhdt,xcoord, ycoord,zcoord);
% compute Jacobian
%
detjacob=det(jacob3); % determinant of Jacobian
invjacob=inv(jacob3); % inverse of Jacobian matrix
%
[ahdx,dhdy,dhdz}=federiv3 (nnel,dhdr,dhds,dhdt,invjacob);
% derivatives w.r.t. physical coordinate
%
kinmtx=fekine3d(nnel,dhdx,dhdy,dhdz); -% compute kinematic matrix
%
index=feeldof(nd,nnel,ndof); % extract system dofs for the element
%
%—__—_____——
% extract element displacement vector
%———
for i:
eldisp(i)=disp(index(i));
end
% compute strains
% compute stresses
% store for each element
stress(intp,i)=estress(i); % store for each element
end
%
location=fielp,intx jinty,intz] % print location for stress
stress(intp,:) % print stress values
end
end
end % end of integration loop
%
end % end of loop for total number of elements
%
%
function [dhdx,dhdy,dhdz]=federiv3(nnel,dhdr,dhds,dhdt,invjacob)
%
% Purpose:Section 9.9 MATLAB Application to 3-D Stress Analysis 351
% determine derivatives of 3-D isoparametric shape functions with
% respect to physical coordinate system
%
% Synopsi
% [dhdx,dhdy,dhdz]=federiv3(nnel,dhdr,dhds,dhdt,invjacob)
%
% Variable Description:
% dhdx - derivative of shape function w.r.t. physical coordinate x
% dhdy - derivative of shape function w.r.t. physical coordinate y
% dhdz - derivative of shape function w.r.t. physical coordinate z
% nnel - number of nodes per element
% dhdr - derivative of shape functions w.r.t. natural coordinate r
% dhds - derivative of shape functions w.r.t. natural coordinate s
% dhdt - derivative of shape functions w.r.t. natural coordinate t
% invjacob - inverse of 3-D Jacobian matrix
invjacob(1,1)*dhdr(i)-+invjacob(1,2)*dhds(i) ...
+invjacob(1,3)*dhdt(i);
dhdy (i)=invjacob(2,1)*dhdr(i)-+invjacob(2,2)*dhds(i) ...
+inyjacob(2,3)*dhdt(i);
dhdz(i)=invjacob(3,1)*dhdr(i)-+invjacob(3,2)*dhds(i) ...
+tinvjacob(3,3)*dhdt(i);
end
%
%
function (shapes8 dhdrs8,dhdss8,dhdts8]=feisos8(rvalue,svalue,tvalue)
%
% Purpose:
% compute isoparametric eight-node solid shape functions
% and their derivatves at the selected (integration) point
% in terms of the natural coordinate
%
% Synopsis:
% [shapes dhdrs8,dhdss8,dhdts8]=feisos8 (rvalue,svalue,tvalue)
w
% Variable Description:
% shapes8 - shape functions for four-node element
% dhdrs8 - derivatives of the shape functions w.r.t. r
% dhdss8 - derivatives of the shape functions w.r.t. s
% dhdts8 - derivatives of the shape functions w.
% rvalue - r coordinate value of the selected point
% svalue - s coordinate value of the selected point
% tvalue - t coordinate value of the selected point352
Elasticity Problem Chapter 9
%
% Notes:
% Ast node at (-1,-1,-1), 2nd node at (1,-1,-1)
% 3rd node at (1,1,-1), 4th node at (-1,1,-1)
% Sth node at (-1,-1,1), 6th node at (1,-1,1)
% 7th node at (1,1,1), 8th node at (-1,1,1)
%:
%
% shape functions
.125*(1-rvalue)*(1-svalue)*(1-tvalue);
.125*(1+rvalue)*(1-svalue)*(1-tvalue);
.125*(1+rvalue)*(1+svalue)*(1-tvalue);
125*(1-rvalue)*(1-+svalue)*(1-tvalue);
.125* (1-rvalue)*(1-svalue)*(1+tvalue);
125*(14rvalue)*(1-svalue)*(1-+tvalue);
125*(1+rvalue)*(1+svalue)*(1+tvalue);
.125*(1-rvalue)*(1-+svalue)*(1-4+tvalue);
% derivatives
%
dhdrs8(1)=
125*(1-svalue)*(1-tvalue);
dhdrs8(2)=0.125*(1-svalue)*(1-tvalue);
dhdrs8(3)=0.125*(1+svalue)*(1-tvalue);
dhdrs8(4)=-0.1254(1+svalue)*(1-tvalue);
dhdrs8 (5)=-0.125*(1-svalue)*(1+tvalue);
dhdre8(6)=0.125*(1-svalue)*(1+tvalue);
dhdrs8(7)=0.125*(1+svalue)*(1+tvalue);
dhdrs8(8)=-0.125*(1+svalue)*(1+tvalue);
%
dhdss8(1)=-0.125*(1-rvalue)*(1-tvalue);
dhdss8(2)=-0.125*(1+rvalue)*(1-tvalue);
dhdss8(3)=0.125*(1+rvalue)*(1-tvalue);
dhdss8(4)=0.125*(1-rvalue)*(1-tvalue);
dhdss8(5)=-0.125*(1-rvalue)*(1+tvalue);
dhdss8(6)=-0.125*(1+rvalue)* (1+tvalue);
dhdss8(7)=0.125*(1+rvalue)*(1+tvalue);
dhdss8(8)=0.125*(1-rvalue)*(1+tvalue);
%
dhdts8(1)=-0.125*(1-rvalue)*(1-svalue);
dhdts8(2)=-0.125*(1+rvalue)*(1-svalue);
dhdts8(3)=-0.125*(1+rvalue)*(1+svalue);
dhdte8(4)=-0.125*(1-rvalue)*(1+svalue);
dhdts8(5)=0.125*(1-rvalue)*(1-svalue);
dhdts8 (6)=0.125*(1+4rvalue)* (1-svalue);
dhdts8(7)=0.125*(1+rvalue)*(1-+svalue);
dhdts8(8)=0.125*(1-rvalue)*(1+svalue);
%Section 9.9 MATLAB Application to 3-D Stress Analysis
%
function [jacob3]=fejacob3(nnel,dhdr,dhds,dhdt,xcoord,ycoord,zcoord)
%
% Purpose:
% determine the Jacobian for three-dimensional mapping
%
% Synopsis:
% (jacob3}=fejacob3 (nnel,dhdr,dhds,dhdt, xcoord,ycoord,zcoord)
%
% Variable Description:
% jacob3 - Jacobian for one-dimension
% nnel - number of nodes per element
% dhdr - derivative of shape functions w.r.t. natural coordinate r
% dhds - derivative of shape functions w.r.t. natural coordinate s
% dhdt - derivative of shape functions w.r.t. natural coordinate t
% xcoord - x axis coordinate values of nodes
% ycoord - y axis coordinate values of nodes
% acoord - 2 axis coordinate values of nodes
%
%
jacob3=zeros(3,3);
%
for i=I:nnel
jacob3(1,1)=jacob3(1,1)+dhdr(i)*xcoord(i);
jacob3(1,2)=jacob3(1,2)+dhdr(i)*ycoord(i);
jacob3(1,3)=jacob3(1,3)-+dhdr(i)*zcoord(i);
jacob3(2,1)=jacob3(2,1)-+dhds(i)*xcoord(i);
jacob3(2,2)=jacob3(2,2)+dhds(i)*ycoord(i);
jacob3(2,3)=jacob3(2,3)-+dhds(i)*zcoord(i);
jacob3(3,1)=jacob3(3,1)-+dhdt(i)*xcoord(i
jacob3(3,2)=jacob3(3,2)+dhdt(i)*ycoord(i
jacob3(3,3)=jacob3(3,3)-+dhdt(i)*zcoord(i);
end
%
%
function [kinmtx3]=fekine3d(nnel,dhdx,dhdy,dhdz)
a
% Purpose:
% determine the kinematic equation between strains and displacements
% for three-dimensional solids
%
‘% Synopsis:Elasticity Problem Chapter 9
% (kinmtx3]=fekine3d (nnel,dhdx,dhdy,dhdz)
%
% Variable Description:
% nnel - number of nodes per element
% dhdx - derivatives of shape functions with respect to x
% dhdy - derivatives of shape functions with respect to y
% dhdz - derivatives of shape functions with respect to z
kinmtx3(1,i1
kinmtx3(2,i2
kinmtx3(3,i3)=dhdz(i);
kinmtx3(4,i1)=dhdy (i);
kinmtx3(5,i2
kinmtx3(5,i3
kinmtx3(6,i1
kinmtx3(6,i3
end
%
%—
Nodal displacements are given below and the state of stresses is 7, = 1000 and
the rest of stresses are zero at every integration point.
displace =
dof. displ.
1.0000 0.0000 % x-displacement of node 1
2.0000 0.0000 % y-displacement of node 1
3.0000 0.0000 % z-displacement of node 1
4.0000 -0.0030 % x-displacement of node 2
5.0000 0.0000 % y-displacement of node 2
6.0000 0.0000 % z-displacement of node 2
7.0000 -0.0030 % x-displacement of node 3
8.0000 -0.0030 % y-displacement of node 3
9.0000 0.0000 % 2-displacement of node 3
10.000 0.0000 % x-displacement of node 4
11.000 -0.0030 % y-displacement of node 4
12.000 0.0000 % z-displacement of node 4
13.000 0.0000 % x-displacement of node 5
14.000 0.0000 % y-displacement of node 5
15.000 0.0100 % w-displacement of node 5
16.000 —-0.0030 % x-displacement of node 6
17.000 0,000 % y-displacement of node 6Section 9.9
18.000
19.000
20.000
21.000
22.000
23.000
24.000
MATLAB Application to 3-D Stress Analysis
0.0100
0.0030
.0030
0.0100
0.0000
0.0030
0.0100
% z-displacement of node 6
% x-displacement of node 7
% y-displacement of node 7
% z-displacement of node 7
% x-displacement of node 8
% y-displacement of node 8
% z-displacement of node 8
355356
91
9.2
9.3
94
Elasticity Problem Chapter 9
Problems
An orthotropic material under the plane stress condition has the constitutive
equation
{7} = [D}{e}
where {@} and {@} are the stress and strain vectors in terms of the material
orthotropic directions. Further, [D] is given as
. Qu Q2 0
[D]=|Q%2 Q2 0
0 0 Oss
where
oe
1~ raver
Qu
rnaEe
near
En
cle peer
1-201
Qs3 = Giz
Subscripts 1 and 2 denote the orthotropic axes, E, and E» are elastic modulii
in the 1 and 2-axis, and Gy is the inplane shear modulus. 14; is Poisson’s ratio
for the normal strain ¢; resulting from the normal strain ¢. If the material
orthotropic axes are rotated from the global coordinate axes by angle 8 (see
Fig. P9.1), show that the strain vectors between the two coordinate systems are
related as shown below:
41 &
ists)
‘2 Yey
Qn=
Q:
where
cos? sin? cosOsind
(T= sin?6 cos?0 —cos0sind
—2cos8sind 2cosfsin0 cos?6 — sin?6
From Prob. 9.1, also prove that [D] = [7]*[D][T] where [D] is the material
property matrix in terms of z — y coordinate system and [D] is the material
property matrix in terms of 1 — 2 coordinate system.
A two-dimensional elastic body is discretized using six-node triangular elements
as shown in Fig. P9.3. Find the equivalent nodal forces for the three nodes
located on an element boundary.
Find the equivalent nodal forces for Fig. P9.4.Problems 357
2
Figure P9.1 Problem 9.1
Tp
Les, ,
Figure P9.3. Problem 9.3
9.5
9.6
9.7
98
9.9
9.10
Find the equivalent nodal forces for Fig. P9.5.
Find the deflection of a tapered cantilever beam as shown in Fig. P9.6 using
linear triangular elements and the computer programs, Assume unit width of
the beam.
Solve Fig. P9.7 using computer programs. Use different mesh discretization.
Some elements are distorted as shown in the figure.
Modify the computer programs so that linear triangular elements can be used
with rectangular elements. Then solve Fig. P9.8.
Using the computer programs, find the solution for a perforated plate under
tension as seen in Fig. P9.9.
Solve Prob. 9.6 for the transient analysis assuming the beam is initially at rest
using the computer programs.358 Elasticity Problem Chapter 9
20kN/m
O.im 0.1m O.1m Qin
Figure P9.4 Problem 9.4
40KN/m
Dim) Dim) Om | Ol
Figure P9.5 Problem 9.5
peel
E=2106P 0,
Figure P9.6 Problem 9.6Problems 359
lcm | 8cm
200N / Ea
10cm
— 4000 / 4000
fen, 10cn, Ben teen
£27560
Figure P9.7 Problem 9.7
a E=200GPa
0.3m 3kN
0.3m
0.3m
O.3m_|_ 0.3m | 0.3m
Figure P9.8 Problem 9.8
0.4m by 0.3m plate with
0.05m radius hole at the center
symmetry
SkN/m
symmetry
E=200GPa
Figure P9.9 Problem 9.9CHAPTER TEN
PLATE STRUCTURES
10.1 Classical Plate Theory
The basic assumptions for the classical Kirchhoff plate bending theory are very
similar to those for the Euler-Bernoulli beam theory. One of the most important
assumptions for both theories is that a straight line normal to the midplane of the
plate (or beam) before deformation remains normal even after deformation. In other
words, the transverse deformation is neglected. Therefore, as shown in Fig. 8.1.2,
inplane displacements u and v can be expressed as
us-25 (10.1.1)
dw
vee (10.1.2)
where x and y are the inplane axes located at the midplane of the plate, and z is
along the plate thickness direction as seen Fig. 10.1.1. In addition, u and v are the
displacements in the x- and y-axes, respectively, while w is the transverse displacement
(or called deflection) along the 2-axis.
Because we neglect the transverse shear deformation, inplane strains can be
written as in terms of the displacements
fe y= Che eo) (10.1.3)
where : : :
{nm}? ={ee hy yl = (FS Fe 2H} (10.1.4)
is called curvature.
Assuming the plane stress condition for plate bending and substituting Eqs
(10.1.3) and (10.1.4) into Eq. (9.1.5) yield the constitutive equation as given below:
{o} = -2[D]{x} (10.1.5)
361362 Plate Structures Chapter 10
Figure 10.1.1 Free Body Diagram of the Plate Element
in which {c} = {oz oy Tey }” and [D] is defined in Eq. (9.1.6). Moments are
defined as
hfe
{M} =| {o}z dz (10.1.6)
nye
where {M} ={M, M, Mzy} and his the plate thickness. Substitution of Eq.
(10.1.5) into Eq. (10.1.6) gives the relationship between the moment and curvature.
{M} = -[Dl{x} (10.1.7)
where
it
1B) = FI (10.1.8)
Equilibrium equations are obtained from the free body diagram as shown in Fig.
10.1.1. Moment equilibriums about y- and 2-axes and force equilibrium about z-axis
yield after neglecting higher order terms
OM, , OMey _
Fa + Heh Qe =0 (10.1.9)
OMay , OM,
eee i eeeeeme =
Gat + yi Ww =0 (10.1.10)Section 10.1 Classical Plate Theory 363
80 , OQy
ae” Oy
where Qe and Qy are the shear forces and p is the distributed pressure loading as seen
in Fig. 10.1.1. Elimination of the shear forces from Eqs (10.1.9) through (10.1.11)
gives
+p=0 (10.1.1)
OM, , 0?Mey , ?M,
Oa? + by + ay +p=0 (10.1.12)
Combining Eqs (10.1.4), (10.1.7) and (10.1.12) finally produces the biharmonic
governing equation for plate bending in terms of the transverse displacement w.
Ow otw dw op
bat + Batay * By = D,
(10.1.18)
where D, = aM5zy is the plate rigidity.
4 Example 10.1.1 We want to detive the equilibrium equations, Eqs
(10.1.9) through (10.1.11), from Eqs (9.4.1) through (9.4.3). Integration of Eqs
(9.4.1) and (9.4.2) over the plate thickness after multiplying them by z yields
0% , Otay , ter)
[Gee Bee + Ge ede =
OM, , 0Mzy
a2 + By
= Qe + [resel ig = 0 (10.1.14)
[°0 (Set Oe Pe) ete
=h/2
ae * dy 8:
OMry , OM,
epee. a; SY — Qy + [tyz2]” ee (10.1.15)
in which
a]
a= f Tey (10.1.16)
—h/2
na
Q,= [ Tyde (10.1.17)
=h/2
If there is no shear stress (Tey = Ty: = 0) on the top and bottom surfaces of
the plate, Eqs (10.1.14) and (10.1.15) are equal to Eqs (10.1.9) and (10.1.10).
Integrating Eq. (9.4.3) over the plate thickness gives
M3 (Ore, Dies , 802 )=
= + dz
Lol oy toe
we +e 4+.0,(h/2) — 0;(—h/2) = (10.1.18)364 Plate Structures Chapter 10
UE (ep.vp)
x (40%)
Figure 10.2.1 Three-Node Plate Bending Element
If o,(h/2) = p and o,(—h/2) = 0, Eq. (101.18) equals to Eq. (10.111). +
10.2 Classical Plate Bending Element
We derive a three-node plate bending element based on the classical plate theory
[34]. The clement is shown in Fig, 10.2.1. Each node of the element possesses three
degrees of freedom: displacement w in the z direction; a rotation about the z-axis, wy
(derivative of w with respect to y); and a rotation about the y-axis, we (derivative of
w with respect to z), as shown in the figure. The displacement function w is assumed
to be
w(2,y) = a +a22+asy+agz? +aszyt acy? + a72° + ag(2?y + zy”) +a9y° = [X]{a}
(10.2.1)
where
[X]J=[1 2 y 2? ay y? 2% (22y+ey) y?] (10.2.2)
{a}={a, az a3 ay as a5 a7 as}” (10.2.3)
Here constants a; are to be replaced by nodal variables w, wz and wy.
Taking derivatives of the displacement function with respect to z and y yields
as = ay + 2age + agy + Bare? + ag(22y + y?) (10.2.4)
bw : :
Gp 0+ 88 + Pay + ase? + Day) + Saoy (10.2.5)Section 10.2 Classical Plate Bending Element 365
Evaluation of Eqs (10.2.1) through (10.2.5) at the three nodal points gives the
following matrix expression:
{a} = [X]{a} (10.2.6)
where
{d}={wr (we): (wy): we (we)2 (wy)2 ws (we)s (wy)s}7 (10.2.7)
and
a om 2} am vf tf cinta, of
10 24) mw 0 3827 22imt+y? 0
0: 12..0 w 2m 0 xi+2e1y, Sy?
22 U2 23 2th yy 23 thy t+ coyZ
1
0
0
1 5
[X]=]0 1 0 22 yo 0 322 2ayty? 0 (20.2.8)
0
7
0
0
Ot 0 ay os 0 a Se
23 vs 23 toys uf 23 xiustzsus ue
1 0 2% ys 0 322 2zays+ue 0
0 1 0 23 2% 0 2242243 3y2
Inverting Eq. (10.2.6) and substituting the result into Eq. (10.2.1) yields
{w} = [H}{a} (10.2.9)
where the row vector of shape functions of size 9 x 1 is computed from
(H) = [X]xT-* (10.2.10)
Inplane strains are computed from Eq. (10.2.9) as
{e} = [B]{a} (10.2.1)
in which
{h={eo cy rey)” (10.2.12)
[B) = - (0X? (10.2.13)
000200 32 0
w=[p 000020 2% by (10.2.14)
000020 0 4e+y) 0
Substitution of the strain-nodal displacement relation, Eq. (10.2.11), into the
expression for element stiffness matrix, Eq. (9.1.24) yields
wl= f ftertoneys an
ater? ff tutta an (x
= [x7 f or pinanrsy (10.2.15)366 Plate Structures Chapter 10
where
eh
= Fl) (10.2.16)
Here (D] is the constitutive matrix of the plane stress condition, Q¢ is the two-
dimensional element domain in the zy-plane, and h is the thickness of the plate.
The element domain is the triangular shape as seen in Fig. 10.2.1. The element
stiffness matrix is of size 9 x 9 and the corresponding element nodal vector is given in
Eq. (10.2.7).
10.3 Shear Deformable Plate Element
The Mindlin/Reissner plate theory includes the effect of transverse shear defor-
mation like the Timoshenko beam theory. Hence, a plane normal to the midplane of
the plate before deformation does not remain normal to the midplane any longer after
deformation, The internal energy expression for the shear deformable plate should
include transverse shear energy as well as bending energy. The internal energy is
expressed as
u 5 [tor tonay +5 [ to fenav (10.3.1)
where
{o}={or oy tey}" (10.3.2)
fa}={ee ey tev)” (10.3.3)
are the bending stress and strain components while
{o.}= {te ty)" (10.3.4)
fe} = {722 ys)" (10.3.5)
are the transverse shear components. In addition, « is the shear energy correction
factor and equal to 8.
Substitution of the constitutive equations for both bending and shear compo-
nents yields
v=} i {a} Dila)av +5 [ {e}7(D.He}av (10.3.6)
in which
0
0 | (10.3.7)
=
3
(10.3.8)Section 10.3 Shear Deformable Plate Element 367
Further, V is the three-dimensional domain which is equal to dQ x dz. The zyz
coordinate axis is the same as shown in Fig. 10.1.1
In order to derive the element stiffness matrix for the shear deformable plate,
we need to express the strains in terms of nodal variables. The inplane displacements
are given as
u=—20,(2,y) (10.3.9)
v= —z6y(z,y) (10.3.1)
and the transverse displacement is
w= w(z,y) (10.38.11)
where 0, and 0, are rotations of the midplane about y and z axes, respectively. The
midplane is assumed to have no inplane deformation. For the shear deformable plate,
a
6,= oa — Yee (10.3.12)
dw
85 = Fy 70 (10.3.18)
where 7 is the angle caused by the transverse shear deformation as seen in Fig. 8.2.1.
Because the transverse displacement w and slope 0 are independent, we need
shape functions to interpolate them independently. As a result, the shear deformable
plate element requires C° compatibility. Isoparametric shape functions are used
for the plate clement formulation. The transverse displacement and slopes are
interpolated as
w= De, nw (10.3.14)
ist
6,5 Sime, (92) (10.3.15)
isl
8y = YO HilEsn) (Oy) (10.3.16)
is
Here n is the number of nodes per element and the same shape functions are used
for the displacement and slope interpolations. For the following presentation, bilinear
isoparametric shape functions are used for simplicity. However, higher-order shape
functions can be used in the same manner. Both bending and shear strains are
computed from displacements.
{eo} = -2[Bsl{d"} (10.3.17)
{es} = [Bsl{a*} (10.3.18)368 Plate Structures Chapter 10
where
a0 0 0 eo eo 0
l={ 9 4 0 0 % 0 0 eo 0 FF 0] (10.3.19)
on, oh 9 oH, oh 9 ams a, 9 Oe othe 9
32 oy oe oy Or ay be
{B.] =
an 0 4 -H, 0 4 -wy 0 4 -H, 0 i
a
0 -H, 4 0 -H, 4 0 -H, 4 0 -H, 4H
(10.3.20)
and
{d°}=
{(2): (Oy)x wi (Ox)2 (Oy)2 we (Ox)s (Ay)a wa (x)s (Oy) wa)”
(10.3.21)
Substitution of Eqs (10.3.17) and (10.3.18) into the energy expression Eq.
(10.3.6) yields for each plate element
oa say [fer oawadanays Sey [fe wae.ldcanter)
(10.3.2)
As a result, the element stiffness matrix for plate bending can be expressed as
(K*]
& i (Ba (DaBu}d0 + wh f (BAF (DllB.la0 (10.3.23)
in which h is the plate thickness. One thing to be noted here is that the shear energy
becomes dominant compared to the bending energy as the plate thickness becomes
very small compared to its side length. This is called shear locking. A heuristic
explanation for this can be given as below. The bending energy is proportional to
h® while the shear energy is propotional to h. Therefore, as b gets smaller, the shear
energy becomes dominant over the bending energy. To resolve this problem, the
selective or reduced integration technique was proposed. The key of the technique is
to underintegrate the shear energy term. In general, the bending term is integrated
using the exact integration rule. For example, when four-node bilinear isoparametric
elements are used, the 2 x 2 Gauss-Legendre quadrature is used for the bending term
while I-point integration is used for the shear term. Similarly, the bending term
utilizes 3 x 3 integrations and the shear term uses 2 x 2 integrations for the nine-node
biquadratic isoparametric shape function.
10.4 Plate Element With Displacement Degrees of Freedom
The plate bending element developed in this section is shown in Fig. 10.4.1
where z, y, and z describe the global coordinate of the plate and u, v, and w are theSection 10.4 Plate Element With Displacement Degrees of Freedom 369
au
Figure 10.4.1 Plate Element With Displacement Degrees of Freedom
displacements. h is the plate thickness. The zy plane is parallel to the midsurface
plane prior to deflection.
The displacement of any point in the plate can be expressed as
u=u(z,y,2) (10.4.1)
v=v(z,y,2) (10.4.2)
w=u(z,y) (10.4.3)
‘That is, the inplane displacements u and v vary through the plate thickness as well as
within the zy-plane while the transverse displacement w remains constant through the
plate thickness [35,36]. In order to interpolate the displacements using shape functions
and nodal displacements, two different interpolations are needed: one interpolation
within the zy-plane and the other in the z-axis. For the zy-plane interpolation, shape
functions N;(z, y) ate used where subscript i varies depending on the number of nodes
on the zy-plane. On the other hand, shape functions H(z) are used for interpolation
along the z-axis, where subscript j varies depending on the number of nodes along
the plate thickness. Because two inplane displacements are functions of z, y, and z,
both shape functions are used while the transverse displacement uses shape functions
Ni(e,y). Using isoparametric elements with mapping of £7-plane onto zy-plane and
¢-axis to z-axis, the three displacements can be expressed as
Ni Na
ws DD ME mH (ais (10.4.4)
i=l j=l
Ms Na
v= DOD ME mH (Cvs (10.4.5)
i= j=l
MM
w= SNE nui (10.4.6)
a370 Plate Structures Chapter 10
in which N; and No are the numbers of nodes in the zy-plane (7-plane) and z-axis
(¢-axis), respectively. In addition, the first subscript for u and v denotes the node
numbering in terms of zy-plane (Eq-plane) and the second subscript indicates the
node numbering in terms of z-axis (¢-axis). In the present study, N,=4 and N2=2.
That is, four-node quadrilateral shape functions are employed for the zy-plane (€7-
plane) interpolation and linear shape functions are employed for the z-axis (¢-axis)
interpolation. Nodal displacements u;; and v;; are displacements on the bottom
surface of the plate element and uj2 and vj2 are displacements on the top surface. As
seen in Eqs (10.4.4) through (10.4.6), there is no rotational degree of freedom for the
present plate bending element.
In the present formulation, both bending strain energy and transverse shear
strain energy are included. The bending strains and transverse shear strains are
expressed in terms of displacements.
&e je 0 07
wef y |. F y | { | (10.4.7)
You & & OL lw
ta)={%} = % z| {3} (10.4.8)
where {¢s} is the bending strains and {¢,} is the transverse shear strains. The normal
strain along the plate thickness ¢, is omitted here.
Substitution of displacements, Eqs (10.4.4) through (10.4.6), into the kinematic
equations, Eqs (10.4.7) and (10.4.8), with Ny=4 and N2=2 expresses both bending
and shear strains in the following way.
e
tho
{es} = [Bi}{a"} (10.4.9)
where
(Bs] = [[Bn] [Bs] [Bs] [Bs4]] (0.4.10)
Ae 0 eee 0 0
(=| 0 oe ee (10.4.1)
HR He WM WMO.
{a} = {4} {48} {di} {45} )7 (10.4.12)
{dj}={ua v1 ui2 v2 wi} (10.4.13)
{es} = [Bi]{d*} (10.4.14)
where
(B.]=((8.1] [Bex] [Bes] [Bsa] (10.4.15)
Nob 0 Ng
[Bui] i Nth ? i a. (10.4.16)Section 10.4 Plate Element With Displacement Degrees of Freedom. 371
The constitutive equation for the isotropic material is
{oo} = [Dsl{es} (10.4.17)
where
{o}={o2 oy Tey} (10.4.18)
[Di] = (10.4.19)
for the bending components and
{os} = [De}es} (10.4.20)
where
{os}={tyz tex 3” (10.4.21)
E_f1 0
[DJ = a+) [3 1 (10.4.22)
where Eq. (10.4.19) is the material property matrix for the plane stress condition as
usually assumed for the plate bending theory.
For a unidirectional fibrous composite, the material property matrices become
Di Dp 0
[Di)=|Di2 Dn 0 (10.4.23)
0 0 Des
in which
(10.4.24)
(10.4.25)
(10.4.26)
(10.4.27)
and
-[G@s 0
=[ — (10.4.28)
Here, 1 and 2 denote the longitudinal and transverse directions of the undirectional
composite, respectively. Further £ is the elastic modulus, Gj; is the shear modulus
of the i— j plane and 14; is Poisson’s ratio for strain in the j-direction when stressed
in the i-direction. There are five independent material properties for Eqs (10.4.23)
through (10.4.28) because of the reciprocal relation 42 = 434.372 Plate Structures Chapter 10
The total potential energy can be expressed as
N=U-w (10.4.29)
where the internal strain energy U consists of two parts like
U=U+U, (10.4.30)
The bending strain energy Us is
nes f {os}? {es}a0 (10.431)
and the transverse shear strain energy is
u, = 5 [ont (earan (10.4.32)
where 91 is the plate domain. After finite element discretization, substitution of the
previous equations into Eqs (10.4.31) and (10.4.32) gives
w= Fey? f teat alssanter) (20.4.33)
w= Dey f wt water) (10.434)
where summation is performed over the total number of finite elements and superscript
e indicates each element. Kinematic matrices [By] and [B,] are provided in Eqs
(10.4.10) and (10.4.15) while the constitutive matrices [Dj] and [D,] are given in Eqs
(10.4.19) and (10.4.22) for the isotropic material, and in Eqs (10.4.23) and (10.4.28) for
the unidirectional composite. For a laminated composite plate, the material property
matrix of each layer must be transformed based on the fiber axis of each layer and
the global reference coordinate system.
The external work is written as
W = {d}"{F} (10.4.35)
in which {d} is the system nodal displacement vector and {F°} is the system force
vector. Because there is no rotational degree of freedom for the present element,
the external moment is applied to the force vector as a couple applied on the top
and bottom nodes of the plate element as shown in Fig. 10.4.1. Finally invoking the
stationary value of the total potential energy yields the finite element matrix equation.
The element stiffness matrix can be expressed as
[kK] = if [Bal [Da] Be]d0 + f [Bi (Di 1B.1a0 (10.4.36)Section 10.5 Mixed Plate Element 373
One thing to be noted here is that the transverse shear strain energy term should be
under-integrated numerically to avoid shear locking, especially for a thin plate.
10.5 Mixed Plate Element
The basic equations for the classical plate theory are
ew, ow
Mz = -0.(53 + 5a) (10.5.1)
2, 2
= -».(5¢ +053) (10.5.2)
May = —D-(1— nee (10.5.3)
@M, | OM, , 8M,
eeucccecees eee ee
tat t oy + ag =P (10.5.4)
where M is the moment and D, = wy is the flexural rigidity of plate. E is the
elastic modulus, h is the plate thickness, v is Poisson’s ratio, and p is the pressure
loading. Equations (10.5.1) through (10.5.3) are the constitutive equations and Eq.
(10.5.4) is the equilibrium equation of moments.
Applying Galerkin’s method to Eqs (10.5.1) through (10.5.4) do not produce
the symmetric matrix. To this end, Eqs (10.5.1) through (10.5.3) are inverted so that
we have
S(Mz — vMy) + = =0 (10.5.8)
S(My — vMz) +2 =0 (10.5.6)
25(1+v)Mey + 2 ow 5 =0 (10.5.7)
where $ = 225. Now Galerkin’s method is applied to Eqs (10.5.4) through (10.5.7)
and integration by parts are performed to develop the weak formulation. The resultant
matrix equation for each element is given below [21]:
‘Ki Aa 0 Aa Me FR
Ky K 0 KlJM |_Jh%
0 0 Ks Ke|) Myf) Fs oO
ky Ka Ke 0 w Ki
where
fee f[ [NTF [Neo (10.5.9)
le374 Plate Structures Chapter 10
Ky=-vKy (10.5.10)
Kg = -[ anya a (10.5.11)
Ks =21+v)Ki (10.5.13)
vA (ETE @ ee
=-f rst, av (10.5.15)
R= =f wr Sy ar (10.5.16)
~ ft (Gre + Feu Jar (10.5.17)
7 [oF onar + f. A) (10.5.18)
Qn = Qele + Qyly (10.5.19)
Here, l; and ly ate direction cosines of the unit normal vector, and Q is the shear force.
[N] is the shape function vector. Any isoparametric element, of either quadrilateral
or triangular shape, may be used for these equations.
However, the previous formulation does not include the effect of transverse shear
deformation. The mixed plate bending formulation for thick plates is derived below.
Equilibrium equations for plate can be written as below including transverse shear
forces.
OM, , OMry
oy (10.5.20)
OMay , OM,
Saree eee ce =
da tay = 0 (10.5.2)
202 , 2p =0 (10.5.22)
az Oy
The major discrepancy between the thin and thick plate theories is the relations
between the rotations and the transverse deflection. In the thin plate theory the
rotations are not independent of the transverse deflection but they are independent
of the deflection for the thick plate theory. Thus, the displacements in the z, y and z
directions are expressed as
u=—z6,(z,y) (10.5.23)
v = —26y(z,y) (10.5.24)Section 10.5 Mixed Plate Element. 375
w= w(z,y) (10.5.25)
where 6, and y are rotations about y and z axes, respectively. Substitution of Eqs
(10.5.23) through (10.5.25) into the kinematic equations and use of the constitutive
equations give
S(Me—vMy) + oe =0 (10.5.26)
-
ED
S(My — Mz) + GY = 0 (10.5.27)
6,
28(1 +») Mey + oe +h =0 (10.5.28)
If 6, and 6y are replaced by $% and $, Eqs (10.5.26) through (10.5.28) are the same
as Eqs (10.5.5) through (10.5.7). Such relations, however, do not hold in the thick
plate theory.
Using the constituent and kinematic equations for transverse shear components,
the shear forces can be expressed in terms of rotations and the deflection.
dw
Qe = nGH(—05 + 5) (10.5.29)
a
Qy = nGh(—y + ra (10.5.30)
where « is the shear correction factor equal to 5/6, G is the shear modulus, and h is
the plate thickness. Rewritting Eqs (10.5.29) and (10.5.30) for the rotations yields
—_Q: , dw
tg ech 4 02 (105.31)
es. Ow
6 =-t a (10.5.32)
Putting Eqs (10.5.31) and (10.5.32) into Eqs (10.5.26) through (10.5.27) to eliminate
the rotations gives
1 OQ, , Ow
S(Mz - vMy) ~ ae SE + SG = 0 (10.5.3)
1.00, &
S(My ~My) = 2, 8d 4 FS = (10.5.34)
i/o. 6) ew
25(1 +0) May - al} 7 %) +25 (10.5.5)
Examining Eqs (10.5.33) through (10.5.35) reveals that the coefficients of shear forces
and moments are of order 1/h and 1/h°, respectively. Thus, as the plate thickness
approaches zero, the shear force terms can be neglected compared to the moment.
terms. This is reasonable because the shear deformation is negligible when the plate
thickness is very small compared to its length.376 Plate Structures Chapter 10
In order to eliminate the shear forces, Eqs (10.5.20) and (10.5.21) are substituted
into Eqs (10.5.33) through (10.5.35) as well as Eq. (10.5.22). Then, the resultant
equations are
1 oe 1 O'My , &w
(5~ sande) Mo 95M - eg wah Beiy * Fa? 79 (10.5.36)
13 1 PMgy , Ow
Bae _-— — Saas ees ee
vSMz + (s aig) Me Gh Bede + Hz =9 (10.5.37)
1 (8°M, OM, ‘My 1 @ 1 @ aw
~ san (Seas + Saat) + (28049) ~ sepa wan byt) Mev +? 12 y =
(10.5.38)
as well as Eq. (10.5.4). Equations (10.5.36) through (10.5.38) and (10.5.4) have the
same four variables, M,, My, Mcy and w, as those for the thin plate formulation.
If the terms associated with =, are neglected, these equations are reduced to the
thin plate equations. In fact, as the plate thickness approaches zero, these terms are
neglected. For the shear related terms are proportional to 4 while bending related
terms are proportional to js.
Applying Galerkin’s method to the four equations yields the following matrix
expression.
Kn Ki Kis Kia Mz A
Kin Ko. Koy Kaa M \_J%
Kis Koa Ks3 Kaa} ) Moy [~ ) Fs oo)
hig Kog Kag Kaa w Fy
where
Ky=S i INP wan + a f ey el" (10.5.40)
a, [NF [yaa (10.5.41)
kus= op fe wy [= “i (10.5.42)
Ku=- Liz a [ay (10.5.43)
los
an
iT Seca
Kn=5 iy wlan + bs f (10.5.44)
Tene (10.5.45)
28 = TGR Ine S s
ON ON
ee i: eae sy aa (10.5.46)Section 10.5 Mixed Plate Element 377
4 Elements 16 Buments
7
'
{
1 L L
> allel
' | i
i | i
t Tt i
ay a ae aed
Figure 10.5.1 Square Plate Mesh Using 4 and 16 Elements
: riven s 2 f ONT" [ON
Ko =a+0)s f wwrimans yf [FE] [BE] e+
a l. any" ge dQ (10.5.47)
“Au (Ce] Eee] + [Se] [Sp] ose
Ku =0 (10.5.49)
— | [vy" bar + [NJ]? VeledP (10.5.50)
ow ener + ef.
~ for nar + Ze | wr vote (10.5.51)
=-f. iw F (Fete + Fi Sey jars
wer wr (F (Mele + Mey + (Mayle + My ))ar (10.5.52)
= i [IN]? Qndl + f LN] pate (10.5.53)
i Ke
Some finite element solutions obtained using the present mixed plate bending
elements are shown in Tables 10.5.1 through 10.5.5. Isoparametric shape functions
were used for both interpolation of moments and displacements. Tables 10.5.1 and
10.5.2 show the results for simply supported and clamped square plates subjected
to uniform pressure loads. Because of symmetry, 4 or 16 four-node isoparametric
elements were used. The finite element mesh is seen in Fig. 10.5.1. The solutions
from the present mixed formulation are also compared with those from another mixed
formulation. Table 10.5.3 gives the finite element solutions obtained using 4 eight-
node isoparametric elements while Table 10.5.4 compares different isoparametric plate
bending elements. The accuracy of each isoparametric element is different even if the378 Plate Structures Chapter 10
Table 10.5.1 Comparison of Central Deflections and Bending Moments for a Uniformly
Loaded Simply Supported Square Plate.
Analytic | 4 Elem.* | 16 Elem.” | 4 Elem.*" | 16 Elem."*
Solution.
WD/PL* | 0.00406 0.00424 0.00411 0.00409 0.00407
M./PL? 0.0479 0.0525 0.0489 0.0505, 0.0485
M,/PL? 0.0479 0.0525 0.0489 0.0505, 0.0485
4-node quadrilateral element
(*) - Present F.E. Solution, (**) Solution from [20]
‘Table 10.5.2 Comparison of Central Deffections and Bending Moments for a Uniformly
Loaded Clamped Square Plate.
Analytic | 4 Elem." | 16 Elem.” | 4 Elem.** | 16 Elem.**
Solution.
WD/PL4 | 0.00126 0.00141 0.00128 0.00148 0.00132
M,/PI? -0.0513 -0.0476 -0.0499 -0.0487 -0.0508
M,/PL? -0.0513 -0.0476 -0.0499 ~0.0487 ~0.0508
4-node quadrilateral element
(*) - Present F.E. Solution, (**) Solution from [20]
total numbers of nodes are almost the same. The elements with more nodes per
element give more accurate results.
Both the thin plate theory and the thick plate theory are compared in Table
6.5.5 for an orthotropic plate. The plate is shown in Fig. 6.5.2 with the mesh and
material properties. As expected, as the ratio of the plate thickness to the side length
increases, there is an increasing difference between the two solutions. The thick plate
solutions are very close to the three-dimensional elasticity solutions for thick plates.
10.6 Hybrid Plate Element
The hybrid element is based on the assumed strains within the plate element.
[23]. This element requires C° continuity. The formulation is based on a modified
potential energy expression as given below for a plate.
a= f (- Hal" Dalle) — jo OMe) + (oF Dalla
aSection 10.6 Hybrid Plate Element 379
Table 10.5.3 Deflections at a Center of Square Plate
Boundary Condition Analytic Soln | Present Soln
All Edges Supported 0.00406 0.00406
All Edges Clamped 0.00126 0.00125
‘Two Opposite Edges Simply Supported
Two Other Edges Clamped 0.00191 0.00192
8-node quadrilateral element
Table 10.5.4 Comparison of Central Deflections Obtained Using Different Isoparametric
Elements for Uniformly Loaded Simply Supported Plates
We Error (%) Remark
Analytic Solution 0.2363 Timoshenko
3-Node Triangular 0.1814 -22.81 32 Elements
(25 Nodes)
6-Node Triangular 0.2344 -0.80 8 Elements
(25 Nodes)
4-Node Quadrilateral 0.2392 1.23 16 Elements
(25 Nodes)
8-Node Quadrilateral 0.2365, 0.08 4 Elements
(21 Nodes)
{e)7DalsHaan— [ (ay? pyar (106.1)
where
fo}=(% (M4 9}" (10.6.2)
fea} = {(-0 + 98) (Oy + $8) }" (10.6.3)
{d}={02 6, wi" (10.6.4)
Further [Ds] is the material property matrix for bending strains and [D,] is the matrix
for transverse shear strains. [Zs] is the matrix for the bending strain-displacement
operator and [L,] is the matrix for the shear strain-displacement operator. {p} is the
pressure loading on the plate.380
Plate Structures
Chapter 10
Orthotropie Porperties
Egy = 0.23319*E
Ey = 0.543103*Ex
Gry = 0.262931 *E x,
Gog = 0.159914*E x,
Cyz = 0.26681*E x
Figure 10.5.2 Orthotropic Plate
Invoking a stationary value of the equation results in the equilibrium equation
and the generalized strain-displacement relation. In order to obtain the finite element
model, generalized strains and displacements are discretized as the following:
{es} = [B]{ao} (10.6.5)
{es} = [Bsl{as} (10.6.6)
{d} = [N]{d} (10.6.7)
where generalized strains are assumed independently within each element and gener-
alized displacements are interpolated using generalized nodal displacement {d}. Thus,
[By] and [B,] are matrices consisting of the polynomial terms of the generalized strain
parameter vectors {ap} and {a5}, respectively. [N] is the matrix consisting of shape
functions. Substituting Eq. (10.6.5) through Eq. (10.6.7) into Eq. (10.6.1) yields
== Flas) "IGiltas} — Feu} IGsHas) + {oo}? He}
+ {as} [Ha} ~ {d}7{F} (10.6.8)
where
ton = f waPtotenen (106.9)
tel= f (wo. Ke.ua (10.6.10)
feSection 10.6 Hybrid Plate Element 381
Table 10.5.5 Generalized Central Deflections (EzW/Pt) for Thin or Thick Uniformly
Loaded Simply Supported Square Plates
3-D Reissner’s | Classical | Thin Plate | Thick Plate
b/a | t/a | Theory* | Theory* | Theory* Soln** Soln**
0.05 21542 21542 21201 21268 21606
0.5 | 01 1408.5 1408.4 1325.1 1329.3 1413.8
0.14 | 387.23 387.27 344.93 346.03 389.11
0.05 | 10443 10442 | 10246 10285 10483
10} 01 688.57 688.37 640.39 642.81 692.30
0.14 191.07 191.02 166.70 167.33 192.49
0.05 | 2048.2 2047.9 1988.1 1964.6 2026.8
20 | 01 139.08 138.93 124.26 122.79 138.26
0.14 | 39.790 39.753 32.345, 31.962 39.806
4-node quadrilateral element
(*) Analytical Solution, (**) Present F.E. Solution
[i] = i ABs (Dal(Eatv]an (10.6.11)
[H.) = iL [e Daltamian (10.6.12)
and
{F}= [ (N]" {p}ar (10.6.13)
re
Invoking stationary values of Eq. (10.6.8) with respect to {as} and {a}
respectively results in
—[Gs]{on} + [Ha]{d} = 0 (10.6.14)
-[G.}{ae} + [H]{d} = 0 (10.6.15)
Eliminating {op} and {a} from Eq. (10.6.8) using Eq (10.6.14) and Eq. (10.6.1)
gives
Une : :
T= 3 (G17 LH) + (H.)(G.)-7H.){d} — {a}7{F} — (10.6.16)
Equation (10.6.16) finally gives the following finite element system of equations
[KI{a} = {F} (106.17)382 Plate Structures Chapter 10
Ss
NORM. DEFLECTION
aT
NORM. DEFLECTION
3
3
oS
2x2 4x4 6x6 2x2 4x4 6x6
MESH IN A QUARTER PLATE MESH IN A QUARTER PLATE
(@) (b)
Figure 10.6.1 Uniformly Loaded Square Plate With: (a) Simply Support Boundary and
(b) Clamped Boundary
in which
(K] = (Hel? (Gi? ie) + HIG.) (10.6.18)
For a bilinear plate element, the generalized strain vectors are assumed as
100200400
[Bl=/0100200y0 (10.6.19)
oe ee
and
wa=[} | (10.6.20)
‘These expressions represent that the bending strain varies linearly and the shear strain
is constant within the bilinear plate element.
Finite element results from the hybrid plate bending elements are provided in
Fig. 10.6.1 through 10.6.3. Convergence study for simply supported and clamped
square plates subjected to uniform pressure loading is shown in Fig. 10.6.1 while that
for a uniformly loaded circular plate with the clamped edge is seen in Fig. 10.6.2.
The mesh for the circular plate is shown in Fig. 10.6.3.
10.7 MATLAB Application
A static finite element analysis of plate bending is performed using the shear
deformable plate bending formulation discussed in Sec. 10.3. Some example problems
are solved using MATLAB programs below.
4 Example 10.7.1 A simply supported square plate is subjected to a
concentrated load at the center. Find the deflection of the plate using the shearSection 10.7 MATLAB Application 383
6
075
NORM. DEFLECTION
2
a
3 9 27
MESH IN A QUARTER PLATE
Figure 10.6.2 Unifromly Loaded Circular Plate With Clamped Edge
{
3 ELEMENTS 12 ELEMENTS 27 ELEMENTS
Figure 10.6.3 Meshes for a Quarter of Circular Plate
deformable displacement formulation. The size of the plate is 10 in. by 10 in.
and its thickness is 0.1 in. It is made of a steel whose elastic modulus is 30 x 10°
psi and Poisson’s ratio 0.3. The applied force is 40 Ib at the center. A quarter of
the plate is modeled dne to symmetry and it is divided into 4 four-node elements
(see Fig. 7.1.1).
‘The MATLAB program is written for the finite element analysis. Two point
integration is used for the bending term while one point integration is used for
the shear term for the selective integration technique. As far as the boundary
conditions are concerned, two edges are simply supported and two edges are
symmetric. As a result, nodes 1, 2 and 3 are constrained for 6, and w. Nodes
1, 4 and 7 are constrained for Oy and w. Nodes 3, 6 and 9 are constrained for
8, while nodes 7, 8 and 9 are constrained for Oy. The resultant constrained
degrees of freedom are 1, 2, 3, 4, 6, 7, 9, 11, 12, 16, 20, 21, 23, 25, and 26, The
external force is applied at node 9 with the third degree of freedom. Hence, the
concentrated force is applied at the 27th degree of freedom of the load vector.
Because of the quarter symmetry, a quarter of the force is applied to the load
vector. The finite element solution gives the center deflection of 0.0168 in. while
the analytical solution is 0.0169in.384
Plate Structures Chapter 10
SYMMETRY
SIMPLE SUPPORT
SYMMETRY
SIMPLE SUPPORT
Figure 10.7.1 A Quarter of Square Plate With 4 Elements
%—
% Example 10.7.1
% A simply supported square plate is subjected to a concentrated load
% at the center. Find the deflection of the plate using 4 four-node
% isoparametric elements of the shear deformable displacement.
% formulation. The size of the plate is 10 in. by 10 in. and its
% thickness is 0.1 in. It is made of steel and the applied
% force is 40 Ib.
% (see Fig. 10.7.1 for the finite element mesh)
%
% Variable descriptions
% k = element matrix
% kb = element matrix for bending stiffness
% ks = element matrix for shear stiffness
element vector
system matrix
yystem vector
% disp = system nodal displacement vector
% gcoord = coordinate values of each node
% nodes = nodal connectivity of each element
% index = a vector containing system dofs associated with each element
% pointh = matrix containing sampling points for bending term
% weightb = matrix containing weighting coefficients for bending term
% points = matrix containing sampling points for shear term
% weights = matrix containing weighting coefficients for shear term
% bedof = a vector containing dofs associated with boundary conditions
% beval = a vector containing boundary condition values associated with
% the dofs in bcdof
% kinmtpb = matrix for kinematic equation for bending
% matmtpb = matrix for material property for bending
% kinmtps = matrix for kinematic equation for shearSection 10.7 MATLAB Application
% matmtps = matrix for material property for shear
%— ——________.
%
————
% input data for control parameters
% number of elements
% number of nodes per element
% number of dofs per node
% total number of nodes in system
sdof=nnode*ndof; % total system dofs
edof=nnel*ndof; % degrees of freedom per element
emodule=30e6; % elastic modulus
poisson=0.3; % Poisson’s ratio
+=0.1; % plate thickness
nglxb=2; nglyb=2; % 2x2 Gauss-Legendre quadrature for bending
nglxs=1; nglys= % 1x1 Gauss-Legendre quadrature for shear
%
%——
% input data for nodal coordinate values
% gcoord(i,j) where i-> node no. and j-> x ory
¢—$$$—$$$$__________
gcoord=[0.0 0.0; 2.5 0.0; 5.0 0.0;
0.0 2.5; 2.5 2.5; 5.0 2.5;
0.0 5.0; 2.5 5.0; 5.0 5.0};
%
%
% input data for nodal connectivity for each element
% nodes(i,j) where i-> element no, and j-> connected nodes
%— ee
nodes=[1 25 4;2365;4587;569 8];
%
Yo. ———$— ————“€~
% input data for boundary conditions
eee
bedof=[1 2 3 4679 11 12 16 20 21 23 25 26); % constrained dofs
beval=zeros(1,15); % whose described values are zeros
%
es
% initialization of matrices and vectors
%—
ff=zeros(sdof,1); % system force vector
kk=zeros(sdof,sdof); % system matrix
disp=zeros(sdof,1); % system displacement vector
index=zeros(edof,1); % index vector
kinmtpb=zeros(3,edof); % kinematic matrix for bending
zeros(3,3); % constitutive matrix for bending
sr08(2,edof); % kinematic matrix for shear
385386
Plate Structures Chapter 10
matmtps=zeros(2,2); % constitutive matrix for shear
%
%—
% force vector
%—
f1(27)
%
————————— —
% computation of element matrices and vectors and their assembly
% applied concentrated force
% for bending stiffness
%
{pointb, weightb]=feglqd2(nglxb,nglyb);
% % sampling points & weights
matmtpb=fematiso(1,emodule,poisson)*t?/12;
% % material property matrix
%
% for shear stiffness
%
[points, weights]=feglqd2(nglxs,nglys);
% sampling points & weights
.5*emodule/(1.0+poisson); % shear modulus
% shear correction factor
earm*shcof*t*[1 0; 0 1]; % material property matrix
for iel=1:nel % loop for the total number of elements
%
for i=1:nnel
nd(i)=nodes(iel,i); % extract nodes for (iel)-th element
xcoord(i)=gcoord(nd(i),1); % extract x value of the nodes
ycoord(i)=gcoord(nd(i),2); % extract y value of the nodes
end
%
k=zeros(edof,edof); % initialization of element matrix
kb=zeros(edof,edof); % initialization of bending matrix
ks=zeros(edof,edof); % initialization of shear matrix
%
%— ——
% numerical integration for bending term
[ec
for intx=I:nglxb
x=pointb(intx,1); % sampling point in x-axis
wtx=weightb(intx,1); % weight in x-axis
for inty==]:nglyb
y=pointb(inty,2); % sampling point in y-axis
wty=weightb(inty,2) ; % weight in y-axis
%Section 10.7 MATLAB Application
[shape,dhdr,dhds}=feisoq4 (x,y); % compute shape functions and
% % derivatives at sampling point
%
jacob2=fejacob2(nnel,dhdr,dhds,xcoord,ycoord); _-% Jacobian matrix
%
detjacob=det(jacob2); % determinant of Jacobian
invjacob=inv(jacob2); % inverse of Jacobian matrix
%
[dhdx,dhdy]=federiv2(anel,dhdr,dhds,invjacob); _-% derivatives w.r.t.
% % physical coordinate
%
kinmtpb=fekinepb(nnel,dhdx,dhdy); % bending kinematic matrix
%
%—
% compute bending element matrix
kb=kb+kinmtpb’*matmtpb*kinmtpb* wix*wty*detjacobs
end
end % end of integration loop for bending term
%
%-
% numerical integration for bending term
%—
for intx=1:1
x=points(intx,1); % sampling point in x-axis
wtx=weights(intx,1); % weight in x-axis
for inty=1:nglys
y=points(inty,2); % sampling point in y-axis
wty=weights(inty,2) ; % weight in y-axis
%
[shape,dhdr,dhds]=feisoq4(x,y); % compute shape functions and
% % derivatives at sampling point
%
jacob2=fejacob2(nnel,dhdr,dhds,xcoord,ycoord); % Jacobian matrix
%
detjacob=det(jacob2); % determinant of Jacobian
inyjacob=inv(jacob2); % inverse of Jacobian matrix
%
[dhdx,dhdy]=federiv2(nnel,dhdr,dhds,invjacob); % derivatives w.r.t.
% physical coordinate
%
kinmtps=fekineps(nnel,dhdx,dhdy,shape); % shear kinematic matrix
%
EE
% compute shear element matrix
ee
ks=ks+kinmtps’*matmtps*kinmtps*wtx*wty*detjacob;
387388
Plate Structures Chapter 10
%
end
end % end of integration loop for shear term
%
———
% compute element matrix
————
k=kb+!
%
index=feeldof(nd,nnel,ndof); % extract associated system dofs
%
kk=feasmbl1(kk,k,index); % assemble element matrices
%
end
%
——
% apply boundary conditions
%—______—.
[kk,ff]=feaplyc2(kk,ff,bcdof, beval);
%
%
% solve the matrix equation
displace=[num’ disp] % print nodal displacements
%
% :
function [kinmtpb]=fekinepb(nnel,dhdx,dhdy)
%
% Purpose:
% determine the kinematic matrix expression relating bending curvatures
% to rotations and displacements for shear deformable plate bending
%
% Synopsis:
% [kinmtpb]=fekinepb(nnel,dhdx,dhdy)
%
% Variable Description:
% nmel - number of nodes per element
% dhdx - derivatives of shape functions with respect to x
% dhdy - derivatives of shape functions with respect to y
% BcicceiceacecateuacectaicueHaie tatu euecaeueeneceennete
%
for i=I:nnelSection 10.7 MATLAB Application 389
is=i2+1;
kinmtpb(1,i1)=dhdx(i);
kinmtpb(2,i2)=dhdy(i);
kinmtpb(3,i1)=dhdy (i);
kinmtpb(3,i2)=dhdx(i);
kinmtpb(3,i3)=0;
end
%
%
fanction [kinmtps]=fekineps(nnel,dhdx,dhdy,shape)
%
% Purpose:
% determine the kinematic matrix expression relating shear strains
% to rotations and displacements for shear deformable plate bending
%
% Synopsis:
% [kinmtps]=fekineps(nnel,dhdx,dhdy,shape)
%
% Variable Description:
% nnel - number of nodes per element
% dhdx - derivatives of shape functions with respect to x
% dhdy - derivatives of shape functions with respect to y
% shape - shape function
%—
nel
1)*3+41;
end
%
——<—<—$ $$$
@& Example 10.7.2 The same square plate as that used in Example 10.7.1
is analyzed here. However, the boundary of the plate is clamped and the plate390
Plate Structures Chapter 10
is subjected to a uniform pressure of 2 psi. Using the same number of elements
as before, determine the center deflection of the plate.
Because of different boundary conditions and loads compared to the previous
example, the following vectors substitute those in Example 10.7.1. Otherwise,
the rest of the program is the same. The finite element result shows the center
deflection of 0.0088 in. while the analytical solution is 0.0092 in.
bedof=[1 23 4.56789 10 11 12 16 19 20 21 23 25 26);
beval=zeros(1,19);
2
f1(21)=3.125; (24) =6.25; ff(27)=3.125;Problems 391
Figure P10.4 Problem 10.4
10.1
10.2
10.6
10.7
Problems
Redo Example 10.7.1 for uniform pressure of 0.4 psi instead of the concentrated
load using the computer programs. Compare the present solution to that in
Example 10.7.1.
Redo Example 10.7.2 for a center load of 200 Ib instead of the pressure load
using the computer programs. Compare the present solution to that in Example
10.7.2.
Redo Example 10.7.1 for a plate with two opposite edges simply supported and
the other two opposite edges clamped.
Redo Example 10.7.1 for a mesh shown in Fig. P10.4. Change the angle @ in
the figure from 5 degrees to 30 degrees by an increment of 5 degrees. Compare
the present solutions to that in Example 10.7.1.
Solve a clamped circular plate which has elastic modulus of 200GPa, the radius
of 0.2m, and thickness of 10mm. The plate is subjected to a center load of
2.0KN. Find the deflection using the computer programs for meshes shown in
Fig. 10.6.3.
Redo Prob. 10.5 for a simply supported plate.
Find the deflection of a triangular shape of plate with simple support. The plate
dimension is given in Fig. P10.7 and its thickness is 2mm. Its elastic modulus
is 70GPA and it is subjected to a center force of 100N. Find the deflection of
the plate using the computer programs.
Redo Prob. 10.7 for the clamped plate.392 Plate Structures Chapter 10
015m
Im
Figure P10.7 Problem 10.7CHAPTER ELEVEN
CONTROL OF FLEXIBLE STRUCTURES
11.1 Introduction
The subject of flexible structures control consists of both dynamic analysis and
control theory. Usually, these two disciplines are mingled together in such a way that
we have to understand both disciplines to an equal extent in order to achieve our goal.
The dynamic analysis of flexible structures is dominated by the finite element analysis
as discussed in other chapters of this book. The control theory, on the other hand, is
introduced in this chapter. The essence of each exemplary control theory is discussed
in this chapter. In-depth discussion on control theories is available in a number of
literature. The control theories are introduced here to help the readers of this book to
understand the key features in conjunction with the finite element analysis of flexible
structures. Prsented in Fig. 11.1.1 is a flow diagram representing the relationship
between mathematical modeling and control system design for a given structural
system. The mathematical modeling represented by finite element method has been
discussed so far. The control system design in this chapter will mainly make use of
the finite element modeling results. The control system design is demonstrated also
using MATLAB. MATLAB m-files are generated in order to solve example problems.
The example problems in this chapter do not need a specific MATLAB Toolbor.
There are two distinct approaches for control system design. One is called the
frequency domain approach or classical control technique and the other one is the time
domain approach mainly adopted in the modern control technique. The frequency
domain approach relies upon analytical tools, and is still popular in majority of
existing control systems. For a given system, the frequency domain approach focuses
on the relationship between input and output. The input to the system is modified to
improve the output performance of a system. On the other hand, the modern control
technique is motivated by the rapid advance of computational power. The system
behavior is described by a set of variables over time domain. The control input then
tries to control each variable in order to satisfy desired system responses.
Each method has its own unique features. For the frequency domain approach,
plenty of analytical results and tools are available. On the other hand, the modern
control theory is easy to implement with the help of the abundant computational
393394 Control of Flexible Structures Chapter 11
StructuralSystem
Mathematical Finite Element
Heceing™ |L_Metnod
Dynan Control
age | Lh Desi
Figure 11.1.1 Flow Diagram for Structural Analysis and Control
software available. Modern control techniques impose another important issue on
estimation of all degrees of freedom with a limited number of sensors. The number
of sensors and actuators are usually less than the degrees of freedom of truncated
(approximate) systems. Estimating all the flexible modes is so critical to designing
an active control law in the time domain.
Active control of flexible structures is mainly represented by vibration control
using mechanical, electrical, and/or electromechanical devices. Inherent flexibility of
the structure raises a number of issues in the area of active vibration control. The
majority of flexible structures are distributed parameter systems. Therefore, they are
essentially infinite dimensional dynamic systems. Obviously, the infinite dimensional
systems are not practical for a control law design. Mathematical approaches like
finte element analysis can be used to derive finite dimensional systems which closely
duplicate the original infinite dimensional systems.
Before we work on the dynamic analysis and control system design for flexible
structures, we decide to introduce a basic stability theory. The stability theory is a
key concept establishing the goal of a control law design. By stability, we mean the
dynamic characeristic of a given dynamic system representing the behavior of dynamic
motion of the system; for example, whether the motion is decaying or growing with
respect to time.
The Lyapunov stability theory has been considered as a background for under-
standing the stability of a dynamic system.
11.2 Stability Theory
‘The Lyapunov stability theory is one of the most frequently referred tools for
stability analysis and control system design of a dynamic system [37].
Definition of Stability
Consider a general form of nonlinear system
#=f(e,t), — 2(to) = 20 (11.2.1)Section 11.2 Stability Theory 395
20) 2)
q 4
tee tt
4 4
t t
(a) ()
Figure 11.2.1 Time History of Stable(a) and Asymptotically Stable(b) System
where z is a vector and f(z,t) represents a general nonlinear function.
The above system is stable in the Lyapunov sense with respect to the
equilibrium state if for any given value ¢ > 0, there exists a number
8(¢,to) > 0 for which the ||z(t)]| < ¢ for all ¢ > to and |[z(to)]| < 6.
The above condition implies that the magnitude of z(¢) remains within a finite
small value in the presence of small initial perturbation. This definition includes also
undamped pure oscillatory motions.
Asymptotic Stability
The system is asymptotically stable if it satisfies the stability condition and
Timo [le(#){I = 0-
The asymptotic stability implies that the state vector converges to the equi-
librium point which is assumed zero at steady state in this case. The difference in
the time response of both stable and asymptotically stable cases is displayed in Fig.
11.2.1.
Lyapunov Second Stability Theory
The second Lyapunov stability theory uses a nonnegative energy function for a
given system. If the energy function decreases, then the system is stable toward an
equilibrium point. In other words, the system energy is taken to be minimum at the
equilibrium point.
Theorem : Let V(z) be an energy function or a Lyapunov function.
The system is stable if V(x) > 0 and V(2) < 0 for all values of 2. If the
time rate of change of V(z) is less than zero, that is V(x) < 0, then the
system is asymptotically stable.
It is important to note that we cannot draw any conclusion about stability
when a desired Lyapunov function is not found. In this case, we should try to find
a Lyapunov function or apply Lyapunov’s instability theorem which is not discussed
here. Another drawback of Lyapunov’s approach is that there is no systematic way of396 Control of Flexible Structures Chapter 11
finding an appropriate Lyapunov function candidate for stability proof. As it will be
explained later in this chapter, the Lyapunov second stability theory is also used for a
control law design; the control law tries to decrease a Lyapunov function suppressing
the motion of a system.
#& Example 11.2.1 Consider a set of coupled first order systems given by
By = 22 — 24(2} + 23)
fg = —2y — 2o(2? + 23)
‘We want to check stability of the system. The equilibrium points of the system
can be obtained from
a 2 =0
Based upon the equilibrium point, we select a trial Lyapunov function as
V = 2? 423 which is always positive. The time derivative of the Lyapunov
function in conjunction with the above set of equations turns out to be
V = —2(x? + 23)
Obviously, the V is guaranteed to be negative, and the system is asymptotically
stable.
t
& Example 11.2.2 Consider a simple second order system whose governing
equation is given as
mg +cg+kg=0
where m > 0, c>0, & > 0. There are many ways to check the stability of the
above system. In order to apply the Lyapunov theory, we transform the above
equation into a set of first order equations as
f=
maiz = —cay — key
where 21 = 4, 22 = ¢. Now we take a Lyapunov function as
1
V(e) = =(mz3 + kx?)
2
and the time derivative of the Lyapunov function becomes
V(e) =maoe, + kee;
aSection 11.2 Stability Theory 397
‘Therefore, V(a) <0 as long as 2 # 0, and the system is asymptotically stable.
Note that x2 can be instantaneously zero but converges to zero only at the steady
equilibrium point.
t
Stability of a Linear First Order System
Consider a linear first order system given as
{a} = [Al{e} (11.2.2)
where {z} is an n by 1 vector. In order to set up the stability condition of the system,
we choose the following Lyapunov function
U = {2} [Pl{z} (11.2.3)
The time derivative of the Lyapunov function becomes
U = {2} [P]{2} + {2} Pe}
= {x}"(AT[P] + [PIA){2} (11.2.4)
For stability we require
~(Q] = (Al? [P14 [PIA] (11.2.5)
where {Q] is a positive definite matrix satisfying the property {z}7[Q]{z} > 0 for
{2} #0 and [Q] = [Q]”. Thus,
U
—{2}"[Q{z} <0 (11.2.6)
Therefore, we have the following theorem for stability of the linear system.
Theorem: The linear system {2} = [A]{z} is stable if and only if there
exists a positive definite [P] matrix which satisfies Eq. (11.2.5) for a given
positive definite matrix [Q].
#& Example 11.2.3 Let us assume a two degree of freedom system
@=tte=(% i]t
In order to check the stability of the system, first we assume a [Q] matrix in Eq.
(11.2.5) as
a=[9 |398 Control of Flexible Structures Chapter 11
Once we have [Q], then we solve Eq. (11.2.5)
[ode fe ILS Alf SIR 3]
‘The resultant [P] matrix, therefore, becomes
1f7 1
dear [i a]
It is not difficult to check that [P] is positive definite, thus the system is stable.
t
Bounded Input Bounded Output(BIBO) Stability
In the above definition of stability, we were concerned only about a system itself
without including an external input, When there is a certain external input to the
system, the stability of the system obviously should take the magnitude of the input
into account. This is defined as, in general, the BIBO stability of the system as
described below:
When a system is under excitation by an external input with bounded
magnitude, it is called BIBO stable if the output of the system is also
bounded.
Detailed mathematical description on BIBO stability will be provided later when
we discuss the transfer function analysis of a system.
11.3 Stability of Multiple Degrees of Freedom Systems
In the previous section, we discussed the stability theory, especially stability
definition and Lyapunov function approach. Now, we want to discuss the stability
of linearized multiple degrees of freedom system which is the main outcome of finite
element analysis. Understanding the stability property of the multiple degrees of
freedom system is so important before we make any attempt to design a feedback
control law for a system.
System without Damping
Using the Lyapunov stability theory we want to analyze the stability of a
linearized multiple degrees of freedom system. Let us consider an n dimensional finite
dimensional dynamic system which is usually produced by finite element analysis.
The governing equations of motion without damping are described by
[M]{a} + [K]{a} = [F]{u} (11.3.1)Section 11.3 Stability of Multiple Degrees of Freedom Systems 399
where [M] is the system mass matrix, [K] is the stiffness matrix, {q} is the generalized
coordinate vector, [F] is the input influence matrix, and {u} is the control input
vector, In case there is no forcing function, the free vibrational motion satisfies
{M]{4} + [K]{a} = 0 (11.3.2)
and the solution to Eq. (11.3.2) is a pure sinusoidal motion as explained in Chapter
8
n
{al} = Deegan} (113.3)
Bea
where {¢;} and w, are system parameters. The stability of Eq. (11.3.2) can be proved
in various ways. One of them is the Lyapunov approach. Considering the fact that
the total system energy(kinetic plus potential energy) is a direct indicator of system
stability, a Lyapunov function candidate is suggested as
U = Haya} + $a) Ika} 134)
Note that the Lyapunov function is always positive (U > 0) since the mass and
stiffness matrices satisfy
{x}? [M]{x} > 0, {x}? [K]{x} > 0 (11.3.5)
for {x} # 0, and they are symmetric ([M] = [MJ]? and [K] = [K]*). Next, the time
derivative of the Lyapunov function in Eq. (11.3.4) in conjunction with Eq. (11.3.1)
yields
= % =tay"nta) + 1KHa))
={a}" [Fi{u} (11.3.6)
Without the external forcing input, that is {u} = 0, Eq. (11.3.6) becomes
U=
, or U=const (11.3.7)
In other words, the energy is conserved, therefore the motion should be a pure
sinusoidal type. It is important to note that the stability argument does not depend
upon the system property itself. That is, the mass and stiffness matrices are dropped
from the final expression of 7. This will be discussed again in the later part of this
chapter when we deal with deriving a stabilizing control law for infinite dimensional
systems.
If we want to design the input {u} so that the system is stabilized, then one
possible solution will be select {u} in such a way that
u<0 (11.3.8)400 Control of Flexible Structures Chapter 11
Ul
1, Damper
Figure 11.3.1 A Finite Element Beam Model with a Damper
In other words, the energy decreases toward an equilibrium point with the judicious
selection of the control input {u}.
System with Damping
A linearized multiple degrees of dynamic system with damping is described in
the form
(M]{a} + [D{4} + (K]{4} = [F{u} (11.3.9)
where [D] is a nonnegative definite damping matrix, The above system is intuitively
stable by the damping term introduced. In order to prove stability, we take a candidate
Lyapunov function
= 5a Ma) + (a) K1Ca)) (11.3.10)
As it is shown, the Lyapunov function form is the same as that of Eq. (11.3.4).
It is not surprising that both expressions are identical considering the Lyapunov
function represents total energy (kinetic and potential energies) in both cases. The
time derivative of the Lyapunov function becomes
U = {a)" (Ma) + (Ka) (11.3.1)
Using the governing equations of motion Bq. (11.3.9), we obtain
U = {a}"(-(D{a} + [F{u}) (11.3.12)
With the external control input ignored({u} = 0)
u =-{4}"[Di{a} (11.3.1)
Therefore, the time derivative of the Lyapunov function is a quadratic form in [D]
and {q}. If the damping matrix [D} is positive definite with {4}7[D]{q} > 0, then
the system is asymptotically stable. In case the damping matrix is only semidefinite,
ie. {4}7[D]{4} > 0, then the asymptotic stability of the system is not guaranteed.
In this case, we can use another technique in order to prove the stability.Section 11.4 Analysis of A Second Order System 401
# Example 11.3.1 Consider a finite element beam model in Fig. 11.3.1.
‘The material properties are given as EI = 1.112 x 104, p = 0.003, 1 = 20
with consistent units. A set of dampers is assumed at a nodal point in order to
add damping to the system. The mathematical modeling of this system is given
by
[M] {4} + [D}{a} + [K]{a} = 0
where
0.0223 = 0-—«0.0039- 0.0093
t= | 2. 00571 0.0093 ~0.0214
=| 0.0039 0.0093 0.0111 —0.0157
0.0093 0.0214 0.0157 0.0286
0.2668 = 00.1334 0.6671 0000
aos 0 8.8946. 0.6671 2.2236 10 0 0.0
(k]=10° x | _9 334 —o.6671 0.1384 —0.6671]° PI=l0 0 ¢ 0
0.6671 2.2236 -0.6671 4.4473 0000
where c is the damping coefficient of the damper. When the Lyapunov function
is taken as the total energy of the system, the time derivative of the Lyapunov
function becomes
U = ~{4}" Dita}
ee.
= -cg3
‘As long as 43 # 0, U < 0 and the system is asymptotically stable. Even if
the damping matrix has zero diagonal values, the system is still asymptotically
stable since G3 # 0 except for the equilibrium point.
t
11.4 Analysis of a Second Order System
‘A scalar second order system is frequently adopted as a reference explaining
fundamental concepts of system responses. In fact, the majority of dynamical systems
can be explained by using a scalar second order system. In this section, we want
to introduce the natural frequency and damping ratio of a scalar system and key
parameters associated with time responses. One of the most typical examples of the
scalar second order system is a spring mass and damper system in Fig. 11.4.1. The
governing equation of motion is given by
m+ ck + ke = f(t) (11.4.1)
where f(t) is the external force applied to the mass. Dividing both sides by the mass
yields
B+ (c/m)z + (k/m)z = f(t)/m (11.4.2)402 Control of Flexible Structures Chapter 11
ZZ
ST,
Figure 11.4.1 An Example of a Second Order System
At this point, we define two parameters
wn = Vk/m, 6 = 6/eer (11.4.3)
where wp, is the natural frequency and ¢ is the damping ratio. In addition, c., = 2Vmk
is defined as the critical damping ratio. As a consequence, Eq. (11.4.2) can be
rewritten as
E+ wad + wre = w?2 F(t) (11.4.4)
where we used f(t)/é = F(t). In order to derive the solution, we use the Laplace
transform technique ignoring initial conditions temporarily. This is also motivated by
the fact that, for linear systems, the stability condition is independent of the initial
conditions.
(5? + 2€wns +w2)X(s) = w2F(s) (11.4.5)
‘Therefore,
X(8)/F(s) = wh /(s? + 2uns + wn) (11.4.6)
where X(s) = L[z(t)] and F(s) = L[F(t)] are Laplace transforms of z(t) and F(t),
respectively. The equation obtained by setting the denominator of the transfer
function equal to zero is called characteristic equation. The characteristic equation of
the above transfer function, therefore, is given by
3? + uns +w2 =0 (11.4.7)
and the solution is given by
81,2 = Gn tun C2 —1 (11.4.8)
The above characteristic root is plotted on a complex plane in Fig. 114.2. The
dynamic behavior is dependent upon the magnitude of the damping ratio, ¢ and the
natural frequency wn.Section 11.4 Analysis of A Second Order System 403
Figure 11.4.2 Characteristic Roots of the Second Order System
‘As a special case, we analyze a step response of the system by selecting
F()=1, t>0 or F(s)=1/s (11.4.9)
that is, @ unit step input, By substituting F(s) into the above equation, the output
can be found by the inverse Laplace transform technique 2(t) = L~![X(s)]. The
result turns out to be dependent upon the magnitude of the damping ratio ¢.
i). Underdamped case, 0 < ¢ < 1 In this case, s1,2 are complex conjugate, and the
motion turns out to be a damped oscillatory one.
entunt
z(t) =1- in(wat + 4) (11.4.10)
where ¢ = tan-*/(1—(4)/¢ and wa = V(1—C?)w, is the damped natural
frequency.
ii). Critically damped case, ¢ = 1 In this case, 61,2 ate repeated real numbers. The
motion is monotonically increasing torward the steady state value
x(t) =1—e7-%""(1 + wat) (11.4.1)
iii). Overdamped case, ¢ > 1 In this case #1, are all negative real. The motion is
also monotonically increasing toward the steady state
—Cwat (62-1 wat 6/0? =1)wat
ae ( . © ) (114.12)
a1 AAs Vern C—O alin
Three different motions are presented in Fig. 11.4.3, As seen in the figure,
the usual response trends are exponentially decaying motions dictated by e~*s#
superimposed by damped sinusoidal motion with damped frequency, w,. In particular,
the constant 7 = 1/Cwn is called time constant which represents how long it takes for404 Control of Flexible Structures Chapter 11
aft)
Under damped, ¢ <0
Critically damped, ¢ = 1
time
Figure 11.4.3 Step Responses with Different Damping Ratios
the response to reach a certain level from an initial condition. The shorter the time
constant the quicker the response tends to be.
For an underdamped motion, some parameters are introduced characterizing
the transient response of the motion. Those parameters are sometimes used to
prescribe design specifications. In Fig. 11.4.4, different labels are used to denote
those specifications.
i) Rise time, ty:
The rise time is the required time for the response to start from zero value and
cross the unit steady state value. The rise time is found from
(1.4.13)
It turns out that
(114.14)
ii) Peak time, tp:
Peak time is the instance when the response reaches a maximum value. The
peak time can be obtained as
(11.4.15)
which produces
(114.16)Section 11.4 Analysis of A Second Order System 405
x(t)
Figure 11.4.4 Key Parameters in the Step Response
iii) Mazimum overshoot, My:
The maximum overshoot represents the amount of maximum deviation of the
response from the steady value. From Fig. 11.4.4, the maximum overshoot satisfies
My = 2(tp) - 1
=e CIVIC (1.4.17)
iv) Settling time, t,:
The step response of the underdamped system experiences a transient response
finally reaching a steady state value. The settling time represents the amount of time
it takes for the response to stay within a certain band prescribed around the steady
state value. The size of the band can be selected as, for example, 2% or 5%. For 2%
band, the settling time turns to be approximated by the multiple of the time constant,
Tr.
4
tsar oe (1.4.18)
@ Example 11.4.1 A second order system is given by
X()/F() = ay Ris ue
where w=2.0 (rad/sec) and (=0.2. The unit step response results are calculated
by calling fesecnd(¢, wn) command.
[tp,teste, Mp] = (1.603, 1.772, 10, 0.527]
function [t-p, t-z, ts, M-p]=fesecnd(zeta, w-n)406 Control of Flexible Structures Chapter 11
Re
Purpose:
% The function subroutine fesecnd.m calculates dynamic characteristics
% — ofa typical standard second order system.
% won?
% H(s)= —
% 8°242*zetatwon*s+wn"2
%
% Synopsis:
% [t-p, tx, M-p, t.s]=fsecond(zeta, wn)
%
% Variable Description:
% Input parameters : zeta - damping ratio
% wn - natural frequency
% Output parameters : t-p- peak time, tx rise time
%
t.s- settling time, M-p- maximum overshoot,
ee ——————————————
w_d=sqrt(1-zeta’2)*w-n; % Calculate undamped natural frequency
t_p=pi/w-d; % Calculate peak time
t_r=atan2(sqrt(1-zeta”2), -zeta); % Calculate rise time
ts=4/zeta/wn; % Calculate settling time
M-p=exp(-zeta*pi/sqrt(I-zeta"2)); -% Calculate maximum overshoot
———————
‘The same analysis and definition can be applied to multiple degree of freedom
systems which may be generated by finite element analysis. From the original
governing equation
(M]{4} + [D]{4} + [}{a} = [F]{u} (1.4.19)
and assuming Rayleigh damping with [C] = a[M]+£[K], we obtain modal coordinate
form governing equation
f+ wih turn =f, 1=1,2,. (1.4.20)
Now for each modal coordinate parameters(w;,¢;) we can check the dynamic charac-
eristics.
11.5 State Space Form Description
In general, the equations of motion of dynamic systems are described by second
order differential equations. Finite element modeling of dynamic systems also results
in second order differential equations of motion. The second order differential
equations cover a generic class of dynamic systems. The analytical solution of secondSection 11.5 State Space Form Description 407
u oD ay oo
Figure 11.5.1 Graphical Representation of the State Space Equation
order equations of motion is essentially equivalent to solving ordinary differential
equations.
On the other hand, the first order state space form description of dynamic
systems has certain advantages over the second order form description. The second
order equations can be transformed into first order equations and the first order forms
also can be transformed into second order equations. Majority of existing computer
software tools are written for the first order systems. This is due to the inherent
nature of first order equations which are more convenient for numerical computations.
Another significant advantage of the first order form descriptions is that we can
analyze the equations in an explicit form.
Consider a linearized second order dynamic system
(M}a} + (D]}{4} + [k}a} = [FHu} (11.5.1)
In order to write the above equation in the first order form we introduce a vector
which is usually called the state vector
fe} = {3} (115.2)
Now we have the following relationship
ya ffale 4
= 4 {3}= {toa - neta oer sten}
= 0 I q 0
=. are eax] {3} : [ian] oe
= (Alte) + 18a}
In other words, we rewrite the original second order differential equation in the first
order form by introducing the state vector {z}. The state vector and associated
properties constitute the so-called state space. The state space and related subjects
are well described in Refs. [38-41].
‘The size of the first order system, however, increases by twofold compared to
the original second order system. This may seem to be a drawback; however, the
modern computational capability resolves this concern to a considerable extent. As
mentioned earlier, the first order form has certain advantages being adopted in the
majority of engineering applications. Graphical representation of the first order state
space equation is presented in Fig. 11.5.1.408 Control of Flexible Structures Chapter 11
Eigenvalue Problem and Free Response
Let us consider a case without an external input, that is {u} = 0, sometimes
called the autonomous system. Thus, Eq. (11.5.3) reduces to
{e
=[Al{z} (11.5.4)
In order to find the solution {2(t)} to the above equation, we assume
{x(t)} = ce*#{$} (11.5.5)
where c is an arbitrary constant and {¢} is a vector of consistent size with {x(t)}.
‘Then we substitute Eq. (11.5.5) into Eq. (11.5.4) arriving at
e(AL — [A}e**{4} = 0 (11.5.6)
In other words,
(I-A) {6} = 0 (11.5.7)
Since {4} should be a nonzero vector, for the existence of a nontrivial solution, it
should follow
Pr- [Al] =0 (115.8)
The above equation can be solved for 2 for the given system matrix [A]. There are n
’s as the size of [A]. For an arbitrary i** );, we can rewrite Eq. (11.5.7) as
Ai{di} = [A] {oi} (11.5.9)
Equation (11.5.9) is called the eigenvalue problem, which is a crucial concept in linear
dynamic system analysis. Even if we eliminate the control input temporarily for the
eigenvalue analysis, the eigenvalues and eigenvectors are used for stability analysis
and computing mode shapes of the system.
For a given system, there may exist repeated eigenvalues, for example, a system
with rigid body motion such as pure translational and rotational motions. This
situation is treated by somewhat different approaches. Momentarily, the analysis is
restricted to the case where the eigenvalues are all distinct. Let us write the eigenvalue
problem for each index
Ar{d1} = [AH Gi}
Aa{da} = [AN $2}
: (11.5.10)
Ant{dn} = [A]{dn}
The above set of equations can be combined into a single matrix equation form
(PU) = (WItA) (115.11)Section 11.5 State Space Form Description 409
where [U/] is a matrix whose columns consist of eigenvectors and [I] is a diagonal
matrix for which each diagonal term consists of eigenvalues.
[0] = [{91}, {2},---.{4n}], [A] = diag [Ai],
Providing that the eigenvalues are all distinct, Bq. (1.5.11) turns into a relationship
[38-41]
an | (11612)
[4] = (UP TAY] (1.5.13)
That is, the matrix [A] can be rewritten as a combination of a matrix which consists
of eigenvectors and a diagonal matrix of eigenvalues. As discussed in the above, when
there are repeated eigenvalues, we should use a modified form of equation, Equation
(11.5.13) is named as similarity transformation of A.
Note that the eigenvalue problem is invariant under the similarity transformation
JAZ = (U}-AN] = |[0-* (7) - (TAN)
= [luz ~ fal |(01]
= |Ar-[A]] (11.5.14)
where we used |[U]| = 1/|[U]-?].
‘As we might remember, the eigenvaule problem for second order systems in
Chapter 8 can be similarly applied to a first order system in this case. The solution
of the eigenvalue problem leads us to the analytical expression for {2(t)}
{a(t)} = cre "{41} + e2e*"{ ba} +--+ ene{bn} (11.5.15)
The constants (c1,c2,---,¢n) are obtained from the initial condition. Equation
(1.5.15) tells us that once we compute eigenvalues and eigenvectors, then we obtain
the expression for the response with respect to the initial condition.
& Example 11.5.1 Let us consider a finite element model for a beam with
only one element as shown in Fig. 11.5.2. The mass and stiffness matrices for
this system are
ee a
[M1] = 495 —22h 4h? nB |-6h 4h?
rh 156 —22h EI[ 12 -6h
] = |
where p = 0.002kg/m is the linear mass density, EI = 10 Nm? is the beam
rigidity, and h = 1 m the element length. The second order system is converted
into the first order system in accordance with Eq. (11.5.3). The result is
0 0 1.0000 0
l= 0 0 0 1.0000
= 1630x104 —4.8 x 104 0 0
5.04 x 105 —3.69 x 10° 0 0410 Control of Flexible Structures Chapter 11
Now we have a MATLAB built-in function /V,DJ=eig([A]) command, as
explained in Chapter 1, in order to compute the eigenvalue and eigenvector of
[A]. Consequently,
Dia = £550.35%, gq = 15.86%
2.3635 x 1074 2.3635 x 1074
_ J 1.8016 x 10-% _ J 1.8016 x 10-9
{d= ) “orzo f? {2}= 4) "_orsors
0.9915i —0.9915i
—1.0516 x 10-? 1.0516 x 10-7
— J -1.4485 x 10-? _ J -1.4485 x 107?
{ta}= —0.5874i 2 ae 0.58741
—0.8091i 0.8091¢
The time response of the system due to the initial condition can be written as
{x(t)} = cr{dr}e™! + co{da}e™* + cs{ds}e™*t + calba}e
In order to find the constants(c;,C2,¢3,¢4), We assume an initial condition as
0.05
—0.01
0.1
0.0
{2} =
‘Therefore, the constants are calculated as
C1, ¢2 = —26.719 + 8.4788 x 10771, 3, e4 = —2.9779 + 0.10391
Substituting the constants into {z(t)} and using the famous Euler’s formula as
(38)
e'? = cos(0) + isin(0)
we obtain the final form for {2(t)} analytically
—1.2630 x 10-? —4.0079 x 10-5
9.6274 x 107? —3.0551 x 10-* |
{2(} =) 75 062 x 10-2 7 °28(550:35t) + aes sin(550.35t)-+
~1.6813 x 107? 5.2984 x 10?
6.2673 x 107? 2.1852 x 107?
8.6328 x 10-? 3.0100 x 10-3 |.
1.2206 x 10-1 f °08(55-86t) + 4°" 5 syog fin (55.86¢)
1.6813 x 107! —4.8221Section 11.5 State Space Form Description 4u1
Figure 11.5.2 A Finite Element Model with a Single Element
Forced Response and State Transition Matrix
The solution to the first order equation Eq. (11.5.3) can be also found by using
the Laplace transform technique
X(s) — {2(0)} = [A]X(s) + [B]U(s) (1.5.16)
where X(s) = L{{z(1)}] is the Laplace transform of {2(#)}, and U(s) = L[{u(t)}] is
the Laplace transform of {u(t)}. Alternatively,
X (8) = (sI ~ [A])~'2(0) + (87 — [A])“'[B]U(s) (1.5.17)
In order to find the time response, we take the inverse Laplace transform of X(s).
First, the inverse Laplace transform of (sI — [4])~! should be evaluated. If a is a
scalar, we know
L((s —a)7!] = e* (11.5.18)
Generalization of Eq. (1.5.18) to a matrix [A], we can derive a similar relationship
as shown below.
I-((sI — [A])~4] = el4lt (11.5.19)
Therefore,
{x(t)} = 4lt{2(0)} + f[ fAlC—)[B]{u(r)}dr (11.5.20)
0
where the second term on the right-hand represents a convolution integral. The
response consists of two parts; one is due to the initial condition ({2(0)}) and the
other one is due to the control input ({u}).
It is not as straightforward to understand ell as the scalar case e%. In order
to analyze ell, first. we introduce the Talyor series expansion.
(aye?
2!
[ape
ef4lt = [7] + [Ale t+ 3i
at
(11.5.21)
‘The first fundamental question is whether the infinite series converge or not. The
answer is yes from a physical intuition; the factorial term in the denominator412 Control of Flexible Structures Chapter 11
dominates the exponential term in the numerator. Efficient numerical algorithms
have been developed and a MATLAB built-in routine expm is also available.
Another interesting property can be derived from Eq. (11.513) which calculates
the exponential of a matrix
efit = [uy telI[U] (1.5.22)
where
eA = diagle™], §=1,2,...,0
The proof follows as
ofAlt = [1] + [A]t + [A]?t?/2! + [A]?e2/31+ +
= UP) + (OP Ae) + (UP AOU Tao)? /2
+ (UI TAO CO AMO) (OT TATU) F/3! + +»
= (U)*(U1 + [Ale + (AP 7/2! + [ASH9/31+ + [0]
= [uy tel] (1.5.23)
Therefore, the eigenvalue solution can be used again to calculate el4lt,
Let’s go back to the first order equation without the control input term. Thus,
{2} = [A]{z} (11.5.4)
In order to derive the solution, we assume
{2(t)} = [®(t, r){2(7)} (1.5.24)
where [6(t, 7)] is the so-called state transition matrix which relates the state variable
at different instants, that is, {2(t)} with {2(r)} for ¢ > 7. Obviously, [6(¢,7)] is a
time varying matrix. Now substitute Eq. (11.5.24) into Eq. (11.5.4).
(BE, T)He(7)} = (ANE, Ne(7)} (1.5.25)
Therefore, |
[®(,7)] = [AI@E, 7)] (1.5.26)
By solving Eq. (11.5.26) we can derive the analytical expression of {x(t)}. The above
differential equation is combined with the initial condition of [®(¢,7)] by noting that
{2(r)} = O(r,7){2(7)} (1.5.27)
In other words,
[O77 =7 (11.5.28)
and the combination of Eqs. (1.5.26) and (1.5.28) constitutes a matrix differential
equation. Obviously, a numerical integration technique can be applied to the
differential equation. There are other useful properties of [(t, r)] [38-41].
@ [8G,7)] = (OE, 42)G@2,7)], t