·
Engenharia Civil ·
Elementos Finitos
Send your question to AI and receive an answer instantly
Recommended for you
67
Métodos Numéricos para Engenharia: Introdução ao Método dos Elementos Finitos
Elementos Finitos
IFPB
8
Notas de Aula: Introdução ao Método dos Elementos Finitos
Elementos Finitos
IFPB
28
Elemento Finito Triangular CST: Formulação Matemática e Aplicações
Elementos Finitos
IFPB
1
Analise MEF da Barra Carregada Axialmente: Comparativo Analitico e Computacional
Elementos Finitos
IFPB
13
Notas de Aula: Introdução ao Método dos Elementos Finitos
Elementos Finitos
IFPB
8
Notas de Aula sobre o Método dos Elementos Finitos - Elemento Tetraédrico de Quatro Nós
Elementos Finitos
IFPB
486
Introduction to Finite Element Analysis Using MATLAB and Abaqus
Elementos Finitos
IFPB
3
Apostila sobre o Método dos Elementos Finitos para Engenharia Civil
Elementos Finitos
IFPB
5
Notas de Aula: Introdução ao Método dos Elementos Finitos
Elementos Finitos
IFPB
3
Notas de Aula: Introdução ao Método dos Elementos Finitos
Elementos Finitos
IFPB
Preview text
Peter Kattan MATLAB Guide to Finite Elements AN INTERACTIVE APPROACH Second Edition with CDROM Springer MATLAB Guide to Finite Elements Peter I Kattan MATLAB Guide to Finite Elements An Interactive Approach Second Edition With 108 Figures and 25 Tables Peter I Kattan PhD PO BOX 1392 Amman 11118 Jordan pkattantedatanetjo pkattanlsuedu Library of Congress Control Number 2007920902 ISBN13 9783540706977 Springer Berlin Heidelberg New York This work is subject to copyright All rights are reserved whether the whole or part of the material is concerned specifically the rights of translation reprinting reuse of illustrations recitation broadcasting reproduction on microfilm or in any other way and storage in data banks Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9 1965 in its current version and permission for use must always be obtained from Springer Violations are liable for prosecution under the German Copyright Law Springer is a part of Springer ScienceBusiness Media springercom c SpringerVerlag Berlin Heidelberg 2008 The use of general descriptive names registered names trademarks etc in this publication does not imply even in the absence of a specific statement that such names are exempt from the relevant protective laws and regulations and therefore free for general use Typesetting Integra Software Services Pvt Ltd Pondicherry India Cover design Erich Kirchner Heidelberg Printed on acidfree paper SPIN 11301950 423100Integra 5 4 3 2 1 0 Dedicated to My Professor George Z Voyiadjis Preface to the Second Edition Soon after the first edition of this book was published at the end of 2002 it was realized that a new edition of the book was needed I received positive feedback from my readers who requested that I provide additional finite elements in other areas like fluid flow and heat transfer However I did not want to lengthen the book considerably Therefore I decided to add two new chapters thus adding new material while keeping the size of the book reasonable The second edition of the book continues with the same successful format that characterized the first edition which was sold out in less than four years I continue to emphasize the important features of interactivity of using MATLAB1 coupled with the simplicity and consistency of presentation of finite elements One of the most important features also is bypassing the use of numerical integration in favor of exact analytical integration with the use of the MATLAB Symbolic Math Toolbox2 The use of this toolbox is emphasized in Chaps 12 13 14 and 16 In the new edition two important changes are immediately noted First I corrected the handful of typing errors that appeared in the first edition Second I added two new chapters Chap 16 includes another solid threedimensional element the eight noded brick element in great detail The final chapter Chap 17 provides a review of the applications of finite elements in other areas like fluid flow heat transfer geotechnical engineering electromagnetics structural dynamics plasticity etc In this chapter I show how the same consistent strategy that was followed in the first sixteen chapters can be used to write MATLAB functions in these areas by providing the MATLAB code for a onedimensional fluid flow element One minor drawback of the first edition as I see it is the absence of a concluding chapter Therefore I decided to remedy the situation by adding Chap 17 as a real concluding chapter to the book It is clear that this chapter is different from the first sixteen chapters and thus may well provide a well written conclusion to the book The second edition still comes with an accompanying CDROM that contains the full set of Mfiles written specifically to be used with this book These MATLAB functions have been tested with version 7 of MATLAB and should work with any 1 MATLAB is a registered trademark of The MathWorks Inc 2 The MATLAB Symbolic Math Toolbox is a registered trademark of The MathWorks Inc VIII Preface to the Second Edition later versions In addition the CDROM contains a complete solutions manual that includes detailed solutions to all the problems in the book If the reader does not wish to consult these solutions then a brief list of answers is provided in printed form at the end of the book Iwouldliketothankmyfamilymembersfortheirhelpandcontinuedsupportwith out which this book would not have been possible I would also like to acknowledge the help of the editior at SpringerVerlag Dr Thomas Ditzinger for his assistance in bringing this book out in its present form Finally I would like to thank my brother Nicola for preparing most of the line drawings in both editions In this edition I am providing two email addresses for my readers to contact me pkattantedatanetjo and pkattanlsuedu The old email address that appeared in the first edition was cancelled in 2004 December 2006 Peter I Kattan Preface to the First Edition This is a book for people who love finite elements and MATLAB3 We will use the popular computer package MATLAB as a matrix calculator for doing finite element analysis Problems will be solved mainly using MATLAB to carry out the tedious and lengthy matrix calculations in addition to some manual manipulations especially when applying the boundary conditions In particular the steps of the finite element method are emphasized in this book The reader will not find readymade MATLAB programs for use as black boxes Instead stepbystep solutions of finite element prob lems are examined in detail using MATLAB Problems from linear elastic structural mechanics are used throughout the book The emphasis is not on mass computation or programming but rather on learning the finite element method computations and understanding of the underlying concepts In addition to MATLAB the MATLAB Symbolic Math Toolbox4 is used in Chaps 12 13 and 14 Many types of finite elements are studied in this book including the spring element the bar element twodimensional and threedimensional truss elements plane and space beam and frame elements twodimensional elasticity elements for plane stress and plane strain problems and one threedimensional solid element Each chapter deals with only one type of element Also each chapter starts with a summary of the basic equations for the element followed by a number of examples demonstrating the use of the element using the provided MATLAB functions Special MATLAB functions for finite elements are provided as Mfiles on the accompanying CDROM to be used in the examplesThese functions have been tested successfully with MATLAB versions 50 53 and 61 They should work with other later versions Each chapter also ends with a number of problems to be used as practice for students This book is written primarily for students studying finite element analysis for the first time It is intended as a supplementary text to be used with a main textbook for an introductory course on the finite element method Since the computations of finite elements usually involve matrices and matrix manipulations it is only natural that students use a matrixbased software package like MATLAB to do the calculations 3 MATLAB is a registered trademark of The MathWorks Inc 4 The MATLAB Symbolic Math Toolbox is a registered trademark of The MathWorks Inc X Preface to the First Edition In fact the word MATLAB stands for MATrix LABoratory The main features of the book are 1 The book is divided into fifteen chapters that are well defined ad correlated 2 The books includes a short tutorial on using MATLAB in Chap 1 3 The CDROM that accompanies the book includes 75 MATLAB functions M files that are specifically written to be used with this book These functions comprise what may be called the MATLAB Finite Element Toolbox It is used mainly for problems in structural mechanics The provided MATLAB functions are designed to be simple and easy to use 4 A sequence of six steps is outlined in the first chapter for the finite element method These six steps are then used systematically in each chapter throughout the book 5 The book stresses the interactive use of MATLAB Each example is solved in an interactive session with MATLAB No readymade subroutines are provided to be used as black boxes 6 Answers to the all problems are provided at the end of the book 7 AsolutionsmanualisalsoprovidedontheaccompanyingCDROMThesolutions manual includes detailed solutions to all the problems in the book It is over 300 pages in length The author wishes to thank the editors at SpringerVerlag especially Dr Thomas Ditzinger for their cooperation and assistance during the writing of this book Special thanks are also given to my family members without whose support and encourage ment this book would not have been possible In particular I would like to thank Nicola Kattan for preparing most of the figures that appear in the book February 2002 Peter I Kattan Table of Contents 1 Introduction 1 11 Steps of the Finite Element Method 1 12 MATLAB Functions for Finite Element Analysis 2 13 MATLAB Tutorial 4 2 The Spring Element 11 21 Basic Equations 11 22 MATLAB Functions Used 12 3 The Linear Bar Element 27 31 Basic Equations 27 32 MATLAB Functions Used 28 4 The Quadratic Bar Element 45 41 Basic Equations 45 42 MATLAB Functions Used 46 5 The Plane Truss Element 61 51 Basic Equations 61 52 MATLAB Functions Used 62 6 The Space Truss Element 91 61 Basic Equations 91 62 MATLAB Functions Used 92 7 The Beam Element 109 71 Basic Equations 109 72 MATLAB Functions Used 110 8 The Plane Frame Element 137 81 Basic Equations 137 82 MATLAB Functions Used 139 XII Table of Contents 9 The Grid Element 175 91 Basic Equations 175 92 MATLAB Functions Used 176 10 The Space Frame Element 193 101 Basic Equations 193 102 MATLAB Functions Used 195 11 The Linear Triangular Element 217 111 Basic Equations 217 112 MATLAB Functions Used 219 12 The Quadratic Triangular Element 249 121 Basic Equations 249 122 MATLAB Functions Used 251 13 The Bilinear Quadrilateral Element 275 131 Basic Equations 275 132 MATLAB Functions Used 278 14 The Quadratic Quadrilateral Element 311 141 Basic Equations 311 142 MATLAB Functions Used 314 15 The Linear Tetrahedral Solid Element 337 151 Basic Equations 337 152 MATLAB Functions Used 340 16 The Linear Brick Solid Element 367 161 Basic Equations 367 162 MATLAB Functions Used 371 17 Other Elements 397 171 Applications of Finite Elements in Other Areas 397 172 Basic Equations of the Fluid Flow 1D Element 398 173 MATLAB Functions Used in the Fluid Flow 1D Element 400 References 403 Answer to Problems 405 Contents of the Accompanying CDROM 425 Index 427 1 Introduction This short introductory chapter is divided into two parts In the first part there is a summary of the steps of the finite element method The second part includes a short tutorial on MATLAB 11 Steps of the Finite Element Method There are many excellent textbooks available on finite element analysis like those in 118 Therefore this book will not present any theoretical formulations or deriva tions of finite element equations Only the main equations are summarized for each chapter followed by examples In addition only problems from linear elastic structural mechanics are used throughout the book The finite element method is a numerical procedure for solving engineering prob lems Linear elastic behavior is assumed throughout this book The problems in this book are taken from structural engineering but the method can be applied to other fields of engineering as well In this book six steps are used to solve each problem using finite elements The six steps of finite element analysis are summarized as follows 1 Discretizing the domain this step involves subdividing the domain into elements and nodes For discrete systems like trusses and frames the system is already discretized and this step is unnecessary In this case the answers obtained are exact However for continuous systems like plates and shells this step becomes very important and the answers obtained are only approximate In this case the accuracy of the solution depends on the discretization used In this book this step will be performed manually for continuous systems 2 Writing the element stiffness matrices the element stiffness equations need to be written for each element in the domain In this book this step will be performed using MATLAB 3 Assembling the global stiffness matrix this will be done using the direct stiffness approach In this book this step will be performed using MATLAB 2 1 Introduction 4 Applying the boundary conditions like supports and applied loads and dis placements In this book this step will be performed manually 5 Solving the equations this will be done by partitioning the global stiffness matrix and then solving the resulting equations using Gaussian elimination In this book the partitioning process will be performed manually while the solution part will be performed using MATLAB with Gaussian elimination 6 Postprocessing to obtain additional information like the reactions and el ement forces and stresses In this book this step will be performed using MATLAB It is seen from the above steps that the solution process involves using a com bination of MATLAB and some limited manual operations The manual operations employed are very simple dealing only with discretization step 1 applying bound ary conditions step 4 and partitioning the global stiffness matrix part of step 5 It can be seen that all the tedious lengthy and repetitive calculations will be performed using MATLAB 12 MATLAB Functions for Finite Element Analysis The CDROM accompanying this book includes 84 MATLAB functions Mfiles specifically written by the author to be used for finite element analysis with this book They comprise what may be called the MATLAB Finite Element Toolbox These functions have been tested with version 7 of MATLAB and should work with any later versions The following is a listing of all the functions available on the CDROM The reader can refer to each chapter for specific usage details SpringElementStiffnessk SpringAssembleK k i j SpringElementForcesk u LinearBarElementStiffnessE A L LinearBarAssembleK k i j LinearBarElementForcesk u LinearBarElementStressesk u A QuadraticBarElementStiffnessE A L QuadraticBarAssembleK k i j m QuadraticBarElementForcesk u QuadraticBarElementStressesk u A PlaneTrussElementLengthx1 y1 x2 y2 PlaneTrussElementStiffnessE A L theta PlaneTrussAssembleK k i j PlaneTrussElementForceE A L theta u 12 MATLAB Functions for Finite Element Analysis 3 PlaneTrussElementStressE L theta u PlaneTrussInclinedSupportT i alpha SpaceTrussElementLengthx1 y1 z1 x2 y2 z2 SpaceTrussElementStiffnessE A L thetax thetay thetaz SpaceTrussAssembleK k i j SpaceTrussElementForceE A L thetax thetay thetaz u SpaceTrussElementStressE L thetax thetay thetaz u BeamElementStiffnessE I L BeamAssembleK k i j BeamElementForcesk u BeamElementShearDiagramf L BeamElementMomentDiagramf L PlaneFrameElementLengthx1 y1 x2 y2 PlaneFrameElementStiffnessE A I L theta PlaneFrameAssembleK k i j PlaneFrameElementForcesE A I L theta u PlaneFrameElementAxialDiagramf L PlaneFrameElementShearDiagramf L PlaneFrameElementMomentDiagramf L PlaneFrameInclinedSupportT i alpha GridElementLengthx1 y1 x2 y2 GridElementStiffnessE G I J L theta GridAssembleK k i j GridElementForcesE G I J L theta u SpaceFrameElementLengthx1 y1 z1 x2 y2 z2 SpaceFrameElementStiffnessE G A Iy Iz J x1 y1 z1 x2 y2 z2 SpaceFrameAssembleK k i j SpaceFrameElementForcesE G A Iy Iz J x1 y1 z1 x2 y2 z2 u SpaceFrameElementAxialDiagramf L SpaceFrameElementShearZDiagramf L SpaceFrameElementShearYDiagramf L SpaceFrameElementTorsionDiagramf L SpaceFrameElementMomentZDiagramf L SpaceFrameElementMomentYDiagramf L LinearTriangleElementAreaxi yi xj yj xm ym LinearTriangleElementStiffnessE NU t xi yi xj yj xm ym p LinearTriangleAssembleK k i j m LinearTriangleElementStressesE NU t xi yi xj yj xm ym p u LinearTriangleElementPStressessigma 4 1 Introduction QuadTriangleElementAreax1 y1 x2 y2 x3 y3 QuadTriangleElementStiffnessE NU t x1 y1 x2 y2 x3 y3 p QuadTriangleAssembleK k i j m p q r QuadTriangleElementStressesE NU t x1 y1 x2 y2 x3 y3 p u QuadTriangleElementPStressessigma BilinearQuadElementAreax1 y1 x2 y2 x3 y3 x4 y4 BilinearQuadElementStiffnessE NU t x1 y1 x2 y2 x3 y3 x4 y4 p BilinearQuadElementStiffness2E NU t x1 y1 x2 y2 x3 y3 x4 y4 p BilinearQuadAssembleK k i j m n BilinearQuadElementStressesE NU x1 y1 x2 y2 x3 y3 x4 y4 p u BilinearQuadElementPStressessigma QuadraticQuadElementAreax1 y1 x2 y2 x3 y3 x4 y4 QuadraticQuadElementStiffnessE NU t x1 y1 x2 y2 x3 y3 x4 y4 p QuadraticQuadAssembleK k i j m p q r s t QuadraticQuadElementStressesE NU x1 y1 x2 y2 x3 y3 x4 y4 p u QuadraticQuadElementPStressessigma TetrahedronElementVolumex1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 TetrahedronElementStiffnessE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 TetrahedronAssembleK k i j m n TetrahedronElementStressesE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 u TetrahedronElementPStressessigma LinearBrickElementVolumex1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 x6 y6 z6 x7 y7 z7 x8 y8 z8 LinearBrickElementStiffnessE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 x6 y6 z6 x7 y7 z7 x8 y8 z8 LinearBrickAssembleK k i j m n p q r s LinearBrickElementStressesE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 x6 y6 z6 x7 y7 z7 x8 y8 z8 u LinearBrickElementPStressessigma FluidFlow1DElementStiffnessKxx A L FluidFlow1DAssembleK k i j FluidFlow1DElementVelocitiesKxx L p FluidFlow1DElementVFRKxx L p A 13 MATLAB Tutorial In this section a very short MATLAB tutorial is provided For more details consult the excellent books listed in 1927 or the numerous freely available tutorials on the internet see 2835 This tutorial is not comprehensive but describes the basic MATLAB commands that are used in this book 13 MATLAB Tutorial 5 In this tutorial it is assumed that you have started MATLAB on your system successfully and you are ready to type the commands at the MATLAB prompt which is denoted by double arrows Entering scalars and simple operations is easy as is shown in the examples below 345 ans 17 cos 30pi180 ans 08660 x4 x 4 2sqrt3x ans 07559 To suppress the output in MATLAB use a semicolon to end the command line as in the following examples If the semicolon is not used then the output will be shown by MATLAB y32 z5 x2yz w3y4z w 116 MATLAB is casesensitive ie variables with lowercase letters are different than variables with uppercase letters Consider the following examples using the variables x and X 6 1 Introduction x1 x 1 X2 X 2 x x 1 Use the help command to obtain help on any particular MATLAB command The following example demonstrates the use of help to obtain help on the inv command help inv INV Matrix inverse INVX is the inverse of the square matrix X A warning message is printed if X is badly scaled or nearly singular See also SLASH PINV COND CONDEST NNLS LSCOV Overloaded methods help syminvm help zpkinvm help tfinvm help ssinvm help ltiinvm help frdinvm The following examples show how to enter matrices and perform some simple matrix operations x1 2 3 4 5 6 7 8 9 x 1 2 3 4 5 6 7 8 9 13 MATLAB Tutorial 7 y2 0 3 y 2 0 3 wxy w 7 10 13 Let us now solve the following system of simultaneous algebraic equations 2 1 3 0 1 5 2 4 2 0 3 2 1 2 3 4 x1 x2 x3 x4 3 1 2 2 11 We will use Gaussian elimination to solve the above system of equations This is performed in MATLAB by using the backslash operator as follows A2 1 3 0 1 5 2 4 2 0 3 2 1 2 3 4 A 2 1 3 0 1 5 2 4 2 0 3 2 1 2 3 4 b3 1 2 2 b 3 1 2 2 8 1 Introduction x Ab x 19259 18148 08889 15926 It is clear that the solution is x1 19259 x2 18148 x3 08889 and x4 15926 Alternatively one can use the inverse matrix of A to obtain the same solution directly as follows xinv Ab x 19259 18148 08889 15926 It should be noted that using the inverse method usually takes longer that using Gaussian elimination especially for large systems In this book we will use Gaussian elimination ie the backslash operator Consider now the following 5 5 matrix D D1 2 3 4 5 2 4 6 8 9 2 4 6 2 4 1 1 2 3 2 9 0 2 3 1 D 1 2 3 4 5 2 4 6 8 9 2 4 6 2 4 1 1 2 3 2 9 0 2 3 1 We can extract the submatrix in rows 2 to 4 and columns 3 to 5 as follows ED 24 35 E 6 8 9 6 2 4 2 3 2 13 MATLAB Tutorial 9 We can extract the third column of D as follows FD153 F 3 6 6 2 2 We can also extract the second row of D as follows GD215 G 2 4 6 8 9 We can extract the element in row 4 and column 3 as follows HD43 H 2 Finally in order to plot a graph of the function y fx we use the MATLAB command plotxy after we have adequately defined both vectors x and y The following is a simple example x1 2 3 4 5 6 7 8 9 10 x 1 2 3 4 5 6 7 8 9 10 yxˆ2 y 1 4 9 16 25 36 49 64 81 100 plotxy Figure 11 shows the plot obtained by MATLAB It is usually shown in a separate graphics window In this figure no titles are given to the x and yaxes These titles may be easily added to the figure using the xlabel and ylabel commands 10 1 Introduction Fig 11 Using the MATLAB Plot Command The Spring Element 12 2 The Spring Element where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 22 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the element forces are obtained for each element as follows f ku 23 where f is the 2 1 element force vector and u is the 2 1 element displacement vector 22 MATLAB Functions Used The three MATLAB functions used for the spring element are SpringElementStiffnessk This function calculates the element stiffness matrix for each spring with stiffness k It returns the 2 2 element stiffness matrix k SpringAssembleK k i j This functions assembles the element stiffness matrix k of the spring joining nodes i at the left end and j at the right end into the global stiffness matrix K It returns the nn global stiffness matrix K every time an element is assembled SpringElementForcesk u This function calculates the element force vector using the element stiffness matrix k and the element displacement vector u It returns the 2 1 element force vector f The following is a listing of the MATLAB source code for each function function y SpringElementStiffnessk SpringElementStiffness This function returns the element stiffness matrix for a spring with stiffness k The size of the element stiffness matrix is 2 x 2 y k k k k function y SpringAssembleKkij SpringAssemble This function assembles the element stiffness matrix k of the spring with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled Kii Kii k11 Kij Kij k12 22 MATLAB Functions Used 13 Kji Kji k21 Kjj Kjj k22 y K function y SpringElementForcesku SpringElementForces This function returns the element nodal force vector given the element stiffness matrix k and the element nodal displacement vector u y k u Example 21 Consider the twoelement spring system shown in Fig 22 Given k1 100 kNm k2 200 kNm and P 15 kN determine 1 the global stiffness matrix for the system 2 the displacements at nodes 2 and 3 3 the reaction at node 1 4 the force in each spring k2 k1 P 1 2 3 Fig 22 TwoElement Spring System for Example 21 Solution Use the six steps outlined in Chap 1 to solve this problem using the spring element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into two elements and three nodes Table 21 shows the element connectivity for this example Table 21 Element Connectivity for Example 21 Element Number Node i Node j 1 1 2 2 2 3 14 2 The Spring Element Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function SpringElementStiffness Each matrix has size 2 2 k1SpringElementStiffness100 k1 100 100 100 100 k2SpringElementStiffness200 k2 200 200 200 200 Step 3 Assembling the Global Stiffness Matrix Since the spring system has three nodes the size of the global stiffness matrix is 33 Therefore to obtain K we first set up a zero matrix of size 3 3 then make two calls to the MATLAB function SpringAssemble since we have two spring elements in the system Each call to the function will assemble one element The following are the MATLAB commands Kzeros33 K 0 0 0 0 0 0 0 0 0 KSpringAssembleKk112 K 100 100 0 100 100 0 0 0 0 16 2 The Spring Element kK2323 k 300 200 200 200 f0 15 f 0 15 ukf u 01500 02250 It is now clear that the displacements at nodes 2 and 3 are 015 m and 0225 m respectively Step 6 Postprocessing In this step we obtain the reaction at node 1 and the force in each spring using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 u U 0 01500 02250 FKU F 15 0 15 22 MATLAB Functions Used 17 Thusthereactionatnode1isaforceof15 kNdirectedtotheleftFinallywesetup the element nodal displacement vectors u1 and u2 then we calculate the element force vectors f1 and f2 by making calls to the MATLAB function SpringElementForces u10 U2 u1 0 01500 f1SpringElementForcesk1u1 f1 15 15 u2U2 U3 u2 01500 02250 f2SpringElementForcesk2u2 f2 15 15 Thus it is clear that the force in element 1 is 15 kN tensile and the force in element 2 is also 15 kN tensile Example 22 Consider the spring system composed of six springs as shown in Fig 23 Given k 120 kNm and P 20 kN determine 1 the global stiffness matrix for the system 2 the displacements at nodes 3 4 and 5 3 the reactions at nodes 1 and 2 4 the force in each spring 18 2 The Spring Element P k k k k k k 5 4 1 2 3 Fig 23 SixElement Spring System for Example 22 Solution Use the six steps outlined in Chap 1 to solve this problem using the spring element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into six elements and five nodes Table 22 shows the element connectivity for this example Table 22 Element Connectivity for Example 22 Element Number Node i Node j 1 1 3 2 3 4 3 3 5 4 3 5 5 5 4 6 4 2 Step 2 Writing the Element Stiffness Matrices The six element stiffness matrices k1 k2 k3 k4 k5 and k6 are obtained by making calls to the MATLAB function SpringElementStiffness Each matrix has size 2 2 k1SpringElementStiffness120 k1 120 120 120 120 22 MATLAB Functions Used 19 k2SpringElementStiffness120 k2 120 120 120 120 k3SpringElementStiffness120 k3 120 120 120 120 k4SpringElementStiffness120 k4 120 120 120 120 k5SpringElementStiffness120 k5 120 120 120 120 k6SpringElementStiffness120 k6 120 120 120 120 Step 3 Assembling the Global Stiffness Matrix Since the spring system has five nodes the size of the global stiffness matrix is 5 5 Therefore to obtain K we first set up a zero matrix of size 5 5 then make six calls to the MATLAB function SpringAssemble since we have six spring elements in the system Each call to the function will assemble one element The following are the MATLAB commands 20 2 The Spring Element Kzeros55 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KSpringAssembleKk113 K 120 0 120 0 0 0 0 0 0 0 120 0 120 0 0 0 0 0 0 0 0 0 0 0 0 KSpringAssembleKk234 K 120 0 120 0 0 0 0 0 0 0 120 0 240 120 0 0 0 120 120 0 0 0 0 0 0 KSpringAssembleKk335 K 120 0 120 0 0 0 0 0 0 0 120 0 360 120 120 0 0 120 120 0 0 0 120 0 120 22 MATLAB Functions Used 21 KSpringAssembleKk435 K 120 0 120 0 0 0 0 0 0 0 120 0 480 120 240 0 0 120 120 0 0 0 240 0 240 KSpringAssembleKk554 K 120 0 120 0 0 0 0 0 0 0 120 0 480 120 240 0 0 120 240 120 0 0 240 120 360 KSpringAssembleKk642 K 120 0 120 0 0 0 120 0 120 0 120 0 480 120 240 0 120 120 360 120 0 0 240 120 360 Step 4 Applying the Boundary Conditions The matrix 22 for this system is obtained as follows using the global stiffness matrix obtained in the previous step 120 0 120 0 0 0 120 0 120 0 120 0 480 120 240 0 120 120 360 120 0 0 240 120 360 U1 U2 U3 U4 U5 F1 F2 F3 F4 F5 28 22 2 The Spring Element The boundary conditions for this problem are given as U1 0 U2 0 F3 0 F4 0 F5 20 kN 29 Inserting the above conditions into 28 we obtain 120 0 120 0 0 0 120 0 120 0 120 0 480 120 240 0 120 120 360 120 0 0 240 120 360 0 0 U3 U4 U5 F1 F2 0 0 20 210 Step 5 Solving the Equations Solving the system of equations in 210 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 210 by extracting the submatrix in rows 3 4 and 5 and columns 3 4 and 5 Therefore we obtain 480 120 240 120 360 120 240 120 360 U3 U4 U5 0 0 20 211 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3535 k 480 120 240 120 360 120 240 120 360 f0 0 20 f 0 0 20 22 MATLAB Functions Used 23 ukf u 00897 00769 01410 It is now clear that the displacements at nodes 3 4 and 5 are 00897 m 00769 m and 0141 m respectively Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 2 and the force in each spring using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 0 u U 0 0 00897 00769 01410 FKU F 107692 92308 0 0 200000 Thus the reactions at nodes 1 and 2 are forces of 107692 kN directed to the left and 92308 kN directed to the left respectively Finally we set up the element nodal displacement vectors u1 u2 u3 u4 u5 and u6 then we calculate the element force vectors f1 f2 f3 f4 f5 and f6 by making calls to the MATLAB function SpringElementForces 24 2 The Spring Element u10 U3 u1 0 00897 f1SpringElementForcesk1u1 f1 107640 107640 u2U3 U4 u2 00897 00769 f2SpringElementForcesk2u2 f2 15360 15360 u3U3 U5 u3 00897 01410 f3SpringElementForcesk3u3 f3 61560 61560 u4U3 U5 u4 00897 01410 22 MATLAB Functions Used 25 f4SpringElementForcesk4u4 f4 61560 61560 u5U5 U4 u5 01410 00769 f5SpringElementForcesk5u5 f5 76920 76920 u6U4 0 u6 00769 0 f6SpringElementForcesk6u6 f6 92280 92280 Thus the forces in the springs are summarized in Table 23 Table 23 Summary of Element Forces Element Number Force Type 1 10764 kN Tensile 2 15360 kN Compressive 3 61560 kN Tensile 4 61560 kN Tensile 5 76920 kN Compressive 6 92280 kN Compressive 26 2 The Spring Element Problems Problem 21 Consider the spring system composed of two springs as shown in Fig 24 Given k1 200 kNm k2 250 kNm and P 10 kN determine 1 the global stiffness matrix for the system 2 the displacements at node 2 3 the reactions at nodes 1 and 3 4 the force in each spring P k2 k1 1 2 3 Fig 24 TwoElement Spring System for Problem 21 Problem 22 Consider the spring system composed of four springs as shown in Fig 25 Given k 170 kNm and P 25 kN determine 1 the global stiffness matrix for the system 2 the displacements at nodes 2 3 and 4 3 the reaction at node 1 4 the force in each spring k 4 1 2 3 k k k P Fig 25 FourElement Spring System for Problem 22 3 The Linear Bar Element 31 Basic Equations The linear bar element is a onedimensional finite element where the local and global coordinates coincide It is characterized by linear shape functions and is identical to the spring element except that the stiffness of the bar is not given directly The linear element has modulus of elasticity E crosssectional area A and length L Each linear bar element has two nodes as shown in Fig 31 In this case the element stiffness matrix is given by see 1 k EA L EA L EA L EA L 31 L x j i E A Fig 31 The Linear Bar Element Obviously the element stiffness matrix for the linear bar element is similar to that of the spring element with the stiffness replaced by EAL It is clear that the linear bar element has only two degrees of freedom one at each node Consequently for a structure with n nodes the global stiffness matrix K will be of size n n since we have one degree of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function LinearBarAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples 28 3 The Linear Bar Element Once the global stiffness matrix K is obtained we have the following structure equation KU F 32 where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 32 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the element forces are obtained for each element as follows f ku 33 where f is the 2 1 element force vector and u is the 2 1 element displacement vector The element stresses are obtained by dividing the element forces by the cross sectional area A 32 MATLAB Functions Used The four MATLAB functions used for the linear bar element are LinearBarElementStiffnessE A L This function calculates the element stiffness matrix for each linear bar with modulus of elasticity E crosssectional area A and length L It returns the 2 2 element stiffness matrix k LinearBarAssembleKk i jThisfunctionsassemblestheelementstiffnessmatrix k of the linear bar joining nodes i at the left end and j at the right end into the global stiffness matrix K It returns the n n global stiffness matrix K every time an element is assembled LinearBarElementForcesk u This function calculates the element force vector using the element stiffness matrix k and the element displacement vector u It returns the 2 1 element force vector f LinearBarElementStressesk u A This function calculates the element stress vector using the element stiffness matrix k the element displacement vector u and the crosssectional area A It returns the 2 1 element stress vector sigma or s The following is a listing of the MATLAB source code for each function 32 MATLAB Functions Used 29 function y LinearBarElementStiffnessEAL LinearBarElementStiffness This function returns the element stiffness matrix for a linear bar with modulus of elasticity E crosssectional area A and length L The size of the element stiffness matrix is 2 x 2 y EAL EAL EAL EAL function y LinearBarAssembleKkij LinearBarAssemble This function assembles the element stiffness matrix k of the linear bar with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled Kii Kii k11 Kij Kij k12 Kji Kji k21 Kjj Kjj k22 y K function y LinearBarElementForcesku LinearBarElementForces This function returns the element nodal force vector given the element stiffness matrix k and the element nodal displacement vector u y k u function y LinearBarElementStressesk u A LinearBarElementStresses This function returns the element nodal stress vector given the element stiffness matrix k the element nodal displacement vector u and the crosssectional area A y k uA Example 31 Consider the structure composed of two linear bars as shown in Fig 32 Given E 210 GPa A 0003 m2 P 10 kN and node 3 is displaced to the right by 0002 m determine 1 the global stiffness matrix for the structure 2 the displacement at node 2 3 the reactions at nodes 1 and 3 4 the stress in each bar 30 3 The Linear Bar Element P 15 m 1 m 1 2 3 Fig 32 TwoBar Structure for Problem 31 Solution Use the six steps outlined in Chap 1 to solve this problem using the linear bar element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into two elements and three nodes The units used in the MATLAB calculations are kN and meter Table 31 shows the element connectivity for this example Table 31 Element Connectivity for Example 31 Element Number Node i Node j 1 1 2 2 2 3 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function LinearBarElementStiffness Each matrix has size 2 2 E210e6 E 210000000 A0003 A 00030 L115 L1 15000 32 MATLAB Functions Used 31 L21 L2 1 k1LinearBarElementStiffnessEAL1 k1 420000 420000 420000 420000 k2LinearBarElementStiffnessEAL2 k2 630000 630000 630000 630000 Step 3 Assembling the Global Stiffness Matrix Since the structure has three nodes the size of the global stiffness matrix is 3 3 Therefore to obtain K we first set up a zero matrix of size 3 3 then make two calls to the MATLAB function LinearBarAssemble since we have two linear bar elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros33 K 0 0 0 0 0 0 0 0 0 KLinearBarAssembleKk112 K 420000 420000 0 420000 420000 0 0 0 0 32 3 The Linear Bar Element KLinearBarAssembleKk223 K 420000 420000 0 20000 1050000 630000 0 630000 630000 Step 4 Applying the Boundary Conditions The matrix 32 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 420000 420000 0 420000 1050000 630000 0 630000 630000 U1 U2 U3 F1 F2 F3 34 The boundary conditions for this problem are given as U1 0 F2 10 U3 0002 35 Inserting the above conditions into 34 we obtain 420000 420000 0 420000 1050000 630000 0 630000 630000 0 U2 0002 F1 10 F3 36 Step 5 Solving the Equations Solving the system of equations in 36 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 36 by extracting the submatrix in row 2 and column 2 which turns out to be a 1 1 matrix Because of the applied displacement of 0002 m at node 3 we need to extract the submatrix in row 2 and column 3 which also turns out to be a 1 1 matrix Therefore we obtain 1050000 U2 630000 0002 10 37 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination 32 MATLAB Functions Used 33 kK22 k 1050000 k0K23 k0 630000 u00002 u0 00020 f10 f 10 f0fk0u0 f0 1250 ukf0 u 00012 It is now clear that the displacement at node 2 is 00012 m Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 3 and the stress in each bar using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F 34 3 The Linear Bar Element U0 u u0 U 0 00012 00020 FKU F 5000000 100000 5100000 Thus the reactions at nodes 1 and 3 are forces of 500 kN directed to the left and 510 kN directed to the right respectively It is clear that force equilibrium is satisfied Next we set up the element nodal displacement vectors u1 and u2 then we calcu late the element force vectors f1 and f2 by making calls to the MATLAB function LinearBarElementForces Finally we divide each element force by the crosssectional area of the element to obtain the element stresses u10 U2 u1 0 00012 f1LinearBarElementForcesk1u1 f1 5000000 5000000 sigma1f1A sigma1 10e005 16667 16667 32 MATLAB Functions Used 35 u2U2 U3 u2 00012 00020 f2LinearBarElementForcesk2u2 f2 5100000 5100000 sigma2f2A sigma2 10e005 17000 17000 Thusitisclearthatthestressinelement1is1667105 kNm2 or1667 MPatensile and the stress in element 2 is 17 105 kNm2 or 170 MPa tensile Alternatively we can obtain the element stresses directly by making calls to the MATLAB function LinearBarElementStresses This is performed as follows in which we obtain the same results as above s1LinearBarElementStressesk1u1A s1 10e005 16667 16667 s2LinearBarElementStressesk2u2A s2 10e005 17000 17000 36 3 The Linear Bar Element Example 32 Consider the tapered bar shown in Fig 33 with E 210 GPa and P 18 kN The crosssectional areas of the bar at the left and right ends are 0002 m2 and 0012 m2 respectively Use linear bar elements to determine the displacement at the free end of the bar P x 3 m Fig 33 Tapered Bar for Problem 32 Solution Use the six steps outlined in Chap 1 to solve this problem using the linear bar element Step 1 Discretizing the Domain We will use five linear bar elements in this problem Therefore the tapered bar is discretized into five elements and six nodes as shown in Fig 34 For more accurate results more elements can be used see Problem 32 Table 32 shows the element connectivity for this example In this example the length of each element will be 06 m The crosssectional area for each element will be taken as the crosssectional area at the middle of the element This can be calculated using the following formula which gives the crosssectional area at any distance x from the left end Ax 0002 001x 3 38 P k1 k3 k4 k2 k5 1 2 4 5 6 3 Fig 34 Discretization of the Tapered Bar Example 32 MATLAB Functions Used 37 Table 32 Element Connectivity for Example 32 Element Number Node i Node j 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 Step 2 Writing the Element Stiffness Matrices The five element stiffness matrices k1 k2 k3 k4 and k5 are obtained by making calls to the MATLAB function LinearBarElementStiffness Each matrix has size 2 2 E210e6 E 210000000 L35 L 06000 A10002001033 A1 00030 A20002001093 A2 00050 A30002001153 A3 00070 38 3 The Linear Bar Element A40002001213 A4 00090 A50002001273 A5 00110 k1LinearBarElementStiffnessEA1L k1 1050000 1050000 1050000 1050000 k2LinearBarElementStiffnessEA2L k2 10e006 17500 17500 17500 17500 k3LinearBarElementStiffnessEA3L k3 2450000 2450000 2450000 2450000 k4LinearBarElementStiffnessEA4L k4 10e006 31500 31500 31500 31500 32 MATLAB Functions Used 39 k5LinearBarElementStiffnessEA5L k5 3850000 3850000 3850000 3850000 Step 3 Assembling the Global Stiffness Matrix Since the structure has six nodes the size of the global stiffness matrix is 6 6 Therefore to obtain K we first set up a zero matrix of size 6 6 then make five calls to the MATLAB function LinearBarAssemble since we have five linear bar elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros66 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KLinearBarAssembleKk112 K 1050000 1050000 0 0 0 0 1050000 1050000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KLinearBarAssembleKk223 K 10e006 40 3 The Linear Bar Element 10500 10500 0 0 0 0 10500 28000 17500 0 0 0 0 17500 17500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KLinearBarAssembleKk334 K 10e006 10500 10500 0 0 0 0 10500 28000 17500 0 0 0 0 17500 42000 24500 0 0 0 0 24500 24500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KLinearBarAssembleKk445 K 10e006 10500 10500 0 0 0 0 10500 28000 17500 0 0 0 0 17500 42000 24500 0 0 0 0 24500 56000 31500 0 0 0 0 31500 31500 0 0 0 0 0 0 0 KLinearBarAssembleKk556 K 10e006 32 MATLAB Functions Used 41 10500 10500 0 0 0 0 10500 28000 17500 0 0 0 0 17500 42000 24500 0 0 0 0 24500 56000 31500 0 0 0 0 31500 70000 38500 0 0 0 0 x38500 38500 Step 4 Applying the Boundary Conditions The matrix 32 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 106 105 105 0 0 0 0 105 280 175 0 0 0 0 175 42 245 0 0 0 0 245 560 315 0 0 0 0 315 700 385 0 0 0 0 385 385 U1 U2 U3 U4 U5 U6 F1 F2 F3 F4 F5 F6 39 The boundary conditions for this problem are given as F1 18 F2 F3 F4 F5 0 U6 0 310 Inserting the above conditions into 39 we obtain 106 105 105 0 0 0 0 105 280 175 0 0 0 0 175 420 245 0 0 0 0 245 560 315 0 0 0 0 315 700 385 0 0 0 0 385 385 U1 U2 U3 U4 U5 0 18 0 0 0 0 F6 311 Step 5 Solving the Equations Solving the system of equations in 311 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 311 by extracting the submatrix in rows 1 to 5 and columns 1 to 5 Therefore we obtain 42 3 The Linear Bar Element 106 105 105 0 0 0 105 280 175 0 0 0 175 420 245 0 0 0 245 560 315 0 0 0 315 700 U1 U2 U3 U4 U5 18 0 0 0 0 312 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK1515 k 10e006 10500 10500 0 0 0 10500 28000 17500 0 0 0 17500 42000 24500 0 0 0 24500 56000 31500 0 0 0 31500 70000 f18 0 0 0 0 f 18 0 0 0 0 u kf u 10e004 04517 02802 01774 01039 00468 32 MATLAB Functions Used 43 Therefore it is clear that the required displacement at the free end is 04517104 m or 004517 mm the minus sign indicates that it is directed to the left No calls are made to the MATLAB functions LinearBarElementForces or LinearBarEle mentStresses since the element forces and stresses are not required in this example Thus Step 6 Postprocessing will not be performed for this example Problems Problem 31 Consider the structure composed of three linear bars as shown in Fig 35 Given E 70 GPa A 0005 m2 P1 10 kN and P2 15 kN determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 2 3 and 4 3 the reaction at node 1 4 the stress in each bar 1 m 4 1 2 3 P2 P1 2 m 1 m Fig 35 ThreeBar Structure for Problem 31 Problem 32 Solve Example 32 again using ten linear elements instead of five Determine the dis placement at the free end of the tapered bar and compare your answer with the result obtained in the example Problem 33 Consider the structure composed of a spring and a linear bar as shown in Fig 36 Given E 200 GPa A 001 m2 k 1000 kNm and P 25 kN determine 1 the global stiffness matrix for the structure 2 the displacement at node 2 3 the reactions at nodes 1 and 3 4 the stress in the bar 5 the force in the spring E A 1 k 2 3 P 2 m Fig 36 Linear Bar with a Spring for Problem 33 4 The Quadratic Bar Element 41 Basic Equations The quadratic bar element is a onedimensional finite element where the local and global coordinates coincide It is characterized by quadratic shape functions The quadratic bar element has modulus of elasticity E crosssectional area A and length L Each quadratic bar element has three nodes as shown in Fig 41 The third node is at the middle of the element In this case the element stiffness matrix is given by see 8 k EA 3L 7 1 8 1 7 8 8 8 16 41 L2 i E A x j m L2 Fig 41 The Quadratic Bar Element It is clear that the quadratic bar element has three degrees of freedom one at each node Consequently for a structure with n nodes the global stiffness matrix K will be of size n n since we have one degree of freedom at each node The order of the nodes for this element is very important the first node is the one at the left end the second node is the one at the right end and the third node is the one in the middle of the element The global stiffness matrix K is assembled by making calls to the MATLAB function QuadraticBarAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples 46 4 The Quadratic Bar Element Once the global stiffness matrix K is obtained we have the following structure equation KU F 42 where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 42 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the element forces are obtained for each element as follows f ku 43 where f is the 3 1 element force vector and u is the 3 1 element displacement vector The element stresses are obtained by dividing the element forces by the cross sectional area A 42 MATLAB Functions Used The four MATLAB functions used for the quadratic bar element are QuadraticBarElementStiffnessE A L This function calculates the element stiffness matrix for each quadratic bar with modulus of elasticity E crosssectional area A and length L It returns the 3 3 element stiffness matrix k QuadraticBarAssembleK k i j m This function assembles the element stiffness matrix k of the quadratic bar joining nodes i at the left end j at the right end and m in the middle into the global stiffness matrix K It returns the n n global stiffness matrix K every time an element is assembled QuadraticBarElementForcesk u This function calculates the element force vector using the element stiffness matrix k and the element displacement vector u It returns the 3 1 element force vector f QuadraticBarElementStressesk u A This function calculates the element stress vector using the element stiffness matrix k the element displacement vector u and the crosssectional area A It returns the 3 1 element stress vector sigma or s The following is a listing of the MATLAB source code for each function 42 MATLAB Functions Used 47 function y QuadraticBarElementStiffnessEAL QuadraticBarElementStiffness This function returns the element stiffness matrix for a quadratic bar with modulus of elasticity E crosssectional area A and length L The size of the element stiffness matrix is 3 x 3 y EA3L 7 1 8 1 7 8 8 8 16 function y QuadraticBarAssembleKkijm QuadraticBarAssemble This function assembles the element stiffness matrix k of the quadratic bar with nodes i j and m into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled Kii Kii k11 Kij Kij k12 Kim Kim k13 Kji Kji k21 Kjj Kjj k22 Kjm Kjm k23 Kmi Kmi k31 Kmj Kmj k32 Kmm Kmm k33 y K function y QuadraticBarElementForcesku QuadraticBarElementForces This function returns the element nodal force vector given the element stiffness matrix k and the element nodal displacement vector u y k u function y QuadraticBarElementStressesk u A QuadraticBarElementStresses This function returns the element nodal stress vector given the element stiffness matrix k the element nodal displacement vector u and the crosssectional area A y k uA Example 41 Consider the structure composed of two quadratic bars as shown in Fig 42 Given E 210 GPa and A 0003 m2 determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 2 3 4 and 5 48 4 The Quadratic Bar Element 3 the reaction at node 1 4 the element stresses 1 m 4 1 2 3 1 m 5 1 m 5 kN 10 kN 7 kN 10 kN 1 m Fig 42 Two Quadratic Bars for Example 41 Solution Use the six steps outlined in Chap 1 to solve this problem using the quadratic bar element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into two elements and five nodes The units used in the MATLAB calculations are kN and meter Table 41 shows the element connectivity for this example Table 41 Element Connectivity for Example 41 Element Number Node i Node j Node m 1 1 3 2 2 3 5 4 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function QuadraticBarElementStiffness Each matrix has size 3 3 E210e6 E 210000000 A0003 A 00030 42 MATLAB Functions Used 49 L2 L 2 k1QuadraticBarElementStiffnessEAL k1 735000 105000 840000 105000 735000 840000 840000 840000 1680000 k2QuadraticBarElementStiffnessEAL k2 735000 105000 840000 105000 735000 840000 840000 840000 1680000 Step 3 Assembling the Global Stiffness Matrix Since the structure has five nodes the size of the global stiffness matrix is 5 5 Therefore to obtain K we first set up a zero matrix of size 5 5 then make two calls to the MATLAB function QuadraticBarAssemble since we have two quadratic bar elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros55 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 50 4 The Quadratic Bar Element KQuadraticBarAssembleKk1132 K 735000 840000 105000 0 0 840000 1680000 840000 0 0 105000 840000 735000 0 0 0 0 0 0 0 0 0 0 0 0 KQuadraticBarAssembleKk2354 K 735000 840000 105000 0 0 840000 1680000 840000 0 0 105000 840000 1470000 840000 105000 0 0 840000 1680000 840000 0 0 105000 840000 735000 Step 4 Applying the Boundary Conditions The matrix 42 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 103 735 840 105 0 0 840 1680 840 0 0 105 840 1470 840 105 0 0 840 1680 840 0 0 105 840 735 U1 U2 U3 U4 U5 F1 F2 F3 F4 F5 44 The boundary conditions for this problem are given as U1 0 F2 5 F3 10 F4 7 F5 10 45 Inserting the above conditions into 44 we obtain 103 735 840 105 0 0 840 1680 840 0 0 105 840 1470 840 105 0 0 840 1680 840 0 0 105 840 735 0 U2 U3 U4 U5 F1 5 10 7 10 46 42 MATLAB Functions Used 51 Step 5 Solving the Equations Solving the system of equations in 46 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 46 by extracting the submatrix in rows 2 to 5 and columns 2 to 5 Therefore we obtain 103 1680 840 0 0 840 1470 840 105 0 840 1680 840 0 105 840 735 U2 U3 U4 U5 5 10 7 10 47 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK2525 k 1680000 840000 0 0 840000 1470000 840000 105000 0 840000 1680000 840000 0 105000 840000 735000 f5 10 7 10 f 5 10 7 10 ukf u 10e004 00417 01429 00813 00635 It is now clear that the displacements at node 2 3 4 and 5 are 000417 mm 001429 mm 000813 mm and 000635 mm respectively 52 4 The Quadratic Bar Element Step 6 Postprocessing In this step we obtain the reaction at node 1 and the stresses in each bar using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 u U 10e004 0 00417 01429 00813 00635 FKU F 20000 50000 100000 70000 100000 Thus the reaction at node 1 is a force of 2 kN directed to the right Obviously force equilibrium is satisfied for this problem Next we set up the element nodal displacement vectors u1 and u2 then we calculate the element stress vectors sigma1 and sigma2 by making calls to the MATLAB function QuadraticBarElement Stresses u10 U3 U2 u1 10e004 0 01429 00417 sigma1QuadraticBarElementStressesk1u1A 42 MATLAB Functions Used 53 sigma1 10e003 06667 23333 16667 u2U3 U5 U4 u2 10e004 01429 00635 00813 sigma2QuadraticBarElementStressesk2u2A sigma2 10e003 10000 33333 23333 Thus it is clear that the stresses are not constant within each element since we have used quadratic bar elements instead of linear bar elements in this example Example 42 Consider the structure composed of two quadratic bars as shown in Fig 43 Given E 210 GPa A 0003 m2 P 10 kN and node 5 is displaced to the right by 0002 m determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 2 3 and 4 3 the reactions at nodes 1 and 5 4 the element stresses Note that this is exactly the same problem solved in Example 31 but now we are using quadratic bar elements instead of linear bar elements 54 4 The Quadratic Bar Element P 5 05 m 075 m 4 1 2 3 075 m 05 m Fig 43 Two Quadratic Bars for Example 42 Solution Use the six steps outlined in Chap 1 to solve this problem using the quadratic bar element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into two elements and five nodes The units used in the MATLAB calculations are kN and meter Table 42 shows the element connectivity for this example Table 42 Element Connectivity for Example 42 Element Number Node i Node j Node m 1 1 3 2 2 3 5 4 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function QuadraticBarElementStiffness Each matrix has size 3 3 E210E6 E 210000000 A0003 A 00030 L115 42 MATLAB Functions Used 55 L1 15000 L21 L2 1 k1QuadraticBarElementStiffnessEAL1 k1 980000 140000 1120000 140000 980000 1120000 1120000 1120000 2240000 k2QuadraticBarElementStiffnessEAL2 k2 1470000 210000 1680000 210000 1470000 1680000 1680000 1680000 3360000 Step 3 Assembling the Global Stiffness Matrix Since the structure has five nodes the size of the global stiffness matrix is 5 5 Therefore to obtain K we first set up a zero matrix of size 5 5 then make two calls to the MATLAB function QuadraticBarAssemble since we have two quadratic bar elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros55 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 56 4 The Quadratic Bar Element KQuadraticBarAssembleKk1132 K 980000 1120000 140000 0 0 1120000 2240000 1120000 0 0 140000 1120000 980000 0 0 0 0 0 0 0 0 0 0 0 0 KQuadraticBarAssembleKk2354 K 980000 1120000 140000 0 0 1120000 2240000 1120000 0 0 140000 1120000 2450000 1680000 210000 0 0 1680000 3360000 1680000 0 0 210000 1680000 1470000 Step 4 Applying the Boundary Conditions The matrix 42 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 103 980 1120 140 0 0 1120 2240 1120 0 0 140 1120 2450 1680 210 0 0 1680 3360 1680 0 0 210 1680 1470 U1 U2 U3 U4 U5 F1 F2 F3 F4 F5 48 The boundary conditions for this problem are given as U1 0 F2 0 F3 10 F4 0 U5 0002 49 42 MATLAB Functions Used 57 Inserting the above conditions into 48 we obtain 103 980 1120 140 0 0 1120 2240 1120 0 0 140 1120 2450 1680 210 0 0 1680 3360 1680 0 0 210 1680 1470 0 U2 U3 U4 0002 F1 0 10 0 F5 410 Step 5 Solving the Equations Solving the system of equations in 410 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 410 by extracting the submatrix in rows 2 to 4 and columns 2 to 4 which turns out to be a 3 3 matrix Because of the applied displacement of 0002 m at node 5 we need also to extract the submatrix in rows 2 to 4 and column 5 which turns out to be a 3 1 vector Therefore we obtain 103 2240 1120 0 1120 2450 1680 0 1680 3360 U2 U3 U4 103 0 210 1680 0002 0 10 0 411 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK2424 k 2240000 1120000 0 1120000 2450000 1680000 0 1680000 3360000 k0K245 k0 0 210000 1680000 u00002 58 4 The Quadratic Bar Element u0 00020 f0 10 0 f 0 10 0 f0fk0u0 f0 0 430 3360 ukf0 u 00006 00012 00016 It is now clear that the displacements at nodes 2 3 and 4 are 00006 m 00012 m and 00016 mrespectivelyNotethatwehaveobtainedthesamevalueforthedisplacement at the middle node of the structure as that obtained in Example 31 namely 00012 m Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 5 and the stress in each bar using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 u u0 U 0 00006 00012 00016 00020 42 MATLAB Functions Used 59 FKU F 5000000 0 100000 00000 5100000 Thus the reactions at nodes 1 and 5 are forces of 500 kN directed to the left and 510 kN directed to the right respectively It is clear that force equilibrium is satisfied and that these are the same values obtained in Example 31 Next we set up the element nodal displacement vectors u1 and u2 then we calculate the element stress vectors sigma1 and sigma2 by making calls to the MATLAB function QuadraticBarElementStresses u10 U3 U2 u1 0 00012 00006 sigma1QuadraticBarElementStressesk1u1A sigma1 10e005 16667 16667 0 u2U3 U5 U4 u2 00012 00020 00016 sigma2QuadraticBarElementStressesk2u2A sigma2 10e005 60 4 The Quadratic Bar Element 17000 17000 00000 Thus it is clear that the stress in element 1 is 1667 105 kNm2 or 1667 MPa tensile and the stress in element 2 is 17 105 kNm2 or 170 MPa tensile Note that these are the same values for the stresses obtained previously in Example 31 Problems Problem 41 Consider the tapered bar problem of Example 32 see Fig 33 Solve this problem again using quadratic bars instead of linear bars Use two quadratic bar elements to model the problem such that the structure has five nodes Compare your answer with those obtained in Example 32 and Problem 32 Problem 42 Consider the structure composed of a spring and a quadratic bar element as shown in Fig 44 Given k 2000 kNm E 70 GPa and A 0001 m2 determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 2 3 and 4 3 the reaction at node 1 4 the force in the spring 5 the quadratic bar element stresses E A 3 4 2 2 m 2 m 5 kN 10 kN 1 k Fig 44 Quadratic Bar and a Spring for Problem 42 5 The Plane Truss Element 51 Basic Equations The plane truss element is a twodimensional finite element with both local and global coordinates It is characterized by linear shape functions The plane truss element has modulus of elasticity E crosssectional area A and length L Each plane truss element has two nodes and is inclined with an angle θ measured counterclockwise from the positive global X axis as shown in Fig 51 Let C cos θ and S sin θ In this case the element stiffness matrix is given by see 1 k EA L C2 CS C2 CS CS S2 CS S2 C2 CS C2 CS CS S2 CS S2 51 Y y L x j i X θ Fig 51 The Plane Truss Element It is clear that the plane truss element has four degrees of freedom two at each node Consequently for a structure with n nodes the global stiffness matrix K will be of size 2n 2n since we have two degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function PlaneTrussAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 52 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the force is obtained for each element as follows f EALC S C Su where f is the force in the element a scalar and u is the 4 1 element displacement vector The element stress is obtained by dividing the element force by the crosssectional area A If there is an inclined support at one of the nodes of the truss then the global stiffness matrix needs to be modified using the following equation Knew TKoldT where T is a 2n 2n transformation matrix that is obtained by making a call to the MATLAB function PlaneTrussInclinedSupport The inclined support is assumed to be at node i with an angle of inclination alpha as shown in Fig 52 52 MATLAB Functions Used 63 PlaneTrussElementStiffnessE A L theta This function calculates the element stiffness matrix for each plane truss element with modulus of elasticity E cross sectional area A length L and angle theta in degrees It returns the 4 4 element stiffness matrix k PlaneTrussAssembleK k i j This function assembles the element stiffness ma trix k of the plane truss element joining nodes i and j into the global stiffness ma trix K It returns the 2n 2n global stiffness matrix K every time an element is assembled PlaneTrussElementForceE A L theta u This function calculates the element force using the modulus of elasticity E the crosssectional area A the length L the angle theta in degrees and the element displacement vector u It returns the force in the element as a scalar PlaneTrussElementStressE L theta u This function calculates the element stress using the modulus of elasticity E the length L the angle theta in degrees and the element displacement vector u It returns the stress in the element as a scalar PlaneTrussInclinedSupportT i alpha This function calculates the transformation matrix of the inclined support using the node number i of the inclined support and the angle of inclination alpha in degrees It returns the 2n 2n transformation matrix The following is a listing of the MATLAB source code for each function function y PlaneTrussElementLengthx1y1x2y2 PlaneTrussElementLength This function returns the length of the plane truss element whose first node has coordinates x1 y1 and second node has coordinates x2 y2 y sqrtx2x1x2x1 y2y1y2y1 function y PlaneTrussElementStiffnessEAL theta PlaneTrussElementStiffness This function returns the element stiffness matrix for a plane truss element with modulus of elasticity E crosssectional area A length L and angle theta in degrees The size of the element stiffness matrix is 4 x 4 x thetapi180 C cosx S sinx y EALCC CS CC CS CS SS CS SS CC CS CC CS CS SS CS SS 64 5 The Plane Truss Element function y PlaneTrussAssembleKkij PlaneTrussAssemble This function assembles the element stiffness matrix k of the plane truss element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K2i12i1 K2i12i1 k11 K2i12i K2i12i k12 K2i12j1 K2i12j1 k13 K2i12j K2i12j k14 K2i2i1 K2i2i1 k21 K2i2i K2i2i k22 K2i2j1 K2i2j1 k23 K2i2j K2i2j k24 K2j12i1 K2j12i1 k31 K2j12i K2j12i k32 K2j12j1 K2j12j1 k33 K2j12j K2j12j k34 K2j2i1 K2j2i1 k41 K2j2i K2j2i k42 K2j2j1 K2j2j1 k43 K2j2j K2j2j k44 y K function y PlaneTrussElementForceEALthetau PlaneTrussElementForce This function returns the element force given the modulus of elasticity E the crosssectional area A the length L the angle theta in degrees and the element nodal displacement vector u x theta pi180 C cosx S sinx y EALC S C S u function y PlaneTrussElementStressELthetau PlaneTrussElementStress This function returns the element stress given the modulus of elasticity E the the length L the angle theta in degrees and the element nodal displacement vector u x theta pi180 C cosx S sinx y ELC S C S u 52 MATLAB Functions Used 65 function y PlaneTrussInclinedSupportTialpha PlaneTrussInclinedSupport This function calculates the tranformation matrix T of the inclined support at node i with angle of inclination alpha in degrees x alphapi180 T2i12i1 cosx T2i12i sinx T2i2i1 sinx T2i2i cosx y T Example 51 ConsidertheplanetrussshowninFig53GivenE 210 GPaandA 1104 m2 determine 1 the global stiffness matrix for the structure 2 the horizontal displacement at node 2 3 the horizontal and vertical displacements at node 3 4 the reactions at nodes 1 and 2 5 the stress in each element 3 1 2 3 m 2 m 5 kN 10 kN 2 m Fig 53 Plane Truss with Three Elements for Example 51 Solution Use the six steps outlined in Chap 1 to solve this problem using the plane truss element 66 5 The Plane Truss Element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into three elements and three nodes The units used in the MATLAB calculations are kN and meter Table 51 shows the element connectivity for this example Table 51 Element Connectivity for Example 51 Element Number Node i Node j 1 1 2 2 1 3 3 2 3 Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices k1 k2 and k3 are obtained by making calls to the MATLAB function PlaneTrussElementStiffness Each matrix has size 4 4 E210e6 E 210000000 A1e4 A 10000e004 L14 L1 4 L2PlaneTrussElementLength0023 L2 36056 52 MATLAB Functions Used 67 L3PlaneTrussElementLength0023 L3 36056 k1PlaneTrussElementStiffnessEAL10 k1 5250 0 5250 0 0 0 0 0 5250 0 5250 0 0 0 0 0 theta2atan32180pi theta2 563099 theta3180theta2 theta3 1236901 k2PlaneTrussElementStiffnessEAL2theta2 k2 10e003 17921 26882 17921 26882 26882 40322 26882 40322 17921 26882 17921 26882 26882 40322 26882 40322 k3PlaneTrussElementStiffnessEAL3theta3 k3 10e003 68 5 The Plane Truss Element 17921 26882 17921 26882 26882 40322 26882 40322 17921 26882 17921 26882 26882 40322 26882 40322 Step 3 Assembling the Global Stiffness Matrix Since the structure has three nodes the size of the global stiffness matrix is 6 6 Therefore to obtain K we first set up a zero matrix of size 6 6 then make three calls to the MATLAB function PlaneTrussAssemble since we have three elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros66 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneTrussAssembleKk112 K 5250 0 5250 0 0 0 0 0 0 0 0 0 5250 0 5250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneTrussAssembleKk213 K 10e003 70421 26882 52500 0 17921 26882 26882 40322 0 0 26882 40322 52 MATLAB Functions Used 69 52500 0 52500 0 0 0 0 0 0 0 0 0 17921 26882 0 0 17921 26882 26882 40322 0 0 26882 40322 KPlaneTrussAssembleKk323 K 10e003 70421 26882 52500 0 17921 26882 26882 40322 0 0 26882 40322 52500 0 70421 26882 17921 26882 0 0 26882 40322 26882 40322 17921 26882 17921 26882 35842 00000 26882 40322 26882 40322 00000 80645 Step 4 Applying the Boundary Conditions The matrix 52 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 103 70421 26882 52500 0 17921 26882 26882 40322 0 0 26882 40322 52500 0 70421 26882 17921 26882 0 0 26882 40322 26882 40322 17921 26882 17921 26882 35842 0 26882 40322 26882 40322 0 80645 U1x U1y U2x U2y U3x U3y F1x F1y F2x F2y F3x F3y 55 The boundary conditions for this problem are given as U1x U1y U2y 0 F2x 0 F3x 5 F3y 10 56 70 5 The Plane Truss Element Inserting the above conditions into 55 we obtain 103 7041 26882 52500 0 17921 26882 26882 40322 0 0 26882 40322 52500 0 70421 26882 17921 26882 0 0 26882 40322 26882 40322 17921 26882 17921 26882 35842 0 26882 40322 26882 40322 0 80645 0 0 U2x 0 U3x U3y F1x F1y 0 F2y 5 10 57 Step 5 Solving the Equations Solving the system of equations in 57 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 57 by extracting the submatrix in row 3 and column 3 row 3 and columns 5 and 6 rows 5 and 6 and column 3 and rows 5 and 6 and columns 5 and 6 Therefore we obtain 103 70421 17921 26882 17921 35842 0 26882 0 80645 U2x U3x U3y 0 5 10 58 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK33 K356 K563 K5656 k 10e003 70421 17921 26882 17921 35842 00000 26882 00000 80645 f0 5 10 f 0 5 10 52 MATLAB Functions Used 71 ukf u 00011 00020 00016 It is now clear that the horizontal displacement at node 2 is 00011 m and the horizontal and vertical displacements at node 3 are 00020 m and 00016 m respec tively Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 2 and the stress in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 0 u1 0 u23 U 0 0 00011 0 00020 00016 FKU F 50000 12500 00000 87500 50000 100000 Thus the horizontal and vertical reactions at node 1 are forces of 5 kN directed to the left and 125 kN directed upwards The vertical reaction at node 2 is a force of 875 N directed upwards Obviously force equilibrium is satisfied for this problem Nextwesetuptheelementnodaldisplacementvectorsu1 u2andu3 thenwecalculate the element stresses sigma1 sigma2 and sigma3 by making calls to the MATLAB function PlaneTrussElementStress 72 5 The Plane Truss Element u1U1 U2 U3 U4 u1 0 0 00011 0 u2U1 U2 U5 U6 u2 0 0 00020 00016 u3U3 U4 U5 U6 u3 00011 0 00020 00016 sigma1PlaneTrussElementStressEL10u1 sigma1 58333e004 sigma2PlaneTrussElementStressEL2theta2u2 sigma2 15023e004 sigma3PlaneTrussElementStressEL3theta3u3 sigma3 10516e005 52 MATLAB Functions Used 73 Thus it is clear that the stress in elements 1 2 and 3 are 583333 MPa tensile 15023 MPa compressive and 10516 MPa compressive respectively Example 52 Consider the plane truss with an inclined support as shown in Fig 54 Given E 70 GPa and A 0004 m2 determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 2 3 and 4 3 the reactions at nodes 1 and 4 4 the stress in each element 4 45 2 3 1 35 m 4 m 30 kN Fig 54 Plane Truss with Inclined Support for Example 52 Solution Use the six steps outlined in Chap 1 to solve this problem using the plane truss element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into six elements and four nodes The units used in the MATLAB calculations are kN and meter Table 52 shows the element connectivity for this example Table 52 Element Connectivity for Example 52 Element Number Node i Node j 1 1 2 2 1 4 3 1 3 4 2 4 5 2 3 6 3 4 74 5 The Plane Truss Element Step 2 Writing the Element Stiffness Matrices The six element stiffness matrices k1 k2 k3 k4 k5 and k6 are obtained by making calls to the MATLAB function PlaneTrussElementStiffness Each matrix has size 4 4 E70e6 E 70000000 A0004 A 00040 L135 L1 35000 theta190 theta1 90 L24 L2 4 theta20 theta2 0 L3PlaneTrussElementLength00435 52 MATLAB Functions Used 75 L3 53151 theta3 atan354180pi theta3 411859 L4L3 L4 53151 theta4360theta3 theta4 3188141 L54 L5 4 theta50 theta5 0 L635 L6 35000 theta6270 76 5 The Plane Truss Element theta6 270 k1PlaneTrussElementStiffnessEAL1theta1 k1 10e004 00000 00000 00000 00000 00000 80000 00000 80000 00000 00000 00000 00000 00000 80000 00000 80000 k2PlaneTrussElementStiffnessEAL2theta2 k2 70000 0 70000 0 0 0 0 0 70000 0 70000 0 0 0 0 0 k3PlaneTrussElementStiffnessEAL3theta3 k3 10e004 29837 26107 29837 26107 26107 22844 26107 22844 29837 26107 29837 26107 26107 22844 26107 22844 k4PlaneTrussElementStiffnessEAL4theta4 k4 10e004 52 MATLAB Functions Used 77 29837 26107 29837 26107 26107 22844 26107 22844 29837 26107 29837 26107 26107 22844 26107 22844 k5PlaneTrussElementStiffnessEAL5theta5 k5 70000 0 70000 0 0 0 0 0 70000 0 70000 0 0 0 0 0 k6PlaneTrussElementStiffnessEAL6theta6 k6 10e004 00000 00000 00000 00000 00000 80000 00000 80000 00000 00000 00000 00000 00000 80000 00000 80000 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 8 8 Therefore to obtain K we first set up a zero matrix of size 8 8 then make six calls to the MATLAB function PlaneTrussAssemble since we have six elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros88 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 78 5 The Plane Truss Element KPlaneTrussAssembleKk112 K 10e004 Columns 1 through 7 00000 00000 00000 00000 0 0 0 00000 80000 00000 80000 0 0 0 00000 00000 00000 00000 0 0 0 00000 80000 00000 80000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Column 8 0 0 0 0 0 0 0 0 KPlaneTrussAssembleKk214 K 10e004 Columns 1 through 7 70000 00000 00000 00000 0 0 70000 00000 80000 00000 80000 0 0 0 00000 00000 00000 00000 0 0 0 00000 80000 00000 80000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 70000 0 0 0 0 0 70000 0 0 0 0 0 0 0 52 MATLAB Functions Used 79 Column 8 0 0 0 0 0 0 0 0 KPlaneTrussAssembleKk313 K 10e005 Columns 1 through 7 09984 02611 00000 00000 02984 02611 07000 02611 10284 00000 08000 02611 02284 0 00000 00000 00000 00000 0 0 0 00000 08000 00000 08000 0 0 0 02984 02611 0 0 02984 02611 0 02611 02284 0 0 02611 02284 0 07000 0 0 0 0 0 07000 0 0 0 0 0 0 0 Column 8 0 0 0 0 0 0 0 0 KPlaneTrussAssembleKk424 K 10e005 80 5 The Plane Truss Element Columns 1 through 7 09984 02611 00000 00000 02984 02611 07000 02611 10284 00000 08000 02611 02284 0 00000 00000 02984 02611 0 0 02984 00000 08000 02611 10284 0 0 02611 02984 02611 0 0 02984 02611 0 02611 02284 0 0 02611 02284 0 07000 0 02984 02611 0 0 09984 0 0 02611 02284 0 0 02611 Column 8 0 0 02611 02284 0 0 02611 02284 KPlaneTrussAssembleKk523 K 10e005 Columns 1 through 7 09984 02611 00000 00000 02984 02611 07000 02611 10284 00000 08000 02611 02284 0 00000 00000 09984 02611 07000 0 02984 00000 08000 02611 10284 0 0 02611 02984 02611 07000 0 09984 02611 0 02611 02284 0 0 02611 02284 0 07000 0 02984 02611 0 0 09984 0 0 02611 02284 0 0 02611 Column 8 0 0 02611 52 MATLAB Functions Used 81 02284 0 0 02611 02284 KPlaneTrussAssembleKk634 K 10e005 Columns 1 through 7 09984 02611 00000 00000 02984 02611 07000 02611 10284 00000 08000 02611 02284 0 00000 00000 09984 02611 07000 0 02984 00000 08000 02611 10284 0 0 02611 02984 02611 07000 0 09984 02611 00000 02611 02284 0 0 02611 10284 00000 07000 0 02984 02611 00000 00000 09984 0 0 02611 02284 00000 08000 02611 Column 8 0 0 02611 02284 00000 08000 02611 10284 Next we need to modify the global stiffness matrix obtained above to take the effect of the inclined support at node 4 by using 54 First we set up an identity matrix T of size 88 Then we make a call to the MATLAB function PlaneTrussInclinedSupport as shown below The new matrix K0 obtained is thus the global stiffness matrix for the structure Teye 8 8 T 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 82 5 The Plane Truss Element 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 TPlaneTrussInclinedSupport T 4 45 T Columns 1 through 7 10000 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 07071 0 0 0 0 0 0 07071 Column 8 0 0 0 0 0 0 07071 07071 K0TKT K0 10e005 Columns 1 through 7 09984 02611 00000 00000 02984 02611 04950 02611 10284 00000 08000 02611 02284 0 00000 00000 09984 02611 07000 0 00264 52 MATLAB Functions Used 83 00000 08000 02611 10284 0 0 00231 02984 02611 07000 0 09984 02611 00000 02611 02284 0 0 02611 10284 05657 04950 0 00264 00231 00000 05657 07523 04950 0 03956 03461 00000 05657 00150 Column 8 04950 0 03956 03461 00000 05657 00150 12745 Step 4 Applying the Boundary Conditions The matrix 52 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 103 9984 2611 0 0 2984 2611 4950 4950 2611 10284 0 8000 2611 2284 0 0 0 0 9984 2611 7000 0 264 3956 0 8000 2611 10284 0 0 231 3461 2984 2611 7000 0 9984 2611 0 0 2611 2284 0 0 2611 10284 5657 5657 4950 0 264 231 0 5657 7523 150 4950 0 3956 3461 0 5657 150 12745 U1x U1y U2x U2y U3x U3y U 4x U 4y F1x F1y F2x F2y F3x F3y F 4x F 4y 59 The boundary conditions for this problem are given as U1x U1y U 4y 0 F2x F2y F3y F 4x 0 F3x 30 510 84 5 The Plane Truss Element Inserting the above conditions into equation 59 we obtain 103 9984 2611 0 0 2984 2611 4950 4950 2611 10284 0 8000 2611 2284 0 0 0 0 9984 2611 7000 0 264 3956 0 8000 2611 10284 0 0 231 3461 2984 2611 7000 0 9984 2611 0 0 2611 2284 0 0 2611 10284 5657 5657 4950 0 264 231 0 5657 7523 150 4950 0 3956 3461 0 5657 150 12745 0 0 U2x U2y U3x U3y U 4x 0 F1x F1y 0 0 30 0 0 F 4y 511 Step 5 Solving the Equations Solving the system of equations in 511 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 511 by extracting the submatrix in rows 3 to 7 and columns 3 to 7 Therefore we obtain 103 9984 2611 7000 0 264 2611 10284 0 0 231 7000 0 9984 2611 0 0 0 2611 10284 5657 264 231 0 5657 7523 U2x U2y U3x U3y U 4x 0 0 30 0 0 512 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK0 37 37 k 10e005 09984 02611 07000 0 00264 02611 10284 0 0 00231 07000 0 09984 02611 00000 0 0 02611 10284 05657 00264 00231 00000 05657 07523 52 MATLAB Functions Used 85 f0 0 30 0 0 f 0 0 30 0 0 ukf u 10e003 06053 01590 08129 03366 02367 It is now clear that the horizontal and vertical displacements at node 2 are 06053 103 m and 01590 103 m respectively the horizontal and vertical displacements at node 3 are 08129 103 m and 03366 103 m respectively and the inclined displacement at node 4 is 02367 103 m Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 2 and the stress in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 0 u 0 U 10e003 0 0 06053 01590 08129 86 5 The Plane Truss Element 03366 02367 0 FK0U F 37500 262500 0 00000 300000 00000 0 371231 Thus the horizontal and vertical reactions at node 1 are forces of 375 kN directed to the left and 2625 kN directed downward The inclined reaction at node 4 is a force of 3711231 kN Obviously force equilibrium is satisfied for this problem Next we set up the element nodal displacement vectors u1 u2 u3 u4 u5 and u6 then we calculate the element stresses sigma1 sigma2 sigma3 sigma4 sigma5 and sigma6 by making calls to the MATLAB function PlaneTrussElementStress u1U1 U2 U3 U4 u1 10e003 0 0 06053 01590 sigma1PlaneTrussElementStressEL1theta1u1 sigma1 31791e003 52 MATLAB Functions Used 87 u2U1 U2 U7 U8 u2 10e003 0 0 02367 0 sigma2PlaneTrussElementStressEL2theta2u2 sigma2 41425e003 u3U1 U2 U5 U6 u3 10e003 0 0 08129 03366 sigma3PlaneTrussElementStressEL3theta3u3 sigma3 51380e003 u4U3 U4 U7 U8 u4 10e003 06053 01590 02367 0 88 5 The Plane Truss Element sigma4PlaneTrussElementStressEL4theta4u4 sigma4 69666e003 u5U3 U4 U5 U6 u5 10e003 06053 01590 08129 03366 sigma5PlaneTrussElementStressEL5theta5u5 sigma5 36333e003 u6U5 U6 U7 U8 u6 10e003 08129 03366 02367 0 sigma6PlaneTrussElementStressEL6theta6u6 sigma6 67311e003 Thus it is clear that the stresses in elements 1 2 3 4 5 and 6 are 31791 MPa ten sile 41425 MPa compressive 51380 MPa tensile 69666 MPa compressive 36333 MPa tensile and 67311 MPa compressive respectively 52 MATLAB Functions Used 89 Problems Problem 51 Consider the plane truss shown in Fig 55 Given E 210 GPa and A 0005 m2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 2 3 4 and 5 3 the horizontal and vertical reactions at nodes 1 and 6 4 the stress in each element 3 1 2 20 kN 7 m 5 m 5 m 5 4 6 5 m Fig 55 Plane Truss for Problem 51 Problem 52 Consider the structure composed of a spring and plane truss as shown in Fig 56 Given E 70 GPa A 001 m2 and k 3000 kNm determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 4 and 5 3 the reactions at nodes 1 2 and 3 4 the force in the spring 5 the stress in each truss element k 2 4 m 3 m 4 m 4 1 3 5 10 kN Fig 56 Plane Truss with a Spring for Problem 52 6 The Space Truss Element 61 Basic Equations The space truss element is a threedimensional finite element with both local and global coordinates It is characterized by linear shape functions The space truss element has modulus of elasticity E crosssectional area A and length L Each space truss element has two nodes and is inclined with angles θx θy and θz measured from the global X Y and Z axes respectively to the local x axis as shown in Fig 61 Let Cx cosθx Cy cosθy and Cz cosθz In this case the element stiffness matrix is given by see 1 and 18 k EA L C2 x CxCy CxCz C2 x CxCy CxCz CyCx C2 y CyCz CyCx C2 y CyCz CzCx CzCy C2 z CzCx CzCy C2 z C2 x CxCy CxCz C2 x CxCy CxCz CyCx C2 y CyCz CyCx C2 y CyCz CzCx CzCy C2 z CzCx CzCy C2 z 61 L E A j x Y Z i X Fig 61 The Space Truss Element It is clear that the space truss element has six degrees of freedom three at each node Consequently for a structure with n nodes the global stiffness matrix K will be of size 3n 3n since we have three degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function SpaceTrussAssemble which is written specifically for this purpose Once the global stiffness matrix K is obtained we have the following structure equation KU F where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 62 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the force is obtained for each element as follows f EALCx Cy Cz Cx Cy Czu where f is the force in the element a scalar and u is the 6 1 element displacement vector The element stress is obtained by dividing the element force by the crosssectional area A 62 MATLAB Functions Used 93 SpaceTrussElementForceE A L thetax thetay thetaz u This function calculates the element force using the modulus of elasticity E the crosssectional area A the length L the angles thetax thetay thetaz in degrees and the element displacement vector u It returns the force in the element as a scalar SpaceTrussElementStressE L thetax thetay thetaz u This function calculates the element stress using the modulus of elasticity E the length L the angles thetax thetay thetaz in degrees and the element displacement vector u It returns the stress in the element as a scalar The following is a listing of the MATLAB source code for each function function y SpaceTrussElementLengthx1y1z1x2y2z2 SpaceTrussElementLength This function returns the length of the space truss element whose first node has coordinates x1y1z1 and second node has coordinates x2y2z2 y sqrtx2x1x2x1 y2y1y2y1 z2z1z2z1 function y SpaceTrussElementStiffnessEALthetaxthetaythetaz SpaceTrussElementStiffness This function returns the element stiffness matrix for a space truss element with modulus of elasticity E crosssectional area A length L and angles thetax thetay thetaz in degrees The size of the element stiffness matrix is 6 x 6 x thetaxpi180 u thetaypi180 v thetazpi180 Cx cosx Cy cosu Cz cosv w CxCx CxCy CxCz CyCx CyCy CyCz CzCx CzCy CzCz y EALw w w w function y SpaceTrussAssembleKkij SpaceTrussAssemble This function assembles the element stiffness matrix k of the space truss element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K3i23i2 K3i23i2 k11 K3i23i1 K3i23i1 k12 K3i23i K3i23i k13 K3i23j2 K3i23j2 k14 K3i23j1 K3i23j1 k15 94 6 The Space Truss Element K3i23j K3i23j k16 K3i13i2 K3i13i2 k21 K3i13i1 K3i13i1 k22 K3i13i K3i13i k23 K3i13j2 K3i13j2 k24 K3i13j1 K3i13j1 k25 K3i13j K3i13j k26 K3i3i2 K3i3i2 k31 K3i3i1 K3i3i1 k32 K3i3i K3i3i k33 K3i3j2 K3i3j2 k34 K3i3j1 K3i3j1 k35 K3i3j K3i3j k36 K3j23i2 K3j23i2 k41 K3j23i1 K3j23i1 k42 K3j23i K3j23i k43 K3j23j2 K3j23j2 k44 K3j23j1 K3j23j1 k45 K3j23j K3j23j k46 K3j13i2 K3j13i2 k51 K3j13i1 K3j13i1 k52 K3j13i K3j13i k53 K3j13j2 K3j13j2 k54 K3j13j1 K3j13j1 k55 K3j13j K3j13j k56 K3j3i2 K3j3i2 k61 K3j3i1 K3j3i1 k62 K3j3i K3j3i k63 K3j3j2 K3j3j2 k64 K3j3j1 K3j3j1 k65 K3j3j K3j3j k66 y K function y SpaceTrussElementForceEALthetaxthetaythetazu SpaceTrussElementForce This function returns the element force given the modulus of elasticity E the crosssectional area A the length L the angles thetax thetay thetaz in degrees and the element nodal displacement vector u x thetax pi180 w thetay pi180 v thetaz pi180 Cx cosx Cy cosw Cz cosv y EALCx Cy Cz Cx Cy Czu 62 MATLAB Functions Used 95 function y SpaceTrussElementStressELthetaxthetaythetazu SpaceTrussElementStress This function returns the element stress given the modulus of elasticity E the length L the angles thetax thetay thetaz in degrees and the element nodal displacement vector u x thetax pi180 w thetay pi180 v thetaz pi180 Cx cosx Cy cosw Cz cosv y ELCx Cy Cz Cx Cy Czu Example 61 Consider the space truss shown in Fig 62 The supports at nodes 1 2 and 3 are ballandsocket joints allowing rotation but no translation Given E 200 GPa A14 0001 m2 A24 0002 m2 A34 0001 m2 and P 12 kN determine 1 the global stiffness matrix for the structure 2 the displacements at node 4 3 the reactions at nodes 1 2 and 3 4 the stress in each element Z X P Y 1 3 2 4 4 m 3 m 4 m 5 m Fig 62 Space Truss with Three Elements for Example 61 Solution Use the six steps outlined in Chap 1 to solve this problem using the space truss element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into three elements and four nodes The units used in the MATLAB calculations are kN and meter Table 61 shows the element connectivity for this example 96 6 The Space Truss Element Table 61 Element Connectivity for Example 61 Element Number Node i Node j 1 1 4 2 2 4 3 3 4 Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices k1 k2 and k3 are obtained by making calls to the MATLAB function SpaceTrussElementStiffness Each matrix has size 6 6 E200e6 E 200000000 A10001 A1 00010 A20002 A2 00020 A30001 A3 00010 L1SpaceTrussElementLength004050 L1 64031 L2SpaceTrussElementLength300050 62 MATLAB Functions Used 97 L2 58310 L3SpaceTrussElementLength004050 L3 64031 theta1xacos0L1180pi theta1x 90 theta1yacos5L1180pi theta1y 386598 theta1zacos4L1180pi theta1z 513402 theta2xacos3L2180pi theta2x 590362 theta2yacos5L2180pi theta2y 309638 theta2zacos0L2180pi theta2z 90 98 6 The Space Truss Element theta3xacos0L3180pi theta3x 90 theta3yacos5L3180pi theta3y 386598 theta3zacos4L3180pi theta3z 1286598 k1SpaceTrussElementStiffnessEA1L1theta1xtheta1ytheta1z k1 10e004 00000 00000 00000 00000 00000 00000 00000 19046 15236 00000 19046 15236 00000 15236 12189 00000 15236 12189 00000 00000 00000 00000 00000 00000 00000 19046 15236 00000 19046 15236 00000 15236 12189 00000 15236 12189 k2SpaceTrussElementStiffnessEA2L2theta2xtheta2ytheta2z k2 10e004 18159 30264 00000 18159 30264 00000 30264 50441 00000 30264 50441 00000 00000 00000 00000 00000 00000 00000 18159 30264 00000 18159 30264 00000 30264 50441 00000 30264 50441 00000 00000 00000 00000 00000 00000 00000 62 MATLAB Functions Used 99 k3SpaceTrussElementStiffnessEA3L3theta3xtheta3ytheta3z k3 10e004 00000 00000 00000 00000 00000 00000 00000 19046 15236 00000 19046 15236 00000 15236 12189 00000 15236 12189 00000 00000 00000 00000 00000 00000 00000 19046 15236 00000 19046 15236 00000 15236 12189 00000 15236 12189 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 12 12 Therefore to obtain K we first set up a zero matrix of size 12 12 then make three calls to the MATLAB function SpaceTrussAssemble since we have three elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros1212 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KSpaceTrussAssembleKk114 K 10e004 100 6 The Space Truss Element Columns 1 through 7 00000 00000 00000 0 0 0 0 00000 19046 15236 0 0 0 0 00000 15236 12189 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00000 00000 00000 0 0 0 0 00000 19046 15236 0 0 0 0 00000 15236 12189 0 0 0 0 Columns 8 through 12 0 0 00000 00000 00000 0 0 00000 19046 15236 0 0 00000 15236 12189 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00000 00000 00000 0 0 00000 19046 15236 0 0 00000 15236 12189 KSpaceTrussAssembleKk224 K 10e004 Columns 1 through 7 00000 00000 00000 0 0 0 0 00000 19046 15236 0 0 0 0 00000 15236 12189 0 0 0 0 0 0 0 18159 30264 00000 0 0 0 0 30264 50441 00000 0 0 0 0 00000 00000 00000 0 62 MATLAB Functions Used 101 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00000 00000 00000 18159 30264 00000 0 00000 19046 15236 30264 50441 00000 0 00000 15236 12189 00000 00000 00000 0 Columns 8 through 12 0 0 00000 00000 00000 0 0 00000 19046 15236 0 0 00000 15236 12189 0 0 18159 30264 00000 0 0 30264 50441 00000 0 0 00000 00000 00000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 18159 30264 00000 0 0 30264 69486 15236 0 0 00000 15236 12189 KSpaceTrussAssembleKk334 K 10e004 Columns 1 through 7 00000 00000 00000 0 0 0 0 00000 19046 15236 0 0 0 0 00000 15236 12189 0 0 0 0 0 0 0 18159 30264 00000 0 0 0 0 30264 50441 00000 0 0 0 0 00000 00000 00000 0 0 0 0 0 0 0 00000 0 0 0 0 0 0 00000 0 0 0 0 0 0 00000 00000 00000 00000 18159 30264 00000 00000 00000 19046 15236 30264 50441 00000 00000 00000 15236 12189 00000 00000 00000 00000 102 6 The Space Truss Element Columns 8 through 12 0 0 00000 00000 00000 0 0 00000 19046 15236 0 0 00000 15236 12189 0 0 18159 30264 00000 0 0 30264 50441 00000 0 0 00000 00000 00000 00000 00000 00000 00000 00000 19046 15236 00000 19046 15236 15236 12189 00000 15236 12189 00000 00000 18159 30264 00000 19046 15236 30264 88532 0 15236 12189 00000 0 24378 Step 4 Applying the Boundary Conditions The matrix 62 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step the numbers are written below using one deci mal place only although the MATLAB calculations are performed with at least four decimal places 104 00 00 00 0 0 0 0 0 0 00 00 00 00 19 15 0 0 0 0 0 0 00 19 15 00 15 12 0 0 0 0 0 0 00 15 12 0 0 0 18 30 00 0 0 0 18 30 00 0 0 0 30 50 00 0 0 0 30 50 00 0 0 0 00 00 00 0 0 0 00 00 00 0 0 0 0 0 0 00 00 00 00 00 00 0 0 0 0 0 0 00 19 15 00 19 15 0 0 0 0 0 0 00 15 12 00 15 12 00 00 00 18 30 00 00 00 00 18 30 00 00 19 15 30 50 00 00 19 15 30 89 0 00 15 12 00 00 00 00 15 12 00 0 24 U1x U1y U1z U2x U2y U2z U3x U3y U3z U4x U4y U4z F1x F1y F1z F2x F2y F2z F3x F3y F3z F4x F4y F4z 64 62 MATLAB Functions Used 103 The boundary conditions for this problem are given as U1x U1y U1z U2x U2y U2z U3x U3y U3z 0 F4x 12 F4y F4z 0 65 Inserting the above conditions into 64 we obtain 104 00 00 00 0 0 0 0 0 0 00 00 00 00 19 15 0 0 0 0 0 0 00 19 15 00 15 12 0 0 0 0 0 0 00 15 12 0 0 0 18 30 00 0 0 0 18 30 00 0 0 0 30 50 00 0 0 0 30 50 00 0 0 0 00 00 00 0 0 0 00 00 00 0 0 0 0 0 0 00 00 00 00 00 00 0 0 0 0 0 0 00 19 15 00 19 15 0 0 0 0 0 0 00 15 12 00 15 12 00 00 00 18 30 00 00 00 00 18 30 00 00 19 15 30 50 00 00 19 15 30 89 0 00 15 12 00 00 00 00 15 12 00 0 24 0 0 0 0 0 0 0 0 0 U4x U4y U4z F1x F1y F1z F2x F2y F2z F3x F3y F3z 12 0 0 66 Step 5 Solving the Equations Solving the system of equations in 66 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 66 by extracting the submatrix in rows 10 to 12 and columns 10 to 12 Therefore we obtain 104 18 30 00 30 89 0 00 0 24 U4x U4y U4z 12 0 0 67 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination 104 6 The Space Truss Element kK10121012 k 10e004 18159 30264 00000 30264 88532 0 00000 0 24378 f12 0 0 f 12 0 0 ukf u 00015 00005 00000 It is now clear that the horizontal displacements at node 4 in the X and Z directions are 00015 m and 0 m due to symmetry respectively while the vertical displacement in the Y direction at node 4 is 00005 m Step 6 Postprocessing In this step we obtain the reactions at nodes 1 2 and 3 and the stress in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 0 0 0 0 0 0 0 0 u U 0 0 0 0 62 MATLAB Functions Used 105 0 0 0 0 0 00015 00005 00000 FKU F 00000 100000 80000 120000 200000 00000 00000 100000 80000 120000 00000 00000 Thus the reactions at node 1 are forces of 0 10 and 8 kN along the X Y and Z directions respectively The reactions at node 2 are forces of 12 20 and 0 kN along the X Y and Z directions respectively The reactions at node 3 are forces of 0 10 and 8 kN along the X Y andZ directions respectively Obviously force equilibrium is satisfied for this problem Next we set up the element nodal displacement vectors u1 u2 and u3 then we calculate the element stresses sigma1 sigma2 and sigma3 by making calls to the MATLAB function SpaceTrussElementStress u1U1 U2 U3 U10 U11 U12 u1 0 0 0 00015 00005 00000 106 6 The Space Truss Element u2U4 U5 U6 U10 U11 U12 u2 0 0 0 00015 00005 00000 u3U7 U8 U9 U10 U11 U12 u3 0 0 0 00015 00005 00000 sigma1SpaceTrussElementStressEL1theta1xtheta1ytheta1zu1 sigma1 12806e004 sigma2SpaceTrussElementStressEL2theta2xtheta2ytheta2zu2 sigma2 11662e004 sigma3SpaceTrussElementStressEL3theta3xtheta3ytheta3zu3 sigma3 12806e004 Thus it is clear that the stresses in elements 1 2 and 3 are 12806 MPa com pressive 11662 MPa tensile and 12806 MPa compressive respectively The symmetry in the results regarding elements 1 and 3 is obvious 62 MATLAB Functions Used 107 Problems Problem 61 Consider the space truss shown in Fig 63 The supports at nodes 1 2 3 and 4 are ballandsocket joints allowing rotation but no translation Given E 200 GPa A 0003 m2 P1 15 kN and P2 20 kN determine 1 the global stiffness matrix for the structure 2 the displacements at node 5 3 the reactions at nodes 1 2 3 and 4 4 the stress in each element 5 Z X P2 P1 Y 1 4 2 3 4 m 3 m 3 m 3 m 5 m Fig 63 Space Truss with Four Elements for Problem 61 7 The Beam Element 71 Basic Equations The beam element is a twodimensional finite element where the local and global coordinates coincide It is characterized by linear shape functions The beam element has modulus of elasticity E moment of inertia I and length L Each beam element has two nodes and is assumed to be horizontal as shown in Fig 71 In this case the element stiffness matrix is given by the following matrix assuming axial deformation is neglected see 1 k EI L3 12 6L 12 6L 6L 4L2 6L 2L2 12 6L 12 6L 6L 2L2 6L 4L2 71 E I i j Y L X x Fig 71 The Beam Element It is clear that the beam element has four degrees of freedom two at each node a transverse displacement and a rotation The sign convention used is that the displacement is positive if it points upwards and the rotation is positive if it is counterclockwise Consequently for a structure with n nodes the global stiffness matrix K will be of size 2 n 2 n since we have two degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function BeamAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples 110 7 The Beam Element Once the global stiffness matrix K is obtained we have the following structure equation KU F 72 where U is the global nodal displacement vector and F is the global nodal force vectorAt this step the boundary conditions are applied manually to the vectors U and F Then the matrix 72 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the nodal force vector is obtained for each element as follows f k u 73 where f is the 4 1 nodal force vector in the element and u is the 4 1 element displacement vector The first and second elements in each vector u are the transverse displacement and rotation respectively at the first node while the third and fourth elements in each vector u are the transverse displacement and rotation respectively at the second node 72 MATLAB Functions Used The five MATLAB functions used for the beam element are BeamElementStiffnessE I L This function calculates the element stiffness matrix foreachbeamelementwithmodulusofelasticityEmomentofinertia IandlengthL It returns the 4 4 element stiffness matrix k BeamAssembleK k i j This function assembles the element stiffness matrix k of the beam element joining nodes i and j into the global stiffness matrix K It returns the 2n 2n global stiffness matrix K every time an element is assembled BeamElementForcesk u This function calculates the element force vector using the element stiffness matrix k and the element displacement vector u It returns the 4 1 element force vector f BeamElementShearDiagramf L This function plots the shear force diagram for the element with nodal force vector f and length L BeamElementMomentDiagramf L This function plots the bending moment diagram for the element with nodal force vector f and length L The following is a listing of the MATLAB source code for each function 72 MATLAB Functions Used 111 function y BeamElementStiffnessEIL BeamElementStiffness This function returns the element stiffness matrix for a beam element with modulus of elasticity E moment of inertia I and length L The size of the element stiffness matrix is 4 x 4 y EILLL 12 6L 12 6L 6L 4LL 6L 2LL 12 6L 12 6L 6L 2LL 6L 4LL function y BeamAssembleKkij BeamAssemble This function assembles the element stiffness matrix k of the beam element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K2i12i1 K2i12i1 K11 K2i12i K2i12i K12 K2i12j1 K2i12j1 K13 K2i12j K2i12j K14 K2i2i1 K2i2i1 K21 K2i2i K2i2i K22 K2i2j1 K2i2j1 K23 K2i2j K2i2j K24 K2j12i1 K2j12i1 K31 K2j12i K2j12i K32 K2j12j1 K2j12j1 K33 K2j12j K2j12j K34 K2j2i1 K2j2i1 K41 K2j2i K2j2i K42 K2j2j1 K2j2j1 K43 K2j2j K2j2j K44 y K function y BeamElementForcesku BeamElementForces This function returns the element nodal force vector given the element stiffness matrix k and the element nodal displacement vector u y k u function y BeamElementShearDiagramf L BeamElementShearDiagram This function plots the shear force diagram for the beam element with nodal force vector f and length L x 0 L z f1 f3 hold on titleShear Force Diagram plotxz y1 0 0 plotxy1k 112 7 The Beam Element function y BeamElementMomentDiagramf L BeamElementMomentDiagram This function plots the bending moment diagram for the beam element with nodal force vector f and length L x 0 L z f2 f4 hold on titleBending Moment Diagram plotxz y1 0 0 plotxy1k Example 71 Consider the beam shown in Fig 72 Given E 210 GPa I 60 106 m4 P 20 kN and L 2 m determine 1 the global stiffness matrix for the structure 2 the vertical displacement at node 2 3 the rotations at nodes 2 and 3 4 the reactions at nodes 1 and 3 5 the forces shears and moments in each element 6 the shear force diagram for each element 7 the bending moment diagram for each element P L L 1 2 3 Fig 72 Beam With Two Elements for Example 71 Solution Use the six steps outlined in Chap 1 to solve this problem using the beam element Step 1 Discretizing the Domain We will put a node node 2 at the location of the concentrated force so that we may determine the required quantities displacement rotation shear moment at that 72 MATLAB Functions Used 113 pointAlternatively we can consider the structure composed of one beam element and two nodes only and use equivalent nodal forces to account for the concentrated load However it is required to find the vertical displacement under the concentrated load Furthermore the method of equivalent nodal forces will be illustrated for a different problem in Example 72 Therefore the domain is subdivided into two elements and three nodes The units used in the MATLAB calculations are kN and meter Table 71 shows the element connectivity for this example Table 71 Element Connectivity for Example 71 Element Number Node i Node j 1 1 2 2 2 3 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function BeamElementStiffness Each matrix has size 4 4 E210e6 E 210000000 I60e6 I 60000e005 L2 L 2 k1BeamElementStiffnessEIL k1 18900 18900 18900 18900 18900 25200 18900 12600 18900 18900 18900 18900 18900 12600 18900 25200 114 7 The Beam Element k2BeamElementStiffnessEIL k2 18900 18900 18900 18900 18900 25200 18900 12600 18900 18900 18900 18900 18900 12600 18900 25200 Step 3 Assembling the Global Stiffness Matrix Since the structure has three nodes the size of the global stiffness matrix is 6 6 Therefore to obtain K we first set up a zero matrix of size 6 6 then make two calls to the MATLAB function BeamAssemble since we have two beam elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros66 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KBeamAssembleKk112 K 18900 18900 18900 18900 0 0 18900 25200 18900 12600 0 0 18900 18900 18900 18900 0 0 18900 12600 18900 25200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 72 MATLAB Functions Used 115 KBeamAssembleKk223 K 18900 18900 18900 18900 0 0 18900 25200 18900 12600 0 0 18900 18900 37800 0 18900 18900 18900 12600 0 50400 18900 12600 0 0 18900 18900 18900 18900 0 0 18900 12600 18900 25200 Step 4 Applying the Boundary Conditions The matrix 72 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 103 189 189 189 189 0 0 189 252 189 126 0 0 189 189 378 0 189 189 189 126 0 504 189 126 0 0 189 189 189 189 0 0 189 126 189 252 U1y φ1 U2y φ2 U3y φ3 F1y M1 F2y M2 F3y M3 74 The boundary conditions for this problem are given as U1y φ1 0 F2y 20 M2 0 U3y 0 M3 0 75 Inserting the above conditions into 74 we obtain 103 189 189 189 189 0 0 189 252 189 126 0 0 189 189 378 0 189 189 189 126 0 504 189 126 0 0 189 189 189 189 0 0 189 126 189 252 0 0 U2y φ2 0 φ3 F1y M1 20 0 F3y 0 76 Step 5 Solving the Equations Solving the system of equations in 76 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 76 by extracting the submatrices in rows 3 to 4 and columns 3 to 4 rows 3 to 4 and column 6 row 6 and columns 3 to 4 and row 6 and column 6 Therefore we obtain 116 7 The Beam Element 103 378 0 189 0 504 126 189 126 252 U2y φ2 φ3 20 0 0 77 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3434 K346 K634 K66 k 37800 0 18900 0 50400 12600 18900 12600 25200 f20 0 0 f 20 0 0 ukf u 10e003 09259 01984 07937 It is now clear that the vertical displacement at node 2 is 09259 m downward while the rotations at nodes 2 and 3 are 01984 rad clockwise and 07937 rad coun terclockwise respectively Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 3 and the forces shears and moments in each beam element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F 72 MATLAB Functions Used 117 U0 0 u1 u2 0 u3 U 10e003 0 0 09259 01984 0 07937 FKU F 137500 150000 200000 0 62500 00000 Thus the reactions at node 1 are a vertical force of 1375 kN upward and a moment of 15 kNm counterclockwise while the reaction at node 3 is a vertical force of 625 kN upward It is clear that force equilibrium is satisfied Next we set up the element nodal displacement vectors u1 and u2 then we calculate the element force vectors f1 and f2 by making calls to the MATLAB function BeamElementForces u1U1 U2 U3 U4 u1 10e003 0 0 09259 01984 u2U3 U4 U5 U6 u2 10e003 118 7 The Beam Element 09259 01984 0 07937 f1BeamElementForcesk1u1 f1 137500 150000 137500 125000 f2BeamElementForcesk2u2 f2 62500 125000 62500 00000 Thus the shear force and bending moment at each end node of each element are given above Element 1 has a shear force of 1375 kN and a bending moment of 15 kNm at its left end while it has a shear force of 1375 kN and a bending moment of 125 kNm at its right end Element 2 has a shear force of 625 kN and a bending moment of 125 kNm at its left end while it has a shear force of 625 kN and a bending moment of 0 kNm at its right end Obviously the hinge at the right end has zero moment FinallywecalltheMATLABfunctionsBeamElementShearDiagramandBeamEle mentMomentDiagram to draw the shear force diagram and bending moment diagram respectively for each element This process is illustrated below Example 72 Consider the beam shown in Fig 77 Given E 210 GPa I 5 106 m4 and w 7 kNm determine 1 the global stiffness matrix for the structure 2 the rotations at nodes 1 2 and 3 3 the reactions at nodes 1 2 3 and 4 4 the forces shears and moments in each element 5 the shear force diagram for each element 6 the bending moment diagram for each element 72 MATLAB Functions Used 119 BeamElementShearDiagramf1L Fig 73 Shear Force Diagram for Element 1 BeamElementShearDiagramf2L Fig 74 Shear Force Diagram for Element 2 120 7 The Beam Element BeamElementMomentDiagramf1L Fig 75 Bending Moment Diagram for Element 1 BeamElementMomentDiagramf2L Fig 76 Bending Moment Diagram for Element 2 72 MATLAB Functions Used 121 3 m w 4 1 2 3 2 m 4 m Fig 77 Beam with Distributed Load for Example 72 Solution Use the six steps outlined in Chap 1 to solve this problem using the beam elementWe need first to replace the distributed loading on element 2 by equivalent nodal loads This is performed as follows for element 2 with a uniformly distributed load The resulting beam with equivalent nodal loads is shown in Fig 78 Table 72 shows the element connectivity for this example p2 wL 2 wL2 12 wL 2 wL2 12 14 kN 9333 kNm 14 kN 9333 kNm 78 3 m 4 1 2 3 933 kNm 14 kN 14 kN 933 kNm 2 m 4 m Fig 78 Equivalent nodal loads for example 72 Table 72 Element Connectivity for Example 72 Element Number Node i Node j 1 1 2 2 2 3 3 3 4 Step 1 Discretizing the Domain The domain is already subdivided into three elements and four nodes The units used in the MATLAB calculations are kN and meter 122 7 The Beam Element Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices k1 k2 and k3 are obtained by making calls to the MATLAB function BeamElementStiffness Each matrix has size 4 4 E210e6 E 210000000 I5e6 I 50000e006 L13 L1 3 L24 L2 4 L32 L3 2 k1BeamElementStiffnessEIL1 k1 10e003 04667 07000 04667 07000 07000 14000 07000 07000 04667 07000 04667 07000 07000 07000 07000 14000 72 MATLAB Functions Used 123 k2BeamElementStiffnessEIL2 k2 10e003 01969 03937 01969 03937 03937 10500 03937 05250 01969 03937 01969 03937 03937 05250 03937 10500 k3BeamElementStiffnessEIL3 k3 1575 1575 1575 1575 1575 2100 1575 1050 1575 1575 1575 1575 1575 1050 1575 2100 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 8 8 Therefore to obtain K we first set up a zero matrix of size 8 8 then make three calls to the MATLAB function BeamAssemble since we have three beam elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros88 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 124 7 The Beam Element KBeamAssembleKk112 K 10e003 Columns 1 through 7 04667 07000 04667 07000 0 0 0 07000 14000 07000 07000 0 0 0 04667 07000 04667 07000 0 0 0 07000 07000 07000 14000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Column 8 0 0 0 0 0 0 0 0 KBeamAssembleKk223 K 10e003 Columns 1 through 7 04667 07000 04667 07000 0 0 0 07000 14000 07000 07000 0 0 0 04667 07000 06635 03063 01969 03937 0 07000 07000 03063 24500 03937 05250 0 0 0 01969 03937 01969 03937 0 0 0 03937 05250 03937 10500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 72 MATLAB Functions Used 125 Column 8 0 0 0 0 0 0 0 0 KBeamAssembleKk334 K 10e003 Columns 1 through 7 04667 07000 04667 07000 0 0 0 07000 14000 07000 07000 0 0 0 04667 07000 06635 03063 01969 03937 0 07000 07000 03063 24500 03937 05250 0 0 0 01969 03937 17719 11812 15750 0 0 03937 05250 11812 31500 15750 0 0 0 0 15750 15750 15750 0 0 0 0 15750 10500 15750 Column 8 0 0 0 0 15750 10500 15750 21000 Step 4 Applying the Boundary Conditions The matrix 72 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step Note that we only show the numbers to two decimal places although the MATLAB calculations are performed using at least four decimal places 126 7 The Beam Element 103 047 070 047 070 0 0 0 0 070 140 070 070 0 0 0 0 047 070 066 031 020 039 0 0 070 070 031 245 039 053 0 0 0 0 020 039 177 118 158 158 0 0 039 053 118 315 158 105 0 0 0 0 158 158 158 158 0 0 0 0 158 105 158 210 U1y φ1 U2y φ2 U3y φ3 U4y φ4 F1y M1 F2y M2 F3y M3 F4y M4 79 The boundary conditions for this problem are given as U1y M1 U2y U3y U4y φ4 0 M2 9333 M3 9333 710 Inserting the above conditions into 79 we obtain 103 047 070 047 070 0 0 0 0 070 140 070 070 0 0 0 0 047 070 066 031 020 039 0 0 070 070 031 245 039 053 0 0 0 0 020 039 177 118 158 158 0 0 039 053 118 315 158 105 0 0 0 0 158 158 158 158 0 0 0 0 158 105 158 210 0 φ1 0 φ2 0 φ3 0 0 F1y 0 F2y 9333 F3y 9333 F4y M4 711 72 MATLAB Functions Used 127 Step 5 Solving the Equations Solving the system of equations in 711 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 711 by extracting the submatrices scalars in this case in rows 2 4 and 6 and columns 2 4 and 6Therefore we obtain 103 140 070 0 070 245 053 0 053 315 φ1 φ2 φ3 0 9333 9333 712 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK22 K24 K26 K42 K44 K46 K62 K64 K66 k 1400 700 0 700 2450 525 0 525 3150 f0 9333 9333 f 0 93330 93330 ukf u 00027 00054 00039 It is now clear that the rotations at nodes 1 2 and 3 are 00027 rad counterclock wise 00054 rad clockwise and 00039 rad counterclockwise respectively 128 7 The Beam Element Step 6 Postprocessing In this step we obtain the reactions at nodes 1 2 3 and 4 and the forces shears and moments in each beam element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U 0 u1 0 u2 0 u3 0 0 U 0 00027 0 00054 0 00039 0 0 F KU F 18937 00000 12850 93330 66954 93330 60867 40578 Thus the vertical reactions at nodes 1 2 3 and 4 are vertical forces of 18937 kN downward 12850 kN upward 66954 kN upward and 60867 kN downward respectively The moment at the fixed support node 4 is 40578 kNm counter clockwise It is clear that force equilibrium is satisfied Next we set up the ele ment nodal displacement vectors u1 u2 and u3 then we calculate the element force vectors f1 f2 and f3 by making calls to the MATLAB function BeamElement Forces 72 MATLAB Functions Used 129 u1U1 U2 U3 U4 u1 0 00027 0 00054 u2U3 U4 U5 U6 u2 0 00054 0 00039 u3 U5 U6 U7 U8 u3 0 00039 0 0 f1BeamElementForcesk1u1 f1 18937 00000 18937 56810 f2BeamElementForcesk2u2 f2 06087 36520 06087 12173 130 7 The Beam Element f3BeamElementForcesk3u3 f3 60867 81157 60867 40578 Note that the forces for element 2 need to be modified because of the distributed load In order to obtain the correct forces for element 2 we need to subtract from f2 the vector of equivalent nodal loads given in 78 This is performed using MATLAB as follows f2f214 9333 14 9333 f2 133913 56810 146087 81157 Therefore the forces for each element are given above Element 1 has a shear force of 18937 kN and a bending moment of 0 kNm at its left end while it has a shear force of 18937 kN and a bending moment of 56810 kNm at its right end Element 2 has a shear force of 133913 kN and a bending moment of 56810 kNm at its left end while it has a shear force of 146087 kN and a bending moment of 81157 kNm at its right end Element 3 has a shear force of 60867 kN and a bending moment of 81157 kNm at its left end while it has a shear force of 60867 kN and a bending moment of 40578 kNm at its right end Obviously the roller at the left end has zero moment Finally we call the MATLAB functions BeamElementShearDiagram and Beam ElementMomentDiagram to draw the shear force diagram and bending moment diagram respectively for each element This process is illustrated below Problems Problem 71 Consider the beam shown in Fig 715 Given E 200 GPa I 70105 m4 and M 15 kNm determine 1 the global stiffness matrix for the structure 2 the rotations at nodes 1 2 and 3 3 the reactions at nodes 1 2 and 3 4 the forces shears and moments in each element 5 the shear force diagram for each element 6 the bending moment diagram for each element 72 MATLAB Functions Used 131 BeamElementShearDiagramf1L1 Fig 79 Shear Force Diagram for Element 1 BeamElementShearDiagramf2L2 Fig 710 Shear Force Diagram for Element 2 132 7 The Beam Element BeamElementShearDiagramf3L3 Fig 711 Shear Force Diagram for Element 3 BeamElementMomentDiagramf1L1 Fig 712 Bending Moment Diagram for Element 1 72 MATLAB Functions Used 133 BeamElementMomentDiagramf2L2 Fig 713 Bending Moment Diagram for Element 2 BeamElementMomentDiagramf3L3 Fig 714 Bending Moment Diagram for Element 3 134 7 The Beam Element M 3 1 2 35 m 2 m Fig 715 Beam with Two Elements for Problem 71 Problem 72 Consider the beam shown in Fig 716 Do not put a node at the location of the concen trated load but use the method of equivalent nodal forces for both the distributed load and the concentrated load Given E 210 GPa and I 50 106 m4 determine 1 the global stiffness matrix for the structure 2 the rotations at nodes 2 3 and 4 3 the reactions at nodes 1 2 3 and 4 4 the forces shears and moments in each element 5 the shear force diagram for each element 6 the bending moment diagram for each element 3 m 3 4 1 2 10 kNm 30 kN 2 m 2 m 3 m Fig 716 Beam with Distributed Load for Problem 72 Problem 73 Consider the beam with a spring element as shown in Fig 717 Given E 70 GPa I 40 106 m4 and k 5000 kNm determine 1 the global stiffness matrix for the structure 2 the rotations at nodes 2 and 3 3 the reactions at nodes 1 3 and 4 4 the forces shears and moments in each beam element 5 the force in the spring element 72 MATLAB Functions Used 135 6 the shear force diagram for each beam element 7 the bending moment diagram for each beam element E I E I 4 3 m 10 kN 3 1 2 3 m Fig 717 Beam with a Spring for Problem 73 The plane frame element is a twodimensional finite element with both local and global coordinates The plane frame element has modulus of elasticity E moment of inertia I crosssectional area A and length L Each plane frame element has two nodes and is inclined with an angle θ measured counterclockwise from the positive global X axis as shown in Fig 81 Let C cosθ and S sinθ In this case the element stiffness matrix is given by the following matrix including axial deformation see 1 and 18 k EL AC2 121L2 S2 A 121L2CS 61L S AC2 121L2 S2 A 121L2CS 61L S A 121L2CS AS2 121L2 C2 61L C A 121L2CS AS2 121L2 C2 61L C 61L S 41 61L S 61L C 21 AC2 121L2 S2 A 121L2CS 61L S AC2 121L2 S2 A 121L2CS 61L S A 121L2CS AS2 121L2 C2 61L C A 121L2CS AS2 121L2 C2 61L C 61L S 21 61L S 61L C 41 It is clear that the plane frame element has six degrees of freedom three at each node two displacements and a rotation The sign convention used is that displacements are positive if they point upwards and rotations are positive if they are counterclockwise Consequently for a structure with n nodes the global stiffness matrix K will be of size 3n 3n since we have three degrees of freedom at each node 138 8 The Plane Frame Element Y y L x j i X θ Fig 81 The Plane Frame Element The global stiffness matrix K is assembled by making calls to the MATLAB function PlaneFrameAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F 82 where U is the global nodal displacement vector and F is the global nodal force vectorAt this step the boundary conditions are applied manually to the vectors U and F Then the matrix 82 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the nodal force vector is obtained for each element as follows f kR u 83 where f is the 6 1 nodal force vector in the element and u is the 6 1 element displacement vector The matrices k and R are given by the following k EA L 0 0 EA L 0 0 0 12EI L3 6EI L2 0 12EI L3 6EI L2 0 6EI L2 4EI L 0 6EI L2 2EI L EA L 0 0 EA L 0 0 0 12EI L3 6EI L2 0 12EI L3 6EI L2 0 6EI L2 2EI L 0 6EI L2 4EI L 84 R C S 0 0 0 0 S C 0 0 0 0 0 0 1 0 0 0 0 0 0 C S 0 0 0 0 S C 0 0 0 0 0 0 1 85 82 MATLAB Functions Used 139 The first and second elements in each vector u are the two displacements while the third element is the rotation respectively at the first node while the fourth and fifth elements in each vector are the two displacements while the sixth element is the rotation respectively at the second node If there is an inclined support at one of the nodes of the plane frame then the global stiffness matrix needs to be modified using the following equation Knew TKoldTT 86 where T is a 3n 3n transformation matrix that is obtained by making a call to the MATLAB function PlaneFrameInclinedSupport The inclined support in a plane frame is handled in the same way it is handled in a plane truss except that the size of the transformation matrix is now 3n 3n instead of 2n 2n The inclined support is assumed to be at node i with an angle of inclination alpha as shown in Fig 82 α x x Fig 82 Inclined Support in a Plane Frame 82 MATLAB Functions Used The eight MATLAB functions used for the plane frame element are PlaneFrameElementLengthx1 y1 x2 y2 This function returns the element length given the coordinates of the first node x1 y1 and the coordinates of the second node x2 y2 PlaneFrameElementStiffnessE A I L theta This function calculates the element stiffness matrix for each plane frame element with modulus of elasticity E cross sectional area A moment of inertia I and length L It returns the 6 6 element stiffness matrix k PlaneFrameAssembleK k i j This function assembles the element stiffness matrix k of the plane frame element joining nodes i and j into the global stiffness matrix K It returns the 3n 3n global stiffness matrix K every time an element is assembled 140 8 The Plane Frame Element PlaneFrameElementForcesE A I Ltheta uThisfunctioncalculatestheelement force vector using the modulus of elasticity E crosssectional area A moment of inertia I length L and the element displacement vector u It returns the 61 element force vector f PlaneFrameElementAxialDiagramf L This function plots the axial force diagram for the element with nodal force vector f and length L PlaneFrameElementShearDiagramf L This function plots the shear force dia gram for the element with nodal force vector f and length L PlaneFrameElementMomentDiagramf L This function plots the bending mo ment diagram for the element with nodal force vector f and length L PlaneFrameInclinedSupportT i alpha This function calculates the transforma tion matrix of the inclined support using the node number i of the inclined support and the angle of inclination alpha in degrees It returns the 3n 3n transformation matrix The following is a listing of the MATLAB source code for each function function y PlaneFrameElementLengthx1y1x2y2 PlaneFrameElementLength This function returns the length of the plane frame element whose first node has coordinates x1y1 and second node has coordinates x2y2 y sqrtx2x1x2x1 y2y1y2y1 function y PlaneFrameElementStiffnessEAILtheta PlaneFrameElementStiffness This function returns the element stiffness matrix for a plane frame element with modulus of elasticity E crosssectional area A moment of inertia I length L and angle theta in degrees The size of the element stiffness matrix is 6 x 6 x thetapi180 C cosx S sinx w1 ACC 12ISSLL w2 ASS 12ICCLL w3 A12ILLCS w4 6ISL w5 6ICL y ELw1 w3 w4 w1 w3 w4 w3 w2 w5 w3 w2 w5 w4 w5 4I w4 w5 2I w1 w3 w4 w1 w3 w4 w3 w2 w5 w3 w2 w5 w4 w5 2I w4 w5 4I 82 MATLAB Functions Used 141 function y PlaneFrameAssembleKkij PlaneFrameAssemble This function assembles the element stiffness matrix k of the plane frame element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K3i23i2 K3i23i2 k11 K3i23i1 K3i23i1 k12 K3i23i K3i23i k13 K3i23j2 K3i23j2 k14 K3i23j1 K3i23j1 k15 K3i23j K3i23j k16 K3i13i2 K3i13i2 k21 K3i13i1 K3i13i1 k22 K3i13i K3i13i k23 K3i13j2 K3i13j2 k24 K3i13j1 K3i13j1 k25 K3i13j K3i13j k26 K3i3i2 K3i3i2 k31 K3i3i1 K3i3i1 k32 K3i3i K3i3i k33 K3i3j2 K3i3j2 k34 K3i3j1 K3i3j1 k35 K3i3j K3i3j k36 K3j23i2 K3j23i2 k41 K3j23i1 K3j23i1 k42 K3j23i K3j23i k43 K3j23j2 K3j23j2 k44 K3j23j1 K3j23j1 k45 K3j23j K3j23j k46 K3j13i2 K3j13i2 k51 K3j13i1 K3j13i1 k52 K3j13i K3j13i k53 K3j13j2 K3j13j2 k54 K3j13j1 K3j13j1 k55 K3j13j K3j13j k56 K3j3i2 K3j3i2 k61 K3j3i1 K3j3i1 k62 K3j3i K3j3i k63 K3j3j2 K3j3j2 k64 K3j3j1 K3j3j1 k65 K3j3j K3j3j k66 y K function y PlaneFrameElementForcesEAILthetau PlaneFrameElementForces This function returns the element force vector given the modulus of elasticity E the crosssectional area A the moment of inertia I the length L the angle theta in degrees and the element nodal displacement vector u 142 8 The Plane Frame Element x theta pi180 C cosx S sinx w1 EAL w2 12EILLL w3 6EILL w4 4EIL w5 2EIL kprime w1 0 0 w1 0 0 0 w2 w3 0 w2 w3 0 w3 w4 0 w3 w5 w1 0 0 w1 0 0 0 w2 w3 0 w2 w3 0 w3 w5 0 w3 w4 T C S 0 0 0 0 S C 0 0 0 0 0 0 1 0 0 0 0 0 0 C S 0 0 0 0 S C 0 0 0 0 0 0 1 y kprimeT u function y PlaneFrameElementAxialDiagramf L PlaneFrameElementAxialDiagram This function plots the axial force diagram for the plane frame element with nodal force vector f and length L x 0 L z f1 f4 hold on titleAxial Force Diagram plotxz y1 0 0 plotxy1k function y PlaneFrameElementShearDiagramf L PlaneFrameElementShearDiagram This function plots the shear force diagram for the plane frame element with nodal force vector f and length L x 0 L z f2 f5 hold on titleShear Force Diagram plotxz y1 0 0 plotxy1k function y PlaneFrameElementMomentDiagramf L PlaneFrameElementMomentDiagram This function plots the bending moment diagram for the plane frame element with nodal force vector f and length L x 0 L z f3 f6 82 MATLAB Functions Used 143 hold on titleBending Moment Diagram plotxz y1 0 0 plotxy1k function y PlaneFrameInclinedSupportTialpha PlaneFrameInclinedSupport This function calculates the tranformation matrix T of the inclined support at node i with angle of inclination alpha in degrees x alphapi180 T3i23i2 cosx T3i23i1 sinx T3i23i 0 T3i13i2 sinx T3i13i1 cosx T3i13i 0 T3i3i2 0 T3i3i1 0 T3i3i 1 y T Example 81 Consider the plane frame shown in Fig 83 Given E 210 GPa A 2 102 m2 and I 5 105 m4 determine 1 the global stiffness matrix for the structure 2 the displacements and rotations at nodes 2 and 3 3 the reactions at nodes 1 and 4 4 the axial force shear force and bending moment in each element 5 the axial force diagram for each element 6 the shear force diagram for each element 7 the bending moment diagram for each element 4 1 2 3 4 m 3 m 12 kNm 20 kN Fig 83 Plane Frame with Three Elements for Example 81 144 8 The Plane Frame Element Solution Use the six steps outlined in Chap 1 to solve this problem using the plane frame element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into three elements and four nodes The units used in the MATLAB calculations are kN and meter Table 81 shows the element connectivity for this example Table 81 Element Connectivity for Example 81 Element Number Node i Node j 1 1 2 2 2 3 3 3 4 Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices k1 k2 and k3 are obtained by making calls to the MATLAB function PlaneFrameElementStiffness Each matrix has size 6 6 E210e6 E 210000000 A2e2 A 00200 I5e5 I 50000e005 82 MATLAB Functions Used 145 L13 L1 3 L24 L2 4 L33 L3 3 k1PlaneFrameElementStiffnessEAIL190 k1 10e006 00047 00000 00070 00047 00000 00070 00000 14000 00000 00000 14000 00000 00070 00000 00140 00070 00000 00070 00047 00000 00070 00047 00000 00070 00000 14000 00000 00000 14000 00000 00070 00000 00070 00070 00000 00140 k2PlaneFrameElementStiffnessEAIL20 k2 10e006 10500 0 0 10500 0 0 0 00020 00039 0 00020 00039 0 00039 00105 0 00039 00053 10500 0 0 10500 0 0 0 00020 00039 0 00020 00039 0 00039 00053 0 00039 00105 146 8 The Plane Frame Element k3PlaneFrameElementStiffnessEAIL3270 k3 10e006 00047 00000 00070 00047 00000 00070 00000 14000 00000 00000 14000 00000 00070 00000 00140 00070 00000 00070 00047 00000 00070 00047 00000 00070 00000 14000 00000 00000 14000 00000 00070 00000 00070 00070 00000 00140 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 12 12 Therefore to obtain K we first set up a zero matrix of size 12 12 then make three calls to the MATLAB function PlaneFrameAssemble since we have three plane frame elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros1212 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneFrameAssembleKk112 K 10e006 Columns 1 through 7 82 MATLAB Functions Used 147 00047 00000 00070 00047 00000 00070 0 00000 14000 00000 00000 14000 00000 0 00070 00000 00140 00070 00000 00070 0 00047 00000 00070 00047 00000 00070 0 00000 14000 00000 00000 14000 00000 0 00070 00000 00070 00070 00000 00140 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneFrameAssembleKk223 K 10e006 Columns 1 through 7 00047 00000 00070 00047 00000 00070 0 00000 14000 00000 00000 14000 00000 0 00070 00000 00140 00070 00000 00070 0 00047 00000 00070 10547 00000 00070 10500 00000 14000 00000 00000 14020 00039 0 148 8 The Plane Frame Element 00070 00000 00070 00070 00039 00245 0 0 0 0 10500 0 0 10500 0 0 0 0 00020 00039 0 0 0 0 0 00039 00053 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00020 00039 0 0 0 00039 00053 0 0 0 0 0 0 0 0 00020 00039 0 0 0 00039 00105 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneFrameAssembleKk334 K 10e006 Columns 1 through 7 00047 00000 00070 00047 00000 00070 0 00000 14000 00000 00000 14000 00000 0 00070 00000 00140 00070 00000 00070 0 00047 00000 00070 10547 00000 00070 10500 00000 14000 00000 00000 14020 00039 0 00070 00000 00070 00070 00039 00245 0 0 0 0 10500 0 0 10547 0 0 0 0 00020 00039 00000 82 MATLAB Functions Used 149 0 0 0 0 00039 00053 00070 0 0 0 0 0 0 00047 0 0 0 0 0 0 00000 0 0 0 0 0 0 00070 Columns 8 through 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00020 00039 0 0 0 00039 00053 0 0 0 00000 00070 00047 00000 00070 14020 00039 00000 14000 00000 00039 00245 00070 00000 00070 00000 00070 00047 00000 00070 14000 00000 00000 14000 00000 00000 00070 00070 00000 00140 Step 4 Applying the Boundary Conditions The matrix 82 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 103 47 00 70 47 00 70 0 0 0 0 0 0 00 14000 00 00 14000 00 0 0 0 0 0 0 70 00 140 70 00 70 0 0 0 0 0 0 47 00 70 10547 00 70 10500 0 0 0 0 0 00 14000 00 00 14020 39 0 20 39 0 0 0 70 00 70 70 39 245 0 39 53 0 0 0 0 0 0 10500 0 0 10547 00 70 47 00 70 0 0 0 0 20 39 00 14020 39 00 14000 00 0 0 0 0 39 53 70 39 245 70 00 70 0 0 0 0 0 0 47 00 70 47 00 70 0 0 0 0 0 0 00 14000 00 00 14000 00 0 0 0 0 0 0 70 00 70 70 00 140 U1x U1y φ1 U2x U2y φ2 U3x U3y φ3 U4x U4y φ4 F1x F1y M1 F2x F2y M2 F3x F3y M3 F4x F4y M4 87 150 8 The Plane Frame Element The boundary conditions for this problem are given as U1x U1y φ1 U4x U4y φ4 0 F2x 20 F2y M2 F3x F3y 0 M3 12 88 Inserting the above conditions into 87 we obtain 103 47 00 70 47 00 70 0 0 0 0 0 0 00 14000 00 00 14000 00 0 0 0 0 0 0 70 00 140 70 00 70 0 0 0 0 0 0 47 00 70 10547 00 70 10500 0 0 0 0 0 00 14000 00 00 14020 39 0 20 39 0 0 0 70 00 70 70 39 245 0 39 53 0 0 0 0 0 0 10500 0 0 10547 00 70 47 00 70 0 0 0 0 20 39 00 14020 39 00 14000 00 0 0 0 0 39 53 70 39 245 70 00 70 0 0 0 0 0 0 47 00 70 47 00 70 0 0 0 0 0 0 00 14000 00 00 14000 00 0 0 0 0 0 0 70 00 70 70 00 140 0 0 0 U2x U2y φ2 U3x U3y φ3 0 0 0 F1x F1y M1 20 0 0 0 0 12 F4x F4y M4 89 Step 5 Solving the Equations Solving the system of equations in 89 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 89 by extracting the submatrix in rows 4 to 9 and columns 4 to 9 Therefore we obtain 103 10547 00 70 10500 0 0 00 14020 39 0 20 39 70 39 245 0 39 53 10500 0 0 10547 00 70 0 20 39 00 14020 39 0 39 53 70 39 245 U2x U2y φ2 U3x U3y φ3 20 0 0 0 0 12 810 82 MATLAB Functions Used 151 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK4949 k 10e006 10547 00000 00070 10500 0 0 00000 14020 00039 0 00020 00039 00070 00039 00245 0 00039 00053 10500 0 0 10547 00000 00070 0 00020 00039 00000 14020 00039 0 00039 00053 00070 00039 00245 f20 0 0 0 0 12 f 20 0 0 0 0 12 ukf u 00038 00000 00008 00038 00000 00014 It is now clear that the horizontal and vertical displacements at node 2 are 00038 m and 00 m respectively the horizontal and vertical displacements at node 3 are 00038 m and 00 m respectively and the rotations at nodes 2 and 3 are 00008 rad counterclockwise and 00014 rad counterclockwise respectively 152 8 The Plane Frame Element Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 4 and the forces axial forces shears and moments in each plane frame element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 0 0 u 0 0 0 U 0 0 0 00038 00000 00008 00038 00000 00014 0 0 0 FKU F 121897 85865 210253 200000 00000 0 00000 0 120000 78103 85865 166286 Thus the horizontal reactions at nodes 1 and 4 are forces of 121897 kN to the right and 78103 kN to the right respectively the vertical reactions at nodes 1 and 4 are forces of 85865 kN upward and 85865 kN downward respectively and the moments at nodes 1 and 4 are moments of 210253 kNm clockwise and 82 MATLAB Functions Used 153 166286 kNm clockwise respectively It is clear that force equilibrium is satisfied Next we set up the element nodal displacement vectors u1 u2 and u3 then we calculate the element force vectors f1 f2 and f3 by making calls to the MATLAB function PlaneFrameElementForces u1U1 U2 U3 U4 U5 U6 u1 0 0 0 00038 00000 00008 u2U4 U5 U6 U7 U8 U9 u2 00038 00000 00008 00038 00000 00014 u3U7 U8 U9 U10 U11 U12 u3 00038 00000 00014 0 0 0 f1PlaneFrameElementForcesEAIL190u1 f1 85865 121897 154 8 The Plane Frame Element 210253 85865 121897 155438 f2PlaneFrameElementForcesEAIL20u2 f2 78103 85865 155438 78103 85865 188023 f3PlaneFrameElementForcesEAIL3270u3 f3 85865 78103 68023 85865 78103 166286 Therefore the forces for each element are given above Element 1 has an axial force of 85865 kN a shear force of 121897 kN and a bending moment of 210253 kNm at its left end while it has an axial force of 85865 kN a shear force of 121897 kN and a bending moment of 155438 kNm at its right end Element 2 has an axial force of 78103 kN a shear force of 85865 kN and a bending moment of 155438 kNm at its left end while it has an axial force of 78103 kN a shear force of 85865 kN and a bending moment of 188023 kNm at its right end Element 3 has an axial force of 85865 kN a shear force of 78103 kN and a bending moment of 68023 kNm at its left end while it has an axial force of 85865 kN a shear force of 78103 kN and a bending moment of 166286 kNm at its right end Finally we call the MATLAB functions PlaneFrameElementAxialDiagram PlaneFrameElementShearDiagram and PlaneFrameElementMomentDiagram to draw the axial force diagram shear force diagram and bending moment diagram respectively for each element This process is illustrated below 82 MATLAB Functions Used 155 PlaneFrameElementAxialDiagramf1L1 Fig 84 Axial Force Diagram for Element 1 PlaneFrameElementAxialDiagramf2L2 Fig 85 Axial Force Diagram for Element 2 156 8 The Plane Frame Element PlaneFrameElementAxialDiagramf3L3 Fig 86 Axial Force Diagram for Element 3 PlaneFrameElementShearDiagramf1L1 Fig 87 Shear Force Diagram for Element 1 82 MATLAB Functions Used 157 PlaneFrameElementShearDiagramf2L2 Fig 88 Shear Force Diagram for Element 2 PlaneFrameElementShearDiagramf3L3 Fig 89 Shear Force Diagram for Element 3 158 8 The Plane Frame Element PlaneFrameElementMomentDiagramf1L1 Fig 810 Bending Moment Diagram for Element 1 PlaneFrameElementMomentDiagramf2L2 Fig 811 Bending Moment Diagram for Element 2 82 MATLAB Functions Used 159 PlaneFrameElementMomentDiagramf3L3 Fig 812 Bending Moment Diagram for Element 3 Example 82 Consider the plane frame shown in Fig 813 Given E 200 GPa A 4 102 m2 and I 1 106 m4 determine 1 the global stiffness matrix for the structure 2 the displacements and rotation at node 2 3 the reactions at nodes 1 and 3 4 the axial force shear force and bending moment in each element 5 the axial force diagram for each element 6 the shear force diagram for each element 7 the bending moment diagram for each element 3 m 2 m 8 kNm 4 m 1 2 3 Fig 813 Plane Frame with Distributed Load for Example 82 160 8 The Plane Frame Element Solution Use the six steps outlined in Chap 1 to solve this problem using the plane frame element We need first to replace the distributed loading on element 2 by equivalent nodal loads This is performed as follows for element 2 with a uniformly distributed load The resulting plane frame with equivalent nodal loads is shown in Fig 814 p2 0 wL 2 wL2 12 0 wL 2 wL2 12 0 16 kN 10667 kNm 0 16 kN 10667 kNm 811 1 2 3 1067 kNm 16 kN 1067 kNm 16 kN 3 m 4 m 2 m Fig 814 Equivalent Nodal Loads for Example 82 Step 1 Discretizing the Domain The domain is already subdivided into two elements and three nodes The units used in the MATLAB calculations are kN and meterTable 82 shows the element connectivity for this example Table 82 Element Connectivity for Example 82 Element Number Node i Node j 1 1 2 2 2 3 82 MATLAB Functions Used 161 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function PlaneFrameElementStiffness Each matrix has size 6 6 E200e6 E 200000000 A4e2 A 00400 I1e6 I 10000e006 L1PlaneFrameElementLength0320 L1 36056 L24 L2 4 theta1360atan32180pi theta1 3036901 theta20 theta2 0 162 8 The Plane Frame Element k1PlaneFrameElementStiffnessEAIL1theta1 k1 10e006 06827 10240 00001 06827 10240 00001 10240 15361 00001 10240 15361 00001 00001 00001 00002 00001 00001 00001 06827 10240 00001 06827 10240 00001 10240 15361 00001 10240 15361 00001 00001 00001 00001 00001 00001 00002 k2PlaneFrameElementStiffnessEAIL2theta2 k2 10e006 20000 0 0 20000 0 0 0 00000 00001 0 00000 00001 0 00001 00002 0 00001 00001 20000 0 0 20000 0 0 0 00000 00001 0 00000 00001 0 00001 00001 0 00001 00002 Step 3 Assembling the Global Stiffness Matrix Since the structure has three nodes the size of the global stiffness matrix is 9 9 Therefore to obtain K we first set up a zero matrix of size 9 9 then make two calls to the MATLAB function PlaneFrameAssemble since we have two plane frame elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros99 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 82 MATLAB Functions Used 163 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneFrameAssembleKk112 K 10e006 Columns 1 through 7 06827 10240 00001 06827 10240 00001 0 10240 15361 00001 10240 15361 00001 0 00001 00001 00002 00001 00001 00001 0 06827 10240 00001 06827 10240 00001 0 10240 15361 00001 10240 15361 00001 0 00001 00001 00001 00001 00001 00002 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneFrameAssembleKk223 K 10e006 164 8 The Plane Frame Element Columns 1 through 7 06827 10240 00001 06827 10240 00001 0 10240 15361 00001 10240 15361 00001 0 00001 00001 00002 00001 00001 00001 0 06827 10240 00001 26827 10240 00001 20000 10240 15361 00001 10240 15361 00000 0 00001 00001 00001 00001 00000 00004 0 0 0 0 20000 0 0 20000 0 0 0 0 00000 00001 0 0 0 0 0 00001 00001 0 Columns 8 through 9 0 0 0 0 0 0 0 0 00000 00001 00001 00001 0 0 00000 00001 00001 00002 Step 4 Applying the Boundary Conditions The matrix 82 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step Note that we only show the numbers to two decimal places although the MATLAB calculations are performed using at least four decimal places 103 6827 10240 01 6827 10240 01 0 0 0 10240 15361 01 10240 15361 01 0 0 0 01 01 02 01 01 01 0 0 0 6827 10240 01 26827 10240 01 20000 0 0 10240 15361 01 10240 15361 00 0 00 01 01 01 01 01 00 04 0 01 01 0 0 0 20000 0 0 20000 0 0 0 0 0 0 00 01 0 00 01 0 0 0 0 01 01 0 01 02 82 MATLAB Functions Used 165 U1x U1y φ1 U2x U2y φ2 U3x U3y φ3 F1x F1y M1 F2x F2y M2 F3x F3y M3 812 The boundary conditions for this problem are given as U1x U1y φ1 U3x U3y φ3 0 F2x 0 F2y 16 M2 10667 813 Inserting the above conditions into 812 we obtain 103 6827 10240 01 6827 10240 01 0 0 0 10240 15361 01 10240 15361 01 0 0 0 01 01 02 01 01 01 0 0 0 6827 10240 01 26827 10240 01 20000 0 0 10240 15361 01 10240 15361 00 0 00 01 01 01 01 01 00 04 0 01 01 0 0 0 20000 0 0 20000 0 0 0 0 0 0 00 01 0 00 01 0 0 0 0 01 01 0 01 02 0 0 0 U2x U2y φ2 0 0 0 F1x F1y M1 0 16 10667 F3x F3y M3 814 Step 5 Solving the Equations Solving the system of equations in 814 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 814 by extracting the submatrix in rows 4 to 6 and columns 4 to 6 Therefore we obtain 166 8 The Plane Frame Element 103 26827 10240 01 10240 15361 00 01 00 04 U2x U2y φ2 0 16 10667 815 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK4646 k 10e006 26827 10240 00001 10240 15361 00000 00001 00000 00004 f0 16 10667 f 0 160000 106670 ukf u 00000 00000 00253 It is now clear that the horizontal and vertical displacements at node 2 are 00000 m and 00000 m respectively both almost zero while the rotation at node 2 is 00253 rad clockwise Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 3 and the forces axial forces shears and moments in each plane frame element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F 82 MATLAB Functions Used 167 U0 0 0 u 0 0 0 U 0 0 0 00000 00000 00253 0 0 0 FKU F 122064 141031 28039 00000 160000 106670 122064 18969 25295 Thus the horizontal and vertical reactions at node 1 are forces of 122064 kN to the left and 141031 kN upward respectively while the horizontal and verti cal reactions at node 3 are forces of 122064 kN to the right and 18969 kN up ward respectively The moments at nodes 1 and 3 are 28039 kNm clockwise and 25295 kNm clockwise respectively It is clear that force equilibrium is satisfied Next we set up the element nodal displacement vectors u1 and u2 then we calcu late the element force vectors f1 and f2 by making calls to the MATLAB function PlaneFrameElementForces u1U1 U2 U3 U4 U5 U6 u1 0 0 0 00000 00000 00253 168 8 The Plane Frame Element u2U4 U5 U6 U7 U8 U9 u2 00000 00000 00253 0 0 0 f1PlaneFrameElementForcesEAIL1theta1u1 f1 185054 23333 28039 185054 23333 56090 f2PlaneFrameElementForcesEAIL2theta2u2 f2 122064 18969 50580 122064 18969 25295 Note that the forces for element 2 need to be modified because of the distributed load In order to obtain the correct forces for element 2 we need to subtract from f2 the vector of equivalent nodal loads given in 811This is performed using MATLAB as follows f2f20 16 10667 0 16 10667 f2 122064 141031 82 MATLAB Functions Used 169 56090 122064 178969 131965 Therefore the forces for each element are given above Element 1 has an ax ial force of 185054 kN a shear force of 23333 kN and a bending moment of 28039 kNm at its left end while it has an axial force of 185054 kN a shear force of 23333 kN and a bending moment of 56090 kNm at its right end Element 2 has an axial force of 122064 kN a shear force of 141031 kN and a bending moment of 56090 kNm at its left end while it has an axial force of 122064 kN a shear force of 178969 kN and a bending moment of 131965 kNm at its right end FinallywecalltheMATLABfunctionsPlaneFrameElementAxialDiagramPlane FrameElementShearDiagram and PlaneFrameElementMomentDiagram to draw the axial force diagram shear force diagram and bending moment diagram respectively for each element This process is illustrated below PlaneFrameElementAxialDiagramf1L1 Fig 815 Axial Force Diagram for Element 1 170 8 The Plane Frame Element PlaneFrameElementAxialDiagramf2L2 Fig 816 Axial Force Diagram for Element 2 PlaneFrameElementShearDiagramf1L1 Fig 817 Shear Force Diagram for Element 1 82 MATLAB Functions Used 171 PlaneFrameElementShearDiagramf2L2 Fig 818 Shear Force Diagram for Element 2 PlaneFrameElementMomentDiagramf1L1 Fig 819 Bending Moment Diagram for Element 1 172 8 The Plane Frame Element PlaneFrameElementMomentDiagramf2L2 Fig 820 Bending Moment Diagram for Element 2 Problems Problem 81 Consider the plane frame shown in Fig 821 Given E 210 GPa A 4102 m2 and I 4 106 m4 determine 1 the global stiffness matrix for the structure 2 the displacements and rotation at node 2 3 the horizontal displacement and rotation at node 3 4 the reactions at nodes 1 and 3 5 the axial force shear force and bending moment in each element 6 the axial force diagram for each element 7 the shear force diagram for each element 8 the bending moment diagram for each element 82 MATLAB Functions Used 173 1 2 3 4 m 4 m 15 kNm 20 kN Fig 821 Plane Frame with Two Elements for Problem 81 Problem 82 Consider the plane frame shown in Fig 822 Given E 210 GPa A 1102 m2 and I 9 105 m4 determine 1 the global stiffness matrix for the structure 2 the displacements and rotations at nodes 2 and 3 3 the reactions at nodes 1 and 4 4 the axial force shear force and bending moment in each element 5 the axial force diagram for each element 6 the shear force diagram for each element 7 the bending moment diagram for each element 4 1 2 3 20 kN 5 kNm 2 m 5 m 2 m 3 m Fig 822 Plane Frame with Distributed Load for Problem 82 Problem 83 Consider the structure composed of a beam and a spring as shown in Fig 823 Given E 70 GPa A 1 102 m2 I 1 105 m4 and k 5000 kNm determine 1 the global stiffness matrix for the structure 2 the displacements and rotation at node 1 174 8 The Plane Frame Element 3 the reactions at nodes 2 and 3 4 the axial force shear force and bending moment in the beam 5 the force in the spring 6 the axial force diagram for the beam 7 the shear force diagram for the beam 8 the bending moment diagram for the beam Hint Use a plane frame element for the beam so as to include axial deformation effects Also use a plane truss element for the spring so as to include the angle of inclination in this case determine values for E and A for the spring using the value of k given and the length of the spring k 1 2 3 10 kN 4 m 3 m Fig 823 Plane Frame with a Spring for Problem 83 9 The Grid Element 91 Basic Equations The grid element is a twodimensional finite element with both local and global coordinates The grid element has modulus of elasticity E shear modulus of elasticity G moment of inertia I torsional constant J and length L Each grid element has two nodes and is inclined with an angle θ measured counterclockwise from the positive global X axis as shown in Fig 91 Let C cosθ and S sinθ In this case the element stiffness matrix is given by the following matrix see 1 and 18 k RT kR 91 where the rotation matrix R and the stiffness matrix k are given by k 12EI L3 0 6EI L2 12EI L3 0 6EI L2 0 GJ L 0 0 GJ L 0 6EI L2 0 4EI L 6EI L2 0 2EI L 12EI L3 0 6EI L2 12EI L3 0 6EI L2 0 GJ L 0 0 GJ L 0 6EI L2 0 2EI L 6EI L2 0 4EI L 92 R 1 0 0 0 0 0 0 C S 0 0 0 0 S C 0 0 0 0 0 0 1 0 0 0 0 0 0 C S 0 0 0 0 S C 93 176 9 The Grid Element j i x Y Z X θ Fig 91 The Grid Element It is clear that the grid element has six degrees of freedom three at each node one displacement and two rotations Consequently for a structure with n nodes the global stiffness matrix K will be of size 3n 3n since we have three degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function GridAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F 94 where U is the global nodal displacement vector and F is the global nodal force vectorAt this step the boundary conditions are applied manually to the vectors U and F Then the matrix 94 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the nodal force vector is obtained for each element as follows f kR u 95 where f is the 6 1 nodal force vector in the element and u is the 6 1 element displacement vector The first element in each vector u is the transverse displacement while the second and third elements are the rotations about the X and Z axes respectively at the first node while the fourth element in each vector u is the transverse displacement and the fifth and sixth elements are the rotations about the X and Z axes respectively at the second node 92 MATLAB Functions Used The four MATLAB functions used for the grid element are GridElementLengthx1 y1 x2 y2 This function returns the element length given the coordinates of the first node x1 y1 and the coordinates of the second node x2 y2 92 MATLAB Functions Used 177 GridElementStiffnessE G I J L theta This function calculates the element stiffness matrix for each grid element with modulus of elasticity E shear modulus of elasticity G moment of inertia I torsional constant J and length L It returns the 6 6 element stiffness matrix k GridAssembleK k i j This function assembles the element stiffness matrix k of the grid element joining nodes i and j into the global stiffness matrix K It returns the 3n 3n global stiffness matrix K every time an element is assembled GridElementForcesE G I J L theta u This function calculates the element force vector using the modulus of elasticity E shear modulus of elasticity G moment of inertia I torsional constant J length L and the element displacement vector u It returns the 6 1 element force vector f The following is a listing of the MATLAB source code for each function function y GridElementLengthx1y1x2y2 GridElementLength This function returns the length of the grid element whose first node has coordinates x1y1 and second node has coordinates x2y2 y sqrtx2x1 x2x1 y2y1 y2y1 function y GridElementStiffnessEGIJLtheta GridElementStiffness This function returns the element stiffness matrix for a grid element with modulus of elasticity E shear modulus of elasticity G moment of inertia I torsional constant J length L and angle theta in degrees The size of the element stiffness matrix is 6 x 6 x thetapi180 C cosx S sinx w1 12EILLL w2 6EILL w3 GJL w4 4EIL w5 2EIL kprime w1 0 w2 w1 0 w2 0 w3 0 0 w3 0 w2 0 w4 w2 0 w5 w1 0 w2 w1 0 w2 0 w3 0 0 w3 0 w2 0 w5 w2 0 w4 R 1 0 0 0 0 0 0 C S 0 0 0 0 S C 0 0 0 0 0 0 1 0 0 0 0 0 0 C S 0 0 0 0 S C y RkprimeR 178 9 The Grid Element function y GridAssembleKkij GridAssemble This function assembles the element stiffness matrix k of the grid element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K3i23i2 K3i23i2 k11 K3i23i1 K3i23i1 k12 K3i23i K3i23i k13 K3i23j2 K3i23j2 k14 K3i23j1 K3i23j1 k15 K3i23j K3i23j k16 K3i13i2 K3i13i2 k21 K3i13i1 K3i13i1 k22 K3i13i K3i13i k23 K3i13j2 K3i13j2 k24 K3i13j1 K3i13j1 k25 K3i13j K3i13j k26 K3i3i2 K3i3i2 k31 K3i3i1 K3i3i1 k32 K3i3i K3i3i k33 K3i3j2 K3i3j2 k34 K3i3j1 K3i3j1 k35 K3i3j K3i3j k36 K3j23i2 K3j23i2 k41 K3j23i1 K3j23i1 k42 K3j23i K3j23i k43 K3j23j2 K3j23j2 k44 K3j23j1 K3j23j1 k45 K3j23j K3j23j k46 K3j13i2 K3j13i2 k51 K3j13i1 K3j13i1 k52 K3j13i K3j13i k53 K3j13j2 K3j13j2 k54 K3j13j1 K3j13j1 k55 K3j13j K3j13j k56 K3j3i2 K3j3i2 k61 K3j3i1 K3j3i1 k62 K3j3i K3j3i k63 K3j3j2 K3j3j2 k64 K3j3j1 K3j3j1 k65 K3j3j K3j3j k66 y K function y GridElementForcesEGIJLthetau GridElementForces This function returns the element force vector given the modulus of elasticity E the shear modulus of elasticity G the moment of inertia I the torsional constant J the length L the angle theta in degrees and the element nodal displacement vector u 92 MATLAB Functions Used 179 x thetapi180 C cosx S sinx w1 12EILLL w2 6EILL w3 GJL w4 4EIL w5 2EIL kprime w1 0 w2 w1 0 w2 0 w3 0 0 w3 0 w2 0 w4 w2 0 w5 w1 0 w2 w1 0 w2 0 w3 0 0 w3 0 w2 0 w5 w2 0 w4 R 1 0 0 0 0 0 0 C S 0 0 0 0 S C 0 0 0 0 0 0 1 0 0 0 0 0 0 C S 0 0 0 0 S C y kprimeR u Example 91 Consider the grid shown in Fig 92 Given E 210 GPa G 84 GPa I 20 105 m4 J 5 105 m4 and P 20 kN determine 1 the global stiffness matrix for the structure 2 the displacement and rotations at node 1 3 the reactions at nodes 2 3 and 4 4 the forces and moments in each element Z P Y X 4 1 2 3 4 m 4 m Fig 92 Grid with Three Elements for Example 91 Solution Use the six steps outlined in Chap 1 to solve this problem using the grid element 180 9 The Grid Element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into three elements and four nodes The units used in the MATLAB calculations are kN and meter Table 91 shows the element connectivity for this example Table 91 Element Connectivity for Example 91 Element Number Node i Node j 1 1 2 2 1 3 3 1 4 Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices k1 k2 and k3 are obtained by making calls to the MATLAB function GridElementStiffness Each matrix has size 6 6 E210e6 E 210000000 G84e6 G 84000000 I20e5 I 20000e004 J5e5 J 50000e005 92 MATLAB Functions Used 181 L14 L1 4 L2GridElementLength0044 L2 56569 L34 L3 4 theta1180 theta1 180 theta218045 theta2 135 theta390 theta3 90 k1GridElementStiffnessEGIJL1theta1 k1 10e004 182 9 The Grid Element 07875 00000 15750 07875 00000 15750 00000 01050 00000 00000 01050 00000 15750 00000 42000 15750 00000 21000 07875 00000 15750 07875 00000 15750 00000 01050 00000 00000 01050 00000 15750 00000 21000 15750 00000 42000 k2GridElementStiffnessEGIJL2theta2 k2 10e004 02784 05568 05568 02784 05568 05568 05568 15220 14478 05568 07053 07796 05568 14478 15220 05568 07796 07053 02784 05568 05568 02784 05568 05568 05568 07053 07796 05568 15220 14478 05568 07796 07053 05568 14478 15220 k3GridElementStiffnessEGIJL3theta3 k3 10e004 07875 15750 00000 07875 15750 00000 15750 42000 00000 15750 21000 00000 00000 00000 01050 00000 00000 01050 07875 15750 00000 07875 15750 00000 15750 21000 00000 15750 42000 00000 00000 00000 01050 00000 00000 01050 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 12 12 Therefore to obtain K we first set up a zero matrix of size 12 12 then make three calls to the MATLAB function GridAssemble since we have three grid elements in the structure Each call to the function will assemble one element The following are the MATLAB commands 92 MATLAB Functions Used 183 Kzeros1212 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KGridAssembleKk112 K 10e004 Columns 1 through 7 07875 00000 15750 07875 00000 15750 0 00000 01050 00000 00000 01050 00000 0 15750 00000 42000 15750 00000 21000 0 07875 00000 15750 07875 00000 15750 0 00000 01050 00000 00000 01050 00000 0 15750 00000 21000 15750 00000 42000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 184 9 The Grid Element 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KGridAssembleKk213 K 10e004 Columns 1 through 7 10659 05568 21318 07875 00000 15750 02784 05568 16270 14478 00000 01050 00000 05568 21318 14478 57220 15750 00000 21000 05568 07875 00000 15750 07875 00000 15750 0 00000 01050 00000 00000 01050 00000 0 15750 00000 21000 15750 00000 42000 0 02784 05568 05568 0 0 0 02784 05568 07053 07796 0 0 0 05568 05568 07796 07053 0 0 0 05568 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 12 05568 05568 0 0 0 07053 07796 0 0 0 07796 07053 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 05568 05568 0 0 0 15220 14478 0 0 0 14478 15220 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 92 MATLAB Functions Used 185 KGridAssembleKk314 K 10e004 Columns 1 through 7 18534 21318 21318 07875 00000 15750 02784 21318 58270 14478 00000 01050 00000 05568 21318 14478 58270 15750 00000 21000 05568 07875 00000 15750 07875 00000 15750 0 00000 01050 00000 00000 01050 00000 0 15750 00000 21000 15750 00000 42000 0 02784 05568 05568 0 0 0 02784 05568 07053 07796 0 0 0 05568 05568 07796 07053 0 0 0 05568 07875 15750 00000 0 0 0 0 15750 21000 00000 0 0 0 0 00000 00000 01050 0 0 0 0 Columns 8 through 12 05568 05568 07875 15750 00000 07053 07796 15750 21000 00000 07796 07053 00000 00000 01050 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 05568 05568 0 0 0 15220 14478 0 0 0 14478 15220 0 0 0 0 0 07875 15750 00000 0 0 15750 42000 00000 0 0 00000 00000 01050 Step 4 Applying the Boundary Conditions The matrix 94 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 186 9 The Grid Element 103 1853 2132 2132 788 00 1575 278 557 557 788 1575 00 2132 5827 1448 00 105 00 557 705 780 1575 2100 00 2132 1448 5827 1575 00 2100 557 780 705 00 00 105 788 00 1575 788 00 1575 0 0 0 0 0 0 00 105 00 00 105 00 0 0 0 0 0 0 1575 00 2100 1575 00 4200 0 0 0 0 0 0 278 557 557 0 0 0 278 557 557 0 0 0 557 705 780 0 0 0 557 1522 1448 0 0 0 557 780 705 0 0 0 557 1448 1522 0 0 0 788 1575 00 0 0 0 0 0 0 788 1575 00 1575 2100 00 0 0 0 0 0 0 1575 4200 00 00 00 105 0 0 0 0 0 0 00 00 105 U1y φ1x φ1z U2y φ2x φ2z U3y φ3x φ3z U4y φ4x φ4z F1y M1x M1z F2y M2x M2z F3y M3x M3z F4y M4x M4z 96 The boundary conditions for this problem are given as F1y 20 M1x M1z 0 U2y φ2x φ2z U3y φ3x φ3z U4y φ4x φ4z 0 97 Inserting the above conditions into 96 we obtain 103 1853 2132 2132 788 00 1575 278 557 557 788 1575 00 2132 5827 1448 00 105 00 557 705 780 1575 2100 00 2132 1448 5827 1575 00 2100 557 780 705 00 00 105 788 00 1575 788 00 1575 0 0 0 0 0 0 00 105 00 00 105 00 0 0 0 0 0 0 1575 00 2100 1575 00 4200 0 0 0 0 0 0 278 557 557 0 0 0 278 557 557 0 0 0 557 705 780 0 0 0 557 1522 1448 0 0 0 557 780 705 0 0 0 557 1448 1522 0 0 0 788 1575 00 0 0 0 0 0 0 788 1575 00 1575 2100 00 0 0 0 0 0 0 1575 4200 00 00 00 105 0 0 0 0 0 0 00 00 105 92 MATLAB Functions Used 187 U1y φ1x φ1z 0 0 0 0 0 0 0 0 0 20 0 0 F2y M2x M2z F3y M3x M3z F4y M4x M4z 98 Step 5 Solving the Equations Solving the system of equations in 98 will be performed by partitioning manu ally and Gaussian elimination with MATLAB First we partition equation 98 by extracting the submatrix in rows 1 to 3 and columns 1 to 3 Therefore we obtain 103 1853 2132 2132 2132 5827 1448 2132 1448 5827 U1y φ1x φ1z 20 0 0 99 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK1313 k 10e004 18534 21318 21318 21318 58270 14478 21318 14478 58270 f20 0 0 f 20 0 0 ukf 188 9 The Grid Element u 00033 00010 00010 It is now clear that the vertical displacement at node 1 is 00033 m and the rota tions at node 1 along the X and Z axes are 00010 rad and 00010 rad respectively The symmetry in the results in this problem is clear Step 6 Postprocessing In this step we obtain the reactions at nodes 2 3 and 4 and the forces and moments in each grid element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F Uu 0 0 0 0 0 0 0 0 0 U 00033 00010 00010 0 0 0 0 0 0 0 0 0 FKU F 200000 00000 00000 107937 10189 317764 15874 40299 92 MATLAB Functions Used 189 40299 107937 317764 10189 Thus the vertical reaction and moments at node 2 are 107937 kN 10189 kNm and 317764 kNm The vertical reaction and moments at node 3 are 15874 kN 40299 kNm and 40299 kNm The vertical reaction and moments at node 4 are 107937 kN 317764 kNm and 10189 kNm It is clear that force equilibrium is satisfied Next we set up the element nodal displacement vectors u1 u2 and u3 then we calculate the element force vectors f1 f2 and f3 by making calls to the MATLAB function GridElementForces u1U1 U2 U3 U4 U5 U6 u1 00033 00010 00010 0 0 0 u2U1 U2 U3 U7 U8 U9 u2 00033 00010 00010 0 0 0 u3U1 U2 U3 U10 U11 U12 u3 00033 00010 00010 0 0 0 190 9 The Grid Element f1GridElementForcesEGIJL1theta1u1 f1 107937 10189 113984 107937 10189 317764 f2GridElementForcesEGIJL2theta2u2 f2 15874 0 146788 15874 0 56992 f3GridElementForcesEGIJL3theta3u3 f3 107937 10189 113984 107937 10189 317764 Therefore the forces for each element are given above Element 1 has a force of 107937 kN and moments of 10189 kNm and 113984 kNm at its left end while it has a force of 107937 kN and moments of 10189 kNm and 317764 kNm at its right end Element 2 has a force of 15874 kN and moments of 0 kNm and 146788 kNm at its left end while it has a force of 15874 kN and moments of 0 kNm and 56992 kNm at its right end Element 3 has a force of 107937 kN and moments of 10189 kNm and 113984 kNm at its left end while it has a force of 107937 kN and moments of 10189 kNm and 317764 kNm at its right end 92 MATLAB Functions Used 191 Problems Problem 91 Consider the grid shown in Fig 93 Given E 210 GPa G 84 GPa I 20 105 m4 and J 5 105 m4 determine 1 the global stiffness matrix for the structure 2 the displacement and rotations at node 1 3 the reactions at nodes 2 and 3 4 the forces and moments in each element Z Y X 1 3 2 4 m 3 m 10 kN 3 m Fig 93 Gird with Two Elements for Problem 91 10 The Space Frame Element 101 Basic Equations The space frame element is a threedimensional finite element with both local and global coordinatesThe space frame element has modulus of elasticity E shear modu lus of elasticity G crosssectional area A moments of inertia Ix and Iy polar moment of inertia J and length L Each space frame element has two nodes and is inclined with angles θXxθY x and θZx measured from the global X Y and Z axes respec tively to the local x axis as shown in Fig 101 In this case the element stiffness matrix is given by the following matrix see 1 and 18 k RT kR 101 where the rotation matrix R and the stiffness matrix k are given by k EA L 0 0 0 0 0 EA L 0 0 0 0 0 0 12EIz L3 0 0 0 6EIz L2 0 12EIz L3 0 0 0 6EIz L2 0 0 12EIy L3 0 6EIy L2 0 0 0 12EIy L3 0 6EIy L2 0 0 0 0 GJ L 0 0 0 0 0 GJ L 0 0 0 0 6EIy L2 0 4EIy L 0 0 0 6EIy L2 0 2EIy L 0 0 6EIz L2 0 0 0 4EIz L 0 6EIz L2 0 0 0 2EIz L EA L 0 0 0 0 0 EA L 0 0 0 0 0 0 12EIz L3 0 0 0 6EIz L2 0 12EIz L3 0 0 0 6EIz L2 0 0 12EIy L3 0 6EIy L2 0 0 0 12EIy L3 0 6EIy L2 0 0 0 0 GJ L 0 0 0 0 0 GJ L 0 0 0 0 6EIy L2 0 2EIy L 0 0 0 6EIy L2 0 4EIy L 0 0 6EIz L2 0 0 0 2EIz L 0 6EIz L2 0 0 0 4EIz L 102 194 10 The Space Frame Element R r 0 0 0 0 r 0 0 0 0 r 0 0 0 0 r 103 where r is the 3 3 matrix of direction cosines given as follows r CXx CY x CZx CXy CY y CZy CXz CY z CZz 104 where CXx cos θXx CY x cos θY x etc L j x Y i Z X Fig 101 The Space Frame Element It is clear that the space frame element has twelve degrees of freedom six at each node three displacements and three rotations Consequently for a structure with n nodes the global stiffness matrix K will be of size 6n6n since we have six degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function SpaceFrameAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F 105 where U is the global nodal displacement vector and F is the global nodal force vectorAt this step the boundary conditions are applied manually to the vectors U and F Then the matrix 105 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the nodal force vector is obtained for each element as follows f kR u 106 where f is the 12 1 nodal force vector in the element and u is the 12 1 element displacement vector 102 MATLAB Functions Used 195 The first second and third elements in each vector u are the three displacements while the fourth fifth and sixth elements are the three rotations respectively at the first node while the seventh eighth and ninth elements in each vector u are the three displacements while the tenth eleventh and twelvth elements are the three rotations respectively at the second node 102 MATLAB Functions Used The ten MATLAB functions used for the space frame element are SpaceFrameElementLengthx1 y1 z1 x2 y2 z2 This function returns the element length given the coordinates of the first node x1 y1 z1 and the coordinates of the second node x2 y2 z2 SpaceFrameElementStiffnessE G A Iy Iz J x1 y1 z1 x2 y2 z2 This function calculates the element stiffness matrix for each space frame element with modulus of elasticity E shear modulus of elasticity G crosssectional area A moments of inertia Ix and Iy polar moment of inertia J coordinates x1 y1 z1 for the first node and coordinates x2 y2 z2 for the second node It returns the 12 12 element stiffness matrix k SpaceFrameAssembleK k i j This function assembles the element stiffness matrix k of the space frame element joining nodes i and j into the global stiffness matrix K It returns the 6n 6n global stiffness matrix K every time an element is assembled SpaceFrameElementForcesE G A Iy Iz J x1 y1 z1 x2 y2 z2 u This function calculates the element force vector using the modulus of elasticity E shear modulus of elasticity G crosssectional area A moments of inertia Ix and Iy polar moment of inertia J coordinates x1 y1 z1 for the first node coordinates x2 y2 z2 for the second node and the element displacement vector u It returns the 12 1 element force vector f SpaceFrameElementAxialDiagramf L This function plots the axial force diagram for the element with nodal force vector f and length L SpaceFrameElementShearZDiagramf L This function plots the shear force along the Z axis diagram for the element with nodal force vector f and length L SpaceFrameElementShearYDiagramf L This function plots the shear force along the Y axis diagram for the element with nodal force vector f and length L SpaceFrameElementTorsionDiagramfLThisfunctionplotsthetorsionalmoment diagram for the element with nodal force vector f and length L 196 10 The Space Frame Element SpaceFrameElementMomentZDiagramf L This function plots the bending mo ment along the Z axis diagram for the element with nodal force vector f and length L SpaceFrameElementMomentYDiagramf L This function plots the bending mo ment along the Y axis diagram for the element with nodal force vector f and length L The following is a listing of the MATLAB source code for each function function y SpaceFrameElementLengthx1y1z1x2y2z2 SpaceFrameElementLength This function returns the length of the space frame element whose first node has coordinates x1y1z1 and second node has coordinates x2y2z2 y sqrtx2x1x2x1 y2y1y2y1 z2z1z2z1 function y SpaceFrameElementStiffnessEGAIyIzJx1y1z1x2y2z2 SpaceFrameElementStiffness This function returns the element stiffness matrix for a space frame element with modulus of elasticity E shear modulus of elasticity G cross sectional area A moments of inertia Iy and Iz torsional constant J coordinates x1y1z1 for the first node and coordinates x2y2z2 for the second node The size of the element stiffness matrix is 12 x 12 L sqrtx2x1x2x1 y2y1y2y1 z2z1z2z1 w1 EAL w2 12EIzLLL w3 6EIzLL w4 4EIzL w5 2EIzL w6 12EIyLLL w7 6EIyLL w8 4EIyL w9 2EIyL w10 GJL kprime w1 0 0 0 0 0 w1 0 0 0 0 0 0 w2 0 0 0 w3 0 w2 0 0 0 w3 0 0 w6 0 w7 0 0 0 w6 0 w7 0 0 0 0 w10 0 0 0 0 0 w10 0 0 0 0 w7 0 w8 0 0 0 w7 0 w9 0 0 w3 0 0 0 w4 0 w3 0 0 0 w5 w1 0 0 0 0 0 w1 0 0 0 0 0 0 w2 0 0 0 w3 0 w2 0 0 0 w3 0 0 w6 0 w7 0 0 0 w6 0 w7 0 102 MATLAB Functions Used 197 0 0 0 w10 0 0 0 0 0 w10 0 0 0 0 w7 0 w9 0 0 0 w7 0 w8 0 0 w3 0 0 0 w5 0 w3 0 0 0 w4 if x1 x2 y1 y2 if z2 z1 Lambda 0 0 1 0 1 0 1 0 0 else Lambda 0 0 1 0 1 0 1 0 0 end else CXx x2x1L CYx y2y1L CZx z2z1L D sqrtCXxCXx CYxCYx CXy CYxD CYy CXxD CZy 0 CXz CXxCZxD CYz CYxCZxD CZz D Lambda CXx CYx CZx CXy CYy CZy CXz CYz CZz end R Lambda zeros3 zeros3 zeros3 zeros3 Lambda zeros3 zeros3 zeros3 zeros3 Lambda zeros3 zeros3 zeros3 zeros3 Lambda y RkprimeR function y SpaceFrameAssembleKkij SpaceFrameAssemble This function assembles the element stiffness matrix k of the space frame element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K6i56i5 K6i56i5 k11 K6i56i4 K6i56i4 k12 K6i56i3 K6i56i3 k13 K6i56i2 K6i56i2 k14 K6i56i1 K6i56i1 k15 K6i56i K6i56i k16 K6i56j5 K6i56j5 k17 K6i56j4 K6i56j4 k18 K6i56j3 K6i56j3 k19 K6i56j2 K6i56j2 k110 K6i56j1 K6i56j1 k111 K6i56j K6i56j k112 K6i46i5 K6i46i5 k21 K6i46i4 K6i46i4 k22 K6i46i3 K6i46i3 k23 K6i46i2 K6i46i2 k24 198 10 The Space Frame Element K6i46i1 K6i46i1 k25 K6i46i K6i46i k26 K6i46j5 K6i46j5 k27 K6i46j4 K6i46j4 k28 K6i46j3 K6i46j3 k29 K6i46j2 K6i46j2 k210 K6i46j1 K6i46j1 k211 K6i46j K6i46j k212 K6i36i5 K6i36i5 k31 K6i36i4 K6i36i4 k32 K6i36i3 K6i36i3 k33 K6i36i2 K6i36i2 k34 K6i36i1 K6i36i1 k35 K6i36i K6i36i k36 K6i36j5 K6i36j5 k37 K6i36j4 K6i36j4 k38 K6i36j3 K6i36j3 k39 K6i36j2 K6i36j2 k310 K6i36j1 K6i36j1 k311 K6i36j K6i36j k312 K6i26i5 K6i26i5 k41 K6i26i4 K6i26i4 k42 K6i26i3 K6i26i3 k43 K6i26i2 K6i26i2 k44 K6i26i1 K6i26i1 k45 K6i26i K6i26i k46 K6i26j5 K6i26j5 k47 K6i26j4 K6i26j4 k48 K6i26j3 K6i26j3 k49 K6i26j2 K6i26j2 k410 K6i26j1 K6i26j1 k411 K6i26j K6i26j k412 K6i16i5 K6i16i5 k51 K6i16i4 K6i16i4 k52 K6i16i3 K6i16i3 k53 K6i16i2 K6i16i2 k54 K6i16i1 K6i16i1 k55 K6i16i K6i16i k56 K6i16j5 K6i16j5 k57 K6i16j4 K6i16j4 k58 K6i16j3 K6i16j3 k59 K6i16j2 K6i16j2 k510 K6i16j1 K6i16j1 k511 K6i16j K6i16j k512 K6i6i5 K6i6i5 k61 K6i6i4 K6i6i4 k62 K6i6i3 K6i6i3 k63 K6i6i2 K6i6i2 k64 K6i6i1 K6i6i1 k65 K6i6i K6i6i k66 K6i6j5 K6i6j5 k67 K6i6j4 K6i6j4 k68 K6i6j3 K6i6j3 k69 102 MATLAB Functions Used 199 K6i6j2 K6i6j2 k610 K6i6j1 K6i6j1 k611 K6i6j K6i6j k612 K6j56i5 K6j56i5 k71 K6j56i4 K6j56i4 k72 K6j56i3 K6j56i3 k73 K6j56i2 K6j56i2 k74 K6j56i1 K6j56i1 k75 K6j56i K6j56i k76 K6j56j5 K6j56j5 k77 K6j56j4 K6j56j4 k78 K6j56j3 K6j56j3 k79 K6j56j2 K6j56j2 k710 K6j56j1 K6j56j1 k711 K6j56j K6j56j k712 K6j46i5 K6j46i5 k81 K6j46i4 K6j46i4 k82 K6j46i3 K6j46i3 k83 K6j46i2 K6j46i2 k84 K6j46i1 K6j46i1 k85 K6j46i K6j46i k86 K6j46j5 K6j46j5 k87 K6j46j4 K6j46j4 k88 K6j46j3 K6j46j3 k89 K6j46j2 K6j46j2 k810 K6j46j1 K6j46j1 k811 K6j46j K6j46j k812 K6j36i5 K6j36i5 k91 K6j36i4 K6j36i4 k92 K6j36i3 K6j36i3 k93 K6j36i2 K6j36i2 k94 K6j36i1 K6j36i1 k95 K6j36i K6j36i k96 K6j36j5 K6j36j5 k97 K6j36j4 K6j36j4 k98 K6j36j3 K6j36j3 k99 K6j36j2 K6j36j2 k910 K6j36j1 K6j36j1 k911 K6j36j K6j36j k912 K6j26i5 K6j26i5 k101 K6j26i4 K6j26i4 k102 K6j26i3 K6j26i3 k103 K6j26i2 K6j26i2 k104 K6j26i1 K6j26i1 k105 K6j26i K6j26i k106 K6j26j5 K6j26j5 k107 K6j26j4 K6j26j4 k108 K6j26j3 K6j26j3 k109 K6j26j2 K6j26j2 k1010 K6j26j1 K6j26j1 k1011 K6j26j K6j26j k1012 K6j16i5 K6j16i5 k111 K6j16i4 K6j16i4 k112 K6j16i3 K6j16i3 k113 K6j16i2 K6j16i2 k114 200 10 The Space Frame Element K6j16i1 K6j16i1 k115 K6j16i K6j16i k116 K6j16j5 K6j16j5 k117 K6j16j4 K6j16j4 k118 K6j16j3 K6j16j3 k119 K6j16j2 K6j16j2 k1110 K6j16j1 K6j16j1 k1111 K6j16j K6j16j k1112 K6j6i5 K6j6i5 k121 K6j6i4 K6j6i4 k122 K6j6i3 K6j6i3 k123 K6j6i2 K6j6i2 k124 K6j6i1 K6j6i1 k125 K6j6i K6j6i k126 K6j6j5 K6j6j5 k127 K6j6j4 K6j6j4 k128 K6j6j3 K6j6j3 k129 K6j6j2 K6j6j2 k1210 K6j6j1 K6j6j1 k1211 K6j6j K6j6j k1212 y K function y SpaceFrameElementForcesEGAIyIzJx1y1z1x2y2z2u SpaceFrameElementForces This function returns the element force vector given the modulus of elasticity E the shear modulus of elasticity G the crosssectional area A moments of inertia Iy and Iz the torsional constant J the coordinates x1y1z1 of the first node the coordinates x2y2z2 of the second node and the element nodal displacement vector u L sqrtx2x1x2x1 y2y1y2y1 z2z1z2z1 w1 EAL w2 12EIzLLL w3 6EIzLL w4 4EIzL w5 2EIzL w6 12EIyLLL w7 6EIyLL w8 4EIyL w9 2EIyL w10 GJL kprime w1 0 0 0 0 0 w1 0 0 0 0 0 0 w2 0 0 0 w3 0 w2 0 0 0 w3 0 0 w6 0 w7 0 0 0 w6 0 w7 0 0 0 0 w10 0 0 0 0 0 w10 0 0 0 0 w7 0 w8 0 0 0 w7 0 w9 0 0 w3 0 0 0 w4 0 w3 0 0 0 w5 w1 0 0 0 0 0 w1 0 0 0 0 0 0 w2 0 0 0 w3 0 w2 0 0 0 w3 0 0 w6 0 w7 0 0 0 w6 0 w7 0 0 0 0 w10 0 0 0 0 0 w10 0 0 0 0 w7 0 w9 0 0 0 w7 0 w8 0 0 w3 0 0 0 w5 0 w3 0 0 0 w4 102 MATLAB Functions Used 201 if x1 x2 y1 y2 if z2 z1 Lambda 0 0 1 0 1 0 1 0 0 else Lambda 0 0 1 0 1 0 1 0 0 end else CXx x2x1L CYx y2y1L CZx z2z1L D sqrtCXxCXx CYxCYx CXy CYxD CYy CXxD CZy 0 CXz CXxCZxD CYz CYxCZxD CZz D Lambda CXx CYx CZx CXy CYy CZy CXz CYz CZz end R Lambda zeros3 zeros3 zeros3 zeros3 Lambda zeros3 zeros3 zeros3 zeros3 Lambda zeros3 zeros3 zeros3 zeros3 Lambda y kprimeR u function y SpaceFrameElementAxialDiagramf L SpaceFrameElementAxialDiagram This function plots the axial force diagram for the space frame element with nodal force vector f and length L x 0 L z f1 f7 hold on titleAxial Force Diagram plotxz y1 0 0 plotxy1k function y SpaceFrameElementShearYDiagramf L SpaceFrameElementShearYDiagram This function plots the shear force diagram for the space frame element with nodal force vector f and length L x 0 L z f2 f8 hold on titleShear Force Diagram in Y Direction plotxz y1 0 0 plotxy1k 202 10 The Space Frame Element function y SpaceFrameElementShearZDiagramf L SpaceFrameElementShearZDiagram This function plots the shear force diagram for the space frame element with nodal force vector f and length L x 0 L z f3 f9 hold on titleShear Force Diagram in Z Direction plotxz y1 0 0 plotxy1k function y SpaceFrameElementTorsionDiagramf L SpaceFrameElementTorsionDiagram This function plots the torsion diagram for the space frame element with nodal force vector f and length L x 0 L z f4 f10 hold on titleTorsion Diagram plotxz y1 0 0 plotxy1k function y SpaceFrameElementMomentYDiagramf L SpaceFrameElementMomentYDiagram This function plots the bending moment diagram for the space frame element with nodal force vector f and length L x 0 L z f5 f11 hold on titleBending Moment Diagram along Y Axis plotxz y1 0 0 plotxy1k function y SpaceFrameElementMomentZDiagramf L SpaceFrameElementMomentZDiagram This function plots the bending moment diagram for the space frame element with nodal force vector f and length L x 0 L z f6 f12 hold on titleBending Moment Diagram along Z Axis plotxz y1 0 0 plotxy1k 102 MATLAB Functions Used 203 Example 101 Consider the space frame shown in Fig 102 Given E 210 GPa G 84 GPa A 2 102 m2 Iy 10 105 m4 Iz 20 105 m4 and J 5 105 m4 determine 1 the global stiffness matrix for the structure 2 the displacements and rotations at node 1 3 the reactions at nodes 2 3 and 4 4 the forces axial shears torsion bending moments in each element 10 kN Z X Y 1 2 3 4 20 kN 4 m 3 m 3 m Fig 102 Space Frame with Three Elements for Example 101 Solution Use the six steps outlined in Chap 1 to solve this problem using the space frame element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into three elements and four nodes The units used in the MATLAB calculations are kN and meter Table 101 shows the element connectivity for this example Table 101 Element Connectivity for Example 101 Element Number Node i Node j 1 1 2 2 1 3 3 1 4 204 10 The Space Frame Element Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices k1 k2 and k3 are obtained by making calls to the MATLAB function SpaceFrameElementStiffness Each matrix has size 12 12 E210e6 E 210000000 G84e6 G 84000000 A2e2 A 00200 Iy10e5 Iy 10000e004 Iz20e5 Iz 20000e004 J5e5 J 50000e005 k1SpaceFrameElementStiffnessEGAIyIzJ000300 k1 10e006 102 MATLAB Functions Used 205 Columns 1 through 7 14000 0 0 0 0 0 14000 0 00187 0 0 0 00280 0 0 0 00093 0 00140 0 0 0 0 0 00014 0 0 0 0 0 00140 0 00280 0 0 0 00280 0 0 0 00560 0 14000 0 0 0 0 0 14000 0 00187 0 0 0 00280 0 0 0 00093 0 00140 0 0 0 0 0 00014 0 0 0 0 0 00140 0 00140 0 0 0 00280 0 0 0 00280 0 Columns 8 through 12 0 0 0 0 0 00187 0 0 0 00280 0 00093 0 00140 0 0 0 00014 0 0 0 00140 0 00140 0 00280 0 0 0 00280 0 0 0 0 0 00187 0 0 0 00280 0 00093 0 00140 0 0 0 00014 0 0 0 00140 0 00280 0 00280 0 0 0 00560 k2SpaceFrameElementStiffnessEGAIyIzJ000003 k2 10e006 Columns 1 through 7 00093 0 0 0 00140 0 00093 0 00187 0 00280 0 0 0 0 0 14000 0 0 0 0 0 00280 0 00560 0 0 0 206 10 The Space Frame Element 00140 0 0 0 00280 0 00140 0 0 0 0 0 00014 0 00093 0 0 0 00140 0 00093 0 00187 0 00280 0 0 0 0 0 14000 0 0 0 0 0 00280 0 00280 0 0 0 00140 0 0 0 00140 0 00140 0 0 0 0 0 00014 0 Columns 8 through 12 0 0 0 00140 0 00187 0 00280 0 0 0 14000 0 0 0 00280 0 00280 0 0 0 0 0 00140 0 0 0 0 0 00014 0 0 0 00140 0 00187 0 00280 0 0 0 14000 0 0 0 00280 0 00560 0 0 0 0 0 00280 0 0 0 0 0 00014 k3SpaceFrameElementStiffnessEGAIyIzJ000040 k3 10e006 Columns 1 through 7 00079 0 0 0 0 00158 00079 0 10500 0 0 0 0 0 0 0 00039 00079 0 0 0 0 0 00079 00210 0 0 0 0 0 0 0 00010 0 0 00158 0 0 0 0 00420 00158 00079 0 0 0 0 00158 00079 0 10500 0 0 0 0 0 102 MATLAB Functions Used 207 0 0 00039 00079 0 0 0 0 0 00079 00105 0 0 0 0 0 0 0 00010 0 0 00158 0 0 0 0 00210 00158 Columns 8 through 12 0 0 0 0 00158 10500 0 0 0 0 0 00039 00079 0 0 0 00079 00105 0 0 0 0 0 00010 0 0 0 0 0 00210 0 0 0 0 00158 10500 0 0 0 0 0 00039 00079 0 0 0 00079 00210 0 0 0 0 0 00010 0 0 0 0 0 00420 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 24 24 Therefore to obtain K we first set up a zero matrix of size 24 24 then make three calls to the MATLAB function SpaceFrameAssemble since we have three space frame elements in the structure Each call to the function will assemble one element The following are the MATLAB commands where it is noted that the only the final result is shown Kzeros2424 KSpaceFrameAssembleKk112 KSpaceFrameAssembleKk213 KSpaceFrameAssembleKk314 K 10e006 208 10 The Space Frame Element Columns 1 through 7 14172 0 0 0 00140 00158 14000 0 10873 0 00280 0 00280 0 0 0 14133 00079 00140 0 0 0 00280 00079 00784 0 0 0 00140 0 00140 0 00570 0 0 00158 00280 0 0 0 00994 0 14000 0 0 0 0 0 14000 0 00187 0 0 0 00280 0 0 0 00093 0 00140 0 0 0 0 0 00014 0 0 0 0 0 00140 0 00140 0 0 0 00280 0 0 0 00280 0 00093 0 0 0 00140 0 0 0 00187 0 00280 0 0 0 0 0 14000 0 0 0 0 0 00280 0 00280 0 0 0 00140 0 0 0 00140 0 0 0 0 0 0 0 00014 0 00079 0 0 0 0 00158 0 0 10500 0 0 0 0 0 0 0 00039 00079 0 0 0 0 0 00079 00105 0 0 0 0 0 0 0 00010 0 0 00158 0 0 0 0 00210 0 Columns 8 through 14 0 0 0 0 0 00093 0 00187 0 0 0 00280 0 00187 0 00093 0 00140 0 0 0 0 0 00014 0 0 0 00280 0 00140 0 00140 0 00140 0 00280 0 0 0 00280 0 0 0 0 0 0 0 0 0 00187 0 0 0 00280 0 0 0 00093 0 00140 0 0 0 0 0 00014 0 0 0 0 0 00140 0 00280 0 0 0 102 MATLAB Functions Used 209 00280 0 0 0 00560 0 0 0 0 0 0 0 00093 0 0 0 0 0 0 0 00187 0 0 0 0 0 0 0 0 0 0 0 0 0 00280 0 0 0 0 0 00140 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 15 through 21 0 0 00140 0 00079 0 0 0 00280 0 0 0 10500 0 14000 0 0 0 0 0 00039 0 00280 0 0 0 0 00079 0 0 00140 0 0 0 0 0 0 0 00014 00158 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00140 0 0 0 0 0 00280 0 0 0 0 0 14000 0 0 0 0 0 0 0 00560 0 0 0 0 0 0 0 00280 0 0 0 0 0 0 0 00014 0 0 0 0 0 0 0 00079 0 0 0 0 0 0 0 10500 0 0 0 0 0 0 0 00039 0 0 0 0 0 0 00079 0 0 0 0 0 0 0 0 0 0 0 00158 0 0 210 10 The Space Frame Element Columns 22 through 24 0 0 00158 0 0 0 00079 0 0 00105 0 0 0 00010 0 0 0 00210 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00158 0 0 0 00079 0 0 00210 0 0 0 00010 0 0 0 00420 Step 4 Applying the Boundary Conditions The matrix 105 for this structure is obtained using the global stiffness matrix shown above last martrix shown above This matrix equation will not be shown explicitly below because K is very large of size 24 24 We will proceed directly to the boundary conditions The boundary conditions for this problem are given as F1x 10 F1y 0 F1z 20 M1x M1y M1z 0 U2x U2y U2z φ2x φ2y φ2z 0 U3x U3y U3z φ3x φ3y φ3z 0 U4x U4y U4z φ4x φ4y φ4z 0 107 We next insert the above conditions into the global stiffness equation not shown and proceed to the solution step below 102 MATLAB Functions Used 211 Step 5 Solving the Equations Solving the resulting system of equations will be performed by partitioning manu ally and Gaussian elimination with MATLAB First we partition the equation by extracting the submatrix in rows 1 to 6 and columns 1 to 6 Therefore we obtain 106 14172 0 0 0 00140 00158 0 10873 0 00280 0 00280 0 0 14133 00079 00140 0 0 00280 00079 00784 0 0 00140 0 00140 0 00570 0 00158 00280 0 0 0 00994 U1x U1y U1z φ1x φ1y φ1z 10 0 20 0 0 0 108 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK1616 k 10e006 14172 0 0 0 00140 00158 0 10873 0 00280 0 00280 0 0 14133 00079 00140 0 0 00280 00079 00784 0 0 00140 0 00140 0 00570 0 00158 00280 0 0 0 00994 f10 0 20 0 0 0 f 10 0 20 0 0 0 212 10 The Space Frame Element ukf u 10e004 00705 00007 01418 00145 00175 00114 It is now clear that the three displacements at node 1 are 00705104 m 00007 104 m and 01418104 m along the X Y and Z axes respectivelyAlso the three rotations at node 1 are 00145104 rad 00175104 rad and 00114104 rad along the X Y and Z axes respectively Step 6 Postprocessing In this step we obtain the reactions at nodes 2 3 and 4 and the forces and moments in each space frame element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F Uu 000000000000000000 U 10e004 00705 00007 01418 00145 00175 00114 0 0 0 0 0 0 0 0 0 102 MATLAB Functions Used 213 0 0 0 0 0 0 0 0 0 FKU F 100000 0 200000 00000 00000 00000 98721 00306 01078 00020 01740 00299 00903 00393 198477 00387 01232 00016 00376 00699 00444 00964 00018 00872 Next we set up the element nodal displacement vectors u1 u2 and u3 then we calculate the element force vectors f1 f2 and f3 by making calls to the MATLAB function SpaceFrameElementForces u1U1U2U3U4U5U6 U7U8U9U10U11U12 214 10 The Space Frame Element u1 10e004 00705 00007 01418 00145 00175 00114 0 0 0 0 0 0 u2U1U2U3U4U5U6U13 U14U15U16U17U18 u2 10e004 00705 00007 01418 00145 00175 00114 0 0 0 0 0 0 u3U1U2U3U4U5U6U19 U20U21U22U23U24 u3 10e004 00705 00007 102 MATLAB Functions Used 215 01418 00145 00175 00114 0 0 0 0 0 0 f1SpaceFrameElementForcesEGAIyIzJ000300u1 f1 98721 00306 01078 00020 01495 00618 98721 00306 01078 00020 01740 00299 f2SpaceFrameElementForcesEGAIyIzJ000003u2 f2 198477 00393 00903 00016 01477 00792 198477 00393 00903 00016 01232 00387 216 10 The Space Frame Element f3SpaceFrameElementForcesEGAIyIzJ000040u3 f3 00699 00376 00444 00018 00812 00633 00699 00376 00444 00018 00964 00872 Problems Problem 101 Consider the space frame shown in Fig 103 Given E 210 GPa G 84 GPa A 2 102 m2 Iy 10 105 m4 Iz 20 105 m4 and J 5 105 m4 determine 1 the global stiffness matrix for the structure 2 the displacements and rotations at nodes 5 6 7 and 8 3 the reactions at nodes 1 2 3 and 4 4 the forces axial shears torsion bending moments in each element 4 Z X Y 3 4 m 4 m 5 m 1 5 8 7 6 2 15 kN Fig 103 Space Frame with Eight Elements for Problem 101 11 The Linear Triangular Element 111 Basic Equations The linear triangular element is a twodimensional finite element with both local and global coordinates It is characterized by linear shape functions This element can be used for plane stress or plane strain problems in elasticity It is also called the constant strain triangle The linear triangular element has modulus of elasticity E Poissons ratio ν and thickness t Each linear triangle has three nodes with two in plane degrees of freedom at each node as shown in Fig 111 The global coordinates of the three nodes are denoted by xi yi xj yj and xm ym The order of the nodes for each element is important they should be listed in a counterclockwise direction starting from any node The area of each triangle should be positive you can actually check this by using the MATLAB function LinearTriangleElementArea which is written specifically for this purpose In this case the element stiffness matrix is given by see 1 k tABT DB 111 where A is the area of the element given by 2A xiyj ym xjym yi xmyi yj 112 and the matrix B is given by mxmym jxjyj ixiyi x y Fig 111 The Linear Triangular Element 218 11 The Linear Triangular Element B 1 2A βi 0 βj 0 βm 0 0 γi 0 γj 0 γm γi βi γj βj γm βm 113 where βi βj βm γi γj and γm are given by βi yj ym βj ym yi βm yi yj γi xm xj γj xi xm γm xj xi 114 For cases of plane stress the matrix D is given by D E 1 ν2 1 ν 0 ν 1 0 0 0 1 ν 2 115 For cases of plane strain the matrix D is given by D E 1 ν1 2ν 1 ν ν 0 ν 1 ν 0 0 0 1 2ν 2 116 It is clear that the linear triangular element has six degrees of freedom two at each node Consequently for a structure with n nodes the global stiffness matrix K will be of size 2n 2n since we have two degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function LinearTriangleAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F 117 where U is the global nodal displacement vector and F is the global nodal force vectorAt this step the boundary conditions are applied manually to the vectors U and 112 MATLAB Functions Used 219 F Then the matrix 117 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the stress vector is obtained for each element as follows σ DB u 118 where σ is the stress vector in the element of size 3 1 and u is the 6 1 element displacement vector The vector σ is written for each element as σ σxσyτxyT 112 MATLAB Functions Used The five MATLAB functions used for the linear triangular element are LinearTriangleElementAreaxi yi xj yj xm ym This function returns the element area given the coordinates of the first node xi yi the coordinates of the second node xj yj and the coordinates of the third node xm ym LinearTriangleElementStiffnessE NU t xi yi xj yj xm ym p This function calculates the element stiffness matrix for each linear triangle with modulus of elas ticity E Poissons ratio NU thickness t and coordinates xi yi for the first node xj yj for the second node and xm ym for the third node Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the 6 6 element stiffness matrix k LinearTriangleAssembleK ki j mThisfunctionassemblestheelementstiffness matrix k of the linear triangle joining nodes i j and m into the global stiffness matrix K It returns the 2n 2n global stiffness matrix K every time an element is assembled LinearTriangleElementStressesE NU xi yi xj yj xm ym p u This function calculates the element stresses using the modulus of elasticity E Poissons ratio NU the coordinates xi yi for the first node xj yj for the second node and xm ym for the third node and the element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the stress vector for the element LinearTriangleElementPStressessigma This function calculates the element prin cipal stresses using the element stress vector sigma It returns a 3 1 vector in the form sigma1 sigma2 thetaT where sigma1 and sigma2 are the principal stresses for the element and theta is the principal angle The following is a listing of the MATLAB source code for each function 220 11 The Linear Triangular Element function y LinearTriangleElementAreaxiyixjyjxmym LinearTriangleElementArea This function returns the area of the linear triangular element whose first node has coordinates xiyi second node has coordinates xjyj and third node has coordinates xmym y xiyjym xjymyi xmyiyj2 function y LinearTriangleElementStiffnessENUtxiyixjyjxmymp LinearTriangleElementStiffness This function returns the element stiffness matrix for a linear triangular element with modulus of elasticity E Poissons ratio NU thickness t coordinates of the first node xiyi coordinates of the second node xjyj and coordinates of the third node xmym Use p 1 for cases of plane stress and p 2 for cases of plane strain The size of the element stiffness matrix is 6 x 6 A xiyjym xjymyi xmyiyj2 betai yjym betaj ymyi betam yiyj gammai xmxj gammaj xixm gammam xjxi B betai 0 betaj 0 betam 0 0 gammai 0 gammaj 0 gammam gammai betai gammaj betaj gammam betam2A if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU1NU NU 0 NU 1NU 0 0 0 1 2NU2 end y tABDB function y LinearTriangleAssembleKkijm LinearTriangleAssemble This function assembles the element stiffness matrix k of the linear triangular element with nodes i j and m into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K2i12i1 K2i12i1 k11 K2i12i K2i12i k1 2 K2i12j1 K2i12j1 k13 112 MATLAB Functions Used 221 K2i12j K2i12j k14 K2i12m1 K2i12m1 k15 K2i12m K2i12m k16 K2i2i1 K2i2i1 k21 K2i2i K2i2i k22 K2i2j1 K2i2j1 k23 K2i2j K2i2j k24 K2i2m1 K2i2m1 k25 K2i2m K2i2m k26 K2j12i1 K2j12i1 k31 K2j12i K2j12i k32 K2j12j1 K2j12j1 k33 K2j12j K2j12j k34 K2j12m1 K2j12m1 k35 K2j12m K2j12m k36 K2j2i1 K2j2i1 k41 K2j2i K2j2i k42 K2j2j1 K2j2j1 k43 K2j2j K2j2j k44 K2j2m1 K2j2m1 k45 K2j2m K2j2m k46 K2m12i1 K2m12i1 k51 K2m12i K2m12i k52 K2m12j1 K2m12j1 k53 K2m12j K2m12j k54 K2m12m1 K2m12m1 k55 K2m12m K2m12m k56 K2m2i1 K2m2i1 k61 K2m2i K2m2i k62 K2m2j1 K2m2j1 k63 K2m2j K2m2j k64 K2m2m1 K2m2m1 k65 K2m2m K2m2m k66 y K function y LinearTriangleElementStressesENUxiyixjyjxmympu LinearTriangleElementStressesThis function returns the element stress vector for a linear triangular element with modulus of elasticity E Poissons ratio NU coordinates of the first node xiyi coordinates of the second node xjyj coordinates of the third node xmym and element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain The size of the element stress vector is 3 x 1 A xiyjym xjymyi xmyiyj2 betai yjym betaj ymyi betam yiyj gammai xmxj 222 11 The Linear Triangular Element gammaj xixm gammam xjxi B betai 0 betaj 0 betam 0 0 gammai 0 gammaj 0 gammam gammai betai gammaj betaj gammam betam2A if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU1NU NU 0 NU 1NU 0 0 0 1 2NU2 end y DBu function y LinearTriangleElementPStressessigma LinearTriangleElementPStresses This function returns the element principal stresses and their angle given the element stress vector R sigma1 sigma22 Q sigma1 sigma22ˆ2 sigma3sigma3 M 2sigma3sigma1 sigma2 s1 R sqrtQ s2 R sqrtQ theta atanM2180pi y s1 s2 theta Example 111 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 112 The plate is discretized using two linear triangular elements as shown in Fig 113 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 2 and 3 3 the reactions at nodes 1 and 4 4 the stresses in each element 5 the principal stresses and principal angle for each element w 025 m 05 m Fig 112 Thin Plate for Example 111 112 MATLAB Functions Used 223 9375 kN y x 9375 kN 4 2 3 1 025 m 05 m Fig 113 Discretization of Thin Plate Using Two Linear Triangles Solution Use the six steps outlined in Chap 1 to solve this problem using the linear triangular element Step 1 Discretizing the Domain We subdivide the plate into two elements only for illustration purposes More elements must be used in order to obtain reliable results Thus the domain is subdivided into two elements and four nodes as shown in Fig 113 The total force due to the distributed load is divided equally between nodes 2 and 3 Since the plate is thin a case of plane stress is assumed The units used in the MATLAB calculations are kN and meter Table 111 shows the element connectivity for this example Table 111 Element Connectivity for Example 111 Element Number Node i Node j Node m 1 1 3 4 2 1 2 3 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function LinearTriangleElementStiffness Each matrix has size 6 6 E210e6 E 210000000 NU03 224 11 The Linear Triangular Element NU 03000 t0025 t 00250 k1LinearTriangleElementStiffnessENUt0005 02500251 k1 10e006 20192 0 0 10096 20192 10096 0 57692 08654 0 08654 57692 0 08654 14423 0 14423 08654 10096 0 0 05048 10096 05048 20192 08654 14423 10096 34615 18750 10096 57692 08654 05048 18750 62740 k2LinearTriangleElementStiffnessENUt0005 0050251 k2 10e006 14423 0 14423 08654 0 08654 0 05048 10096 05048 10096 0 14423 10096 34615 18750 20192 08654 08654 05048 18750 62740 10096 57692 0 10096 20192 10096 20192 0 08654 0 08654 57692 0 57692 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 8 8 Therefore to obtain K we first set up a zero matrix of size 88 then make two calls to 112 MATLAB Functions Used 225 the MATLAB function LinearTriangleAssemble since we have two elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros88 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KLinearTriangleAssembleKk1134 K 10e006 Columns 1 through 7 20192 0 0 0 0 10096 20192 0 57692 0 0 08654 0 08654 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 08654 0 0 14423 0 14423 10096 0 0 0 0 05048 10096 20192 08654 0 0 14423 10096 34615 10096 57692 0 0 08654 05048 18750 Column 8 10096 57692 0 0 08654 05048 18750 62740 226 11 The Linear Triangular Element KLinearTriangleAssembleKk2123 K 10e006 Columns 1 through 7 34615 0 14423 08654 0 18750 20192 0 62740 10096 05048 18750 0 08654 14423 10096 34615 18750 20192 08654 0 08654 05048 18750 62740 10096 57692 0 0 18750 20192 10096 34615 0 14423 18750 0 08654 57692 0 62740 10096 20192 08654 0 0 14423 10096 34615 10096 57692 0 0 08654 05048 18750 Column 8 10096 57692 0 0 08654 05048 18750 62740 Step 4 Applying the Boundary Conditions The matrix 117 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 106 346 0 144 087 0 188 202 101 0 627 101 050 188 0 087 577 144 101 346 188 202 087 0 0 087 050 188 627 101 577 0 0 0 188 202 101 346 0 144 087 188 0 087 577 0 627 101 050 202 087 0 0 144 101 346 188 101 577 0 0 087 050 188 627 112 MATLAB Functions Used 227 U1x U1y U2x U2y U3x U3y U4x U4y F1x F1y F2x F2y F3x F3y F4x F4y 119 The boundary conditions for this problem are given as U1x U1y U4x U4y 0 F2x 9375 F2y 0 F3x 9375 F3y 0 1110 Inserting the above conditions into 119 we obtain 106 346 0 144 087 0 188 202 101 0 627 101 050 188 0 087 577 144 101 346 188 202 087 0 0 087 050 188 627 101 577 0 0 0 188 202 101 346 0 144 087 188 0 087 577 0 627 101 050 202 087 0 0 144 101 346 188 101 577 0 0 087 050 188 627 0 0 U2x U2y U3x U3y 0 0 F1x F1y 9375 0 9375 0 F4x F4y 1111 Step 5 Solving the Equations Solving the system of equations in 1111 will be performed by partitioning man ually and Gaussian elimination with MATLAB First we partition 1111 by ex tracting the submatrix in rows 3 to 6 and columns 3 to 6 Therefore we obtain 106 346 188 202 087 188 627 101 577 202 101 346 0 087 577 0 627 U2x U2y U3x U3y 9375 0 9375 0 1112 228 11 The Linear Triangular Element The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3636 k 10e006 34615 18750 20192 08654 18750 62740 10096 57692 20192 10096 34615 0 08654 57692 0 62740 f9375 0 9375 0 f 93750 0 93750 0 ukf u 10e005 07111 01115 06531 00045 It is now clear that the horizontal and vertical displacements at node 2 are 07111 m and 01115 m respectively and the horizontal and vertical displacements at node 3 are 06531 m and 00045 m respectively When a larger number of elements is used we expect to get the same result for the horizontal displacements at nodes 2 and 3 Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 4 and the stresses in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F 112 MATLAB Functions Used 229 U0 0 u 0 0 U 10e005 0 0 07111 01115 06531 00045 0 0 FKU F 93750 56295 93750 0 93750 00000 93750 56295 Thus the horizontal and vertical reactions at node 1 are forces of 9375 kN di rected to the left and 56295 kN directed downwards The horizontal and vertical reactions at node 4 are forces of 9375 kN directed to the left and 56295 kN di rected upwards Obviously force equilibrium is satisfied for this problem Next we set up the element nodal displacement vectors u1 and u2 then we calculate the element stresses sigma1 and sigma2 by making calls to the MATLAB function LinearTrian gleElementStresses u1U1 U2 U5 U6 U7 U8 u1 10e005 0 0 06531 230 11 The Linear Triangular Element 00045 0 0 u2U1 U2 U3 U4 U5 U6 u2 10e005 0 0 07111 01115 06531 00045 sigma1LinearTriangleElementStressesENU0005025 00251u1 sigma1 10e003 30144 09043 00072 sigma2LinearTriangleElementStressesENU00050 050251u2 sigma2 10e003 29856 00036 00072 Thus it is clear that the stresses in element 1 are σx 30144 MPa tensile σy 09043 MPa tensile and τxy 00072 MPa positive The stresses in el ement 2 are σx 29856 MPa tensile σy 00036 MPa compressive and τxy 00072 MPa negative It is clear that the stresses in the xdirection approach closely the correct value of 3 MPa tensile Next we calculate the principal stresses 112 MATLAB Functions Used 231 and principal angle for each element by making calls to the MATLAB function Lin earTriangleElementPStresses s1LinearTriangleElementPStressessigma1 s1 10e003 30144 09043 00002 s2LinearTriangleElementPStressessigma2 s2 10e003 29856 00036 00001 Thus it is clear that the principal stresses in element 1 are σ1 30144 MPa tensile σ2 09043 MPa tensile while the principal angle θp 02 The principal stresses in element 2 are σ1 29856 MPa tensile σ2 00036 MPa compressive while the principal angle θp 01 Example 112 Consider the thin plate subjected to both a uniformly distributed load and a concen trated load as shown in Fig 114 The plate is discretized using twelve linear triangles as shown in Fig 115 Given E 210 GPa ν 03 t 0025 m w 100 kNm and P 125 kN determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at each node 3 the reactions at nodes 1 4 and 7 Solution Use the six steps outlined in Chap 1 to solve this problem using the linear triangular element 232 11 The Linear Triangular Element P 025 m 025 m 05 m 05 m w Fig 114 Thin Plate with a Distributed Load and a Concentrated Load for Example 112 9 6 3 1 2 4 5 7 8 10 11 025 m 025 m 025 m 025 m 125 kN Fig 115 Discretization of Thin Plate Using Twelve Linear Triangles Step 1 Discretizing the Domain We subdivide the plate into twelve elements and eleven nodes as shown in Fig 115 The total force due to the distributed load is divided equally between nodes 5 and 10 However the resultant applied force at node 10 cancels out and we are left with a concentrated force of 125 kN applied vertically downwards at node 5 Since the plate is thin a case of plane stress is assumed The units used in the MATLAB calculations are kN and meter Table 112 shows the element connectivity for this example Table 112 Element Connectivity for Example 112 Element Number Node i Node j Node m 1 1 3 2 2 1 4 3 3 3 5 2 4 3 4 5 5 4 6 5 6 4 7 6 7 5 6 8 8 6 7 8 9 5 8 9 10 5 9 10 11 8 11 9 12 9 11 10 112 MATLAB Functions Used 233 Step 2 Writing the Element Stiffness Matrices The twelve element stiffness matrices are obtained by making calls to the MATLAB function LinearTriangleElementStiffness Each matrix has size 6 6 E210e6 E 210000000 NU03 NU 03000 t0025 t 00250 k1LinearTriangleElementStiffnessENUt0050125 0375025051 k1 10e006 19471 09375 10096 08654 09375 00721 09375 19471 10096 28846 00721 09375 10096 10096 20192 0 10096 10096 08654 28846 0 57692 08654 28846 09375 00721 10096 08654 19471 09375 00721 09375 10096 28846 09375 19471 k2LinearTriangleElementStiffnessENUt0050025 012503751 k2 10e006 234 11 The Linear Triangular Element 19471 09375 09375 00721 28846 10096 09375 19471 00721 09375 08654 10096 09375 00721 19471 09375 28846 10096 00721 09375 09375 19471 08654 10096 28846 08654 28846 08654 57692 0 10096 10096 10096 10096 0 20192 k3LinearTriangleElementStiffnessENUt01250375 025025025051 k3 10e006 57692 0 28846 08654 28846 08654 0 20192 10096 10096 10096 10096 28846 10096 19471 09375 09375 00721 08654 10096 09375 19471 00721 09375 28846 10096 09375 00721 19471 09375 08654 10096 00721 09375 09375 19471 k4LinearTriangleElementStiffnessENUt01250375 00250250251 k4 10e006 20192 0 10096 10096 10096 10096 0 57692 08654 28846 08654 28846 10096 08654 19471 09375 09375 00721 10096 28846 09375 19471 00721 09375 10096 08654 09375 00721 19471 09375 10096 28846 00721 09375 09375 19471 k5LinearTriangleElementStiffnessENUt00250125 01250250251 k5 10e006 112 MATLAB Functions Used 235 19471 09375 10096 08654 09375 00721 09375 19471 10096 28846 00721 09375 10096 10096 20192 0 10096 10096 08654 28846 0 57692 08654 28846 09375 00721 10096 08654 19471 09375 00721 09375 10096 28846 09375 19471 k6LinearTriangleElementStiffnessENUt002500 012501251 k6 10e006 19471 09375 09375 00721 28846 10096 09375 19471 00721 09375 08654 10096 09375 00721 19471 09375 28846 10096 00721 09375 09375 19471 08654 10096 28846 08654 28846 08654 57692 0 10096 10096 10096 10096 0 20192 k7LinearTriangleElementStiffnessENUt025025 0125012502501 k7 10e006 19471 09375 28846 10096 09375 00721 09375 19471 08654 10096 00721 09375 28846 08654 57692 0 28846 08654 10096 10096 0 20192 10096 10096 09375 00721 28846 10096 19471 09375 00721 09375 08654 10096 09375 19471 k8LinearTriangleElementStiffnessENUt01250125 0002501 k8 10e006 236 11 The Linear Triangular Element 20192 0 10096 10096 10096 10096 0 57692 08654 28846 08654 28846 10096 08654 19471 09375 09375 00721 10096 28846 09375 19471 00721 09375 10096 08654 09375 00721 19471 09375 10096 28846 00721 09375 09375 19471 k9LinearTriangleElementStiffnessENUt025025025 0037501251 k9 10e006 19471 09375 09375 00721 28846 10096 09375 19471 00721 09375 08654 10096 09375 00721 19471 09375 28846 10096 00721 09375 09375 19471 08654 10096 28846 08654 28846 08654 57692 0 10096 10096 10096 10096 0 20192 k10LinearTriangleElementStiffnessENUt025025 03750125050251 k10 10e006 19471 09375 10096 08654 09375 00721 09375 19471 10096 28846 00721 09375 10096 10096 20192 0 10096 10096 08654 28846 0 57692 08654 28846 09375 00721 10096 08654 19471 09375 00721 09375 10096 28846 09375 19471 k11LinearTriangleElementStiffnessENUt025005 0037501251 k11 10e006 112 MATLAB Functions Used 237 19471 09375 09375 00721 10096 08654 09375 19471 00721 09375 10096 28846 09375 00721 19471 09375 10096 08654 00721 09375 09375 19471 10096 28846 10096 10096 10096 10096 20192 0 08654 28846 08654 28846 0 57692 k12LinearTriangleElementStiffnessENUt03750125 050050251 k12 10e006 57692 0 28846 08654 28846 08654 0 20192 10096 10096 10096 10096 28846 10096 19471 09375 09375 00721 08654 10096 09375 19471 00721 09375 28846 10096 09375 00721 19471 09375 08654 10096 00721 09375 09375 19471 Step 3 Assembling the Global Stiffness Matrix Since the structure has eleven nodes the size of the global stiffness matrix is 2222 ThereforetoobtainKwefirstsetupazeromatrixofsize2222thenmaketwelvecalls to the MATLAB function LinearTriangleAssemble since we have twelve elements in the structure Each call to the function will assemble one element The following are the MATLAB commands note that the result for the global stiffness matrix is not shown at each step except at the last step Kzeros2222 KLinearTriangleAssembleKk1132 KLinearTriangleAssembleKk2143 KLinearTriangleAssembleKk3352 KLinearTriangleAssembleKk4345 KLinearTriangleAssembleKk5465 238 11 The Linear Triangular Element KLinearTriangleAssembleKk6476 KLinearTriangleAssembleKk7568 KLinearTriangleAssembleKk8678 KLinearTriangleAssembleKk9589 KLinearTriangleAssembleKk105910 KLinearTriangleAssembleKk118119 KLinearTriangleAssembleKk1291110 K 10e007 Columns 1 through 7 03894 01875 00938 00072 03894 01875 00938 01875 03894 00072 00938 01875 03894 00072 00938 00072 03894 01875 03894 01875 0 00072 00938 01875 03894 01875 03894 0 03894 01875 03894 01875 15577 0 03894 01875 03894 01875 03894 0 15577 01875 00938 00072 0 0 03894 01875 07788 00072 00938 0 0 01875 03894 0 0 0 00938 00072 03894 01875 01875 0 0 00072 00938 01875 03894 0 0 0 0 0 0 0 03894 0 0 0 0 0 0 01875 0 0 0 0 0 0 00938 0 0 0 0 0 0 00072 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 112 MATLAB Functions Used 239 Columns 8 through 14 00072 0 0 0 0 0 0 00938 0 0 0 0 0 0 0 00938 00072 0 0 0 0 0 00072 00938 0 0 0 0 01875 03894 01875 0 0 0 0 03894 01875 03894 0 0 0 0 0 01875 0 03894 01875 00938 00072 07788 0 01875 01875 03894 00072 00938 0 11683 01875 03894 01875 0 0 01875 01875 11683 01875 03894 0 0 01875 03894 01875 15577 0 03894 01875 03894 01875 03894 0 15577 01875 03894 00072 0 0 03894 01875 03894 01875 00938 0 0 01875 03894 01875 03894 0 01875 0 03894 01875 00938 00072 0 0 01875 01875 03894 00072 00938 0 03894 01875 0 0 0 0 0 01875 03894 0 0 0 0 0 00938 00072 0 0 0 0 0 00072 00938 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 15 through 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 01875 0 03894 01875 00938 00072 0 0 01875 01875 03894 00072 00938 0 03894 01875 0 0 0 0 0 01875 03894 0 0 0 0 0 00938 00072 0 0 0 0 0 00072 00938 0 0 0 0 0 07788 0 03894 01875 0 0 00938 0 07788 01875 03894 0 0 00072 03894 01875 15577 0 03894 01875 03894 240 11 The Linear Triangular Element 0 07788 01875 03894 0 0 00072 03894 01875 15577 0 03894 01875 03894 01875 03894 0 15577 01875 03894 01875 0 0 03894 01875 03894 01875 00938 0 0 01875 03894 01875 03894 00072 00938 00072 03894 01875 00938 00072 03894 00072 00938 01875 03894 00072 00938 01875 Column 22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00072 00938 01875 03894 00072 00938 01875 03894 Step 4 Applying the Boundary Conditions The matrix 117 for this structure can be obtained but is not written explicitly here for lack of space using the global stiffness matrix obtained in the previous step The boundary conditions for this problem are given as U1x U1y U4x U4y U7x U7y 0 F2x F2y F3x F3y F6x F6y F8x F8y F9x F9y 1113 F10x F10y F11x F11y 0 F5x 0 F5y 125 1114 112 MATLAB Functions Used 241 Inserting the above conditions into the matrix equation for this structure we can proceed to the next step The final equation to be solved in not shown here explicitly because it is too large of size 22 22 and will not fit here Step 5 Solving the Equations Solving the system of equations for this structure will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition the matrix equation by extracting the submatrices in rows 3 to 6 9 to 12 15 to 22 and columns 3 to 6 9 to 12 15 to 22 We then obtain a reduced matrix equation of size 16 16 which is not shown here explicitly because it is too large However it is shown in the MATLAB output below The solution of the resulting system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3636 K36912 K361522 K91236 K912912 K9121522 K152236 K1522912 K15221522 k 10e007 Columns 1 through 7 03894 01875 03894 01875 00938 00072 0 01875 03894 01875 03894 00072 00938 0 03894 01875 15577 0 03894 01875 0 01875 03894 0 15577 01875 03894 0 00938 00072 03894 01875 11683 01875 03894 00072 00938 01875 03894 01875 11683 01875 0 0 0 0 03894 01875 15577 0 0 0 0 01875 03894 0 0 0 0 0 01875 0 03894 0 0 0 0 0 01875 01875 0 0 0 0 03894 01875 0 0 0 0 0 01875 03894 0 0 0 0 0 00938 00072 0 0 0 0 0 00072 00938 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 242 11 The Linear Triangular Element Columns 8 through 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 01875 01875 0 03894 01875 00938 00072 03894 0 01875 01875 03894 00072 00938 0 03894 01875 0 0 0 0 15577 01875 03894 0 0 0 0 01875 07788 0 03894 01875 0 0 03894 0 07788 01875 03894 0 0 0 03894 01875 15577 0 03894 01875 0 01875 03894 0 15577 01875 03894 0 0 0 03894 01875 03894 01875 0 0 0 01875 03894 01875 03894 0 00938 00072 03894 01875 00938 00072 0 00072 00938 01875 03894 00072 00938 Columns 15 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00938 00072 00072 00938 03894 01875 01875 03894 00938 00072 00072 00938 03894 01875 01875 03894 f000001250000000000 f 0 0 0 112 MATLAB Functions Used 243 0 0 125000 0 0 0 0 0 0 0 0 0 0 ukf u 10e005 01158 03010 00432 01657 00013 04170 00409 01762 01340 03528 00530 04526 00083 05114 01270 05290 The horizontal and vertical displacements are shown clearly above for the eight free nodes in the structure Step 6 Postprocessing In this step we obtain the reactions at nodes 1 4 and 7 using MATLAB as follows We set up the global nodal displacement vector U then we calculate the global nodal force vector F 244 11 The Linear Triangular Element U00u1400u5800u916 U 10e005 0 0 01158 03010 00432 01657 0 0 00013 04170 00409 01762 0 0 01340 03528 00530 04526 00083 05114 01270 05290 FKU F 60939 43591 00000 00000 00000 00000 03122 39181 00000 125000 00000 00000 112 MATLAB Functions Used 245 64061 42228 0 00000 00000 00000 0 00000 00000 00000 The reactions are shown clearly above The stresses and principal stresses in each element are not required in this problem but they can be easily obtained for each one of the twelve elements by making successive calls to the MATLAB functions LinearTriangleElementStresses and LinearTriangleElementPStresses Problems Problem 111 Consider the thin plate problem solved in Example 111 Solve the problem again us ing four linear triangular elements instead of two elements as shown in Fig 116 Compare your answers for the displacements at nodes 2 and 3 with the answers ob tained in the example Compare also the stresses obtained for the four elements with those obtained for the two elements in the example 9375 kN 025 m 05 m 9375 kN 4 2 3 1 5 Fig 116 Discretization of Thin Plate Using Four Linear Triangles Problem 112 Consider the thin plate with a hole in the middle that is subjected to a concentrated load at the corner as shown in Fig 117 Given E 70 GPa ν 025 t 002 m and P 20 kN use the finite element mesh composed of linear triangles shown in Fig 118 to determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 4 6 7 10 11 and 16 3 the reactions at nodes 1 5 9 and 13 246 11 The Linear Triangular Element P hole 03 m 03 m 03 m 03 m 03 m 03 m Fig 117 Thin Plate with a Hole 8 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 20 kN 03 m 03 m 03 m 03 m 03 m 03 m Fig 118 Discretization of Thin Plate with a Hole Using 16 Linear Triangles Problem 113 Consider the thin plate supported on two springs and subjected to a uniformly dis tributed load as shown in Fig 119 Given E 200 GPa ν 03 t 001 m k 4000 kNm and w 5000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 1 2 3 and 4 3 the reactions at nodes 5 and 6 4 the stresses in each element 5 the principal stresses and principal angle for each element 6 the force in each spring 112 MATLAB Functions Used 247 k k w 04 m 1 4 2 3 07 m 6 5 Fig 119 Thin Plate Supported on Two Springs 12 The Quadratic Triangular Element 121 Basic Equations The quadratic triangular element is a twodimensional finite element with both local and global coordinates It is characterized by quadratic shape functions This element can be used for plane stress or plane strain problems in elasticity It is also called the linear strain triangle The quadratic triangular element has modulus of elasticity E Poissons ratio ν and thickness t Each quadratic triangle has six nodes with two inplane degrees of freedom at each node as shown in Fig 121 The global coordinates of the six nodes are denoted by x1 y1 x2 y2 x3 y3 x4 y4 x5 y5 and x6 y6 The order of the nodes for each element is important they should be listed in a counterclockwise direction starting from the corner nodes then the mid side nodes The area of each triangle should be positive you can actually check this by using the MATLAB function QuadTriangleElementArea which is written specifically for this purpose In this case the element stiffness matrix is not written explicitly but calculated through symbolic differentiation and integration with the aid of the MATLAB Symbolic Math Toolbox The six shape functions for this element are listed explicitly as follows see 1 and 14 N1 x23y y3 y23x x3x46y y6 y46x x6 x23y13 y23x13x46y16 y46x16 N2 x31y y1 y31x x1x54y y4 y54x x4 x31y21 y31x21x54y24 y54x24 y x 1 4 6 5 2 3 Fig 121 The Quadratic Triangular Element N3 fracx3y y1 y21x6 y6x2 y2 y2 x3x5 y5 y5 x6 N4 fracx3y y1 y31x3 y3x1 y1 y1 x1x6 y6 y6 x6 N5 fracx3y y1 y31x1 y1x1 y1 y1 x1x6 y6 y6 x6 N6 fracx1y y1 y21x3 y3x4 y4 y4 x4x5 y5 y5 x5 121 The B matrix is given as follows for this element B beginbmatrix fracpartial N1partial x 0 fracpartial N2partial x cdots fracpartial N6partial x 0 fracpartial N1partial y 0 fracpartial N3partial x cdots fracpartial N6partial y endbmatrix 122 122 MATLAB Functions Used 251 for the function QuadTriangleElementStiffness which calculates the element stiffness matrix for this element The reader should note the calculation of this matrix will be somewhat slow due to the symbolic computations involved It is clear that the quadratic triangular element has twelve degrees of freedom two at each node Consequently for a structure with n nodes the global stiffness matrix K will be of size 2n 2n since we have two degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function QuadTriangleAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F 126 where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 126 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the stress vector is obtained for each element as follows σ DB u 127 where σ is the stress vector in the element of size 3 1 and u is the 12 1 element displacement vector The vector σ is written for each element as σ σxσyτxyT It should be noted that in this case this vector is a linear function of x and y Usually numerical results are obtained at the centroid of the element The MATLAB function QuadTriangleElementStresses gives two results the general linear stress functions in x and y and the numerical values of the stresses at the centroid of the element 122 MATLAB Functions Used The five MATLAB functions used for the quadratic triangular element are QuadTriangleElementAreax1 y1 x2 y2 x3 y3 This function returns the element area given the coordinates of the first node x1 y1 the coordinates of the second node x2 y2 and the coordinates of the third node x3 y3 QuadTriangleElementStiffnessE NU t x1 y1 x2 y2 x3 y3 p This function calculates the element stiffness matrix for each linear triangle with modulus of elasticity E Poissons ratio NU thickness t and coordinates x1 y1 for the first 252 12 The Quadratic Triangular Element node x2 y2 for the second node and x3 y3 for the third node Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the 1212 element stiffness matrix k QuadTriangleAssembleK k i j m p q r This function assembles the element stiffness matrix k of the linear triangle joining nodes i j m p q and r into the global stiffness matrix K It returns the 2n 2n global stiffness matrix K every time an element is assembled QuadTriangleElementStressesE NU x1 y1 x2 y2 x3 y3 p u This function calculates the element stresses using the modulus of elasticity E Poissons ratio NU the coordinates x1 y1 for the first node x2 y2 for the second node and x3 y3 for the third node and the element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the stress vector for the element QuadTriangleElementPStressessigma This function calculates the element prin cipal stresses using the element stress vector sigma It returns a 3 1 vector in the form sigma1 sigma2 thetaT where sigma1 and sigma2 are the principal stresses for the element and theta is the principal angle The following is a listing of the MATLAB source code for each function function y QuadTriangleElementAreax1y1x2y2x3y3 QuadTriangleElementArea This function returns the area of the quadratic triangular element whose first node has coordinates x1y1 second node has coordinates x2y2 and third node has coordinates x3y3 y x1y2y3 x2y3y1 x3y1y22 function w QuadTriangleElementStiffnessENUtx1y1x2y2x3y3p QuadTriangleElementStiffness This function returns the element stiffness matrix for a quadratic triangular element with modulus of elasticity E Poissons ratio NU thickness t coordinates of the node 1 x1y1 coordinates of node 2 x2y2 and coordinates of node 3 x3y3 Use p 1 for cases of plane stress and p 2 for cases of plane strain The size of the element stiffness matrix is 12 x 12 122 MATLAB Functions Used 253 syms x y x4 x1 x22 y4 y1 y22 x5 x2 x32 y5 y2 y32 x6 x1 x32 y6 y1 y32 x21 x2 x1 y21 y2 y1 x23 x2 x3 y23 y2 y3 x46 x4 x6 y46 y4 y6 x13 x1 x3 y13 y1 y3 x16 x1 x6 y16 y1 y6 x31 x3 x1 y31 y3 y1 x54 x5 x4 y54 y5 y4 x24 x2 x4 y24 y2 y4 x56 x5 x6 y56 y5 y6 x36 x3 x6 y36 y3 y6 x41 x4 x1 y41 y4 y1 x43 x4 x3 y43 y4 y3 x51 x5 x1 y51 y5 y1 x61 x6 x1 y61 y6 y1 x63 x6 x3 y63 y6 y3 N1 x23yy3y23xx3x46yy6y46xx6 x23y13y23x13x46y16y46x16 N2 x31yy1y31xx1x54yy4y54xx4 x31y21y31x21x54y24y54x24 N3 x21yy1y21xx1x56yy6y56xx6 x21y31y21x31x56y36y56x36 N4 x31yy1y31xx1x23yy3y23xx3 x31y41y31x41x23y43y23x43 N5 x31yy1y31xx1x21yy1y21xx1 x31y51y31x51x21y51y21x51 N6 x21yy1y21xx1x23yy3y23xx3 x21y61y21x61x23y63y23x63 N1x diffN1x N1y diffN1y N2x diffN2x N2y diffN2y N3x diffN3x 254 12 The Quadratic Triangular Element N3y diffN3y N4x diffN4x N4y diffN4y N5x diffN5x N5y diffN5y N6x diffN6x N6y diffN6y B N1x 0 N2x 0 N3x 0 N4x 0 N5x 0 N6x 0 0 N1y 0 N2y 0 N3y 0 N4y 0 N5y 0 N6y N1y N1x N2y N2x N3y N3x N4y N4x N5y N5x N6y N6x if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU1NU NU 0 NU 1NU 0 0 0 12NU2 end BD transposeBDB 11 y1 xx1y2y1x2x1 12 y1 xx1y3y1x3x1 13 y2 xx2y3y2x3x2 r1 intintBD y 11 12 x x1 x3 r2 intintBD y 11 13 x x3 x2 z tr1r2 w doublez function y QuadTriangleAssembleKkijmpqr QuadTriangleAssemble This function assembles the element stiffness matrix k of the quadratic triangular element with nodes i j m p q and r into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K2i12i1 K2i12i1 k11 K2i12i K2i12i k12 K2i12j1 K2i12j1 k13 K2i12j K2i12j k14 K2i12m1 K2i12m1 k15 K2i12m K2i12m k16 K2i12p1 K2i12p1 k17 K2i12p K2i12p k18 K2i12q1 K2i12q1 k19 K2i12q K2i12q k110 K2i12r1 K2i12r1 k111 K2i12r K2i12r k112 K2i2i1 K2i2i1 k21 K2i2i K2i2i k22 K2i2j1 K2i2j1 k23 K2i2j K2i2j k24 K2i2m1 K2i2m1 k25 K2i2m K2i2m k26 K2i2p1 K2i2p1 k27 K2i2p K2i2p k28 K2i2q1 K2i2q1 k29 122 MATLAB Functions Used 255 K2i2q K2i2q k210 K2i2r1 K2i2r1 k211 K2i2r K2i2r k212 K2j12i1 K2j12i1 k31 K2j12i K2j12i k32 K2j12j1 K2j12j1 k33 K2j12j K2j12j k34 K2j12m1 K2j12m1 k35 K2j12m K2j12m k36 K2j12p1 K2j12p1 k37 K2j12p K2j12p k38 K2j12q1 K2j12q1 k39 K2j12q K2j12q k310 K2j12r1 K2j12r1 k311 K2j12r K2j12r k312 K2j2i1 K2j2i1 k41 K2j2i K2j2i k42 K2j2j1 K2j2j1 k43 K2j2j K2j2j k44 K2j2m1 K2j2m1 k45 K2j2m K2j2m k46 K2j2p1 K2j2p1 k47 K2j2p K2j2p k48 K2j2q1 K2j2q1 k49 K2j2q K2j2q k410 K2j2r1 K2j2r1 k411 K2j2r K2j2r k412 K2m12i1 K2m12i1 k51 K2m12i K2m12i k52 K2m12j1 K2m12j1 k53 K2m12j K2m12j k54 K2m12m1 K2m12m1 k55 K2m12m K2m12m k56 K2m12p1 K2m12p1 k57 K2m12p K2m12p k58 K2m12q1 K2m12q1 k59 K2m12q K2m12q k510 K2m12r1 K2m12r1 k511 K2m12r K2m12r k512 K2m2i1 K2m2i1 k61 K2m2i K2m2i k62 K2m2j1 K2m2j1 k63 K2m2j K2m2j k64 K2m2m1 K2m2m1 k65 K2m2m K2m2m k66 K2m2p1 K2m2p1 k67 K2m2p K2m2p k68 K2m2q1 K2m2q1 k69 K2m2q K2m2q k610 K2m2r1 K2m2r1 k611 K2m2r K2m2r k612 K2p12i1 K2p12i1 k71 K2p12i K2p12i k72 K2p12j1 K2p12j1 k73 256 12 The Quadratic Triangular Element K2p12j K2p12j k74 K2p12m1 K2p12m1 k75 K2p12m K2p12m k76 K2p12p1 K2p12p1 k77 K2p12p K2p12p k78 K2p12q1 K2p12q1 k79 K2p12q K2p12q k710 K2p12r1 K2p12r1 k711 K2p12r K2p12r k712 K2p2i1 K2p2i1 k81 K2p2i K2p2i k82 K2p2j1 K2p2j1 k83 K2p2j K2p2j k84 K2p2m1 K2p2m1 k85 K2p2m K2p2m k86 K2p2p1 K2p2p1 k87 K2p2p K2p2p k88 K2p2q1 K2p2q1 k89 K2p2q K2p2q k810 K2p2r1 K2p2r1 k811 K2p2r K2p2r k812 K2q12i1 K2q12i1 k91 K2q12i K2q12i k92 K2q12j1 K2q12j1 k93 K2q12j K2q12j k94 K2q12m1 K2q12m1 k95 K2q12m K2q12m k96 K2q12p1 K2q12p1 k97 K2q12p K2q12p k98 K2q12q1 K2q12q1 k99 K2q12q K2q12q k910 K2q12r1 K2q12r1 k911 K2q12r K2q12r k912 K2q2i1 K2q2i1 k101 K2q2i K2q2i k102 K2q2j1 K2q2j1 k103 K2q2j K2q2j k104 K2q2m1 K2q2m1 k105 K2q2m K2q2m k106 K2q2p1 K2q2p1 k107 K2q2p K2q2p k108 K2q2q1 K2q2q1 k109 K2q2q K2q2q k1010 K2q2r1 K2q2r1 k1011 K2q2r K2q2r k1012 K2r12i1 K2r12i1 k111 K2r12i K2r12i k112 K2r12j1 K2r12j1 k113 K2r12j K2r12j k114 K2r12m1 K2r12m1 k115 K2r12m K2r12m k116 K2r12p1 K2r12p1 k117 K2r12p K2r12p k118 K2r12q1 K2r12q1 k119 122 MATLAB Functions Used 257 K2r12q K2r12q k1110 K2r12r1 K2r12r1 k1111 K2r12r K2r12r k1112 K2r2i1 K2r2i1 k121 K2r2i K2r2i k122 K2r2j1 K2r2j1 k123 K2r2j K2r2j k124 K2r2m1 K2r2m1 k125 K2r2m K2r2m k126 K2r2p1 K2r2p1 k127 K2r2p K2r2p k128 K2r2q1 K2r2q1 k129 K2r2q K2r2q k1210 K2r2r1 K2r2r1 k1211 K2r2r K2r2r k1212 y K function w QuadTriangleElementSressesENUx1y1x2y2x3y3pu QuadTriangleElementStresses This function returns the element stresses for a quadratic triangular element with modulus of elasticity E Poissons ratio NU coordinates of the node 1 x1y1 coordinates of node 2 x2y2 coordinates of node 3 x3y3 and element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain The size of the element stiffness matrix is 12 x 12 syms x y x4 x1 x22 y4 y1 y22 x5 x2 x32 y5 y2 y32 x6 x1 x32 y6 y1 y32 x21 x2 x1 y21 y2 y1 x23 x2 x3 y23 y2 y3 x46 x4 x6 y46 y4 y6 x13 x1 x3 y13 y1 y3 x16 x1 x6 y16 y1 y6 x31 x3 x1 y31 y3 y1 x54 x5 x4 y54 y5 y4 x24 x2 x4 258 12 The Quadratic Triangular Element y24 y2 y4 x56 x5 x6 y56 y5 y6 x36 x3 x6 y36 y3 y6 x41 x4 x1 y41 y4 y1 x43 x4 x3 y43 y4 y3 x51 x5 x1 y51 y5 y1 x61 x6 x1 y61 y6 y1 x63 x6 x3 y63 y6 y3 N1 x23yy3y23xx3x46yy6y46xx6 x23y13y23x13x46y16y46x16 N2 x31yy1y31xx1x54yy4y54xx4 x31y21y31x21x54y24y54x24 N3 x21yy1y21xx1x56yy6y56xx6 x21y31y21x31x56y36y56x36 N4 x31yy1y31xx1x23yy3y23xx3 x31y41y31x41x23y43y23x43 N5 x31yy1y31xx1x21yy1y21xx1 x31y51y31x51x21y51y21x51 N6 x21yy1y21xx1x23yy3y23xx3 x21y61y21x61x23y63y23x63 N1x diffN1x N1y diffN1y N2x diffN2x N2y diffN2y N3x diffN3x N3y diffN3y N4x diffN4x N4y diffN4y N5x diffN5x N5y diffN5y N6x diffN6x N6y diffN6y B N1x 0 N2x 0 N3x 0 N4x 0 N5x 0 N6x 0 0 N1y 0 N2y 0 N3y 0 N4y 0 N5y 0 N6y N1y N1x N2y N2x N3y N3x N4y N4x N5y N5x N6y N6x if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU1NU NU 0 NU 1NU 0 0 0 12NU2 end w DBu We also calculate the stresses at the centroid of the element xcent x1 x2 x33 ycent y1 y2 y33 wcent subsw xy xcentycent w doublewcent 122 MATLAB Functions Used 259 function y QuadTriangleElementPStressessigma QuadTriangleElementPStresses This function returns the element principal stresses and their angle given the element stress vector R sigma 1 sigma 22 Q sigma 1 sigma 222 sigma 3sigma 3 M 2sigma3sigma1 sigma2 s1 R sqrtQ s2 R sqrtQ theta atanM2180pi y s1 s2 theta Example 121 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 122 This is the problem solved in Example 111 using linear triangles It will be solved here using quadratic triangles The plate is discretized using quadratic triangles as shown in Fig 123 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 3 6 and 9 3 the reactions at nodes 1 4 and 7 4 the stresses in each element 5 the principal stresses and principal angle for each element w 025 m 05 m Fig 122 Thin Plate for Example 121 125 kN 3125 kN y x 7 3 9 025 m 05 m 3125 kN 4 8 5 6 2 1 Fig 123 Discretization of Thin Plate Using Two Quadratic Triangles 260 12 The Quadratic Triangular Element Solution Use the six steps outlined in Chap 1 to solve this problem using the quadratic trian gular element Step 1 Discretizing the Domain We subdivide the plate into two elements only for illustration purposes More elements must be used in order to obtain reliable results Thus the domain is subdivided into two elements and nine nodes as shown in Fig 123 The total force due to the distributed load is divided between nodes 3 6 and 9 in the ratio 16 23 16 Since the plate is thin a case of plane stress is assumed The units used in the MATLAB calculations are kN and meter Table 121 shows the element connectivity for this example Table 121 Element Connectivity for Example 121 Element Number Node i Node j Node m Node p Node q Node r 1 1 9 7 5 8 4 2 1 3 9 2 6 5 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function QuadTriangleElementStiffness Each matrix has size 12 12 E210e6 E 210000000 NU03 NU 03000 t0025 t 00250 122 MATLAB Functions Used 261 k1QuadTriangleElementStiffnessENUt00050250 0251 k1 10e007 Columns 1 through 7 02019 0 0 00337 00673 00337 0 0 05769 00288 0 00288 01923 01154 0 00288 01442 0 00481 00288 0 00337 0 0 00505 00337 00168 01346 00673 00288 00481 00337 03462 01875 0 00337 01923 00288 00168 01875 06274 0 0 01154 0 01346 0 0 09231 01346 0 01154 0 0 0 02500 0 0 01923 01346 01923 01154 05385 0 0 01154 00673 01346 00673 02500 02692 01154 0 0 02692 01346 03846 01346 07692 0 0 01154 07692 02500 Columns 8 through 12 01346 0 0 02692 01346 0 0 0 01154 07692 01154 01923 01154 0 0 0 01346 00673 0 0 0 01923 01346 02692 01154 0 01154 00673 01346 07692 02500 05385 02500 03846 02500 16731 02500 15385 02500 01346 02500 09231 02500 0 02500 15385 02500 16731 02500 0 02500 0 02500 09231 02500 01346 02500 0 02500 16731 k2QuadTriangleElementStiffnessENUt0005005 0251 k2 10e007 Columns 1 through 7 262 12 The Quadratic Triangular Element 01442 0 00481 00288 0 00288 01923 0 00505 00337 00168 00337 0 01346 00481 00337 03462 01875 00673 00288 01923 00288 00168 01875 06274 00337 01923 01154 0 00337 00673 00337 02019 0 0 00288 0 00288 01923 0 05769 0 01923 01346 01923 01154 0 0 09231 01154 00673 01346 00673 0 0 02500 0 0 02692 01346 02692 01154 0 0 0 01154 07692 01346 07692 02500 0 01346 0 0 0 01154 05385 01154 0 0 0 01346 0 02500 Columns 8 through 12 01154 0 0 0 01154 00673 0 0 01346 0 01346 02692 01154 0 0 00673 01346 07692 0 0 0 02692 01346 0 01346 0 01154 07692 01154 0 02500 0 02500 05385 02500 16731 02500 0 02500 15385 02500 09231 02500 03846 02500 0 02500 16731 02500 01346 02500 03846 02500 09231 02500 15385 02500 01346 02500 16731 Step 3 Assembling the Global Stiffness Matrix Since the structure has nine nodes the size of the global stiffness matrix is 18 18 Therefore to obtain K we first set up a zero matrix of size 18 18 then make two calls to the MATLAB function QuadTriangleAssemble since we have two elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros1818 KQuadTriangleAssembleKk1197584 K 10e007 122 MATLAB Functions Used 263 Columns 1 through 7 02019 0 0 0 0 0 02692 0 05769 0 0 0 0 01154 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 02692 01154 0 0 0 0 09231 01346 07692 0 0 0 0 02500 0 01154 0 0 0 0 03846 01346 0 0 0 0 0 02500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00673 00288 0 0 0 0 02692 00337 01923 0 0 0 0 01346 0 0 0 0 0 0 0 0 0 0 0 0 0 02500 0 00288 0 0 0 0 0 00337 0 0 0 0 0 0 Columns 8 through 14 01346 0 01346 0 0 00673 00337 07692 01154 0 0 0 00288 01923 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 02500 03846 02500 0 0 02692 01346 16731 02500 01346 0 0 01154 07692 02500 09231 02500 0 0 0 0 01346 02500 16731 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 01154 0 0 0 0 03462 01875 07692 0 0 0 0 01875 06274 02500 05385 02500 0 0 01923 01154 0 02500 15385 0 0 01346 00673 0 0 01154 0 0 00481 00288 0 01346 0 0 0 00337 00168 264 12 The Quadratic Triangular Element Columns 15 through 18 0 0 0 00337 0 0 00288 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 02500 0 0 02500 0 0 0 05385 02500 0 01346 02500 15385 01154 0 0 0 0 0 0 0 0 0 01923 01346 00481 00337 01154 00673 00288 00168 09231 02500 01923 01346 02500 16731 01154 00673 01923 01154 01442 0 01346 00673 0 00505 KQuadTriangleAssembleKk2139265 K 10e007 Columns 1 through 7 03462 0 01923 01154 00481 00288 02692 0 06274 01346 00673 00337 00168 01154 01923 01346 09231 02500 01923 01154 0 01154 00673 02500 16731 01346 00673 0 00481 00337 01923 01346 03462 01875 0 00288 00168 01154 00673 01875 06274 0 02692 01154 0 0 0 0 09231 01346 07692 0 0 0 0 02500 0 02500 05385 02500 0 0 03846 02500 0 02500 15385 0 0 02500 0 0 0 02500 02692 01346 0 0 0 02500 0 01154 07692 0 00673 00288 0 0 0 0 02692 00337 01923 0 0 0 0 01346 0 0 0 0 0 0 0 0 0 0 0 0 0 02500 0 00625 0 0 00673 00337 0 00625 0 0 0 00288 01923 0 122 MATLAB Functions Used 265 Columns 8 through 14 01346 0 02500 0 0 00673 00337 07692 02500 0 0 0 00288 01923 0 05385 02500 0 02500 0 0 0 02500 15385 02500 0 0 0 0 0 0 02692 01154 0 0 0 0 0 01346 07692 0 0 02500 03846 02500 0 0 02692 01346 16731 02500 01346 0 0 01154 07692 02500 18462 05000 03846 02500 0 0 01346 05000 33462 02500 01346 0 0 0 03846 02500 09231 02500 0 0 0 02500 01346 02500 16731 0 0 01154 0 0 0 0 03462 01875 07692 0 0 0 0 01875 06274 02500 05385 02500 0 0 01923 01154 0 02500 15385 0 0 01346 00673 0 0 02500 02692 01346 00481 00288 0 02500 0 01154 07692 00337 00168 Columns 15 through 18 0 0 0 00625 0 0 00625 0 0 0 0 0 0 0 0 0 0 0 00673 00288 0 0 00337 01923 0 02500 0 0 02500 0 0 0 05385 02500 0 02500 02500 15385 02500 0 0 0 02692 01154 0 0 01346 07692 01923 01346 00481 00337 01154 00673 00288 00168 09231 02500 01923 01346 02500 16731 01154 00673 01923 01154 03462 0 01346 00673 0 06274 266 12 The Quadratic Triangular Element Step 4 Applying the Boundary Conditions The matrix 126 for this structure is obtained using the global stiffness matrix shown above The equation is not written out explicitly below because it is too large The boundary conditions for this problem are given as U1x U1y U4x U4y U7x U7y 0 F2x F2y F5x F5y F8x F8y 0 F3x F9x 3125 F6x 125 F3y F6y F9y 0 128 We next insert the above conditions into the equation not shown represented by 126 and we proceed to the solution step below Step 5 Solving the Equations Solvingtheresultingsystemofequationswillbeperformedbypartitioningmanually and Gaussian elimination with MATLAB First we partition the resulting equation by extracting the submatrix in rows 3 to 6 rows 9 to 12 rows 15 to 18 and columns 3 to 6 columns 9 to 12 columns 15 to 18 Therefore we obtain the following matrix equation showing the numbers to two decimal places only although the MATLAB calculations are carried out using at least four decimal places 106 92 25 19 12 54 25 0 25 0 0 0 0 25 167 13 07 25 154 25 0 0 0 0 0 19 13 35 19 0 0 27 12 0 0 07 03 12 07 19 63 0 0 13 77 0 0 03 19 54 25 0 0 185 50 38 25 54 25 0 25 25 154 0 0 50 335 25 13 25 154 25 0 0 25 27 13 38 25 92 25 0 0 27 12 25 0 12 77 25 13 25 167 0 0 13 77 0 0 0 0 54 25 0 0 92 25 19 13 0 0 0 0 25 154 0 0 25 167 12 07 0 0 07 03 0 25 27 13 19 12 35 0 0 0 03 19 25 0 12 77 13 07 0 63 U2x U2y U3x U3y U5x U5y U6x U6y U8x U8y U9x U9y F2x F2y F3x F3y F5x F5y F6x F6y F8x F8y F9x F9y 129 122 MATLAB Functions Used 267 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3636 K36912 K361518 K91236 K912912 K9121518 K151836 K1518912 K15181518 k 10e007 Columns 1 through 7 09231 02500 01923 01154 05385 02500 0 02500 16731 01346 00673 02500 15385 02500 01923 01346 03462 01875 0 0 02692 01154 00673 01875 06274 0 0 01346 05385 02500 0 0 18462 05000 03846 02500 15385 0 0 05000 33462 02500 0 02500 02692 01346 03846 02500 09231 02500 0 01154 07692 02500 01346 02500 0 0 0 0 05385 02500 0 0 0 0 0 02500 15385 0 0 0 00673 00337 0 02500 02692 0 0 00288 01923 02500 0 01154 Columns 8 through 12 02500 0 0 0 0 0 0 0 0 0 01154 0 0 00673 00288 07692 0 0 00337 01923 02500 05385 02500 0 02500 01346 02500 15385 02500 0 02500 0 0 02692 01154 16731 0 0 01346 07692 0 09231 02500 01923 01346 0 02500 16731 01154 00673 01346 01923 01154 03462 0 07692 01346 00673 0 06274 268 12 The Quadratic Triangular Element f0 0 3125 0 0 0 125 0 0 0 3125 0 f 0 0 31250 0 0 0 125000 0 0 0 31250 0 ukf u 10e005 03575 00673 07050 00843 03405 00144 07018 00302 03352 00372 07045 00257 It is now clear that the horizontal and vertical displacements at node 3 are 07050 m comparedwith07111 minExample111and00843 mrespectivelyThehorizontal and vertical displacements at node 6 are 07018 m and 00302 m respectively The horizontalandverticaldisplacementsatnode9are07045 mcomparedwith06531 m in Example 111 and 00257 m respectively When a larger number of elements is used we expect to get the same result for the horizontal displacements at nodes 3 6 and 9 122 MATLAB Functions Used 269 Step 6 Postprocessing In this step we obtain the reactions at nodes 1 4 and 7 and the stresses in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U00u1400u5800u912 U 10e005 0 0 03575 00673 07050 00843 0 0 03405 00144 07018 00302 0 0 03352 00372 07045 00257 FKU F 34721 19808 00000 00000 31250 00000 118059 00611 00000 00000 270 12 The Quadratic Triangular Element 125000 00000 34721 20419 00000 00000 31250 00000 Thus the horizontal and vertical reactions at node 1 are forces of 34721 kN di rected to the left and 19808 kN directed downwards The horizontal and vertical reactions at node 4 are forces of 118059 kN directed to the left and 00611 kN directed downwards The horizontal and vertical reactions at node 7 are forces of 34721 kN directed to the left and 2049 kN directed upwards Obviously force equilibrium is satisfied for this problem It is noted that the results for the reactions are different than those obtained in Example 111 due to the small number of ele ments used We need to use more elements to get reliable results for the reactions and stresses Next we set up the element nodal displacement vectors u1 and u2 then we calculate the element stresses sigma1 and sigma2 by making calls to the MATLAB function QuadTriangleElementStresses Closedform solutions linear functions in x and y for the stresses in each element are obtained using the MATLAB Symbolic Math Toolbox as shown below Then numerical values for the stresses are computed at the centroid of each element u1U1 U2 U17 U18 U13 U14 U9 U10 U15 U16 U7 U8 u1 10e005 0 0 07045 00257 0 0 03405 00144 03352 03352 0 0 u2U1 U2 U5 U6 U17 U18 U3 U4 U11 U12 U9 U10 122 MATLAB Functions Used 271 u2 10e005 0 0 07050 00843 07045 00257 03575 00673 07018 00302 03405 00144 sigma1QuadTriangleElementStressesENU0005025 00251u1 w 150247392356873141099848423881094951760157141521099596496896 207168146512915110557874322173492475880078570760549798248448x 4864803890048691847898376834431237940039285380274899124224y 22537108853530968254458467377612475880078570760549798248448 297891593675285620945558649863931237940039285380274899124224x 72972058350730368294616150047618970019642690137449562112y 21334601311845219291187434866019158456325028528675187087900672 18087109901839820477315890957956319807040628566084398385987584x 32069275444513018882413583598338685626227668133590597632y sigma1 10e003 43633 49012 00057 sigma2QuadTriangleElementStressesENU0005005 0251u2 272 12 The Quadratic Triangular Element w 37929269428889740812168659845871237940039285380274899124224 23238762952249905302188017013372475880078570760549798248448y 38847112167090910509730070904819903520314283042199192993792x 128819942891932516742881291479519807040628566084398385987584 1901660188245083100431630005634951760157141521099596496896y 388589986593058825088334349341719807040628566084398385987584x 12837013832405060458274624885991158456325028528675187087900672 540841666574818584744390664874319807040628566084398385987584y 582825547428499994252247598338919807040628566084398385987584x sigma2 10e003 30114 00028 00057 Thus it is clear that the stresses at the centroid of element 1 are σx 43633 MPa tensile σy 49012 MPa tensile and τxy 00057 MPa negativeThe stresses at the centroid of element 2 are σx 30114 MPa tensile σy 00028 MPa tensile and τxy 00057 MPa positive It is clear that the stresses in the xdirection approach closely the correct value of 3 MPa tensile at the centroid of element 2 because this element is located away from the supports at the left end of the plate Next we calculate the principal stresses and principal angle for each element by making calls to the MATLAB function QuadTriangleElementPStresses s1QuadTriangleElementPStressessigma1 s1 10e003 49013 43632 00006 s2QuadTriangleElementPStressessigma2 s2 10e003 30114 00028 00001 122 MATLAB Functions Used 273 Thus it is clear that the principal stresses at the centroid of element 1 are σ1 49013 MPa tensile σ2 43632 MPa tensile while the principal angle θp 06 The principal stresses at the centroid of element 2 are σ1 30114 MPa tensile σ2 00028 MPa tensile while the principal angle θp 01 Problems Problem 121 Consider the thin plate problem solved in Example 121 Solve the problem again us ing four quadratic triangular elements instead of two elements as shown in Fig 124 Compare your answers for the displacements at nodes 3 8 and 13 with the answers obtained in the example Compare also the stresses obtained for the four elements with those obtained for the two elements in the example Compare also your answers with those obtained in Example 111 and Problem 111 y x 025 m 05 m 125 kN 3125 kN 3125 kN 11 3 13 6 12 7 8 2 1 10 9 5 4 Fig 124 Discretization of Thin Plate Using Four Quadratic Triangles 13 The Bilinear Quadrilateral Element 131 Basic Equations The bilinear quadrilateral element is a twodimensional finite element with both local and global coordinates It is characterized by linear shape functions in each of the x and y directions This element can be used for plane stress or plane strain problems in elasticity It is a generalization of the 4node rectangular element This is the first isoparametricelementwedealwithinthisbookThebilinearquadrilateralelementhas modulus of elasticity E Poissons ratio ν and thickness t Each bilinear quadrilateral element has four nodes with two inplane degrees of freedom at each node as shown in Fig 131 The global coordinates of the four nodes are denoted by x1 y1 x2 y2 x3 y3 and x4 y4 The order of the nodes for each element is important they should be listed in a counterclockwise direction starting from any node The area of each element should be positive you can actually check this by using the MATLAB function BilinearQuadElementArea which is written specifically for this purpose The element is mapped to a rectangle through the use of the natural coordinates ξ and η as shown in Fig 132 In this case the element stiffness matrix is not written explicitly but calculated through symbolic integration with the aid of the MATLAB Symbolic Math Toolbox The four shape functions for this element are listed explicitly as follows in terms of the natural coordinates ξ and η see 1 3x3y3 2x2y2 1x1y1 4x4y4 x y Fig 131 The Bilinear Quadrilateral Element N1 frac141 xi1 eta N2 frac141 xi1 eta N3 frac141 xi1 eta N4 frac141 xi1 eta 131 The B matrix is given as follows for this element B frac1J B1 B2 B3 B4 132 where each Bi is given by Bi beginbmatrix fracpartial Nipartial xi fracpartial Nipartial eta 0 0 c fracpartial Nipartial eta d fracpartial Nipartial xi c fracpartial Nipartial eta a fracpartial Nipartial xi b fracpartial Nipartial eta endbmatrix 133 and the parameters a b c and d are given by a frac14y1xi 1 y21 xi y31 xi y41 xi b frac14y1eta 1 y21 eta y31 eta y41 eta c frac14x1eta 1 x21 eta x31 eta x41 eta d frac14x1xi 1 x21 xi x31 xi x41 xi 134 J frac18x1 x2 x3 x4 beginbmatrix 0 1 eta eta xi xi 1 eta 1 0 xi 1 xi eta xi eta xi 1 0 eta 1 1 xi xi eta eta 1 0 endbmatrix beginbmatrix y1 y2 y3 y4 endbmatrix 135 For cases of plane stress the matrix D is given by D beginbmatrix fracE1 u2 u 0 u 1 0 0 0 frac1 u2 endbmatrix 136 For cases of plane strain the matrix D is given by D beginbmatrix fracE1 u1 2 u u 0 u 1 u 0 0 0 frac1 2 u2 endbmatrix 137 278 13 The Bilinear Quadrilateral Element Once the global stiffness matrix K is obtained we have the following structure equation KU F 139 where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 139 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the stress vector is obtained for each element as follows σ DB u 1310 where σ is the stress vector in the element of size 3 1 and u is the 8 1 element displacement vector The vector σ is written for each element as σ σx σy τxyT It should be noted that this vector is a linear function of ξ and η Usually numerical results are obtained at the centroid of the element where ξ η 0 The MATLAB function BilinearQuadElementStresses gives two results the general linear stress functions in ξ and η and the numerical values of the stresses at the centroid of the element 132 MATLAB Functions Used The six MATLAB functions used for the bilinear quadrilateral element are BilinearQuadElementAreax1 y1 x2 y2 x3 y3 x4 y4 This function returns the element area given the coordinates of the first node x1 y1 the coordinates of the second node x2 y2 the coordinates of the third node x3 y3 and the coordinates of the fourth node x4 y4 BilinearQuadElementStiffnessE NU t x1 y1 x2 y2 x3 y3 x4 y4 p This function calculates the element stiffness matrix for each bilinear quadrilateral element with modulus of elasticity E Poissons ratio NU thickness t and coordinates x1 y1 for the first node x2 y2 for the second node x3 y3 for the third node and x4 y4 for the fourth node Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the 8 8 element stiffness matrix k BilinearQuadElementStiffness2E NU t x1 y1 x2 y2 x3 y3 x4 y4 p This function calculates the element stiffness matrix for each bilinear quadrilateral element with modulus of elasticity E Poissons ratio NU thickness t and coordinates x1 y1 132 MATLAB Functions Used 279 for the first node x2 y2 for the second node x3 y3 for the third node and x4 y4 for the fourth node Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the 8 8 element stiffness matrix k This function uses a different form of the element equations but produces exactly the same result as the function BilinearQuadElementStiffness The MATALB code for this function is not shown here but is available on the accompanying CDROM BilinearQuadAssembleK k i j m n This function assembles the element stiff ness matrix k of the bilinear quadrilateral element joining nodes i j m and n into the global stiffness matrix K It returns the 2n 2n global stiffness matrix K every time an element is assembled BilinearQuadElementStressesE NU x1 y1 x2 y2 x3 y3 x4 y4 p u This function calculates the element stresses using the modulus of elasticity E Poissons ratio NU the coordinates x1 y1 for the first node x2 y2 for the second node x3 y3 for the third node x4 y4 for the fourth node and the element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the stress vector for the element BilinearQuadElementPStressessigma This function calculates the element prin cipal stresses using the element stress vector sigma It returns a 3 1 vector in the form sigma1 sigma2 thetaT where sigma1 and sigma2 are the principal stresses for the element and theta is the principal angle The following is a listing of the MATLAB source code for each function function y BilinearQuadElementAreax1y1x2y2x3y3x4y4 BilinearQuadElementArea This function returns the area of the bilinear quadrilateral element whose first node has coordinates x1y1 second node has coordinates x2y2 third node has coordinates x3y3 and fourth node has coordinates x4y4 yfirst x1y2y3 x2y3y1 x3y1y22 ysecond x1y3y4 x3y4y1 x4y1y32 y yfirst ysecond function w BilinearQuadElementStiffness ENUhx1y1x2y2x3y3x4y4p BilinearQuadElementStiffness This function returns the element stiffness matrix for a bilinear quadrilateral element with modulus of elasticity E Poissons ratio NU thickness h coordinates of node 1 x1y1 coordinates 280 13 The Bilinear Quadrilateral Element node 3 x3y3 and coordinates of node 4 x4y4 Use p 1 for cases of plane stress and p 2 for cases of plane strain The size of the element stiffness matrix is 8 x 8 syms s t a y1s1y21sy31sy41s4 b y1t1y21ty31ty41t4 c x1t1x21tx31tx41t4 d x1s1x21sx31sx41s4 B1 at14bs14 0 0 cs14dt14 cs14dt14 at14bs14 B2 a1t4b1s4 0 0 c1s4d1t4 c1s4d1t4 a1t4b1s4 B3 at14bs14 0 0 cs14dt14 cs14dt14 at14bs14 B4 a1t4b1s4 0 0 c1s4d1t4 c1s4d1t4 a1t4b1s4 Bfirst B1 B2 B3 B4 Jfirst 0 1t ts s1 t1 0 s1 st st s1 0 t1 1s st t1 0 J x1 x2 x3 x4Jfirsty1 y2 y3 y48 B BfirstJ if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU1NU NU 0 NU 1NU 0 0 0 12NU2 end BD JtransposeBDB r intintBD t 1 1 s 1 1 z hr w doublez function y BilinearQuadAssembleKkijmn BilinearQuadAssemble This function assembles the element stiffness matrix k of the bilinear quadrilateral element with nodes i j m and n into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K2i12i1 K2i12i1 k11 K2i12i K2i12i k12 K2i12j1 K2i12j1 k13 K2i12j K2i12j k14 K2i12m1 K2i12m1 k15 K2i12m K2i12m k16 K2i12n1 K2i12n1 k17 132 MATLAB Functions Used 281 K2i12n K2i12n k18 K2i2i1 K2i2i1 k21 K2i2i K2i2i k22 K2i2j1 K2i2j1 k23 K2i2j K2i2j k24 K2i2m1 K2i2m1 k25 K2i2m K2i2m k26 K2i2n1 K2i2n1 k27 K2i2n K2i2n k28 K2j12i1 K2j12i1 k31 K2j12i K2j12i k32 K2j12j1 K2j12j1 k33 K2j12j K2j12j k34 K2j12m1 K2j12m1 k35 K2j12m K2j12m k36 K2j12n1 K2j12n1 k37 K2j12n K2j12n k38 K2j2i1 K2j2i1 k41 K2j2i K2j2i k42 K2j2j1 K2j2j1 k43 K2j2j K2j2j k44 K2j2m1 K2j2m1 k45 K2j2m K2j2m k46 K2j2n1 K2j2n1 k47 K2j2n K2j2n k48 K2m12i1 K2m12i1 k51 K2m12i K2m12i k52 K2m12j1 K2m12j1 k53 K2m12j K2m12j k54 K2m12m1 K2m12m1 k55 K2m12m K2m12m k56 K2m12n1 K2m12n1 k57 K2m12n K2m12n k58 K2m2iy1 K2m2i1 k61 K2m2i K2m2i k62 K2m2j1 K2m2j1 k63 K2m2j K2m2j k64 K2m2m1 K2m2m1 k65 K2m2m K2m2m k66 K2m2n1 K2m2n1 k67 K2m2n K2m2n k68 K2n12i1 K2n12i1 k71 K2n12i K2n12i k72 K2n12j1 K2n12j1 k73 K2n12j K2n12j k74 K2n12m1 K2n12m1 k75 K2n12m K2n12m k76 K2n12n1 K2n12n1 k77 K2n12n K2n12n k78 K2n2i1 K2n2i1 k81 K2n2i K2n2i k82 K2n2j1 K2n2j1 k83 K2n2j K2n2j k84 K2n2m1 K2n2m1 k85 K2n2m K2n2m k86 282 13 The Bilinear Quadrilateral Element K2n2n1 K2n2n1 k87 K2n2n K2n2n k88 y K function w BilinearQuadElementStresses ENUx1y1x2y2x3y3x4y4pu BilinearQuadElementStresses This function returns the element stress vector for a bilinear quadrilateral element with modulus of elasticity E Poissons ratio NU coordinates of node 1 x1y1 coordinates of node 2 x2y2 coordinates of node 3 x3y3 and coordinates of node 4 x4y4 Use p 1 for cases of plane stress and p 2 for cases of plane strain syms s t a y1s1y21sy31sy41s4 b y1t1y21ty31ty41t4 c x1t1x21tx31tx41t4 d x1s1x21sx31sx41s4 B1 at14bs14 0 0 cs14dt14 cs14dt14 at14bs14 B2 a1t4b1s4 0 0 c1s4d1t4 c1s4d1t4 a1t4b1s4 B3 at14bs14 0 0 cs14dt14 cs14dt14 at14bs14 B4 a1t4b1s4 0 0 c1s4d1t4 c1s4d1t4 a1t4b1s4 Bfirst B1 B2 B3 B4 Jfirst 0 1t ts s1 t1 0 s1 st st s1 0 t1 1s st t1 0 J x1 x2 x3 x4Jfirsty1 y2 y3 y48 B BfirstJ if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU1NU NU 0 NU 1NU 0 0 0 1 2NU2 end w DBu We also calculate the stresses at the centroid of the element wcent subsw st 00 w doublewcent function y BilinearQuadElementPStressessigma BilinearQuadElementPStresses This function returns the element principal stresses and their angle given the element stress vector 132 MATLAB Functions Used 283 R sigma1 sigma22 Q sigma1 sigma222 sigma3sigma3 M 2sigma3sigma1 sigma2 s1 R sqrtQ s2 R sqrtQ theta atanM2180pi y s1 s2 theta Example 131 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 133 This problem was solved in Example 111 using linear triangular elements Solve this problem again using two bilinear quadrilateral elements as shown in Fig 134 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 3 and 6 3 the reactions at nodes 1 and 4 4 the stresses in each element 5 the principal stresses and principal angle for each element w 025 m 05 m Fig 133 Thin Plate for Example 131 9375 kN 9375 kN 4 3 6 1 025 m 5 2 025 m 025 m Fig 134 Discretization of Thin Plate Using Two Bilinear Quadrilaterals Solution Use the six steps outlined in Chap 1 to solve this problem using the bilinear quadri lateral element 284 13 The Bilinear Quadrilateral Element Step 1 Discretizing the Domain We subdivide the plate into two elements only for illustration purposes More elements must be used in order to obtain reliable results Thus the domain is subdivided into two elements and six nodes as shown in Fig 134 The total force due to the distributed load is divided equally between nodes 3 and 6 Since the plate is thin a case of plane stress is assumed The units used in the MATLAB calculations are kN and meter Table 131 shows the element connectivity for this example Table 131 Element Connectivity for Example 131 Element Number Node i Node j Node m Node n 1 1 2 5 4 2 2 3 6 5 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function BilinearQuadElementStiffness Each matrix has size 8 8 E210e6 E 210000000 NU03 NU 03000 h0025 h 00250 k1BilinearQuadElementStiffness ENUh00025002502500251 132 MATLAB Functions Used 285 k1 10e006 Columns 1 through 7 25962 09375 15865 00721 12981 09375 02885 09375 25962 00721 02885 09375 12981 00721 15865 00721 25962 09375 02885 00721 12981 00721 02885 09375 25962 00721 15865 09375 12981 09375 02885 00721 25962 09375 15865 09375 12981 00721 15865 09375 25962 00721 02885 00721 12981 09375 15865 00721 25962 00721 15865 09375 12981 00721 02885 09375 Column 8 00721 15865 09375 12981 00721 02885 09375 25962 k2BilinearQuadElementStiffness ENUh0250050050250250251 k2 10e006 Columns 1 through 7 25962 09375 15865 00721 12981 09375 02885 09375 25962 00721 02885 09375 12981 00721 15865 00721 25962 09375 02885 00721 12981 00721 02885 09375 25962 00721 15865 09375 12981 09375 02885 00721 25962 09375 15865 09375 12981 00721 15865 09375 25962 00721 02885 00721 12981 09375 15865 00721 25962 00721 15865 09375 12981 00721 02885 09375 286 13 The Bilinear Quadrilateral Element Column 8 00721 15865 09375 12981 00721 02885 09375 25962 Step 3 Assembling the Global Stiffness Matrix Since the structure has six nodes the size of the global stiffness matrix is 12 12 Therefore to obtain K we first set up a zero matrix of size 12 12 then make two calls to the MATLAB function BilinearQuadAssemble since we have two elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros1212 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KBilinearQuadAssembleKk11254 K 10e006 132 MATLAB Functions Used 287 Columns 1 through 7 25962 09375 15865 00721 0 0 02885 09375 25962 00721 02885 0 0 00721 15865 00721 25962 09375 0 0 12981 00721 02885 09375 25962 0 0 09375 0 0 0 0 0 0 0 0 0 0 0 0 0 0 02885 00721 12981 09375 0 0 25962 00721 15865 09375 12981 0 0 09375 12981 09375 02885 00721 0 0 15865 09375 12981 00721 15865 0 0 00721 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 12 00721 12981 09375 0 0 15865 09375 12981 0 0 09375 02885 00721 0 0 12981 00721 15865 0 0 0 0 0 0 0 0 0 0 0 0 09375 15865 00721 0 0 25962 00721 02885 0 0 00721 25962 09375 0 0 02885 09375 25962 0 0 0 0 0 0 0 0 0 0 0 0 KBilinearQuadAssembleKk22365 K 10e006 Columns 1 through 7 25962 09375 15865 00721 0 0 02885 09375 25962 00721 02885 0 0 00721 15865 00721 51923 0 15865 00721 12981 00721 02885 0 51923 00721 02885 09375 0 0 15865 00721 25962 09375 0 288 13 The Bilinear Quadrilateral Element 0 0 00721 02885 09375 25962 0 02885 00721 12981 09375 0 0 25962 00721 15865 09375 12981 0 0 09375 12981 09375 05769 0 12981 09375 15865 09375 12981 0 31731 09375 12981 00721 0 0 12981 09375 02885 00721 0 0 0 09375 12981 00721 15865 0 Columns 8 through 12 00721 12981 09375 0 0 15865 09375 12981 0 0 09375 05769 0 12981 09375 12981 0 31731 09375 12981 0 12981 09375 02885 00721 0 09375 12981 00721 15865 09375 15865 00721 0 0 25962 00721 02885 0 0 00721 51923 0 15865 00721 02885 0 51923 00721 02885 0 15865 00721 25962 09375 0 00721 02885 09375 25962 Step 4 Applying the Boundary Conditions The matrix 139 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 106 260 094 159 007 0 0 029 007 130 094 0 0 094 260 007 029 0 0 007 159 094 130 0 0 159 007 519 0 159 007 130 094 058 0 130 094 007 029 0 519 007 029 094 130 0 317 094 130 0 0 159 007 260 094 0 0 130 094 029 007 0 0 007 029 094 260 0 0 094 130 007 159 029 007 130 094 0 0 260 094 159 007 0 0 007 159 094 130 0 0 094 260 007 029 0 0 130 094 058 0 130 094 159 007 519 0 159 007 094 130 0 317 094 130 007 029 0 519 007 029 0 0 130 094 029 007 0 0 159 007 260 094 0 0 094 130 007 159 0 0 007 029 094 260 U1x U1y U2x U2y U3x U3y U4x U4y U5x U5y U6x U6y F1x F1y F2x F2y F3x F3y F4x F4y F5x F5y F6x F6y 1311 132 MATLAB Functions Used 289 The boundary conditions for this problem are given as U1x U1y U4x U4y 0 F2x F2y F5x F5y 0 F3x 9375 F3y 0 F6x 9375 F6y 0 1312 Inserting the above conditions into 1311 we obtain 106 260 094 159 007 0 0 029 007 130 094 0 0 094 260 007 029 0 0 007 059 094 130 0 0 159 007 519 0 159 007 130 094 058 0 130 094 007 029 0 519 007 029 094 130 0 317 094 130 0 0 159 007 260 094 0 0 130 094 029 007 0 0 007 029 094 260 0 0 094 130 007 159 029 007 130 094 0 0 260 094 159 007 0 0 007 159 094 130 0 0 094 260 007 029 0 0 130 094 058 0 130 094 159 007 519 0 159 007 094 130 0 317 094 130 007 029 0 519 007 029 0 0 130 094 029 007 0 0 159 007 260 094 0 0 094 130 007 159 0 0 007 029 094 260 0 0 U2x U2y U3x U3y 0 0 U5x U5y U6x U6y F1x F1y 0 0 9375 0 F4x F4y 0 0 9375 0 1313 Step 5 Solving the Equations Solving the system of equations in 1313 will be performed by partitioning man ually and Gaussian elimination with MATLAB First we partition 1313 by ex tracting the submatrices in rows 3 to 6 rows 9 to 12 and columns 3 to 6 columns 9 to 12 Therefore we obtain 106 519 0 159 007 058 0 130 094 0 519 007 029 0 317 094 130 159 007 260 094 130 094 029 007 007 029 094 260 094 130 007 159 058 0 130 094 519 0 159 007 0 317 094 130 0 519 007 029 130 094 029 007 159 007 260 094 094 130 007 159 007 029 094 260 290 13 The Bilinear Quadrilateral Element U2x U2y U3x U3y U5x U5y U6x U6y 0 0 9375 0 0 0 9375 0 1314 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3636 K36912 K91236 K912912 k 10e006 Columns 1 through 7 51923 0 15865 00721 05769 0 12981 0 51923 00721 02885 0 31731 09375 15865 00721 25962 09375 12981 09375 02885 00721 02885 09375 25962 09375 12981 00721 05769 0 12981 09375 51923 0 15865 0 31731 09375 12981 0 51923 00721 12981 09375 02885 00721 15865 00721 25962 09375 12981 00721 15865 00721 02885 09375 Column 8 09375 12981 00721 15865 00721 02885 09375 25962 f0 0 9375 0 0 0 9375 0 132 MATLAB Functions Used 291 f 0 0 93750 0 0 0 93750 0 ukf u 10e005 03440 00632 07030 00503 03440 00632 07030 00503 It is now clear that the horizontal and vertical displacements at node 3 are 07030 m compared with 07111 m in Example 111 and 00503 m respectively and the hor izontal and vertical displacements at node 6 are 07030 m compared with 06531 m in Example 111 and 00503 m respectively Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 4 and the stresses in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U00u1400u58 U 10e005 0 0 03440 292 13 The Bilinear Quadrilateral Element 00632 07030 00503 0 0 03440 00632 07030 00503 FKU F 93750 19741 00000 0 93750 00000 93750 19741 00000 00000 93750 00000 Thusthehorizontalandverticalreactionsatnode1areforcesof9375 kNdirected to the left and 19741 kN directed downwards The horizontal and vertical reactions atnode4areforcesof9375 kNdirectedtotheleftand19741 kNdirectedupwards Obviously force equilibrium is satisfied for this problem Next we set up the element nodal displacement vectors u1 and u2 then we calculate the element stresses sigma1 and sigma2 by making calls to the MATLAB function BilinearQuadElementStresses Closedform solutions linear functions in ξ and η denoted by s and t in the results below for the stresses in each element are obtained using the MATLAB Symbolic Math Toolbox as shown below Then numerical values for the stresses are computed at the centroid of each element u1U1 U2 U3 U4 U9 U10 U7 U8 u1 10e005 132 MATLAB Functions Used 293 0 0 03440 00632 03440 00632 0 0 u2U3 U4 U5 U6 U11 U12 U9 U10 u2 10e005 03440 00632 07030 00503 07030 00503 03440 00632 sigma1BilinearQuadElementStressesENU000250 02502500251u1 w 237684487542792996191689909541265792281625142643375935 439503366968997415384614939614081257132168796771975168 t1386197521682649530761032489878179228162514264337593 543950336s 585147095435950280896220247524471584563250285286751870 879006721045349612307692119807040628566084398385987584 t9241316811217664731861929143048915845632502852867518 7087900672s 81304969846153831584563250285286751870879006722439149 095384614939614081257132168796771975168s3234460883926 1822384424091430489158456325028528675187087900672t sigma1 10e003 294 13 The Bilinear Quadrilateral Element 30000 03693 00000 sigma2BilinearQuadElementStressesENU0250050 050250250251u2 w 774333046153846139614081257132168796771975168t23768 4487542792979807838973608303792281625142643375935439503 36282146398218592407036307198416379228162514264337593 543950336s 116149956923076919807040628566084398385987584t8464 391946557790940868183889299158456325028528675187087900 67218809759881239496231576767963047158456325028528675 187087900672s 271016566153846139614081257132168796771975168s40652 484923076915158456325028528675187087900672658341595843 3822830847167963047158456325028528675187087900672t sigma2 10e003 30000 00534 00000 Thus it is clear that the stresses at the centroid of element 1 are σx 30000 MPa tensile σy 03693 MPa tensile and τxy 00000 MPa The stresses at the centroid of element 2 are σx 30000 MPa tensile σy 00534 MPa compres sive and τxy 00000 MPa It is clear that the stresses in the xdirection approach closely the correct value of 3 MPa tensile at the centroids of both elements Next we calculate the principal stresses and principal angle for each element by making calls to the MATLAB function BilinearQuadElementPStresses s1BilinearQuadElementPStressessigma1 s1 10e003 132 MATLAB Functions Used 295 30000 03693 00000 s2BilinearQuadElementPStressessigma2 s2 10e003 30000 00534 00000 Thus it is clear that the principal stresses at the centroid of element 1 are σ1 30000 MPa tensile σ2 03693 MPa tensile while the principal angle θp 0 The principal stresses at the centroid of element 2 are σ1 30000 MPa tensile σ2 00534 MPa compressive while the principal angle θp 0 Example 132 Consider the thin plate subjected to both a uniformly distributed load and a concen trated load as shown in Fig 135This problem was solved previously in Example 112 using linear triangular elements Solve this problem again using three bilinear quadri lateral elements as shown in Fig 136 Given E 210 GPa ν 03 t 0025 m and w 100 kNm determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at each node 3 the reactions at nodes 1 4 and 7 4 the stresses in each element 5 the principal stresses in each element P 025 m 025 m 05 m 05 m w Fig 135 Thin Plate with a Distributed Load and a Concentrated Load for Example 132 296 13 The Bilinear Quadrilateral Element 7 8 5 1 2 6 3 025 m 025 m 025 m 025 m 4 125 kN Fig 136 Discretization of Thin Plate Using Three Bilinear Quadrilaterals Solution Use the six steps outlined in Chap 1 to solve this problem using the bilinear quadri lateral element Step 1 Discretizing the Domain We subdivide the plate into three elements and eight nodes as shown in Fig 136 The total force due to the distributed load is divided equally between nodes 5 and 6 However the resultant applied force at node 6 cancels out and we are left with a concentrated force of 125 kN applied vertically downwards at node 5 Since the plate is thin a case of plane stress is assumed The units used in the MATLAB calculations are kN and meter Table 132 shows the element connectivity for this example Table 132 Element Connectivity for Example 132 Element Number Node i Node j Node m Node n 1 1 2 5 4 2 2 3 6 5 3 4 5 8 7 Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices are obtained by making calls to the MATLAB function BilinearQuadElementStiffness Each matrix has size 8 8 E210e6 E 210000000 132 MATLAB Functions Used 297 NU03 NU 03000 h0025 h 00250 k1BilinearQuadElementStiffness ENUh00025002502500251 k1 10e006 Columns 1 through 7 25962 09375 15865 00721 12981 09375 02885 09375 25962 00721 02885 09375 12981 00721 15865 00721 25962 09375 02885 00721 12981 00721 02885 09375 25962 00721 15865 09375 12981 09375 02885 00721 25962 09375 15865 09375 12981 00721 15865 09375 25962 00721 02885 00721 12981 09375 15865 00721 25962 00721 15865 09375 12981 00721 02885 09375 Column 8 00721 15865 09375 12981 00721 02885 09375 25962 k2BilinearQuadElementStiffness ENUh0250050050250250251 298 13 The Bilinear Quadrilateral Element k2 10e006 Columns 1 through 7 25962 09375 15865 00721 12981 09375 02885 09375 25962 00721 02885 09375 12981 00721 15865 00721 25962 09375 02885 00721 12981 00721 02885 09375 25962 00721 15865 09375 12981 09375 02885 00721 25962 09375 15865 09375 12981 00721 15865 09375 25962 00721 02885 00721 12981 09375 15865 00721 25962 00721 15865 09375 12981 00721 02885 09375 Column 8 00721 15865 09375 12981 00721 02885 09375 25962 k3BilinearQuadElementStiffness ENUh0025025025025050051 k3 10e006 Columns 1 through 7 25962 09375 15865 00721 12981 09375 02885 09375 25962 00721 02885 09375 12981 00721 15865 00721 25962 09375 02885 00721 12981 00721 02885 09375 25962 00721 15865 09375 12981 09375 02885 00721 25962 09375 15865 09375 12981 00721 15865 09375 25962 00721 02885 00721 12981 09375 15865 00721 25962 00721 15865 09375 12981 00721 02885 09375 132 MATLAB Functions Used 299 Column 8 00721 15865 09375 12981 00721 02885 09375 25962 Step 3 Assembling the Global Stiffness Matrix Since the structure has eight nodes the size of the global stiffness matrix is 16 16 Therefore to obtain K we first set up a zero matrix of size 1616 then make three calls to the MATLAB function BilinearQuadAssemble since we have three elements in the structure Each call to the function will assemble one element The following are the MATLAB commands The result is shown only after the last element is assembled Kzeros1616 KBilinearQuadAssembleKk11254 KBilinearQuadAssembleKk22365 KBilinearQuadAssembleKk34587 K 10e006 Columns 1 through 7 25962 09375 15865 00721 0 0 02885 09375 25962 00721 02885 0 0 00721 15865 00721 51923 0 15865 00721 12981 00721 02885 0 51923 00721 02885 09375 0 0 15865 00721 25962 09375 0 0 0 00721 02885 09375 25962 0 02885 00721 12981 09375 0 0 51923 00721 15865 09375 12981 0 0 0 12981 09375 05769 0 12981 09375 31731 09375 12981 0 31731 09375 12981 0 0 0 12981 09375 02885 00721 0 300 13 The Bilinear Quadrilateral Element 0 0 09375 12981 00721 15865 0 0 0 0 0 0 0 02885 0 0 0 0 0 0 00721 0 0 0 0 0 0 12981 0 0 0 0 0 0 09375 Columns 8 through 14 00721 12981 09375 0 0 0 0 15865 09375 12981 0 0 0 0 09375 05769 0 12981 09375 0 0 12981 0 31731 09375 12981 0 0 0 12981 09375 02885 00721 0 0 0 09375 12981 00721 15865 0 0 0 31731 0 0 0 02885 00721 51923 0 05769 0 0 00721 15865 0 77885 09375 15865 00721 12981 09375 05769 09375 77885 00721 02885 09375 12981 0 15865 00721 25962 09375 0 0 0 00721 02885 09375 25962 0 0 00721 12981 09375 0 0 25962 09375 15865 09375 12981 0 0 09375 25962 09375 02885 00721 0 0 15865 00721 12981 00721 15865 0 0 00721 02885 Columns 15 through 16 0 0 0 0 0 0 0 0 0 0 0 0 12981 09375 09375 12981 02885 00721 00721 15865 0 0 0 0 15865 00721 00721 02885 25962 09375 09375 25962 132 MATLAB Functions Used 301 Step 4 Applying the Boundary Conditions The matrix 139 for this structure is obtained using the global stiffness matrix shown above The boundary conditions for this problem are given as U1x U1y U4x U4y U7x U7y 0 F2x F2y F3x F3y F6x F6y F8x F8y 0 F5x 0 F5y 125 1315 Step 5 Solving the Equations Solvingtheresultingsystemofequationswillbeperformedbypartitioningmanually and Gaussian elimination with MATLAB First we partition the matrix equation by extracting the submatrices in rows 3 to 6 rows 9 to 12 rows 15 to 16 and columns 3 to 6 columns 9 to 12 columns 15 to 16 Therefore we obtain 106 519 0 159 007 058 0 130 094 0 0 0 519 007 029 0 317 094 130 0 0 159 007 260 094 130 094 029 007 0 0 007 029 094 260 094 130 007 159 0 0 058 0 130 094 779 094 159 007 029 007 0 317 094 130 094 779 007 029 007 159 130 094 029 007 159 007 260 094 0 0 094 130 007 159 007 029 094 260 0 0 0 0 0 0 029 007 0 0 260 094 0 0 0 0 007 159 0 0 094 260 U2x U2y U3x U3y U5x U5y U6x U6y U8x U8y F2x F2y F3x F3y F5x F5y F6x F6y F8x F8y 1316 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3636 K36912 K361516 K91236 K912912 K9121516 K151636 K1516912 K15161516 302 13 The Bilinear Quadrilateral Element k 10e006 Columns 1 through 7 51923 0 15865 00721 05769 0 12981 0 51923 00721 02885 0 31731 09375 15865 00721 25962 09375 12981 09375 02885 00721 02885 09375 25962 09375 12981 00721 05769 0 12981 09375 77885 09375 15865 0 31731 09375 12981 09375 77885 00721 12981 09375 02885 00721 15865 00721 25962 09375 12981 00721 15865 00721 02885 09375 0 0 0 0 02885 00721 0 0 0 0 0 00721 15865 0 Columns 8 through 10 09375 0 0 12981 0 0 00721 0 0 15865 0 0 00721 02885 00721 02885 00721 15865 09375 0 0 25962 0 0 0 25962 09375 0 09375 25962 f0 0 0 0 0 125 0 0 0 0 f 0 0 0 0 0 125000 0 0 0 0 132 MATLAB Functions Used 303 ukf u 10e005 01396 03536 01329 05406 00018 04216 00086 05176 01202 03010 The horizontal and vertical displacements are shown clearly above for the five free nodes in the structure These results can be compared with those obtained in Example 112 using linear triangular elements We note that the vertical displacement at node 5 is obtained here as 04216 m while the result obtained in Example 112 was 04170 m It is clear that these results are very close to each other indicating that the two types of elements and meshes used give similar results in this case Step 6 Postprocessing In this step we obtain the reactions at nodes 1 4 and 7 using MATLAB as follows We set up the global nodal displacement vector U then we calculate the global nodal force vector F U00u1400u5800u910 U 10e005 0 0 01396 03536 01329 05406 0 0 00018 304 13 The Bilinear Quadrilateral Element 04216 00086 05176 0 0 01202 03010 FKU F 63994 43354 00000 00000 0 00000 02988 36296 00000 125000 00000 00000 61006 45350 00000 00000 The reactions are shown clearly aboveThese results can also be compared to those obtained in Example 112 We note that the horizontal and vertical reactions at node 1 are 63394 kN and 43354 kN respectively while those obtained in Example 112 were 64061 kN and 42228 kN respectively It is also seen that the results obtained using the two types of elements and meshes give very similar results The stresses in each element are obtained by making successive calls to the MATLAB function BilinearQuadElementStresses as follows u1U1 U2 U3 U4 U9 U10 U7 U8 u1 10e005 132 MATLAB Functions Used 305 0 0 01396 03536 00018 04216 0 0 u2U3 U4 U5 U6 U11 U12 U9 U10 u2 10e005 01396 03536 01329 05406 00086 05176 00018 04216 u3U7 U8 U9 U10 U15 U16 U13 U14 u3 10e005 0 0 00018 04216 01202 03010 0 0 sigma1BilinearQuadElementStresses ENU00025002502500251u1 306 13 The Bilinear Quadrilateral Element w 3702445501098258470367893952681855507060240091291760 59868128215043309659854333919888219742166795649507060 2400912917605986812821504t186494650732390728083186584 002319807040628566084398385987584s 1279463389075034544413437997763611253530120045645880 29934064107524964489781500879191198538429124212535301 200456458802993406410752t1243297671549271681118262029 338739614081257132168796771975168s 5191792435548528286210453115489023507060240091291760 59868128215041158380949016871811279658966795649507060 2400912917605986812821504s435154185042245032194102029 338739614081257132168796771975168t sigma1 10e003 07302 05047 10239 sigma2BilinearQuadElementStresses ENU0250050050250250251u2 w 57997545156923072895070602400912917605986812821504t 8881071464668407150706024009129176059868128215042495 737237742290400501930869623198070406285660843983859875 84s 8699631773538459812535301200456458802993406410752t 4791815496465182417759008406721572535301200456458802 9934064107521663824825161527148539943869578739614081 257132168796771975168s 20299140804923072895070602400912917605986812821504 s2767079140430768681507060240091291760598681282150 458233868880653442678378386957873961408125713216879 6771975168t sigma2 00000 1890038 00000 sigma3BilinearQuadElementStresses ENU0025025025025050051u3 132 MATLAB Functions Used 307 w 37024455010982584505459247357200015070602400912917605 98681282150427710374781756561856735113630533755070602 400912917605986812821504t1653842507445352701421108405 2879903520314283042199192993792s 18396306602796367789306535146608372535301200456458802 99340641075241565562172634837417184772702287525353012 00456458802993406410752t11025616716302352766692986279 00319807040628566084398385987584s 4949412366277303518648709229360065507060240091291760 59868128215049698631173614795397343113630533755070602 400912917605986812821504s3858965850705822969982586279 00319807040628566084398385987584t sigma3 7301786 7256064 9760995 Thus it is clear that the stresses at the centroid of element 1 are σx 07302 MPa compressive σy 05047 MPa compressive and τxy 10239 MPa negative The stresses at the centroid of element 2 are σx 00000 MPa σy 01890 MPa compressive and τxy 00000 MPa The stresses at the centroid of element 3 are σx 07302 MPa tensile σy 07256 MPa tensile and τxy 09761 MPa negative We cannot compare these results with Example 112 because the stresses were not calculated in that example However accurate results for the stresses can be obtained by refining the mesh and using more elements Next we calculate the prin cipal stresses and principal angle for each element by making calls to the MATLAB function BilinearQuadElementPStresses s1BilinearQuadElementPStressessigma1 s1 10e003 04127 16475 00419 s2BilinearQuadElementPStressessigma2 s2 00000 1890038 00000 308 13 The Bilinear Quadrilateral Element s3BilinearQuadElementPStressessigma3 s3 10e003 17040 02482 00449 Thus it is clear that the principal stresses at the centroid of element 1 are σ1 04127 MPa tensile σ2 16475 MPa compressive while the prin cipal angle θp 419 The principal stresses at the centroid of element 2 are σ1 00000 MPa σ2 01890 MPa compressive while the principal angle θp 0 The principal stresses at the centroid of element 3 are σ1 17040 MPa tensile σ2 02482 MPa compressive while the principal angle θp 449 Problems Problem 131 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 133 This problem was solved in Example 131 using two bilinear quadrilateral elements Solve this problem again using eight bilinear quadrilateral elements as shown in Fig 137 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 5 10 and 15 3 the reactions at nodes 1 6 and 11 4 the stresses in each element 5 the principal stresses and principal angle for each element Compare your answers with those obtained in Example 131 Example 111 Prob lem 111 Example 121 and Problem 121 8 2 3 4 5 6 7 9 10 11 12 1 13 14 15 46875 kN 9375 kN 46875 kN 0125 m 0125 m 0125 m 0125 m 0125 m 0125 m Fig 137 Discretization of Thin Plate Using Eight Bilinear Quadrilaterals 132 MATLAB Functions Used 309 Problem 132 Consider the thin plate with a hole in the middle that is subjected to a concentrated load at the corner as shown in Fig 138 Given E 70 GPa ν 025 t 002 m and P 20 kN use the finite element mesh comprised of bilinear quadrilaterals shown in Fig 139 to determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 4 6 7 10 11 and 16 3 the reactions at nodes 1 5 9 and 13 4 the stresses in each element 5 the principal stresses and principal angle for each element Compare the results obtained for the displacements and reactions with those ob tained in Problem 112 P hole 03 m 03 m 03 m 03 m 03 m 03 m Fig 138 Thin Plate with a Hole for Problem 132 8 2 3 4 5 6 7 9 16 20 kN 03 m 03 m 03 m 03 m 03 m 03 m 1 15 14 13 12 11 10 Fig 139 Discretization of Thin Plate with a Hole Using Eight Bilinear Quadrilaterals 310 13 The Bilinear Quadrilateral Element Problem 133 Consider the thin plate supported on three springs and subjected to a uniformly dis tributed load as shown in Fig 1310 Given E 200 GPa ν 03 t 001 m k 4000 kNm and w 5000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 1 2 3 4 5 and 6 3 the reactions at nodes 7 8 and 9 4 the stresses in each element 5 the principal stresses and principal angle for each element 6 the force in each spring Use two bilinear quadrilaterals to solve this problem Compare your answers with those obtained for Problem 113 k k k w 04 m 1 6 3 4 035 m 9 7 8 5 2 035 m Fig 1310 Thin Plate Supported on Three Springs for Problem 133 14 The Quadratic Quadrilateral Element 141 Basic Equations Thequadraticquadrilateralelementisatwodimensionalfiniteelementwithbothlocal and global coordinates It is characterized by quadratic shape functions in each of the x and y directions This element can be used for plane stress or plane strain problems in elasticity This is the second isoparametric element we deal with in this book The quadratic quadrilateral element has modulus of elasticity E Poissons ratio ν and thickness t Each quadratic quadrilateral element has eight nodes with two inplane degrees of freedom at each node as shown in Fig 141 The global coordinates of the eight nodes are denoted by x1 y1 x2 y2 x3 y3 x4 y4 x5 y5 x6 y6 x7 y7 and x8 y8 The order of the nodes for each element is important they should be listed in a counterclockwise direction starting from the corner nodes followed by the midside nodes The area of each element should be positive you can actually check this by using the MATLAB function QuadraticQuadElementArea which is written specifically for this purpose The element is mapped to a rectangle through the use of the natural coordinates ξ and η as shown in Fig 142 In this case the element stiffness matrix is not written explicitly but calculated through symbolic integration with the aid of the MATLAB Symbolic Math Toolbox The eight shape functions for this element are listed explicitly as follows in terms of the natural coordinates ξ and η see 1 8 x y 2 3 4 5 6 7 1 Fig 141 The Quadratic Quadrilateral Element 312 14 The Quadratic Quadrilateral Element 7 ξ η 211 111 311 411 5 6 8 Fig 142 The Quadratic Quadrilateral Element with Natural Coordinates N1 1 41 ξ1 ηξ η 1 N2 1 41 ξ1 ηξ η 1 N3 1 41 ξ1 ηξ η 1 N4 1 41 ξ1 ηξ η 1 N5 1 21 η1 ξ1 ξ N6 1 21 ξ1 η1 η N7 1 21 η1 ξ1 ξ N8 1 21 ξ1 η1 η 141 The Jacobian matrix for this element is given by J x ξ y ξ x η y η 142 where x and y are given by x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 143 The B matrix is given as follows for this element B DN 144 where D and N are given by 314 14 The Quadratic Quadrilateral Element K will be of size 2n 2n since we have two degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function QuadraticQuadAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F 1410 where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 1410 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the stress vector is obtained for each element as follows σ DB u 1411 where σ is the stress vector in the element of size 3 1 and u is the 16 1 element displacement vector The vector σ is written for each element as σ σxσyτxyT It should be noted that in this case this vector is a quadratic function of ξ and η Usually numerical results are obtained at the centroid of the element where ξ η 0 The MATLAB function QuadraticQuadElementStresses gives two results the general quadratic stress functions in ξ and η and the numerical values of the stresses at the centroid of the element 142 MATLAB Functions Used The five MATLAB functions used for the quadratic quadrilateral element are QuadraticQuadElementAreax1 y1 x2 y2 x3 y3 x4 y4 This function returns the element area given the coordinates of the first node x1 y1 the coordinates of the second node x2 y2 the coordinates of the third node x3 y3 and the coordinates of the fourth node x4 y4 QuadraticQuadElementStiffnessE NU t x1 y1 x2 y2 x3 y3 x4 y4 p This function calculates the element stiffness matrix for each quadratic quadrilateral ele ment with modulus of elasticity E Poissons ratio NU thickness t and coordinates x1 y1 for the first node x2 y2 for the second node x3 y3 for the third node and x4 y4 for the fourth node Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the 16 16 element stiffness matrix k 142 MATLAB Functions Used 315 QuadraticQuadAssembleK k i j m p q r s t This function assembles the element stiffness matrix k of the quadratic quadrilateral element joining nodes i j m p q r s and t into the global stiffness matrix K It returns the 2n 2n global stiffness matrix K every time an element is assembled QuadraticQuadElementStressesE NU x1 y1 x2 y2 x3 y3 x4 y4 p u This function calculates the element stresses using the modulus of elasticity E Poissons ratio NU the coordinates x1 y1 for the first node x2 y2 for the second node x3 y3 for the third node x4 y4 for the fourth node and the element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the stress vector for the element QuadraticQuadElementPStressessigma This function calculates the element prin cipal stresses using the element stress vector sigma It returns a 3 1 vector in the form sigma1 sigma2 thetaT where sigma1 and sigma2 are the principal stresses for the element and theta is the principal angle The following is a listing of the MATLAB source code for each function function y QuadraticQuadElementAreax1y1x2y2x3y3x4y4 QuadraticQuadElementArea This function returns the area of the quadratic quadrilateral element whose first node has coordinates x1y1 second node has coordinates x2y2 third node has coordinates x3y3 and fourth node has coordinates x4y4 yfirst x1y2y3 x2y3y1 x3y1y22 ysecond x1y3y4 x3y4y1 x4y1y32 y yfirst ysecond function w QuadraticQuadElementStiffness ENUhx1y1x2y2x3y3x4y4p QuadraticQuadElementStiffness This function returns the element stiffness matrix for a quadratic quadrilateral element with modulus of elasticity E Poissons ratio NU thickness h coordinates of node 1 x1y1 coordinates of node 2 x2y2 coordinates of node 3 x3y3 and coordinates of node 4 x4y4 Use p 1 for cases of plane stress and p 2 for cases of plane strain The size of the element stiffness matrix is 16 x 16 316 14 The Quadratic Quadrilateral Element syms s t x5 x1 x22 x6 x2 x32 x7 x3 x42 x8 x4 x12 y5 y1 y22 y6 y2 y32 y7 y3 y42 y8 y4 y12 N1 1s1tst14 N2 1s1tst14 N3 1s1tst14 N4 1s1tst14 N5 1t1s1s2 N6 1s1t1t2 N7 1t1s1s2 N8 1s1t1t2 x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 xs diffxs xt diffxt ys diffys yt diffyt J xsyt ysxt N1s diffN1s N2s diffN2s N3s diffN3s N4s diffN4s N5s diffN5s N6s diffN6s N7s diffN7s N8s diffN8s N1t diffN1t N2t diffN2t N3t diffN3t N4t diffN4t N5t diffN5t N6t diffN6t N7t diffN7t N8t diffN8t B11 ytN1s ysN1t B12 0 B13 ytN2s ysN2t B14 0 B15 ytN3s ysN3t B16 0 B17 ytN4s ysN4t B18 0 B19 ytN5s ysN5t B110 0 B111 ytN6s ysN6t B112 0 B113 ytN7s ysN7t 142 MATLAB Functions Used 317 B114 0 B115 ytN8s ysN8t B116 0 B21 0 B22 xsN1t xtN1s B23 0 B24 xsN2t xtN2s B25 0 B26 xsN3t xtN3s B27 0 B28 xsN4t xtN4s B29 0 B210 xsN5t xtN5s B211 0 B212 xsN6t xtN6s B213 0 B214 xsN7t xtN7s B215 0 B216 xsN8t xtN8s B31 xsN1t xtN1s B32 ytN1s ysN1t B33 xsN2t xtN2s B34 ytN2s ysN2t B35 xsN3t xtN3s B36 ytN3s ysN3t B37 xsN4t xtN4s B38 ytN4s ysN4t B39 xsN5t xtN5s B310 ytN5s ysN5t B311 xsN6t xtN6s B312 ytN6s ysN6t B313 xsN7t xtN7s B314 ytN7s ysN7t B315 xsN8t xtN8s B316 ytN8s ysN8t B B11 B12 B13 B14 B15 B16 B17 B18 B19 B110 B111 B112 B113 B114 B115 B116 B21 B22 B23 B24 B25 B26 B27 B28 B29 B210 B211 B212 B213 B214 B215 B216 B31 B32 B33 B34 B35 B36 B37 B38 B39 B310 B311 B312 B313 B314 B315 B316 if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU 1NU NU 0 NU 1NU 0 0 0 12NU2 end Bnew simplifyB Jnew simplifyJ BD transposeBnewDBnewJnew r intintBD t 1 1 s 1 1 z hr w doublez 318 14 The Quadratic Quadrilateral Element function y QuadraticQuadAssembleKkijmpqrst QuadraticQuadAssemble This function assembles the element stiffness matrix k of the quadratic quadrilateral element with nodes i j m p q r s and t into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K2i12i1 K2i12i1 k11 K2i12i K2i12i k12 K2i12j1 K2i12j1 k13 K2i12j K2i12j k14 K2i12m1 K2i12m1 k15 K2i12m K2i12m k16 K2i12p1 K2i12p1 k17 K2i12p K2i12p k18 K2i12q1 K2i12q1 k19 K2i12q K2i12q k110 K2i12r1 K2i12r1 k111 K2i12r K2i12r k112 K2i12s1 K2i12s1 k113 K2i12s K2i12s k114 K2i12t1 K2i12t1 k115 K2i12t K2i12t k116 K2i2i1 K2i2i1 k21 K2i2i K2i2i k22 K2i2j1 K2i2j1 k23 K2i2j K2i2j k24 K2i2m1 K2i2m1 k25 K2i2m K2i2m k26 K2i2p1 K2i2p1 k27 K2i2p K2i2p k28 K2i2q1 K2i2q1 k29 K2i2q K2i2q k210 K2i2r1 K2i2r1 k211 K2i2r K2i2r k212 K2i2s1 K2i2s1 k213 K2i2s K2i2s k214 K2i2t1 K2i2t1 k215 K2i2t K2i2t k216 K2j12i1 K2j12i1 k31 K2j12i K2j12i k32 K2j12j1 K2j12j1 k33 K2j12j K2j12j k34 K2j12m1 K2j12m1 k35 K2j12m K2j12m k36 K2j12p1 K2j12p1 k37 K2j12p K2j12p k38 K2j12q1 K2j12q1 k39 K2j12q K2j12q k310 K2j12r1 K2j12r1 k311 K2j12r K2j12r k312 142 MATLAB Functions Used 319 K2j12s1 K2j12s1 k313 K2j12s K2j12s k314 K2j12t1 K2j12t1 k315 K2j12t K2j12t k316 K2j2i1 K2j2i1 k41 K2j2i K2j2i k42 K2j2j1 K2j2j1 k43 K2j2j K2j2j k44 K2j2m1 K2j2m1 k45 K2j2m K2j2m k46 K2j2p1 K2j2p1 k47 K2j2p K2j2p k48 K2j2q1 K2j2q1 k49 K2j2q K2j2q k410 K2j2r1 K2j2r1 k411 K2j2r K2j2r k412 K2j2s1 K2j2s1 k413 K2j2s K2j2s k414 K2j2t1 K2j2t1 k415 K2j2t K2j2t k416 K2m12i1 K2m12i1 k51 K2m12i K2m12i k52 K2m12j1 K2m12j1 k53 K2m12j K2m12j k54 K2m12m1 K2m12m1 k55 K2m12m K2m12m k56 K2m12p1 K2m12p1 k57 K2m12p K2m12p k58 K2m12q1 K2m12q1 k59 K2m12q K2m12q k510 K2m12r1 K2m12r1 k511 K2m12r K2m12r k512 K2m12s1 K2m12s1 k513 K2m12s K2m12s k514 K2m12t1 K2m12t1 k515 K2m12t K2m12t k516 K2m2i1 K2m2i1 k61 K2m2i K2m2i k62 K2m2j1 K2m2j1 k63 K2m2j K2m2j k64 K2m2m1 K2m2m1 k65 K2m2m K2m2m k66 K2m2p1 K2m2p1 k67 K2m2p K2m2p k68 K2m2q1 K2m2q1 k69 K2m2q K2m2q k610 K2m2r1 K2m2r1 k611 K2m2r K2m2r k612 K2m2s1 K2m2s1 k613 K2m2s K2m2s k614 K2m2t1 K2m2t1 k615 K2m2t K2m2t k616 K2p12i1 K2p12i1 k71 320 14 The Quadratic Quadrilateral Element K2p12i K2p12i k72 K2p12j1 K2p12j1 k73 K2p12j K2p12j k74 K2p12m1 K2p12m1 k75 K2p12m K2p12m k76 K2p12p1 K2p12p1 k77 K2p12p K2p12p k78 K2p12q1 K2p12q1 k79 K2p12q K2p12q k710 K2p12r1 K2p12r1 k711 K2p12r K2p12r k712 K2p12s1 K2p12s1 k713 K2p12s K2p12s k714 K2p12t1 K2p12t1 k715 K2p12t K2p12t k716 K2p2i1 K2p2i1 k81 K2p2i K2p2i k82 K2p2j1 K2p2j1 k83 K2p2j K2p2j k84 K2p2m1 K2p2m1 k85 K2p2m K2p2m k86 K2p2p1 K2p2p1 k87 K2p2p K2p2p k88 K2p2q1 K2p2q1 k89 K2p2q K2p2q k810 K2p2r1 K2p2r1 k811 K2p2r K2p2r k812 K2p2s1 K2p2s1 k813 K2p2s K2p2s k814 K2p2t1 K2p2t1 k815 K2p2t K2p2t k816 K2q12i1 K2q12i1 k91 K2q12i K2q12i k92 K2q12j1 K2q12j1 k93 K2q12j K2q12j k94 K2q12m1 K2q12m1 k95 K2q12m K2q12m k96 K2q12p1 K2q12p1 k97 K2q12p K2q12p k98 K2q12q1 K2q12q1 k99 K2q12q K2q12q k910 K2q12r1 K2q12r1 k911 K2q12r K2q12r k912 K2q12s1 K2q12s1 k913 K2q12s K2q12s k914 K2q12t1 K2q12t1 k915 K2q12t K2q12t k916 K2q2i1 K2q2i1 k101 K2q2i K2q2i k102 K2q2j1 K2q2j1 k103 K2q2j K2q2j k104 K2q2m1 K2q2m1 k105 K2q2m K2q2m k106 142 MATLAB Functions Used 321 K2q2p1 K2q2p1 k107 K2q2p K2q2p k108 K2q2q1 K2q2q1 k109 K2q2q K2q2q k1010 K2q2r1 K2q2r1 k1011 K2q2r K2q2r k1012 K2q2s1 K2q2s1 k1013 K2q2s K2q2s k1014 K2q2t1 K2q2t1 k1015 K2q2t K2q2t k1016 K2r12i1 K2r12i1 k111 K2r12i K2r12i k112 K2r12j1 K2r12j1 k113 K2r12j K2r12j k114 K2r12m1 K2r12m1 k115 K2r12m K2r12m k116 K2r12p1 K2r12p1 k117 K2r12p K2r12p k118 K2r12q1 K2r12q1 k119 K2r12q K2r12q k1110 K2r12r1 K2r12r1 k1111 K2r12r K2r12r k1112 K2r12s1 K2r12s1 k1113 K2r12s K2r12s k1114 K2r12t1 K2r12t1 k1115 K2r12t K2r12t k1116 K2r2i1 K2r2i1 k121 K2r2i K2r2i k122 K2r2j1 K2r2j1 k123 K2r2j K2r2j k124 K2r2m1 K2r2m1 k125 K2r2m K2r2m k126 K2r2p1 K2r2p1 k127 K2r2p K2r2p k128 K2r2q1 K2r2q1 k129 K2r2q K2r2q k1210 K2r2r1 K2r2r1 k1211 K2r2r K2r2r k1212 K2r2s1 K2r2s1 k1213 K2r2s K2r2s k1214 K2r2t1 K2r2t1 k1215 K2r2t K2r2t k1216 K2s12i1 K2s12i1 k131 K2s12i K2s12i k132 K2s12j1 K2s12j1 k133 K2s12j K2s12j k134 K2s12m1 K2s12m1 k135 K2s12m K2s12m k136 K2s12p1 K2s12p1 k137 K2s12p K2s12p k138 K2s12q1 K2s12q1 k139 K2s12q K2s12q k1310 K2s12r1 K2s12r1 k1311 322 14 The Quadratic Quadrilateral Element K2s12r K2s12r k1312 K2s12s1 K2s12s1 k1313 K2s12s K2s12s k1314 K2s12t1 K2s12t1 k1315 K2s12t K2s12t k1316 K2s2i1 K2s2i1 k141 K2s2i K2s2i k142 K2s2j1 K2s2j1 k143 K2s2j K2s2j k144 K2s2m1 K2s2m1 k145 K2s2m K2s2m k146 K2s2p1 K2s2p1 k147 K2s2p K2s2p k148 K2s2q1 K2s2q1 k149 K2s2q K2s2q k1410 K2s2r1 K2s2r1 k1411 K2s2r K2s2r k1412 K2s2s1 K2s2s1 k1413 K2s2s K2s2s k1414 K2s2t1 K2s2t1 k1415 K2s2t K2s2t k1416 K2t12i1 K2t12i1 k151 K2t12i K2t12i k152 K2t12j1 K2t12j1 k153 K2t12j K2t12j k154 K2t12m1 K2t12m1 k155 K2t12m K2t12m k156 K2t12p1 K2t12p1 k157 K2t12p K2t12p k158 K2t12q1 K2t12q1 k159 K2t12q K2t12q k1510 K2t12r1 K2t12r1 k1511 K2t12r K2t12r k1512 K2t12s1 K2t12s1 k1513 K2t12s K2t12s k1514 K2t12t1 K2t12t1 k1515 K2t12t K2t12t k1516 K2t2i1 K2t2i1 k161 K2t2i K2t2i k162 K2t2j1 K2t2j1 k163 K2t2j K2t2j k164 K2t2m1 K2t2m1 k165 K2t2m K2t2m k166 K2t2p1 K2t2p1 k167 K2t2p K2t2p k168 K2t2q1 K2t2q1 k169 K2t2q K2t2q k1610 K2t2r1 K2t2r1 k1611 K2t2r K2t2r k1612 K2t2s1 K2t2s1 k1613 K2t2s K2t2s k1614 K2t2t1 K2t2t1 k1615 K2t2t K2t2t k1616 y K 142 MATLAB Functions Used 323 function w QuadraticQuadElementSresses ENUx1y1x2y2x3y3x4y4pu QuadraticQuadElementStresses This function returns the element stress vector for a quadratic quadrilateral element with modulus of elasticity E Poissons ratio NU coordinates of node 1 x1y1 coordinates of node 2 x2y2 coordinates of node 3 x3y3 coordinates of node 4 x4y4 and element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain syms s t x5 x1 x22 x6 x2 x32 x7 x3 x42 x8 x4 x12 y5 y1 y22 y6 y2 y32 y7 y3 y42 y8 y4 y12 N1 1s1tst14 N2 1s1tst14 N3 1s1tst14 N4 1s1tst14 N5 1t1s1s2 N6 1s1t1t2 N7 1t1s1s2 N8 1s1t1t2 x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 xs diffxs xt diffxt ys diffys yt diffyt J xsyt ysxt N1s diffN1s N2s diffN2s N3s diffN3s N4s diffN4s N5s diffN5s N6s diffN6s N7s diffN7s N8s diffN8s N1t diffN1t N2t diffN2t N3t diffN3t N4t diffN4t N5t diffN5t N6t diffN6t 324 14 The Quadratic Quadrilateral Element N7t diffN7t N8t diffN8t B11 ytN1s ysN1t B12 0 B13 ytN2s ysN2t B14 0 B15 ytN3s ysN3t B16 0 B17 ytN4s ysN4t B18 0 B19 ytN5s ysN5t B110 0 B111 ytN6s ysN6t B112 0 B113 ytN7s ysN7t B114 0 B115 ytN8s ysN8t B116 0 B21 0 B22 xsN1t xtN1s B23 0 B24 xsN2t xtN2s B25 0 B26 xsN3t xtN3s B27 0 B28 xsN4t xtN4s B29 0 B210 xsN5t xtN5s B211 0 B212 xsN6t xtN6s B213 0 B214 xsN7t xtN7s B215 0 B216 xsN8t xtN8s B31 xsN1t xtN1s B32 ytN1s ysN1t B33 xsN2t xtN2s B34 ytN2s ysN2t B35 xsN3t xtN3s B36 ytN3s ysN3t B37 xsN4t xtN4s B38 ytN4s ysN4t B39 xsN5t xtN5s B310 ytN5s ysN5t B311 xsN6t xtN6s B312 ytN6s ysN6t B313 xsN7t xtN7s B314 ytN7s ysN7t B315 xsN8t xtN8s B316 ytN8s ysN8t Jnew simplifyJ 142 MATLAB Functions Used 325 B B11 B12 B13 B14 B15 B16 B17 B18 B19 B110 B111 B112 B113 B114 B115 B116 B21 B22 B23 B24 B25 B26 B27 B28 B29 B210 B211 B212 B213 B214 B215 B216 B31 B32 B33 B34 B35 B36 B37 B38 B39 B310 B311 B312 B313 B314 B315 B316Jnew if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU 1NU NU 0 NU 1NU 0 0 0 12NU2 end Bnew simplifyB w DBnewu We also calculate the stresses at the centroid of the element wcent subsw st 00 w doublewcent function y QuadraticQuadElementPStressessigma QuadraticQuadElementPStresses This function returns the element principal stresses and their angle given the element stress vector R sigma1 sigma22 Q sigma1 sigma222 sigma3sigma3 M 2sigma3sigma1 sigma2 s1 R sqrtQ s2 R sqrtQ theta atanM2180pi y s1 s2 theta Example 141 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 143 This problem was solved in Example 131 using bilinear quadrilateral elements Solve this problem again using one quadratic quadrilateral element as shown in Fig 144 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 3 5 and 8 3 the reactions at nodes 1 4 and 6 4 the stresses in the element 5 the principal stresses and principal angle for the element 326 14 The Quadratic Quadrilateral Element w 025 m 05 m Fig 143 Thin Plate for Example 141 3125 kN 3125 kN 6 3 8 1 025 m 7 2 05 m 125 kN 4 5 Fig 144 Discretization of Thin Plate Using One Quadratic Quadrilateral Solution Use the six steps outlined in Chap 1 to solve this problem using the quadratic quadri lateral element Step 1 Discretizing the Domain We use one quadratic quadrilateral element to model the plate only for illustration purposes More elements must be used in order to obtain reliable results Thus the domain is subdivided into one element and eight nodes as shown in Fig 144 The total force due to the distributed load is divided between nodes 3 5 and 8 in the ratio 16 23 16 respectively Since the plate is thin a case of plane stress is assumed The units used in the MATLAB calculations are kN and meter Table 141 shows the element connectivity for this example Table 141 Element Connectivity for Example 141 Element Number Node i Node j Node m Node p Node q Node r Node s Node t 1 1 3 8 6 2 5 7 4 Step 2 Writing the Element Stiffness Matrices The element stiffness matrix k1 is obtained by making calls to the MATLAB function QuadraticQuadElementStiffness The matrix has size 16 16 142 MATLAB Functions Used 327 E210e6 E 210000000 NU03 NU 03000 h0025 h 00250 k1QuadraticQuadElementStiffness ENUh000500502500251 k1 10e007 Columns 1 through 7 04000 01771 01660 00024 01769 00729 01801 01771 07250 00024 02494 00729 03207 00024 01660 00024 04000 01771 01801 00024 01769 00024 02494 01771 07250 00024 03780 00729 01769 00729 01801 00024 04000 01771 01660 00729 03207 00024 03780 01771 07250 00024 01801 00024 01769 00729 01660 00024 04000 00024 03780 00729 03207 00024 02494 01771 02295 00737 02295 00737 01551 00417 01551 00929 00128 00929 00128 00417 01218 00417 01987 00417 03397 00929 03397 00929 01987 00417 05196 00737 10189 00737 10189 00417 01551 00417 01551 00417 02295 00737 02295 00417 01218 00417 01218 00929 00128 00929 03397 00929 01987 00417 01987 00417 03397 00737 10189 00417 05196 00417 05196 00737 328 14 The Quadratic Quadrilateral Element Columns 8 through 14 00024 02295 00929 01987 00417 01551 00417 03780 00737 00128 00417 05196 00417 01218 00729 02295 00929 03397 00737 01551 00417 03207 00737 00128 00929 10189 00417 01218 00024 01551 00417 03397 00737 02295 00929 02494 00417 01218 00929 10189 00737 00128 01771 01551 00417 01987 00417 02295 00929 07250 00417 01218 00417 05196 00737 00128 00417 07282 0 0 01667 00410 0 01218 0 07949 01667 0 0 05256 00417 0 01667 08718 0 0 01667 05196 01667 0 0 21051 01667 0 00737 00410 0 0 01667 07282 0 00128 0 05256 01667 0 0 07949 00929 0 01667 02051 0 0 01667 10189 01667 0 0 09718 01667 0 Columns 15 through 16 03397 00737 00929 10189 01987 00417 00417 05196 01987 00417 00417 05196 03397 00737 00929 10189 0 01667 01667 0 02051 0 0 09718 0 01667 01667 0 08718 0 0 21051 Step 3 Assembling the Global Stiffness Matrix Since the structure has eight nodes the size of the global stiffness matrix is 16 16 Therefore to obtain K we first set up a zero matrix of size 16 16 then make one call to the MATLAB function QuadraticQuadAssemble since we have one element in the 142 MATLAB Functions Used 329 structure Each call to the function will assemble one element The following are the MATLAB commands Only the final result is shown after the element is assembled Kzeros1616 KQuadraticQuadAssembleKk113862574 K 10e007 Columns 1 through 7 04000 01771 02295 00929 01660 00024 03397 01771 07250 00737 00128 00024 02494 00929 02295 00737 07282 0 02295 00737 0 00929 00128 0 07949 00929 00128 01667 01660 00024 02295 00929 04000 01771 01987 00024 02494 00737 00128 01771 07250 00417 03397 00929 0 01667 01987 00417 08718 00737 10189 01667 0 00417 05196 0 01987 00417 0 01667 03397 00929 02051 00417 05196 01667 0 00737 10189 0 01801 00024 01551 00417 01769 00729 03397 00024 03780 00417 01218 00729 03207 00929 01551 00417 00410 0 01551 00417 0 00417 01218 0 05256 00417 01218 01667 01769 00729 01551 00417 01801 00024 01987 00729 03207 00417 01218 00024 03780 00417 Columns 8 through 14 00737 01987 00417 01801 00024 01551 00417 10189 00417 05196 00024 03780 00417 01218 01667 0 01667 01551 00417 00410 0 0 01667 0 00417 01218 0 05256 00417 03397 00737 01769 00729 01551 00417 05196 00929 10189 00729 03207 00417 01218 0 02051 0 03397 00929 0 01667 21051 0 09718 00737 10189 01667 0 0 08718 0 01987 00417 0 01667 09718 0 21051 00417 05196 01667 0 00737 01987 00417 04000 01771 02295 00929 10189 00417 05196 01771 07250 00737 00128 330 14 The Quadratic Quadrilateral Element 01667 0 01667 02295 00737 07282 0 0 01667 0 00929 00128 0 07949 00417 03397 00737 01660 00024 02295 00929 05196 00929 10189 00024 02494 00737 00128 Columns 15 through 16 01769 00729 00729 03207 01551 00417 00417 01218 01801 00024 00024 03780 01987 00417 00417 05196 03397 00929 00737 10189 01660 00024 00024 02494 02295 00737 00929 00128 04000 01771 01771 07250 Step 4 Applying the Boundary Conditions The matrix 1410 for this structure is obtained directly using the global stiffness matrix obtained in the previous step however the full matrix equation is not shown here explicitly because it is very large The boundary conditions for this problem are given as U1x U1y U4x U4y U6x U6y 0 F2x F2y F7x F7y F3y F5y F8y 0 F3x 3125 F5x 125 F8x 3125 1412 We next insert the above conditions into the matrix equation for this structure and proceed to the solution step below Step 5 Solving the Equations Solvingtheresultingsystemofequationswillbeperformedbypartitioningmanually and Gaussian elimination with MATLAB First we partition the matrix equation by 142 MATLAB Functions Used 331 extracting the submatrices in rows 3 to 6 rows 9 to 10 rows 13 to 16 and columns 3 to 6 columns 9 to 10 columns 13 to 16 Therefore we obtain 106 728 0 230 074 0 167 041 0 155 042 0 795 093 013 167 0 0 526 042 122 230 093 400 177 340 074 155 042 180 002 074 013 177 725 093 1019 042 122 002 378 0 167 340 093 872 0 0 167 340 093 167 0 074 1019 0 2105 167 0 074 1019 041 0 155 042 0 167 728 0 230 074 0 526 042 122 167 0 0 795 093 013 155 042 180 002 340 074 230 093 400 177 042 122 002 378 093 1019 074 013 177 725 U2x U2y U3x U3y U5x U5y U7x U7y U8x U8y 0 0 3125 0 125 0 0 0 3125 0 1413 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3636 K36910 K361316 K91036 K910910 K9101316 K131636 K1316910 K13161316 k 10e007 Columns 1 through 7 07282 0 02295 00737 0 01667 00410 0 07949 00929 00128 01667 0 0 02295 00929 04000 01771 03397 00737 01551 00737 00128 01771 07250 00929 10189 00417 0 01667 03397 00929 08718 0 0 01667 0 00737 10189 0 21051 01667 00410 0 01551 00417 0 01667 07282 0 05256 00417 01218 01667 0 0 01551 00417 01801 00024 03397 00737 02295 00417 01218 00024 03780 00929 10189 00737 332 14 The Quadratic Quadrilateral Element Columns 8 through 10 0 01551 00417 05256 00417 01218 00417 01801 00024 01218 00024 03780 01667 03397 00929 0 00737 10189 0 02295 00737 07949 00929 00128 00929 04000 01771 00128 01771 07250 f0 0 3125 0 125 0 0 0 3125 0 f 0 0 31250 0 125000 0 0 0 31250 0 ukf u 10e005 03457 00582 07040 00420 07054 00000 03457 00582 07040 00420 142 MATLAB Functions Used 333 It is now clear that the horizontal and vertical displacements at node 3 are 07040 m compared with 07030 m in Example 131 and 00420 m respectively The horizon tal and vertical displacements at node 8 are 07040 m compared with 07030 m in Example 131 and 00420 m respectivelyThe horizontal and vertical displacements at node 5 are 07054 m and 00000 m respectively Step 6 Postprocessing In this step we obtain the reactions at nodes 1 4 and 6 and the stresses in the element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U00u1400u5600u710 U 10e005 0 0 03457 00582 07040 00420 0 0 07054 00000 0 0 03457 00582 07040 00420 FKU F 37650 16288 00000 00000 31250 00000 334 14 The Quadratic Quadrilateral Element 112200 00000 125000 00000 37650 16288 00000 00000 31250 00000 Thus the horizontal and vertical reactions at node 1 are forces of 37650 kN di rected to the left and 16288 kN directed downwards The horizontal and vertical reactions at node 4 are forces of 112200 kN directed to the left and 00000 kN Thus the horizontal and vertical reactions at node 6 are forces of 37650 kN directed to the left and 16288 kN directed upwards Obviously force equilibrium is satis fied for this problem Next we set up the element nodal displacement vector u1 then we calculate the element stresses sigma1 by making calls to the MATLAB function QuadraticQuadElementStresses Closedform solutions quadratic functions in ξ and η denoted by s and t in the results below for the stresses in the element are obtained using the MATLAB Symbolic Math Toolbox as shown below Then numerical values for the stresses are computed at the centroid of the element u1U1 U2 U5 U6 U15 U16 U11 U12 U3 U4 U9 U10 U13 U14 U7 U8 u1 10e005 0 0 07040 00420 07040 00420 0 0 03457 00582 07054 00000 03457 00582 0 0 142 MATLAB Functions Used 335 sigma1QuadraticQuadElementStressesENU0005005 02500251u1 w 2170726724078205888312916065073484491437270409865864955 98010130648530944t96764073971696635792281625142643375 93543950336s46403787800607050039589981237334844914372 7040986586495598010130648530944ts12742907563074467741 566415872519807040628566084398385987584tˆ216344902767 57110059183885037387979228162514264337593543950336sˆ2 1162030460272220229114528438743333961408125713216879677 1975168 205677119618905186432462221873696898287454081973172991 196020261297061888t5585735540389175408229514503718715 8456325028528675187087900672s6143434498672397871922189 39953696898287454081973172991196020261297061888ts191 143613446116991438560680259903520314283042199192993792 tˆ210896601845047401801783411753905115845632502852867 5187087900672sˆ27786388480578322733783622871679792281 62514264337593543950336 243380095263947140144726972587713169126500570573503741 75801344t13726484855612460151197410298392787593149816 327892691964784081045188247552623338102153846031584563 25028528675187087900672s367109008106015611782160644598 51158456325028528675187087900672ts129200278101383642 6723649091052787593149816327892691964784081045188247552 tˆ2813049698461538319807040628566084398385987584sˆ2 sigma1 10e003 29334 00983 00000 Thusitisclearthatthestressesatthecentroidoftheelementare σx 29334 MPa tensile σy 00983 MPa compressive and τxy 00000 MPa It is clear that the stress in the x direction approaches closely the correct value of 3 MPa ten sile at the centroid of the element It is seen that only one quadratic quadrilat eral element gives accurate results in this problem Next we calculate the principal stresses and principal angle for the element by making calls to the MATLAB function QuadraticQuadElementPStresses 336 14 The Quadratic Quadrilateral Element s1QuadraticQuadElementPStressessigma1 s1 10e003 29334 00983 00000 Thus it is clear that the principal stresses at the centroid of the element are σ1 29334 MPa tensile σ2 00983 MPa compressive while the principal angle θp 0 Problems Problem 141 Consider the thin plate supported on three springs and subjected to a uniformly dis tributed load as shown in Fig 145 Solve this problem using one quadratic quadri lateral element as shown in the figure Given E 200 GPa ν 03 t 001 m k 4000 kNm and w 5000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 1 2 3 6 7 and 8 3 the reactions at nodes 9 10 and 11 4 the stresses in the element 5 the principal stresses and principal angle for the element 6 the force in each spring Compare your answers with those obtained for Problem 113 and Problem 133 k k k w 04 m 1 8 3 6 07 m 11 9 10 7 2 4 5 Fig 145 Thin Plate Supported on Three Springs 15 The Linear Tetrahedral Solid Element and the matrix B is given by In 151 the matrix D is given by 340 15 The Linear Tetrahedral Solid Element Finally once the unknown displacements and reactions are found the stress vector is obtained for each element as follows σ DB u 1511 where σ is the stress vector in the element of size 6 1 and u is the 12 1 element displacement vector The vector σ is written for each element as σ σx σy σz τxy τyz τzxT 152 MATLAB Functions Used The five MATLAB functions used for the linear tetrahedral solid element are TetrahedronElementVolumex1 y1 z1x2 y2 z2x3y3z3 x4 y4 z4Thisfunction returns the element volume given the coordinates of the first node x1 y1 z1 the coordinates of the second node x2 y2 z2 the coordinates of the third node x3 y3 z3 and the coordinates of the fourth node x4 y4 z4 TetrahedronElementStiffnessE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 This function calculates the element stiffness matrix for each linear tetrahedron with modulus of elasticity E Poissons ratio NU and coordinates x1 y1 z1 for the first node x2 y2 z2 for the second node x3 y3 z3 for the third node and x4 y4 z4 for the fourth node It returns the 12 12 element stiffness matrix k TetrahedronAssembleK k i j m n This function assembles the element stiffness matrix k of the linear tetrahedron joining nodes i j m and n into the global stiffness matrix K It returns the 3n 3n global stiffness matrix K every time an element is assembled TetrahedronElementStressesE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 u This function calculates the element stresses using the modulus of elasticity E Poissons ratio NU the coordinates x1 y1 z1 for the first node x2 y2 z2 for the second node x3 y3 z3 for the third node and x4 y4 z4 for the fourth node and the element displacement vector u It returns the stress vector for the element TetrahedronElementPStressessigma This function calculates the three principal stresses for the element using the element stress vector sigma It returns a 31 vector in the form sigma1sigma2sigma3T where sigma1 sigma2 and sigma3 are the principal stresses for the element This function does not return the principal angles The following is a listing of the MATLAB source code for each function 152 MATLAB Functions Used 341 function y TetrahedronElementVolume x1y1z1x2y2z2x3y3z3x4y4z4 TetrahedronElementVolume This function returns the volume of the linear tetrahedral element whose first node has coordinates x1y1z1 second node has coordinates x2y2z2 third node has coordinates x3y3z3 and fourth node has coordiantes x4y4z4 xyz 1 x1 y1 z1 1 x2 y2 z2 1 x3 y3 z3 1 x4 y4 z4 y detxyz6 function y TetrahedronElementStiffness ENUx1y1z1x2y2z2x3y3z3x4y4z4 TetrahedronElementStiffness This function returns the element stiffness matrix for a linear tetrahedral solid element with modulus of elasticity E Poissons ratio NU coordinates of the first node x1y1z1 coordinates of the second node x2y2z2 coordinates of the third node x3y3z3 and coordinates of the fourth node x4y4z4 The size of the element stiffness matrix is 12 x 12 xyz 1 x1 y1 z1 1 x2 y2 z2 1 x3 y3 z3 1 x4 y4 z4 V detxyz6 mbeta1 1 y2 z2 1 y3 z3 1 y4 z4 mbeta2 1 y1 z1 1 y3 z3 1 y4 z4 mbeta3 1 y1 z1 1 y2 z2 1 y4 z4 mbeta4 1 y1 z1 1 y2 z2 1 y3 z3 mgamma1 1 x2 z2 1 x3 z3 1 x4 z4 mgamma2 1 x1 z1 1 x3 z3 1 x4 z4 mgamma3 1 x1 z1 1 x2 z2 1 x4 z4 mgamma4 1 x1 z1 1 x2 z2 1 x3 z3 mdelta1 1 x2 y2 1 x3 y3 1 x4 y4 mdelta2 1 x1 y1 1 x3 y3 1 x4 y4 mdelta3 1 x1 y1 1 x2 y2 1 x4 y4 mdelta4 1 x1 y1 1 x2 y2 1 x3 y3 beta1 1detmbeta1 beta2 detmbeta2 beta3 1detmbeta3 beta4 detmbeta4 gamma1 detmgamma1 gamma2 1detmgamma2 gamma3 detmgamma3 gamma4 1detmgamma4 delta1 1detmdelta1 delta2 detmdelta2 342 15 The Linear Tetrahedral Solid Element delta3 1detmdelta3 delta4 detmdelta4 B1 beta1 0 0 0 gamma1 0 0 0 delta1 gamma1 beta1 0 0 delta1 gamma1 delta1 0 beta1 B2 beta2 0 0 0 gamma2 0 0 0 delta2 gamma2 beta2 0 0 delta2 gamma2 delta2 0 beta2 B3 beta3 0 0 0 gamma3 0 0 0 delta3 gamma3 beta3 0 0 delta3 gamma3 delta3 0 beta3 B4 beta4 0 0 0 gamma4 0 0 0 delta4 gamma4 beta4 0 0 delta4 gamma4 delta4 0 beta4 B B1 B2 B3 B46V D E1NU12NU1NU NU NU 0 0 0 NU 1NU NU 0 0 0 NU NU 1NU 0 0 0 0 0 0 12NU2 0 0 0 0 0 0 1 2NU2 0 0 0 0 0 0 1 2NU2 y VBDB function y TetrahedronAssembleKkijmn TetrahedronAssemble This function assembles the element stiffness matrix k of the linear tetrahedral solid element with nodes i j m and n into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K3i23i2 K3i23i2 k11 K3i23i1 K3i23i1 k12 K3i23i K3i23i k13 K3i23j2 K3i23j2 k14 K3i23j1 K3i23j1 k15 K3i23j K3i23j k16 K3i23m2 K3i23m2 k17 K3i23m1 K3i23m1 k18 K3i23m K3i23m k19 K3i23n2 K3i23n2 k110 K3i23n1 K3i23n1 k111 K3i23n K3i23n k112 K3i13i2 K3i13i2 k21 K3i13i1 K3i13i1 k22 K3i13i K3i13i k23 K3i13j2 K3i13j2 k24 K3i13j1 K3i13j1 k25 K3i13j K3i13j k26 K3i13m2 K3i13m2 k27 K3i13m1 K3i13m1 k28 K3i13m K3i13m k29 K3i13n2 K3i13n2 k210 K3i13n1 K3i13n1 k211 K3i13n K3i13n k212 K3i3i2 K3i3i2 k31 K3i3i1 K3i3i1 k32 K3i3i K3i3i k33 K3i3j2 K3i3j2 k34 K3i3j1 K3i3j1 k35 K3i3j K3i3j k36 152 MATLAB Functions Used 343 K3i3m2 K3i3m2 k37 K3i3m1 K3i3m1 k38 K3i3m K3i3m k39 K3i3n2 K3i3n2 k310 K3i3n1 K3i3n1 k311 K3i3n K3i3n k312 K3j23i2 K3j23i2 k41 K3j23i1 K3j23i1 k42 K3j23i K3j23i k43 K3j23j2 K3j23j2 k44 K3j23j1 K3j23j1 k45 K3j23j K3j23j k46 K3j23m2 K3j23m2 k47 K3j23m1 K3j23m1 k48 K3j23m K3j23m k49 K3j23n2 K3j23n2 k410 K3j23n1 K3j23n1 k411 K3j23n K3j23n k412 K3j13i2 K3j13i2 k51 K3j13i1 K3j13i1 k52 K3j13i K3j13i k53 K3j13j2 K3j13j2 k54 K3j13j1 K3j13j1 k55 K3j13j K3j13j k56 K3j13m2 K3j13m2 k57 K3j13m1 K3j13m1 k58 K3j13m K3j13m k59 K3j13n2 K3j13n2 k510 K3j13n1 K3j13n1 k511 K3j13n K3j13n k512 K3j3i2 K3j3i2 k61 K3j3i1 K3j3i1 k62 K3j3i K3j3i k63 K3j3j2 K3j3j2 k64 K3j3j1 K3j3j1 k65 K3j3j K3j3j k66 K3j3m2 K3j3m2 k67 K3j3m1 K3j3m1 k68 K3j3m K3j3m k69 K3j3n2 K3j3n2 k610 K3j3n1 K3j3n1 k611 K3j3n K3j3n k612 K3m23i2 K3m23i2 k71 K3m23i1 K3m23i1 k72 K3m23i K3m23i k73 K3m23j2 K3m23j2 k74 K3m23j1 K3m23j1 k75 K3m23j K3m23j k76 K3m23m2 K3m23m2 k77 K3m23m1 K3m23m1 k78 K3m23m K3m23m k79 K3m23n2 K3m23n2 k710 K3m23n1 K3m23n1 k711 K3m23n K3m23n k712 K3m13i2 K3m13i2 k81 K3m13i1 K3m13i1 k82 344 15 The Linear Tetrahedral Solid Element K3m13i K3m13i k83 K3m13j2 K3m13j2 k84 K3m13j1 K3m13j1 k85 K3m13j K3m13j k86 K3m13m2 K3m13m2 k87 K3m13m1 K3m13m1 k88 K3m13m K3m13m k89 K3m13n2 K3m13n2 k810 K3m13n1 K3m13n1 k811 K3m13n K3m13n k812 K3m3i2 K3m3i2 k91 K3m3i1 K3m3i1 k92 K3m3i K3m3i k93 K3m3j2 K3m3j2 k94 K3m3j1 K3m3j1 k95 K3m3j K3m3j k96 K3m3m2 K3m3m2 k97 K3m3m1 K3m3m1 k98 K3m3m K3m3m k99 K3m3n2 K3m3n2 k910 K3m3n1 K3m3n1 k911 K3m3n K3m3n k912 K3n23i2 K3n23i2 k101 K3n23i1 K3n23i1 k102 K3n23i K3n23i k103 K3n23j2 K3n23j2 k104 K3n23j1 K3n23j1 k105 K3n23j K3n23j k106 K3n23m2 K3n23m2 k107 K3n23m1 K3n23m1 k108 K3n23m K3n23m k109 K3n23n2 K3n23n2 k1010 K3n23n1 K3n23n1 k1011 K3n23n K3n23n k1012 K3n13i2 K3n13i2 k111 K3n13i1 K3n13i1 k112 K3n13i K3n13i k113 K3n13j2 K3n13j2 k114 K3n13j1 K3n13j1 k115 K3n13j K3n13j k116 K3n13m2 K3n13m2 k117 K3n13m1 K3n13m1 k118 K3n13m K3n13m k119 K3n13n2 K3n13n2 k1110 K3n13n1 K3n13n1 k1111 K3n13n K3n13n k1112 K3n3i2 K3n3i2 k121 K3n3i1 K3n3i1 k122 K3n3i K3n3i k123 K3n3j2 K3n3j2 k124 K3n3j1 K3n3j1 k125 K3n3j K3n3j k126 K3n3m2 K3n3m2 k127 K3n3m1 K3n3m1 k128 K3n3m K3n3m k129 K3n3n2 K3n3n2 k1210 152 MATLAB Functions Used 345 K3n3n1 K3n3n1 k1211 K3n3n K3n3n k1212 y K function y TetrahedronElementStresses ENUx1y1z1x2y2z2x3y3z3x4y4z4u TetrahedronElementStresses This function returns the element stress vector for a linear tetrahedral solid element with modulus of elasticity E Poissons ratio NU coordinates of the first node x1y1z1 coordinates of the second node x2y2z2 coordinates of the third node x3y3z3 coordinates of the fourth node x4y4z4 and element displacement vector u The size of the element stress vector is 6 x 1 xyz 1 x1 y1 z1 1 x2 y2 z2 1 x3 y3 z3 1 x4 y4 z4 V detxyz6 mbeta1 1 y2 z2 1 y3 z3 1 y4 z4 mbeta2 1 y1 z1 1 y3 z3 1 y4 z4 mbeta3 1 y1 z1 1 y2 z2 1 y4 z4 mbeta4 1 y1 z1 1 y2 z2 1 y3 z3 mgamma1 1 x2 z2 1 x3 z3 1 x4 z4 mgamma2 1 x1 z1 1 x3 z3 1 x4 z4 mgamma3 1 x1 z1 1 x2 z2 1 x4 z4 mgamma4 1 x1 z1 1 x2 z2 1 x3 z3 mdelta1 1 x2 y2 1 x3 y3 1 x4 y4 mdelta2 1 x1 y1 1 x3 y3 1 x4 y4 mdelta3 1 x1 y1 1 x2 y2 1 x4 y4 mdelta4 1 x1 y1 1 x2 y2 1 x3 y3 beta1 1detmbeta1 beta2 detmbeta2 beta3 1detmbeta3 beta4 detmbeta4 gamma1 detmgamma1 gamma2 1detmgamma2 gamma3 detmgamma3 gamma4 1detmgamma4 delta1 1detmdelta1 delta2 detmdelta2 delta3 1detmdelta3 delta4 detmdelta4 B1 beta1 0 0 0 gamma1 0 0 0 delta1 gamma1 beta1 0 0 delta1 gamma1 delta1 0 beta1 B2 beta2 0 0 0 gamma2 0 0 0 delta2 gamma2 beta2 0 0 delta2 gamma2 delta2 0 beta2 B3 beta3 0 0 0 gamma3 0 0 0 delta3 gamma3 beta3 0 0 delta3 gamma3 delta3 0 beta3 346 15 The Linear Tetrahedral Solid Element B4 beta4 0 0 0 gamma4 0 0 0 delta4 gamma4 beta4 0 0 delta4 gamma4 delta4 0 beta4 B B1 B2 B3 B46V D E1NU12NU1NU NU NU 0 0 0 NU 1NU NU 0 0 0 NU NU 1NU 0 0 0 0 0 0 12NU2 0 0 0 0 0 0 12NU2 0 0 0 0 0 0 12NU2 y DBu function y TetrahedronElementPStressessigma TetrahedronElementPStresses This function returns the three principal stresses for the element given the element stress vector The principal angles are not returned s1 sigma1 sigma2 sigma3 s2 sigma1sigma2 sigma1sigma3 sigma2sigma3 sigma4sigma4 sigma5sigma5 sigma6sigma6 ms3 sigma1 sigma4 sigma6 sigma4 sigma2 sigma5 sigma6 sigma5 sigma3 s3 detms3 y s1 s2 s3 Example 151 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 152 Use five linear tetrahedral elements to solve this problem as shown in Fig 153 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 3 4 7 and 8 3 the reactions at nodes 1 2 5 and 6 4 the stresses in each element 5 the principal stresses for each element w 025 m 05 m Fig 152 Thin Plate for Example 151 152 MATLAB Functions Used 347 8 1 2 3 5 4 6 7 Fig 153 Discretization of Thin Plate into Five Linear Tetrahedra Solution Use the six steps outlined in Chap 1 to solve this problem using the linear tetrahedral element Step 1 Discretizing the Domain We subdivide the plate into five linear tetrahedral elements only for illustration pur poses More elements must be used in order to obtain reliable results Thus the domain is subdivided into five elements and eight nodes as shown in Fig 153 The total force due to the distributed load is divided equally between nodes 3 4 7 and 8 in the ratio 1 2 2 1 This ratio is obtained considering that nodes 4 and 7 take loads from two elements each while nodes 3 and 8 take loads from one element each The units used in the MATLAB calculations are kN and meter Table 151 shows the element connectivity for this example Table 151 Element Connectivity for Example 151 Element Number Node i Node j Node m Node n 1 1 2 4 6 2 1 4 3 7 3 6 5 7 1 4 6 7 8 4 5 1 6 4 7 Step 2 Writing the Element Stiffness Matrices The five element stiffness matrices k1 k2 k3 k4 and k5 are obtained by making calls to the MATLAB function TetrahedronElementStiffness Each matrix has size 1212 E210e6 E 210000000 348 15 The Linear Tetrahedral Solid Element NU03 NU 03000 k1TetrahedronElementStiffness ENU000002500002505000250025 k1 10e008 Columns 1 through 7 23558 0 0 23558 00505 01010 0 0 06731 0 00337 06731 0 00337 0 0 06731 00673 0 06731 0 23558 00337 00673 23642 00841 01683 00017 00505 06731 0 00841 06857 00084 00337 01010 0 06731 01683 00084 06983 0 0 00337 0 00017 00337 0 00017 00505 0 0 00505 00059 00050 0 0 0 0 0 00034 00017 0 0 0 00673 00067 0 00673 0 0 0 0 0 00067 00034 0 01010 0 0 01010 00050 00236 0 Columns 8 through 12 00505 0 0 0 01010 0 0 0 0 0 0 0 00673 0 0 00505 0 00067 0 01010 00059 00034 0 00067 00050 00050 00017 00673 00034 00236 0 0 0 0 0 00059 0 0 0 00050 0 00017 0 00034 0 0 0 00067 0 0 0 00034 0 00067 0 00050 0 0 0 00236 152 MATLAB Functions Used 349 k2TetrahedronElementStiffness ENU00000250500050005025 k2 10e008 Columns 1 through 7 00017 0 0 0 00337 0 00017 0 00059 0 00505 0 0 00505 0 0 00017 0 0 0 0 0 00505 0 23558 0 0 23558 00337 0 0 0 06731 0 00337 0 0 0 0 0 06731 00673 00017 00505 0 23558 00337 00673 23642 00337 00059 00034 00505 06731 0 00841 0 00050 00017 01010 0 06731 01683 0 0 0 0 0 00673 00067 0 0 00034 0 0 0 0 0 00050 0 01010 0 0 01010 Columns 8 through 12 00337 0 0 0 0 00059 00050 0 0 00050 00034 00017 0 00034 0 00505 01010 0 0 01010 06731 0 0 0 0 0 06731 00673 0 0 00841 01683 00067 0 01010 06857 00084 0 00067 00050 00084 06983 00673 00034 00236 0 00673 00067 0 0 00067 00034 0 00067 0 00050 00236 0 0 00236 k3TetrahedronElementStiffness ENU0025002500025005025000 k3 10e008 Columns 1 through 7 350 15 The Linear Tetrahedral Solid Element 23558 0 0 23558 00505 01010 0 0 06731 0 00337 06731 0 00337 0 0 06731 00673 0 06731 0 23558 00337 00673 23642 00841 01683 00017 00505 06731 0 00841 06857 00084 00337 01010 0 06731 01683 00084 06983 0 0 00337 0 00017 00337 0 00017 00505 0 0 00505 00059 00050 0 0 0 0 0 00034 00017 0 0 0 00673 00067 0 00673 0 0 0 0 0 00067 00034 0 01010 0 0 01010 00050 00236 0 Columns 8 through 12 00505 0 0 0 01010 0 0 0 0 0 0 0 00673 0 0 00505 0 00067 0 01010 00059 00034 0 00067 00050 00050 00017 00673 00034 00236 0 0 0 0 0 00059 0 0 0 00050 0 00017 0 00034 0 0 0 00067 0 0 0 00034 0 00067 0 00050 0 0 0 00236 k4TetrahedronElementStiffness ENU00250025005025002505025 0025050 k4 10e008 Columns 1 through 7 00017 0 0 0 00337 0 00017 0 00059 0 00505 0 0 00505 0 0 00017 0 0 0 0 0 00505 0 23558 0 0 23558 152 MATLAB Functions Used 351 00337 0 0 0 06731 0 00337 0 0 0 0 0 06731 00673 00017 00505 0 23558 00337 00673 23642 00337 00059 00034 00505 06731 0 00841 0 00050 00017 01010 0 06731 01683 0 0 0 0 0 00673 00067 0 0 00034 0 0 0 0 0 00050 0 01010 0 0 01010 Columns 8 through 12 00337 0 0 0 0 00059 00050 0 0 00050 00034 00017 0 00034 0 00505 01010 0 0 01010 06731 0 0 0 0 0 06731 00673 0 0 00841 01683 00067 0 01010 06857 00084 0 00067 00050 00084 06983 00673 00034 00236 0 00673 00067 0 0 00067 00034 0 00067 0 00050 00236 0 0 00236 k5TetrahedronElementStiffness ENU000002500250025050005025 k5 10e008 Columns 1 through 7 11821 00421 00841 11804 00084 00841 11754 00421 03428 00042 00084 03370 00008 00421 00841 00042 03492 00841 00008 03475 00168 11804 00084 00841 11821 00421 00841 11737 00084 03370 00008 00421 03428 00042 00084 00841 00008 03475 00841 00042 03492 00168 11754 00421 00168 11737 00084 00168 11821 00421 03361 00008 00084 03302 00042 00421 00168 00008 03256 00168 00042 03239 00841 352 15 The Linear Tetrahedral Solid Element 11737 00084 00168 11754 00421 00168 11804 00084 03302 00042 00421 03361 00008 00084 00168 00042 03239 00168 00008 03256 00841 Columns 8 through 12 00421 00168 11737 00084 00168 03361 00008 00084 03302 00042 00008 03256 00168 00042 03239 00084 00168 11754 00421 00168 03302 00042 00421 03361 00008 00042 03239 00168 00008 03256 00421 00841 11804 00084 00841 03428 00042 00084 03370 00008 00042 03492 00841 00008 03475 00084 00841 11821 00421 00841 03370 00008 00421 03428 00042 00008 03475 00841 00042 03492 Step 3 Assembling the Global Stiffness Matrix Since the structure has eight nodes the size of the global stiffness matrix is 24 24 Therefore to obtain K we first set up a zero matrix of size 24 24 then make five calls to the MATLAB function TetrahedronAssemble since we have five elements in the structure Each call to the function will assemble one element The following are the MATLAB commands The final result is shown only after the fifth element has been assembled Kzeros2424 KTetrahedronAssembleKk11246 KTetrahedronAssembleKk21437 KTetrahedronAssembleKk36571 KTetrahedronAssembleKk46784 KTetrahedronAssembleKk51647 K 10e008 152 MATLAB Functions Used 353 Columns 1 through 7 35463 00421 00841 23558 00505 01010 00017 00421 10285 00042 00337 06731 0 00505 00841 00042 10475 00673 0 06731 0 23558 00337 00673 23642 00841 01683 0 00505 06731 0 00841 06857 00084 0 01010 0 06731 01683 00084 06983 0 00017 00505 0 0 0 0 23642 00337 00059 00034 0 0 0 00841 0 00050 00017 0 0 0 01683 11754 01262 00168 00017 00337 0 23558 01262 03361 00008 00505 00059 00050 00337 00168 00008 03256 0 00034 00017 00673 00067 0 01010 0 0 0 0 0 00067 00050 0 0 0 0 00673 00034 00236 0 0 0 0 11804 00084 02524 00067 0 00673 0 00084 03370 00008 0 00067 00034 0 02524 00008 03475 01010 00050 00236 0 11737 00084 00168 0 0 0 00067 00084 03302 00126 0 0 0 0 00168 00126 03239 0 0 0 01010 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 14 00337 0 11754 01262 00168 00067 0 00059 00050 01262 03361 00008 0 00067 00034 00017 00168 00008 03256 01010 00050 0 0 00017 00505 0 0 0 0 0 00337 00059 00034 0 0 0 0 0 00050 00017 0 0 00841 01683 23558 00337 00673 0 0 06857 00084 00505 06731 0 0 0 00084 06983 01010 0 06731 0 0 00505 01010 35463 00421 00841 0 0 06731 0 00421 10285 00042 0 0 0 06731 00841 00042 10475 0 0 0 0 0 0 0 23642 00841 0 0 0 0 0 00841 06857 0 0 0 0 0 01683 00084 354 15 The Linear Tetrahedral Solid Element 0 0 11737 00084 00168 23558 00505 0 0 00084 03302 00126 00337 06731 0 0 00168 00126 03239 00673 0 0 00673 11804 00084 02524 00017 00337 00067 00034 00084 03370 00008 00505 00059 00050 00236 02524 00008 03475 0 00034 0 0 00067 0 01010 0 0 0 0 0 00067 00050 0 0 0 0 00673 00034 00236 0 0 Columns 15 through 21 00673 11804 00084 02524 11737 00084 00168 00034 00084 03370 00008 00084 03302 00126 00236 02524 00008 03475 00168 00126 03239 0 00067 0 01010 0 0 0 0 0 00067 00050 0 0 0 0 00673 00034 00236 0 0 0 0 0 0 0 00067 0 01010 0 0 0 0 0 00067 00050 0 0 0 0 00673 00034 00236 0 11737 00084 00168 11804 00084 02524 0 00084 03302 00126 00084 03370 00008 0 00168 00126 03239 02524 00008 03475 01683 23558 00337 00673 00017 00505 0 00084 00505 06731 0 00337 00059 00034 06983 01010 0 06731 0 00050 00017 01010 35463 00421 00841 11754 01262 00168 0 00421 10285 00042 01262 03361 00008 06731 00841 00042 10475 00168 00008 03256 0 11754 01262 00168 35463 00421 00841 00050 01262 03361 00008 00421 10285 00042 00017 00168 00008 03256 00841 00042 10475 0 00017 00505 0 23558 00337 00673 0 00337 00059 00034 00505 06731 0 0 0 00050 00017 01010 0 06731 Columns 22 through 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 152 MATLAB Functions Used 355 0 0 0 0 0 0 0 0 0 00067 0 00673 0 00067 00034 01010 00050 00236 0 0 0 0 0 0 0 0 0 00017 00337 0 00505 00059 00050 0 00034 00017 23558 00505 01010 00337 06731 0 00673 0 06731 23642 00841 01683 00841 06857 00084 01683 00084 06983 Step 4 Applying the Boundary Conditions The matrix 1510 for this structure can be written using the global stiffness matrix obtained in the previous step The boundary conditions for this problem are given as U1x U1y U1z U2x U2y U2z 0 U5x U5y U5z U6x U6y U6z 0 F3x 0 F3y 3125 F3z 0 F4x 0 F4y 625 F4z 0 F7x 0 F7y 625 F7z 0 F8x 0 F8y 3125 F8z 0 1512 We next insert the above conditions into the matrix equation for this structure not shown here and proceed to the solution step below Step 5 Solving the Equations Solvingtheresultingsystemofequationswillbeperformedbypartitioningmanually and Gaussian elimination with MATLAB First we partition the resulting equation by extracting the submatrces in rows 7 to 12 rows 19 to 24 and columns 7 to 12 columns 19 to 24 Therefore we obtain the following equation noting that the numbers are shown to only two decimal places although MATLAB carries out the calculations using at least four decimal places 356 15 The Linear Tetrahedral Solid Element 108 236 008 017 236 003 007 001 0 010 0 0 0 008 069 001 005 067 0 0 001 001 0 0 0 017 001 070 010 0 067 007 000 002 0 0 0 236 005 010 355 004 008 118 001 025 001 0 007 003 067 0 004 103 000 001 034 000 0 001 000 007 0 067 008 000 105 025 000 035 010 001 002 001 0 007 118 001 025 355 004 008 236 005 010 0 001 000 001 034 000 004 103 000 003 067 0 010 001 002 025 000 035 008 000 105 007 0 067 0 0 0 001 0 010 236 003 007 236 008 017 0 0 0 0 001 001 005 067 0 008 069 001 0 0 0 007 000 002 010 0 067 017 001 070 U3x U3y U3z U4x U4y U4z U7x U7y U7z U8x U8y U8z 0 3125 0 0 625 0 0 625 0 0 3125 0 1513 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK712712 K7121924 K1924712 K19241924 k 10e008 Columns 1 through 7 23642 00841 01683 23558 00337 00673 00067 00841 06857 00084 00505 06731 0 0 01683 00084 06983 01010 0 06731 00673 23558 00505 01010 35463 00421 00841 11804 00337 06731 0 00421 10285 00042 00084 00673 0 06731 00841 00042 10475 02524 00067 0 00673 11804 00084 02524 35463 0 00067 00034 00084 03370 00008 00421 01010 00050 00236 02524 00008 03475 00841 0 0 0 00067 0 01010 23558 152 MATLAB Functions Used 357 0 0 0 0 00067 00050 00505 0 0 0 00673 00034 00236 01010 Columns 8 through 12 0 01010 0 0 0 00067 00050 0 0 0 00034 00236 0 0 0 00084 02524 00067 0 00673 03370 00008 0 00067 00034 00008 03475 01010 00050 00236 00421 00841 23558 00505 01010 10285 00042 00337 06731 0 00042 10475 00673 0 06731 00337 00673 23642 00841 01683 06731 0 00841 06857 00084 0 06731 01683 00084 06983 f0 3125 0 0 625 0 0 625 0 0 3125 0 f 0 31250 0 0 62500 0 0 62500 0 0 31250 0 ukf u 10e005 00004 06082 358 15 The Linear Tetrahedral Solid Element 00090 00127 06078 00056 00127 06078 00056 00004 06082 00090 It is now clear that the horizontal displacement along the ydirection at both nodes 3 and 8 is 06082 m and the horizontal displacement along the ydirection at both nodes 4 and 7 is 06078 mThese results are compared with the result of approximately 07 m obtained in previous examples and problems in Chap 11 through 14 using other elements Step 6 Postprocessing In this step we obtain the reactions at nodes 1 2 5 and 6 and the stresses in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U000000u16000000u712 U 10e005 0 0 0 0 0 0 00004 06082 00090 00127 06078 00056 0 0 0 0 152 MATLAB Functions Used 359 0 0 00127 06078 00056 00004 06082 00090 FKU F 313296 53492 93286 307045 40258 30777 00000 31250 0 00000 62500 00000 307045 40258 30777 313296 53492 93286 00000 62500 00000 00000 31250 00000 The force reactions along the three directions are clearly shown above Obviously force equilibrium is satisfied for this problem Next we set up the element nodal displacement vectors u1 u2 u3 u4 and u5 then we calculate the element stresses sigma1 sigma2 sigma3 sigma4 and sigma5 by making calls to the MATLAB func tion TetrahedronElementStresses u1U1 U2 U3 U4 U5 U6 U10 U11 U12 U16 U17 U18 360 15 The Linear Tetrahedral Solid Element u1 10e005 0 0 0 0 0 0 00127 06078 00056 0 0 0 u2U1 U2 U3 U10 U11 U12 U7 U8 U9 U19 U20 U21 u2 10e005 0 0 0 00127 06078 00056 00004 06082 00090 00127 06078 00056 u3U16 U17 U18 U13 U14 U15 U19 U20 U21 U1 U2 U3 u3 10e005 152 MATLAB Functions Used 361 0 0 0 0 0 0 00127 06078 00056 0 0 0 u4U16 U17 U18 U19 U20 U21 U22 U23 U24 U10 U11 U12 u4 10e005 0 0 0 00127 06078 00056 00004 06082 00090 00127 06078 00056 u5U1 U2 U3 U16 U17 U18 U10 U11 U12 U19 U20 U21 u5 10e005 0 0 0 0 0 362 15 The Linear Tetrahedral Solid Element 0 00127 06078 00056 00127 06078 00056 sigma1TetrahedronElementStresses ENU000002500002505000250025u1 sigma1 10e003 14728 34365 14728 00205 00090 0 sigma2TetrahedronElementStresses ENU00000250500050005025u2 sigma2 10e003 00064 27694 07102 00129 00134 00704 sigma3TetrahedronElementStresses ENU0025002500025005025000u3 sigma3 10e003 14728 34365 14728 152 MATLAB Functions Used 363 00205 00090 0 sigma4TetrahedronElementStresses ENU00250025005025002505 0250025050u4 sigma4 10e003 00064 27694 07102 00129 00134 00704 sigma5TetrahedronElementStresses ENU000002500250025050005025u5 sigma5 10e003 00096 27941 07945 00000 00000 02204 Thus it is clear that the normal stresses σy along the ydirection in elements 1 2 3 4 and 5 are are 34365 MPa tensile 27694 MPa tensile 34365 MPa tensile 27694 MPa tensile and 27941 MPa tensile respectively It is clear that the stresses in the ydirection approach closely the correct value of 3 MPa tensile Next we calculate the principal stresses for each element by making calls to the MATLAB function TetrahedronElementPStresses s1TetrahedronElementPStressessigma1 s1 10e009 364 15 The Linear Tetrahedral Solid Element 00000 00123 74534 s2TetrahedronElementPStressessigma2 s2 10e006 00035 19839 12296 s3TetrahedronElementPStressessigma3 s3 10e009 00000 00123 74534 s4TetrahedronElementPStressessigma4 s4 10e006 00035 19839 12296 s5TetrahedronElementPStressessigma5 s5 10e008 00000 00221 11431 152 MATLAB Functions Used 365 The principal stresses in the three directions are shown clearly above for each one of the five elements in this example Problems Problem 151 Consider the thin plate problem solved in Example 151 Solve the problem again us ing six linear tetrahedral elements instead of five elements as shown in Fig 154 Compare your answers for the displacements at nodes 3 4 7 and 8 with the answers obtained in the example Compare also the stresses obtained for the six elements with those obtained for the five elements in the example Compare also your answers with those obtained in the related examples and problems in Chaps 11 to 14 Hint Table 152 shows the element connectivity for this problem 8 1 2 3 4 5 6 7 Fig 154 Discretization of Thin Plate into Six Linear Tetrahedra Table 152 Element Connectivity for Problem 151 Element Number Node i Node j Node m Node n 1 1 2 4 8 2 1 2 8 5 3 2 8 5 6 4 1 3 7 4 5 1 7 5 8 6 1 8 4 7 16 The Linear Brick Solid Element 161 Basic Equations The linear brick solid element is a threedimensional finite element with both local and global coordinates It is characterized by linear shape functions in each of the x y and z directions It is also called a trilinear hexahedron This is the third isoparametric element we deal with in this bookThe linear brick element has modulus of elasticity E and Poissons ratio ν Each linear brick element has eight nodes with three degrees of freedom at each node as shown in Fig 161 The global coordinates of the eight nodes are denoted by x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 x6 y6 z6 x7 y7 z7 and x8 y8 z8The order of the nodes for each element is important they should be numbered such that the volume of the element is positive You can actuallycheckthisbyusingtheMATLABfunctionLinearBrickElementVolume which is written specifically for this purposeThe element is mapped to a hexahedron through the use of the natural coordinates ξ η and μ as shown in Fig 162 In this case the element stiffness matrix is not written explicitly but calculated through symbolic integration with the aid of the MATLAB Symbolic Math Toolbox The eight shape functions for this element are listed explicitly as follows in terms of the natural coordinates ξ η and μ see 1 8 μ ξ η 2 1 3 4 6 5 7 Fig 161 The Linear Brick Solid Element 368 16 The Linear Brick Solid Element 8 μ 2 1 3 4 6 5 7 ξ η Fig 162 The Linear Brick Element with Natural Coordinates N1 1 81 ξ1 η1 μ N2 1 81 ξ1 η1 μ N3 1 81 ξ1 η1 μ N4 1 81 ξ1 η1 μ N5 1 81 ξ1 η1 μ N6 1 81 ξ1 η1 μ N7 1 81 ξ1 η1 μ N8 1 81 ξ1 η1 μ 161 The Jacobian matrix for this element is given by J x ξ y ξ z ξ x η y η z η x μ y μ z μ 162 where x y and z are given by x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 z N1z1 N2z2 N3z3 N4z4 N5z5 N6z6 N7z7 N8z8 163 The B matrix is given as follows for this element The element stiffness matrix for the linear brick element is written in terms of a triple integral as follows where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 1611 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the stress vector is obtained for each element as follows σ DBu where σ is the stress vector in the element of size 6 1 and u is the 24 1 element displacement vector The vector σ is written for each element as σ σxxσyσzzτxyτyzτzxT Finally the element volume is given by the following formula V 1111 Jdξdηdμ 372 16 The Linear Brick Solid Element LinearBrickElementStressesE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 x6 y6 z6 x7 y7 z7 x8 y8 z8 u This function calculates the element stresses using the modulus of elasticity E Poissons ratio NU the coordinates of the first node x1 y1 z1 the coordinates of the second node x2 y2 z2 the coordinates of the third node x3 y3 z3 the coordinates of the fourth node x4 y4 z4 the coordinates of the fifth node x5 y5 z5 the coordinates of the sixth node x6 y6 z6 the coordinates of the seventh node x7 y7 z7 and the coordinates of the eighth node x8 y8 z8 It returns the stress vector for the element LinearBrickElementPStressessigma This function calculates the element principal stresses using the element stress vector sigma It returns a 3 1 vector in the form sigma1 sigma2 thetaT where sigma1 and sigma2 are the principal stresses for the element and theta is the principal angle The following is a listing of the MATLAB source code for each function function w LinearBrickElementVolumex1y1z1x2y2z2x3y3z3x4y4z4 x5y5z5x6y6z6x7y7z7x8y8z8 LinearBrickElementVolume This function returns the volume of the linear brick element whose first node has coordinates x1y1z1 second node has coordinates x2y2z2 third node has coordinates x3y3z3 fourth node has coordiantes x4y4z4 fifth node has coordiantes x5y5z5 sixth node has coordiantes x6y6z6 seventh node has coordiantes x7y7z7 and eighth node has coordiantes x8y8z8 syms s t u N1 1s1t1u8 N2 1s1t1u8 N3 1s1t1u8 N4 1s1t1u8 N5 1s1t1u8 N6 1s1t1u8 N7 1s1t1u8 N8 1s1t1u8 x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 z N1z1 N2z2 N3z3 N4z4 N5z5 N6z6 N7z7 N8z8 xs diffxs xt diffxt xu diffxu ys diffys yt diffyt yu diffyu 162 MATLAB Functions Used 373 zs diffzs zt diffzt zu diffzu J xsytzu ztyu ysxtzu ztxu zsxtyu ytxu Jnew simplifyJ r intintintJnew u 1 1 t 1 1 s 1 1 w doubler function w LinearBrickElementStiffnessENUx1y1z1x2y2z2x3y3z3x4y4z4 x5y5z5x6y6z6x7y7z7x8y8z8 LinearBrickElementStiffness This function returns the element stiffness matrix for a linear brick element with modulus of elasticity E Poissons ratio NU coordinates of node 1 x1y1z1 coordinates of node 2 x2y2z2 coordinates of node 3 x3y3z3 coordinates of node 4 x4y4z4 coordinates of node 5 x5y5z5 coordinates of node 6 x6y6z6 coordinates of node 7 x7y7z7 and coordinates of node 8 x8y8z8 The size of the element stiffness matrix is 24 x 24 syms s t u N1 1s1t1u8 N2 1s1t1u8 N3 1s1t1u8 N4 1s1t1u8 N5 1s1t1u8 N6 1s1t1u8 N7 1s1t1u8 N8 1s1t1u8 x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 z N1z1 N2z2 N3z3 N4z4 N5z5 N6z6 N7z7 N8z8 xs diffxs xt diffxt xu diffxu ys diffys yt diffyt yu diffyu zs diffzs zt diffzt zu diffzu J xsytzu ztyu ysxtzu ztxu zsxtyu ytxu N1s diffN1s N2s diffN2s N3s diffN3s 374 16 The Linear Brick Solid Element N4s diffN4s N5s diffN5s N6s diffN6s N7s diffN7s N8s diffN8s N1t diffN1t N2t diffN2t N3t diffN3t N4t diffN4t N5t diffN5t N6t diffN6t N7t diffN7t N8t diffN8t N1u diffN1u N2u diffN2u N3u diffN3u N4u diffN4u N5u diffN5u N6u diffN6u N7u diffN7u N8u diffN8u The expressions below are not divided by J they are adjusted for later in the calculation of BD matrix below N1x N1sytzu ztyu ysN1tzu ztN1u zsN1tyu ytN1u N2x N2sytzu ztyu ysN2tzu ztN2u zsN2tyu ytN2u N3x N3sytzu ztyu ysN3tzu ztN3u zsN3tyu ytN3u N4x N4sytzu ztyu ysN4tzu ztN4u zsN4tyu ytN4u N5x N5sytzu ztyu ysN5tzu ztN5u zsN5tyu ytN5u N6x N6sytzu ztyu ysN6tzu ztN6u zsN6tyu ytN6u N7x N7sytzu ztyu ysN7tzu ztN7u zsN7tyu ytN7u N8x N8sytzu ztyu ysN8tzu ztN8u zsN8tyu ytN8u N1y xsN1tzu ztN1u N1sxtzu ztxu zsxtN1u N1txu N2y xsN2tzu ztN2u N2sxtzu ztxu zsxtN2u N2txu N3y xsN3tzu ztN3u N3sxtzu ztxu zsxtN3u N3txu N4y xsN4tzu ztN4u N4sxtzu ztxu zsxtN4u N4txu N5y xsN5tzu ztN5u N5sxtzu ztxu zsxtN5u N5txu N6y xsN6tzu ztN6u N6sxtzu ztxu zsxtN6u N6txu N7y xsN7tzu ztN7u N7sxtzu ztxu zsxtN7u N7txu N8y xsN8tzu ztN8u N8sxtzu ztxu zsxtN8u N8txu N1z xsytN1u N1tyu ysxtN1u N1txu N1sxtyu ytxu N2z xsytN2u N2tyu ysxtN2u N2txu N2sxtyu ytxu N3z xsytN3u N3tyu ysxtN3u N3txu N3sxtyu ytxu N4z xsytN4u N4tyu ysxtN4u N4txu N4sxtyu ytxu N5z xsytN5u N5tyu ysxtN5u N5txu N5sxtyu ytxu N6z xsytN6u N6tyu ysxtN6u N6txu N6sxtyu ytxu N7z xsytN7u N7tyu ysxtN7u N7txu N7sxtyu ytxu N8z xsytN8u N8tyu ysxtN8u N8txu N8sxtyu ytxu Next the B matrix is calculated explicitly as follows B N1x N2x N3x N4x N5x N6x N7x N8x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 N1y N2y N3y N4y N5y N6y N7y N8y 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 N1z N2z N3z N4z N5z N6z N7z N8z N1y N2y N3y N4y N5y N6y N7y N8y N1x N2x N3x N4x N5x N6x N7x N8x 0 0 0 0 0 0 0 0 162 MATLAB Functions Used 375 0 0 0 0 0 0 0 0 N1z N2z N3z N4z N5z N6z N7z N8z N1y N2y N3y N4y N5y N6y N7y N8y N1z N2z N3z N4z N5z N6z N7z N8z 0 0 0 0 0 0 0 0 N1x N2x N3x N4x N5x N6x N7x N8x Bnew simplifyB Jnew simplifyJ D E1NU12NU1NU NU NU 0 0 0 NU 1NU NU 0 0 0 NU NU 1 NU 0 0 0 0 0 0 12NU2 0 0 0 0 0 0 1 2NU2 0 0 0 0 0 0 1 2NU2 BD transposeBnewDBnewJnew r intintintBD u 1 1 t 1 1 s 1 1 w doubler function y LinearBrickAssembleKkijmnpqrs LinearBrickAssemble This function assembles the element stiffness matrix k of the linear brick solid element with nodes i j m n p q r and s into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K3i23i2 K3i23i2 k11 K3i23i1 K3i23i1 k12 K3i23i K3i23i k13 K3i23j2 K3i23j2 k14 K3i23j1 K3i23j1 k15 K3i23j K3i23j k16 K3i23m2 K3i23m2 k17 K3i23m1 K3i23m1 k18 K3i23m K3i23m k19 K3i23n2 K3i23n2 k110 K3i23n1 K3i23n1 k111 K3i23n K3i23n k112 K3i23p2 K3i23p2 k113 K3i23p1 K3i23p1 k114 K3i23p K3i23p k115 K3i23q2 K3i23q2 k116 K3i23q1 K3i23q1 k117 K3i23q K3i23q k118 K3i23r2 K3i23r2 k119 K3i23r1 K3i23r1 k120 K3i23r K3i23r k121 K3i23s2 K3i23s2 k122 K3i23s1 K3i23s1 k123 K3i23s K3i23s k124 K3i13i2 K3i13i2 k21 K3i13i1 K3i13i1 k22 K3i13i K3i13i k23 K3i13j2 K3i13j2 k24 K3i13j1 K3i13j1 k25 K3i13j K3i13j k26 K3i13m2 K3i13m2 k27 K3i13m1 K3i13m1 k28 K3i13m K3i13m k29 376 16 The Linear Brick Solid Element K3i13n2 K3i13n2 k210 K3i13n1 K3i13n1 k211 K3i13n K3i13n k212 K3i13p2 K3i13p2 k213 K3i13p1 K3i13p1 k214 K3i13p K3i13p k215 K3i13q2 K3i13q2 k216 K3i13q1 K3i13q1 k217 K3i13q K3i13q k218 K3i13r2 K3i13r2 k219 K3i13r1 K3i13r1 k220 K3i13r K3i13r k221 K3i13s2 K3i13s2 k222 K3i13s1 K3i13s1 k223 K3i13s K3i13s k224 K3i3i2 K3i3i2 k31 K3i3i1 K3i3i1 k32 K3i3i K3i3i k33 K3i3j2 K3i3j2 k34 K3i3j1 K3i3j1 k35 K3i3j K3i3j k36 K3i3m2 K3i3m2 k37 K3i3m1 K3i3m1 k38 K3i3m K3i3m k39 K3i3n2 K3i3n2 k310 K3i3n1 K3i3n1 k311 K3i3n K3i3n k312 K3i3p2 K3i3p2 k313 K3i3p1 K3i3p1 k314 K3i3p K3i3p k315 K3i3q2 K3i3q2 k316 K3i3q1 K3i3q1 k317 K3i3q K3i3q k318 K3i3r2 K3i3r2 k319 K3i3r1 K3i3r1 k320 K3i3r K3i3r k321 K3i3s2 K3i3s2 k322 K3i3s1 K3i3s1 k323 K3i3s K3i3s k324 K3j23i2 K3j23i2 k41 K3j23i1 K3j23i1 k42 K3j23i K3j23i k43 K3j23j2 K3j23j2 k44 K3j23j1 K3j23j1 k45 K3j23j K3j23j k46 K3j23m2 K3j23m2 k47 K3j23m1 K3j23m1 k48 K3j23m K3j23m k49 K3j23n2 K3j23n2 k410 K3j23n1 K3j23n1 k411 K3j23n K3j23n k412 K3j23p2 K3j23p2 k413 K3j23p1 K3j23p1 k414 162 MATLAB Functions Used 377 K3j23p K3j23p k415 K3j23q2 K3j23q2 k416 K3j23q1 K3j23q1 k417 K3j23q K3j23q k418 K3j23r2 K3j23r2 k419 K3j23r1 K3j23r1 k420 K3j23r K3j23r k421 K3j23s2 K3j23s2 k422 K3j23s1 K3j23s1 k423 K3j23s K3j23s k424 K3j13i2 K3j13i2 k51 K3j13i1 K3j13i1 k52 K3j13i K3j13i k53 K3j13j2 K3j13j2 k54 K3j13j1 K3j13j1 k55 K3j13j K3j13j k56 K3j13m2 K3j13m2 k57 K3j13m1 K3j13m1 k58 K3j13m K3j13m k59 K3j13n2 K3j13n2 k510 K3j13n1 K3j13n1 k511 K3j13n K3j13n k512 K3j13p2 K3j13p2 k513 K3j13p1 K3j13p1 k514 K3j13p K3j13p k515 K3j13q2 K3j13q2 k516 K3j13q1 K3j13q1 k517 K3j13q K3j13q k518 K3j13r2 K3j13r2 k519 K3j13r1 K3j13r1 k520 K3j13r K3j13r k521 K3j13s2 K3j13s2 k522 K3j13s1 K3j13s1 k523 K3j13s K3j13s k524 K3j3i2 K3j3i2 k61 K3j3i1 K3j3i1 k62 K3j3i K3j3i k63 K3j3j2 K3j3j2 k64 K3j3j1 K3j3j1 k65 K3j3j K3j3j k66 K3j3m2 K3j3m2 k67 K3j3m1 K3j3m1 k68 K3j3m K3j3m k69 K3j3n2 K3j3n2 k610 K3j3n1 K3j3n1 k611 K3j3n K3j3n k612 K3j3p2 K3j3p2 k613 K3j3p1 K3j3p1 k614 K3j3p K3j3p k615 K3j3q2 K3j3q2 k616 K3j3q1 K3j3q1 k617 K3j3q K3j3q k618 K3j3r2 K3j3r2 k619 378 16 The Linear Brick Solid Element K3j3r1 K3j3r1 k620 K3j3r K3j3r k621 K3j3s2 K3j3s2 k622 K3j3s1 K3j3s1 k623 K3j3s K3j3s k624 K3m23i2 K3m23i2 k71 K3m23i1 K3m23i1 k72 K3m23i K3m23i k73 K3m23j2 K3m23j2 k74 K3m23j1 K3m23j1 k75 K3m23j K3m23j k76 K3m23m2 K3m23m2 k77 K3m23m1 K3m23m1 k78 K3m23m K3m23m k79 K3m23n2 K3m23n2 k710 K3m23n1 K3m23n1 k711 K3m23n K3m23n k712 K3m23p2 K3m23p2 k713 K3m23p1 K3m23p1 k714 K3m23p K3m23p k715 K3m23q2 K3m23q2 k716 K3m23q1 K3m23q1 k717 K3m23q K3m23q k718 K3m23r2 K3m23r2 k719 K3m23r1 K3m23r1 k720 K3m23r K3m23r k721 K3m23s2 K3m23s2 k722 K3m23s1 K3m23s1 k723 K3m23s K3m23s k724 K3m13i2 K3m13i2 k81 K3m13i1 K3m13i1 k82 K3m13i K3m13i k83 K3m13j2 K3m13j2 k84 K3m13j1 K3m13j1 k85 K3m13j K3m13j k86 K3m13m2 K3m13m2 k87 K3m13m1 K3m13m1 k88 K3m13m K3m13m k89 K3m13n2 K3m13n2 k810 K3m13n1 K3m13n1 k811 K3m13n K3m13n k812 K3m13p2 K3m13p2 k813 K3m13p1 K3m13p1 k814 K3m13p K3m13p k815 K3m13q2 K3m13q2 k816 K3m13q1 K3m13q1 k817 K3m13q K3m13q k818 K3m13r2 K3m13r2 k819 K3m13r1 K3m13r1 k820 K3m13r K3m13r k821 K3m13s2 K3m13s2 k822 K3m13s1 K3m13s1 k823 K3m13s K3m13s k824 162 MATLAB Functions Used 379 K3m3i2 K3m3i2 k91 K3m3i1 K3m3i1 k92 K3m3i K3m3i k93 K3m3j2 K3m3j2 k94 K3m3j1 K3m3j1 k95 K3m3j K3m3j k96 K3m3m2 K3m3m2 k97 K3m3m1 K3m3m1 k98 K3m3m K3m3m k99 K3m3n2 K3m3n2 k910 K3m3n1 K3m3n1 k911 K3m3n K3m3n k912 K3m3p2 K3m3p2 k913 K3m3p1 K3m3p1 k914 K3m3p K3m3p k915 K3m3q2 K3m3q2 k916 K3m3q1 K3m3q1 k917 K3m3q K3m3q k918 K3m3r2 K3m3r2 k919 K3m3r1 K3m3r1 k920 K3m3r K3m3r k921 K3m3s2 K3m3s2 k922 K3m3s1 K3m3s1 k923 K3m3s K3m3s k924 K3n23i2 K3n23i2 k101 K3n23i1 K3n23i1 k102 K3n23i K3n23i k103 K3n23j2 K3n23j2 k104 K3n23j1 K3n23j1 k105 K3n23j K3n23j k106 K3n23m2 K3n23m2 k107 K3n23m1 K3n23m1 k108 K3n23m K3n23m k109 K3n23n2 K3n23n2 k1010 K3n23n1 K3n23n1 k1011 K3n23n K3n23n k1012 K3n23p2 K3n23p2 k1013 K3n23p1 K3n23p1 k1014 K3n23p K3n23p k1015 K3n23q2 K3n23q2 k1016 K3n23q1 K3n23q1 k1017 K3n23q K3n23q k1018 K3n23r2 K3n23r2 k1019 K3n23r1 K3n23r1 k1020 K3n23r K3n23r k1021 K3n23s2 K3n23s2 k1022 K3n23s1 K3n23s1 k1023 K3n23s K3n23s k1024 K3n13i2 K3n13i2 k111 K3n13i1 K3n13i1 k112 K3n13i K3n13i k113 K3n13j2 K3n13j2 k114 K3n13j1 K3n13j1 k115 K3n13j K3n13j k116 K3n13m2 K3n13m2 k117 380 16 The Linear Brick Solid Element K3n13m1 K3n13m1 k118 K3n13m K3n13m k119 K3n13n2 K3n13n2 k1110 K3n13n1 K3n13n1 k1111 K3n13n K3n13n k1112 K3n13p2 K3n13p2 k1113 K3n13p1 K3n13p1 k1114 K3n13p K3n13p k1115 K3n13q2 K3n13q2 k1116 K3n13q1 K3n13q1 k1117 K3n13q K3n13q k1118 K3n13r2 K3n13r2 k1119 K3n13r1 K3n13r1 k1120 K3n13r K3n13r k1121 K3n13s2 K3n13s2 k1122 K3n13s1 K3n13s1 k1123 K3n13s K3n13s k1124 K3n3i2 K3n3i2 k121 K3n3i1 K3n3i1 k122 K3n3i K3n3i k123 K3n3j2 K3n3j2 k124 K3n3j1 K3n3j1 k125 K3n3j K3n3j k126 K3n3m2 K3n3m2 k127 K3n3m1 K3n3m1 k128 K3n3m K3n3m k129 K3n3n2 K3n3n2 k1210 K3n3n1 K3n3n1 k1211 K3n3n K3n3n k1212 K3n3p2 K3n3p2 k1213 K3n3p1 K3n3p1 k1214 K3n3p K3n3p k1215 K3n3q2 K3n3q2 k1216 K3n3q1 K3n3q1 k1217 K3n3q K3n3q k1218 K3n3r2 K3n3r2 k1219 K3n3r1 K3n3r1 k1220 K3n3r K3n3r k1221 K3n3s2 K3n3s2 k1222 K3n3s1 K3n3s1 k1223 K3n3s K3n3s k1224 K3p23i2 K3p23i2 k131 K3p23i1 K3p23i1 k132 K3p23i K3p23i k133 K3p23j2 K3p23j2 k134 K3p23j1 K3p23j1 k135 K3p23j K3p23j k136 K3p23m2 K3p23m2 k137 K3p23m1 K3p23m1 k138 K3p23m K3p23m k139 K3p23n2 K3p23n2 k1310 K3p23n1 K3p23n1 k1311 K3p23n K3p23n k1312 K3p23p2 K3p23p2 k1313 162 MATLAB Functions Used 381 K3p23p1 K3p23p1 k1314 K3p23p K3p23p k1315 K3p23q2 K3p23q2 k1316 K3p23q1 K3p23q1 k1317 K3p23q K3p23q k1318 K3p23r2 K3p23r2 k1319 K3p23r1 K3p23r1 k1320 K3p23r K3p23r k1321 K3p23s2 K3p23s2 k1322 K3p23s1 K3p23s1 k1323 K3p23s K3p23s k1324 K3p13i2 K3p13i2 k141 K3p13i1 K3p13i1 k142 K3p13i K3p13i k143 K3p13j2 K3p13j2 k144 K3p13j1 K3p13j1 k145 K3p13j K3p13j k146 K3p13m2 K3p13m2 k147 K3p13m1 K3p13m1 k148 K3p13m K3p13m k149 K3p13n2 K3p13n2 k1410 K3p13n1 K3p13n1 k1411 K3p13n K3p13n k1412 K3p13p2 K3p13p2 k1413 K3p13p1 K3p13p1 k1414 K3p13p K3p13p k1415 K3p13q2 K3p13q2 k1416 K3p13q1 K3p13q1 k1417 K3p13q K3p13q k1418 K3p13r2 K3p13r2 k1419 K3p13r1 K3p13r1 k1420 K3p13r K3p13r k1421 K3p13s2 K3p13s2 k1422 K3p13s1 K3p13s1 k1423 K3p13s K3p13s k1424 K3p3i2 K3p3i2 k151 K3p3i1 K3p3i1 k152 K3p3i K3p3i k153 K3p3j2 K3p3j2 k154 K3p3j1 K3p3j1 k155 K3p3j K3p3j k156 K3p3m2 K3p3m2 k157 K3p3m1 K3p3m1 k158 K3p3m K3p3m k159 K3p3n2 K3p3n2 k1510 K3p3n1 K3p3n1 k1511 K3p3n K3p3n k1512 K3p3p2 K3p3p2 k1513 K3p3p1 K3p3p1 k1514 K3p3p K3p3p k1515 K3p3q2 K3p3q2 k1516 K3p3q1 K3p3q1 k1517 K3p3q K3p3q k1518 K3p3r2 K3p3r2 k1519 382 16 The Linear Brick Solid Element K3p3r1 K3p3r1 k1520 K3p3r K3p3r k1521 K3p3s2 K3p3s2 k1522 K3p3s1 K3p3s1 k1523 K3p3s K3p3s k1524 K3q23i2 K3q23i2 k161 K3q23i1 K3q23i1 k162 K3q23i K3q23i k163 K3q23j2 K3q23j2 k164 K3q23j1 K3q23j1 k165 K3q23j K3q23j k166 K3q23m2 K3q23m2 k167 K3q23m1 K3q23m1 k168 K3q23m K3q23m k169 K3q23n2 K3q23n2 k1610 K3q23n1 K3q23n1 k1611 K3q23n K3q23n k1612 K3q23p2 K3q23p2 k1613 K3q23p1 K3q23p1 k1614 K3q23p K3q23p k1615 K3q23q2 K3q23q2 k1616 K3q23q1 K3q23q1 k1617 K3q23q K3q23q k1618 K3q23r2 K3q23r2 k1619 K3q23r1 K3q23r1 k1620 K3q23r K3q23r k1621 K3q23s2 K3q23s2 k1622 K3q23s1 K3q23s1 k1623 K3q23s K3q23s k1624 K3q13i2 K3q13i2 k171 K3q13i1 K3q13i1 k172 K3q13i K3q13i k173 K3q13j2 K3q13j2 k174 K3q13j1 K3q13j1 k175 K3q13j K3q13j k176 K3q13m2 K3q13m2 k177 K3q13m1 K3q13m1 k178 K3q13m K3q13m k179 K3q13n2 K3q13n2 k1710 K3q13n1 K3q13n1 k1711 K3q13n K3q13n k1712 K3q13p2 K3q13p2 k1713 K3q13p1 K3q13p1 k1714 K3q13p K3q13p k1715 K3q13q2 K3q13q2 k1716 K3q13q1 K3q13q1 k1717 K3q13q K3q13q k1718 K3q13r2 K3q13r2 k1719 K3q13r1 K3q13r1 k1720 K3q13r K3q13r k1721 K3q13s2 K3q13s2 k1722 K3q13s1 K3q13s1 k1723 162 MATLAB Functions Used 383 K3q13s K3q13s k1724 K3q3i2 K3q3i2 k181 K3q3i1 K3q3i1 k182 K3q3i K3q3i k183 K3q3j2 K3q3j2 k184 K3q3j1 K3q3j1 k185 K3q3j K3q3j k186 K3q3m2 K3q3m2 k187 K3q3m1 K3q3m1 k188 K3q3m K3q3m k189 K3q3n2 K3q3n2 k1810 K3q3n1 K3q3n1 k1811 K3q3n K3q3n k1812 K3q3p2 K3q3p2 k1813 K3q3p1 K3q3p1 k1814 K3q3p K3q3p k1815 K3q3q2 K3q3q2 k1816 K3q3q1 K3q3q1 k1817 K3q3q K3q3q k1818 K3q3r2 K3q3r2 k1819 K3q3r1 K3q3r1 k1820 K3q3r K3q3r k1821 K3q3s2 K3q3s2 k1822 K3q3s1 K3q3s1 k1823 K3q3s K3q3s k1824 K3r23i2 K3r23i2 k191 K3r23i1 K3r23i1 k192 K3r23i K3r23i k193 K3r23j2 K3r23j2 k194 K3r23j1 K3r23j1 k195 K3r23j K3r23j k196 K3r23m2 K3r23m2 k197 K3r23m1 K3r23m1 k198 K3r23m K3r23m k199 K3r23n2 K3r23n2 k1910 K3r23n1 K3r23n1 k1911 K3r23n K3r23n k1912 K3r23p2 K3r23p2 k1913 K3r23p1 K3r23p1 k1914 K3r23p K3r23p k1915 K3r23q2 K3r23q2 k1916 K3r23q1 K3r23q1 k1917 K3r23q K3r23q k1918 K3r23r2 K3r23r2 k1919 K3r23r1 K3r23r1 k1920 K3r23r K3r23r k1921 K3r23s2 K3r23s2 k1922 K3r23s1 K3r23s1 k1923 K3r23s K3r23s k1924 K3r13i2 K3r13i2 k201 K3r13i1 K3r13i1 k202 K3r13i K3r13i k203 K3r13j2 K3r13j2 k204 K3r13j1 K3r13j1 k205 384 16 The Linear Brick Solid Element K3r13j K3r13j k206 K3r13m2 K3r13m2 k207 K3r13m1 K3r13m1 k208 K3r13m K3r13m k209 K3r13n2 K3r13n2 k2010 K3r13n1 K3r13n1 k2011 K3r13n K3r13n k2012 K3r13p2 K3r13p2 k2013 K3r13p1 K3r13p1 k2014 K3r13p K3r13p k2015 K3r13q2 K3r13q2 k2016 K3r13q1 K3r13q1 k2017 K3r13q K3r13q k2018 K3r13r2 K3r13r2 k2019 K3r13r1 K3r13r1 k2020 K3r13r K3r13r k2021 K3r13s2 K3r13s2 k2022 K3r13s1 K3r13s1 k2023 K3r13s K3r13s k2024 K3r3i2 K3r3i2 k211 K3r3i1 K3r3i1 k212 K3r3i K3r3i k213 K3r3j2 K3r3j2 k214 K3r3j1 K3r3j1 k215 K3r3j K3r3j k216 K3r3m2 K3r3m2 k217 K3r3m1 K3r3m1 k218 K3r3m K3r3m k219 K3r3n2 K3r3n2 k2110 K3r3n1 K3r3n1 k2111 K3r3n K3r3n k2112 K3r3p2 K3r3p2 k2113 K3r3p1 K3r3p1 k2114 K3r3p K3r3p k2115 K3r3q2 K3r3q2 k2116 K3r3q1 K3r3q1 k2117 K3r3q K3r3q k2118 K3r3r2 K3r3r2 k2119 K3r3r1 K3r3r1 k2120 K3r3r K3r3r k2121 K3r3s2 K3r3s2 k2122 K3r3s1 K3r3s1 k2123 K3r3s K3r3s k2124 K3s23i2 K3s23i2 k221 K3s23i1 K3s23i1 k222 K3s23i K3s23i k223 K3s23j2 K3s23j2 k224 K3s23j1 K3s23j1 k225 K3s23j K3s23j k226 K3s23m2 K3s23m2 k227 K3s23m1 K3s23m1 k228 K3s23m K3s23m k229 K3s23n2 K3s23n2 k2210 K3s23n1 K3s23n1 k2211 162 MATLAB Functions Used 385 K3s23n K3s23n k2212 K3s23p2 K3s23p2 k2213 K3s23p1 K3s23p1 k2214 K3s23p K3s23p k2215 K3s23q2 K3s23q2 k2216 K3s23q1 K3s23q1 k2217 K3s23q K3s23q k2218 K3s23r2 K3s23r2 k2219 K3s23r1 K3s23r1 k2220 K3s23r K3s23r k2221 K3s23s2 K3s23s2 k2222 K3s23s1 K3s23s1 k2223 K3s23s K3s23s k2224 K3s13i2 K3s13i2 k231 K3s13i1 K3s13i1 k232 K3s13i K3s13i k233 K3s13j2 K3s13j2 k234 K3s13j1 K3s13j1 k235 K3s13j K3s13j k236 K3s13m2 K3s13m2 k237 K3s13m1 K3s13m1 k238 K3s13m K3s13m k239 K3s13n2 K3s13n2 k2310 K3s13n1 K3s13n1 k2311 K3s13n K3s13n k2312 K3s13p2 K3s13p2 k2313 K3s13p1 K3s13p1 k2314 K3s13p K3s13p k2315 K3s13q2 K3s13q2 k2316 K3s13q1 K3s13q1 k2317 K3s13q K3s13q k2318 K3s13r2 K3s13r2 k2319 K3s13r1 K3s13r1 k2320 K3s13r K3s13r k2321 K3s13s2 K3s13s2 k2322 K3s13s1 K3s13s1 k2323 K3s13s K3s13s k2324 K3s3i2 K3s3i2 k241 K3s3i1 K3s3i1 k242 K3s3i K3s3i k243 K3s3j2 K3s3j2 k244 K3s3j1 K3s3j1 k245 K3s3j K3s3j k246 K3s3m2 K3s3m2 k247 K3s3m1 K3s3m1 k248 K3s3m K3s3m k249 K3s3n2 K3s3n2 k2410 K3s3n1 K3s3n1 k2411 K3s3n K3s3n k2412 K3s3p2 K3s3p2 k2413 K3s3p1 K3s3p1 k2414 K3s3p K3s3p k2415 K3s3q2 K3s3q2 k2416 386 16 The Linear Brick Solid Element K3s3q1 K3s3q1 k2417 K3s3q K3s3q k2418 K3s3r2 K3s3r2 k2419 K3s3r1 K3s3r1 k2420 K3s3r K3s3r k2421 K3s3s2 K3s3s2 k2422 K3s3s1 K3s3s1 k2423 K3s3s K3s3s k2424 y K function w LinearBrickElementStresses ENUx1y1z1x2y2z2x3y3z3x4y4z4x5y5z5x6y6 z6x7y7z7x8y8z8u LinearBrickElementStresses This function returns the element stress vector for a linear brick solid element with modulus of elasticity E Poissons ratio NU coordinates of node 1 x1y1z1 coordinates of node 2 x2y2z2 coordinates of node 3 x3y3z3 coordinates of node 4 x4y4z4 coordinates of node 5 x5y5z5 coordinates of node 6 x6y6z6 coordinates of node 7 x7y7z7 and coordinates of node 8 x8y8z8 syms s t u N1 1s1t1u8 N2 1s1t1u8 N3 1s1t1u8 N4 1s1t1u8 N5 1s1t1u8 N6 1s1t1u8 N7 1s1t1u8 N8 1s1t1u8 x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 z N1z1 N2z2 N3z3 N4z4 N5z5 N6z6 N7z7 N8z8 xs diffxs xt diffxt xu diffxu ys diffys yt diffyt yu diffyu zs diffzs zt diffzt zu diffzu J xsytzu ztyu ysxtzu ztxu zsxtyu ytxu N1s diffN1s N2s diffN2s N3s diffN3s N4s diffN4s N5s diffN5s N6s diffN6s 162 MATLAB Functions Used 387 N7s diffN7s N8s diffN8s N1t diffN1t N2t diffN2t N3t diffN3t N4t diffN4t N5t diffN5t N6t diffN6t N7t diffN7t N8t diffN8t N1u diffN1u N2u diffN2u N3u diffN3u N4u diffN4u N5u diffN5u N6u diffN6u N7u diffN7u N8u diffN8u The expressions below are not divided by J they are adjusted for later N1x N1sytzu ztyu ysN1tzu ztN1u zsN1tyu ytN1u N2x N2sytzu ztyu ysN2tzu ztN2u zsN2tyu ytN2u N3x N3sytzu ztyu ysN3tzu ztN3u zsN3tyu ytN3u N4x N4sytzu ztyu ysN4tzu ztN4u zsN4tyu ytN4u N5x N5sytzu ztyu ysN5tzu ztN5u zsN5tyu ytN5u N6x N6sytzu ztyu ysN6tzu ztN6u zsN6tyu ytN6u N7x N7sytzu ztyu ysN7tzu ztN7u zsN7tyu ytN7u N8x N8sytzu ztyu ysN8tzu ztN8u zsN8tyu ytN8u N1y xsN1tzu ztN1u N1sxtzu ztxu zsxtN1u N1txu N2y xsN2tzu ztN2u N2sxtzu ztxu zsxtN2u N2txu N3y xsN3tzu ztN3u N3sxtzu ztxu zsxtN3u N3txu N4y xsN4tzu ztN4u N4sxtzu ztxu zsxtN4u N4txu N5y xsN5tzu ztN5u N5sxtzu ztxu zsxtN5u N5txu N6y xsN6tzu ztN6u N6sxtzu ztxu zsxtN6u N6txu N7y xsN7tzu ztN7u N7sxtzu ztxu zsxtN7u N7txu N8y xsN8tzu ztN8u N8sxtzu ztxu zsxtN8u N8txu N1z xsytN1u N1tyu ysxtN1u N1txu N1sxtyu ytxu N2z xsytN2u N2tyu ysxtN2u N2txu N2sxtyu ytxu N3z xsytN3u N3tyu ysxtN3u N3txu N3sxtyu ytxu N4z xsytN4u N4tyu ysxtN4u N4txu N4sxtyu ytxu N5z xsytN5u N5tyu ysxtN5u N5txu N5sxtyu ytxu N6z xsytN6u N6tyu ysxtN6u N6txu N6sxtyu ytxu N7z xsytN7u N7tyu ysxtN7u N7txu N7sxtyu ytxu N8z xsytN8u N8tyu ysxtN8u N8txu N8sxtyu ytxu Next the B matrix is calculated explicitly as follows B N1x N2x N3x N4x N5x N6x N7x N8x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 N1y N2y N3y N4y N5y N6y N7y N8y 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 N1z N2z N3z N4z N5z N6z N7z N8z N1y N2y N3y N4y N5y N6y N7y N8y N1x N2x N3x N4x N5x N6x N7x N8x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 N1z N2z N3z N4z N5z N6z N7z N8z N1y N2y N3y N4y N5y N6y N7y N8y N1z N2z N3z N4z N5z N6z N7z N8z 0 0 0 0 0 0 0 0 N1x N2x N3x N4x N5x N6x N7x N8x 388 16 The Linear Brick Solid Element Bnew simplifyB Jnew simplifyJ D E1NU12NU1NU NU NU 0 0 0 NU 1NU NU 0 0 0 1 NU 0 0 0 0 0 0 12NU2 0 0 0 0 0 0 12NU2 0 0 0 0 0 0 12NU2 Bfinal BnewJnew w DBfinalu We also calculate the stresses at the centroid of the element wcent subsw stu 000 w doublewcent function y LinearBrickElementPStressessigma LinearBrickElementPStresses This function returns the three principal stresses for the element given the element stress vector The principal angles are not returned s1 sigma1 sigma2 sigma3 s2 sigma1sigma2 sigma1sigma3 sigma2sigma3 sigma4sigma4 sigma5sigma5 sigma6sigma6 ms3 sigma1 sigma4 sigma6 sigma4 sigma2 sigma5 sigma6 sigma5 sigma3 s3 detms3 y s1 s2 s3 Example 161 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 163 Use one linear brick element to solve this problem as shown in Fig 164 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 5 6 7 and 8 w 025 m 05 m Fig 163 Thin Plate for Example 161 162 MATLAB Functions Used 389 8 2 1 6 5 3 4 7 Fig 164 Discretization of Thin Plate into One Linear Brick Solution Use the six steps outlined in Chap 1 to solve this problem using the linear brick element Step 1 Discretizing the Domain We subdivide the plate into one linear brick element only for illustration purposes More elements must be used in order to obtain reliable results Thus the domain is subdivided into one element and eight nodes as shown in Fig 164 The total force due to the distributed load is divided equally between nodes 5 6 7 and 8 The units used in the MATLAB calculations are kN and meter Table 161 shows the element connectivity for this example Table 161 Element Connectivity for Example 161 Element Number Node i Node j Node m Node n Node p Node q Node r Node s 1 1 2 3 4 5 6 7 8 Step 2 Writing the Element Stiffness Matrices The element stiffness matrix k1 is obtained by making a call to the MATLAB function LinearBrickElementStiffness This matrix has size 24 24 k1 LinearBrickElementStiffness 210e6030000250000025000250025 05000250500050250050250025 k1 10e008 390 16 The Linear Brick Solid Element Columns 1 through 10 04571 04445 02256 02218 02227 02252 01143 01080 00042 00021 04445 04571 02218 02256 02252 02227 01080 01143 00021 00042 02256 02218 04571 04445 01143 01080 02227 02252 00004 00008 02218 02256 04445 04571 01080 01143 02252 02227 00008 00004 02227 02252 01143 01080 04571 04445 02256 02218 00008 00004 02252 02227 01080 01143 04445 04571 02218 02256 00004 00008 01143 01080 02227 02252 02256 02218 04571 04445 00021 00042 01080 01143 02252 02227 02218 02256 04445 04571 00042 00021 00042 00021 00004 00008 00008 00004 00021 00042 04655 04403 00021 00042 00008 00004 00004 00008 00042 00021 04403 04655 00004 00008 00042 00021 00021 00042 00008 00004 02319 02092 00008 00004 00021 00042 00042 00021 00004 00008 02092 02319 00008 00004 00021 00042 00042 00021 00004 00008 02311 02210 00004 00008 00042 00021 00021 00042 00008 00004 02210 02311 00021 00042 00008 00004 00004 00008 00042 00021 01164 01038 00042 00021 00004 00008 00008 00004 00021 00042 01038 01164 00421 00084 00042 00210 00084 00421 00210 00042 00841 00168 00084 00421 00210 00042 00421 00084 00042 00210 00168 00841 00042 00210 00421 00084 00210 00042 00084 00421 00841 00168 00210 00042 00084 00421 00042 00210 00421 00084 00168 00841 00084 00421 00210 00042 00421 00084 00042 00210 00421 00084 00421 00084 00042 00210 00084 00421 00210 00042 00084 00421 00210 00042 00084 00421 00042 00210 00421 00084 00421 00084 00042 00210 00421 00084 00210 00042 00084 00421 00084 00421 Columns 11 through 20 00004 00008 00008 00004 00021 00042 00421 00084 00042 00210 00008 00004 00004 00008 00042 00021 00084 00421 00210 00042 00042 00021 00021 00042 00008 00004 00042 00210 00421 00084 00021 00042 00042 00021 00004 00008 00210 00042 00084 00421 00021 00042 00042 00021 00004 00008 00084 00421 00210 00042 00042 00021 00021 00042 00008 00004 00421 00084 00042 00210 00008 00004 00004 00008 00042 00021 00210 00042 00084 00421 00004 00008 00008 00004 00021 00042 00042 00210 00421 00084 02319 02092 02311 02210 01164 01038 00841 00168 00841 00168 02092 02319 02210 02311 01038 01164 00168 00841 00168 00841 04655 04403 01164 01038 02311 02210 00841 00168 00841 00168 04403 04655 01038 01164 02210 02311 00168 00841 00168 00841 01164 01038 04655 04403 02319 02092 00421 00084 00421 00084 01038 01164 04403 04655 02092 02319 00084 00421 00084 00421 02311 02210 02319 02092 04655 04403 00421 00084 00421 00084 02210 02311 02092 02319 04403 04655 00084 00421 00084 00421 00841 00168 00421 00084 00421 00084 15761 15677 07872 07813 00168 00841 00084 00421 00084 00421 15677 15761 07813 07872 00841 00168 00421 00084 00421 00084 07872 07813 15761 15677 00168 00841 00084 00421 00084 00421 07813 07872 15677 15761 00421 00084 00841 00168 00841 00168 07864 07847 03940 03898 00084 00421 00168 00841 00168 00841 07847 07864 03898 03940 00421 00084 00841 00168 00841 00168 03940 03898 07864 07847 00084 00421 00168 00841 00168 00841 03898 03940 07847 07864 Columns 21 through 24 00084 00421 00210 00042 00421 00084 00042 00210 00210 00042 00084 00421 162 MATLAB Functions Used 391 00042 00210 00421 00084 00421 00084 00042 00210 00084 00421 00210 00042 00042 00210 00421 00084 00210 00042 00084 00421 00421 00084 00421 00084 00084 00421 00084 00421 00421 00084 00421 00084 00084 00421 00084 00421 00841 00168 00841 00168 00168 00841 00168 00841 00841 00168 00841 00168 00168 00841 00168 00841 07864 07847 03940 03898 07847 07864 03898 03940 03940 03898 07864 07847 03898 03940 07847 07864 15761 15677 07872 07813 15677 15761 07813 07872 07872 07813 15761 15677 07813 07872 15677 15761 Step 3 Assembling the Global Stiffness Matrix Since the structure has eight nodes the size of the global stiffness matrix is 24 24 Therefore to obtain K we first set up a zero matrix of size 24 24 then make one call to the MATLAB function LinearBrickAssemble since we have only one element in the structure In this case it is clear that the element stiffness matrix is the same as the global stiffness matrix The following are the MATLAB commands K zeros2424 K LinearBrickAssembleKk112345678 K 10e008 Columns 1 through 10 04571 04445 02256 02218 02227 02252 01143 01080 00042 00021 04445 04571 02218 02256 02252 02227 01080 01143 00021 00042 02256 02218 04571 04445 01143 01080 02227 02252 00004 00008 02218 02256 04445 04571 01080 01143 02252 02227 00008 00004 392 16 The Linear Brick Solid Element 02227 02252 01143 01080 04571 04445 02256 02218 00008 00004 02252 02227 01080 01143 04445 04571 02218 02256 00004 00008 01143 01080 02227 02252 02256 02218 04571 04445 00021 00042 01080 01143 02252 02227 02218 02256 04445 04571 00042 00021 00042 00021 00004 00008 00008 00004 00021 00042 04655 04403 00021 00042 00008 00004 00004 00008 00042 00021 04403 04655 00004 00008 00042 00021 00021 00042 00008 00004 02319 02092 00008 00004 00021 00042 00042 00021 00004 00008 02092 02319 00008 00004 00021 00042 00042 00021 00004 00008 02311 02210 00004 00008 00042 00021 00021 00042 00008 00004 02210 02311 00021 00042 00008 00004 00004 00008 00042 00021 01164 01038 00042 00021 00004 00008 00008 00004 00021 00042 01038 01164 00421 00084 00042 00210 00084 00421 00210 00042 00841 00168 00084 00421 00210 00042 00421 00084 00042 00210 00168 00841 00042 00210 00421 00084 00210 00042 00084 00421 00841 00168 00210 00042 00084 00421 00042 00210 00421 00084 00168 00841 00084 00421 00210 00042 00421 00084 00042 00210 00421 00084 00421 00084 00042 00210 00084 00421 00210 00042 00084 00421 00210 00042 00084 00421 00042 00210 00421 00084 00421 00084 00042 00210 00421 00084 00210 00042 00084 00421 00084 00421 Columns 11 through 20 00004 00008 00008 00004 00021 00042 00421 00084 00042 00210 00008 00004 00004 00008 00042 00021 00084 00421 00210 00042 00042 00021 00021 00042 00008 00004 00042 00210 00421 00084 00021 00042 00042 00021 00004 00008 00210 00042 00084 00421 00021 00042 00042 00021 00004 00008 00084 00421 00210 00042 00042 00021 00021 00042 00008 00004 00421 00084 00042 00210 00008 00004 00004 00008 00042 00021 00210 00042 00084 00421 00004 00008 00008 00004 00021 00042 00042 00210 00421 00084 02319 02092 02311 02210 01164 01038 00841 00168 00841 00168 02092 02319 02210 02311 01038 01164 00168 00841 00168 00841 04655 04403 01164 01038 02311 02210 00841 00168 00841 00168 04403 04655 01038 01164 02210 02311 00168 00841 00168 00841 01164 01038 04655 04403 02319 02092 00421 00084 00421 00084 01038 01164 04403 04655 02092 02319 00084 00421 00084 00421 02311 02210 02319 02092 04655 04403 00421 00084 00421 00084 02210 02311 02092 02319 04403 04655 00084 00421 00084 00421 00841 00168 00421 00084 00421 00084 15761 15677 07872 07813 00168 00841 00084 00421 00084 00421 15677 15761 07813 07872 00841 00168 00421 00084 00421 00084 07872 07813 15761 15677 00168 00841 00084 00421 00084 00421 07813 07872 15677 15761 00421 00084 00841 00168 00841 00168 07864 07847 03940 03898 00084 00421 00168 00841 00168 00841 07847 07864 03898 03940 00421 00084 00841 00168 00841 00168 03940 03898 07864 07847 00084 00421 00168 00841 00168 00841 03898 03940 07847 07864 Columns 21 through 24 00084 00421 00210 00042 00421 00084 00042 00210 00210 00042 00084 00421 00042 00210 00421 00084 00421 00084 00042 00210 00084 00421 00210 00042 00042 00210 00421 00084 00210 00042 00084 00421 162 MATLAB Functions Used 393 00421 00084 00421 00084 00084 00421 00084 00421 00421 00084 00421 00084 00084 00421 00084 00421 00841 00168 00841 00168 00168 00841 00168 00841 00841 00168 00841 00168 00168 00841 00168 00841 07864 07847 03940 03898 07847 07864 03898 03940 03940 03898 07864 07847 03898 03940 07847 07864 15761 15677 07872 07813 15677 15761 07813 07872 07872 07813 15761 15677 07813 07872 15677 15761 Step 4 Applying the Boundary Conditions The matrix 1611 for this structure can be written using the global stiffness matrix obtained in the previous step The boundary conditions for this problem are given as U1x U1y U1z U2x U2y U2z 0 U3x U3y U3z U4x U4y U4z 0 F5x 46875 F5y 0 F5z 0 F6x 46875 F6y 0 F6z 0 F7x 46875 F7y 0 F7z 0 F8x 46875 F8y 0 F8z 0 1614 We next insert the above conditions into the matrix equation for this structure not shown here and proceed to the solution step below Step 5 Solving the Equations Solving the resulting system of equations will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition the re sulting equation by extracting the submatrix in rows 13 to 24 and columns 13 to 24 Therefore we obtain the following equation noting that the numbers are shown to only two decimal places although MATLAB carries out the calculations using at least four decimal places 394 16 The Linear Brick Solid Element 108 047 044 023 021 004 001 004 001 008 002 008 0 002 044 047 021 023 001 004 001 004 002 008 002 008 023 021 047 044 004 001 004 001 008 002 008 002 021 023 044 047 001 004 001 004 002 008 002 008 004 001 004 001 158 157 079 078 079 078 039 039 001 004 001 004 157 158 078 079 078 079 039 039 004 001 004 001 079 078 158 157 039 039 079 078 001 004 001 004 078 079 157 158 039 039 078 079 008 002 008 002 079 078 039 039 158 157 079 078 002 008 002 008 078 079 039 039 157 158 078 079 008 002 008 002 039 039 079 078 079 078 158 157 002 008 002 008 039 039 078 079 078 079 157 158 U5x U5y U5z U6x U6y U6z U7x U7y U7z U8x U8y U8z 46875 0 0 46875 0 0 46875 0 0 46875 0 0 1615 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination k K13241324 k 10e008 Columns 1 through 10 04655 04403 02319 02092 00421 00084 00421 00084 00841 00168 04403 04655 02092 02319 00084 00421 00084 00421 00168 00841 02319 02092 04655 04403 00421 00084 00421 00084 00841 00168 02092 02319 04403 04655 00084 00421 00084 00421 00168 00841 00421 00084 00421 00084 15761 15677 07872 07813 07864 07847 00084 00421 00084 00421 15677 15761 07813 07872 07847 07864 00421 00084 00421 00084 07872 07813 15761 15677 03940 03898 00084 00421 00084 00421 07813 07872 15677 15761 03898 03940 00841 00168 00841 00168 07864 07847 03940 03898 15761 15677 00168 00841 00168 00841 07847 07864 03898 03940 15677 15761 00841 00168 00841 00168 03940 03898 07864 07847 07872 07813 00168 00841 00168 00841 03898 03940 07847 07864 07813 07872 162 MATLAB Functions Used 395 Columns 11 through 12 00841 00168 00168 00841 00841 00168 00168 00841 03940 03898 03898 03940 07864 07847 07847 07864 07872 07813 07813 07872 15761 15677 15677 15761 f 46875 0 0 46875 0 0 46875 0 0 46875 0 0 f 46875 0 0 46875 0 0 46875 0 0 46875 0 0 u kf Warning Matrix is close to singular or badly scaled Results may be inaccurate RCOND 7687107e018 u 10e008 00000 00000 396 16 The Linear Brick Solid Element 00000 00000 20972 20972 20972 20972 20972 20972 20972 20972 It is clear that the stiffness matrix is singular or badly scaled This is due to using one element only in this example This is also due to the element having a bad aspect ratio Therefore the results obtained above for the displacements are not reliable even totally wrong It is anticipated that using more elements will result in reliable answers to the displacements This will be done by the reader in Problem 161 Problems Problem 161 Consider the thin plate problem solved in Example 161 Solve the problem again us ing two linear brick elements instead of one element as shown in Fig 165 Compare your answers for the displacements at nodes 9 10 11 and 12 with the answers ob tained in the example Compare also your answers with those obtained in the related examples and problems in Chaps 11 to 15 8 12 2 1 10 9 3 4 11 6 5 7 Fig 165 Discretization of Thin Plate into Two Linear Bricks Hint Table 162 shows the element connectivity for this problem Table 162 Element connectivity for problem 162 Element Number Node i Node j Node m Node n Node p Node q Node r Node s 1 1 2 3 4 5 6 7 8 2 5 6 7 8 9 10 11 12 17 Other Elements In this chapter we review the applications of finite elements in other areas like fluid flow heat transfer electromagnetics etc This is intended to be a concluding chapter to the book The first sixteen chapters were mainly concerned with finite elements in structural analysis and mechanics In this chapter I show how the same methodology in terms of consistency and simplicity can be used to formulate and code other types of elements in MATLAB First we review the applications of finite elements in other areasthenweprovideasampleexamplewithitsMATLABcodenamelythefluidflow onedimensional element The reader may then be able to code other types of elements more complicated or in other areas following the same format and procedure The six steps used in this book can still be used to write the MATLAB code for any other type of element 171 Applications of Finite Elements in Other Areas Finite elements have been used in this book in the sole area of linear elastic struc tural analysis and mechanics However finite elements are also used in other diverse areas like fluid flow heat transfer mass transport electromagnetics geotechnical engineering structural dynamics plasticity and viscoplasticity etc In this section we review the use of finite elements in these areas Finite elements are used to model membrane plate and shell problems in structural mechanics We have shown in this book different types of membrane elements plane stress and plane strain elements but have not shown the plate and shell elements Different types of triangular rectangular and quadrilateral plate bending elements can be formulated using both the Kirchoff and Reissner plate theories Shell elements of different types can also be used For example flat shell elements can be developed by superimposing the stiffness of the membrane element and plate bending element Other types of structural elements can still be developed Axisymmetric elements may be formulated to be used in different types of problems like pressure vessels Finite elements may also be used in fracture mechanics and damage mechanics to simulate cracks microcracks voids and other types of defects The areas of structural 398 17 Other Elements dynamics and earthquake engineering are also important areas for finite element analysis Finally in structural mechanics nonlinear finite elements may be used in problems in plasticity viscoplasticity and stability of structures In geotechnical engineering finite elements are used extensively in solving geotechnical problems They are used in modeling foundations slopes soilstructure interaction consolidation seepage and flow nets excavation earth pressures slope stability and other complex boundary value problems in geotechnical engineering Finite elements are also used in mechanical design especially in machines and components In addition they are used in heat transfer and mass transport to solve problems in conduction radiation etc They can be used to solve both linear and nonlinear problems and both steadystate and transient processesAll types of thermal boundary conditions may be modeled including isotropic and orthotropic properties heat loads etc The area of electrical engineering is also important for finite elements Different types of elements may be used to in electromagnetic analysis They may be used in studying antennas radar microwaves engineering highspeed and highfrequency circuits wireless communications electrooptical engineering remote sensing bio electromagnetics and geoelectromagnetics The finite element method provides a very powerful technique for solving problems in circuits and circuit analysis A very important area for the use of finite elements is the area of water resources and the global atmosphere Finite elements can be used in groundwater hydrology turbulent flow problems fluid mechanics hydrodynamic flows flow separation pat terns incompressible NavierStokes equations in three dimensions oceanic general circulation modeling wave propagation typhoon surge analysis mesh generation of groundwater flow nonsteady seepage coastal aquifers soilmoisture flow contam inant transport and sediment transport Finally the finite element method is a recognized method used in the numerical analysis branch of mathematics and mathematical physics In addition to finite dif ferences finite elements are used extensively in solving partial differential equations of all types In the next two sections we provide as an example the full formulation and MAT LAB code for the onedimensional fluid flow element The MATLAB formulation and code for other elements may be written in a similar fashion 172 Basic Equations of the Fluid Flow 1D Element The fluid flow 1D element is a onedimensional finite element where the local and global coordinates coincide It is characterized by linear shape functions and is iden tical to the spring and linear bar elements The fluid flow 1D element has permeability coefficient Kxx in xdirection crosssectional area A and length L Each fluid flow 1D element has two nodes as shown in Fig 171 In this case the element stiffness matrix is given by see 1 k KxxAKL KxxAKL KxxAKL KxxAKL Fig 171 The Fluid Flow 1D Element Obviously the element stiffness matrix for the fluid flow 1D element is similar to that of the spring element with the stiffness replaced by KxxAL It is clear that the fluid flow 1D element has only two degrees of freedom one at each node Consequently for a system with n nodes the global stiffness matrix K will be of size n n since we have one degree of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function FluidFlow1DAssemble which is written specifically for this purpose Once the global stiffness matrix K is obtained we have the following system equation KP F where P is the global nodal potential fluid head vector and F is the global nodal volumetric flow rate vector At this step the boundary conditions are applied manually to the vectors P and F Then the matrix 172 is solved by partitioning and Gaussian elimination Finally once the unknown potentials are found the element velocities are obtained for each element as follows vx Kxx 1L 1L p where p is the 2 1 element potential fluid head vector and vx is the element velocity The element volumetric flow rate Qf is obtained by multiplying the element velocity by the crosssectional area A as follows Qf vxA 400 17 Other Elements 173 MATLAB Functions Used in the Fluid Flow 1D Element The four MATLAB functions used for the fluid flow 1D element are FluidFlow1DElementStiffnessKxx A L This function calculates the element stiffness matrix for each fluid flow 1D element with permeability coefficient Kxx crosssectional area A and length L It returns the 2 2 element stiffness matrix k FluidFlow1DAssembleK k i j This functions assembles the element stiffness matrix k of the fluid flow 1D joining nodes i at the left end and j at the right end into the global stiffness matrix K It returns the nn global stiffness matrix K every time an element is assembled FluidFlow1DElementVelocitiesKxx L p This function calculates the element velocity vector using the element permeability coefficient Kxx the element length L and the element potential fluid head vector p It returns the element velocity vx as a scalar FluidFlow1DElementVFRKxx L p A This function calculates the element vol umetric flow rate Qf using the element permeability coefficient Kxx the element length L the element potential fluid head vector p and the crosssectional area A It returns the element volumetric flow rate as a scalar The following is a listing of the MATLAB source code for each function function y FluidFlow1DElementStiffnessKxxAL FluidFlow1DElementStiffness This function returns the element stiffness matrix for a fluid flow 1D element with coefficient of permeability Kxx crosssectional area A and length L The size of the element stiffness matrix is 2 x 2 y KxxAL KxxAL KxxAL KxxAL function y FluidFlow1DAssembleKkij FluidFlow1DAssemble This function assembles the element stiffness matrix k of the fluid flow 1D element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled Kii Kii k11 Kij Kij k12 173 MATLAB Functions Used in the Fluid Flow 1D Element 401 Kji Kji k21 Kjj Kjj k22 y K function y FluidFlow1DElementVelocitiesKxxLp FluidFlow1DElementVelocities This function returns the element velocity given the element permeability coefficient Kxx the element length L and the element nodal potential fluid head vector p y Kxx 1L 1L p function y FluidFlow1DElementVFRKxxLpA FluidFlow1DElementVFR This function returns the element volumetric flow rate given the element permeability coefficient Kxx the element length L the element nodal potential fluid head vector p and the element crosssectional area A y Kxx 1L 1L p A In concluding this book we emphasize that the sixstep strategy followed in this book can be used to formulate and code MATLAB functions for any other type of finite element that is formulated References Finite Element Analysis Books 1 Logan D A First Course in the Finite Element Method Second Edition PWS Publishing Company ITP 1993 2 Logan D A First Course in the Finite Element Method Using Algor Second Edition BrooksCole Publishing Company ITP 2001 3 Cook R Malkus D and Plesha M Concepts and Applications of Finite Element Analysis Third Edition John Wiley Sons 1989 4 Cook R Finite Element Modeling for Stress Analysis John Wiley Sons 1995 5 Zienkiewicz O and Taylor R The Finite Element Method Volumes I II and III Fifth Edition ButterworthHeinemann 2000 6 Reddy J An Introduction to the Finite Element Method Second Edition McGrawHill 1993 7 Bathe KJ Finite Element Procedures Prentice Hall 1996 8 Chandrupatla T and BelegunduA Introduction to Finite Elements in Engineering Second Edition Prentice Hall 1997 9 Lewis P and Ward J The Finite Element Method Principles and Applications AddisonWesley 1991 10 Henwood D and Bonet J Finite Elements A Gentle Introduction Macmillan Press 1996 11 Fagan M Finite Element Analysis Theory and Practice Longman 1992 12 Knight C The Finite Element Method in Mechanical Design PWS Publishing Company ITP 1993 13 Burnett D Finite Element Analysis From Concepts to Applications AddisonWesley 1988 14 Bickford W A First Course in the Finite Element Method Second Edition Irwin Publishing 1994 15 Pintur D Finite Element Beginnings Mathcad Electronic Book MathSoft 1994 16 Buchanan G Schaums Outlines Finite Element Analysis Second Edition McGrawHill 1995 17 Kwon Y and Bang H The Finite Element Method Using MATLAB Second Edition CRC Press 2000 18 Sennett R Matrix Analysis of Structures Prentice Hall 1994 MATLAB Books 19 Etter D Engineering Problem Solving with MATLAB Second Edition Prentice Hall 1996 20 PartEnander E and Sjoberg A The MATLAB 5 Handbook AddisonWesley 1999 21 Biran A and Breiner M MATLAB 5 for Engineers AddisonWesley 1999 22 Higham D and Higham N MATLAB Guide SIAM 2000 23 Hanselman D and Littlefield B Mastering MATLAB 6 Prentice Hall 2000 404 References 24 Palm W Introduction to MATLAB 6 for Engineers McGrawHill 2000 25 Chen K Giblin P and IrvingA Mathematical Explorations with MATLAB Cambridge University Press 1999 26 PolkingJandArnoldDOrdinaryDifferentialEquationsUsingMATLABSecondEditionPrentice Hall 1999 27 Fausett L Applied Numerical Analysis Using MATLAB Prentice Hall 1999 MATLAB Tutorials on the Internet 28 Cavers I An Introductory Guide to MATLAB Second Edition 1998 http wwwcsubcca spidercaversMatlabGuideguidehtml 29 Gockenback M A Practical Introduction to MATLAB Updated for MATLAB 5 httpwwwmathmtuedumsgockenintrointrohtml 30 Huber T MATLAB Tutorials EnvisionIt Workshop 1997 httpphysicsgaceduhuberenvision tutor2 31 Maneval J Helpful Information for Using MATLAB httpwwwfacstaffbucknelledumaneval help211helpmainhtml 32 Recktenwald G MATLAB Hypertext Reference 1996 httpwwwmepdxedugerry MATLAB 33 University of Texas MATLAB Online Reference Documentation httpwwwutexasedu ccmathMatlabManualReferenceTOChtml 34 Southern Illinois University at Carbondale MATLAB Tutorials httpwwwmathsiuedumatlab tutorialshtml 35 MATLAB Educational Sites httpwwweecemaineedummmatwebhtml Answers to Problems Answers to all the problems are given below For each problem two results are given the displacements and the reactions Problem 21 u 00222 F 44444 100000 55556 Problem 22 u 01471 02206 03676 F 250000 00000 00000 250000 406 Answers to Problems Problem 31 u 10e003 00143 01000 01429 F 50000 100000 00000 150000 Problem 32 u 10e004 04582 03554 02819 02248 01780 01385 01042 00739 00469 00224 It is clear from the results above that the displacement at the free end is 004582 mm which is very close to that obtained in Example 32 However the result obtained in this problem is more accurate because we have used more elements in the discretization Problem 33 u 24975e005 Answers to Problems 407 F 249750 250000 00250 Problem 41 u 10e004 04211 02782 01353 00677 Thus it is clear that the displacement at the free end is 04211 104 m or 004211 mm which is very close to that obtained in Example 32 which was 004517 mmandthatobtainedinthesolutionofProblem32whichwas004582 mm Problem 42 u 00075 00079 00081 F 150000 00000 100000 50000 Problem 51 u 10e003 02083 00333 00106 00333 408 Answers to Problems 01766 00107 00212 00516 F 88889 93333 200000 00000 00000 0 00000 0 0 00000 111111 93333 Problem 52 u 00000 00000 00034 F 26489 19866 53645 0 19866 19866 00000 00000 100000 Problem 61 u 10e003 Answers to Problems 409 02351 00003 03671 F 00000 166471 99883 64151 106919 00000 00000 166862 100117 85849 107311 00000 150000 00000 200000 Problem 71 u 10e004 02273 04545 02273 F 15584 0 32143 150000 47727 0 Problem 72 u 00006 00012 00020 410 Answers to Problems F 39946 39946 84783 75000 77242 150000 32405 150000 Problem 73 u 00016 00002 00009 F 15225 24913 100000 00000 06920 0 77855 Problem 81 u 01865 00000 00298 01865 00149 F 200000 46875 462501 Answers to Problems 411 00000 0 150000 200000 46875 00000 Problem 82 u 00013 00009 00005 00012 00008 00003 F 20283 84058 80296 200000 125000 104170 00000 125000 104170 220283 165942 151226 Problem 83 u 00001 00056 00021 412 Answers to Problems F 00000 100000 00000 130903 01822 07290 130903 98178 Problem 91 u 00048 00000 00018 F 100000 00000 0 50000 138905 200000 50000 138905 200000 Problem 101 u 00004 00000 00006 00000 00004 00000 00021 00000 00006 Answers to Problems 413 00000 00004 00002 00021 00000 00006 00000 00004 00002 00004 00000 00006 00000 00004 00000 F 11599 25054 10091 26719 03008 32737 63324 57484 10091 26719 03008 176937 63481 57484 10091 26719 03019 177439 11596 25054 10091 26719 03019 32733 0 00000 414 Answers to Problems 0 00000 00000 00000 0 00000 0 00000 00000 00000 150000 00000 00000 00000 00000 00000 0 0 00000 00000 00000 00000 Problem 111 u 10e005 06928 00714 06928 00714 03271 00000 F 93750 37540 93750 00000 Answers to Problems 415 93750 00000 93750 37540 0 00000 Problem 112 u 10e003 00200 00225 00291 00581 00305 00854 00008 00173 00072 00585 00077 00867 00001 00176 00010 00639 00064 00960 00207 00199 00346 00635 00356 01167 F 188054 10788 0 416 Answers to Problems 00000 00000 00000 00000 00000 13366 92538 00000 00000 00000 00000 00000 00000 09105 02247 0 00000 00000 00000 00000 00000 210525 94427 00000 0 0 00000 00000 200000 Problem 113 u 00002 00044 00002 00044 00002 00044 00002 00044 Answers to Problems 417 F 0 175000 0 175000 00000 00000 00000 00000 175000 175000 Problem 121 u 10e005 03500 00590 07006 00415 01653 00172 05286 00288 03454 00000 07080 00000 01653 00172 05286 00288 03500 00590 07006 00415 F 34469 15335 418 Answers to Problems 0 00000 31250 00000 0 00000 00000 00000 118562 00000 00000 00000 125000 00000 00000 00000 00000 0 34469 15335 00000 00000 31250 0 Problem 131 u 10e005 01768 00552 03500 00548 05284 00536 07071 00535 01648 00000 03496 00000 05287 Answers to Problems 419 00000 07071 00000 01768 00552 03500 00548 05284 00536 07071 00535 F 49836 12580 00000 00000 00000 00000 00000 00000 46875 00000 87829 00000 00000 00000 0 00000 00000 00000 93750 00000 49836 12580 00000 0 00000 00000 00000 00000 46875 00000 420 Answers to Problems Problem 132 u 10e003 00299 00284 00402 00753 00386 01102 00015 00203 00068 00800 00123 01088 00021 00185 00023 00824 00047 01224 00307 00260 00489 00758 00565 01589 F 176570 34450 00000 00000 00000 00000 00000 00000 74806 70314 00000 00000 Answers to Problems 421 00000 00000 00000 00000 79321 67416 00000 00000 00000 00000 00000 00000 172054 27819 0 0 00000 00000 00000 200000 Problem 133 u 00003 00029 00003 00029 00003 00029 00003 00029 00003 00029 00003 00029 F 00000 87500 00000 422 Answers to Problems 175000 00000 87500 00000 00000 00000 00000 0 00000 116553 116894 116553 Problem 141 u 00002 00029 00002 00029 00002 00029 00002 00029 00002 00029 00002 00029 00002 00029 00002 00029 F 0 58333 00000 233333 00000 58333 00000 00000 Answers to Problems 423 0 0 00000 00000 00000 00000 00000 00000 116419 117162 116419 Problem 151 u 10e005 00185 06710 01485 00091 06699 01489 00183 05809 00319 00074 05795 00317 F 511925 30565 44842 512090 63185 30368 00000 31250 00000 00000 62500 424 Answers to Problems 00000 292553 63185 46493 292388 30565 28717 00000 62500 0 00000 31250 0 Problem 161 u 10e008 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 15729 15729 15729 15729 15729 15729 15729 15729 Contents of the Accompanying CDROM The accompanying CDROM includes two folders as follows MFiles This folder includes the 84 MATLAB functions written specifically to be used with this book In order to use them they should be copied to the working directory in your MATLAB folder on the hard disk or you can set the MATLAB path to the correct folder that includes these files Solutions Manual This folder includes the Solutions Manual for the book Two ver sions of the Solutions Manual are provided The file Solutions to Problems includes detailed solutions to all the problems in the book and is about 360 pages in length The other file Solutions to Problems2 is a reduced version of the solutions in about 65 pages only The two Solutions Manuals are provided in both DOC and RTF formats Index Area 28 36 46 62 92 195 400 Assembly 1 11 14 27 28 45 46 63 77 92 139 177 194 195 207 219 252 279 299 329 352 400 Axial force 140 143 154 155 166 172 Axial force diagram 140 143 155 156 169 Bar linear 2743 53 quadratic 4560 Beam 109135 173 BeamAssemble 3 109 110 114 123 BeamElementForces 3 110 117 BeamElementMomentDiagram 3 110 118 BeamElementShearDiagram 3 110 118 130 131 132 BeamElementStiffness 3 110 113 122 123 Bending moment 110 112 118 120 130 132 133 140 143 154 158 169 196 203 216 Bending moment diagram 110 112 118 120 130 133 134 158 159 171 Bilinear quadrilateral 275310 BilinearQuadAssemble 4 277 279 286 299 BilinearQuadElementArea 4 275 278 BilinearQuadElementPStresses 4 279 294 307 BilinearQuadElementStiffness 4 277 278 279 284 296 BilinearQuadElementStiffness2 4 278 BilinearQuadElementStresses 4 278 279 292 304 Boundary conditions 2 12 15 22 46 50 126 150 165 186 210 Brick element 367 368 371 CDROM 2 279 Continuous structure 1 Diagram axial force 155 156 169 170 bending moment 120 132 133 158 159 171 172 shear force 119 131 132 156 157 170 171 Discrete structure 1 Discretization 1 2 36 223 232 245 246 259 273 308 326 365 Displacement 2 12 26 28 43 62 71 109 176 194 228 Domain 1 13 18 30 36 48 54 66 260 284 326 347 Elastic 1 27 28 46 63 91 110 175 195 311 Element stiffness matrix 11 12 13 27 28 46 63 92 110 139 177 195 219 278 399 400 Finite element 14 397398 Fluid flow 397 398399 400401 FluidFlow1Dassemble 4 399 400 FluidFlow1DelementStiffness 4 400 FluidFlow1DelementVelocities 4 400 FluidFlow1DElementVFR 4 400 428 Index Force 12 13 16 17 28 34 52 110 117 118 138 154 169 176 190 195 232 296 Frame plane 137174 space 193216 Gaussian elimination 2 7 8 12 15 22 28 32 41 42 46 51 57 62 70 84 92 103 110 115 116 127 138 150 151 165 166 176 187 194 211 219 241 251 266 267 278 289 290 301 314 330 331 355 356 371 393 394 399 Global Stiffness Matrix 1 2 11 12 14 15 17 19 21 26 27 28 3132 3941 43 45 46 4950 5556 60 62 68 89 92 99 114 115 123 138 146 149 162 172 182 207 237 262 299 325 328 399 400 Grid 175191 179 GridAssemble 3 176 177 182 GridElementForces 3 177 189 GridElementLength 3 176 177 GridElementStiffness 3 177 180 Inclined support 62 63 73 139 140 Length 27 28 36 45 61 63 91 93 109 139 140 400 Linear 1 27 43 61 91 217248 249 259 275 278 295 337365 367396 398 Linear bar 2743 Linear tetrahedron 337 340 Linear triangle 217 219 231 232 245 246 251 252 LinearBarAssemble 2 27 28 31 39 LinearBarElementForces 2 28 34 43 LinearBarElementStiffness 2 28 30 37 LinearBarElementStresses 2 28 35 43 LinearBrickAssemble 4 370 371 391 LinearBrickElementPStresses 4 372 388 LinearBrickElementStiffness 4 370 371 389 LinearBrickElementStresses 4 372 LinearBrickElementVolume 4 367 371 LinearTriangleAssemble 3 218 219 225 237 LinearTriangleElementArea 217 219 LinearTriangleElementPStresses 3 219 231 245 LinearTriangleElementStiffness 3 219 223 233 234 235 LinearTriangleElementStresses 3 219 229 230 245 MATLAB 2 4 12 28 46 62 92 110 139 176 195 219 251 278 314 340 371 400 Partitioning 2 12 15 22 32 46 57 70 110 127 187 227 278 Plane Frame 137174 Plane strain 217 218 219 252 275 278 279 Plane stress 217 219 223 252 314 397 Plane truss 6189 139 174 PlaneFrameAssemble 3 138 139 141 146 162 PlaneFrameElementAxialDiagram 3 140 154 155 169 PlaneFrameElementForces 3 140 153 167 PlaneFrameElementLength 3 139 140 161 PlaneFrameElementMomentDiagram 3 140 154 158 159 169 171 PlaneFrameElementShearDiagram 3 140 142 154 157 170 PlaneFrameElementStiffness 3 139 144 161 PlaneFrameInclinedSupport 3 139 140 143 PlaneTrussAssemble 2 61 63 68 77 PlaneTrussElementForce 2 63 PlaneTrussElementLength 2 62 PlaneTrussElementStiffness 2 63 66 74 PlaneTrussElementStress 3 63 71 86 PlaneTrussInclinedSupport 3 62 63 81 Plot 9 110 140 195 196 Postprocessing 2 43 Quadratic Bar 4560 Quadratic quadrilateral 311336 Quadratic triangle 249 259 273 QuadraticBarAssemble 2 45 46 49 55 QuadraticBarElementForces 2 46 47 QuadraticBarElementStiffness 2 46 48 54 QuadraticBarElementStresses 2 46 59 QuadraticQuadAssemble 4 314 315 328 QuadraticQuadElementArea 4 311 314 Index 429 QuadraticQuadElementPStresses 4 315 335 QuadraticQuadElementStiffness 4 313 314 326 QuadraticQuadElementStresses 4 314 315 334 Quadrilateral bilinear 275310 quadratic 311336 QuadTriangleAssemble 4 251 252 262 QuadTriangleElementArea 4 249 251 QuadTriangleElementPStresses 4 252 272 QuadTriangleElementStiffness 4 251 260 QuadTriangleElementStresses 4 251 252 270 Reaction 2 12 13 26 52 71 105 117 189 270 292 Shear force 110 112 118 119 130 131 154 169 Shear force diagram 119 131 156 157 171 Space frame 193216 Space truss 91107 SpaceFrameAssemble 3 194 195 207 SpaceFrameElementAxialDiagram 3 195 SpaceFrameElementForces 3 195 213 SpaceFrameElementLength 3 195 SpaceFrameElementMomentYDiagram 3 196 202 SpaceFrameElementMomentZDiagram 3 196 202 SpaceFrameElementShearYDiagram 3 195 SpaceFrameElementShearZDiagram 3 195 SpaceFrameElementStiffness 3 195 204 SpaceFrameElementTorsionDiagram 3 195 SpaceTrussAssemble 3 92 99 SpaceTrussElementForce 3 93 94 SpaceTrussElementLength 3 92 SpaceTrussElementStiffness 3 92 96 98 SpaceTrussElementStress 3 93 105 Spring 1126 89 174 SpringAssemble 2 11 12 14 19 20 SpringElementForces 2 12 17 23 SpringElementStiffness 2 12 14 18 Stiffness matrix element 11 12 27 28 45 46 63 110 177 195 219 279 340 371 400 global 1 2 11 12 17 26 27 28 45 46 61 63 81 92 109 110 125 139 176 219 251 277 279 391 Strain 217 219 249 252 275 278 279 311 337 Stress 28 35 46 60 62 219 251 279 335 Structure continuous 1 discrete 1 Support inclined 62 63 81 139 140 Symbolic Math Toolbox 249 250 270 275 277 292 311 313 334 367 370 Tetrahedron linear 337 340 TetrahedronAssemble 4 339 340 352 TetrahedronElementPStresses 4 340 363 TetrahedronElementStiffness 4 340 347 TetrahedronElementStresses 4 340 359 TetrahedronElementVolume 4 337 340 Triangle linear 217 219 223 232 245 246 251 252 quadratic 249 259 273 Truss plane 6189 139 174 space 91107 Tutorial 4 Volume 337 340 367 371
Send your question to AI and receive an answer instantly
Recommended for you
67
Métodos Numéricos para Engenharia: Introdução ao Método dos Elementos Finitos
Elementos Finitos
IFPB
8
Notas de Aula: Introdução ao Método dos Elementos Finitos
Elementos Finitos
IFPB
28
Elemento Finito Triangular CST: Formulação Matemática e Aplicações
Elementos Finitos
IFPB
1
Analise MEF da Barra Carregada Axialmente: Comparativo Analitico e Computacional
Elementos Finitos
IFPB
13
Notas de Aula: Introdução ao Método dos Elementos Finitos
Elementos Finitos
IFPB
8
Notas de Aula sobre o Método dos Elementos Finitos - Elemento Tetraédrico de Quatro Nós
Elementos Finitos
IFPB
486
Introduction to Finite Element Analysis Using MATLAB and Abaqus
Elementos Finitos
IFPB
3
Apostila sobre o Método dos Elementos Finitos para Engenharia Civil
Elementos Finitos
IFPB
5
Notas de Aula: Introdução ao Método dos Elementos Finitos
Elementos Finitos
IFPB
3
Notas de Aula: Introdução ao Método dos Elementos Finitos
Elementos Finitos
IFPB
Preview text
Peter Kattan MATLAB Guide to Finite Elements AN INTERACTIVE APPROACH Second Edition with CDROM Springer MATLAB Guide to Finite Elements Peter I Kattan MATLAB Guide to Finite Elements An Interactive Approach Second Edition With 108 Figures and 25 Tables Peter I Kattan PhD PO BOX 1392 Amman 11118 Jordan pkattantedatanetjo pkattanlsuedu Library of Congress Control Number 2007920902 ISBN13 9783540706977 Springer Berlin Heidelberg New York This work is subject to copyright All rights are reserved whether the whole or part of the material is concerned specifically the rights of translation reprinting reuse of illustrations recitation broadcasting reproduction on microfilm or in any other way and storage in data banks Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9 1965 in its current version and permission for use must always be obtained from Springer Violations are liable for prosecution under the German Copyright Law Springer is a part of Springer ScienceBusiness Media springercom c SpringerVerlag Berlin Heidelberg 2008 The use of general descriptive names registered names trademarks etc in this publication does not imply even in the absence of a specific statement that such names are exempt from the relevant protective laws and regulations and therefore free for general use Typesetting Integra Software Services Pvt Ltd Pondicherry India Cover design Erich Kirchner Heidelberg Printed on acidfree paper SPIN 11301950 423100Integra 5 4 3 2 1 0 Dedicated to My Professor George Z Voyiadjis Preface to the Second Edition Soon after the first edition of this book was published at the end of 2002 it was realized that a new edition of the book was needed I received positive feedback from my readers who requested that I provide additional finite elements in other areas like fluid flow and heat transfer However I did not want to lengthen the book considerably Therefore I decided to add two new chapters thus adding new material while keeping the size of the book reasonable The second edition of the book continues with the same successful format that characterized the first edition which was sold out in less than four years I continue to emphasize the important features of interactivity of using MATLAB1 coupled with the simplicity and consistency of presentation of finite elements One of the most important features also is bypassing the use of numerical integration in favor of exact analytical integration with the use of the MATLAB Symbolic Math Toolbox2 The use of this toolbox is emphasized in Chaps 12 13 14 and 16 In the new edition two important changes are immediately noted First I corrected the handful of typing errors that appeared in the first edition Second I added two new chapters Chap 16 includes another solid threedimensional element the eight noded brick element in great detail The final chapter Chap 17 provides a review of the applications of finite elements in other areas like fluid flow heat transfer geotechnical engineering electromagnetics structural dynamics plasticity etc In this chapter I show how the same consistent strategy that was followed in the first sixteen chapters can be used to write MATLAB functions in these areas by providing the MATLAB code for a onedimensional fluid flow element One minor drawback of the first edition as I see it is the absence of a concluding chapter Therefore I decided to remedy the situation by adding Chap 17 as a real concluding chapter to the book It is clear that this chapter is different from the first sixteen chapters and thus may well provide a well written conclusion to the book The second edition still comes with an accompanying CDROM that contains the full set of Mfiles written specifically to be used with this book These MATLAB functions have been tested with version 7 of MATLAB and should work with any 1 MATLAB is a registered trademark of The MathWorks Inc 2 The MATLAB Symbolic Math Toolbox is a registered trademark of The MathWorks Inc VIII Preface to the Second Edition later versions In addition the CDROM contains a complete solutions manual that includes detailed solutions to all the problems in the book If the reader does not wish to consult these solutions then a brief list of answers is provided in printed form at the end of the book Iwouldliketothankmyfamilymembersfortheirhelpandcontinuedsupportwith out which this book would not have been possible I would also like to acknowledge the help of the editior at SpringerVerlag Dr Thomas Ditzinger for his assistance in bringing this book out in its present form Finally I would like to thank my brother Nicola for preparing most of the line drawings in both editions In this edition I am providing two email addresses for my readers to contact me pkattantedatanetjo and pkattanlsuedu The old email address that appeared in the first edition was cancelled in 2004 December 2006 Peter I Kattan Preface to the First Edition This is a book for people who love finite elements and MATLAB3 We will use the popular computer package MATLAB as a matrix calculator for doing finite element analysis Problems will be solved mainly using MATLAB to carry out the tedious and lengthy matrix calculations in addition to some manual manipulations especially when applying the boundary conditions In particular the steps of the finite element method are emphasized in this book The reader will not find readymade MATLAB programs for use as black boxes Instead stepbystep solutions of finite element prob lems are examined in detail using MATLAB Problems from linear elastic structural mechanics are used throughout the book The emphasis is not on mass computation or programming but rather on learning the finite element method computations and understanding of the underlying concepts In addition to MATLAB the MATLAB Symbolic Math Toolbox4 is used in Chaps 12 13 and 14 Many types of finite elements are studied in this book including the spring element the bar element twodimensional and threedimensional truss elements plane and space beam and frame elements twodimensional elasticity elements for plane stress and plane strain problems and one threedimensional solid element Each chapter deals with only one type of element Also each chapter starts with a summary of the basic equations for the element followed by a number of examples demonstrating the use of the element using the provided MATLAB functions Special MATLAB functions for finite elements are provided as Mfiles on the accompanying CDROM to be used in the examplesThese functions have been tested successfully with MATLAB versions 50 53 and 61 They should work with other later versions Each chapter also ends with a number of problems to be used as practice for students This book is written primarily for students studying finite element analysis for the first time It is intended as a supplementary text to be used with a main textbook for an introductory course on the finite element method Since the computations of finite elements usually involve matrices and matrix manipulations it is only natural that students use a matrixbased software package like MATLAB to do the calculations 3 MATLAB is a registered trademark of The MathWorks Inc 4 The MATLAB Symbolic Math Toolbox is a registered trademark of The MathWorks Inc X Preface to the First Edition In fact the word MATLAB stands for MATrix LABoratory The main features of the book are 1 The book is divided into fifteen chapters that are well defined ad correlated 2 The books includes a short tutorial on using MATLAB in Chap 1 3 The CDROM that accompanies the book includes 75 MATLAB functions M files that are specifically written to be used with this book These functions comprise what may be called the MATLAB Finite Element Toolbox It is used mainly for problems in structural mechanics The provided MATLAB functions are designed to be simple and easy to use 4 A sequence of six steps is outlined in the first chapter for the finite element method These six steps are then used systematically in each chapter throughout the book 5 The book stresses the interactive use of MATLAB Each example is solved in an interactive session with MATLAB No readymade subroutines are provided to be used as black boxes 6 Answers to the all problems are provided at the end of the book 7 AsolutionsmanualisalsoprovidedontheaccompanyingCDROMThesolutions manual includes detailed solutions to all the problems in the book It is over 300 pages in length The author wishes to thank the editors at SpringerVerlag especially Dr Thomas Ditzinger for their cooperation and assistance during the writing of this book Special thanks are also given to my family members without whose support and encourage ment this book would not have been possible In particular I would like to thank Nicola Kattan for preparing most of the figures that appear in the book February 2002 Peter I Kattan Table of Contents 1 Introduction 1 11 Steps of the Finite Element Method 1 12 MATLAB Functions for Finite Element Analysis 2 13 MATLAB Tutorial 4 2 The Spring Element 11 21 Basic Equations 11 22 MATLAB Functions Used 12 3 The Linear Bar Element 27 31 Basic Equations 27 32 MATLAB Functions Used 28 4 The Quadratic Bar Element 45 41 Basic Equations 45 42 MATLAB Functions Used 46 5 The Plane Truss Element 61 51 Basic Equations 61 52 MATLAB Functions Used 62 6 The Space Truss Element 91 61 Basic Equations 91 62 MATLAB Functions Used 92 7 The Beam Element 109 71 Basic Equations 109 72 MATLAB Functions Used 110 8 The Plane Frame Element 137 81 Basic Equations 137 82 MATLAB Functions Used 139 XII Table of Contents 9 The Grid Element 175 91 Basic Equations 175 92 MATLAB Functions Used 176 10 The Space Frame Element 193 101 Basic Equations 193 102 MATLAB Functions Used 195 11 The Linear Triangular Element 217 111 Basic Equations 217 112 MATLAB Functions Used 219 12 The Quadratic Triangular Element 249 121 Basic Equations 249 122 MATLAB Functions Used 251 13 The Bilinear Quadrilateral Element 275 131 Basic Equations 275 132 MATLAB Functions Used 278 14 The Quadratic Quadrilateral Element 311 141 Basic Equations 311 142 MATLAB Functions Used 314 15 The Linear Tetrahedral Solid Element 337 151 Basic Equations 337 152 MATLAB Functions Used 340 16 The Linear Brick Solid Element 367 161 Basic Equations 367 162 MATLAB Functions Used 371 17 Other Elements 397 171 Applications of Finite Elements in Other Areas 397 172 Basic Equations of the Fluid Flow 1D Element 398 173 MATLAB Functions Used in the Fluid Flow 1D Element 400 References 403 Answer to Problems 405 Contents of the Accompanying CDROM 425 Index 427 1 Introduction This short introductory chapter is divided into two parts In the first part there is a summary of the steps of the finite element method The second part includes a short tutorial on MATLAB 11 Steps of the Finite Element Method There are many excellent textbooks available on finite element analysis like those in 118 Therefore this book will not present any theoretical formulations or deriva tions of finite element equations Only the main equations are summarized for each chapter followed by examples In addition only problems from linear elastic structural mechanics are used throughout the book The finite element method is a numerical procedure for solving engineering prob lems Linear elastic behavior is assumed throughout this book The problems in this book are taken from structural engineering but the method can be applied to other fields of engineering as well In this book six steps are used to solve each problem using finite elements The six steps of finite element analysis are summarized as follows 1 Discretizing the domain this step involves subdividing the domain into elements and nodes For discrete systems like trusses and frames the system is already discretized and this step is unnecessary In this case the answers obtained are exact However for continuous systems like plates and shells this step becomes very important and the answers obtained are only approximate In this case the accuracy of the solution depends on the discretization used In this book this step will be performed manually for continuous systems 2 Writing the element stiffness matrices the element stiffness equations need to be written for each element in the domain In this book this step will be performed using MATLAB 3 Assembling the global stiffness matrix this will be done using the direct stiffness approach In this book this step will be performed using MATLAB 2 1 Introduction 4 Applying the boundary conditions like supports and applied loads and dis placements In this book this step will be performed manually 5 Solving the equations this will be done by partitioning the global stiffness matrix and then solving the resulting equations using Gaussian elimination In this book the partitioning process will be performed manually while the solution part will be performed using MATLAB with Gaussian elimination 6 Postprocessing to obtain additional information like the reactions and el ement forces and stresses In this book this step will be performed using MATLAB It is seen from the above steps that the solution process involves using a com bination of MATLAB and some limited manual operations The manual operations employed are very simple dealing only with discretization step 1 applying bound ary conditions step 4 and partitioning the global stiffness matrix part of step 5 It can be seen that all the tedious lengthy and repetitive calculations will be performed using MATLAB 12 MATLAB Functions for Finite Element Analysis The CDROM accompanying this book includes 84 MATLAB functions Mfiles specifically written by the author to be used for finite element analysis with this book They comprise what may be called the MATLAB Finite Element Toolbox These functions have been tested with version 7 of MATLAB and should work with any later versions The following is a listing of all the functions available on the CDROM The reader can refer to each chapter for specific usage details SpringElementStiffnessk SpringAssembleK k i j SpringElementForcesk u LinearBarElementStiffnessE A L LinearBarAssembleK k i j LinearBarElementForcesk u LinearBarElementStressesk u A QuadraticBarElementStiffnessE A L QuadraticBarAssembleK k i j m QuadraticBarElementForcesk u QuadraticBarElementStressesk u A PlaneTrussElementLengthx1 y1 x2 y2 PlaneTrussElementStiffnessE A L theta PlaneTrussAssembleK k i j PlaneTrussElementForceE A L theta u 12 MATLAB Functions for Finite Element Analysis 3 PlaneTrussElementStressE L theta u PlaneTrussInclinedSupportT i alpha SpaceTrussElementLengthx1 y1 z1 x2 y2 z2 SpaceTrussElementStiffnessE A L thetax thetay thetaz SpaceTrussAssembleK k i j SpaceTrussElementForceE A L thetax thetay thetaz u SpaceTrussElementStressE L thetax thetay thetaz u BeamElementStiffnessE I L BeamAssembleK k i j BeamElementForcesk u BeamElementShearDiagramf L BeamElementMomentDiagramf L PlaneFrameElementLengthx1 y1 x2 y2 PlaneFrameElementStiffnessE A I L theta PlaneFrameAssembleK k i j PlaneFrameElementForcesE A I L theta u PlaneFrameElementAxialDiagramf L PlaneFrameElementShearDiagramf L PlaneFrameElementMomentDiagramf L PlaneFrameInclinedSupportT i alpha GridElementLengthx1 y1 x2 y2 GridElementStiffnessE G I J L theta GridAssembleK k i j GridElementForcesE G I J L theta u SpaceFrameElementLengthx1 y1 z1 x2 y2 z2 SpaceFrameElementStiffnessE G A Iy Iz J x1 y1 z1 x2 y2 z2 SpaceFrameAssembleK k i j SpaceFrameElementForcesE G A Iy Iz J x1 y1 z1 x2 y2 z2 u SpaceFrameElementAxialDiagramf L SpaceFrameElementShearZDiagramf L SpaceFrameElementShearYDiagramf L SpaceFrameElementTorsionDiagramf L SpaceFrameElementMomentZDiagramf L SpaceFrameElementMomentYDiagramf L LinearTriangleElementAreaxi yi xj yj xm ym LinearTriangleElementStiffnessE NU t xi yi xj yj xm ym p LinearTriangleAssembleK k i j m LinearTriangleElementStressesE NU t xi yi xj yj xm ym p u LinearTriangleElementPStressessigma 4 1 Introduction QuadTriangleElementAreax1 y1 x2 y2 x3 y3 QuadTriangleElementStiffnessE NU t x1 y1 x2 y2 x3 y3 p QuadTriangleAssembleK k i j m p q r QuadTriangleElementStressesE NU t x1 y1 x2 y2 x3 y3 p u QuadTriangleElementPStressessigma BilinearQuadElementAreax1 y1 x2 y2 x3 y3 x4 y4 BilinearQuadElementStiffnessE NU t x1 y1 x2 y2 x3 y3 x4 y4 p BilinearQuadElementStiffness2E NU t x1 y1 x2 y2 x3 y3 x4 y4 p BilinearQuadAssembleK k i j m n BilinearQuadElementStressesE NU x1 y1 x2 y2 x3 y3 x4 y4 p u BilinearQuadElementPStressessigma QuadraticQuadElementAreax1 y1 x2 y2 x3 y3 x4 y4 QuadraticQuadElementStiffnessE NU t x1 y1 x2 y2 x3 y3 x4 y4 p QuadraticQuadAssembleK k i j m p q r s t QuadraticQuadElementStressesE NU x1 y1 x2 y2 x3 y3 x4 y4 p u QuadraticQuadElementPStressessigma TetrahedronElementVolumex1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 TetrahedronElementStiffnessE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 TetrahedronAssembleK k i j m n TetrahedronElementStressesE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 u TetrahedronElementPStressessigma LinearBrickElementVolumex1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 x6 y6 z6 x7 y7 z7 x8 y8 z8 LinearBrickElementStiffnessE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 x6 y6 z6 x7 y7 z7 x8 y8 z8 LinearBrickAssembleK k i j m n p q r s LinearBrickElementStressesE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 x6 y6 z6 x7 y7 z7 x8 y8 z8 u LinearBrickElementPStressessigma FluidFlow1DElementStiffnessKxx A L FluidFlow1DAssembleK k i j FluidFlow1DElementVelocitiesKxx L p FluidFlow1DElementVFRKxx L p A 13 MATLAB Tutorial In this section a very short MATLAB tutorial is provided For more details consult the excellent books listed in 1927 or the numerous freely available tutorials on the internet see 2835 This tutorial is not comprehensive but describes the basic MATLAB commands that are used in this book 13 MATLAB Tutorial 5 In this tutorial it is assumed that you have started MATLAB on your system successfully and you are ready to type the commands at the MATLAB prompt which is denoted by double arrows Entering scalars and simple operations is easy as is shown in the examples below 345 ans 17 cos 30pi180 ans 08660 x4 x 4 2sqrt3x ans 07559 To suppress the output in MATLAB use a semicolon to end the command line as in the following examples If the semicolon is not used then the output will be shown by MATLAB y32 z5 x2yz w3y4z w 116 MATLAB is casesensitive ie variables with lowercase letters are different than variables with uppercase letters Consider the following examples using the variables x and X 6 1 Introduction x1 x 1 X2 X 2 x x 1 Use the help command to obtain help on any particular MATLAB command The following example demonstrates the use of help to obtain help on the inv command help inv INV Matrix inverse INVX is the inverse of the square matrix X A warning message is printed if X is badly scaled or nearly singular See also SLASH PINV COND CONDEST NNLS LSCOV Overloaded methods help syminvm help zpkinvm help tfinvm help ssinvm help ltiinvm help frdinvm The following examples show how to enter matrices and perform some simple matrix operations x1 2 3 4 5 6 7 8 9 x 1 2 3 4 5 6 7 8 9 13 MATLAB Tutorial 7 y2 0 3 y 2 0 3 wxy w 7 10 13 Let us now solve the following system of simultaneous algebraic equations 2 1 3 0 1 5 2 4 2 0 3 2 1 2 3 4 x1 x2 x3 x4 3 1 2 2 11 We will use Gaussian elimination to solve the above system of equations This is performed in MATLAB by using the backslash operator as follows A2 1 3 0 1 5 2 4 2 0 3 2 1 2 3 4 A 2 1 3 0 1 5 2 4 2 0 3 2 1 2 3 4 b3 1 2 2 b 3 1 2 2 8 1 Introduction x Ab x 19259 18148 08889 15926 It is clear that the solution is x1 19259 x2 18148 x3 08889 and x4 15926 Alternatively one can use the inverse matrix of A to obtain the same solution directly as follows xinv Ab x 19259 18148 08889 15926 It should be noted that using the inverse method usually takes longer that using Gaussian elimination especially for large systems In this book we will use Gaussian elimination ie the backslash operator Consider now the following 5 5 matrix D D1 2 3 4 5 2 4 6 8 9 2 4 6 2 4 1 1 2 3 2 9 0 2 3 1 D 1 2 3 4 5 2 4 6 8 9 2 4 6 2 4 1 1 2 3 2 9 0 2 3 1 We can extract the submatrix in rows 2 to 4 and columns 3 to 5 as follows ED 24 35 E 6 8 9 6 2 4 2 3 2 13 MATLAB Tutorial 9 We can extract the third column of D as follows FD153 F 3 6 6 2 2 We can also extract the second row of D as follows GD215 G 2 4 6 8 9 We can extract the element in row 4 and column 3 as follows HD43 H 2 Finally in order to plot a graph of the function y fx we use the MATLAB command plotxy after we have adequately defined both vectors x and y The following is a simple example x1 2 3 4 5 6 7 8 9 10 x 1 2 3 4 5 6 7 8 9 10 yxˆ2 y 1 4 9 16 25 36 49 64 81 100 plotxy Figure 11 shows the plot obtained by MATLAB It is usually shown in a separate graphics window In this figure no titles are given to the x and yaxes These titles may be easily added to the figure using the xlabel and ylabel commands 10 1 Introduction Fig 11 Using the MATLAB Plot Command The Spring Element 12 2 The Spring Element where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 22 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the element forces are obtained for each element as follows f ku 23 where f is the 2 1 element force vector and u is the 2 1 element displacement vector 22 MATLAB Functions Used The three MATLAB functions used for the spring element are SpringElementStiffnessk This function calculates the element stiffness matrix for each spring with stiffness k It returns the 2 2 element stiffness matrix k SpringAssembleK k i j This functions assembles the element stiffness matrix k of the spring joining nodes i at the left end and j at the right end into the global stiffness matrix K It returns the nn global stiffness matrix K every time an element is assembled SpringElementForcesk u This function calculates the element force vector using the element stiffness matrix k and the element displacement vector u It returns the 2 1 element force vector f The following is a listing of the MATLAB source code for each function function y SpringElementStiffnessk SpringElementStiffness This function returns the element stiffness matrix for a spring with stiffness k The size of the element stiffness matrix is 2 x 2 y k k k k function y SpringAssembleKkij SpringAssemble This function assembles the element stiffness matrix k of the spring with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled Kii Kii k11 Kij Kij k12 22 MATLAB Functions Used 13 Kji Kji k21 Kjj Kjj k22 y K function y SpringElementForcesku SpringElementForces This function returns the element nodal force vector given the element stiffness matrix k and the element nodal displacement vector u y k u Example 21 Consider the twoelement spring system shown in Fig 22 Given k1 100 kNm k2 200 kNm and P 15 kN determine 1 the global stiffness matrix for the system 2 the displacements at nodes 2 and 3 3 the reaction at node 1 4 the force in each spring k2 k1 P 1 2 3 Fig 22 TwoElement Spring System for Example 21 Solution Use the six steps outlined in Chap 1 to solve this problem using the spring element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into two elements and three nodes Table 21 shows the element connectivity for this example Table 21 Element Connectivity for Example 21 Element Number Node i Node j 1 1 2 2 2 3 14 2 The Spring Element Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function SpringElementStiffness Each matrix has size 2 2 k1SpringElementStiffness100 k1 100 100 100 100 k2SpringElementStiffness200 k2 200 200 200 200 Step 3 Assembling the Global Stiffness Matrix Since the spring system has three nodes the size of the global stiffness matrix is 33 Therefore to obtain K we first set up a zero matrix of size 3 3 then make two calls to the MATLAB function SpringAssemble since we have two spring elements in the system Each call to the function will assemble one element The following are the MATLAB commands Kzeros33 K 0 0 0 0 0 0 0 0 0 KSpringAssembleKk112 K 100 100 0 100 100 0 0 0 0 16 2 The Spring Element kK2323 k 300 200 200 200 f0 15 f 0 15 ukf u 01500 02250 It is now clear that the displacements at nodes 2 and 3 are 015 m and 0225 m respectively Step 6 Postprocessing In this step we obtain the reaction at node 1 and the force in each spring using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 u U 0 01500 02250 FKU F 15 0 15 22 MATLAB Functions Used 17 Thusthereactionatnode1isaforceof15 kNdirectedtotheleftFinallywesetup the element nodal displacement vectors u1 and u2 then we calculate the element force vectors f1 and f2 by making calls to the MATLAB function SpringElementForces u10 U2 u1 0 01500 f1SpringElementForcesk1u1 f1 15 15 u2U2 U3 u2 01500 02250 f2SpringElementForcesk2u2 f2 15 15 Thus it is clear that the force in element 1 is 15 kN tensile and the force in element 2 is also 15 kN tensile Example 22 Consider the spring system composed of six springs as shown in Fig 23 Given k 120 kNm and P 20 kN determine 1 the global stiffness matrix for the system 2 the displacements at nodes 3 4 and 5 3 the reactions at nodes 1 and 2 4 the force in each spring 18 2 The Spring Element P k k k k k k 5 4 1 2 3 Fig 23 SixElement Spring System for Example 22 Solution Use the six steps outlined in Chap 1 to solve this problem using the spring element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into six elements and five nodes Table 22 shows the element connectivity for this example Table 22 Element Connectivity for Example 22 Element Number Node i Node j 1 1 3 2 3 4 3 3 5 4 3 5 5 5 4 6 4 2 Step 2 Writing the Element Stiffness Matrices The six element stiffness matrices k1 k2 k3 k4 k5 and k6 are obtained by making calls to the MATLAB function SpringElementStiffness Each matrix has size 2 2 k1SpringElementStiffness120 k1 120 120 120 120 22 MATLAB Functions Used 19 k2SpringElementStiffness120 k2 120 120 120 120 k3SpringElementStiffness120 k3 120 120 120 120 k4SpringElementStiffness120 k4 120 120 120 120 k5SpringElementStiffness120 k5 120 120 120 120 k6SpringElementStiffness120 k6 120 120 120 120 Step 3 Assembling the Global Stiffness Matrix Since the spring system has five nodes the size of the global stiffness matrix is 5 5 Therefore to obtain K we first set up a zero matrix of size 5 5 then make six calls to the MATLAB function SpringAssemble since we have six spring elements in the system Each call to the function will assemble one element The following are the MATLAB commands 20 2 The Spring Element Kzeros55 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KSpringAssembleKk113 K 120 0 120 0 0 0 0 0 0 0 120 0 120 0 0 0 0 0 0 0 0 0 0 0 0 KSpringAssembleKk234 K 120 0 120 0 0 0 0 0 0 0 120 0 240 120 0 0 0 120 120 0 0 0 0 0 0 KSpringAssembleKk335 K 120 0 120 0 0 0 0 0 0 0 120 0 360 120 120 0 0 120 120 0 0 0 120 0 120 22 MATLAB Functions Used 21 KSpringAssembleKk435 K 120 0 120 0 0 0 0 0 0 0 120 0 480 120 240 0 0 120 120 0 0 0 240 0 240 KSpringAssembleKk554 K 120 0 120 0 0 0 0 0 0 0 120 0 480 120 240 0 0 120 240 120 0 0 240 120 360 KSpringAssembleKk642 K 120 0 120 0 0 0 120 0 120 0 120 0 480 120 240 0 120 120 360 120 0 0 240 120 360 Step 4 Applying the Boundary Conditions The matrix 22 for this system is obtained as follows using the global stiffness matrix obtained in the previous step 120 0 120 0 0 0 120 0 120 0 120 0 480 120 240 0 120 120 360 120 0 0 240 120 360 U1 U2 U3 U4 U5 F1 F2 F3 F4 F5 28 22 2 The Spring Element The boundary conditions for this problem are given as U1 0 U2 0 F3 0 F4 0 F5 20 kN 29 Inserting the above conditions into 28 we obtain 120 0 120 0 0 0 120 0 120 0 120 0 480 120 240 0 120 120 360 120 0 0 240 120 360 0 0 U3 U4 U5 F1 F2 0 0 20 210 Step 5 Solving the Equations Solving the system of equations in 210 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 210 by extracting the submatrix in rows 3 4 and 5 and columns 3 4 and 5 Therefore we obtain 480 120 240 120 360 120 240 120 360 U3 U4 U5 0 0 20 211 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3535 k 480 120 240 120 360 120 240 120 360 f0 0 20 f 0 0 20 22 MATLAB Functions Used 23 ukf u 00897 00769 01410 It is now clear that the displacements at nodes 3 4 and 5 are 00897 m 00769 m and 0141 m respectively Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 2 and the force in each spring using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 0 u U 0 0 00897 00769 01410 FKU F 107692 92308 0 0 200000 Thus the reactions at nodes 1 and 2 are forces of 107692 kN directed to the left and 92308 kN directed to the left respectively Finally we set up the element nodal displacement vectors u1 u2 u3 u4 u5 and u6 then we calculate the element force vectors f1 f2 f3 f4 f5 and f6 by making calls to the MATLAB function SpringElementForces 24 2 The Spring Element u10 U3 u1 0 00897 f1SpringElementForcesk1u1 f1 107640 107640 u2U3 U4 u2 00897 00769 f2SpringElementForcesk2u2 f2 15360 15360 u3U3 U5 u3 00897 01410 f3SpringElementForcesk3u3 f3 61560 61560 u4U3 U5 u4 00897 01410 22 MATLAB Functions Used 25 f4SpringElementForcesk4u4 f4 61560 61560 u5U5 U4 u5 01410 00769 f5SpringElementForcesk5u5 f5 76920 76920 u6U4 0 u6 00769 0 f6SpringElementForcesk6u6 f6 92280 92280 Thus the forces in the springs are summarized in Table 23 Table 23 Summary of Element Forces Element Number Force Type 1 10764 kN Tensile 2 15360 kN Compressive 3 61560 kN Tensile 4 61560 kN Tensile 5 76920 kN Compressive 6 92280 kN Compressive 26 2 The Spring Element Problems Problem 21 Consider the spring system composed of two springs as shown in Fig 24 Given k1 200 kNm k2 250 kNm and P 10 kN determine 1 the global stiffness matrix for the system 2 the displacements at node 2 3 the reactions at nodes 1 and 3 4 the force in each spring P k2 k1 1 2 3 Fig 24 TwoElement Spring System for Problem 21 Problem 22 Consider the spring system composed of four springs as shown in Fig 25 Given k 170 kNm and P 25 kN determine 1 the global stiffness matrix for the system 2 the displacements at nodes 2 3 and 4 3 the reaction at node 1 4 the force in each spring k 4 1 2 3 k k k P Fig 25 FourElement Spring System for Problem 22 3 The Linear Bar Element 31 Basic Equations The linear bar element is a onedimensional finite element where the local and global coordinates coincide It is characterized by linear shape functions and is identical to the spring element except that the stiffness of the bar is not given directly The linear element has modulus of elasticity E crosssectional area A and length L Each linear bar element has two nodes as shown in Fig 31 In this case the element stiffness matrix is given by see 1 k EA L EA L EA L EA L 31 L x j i E A Fig 31 The Linear Bar Element Obviously the element stiffness matrix for the linear bar element is similar to that of the spring element with the stiffness replaced by EAL It is clear that the linear bar element has only two degrees of freedom one at each node Consequently for a structure with n nodes the global stiffness matrix K will be of size n n since we have one degree of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function LinearBarAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples 28 3 The Linear Bar Element Once the global stiffness matrix K is obtained we have the following structure equation KU F 32 where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 32 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the element forces are obtained for each element as follows f ku 33 where f is the 2 1 element force vector and u is the 2 1 element displacement vector The element stresses are obtained by dividing the element forces by the cross sectional area A 32 MATLAB Functions Used The four MATLAB functions used for the linear bar element are LinearBarElementStiffnessE A L This function calculates the element stiffness matrix for each linear bar with modulus of elasticity E crosssectional area A and length L It returns the 2 2 element stiffness matrix k LinearBarAssembleKk i jThisfunctionsassemblestheelementstiffnessmatrix k of the linear bar joining nodes i at the left end and j at the right end into the global stiffness matrix K It returns the n n global stiffness matrix K every time an element is assembled LinearBarElementForcesk u This function calculates the element force vector using the element stiffness matrix k and the element displacement vector u It returns the 2 1 element force vector f LinearBarElementStressesk u A This function calculates the element stress vector using the element stiffness matrix k the element displacement vector u and the crosssectional area A It returns the 2 1 element stress vector sigma or s The following is a listing of the MATLAB source code for each function 32 MATLAB Functions Used 29 function y LinearBarElementStiffnessEAL LinearBarElementStiffness This function returns the element stiffness matrix for a linear bar with modulus of elasticity E crosssectional area A and length L The size of the element stiffness matrix is 2 x 2 y EAL EAL EAL EAL function y LinearBarAssembleKkij LinearBarAssemble This function assembles the element stiffness matrix k of the linear bar with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled Kii Kii k11 Kij Kij k12 Kji Kji k21 Kjj Kjj k22 y K function y LinearBarElementForcesku LinearBarElementForces This function returns the element nodal force vector given the element stiffness matrix k and the element nodal displacement vector u y k u function y LinearBarElementStressesk u A LinearBarElementStresses This function returns the element nodal stress vector given the element stiffness matrix k the element nodal displacement vector u and the crosssectional area A y k uA Example 31 Consider the structure composed of two linear bars as shown in Fig 32 Given E 210 GPa A 0003 m2 P 10 kN and node 3 is displaced to the right by 0002 m determine 1 the global stiffness matrix for the structure 2 the displacement at node 2 3 the reactions at nodes 1 and 3 4 the stress in each bar 30 3 The Linear Bar Element P 15 m 1 m 1 2 3 Fig 32 TwoBar Structure for Problem 31 Solution Use the six steps outlined in Chap 1 to solve this problem using the linear bar element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into two elements and three nodes The units used in the MATLAB calculations are kN and meter Table 31 shows the element connectivity for this example Table 31 Element Connectivity for Example 31 Element Number Node i Node j 1 1 2 2 2 3 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function LinearBarElementStiffness Each matrix has size 2 2 E210e6 E 210000000 A0003 A 00030 L115 L1 15000 32 MATLAB Functions Used 31 L21 L2 1 k1LinearBarElementStiffnessEAL1 k1 420000 420000 420000 420000 k2LinearBarElementStiffnessEAL2 k2 630000 630000 630000 630000 Step 3 Assembling the Global Stiffness Matrix Since the structure has three nodes the size of the global stiffness matrix is 3 3 Therefore to obtain K we first set up a zero matrix of size 3 3 then make two calls to the MATLAB function LinearBarAssemble since we have two linear bar elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros33 K 0 0 0 0 0 0 0 0 0 KLinearBarAssembleKk112 K 420000 420000 0 420000 420000 0 0 0 0 32 3 The Linear Bar Element KLinearBarAssembleKk223 K 420000 420000 0 20000 1050000 630000 0 630000 630000 Step 4 Applying the Boundary Conditions The matrix 32 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 420000 420000 0 420000 1050000 630000 0 630000 630000 U1 U2 U3 F1 F2 F3 34 The boundary conditions for this problem are given as U1 0 F2 10 U3 0002 35 Inserting the above conditions into 34 we obtain 420000 420000 0 420000 1050000 630000 0 630000 630000 0 U2 0002 F1 10 F3 36 Step 5 Solving the Equations Solving the system of equations in 36 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 36 by extracting the submatrix in row 2 and column 2 which turns out to be a 1 1 matrix Because of the applied displacement of 0002 m at node 3 we need to extract the submatrix in row 2 and column 3 which also turns out to be a 1 1 matrix Therefore we obtain 1050000 U2 630000 0002 10 37 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination 32 MATLAB Functions Used 33 kK22 k 1050000 k0K23 k0 630000 u00002 u0 00020 f10 f 10 f0fk0u0 f0 1250 ukf0 u 00012 It is now clear that the displacement at node 2 is 00012 m Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 3 and the stress in each bar using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F 34 3 The Linear Bar Element U0 u u0 U 0 00012 00020 FKU F 5000000 100000 5100000 Thus the reactions at nodes 1 and 3 are forces of 500 kN directed to the left and 510 kN directed to the right respectively It is clear that force equilibrium is satisfied Next we set up the element nodal displacement vectors u1 and u2 then we calcu late the element force vectors f1 and f2 by making calls to the MATLAB function LinearBarElementForces Finally we divide each element force by the crosssectional area of the element to obtain the element stresses u10 U2 u1 0 00012 f1LinearBarElementForcesk1u1 f1 5000000 5000000 sigma1f1A sigma1 10e005 16667 16667 32 MATLAB Functions Used 35 u2U2 U3 u2 00012 00020 f2LinearBarElementForcesk2u2 f2 5100000 5100000 sigma2f2A sigma2 10e005 17000 17000 Thusitisclearthatthestressinelement1is1667105 kNm2 or1667 MPatensile and the stress in element 2 is 17 105 kNm2 or 170 MPa tensile Alternatively we can obtain the element stresses directly by making calls to the MATLAB function LinearBarElementStresses This is performed as follows in which we obtain the same results as above s1LinearBarElementStressesk1u1A s1 10e005 16667 16667 s2LinearBarElementStressesk2u2A s2 10e005 17000 17000 36 3 The Linear Bar Element Example 32 Consider the tapered bar shown in Fig 33 with E 210 GPa and P 18 kN The crosssectional areas of the bar at the left and right ends are 0002 m2 and 0012 m2 respectively Use linear bar elements to determine the displacement at the free end of the bar P x 3 m Fig 33 Tapered Bar for Problem 32 Solution Use the six steps outlined in Chap 1 to solve this problem using the linear bar element Step 1 Discretizing the Domain We will use five linear bar elements in this problem Therefore the tapered bar is discretized into five elements and six nodes as shown in Fig 34 For more accurate results more elements can be used see Problem 32 Table 32 shows the element connectivity for this example In this example the length of each element will be 06 m The crosssectional area for each element will be taken as the crosssectional area at the middle of the element This can be calculated using the following formula which gives the crosssectional area at any distance x from the left end Ax 0002 001x 3 38 P k1 k3 k4 k2 k5 1 2 4 5 6 3 Fig 34 Discretization of the Tapered Bar Example 32 MATLAB Functions Used 37 Table 32 Element Connectivity for Example 32 Element Number Node i Node j 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 Step 2 Writing the Element Stiffness Matrices The five element stiffness matrices k1 k2 k3 k4 and k5 are obtained by making calls to the MATLAB function LinearBarElementStiffness Each matrix has size 2 2 E210e6 E 210000000 L35 L 06000 A10002001033 A1 00030 A20002001093 A2 00050 A30002001153 A3 00070 38 3 The Linear Bar Element A40002001213 A4 00090 A50002001273 A5 00110 k1LinearBarElementStiffnessEA1L k1 1050000 1050000 1050000 1050000 k2LinearBarElementStiffnessEA2L k2 10e006 17500 17500 17500 17500 k3LinearBarElementStiffnessEA3L k3 2450000 2450000 2450000 2450000 k4LinearBarElementStiffnessEA4L k4 10e006 31500 31500 31500 31500 32 MATLAB Functions Used 39 k5LinearBarElementStiffnessEA5L k5 3850000 3850000 3850000 3850000 Step 3 Assembling the Global Stiffness Matrix Since the structure has six nodes the size of the global stiffness matrix is 6 6 Therefore to obtain K we first set up a zero matrix of size 6 6 then make five calls to the MATLAB function LinearBarAssemble since we have five linear bar elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros66 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KLinearBarAssembleKk112 K 1050000 1050000 0 0 0 0 1050000 1050000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KLinearBarAssembleKk223 K 10e006 40 3 The Linear Bar Element 10500 10500 0 0 0 0 10500 28000 17500 0 0 0 0 17500 17500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KLinearBarAssembleKk334 K 10e006 10500 10500 0 0 0 0 10500 28000 17500 0 0 0 0 17500 42000 24500 0 0 0 0 24500 24500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KLinearBarAssembleKk445 K 10e006 10500 10500 0 0 0 0 10500 28000 17500 0 0 0 0 17500 42000 24500 0 0 0 0 24500 56000 31500 0 0 0 0 31500 31500 0 0 0 0 0 0 0 KLinearBarAssembleKk556 K 10e006 32 MATLAB Functions Used 41 10500 10500 0 0 0 0 10500 28000 17500 0 0 0 0 17500 42000 24500 0 0 0 0 24500 56000 31500 0 0 0 0 31500 70000 38500 0 0 0 0 x38500 38500 Step 4 Applying the Boundary Conditions The matrix 32 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 106 105 105 0 0 0 0 105 280 175 0 0 0 0 175 42 245 0 0 0 0 245 560 315 0 0 0 0 315 700 385 0 0 0 0 385 385 U1 U2 U3 U4 U5 U6 F1 F2 F3 F4 F5 F6 39 The boundary conditions for this problem are given as F1 18 F2 F3 F4 F5 0 U6 0 310 Inserting the above conditions into 39 we obtain 106 105 105 0 0 0 0 105 280 175 0 0 0 0 175 420 245 0 0 0 0 245 560 315 0 0 0 0 315 700 385 0 0 0 0 385 385 U1 U2 U3 U4 U5 0 18 0 0 0 0 F6 311 Step 5 Solving the Equations Solving the system of equations in 311 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 311 by extracting the submatrix in rows 1 to 5 and columns 1 to 5 Therefore we obtain 42 3 The Linear Bar Element 106 105 105 0 0 0 105 280 175 0 0 0 175 420 245 0 0 0 245 560 315 0 0 0 315 700 U1 U2 U3 U4 U5 18 0 0 0 0 312 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK1515 k 10e006 10500 10500 0 0 0 10500 28000 17500 0 0 0 17500 42000 24500 0 0 0 24500 56000 31500 0 0 0 31500 70000 f18 0 0 0 0 f 18 0 0 0 0 u kf u 10e004 04517 02802 01774 01039 00468 32 MATLAB Functions Used 43 Therefore it is clear that the required displacement at the free end is 04517104 m or 004517 mm the minus sign indicates that it is directed to the left No calls are made to the MATLAB functions LinearBarElementForces or LinearBarEle mentStresses since the element forces and stresses are not required in this example Thus Step 6 Postprocessing will not be performed for this example Problems Problem 31 Consider the structure composed of three linear bars as shown in Fig 35 Given E 70 GPa A 0005 m2 P1 10 kN and P2 15 kN determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 2 3 and 4 3 the reaction at node 1 4 the stress in each bar 1 m 4 1 2 3 P2 P1 2 m 1 m Fig 35 ThreeBar Structure for Problem 31 Problem 32 Solve Example 32 again using ten linear elements instead of five Determine the dis placement at the free end of the tapered bar and compare your answer with the result obtained in the example Problem 33 Consider the structure composed of a spring and a linear bar as shown in Fig 36 Given E 200 GPa A 001 m2 k 1000 kNm and P 25 kN determine 1 the global stiffness matrix for the structure 2 the displacement at node 2 3 the reactions at nodes 1 and 3 4 the stress in the bar 5 the force in the spring E A 1 k 2 3 P 2 m Fig 36 Linear Bar with a Spring for Problem 33 4 The Quadratic Bar Element 41 Basic Equations The quadratic bar element is a onedimensional finite element where the local and global coordinates coincide It is characterized by quadratic shape functions The quadratic bar element has modulus of elasticity E crosssectional area A and length L Each quadratic bar element has three nodes as shown in Fig 41 The third node is at the middle of the element In this case the element stiffness matrix is given by see 8 k EA 3L 7 1 8 1 7 8 8 8 16 41 L2 i E A x j m L2 Fig 41 The Quadratic Bar Element It is clear that the quadratic bar element has three degrees of freedom one at each node Consequently for a structure with n nodes the global stiffness matrix K will be of size n n since we have one degree of freedom at each node The order of the nodes for this element is very important the first node is the one at the left end the second node is the one at the right end and the third node is the one in the middle of the element The global stiffness matrix K is assembled by making calls to the MATLAB function QuadraticBarAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples 46 4 The Quadratic Bar Element Once the global stiffness matrix K is obtained we have the following structure equation KU F 42 where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 42 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the element forces are obtained for each element as follows f ku 43 where f is the 3 1 element force vector and u is the 3 1 element displacement vector The element stresses are obtained by dividing the element forces by the cross sectional area A 42 MATLAB Functions Used The four MATLAB functions used for the quadratic bar element are QuadraticBarElementStiffnessE A L This function calculates the element stiffness matrix for each quadratic bar with modulus of elasticity E crosssectional area A and length L It returns the 3 3 element stiffness matrix k QuadraticBarAssembleK k i j m This function assembles the element stiffness matrix k of the quadratic bar joining nodes i at the left end j at the right end and m in the middle into the global stiffness matrix K It returns the n n global stiffness matrix K every time an element is assembled QuadraticBarElementForcesk u This function calculates the element force vector using the element stiffness matrix k and the element displacement vector u It returns the 3 1 element force vector f QuadraticBarElementStressesk u A This function calculates the element stress vector using the element stiffness matrix k the element displacement vector u and the crosssectional area A It returns the 3 1 element stress vector sigma or s The following is a listing of the MATLAB source code for each function 42 MATLAB Functions Used 47 function y QuadraticBarElementStiffnessEAL QuadraticBarElementStiffness This function returns the element stiffness matrix for a quadratic bar with modulus of elasticity E crosssectional area A and length L The size of the element stiffness matrix is 3 x 3 y EA3L 7 1 8 1 7 8 8 8 16 function y QuadraticBarAssembleKkijm QuadraticBarAssemble This function assembles the element stiffness matrix k of the quadratic bar with nodes i j and m into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled Kii Kii k11 Kij Kij k12 Kim Kim k13 Kji Kji k21 Kjj Kjj k22 Kjm Kjm k23 Kmi Kmi k31 Kmj Kmj k32 Kmm Kmm k33 y K function y QuadraticBarElementForcesku QuadraticBarElementForces This function returns the element nodal force vector given the element stiffness matrix k and the element nodal displacement vector u y k u function y QuadraticBarElementStressesk u A QuadraticBarElementStresses This function returns the element nodal stress vector given the element stiffness matrix k the element nodal displacement vector u and the crosssectional area A y k uA Example 41 Consider the structure composed of two quadratic bars as shown in Fig 42 Given E 210 GPa and A 0003 m2 determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 2 3 4 and 5 48 4 The Quadratic Bar Element 3 the reaction at node 1 4 the element stresses 1 m 4 1 2 3 1 m 5 1 m 5 kN 10 kN 7 kN 10 kN 1 m Fig 42 Two Quadratic Bars for Example 41 Solution Use the six steps outlined in Chap 1 to solve this problem using the quadratic bar element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into two elements and five nodes The units used in the MATLAB calculations are kN and meter Table 41 shows the element connectivity for this example Table 41 Element Connectivity for Example 41 Element Number Node i Node j Node m 1 1 3 2 2 3 5 4 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function QuadraticBarElementStiffness Each matrix has size 3 3 E210e6 E 210000000 A0003 A 00030 42 MATLAB Functions Used 49 L2 L 2 k1QuadraticBarElementStiffnessEAL k1 735000 105000 840000 105000 735000 840000 840000 840000 1680000 k2QuadraticBarElementStiffnessEAL k2 735000 105000 840000 105000 735000 840000 840000 840000 1680000 Step 3 Assembling the Global Stiffness Matrix Since the structure has five nodes the size of the global stiffness matrix is 5 5 Therefore to obtain K we first set up a zero matrix of size 5 5 then make two calls to the MATLAB function QuadraticBarAssemble since we have two quadratic bar elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros55 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 50 4 The Quadratic Bar Element KQuadraticBarAssembleKk1132 K 735000 840000 105000 0 0 840000 1680000 840000 0 0 105000 840000 735000 0 0 0 0 0 0 0 0 0 0 0 0 KQuadraticBarAssembleKk2354 K 735000 840000 105000 0 0 840000 1680000 840000 0 0 105000 840000 1470000 840000 105000 0 0 840000 1680000 840000 0 0 105000 840000 735000 Step 4 Applying the Boundary Conditions The matrix 42 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 103 735 840 105 0 0 840 1680 840 0 0 105 840 1470 840 105 0 0 840 1680 840 0 0 105 840 735 U1 U2 U3 U4 U5 F1 F2 F3 F4 F5 44 The boundary conditions for this problem are given as U1 0 F2 5 F3 10 F4 7 F5 10 45 Inserting the above conditions into 44 we obtain 103 735 840 105 0 0 840 1680 840 0 0 105 840 1470 840 105 0 0 840 1680 840 0 0 105 840 735 0 U2 U3 U4 U5 F1 5 10 7 10 46 42 MATLAB Functions Used 51 Step 5 Solving the Equations Solving the system of equations in 46 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 46 by extracting the submatrix in rows 2 to 5 and columns 2 to 5 Therefore we obtain 103 1680 840 0 0 840 1470 840 105 0 840 1680 840 0 105 840 735 U2 U3 U4 U5 5 10 7 10 47 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK2525 k 1680000 840000 0 0 840000 1470000 840000 105000 0 840000 1680000 840000 0 105000 840000 735000 f5 10 7 10 f 5 10 7 10 ukf u 10e004 00417 01429 00813 00635 It is now clear that the displacements at node 2 3 4 and 5 are 000417 mm 001429 mm 000813 mm and 000635 mm respectively 52 4 The Quadratic Bar Element Step 6 Postprocessing In this step we obtain the reaction at node 1 and the stresses in each bar using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 u U 10e004 0 00417 01429 00813 00635 FKU F 20000 50000 100000 70000 100000 Thus the reaction at node 1 is a force of 2 kN directed to the right Obviously force equilibrium is satisfied for this problem Next we set up the element nodal displacement vectors u1 and u2 then we calculate the element stress vectors sigma1 and sigma2 by making calls to the MATLAB function QuadraticBarElement Stresses u10 U3 U2 u1 10e004 0 01429 00417 sigma1QuadraticBarElementStressesk1u1A 42 MATLAB Functions Used 53 sigma1 10e003 06667 23333 16667 u2U3 U5 U4 u2 10e004 01429 00635 00813 sigma2QuadraticBarElementStressesk2u2A sigma2 10e003 10000 33333 23333 Thus it is clear that the stresses are not constant within each element since we have used quadratic bar elements instead of linear bar elements in this example Example 42 Consider the structure composed of two quadratic bars as shown in Fig 43 Given E 210 GPa A 0003 m2 P 10 kN and node 5 is displaced to the right by 0002 m determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 2 3 and 4 3 the reactions at nodes 1 and 5 4 the element stresses Note that this is exactly the same problem solved in Example 31 but now we are using quadratic bar elements instead of linear bar elements 54 4 The Quadratic Bar Element P 5 05 m 075 m 4 1 2 3 075 m 05 m Fig 43 Two Quadratic Bars for Example 42 Solution Use the six steps outlined in Chap 1 to solve this problem using the quadratic bar element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into two elements and five nodes The units used in the MATLAB calculations are kN and meter Table 42 shows the element connectivity for this example Table 42 Element Connectivity for Example 42 Element Number Node i Node j Node m 1 1 3 2 2 3 5 4 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function QuadraticBarElementStiffness Each matrix has size 3 3 E210E6 E 210000000 A0003 A 00030 L115 42 MATLAB Functions Used 55 L1 15000 L21 L2 1 k1QuadraticBarElementStiffnessEAL1 k1 980000 140000 1120000 140000 980000 1120000 1120000 1120000 2240000 k2QuadraticBarElementStiffnessEAL2 k2 1470000 210000 1680000 210000 1470000 1680000 1680000 1680000 3360000 Step 3 Assembling the Global Stiffness Matrix Since the structure has five nodes the size of the global stiffness matrix is 5 5 Therefore to obtain K we first set up a zero matrix of size 5 5 then make two calls to the MATLAB function QuadraticBarAssemble since we have two quadratic bar elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros55 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 56 4 The Quadratic Bar Element KQuadraticBarAssembleKk1132 K 980000 1120000 140000 0 0 1120000 2240000 1120000 0 0 140000 1120000 980000 0 0 0 0 0 0 0 0 0 0 0 0 KQuadraticBarAssembleKk2354 K 980000 1120000 140000 0 0 1120000 2240000 1120000 0 0 140000 1120000 2450000 1680000 210000 0 0 1680000 3360000 1680000 0 0 210000 1680000 1470000 Step 4 Applying the Boundary Conditions The matrix 42 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 103 980 1120 140 0 0 1120 2240 1120 0 0 140 1120 2450 1680 210 0 0 1680 3360 1680 0 0 210 1680 1470 U1 U2 U3 U4 U5 F1 F2 F3 F4 F5 48 The boundary conditions for this problem are given as U1 0 F2 0 F3 10 F4 0 U5 0002 49 42 MATLAB Functions Used 57 Inserting the above conditions into 48 we obtain 103 980 1120 140 0 0 1120 2240 1120 0 0 140 1120 2450 1680 210 0 0 1680 3360 1680 0 0 210 1680 1470 0 U2 U3 U4 0002 F1 0 10 0 F5 410 Step 5 Solving the Equations Solving the system of equations in 410 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 410 by extracting the submatrix in rows 2 to 4 and columns 2 to 4 which turns out to be a 3 3 matrix Because of the applied displacement of 0002 m at node 5 we need also to extract the submatrix in rows 2 to 4 and column 5 which turns out to be a 3 1 vector Therefore we obtain 103 2240 1120 0 1120 2450 1680 0 1680 3360 U2 U3 U4 103 0 210 1680 0002 0 10 0 411 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK2424 k 2240000 1120000 0 1120000 2450000 1680000 0 1680000 3360000 k0K245 k0 0 210000 1680000 u00002 58 4 The Quadratic Bar Element u0 00020 f0 10 0 f 0 10 0 f0fk0u0 f0 0 430 3360 ukf0 u 00006 00012 00016 It is now clear that the displacements at nodes 2 3 and 4 are 00006 m 00012 m and 00016 mrespectivelyNotethatwehaveobtainedthesamevalueforthedisplacement at the middle node of the structure as that obtained in Example 31 namely 00012 m Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 5 and the stress in each bar using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 u u0 U 0 00006 00012 00016 00020 42 MATLAB Functions Used 59 FKU F 5000000 0 100000 00000 5100000 Thus the reactions at nodes 1 and 5 are forces of 500 kN directed to the left and 510 kN directed to the right respectively It is clear that force equilibrium is satisfied and that these are the same values obtained in Example 31 Next we set up the element nodal displacement vectors u1 and u2 then we calculate the element stress vectors sigma1 and sigma2 by making calls to the MATLAB function QuadraticBarElementStresses u10 U3 U2 u1 0 00012 00006 sigma1QuadraticBarElementStressesk1u1A sigma1 10e005 16667 16667 0 u2U3 U5 U4 u2 00012 00020 00016 sigma2QuadraticBarElementStressesk2u2A sigma2 10e005 60 4 The Quadratic Bar Element 17000 17000 00000 Thus it is clear that the stress in element 1 is 1667 105 kNm2 or 1667 MPa tensile and the stress in element 2 is 17 105 kNm2 or 170 MPa tensile Note that these are the same values for the stresses obtained previously in Example 31 Problems Problem 41 Consider the tapered bar problem of Example 32 see Fig 33 Solve this problem again using quadratic bars instead of linear bars Use two quadratic bar elements to model the problem such that the structure has five nodes Compare your answer with those obtained in Example 32 and Problem 32 Problem 42 Consider the structure composed of a spring and a quadratic bar element as shown in Fig 44 Given k 2000 kNm E 70 GPa and A 0001 m2 determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 2 3 and 4 3 the reaction at node 1 4 the force in the spring 5 the quadratic bar element stresses E A 3 4 2 2 m 2 m 5 kN 10 kN 1 k Fig 44 Quadratic Bar and a Spring for Problem 42 5 The Plane Truss Element 51 Basic Equations The plane truss element is a twodimensional finite element with both local and global coordinates It is characterized by linear shape functions The plane truss element has modulus of elasticity E crosssectional area A and length L Each plane truss element has two nodes and is inclined with an angle θ measured counterclockwise from the positive global X axis as shown in Fig 51 Let C cos θ and S sin θ In this case the element stiffness matrix is given by see 1 k EA L C2 CS C2 CS CS S2 CS S2 C2 CS C2 CS CS S2 CS S2 51 Y y L x j i X θ Fig 51 The Plane Truss Element It is clear that the plane truss element has four degrees of freedom two at each node Consequently for a structure with n nodes the global stiffness matrix K will be of size 2n 2n since we have two degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function PlaneTrussAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 52 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the force is obtained for each element as follows f EALC S C Su where f is the force in the element a scalar and u is the 4 1 element displacement vector The element stress is obtained by dividing the element force by the crosssectional area A If there is an inclined support at one of the nodes of the truss then the global stiffness matrix needs to be modified using the following equation Knew TKoldT where T is a 2n 2n transformation matrix that is obtained by making a call to the MATLAB function PlaneTrussInclinedSupport The inclined support is assumed to be at node i with an angle of inclination alpha as shown in Fig 52 52 MATLAB Functions Used 63 PlaneTrussElementStiffnessE A L theta This function calculates the element stiffness matrix for each plane truss element with modulus of elasticity E cross sectional area A length L and angle theta in degrees It returns the 4 4 element stiffness matrix k PlaneTrussAssembleK k i j This function assembles the element stiffness ma trix k of the plane truss element joining nodes i and j into the global stiffness ma trix K It returns the 2n 2n global stiffness matrix K every time an element is assembled PlaneTrussElementForceE A L theta u This function calculates the element force using the modulus of elasticity E the crosssectional area A the length L the angle theta in degrees and the element displacement vector u It returns the force in the element as a scalar PlaneTrussElementStressE L theta u This function calculates the element stress using the modulus of elasticity E the length L the angle theta in degrees and the element displacement vector u It returns the stress in the element as a scalar PlaneTrussInclinedSupportT i alpha This function calculates the transformation matrix of the inclined support using the node number i of the inclined support and the angle of inclination alpha in degrees It returns the 2n 2n transformation matrix The following is a listing of the MATLAB source code for each function function y PlaneTrussElementLengthx1y1x2y2 PlaneTrussElementLength This function returns the length of the plane truss element whose first node has coordinates x1 y1 and second node has coordinates x2 y2 y sqrtx2x1x2x1 y2y1y2y1 function y PlaneTrussElementStiffnessEAL theta PlaneTrussElementStiffness This function returns the element stiffness matrix for a plane truss element with modulus of elasticity E crosssectional area A length L and angle theta in degrees The size of the element stiffness matrix is 4 x 4 x thetapi180 C cosx S sinx y EALCC CS CC CS CS SS CS SS CC CS CC CS CS SS CS SS 64 5 The Plane Truss Element function y PlaneTrussAssembleKkij PlaneTrussAssemble This function assembles the element stiffness matrix k of the plane truss element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K2i12i1 K2i12i1 k11 K2i12i K2i12i k12 K2i12j1 K2i12j1 k13 K2i12j K2i12j k14 K2i2i1 K2i2i1 k21 K2i2i K2i2i k22 K2i2j1 K2i2j1 k23 K2i2j K2i2j k24 K2j12i1 K2j12i1 k31 K2j12i K2j12i k32 K2j12j1 K2j12j1 k33 K2j12j K2j12j k34 K2j2i1 K2j2i1 k41 K2j2i K2j2i k42 K2j2j1 K2j2j1 k43 K2j2j K2j2j k44 y K function y PlaneTrussElementForceEALthetau PlaneTrussElementForce This function returns the element force given the modulus of elasticity E the crosssectional area A the length L the angle theta in degrees and the element nodal displacement vector u x theta pi180 C cosx S sinx y EALC S C S u function y PlaneTrussElementStressELthetau PlaneTrussElementStress This function returns the element stress given the modulus of elasticity E the the length L the angle theta in degrees and the element nodal displacement vector u x theta pi180 C cosx S sinx y ELC S C S u 52 MATLAB Functions Used 65 function y PlaneTrussInclinedSupportTialpha PlaneTrussInclinedSupport This function calculates the tranformation matrix T of the inclined support at node i with angle of inclination alpha in degrees x alphapi180 T2i12i1 cosx T2i12i sinx T2i2i1 sinx T2i2i cosx y T Example 51 ConsidertheplanetrussshowninFig53GivenE 210 GPaandA 1104 m2 determine 1 the global stiffness matrix for the structure 2 the horizontal displacement at node 2 3 the horizontal and vertical displacements at node 3 4 the reactions at nodes 1 and 2 5 the stress in each element 3 1 2 3 m 2 m 5 kN 10 kN 2 m Fig 53 Plane Truss with Three Elements for Example 51 Solution Use the six steps outlined in Chap 1 to solve this problem using the plane truss element 66 5 The Plane Truss Element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into three elements and three nodes The units used in the MATLAB calculations are kN and meter Table 51 shows the element connectivity for this example Table 51 Element Connectivity for Example 51 Element Number Node i Node j 1 1 2 2 1 3 3 2 3 Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices k1 k2 and k3 are obtained by making calls to the MATLAB function PlaneTrussElementStiffness Each matrix has size 4 4 E210e6 E 210000000 A1e4 A 10000e004 L14 L1 4 L2PlaneTrussElementLength0023 L2 36056 52 MATLAB Functions Used 67 L3PlaneTrussElementLength0023 L3 36056 k1PlaneTrussElementStiffnessEAL10 k1 5250 0 5250 0 0 0 0 0 5250 0 5250 0 0 0 0 0 theta2atan32180pi theta2 563099 theta3180theta2 theta3 1236901 k2PlaneTrussElementStiffnessEAL2theta2 k2 10e003 17921 26882 17921 26882 26882 40322 26882 40322 17921 26882 17921 26882 26882 40322 26882 40322 k3PlaneTrussElementStiffnessEAL3theta3 k3 10e003 68 5 The Plane Truss Element 17921 26882 17921 26882 26882 40322 26882 40322 17921 26882 17921 26882 26882 40322 26882 40322 Step 3 Assembling the Global Stiffness Matrix Since the structure has three nodes the size of the global stiffness matrix is 6 6 Therefore to obtain K we first set up a zero matrix of size 6 6 then make three calls to the MATLAB function PlaneTrussAssemble since we have three elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros66 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneTrussAssembleKk112 K 5250 0 5250 0 0 0 0 0 0 0 0 0 5250 0 5250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneTrussAssembleKk213 K 10e003 70421 26882 52500 0 17921 26882 26882 40322 0 0 26882 40322 52 MATLAB Functions Used 69 52500 0 52500 0 0 0 0 0 0 0 0 0 17921 26882 0 0 17921 26882 26882 40322 0 0 26882 40322 KPlaneTrussAssembleKk323 K 10e003 70421 26882 52500 0 17921 26882 26882 40322 0 0 26882 40322 52500 0 70421 26882 17921 26882 0 0 26882 40322 26882 40322 17921 26882 17921 26882 35842 00000 26882 40322 26882 40322 00000 80645 Step 4 Applying the Boundary Conditions The matrix 52 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 103 70421 26882 52500 0 17921 26882 26882 40322 0 0 26882 40322 52500 0 70421 26882 17921 26882 0 0 26882 40322 26882 40322 17921 26882 17921 26882 35842 0 26882 40322 26882 40322 0 80645 U1x U1y U2x U2y U3x U3y F1x F1y F2x F2y F3x F3y 55 The boundary conditions for this problem are given as U1x U1y U2y 0 F2x 0 F3x 5 F3y 10 56 70 5 The Plane Truss Element Inserting the above conditions into 55 we obtain 103 7041 26882 52500 0 17921 26882 26882 40322 0 0 26882 40322 52500 0 70421 26882 17921 26882 0 0 26882 40322 26882 40322 17921 26882 17921 26882 35842 0 26882 40322 26882 40322 0 80645 0 0 U2x 0 U3x U3y F1x F1y 0 F2y 5 10 57 Step 5 Solving the Equations Solving the system of equations in 57 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 57 by extracting the submatrix in row 3 and column 3 row 3 and columns 5 and 6 rows 5 and 6 and column 3 and rows 5 and 6 and columns 5 and 6 Therefore we obtain 103 70421 17921 26882 17921 35842 0 26882 0 80645 U2x U3x U3y 0 5 10 58 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK33 K356 K563 K5656 k 10e003 70421 17921 26882 17921 35842 00000 26882 00000 80645 f0 5 10 f 0 5 10 52 MATLAB Functions Used 71 ukf u 00011 00020 00016 It is now clear that the horizontal displacement at node 2 is 00011 m and the horizontal and vertical displacements at node 3 are 00020 m and 00016 m respec tively Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 2 and the stress in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 0 u1 0 u23 U 0 0 00011 0 00020 00016 FKU F 50000 12500 00000 87500 50000 100000 Thus the horizontal and vertical reactions at node 1 are forces of 5 kN directed to the left and 125 kN directed upwards The vertical reaction at node 2 is a force of 875 N directed upwards Obviously force equilibrium is satisfied for this problem Nextwesetuptheelementnodaldisplacementvectorsu1 u2andu3 thenwecalculate the element stresses sigma1 sigma2 and sigma3 by making calls to the MATLAB function PlaneTrussElementStress 72 5 The Plane Truss Element u1U1 U2 U3 U4 u1 0 0 00011 0 u2U1 U2 U5 U6 u2 0 0 00020 00016 u3U3 U4 U5 U6 u3 00011 0 00020 00016 sigma1PlaneTrussElementStressEL10u1 sigma1 58333e004 sigma2PlaneTrussElementStressEL2theta2u2 sigma2 15023e004 sigma3PlaneTrussElementStressEL3theta3u3 sigma3 10516e005 52 MATLAB Functions Used 73 Thus it is clear that the stress in elements 1 2 and 3 are 583333 MPa tensile 15023 MPa compressive and 10516 MPa compressive respectively Example 52 Consider the plane truss with an inclined support as shown in Fig 54 Given E 70 GPa and A 0004 m2 determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 2 3 and 4 3 the reactions at nodes 1 and 4 4 the stress in each element 4 45 2 3 1 35 m 4 m 30 kN Fig 54 Plane Truss with Inclined Support for Example 52 Solution Use the six steps outlined in Chap 1 to solve this problem using the plane truss element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into six elements and four nodes The units used in the MATLAB calculations are kN and meter Table 52 shows the element connectivity for this example Table 52 Element Connectivity for Example 52 Element Number Node i Node j 1 1 2 2 1 4 3 1 3 4 2 4 5 2 3 6 3 4 74 5 The Plane Truss Element Step 2 Writing the Element Stiffness Matrices The six element stiffness matrices k1 k2 k3 k4 k5 and k6 are obtained by making calls to the MATLAB function PlaneTrussElementStiffness Each matrix has size 4 4 E70e6 E 70000000 A0004 A 00040 L135 L1 35000 theta190 theta1 90 L24 L2 4 theta20 theta2 0 L3PlaneTrussElementLength00435 52 MATLAB Functions Used 75 L3 53151 theta3 atan354180pi theta3 411859 L4L3 L4 53151 theta4360theta3 theta4 3188141 L54 L5 4 theta50 theta5 0 L635 L6 35000 theta6270 76 5 The Plane Truss Element theta6 270 k1PlaneTrussElementStiffnessEAL1theta1 k1 10e004 00000 00000 00000 00000 00000 80000 00000 80000 00000 00000 00000 00000 00000 80000 00000 80000 k2PlaneTrussElementStiffnessEAL2theta2 k2 70000 0 70000 0 0 0 0 0 70000 0 70000 0 0 0 0 0 k3PlaneTrussElementStiffnessEAL3theta3 k3 10e004 29837 26107 29837 26107 26107 22844 26107 22844 29837 26107 29837 26107 26107 22844 26107 22844 k4PlaneTrussElementStiffnessEAL4theta4 k4 10e004 52 MATLAB Functions Used 77 29837 26107 29837 26107 26107 22844 26107 22844 29837 26107 29837 26107 26107 22844 26107 22844 k5PlaneTrussElementStiffnessEAL5theta5 k5 70000 0 70000 0 0 0 0 0 70000 0 70000 0 0 0 0 0 k6PlaneTrussElementStiffnessEAL6theta6 k6 10e004 00000 00000 00000 00000 00000 80000 00000 80000 00000 00000 00000 00000 00000 80000 00000 80000 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 8 8 Therefore to obtain K we first set up a zero matrix of size 8 8 then make six calls to the MATLAB function PlaneTrussAssemble since we have six elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros88 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 78 5 The Plane Truss Element KPlaneTrussAssembleKk112 K 10e004 Columns 1 through 7 00000 00000 00000 00000 0 0 0 00000 80000 00000 80000 0 0 0 00000 00000 00000 00000 0 0 0 00000 80000 00000 80000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Column 8 0 0 0 0 0 0 0 0 KPlaneTrussAssembleKk214 K 10e004 Columns 1 through 7 70000 00000 00000 00000 0 0 70000 00000 80000 00000 80000 0 0 0 00000 00000 00000 00000 0 0 0 00000 80000 00000 80000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 70000 0 0 0 0 0 70000 0 0 0 0 0 0 0 52 MATLAB Functions Used 79 Column 8 0 0 0 0 0 0 0 0 KPlaneTrussAssembleKk313 K 10e005 Columns 1 through 7 09984 02611 00000 00000 02984 02611 07000 02611 10284 00000 08000 02611 02284 0 00000 00000 00000 00000 0 0 0 00000 08000 00000 08000 0 0 0 02984 02611 0 0 02984 02611 0 02611 02284 0 0 02611 02284 0 07000 0 0 0 0 0 07000 0 0 0 0 0 0 0 Column 8 0 0 0 0 0 0 0 0 KPlaneTrussAssembleKk424 K 10e005 80 5 The Plane Truss Element Columns 1 through 7 09984 02611 00000 00000 02984 02611 07000 02611 10284 00000 08000 02611 02284 0 00000 00000 02984 02611 0 0 02984 00000 08000 02611 10284 0 0 02611 02984 02611 0 0 02984 02611 0 02611 02284 0 0 02611 02284 0 07000 0 02984 02611 0 0 09984 0 0 02611 02284 0 0 02611 Column 8 0 0 02611 02284 0 0 02611 02284 KPlaneTrussAssembleKk523 K 10e005 Columns 1 through 7 09984 02611 00000 00000 02984 02611 07000 02611 10284 00000 08000 02611 02284 0 00000 00000 09984 02611 07000 0 02984 00000 08000 02611 10284 0 0 02611 02984 02611 07000 0 09984 02611 0 02611 02284 0 0 02611 02284 0 07000 0 02984 02611 0 0 09984 0 0 02611 02284 0 0 02611 Column 8 0 0 02611 52 MATLAB Functions Used 81 02284 0 0 02611 02284 KPlaneTrussAssembleKk634 K 10e005 Columns 1 through 7 09984 02611 00000 00000 02984 02611 07000 02611 10284 00000 08000 02611 02284 0 00000 00000 09984 02611 07000 0 02984 00000 08000 02611 10284 0 0 02611 02984 02611 07000 0 09984 02611 00000 02611 02284 0 0 02611 10284 00000 07000 0 02984 02611 00000 00000 09984 0 0 02611 02284 00000 08000 02611 Column 8 0 0 02611 02284 00000 08000 02611 10284 Next we need to modify the global stiffness matrix obtained above to take the effect of the inclined support at node 4 by using 54 First we set up an identity matrix T of size 88 Then we make a call to the MATLAB function PlaneTrussInclinedSupport as shown below The new matrix K0 obtained is thus the global stiffness matrix for the structure Teye 8 8 T 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 82 5 The Plane Truss Element 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 TPlaneTrussInclinedSupport T 4 45 T Columns 1 through 7 10000 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 07071 0 0 0 0 0 0 07071 Column 8 0 0 0 0 0 0 07071 07071 K0TKT K0 10e005 Columns 1 through 7 09984 02611 00000 00000 02984 02611 04950 02611 10284 00000 08000 02611 02284 0 00000 00000 09984 02611 07000 0 00264 52 MATLAB Functions Used 83 00000 08000 02611 10284 0 0 00231 02984 02611 07000 0 09984 02611 00000 02611 02284 0 0 02611 10284 05657 04950 0 00264 00231 00000 05657 07523 04950 0 03956 03461 00000 05657 00150 Column 8 04950 0 03956 03461 00000 05657 00150 12745 Step 4 Applying the Boundary Conditions The matrix 52 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 103 9984 2611 0 0 2984 2611 4950 4950 2611 10284 0 8000 2611 2284 0 0 0 0 9984 2611 7000 0 264 3956 0 8000 2611 10284 0 0 231 3461 2984 2611 7000 0 9984 2611 0 0 2611 2284 0 0 2611 10284 5657 5657 4950 0 264 231 0 5657 7523 150 4950 0 3956 3461 0 5657 150 12745 U1x U1y U2x U2y U3x U3y U 4x U 4y F1x F1y F2x F2y F3x F3y F 4x F 4y 59 The boundary conditions for this problem are given as U1x U1y U 4y 0 F2x F2y F3y F 4x 0 F3x 30 510 84 5 The Plane Truss Element Inserting the above conditions into equation 59 we obtain 103 9984 2611 0 0 2984 2611 4950 4950 2611 10284 0 8000 2611 2284 0 0 0 0 9984 2611 7000 0 264 3956 0 8000 2611 10284 0 0 231 3461 2984 2611 7000 0 9984 2611 0 0 2611 2284 0 0 2611 10284 5657 5657 4950 0 264 231 0 5657 7523 150 4950 0 3956 3461 0 5657 150 12745 0 0 U2x U2y U3x U3y U 4x 0 F1x F1y 0 0 30 0 0 F 4y 511 Step 5 Solving the Equations Solving the system of equations in 511 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 511 by extracting the submatrix in rows 3 to 7 and columns 3 to 7 Therefore we obtain 103 9984 2611 7000 0 264 2611 10284 0 0 231 7000 0 9984 2611 0 0 0 2611 10284 5657 264 231 0 5657 7523 U2x U2y U3x U3y U 4x 0 0 30 0 0 512 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK0 37 37 k 10e005 09984 02611 07000 0 00264 02611 10284 0 0 00231 07000 0 09984 02611 00000 0 0 02611 10284 05657 00264 00231 00000 05657 07523 52 MATLAB Functions Used 85 f0 0 30 0 0 f 0 0 30 0 0 ukf u 10e003 06053 01590 08129 03366 02367 It is now clear that the horizontal and vertical displacements at node 2 are 06053 103 m and 01590 103 m respectively the horizontal and vertical displacements at node 3 are 08129 103 m and 03366 103 m respectively and the inclined displacement at node 4 is 02367 103 m Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 2 and the stress in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 0 u 0 U 10e003 0 0 06053 01590 08129 86 5 The Plane Truss Element 03366 02367 0 FK0U F 37500 262500 0 00000 300000 00000 0 371231 Thus the horizontal and vertical reactions at node 1 are forces of 375 kN directed to the left and 2625 kN directed downward The inclined reaction at node 4 is a force of 3711231 kN Obviously force equilibrium is satisfied for this problem Next we set up the element nodal displacement vectors u1 u2 u3 u4 u5 and u6 then we calculate the element stresses sigma1 sigma2 sigma3 sigma4 sigma5 and sigma6 by making calls to the MATLAB function PlaneTrussElementStress u1U1 U2 U3 U4 u1 10e003 0 0 06053 01590 sigma1PlaneTrussElementStressEL1theta1u1 sigma1 31791e003 52 MATLAB Functions Used 87 u2U1 U2 U7 U8 u2 10e003 0 0 02367 0 sigma2PlaneTrussElementStressEL2theta2u2 sigma2 41425e003 u3U1 U2 U5 U6 u3 10e003 0 0 08129 03366 sigma3PlaneTrussElementStressEL3theta3u3 sigma3 51380e003 u4U3 U4 U7 U8 u4 10e003 06053 01590 02367 0 88 5 The Plane Truss Element sigma4PlaneTrussElementStressEL4theta4u4 sigma4 69666e003 u5U3 U4 U5 U6 u5 10e003 06053 01590 08129 03366 sigma5PlaneTrussElementStressEL5theta5u5 sigma5 36333e003 u6U5 U6 U7 U8 u6 10e003 08129 03366 02367 0 sigma6PlaneTrussElementStressEL6theta6u6 sigma6 67311e003 Thus it is clear that the stresses in elements 1 2 3 4 5 and 6 are 31791 MPa ten sile 41425 MPa compressive 51380 MPa tensile 69666 MPa compressive 36333 MPa tensile and 67311 MPa compressive respectively 52 MATLAB Functions Used 89 Problems Problem 51 Consider the plane truss shown in Fig 55 Given E 210 GPa and A 0005 m2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 2 3 4 and 5 3 the horizontal and vertical reactions at nodes 1 and 6 4 the stress in each element 3 1 2 20 kN 7 m 5 m 5 m 5 4 6 5 m Fig 55 Plane Truss for Problem 51 Problem 52 Consider the structure composed of a spring and plane truss as shown in Fig 56 Given E 70 GPa A 001 m2 and k 3000 kNm determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 4 and 5 3 the reactions at nodes 1 2 and 3 4 the force in the spring 5 the stress in each truss element k 2 4 m 3 m 4 m 4 1 3 5 10 kN Fig 56 Plane Truss with a Spring for Problem 52 6 The Space Truss Element 61 Basic Equations The space truss element is a threedimensional finite element with both local and global coordinates It is characterized by linear shape functions The space truss element has modulus of elasticity E crosssectional area A and length L Each space truss element has two nodes and is inclined with angles θx θy and θz measured from the global X Y and Z axes respectively to the local x axis as shown in Fig 61 Let Cx cosθx Cy cosθy and Cz cosθz In this case the element stiffness matrix is given by see 1 and 18 k EA L C2 x CxCy CxCz C2 x CxCy CxCz CyCx C2 y CyCz CyCx C2 y CyCz CzCx CzCy C2 z CzCx CzCy C2 z C2 x CxCy CxCz C2 x CxCy CxCz CyCx C2 y CyCz CyCx C2 y CyCz CzCx CzCy C2 z CzCx CzCy C2 z 61 L E A j x Y Z i X Fig 61 The Space Truss Element It is clear that the space truss element has six degrees of freedom three at each node Consequently for a structure with n nodes the global stiffness matrix K will be of size 3n 3n since we have three degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function SpaceTrussAssemble which is written specifically for this purpose Once the global stiffness matrix K is obtained we have the following structure equation KU F where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 62 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the force is obtained for each element as follows f EALCx Cy Cz Cx Cy Czu where f is the force in the element a scalar and u is the 6 1 element displacement vector The element stress is obtained by dividing the element force by the crosssectional area A 62 MATLAB Functions Used 93 SpaceTrussElementForceE A L thetax thetay thetaz u This function calculates the element force using the modulus of elasticity E the crosssectional area A the length L the angles thetax thetay thetaz in degrees and the element displacement vector u It returns the force in the element as a scalar SpaceTrussElementStressE L thetax thetay thetaz u This function calculates the element stress using the modulus of elasticity E the length L the angles thetax thetay thetaz in degrees and the element displacement vector u It returns the stress in the element as a scalar The following is a listing of the MATLAB source code for each function function y SpaceTrussElementLengthx1y1z1x2y2z2 SpaceTrussElementLength This function returns the length of the space truss element whose first node has coordinates x1y1z1 and second node has coordinates x2y2z2 y sqrtx2x1x2x1 y2y1y2y1 z2z1z2z1 function y SpaceTrussElementStiffnessEALthetaxthetaythetaz SpaceTrussElementStiffness This function returns the element stiffness matrix for a space truss element with modulus of elasticity E crosssectional area A length L and angles thetax thetay thetaz in degrees The size of the element stiffness matrix is 6 x 6 x thetaxpi180 u thetaypi180 v thetazpi180 Cx cosx Cy cosu Cz cosv w CxCx CxCy CxCz CyCx CyCy CyCz CzCx CzCy CzCz y EALw w w w function y SpaceTrussAssembleKkij SpaceTrussAssemble This function assembles the element stiffness matrix k of the space truss element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K3i23i2 K3i23i2 k11 K3i23i1 K3i23i1 k12 K3i23i K3i23i k13 K3i23j2 K3i23j2 k14 K3i23j1 K3i23j1 k15 94 6 The Space Truss Element K3i23j K3i23j k16 K3i13i2 K3i13i2 k21 K3i13i1 K3i13i1 k22 K3i13i K3i13i k23 K3i13j2 K3i13j2 k24 K3i13j1 K3i13j1 k25 K3i13j K3i13j k26 K3i3i2 K3i3i2 k31 K3i3i1 K3i3i1 k32 K3i3i K3i3i k33 K3i3j2 K3i3j2 k34 K3i3j1 K3i3j1 k35 K3i3j K3i3j k36 K3j23i2 K3j23i2 k41 K3j23i1 K3j23i1 k42 K3j23i K3j23i k43 K3j23j2 K3j23j2 k44 K3j23j1 K3j23j1 k45 K3j23j K3j23j k46 K3j13i2 K3j13i2 k51 K3j13i1 K3j13i1 k52 K3j13i K3j13i k53 K3j13j2 K3j13j2 k54 K3j13j1 K3j13j1 k55 K3j13j K3j13j k56 K3j3i2 K3j3i2 k61 K3j3i1 K3j3i1 k62 K3j3i K3j3i k63 K3j3j2 K3j3j2 k64 K3j3j1 K3j3j1 k65 K3j3j K3j3j k66 y K function y SpaceTrussElementForceEALthetaxthetaythetazu SpaceTrussElementForce This function returns the element force given the modulus of elasticity E the crosssectional area A the length L the angles thetax thetay thetaz in degrees and the element nodal displacement vector u x thetax pi180 w thetay pi180 v thetaz pi180 Cx cosx Cy cosw Cz cosv y EALCx Cy Cz Cx Cy Czu 62 MATLAB Functions Used 95 function y SpaceTrussElementStressELthetaxthetaythetazu SpaceTrussElementStress This function returns the element stress given the modulus of elasticity E the length L the angles thetax thetay thetaz in degrees and the element nodal displacement vector u x thetax pi180 w thetay pi180 v thetaz pi180 Cx cosx Cy cosw Cz cosv y ELCx Cy Cz Cx Cy Czu Example 61 Consider the space truss shown in Fig 62 The supports at nodes 1 2 and 3 are ballandsocket joints allowing rotation but no translation Given E 200 GPa A14 0001 m2 A24 0002 m2 A34 0001 m2 and P 12 kN determine 1 the global stiffness matrix for the structure 2 the displacements at node 4 3 the reactions at nodes 1 2 and 3 4 the stress in each element Z X P Y 1 3 2 4 4 m 3 m 4 m 5 m Fig 62 Space Truss with Three Elements for Example 61 Solution Use the six steps outlined in Chap 1 to solve this problem using the space truss element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into three elements and four nodes The units used in the MATLAB calculations are kN and meter Table 61 shows the element connectivity for this example 96 6 The Space Truss Element Table 61 Element Connectivity for Example 61 Element Number Node i Node j 1 1 4 2 2 4 3 3 4 Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices k1 k2 and k3 are obtained by making calls to the MATLAB function SpaceTrussElementStiffness Each matrix has size 6 6 E200e6 E 200000000 A10001 A1 00010 A20002 A2 00020 A30001 A3 00010 L1SpaceTrussElementLength004050 L1 64031 L2SpaceTrussElementLength300050 62 MATLAB Functions Used 97 L2 58310 L3SpaceTrussElementLength004050 L3 64031 theta1xacos0L1180pi theta1x 90 theta1yacos5L1180pi theta1y 386598 theta1zacos4L1180pi theta1z 513402 theta2xacos3L2180pi theta2x 590362 theta2yacos5L2180pi theta2y 309638 theta2zacos0L2180pi theta2z 90 98 6 The Space Truss Element theta3xacos0L3180pi theta3x 90 theta3yacos5L3180pi theta3y 386598 theta3zacos4L3180pi theta3z 1286598 k1SpaceTrussElementStiffnessEA1L1theta1xtheta1ytheta1z k1 10e004 00000 00000 00000 00000 00000 00000 00000 19046 15236 00000 19046 15236 00000 15236 12189 00000 15236 12189 00000 00000 00000 00000 00000 00000 00000 19046 15236 00000 19046 15236 00000 15236 12189 00000 15236 12189 k2SpaceTrussElementStiffnessEA2L2theta2xtheta2ytheta2z k2 10e004 18159 30264 00000 18159 30264 00000 30264 50441 00000 30264 50441 00000 00000 00000 00000 00000 00000 00000 18159 30264 00000 18159 30264 00000 30264 50441 00000 30264 50441 00000 00000 00000 00000 00000 00000 00000 62 MATLAB Functions Used 99 k3SpaceTrussElementStiffnessEA3L3theta3xtheta3ytheta3z k3 10e004 00000 00000 00000 00000 00000 00000 00000 19046 15236 00000 19046 15236 00000 15236 12189 00000 15236 12189 00000 00000 00000 00000 00000 00000 00000 19046 15236 00000 19046 15236 00000 15236 12189 00000 15236 12189 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 12 12 Therefore to obtain K we first set up a zero matrix of size 12 12 then make three calls to the MATLAB function SpaceTrussAssemble since we have three elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros1212 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KSpaceTrussAssembleKk114 K 10e004 100 6 The Space Truss Element Columns 1 through 7 00000 00000 00000 0 0 0 0 00000 19046 15236 0 0 0 0 00000 15236 12189 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00000 00000 00000 0 0 0 0 00000 19046 15236 0 0 0 0 00000 15236 12189 0 0 0 0 Columns 8 through 12 0 0 00000 00000 00000 0 0 00000 19046 15236 0 0 00000 15236 12189 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00000 00000 00000 0 0 00000 19046 15236 0 0 00000 15236 12189 KSpaceTrussAssembleKk224 K 10e004 Columns 1 through 7 00000 00000 00000 0 0 0 0 00000 19046 15236 0 0 0 0 00000 15236 12189 0 0 0 0 0 0 0 18159 30264 00000 0 0 0 0 30264 50441 00000 0 0 0 0 00000 00000 00000 0 62 MATLAB Functions Used 101 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00000 00000 00000 18159 30264 00000 0 00000 19046 15236 30264 50441 00000 0 00000 15236 12189 00000 00000 00000 0 Columns 8 through 12 0 0 00000 00000 00000 0 0 00000 19046 15236 0 0 00000 15236 12189 0 0 18159 30264 00000 0 0 30264 50441 00000 0 0 00000 00000 00000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 18159 30264 00000 0 0 30264 69486 15236 0 0 00000 15236 12189 KSpaceTrussAssembleKk334 K 10e004 Columns 1 through 7 00000 00000 00000 0 0 0 0 00000 19046 15236 0 0 0 0 00000 15236 12189 0 0 0 0 0 0 0 18159 30264 00000 0 0 0 0 30264 50441 00000 0 0 0 0 00000 00000 00000 0 0 0 0 0 0 0 00000 0 0 0 0 0 0 00000 0 0 0 0 0 0 00000 00000 00000 00000 18159 30264 00000 00000 00000 19046 15236 30264 50441 00000 00000 00000 15236 12189 00000 00000 00000 00000 102 6 The Space Truss Element Columns 8 through 12 0 0 00000 00000 00000 0 0 00000 19046 15236 0 0 00000 15236 12189 0 0 18159 30264 00000 0 0 30264 50441 00000 0 0 00000 00000 00000 00000 00000 00000 00000 00000 19046 15236 00000 19046 15236 15236 12189 00000 15236 12189 00000 00000 18159 30264 00000 19046 15236 30264 88532 0 15236 12189 00000 0 24378 Step 4 Applying the Boundary Conditions The matrix 62 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step the numbers are written below using one deci mal place only although the MATLAB calculations are performed with at least four decimal places 104 00 00 00 0 0 0 0 0 0 00 00 00 00 19 15 0 0 0 0 0 0 00 19 15 00 15 12 0 0 0 0 0 0 00 15 12 0 0 0 18 30 00 0 0 0 18 30 00 0 0 0 30 50 00 0 0 0 30 50 00 0 0 0 00 00 00 0 0 0 00 00 00 0 0 0 0 0 0 00 00 00 00 00 00 0 0 0 0 0 0 00 19 15 00 19 15 0 0 0 0 0 0 00 15 12 00 15 12 00 00 00 18 30 00 00 00 00 18 30 00 00 19 15 30 50 00 00 19 15 30 89 0 00 15 12 00 00 00 00 15 12 00 0 24 U1x U1y U1z U2x U2y U2z U3x U3y U3z U4x U4y U4z F1x F1y F1z F2x F2y F2z F3x F3y F3z F4x F4y F4z 64 62 MATLAB Functions Used 103 The boundary conditions for this problem are given as U1x U1y U1z U2x U2y U2z U3x U3y U3z 0 F4x 12 F4y F4z 0 65 Inserting the above conditions into 64 we obtain 104 00 00 00 0 0 0 0 0 0 00 00 00 00 19 15 0 0 0 0 0 0 00 19 15 00 15 12 0 0 0 0 0 0 00 15 12 0 0 0 18 30 00 0 0 0 18 30 00 0 0 0 30 50 00 0 0 0 30 50 00 0 0 0 00 00 00 0 0 0 00 00 00 0 0 0 0 0 0 00 00 00 00 00 00 0 0 0 0 0 0 00 19 15 00 19 15 0 0 0 0 0 0 00 15 12 00 15 12 00 00 00 18 30 00 00 00 00 18 30 00 00 19 15 30 50 00 00 19 15 30 89 0 00 15 12 00 00 00 00 15 12 00 0 24 0 0 0 0 0 0 0 0 0 U4x U4y U4z F1x F1y F1z F2x F2y F2z F3x F3y F3z 12 0 0 66 Step 5 Solving the Equations Solving the system of equations in 66 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 66 by extracting the submatrix in rows 10 to 12 and columns 10 to 12 Therefore we obtain 104 18 30 00 30 89 0 00 0 24 U4x U4y U4z 12 0 0 67 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination 104 6 The Space Truss Element kK10121012 k 10e004 18159 30264 00000 30264 88532 0 00000 0 24378 f12 0 0 f 12 0 0 ukf u 00015 00005 00000 It is now clear that the horizontal displacements at node 4 in the X and Z directions are 00015 m and 0 m due to symmetry respectively while the vertical displacement in the Y direction at node 4 is 00005 m Step 6 Postprocessing In this step we obtain the reactions at nodes 1 2 and 3 and the stress in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 0 0 0 0 0 0 0 0 u U 0 0 0 0 62 MATLAB Functions Used 105 0 0 0 0 0 00015 00005 00000 FKU F 00000 100000 80000 120000 200000 00000 00000 100000 80000 120000 00000 00000 Thus the reactions at node 1 are forces of 0 10 and 8 kN along the X Y and Z directions respectively The reactions at node 2 are forces of 12 20 and 0 kN along the X Y and Z directions respectively The reactions at node 3 are forces of 0 10 and 8 kN along the X Y andZ directions respectively Obviously force equilibrium is satisfied for this problem Next we set up the element nodal displacement vectors u1 u2 and u3 then we calculate the element stresses sigma1 sigma2 and sigma3 by making calls to the MATLAB function SpaceTrussElementStress u1U1 U2 U3 U10 U11 U12 u1 0 0 0 00015 00005 00000 106 6 The Space Truss Element u2U4 U5 U6 U10 U11 U12 u2 0 0 0 00015 00005 00000 u3U7 U8 U9 U10 U11 U12 u3 0 0 0 00015 00005 00000 sigma1SpaceTrussElementStressEL1theta1xtheta1ytheta1zu1 sigma1 12806e004 sigma2SpaceTrussElementStressEL2theta2xtheta2ytheta2zu2 sigma2 11662e004 sigma3SpaceTrussElementStressEL3theta3xtheta3ytheta3zu3 sigma3 12806e004 Thus it is clear that the stresses in elements 1 2 and 3 are 12806 MPa com pressive 11662 MPa tensile and 12806 MPa compressive respectively The symmetry in the results regarding elements 1 and 3 is obvious 62 MATLAB Functions Used 107 Problems Problem 61 Consider the space truss shown in Fig 63 The supports at nodes 1 2 3 and 4 are ballandsocket joints allowing rotation but no translation Given E 200 GPa A 0003 m2 P1 15 kN and P2 20 kN determine 1 the global stiffness matrix for the structure 2 the displacements at node 5 3 the reactions at nodes 1 2 3 and 4 4 the stress in each element 5 Z X P2 P1 Y 1 4 2 3 4 m 3 m 3 m 3 m 5 m Fig 63 Space Truss with Four Elements for Problem 61 7 The Beam Element 71 Basic Equations The beam element is a twodimensional finite element where the local and global coordinates coincide It is characterized by linear shape functions The beam element has modulus of elasticity E moment of inertia I and length L Each beam element has two nodes and is assumed to be horizontal as shown in Fig 71 In this case the element stiffness matrix is given by the following matrix assuming axial deformation is neglected see 1 k EI L3 12 6L 12 6L 6L 4L2 6L 2L2 12 6L 12 6L 6L 2L2 6L 4L2 71 E I i j Y L X x Fig 71 The Beam Element It is clear that the beam element has four degrees of freedom two at each node a transverse displacement and a rotation The sign convention used is that the displacement is positive if it points upwards and the rotation is positive if it is counterclockwise Consequently for a structure with n nodes the global stiffness matrix K will be of size 2 n 2 n since we have two degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function BeamAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples 110 7 The Beam Element Once the global stiffness matrix K is obtained we have the following structure equation KU F 72 where U is the global nodal displacement vector and F is the global nodal force vectorAt this step the boundary conditions are applied manually to the vectors U and F Then the matrix 72 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the nodal force vector is obtained for each element as follows f k u 73 where f is the 4 1 nodal force vector in the element and u is the 4 1 element displacement vector The first and second elements in each vector u are the transverse displacement and rotation respectively at the first node while the third and fourth elements in each vector u are the transverse displacement and rotation respectively at the second node 72 MATLAB Functions Used The five MATLAB functions used for the beam element are BeamElementStiffnessE I L This function calculates the element stiffness matrix foreachbeamelementwithmodulusofelasticityEmomentofinertia IandlengthL It returns the 4 4 element stiffness matrix k BeamAssembleK k i j This function assembles the element stiffness matrix k of the beam element joining nodes i and j into the global stiffness matrix K It returns the 2n 2n global stiffness matrix K every time an element is assembled BeamElementForcesk u This function calculates the element force vector using the element stiffness matrix k and the element displacement vector u It returns the 4 1 element force vector f BeamElementShearDiagramf L This function plots the shear force diagram for the element with nodal force vector f and length L BeamElementMomentDiagramf L This function plots the bending moment diagram for the element with nodal force vector f and length L The following is a listing of the MATLAB source code for each function 72 MATLAB Functions Used 111 function y BeamElementStiffnessEIL BeamElementStiffness This function returns the element stiffness matrix for a beam element with modulus of elasticity E moment of inertia I and length L The size of the element stiffness matrix is 4 x 4 y EILLL 12 6L 12 6L 6L 4LL 6L 2LL 12 6L 12 6L 6L 2LL 6L 4LL function y BeamAssembleKkij BeamAssemble This function assembles the element stiffness matrix k of the beam element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K2i12i1 K2i12i1 K11 K2i12i K2i12i K12 K2i12j1 K2i12j1 K13 K2i12j K2i12j K14 K2i2i1 K2i2i1 K21 K2i2i K2i2i K22 K2i2j1 K2i2j1 K23 K2i2j K2i2j K24 K2j12i1 K2j12i1 K31 K2j12i K2j12i K32 K2j12j1 K2j12j1 K33 K2j12j K2j12j K34 K2j2i1 K2j2i1 K41 K2j2i K2j2i K42 K2j2j1 K2j2j1 K43 K2j2j K2j2j K44 y K function y BeamElementForcesku BeamElementForces This function returns the element nodal force vector given the element stiffness matrix k and the element nodal displacement vector u y k u function y BeamElementShearDiagramf L BeamElementShearDiagram This function plots the shear force diagram for the beam element with nodal force vector f and length L x 0 L z f1 f3 hold on titleShear Force Diagram plotxz y1 0 0 plotxy1k 112 7 The Beam Element function y BeamElementMomentDiagramf L BeamElementMomentDiagram This function plots the bending moment diagram for the beam element with nodal force vector f and length L x 0 L z f2 f4 hold on titleBending Moment Diagram plotxz y1 0 0 plotxy1k Example 71 Consider the beam shown in Fig 72 Given E 210 GPa I 60 106 m4 P 20 kN and L 2 m determine 1 the global stiffness matrix for the structure 2 the vertical displacement at node 2 3 the rotations at nodes 2 and 3 4 the reactions at nodes 1 and 3 5 the forces shears and moments in each element 6 the shear force diagram for each element 7 the bending moment diagram for each element P L L 1 2 3 Fig 72 Beam With Two Elements for Example 71 Solution Use the six steps outlined in Chap 1 to solve this problem using the beam element Step 1 Discretizing the Domain We will put a node node 2 at the location of the concentrated force so that we may determine the required quantities displacement rotation shear moment at that 72 MATLAB Functions Used 113 pointAlternatively we can consider the structure composed of one beam element and two nodes only and use equivalent nodal forces to account for the concentrated load However it is required to find the vertical displacement under the concentrated load Furthermore the method of equivalent nodal forces will be illustrated for a different problem in Example 72 Therefore the domain is subdivided into two elements and three nodes The units used in the MATLAB calculations are kN and meter Table 71 shows the element connectivity for this example Table 71 Element Connectivity for Example 71 Element Number Node i Node j 1 1 2 2 2 3 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function BeamElementStiffness Each matrix has size 4 4 E210e6 E 210000000 I60e6 I 60000e005 L2 L 2 k1BeamElementStiffnessEIL k1 18900 18900 18900 18900 18900 25200 18900 12600 18900 18900 18900 18900 18900 12600 18900 25200 114 7 The Beam Element k2BeamElementStiffnessEIL k2 18900 18900 18900 18900 18900 25200 18900 12600 18900 18900 18900 18900 18900 12600 18900 25200 Step 3 Assembling the Global Stiffness Matrix Since the structure has three nodes the size of the global stiffness matrix is 6 6 Therefore to obtain K we first set up a zero matrix of size 6 6 then make two calls to the MATLAB function BeamAssemble since we have two beam elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros66 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KBeamAssembleKk112 K 18900 18900 18900 18900 0 0 18900 25200 18900 12600 0 0 18900 18900 18900 18900 0 0 18900 12600 18900 25200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 72 MATLAB Functions Used 115 KBeamAssembleKk223 K 18900 18900 18900 18900 0 0 18900 25200 18900 12600 0 0 18900 18900 37800 0 18900 18900 18900 12600 0 50400 18900 12600 0 0 18900 18900 18900 18900 0 0 18900 12600 18900 25200 Step 4 Applying the Boundary Conditions The matrix 72 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 103 189 189 189 189 0 0 189 252 189 126 0 0 189 189 378 0 189 189 189 126 0 504 189 126 0 0 189 189 189 189 0 0 189 126 189 252 U1y φ1 U2y φ2 U3y φ3 F1y M1 F2y M2 F3y M3 74 The boundary conditions for this problem are given as U1y φ1 0 F2y 20 M2 0 U3y 0 M3 0 75 Inserting the above conditions into 74 we obtain 103 189 189 189 189 0 0 189 252 189 126 0 0 189 189 378 0 189 189 189 126 0 504 189 126 0 0 189 189 189 189 0 0 189 126 189 252 0 0 U2y φ2 0 φ3 F1y M1 20 0 F3y 0 76 Step 5 Solving the Equations Solving the system of equations in 76 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 76 by extracting the submatrices in rows 3 to 4 and columns 3 to 4 rows 3 to 4 and column 6 row 6 and columns 3 to 4 and row 6 and column 6 Therefore we obtain 116 7 The Beam Element 103 378 0 189 0 504 126 189 126 252 U2y φ2 φ3 20 0 0 77 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3434 K346 K634 K66 k 37800 0 18900 0 50400 12600 18900 12600 25200 f20 0 0 f 20 0 0 ukf u 10e003 09259 01984 07937 It is now clear that the vertical displacement at node 2 is 09259 m downward while the rotations at nodes 2 and 3 are 01984 rad clockwise and 07937 rad coun terclockwise respectively Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 3 and the forces shears and moments in each beam element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F 72 MATLAB Functions Used 117 U0 0 u1 u2 0 u3 U 10e003 0 0 09259 01984 0 07937 FKU F 137500 150000 200000 0 62500 00000 Thus the reactions at node 1 are a vertical force of 1375 kN upward and a moment of 15 kNm counterclockwise while the reaction at node 3 is a vertical force of 625 kN upward It is clear that force equilibrium is satisfied Next we set up the element nodal displacement vectors u1 and u2 then we calculate the element force vectors f1 and f2 by making calls to the MATLAB function BeamElementForces u1U1 U2 U3 U4 u1 10e003 0 0 09259 01984 u2U3 U4 U5 U6 u2 10e003 118 7 The Beam Element 09259 01984 0 07937 f1BeamElementForcesk1u1 f1 137500 150000 137500 125000 f2BeamElementForcesk2u2 f2 62500 125000 62500 00000 Thus the shear force and bending moment at each end node of each element are given above Element 1 has a shear force of 1375 kN and a bending moment of 15 kNm at its left end while it has a shear force of 1375 kN and a bending moment of 125 kNm at its right end Element 2 has a shear force of 625 kN and a bending moment of 125 kNm at its left end while it has a shear force of 625 kN and a bending moment of 0 kNm at its right end Obviously the hinge at the right end has zero moment FinallywecalltheMATLABfunctionsBeamElementShearDiagramandBeamEle mentMomentDiagram to draw the shear force diagram and bending moment diagram respectively for each element This process is illustrated below Example 72 Consider the beam shown in Fig 77 Given E 210 GPa I 5 106 m4 and w 7 kNm determine 1 the global stiffness matrix for the structure 2 the rotations at nodes 1 2 and 3 3 the reactions at nodes 1 2 3 and 4 4 the forces shears and moments in each element 5 the shear force diagram for each element 6 the bending moment diagram for each element 72 MATLAB Functions Used 119 BeamElementShearDiagramf1L Fig 73 Shear Force Diagram for Element 1 BeamElementShearDiagramf2L Fig 74 Shear Force Diagram for Element 2 120 7 The Beam Element BeamElementMomentDiagramf1L Fig 75 Bending Moment Diagram for Element 1 BeamElementMomentDiagramf2L Fig 76 Bending Moment Diagram for Element 2 72 MATLAB Functions Used 121 3 m w 4 1 2 3 2 m 4 m Fig 77 Beam with Distributed Load for Example 72 Solution Use the six steps outlined in Chap 1 to solve this problem using the beam elementWe need first to replace the distributed loading on element 2 by equivalent nodal loads This is performed as follows for element 2 with a uniformly distributed load The resulting beam with equivalent nodal loads is shown in Fig 78 Table 72 shows the element connectivity for this example p2 wL 2 wL2 12 wL 2 wL2 12 14 kN 9333 kNm 14 kN 9333 kNm 78 3 m 4 1 2 3 933 kNm 14 kN 14 kN 933 kNm 2 m 4 m Fig 78 Equivalent nodal loads for example 72 Table 72 Element Connectivity for Example 72 Element Number Node i Node j 1 1 2 2 2 3 3 3 4 Step 1 Discretizing the Domain The domain is already subdivided into three elements and four nodes The units used in the MATLAB calculations are kN and meter 122 7 The Beam Element Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices k1 k2 and k3 are obtained by making calls to the MATLAB function BeamElementStiffness Each matrix has size 4 4 E210e6 E 210000000 I5e6 I 50000e006 L13 L1 3 L24 L2 4 L32 L3 2 k1BeamElementStiffnessEIL1 k1 10e003 04667 07000 04667 07000 07000 14000 07000 07000 04667 07000 04667 07000 07000 07000 07000 14000 72 MATLAB Functions Used 123 k2BeamElementStiffnessEIL2 k2 10e003 01969 03937 01969 03937 03937 10500 03937 05250 01969 03937 01969 03937 03937 05250 03937 10500 k3BeamElementStiffnessEIL3 k3 1575 1575 1575 1575 1575 2100 1575 1050 1575 1575 1575 1575 1575 1050 1575 2100 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 8 8 Therefore to obtain K we first set up a zero matrix of size 8 8 then make three calls to the MATLAB function BeamAssemble since we have three beam elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros88 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 124 7 The Beam Element KBeamAssembleKk112 K 10e003 Columns 1 through 7 04667 07000 04667 07000 0 0 0 07000 14000 07000 07000 0 0 0 04667 07000 04667 07000 0 0 0 07000 07000 07000 14000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Column 8 0 0 0 0 0 0 0 0 KBeamAssembleKk223 K 10e003 Columns 1 through 7 04667 07000 04667 07000 0 0 0 07000 14000 07000 07000 0 0 0 04667 07000 06635 03063 01969 03937 0 07000 07000 03063 24500 03937 05250 0 0 0 01969 03937 01969 03937 0 0 0 03937 05250 03937 10500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 72 MATLAB Functions Used 125 Column 8 0 0 0 0 0 0 0 0 KBeamAssembleKk334 K 10e003 Columns 1 through 7 04667 07000 04667 07000 0 0 0 07000 14000 07000 07000 0 0 0 04667 07000 06635 03063 01969 03937 0 07000 07000 03063 24500 03937 05250 0 0 0 01969 03937 17719 11812 15750 0 0 03937 05250 11812 31500 15750 0 0 0 0 15750 15750 15750 0 0 0 0 15750 10500 15750 Column 8 0 0 0 0 15750 10500 15750 21000 Step 4 Applying the Boundary Conditions The matrix 72 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step Note that we only show the numbers to two decimal places although the MATLAB calculations are performed using at least four decimal places 126 7 The Beam Element 103 047 070 047 070 0 0 0 0 070 140 070 070 0 0 0 0 047 070 066 031 020 039 0 0 070 070 031 245 039 053 0 0 0 0 020 039 177 118 158 158 0 0 039 053 118 315 158 105 0 0 0 0 158 158 158 158 0 0 0 0 158 105 158 210 U1y φ1 U2y φ2 U3y φ3 U4y φ4 F1y M1 F2y M2 F3y M3 F4y M4 79 The boundary conditions for this problem are given as U1y M1 U2y U3y U4y φ4 0 M2 9333 M3 9333 710 Inserting the above conditions into 79 we obtain 103 047 070 047 070 0 0 0 0 070 140 070 070 0 0 0 0 047 070 066 031 020 039 0 0 070 070 031 245 039 053 0 0 0 0 020 039 177 118 158 158 0 0 039 053 118 315 158 105 0 0 0 0 158 158 158 158 0 0 0 0 158 105 158 210 0 φ1 0 φ2 0 φ3 0 0 F1y 0 F2y 9333 F3y 9333 F4y M4 711 72 MATLAB Functions Used 127 Step 5 Solving the Equations Solving the system of equations in 711 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 711 by extracting the submatrices scalars in this case in rows 2 4 and 6 and columns 2 4 and 6Therefore we obtain 103 140 070 0 070 245 053 0 053 315 φ1 φ2 φ3 0 9333 9333 712 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK22 K24 K26 K42 K44 K46 K62 K64 K66 k 1400 700 0 700 2450 525 0 525 3150 f0 9333 9333 f 0 93330 93330 ukf u 00027 00054 00039 It is now clear that the rotations at nodes 1 2 and 3 are 00027 rad counterclock wise 00054 rad clockwise and 00039 rad counterclockwise respectively 128 7 The Beam Element Step 6 Postprocessing In this step we obtain the reactions at nodes 1 2 3 and 4 and the forces shears and moments in each beam element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U 0 u1 0 u2 0 u3 0 0 U 0 00027 0 00054 0 00039 0 0 F KU F 18937 00000 12850 93330 66954 93330 60867 40578 Thus the vertical reactions at nodes 1 2 3 and 4 are vertical forces of 18937 kN downward 12850 kN upward 66954 kN upward and 60867 kN downward respectively The moment at the fixed support node 4 is 40578 kNm counter clockwise It is clear that force equilibrium is satisfied Next we set up the ele ment nodal displacement vectors u1 u2 and u3 then we calculate the element force vectors f1 f2 and f3 by making calls to the MATLAB function BeamElement Forces 72 MATLAB Functions Used 129 u1U1 U2 U3 U4 u1 0 00027 0 00054 u2U3 U4 U5 U6 u2 0 00054 0 00039 u3 U5 U6 U7 U8 u3 0 00039 0 0 f1BeamElementForcesk1u1 f1 18937 00000 18937 56810 f2BeamElementForcesk2u2 f2 06087 36520 06087 12173 130 7 The Beam Element f3BeamElementForcesk3u3 f3 60867 81157 60867 40578 Note that the forces for element 2 need to be modified because of the distributed load In order to obtain the correct forces for element 2 we need to subtract from f2 the vector of equivalent nodal loads given in 78 This is performed using MATLAB as follows f2f214 9333 14 9333 f2 133913 56810 146087 81157 Therefore the forces for each element are given above Element 1 has a shear force of 18937 kN and a bending moment of 0 kNm at its left end while it has a shear force of 18937 kN and a bending moment of 56810 kNm at its right end Element 2 has a shear force of 133913 kN and a bending moment of 56810 kNm at its left end while it has a shear force of 146087 kN and a bending moment of 81157 kNm at its right end Element 3 has a shear force of 60867 kN and a bending moment of 81157 kNm at its left end while it has a shear force of 60867 kN and a bending moment of 40578 kNm at its right end Obviously the roller at the left end has zero moment Finally we call the MATLAB functions BeamElementShearDiagram and Beam ElementMomentDiagram to draw the shear force diagram and bending moment diagram respectively for each element This process is illustrated below Problems Problem 71 Consider the beam shown in Fig 715 Given E 200 GPa I 70105 m4 and M 15 kNm determine 1 the global stiffness matrix for the structure 2 the rotations at nodes 1 2 and 3 3 the reactions at nodes 1 2 and 3 4 the forces shears and moments in each element 5 the shear force diagram for each element 6 the bending moment diagram for each element 72 MATLAB Functions Used 131 BeamElementShearDiagramf1L1 Fig 79 Shear Force Diagram for Element 1 BeamElementShearDiagramf2L2 Fig 710 Shear Force Diagram for Element 2 132 7 The Beam Element BeamElementShearDiagramf3L3 Fig 711 Shear Force Diagram for Element 3 BeamElementMomentDiagramf1L1 Fig 712 Bending Moment Diagram for Element 1 72 MATLAB Functions Used 133 BeamElementMomentDiagramf2L2 Fig 713 Bending Moment Diagram for Element 2 BeamElementMomentDiagramf3L3 Fig 714 Bending Moment Diagram for Element 3 134 7 The Beam Element M 3 1 2 35 m 2 m Fig 715 Beam with Two Elements for Problem 71 Problem 72 Consider the beam shown in Fig 716 Do not put a node at the location of the concen trated load but use the method of equivalent nodal forces for both the distributed load and the concentrated load Given E 210 GPa and I 50 106 m4 determine 1 the global stiffness matrix for the structure 2 the rotations at nodes 2 3 and 4 3 the reactions at nodes 1 2 3 and 4 4 the forces shears and moments in each element 5 the shear force diagram for each element 6 the bending moment diagram for each element 3 m 3 4 1 2 10 kNm 30 kN 2 m 2 m 3 m Fig 716 Beam with Distributed Load for Problem 72 Problem 73 Consider the beam with a spring element as shown in Fig 717 Given E 70 GPa I 40 106 m4 and k 5000 kNm determine 1 the global stiffness matrix for the structure 2 the rotations at nodes 2 and 3 3 the reactions at nodes 1 3 and 4 4 the forces shears and moments in each beam element 5 the force in the spring element 72 MATLAB Functions Used 135 6 the shear force diagram for each beam element 7 the bending moment diagram for each beam element E I E I 4 3 m 10 kN 3 1 2 3 m Fig 717 Beam with a Spring for Problem 73 The plane frame element is a twodimensional finite element with both local and global coordinates The plane frame element has modulus of elasticity E moment of inertia I crosssectional area A and length L Each plane frame element has two nodes and is inclined with an angle θ measured counterclockwise from the positive global X axis as shown in Fig 81 Let C cosθ and S sinθ In this case the element stiffness matrix is given by the following matrix including axial deformation see 1 and 18 k EL AC2 121L2 S2 A 121L2CS 61L S AC2 121L2 S2 A 121L2CS 61L S A 121L2CS AS2 121L2 C2 61L C A 121L2CS AS2 121L2 C2 61L C 61L S 41 61L S 61L C 21 AC2 121L2 S2 A 121L2CS 61L S AC2 121L2 S2 A 121L2CS 61L S A 121L2CS AS2 121L2 C2 61L C A 121L2CS AS2 121L2 C2 61L C 61L S 21 61L S 61L C 41 It is clear that the plane frame element has six degrees of freedom three at each node two displacements and a rotation The sign convention used is that displacements are positive if they point upwards and rotations are positive if they are counterclockwise Consequently for a structure with n nodes the global stiffness matrix K will be of size 3n 3n since we have three degrees of freedom at each node 138 8 The Plane Frame Element Y y L x j i X θ Fig 81 The Plane Frame Element The global stiffness matrix K is assembled by making calls to the MATLAB function PlaneFrameAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F 82 where U is the global nodal displacement vector and F is the global nodal force vectorAt this step the boundary conditions are applied manually to the vectors U and F Then the matrix 82 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the nodal force vector is obtained for each element as follows f kR u 83 where f is the 6 1 nodal force vector in the element and u is the 6 1 element displacement vector The matrices k and R are given by the following k EA L 0 0 EA L 0 0 0 12EI L3 6EI L2 0 12EI L3 6EI L2 0 6EI L2 4EI L 0 6EI L2 2EI L EA L 0 0 EA L 0 0 0 12EI L3 6EI L2 0 12EI L3 6EI L2 0 6EI L2 2EI L 0 6EI L2 4EI L 84 R C S 0 0 0 0 S C 0 0 0 0 0 0 1 0 0 0 0 0 0 C S 0 0 0 0 S C 0 0 0 0 0 0 1 85 82 MATLAB Functions Used 139 The first and second elements in each vector u are the two displacements while the third element is the rotation respectively at the first node while the fourth and fifth elements in each vector are the two displacements while the sixth element is the rotation respectively at the second node If there is an inclined support at one of the nodes of the plane frame then the global stiffness matrix needs to be modified using the following equation Knew TKoldTT 86 where T is a 3n 3n transformation matrix that is obtained by making a call to the MATLAB function PlaneFrameInclinedSupport The inclined support in a plane frame is handled in the same way it is handled in a plane truss except that the size of the transformation matrix is now 3n 3n instead of 2n 2n The inclined support is assumed to be at node i with an angle of inclination alpha as shown in Fig 82 α x x Fig 82 Inclined Support in a Plane Frame 82 MATLAB Functions Used The eight MATLAB functions used for the plane frame element are PlaneFrameElementLengthx1 y1 x2 y2 This function returns the element length given the coordinates of the first node x1 y1 and the coordinates of the second node x2 y2 PlaneFrameElementStiffnessE A I L theta This function calculates the element stiffness matrix for each plane frame element with modulus of elasticity E cross sectional area A moment of inertia I and length L It returns the 6 6 element stiffness matrix k PlaneFrameAssembleK k i j This function assembles the element stiffness matrix k of the plane frame element joining nodes i and j into the global stiffness matrix K It returns the 3n 3n global stiffness matrix K every time an element is assembled 140 8 The Plane Frame Element PlaneFrameElementForcesE A I Ltheta uThisfunctioncalculatestheelement force vector using the modulus of elasticity E crosssectional area A moment of inertia I length L and the element displacement vector u It returns the 61 element force vector f PlaneFrameElementAxialDiagramf L This function plots the axial force diagram for the element with nodal force vector f and length L PlaneFrameElementShearDiagramf L This function plots the shear force dia gram for the element with nodal force vector f and length L PlaneFrameElementMomentDiagramf L This function plots the bending mo ment diagram for the element with nodal force vector f and length L PlaneFrameInclinedSupportT i alpha This function calculates the transforma tion matrix of the inclined support using the node number i of the inclined support and the angle of inclination alpha in degrees It returns the 3n 3n transformation matrix The following is a listing of the MATLAB source code for each function function y PlaneFrameElementLengthx1y1x2y2 PlaneFrameElementLength This function returns the length of the plane frame element whose first node has coordinates x1y1 and second node has coordinates x2y2 y sqrtx2x1x2x1 y2y1y2y1 function y PlaneFrameElementStiffnessEAILtheta PlaneFrameElementStiffness This function returns the element stiffness matrix for a plane frame element with modulus of elasticity E crosssectional area A moment of inertia I length L and angle theta in degrees The size of the element stiffness matrix is 6 x 6 x thetapi180 C cosx S sinx w1 ACC 12ISSLL w2 ASS 12ICCLL w3 A12ILLCS w4 6ISL w5 6ICL y ELw1 w3 w4 w1 w3 w4 w3 w2 w5 w3 w2 w5 w4 w5 4I w4 w5 2I w1 w3 w4 w1 w3 w4 w3 w2 w5 w3 w2 w5 w4 w5 2I w4 w5 4I 82 MATLAB Functions Used 141 function y PlaneFrameAssembleKkij PlaneFrameAssemble This function assembles the element stiffness matrix k of the plane frame element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K3i23i2 K3i23i2 k11 K3i23i1 K3i23i1 k12 K3i23i K3i23i k13 K3i23j2 K3i23j2 k14 K3i23j1 K3i23j1 k15 K3i23j K3i23j k16 K3i13i2 K3i13i2 k21 K3i13i1 K3i13i1 k22 K3i13i K3i13i k23 K3i13j2 K3i13j2 k24 K3i13j1 K3i13j1 k25 K3i13j K3i13j k26 K3i3i2 K3i3i2 k31 K3i3i1 K3i3i1 k32 K3i3i K3i3i k33 K3i3j2 K3i3j2 k34 K3i3j1 K3i3j1 k35 K3i3j K3i3j k36 K3j23i2 K3j23i2 k41 K3j23i1 K3j23i1 k42 K3j23i K3j23i k43 K3j23j2 K3j23j2 k44 K3j23j1 K3j23j1 k45 K3j23j K3j23j k46 K3j13i2 K3j13i2 k51 K3j13i1 K3j13i1 k52 K3j13i K3j13i k53 K3j13j2 K3j13j2 k54 K3j13j1 K3j13j1 k55 K3j13j K3j13j k56 K3j3i2 K3j3i2 k61 K3j3i1 K3j3i1 k62 K3j3i K3j3i k63 K3j3j2 K3j3j2 k64 K3j3j1 K3j3j1 k65 K3j3j K3j3j k66 y K function y PlaneFrameElementForcesEAILthetau PlaneFrameElementForces This function returns the element force vector given the modulus of elasticity E the crosssectional area A the moment of inertia I the length L the angle theta in degrees and the element nodal displacement vector u 142 8 The Plane Frame Element x theta pi180 C cosx S sinx w1 EAL w2 12EILLL w3 6EILL w4 4EIL w5 2EIL kprime w1 0 0 w1 0 0 0 w2 w3 0 w2 w3 0 w3 w4 0 w3 w5 w1 0 0 w1 0 0 0 w2 w3 0 w2 w3 0 w3 w5 0 w3 w4 T C S 0 0 0 0 S C 0 0 0 0 0 0 1 0 0 0 0 0 0 C S 0 0 0 0 S C 0 0 0 0 0 0 1 y kprimeT u function y PlaneFrameElementAxialDiagramf L PlaneFrameElementAxialDiagram This function plots the axial force diagram for the plane frame element with nodal force vector f and length L x 0 L z f1 f4 hold on titleAxial Force Diagram plotxz y1 0 0 plotxy1k function y PlaneFrameElementShearDiagramf L PlaneFrameElementShearDiagram This function plots the shear force diagram for the plane frame element with nodal force vector f and length L x 0 L z f2 f5 hold on titleShear Force Diagram plotxz y1 0 0 plotxy1k function y PlaneFrameElementMomentDiagramf L PlaneFrameElementMomentDiagram This function plots the bending moment diagram for the plane frame element with nodal force vector f and length L x 0 L z f3 f6 82 MATLAB Functions Used 143 hold on titleBending Moment Diagram plotxz y1 0 0 plotxy1k function y PlaneFrameInclinedSupportTialpha PlaneFrameInclinedSupport This function calculates the tranformation matrix T of the inclined support at node i with angle of inclination alpha in degrees x alphapi180 T3i23i2 cosx T3i23i1 sinx T3i23i 0 T3i13i2 sinx T3i13i1 cosx T3i13i 0 T3i3i2 0 T3i3i1 0 T3i3i 1 y T Example 81 Consider the plane frame shown in Fig 83 Given E 210 GPa A 2 102 m2 and I 5 105 m4 determine 1 the global stiffness matrix for the structure 2 the displacements and rotations at nodes 2 and 3 3 the reactions at nodes 1 and 4 4 the axial force shear force and bending moment in each element 5 the axial force diagram for each element 6 the shear force diagram for each element 7 the bending moment diagram for each element 4 1 2 3 4 m 3 m 12 kNm 20 kN Fig 83 Plane Frame with Three Elements for Example 81 144 8 The Plane Frame Element Solution Use the six steps outlined in Chap 1 to solve this problem using the plane frame element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into three elements and four nodes The units used in the MATLAB calculations are kN and meter Table 81 shows the element connectivity for this example Table 81 Element Connectivity for Example 81 Element Number Node i Node j 1 1 2 2 2 3 3 3 4 Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices k1 k2 and k3 are obtained by making calls to the MATLAB function PlaneFrameElementStiffness Each matrix has size 6 6 E210e6 E 210000000 A2e2 A 00200 I5e5 I 50000e005 82 MATLAB Functions Used 145 L13 L1 3 L24 L2 4 L33 L3 3 k1PlaneFrameElementStiffnessEAIL190 k1 10e006 00047 00000 00070 00047 00000 00070 00000 14000 00000 00000 14000 00000 00070 00000 00140 00070 00000 00070 00047 00000 00070 00047 00000 00070 00000 14000 00000 00000 14000 00000 00070 00000 00070 00070 00000 00140 k2PlaneFrameElementStiffnessEAIL20 k2 10e006 10500 0 0 10500 0 0 0 00020 00039 0 00020 00039 0 00039 00105 0 00039 00053 10500 0 0 10500 0 0 0 00020 00039 0 00020 00039 0 00039 00053 0 00039 00105 146 8 The Plane Frame Element k3PlaneFrameElementStiffnessEAIL3270 k3 10e006 00047 00000 00070 00047 00000 00070 00000 14000 00000 00000 14000 00000 00070 00000 00140 00070 00000 00070 00047 00000 00070 00047 00000 00070 00000 14000 00000 00000 14000 00000 00070 00000 00070 00070 00000 00140 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 12 12 Therefore to obtain K we first set up a zero matrix of size 12 12 then make three calls to the MATLAB function PlaneFrameAssemble since we have three plane frame elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros1212 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneFrameAssembleKk112 K 10e006 Columns 1 through 7 82 MATLAB Functions Used 147 00047 00000 00070 00047 00000 00070 0 00000 14000 00000 00000 14000 00000 0 00070 00000 00140 00070 00000 00070 0 00047 00000 00070 00047 00000 00070 0 00000 14000 00000 00000 14000 00000 0 00070 00000 00070 00070 00000 00140 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneFrameAssembleKk223 K 10e006 Columns 1 through 7 00047 00000 00070 00047 00000 00070 0 00000 14000 00000 00000 14000 00000 0 00070 00000 00140 00070 00000 00070 0 00047 00000 00070 10547 00000 00070 10500 00000 14000 00000 00000 14020 00039 0 148 8 The Plane Frame Element 00070 00000 00070 00070 00039 00245 0 0 0 0 10500 0 0 10500 0 0 0 0 00020 00039 0 0 0 0 0 00039 00053 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00020 00039 0 0 0 00039 00053 0 0 0 0 0 0 0 0 00020 00039 0 0 0 00039 00105 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneFrameAssembleKk334 K 10e006 Columns 1 through 7 00047 00000 00070 00047 00000 00070 0 00000 14000 00000 00000 14000 00000 0 00070 00000 00140 00070 00000 00070 0 00047 00000 00070 10547 00000 00070 10500 00000 14000 00000 00000 14020 00039 0 00070 00000 00070 00070 00039 00245 0 0 0 0 10500 0 0 10547 0 0 0 0 00020 00039 00000 82 MATLAB Functions Used 149 0 0 0 0 00039 00053 00070 0 0 0 0 0 0 00047 0 0 0 0 0 0 00000 0 0 0 0 0 0 00070 Columns 8 through 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00020 00039 0 0 0 00039 00053 0 0 0 00000 00070 00047 00000 00070 14020 00039 00000 14000 00000 00039 00245 00070 00000 00070 00000 00070 00047 00000 00070 14000 00000 00000 14000 00000 00000 00070 00070 00000 00140 Step 4 Applying the Boundary Conditions The matrix 82 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 103 47 00 70 47 00 70 0 0 0 0 0 0 00 14000 00 00 14000 00 0 0 0 0 0 0 70 00 140 70 00 70 0 0 0 0 0 0 47 00 70 10547 00 70 10500 0 0 0 0 0 00 14000 00 00 14020 39 0 20 39 0 0 0 70 00 70 70 39 245 0 39 53 0 0 0 0 0 0 10500 0 0 10547 00 70 47 00 70 0 0 0 0 20 39 00 14020 39 00 14000 00 0 0 0 0 39 53 70 39 245 70 00 70 0 0 0 0 0 0 47 00 70 47 00 70 0 0 0 0 0 0 00 14000 00 00 14000 00 0 0 0 0 0 0 70 00 70 70 00 140 U1x U1y φ1 U2x U2y φ2 U3x U3y φ3 U4x U4y φ4 F1x F1y M1 F2x F2y M2 F3x F3y M3 F4x F4y M4 87 150 8 The Plane Frame Element The boundary conditions for this problem are given as U1x U1y φ1 U4x U4y φ4 0 F2x 20 F2y M2 F3x F3y 0 M3 12 88 Inserting the above conditions into 87 we obtain 103 47 00 70 47 00 70 0 0 0 0 0 0 00 14000 00 00 14000 00 0 0 0 0 0 0 70 00 140 70 00 70 0 0 0 0 0 0 47 00 70 10547 00 70 10500 0 0 0 0 0 00 14000 00 00 14020 39 0 20 39 0 0 0 70 00 70 70 39 245 0 39 53 0 0 0 0 0 0 10500 0 0 10547 00 70 47 00 70 0 0 0 0 20 39 00 14020 39 00 14000 00 0 0 0 0 39 53 70 39 245 70 00 70 0 0 0 0 0 0 47 00 70 47 00 70 0 0 0 0 0 0 00 14000 00 00 14000 00 0 0 0 0 0 0 70 00 70 70 00 140 0 0 0 U2x U2y φ2 U3x U3y φ3 0 0 0 F1x F1y M1 20 0 0 0 0 12 F4x F4y M4 89 Step 5 Solving the Equations Solving the system of equations in 89 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 89 by extracting the submatrix in rows 4 to 9 and columns 4 to 9 Therefore we obtain 103 10547 00 70 10500 0 0 00 14020 39 0 20 39 70 39 245 0 39 53 10500 0 0 10547 00 70 0 20 39 00 14020 39 0 39 53 70 39 245 U2x U2y φ2 U3x U3y φ3 20 0 0 0 0 12 810 82 MATLAB Functions Used 151 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK4949 k 10e006 10547 00000 00070 10500 0 0 00000 14020 00039 0 00020 00039 00070 00039 00245 0 00039 00053 10500 0 0 10547 00000 00070 0 00020 00039 00000 14020 00039 0 00039 00053 00070 00039 00245 f20 0 0 0 0 12 f 20 0 0 0 0 12 ukf u 00038 00000 00008 00038 00000 00014 It is now clear that the horizontal and vertical displacements at node 2 are 00038 m and 00 m respectively the horizontal and vertical displacements at node 3 are 00038 m and 00 m respectively and the rotations at nodes 2 and 3 are 00008 rad counterclockwise and 00014 rad counterclockwise respectively 152 8 The Plane Frame Element Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 4 and the forces axial forces shears and moments in each plane frame element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U0 0 0 u 0 0 0 U 0 0 0 00038 00000 00008 00038 00000 00014 0 0 0 FKU F 121897 85865 210253 200000 00000 0 00000 0 120000 78103 85865 166286 Thus the horizontal reactions at nodes 1 and 4 are forces of 121897 kN to the right and 78103 kN to the right respectively the vertical reactions at nodes 1 and 4 are forces of 85865 kN upward and 85865 kN downward respectively and the moments at nodes 1 and 4 are moments of 210253 kNm clockwise and 82 MATLAB Functions Used 153 166286 kNm clockwise respectively It is clear that force equilibrium is satisfied Next we set up the element nodal displacement vectors u1 u2 and u3 then we calculate the element force vectors f1 f2 and f3 by making calls to the MATLAB function PlaneFrameElementForces u1U1 U2 U3 U4 U5 U6 u1 0 0 0 00038 00000 00008 u2U4 U5 U6 U7 U8 U9 u2 00038 00000 00008 00038 00000 00014 u3U7 U8 U9 U10 U11 U12 u3 00038 00000 00014 0 0 0 f1PlaneFrameElementForcesEAIL190u1 f1 85865 121897 154 8 The Plane Frame Element 210253 85865 121897 155438 f2PlaneFrameElementForcesEAIL20u2 f2 78103 85865 155438 78103 85865 188023 f3PlaneFrameElementForcesEAIL3270u3 f3 85865 78103 68023 85865 78103 166286 Therefore the forces for each element are given above Element 1 has an axial force of 85865 kN a shear force of 121897 kN and a bending moment of 210253 kNm at its left end while it has an axial force of 85865 kN a shear force of 121897 kN and a bending moment of 155438 kNm at its right end Element 2 has an axial force of 78103 kN a shear force of 85865 kN and a bending moment of 155438 kNm at its left end while it has an axial force of 78103 kN a shear force of 85865 kN and a bending moment of 188023 kNm at its right end Element 3 has an axial force of 85865 kN a shear force of 78103 kN and a bending moment of 68023 kNm at its left end while it has an axial force of 85865 kN a shear force of 78103 kN and a bending moment of 166286 kNm at its right end Finally we call the MATLAB functions PlaneFrameElementAxialDiagram PlaneFrameElementShearDiagram and PlaneFrameElementMomentDiagram to draw the axial force diagram shear force diagram and bending moment diagram respectively for each element This process is illustrated below 82 MATLAB Functions Used 155 PlaneFrameElementAxialDiagramf1L1 Fig 84 Axial Force Diagram for Element 1 PlaneFrameElementAxialDiagramf2L2 Fig 85 Axial Force Diagram for Element 2 156 8 The Plane Frame Element PlaneFrameElementAxialDiagramf3L3 Fig 86 Axial Force Diagram for Element 3 PlaneFrameElementShearDiagramf1L1 Fig 87 Shear Force Diagram for Element 1 82 MATLAB Functions Used 157 PlaneFrameElementShearDiagramf2L2 Fig 88 Shear Force Diagram for Element 2 PlaneFrameElementShearDiagramf3L3 Fig 89 Shear Force Diagram for Element 3 158 8 The Plane Frame Element PlaneFrameElementMomentDiagramf1L1 Fig 810 Bending Moment Diagram for Element 1 PlaneFrameElementMomentDiagramf2L2 Fig 811 Bending Moment Diagram for Element 2 82 MATLAB Functions Used 159 PlaneFrameElementMomentDiagramf3L3 Fig 812 Bending Moment Diagram for Element 3 Example 82 Consider the plane frame shown in Fig 813 Given E 200 GPa A 4 102 m2 and I 1 106 m4 determine 1 the global stiffness matrix for the structure 2 the displacements and rotation at node 2 3 the reactions at nodes 1 and 3 4 the axial force shear force and bending moment in each element 5 the axial force diagram for each element 6 the shear force diagram for each element 7 the bending moment diagram for each element 3 m 2 m 8 kNm 4 m 1 2 3 Fig 813 Plane Frame with Distributed Load for Example 82 160 8 The Plane Frame Element Solution Use the six steps outlined in Chap 1 to solve this problem using the plane frame element We need first to replace the distributed loading on element 2 by equivalent nodal loads This is performed as follows for element 2 with a uniformly distributed load The resulting plane frame with equivalent nodal loads is shown in Fig 814 p2 0 wL 2 wL2 12 0 wL 2 wL2 12 0 16 kN 10667 kNm 0 16 kN 10667 kNm 811 1 2 3 1067 kNm 16 kN 1067 kNm 16 kN 3 m 4 m 2 m Fig 814 Equivalent Nodal Loads for Example 82 Step 1 Discretizing the Domain The domain is already subdivided into two elements and three nodes The units used in the MATLAB calculations are kN and meterTable 82 shows the element connectivity for this example Table 82 Element Connectivity for Example 82 Element Number Node i Node j 1 1 2 2 2 3 82 MATLAB Functions Used 161 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function PlaneFrameElementStiffness Each matrix has size 6 6 E200e6 E 200000000 A4e2 A 00400 I1e6 I 10000e006 L1PlaneFrameElementLength0320 L1 36056 L24 L2 4 theta1360atan32180pi theta1 3036901 theta20 theta2 0 162 8 The Plane Frame Element k1PlaneFrameElementStiffnessEAIL1theta1 k1 10e006 06827 10240 00001 06827 10240 00001 10240 15361 00001 10240 15361 00001 00001 00001 00002 00001 00001 00001 06827 10240 00001 06827 10240 00001 10240 15361 00001 10240 15361 00001 00001 00001 00001 00001 00001 00002 k2PlaneFrameElementStiffnessEAIL2theta2 k2 10e006 20000 0 0 20000 0 0 0 00000 00001 0 00000 00001 0 00001 00002 0 00001 00001 20000 0 0 20000 0 0 0 00000 00001 0 00000 00001 0 00001 00001 0 00001 00002 Step 3 Assembling the Global Stiffness Matrix Since the structure has three nodes the size of the global stiffness matrix is 9 9 Therefore to obtain K we first set up a zero matrix of size 9 9 then make two calls to the MATLAB function PlaneFrameAssemble since we have two plane frame elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros99 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 82 MATLAB Functions Used 163 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneFrameAssembleKk112 K 10e006 Columns 1 through 7 06827 10240 00001 06827 10240 00001 0 10240 15361 00001 10240 15361 00001 0 00001 00001 00002 00001 00001 00001 0 06827 10240 00001 06827 10240 00001 0 10240 15361 00001 10240 15361 00001 0 00001 00001 00001 00001 00001 00002 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KPlaneFrameAssembleKk223 K 10e006 164 8 The Plane Frame Element Columns 1 through 7 06827 10240 00001 06827 10240 00001 0 10240 15361 00001 10240 15361 00001 0 00001 00001 00002 00001 00001 00001 0 06827 10240 00001 26827 10240 00001 20000 10240 15361 00001 10240 15361 00000 0 00001 00001 00001 00001 00000 00004 0 0 0 0 20000 0 0 20000 0 0 0 0 00000 00001 0 0 0 0 0 00001 00001 0 Columns 8 through 9 0 0 0 0 0 0 0 0 00000 00001 00001 00001 0 0 00000 00001 00001 00002 Step 4 Applying the Boundary Conditions The matrix 82 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step Note that we only show the numbers to two decimal places although the MATLAB calculations are performed using at least four decimal places 103 6827 10240 01 6827 10240 01 0 0 0 10240 15361 01 10240 15361 01 0 0 0 01 01 02 01 01 01 0 0 0 6827 10240 01 26827 10240 01 20000 0 0 10240 15361 01 10240 15361 00 0 00 01 01 01 01 01 00 04 0 01 01 0 0 0 20000 0 0 20000 0 0 0 0 0 0 00 01 0 00 01 0 0 0 0 01 01 0 01 02 82 MATLAB Functions Used 165 U1x U1y φ1 U2x U2y φ2 U3x U3y φ3 F1x F1y M1 F2x F2y M2 F3x F3y M3 812 The boundary conditions for this problem are given as U1x U1y φ1 U3x U3y φ3 0 F2x 0 F2y 16 M2 10667 813 Inserting the above conditions into 812 we obtain 103 6827 10240 01 6827 10240 01 0 0 0 10240 15361 01 10240 15361 01 0 0 0 01 01 02 01 01 01 0 0 0 6827 10240 01 26827 10240 01 20000 0 0 10240 15361 01 10240 15361 00 0 00 01 01 01 01 01 00 04 0 01 01 0 0 0 20000 0 0 20000 0 0 0 0 0 0 00 01 0 00 01 0 0 0 0 01 01 0 01 02 0 0 0 U2x U2y φ2 0 0 0 F1x F1y M1 0 16 10667 F3x F3y M3 814 Step 5 Solving the Equations Solving the system of equations in 814 will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition 814 by extracting the submatrix in rows 4 to 6 and columns 4 to 6 Therefore we obtain 166 8 The Plane Frame Element 103 26827 10240 01 10240 15361 00 01 00 04 U2x U2y φ2 0 16 10667 815 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK4646 k 10e006 26827 10240 00001 10240 15361 00000 00001 00000 00004 f0 16 10667 f 0 160000 106670 ukf u 00000 00000 00253 It is now clear that the horizontal and vertical displacements at node 2 are 00000 m and 00000 m respectively both almost zero while the rotation at node 2 is 00253 rad clockwise Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 3 and the forces axial forces shears and moments in each plane frame element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F 82 MATLAB Functions Used 167 U0 0 0 u 0 0 0 U 0 0 0 00000 00000 00253 0 0 0 FKU F 122064 141031 28039 00000 160000 106670 122064 18969 25295 Thus the horizontal and vertical reactions at node 1 are forces of 122064 kN to the left and 141031 kN upward respectively while the horizontal and verti cal reactions at node 3 are forces of 122064 kN to the right and 18969 kN up ward respectively The moments at nodes 1 and 3 are 28039 kNm clockwise and 25295 kNm clockwise respectively It is clear that force equilibrium is satisfied Next we set up the element nodal displacement vectors u1 and u2 then we calcu late the element force vectors f1 and f2 by making calls to the MATLAB function PlaneFrameElementForces u1U1 U2 U3 U4 U5 U6 u1 0 0 0 00000 00000 00253 168 8 The Plane Frame Element u2U4 U5 U6 U7 U8 U9 u2 00000 00000 00253 0 0 0 f1PlaneFrameElementForcesEAIL1theta1u1 f1 185054 23333 28039 185054 23333 56090 f2PlaneFrameElementForcesEAIL2theta2u2 f2 122064 18969 50580 122064 18969 25295 Note that the forces for element 2 need to be modified because of the distributed load In order to obtain the correct forces for element 2 we need to subtract from f2 the vector of equivalent nodal loads given in 811This is performed using MATLAB as follows f2f20 16 10667 0 16 10667 f2 122064 141031 82 MATLAB Functions Used 169 56090 122064 178969 131965 Therefore the forces for each element are given above Element 1 has an ax ial force of 185054 kN a shear force of 23333 kN and a bending moment of 28039 kNm at its left end while it has an axial force of 185054 kN a shear force of 23333 kN and a bending moment of 56090 kNm at its right end Element 2 has an axial force of 122064 kN a shear force of 141031 kN and a bending moment of 56090 kNm at its left end while it has an axial force of 122064 kN a shear force of 178969 kN and a bending moment of 131965 kNm at its right end FinallywecalltheMATLABfunctionsPlaneFrameElementAxialDiagramPlane FrameElementShearDiagram and PlaneFrameElementMomentDiagram to draw the axial force diagram shear force diagram and bending moment diagram respectively for each element This process is illustrated below PlaneFrameElementAxialDiagramf1L1 Fig 815 Axial Force Diagram for Element 1 170 8 The Plane Frame Element PlaneFrameElementAxialDiagramf2L2 Fig 816 Axial Force Diagram for Element 2 PlaneFrameElementShearDiagramf1L1 Fig 817 Shear Force Diagram for Element 1 82 MATLAB Functions Used 171 PlaneFrameElementShearDiagramf2L2 Fig 818 Shear Force Diagram for Element 2 PlaneFrameElementMomentDiagramf1L1 Fig 819 Bending Moment Diagram for Element 1 172 8 The Plane Frame Element PlaneFrameElementMomentDiagramf2L2 Fig 820 Bending Moment Diagram for Element 2 Problems Problem 81 Consider the plane frame shown in Fig 821 Given E 210 GPa A 4102 m2 and I 4 106 m4 determine 1 the global stiffness matrix for the structure 2 the displacements and rotation at node 2 3 the horizontal displacement and rotation at node 3 4 the reactions at nodes 1 and 3 5 the axial force shear force and bending moment in each element 6 the axial force diagram for each element 7 the shear force diagram for each element 8 the bending moment diagram for each element 82 MATLAB Functions Used 173 1 2 3 4 m 4 m 15 kNm 20 kN Fig 821 Plane Frame with Two Elements for Problem 81 Problem 82 Consider the plane frame shown in Fig 822 Given E 210 GPa A 1102 m2 and I 9 105 m4 determine 1 the global stiffness matrix for the structure 2 the displacements and rotations at nodes 2 and 3 3 the reactions at nodes 1 and 4 4 the axial force shear force and bending moment in each element 5 the axial force diagram for each element 6 the shear force diagram for each element 7 the bending moment diagram for each element 4 1 2 3 20 kN 5 kNm 2 m 5 m 2 m 3 m Fig 822 Plane Frame with Distributed Load for Problem 82 Problem 83 Consider the structure composed of a beam and a spring as shown in Fig 823 Given E 70 GPa A 1 102 m2 I 1 105 m4 and k 5000 kNm determine 1 the global stiffness matrix for the structure 2 the displacements and rotation at node 1 174 8 The Plane Frame Element 3 the reactions at nodes 2 and 3 4 the axial force shear force and bending moment in the beam 5 the force in the spring 6 the axial force diagram for the beam 7 the shear force diagram for the beam 8 the bending moment diagram for the beam Hint Use a plane frame element for the beam so as to include axial deformation effects Also use a plane truss element for the spring so as to include the angle of inclination in this case determine values for E and A for the spring using the value of k given and the length of the spring k 1 2 3 10 kN 4 m 3 m Fig 823 Plane Frame with a Spring for Problem 83 9 The Grid Element 91 Basic Equations The grid element is a twodimensional finite element with both local and global coordinates The grid element has modulus of elasticity E shear modulus of elasticity G moment of inertia I torsional constant J and length L Each grid element has two nodes and is inclined with an angle θ measured counterclockwise from the positive global X axis as shown in Fig 91 Let C cosθ and S sinθ In this case the element stiffness matrix is given by the following matrix see 1 and 18 k RT kR 91 where the rotation matrix R and the stiffness matrix k are given by k 12EI L3 0 6EI L2 12EI L3 0 6EI L2 0 GJ L 0 0 GJ L 0 6EI L2 0 4EI L 6EI L2 0 2EI L 12EI L3 0 6EI L2 12EI L3 0 6EI L2 0 GJ L 0 0 GJ L 0 6EI L2 0 2EI L 6EI L2 0 4EI L 92 R 1 0 0 0 0 0 0 C S 0 0 0 0 S C 0 0 0 0 0 0 1 0 0 0 0 0 0 C S 0 0 0 0 S C 93 176 9 The Grid Element j i x Y Z X θ Fig 91 The Grid Element It is clear that the grid element has six degrees of freedom three at each node one displacement and two rotations Consequently for a structure with n nodes the global stiffness matrix K will be of size 3n 3n since we have three degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function GridAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F 94 where U is the global nodal displacement vector and F is the global nodal force vectorAt this step the boundary conditions are applied manually to the vectors U and F Then the matrix 94 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the nodal force vector is obtained for each element as follows f kR u 95 where f is the 6 1 nodal force vector in the element and u is the 6 1 element displacement vector The first element in each vector u is the transverse displacement while the second and third elements are the rotations about the X and Z axes respectively at the first node while the fourth element in each vector u is the transverse displacement and the fifth and sixth elements are the rotations about the X and Z axes respectively at the second node 92 MATLAB Functions Used The four MATLAB functions used for the grid element are GridElementLengthx1 y1 x2 y2 This function returns the element length given the coordinates of the first node x1 y1 and the coordinates of the second node x2 y2 92 MATLAB Functions Used 177 GridElementStiffnessE G I J L theta This function calculates the element stiffness matrix for each grid element with modulus of elasticity E shear modulus of elasticity G moment of inertia I torsional constant J and length L It returns the 6 6 element stiffness matrix k GridAssembleK k i j This function assembles the element stiffness matrix k of the grid element joining nodes i and j into the global stiffness matrix K It returns the 3n 3n global stiffness matrix K every time an element is assembled GridElementForcesE G I J L theta u This function calculates the element force vector using the modulus of elasticity E shear modulus of elasticity G moment of inertia I torsional constant J length L and the element displacement vector u It returns the 6 1 element force vector f The following is a listing of the MATLAB source code for each function function y GridElementLengthx1y1x2y2 GridElementLength This function returns the length of the grid element whose first node has coordinates x1y1 and second node has coordinates x2y2 y sqrtx2x1 x2x1 y2y1 y2y1 function y GridElementStiffnessEGIJLtheta GridElementStiffness This function returns the element stiffness matrix for a grid element with modulus of elasticity E shear modulus of elasticity G moment of inertia I torsional constant J length L and angle theta in degrees The size of the element stiffness matrix is 6 x 6 x thetapi180 C cosx S sinx w1 12EILLL w2 6EILL w3 GJL w4 4EIL w5 2EIL kprime w1 0 w2 w1 0 w2 0 w3 0 0 w3 0 w2 0 w4 w2 0 w5 w1 0 w2 w1 0 w2 0 w3 0 0 w3 0 w2 0 w5 w2 0 w4 R 1 0 0 0 0 0 0 C S 0 0 0 0 S C 0 0 0 0 0 0 1 0 0 0 0 0 0 C S 0 0 0 0 S C y RkprimeR 178 9 The Grid Element function y GridAssembleKkij GridAssemble This function assembles the element stiffness matrix k of the grid element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K3i23i2 K3i23i2 k11 K3i23i1 K3i23i1 k12 K3i23i K3i23i k13 K3i23j2 K3i23j2 k14 K3i23j1 K3i23j1 k15 K3i23j K3i23j k16 K3i13i2 K3i13i2 k21 K3i13i1 K3i13i1 k22 K3i13i K3i13i k23 K3i13j2 K3i13j2 k24 K3i13j1 K3i13j1 k25 K3i13j K3i13j k26 K3i3i2 K3i3i2 k31 K3i3i1 K3i3i1 k32 K3i3i K3i3i k33 K3i3j2 K3i3j2 k34 K3i3j1 K3i3j1 k35 K3i3j K3i3j k36 K3j23i2 K3j23i2 k41 K3j23i1 K3j23i1 k42 K3j23i K3j23i k43 K3j23j2 K3j23j2 k44 K3j23j1 K3j23j1 k45 K3j23j K3j23j k46 K3j13i2 K3j13i2 k51 K3j13i1 K3j13i1 k52 K3j13i K3j13i k53 K3j13j2 K3j13j2 k54 K3j13j1 K3j13j1 k55 K3j13j K3j13j k56 K3j3i2 K3j3i2 k61 K3j3i1 K3j3i1 k62 K3j3i K3j3i k63 K3j3j2 K3j3j2 k64 K3j3j1 K3j3j1 k65 K3j3j K3j3j k66 y K function y GridElementForcesEGIJLthetau GridElementForces This function returns the element force vector given the modulus of elasticity E the shear modulus of elasticity G the moment of inertia I the torsional constant J the length L the angle theta in degrees and the element nodal displacement vector u 92 MATLAB Functions Used 179 x thetapi180 C cosx S sinx w1 12EILLL w2 6EILL w3 GJL w4 4EIL w5 2EIL kprime w1 0 w2 w1 0 w2 0 w3 0 0 w3 0 w2 0 w4 w2 0 w5 w1 0 w2 w1 0 w2 0 w3 0 0 w3 0 w2 0 w5 w2 0 w4 R 1 0 0 0 0 0 0 C S 0 0 0 0 S C 0 0 0 0 0 0 1 0 0 0 0 0 0 C S 0 0 0 0 S C y kprimeR u Example 91 Consider the grid shown in Fig 92 Given E 210 GPa G 84 GPa I 20 105 m4 J 5 105 m4 and P 20 kN determine 1 the global stiffness matrix for the structure 2 the displacement and rotations at node 1 3 the reactions at nodes 2 3 and 4 4 the forces and moments in each element Z P Y X 4 1 2 3 4 m 4 m Fig 92 Grid with Three Elements for Example 91 Solution Use the six steps outlined in Chap 1 to solve this problem using the grid element 180 9 The Grid Element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into three elements and four nodes The units used in the MATLAB calculations are kN and meter Table 91 shows the element connectivity for this example Table 91 Element Connectivity for Example 91 Element Number Node i Node j 1 1 2 2 1 3 3 1 4 Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices k1 k2 and k3 are obtained by making calls to the MATLAB function GridElementStiffness Each matrix has size 6 6 E210e6 E 210000000 G84e6 G 84000000 I20e5 I 20000e004 J5e5 J 50000e005 92 MATLAB Functions Used 181 L14 L1 4 L2GridElementLength0044 L2 56569 L34 L3 4 theta1180 theta1 180 theta218045 theta2 135 theta390 theta3 90 k1GridElementStiffnessEGIJL1theta1 k1 10e004 182 9 The Grid Element 07875 00000 15750 07875 00000 15750 00000 01050 00000 00000 01050 00000 15750 00000 42000 15750 00000 21000 07875 00000 15750 07875 00000 15750 00000 01050 00000 00000 01050 00000 15750 00000 21000 15750 00000 42000 k2GridElementStiffnessEGIJL2theta2 k2 10e004 02784 05568 05568 02784 05568 05568 05568 15220 14478 05568 07053 07796 05568 14478 15220 05568 07796 07053 02784 05568 05568 02784 05568 05568 05568 07053 07796 05568 15220 14478 05568 07796 07053 05568 14478 15220 k3GridElementStiffnessEGIJL3theta3 k3 10e004 07875 15750 00000 07875 15750 00000 15750 42000 00000 15750 21000 00000 00000 00000 01050 00000 00000 01050 07875 15750 00000 07875 15750 00000 15750 21000 00000 15750 42000 00000 00000 00000 01050 00000 00000 01050 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 12 12 Therefore to obtain K we first set up a zero matrix of size 12 12 then make three calls to the MATLAB function GridAssemble since we have three grid elements in the structure Each call to the function will assemble one element The following are the MATLAB commands 92 MATLAB Functions Used 183 Kzeros1212 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KGridAssembleKk112 K 10e004 Columns 1 through 7 07875 00000 15750 07875 00000 15750 0 00000 01050 00000 00000 01050 00000 0 15750 00000 42000 15750 00000 21000 0 07875 00000 15750 07875 00000 15750 0 00000 01050 00000 00000 01050 00000 0 15750 00000 21000 15750 00000 42000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 184 9 The Grid Element 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KGridAssembleKk213 K 10e004 Columns 1 through 7 10659 05568 21318 07875 00000 15750 02784 05568 16270 14478 00000 01050 00000 05568 21318 14478 57220 15750 00000 21000 05568 07875 00000 15750 07875 00000 15750 0 00000 01050 00000 00000 01050 00000 0 15750 00000 21000 15750 00000 42000 0 02784 05568 05568 0 0 0 02784 05568 07053 07796 0 0 0 05568 05568 07796 07053 0 0 0 05568 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 12 05568 05568 0 0 0 07053 07796 0 0 0 07796 07053 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 05568 05568 0 0 0 15220 14478 0 0 0 14478 15220 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 92 MATLAB Functions Used 185 KGridAssembleKk314 K 10e004 Columns 1 through 7 18534 21318 21318 07875 00000 15750 02784 21318 58270 14478 00000 01050 00000 05568 21318 14478 58270 15750 00000 21000 05568 07875 00000 15750 07875 00000 15750 0 00000 01050 00000 00000 01050 00000 0 15750 00000 21000 15750 00000 42000 0 02784 05568 05568 0 0 0 02784 05568 07053 07796 0 0 0 05568 05568 07796 07053 0 0 0 05568 07875 15750 00000 0 0 0 0 15750 21000 00000 0 0 0 0 00000 00000 01050 0 0 0 0 Columns 8 through 12 05568 05568 07875 15750 00000 07053 07796 15750 21000 00000 07796 07053 00000 00000 01050 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 05568 05568 0 0 0 15220 14478 0 0 0 14478 15220 0 0 0 0 0 07875 15750 00000 0 0 15750 42000 00000 0 0 00000 00000 01050 Step 4 Applying the Boundary Conditions The matrix 94 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 186 9 The Grid Element 103 1853 2132 2132 788 00 1575 278 557 557 788 1575 00 2132 5827 1448 00 105 00 557 705 780 1575 2100 00 2132 1448 5827 1575 00 2100 557 780 705 00 00 105 788 00 1575 788 00 1575 0 0 0 0 0 0 00 105 00 00 105 00 0 0 0 0 0 0 1575 00 2100 1575 00 4200 0 0 0 0 0 0 278 557 557 0 0 0 278 557 557 0 0 0 557 705 780 0 0 0 557 1522 1448 0 0 0 557 780 705 0 0 0 557 1448 1522 0 0 0 788 1575 00 0 0 0 0 0 0 788 1575 00 1575 2100 00 0 0 0 0 0 0 1575 4200 00 00 00 105 0 0 0 0 0 0 00 00 105 U1y φ1x φ1z U2y φ2x φ2z U3y φ3x φ3z U4y φ4x φ4z F1y M1x M1z F2y M2x M2z F3y M3x M3z F4y M4x M4z 96 The boundary conditions for this problem are given as F1y 20 M1x M1z 0 U2y φ2x φ2z U3y φ3x φ3z U4y φ4x φ4z 0 97 Inserting the above conditions into 96 we obtain 103 1853 2132 2132 788 00 1575 278 557 557 788 1575 00 2132 5827 1448 00 105 00 557 705 780 1575 2100 00 2132 1448 5827 1575 00 2100 557 780 705 00 00 105 788 00 1575 788 00 1575 0 0 0 0 0 0 00 105 00 00 105 00 0 0 0 0 0 0 1575 00 2100 1575 00 4200 0 0 0 0 0 0 278 557 557 0 0 0 278 557 557 0 0 0 557 705 780 0 0 0 557 1522 1448 0 0 0 557 780 705 0 0 0 557 1448 1522 0 0 0 788 1575 00 0 0 0 0 0 0 788 1575 00 1575 2100 00 0 0 0 0 0 0 1575 4200 00 00 00 105 0 0 0 0 0 0 00 00 105 92 MATLAB Functions Used 187 U1y φ1x φ1z 0 0 0 0 0 0 0 0 0 20 0 0 F2y M2x M2z F3y M3x M3z F4y M4x M4z 98 Step 5 Solving the Equations Solving the system of equations in 98 will be performed by partitioning manu ally and Gaussian elimination with MATLAB First we partition equation 98 by extracting the submatrix in rows 1 to 3 and columns 1 to 3 Therefore we obtain 103 1853 2132 2132 2132 5827 1448 2132 1448 5827 U1y φ1x φ1z 20 0 0 99 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK1313 k 10e004 18534 21318 21318 21318 58270 14478 21318 14478 58270 f20 0 0 f 20 0 0 ukf 188 9 The Grid Element u 00033 00010 00010 It is now clear that the vertical displacement at node 1 is 00033 m and the rota tions at node 1 along the X and Z axes are 00010 rad and 00010 rad respectively The symmetry in the results in this problem is clear Step 6 Postprocessing In this step we obtain the reactions at nodes 2 3 and 4 and the forces and moments in each grid element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F Uu 0 0 0 0 0 0 0 0 0 U 00033 00010 00010 0 0 0 0 0 0 0 0 0 FKU F 200000 00000 00000 107937 10189 317764 15874 40299 92 MATLAB Functions Used 189 40299 107937 317764 10189 Thus the vertical reaction and moments at node 2 are 107937 kN 10189 kNm and 317764 kNm The vertical reaction and moments at node 3 are 15874 kN 40299 kNm and 40299 kNm The vertical reaction and moments at node 4 are 107937 kN 317764 kNm and 10189 kNm It is clear that force equilibrium is satisfied Next we set up the element nodal displacement vectors u1 u2 and u3 then we calculate the element force vectors f1 f2 and f3 by making calls to the MATLAB function GridElementForces u1U1 U2 U3 U4 U5 U6 u1 00033 00010 00010 0 0 0 u2U1 U2 U3 U7 U8 U9 u2 00033 00010 00010 0 0 0 u3U1 U2 U3 U10 U11 U12 u3 00033 00010 00010 0 0 0 190 9 The Grid Element f1GridElementForcesEGIJL1theta1u1 f1 107937 10189 113984 107937 10189 317764 f2GridElementForcesEGIJL2theta2u2 f2 15874 0 146788 15874 0 56992 f3GridElementForcesEGIJL3theta3u3 f3 107937 10189 113984 107937 10189 317764 Therefore the forces for each element are given above Element 1 has a force of 107937 kN and moments of 10189 kNm and 113984 kNm at its left end while it has a force of 107937 kN and moments of 10189 kNm and 317764 kNm at its right end Element 2 has a force of 15874 kN and moments of 0 kNm and 146788 kNm at its left end while it has a force of 15874 kN and moments of 0 kNm and 56992 kNm at its right end Element 3 has a force of 107937 kN and moments of 10189 kNm and 113984 kNm at its left end while it has a force of 107937 kN and moments of 10189 kNm and 317764 kNm at its right end 92 MATLAB Functions Used 191 Problems Problem 91 Consider the grid shown in Fig 93 Given E 210 GPa G 84 GPa I 20 105 m4 and J 5 105 m4 determine 1 the global stiffness matrix for the structure 2 the displacement and rotations at node 1 3 the reactions at nodes 2 and 3 4 the forces and moments in each element Z Y X 1 3 2 4 m 3 m 10 kN 3 m Fig 93 Gird with Two Elements for Problem 91 10 The Space Frame Element 101 Basic Equations The space frame element is a threedimensional finite element with both local and global coordinatesThe space frame element has modulus of elasticity E shear modu lus of elasticity G crosssectional area A moments of inertia Ix and Iy polar moment of inertia J and length L Each space frame element has two nodes and is inclined with angles θXxθY x and θZx measured from the global X Y and Z axes respec tively to the local x axis as shown in Fig 101 In this case the element stiffness matrix is given by the following matrix see 1 and 18 k RT kR 101 where the rotation matrix R and the stiffness matrix k are given by k EA L 0 0 0 0 0 EA L 0 0 0 0 0 0 12EIz L3 0 0 0 6EIz L2 0 12EIz L3 0 0 0 6EIz L2 0 0 12EIy L3 0 6EIy L2 0 0 0 12EIy L3 0 6EIy L2 0 0 0 0 GJ L 0 0 0 0 0 GJ L 0 0 0 0 6EIy L2 0 4EIy L 0 0 0 6EIy L2 0 2EIy L 0 0 6EIz L2 0 0 0 4EIz L 0 6EIz L2 0 0 0 2EIz L EA L 0 0 0 0 0 EA L 0 0 0 0 0 0 12EIz L3 0 0 0 6EIz L2 0 12EIz L3 0 0 0 6EIz L2 0 0 12EIy L3 0 6EIy L2 0 0 0 12EIy L3 0 6EIy L2 0 0 0 0 GJ L 0 0 0 0 0 GJ L 0 0 0 0 6EIy L2 0 2EIy L 0 0 0 6EIy L2 0 4EIy L 0 0 6EIz L2 0 0 0 2EIz L 0 6EIz L2 0 0 0 4EIz L 102 194 10 The Space Frame Element R r 0 0 0 0 r 0 0 0 0 r 0 0 0 0 r 103 where r is the 3 3 matrix of direction cosines given as follows r CXx CY x CZx CXy CY y CZy CXz CY z CZz 104 where CXx cos θXx CY x cos θY x etc L j x Y i Z X Fig 101 The Space Frame Element It is clear that the space frame element has twelve degrees of freedom six at each node three displacements and three rotations Consequently for a structure with n nodes the global stiffness matrix K will be of size 6n6n since we have six degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function SpaceFrameAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F 105 where U is the global nodal displacement vector and F is the global nodal force vectorAt this step the boundary conditions are applied manually to the vectors U and F Then the matrix 105 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the nodal force vector is obtained for each element as follows f kR u 106 where f is the 12 1 nodal force vector in the element and u is the 12 1 element displacement vector 102 MATLAB Functions Used 195 The first second and third elements in each vector u are the three displacements while the fourth fifth and sixth elements are the three rotations respectively at the first node while the seventh eighth and ninth elements in each vector u are the three displacements while the tenth eleventh and twelvth elements are the three rotations respectively at the second node 102 MATLAB Functions Used The ten MATLAB functions used for the space frame element are SpaceFrameElementLengthx1 y1 z1 x2 y2 z2 This function returns the element length given the coordinates of the first node x1 y1 z1 and the coordinates of the second node x2 y2 z2 SpaceFrameElementStiffnessE G A Iy Iz J x1 y1 z1 x2 y2 z2 This function calculates the element stiffness matrix for each space frame element with modulus of elasticity E shear modulus of elasticity G crosssectional area A moments of inertia Ix and Iy polar moment of inertia J coordinates x1 y1 z1 for the first node and coordinates x2 y2 z2 for the second node It returns the 12 12 element stiffness matrix k SpaceFrameAssembleK k i j This function assembles the element stiffness matrix k of the space frame element joining nodes i and j into the global stiffness matrix K It returns the 6n 6n global stiffness matrix K every time an element is assembled SpaceFrameElementForcesE G A Iy Iz J x1 y1 z1 x2 y2 z2 u This function calculates the element force vector using the modulus of elasticity E shear modulus of elasticity G crosssectional area A moments of inertia Ix and Iy polar moment of inertia J coordinates x1 y1 z1 for the first node coordinates x2 y2 z2 for the second node and the element displacement vector u It returns the 12 1 element force vector f SpaceFrameElementAxialDiagramf L This function plots the axial force diagram for the element with nodal force vector f and length L SpaceFrameElementShearZDiagramf L This function plots the shear force along the Z axis diagram for the element with nodal force vector f and length L SpaceFrameElementShearYDiagramf L This function plots the shear force along the Y axis diagram for the element with nodal force vector f and length L SpaceFrameElementTorsionDiagramfLThisfunctionplotsthetorsionalmoment diagram for the element with nodal force vector f and length L 196 10 The Space Frame Element SpaceFrameElementMomentZDiagramf L This function plots the bending mo ment along the Z axis diagram for the element with nodal force vector f and length L SpaceFrameElementMomentYDiagramf L This function plots the bending mo ment along the Y axis diagram for the element with nodal force vector f and length L The following is a listing of the MATLAB source code for each function function y SpaceFrameElementLengthx1y1z1x2y2z2 SpaceFrameElementLength This function returns the length of the space frame element whose first node has coordinates x1y1z1 and second node has coordinates x2y2z2 y sqrtx2x1x2x1 y2y1y2y1 z2z1z2z1 function y SpaceFrameElementStiffnessEGAIyIzJx1y1z1x2y2z2 SpaceFrameElementStiffness This function returns the element stiffness matrix for a space frame element with modulus of elasticity E shear modulus of elasticity G cross sectional area A moments of inertia Iy and Iz torsional constant J coordinates x1y1z1 for the first node and coordinates x2y2z2 for the second node The size of the element stiffness matrix is 12 x 12 L sqrtx2x1x2x1 y2y1y2y1 z2z1z2z1 w1 EAL w2 12EIzLLL w3 6EIzLL w4 4EIzL w5 2EIzL w6 12EIyLLL w7 6EIyLL w8 4EIyL w9 2EIyL w10 GJL kprime w1 0 0 0 0 0 w1 0 0 0 0 0 0 w2 0 0 0 w3 0 w2 0 0 0 w3 0 0 w6 0 w7 0 0 0 w6 0 w7 0 0 0 0 w10 0 0 0 0 0 w10 0 0 0 0 w7 0 w8 0 0 0 w7 0 w9 0 0 w3 0 0 0 w4 0 w3 0 0 0 w5 w1 0 0 0 0 0 w1 0 0 0 0 0 0 w2 0 0 0 w3 0 w2 0 0 0 w3 0 0 w6 0 w7 0 0 0 w6 0 w7 0 102 MATLAB Functions Used 197 0 0 0 w10 0 0 0 0 0 w10 0 0 0 0 w7 0 w9 0 0 0 w7 0 w8 0 0 w3 0 0 0 w5 0 w3 0 0 0 w4 if x1 x2 y1 y2 if z2 z1 Lambda 0 0 1 0 1 0 1 0 0 else Lambda 0 0 1 0 1 0 1 0 0 end else CXx x2x1L CYx y2y1L CZx z2z1L D sqrtCXxCXx CYxCYx CXy CYxD CYy CXxD CZy 0 CXz CXxCZxD CYz CYxCZxD CZz D Lambda CXx CYx CZx CXy CYy CZy CXz CYz CZz end R Lambda zeros3 zeros3 zeros3 zeros3 Lambda zeros3 zeros3 zeros3 zeros3 Lambda zeros3 zeros3 zeros3 zeros3 Lambda y RkprimeR function y SpaceFrameAssembleKkij SpaceFrameAssemble This function assembles the element stiffness matrix k of the space frame element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K6i56i5 K6i56i5 k11 K6i56i4 K6i56i4 k12 K6i56i3 K6i56i3 k13 K6i56i2 K6i56i2 k14 K6i56i1 K6i56i1 k15 K6i56i K6i56i k16 K6i56j5 K6i56j5 k17 K6i56j4 K6i56j4 k18 K6i56j3 K6i56j3 k19 K6i56j2 K6i56j2 k110 K6i56j1 K6i56j1 k111 K6i56j K6i56j k112 K6i46i5 K6i46i5 k21 K6i46i4 K6i46i4 k22 K6i46i3 K6i46i3 k23 K6i46i2 K6i46i2 k24 198 10 The Space Frame Element K6i46i1 K6i46i1 k25 K6i46i K6i46i k26 K6i46j5 K6i46j5 k27 K6i46j4 K6i46j4 k28 K6i46j3 K6i46j3 k29 K6i46j2 K6i46j2 k210 K6i46j1 K6i46j1 k211 K6i46j K6i46j k212 K6i36i5 K6i36i5 k31 K6i36i4 K6i36i4 k32 K6i36i3 K6i36i3 k33 K6i36i2 K6i36i2 k34 K6i36i1 K6i36i1 k35 K6i36i K6i36i k36 K6i36j5 K6i36j5 k37 K6i36j4 K6i36j4 k38 K6i36j3 K6i36j3 k39 K6i36j2 K6i36j2 k310 K6i36j1 K6i36j1 k311 K6i36j K6i36j k312 K6i26i5 K6i26i5 k41 K6i26i4 K6i26i4 k42 K6i26i3 K6i26i3 k43 K6i26i2 K6i26i2 k44 K6i26i1 K6i26i1 k45 K6i26i K6i26i k46 K6i26j5 K6i26j5 k47 K6i26j4 K6i26j4 k48 K6i26j3 K6i26j3 k49 K6i26j2 K6i26j2 k410 K6i26j1 K6i26j1 k411 K6i26j K6i26j k412 K6i16i5 K6i16i5 k51 K6i16i4 K6i16i4 k52 K6i16i3 K6i16i3 k53 K6i16i2 K6i16i2 k54 K6i16i1 K6i16i1 k55 K6i16i K6i16i k56 K6i16j5 K6i16j5 k57 K6i16j4 K6i16j4 k58 K6i16j3 K6i16j3 k59 K6i16j2 K6i16j2 k510 K6i16j1 K6i16j1 k511 K6i16j K6i16j k512 K6i6i5 K6i6i5 k61 K6i6i4 K6i6i4 k62 K6i6i3 K6i6i3 k63 K6i6i2 K6i6i2 k64 K6i6i1 K6i6i1 k65 K6i6i K6i6i k66 K6i6j5 K6i6j5 k67 K6i6j4 K6i6j4 k68 K6i6j3 K6i6j3 k69 102 MATLAB Functions Used 199 K6i6j2 K6i6j2 k610 K6i6j1 K6i6j1 k611 K6i6j K6i6j k612 K6j56i5 K6j56i5 k71 K6j56i4 K6j56i4 k72 K6j56i3 K6j56i3 k73 K6j56i2 K6j56i2 k74 K6j56i1 K6j56i1 k75 K6j56i K6j56i k76 K6j56j5 K6j56j5 k77 K6j56j4 K6j56j4 k78 K6j56j3 K6j56j3 k79 K6j56j2 K6j56j2 k710 K6j56j1 K6j56j1 k711 K6j56j K6j56j k712 K6j46i5 K6j46i5 k81 K6j46i4 K6j46i4 k82 K6j46i3 K6j46i3 k83 K6j46i2 K6j46i2 k84 K6j46i1 K6j46i1 k85 K6j46i K6j46i k86 K6j46j5 K6j46j5 k87 K6j46j4 K6j46j4 k88 K6j46j3 K6j46j3 k89 K6j46j2 K6j46j2 k810 K6j46j1 K6j46j1 k811 K6j46j K6j46j k812 K6j36i5 K6j36i5 k91 K6j36i4 K6j36i4 k92 K6j36i3 K6j36i3 k93 K6j36i2 K6j36i2 k94 K6j36i1 K6j36i1 k95 K6j36i K6j36i k96 K6j36j5 K6j36j5 k97 K6j36j4 K6j36j4 k98 K6j36j3 K6j36j3 k99 K6j36j2 K6j36j2 k910 K6j36j1 K6j36j1 k911 K6j36j K6j36j k912 K6j26i5 K6j26i5 k101 K6j26i4 K6j26i4 k102 K6j26i3 K6j26i3 k103 K6j26i2 K6j26i2 k104 K6j26i1 K6j26i1 k105 K6j26i K6j26i k106 K6j26j5 K6j26j5 k107 K6j26j4 K6j26j4 k108 K6j26j3 K6j26j3 k109 K6j26j2 K6j26j2 k1010 K6j26j1 K6j26j1 k1011 K6j26j K6j26j k1012 K6j16i5 K6j16i5 k111 K6j16i4 K6j16i4 k112 K6j16i3 K6j16i3 k113 K6j16i2 K6j16i2 k114 200 10 The Space Frame Element K6j16i1 K6j16i1 k115 K6j16i K6j16i k116 K6j16j5 K6j16j5 k117 K6j16j4 K6j16j4 k118 K6j16j3 K6j16j3 k119 K6j16j2 K6j16j2 k1110 K6j16j1 K6j16j1 k1111 K6j16j K6j16j k1112 K6j6i5 K6j6i5 k121 K6j6i4 K6j6i4 k122 K6j6i3 K6j6i3 k123 K6j6i2 K6j6i2 k124 K6j6i1 K6j6i1 k125 K6j6i K6j6i k126 K6j6j5 K6j6j5 k127 K6j6j4 K6j6j4 k128 K6j6j3 K6j6j3 k129 K6j6j2 K6j6j2 k1210 K6j6j1 K6j6j1 k1211 K6j6j K6j6j k1212 y K function y SpaceFrameElementForcesEGAIyIzJx1y1z1x2y2z2u SpaceFrameElementForces This function returns the element force vector given the modulus of elasticity E the shear modulus of elasticity G the crosssectional area A moments of inertia Iy and Iz the torsional constant J the coordinates x1y1z1 of the first node the coordinates x2y2z2 of the second node and the element nodal displacement vector u L sqrtx2x1x2x1 y2y1y2y1 z2z1z2z1 w1 EAL w2 12EIzLLL w3 6EIzLL w4 4EIzL w5 2EIzL w6 12EIyLLL w7 6EIyLL w8 4EIyL w9 2EIyL w10 GJL kprime w1 0 0 0 0 0 w1 0 0 0 0 0 0 w2 0 0 0 w3 0 w2 0 0 0 w3 0 0 w6 0 w7 0 0 0 w6 0 w7 0 0 0 0 w10 0 0 0 0 0 w10 0 0 0 0 w7 0 w8 0 0 0 w7 0 w9 0 0 w3 0 0 0 w4 0 w3 0 0 0 w5 w1 0 0 0 0 0 w1 0 0 0 0 0 0 w2 0 0 0 w3 0 w2 0 0 0 w3 0 0 w6 0 w7 0 0 0 w6 0 w7 0 0 0 0 w10 0 0 0 0 0 w10 0 0 0 0 w7 0 w9 0 0 0 w7 0 w8 0 0 w3 0 0 0 w5 0 w3 0 0 0 w4 102 MATLAB Functions Used 201 if x1 x2 y1 y2 if z2 z1 Lambda 0 0 1 0 1 0 1 0 0 else Lambda 0 0 1 0 1 0 1 0 0 end else CXx x2x1L CYx y2y1L CZx z2z1L D sqrtCXxCXx CYxCYx CXy CYxD CYy CXxD CZy 0 CXz CXxCZxD CYz CYxCZxD CZz D Lambda CXx CYx CZx CXy CYy CZy CXz CYz CZz end R Lambda zeros3 zeros3 zeros3 zeros3 Lambda zeros3 zeros3 zeros3 zeros3 Lambda zeros3 zeros3 zeros3 zeros3 Lambda y kprimeR u function y SpaceFrameElementAxialDiagramf L SpaceFrameElementAxialDiagram This function plots the axial force diagram for the space frame element with nodal force vector f and length L x 0 L z f1 f7 hold on titleAxial Force Diagram plotxz y1 0 0 plotxy1k function y SpaceFrameElementShearYDiagramf L SpaceFrameElementShearYDiagram This function plots the shear force diagram for the space frame element with nodal force vector f and length L x 0 L z f2 f8 hold on titleShear Force Diagram in Y Direction plotxz y1 0 0 plotxy1k 202 10 The Space Frame Element function y SpaceFrameElementShearZDiagramf L SpaceFrameElementShearZDiagram This function plots the shear force diagram for the space frame element with nodal force vector f and length L x 0 L z f3 f9 hold on titleShear Force Diagram in Z Direction plotxz y1 0 0 plotxy1k function y SpaceFrameElementTorsionDiagramf L SpaceFrameElementTorsionDiagram This function plots the torsion diagram for the space frame element with nodal force vector f and length L x 0 L z f4 f10 hold on titleTorsion Diagram plotxz y1 0 0 plotxy1k function y SpaceFrameElementMomentYDiagramf L SpaceFrameElementMomentYDiagram This function plots the bending moment diagram for the space frame element with nodal force vector f and length L x 0 L z f5 f11 hold on titleBending Moment Diagram along Y Axis plotxz y1 0 0 plotxy1k function y SpaceFrameElementMomentZDiagramf L SpaceFrameElementMomentZDiagram This function plots the bending moment diagram for the space frame element with nodal force vector f and length L x 0 L z f6 f12 hold on titleBending Moment Diagram along Z Axis plotxz y1 0 0 plotxy1k 102 MATLAB Functions Used 203 Example 101 Consider the space frame shown in Fig 102 Given E 210 GPa G 84 GPa A 2 102 m2 Iy 10 105 m4 Iz 20 105 m4 and J 5 105 m4 determine 1 the global stiffness matrix for the structure 2 the displacements and rotations at node 1 3 the reactions at nodes 2 3 and 4 4 the forces axial shears torsion bending moments in each element 10 kN Z X Y 1 2 3 4 20 kN 4 m 3 m 3 m Fig 102 Space Frame with Three Elements for Example 101 Solution Use the six steps outlined in Chap 1 to solve this problem using the space frame element Step 1 Discretizing the Domain This problem is already discretized The domain is subdivided into three elements and four nodes The units used in the MATLAB calculations are kN and meter Table 101 shows the element connectivity for this example Table 101 Element Connectivity for Example 101 Element Number Node i Node j 1 1 2 2 1 3 3 1 4 204 10 The Space Frame Element Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices k1 k2 and k3 are obtained by making calls to the MATLAB function SpaceFrameElementStiffness Each matrix has size 12 12 E210e6 E 210000000 G84e6 G 84000000 A2e2 A 00200 Iy10e5 Iy 10000e004 Iz20e5 Iz 20000e004 J5e5 J 50000e005 k1SpaceFrameElementStiffnessEGAIyIzJ000300 k1 10e006 102 MATLAB Functions Used 205 Columns 1 through 7 14000 0 0 0 0 0 14000 0 00187 0 0 0 00280 0 0 0 00093 0 00140 0 0 0 0 0 00014 0 0 0 0 0 00140 0 00280 0 0 0 00280 0 0 0 00560 0 14000 0 0 0 0 0 14000 0 00187 0 0 0 00280 0 0 0 00093 0 00140 0 0 0 0 0 00014 0 0 0 0 0 00140 0 00140 0 0 0 00280 0 0 0 00280 0 Columns 8 through 12 0 0 0 0 0 00187 0 0 0 00280 0 00093 0 00140 0 0 0 00014 0 0 0 00140 0 00140 0 00280 0 0 0 00280 0 0 0 0 0 00187 0 0 0 00280 0 00093 0 00140 0 0 0 00014 0 0 0 00140 0 00280 0 00280 0 0 0 00560 k2SpaceFrameElementStiffnessEGAIyIzJ000003 k2 10e006 Columns 1 through 7 00093 0 0 0 00140 0 00093 0 00187 0 00280 0 0 0 0 0 14000 0 0 0 0 0 00280 0 00560 0 0 0 206 10 The Space Frame Element 00140 0 0 0 00280 0 00140 0 0 0 0 0 00014 0 00093 0 0 0 00140 0 00093 0 00187 0 00280 0 0 0 0 0 14000 0 0 0 0 0 00280 0 00280 0 0 0 00140 0 0 0 00140 0 00140 0 0 0 0 0 00014 0 Columns 8 through 12 0 0 0 00140 0 00187 0 00280 0 0 0 14000 0 0 0 00280 0 00280 0 0 0 0 0 00140 0 0 0 0 0 00014 0 0 0 00140 0 00187 0 00280 0 0 0 14000 0 0 0 00280 0 00560 0 0 0 0 0 00280 0 0 0 0 0 00014 k3SpaceFrameElementStiffnessEGAIyIzJ000040 k3 10e006 Columns 1 through 7 00079 0 0 0 0 00158 00079 0 10500 0 0 0 0 0 0 0 00039 00079 0 0 0 0 0 00079 00210 0 0 0 0 0 0 0 00010 0 0 00158 0 0 0 0 00420 00158 00079 0 0 0 0 00158 00079 0 10500 0 0 0 0 0 102 MATLAB Functions Used 207 0 0 00039 00079 0 0 0 0 0 00079 00105 0 0 0 0 0 0 0 00010 0 0 00158 0 0 0 0 00210 00158 Columns 8 through 12 0 0 0 0 00158 10500 0 0 0 0 0 00039 00079 0 0 0 00079 00105 0 0 0 0 0 00010 0 0 0 0 0 00210 0 0 0 0 00158 10500 0 0 0 0 0 00039 00079 0 0 0 00079 00210 0 0 0 0 0 00010 0 0 0 0 0 00420 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 24 24 Therefore to obtain K we first set up a zero matrix of size 24 24 then make three calls to the MATLAB function SpaceFrameAssemble since we have three space frame elements in the structure Each call to the function will assemble one element The following are the MATLAB commands where it is noted that the only the final result is shown Kzeros2424 KSpaceFrameAssembleKk112 KSpaceFrameAssembleKk213 KSpaceFrameAssembleKk314 K 10e006 208 10 The Space Frame Element Columns 1 through 7 14172 0 0 0 00140 00158 14000 0 10873 0 00280 0 00280 0 0 0 14133 00079 00140 0 0 0 00280 00079 00784 0 0 0 00140 0 00140 0 00570 0 0 00158 00280 0 0 0 00994 0 14000 0 0 0 0 0 14000 0 00187 0 0 0 00280 0 0 0 00093 0 00140 0 0 0 0 0 00014 0 0 0 0 0 00140 0 00140 0 0 0 00280 0 0 0 00280 0 00093 0 0 0 00140 0 0 0 00187 0 00280 0 0 0 0 0 14000 0 0 0 0 0 00280 0 00280 0 0 0 00140 0 0 0 00140 0 0 0 0 0 0 0 00014 0 00079 0 0 0 0 00158 0 0 10500 0 0 0 0 0 0 0 00039 00079 0 0 0 0 0 00079 00105 0 0 0 0 0 0 0 00010 0 0 00158 0 0 0 0 00210 0 Columns 8 through 14 0 0 0 0 0 00093 0 00187 0 0 0 00280 0 00187 0 00093 0 00140 0 0 0 0 0 00014 0 0 0 00280 0 00140 0 00140 0 00140 0 00280 0 0 0 00280 0 0 0 0 0 0 0 0 0 00187 0 0 0 00280 0 0 0 00093 0 00140 0 0 0 0 0 00014 0 0 0 0 0 00140 0 00280 0 0 0 102 MATLAB Functions Used 209 00280 0 0 0 00560 0 0 0 0 0 0 0 00093 0 0 0 0 0 0 0 00187 0 0 0 0 0 0 0 0 0 0 0 0 0 00280 0 0 0 0 0 00140 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 15 through 21 0 0 00140 0 00079 0 0 0 00280 0 0 0 10500 0 14000 0 0 0 0 0 00039 0 00280 0 0 0 0 00079 0 0 00140 0 0 0 0 0 0 0 00014 00158 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00140 0 0 0 0 0 00280 0 0 0 0 0 14000 0 0 0 0 0 0 0 00560 0 0 0 0 0 0 0 00280 0 0 0 0 0 0 0 00014 0 0 0 0 0 0 0 00079 0 0 0 0 0 0 0 10500 0 0 0 0 0 0 0 00039 0 0 0 0 0 0 00079 0 0 0 0 0 0 0 0 0 0 0 00158 0 0 210 10 The Space Frame Element Columns 22 through 24 0 0 00158 0 0 0 00079 0 0 00105 0 0 0 00010 0 0 0 00210 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00158 0 0 0 00079 0 0 00210 0 0 0 00010 0 0 0 00420 Step 4 Applying the Boundary Conditions The matrix 105 for this structure is obtained using the global stiffness matrix shown above last martrix shown above This matrix equation will not be shown explicitly below because K is very large of size 24 24 We will proceed directly to the boundary conditions The boundary conditions for this problem are given as F1x 10 F1y 0 F1z 20 M1x M1y M1z 0 U2x U2y U2z φ2x φ2y φ2z 0 U3x U3y U3z φ3x φ3y φ3z 0 U4x U4y U4z φ4x φ4y φ4z 0 107 We next insert the above conditions into the global stiffness equation not shown and proceed to the solution step below 102 MATLAB Functions Used 211 Step 5 Solving the Equations Solving the resulting system of equations will be performed by partitioning manu ally and Gaussian elimination with MATLAB First we partition the equation by extracting the submatrix in rows 1 to 6 and columns 1 to 6 Therefore we obtain 106 14172 0 0 0 00140 00158 0 10873 0 00280 0 00280 0 0 14133 00079 00140 0 0 00280 00079 00784 0 0 00140 0 00140 0 00570 0 00158 00280 0 0 0 00994 U1x U1y U1z φ1x φ1y φ1z 10 0 20 0 0 0 108 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK1616 k 10e006 14172 0 0 0 00140 00158 0 10873 0 00280 0 00280 0 0 14133 00079 00140 0 0 00280 00079 00784 0 0 00140 0 00140 0 00570 0 00158 00280 0 0 0 00994 f10 0 20 0 0 0 f 10 0 20 0 0 0 212 10 The Space Frame Element ukf u 10e004 00705 00007 01418 00145 00175 00114 It is now clear that the three displacements at node 1 are 00705104 m 00007 104 m and 01418104 m along the X Y and Z axes respectivelyAlso the three rotations at node 1 are 00145104 rad 00175104 rad and 00114104 rad along the X Y and Z axes respectively Step 6 Postprocessing In this step we obtain the reactions at nodes 2 3 and 4 and the forces and moments in each space frame element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F Uu 000000000000000000 U 10e004 00705 00007 01418 00145 00175 00114 0 0 0 0 0 0 0 0 0 102 MATLAB Functions Used 213 0 0 0 0 0 0 0 0 0 FKU F 100000 0 200000 00000 00000 00000 98721 00306 01078 00020 01740 00299 00903 00393 198477 00387 01232 00016 00376 00699 00444 00964 00018 00872 Next we set up the element nodal displacement vectors u1 u2 and u3 then we calculate the element force vectors f1 f2 and f3 by making calls to the MATLAB function SpaceFrameElementForces u1U1U2U3U4U5U6 U7U8U9U10U11U12 214 10 The Space Frame Element u1 10e004 00705 00007 01418 00145 00175 00114 0 0 0 0 0 0 u2U1U2U3U4U5U6U13 U14U15U16U17U18 u2 10e004 00705 00007 01418 00145 00175 00114 0 0 0 0 0 0 u3U1U2U3U4U5U6U19 U20U21U22U23U24 u3 10e004 00705 00007 102 MATLAB Functions Used 215 01418 00145 00175 00114 0 0 0 0 0 0 f1SpaceFrameElementForcesEGAIyIzJ000300u1 f1 98721 00306 01078 00020 01495 00618 98721 00306 01078 00020 01740 00299 f2SpaceFrameElementForcesEGAIyIzJ000003u2 f2 198477 00393 00903 00016 01477 00792 198477 00393 00903 00016 01232 00387 216 10 The Space Frame Element f3SpaceFrameElementForcesEGAIyIzJ000040u3 f3 00699 00376 00444 00018 00812 00633 00699 00376 00444 00018 00964 00872 Problems Problem 101 Consider the space frame shown in Fig 103 Given E 210 GPa G 84 GPa A 2 102 m2 Iy 10 105 m4 Iz 20 105 m4 and J 5 105 m4 determine 1 the global stiffness matrix for the structure 2 the displacements and rotations at nodes 5 6 7 and 8 3 the reactions at nodes 1 2 3 and 4 4 the forces axial shears torsion bending moments in each element 4 Z X Y 3 4 m 4 m 5 m 1 5 8 7 6 2 15 kN Fig 103 Space Frame with Eight Elements for Problem 101 11 The Linear Triangular Element 111 Basic Equations The linear triangular element is a twodimensional finite element with both local and global coordinates It is characterized by linear shape functions This element can be used for plane stress or plane strain problems in elasticity It is also called the constant strain triangle The linear triangular element has modulus of elasticity E Poissons ratio ν and thickness t Each linear triangle has three nodes with two in plane degrees of freedom at each node as shown in Fig 111 The global coordinates of the three nodes are denoted by xi yi xj yj and xm ym The order of the nodes for each element is important they should be listed in a counterclockwise direction starting from any node The area of each triangle should be positive you can actually check this by using the MATLAB function LinearTriangleElementArea which is written specifically for this purpose In this case the element stiffness matrix is given by see 1 k tABT DB 111 where A is the area of the element given by 2A xiyj ym xjym yi xmyi yj 112 and the matrix B is given by mxmym jxjyj ixiyi x y Fig 111 The Linear Triangular Element 218 11 The Linear Triangular Element B 1 2A βi 0 βj 0 βm 0 0 γi 0 γj 0 γm γi βi γj βj γm βm 113 where βi βj βm γi γj and γm are given by βi yj ym βj ym yi βm yi yj γi xm xj γj xi xm γm xj xi 114 For cases of plane stress the matrix D is given by D E 1 ν2 1 ν 0 ν 1 0 0 0 1 ν 2 115 For cases of plane strain the matrix D is given by D E 1 ν1 2ν 1 ν ν 0 ν 1 ν 0 0 0 1 2ν 2 116 It is clear that the linear triangular element has six degrees of freedom two at each node Consequently for a structure with n nodes the global stiffness matrix K will be of size 2n 2n since we have two degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function LinearTriangleAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F 117 where U is the global nodal displacement vector and F is the global nodal force vectorAt this step the boundary conditions are applied manually to the vectors U and 112 MATLAB Functions Used 219 F Then the matrix 117 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the stress vector is obtained for each element as follows σ DB u 118 where σ is the stress vector in the element of size 3 1 and u is the 6 1 element displacement vector The vector σ is written for each element as σ σxσyτxyT 112 MATLAB Functions Used The five MATLAB functions used for the linear triangular element are LinearTriangleElementAreaxi yi xj yj xm ym This function returns the element area given the coordinates of the first node xi yi the coordinates of the second node xj yj and the coordinates of the third node xm ym LinearTriangleElementStiffnessE NU t xi yi xj yj xm ym p This function calculates the element stiffness matrix for each linear triangle with modulus of elas ticity E Poissons ratio NU thickness t and coordinates xi yi for the first node xj yj for the second node and xm ym for the third node Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the 6 6 element stiffness matrix k LinearTriangleAssembleK ki j mThisfunctionassemblestheelementstiffness matrix k of the linear triangle joining nodes i j and m into the global stiffness matrix K It returns the 2n 2n global stiffness matrix K every time an element is assembled LinearTriangleElementStressesE NU xi yi xj yj xm ym p u This function calculates the element stresses using the modulus of elasticity E Poissons ratio NU the coordinates xi yi for the first node xj yj for the second node and xm ym for the third node and the element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the stress vector for the element LinearTriangleElementPStressessigma This function calculates the element prin cipal stresses using the element stress vector sigma It returns a 3 1 vector in the form sigma1 sigma2 thetaT where sigma1 and sigma2 are the principal stresses for the element and theta is the principal angle The following is a listing of the MATLAB source code for each function 220 11 The Linear Triangular Element function y LinearTriangleElementAreaxiyixjyjxmym LinearTriangleElementArea This function returns the area of the linear triangular element whose first node has coordinates xiyi second node has coordinates xjyj and third node has coordinates xmym y xiyjym xjymyi xmyiyj2 function y LinearTriangleElementStiffnessENUtxiyixjyjxmymp LinearTriangleElementStiffness This function returns the element stiffness matrix for a linear triangular element with modulus of elasticity E Poissons ratio NU thickness t coordinates of the first node xiyi coordinates of the second node xjyj and coordinates of the third node xmym Use p 1 for cases of plane stress and p 2 for cases of plane strain The size of the element stiffness matrix is 6 x 6 A xiyjym xjymyi xmyiyj2 betai yjym betaj ymyi betam yiyj gammai xmxj gammaj xixm gammam xjxi B betai 0 betaj 0 betam 0 0 gammai 0 gammaj 0 gammam gammai betai gammaj betaj gammam betam2A if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU1NU NU 0 NU 1NU 0 0 0 1 2NU2 end y tABDB function y LinearTriangleAssembleKkijm LinearTriangleAssemble This function assembles the element stiffness matrix k of the linear triangular element with nodes i j and m into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K2i12i1 K2i12i1 k11 K2i12i K2i12i k1 2 K2i12j1 K2i12j1 k13 112 MATLAB Functions Used 221 K2i12j K2i12j k14 K2i12m1 K2i12m1 k15 K2i12m K2i12m k16 K2i2i1 K2i2i1 k21 K2i2i K2i2i k22 K2i2j1 K2i2j1 k23 K2i2j K2i2j k24 K2i2m1 K2i2m1 k25 K2i2m K2i2m k26 K2j12i1 K2j12i1 k31 K2j12i K2j12i k32 K2j12j1 K2j12j1 k33 K2j12j K2j12j k34 K2j12m1 K2j12m1 k35 K2j12m K2j12m k36 K2j2i1 K2j2i1 k41 K2j2i K2j2i k42 K2j2j1 K2j2j1 k43 K2j2j K2j2j k44 K2j2m1 K2j2m1 k45 K2j2m K2j2m k46 K2m12i1 K2m12i1 k51 K2m12i K2m12i k52 K2m12j1 K2m12j1 k53 K2m12j K2m12j k54 K2m12m1 K2m12m1 k55 K2m12m K2m12m k56 K2m2i1 K2m2i1 k61 K2m2i K2m2i k62 K2m2j1 K2m2j1 k63 K2m2j K2m2j k64 K2m2m1 K2m2m1 k65 K2m2m K2m2m k66 y K function y LinearTriangleElementStressesENUxiyixjyjxmympu LinearTriangleElementStressesThis function returns the element stress vector for a linear triangular element with modulus of elasticity E Poissons ratio NU coordinates of the first node xiyi coordinates of the second node xjyj coordinates of the third node xmym and element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain The size of the element stress vector is 3 x 1 A xiyjym xjymyi xmyiyj2 betai yjym betaj ymyi betam yiyj gammai xmxj 222 11 The Linear Triangular Element gammaj xixm gammam xjxi B betai 0 betaj 0 betam 0 0 gammai 0 gammaj 0 gammam gammai betai gammaj betaj gammam betam2A if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU1NU NU 0 NU 1NU 0 0 0 1 2NU2 end y DBu function y LinearTriangleElementPStressessigma LinearTriangleElementPStresses This function returns the element principal stresses and their angle given the element stress vector R sigma1 sigma22 Q sigma1 sigma22ˆ2 sigma3sigma3 M 2sigma3sigma1 sigma2 s1 R sqrtQ s2 R sqrtQ theta atanM2180pi y s1 s2 theta Example 111 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 112 The plate is discretized using two linear triangular elements as shown in Fig 113 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 2 and 3 3 the reactions at nodes 1 and 4 4 the stresses in each element 5 the principal stresses and principal angle for each element w 025 m 05 m Fig 112 Thin Plate for Example 111 112 MATLAB Functions Used 223 9375 kN y x 9375 kN 4 2 3 1 025 m 05 m Fig 113 Discretization of Thin Plate Using Two Linear Triangles Solution Use the six steps outlined in Chap 1 to solve this problem using the linear triangular element Step 1 Discretizing the Domain We subdivide the plate into two elements only for illustration purposes More elements must be used in order to obtain reliable results Thus the domain is subdivided into two elements and four nodes as shown in Fig 113 The total force due to the distributed load is divided equally between nodes 2 and 3 Since the plate is thin a case of plane stress is assumed The units used in the MATLAB calculations are kN and meter Table 111 shows the element connectivity for this example Table 111 Element Connectivity for Example 111 Element Number Node i Node j Node m 1 1 3 4 2 1 2 3 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function LinearTriangleElementStiffness Each matrix has size 6 6 E210e6 E 210000000 NU03 224 11 The Linear Triangular Element NU 03000 t0025 t 00250 k1LinearTriangleElementStiffnessENUt0005 02500251 k1 10e006 20192 0 0 10096 20192 10096 0 57692 08654 0 08654 57692 0 08654 14423 0 14423 08654 10096 0 0 05048 10096 05048 20192 08654 14423 10096 34615 18750 10096 57692 08654 05048 18750 62740 k2LinearTriangleElementStiffnessENUt0005 0050251 k2 10e006 14423 0 14423 08654 0 08654 0 05048 10096 05048 10096 0 14423 10096 34615 18750 20192 08654 08654 05048 18750 62740 10096 57692 0 10096 20192 10096 20192 0 08654 0 08654 57692 0 57692 Step 3 Assembling the Global Stiffness Matrix Since the structure has four nodes the size of the global stiffness matrix is 8 8 Therefore to obtain K we first set up a zero matrix of size 88 then make two calls to 112 MATLAB Functions Used 225 the MATLAB function LinearTriangleAssemble since we have two elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros88 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KLinearTriangleAssembleKk1134 K 10e006 Columns 1 through 7 20192 0 0 0 0 10096 20192 0 57692 0 0 08654 0 08654 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 08654 0 0 14423 0 14423 10096 0 0 0 0 05048 10096 20192 08654 0 0 14423 10096 34615 10096 57692 0 0 08654 05048 18750 Column 8 10096 57692 0 0 08654 05048 18750 62740 226 11 The Linear Triangular Element KLinearTriangleAssembleKk2123 K 10e006 Columns 1 through 7 34615 0 14423 08654 0 18750 20192 0 62740 10096 05048 18750 0 08654 14423 10096 34615 18750 20192 08654 0 08654 05048 18750 62740 10096 57692 0 0 18750 20192 10096 34615 0 14423 18750 0 08654 57692 0 62740 10096 20192 08654 0 0 14423 10096 34615 10096 57692 0 0 08654 05048 18750 Column 8 10096 57692 0 0 08654 05048 18750 62740 Step 4 Applying the Boundary Conditions The matrix 117 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 106 346 0 144 087 0 188 202 101 0 627 101 050 188 0 087 577 144 101 346 188 202 087 0 0 087 050 188 627 101 577 0 0 0 188 202 101 346 0 144 087 188 0 087 577 0 627 101 050 202 087 0 0 144 101 346 188 101 577 0 0 087 050 188 627 112 MATLAB Functions Used 227 U1x U1y U2x U2y U3x U3y U4x U4y F1x F1y F2x F2y F3x F3y F4x F4y 119 The boundary conditions for this problem are given as U1x U1y U4x U4y 0 F2x 9375 F2y 0 F3x 9375 F3y 0 1110 Inserting the above conditions into 119 we obtain 106 346 0 144 087 0 188 202 101 0 627 101 050 188 0 087 577 144 101 346 188 202 087 0 0 087 050 188 627 101 577 0 0 0 188 202 101 346 0 144 087 188 0 087 577 0 627 101 050 202 087 0 0 144 101 346 188 101 577 0 0 087 050 188 627 0 0 U2x U2y U3x U3y 0 0 F1x F1y 9375 0 9375 0 F4x F4y 1111 Step 5 Solving the Equations Solving the system of equations in 1111 will be performed by partitioning man ually and Gaussian elimination with MATLAB First we partition 1111 by ex tracting the submatrix in rows 3 to 6 and columns 3 to 6 Therefore we obtain 106 346 188 202 087 188 627 101 577 202 101 346 0 087 577 0 627 U2x U2y U3x U3y 9375 0 9375 0 1112 228 11 The Linear Triangular Element The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3636 k 10e006 34615 18750 20192 08654 18750 62740 10096 57692 20192 10096 34615 0 08654 57692 0 62740 f9375 0 9375 0 f 93750 0 93750 0 ukf u 10e005 07111 01115 06531 00045 It is now clear that the horizontal and vertical displacements at node 2 are 07111 m and 01115 m respectively and the horizontal and vertical displacements at node 3 are 06531 m and 00045 m respectively When a larger number of elements is used we expect to get the same result for the horizontal displacements at nodes 2 and 3 Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 4 and the stresses in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F 112 MATLAB Functions Used 229 U0 0 u 0 0 U 10e005 0 0 07111 01115 06531 00045 0 0 FKU F 93750 56295 93750 0 93750 00000 93750 56295 Thus the horizontal and vertical reactions at node 1 are forces of 9375 kN di rected to the left and 56295 kN directed downwards The horizontal and vertical reactions at node 4 are forces of 9375 kN directed to the left and 56295 kN di rected upwards Obviously force equilibrium is satisfied for this problem Next we set up the element nodal displacement vectors u1 and u2 then we calculate the element stresses sigma1 and sigma2 by making calls to the MATLAB function LinearTrian gleElementStresses u1U1 U2 U5 U6 U7 U8 u1 10e005 0 0 06531 230 11 The Linear Triangular Element 00045 0 0 u2U1 U2 U3 U4 U5 U6 u2 10e005 0 0 07111 01115 06531 00045 sigma1LinearTriangleElementStressesENU0005025 00251u1 sigma1 10e003 30144 09043 00072 sigma2LinearTriangleElementStressesENU00050 050251u2 sigma2 10e003 29856 00036 00072 Thus it is clear that the stresses in element 1 are σx 30144 MPa tensile σy 09043 MPa tensile and τxy 00072 MPa positive The stresses in el ement 2 are σx 29856 MPa tensile σy 00036 MPa compressive and τxy 00072 MPa negative It is clear that the stresses in the xdirection approach closely the correct value of 3 MPa tensile Next we calculate the principal stresses 112 MATLAB Functions Used 231 and principal angle for each element by making calls to the MATLAB function Lin earTriangleElementPStresses s1LinearTriangleElementPStressessigma1 s1 10e003 30144 09043 00002 s2LinearTriangleElementPStressessigma2 s2 10e003 29856 00036 00001 Thus it is clear that the principal stresses in element 1 are σ1 30144 MPa tensile σ2 09043 MPa tensile while the principal angle θp 02 The principal stresses in element 2 are σ1 29856 MPa tensile σ2 00036 MPa compressive while the principal angle θp 01 Example 112 Consider the thin plate subjected to both a uniformly distributed load and a concen trated load as shown in Fig 114 The plate is discretized using twelve linear triangles as shown in Fig 115 Given E 210 GPa ν 03 t 0025 m w 100 kNm and P 125 kN determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at each node 3 the reactions at nodes 1 4 and 7 Solution Use the six steps outlined in Chap 1 to solve this problem using the linear triangular element 232 11 The Linear Triangular Element P 025 m 025 m 05 m 05 m w Fig 114 Thin Plate with a Distributed Load and a Concentrated Load for Example 112 9 6 3 1 2 4 5 7 8 10 11 025 m 025 m 025 m 025 m 125 kN Fig 115 Discretization of Thin Plate Using Twelve Linear Triangles Step 1 Discretizing the Domain We subdivide the plate into twelve elements and eleven nodes as shown in Fig 115 The total force due to the distributed load is divided equally between nodes 5 and 10 However the resultant applied force at node 10 cancels out and we are left with a concentrated force of 125 kN applied vertically downwards at node 5 Since the plate is thin a case of plane stress is assumed The units used in the MATLAB calculations are kN and meter Table 112 shows the element connectivity for this example Table 112 Element Connectivity for Example 112 Element Number Node i Node j Node m 1 1 3 2 2 1 4 3 3 3 5 2 4 3 4 5 5 4 6 5 6 4 7 6 7 5 6 8 8 6 7 8 9 5 8 9 10 5 9 10 11 8 11 9 12 9 11 10 112 MATLAB Functions Used 233 Step 2 Writing the Element Stiffness Matrices The twelve element stiffness matrices are obtained by making calls to the MATLAB function LinearTriangleElementStiffness Each matrix has size 6 6 E210e6 E 210000000 NU03 NU 03000 t0025 t 00250 k1LinearTriangleElementStiffnessENUt0050125 0375025051 k1 10e006 19471 09375 10096 08654 09375 00721 09375 19471 10096 28846 00721 09375 10096 10096 20192 0 10096 10096 08654 28846 0 57692 08654 28846 09375 00721 10096 08654 19471 09375 00721 09375 10096 28846 09375 19471 k2LinearTriangleElementStiffnessENUt0050025 012503751 k2 10e006 234 11 The Linear Triangular Element 19471 09375 09375 00721 28846 10096 09375 19471 00721 09375 08654 10096 09375 00721 19471 09375 28846 10096 00721 09375 09375 19471 08654 10096 28846 08654 28846 08654 57692 0 10096 10096 10096 10096 0 20192 k3LinearTriangleElementStiffnessENUt01250375 025025025051 k3 10e006 57692 0 28846 08654 28846 08654 0 20192 10096 10096 10096 10096 28846 10096 19471 09375 09375 00721 08654 10096 09375 19471 00721 09375 28846 10096 09375 00721 19471 09375 08654 10096 00721 09375 09375 19471 k4LinearTriangleElementStiffnessENUt01250375 00250250251 k4 10e006 20192 0 10096 10096 10096 10096 0 57692 08654 28846 08654 28846 10096 08654 19471 09375 09375 00721 10096 28846 09375 19471 00721 09375 10096 08654 09375 00721 19471 09375 10096 28846 00721 09375 09375 19471 k5LinearTriangleElementStiffnessENUt00250125 01250250251 k5 10e006 112 MATLAB Functions Used 235 19471 09375 10096 08654 09375 00721 09375 19471 10096 28846 00721 09375 10096 10096 20192 0 10096 10096 08654 28846 0 57692 08654 28846 09375 00721 10096 08654 19471 09375 00721 09375 10096 28846 09375 19471 k6LinearTriangleElementStiffnessENUt002500 012501251 k6 10e006 19471 09375 09375 00721 28846 10096 09375 19471 00721 09375 08654 10096 09375 00721 19471 09375 28846 10096 00721 09375 09375 19471 08654 10096 28846 08654 28846 08654 57692 0 10096 10096 10096 10096 0 20192 k7LinearTriangleElementStiffnessENUt025025 0125012502501 k7 10e006 19471 09375 28846 10096 09375 00721 09375 19471 08654 10096 00721 09375 28846 08654 57692 0 28846 08654 10096 10096 0 20192 10096 10096 09375 00721 28846 10096 19471 09375 00721 09375 08654 10096 09375 19471 k8LinearTriangleElementStiffnessENUt01250125 0002501 k8 10e006 236 11 The Linear Triangular Element 20192 0 10096 10096 10096 10096 0 57692 08654 28846 08654 28846 10096 08654 19471 09375 09375 00721 10096 28846 09375 19471 00721 09375 10096 08654 09375 00721 19471 09375 10096 28846 00721 09375 09375 19471 k9LinearTriangleElementStiffnessENUt025025025 0037501251 k9 10e006 19471 09375 09375 00721 28846 10096 09375 19471 00721 09375 08654 10096 09375 00721 19471 09375 28846 10096 00721 09375 09375 19471 08654 10096 28846 08654 28846 08654 57692 0 10096 10096 10096 10096 0 20192 k10LinearTriangleElementStiffnessENUt025025 03750125050251 k10 10e006 19471 09375 10096 08654 09375 00721 09375 19471 10096 28846 00721 09375 10096 10096 20192 0 10096 10096 08654 28846 0 57692 08654 28846 09375 00721 10096 08654 19471 09375 00721 09375 10096 28846 09375 19471 k11LinearTriangleElementStiffnessENUt025005 0037501251 k11 10e006 112 MATLAB Functions Used 237 19471 09375 09375 00721 10096 08654 09375 19471 00721 09375 10096 28846 09375 00721 19471 09375 10096 08654 00721 09375 09375 19471 10096 28846 10096 10096 10096 10096 20192 0 08654 28846 08654 28846 0 57692 k12LinearTriangleElementStiffnessENUt03750125 050050251 k12 10e006 57692 0 28846 08654 28846 08654 0 20192 10096 10096 10096 10096 28846 10096 19471 09375 09375 00721 08654 10096 09375 19471 00721 09375 28846 10096 09375 00721 19471 09375 08654 10096 00721 09375 09375 19471 Step 3 Assembling the Global Stiffness Matrix Since the structure has eleven nodes the size of the global stiffness matrix is 2222 ThereforetoobtainKwefirstsetupazeromatrixofsize2222thenmaketwelvecalls to the MATLAB function LinearTriangleAssemble since we have twelve elements in the structure Each call to the function will assemble one element The following are the MATLAB commands note that the result for the global stiffness matrix is not shown at each step except at the last step Kzeros2222 KLinearTriangleAssembleKk1132 KLinearTriangleAssembleKk2143 KLinearTriangleAssembleKk3352 KLinearTriangleAssembleKk4345 KLinearTriangleAssembleKk5465 238 11 The Linear Triangular Element KLinearTriangleAssembleKk6476 KLinearTriangleAssembleKk7568 KLinearTriangleAssembleKk8678 KLinearTriangleAssembleKk9589 KLinearTriangleAssembleKk105910 KLinearTriangleAssembleKk118119 KLinearTriangleAssembleKk1291110 K 10e007 Columns 1 through 7 03894 01875 00938 00072 03894 01875 00938 01875 03894 00072 00938 01875 03894 00072 00938 00072 03894 01875 03894 01875 0 00072 00938 01875 03894 01875 03894 0 03894 01875 03894 01875 15577 0 03894 01875 03894 01875 03894 0 15577 01875 00938 00072 0 0 03894 01875 07788 00072 00938 0 0 01875 03894 0 0 0 00938 00072 03894 01875 01875 0 0 00072 00938 01875 03894 0 0 0 0 0 0 0 03894 0 0 0 0 0 0 01875 0 0 0 0 0 0 00938 0 0 0 0 0 0 00072 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 112 MATLAB Functions Used 239 Columns 8 through 14 00072 0 0 0 0 0 0 00938 0 0 0 0 0 0 0 00938 00072 0 0 0 0 0 00072 00938 0 0 0 0 01875 03894 01875 0 0 0 0 03894 01875 03894 0 0 0 0 0 01875 0 03894 01875 00938 00072 07788 0 01875 01875 03894 00072 00938 0 11683 01875 03894 01875 0 0 01875 01875 11683 01875 03894 0 0 01875 03894 01875 15577 0 03894 01875 03894 01875 03894 0 15577 01875 03894 00072 0 0 03894 01875 03894 01875 00938 0 0 01875 03894 01875 03894 0 01875 0 03894 01875 00938 00072 0 0 01875 01875 03894 00072 00938 0 03894 01875 0 0 0 0 0 01875 03894 0 0 0 0 0 00938 00072 0 0 0 0 0 00072 00938 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 15 through 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 01875 0 03894 01875 00938 00072 0 0 01875 01875 03894 00072 00938 0 03894 01875 0 0 0 0 0 01875 03894 0 0 0 0 0 00938 00072 0 0 0 0 0 00072 00938 0 0 0 0 0 07788 0 03894 01875 0 0 00938 0 07788 01875 03894 0 0 00072 03894 01875 15577 0 03894 01875 03894 240 11 The Linear Triangular Element 0 07788 01875 03894 0 0 00072 03894 01875 15577 0 03894 01875 03894 01875 03894 0 15577 01875 03894 01875 0 0 03894 01875 03894 01875 00938 0 0 01875 03894 01875 03894 00072 00938 00072 03894 01875 00938 00072 03894 00072 00938 01875 03894 00072 00938 01875 Column 22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00072 00938 01875 03894 00072 00938 01875 03894 Step 4 Applying the Boundary Conditions The matrix 117 for this structure can be obtained but is not written explicitly here for lack of space using the global stiffness matrix obtained in the previous step The boundary conditions for this problem are given as U1x U1y U4x U4y U7x U7y 0 F2x F2y F3x F3y F6x F6y F8x F8y F9x F9y 1113 F10x F10y F11x F11y 0 F5x 0 F5y 125 1114 112 MATLAB Functions Used 241 Inserting the above conditions into the matrix equation for this structure we can proceed to the next step The final equation to be solved in not shown here explicitly because it is too large of size 22 22 and will not fit here Step 5 Solving the Equations Solving the system of equations for this structure will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition the matrix equation by extracting the submatrices in rows 3 to 6 9 to 12 15 to 22 and columns 3 to 6 9 to 12 15 to 22 We then obtain a reduced matrix equation of size 16 16 which is not shown here explicitly because it is too large However it is shown in the MATLAB output below The solution of the resulting system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3636 K36912 K361522 K91236 K912912 K9121522 K152236 K1522912 K15221522 k 10e007 Columns 1 through 7 03894 01875 03894 01875 00938 00072 0 01875 03894 01875 03894 00072 00938 0 03894 01875 15577 0 03894 01875 0 01875 03894 0 15577 01875 03894 0 00938 00072 03894 01875 11683 01875 03894 00072 00938 01875 03894 01875 11683 01875 0 0 0 0 03894 01875 15577 0 0 0 0 01875 03894 0 0 0 0 0 01875 0 03894 0 0 0 0 0 01875 01875 0 0 0 0 03894 01875 0 0 0 0 0 01875 03894 0 0 0 0 0 00938 00072 0 0 0 0 0 00072 00938 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 242 11 The Linear Triangular Element Columns 8 through 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 01875 01875 0 03894 01875 00938 00072 03894 0 01875 01875 03894 00072 00938 0 03894 01875 0 0 0 0 15577 01875 03894 0 0 0 0 01875 07788 0 03894 01875 0 0 03894 0 07788 01875 03894 0 0 0 03894 01875 15577 0 03894 01875 0 01875 03894 0 15577 01875 03894 0 0 0 03894 01875 03894 01875 0 0 0 01875 03894 01875 03894 0 00938 00072 03894 01875 00938 00072 0 00072 00938 01875 03894 00072 00938 Columns 15 through 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00938 00072 00072 00938 03894 01875 01875 03894 00938 00072 00072 00938 03894 01875 01875 03894 f000001250000000000 f 0 0 0 112 MATLAB Functions Used 243 0 0 125000 0 0 0 0 0 0 0 0 0 0 ukf u 10e005 01158 03010 00432 01657 00013 04170 00409 01762 01340 03528 00530 04526 00083 05114 01270 05290 The horizontal and vertical displacements are shown clearly above for the eight free nodes in the structure Step 6 Postprocessing In this step we obtain the reactions at nodes 1 4 and 7 using MATLAB as follows We set up the global nodal displacement vector U then we calculate the global nodal force vector F 244 11 The Linear Triangular Element U00u1400u5800u916 U 10e005 0 0 01158 03010 00432 01657 0 0 00013 04170 00409 01762 0 0 01340 03528 00530 04526 00083 05114 01270 05290 FKU F 60939 43591 00000 00000 00000 00000 03122 39181 00000 125000 00000 00000 112 MATLAB Functions Used 245 64061 42228 0 00000 00000 00000 0 00000 00000 00000 The reactions are shown clearly above The stresses and principal stresses in each element are not required in this problem but they can be easily obtained for each one of the twelve elements by making successive calls to the MATLAB functions LinearTriangleElementStresses and LinearTriangleElementPStresses Problems Problem 111 Consider the thin plate problem solved in Example 111 Solve the problem again us ing four linear triangular elements instead of two elements as shown in Fig 116 Compare your answers for the displacements at nodes 2 and 3 with the answers ob tained in the example Compare also the stresses obtained for the four elements with those obtained for the two elements in the example 9375 kN 025 m 05 m 9375 kN 4 2 3 1 5 Fig 116 Discretization of Thin Plate Using Four Linear Triangles Problem 112 Consider the thin plate with a hole in the middle that is subjected to a concentrated load at the corner as shown in Fig 117 Given E 70 GPa ν 025 t 002 m and P 20 kN use the finite element mesh composed of linear triangles shown in Fig 118 to determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 4 6 7 10 11 and 16 3 the reactions at nodes 1 5 9 and 13 246 11 The Linear Triangular Element P hole 03 m 03 m 03 m 03 m 03 m 03 m Fig 117 Thin Plate with a Hole 8 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 20 kN 03 m 03 m 03 m 03 m 03 m 03 m Fig 118 Discretization of Thin Plate with a Hole Using 16 Linear Triangles Problem 113 Consider the thin plate supported on two springs and subjected to a uniformly dis tributed load as shown in Fig 119 Given E 200 GPa ν 03 t 001 m k 4000 kNm and w 5000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 1 2 3 and 4 3 the reactions at nodes 5 and 6 4 the stresses in each element 5 the principal stresses and principal angle for each element 6 the force in each spring 112 MATLAB Functions Used 247 k k w 04 m 1 4 2 3 07 m 6 5 Fig 119 Thin Plate Supported on Two Springs 12 The Quadratic Triangular Element 121 Basic Equations The quadratic triangular element is a twodimensional finite element with both local and global coordinates It is characterized by quadratic shape functions This element can be used for plane stress or plane strain problems in elasticity It is also called the linear strain triangle The quadratic triangular element has modulus of elasticity E Poissons ratio ν and thickness t Each quadratic triangle has six nodes with two inplane degrees of freedom at each node as shown in Fig 121 The global coordinates of the six nodes are denoted by x1 y1 x2 y2 x3 y3 x4 y4 x5 y5 and x6 y6 The order of the nodes for each element is important they should be listed in a counterclockwise direction starting from the corner nodes then the mid side nodes The area of each triangle should be positive you can actually check this by using the MATLAB function QuadTriangleElementArea which is written specifically for this purpose In this case the element stiffness matrix is not written explicitly but calculated through symbolic differentiation and integration with the aid of the MATLAB Symbolic Math Toolbox The six shape functions for this element are listed explicitly as follows see 1 and 14 N1 x23y y3 y23x x3x46y y6 y46x x6 x23y13 y23x13x46y16 y46x16 N2 x31y y1 y31x x1x54y y4 y54x x4 x31y21 y31x21x54y24 y54x24 y x 1 4 6 5 2 3 Fig 121 The Quadratic Triangular Element N3 fracx3y y1 y21x6 y6x2 y2 y2 x3x5 y5 y5 x6 N4 fracx3y y1 y31x3 y3x1 y1 y1 x1x6 y6 y6 x6 N5 fracx3y y1 y31x1 y1x1 y1 y1 x1x6 y6 y6 x6 N6 fracx1y y1 y21x3 y3x4 y4 y4 x4x5 y5 y5 x5 121 The B matrix is given as follows for this element B beginbmatrix fracpartial N1partial x 0 fracpartial N2partial x cdots fracpartial N6partial x 0 fracpartial N1partial y 0 fracpartial N3partial x cdots fracpartial N6partial y endbmatrix 122 122 MATLAB Functions Used 251 for the function QuadTriangleElementStiffness which calculates the element stiffness matrix for this element The reader should note the calculation of this matrix will be somewhat slow due to the symbolic computations involved It is clear that the quadratic triangular element has twelve degrees of freedom two at each node Consequently for a structure with n nodes the global stiffness matrix K will be of size 2n 2n since we have two degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function QuadTriangleAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F 126 where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 126 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the stress vector is obtained for each element as follows σ DB u 127 where σ is the stress vector in the element of size 3 1 and u is the 12 1 element displacement vector The vector σ is written for each element as σ σxσyτxyT It should be noted that in this case this vector is a linear function of x and y Usually numerical results are obtained at the centroid of the element The MATLAB function QuadTriangleElementStresses gives two results the general linear stress functions in x and y and the numerical values of the stresses at the centroid of the element 122 MATLAB Functions Used The five MATLAB functions used for the quadratic triangular element are QuadTriangleElementAreax1 y1 x2 y2 x3 y3 This function returns the element area given the coordinates of the first node x1 y1 the coordinates of the second node x2 y2 and the coordinates of the third node x3 y3 QuadTriangleElementStiffnessE NU t x1 y1 x2 y2 x3 y3 p This function calculates the element stiffness matrix for each linear triangle with modulus of elasticity E Poissons ratio NU thickness t and coordinates x1 y1 for the first 252 12 The Quadratic Triangular Element node x2 y2 for the second node and x3 y3 for the third node Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the 1212 element stiffness matrix k QuadTriangleAssembleK k i j m p q r This function assembles the element stiffness matrix k of the linear triangle joining nodes i j m p q and r into the global stiffness matrix K It returns the 2n 2n global stiffness matrix K every time an element is assembled QuadTriangleElementStressesE NU x1 y1 x2 y2 x3 y3 p u This function calculates the element stresses using the modulus of elasticity E Poissons ratio NU the coordinates x1 y1 for the first node x2 y2 for the second node and x3 y3 for the third node and the element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the stress vector for the element QuadTriangleElementPStressessigma This function calculates the element prin cipal stresses using the element stress vector sigma It returns a 3 1 vector in the form sigma1 sigma2 thetaT where sigma1 and sigma2 are the principal stresses for the element and theta is the principal angle The following is a listing of the MATLAB source code for each function function y QuadTriangleElementAreax1y1x2y2x3y3 QuadTriangleElementArea This function returns the area of the quadratic triangular element whose first node has coordinates x1y1 second node has coordinates x2y2 and third node has coordinates x3y3 y x1y2y3 x2y3y1 x3y1y22 function w QuadTriangleElementStiffnessENUtx1y1x2y2x3y3p QuadTriangleElementStiffness This function returns the element stiffness matrix for a quadratic triangular element with modulus of elasticity E Poissons ratio NU thickness t coordinates of the node 1 x1y1 coordinates of node 2 x2y2 and coordinates of node 3 x3y3 Use p 1 for cases of plane stress and p 2 for cases of plane strain The size of the element stiffness matrix is 12 x 12 122 MATLAB Functions Used 253 syms x y x4 x1 x22 y4 y1 y22 x5 x2 x32 y5 y2 y32 x6 x1 x32 y6 y1 y32 x21 x2 x1 y21 y2 y1 x23 x2 x3 y23 y2 y3 x46 x4 x6 y46 y4 y6 x13 x1 x3 y13 y1 y3 x16 x1 x6 y16 y1 y6 x31 x3 x1 y31 y3 y1 x54 x5 x4 y54 y5 y4 x24 x2 x4 y24 y2 y4 x56 x5 x6 y56 y5 y6 x36 x3 x6 y36 y3 y6 x41 x4 x1 y41 y4 y1 x43 x4 x3 y43 y4 y3 x51 x5 x1 y51 y5 y1 x61 x6 x1 y61 y6 y1 x63 x6 x3 y63 y6 y3 N1 x23yy3y23xx3x46yy6y46xx6 x23y13y23x13x46y16y46x16 N2 x31yy1y31xx1x54yy4y54xx4 x31y21y31x21x54y24y54x24 N3 x21yy1y21xx1x56yy6y56xx6 x21y31y21x31x56y36y56x36 N4 x31yy1y31xx1x23yy3y23xx3 x31y41y31x41x23y43y23x43 N5 x31yy1y31xx1x21yy1y21xx1 x31y51y31x51x21y51y21x51 N6 x21yy1y21xx1x23yy3y23xx3 x21y61y21x61x23y63y23x63 N1x diffN1x N1y diffN1y N2x diffN2x N2y diffN2y N3x diffN3x 254 12 The Quadratic Triangular Element N3y diffN3y N4x diffN4x N4y diffN4y N5x diffN5x N5y diffN5y N6x diffN6x N6y diffN6y B N1x 0 N2x 0 N3x 0 N4x 0 N5x 0 N6x 0 0 N1y 0 N2y 0 N3y 0 N4y 0 N5y 0 N6y N1y N1x N2y N2x N3y N3x N4y N4x N5y N5x N6y N6x if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU1NU NU 0 NU 1NU 0 0 0 12NU2 end BD transposeBDB 11 y1 xx1y2y1x2x1 12 y1 xx1y3y1x3x1 13 y2 xx2y3y2x3x2 r1 intintBD y 11 12 x x1 x3 r2 intintBD y 11 13 x x3 x2 z tr1r2 w doublez function y QuadTriangleAssembleKkijmpqr QuadTriangleAssemble This function assembles the element stiffness matrix k of the quadratic triangular element with nodes i j m p q and r into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K2i12i1 K2i12i1 k11 K2i12i K2i12i k12 K2i12j1 K2i12j1 k13 K2i12j K2i12j k14 K2i12m1 K2i12m1 k15 K2i12m K2i12m k16 K2i12p1 K2i12p1 k17 K2i12p K2i12p k18 K2i12q1 K2i12q1 k19 K2i12q K2i12q k110 K2i12r1 K2i12r1 k111 K2i12r K2i12r k112 K2i2i1 K2i2i1 k21 K2i2i K2i2i k22 K2i2j1 K2i2j1 k23 K2i2j K2i2j k24 K2i2m1 K2i2m1 k25 K2i2m K2i2m k26 K2i2p1 K2i2p1 k27 K2i2p K2i2p k28 K2i2q1 K2i2q1 k29 122 MATLAB Functions Used 255 K2i2q K2i2q k210 K2i2r1 K2i2r1 k211 K2i2r K2i2r k212 K2j12i1 K2j12i1 k31 K2j12i K2j12i k32 K2j12j1 K2j12j1 k33 K2j12j K2j12j k34 K2j12m1 K2j12m1 k35 K2j12m K2j12m k36 K2j12p1 K2j12p1 k37 K2j12p K2j12p k38 K2j12q1 K2j12q1 k39 K2j12q K2j12q k310 K2j12r1 K2j12r1 k311 K2j12r K2j12r k312 K2j2i1 K2j2i1 k41 K2j2i K2j2i k42 K2j2j1 K2j2j1 k43 K2j2j K2j2j k44 K2j2m1 K2j2m1 k45 K2j2m K2j2m k46 K2j2p1 K2j2p1 k47 K2j2p K2j2p k48 K2j2q1 K2j2q1 k49 K2j2q K2j2q k410 K2j2r1 K2j2r1 k411 K2j2r K2j2r k412 K2m12i1 K2m12i1 k51 K2m12i K2m12i k52 K2m12j1 K2m12j1 k53 K2m12j K2m12j k54 K2m12m1 K2m12m1 k55 K2m12m K2m12m k56 K2m12p1 K2m12p1 k57 K2m12p K2m12p k58 K2m12q1 K2m12q1 k59 K2m12q K2m12q k510 K2m12r1 K2m12r1 k511 K2m12r K2m12r k512 K2m2i1 K2m2i1 k61 K2m2i K2m2i k62 K2m2j1 K2m2j1 k63 K2m2j K2m2j k64 K2m2m1 K2m2m1 k65 K2m2m K2m2m k66 K2m2p1 K2m2p1 k67 K2m2p K2m2p k68 K2m2q1 K2m2q1 k69 K2m2q K2m2q k610 K2m2r1 K2m2r1 k611 K2m2r K2m2r k612 K2p12i1 K2p12i1 k71 K2p12i K2p12i k72 K2p12j1 K2p12j1 k73 256 12 The Quadratic Triangular Element K2p12j K2p12j k74 K2p12m1 K2p12m1 k75 K2p12m K2p12m k76 K2p12p1 K2p12p1 k77 K2p12p K2p12p k78 K2p12q1 K2p12q1 k79 K2p12q K2p12q k710 K2p12r1 K2p12r1 k711 K2p12r K2p12r k712 K2p2i1 K2p2i1 k81 K2p2i K2p2i k82 K2p2j1 K2p2j1 k83 K2p2j K2p2j k84 K2p2m1 K2p2m1 k85 K2p2m K2p2m k86 K2p2p1 K2p2p1 k87 K2p2p K2p2p k88 K2p2q1 K2p2q1 k89 K2p2q K2p2q k810 K2p2r1 K2p2r1 k811 K2p2r K2p2r k812 K2q12i1 K2q12i1 k91 K2q12i K2q12i k92 K2q12j1 K2q12j1 k93 K2q12j K2q12j k94 K2q12m1 K2q12m1 k95 K2q12m K2q12m k96 K2q12p1 K2q12p1 k97 K2q12p K2q12p k98 K2q12q1 K2q12q1 k99 K2q12q K2q12q k910 K2q12r1 K2q12r1 k911 K2q12r K2q12r k912 K2q2i1 K2q2i1 k101 K2q2i K2q2i k102 K2q2j1 K2q2j1 k103 K2q2j K2q2j k104 K2q2m1 K2q2m1 k105 K2q2m K2q2m k106 K2q2p1 K2q2p1 k107 K2q2p K2q2p k108 K2q2q1 K2q2q1 k109 K2q2q K2q2q k1010 K2q2r1 K2q2r1 k1011 K2q2r K2q2r k1012 K2r12i1 K2r12i1 k111 K2r12i K2r12i k112 K2r12j1 K2r12j1 k113 K2r12j K2r12j k114 K2r12m1 K2r12m1 k115 K2r12m K2r12m k116 K2r12p1 K2r12p1 k117 K2r12p K2r12p k118 K2r12q1 K2r12q1 k119 122 MATLAB Functions Used 257 K2r12q K2r12q k1110 K2r12r1 K2r12r1 k1111 K2r12r K2r12r k1112 K2r2i1 K2r2i1 k121 K2r2i K2r2i k122 K2r2j1 K2r2j1 k123 K2r2j K2r2j k124 K2r2m1 K2r2m1 k125 K2r2m K2r2m k126 K2r2p1 K2r2p1 k127 K2r2p K2r2p k128 K2r2q1 K2r2q1 k129 K2r2q K2r2q k1210 K2r2r1 K2r2r1 k1211 K2r2r K2r2r k1212 y K function w QuadTriangleElementSressesENUx1y1x2y2x3y3pu QuadTriangleElementStresses This function returns the element stresses for a quadratic triangular element with modulus of elasticity E Poissons ratio NU coordinates of the node 1 x1y1 coordinates of node 2 x2y2 coordinates of node 3 x3y3 and element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain The size of the element stiffness matrix is 12 x 12 syms x y x4 x1 x22 y4 y1 y22 x5 x2 x32 y5 y2 y32 x6 x1 x32 y6 y1 y32 x21 x2 x1 y21 y2 y1 x23 x2 x3 y23 y2 y3 x46 x4 x6 y46 y4 y6 x13 x1 x3 y13 y1 y3 x16 x1 x6 y16 y1 y6 x31 x3 x1 y31 y3 y1 x54 x5 x4 y54 y5 y4 x24 x2 x4 258 12 The Quadratic Triangular Element y24 y2 y4 x56 x5 x6 y56 y5 y6 x36 x3 x6 y36 y3 y6 x41 x4 x1 y41 y4 y1 x43 x4 x3 y43 y4 y3 x51 x5 x1 y51 y5 y1 x61 x6 x1 y61 y6 y1 x63 x6 x3 y63 y6 y3 N1 x23yy3y23xx3x46yy6y46xx6 x23y13y23x13x46y16y46x16 N2 x31yy1y31xx1x54yy4y54xx4 x31y21y31x21x54y24y54x24 N3 x21yy1y21xx1x56yy6y56xx6 x21y31y21x31x56y36y56x36 N4 x31yy1y31xx1x23yy3y23xx3 x31y41y31x41x23y43y23x43 N5 x31yy1y31xx1x21yy1y21xx1 x31y51y31x51x21y51y21x51 N6 x21yy1y21xx1x23yy3y23xx3 x21y61y21x61x23y63y23x63 N1x diffN1x N1y diffN1y N2x diffN2x N2y diffN2y N3x diffN3x N3y diffN3y N4x diffN4x N4y diffN4y N5x diffN5x N5y diffN5y N6x diffN6x N6y diffN6y B N1x 0 N2x 0 N3x 0 N4x 0 N5x 0 N6x 0 0 N1y 0 N2y 0 N3y 0 N4y 0 N5y 0 N6y N1y N1x N2y N2x N3y N3x N4y N4x N5y N5x N6y N6x if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU1NU NU 0 NU 1NU 0 0 0 12NU2 end w DBu We also calculate the stresses at the centroid of the element xcent x1 x2 x33 ycent y1 y2 y33 wcent subsw xy xcentycent w doublewcent 122 MATLAB Functions Used 259 function y QuadTriangleElementPStressessigma QuadTriangleElementPStresses This function returns the element principal stresses and their angle given the element stress vector R sigma 1 sigma 22 Q sigma 1 sigma 222 sigma 3sigma 3 M 2sigma3sigma1 sigma2 s1 R sqrtQ s2 R sqrtQ theta atanM2180pi y s1 s2 theta Example 121 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 122 This is the problem solved in Example 111 using linear triangles It will be solved here using quadratic triangles The plate is discretized using quadratic triangles as shown in Fig 123 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 3 6 and 9 3 the reactions at nodes 1 4 and 7 4 the stresses in each element 5 the principal stresses and principal angle for each element w 025 m 05 m Fig 122 Thin Plate for Example 121 125 kN 3125 kN y x 7 3 9 025 m 05 m 3125 kN 4 8 5 6 2 1 Fig 123 Discretization of Thin Plate Using Two Quadratic Triangles 260 12 The Quadratic Triangular Element Solution Use the six steps outlined in Chap 1 to solve this problem using the quadratic trian gular element Step 1 Discretizing the Domain We subdivide the plate into two elements only for illustration purposes More elements must be used in order to obtain reliable results Thus the domain is subdivided into two elements and nine nodes as shown in Fig 123 The total force due to the distributed load is divided between nodes 3 6 and 9 in the ratio 16 23 16 Since the plate is thin a case of plane stress is assumed The units used in the MATLAB calculations are kN and meter Table 121 shows the element connectivity for this example Table 121 Element Connectivity for Example 121 Element Number Node i Node j Node m Node p Node q Node r 1 1 9 7 5 8 4 2 1 3 9 2 6 5 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function QuadTriangleElementStiffness Each matrix has size 12 12 E210e6 E 210000000 NU03 NU 03000 t0025 t 00250 122 MATLAB Functions Used 261 k1QuadTriangleElementStiffnessENUt00050250 0251 k1 10e007 Columns 1 through 7 02019 0 0 00337 00673 00337 0 0 05769 00288 0 00288 01923 01154 0 00288 01442 0 00481 00288 0 00337 0 0 00505 00337 00168 01346 00673 00288 00481 00337 03462 01875 0 00337 01923 00288 00168 01875 06274 0 0 01154 0 01346 0 0 09231 01346 0 01154 0 0 0 02500 0 0 01923 01346 01923 01154 05385 0 0 01154 00673 01346 00673 02500 02692 01154 0 0 02692 01346 03846 01346 07692 0 0 01154 07692 02500 Columns 8 through 12 01346 0 0 02692 01346 0 0 0 01154 07692 01154 01923 01154 0 0 0 01346 00673 0 0 0 01923 01346 02692 01154 0 01154 00673 01346 07692 02500 05385 02500 03846 02500 16731 02500 15385 02500 01346 02500 09231 02500 0 02500 15385 02500 16731 02500 0 02500 0 02500 09231 02500 01346 02500 0 02500 16731 k2QuadTriangleElementStiffnessENUt0005005 0251 k2 10e007 Columns 1 through 7 262 12 The Quadratic Triangular Element 01442 0 00481 00288 0 00288 01923 0 00505 00337 00168 00337 0 01346 00481 00337 03462 01875 00673 00288 01923 00288 00168 01875 06274 00337 01923 01154 0 00337 00673 00337 02019 0 0 00288 0 00288 01923 0 05769 0 01923 01346 01923 01154 0 0 09231 01154 00673 01346 00673 0 0 02500 0 0 02692 01346 02692 01154 0 0 0 01154 07692 01346 07692 02500 0 01346 0 0 0 01154 05385 01154 0 0 0 01346 0 02500 Columns 8 through 12 01154 0 0 0 01154 00673 0 0 01346 0 01346 02692 01154 0 0 00673 01346 07692 0 0 0 02692 01346 0 01346 0 01154 07692 01154 0 02500 0 02500 05385 02500 16731 02500 0 02500 15385 02500 09231 02500 03846 02500 0 02500 16731 02500 01346 02500 03846 02500 09231 02500 15385 02500 01346 02500 16731 Step 3 Assembling the Global Stiffness Matrix Since the structure has nine nodes the size of the global stiffness matrix is 18 18 Therefore to obtain K we first set up a zero matrix of size 18 18 then make two calls to the MATLAB function QuadTriangleAssemble since we have two elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros1818 KQuadTriangleAssembleKk1197584 K 10e007 122 MATLAB Functions Used 263 Columns 1 through 7 02019 0 0 0 0 0 02692 0 05769 0 0 0 0 01154 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 02692 01154 0 0 0 0 09231 01346 07692 0 0 0 0 02500 0 01154 0 0 0 0 03846 01346 0 0 0 0 0 02500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00673 00288 0 0 0 0 02692 00337 01923 0 0 0 0 01346 0 0 0 0 0 0 0 0 0 0 0 0 0 02500 0 00288 0 0 0 0 0 00337 0 0 0 0 0 0 Columns 8 through 14 01346 0 01346 0 0 00673 00337 07692 01154 0 0 0 00288 01923 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 02500 03846 02500 0 0 02692 01346 16731 02500 01346 0 0 01154 07692 02500 09231 02500 0 0 0 0 01346 02500 16731 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 01154 0 0 0 0 03462 01875 07692 0 0 0 0 01875 06274 02500 05385 02500 0 0 01923 01154 0 02500 15385 0 0 01346 00673 0 0 01154 0 0 00481 00288 0 01346 0 0 0 00337 00168 264 12 The Quadratic Triangular Element Columns 15 through 18 0 0 0 00337 0 0 00288 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 02500 0 0 02500 0 0 0 05385 02500 0 01346 02500 15385 01154 0 0 0 0 0 0 0 0 0 01923 01346 00481 00337 01154 00673 00288 00168 09231 02500 01923 01346 02500 16731 01154 00673 01923 01154 01442 0 01346 00673 0 00505 KQuadTriangleAssembleKk2139265 K 10e007 Columns 1 through 7 03462 0 01923 01154 00481 00288 02692 0 06274 01346 00673 00337 00168 01154 01923 01346 09231 02500 01923 01154 0 01154 00673 02500 16731 01346 00673 0 00481 00337 01923 01346 03462 01875 0 00288 00168 01154 00673 01875 06274 0 02692 01154 0 0 0 0 09231 01346 07692 0 0 0 0 02500 0 02500 05385 02500 0 0 03846 02500 0 02500 15385 0 0 02500 0 0 0 02500 02692 01346 0 0 0 02500 0 01154 07692 0 00673 00288 0 0 0 0 02692 00337 01923 0 0 0 0 01346 0 0 0 0 0 0 0 0 0 0 0 0 0 02500 0 00625 0 0 00673 00337 0 00625 0 0 0 00288 01923 0 122 MATLAB Functions Used 265 Columns 8 through 14 01346 0 02500 0 0 00673 00337 07692 02500 0 0 0 00288 01923 0 05385 02500 0 02500 0 0 0 02500 15385 02500 0 0 0 0 0 0 02692 01154 0 0 0 0 0 01346 07692 0 0 02500 03846 02500 0 0 02692 01346 16731 02500 01346 0 0 01154 07692 02500 18462 05000 03846 02500 0 0 01346 05000 33462 02500 01346 0 0 0 03846 02500 09231 02500 0 0 0 02500 01346 02500 16731 0 0 01154 0 0 0 0 03462 01875 07692 0 0 0 0 01875 06274 02500 05385 02500 0 0 01923 01154 0 02500 15385 0 0 01346 00673 0 0 02500 02692 01346 00481 00288 0 02500 0 01154 07692 00337 00168 Columns 15 through 18 0 0 0 00625 0 0 00625 0 0 0 0 0 0 0 0 0 0 0 00673 00288 0 0 00337 01923 0 02500 0 0 02500 0 0 0 05385 02500 0 02500 02500 15385 02500 0 0 0 02692 01154 0 0 01346 07692 01923 01346 00481 00337 01154 00673 00288 00168 09231 02500 01923 01346 02500 16731 01154 00673 01923 01154 03462 0 01346 00673 0 06274 266 12 The Quadratic Triangular Element Step 4 Applying the Boundary Conditions The matrix 126 for this structure is obtained using the global stiffness matrix shown above The equation is not written out explicitly below because it is too large The boundary conditions for this problem are given as U1x U1y U4x U4y U7x U7y 0 F2x F2y F5x F5y F8x F8y 0 F3x F9x 3125 F6x 125 F3y F6y F9y 0 128 We next insert the above conditions into the equation not shown represented by 126 and we proceed to the solution step below Step 5 Solving the Equations Solvingtheresultingsystemofequationswillbeperformedbypartitioningmanually and Gaussian elimination with MATLAB First we partition the resulting equation by extracting the submatrix in rows 3 to 6 rows 9 to 12 rows 15 to 18 and columns 3 to 6 columns 9 to 12 columns 15 to 18 Therefore we obtain the following matrix equation showing the numbers to two decimal places only although the MATLAB calculations are carried out using at least four decimal places 106 92 25 19 12 54 25 0 25 0 0 0 0 25 167 13 07 25 154 25 0 0 0 0 0 19 13 35 19 0 0 27 12 0 0 07 03 12 07 19 63 0 0 13 77 0 0 03 19 54 25 0 0 185 50 38 25 54 25 0 25 25 154 0 0 50 335 25 13 25 154 25 0 0 25 27 13 38 25 92 25 0 0 27 12 25 0 12 77 25 13 25 167 0 0 13 77 0 0 0 0 54 25 0 0 92 25 19 13 0 0 0 0 25 154 0 0 25 167 12 07 0 0 07 03 0 25 27 13 19 12 35 0 0 0 03 19 25 0 12 77 13 07 0 63 U2x U2y U3x U3y U5x U5y U6x U6y U8x U8y U9x U9y F2x F2y F3x F3y F5x F5y F6x F6y F8x F8y F9x F9y 129 122 MATLAB Functions Used 267 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3636 K36912 K361518 K91236 K912912 K9121518 K151836 K1518912 K15181518 k 10e007 Columns 1 through 7 09231 02500 01923 01154 05385 02500 0 02500 16731 01346 00673 02500 15385 02500 01923 01346 03462 01875 0 0 02692 01154 00673 01875 06274 0 0 01346 05385 02500 0 0 18462 05000 03846 02500 15385 0 0 05000 33462 02500 0 02500 02692 01346 03846 02500 09231 02500 0 01154 07692 02500 01346 02500 0 0 0 0 05385 02500 0 0 0 0 0 02500 15385 0 0 0 00673 00337 0 02500 02692 0 0 00288 01923 02500 0 01154 Columns 8 through 12 02500 0 0 0 0 0 0 0 0 0 01154 0 0 00673 00288 07692 0 0 00337 01923 02500 05385 02500 0 02500 01346 02500 15385 02500 0 02500 0 0 02692 01154 16731 0 0 01346 07692 0 09231 02500 01923 01346 0 02500 16731 01154 00673 01346 01923 01154 03462 0 07692 01346 00673 0 06274 268 12 The Quadratic Triangular Element f0 0 3125 0 0 0 125 0 0 0 3125 0 f 0 0 31250 0 0 0 125000 0 0 0 31250 0 ukf u 10e005 03575 00673 07050 00843 03405 00144 07018 00302 03352 00372 07045 00257 It is now clear that the horizontal and vertical displacements at node 3 are 07050 m comparedwith07111 minExample111and00843 mrespectivelyThehorizontal and vertical displacements at node 6 are 07018 m and 00302 m respectively The horizontalandverticaldisplacementsatnode9are07045 mcomparedwith06531 m in Example 111 and 00257 m respectively When a larger number of elements is used we expect to get the same result for the horizontal displacements at nodes 3 6 and 9 122 MATLAB Functions Used 269 Step 6 Postprocessing In this step we obtain the reactions at nodes 1 4 and 7 and the stresses in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U00u1400u5800u912 U 10e005 0 0 03575 00673 07050 00843 0 0 03405 00144 07018 00302 0 0 03352 00372 07045 00257 FKU F 34721 19808 00000 00000 31250 00000 118059 00611 00000 00000 270 12 The Quadratic Triangular Element 125000 00000 34721 20419 00000 00000 31250 00000 Thus the horizontal and vertical reactions at node 1 are forces of 34721 kN di rected to the left and 19808 kN directed downwards The horizontal and vertical reactions at node 4 are forces of 118059 kN directed to the left and 00611 kN directed downwards The horizontal and vertical reactions at node 7 are forces of 34721 kN directed to the left and 2049 kN directed upwards Obviously force equilibrium is satisfied for this problem It is noted that the results for the reactions are different than those obtained in Example 111 due to the small number of ele ments used We need to use more elements to get reliable results for the reactions and stresses Next we set up the element nodal displacement vectors u1 and u2 then we calculate the element stresses sigma1 and sigma2 by making calls to the MATLAB function QuadTriangleElementStresses Closedform solutions linear functions in x and y for the stresses in each element are obtained using the MATLAB Symbolic Math Toolbox as shown below Then numerical values for the stresses are computed at the centroid of each element u1U1 U2 U17 U18 U13 U14 U9 U10 U15 U16 U7 U8 u1 10e005 0 0 07045 00257 0 0 03405 00144 03352 03352 0 0 u2U1 U2 U5 U6 U17 U18 U3 U4 U11 U12 U9 U10 122 MATLAB Functions Used 271 u2 10e005 0 0 07050 00843 07045 00257 03575 00673 07018 00302 03405 00144 sigma1QuadTriangleElementStressesENU0005025 00251u1 w 150247392356873141099848423881094951760157141521099596496896 207168146512915110557874322173492475880078570760549798248448x 4864803890048691847898376834431237940039285380274899124224y 22537108853530968254458467377612475880078570760549798248448 297891593675285620945558649863931237940039285380274899124224x 72972058350730368294616150047618970019642690137449562112y 21334601311845219291187434866019158456325028528675187087900672 18087109901839820477315890957956319807040628566084398385987584x 32069275444513018882413583598338685626227668133590597632y sigma1 10e003 43633 49012 00057 sigma2QuadTriangleElementStressesENU0005005 0251u2 272 12 The Quadratic Triangular Element w 37929269428889740812168659845871237940039285380274899124224 23238762952249905302188017013372475880078570760549798248448y 38847112167090910509730070904819903520314283042199192993792x 128819942891932516742881291479519807040628566084398385987584 1901660188245083100431630005634951760157141521099596496896y 388589986593058825088334349341719807040628566084398385987584x 12837013832405060458274624885991158456325028528675187087900672 540841666574818584744390664874319807040628566084398385987584y 582825547428499994252247598338919807040628566084398385987584x sigma2 10e003 30114 00028 00057 Thus it is clear that the stresses at the centroid of element 1 are σx 43633 MPa tensile σy 49012 MPa tensile and τxy 00057 MPa negativeThe stresses at the centroid of element 2 are σx 30114 MPa tensile σy 00028 MPa tensile and τxy 00057 MPa positive It is clear that the stresses in the xdirection approach closely the correct value of 3 MPa tensile at the centroid of element 2 because this element is located away from the supports at the left end of the plate Next we calculate the principal stresses and principal angle for each element by making calls to the MATLAB function QuadTriangleElementPStresses s1QuadTriangleElementPStressessigma1 s1 10e003 49013 43632 00006 s2QuadTriangleElementPStressessigma2 s2 10e003 30114 00028 00001 122 MATLAB Functions Used 273 Thus it is clear that the principal stresses at the centroid of element 1 are σ1 49013 MPa tensile σ2 43632 MPa tensile while the principal angle θp 06 The principal stresses at the centroid of element 2 are σ1 30114 MPa tensile σ2 00028 MPa tensile while the principal angle θp 01 Problems Problem 121 Consider the thin plate problem solved in Example 121 Solve the problem again us ing four quadratic triangular elements instead of two elements as shown in Fig 124 Compare your answers for the displacements at nodes 3 8 and 13 with the answers obtained in the example Compare also the stresses obtained for the four elements with those obtained for the two elements in the example Compare also your answers with those obtained in Example 111 and Problem 111 y x 025 m 05 m 125 kN 3125 kN 3125 kN 11 3 13 6 12 7 8 2 1 10 9 5 4 Fig 124 Discretization of Thin Plate Using Four Quadratic Triangles 13 The Bilinear Quadrilateral Element 131 Basic Equations The bilinear quadrilateral element is a twodimensional finite element with both local and global coordinates It is characterized by linear shape functions in each of the x and y directions This element can be used for plane stress or plane strain problems in elasticity It is a generalization of the 4node rectangular element This is the first isoparametricelementwedealwithinthisbookThebilinearquadrilateralelementhas modulus of elasticity E Poissons ratio ν and thickness t Each bilinear quadrilateral element has four nodes with two inplane degrees of freedom at each node as shown in Fig 131 The global coordinates of the four nodes are denoted by x1 y1 x2 y2 x3 y3 and x4 y4 The order of the nodes for each element is important they should be listed in a counterclockwise direction starting from any node The area of each element should be positive you can actually check this by using the MATLAB function BilinearQuadElementArea which is written specifically for this purpose The element is mapped to a rectangle through the use of the natural coordinates ξ and η as shown in Fig 132 In this case the element stiffness matrix is not written explicitly but calculated through symbolic integration with the aid of the MATLAB Symbolic Math Toolbox The four shape functions for this element are listed explicitly as follows in terms of the natural coordinates ξ and η see 1 3x3y3 2x2y2 1x1y1 4x4y4 x y Fig 131 The Bilinear Quadrilateral Element N1 frac141 xi1 eta N2 frac141 xi1 eta N3 frac141 xi1 eta N4 frac141 xi1 eta 131 The B matrix is given as follows for this element B frac1J B1 B2 B3 B4 132 where each Bi is given by Bi beginbmatrix fracpartial Nipartial xi fracpartial Nipartial eta 0 0 c fracpartial Nipartial eta d fracpartial Nipartial xi c fracpartial Nipartial eta a fracpartial Nipartial xi b fracpartial Nipartial eta endbmatrix 133 and the parameters a b c and d are given by a frac14y1xi 1 y21 xi y31 xi y41 xi b frac14y1eta 1 y21 eta y31 eta y41 eta c frac14x1eta 1 x21 eta x31 eta x41 eta d frac14x1xi 1 x21 xi x31 xi x41 xi 134 J frac18x1 x2 x3 x4 beginbmatrix 0 1 eta eta xi xi 1 eta 1 0 xi 1 xi eta xi eta xi 1 0 eta 1 1 xi xi eta eta 1 0 endbmatrix beginbmatrix y1 y2 y3 y4 endbmatrix 135 For cases of plane stress the matrix D is given by D beginbmatrix fracE1 u2 u 0 u 1 0 0 0 frac1 u2 endbmatrix 136 For cases of plane strain the matrix D is given by D beginbmatrix fracE1 u1 2 u u 0 u 1 u 0 0 0 frac1 2 u2 endbmatrix 137 278 13 The Bilinear Quadrilateral Element Once the global stiffness matrix K is obtained we have the following structure equation KU F 139 where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 139 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the stress vector is obtained for each element as follows σ DB u 1310 where σ is the stress vector in the element of size 3 1 and u is the 8 1 element displacement vector The vector σ is written for each element as σ σx σy τxyT It should be noted that this vector is a linear function of ξ and η Usually numerical results are obtained at the centroid of the element where ξ η 0 The MATLAB function BilinearQuadElementStresses gives two results the general linear stress functions in ξ and η and the numerical values of the stresses at the centroid of the element 132 MATLAB Functions Used The six MATLAB functions used for the bilinear quadrilateral element are BilinearQuadElementAreax1 y1 x2 y2 x3 y3 x4 y4 This function returns the element area given the coordinates of the first node x1 y1 the coordinates of the second node x2 y2 the coordinates of the third node x3 y3 and the coordinates of the fourth node x4 y4 BilinearQuadElementStiffnessE NU t x1 y1 x2 y2 x3 y3 x4 y4 p This function calculates the element stiffness matrix for each bilinear quadrilateral element with modulus of elasticity E Poissons ratio NU thickness t and coordinates x1 y1 for the first node x2 y2 for the second node x3 y3 for the third node and x4 y4 for the fourth node Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the 8 8 element stiffness matrix k BilinearQuadElementStiffness2E NU t x1 y1 x2 y2 x3 y3 x4 y4 p This function calculates the element stiffness matrix for each bilinear quadrilateral element with modulus of elasticity E Poissons ratio NU thickness t and coordinates x1 y1 132 MATLAB Functions Used 279 for the first node x2 y2 for the second node x3 y3 for the third node and x4 y4 for the fourth node Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the 8 8 element stiffness matrix k This function uses a different form of the element equations but produces exactly the same result as the function BilinearQuadElementStiffness The MATALB code for this function is not shown here but is available on the accompanying CDROM BilinearQuadAssembleK k i j m n This function assembles the element stiff ness matrix k of the bilinear quadrilateral element joining nodes i j m and n into the global stiffness matrix K It returns the 2n 2n global stiffness matrix K every time an element is assembled BilinearQuadElementStressesE NU x1 y1 x2 y2 x3 y3 x4 y4 p u This function calculates the element stresses using the modulus of elasticity E Poissons ratio NU the coordinates x1 y1 for the first node x2 y2 for the second node x3 y3 for the third node x4 y4 for the fourth node and the element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the stress vector for the element BilinearQuadElementPStressessigma This function calculates the element prin cipal stresses using the element stress vector sigma It returns a 3 1 vector in the form sigma1 sigma2 thetaT where sigma1 and sigma2 are the principal stresses for the element and theta is the principal angle The following is a listing of the MATLAB source code for each function function y BilinearQuadElementAreax1y1x2y2x3y3x4y4 BilinearQuadElementArea This function returns the area of the bilinear quadrilateral element whose first node has coordinates x1y1 second node has coordinates x2y2 third node has coordinates x3y3 and fourth node has coordinates x4y4 yfirst x1y2y3 x2y3y1 x3y1y22 ysecond x1y3y4 x3y4y1 x4y1y32 y yfirst ysecond function w BilinearQuadElementStiffness ENUhx1y1x2y2x3y3x4y4p BilinearQuadElementStiffness This function returns the element stiffness matrix for a bilinear quadrilateral element with modulus of elasticity E Poissons ratio NU thickness h coordinates of node 1 x1y1 coordinates 280 13 The Bilinear Quadrilateral Element node 3 x3y3 and coordinates of node 4 x4y4 Use p 1 for cases of plane stress and p 2 for cases of plane strain The size of the element stiffness matrix is 8 x 8 syms s t a y1s1y21sy31sy41s4 b y1t1y21ty31ty41t4 c x1t1x21tx31tx41t4 d x1s1x21sx31sx41s4 B1 at14bs14 0 0 cs14dt14 cs14dt14 at14bs14 B2 a1t4b1s4 0 0 c1s4d1t4 c1s4d1t4 a1t4b1s4 B3 at14bs14 0 0 cs14dt14 cs14dt14 at14bs14 B4 a1t4b1s4 0 0 c1s4d1t4 c1s4d1t4 a1t4b1s4 Bfirst B1 B2 B3 B4 Jfirst 0 1t ts s1 t1 0 s1 st st s1 0 t1 1s st t1 0 J x1 x2 x3 x4Jfirsty1 y2 y3 y48 B BfirstJ if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU1NU NU 0 NU 1NU 0 0 0 12NU2 end BD JtransposeBDB r intintBD t 1 1 s 1 1 z hr w doublez function y BilinearQuadAssembleKkijmn BilinearQuadAssemble This function assembles the element stiffness matrix k of the bilinear quadrilateral element with nodes i j m and n into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K2i12i1 K2i12i1 k11 K2i12i K2i12i k12 K2i12j1 K2i12j1 k13 K2i12j K2i12j k14 K2i12m1 K2i12m1 k15 K2i12m K2i12m k16 K2i12n1 K2i12n1 k17 132 MATLAB Functions Used 281 K2i12n K2i12n k18 K2i2i1 K2i2i1 k21 K2i2i K2i2i k22 K2i2j1 K2i2j1 k23 K2i2j K2i2j k24 K2i2m1 K2i2m1 k25 K2i2m K2i2m k26 K2i2n1 K2i2n1 k27 K2i2n K2i2n k28 K2j12i1 K2j12i1 k31 K2j12i K2j12i k32 K2j12j1 K2j12j1 k33 K2j12j K2j12j k34 K2j12m1 K2j12m1 k35 K2j12m K2j12m k36 K2j12n1 K2j12n1 k37 K2j12n K2j12n k38 K2j2i1 K2j2i1 k41 K2j2i K2j2i k42 K2j2j1 K2j2j1 k43 K2j2j K2j2j k44 K2j2m1 K2j2m1 k45 K2j2m K2j2m k46 K2j2n1 K2j2n1 k47 K2j2n K2j2n k48 K2m12i1 K2m12i1 k51 K2m12i K2m12i k52 K2m12j1 K2m12j1 k53 K2m12j K2m12j k54 K2m12m1 K2m12m1 k55 K2m12m K2m12m k56 K2m12n1 K2m12n1 k57 K2m12n K2m12n k58 K2m2iy1 K2m2i1 k61 K2m2i K2m2i k62 K2m2j1 K2m2j1 k63 K2m2j K2m2j k64 K2m2m1 K2m2m1 k65 K2m2m K2m2m k66 K2m2n1 K2m2n1 k67 K2m2n K2m2n k68 K2n12i1 K2n12i1 k71 K2n12i K2n12i k72 K2n12j1 K2n12j1 k73 K2n12j K2n12j k74 K2n12m1 K2n12m1 k75 K2n12m K2n12m k76 K2n12n1 K2n12n1 k77 K2n12n K2n12n k78 K2n2i1 K2n2i1 k81 K2n2i K2n2i k82 K2n2j1 K2n2j1 k83 K2n2j K2n2j k84 K2n2m1 K2n2m1 k85 K2n2m K2n2m k86 282 13 The Bilinear Quadrilateral Element K2n2n1 K2n2n1 k87 K2n2n K2n2n k88 y K function w BilinearQuadElementStresses ENUx1y1x2y2x3y3x4y4pu BilinearQuadElementStresses This function returns the element stress vector for a bilinear quadrilateral element with modulus of elasticity E Poissons ratio NU coordinates of node 1 x1y1 coordinates of node 2 x2y2 coordinates of node 3 x3y3 and coordinates of node 4 x4y4 Use p 1 for cases of plane stress and p 2 for cases of plane strain syms s t a y1s1y21sy31sy41s4 b y1t1y21ty31ty41t4 c x1t1x21tx31tx41t4 d x1s1x21sx31sx41s4 B1 at14bs14 0 0 cs14dt14 cs14dt14 at14bs14 B2 a1t4b1s4 0 0 c1s4d1t4 c1s4d1t4 a1t4b1s4 B3 at14bs14 0 0 cs14dt14 cs14dt14 at14bs14 B4 a1t4b1s4 0 0 c1s4d1t4 c1s4d1t4 a1t4b1s4 Bfirst B1 B2 B3 B4 Jfirst 0 1t ts s1 t1 0 s1 st st s1 0 t1 1s st t1 0 J x1 x2 x3 x4Jfirsty1 y2 y3 y48 B BfirstJ if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU1NU NU 0 NU 1NU 0 0 0 1 2NU2 end w DBu We also calculate the stresses at the centroid of the element wcent subsw st 00 w doublewcent function y BilinearQuadElementPStressessigma BilinearQuadElementPStresses This function returns the element principal stresses and their angle given the element stress vector 132 MATLAB Functions Used 283 R sigma1 sigma22 Q sigma1 sigma222 sigma3sigma3 M 2sigma3sigma1 sigma2 s1 R sqrtQ s2 R sqrtQ theta atanM2180pi y s1 s2 theta Example 131 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 133 This problem was solved in Example 111 using linear triangular elements Solve this problem again using two bilinear quadrilateral elements as shown in Fig 134 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 3 and 6 3 the reactions at nodes 1 and 4 4 the stresses in each element 5 the principal stresses and principal angle for each element w 025 m 05 m Fig 133 Thin Plate for Example 131 9375 kN 9375 kN 4 3 6 1 025 m 5 2 025 m 025 m Fig 134 Discretization of Thin Plate Using Two Bilinear Quadrilaterals Solution Use the six steps outlined in Chap 1 to solve this problem using the bilinear quadri lateral element 284 13 The Bilinear Quadrilateral Element Step 1 Discretizing the Domain We subdivide the plate into two elements only for illustration purposes More elements must be used in order to obtain reliable results Thus the domain is subdivided into two elements and six nodes as shown in Fig 134 The total force due to the distributed load is divided equally between nodes 3 and 6 Since the plate is thin a case of plane stress is assumed The units used in the MATLAB calculations are kN and meter Table 131 shows the element connectivity for this example Table 131 Element Connectivity for Example 131 Element Number Node i Node j Node m Node n 1 1 2 5 4 2 2 3 6 5 Step 2 Writing the Element Stiffness Matrices The two element stiffness matrices k1 and k2 are obtained by making calls to the MATLAB function BilinearQuadElementStiffness Each matrix has size 8 8 E210e6 E 210000000 NU03 NU 03000 h0025 h 00250 k1BilinearQuadElementStiffness ENUh00025002502500251 132 MATLAB Functions Used 285 k1 10e006 Columns 1 through 7 25962 09375 15865 00721 12981 09375 02885 09375 25962 00721 02885 09375 12981 00721 15865 00721 25962 09375 02885 00721 12981 00721 02885 09375 25962 00721 15865 09375 12981 09375 02885 00721 25962 09375 15865 09375 12981 00721 15865 09375 25962 00721 02885 00721 12981 09375 15865 00721 25962 00721 15865 09375 12981 00721 02885 09375 Column 8 00721 15865 09375 12981 00721 02885 09375 25962 k2BilinearQuadElementStiffness ENUh0250050050250250251 k2 10e006 Columns 1 through 7 25962 09375 15865 00721 12981 09375 02885 09375 25962 00721 02885 09375 12981 00721 15865 00721 25962 09375 02885 00721 12981 00721 02885 09375 25962 00721 15865 09375 12981 09375 02885 00721 25962 09375 15865 09375 12981 00721 15865 09375 25962 00721 02885 00721 12981 09375 15865 00721 25962 00721 15865 09375 12981 00721 02885 09375 286 13 The Bilinear Quadrilateral Element Column 8 00721 15865 09375 12981 00721 02885 09375 25962 Step 3 Assembling the Global Stiffness Matrix Since the structure has six nodes the size of the global stiffness matrix is 12 12 Therefore to obtain K we first set up a zero matrix of size 12 12 then make two calls to the MATLAB function BilinearQuadAssemble since we have two elements in the structure Each call to the function will assemble one element The following are the MATLAB commands Kzeros1212 K 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KBilinearQuadAssembleKk11254 K 10e006 132 MATLAB Functions Used 287 Columns 1 through 7 25962 09375 15865 00721 0 0 02885 09375 25962 00721 02885 0 0 00721 15865 00721 25962 09375 0 0 12981 00721 02885 09375 25962 0 0 09375 0 0 0 0 0 0 0 0 0 0 0 0 0 0 02885 00721 12981 09375 0 0 25962 00721 15865 09375 12981 0 0 09375 12981 09375 02885 00721 0 0 15865 09375 12981 00721 15865 0 0 00721 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 12 00721 12981 09375 0 0 15865 09375 12981 0 0 09375 02885 00721 0 0 12981 00721 15865 0 0 0 0 0 0 0 0 0 0 0 0 09375 15865 00721 0 0 25962 00721 02885 0 0 00721 25962 09375 0 0 02885 09375 25962 0 0 0 0 0 0 0 0 0 0 0 0 KBilinearQuadAssembleKk22365 K 10e006 Columns 1 through 7 25962 09375 15865 00721 0 0 02885 09375 25962 00721 02885 0 0 00721 15865 00721 51923 0 15865 00721 12981 00721 02885 0 51923 00721 02885 09375 0 0 15865 00721 25962 09375 0 288 13 The Bilinear Quadrilateral Element 0 0 00721 02885 09375 25962 0 02885 00721 12981 09375 0 0 25962 00721 15865 09375 12981 0 0 09375 12981 09375 05769 0 12981 09375 15865 09375 12981 0 31731 09375 12981 00721 0 0 12981 09375 02885 00721 0 0 0 09375 12981 00721 15865 0 Columns 8 through 12 00721 12981 09375 0 0 15865 09375 12981 0 0 09375 05769 0 12981 09375 12981 0 31731 09375 12981 0 12981 09375 02885 00721 0 09375 12981 00721 15865 09375 15865 00721 0 0 25962 00721 02885 0 0 00721 51923 0 15865 00721 02885 0 51923 00721 02885 0 15865 00721 25962 09375 0 00721 02885 09375 25962 Step 4 Applying the Boundary Conditions The matrix 139 for this structure is obtained as follows using the global stiffness matrix obtained in the previous step 106 260 094 159 007 0 0 029 007 130 094 0 0 094 260 007 029 0 0 007 159 094 130 0 0 159 007 519 0 159 007 130 094 058 0 130 094 007 029 0 519 007 029 094 130 0 317 094 130 0 0 159 007 260 094 0 0 130 094 029 007 0 0 007 029 094 260 0 0 094 130 007 159 029 007 130 094 0 0 260 094 159 007 0 0 007 159 094 130 0 0 094 260 007 029 0 0 130 094 058 0 130 094 159 007 519 0 159 007 094 130 0 317 094 130 007 029 0 519 007 029 0 0 130 094 029 007 0 0 159 007 260 094 0 0 094 130 007 159 0 0 007 029 094 260 U1x U1y U2x U2y U3x U3y U4x U4y U5x U5y U6x U6y F1x F1y F2x F2y F3x F3y F4x F4y F5x F5y F6x F6y 1311 132 MATLAB Functions Used 289 The boundary conditions for this problem are given as U1x U1y U4x U4y 0 F2x F2y F5x F5y 0 F3x 9375 F3y 0 F6x 9375 F6y 0 1312 Inserting the above conditions into 1311 we obtain 106 260 094 159 007 0 0 029 007 130 094 0 0 094 260 007 029 0 0 007 059 094 130 0 0 159 007 519 0 159 007 130 094 058 0 130 094 007 029 0 519 007 029 094 130 0 317 094 130 0 0 159 007 260 094 0 0 130 094 029 007 0 0 007 029 094 260 0 0 094 130 007 159 029 007 130 094 0 0 260 094 159 007 0 0 007 159 094 130 0 0 094 260 007 029 0 0 130 094 058 0 130 094 159 007 519 0 159 007 094 130 0 317 094 130 007 029 0 519 007 029 0 0 130 094 029 007 0 0 159 007 260 094 0 0 094 130 007 159 0 0 007 029 094 260 0 0 U2x U2y U3x U3y 0 0 U5x U5y U6x U6y F1x F1y 0 0 9375 0 F4x F4y 0 0 9375 0 1313 Step 5 Solving the Equations Solving the system of equations in 1313 will be performed by partitioning man ually and Gaussian elimination with MATLAB First we partition 1313 by ex tracting the submatrices in rows 3 to 6 rows 9 to 12 and columns 3 to 6 columns 9 to 12 Therefore we obtain 106 519 0 159 007 058 0 130 094 0 519 007 029 0 317 094 130 159 007 260 094 130 094 029 007 007 029 094 260 094 130 007 159 058 0 130 094 519 0 159 007 0 317 094 130 0 519 007 029 130 094 029 007 159 007 260 094 094 130 007 159 007 029 094 260 290 13 The Bilinear Quadrilateral Element U2x U2y U3x U3y U5x U5y U6x U6y 0 0 9375 0 0 0 9375 0 1314 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3636 K36912 K91236 K912912 k 10e006 Columns 1 through 7 51923 0 15865 00721 05769 0 12981 0 51923 00721 02885 0 31731 09375 15865 00721 25962 09375 12981 09375 02885 00721 02885 09375 25962 09375 12981 00721 05769 0 12981 09375 51923 0 15865 0 31731 09375 12981 0 51923 00721 12981 09375 02885 00721 15865 00721 25962 09375 12981 00721 15865 00721 02885 09375 Column 8 09375 12981 00721 15865 00721 02885 09375 25962 f0 0 9375 0 0 0 9375 0 132 MATLAB Functions Used 291 f 0 0 93750 0 0 0 93750 0 ukf u 10e005 03440 00632 07030 00503 03440 00632 07030 00503 It is now clear that the horizontal and vertical displacements at node 3 are 07030 m compared with 07111 m in Example 111 and 00503 m respectively and the hor izontal and vertical displacements at node 6 are 07030 m compared with 06531 m in Example 111 and 00503 m respectively Step 6 Postprocessing In this step we obtain the reactions at nodes 1 and 4 and the stresses in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U00u1400u58 U 10e005 0 0 03440 292 13 The Bilinear Quadrilateral Element 00632 07030 00503 0 0 03440 00632 07030 00503 FKU F 93750 19741 00000 0 93750 00000 93750 19741 00000 00000 93750 00000 Thusthehorizontalandverticalreactionsatnode1areforcesof9375 kNdirected to the left and 19741 kN directed downwards The horizontal and vertical reactions atnode4areforcesof9375 kNdirectedtotheleftand19741 kNdirectedupwards Obviously force equilibrium is satisfied for this problem Next we set up the element nodal displacement vectors u1 and u2 then we calculate the element stresses sigma1 and sigma2 by making calls to the MATLAB function BilinearQuadElementStresses Closedform solutions linear functions in ξ and η denoted by s and t in the results below for the stresses in each element are obtained using the MATLAB Symbolic Math Toolbox as shown below Then numerical values for the stresses are computed at the centroid of each element u1U1 U2 U3 U4 U9 U10 U7 U8 u1 10e005 132 MATLAB Functions Used 293 0 0 03440 00632 03440 00632 0 0 u2U3 U4 U5 U6 U11 U12 U9 U10 u2 10e005 03440 00632 07030 00503 07030 00503 03440 00632 sigma1BilinearQuadElementStressesENU000250 02502500251u1 w 237684487542792996191689909541265792281625142643375935 439503366968997415384614939614081257132168796771975168 t1386197521682649530761032489878179228162514264337593 543950336s 585147095435950280896220247524471584563250285286751870 879006721045349612307692119807040628566084398385987584 t9241316811217664731861929143048915845632502852867518 7087900672s 81304969846153831584563250285286751870879006722439149 095384614939614081257132168796771975168s3234460883926 1822384424091430489158456325028528675187087900672t sigma1 10e003 294 13 The Bilinear Quadrilateral Element 30000 03693 00000 sigma2BilinearQuadElementStressesENU0250050 050250250251u2 w 774333046153846139614081257132168796771975168t23768 4487542792979807838973608303792281625142643375935439503 36282146398218592407036307198416379228162514264337593 543950336s 116149956923076919807040628566084398385987584t8464 391946557790940868183889299158456325028528675187087900 67218809759881239496231576767963047158456325028528675 187087900672s 271016566153846139614081257132168796771975168s40652 484923076915158456325028528675187087900672658341595843 3822830847167963047158456325028528675187087900672t sigma2 10e003 30000 00534 00000 Thus it is clear that the stresses at the centroid of element 1 are σx 30000 MPa tensile σy 03693 MPa tensile and τxy 00000 MPa The stresses at the centroid of element 2 are σx 30000 MPa tensile σy 00534 MPa compres sive and τxy 00000 MPa It is clear that the stresses in the xdirection approach closely the correct value of 3 MPa tensile at the centroids of both elements Next we calculate the principal stresses and principal angle for each element by making calls to the MATLAB function BilinearQuadElementPStresses s1BilinearQuadElementPStressessigma1 s1 10e003 132 MATLAB Functions Used 295 30000 03693 00000 s2BilinearQuadElementPStressessigma2 s2 10e003 30000 00534 00000 Thus it is clear that the principal stresses at the centroid of element 1 are σ1 30000 MPa tensile σ2 03693 MPa tensile while the principal angle θp 0 The principal stresses at the centroid of element 2 are σ1 30000 MPa tensile σ2 00534 MPa compressive while the principal angle θp 0 Example 132 Consider the thin plate subjected to both a uniformly distributed load and a concen trated load as shown in Fig 135This problem was solved previously in Example 112 using linear triangular elements Solve this problem again using three bilinear quadri lateral elements as shown in Fig 136 Given E 210 GPa ν 03 t 0025 m and w 100 kNm determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at each node 3 the reactions at nodes 1 4 and 7 4 the stresses in each element 5 the principal stresses in each element P 025 m 025 m 05 m 05 m w Fig 135 Thin Plate with a Distributed Load and a Concentrated Load for Example 132 296 13 The Bilinear Quadrilateral Element 7 8 5 1 2 6 3 025 m 025 m 025 m 025 m 4 125 kN Fig 136 Discretization of Thin Plate Using Three Bilinear Quadrilaterals Solution Use the six steps outlined in Chap 1 to solve this problem using the bilinear quadri lateral element Step 1 Discretizing the Domain We subdivide the plate into three elements and eight nodes as shown in Fig 136 The total force due to the distributed load is divided equally between nodes 5 and 6 However the resultant applied force at node 6 cancels out and we are left with a concentrated force of 125 kN applied vertically downwards at node 5 Since the plate is thin a case of plane stress is assumed The units used in the MATLAB calculations are kN and meter Table 132 shows the element connectivity for this example Table 132 Element Connectivity for Example 132 Element Number Node i Node j Node m Node n 1 1 2 5 4 2 2 3 6 5 3 4 5 8 7 Step 2 Writing the Element Stiffness Matrices The three element stiffness matrices are obtained by making calls to the MATLAB function BilinearQuadElementStiffness Each matrix has size 8 8 E210e6 E 210000000 132 MATLAB Functions Used 297 NU03 NU 03000 h0025 h 00250 k1BilinearQuadElementStiffness ENUh00025002502500251 k1 10e006 Columns 1 through 7 25962 09375 15865 00721 12981 09375 02885 09375 25962 00721 02885 09375 12981 00721 15865 00721 25962 09375 02885 00721 12981 00721 02885 09375 25962 00721 15865 09375 12981 09375 02885 00721 25962 09375 15865 09375 12981 00721 15865 09375 25962 00721 02885 00721 12981 09375 15865 00721 25962 00721 15865 09375 12981 00721 02885 09375 Column 8 00721 15865 09375 12981 00721 02885 09375 25962 k2BilinearQuadElementStiffness ENUh0250050050250250251 298 13 The Bilinear Quadrilateral Element k2 10e006 Columns 1 through 7 25962 09375 15865 00721 12981 09375 02885 09375 25962 00721 02885 09375 12981 00721 15865 00721 25962 09375 02885 00721 12981 00721 02885 09375 25962 00721 15865 09375 12981 09375 02885 00721 25962 09375 15865 09375 12981 00721 15865 09375 25962 00721 02885 00721 12981 09375 15865 00721 25962 00721 15865 09375 12981 00721 02885 09375 Column 8 00721 15865 09375 12981 00721 02885 09375 25962 k3BilinearQuadElementStiffness ENUh0025025025025050051 k3 10e006 Columns 1 through 7 25962 09375 15865 00721 12981 09375 02885 09375 25962 00721 02885 09375 12981 00721 15865 00721 25962 09375 02885 00721 12981 00721 02885 09375 25962 00721 15865 09375 12981 09375 02885 00721 25962 09375 15865 09375 12981 00721 15865 09375 25962 00721 02885 00721 12981 09375 15865 00721 25962 00721 15865 09375 12981 00721 02885 09375 132 MATLAB Functions Used 299 Column 8 00721 15865 09375 12981 00721 02885 09375 25962 Step 3 Assembling the Global Stiffness Matrix Since the structure has eight nodes the size of the global stiffness matrix is 16 16 Therefore to obtain K we first set up a zero matrix of size 1616 then make three calls to the MATLAB function BilinearQuadAssemble since we have three elements in the structure Each call to the function will assemble one element The following are the MATLAB commands The result is shown only after the last element is assembled Kzeros1616 KBilinearQuadAssembleKk11254 KBilinearQuadAssembleKk22365 KBilinearQuadAssembleKk34587 K 10e006 Columns 1 through 7 25962 09375 15865 00721 0 0 02885 09375 25962 00721 02885 0 0 00721 15865 00721 51923 0 15865 00721 12981 00721 02885 0 51923 00721 02885 09375 0 0 15865 00721 25962 09375 0 0 0 00721 02885 09375 25962 0 02885 00721 12981 09375 0 0 51923 00721 15865 09375 12981 0 0 0 12981 09375 05769 0 12981 09375 31731 09375 12981 0 31731 09375 12981 0 0 0 12981 09375 02885 00721 0 300 13 The Bilinear Quadrilateral Element 0 0 09375 12981 00721 15865 0 0 0 0 0 0 0 02885 0 0 0 0 0 0 00721 0 0 0 0 0 0 12981 0 0 0 0 0 0 09375 Columns 8 through 14 00721 12981 09375 0 0 0 0 15865 09375 12981 0 0 0 0 09375 05769 0 12981 09375 0 0 12981 0 31731 09375 12981 0 0 0 12981 09375 02885 00721 0 0 0 09375 12981 00721 15865 0 0 0 31731 0 0 0 02885 00721 51923 0 05769 0 0 00721 15865 0 77885 09375 15865 00721 12981 09375 05769 09375 77885 00721 02885 09375 12981 0 15865 00721 25962 09375 0 0 0 00721 02885 09375 25962 0 0 00721 12981 09375 0 0 25962 09375 15865 09375 12981 0 0 09375 25962 09375 02885 00721 0 0 15865 00721 12981 00721 15865 0 0 00721 02885 Columns 15 through 16 0 0 0 0 0 0 0 0 0 0 0 0 12981 09375 09375 12981 02885 00721 00721 15865 0 0 0 0 15865 00721 00721 02885 25962 09375 09375 25962 132 MATLAB Functions Used 301 Step 4 Applying the Boundary Conditions The matrix 139 for this structure is obtained using the global stiffness matrix shown above The boundary conditions for this problem are given as U1x U1y U4x U4y U7x U7y 0 F2x F2y F3x F3y F6x F6y F8x F8y 0 F5x 0 F5y 125 1315 Step 5 Solving the Equations Solvingtheresultingsystemofequationswillbeperformedbypartitioningmanually and Gaussian elimination with MATLAB First we partition the matrix equation by extracting the submatrices in rows 3 to 6 rows 9 to 12 rows 15 to 16 and columns 3 to 6 columns 9 to 12 columns 15 to 16 Therefore we obtain 106 519 0 159 007 058 0 130 094 0 0 0 519 007 029 0 317 094 130 0 0 159 007 260 094 130 094 029 007 0 0 007 029 094 260 094 130 007 159 0 0 058 0 130 094 779 094 159 007 029 007 0 317 094 130 094 779 007 029 007 159 130 094 029 007 159 007 260 094 0 0 094 130 007 159 007 029 094 260 0 0 0 0 0 0 029 007 0 0 260 094 0 0 0 0 007 159 0 0 094 260 U2x U2y U3x U3y U5x U5y U6x U6y U8x U8y F2x F2y F3x F3y F5x F5y F6x F6y F8x F8y 1316 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3636 K36912 K361516 K91236 K912912 K9121516 K151636 K1516912 K15161516 302 13 The Bilinear Quadrilateral Element k 10e006 Columns 1 through 7 51923 0 15865 00721 05769 0 12981 0 51923 00721 02885 0 31731 09375 15865 00721 25962 09375 12981 09375 02885 00721 02885 09375 25962 09375 12981 00721 05769 0 12981 09375 77885 09375 15865 0 31731 09375 12981 09375 77885 00721 12981 09375 02885 00721 15865 00721 25962 09375 12981 00721 15865 00721 02885 09375 0 0 0 0 02885 00721 0 0 0 0 0 00721 15865 0 Columns 8 through 10 09375 0 0 12981 0 0 00721 0 0 15865 0 0 00721 02885 00721 02885 00721 15865 09375 0 0 25962 0 0 0 25962 09375 0 09375 25962 f0 0 0 0 0 125 0 0 0 0 f 0 0 0 0 0 125000 0 0 0 0 132 MATLAB Functions Used 303 ukf u 10e005 01396 03536 01329 05406 00018 04216 00086 05176 01202 03010 The horizontal and vertical displacements are shown clearly above for the five free nodes in the structure These results can be compared with those obtained in Example 112 using linear triangular elements We note that the vertical displacement at node 5 is obtained here as 04216 m while the result obtained in Example 112 was 04170 m It is clear that these results are very close to each other indicating that the two types of elements and meshes used give similar results in this case Step 6 Postprocessing In this step we obtain the reactions at nodes 1 4 and 7 using MATLAB as follows We set up the global nodal displacement vector U then we calculate the global nodal force vector F U00u1400u5800u910 U 10e005 0 0 01396 03536 01329 05406 0 0 00018 304 13 The Bilinear Quadrilateral Element 04216 00086 05176 0 0 01202 03010 FKU F 63994 43354 00000 00000 0 00000 02988 36296 00000 125000 00000 00000 61006 45350 00000 00000 The reactions are shown clearly aboveThese results can also be compared to those obtained in Example 112 We note that the horizontal and vertical reactions at node 1 are 63394 kN and 43354 kN respectively while those obtained in Example 112 were 64061 kN and 42228 kN respectively It is also seen that the results obtained using the two types of elements and meshes give very similar results The stresses in each element are obtained by making successive calls to the MATLAB function BilinearQuadElementStresses as follows u1U1 U2 U3 U4 U9 U10 U7 U8 u1 10e005 132 MATLAB Functions Used 305 0 0 01396 03536 00018 04216 0 0 u2U3 U4 U5 U6 U11 U12 U9 U10 u2 10e005 01396 03536 01329 05406 00086 05176 00018 04216 u3U7 U8 U9 U10 U15 U16 U13 U14 u3 10e005 0 0 00018 04216 01202 03010 0 0 sigma1BilinearQuadElementStresses ENU00025002502500251u1 306 13 The Bilinear Quadrilateral Element w 3702445501098258470367893952681855507060240091291760 59868128215043309659854333919888219742166795649507060 2400912917605986812821504t186494650732390728083186584 002319807040628566084398385987584s 1279463389075034544413437997763611253530120045645880 29934064107524964489781500879191198538429124212535301 200456458802993406410752t1243297671549271681118262029 338739614081257132168796771975168s 5191792435548528286210453115489023507060240091291760 59868128215041158380949016871811279658966795649507060 2400912917605986812821504s435154185042245032194102029 338739614081257132168796771975168t sigma1 10e003 07302 05047 10239 sigma2BilinearQuadElementStresses ENU0250050050250250251u2 w 57997545156923072895070602400912917605986812821504t 8881071464668407150706024009129176059868128215042495 737237742290400501930869623198070406285660843983859875 84s 8699631773538459812535301200456458802993406410752t 4791815496465182417759008406721572535301200456458802 9934064107521663824825161527148539943869578739614081 257132168796771975168s 20299140804923072895070602400912917605986812821504 s2767079140430768681507060240091291760598681282150 458233868880653442678378386957873961408125713216879 6771975168t sigma2 00000 1890038 00000 sigma3BilinearQuadElementStresses ENU0025025025025050051u3 132 MATLAB Functions Used 307 w 37024455010982584505459247357200015070602400912917605 98681282150427710374781756561856735113630533755070602 400912917605986812821504t1653842507445352701421108405 2879903520314283042199192993792s 18396306602796367789306535146608372535301200456458802 99340641075241565562172634837417184772702287525353012 00456458802993406410752t11025616716302352766692986279 00319807040628566084398385987584s 4949412366277303518648709229360065507060240091291760 59868128215049698631173614795397343113630533755070602 400912917605986812821504s3858965850705822969982586279 00319807040628566084398385987584t sigma3 7301786 7256064 9760995 Thus it is clear that the stresses at the centroid of element 1 are σx 07302 MPa compressive σy 05047 MPa compressive and τxy 10239 MPa negative The stresses at the centroid of element 2 are σx 00000 MPa σy 01890 MPa compressive and τxy 00000 MPa The stresses at the centroid of element 3 are σx 07302 MPa tensile σy 07256 MPa tensile and τxy 09761 MPa negative We cannot compare these results with Example 112 because the stresses were not calculated in that example However accurate results for the stresses can be obtained by refining the mesh and using more elements Next we calculate the prin cipal stresses and principal angle for each element by making calls to the MATLAB function BilinearQuadElementPStresses s1BilinearQuadElementPStressessigma1 s1 10e003 04127 16475 00419 s2BilinearQuadElementPStressessigma2 s2 00000 1890038 00000 308 13 The Bilinear Quadrilateral Element s3BilinearQuadElementPStressessigma3 s3 10e003 17040 02482 00449 Thus it is clear that the principal stresses at the centroid of element 1 are σ1 04127 MPa tensile σ2 16475 MPa compressive while the prin cipal angle θp 419 The principal stresses at the centroid of element 2 are σ1 00000 MPa σ2 01890 MPa compressive while the principal angle θp 0 The principal stresses at the centroid of element 3 are σ1 17040 MPa tensile σ2 02482 MPa compressive while the principal angle θp 449 Problems Problem 131 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 133 This problem was solved in Example 131 using two bilinear quadrilateral elements Solve this problem again using eight bilinear quadrilateral elements as shown in Fig 137 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 5 10 and 15 3 the reactions at nodes 1 6 and 11 4 the stresses in each element 5 the principal stresses and principal angle for each element Compare your answers with those obtained in Example 131 Example 111 Prob lem 111 Example 121 and Problem 121 8 2 3 4 5 6 7 9 10 11 12 1 13 14 15 46875 kN 9375 kN 46875 kN 0125 m 0125 m 0125 m 0125 m 0125 m 0125 m Fig 137 Discretization of Thin Plate Using Eight Bilinear Quadrilaterals 132 MATLAB Functions Used 309 Problem 132 Consider the thin plate with a hole in the middle that is subjected to a concentrated load at the corner as shown in Fig 138 Given E 70 GPa ν 025 t 002 m and P 20 kN use the finite element mesh comprised of bilinear quadrilaterals shown in Fig 139 to determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 4 6 7 10 11 and 16 3 the reactions at nodes 1 5 9 and 13 4 the stresses in each element 5 the principal stresses and principal angle for each element Compare the results obtained for the displacements and reactions with those ob tained in Problem 112 P hole 03 m 03 m 03 m 03 m 03 m 03 m Fig 138 Thin Plate with a Hole for Problem 132 8 2 3 4 5 6 7 9 16 20 kN 03 m 03 m 03 m 03 m 03 m 03 m 1 15 14 13 12 11 10 Fig 139 Discretization of Thin Plate with a Hole Using Eight Bilinear Quadrilaterals 310 13 The Bilinear Quadrilateral Element Problem 133 Consider the thin plate supported on three springs and subjected to a uniformly dis tributed load as shown in Fig 1310 Given E 200 GPa ν 03 t 001 m k 4000 kNm and w 5000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 1 2 3 4 5 and 6 3 the reactions at nodes 7 8 and 9 4 the stresses in each element 5 the principal stresses and principal angle for each element 6 the force in each spring Use two bilinear quadrilaterals to solve this problem Compare your answers with those obtained for Problem 113 k k k w 04 m 1 6 3 4 035 m 9 7 8 5 2 035 m Fig 1310 Thin Plate Supported on Three Springs for Problem 133 14 The Quadratic Quadrilateral Element 141 Basic Equations Thequadraticquadrilateralelementisatwodimensionalfiniteelementwithbothlocal and global coordinates It is characterized by quadratic shape functions in each of the x and y directions This element can be used for plane stress or plane strain problems in elasticity This is the second isoparametric element we deal with in this book The quadratic quadrilateral element has modulus of elasticity E Poissons ratio ν and thickness t Each quadratic quadrilateral element has eight nodes with two inplane degrees of freedom at each node as shown in Fig 141 The global coordinates of the eight nodes are denoted by x1 y1 x2 y2 x3 y3 x4 y4 x5 y5 x6 y6 x7 y7 and x8 y8 The order of the nodes for each element is important they should be listed in a counterclockwise direction starting from the corner nodes followed by the midside nodes The area of each element should be positive you can actually check this by using the MATLAB function QuadraticQuadElementArea which is written specifically for this purpose The element is mapped to a rectangle through the use of the natural coordinates ξ and η as shown in Fig 142 In this case the element stiffness matrix is not written explicitly but calculated through symbolic integration with the aid of the MATLAB Symbolic Math Toolbox The eight shape functions for this element are listed explicitly as follows in terms of the natural coordinates ξ and η see 1 8 x y 2 3 4 5 6 7 1 Fig 141 The Quadratic Quadrilateral Element 312 14 The Quadratic Quadrilateral Element 7 ξ η 211 111 311 411 5 6 8 Fig 142 The Quadratic Quadrilateral Element with Natural Coordinates N1 1 41 ξ1 ηξ η 1 N2 1 41 ξ1 ηξ η 1 N3 1 41 ξ1 ηξ η 1 N4 1 41 ξ1 ηξ η 1 N5 1 21 η1 ξ1 ξ N6 1 21 ξ1 η1 η N7 1 21 η1 ξ1 ξ N8 1 21 ξ1 η1 η 141 The Jacobian matrix for this element is given by J x ξ y ξ x η y η 142 where x and y are given by x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 143 The B matrix is given as follows for this element B DN 144 where D and N are given by 314 14 The Quadratic Quadrilateral Element K will be of size 2n 2n since we have two degrees of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function QuadraticQuadAssemble which is written specifically for this purpose This process will be illustrated in detail in the examples Once the global stiffness matrix K is obtained we have the following structure equation KU F 1410 where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 1410 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the stress vector is obtained for each element as follows σ DB u 1411 where σ is the stress vector in the element of size 3 1 and u is the 16 1 element displacement vector The vector σ is written for each element as σ σxσyτxyT It should be noted that in this case this vector is a quadratic function of ξ and η Usually numerical results are obtained at the centroid of the element where ξ η 0 The MATLAB function QuadraticQuadElementStresses gives two results the general quadratic stress functions in ξ and η and the numerical values of the stresses at the centroid of the element 142 MATLAB Functions Used The five MATLAB functions used for the quadratic quadrilateral element are QuadraticQuadElementAreax1 y1 x2 y2 x3 y3 x4 y4 This function returns the element area given the coordinates of the first node x1 y1 the coordinates of the second node x2 y2 the coordinates of the third node x3 y3 and the coordinates of the fourth node x4 y4 QuadraticQuadElementStiffnessE NU t x1 y1 x2 y2 x3 y3 x4 y4 p This function calculates the element stiffness matrix for each quadratic quadrilateral ele ment with modulus of elasticity E Poissons ratio NU thickness t and coordinates x1 y1 for the first node x2 y2 for the second node x3 y3 for the third node and x4 y4 for the fourth node Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the 16 16 element stiffness matrix k 142 MATLAB Functions Used 315 QuadraticQuadAssembleK k i j m p q r s t This function assembles the element stiffness matrix k of the quadratic quadrilateral element joining nodes i j m p q r s and t into the global stiffness matrix K It returns the 2n 2n global stiffness matrix K every time an element is assembled QuadraticQuadElementStressesE NU x1 y1 x2 y2 x3 y3 x4 y4 p u This function calculates the element stresses using the modulus of elasticity E Poissons ratio NU the coordinates x1 y1 for the first node x2 y2 for the second node x3 y3 for the third node x4 y4 for the fourth node and the element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain It returns the stress vector for the element QuadraticQuadElementPStressessigma This function calculates the element prin cipal stresses using the element stress vector sigma It returns a 3 1 vector in the form sigma1 sigma2 thetaT where sigma1 and sigma2 are the principal stresses for the element and theta is the principal angle The following is a listing of the MATLAB source code for each function function y QuadraticQuadElementAreax1y1x2y2x3y3x4y4 QuadraticQuadElementArea This function returns the area of the quadratic quadrilateral element whose first node has coordinates x1y1 second node has coordinates x2y2 third node has coordinates x3y3 and fourth node has coordinates x4y4 yfirst x1y2y3 x2y3y1 x3y1y22 ysecond x1y3y4 x3y4y1 x4y1y32 y yfirst ysecond function w QuadraticQuadElementStiffness ENUhx1y1x2y2x3y3x4y4p QuadraticQuadElementStiffness This function returns the element stiffness matrix for a quadratic quadrilateral element with modulus of elasticity E Poissons ratio NU thickness h coordinates of node 1 x1y1 coordinates of node 2 x2y2 coordinates of node 3 x3y3 and coordinates of node 4 x4y4 Use p 1 for cases of plane stress and p 2 for cases of plane strain The size of the element stiffness matrix is 16 x 16 316 14 The Quadratic Quadrilateral Element syms s t x5 x1 x22 x6 x2 x32 x7 x3 x42 x8 x4 x12 y5 y1 y22 y6 y2 y32 y7 y3 y42 y8 y4 y12 N1 1s1tst14 N2 1s1tst14 N3 1s1tst14 N4 1s1tst14 N5 1t1s1s2 N6 1s1t1t2 N7 1t1s1s2 N8 1s1t1t2 x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 xs diffxs xt diffxt ys diffys yt diffyt J xsyt ysxt N1s diffN1s N2s diffN2s N3s diffN3s N4s diffN4s N5s diffN5s N6s diffN6s N7s diffN7s N8s diffN8s N1t diffN1t N2t diffN2t N3t diffN3t N4t diffN4t N5t diffN5t N6t diffN6t N7t diffN7t N8t diffN8t B11 ytN1s ysN1t B12 0 B13 ytN2s ysN2t B14 0 B15 ytN3s ysN3t B16 0 B17 ytN4s ysN4t B18 0 B19 ytN5s ysN5t B110 0 B111 ytN6s ysN6t B112 0 B113 ytN7s ysN7t 142 MATLAB Functions Used 317 B114 0 B115 ytN8s ysN8t B116 0 B21 0 B22 xsN1t xtN1s B23 0 B24 xsN2t xtN2s B25 0 B26 xsN3t xtN3s B27 0 B28 xsN4t xtN4s B29 0 B210 xsN5t xtN5s B211 0 B212 xsN6t xtN6s B213 0 B214 xsN7t xtN7s B215 0 B216 xsN8t xtN8s B31 xsN1t xtN1s B32 ytN1s ysN1t B33 xsN2t xtN2s B34 ytN2s ysN2t B35 xsN3t xtN3s B36 ytN3s ysN3t B37 xsN4t xtN4s B38 ytN4s ysN4t B39 xsN5t xtN5s B310 ytN5s ysN5t B311 xsN6t xtN6s B312 ytN6s ysN6t B313 xsN7t xtN7s B314 ytN7s ysN7t B315 xsN8t xtN8s B316 ytN8s ysN8t B B11 B12 B13 B14 B15 B16 B17 B18 B19 B110 B111 B112 B113 B114 B115 B116 B21 B22 B23 B24 B25 B26 B27 B28 B29 B210 B211 B212 B213 B214 B215 B216 B31 B32 B33 B34 B35 B36 B37 B38 B39 B310 B311 B312 B313 B314 B315 B316 if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU 1NU NU 0 NU 1NU 0 0 0 12NU2 end Bnew simplifyB Jnew simplifyJ BD transposeBnewDBnewJnew r intintBD t 1 1 s 1 1 z hr w doublez 318 14 The Quadratic Quadrilateral Element function y QuadraticQuadAssembleKkijmpqrst QuadraticQuadAssemble This function assembles the element stiffness matrix k of the quadratic quadrilateral element with nodes i j m p q r s and t into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K2i12i1 K2i12i1 k11 K2i12i K2i12i k12 K2i12j1 K2i12j1 k13 K2i12j K2i12j k14 K2i12m1 K2i12m1 k15 K2i12m K2i12m k16 K2i12p1 K2i12p1 k17 K2i12p K2i12p k18 K2i12q1 K2i12q1 k19 K2i12q K2i12q k110 K2i12r1 K2i12r1 k111 K2i12r K2i12r k112 K2i12s1 K2i12s1 k113 K2i12s K2i12s k114 K2i12t1 K2i12t1 k115 K2i12t K2i12t k116 K2i2i1 K2i2i1 k21 K2i2i K2i2i k22 K2i2j1 K2i2j1 k23 K2i2j K2i2j k24 K2i2m1 K2i2m1 k25 K2i2m K2i2m k26 K2i2p1 K2i2p1 k27 K2i2p K2i2p k28 K2i2q1 K2i2q1 k29 K2i2q K2i2q k210 K2i2r1 K2i2r1 k211 K2i2r K2i2r k212 K2i2s1 K2i2s1 k213 K2i2s K2i2s k214 K2i2t1 K2i2t1 k215 K2i2t K2i2t k216 K2j12i1 K2j12i1 k31 K2j12i K2j12i k32 K2j12j1 K2j12j1 k33 K2j12j K2j12j k34 K2j12m1 K2j12m1 k35 K2j12m K2j12m k36 K2j12p1 K2j12p1 k37 K2j12p K2j12p k38 K2j12q1 K2j12q1 k39 K2j12q K2j12q k310 K2j12r1 K2j12r1 k311 K2j12r K2j12r k312 142 MATLAB Functions Used 319 K2j12s1 K2j12s1 k313 K2j12s K2j12s k314 K2j12t1 K2j12t1 k315 K2j12t K2j12t k316 K2j2i1 K2j2i1 k41 K2j2i K2j2i k42 K2j2j1 K2j2j1 k43 K2j2j K2j2j k44 K2j2m1 K2j2m1 k45 K2j2m K2j2m k46 K2j2p1 K2j2p1 k47 K2j2p K2j2p k48 K2j2q1 K2j2q1 k49 K2j2q K2j2q k410 K2j2r1 K2j2r1 k411 K2j2r K2j2r k412 K2j2s1 K2j2s1 k413 K2j2s K2j2s k414 K2j2t1 K2j2t1 k415 K2j2t K2j2t k416 K2m12i1 K2m12i1 k51 K2m12i K2m12i k52 K2m12j1 K2m12j1 k53 K2m12j K2m12j k54 K2m12m1 K2m12m1 k55 K2m12m K2m12m k56 K2m12p1 K2m12p1 k57 K2m12p K2m12p k58 K2m12q1 K2m12q1 k59 K2m12q K2m12q k510 K2m12r1 K2m12r1 k511 K2m12r K2m12r k512 K2m12s1 K2m12s1 k513 K2m12s K2m12s k514 K2m12t1 K2m12t1 k515 K2m12t K2m12t k516 K2m2i1 K2m2i1 k61 K2m2i K2m2i k62 K2m2j1 K2m2j1 k63 K2m2j K2m2j k64 K2m2m1 K2m2m1 k65 K2m2m K2m2m k66 K2m2p1 K2m2p1 k67 K2m2p K2m2p k68 K2m2q1 K2m2q1 k69 K2m2q K2m2q k610 K2m2r1 K2m2r1 k611 K2m2r K2m2r k612 K2m2s1 K2m2s1 k613 K2m2s K2m2s k614 K2m2t1 K2m2t1 k615 K2m2t K2m2t k616 K2p12i1 K2p12i1 k71 320 14 The Quadratic Quadrilateral Element K2p12i K2p12i k72 K2p12j1 K2p12j1 k73 K2p12j K2p12j k74 K2p12m1 K2p12m1 k75 K2p12m K2p12m k76 K2p12p1 K2p12p1 k77 K2p12p K2p12p k78 K2p12q1 K2p12q1 k79 K2p12q K2p12q k710 K2p12r1 K2p12r1 k711 K2p12r K2p12r k712 K2p12s1 K2p12s1 k713 K2p12s K2p12s k714 K2p12t1 K2p12t1 k715 K2p12t K2p12t k716 K2p2i1 K2p2i1 k81 K2p2i K2p2i k82 K2p2j1 K2p2j1 k83 K2p2j K2p2j k84 K2p2m1 K2p2m1 k85 K2p2m K2p2m k86 K2p2p1 K2p2p1 k87 K2p2p K2p2p k88 K2p2q1 K2p2q1 k89 K2p2q K2p2q k810 K2p2r1 K2p2r1 k811 K2p2r K2p2r k812 K2p2s1 K2p2s1 k813 K2p2s K2p2s k814 K2p2t1 K2p2t1 k815 K2p2t K2p2t k816 K2q12i1 K2q12i1 k91 K2q12i K2q12i k92 K2q12j1 K2q12j1 k93 K2q12j K2q12j k94 K2q12m1 K2q12m1 k95 K2q12m K2q12m k96 K2q12p1 K2q12p1 k97 K2q12p K2q12p k98 K2q12q1 K2q12q1 k99 K2q12q K2q12q k910 K2q12r1 K2q12r1 k911 K2q12r K2q12r k912 K2q12s1 K2q12s1 k913 K2q12s K2q12s k914 K2q12t1 K2q12t1 k915 K2q12t K2q12t k916 K2q2i1 K2q2i1 k101 K2q2i K2q2i k102 K2q2j1 K2q2j1 k103 K2q2j K2q2j k104 K2q2m1 K2q2m1 k105 K2q2m K2q2m k106 142 MATLAB Functions Used 321 K2q2p1 K2q2p1 k107 K2q2p K2q2p k108 K2q2q1 K2q2q1 k109 K2q2q K2q2q k1010 K2q2r1 K2q2r1 k1011 K2q2r K2q2r k1012 K2q2s1 K2q2s1 k1013 K2q2s K2q2s k1014 K2q2t1 K2q2t1 k1015 K2q2t K2q2t k1016 K2r12i1 K2r12i1 k111 K2r12i K2r12i k112 K2r12j1 K2r12j1 k113 K2r12j K2r12j k114 K2r12m1 K2r12m1 k115 K2r12m K2r12m k116 K2r12p1 K2r12p1 k117 K2r12p K2r12p k118 K2r12q1 K2r12q1 k119 K2r12q K2r12q k1110 K2r12r1 K2r12r1 k1111 K2r12r K2r12r k1112 K2r12s1 K2r12s1 k1113 K2r12s K2r12s k1114 K2r12t1 K2r12t1 k1115 K2r12t K2r12t k1116 K2r2i1 K2r2i1 k121 K2r2i K2r2i k122 K2r2j1 K2r2j1 k123 K2r2j K2r2j k124 K2r2m1 K2r2m1 k125 K2r2m K2r2m k126 K2r2p1 K2r2p1 k127 K2r2p K2r2p k128 K2r2q1 K2r2q1 k129 K2r2q K2r2q k1210 K2r2r1 K2r2r1 k1211 K2r2r K2r2r k1212 K2r2s1 K2r2s1 k1213 K2r2s K2r2s k1214 K2r2t1 K2r2t1 k1215 K2r2t K2r2t k1216 K2s12i1 K2s12i1 k131 K2s12i K2s12i k132 K2s12j1 K2s12j1 k133 K2s12j K2s12j k134 K2s12m1 K2s12m1 k135 K2s12m K2s12m k136 K2s12p1 K2s12p1 k137 K2s12p K2s12p k138 K2s12q1 K2s12q1 k139 K2s12q K2s12q k1310 K2s12r1 K2s12r1 k1311 322 14 The Quadratic Quadrilateral Element K2s12r K2s12r k1312 K2s12s1 K2s12s1 k1313 K2s12s K2s12s k1314 K2s12t1 K2s12t1 k1315 K2s12t K2s12t k1316 K2s2i1 K2s2i1 k141 K2s2i K2s2i k142 K2s2j1 K2s2j1 k143 K2s2j K2s2j k144 K2s2m1 K2s2m1 k145 K2s2m K2s2m k146 K2s2p1 K2s2p1 k147 K2s2p K2s2p k148 K2s2q1 K2s2q1 k149 K2s2q K2s2q k1410 K2s2r1 K2s2r1 k1411 K2s2r K2s2r k1412 K2s2s1 K2s2s1 k1413 K2s2s K2s2s k1414 K2s2t1 K2s2t1 k1415 K2s2t K2s2t k1416 K2t12i1 K2t12i1 k151 K2t12i K2t12i k152 K2t12j1 K2t12j1 k153 K2t12j K2t12j k154 K2t12m1 K2t12m1 k155 K2t12m K2t12m k156 K2t12p1 K2t12p1 k157 K2t12p K2t12p k158 K2t12q1 K2t12q1 k159 K2t12q K2t12q k1510 K2t12r1 K2t12r1 k1511 K2t12r K2t12r k1512 K2t12s1 K2t12s1 k1513 K2t12s K2t12s k1514 K2t12t1 K2t12t1 k1515 K2t12t K2t12t k1516 K2t2i1 K2t2i1 k161 K2t2i K2t2i k162 K2t2j1 K2t2j1 k163 K2t2j K2t2j k164 K2t2m1 K2t2m1 k165 K2t2m K2t2m k166 K2t2p1 K2t2p1 k167 K2t2p K2t2p k168 K2t2q1 K2t2q1 k169 K2t2q K2t2q k1610 K2t2r1 K2t2r1 k1611 K2t2r K2t2r k1612 K2t2s1 K2t2s1 k1613 K2t2s K2t2s k1614 K2t2t1 K2t2t1 k1615 K2t2t K2t2t k1616 y K 142 MATLAB Functions Used 323 function w QuadraticQuadElementSresses ENUx1y1x2y2x3y3x4y4pu QuadraticQuadElementStresses This function returns the element stress vector for a quadratic quadrilateral element with modulus of elasticity E Poissons ratio NU coordinates of node 1 x1y1 coordinates of node 2 x2y2 coordinates of node 3 x3y3 coordinates of node 4 x4y4 and element displacement vector u Use p 1 for cases of plane stress and p 2 for cases of plane strain syms s t x5 x1 x22 x6 x2 x32 x7 x3 x42 x8 x4 x12 y5 y1 y22 y6 y2 y32 y7 y3 y42 y8 y4 y12 N1 1s1tst14 N2 1s1tst14 N3 1s1tst14 N4 1s1tst14 N5 1t1s1s2 N6 1s1t1t2 N7 1t1s1s2 N8 1s1t1t2 x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 xs diffxs xt diffxt ys diffys yt diffyt J xsyt ysxt N1s diffN1s N2s diffN2s N3s diffN3s N4s diffN4s N5s diffN5s N6s diffN6s N7s diffN7s N8s diffN8s N1t diffN1t N2t diffN2t N3t diffN3t N4t diffN4t N5t diffN5t N6t diffN6t 324 14 The Quadratic Quadrilateral Element N7t diffN7t N8t diffN8t B11 ytN1s ysN1t B12 0 B13 ytN2s ysN2t B14 0 B15 ytN3s ysN3t B16 0 B17 ytN4s ysN4t B18 0 B19 ytN5s ysN5t B110 0 B111 ytN6s ysN6t B112 0 B113 ytN7s ysN7t B114 0 B115 ytN8s ysN8t B116 0 B21 0 B22 xsN1t xtN1s B23 0 B24 xsN2t xtN2s B25 0 B26 xsN3t xtN3s B27 0 B28 xsN4t xtN4s B29 0 B210 xsN5t xtN5s B211 0 B212 xsN6t xtN6s B213 0 B214 xsN7t xtN7s B215 0 B216 xsN8t xtN8s B31 xsN1t xtN1s B32 ytN1s ysN1t B33 xsN2t xtN2s B34 ytN2s ysN2t B35 xsN3t xtN3s B36 ytN3s ysN3t B37 xsN4t xtN4s B38 ytN4s ysN4t B39 xsN5t xtN5s B310 ytN5s ysN5t B311 xsN6t xtN6s B312 ytN6s ysN6t B313 xsN7t xtN7s B314 ytN7s ysN7t B315 xsN8t xtN8s B316 ytN8s ysN8t Jnew simplifyJ 142 MATLAB Functions Used 325 B B11 B12 B13 B14 B15 B16 B17 B18 B19 B110 B111 B112 B113 B114 B115 B116 B21 B22 B23 B24 B25 B26 B27 B28 B29 B210 B211 B212 B213 B214 B215 B216 B31 B32 B33 B34 B35 B36 B37 B38 B39 B310 B311 B312 B313 B314 B315 B316Jnew if p 1 D E1NUNU1 NU 0 NU 1 0 0 0 1NU2 elseif p 2 D E1NU12NU 1NU NU 0 NU 1NU 0 0 0 12NU2 end Bnew simplifyB w DBnewu We also calculate the stresses at the centroid of the element wcent subsw st 00 w doublewcent function y QuadraticQuadElementPStressessigma QuadraticQuadElementPStresses This function returns the element principal stresses and their angle given the element stress vector R sigma1 sigma22 Q sigma1 sigma222 sigma3sigma3 M 2sigma3sigma1 sigma2 s1 R sqrtQ s2 R sqrtQ theta atanM2180pi y s1 s2 theta Example 141 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 143 This problem was solved in Example 131 using bilinear quadrilateral elements Solve this problem again using one quadratic quadrilateral element as shown in Fig 144 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 3 5 and 8 3 the reactions at nodes 1 4 and 6 4 the stresses in the element 5 the principal stresses and principal angle for the element 326 14 The Quadratic Quadrilateral Element w 025 m 05 m Fig 143 Thin Plate for Example 141 3125 kN 3125 kN 6 3 8 1 025 m 7 2 05 m 125 kN 4 5 Fig 144 Discretization of Thin Plate Using One Quadratic Quadrilateral Solution Use the six steps outlined in Chap 1 to solve this problem using the quadratic quadri lateral element Step 1 Discretizing the Domain We use one quadratic quadrilateral element to model the plate only for illustration purposes More elements must be used in order to obtain reliable results Thus the domain is subdivided into one element and eight nodes as shown in Fig 144 The total force due to the distributed load is divided between nodes 3 5 and 8 in the ratio 16 23 16 respectively Since the plate is thin a case of plane stress is assumed The units used in the MATLAB calculations are kN and meter Table 141 shows the element connectivity for this example Table 141 Element Connectivity for Example 141 Element Number Node i Node j Node m Node p Node q Node r Node s Node t 1 1 3 8 6 2 5 7 4 Step 2 Writing the Element Stiffness Matrices The element stiffness matrix k1 is obtained by making calls to the MATLAB function QuadraticQuadElementStiffness The matrix has size 16 16 142 MATLAB Functions Used 327 E210e6 E 210000000 NU03 NU 03000 h0025 h 00250 k1QuadraticQuadElementStiffness ENUh000500502500251 k1 10e007 Columns 1 through 7 04000 01771 01660 00024 01769 00729 01801 01771 07250 00024 02494 00729 03207 00024 01660 00024 04000 01771 01801 00024 01769 00024 02494 01771 07250 00024 03780 00729 01769 00729 01801 00024 04000 01771 01660 00729 03207 00024 03780 01771 07250 00024 01801 00024 01769 00729 01660 00024 04000 00024 03780 00729 03207 00024 02494 01771 02295 00737 02295 00737 01551 00417 01551 00929 00128 00929 00128 00417 01218 00417 01987 00417 03397 00929 03397 00929 01987 00417 05196 00737 10189 00737 10189 00417 01551 00417 01551 00417 02295 00737 02295 00417 01218 00417 01218 00929 00128 00929 03397 00929 01987 00417 01987 00417 03397 00737 10189 00417 05196 00417 05196 00737 328 14 The Quadratic Quadrilateral Element Columns 8 through 14 00024 02295 00929 01987 00417 01551 00417 03780 00737 00128 00417 05196 00417 01218 00729 02295 00929 03397 00737 01551 00417 03207 00737 00128 00929 10189 00417 01218 00024 01551 00417 03397 00737 02295 00929 02494 00417 01218 00929 10189 00737 00128 01771 01551 00417 01987 00417 02295 00929 07250 00417 01218 00417 05196 00737 00128 00417 07282 0 0 01667 00410 0 01218 0 07949 01667 0 0 05256 00417 0 01667 08718 0 0 01667 05196 01667 0 0 21051 01667 0 00737 00410 0 0 01667 07282 0 00128 0 05256 01667 0 0 07949 00929 0 01667 02051 0 0 01667 10189 01667 0 0 09718 01667 0 Columns 15 through 16 03397 00737 00929 10189 01987 00417 00417 05196 01987 00417 00417 05196 03397 00737 00929 10189 0 01667 01667 0 02051 0 0 09718 0 01667 01667 0 08718 0 0 21051 Step 3 Assembling the Global Stiffness Matrix Since the structure has eight nodes the size of the global stiffness matrix is 16 16 Therefore to obtain K we first set up a zero matrix of size 16 16 then make one call to the MATLAB function QuadraticQuadAssemble since we have one element in the 142 MATLAB Functions Used 329 structure Each call to the function will assemble one element The following are the MATLAB commands Only the final result is shown after the element is assembled Kzeros1616 KQuadraticQuadAssembleKk113862574 K 10e007 Columns 1 through 7 04000 01771 02295 00929 01660 00024 03397 01771 07250 00737 00128 00024 02494 00929 02295 00737 07282 0 02295 00737 0 00929 00128 0 07949 00929 00128 01667 01660 00024 02295 00929 04000 01771 01987 00024 02494 00737 00128 01771 07250 00417 03397 00929 0 01667 01987 00417 08718 00737 10189 01667 0 00417 05196 0 01987 00417 0 01667 03397 00929 02051 00417 05196 01667 0 00737 10189 0 01801 00024 01551 00417 01769 00729 03397 00024 03780 00417 01218 00729 03207 00929 01551 00417 00410 0 01551 00417 0 00417 01218 0 05256 00417 01218 01667 01769 00729 01551 00417 01801 00024 01987 00729 03207 00417 01218 00024 03780 00417 Columns 8 through 14 00737 01987 00417 01801 00024 01551 00417 10189 00417 05196 00024 03780 00417 01218 01667 0 01667 01551 00417 00410 0 0 01667 0 00417 01218 0 05256 00417 03397 00737 01769 00729 01551 00417 05196 00929 10189 00729 03207 00417 01218 0 02051 0 03397 00929 0 01667 21051 0 09718 00737 10189 01667 0 0 08718 0 01987 00417 0 01667 09718 0 21051 00417 05196 01667 0 00737 01987 00417 04000 01771 02295 00929 10189 00417 05196 01771 07250 00737 00128 330 14 The Quadratic Quadrilateral Element 01667 0 01667 02295 00737 07282 0 0 01667 0 00929 00128 0 07949 00417 03397 00737 01660 00024 02295 00929 05196 00929 10189 00024 02494 00737 00128 Columns 15 through 16 01769 00729 00729 03207 01551 00417 00417 01218 01801 00024 00024 03780 01987 00417 00417 05196 03397 00929 00737 10189 01660 00024 00024 02494 02295 00737 00929 00128 04000 01771 01771 07250 Step 4 Applying the Boundary Conditions The matrix 1410 for this structure is obtained directly using the global stiffness matrix obtained in the previous step however the full matrix equation is not shown here explicitly because it is very large The boundary conditions for this problem are given as U1x U1y U4x U4y U6x U6y 0 F2x F2y F7x F7y F3y F5y F8y 0 F3x 3125 F5x 125 F8x 3125 1412 We next insert the above conditions into the matrix equation for this structure and proceed to the solution step below Step 5 Solving the Equations Solvingtheresultingsystemofequationswillbeperformedbypartitioningmanually and Gaussian elimination with MATLAB First we partition the matrix equation by 142 MATLAB Functions Used 331 extracting the submatrices in rows 3 to 6 rows 9 to 10 rows 13 to 16 and columns 3 to 6 columns 9 to 10 columns 13 to 16 Therefore we obtain 106 728 0 230 074 0 167 041 0 155 042 0 795 093 013 167 0 0 526 042 122 230 093 400 177 340 074 155 042 180 002 074 013 177 725 093 1019 042 122 002 378 0 167 340 093 872 0 0 167 340 093 167 0 074 1019 0 2105 167 0 074 1019 041 0 155 042 0 167 728 0 230 074 0 526 042 122 167 0 0 795 093 013 155 042 180 002 340 074 230 093 400 177 042 122 002 378 093 1019 074 013 177 725 U2x U2y U3x U3y U5x U5y U7x U7y U8x U8y 0 0 3125 0 125 0 0 0 3125 0 1413 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK3636 K36910 K361316 K91036 K910910 K9101316 K131636 K1316910 K13161316 k 10e007 Columns 1 through 7 07282 0 02295 00737 0 01667 00410 0 07949 00929 00128 01667 0 0 02295 00929 04000 01771 03397 00737 01551 00737 00128 01771 07250 00929 10189 00417 0 01667 03397 00929 08718 0 0 01667 0 00737 10189 0 21051 01667 00410 0 01551 00417 0 01667 07282 0 05256 00417 01218 01667 0 0 01551 00417 01801 00024 03397 00737 02295 00417 01218 00024 03780 00929 10189 00737 332 14 The Quadratic Quadrilateral Element Columns 8 through 10 0 01551 00417 05256 00417 01218 00417 01801 00024 01218 00024 03780 01667 03397 00929 0 00737 10189 0 02295 00737 07949 00929 00128 00929 04000 01771 00128 01771 07250 f0 0 3125 0 125 0 0 0 3125 0 f 0 0 31250 0 125000 0 0 0 31250 0 ukf u 10e005 03457 00582 07040 00420 07054 00000 03457 00582 07040 00420 142 MATLAB Functions Used 333 It is now clear that the horizontal and vertical displacements at node 3 are 07040 m compared with 07030 m in Example 131 and 00420 m respectively The horizon tal and vertical displacements at node 8 are 07040 m compared with 07030 m in Example 131 and 00420 m respectivelyThe horizontal and vertical displacements at node 5 are 07054 m and 00000 m respectively Step 6 Postprocessing In this step we obtain the reactions at nodes 1 4 and 6 and the stresses in the element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U00u1400u5600u710 U 10e005 0 0 03457 00582 07040 00420 0 0 07054 00000 0 0 03457 00582 07040 00420 FKU F 37650 16288 00000 00000 31250 00000 334 14 The Quadratic Quadrilateral Element 112200 00000 125000 00000 37650 16288 00000 00000 31250 00000 Thus the horizontal and vertical reactions at node 1 are forces of 37650 kN di rected to the left and 16288 kN directed downwards The horizontal and vertical reactions at node 4 are forces of 112200 kN directed to the left and 00000 kN Thus the horizontal and vertical reactions at node 6 are forces of 37650 kN directed to the left and 16288 kN directed upwards Obviously force equilibrium is satis fied for this problem Next we set up the element nodal displacement vector u1 then we calculate the element stresses sigma1 by making calls to the MATLAB function QuadraticQuadElementStresses Closedform solutions quadratic functions in ξ and η denoted by s and t in the results below for the stresses in the element are obtained using the MATLAB Symbolic Math Toolbox as shown below Then numerical values for the stresses are computed at the centroid of the element u1U1 U2 U5 U6 U15 U16 U11 U12 U3 U4 U9 U10 U13 U14 U7 U8 u1 10e005 0 0 07040 00420 07040 00420 0 0 03457 00582 07054 00000 03457 00582 0 0 142 MATLAB Functions Used 335 sigma1QuadraticQuadElementStressesENU0005005 02500251u1 w 2170726724078205888312916065073484491437270409865864955 98010130648530944t96764073971696635792281625142643375 93543950336s46403787800607050039589981237334844914372 7040986586495598010130648530944ts12742907563074467741 566415872519807040628566084398385987584tˆ216344902767 57110059183885037387979228162514264337593543950336sˆ2 1162030460272220229114528438743333961408125713216879677 1975168 205677119618905186432462221873696898287454081973172991 196020261297061888t5585735540389175408229514503718715 8456325028528675187087900672s6143434498672397871922189 39953696898287454081973172991196020261297061888ts191 143613446116991438560680259903520314283042199192993792 tˆ210896601845047401801783411753905115845632502852867 5187087900672sˆ27786388480578322733783622871679792281 62514264337593543950336 243380095263947140144726972587713169126500570573503741 75801344t13726484855612460151197410298392787593149816 327892691964784081045188247552623338102153846031584563 25028528675187087900672s367109008106015611782160644598 51158456325028528675187087900672ts129200278101383642 6723649091052787593149816327892691964784081045188247552 tˆ2813049698461538319807040628566084398385987584sˆ2 sigma1 10e003 29334 00983 00000 Thusitisclearthatthestressesatthecentroidoftheelementare σx 29334 MPa tensile σy 00983 MPa compressive and τxy 00000 MPa It is clear that the stress in the x direction approaches closely the correct value of 3 MPa ten sile at the centroid of the element It is seen that only one quadratic quadrilat eral element gives accurate results in this problem Next we calculate the principal stresses and principal angle for the element by making calls to the MATLAB function QuadraticQuadElementPStresses 336 14 The Quadratic Quadrilateral Element s1QuadraticQuadElementPStressessigma1 s1 10e003 29334 00983 00000 Thus it is clear that the principal stresses at the centroid of the element are σ1 29334 MPa tensile σ2 00983 MPa compressive while the principal angle θp 0 Problems Problem 141 Consider the thin plate supported on three springs and subjected to a uniformly dis tributed load as shown in Fig 145 Solve this problem using one quadratic quadri lateral element as shown in the figure Given E 200 GPa ν 03 t 001 m k 4000 kNm and w 5000 kNm2 determine 1 the global stiffness matrix for the structure 2 the horizontal and vertical displacements at nodes 1 2 3 6 7 and 8 3 the reactions at nodes 9 10 and 11 4 the stresses in the element 5 the principal stresses and principal angle for the element 6 the force in each spring Compare your answers with those obtained for Problem 113 and Problem 133 k k k w 04 m 1 8 3 6 07 m 11 9 10 7 2 4 5 Fig 145 Thin Plate Supported on Three Springs 15 The Linear Tetrahedral Solid Element and the matrix B is given by In 151 the matrix D is given by 340 15 The Linear Tetrahedral Solid Element Finally once the unknown displacements and reactions are found the stress vector is obtained for each element as follows σ DB u 1511 where σ is the stress vector in the element of size 6 1 and u is the 12 1 element displacement vector The vector σ is written for each element as σ σx σy σz τxy τyz τzxT 152 MATLAB Functions Used The five MATLAB functions used for the linear tetrahedral solid element are TetrahedronElementVolumex1 y1 z1x2 y2 z2x3y3z3 x4 y4 z4Thisfunction returns the element volume given the coordinates of the first node x1 y1 z1 the coordinates of the second node x2 y2 z2 the coordinates of the third node x3 y3 z3 and the coordinates of the fourth node x4 y4 z4 TetrahedronElementStiffnessE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 This function calculates the element stiffness matrix for each linear tetrahedron with modulus of elasticity E Poissons ratio NU and coordinates x1 y1 z1 for the first node x2 y2 z2 for the second node x3 y3 z3 for the third node and x4 y4 z4 for the fourth node It returns the 12 12 element stiffness matrix k TetrahedronAssembleK k i j m n This function assembles the element stiffness matrix k of the linear tetrahedron joining nodes i j m and n into the global stiffness matrix K It returns the 3n 3n global stiffness matrix K every time an element is assembled TetrahedronElementStressesE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 u This function calculates the element stresses using the modulus of elasticity E Poissons ratio NU the coordinates x1 y1 z1 for the first node x2 y2 z2 for the second node x3 y3 z3 for the third node and x4 y4 z4 for the fourth node and the element displacement vector u It returns the stress vector for the element TetrahedronElementPStressessigma This function calculates the three principal stresses for the element using the element stress vector sigma It returns a 31 vector in the form sigma1sigma2sigma3T where sigma1 sigma2 and sigma3 are the principal stresses for the element This function does not return the principal angles The following is a listing of the MATLAB source code for each function 152 MATLAB Functions Used 341 function y TetrahedronElementVolume x1y1z1x2y2z2x3y3z3x4y4z4 TetrahedronElementVolume This function returns the volume of the linear tetrahedral element whose first node has coordinates x1y1z1 second node has coordinates x2y2z2 third node has coordinates x3y3z3 and fourth node has coordiantes x4y4z4 xyz 1 x1 y1 z1 1 x2 y2 z2 1 x3 y3 z3 1 x4 y4 z4 y detxyz6 function y TetrahedronElementStiffness ENUx1y1z1x2y2z2x3y3z3x4y4z4 TetrahedronElementStiffness This function returns the element stiffness matrix for a linear tetrahedral solid element with modulus of elasticity E Poissons ratio NU coordinates of the first node x1y1z1 coordinates of the second node x2y2z2 coordinates of the third node x3y3z3 and coordinates of the fourth node x4y4z4 The size of the element stiffness matrix is 12 x 12 xyz 1 x1 y1 z1 1 x2 y2 z2 1 x3 y3 z3 1 x4 y4 z4 V detxyz6 mbeta1 1 y2 z2 1 y3 z3 1 y4 z4 mbeta2 1 y1 z1 1 y3 z3 1 y4 z4 mbeta3 1 y1 z1 1 y2 z2 1 y4 z4 mbeta4 1 y1 z1 1 y2 z2 1 y3 z3 mgamma1 1 x2 z2 1 x3 z3 1 x4 z4 mgamma2 1 x1 z1 1 x3 z3 1 x4 z4 mgamma3 1 x1 z1 1 x2 z2 1 x4 z4 mgamma4 1 x1 z1 1 x2 z2 1 x3 z3 mdelta1 1 x2 y2 1 x3 y3 1 x4 y4 mdelta2 1 x1 y1 1 x3 y3 1 x4 y4 mdelta3 1 x1 y1 1 x2 y2 1 x4 y4 mdelta4 1 x1 y1 1 x2 y2 1 x3 y3 beta1 1detmbeta1 beta2 detmbeta2 beta3 1detmbeta3 beta4 detmbeta4 gamma1 detmgamma1 gamma2 1detmgamma2 gamma3 detmgamma3 gamma4 1detmgamma4 delta1 1detmdelta1 delta2 detmdelta2 342 15 The Linear Tetrahedral Solid Element delta3 1detmdelta3 delta4 detmdelta4 B1 beta1 0 0 0 gamma1 0 0 0 delta1 gamma1 beta1 0 0 delta1 gamma1 delta1 0 beta1 B2 beta2 0 0 0 gamma2 0 0 0 delta2 gamma2 beta2 0 0 delta2 gamma2 delta2 0 beta2 B3 beta3 0 0 0 gamma3 0 0 0 delta3 gamma3 beta3 0 0 delta3 gamma3 delta3 0 beta3 B4 beta4 0 0 0 gamma4 0 0 0 delta4 gamma4 beta4 0 0 delta4 gamma4 delta4 0 beta4 B B1 B2 B3 B46V D E1NU12NU1NU NU NU 0 0 0 NU 1NU NU 0 0 0 NU NU 1NU 0 0 0 0 0 0 12NU2 0 0 0 0 0 0 1 2NU2 0 0 0 0 0 0 1 2NU2 y VBDB function y TetrahedronAssembleKkijmn TetrahedronAssemble This function assembles the element stiffness matrix k of the linear tetrahedral solid element with nodes i j m and n into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K3i23i2 K3i23i2 k11 K3i23i1 K3i23i1 k12 K3i23i K3i23i k13 K3i23j2 K3i23j2 k14 K3i23j1 K3i23j1 k15 K3i23j K3i23j k16 K3i23m2 K3i23m2 k17 K3i23m1 K3i23m1 k18 K3i23m K3i23m k19 K3i23n2 K3i23n2 k110 K3i23n1 K3i23n1 k111 K3i23n K3i23n k112 K3i13i2 K3i13i2 k21 K3i13i1 K3i13i1 k22 K3i13i K3i13i k23 K3i13j2 K3i13j2 k24 K3i13j1 K3i13j1 k25 K3i13j K3i13j k26 K3i13m2 K3i13m2 k27 K3i13m1 K3i13m1 k28 K3i13m K3i13m k29 K3i13n2 K3i13n2 k210 K3i13n1 K3i13n1 k211 K3i13n K3i13n k212 K3i3i2 K3i3i2 k31 K3i3i1 K3i3i1 k32 K3i3i K3i3i k33 K3i3j2 K3i3j2 k34 K3i3j1 K3i3j1 k35 K3i3j K3i3j k36 152 MATLAB Functions Used 343 K3i3m2 K3i3m2 k37 K3i3m1 K3i3m1 k38 K3i3m K3i3m k39 K3i3n2 K3i3n2 k310 K3i3n1 K3i3n1 k311 K3i3n K3i3n k312 K3j23i2 K3j23i2 k41 K3j23i1 K3j23i1 k42 K3j23i K3j23i k43 K3j23j2 K3j23j2 k44 K3j23j1 K3j23j1 k45 K3j23j K3j23j k46 K3j23m2 K3j23m2 k47 K3j23m1 K3j23m1 k48 K3j23m K3j23m k49 K3j23n2 K3j23n2 k410 K3j23n1 K3j23n1 k411 K3j23n K3j23n k412 K3j13i2 K3j13i2 k51 K3j13i1 K3j13i1 k52 K3j13i K3j13i k53 K3j13j2 K3j13j2 k54 K3j13j1 K3j13j1 k55 K3j13j K3j13j k56 K3j13m2 K3j13m2 k57 K3j13m1 K3j13m1 k58 K3j13m K3j13m k59 K3j13n2 K3j13n2 k510 K3j13n1 K3j13n1 k511 K3j13n K3j13n k512 K3j3i2 K3j3i2 k61 K3j3i1 K3j3i1 k62 K3j3i K3j3i k63 K3j3j2 K3j3j2 k64 K3j3j1 K3j3j1 k65 K3j3j K3j3j k66 K3j3m2 K3j3m2 k67 K3j3m1 K3j3m1 k68 K3j3m K3j3m k69 K3j3n2 K3j3n2 k610 K3j3n1 K3j3n1 k611 K3j3n K3j3n k612 K3m23i2 K3m23i2 k71 K3m23i1 K3m23i1 k72 K3m23i K3m23i k73 K3m23j2 K3m23j2 k74 K3m23j1 K3m23j1 k75 K3m23j K3m23j k76 K3m23m2 K3m23m2 k77 K3m23m1 K3m23m1 k78 K3m23m K3m23m k79 K3m23n2 K3m23n2 k710 K3m23n1 K3m23n1 k711 K3m23n K3m23n k712 K3m13i2 K3m13i2 k81 K3m13i1 K3m13i1 k82 344 15 The Linear Tetrahedral Solid Element K3m13i K3m13i k83 K3m13j2 K3m13j2 k84 K3m13j1 K3m13j1 k85 K3m13j K3m13j k86 K3m13m2 K3m13m2 k87 K3m13m1 K3m13m1 k88 K3m13m K3m13m k89 K3m13n2 K3m13n2 k810 K3m13n1 K3m13n1 k811 K3m13n K3m13n k812 K3m3i2 K3m3i2 k91 K3m3i1 K3m3i1 k92 K3m3i K3m3i k93 K3m3j2 K3m3j2 k94 K3m3j1 K3m3j1 k95 K3m3j K3m3j k96 K3m3m2 K3m3m2 k97 K3m3m1 K3m3m1 k98 K3m3m K3m3m k99 K3m3n2 K3m3n2 k910 K3m3n1 K3m3n1 k911 K3m3n K3m3n k912 K3n23i2 K3n23i2 k101 K3n23i1 K3n23i1 k102 K3n23i K3n23i k103 K3n23j2 K3n23j2 k104 K3n23j1 K3n23j1 k105 K3n23j K3n23j k106 K3n23m2 K3n23m2 k107 K3n23m1 K3n23m1 k108 K3n23m K3n23m k109 K3n23n2 K3n23n2 k1010 K3n23n1 K3n23n1 k1011 K3n23n K3n23n k1012 K3n13i2 K3n13i2 k111 K3n13i1 K3n13i1 k112 K3n13i K3n13i k113 K3n13j2 K3n13j2 k114 K3n13j1 K3n13j1 k115 K3n13j K3n13j k116 K3n13m2 K3n13m2 k117 K3n13m1 K3n13m1 k118 K3n13m K3n13m k119 K3n13n2 K3n13n2 k1110 K3n13n1 K3n13n1 k1111 K3n13n K3n13n k1112 K3n3i2 K3n3i2 k121 K3n3i1 K3n3i1 k122 K3n3i K3n3i k123 K3n3j2 K3n3j2 k124 K3n3j1 K3n3j1 k125 K3n3j K3n3j k126 K3n3m2 K3n3m2 k127 K3n3m1 K3n3m1 k128 K3n3m K3n3m k129 K3n3n2 K3n3n2 k1210 152 MATLAB Functions Used 345 K3n3n1 K3n3n1 k1211 K3n3n K3n3n k1212 y K function y TetrahedronElementStresses ENUx1y1z1x2y2z2x3y3z3x4y4z4u TetrahedronElementStresses This function returns the element stress vector for a linear tetrahedral solid element with modulus of elasticity E Poissons ratio NU coordinates of the first node x1y1z1 coordinates of the second node x2y2z2 coordinates of the third node x3y3z3 coordinates of the fourth node x4y4z4 and element displacement vector u The size of the element stress vector is 6 x 1 xyz 1 x1 y1 z1 1 x2 y2 z2 1 x3 y3 z3 1 x4 y4 z4 V detxyz6 mbeta1 1 y2 z2 1 y3 z3 1 y4 z4 mbeta2 1 y1 z1 1 y3 z3 1 y4 z4 mbeta3 1 y1 z1 1 y2 z2 1 y4 z4 mbeta4 1 y1 z1 1 y2 z2 1 y3 z3 mgamma1 1 x2 z2 1 x3 z3 1 x4 z4 mgamma2 1 x1 z1 1 x3 z3 1 x4 z4 mgamma3 1 x1 z1 1 x2 z2 1 x4 z4 mgamma4 1 x1 z1 1 x2 z2 1 x3 z3 mdelta1 1 x2 y2 1 x3 y3 1 x4 y4 mdelta2 1 x1 y1 1 x3 y3 1 x4 y4 mdelta3 1 x1 y1 1 x2 y2 1 x4 y4 mdelta4 1 x1 y1 1 x2 y2 1 x3 y3 beta1 1detmbeta1 beta2 detmbeta2 beta3 1detmbeta3 beta4 detmbeta4 gamma1 detmgamma1 gamma2 1detmgamma2 gamma3 detmgamma3 gamma4 1detmgamma4 delta1 1detmdelta1 delta2 detmdelta2 delta3 1detmdelta3 delta4 detmdelta4 B1 beta1 0 0 0 gamma1 0 0 0 delta1 gamma1 beta1 0 0 delta1 gamma1 delta1 0 beta1 B2 beta2 0 0 0 gamma2 0 0 0 delta2 gamma2 beta2 0 0 delta2 gamma2 delta2 0 beta2 B3 beta3 0 0 0 gamma3 0 0 0 delta3 gamma3 beta3 0 0 delta3 gamma3 delta3 0 beta3 346 15 The Linear Tetrahedral Solid Element B4 beta4 0 0 0 gamma4 0 0 0 delta4 gamma4 beta4 0 0 delta4 gamma4 delta4 0 beta4 B B1 B2 B3 B46V D E1NU12NU1NU NU NU 0 0 0 NU 1NU NU 0 0 0 NU NU 1NU 0 0 0 0 0 0 12NU2 0 0 0 0 0 0 12NU2 0 0 0 0 0 0 12NU2 y DBu function y TetrahedronElementPStressessigma TetrahedronElementPStresses This function returns the three principal stresses for the element given the element stress vector The principal angles are not returned s1 sigma1 sigma2 sigma3 s2 sigma1sigma2 sigma1sigma3 sigma2sigma3 sigma4sigma4 sigma5sigma5 sigma6sigma6 ms3 sigma1 sigma4 sigma6 sigma4 sigma2 sigma5 sigma6 sigma5 sigma3 s3 detms3 y s1 s2 s3 Example 151 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 152 Use five linear tetrahedral elements to solve this problem as shown in Fig 153 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 3 4 7 and 8 3 the reactions at nodes 1 2 5 and 6 4 the stresses in each element 5 the principal stresses for each element w 025 m 05 m Fig 152 Thin Plate for Example 151 152 MATLAB Functions Used 347 8 1 2 3 5 4 6 7 Fig 153 Discretization of Thin Plate into Five Linear Tetrahedra Solution Use the six steps outlined in Chap 1 to solve this problem using the linear tetrahedral element Step 1 Discretizing the Domain We subdivide the plate into five linear tetrahedral elements only for illustration pur poses More elements must be used in order to obtain reliable results Thus the domain is subdivided into five elements and eight nodes as shown in Fig 153 The total force due to the distributed load is divided equally between nodes 3 4 7 and 8 in the ratio 1 2 2 1 This ratio is obtained considering that nodes 4 and 7 take loads from two elements each while nodes 3 and 8 take loads from one element each The units used in the MATLAB calculations are kN and meter Table 151 shows the element connectivity for this example Table 151 Element Connectivity for Example 151 Element Number Node i Node j Node m Node n 1 1 2 4 6 2 1 4 3 7 3 6 5 7 1 4 6 7 8 4 5 1 6 4 7 Step 2 Writing the Element Stiffness Matrices The five element stiffness matrices k1 k2 k3 k4 and k5 are obtained by making calls to the MATLAB function TetrahedronElementStiffness Each matrix has size 1212 E210e6 E 210000000 348 15 The Linear Tetrahedral Solid Element NU03 NU 03000 k1TetrahedronElementStiffness ENU000002500002505000250025 k1 10e008 Columns 1 through 7 23558 0 0 23558 00505 01010 0 0 06731 0 00337 06731 0 00337 0 0 06731 00673 0 06731 0 23558 00337 00673 23642 00841 01683 00017 00505 06731 0 00841 06857 00084 00337 01010 0 06731 01683 00084 06983 0 0 00337 0 00017 00337 0 00017 00505 0 0 00505 00059 00050 0 0 0 0 0 00034 00017 0 0 0 00673 00067 0 00673 0 0 0 0 0 00067 00034 0 01010 0 0 01010 00050 00236 0 Columns 8 through 12 00505 0 0 0 01010 0 0 0 0 0 0 0 00673 0 0 00505 0 00067 0 01010 00059 00034 0 00067 00050 00050 00017 00673 00034 00236 0 0 0 0 0 00059 0 0 0 00050 0 00017 0 00034 0 0 0 00067 0 0 0 00034 0 00067 0 00050 0 0 0 00236 152 MATLAB Functions Used 349 k2TetrahedronElementStiffness ENU00000250500050005025 k2 10e008 Columns 1 through 7 00017 0 0 0 00337 0 00017 0 00059 0 00505 0 0 00505 0 0 00017 0 0 0 0 0 00505 0 23558 0 0 23558 00337 0 0 0 06731 0 00337 0 0 0 0 0 06731 00673 00017 00505 0 23558 00337 00673 23642 00337 00059 00034 00505 06731 0 00841 0 00050 00017 01010 0 06731 01683 0 0 0 0 0 00673 00067 0 0 00034 0 0 0 0 0 00050 0 01010 0 0 01010 Columns 8 through 12 00337 0 0 0 0 00059 00050 0 0 00050 00034 00017 0 00034 0 00505 01010 0 0 01010 06731 0 0 0 0 0 06731 00673 0 0 00841 01683 00067 0 01010 06857 00084 0 00067 00050 00084 06983 00673 00034 00236 0 00673 00067 0 0 00067 00034 0 00067 0 00050 00236 0 0 00236 k3TetrahedronElementStiffness ENU0025002500025005025000 k3 10e008 Columns 1 through 7 350 15 The Linear Tetrahedral Solid Element 23558 0 0 23558 00505 01010 0 0 06731 0 00337 06731 0 00337 0 0 06731 00673 0 06731 0 23558 00337 00673 23642 00841 01683 00017 00505 06731 0 00841 06857 00084 00337 01010 0 06731 01683 00084 06983 0 0 00337 0 00017 00337 0 00017 00505 0 0 00505 00059 00050 0 0 0 0 0 00034 00017 0 0 0 00673 00067 0 00673 0 0 0 0 0 00067 00034 0 01010 0 0 01010 00050 00236 0 Columns 8 through 12 00505 0 0 0 01010 0 0 0 0 0 0 0 00673 0 0 00505 0 00067 0 01010 00059 00034 0 00067 00050 00050 00017 00673 00034 00236 0 0 0 0 0 00059 0 0 0 00050 0 00017 0 00034 0 0 0 00067 0 0 0 00034 0 00067 0 00050 0 0 0 00236 k4TetrahedronElementStiffness ENU00250025005025002505025 0025050 k4 10e008 Columns 1 through 7 00017 0 0 0 00337 0 00017 0 00059 0 00505 0 0 00505 0 0 00017 0 0 0 0 0 00505 0 23558 0 0 23558 152 MATLAB Functions Used 351 00337 0 0 0 06731 0 00337 0 0 0 0 0 06731 00673 00017 00505 0 23558 00337 00673 23642 00337 00059 00034 00505 06731 0 00841 0 00050 00017 01010 0 06731 01683 0 0 0 0 0 00673 00067 0 0 00034 0 0 0 0 0 00050 0 01010 0 0 01010 Columns 8 through 12 00337 0 0 0 0 00059 00050 0 0 00050 00034 00017 0 00034 0 00505 01010 0 0 01010 06731 0 0 0 0 0 06731 00673 0 0 00841 01683 00067 0 01010 06857 00084 0 00067 00050 00084 06983 00673 00034 00236 0 00673 00067 0 0 00067 00034 0 00067 0 00050 00236 0 0 00236 k5TetrahedronElementStiffness ENU000002500250025050005025 k5 10e008 Columns 1 through 7 11821 00421 00841 11804 00084 00841 11754 00421 03428 00042 00084 03370 00008 00421 00841 00042 03492 00841 00008 03475 00168 11804 00084 00841 11821 00421 00841 11737 00084 03370 00008 00421 03428 00042 00084 00841 00008 03475 00841 00042 03492 00168 11754 00421 00168 11737 00084 00168 11821 00421 03361 00008 00084 03302 00042 00421 00168 00008 03256 00168 00042 03239 00841 352 15 The Linear Tetrahedral Solid Element 11737 00084 00168 11754 00421 00168 11804 00084 03302 00042 00421 03361 00008 00084 00168 00042 03239 00168 00008 03256 00841 Columns 8 through 12 00421 00168 11737 00084 00168 03361 00008 00084 03302 00042 00008 03256 00168 00042 03239 00084 00168 11754 00421 00168 03302 00042 00421 03361 00008 00042 03239 00168 00008 03256 00421 00841 11804 00084 00841 03428 00042 00084 03370 00008 00042 03492 00841 00008 03475 00084 00841 11821 00421 00841 03370 00008 00421 03428 00042 00008 03475 00841 00042 03492 Step 3 Assembling the Global Stiffness Matrix Since the structure has eight nodes the size of the global stiffness matrix is 24 24 Therefore to obtain K we first set up a zero matrix of size 24 24 then make five calls to the MATLAB function TetrahedronAssemble since we have five elements in the structure Each call to the function will assemble one element The following are the MATLAB commands The final result is shown only after the fifth element has been assembled Kzeros2424 KTetrahedronAssembleKk11246 KTetrahedronAssembleKk21437 KTetrahedronAssembleKk36571 KTetrahedronAssembleKk46784 KTetrahedronAssembleKk51647 K 10e008 152 MATLAB Functions Used 353 Columns 1 through 7 35463 00421 00841 23558 00505 01010 00017 00421 10285 00042 00337 06731 0 00505 00841 00042 10475 00673 0 06731 0 23558 00337 00673 23642 00841 01683 0 00505 06731 0 00841 06857 00084 0 01010 0 06731 01683 00084 06983 0 00017 00505 0 0 0 0 23642 00337 00059 00034 0 0 0 00841 0 00050 00017 0 0 0 01683 11754 01262 00168 00017 00337 0 23558 01262 03361 00008 00505 00059 00050 00337 00168 00008 03256 0 00034 00017 00673 00067 0 01010 0 0 0 0 0 00067 00050 0 0 0 0 00673 00034 00236 0 0 0 0 11804 00084 02524 00067 0 00673 0 00084 03370 00008 0 00067 00034 0 02524 00008 03475 01010 00050 00236 0 11737 00084 00168 0 0 0 00067 00084 03302 00126 0 0 0 0 00168 00126 03239 0 0 0 01010 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 8 through 14 00337 0 11754 01262 00168 00067 0 00059 00050 01262 03361 00008 0 00067 00034 00017 00168 00008 03256 01010 00050 0 0 00017 00505 0 0 0 0 0 00337 00059 00034 0 0 0 0 0 00050 00017 0 0 00841 01683 23558 00337 00673 0 0 06857 00084 00505 06731 0 0 0 00084 06983 01010 0 06731 0 0 00505 01010 35463 00421 00841 0 0 06731 0 00421 10285 00042 0 0 0 06731 00841 00042 10475 0 0 0 0 0 0 0 23642 00841 0 0 0 0 0 00841 06857 0 0 0 0 0 01683 00084 354 15 The Linear Tetrahedral Solid Element 0 0 11737 00084 00168 23558 00505 0 0 00084 03302 00126 00337 06731 0 0 00168 00126 03239 00673 0 0 00673 11804 00084 02524 00017 00337 00067 00034 00084 03370 00008 00505 00059 00050 00236 02524 00008 03475 0 00034 0 0 00067 0 01010 0 0 0 0 0 00067 00050 0 0 0 0 00673 00034 00236 0 0 Columns 15 through 21 00673 11804 00084 02524 11737 00084 00168 00034 00084 03370 00008 00084 03302 00126 00236 02524 00008 03475 00168 00126 03239 0 00067 0 01010 0 0 0 0 0 00067 00050 0 0 0 0 00673 00034 00236 0 0 0 0 0 0 0 00067 0 01010 0 0 0 0 0 00067 00050 0 0 0 0 00673 00034 00236 0 11737 00084 00168 11804 00084 02524 0 00084 03302 00126 00084 03370 00008 0 00168 00126 03239 02524 00008 03475 01683 23558 00337 00673 00017 00505 0 00084 00505 06731 0 00337 00059 00034 06983 01010 0 06731 0 00050 00017 01010 35463 00421 00841 11754 01262 00168 0 00421 10285 00042 01262 03361 00008 06731 00841 00042 10475 00168 00008 03256 0 11754 01262 00168 35463 00421 00841 00050 01262 03361 00008 00421 10285 00042 00017 00168 00008 03256 00841 00042 10475 0 00017 00505 0 23558 00337 00673 0 00337 00059 00034 00505 06731 0 0 0 00050 00017 01010 0 06731 Columns 22 through 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 152 MATLAB Functions Used 355 0 0 0 0 0 0 0 0 0 00067 0 00673 0 00067 00034 01010 00050 00236 0 0 0 0 0 0 0 0 0 00017 00337 0 00505 00059 00050 0 00034 00017 23558 00505 01010 00337 06731 0 00673 0 06731 23642 00841 01683 00841 06857 00084 01683 00084 06983 Step 4 Applying the Boundary Conditions The matrix 1510 for this structure can be written using the global stiffness matrix obtained in the previous step The boundary conditions for this problem are given as U1x U1y U1z U2x U2y U2z 0 U5x U5y U5z U6x U6y U6z 0 F3x 0 F3y 3125 F3z 0 F4x 0 F4y 625 F4z 0 F7x 0 F7y 625 F7z 0 F8x 0 F8y 3125 F8z 0 1512 We next insert the above conditions into the matrix equation for this structure not shown here and proceed to the solution step below Step 5 Solving the Equations Solvingtheresultingsystemofequationswillbeperformedbypartitioningmanually and Gaussian elimination with MATLAB First we partition the resulting equation by extracting the submatrces in rows 7 to 12 rows 19 to 24 and columns 7 to 12 columns 19 to 24 Therefore we obtain the following equation noting that the numbers are shown to only two decimal places although MATLAB carries out the calculations using at least four decimal places 356 15 The Linear Tetrahedral Solid Element 108 236 008 017 236 003 007 001 0 010 0 0 0 008 069 001 005 067 0 0 001 001 0 0 0 017 001 070 010 0 067 007 000 002 0 0 0 236 005 010 355 004 008 118 001 025 001 0 007 003 067 0 004 103 000 001 034 000 0 001 000 007 0 067 008 000 105 025 000 035 010 001 002 001 0 007 118 001 025 355 004 008 236 005 010 0 001 000 001 034 000 004 103 000 003 067 0 010 001 002 025 000 035 008 000 105 007 0 067 0 0 0 001 0 010 236 003 007 236 008 017 0 0 0 0 001 001 005 067 0 008 069 001 0 0 0 007 000 002 010 0 067 017 001 070 U3x U3y U3z U4x U4y U4z U7x U7y U7z U8x U8y U8z 0 3125 0 0 625 0 0 625 0 0 3125 0 1513 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination kK712712 K7121924 K1924712 K19241924 k 10e008 Columns 1 through 7 23642 00841 01683 23558 00337 00673 00067 00841 06857 00084 00505 06731 0 0 01683 00084 06983 01010 0 06731 00673 23558 00505 01010 35463 00421 00841 11804 00337 06731 0 00421 10285 00042 00084 00673 0 06731 00841 00042 10475 02524 00067 0 00673 11804 00084 02524 35463 0 00067 00034 00084 03370 00008 00421 01010 00050 00236 02524 00008 03475 00841 0 0 0 00067 0 01010 23558 152 MATLAB Functions Used 357 0 0 0 0 00067 00050 00505 0 0 0 00673 00034 00236 01010 Columns 8 through 12 0 01010 0 0 0 00067 00050 0 0 0 00034 00236 0 0 0 00084 02524 00067 0 00673 03370 00008 0 00067 00034 00008 03475 01010 00050 00236 00421 00841 23558 00505 01010 10285 00042 00337 06731 0 00042 10475 00673 0 06731 00337 00673 23642 00841 01683 06731 0 00841 06857 00084 0 06731 01683 00084 06983 f0 3125 0 0 625 0 0 625 0 0 3125 0 f 0 31250 0 0 62500 0 0 62500 0 0 31250 0 ukf u 10e005 00004 06082 358 15 The Linear Tetrahedral Solid Element 00090 00127 06078 00056 00127 06078 00056 00004 06082 00090 It is now clear that the horizontal displacement along the ydirection at both nodes 3 and 8 is 06082 m and the horizontal displacement along the ydirection at both nodes 4 and 7 is 06078 mThese results are compared with the result of approximately 07 m obtained in previous examples and problems in Chap 11 through 14 using other elements Step 6 Postprocessing In this step we obtain the reactions at nodes 1 2 5 and 6 and the stresses in each element using MATLAB as follows First we set up the global nodal displacement vector U then we calculate the global nodal force vector F U000000u16000000u712 U 10e005 0 0 0 0 0 0 00004 06082 00090 00127 06078 00056 0 0 0 0 152 MATLAB Functions Used 359 0 0 00127 06078 00056 00004 06082 00090 FKU F 313296 53492 93286 307045 40258 30777 00000 31250 0 00000 62500 00000 307045 40258 30777 313296 53492 93286 00000 62500 00000 00000 31250 00000 The force reactions along the three directions are clearly shown above Obviously force equilibrium is satisfied for this problem Next we set up the element nodal displacement vectors u1 u2 u3 u4 and u5 then we calculate the element stresses sigma1 sigma2 sigma3 sigma4 and sigma5 by making calls to the MATLAB func tion TetrahedronElementStresses u1U1 U2 U3 U4 U5 U6 U10 U11 U12 U16 U17 U18 360 15 The Linear Tetrahedral Solid Element u1 10e005 0 0 0 0 0 0 00127 06078 00056 0 0 0 u2U1 U2 U3 U10 U11 U12 U7 U8 U9 U19 U20 U21 u2 10e005 0 0 0 00127 06078 00056 00004 06082 00090 00127 06078 00056 u3U16 U17 U18 U13 U14 U15 U19 U20 U21 U1 U2 U3 u3 10e005 152 MATLAB Functions Used 361 0 0 0 0 0 0 00127 06078 00056 0 0 0 u4U16 U17 U18 U19 U20 U21 U22 U23 U24 U10 U11 U12 u4 10e005 0 0 0 00127 06078 00056 00004 06082 00090 00127 06078 00056 u5U1 U2 U3 U16 U17 U18 U10 U11 U12 U19 U20 U21 u5 10e005 0 0 0 0 0 362 15 The Linear Tetrahedral Solid Element 0 00127 06078 00056 00127 06078 00056 sigma1TetrahedronElementStresses ENU000002500002505000250025u1 sigma1 10e003 14728 34365 14728 00205 00090 0 sigma2TetrahedronElementStresses ENU00000250500050005025u2 sigma2 10e003 00064 27694 07102 00129 00134 00704 sigma3TetrahedronElementStresses ENU0025002500025005025000u3 sigma3 10e003 14728 34365 14728 152 MATLAB Functions Used 363 00205 00090 0 sigma4TetrahedronElementStresses ENU00250025005025002505 0250025050u4 sigma4 10e003 00064 27694 07102 00129 00134 00704 sigma5TetrahedronElementStresses ENU000002500250025050005025u5 sigma5 10e003 00096 27941 07945 00000 00000 02204 Thus it is clear that the normal stresses σy along the ydirection in elements 1 2 3 4 and 5 are are 34365 MPa tensile 27694 MPa tensile 34365 MPa tensile 27694 MPa tensile and 27941 MPa tensile respectively It is clear that the stresses in the ydirection approach closely the correct value of 3 MPa tensile Next we calculate the principal stresses for each element by making calls to the MATLAB function TetrahedronElementPStresses s1TetrahedronElementPStressessigma1 s1 10e009 364 15 The Linear Tetrahedral Solid Element 00000 00123 74534 s2TetrahedronElementPStressessigma2 s2 10e006 00035 19839 12296 s3TetrahedronElementPStressessigma3 s3 10e009 00000 00123 74534 s4TetrahedronElementPStressessigma4 s4 10e006 00035 19839 12296 s5TetrahedronElementPStressessigma5 s5 10e008 00000 00221 11431 152 MATLAB Functions Used 365 The principal stresses in the three directions are shown clearly above for each one of the five elements in this example Problems Problem 151 Consider the thin plate problem solved in Example 151 Solve the problem again us ing six linear tetrahedral elements instead of five elements as shown in Fig 154 Compare your answers for the displacements at nodes 3 4 7 and 8 with the answers obtained in the example Compare also the stresses obtained for the six elements with those obtained for the five elements in the example Compare also your answers with those obtained in the related examples and problems in Chaps 11 to 14 Hint Table 152 shows the element connectivity for this problem 8 1 2 3 4 5 6 7 Fig 154 Discretization of Thin Plate into Six Linear Tetrahedra Table 152 Element Connectivity for Problem 151 Element Number Node i Node j Node m Node n 1 1 2 4 8 2 1 2 8 5 3 2 8 5 6 4 1 3 7 4 5 1 7 5 8 6 1 8 4 7 16 The Linear Brick Solid Element 161 Basic Equations The linear brick solid element is a threedimensional finite element with both local and global coordinates It is characterized by linear shape functions in each of the x y and z directions It is also called a trilinear hexahedron This is the third isoparametric element we deal with in this bookThe linear brick element has modulus of elasticity E and Poissons ratio ν Each linear brick element has eight nodes with three degrees of freedom at each node as shown in Fig 161 The global coordinates of the eight nodes are denoted by x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 x6 y6 z6 x7 y7 z7 and x8 y8 z8The order of the nodes for each element is important they should be numbered such that the volume of the element is positive You can actuallycheckthisbyusingtheMATLABfunctionLinearBrickElementVolume which is written specifically for this purposeThe element is mapped to a hexahedron through the use of the natural coordinates ξ η and μ as shown in Fig 162 In this case the element stiffness matrix is not written explicitly but calculated through symbolic integration with the aid of the MATLAB Symbolic Math Toolbox The eight shape functions for this element are listed explicitly as follows in terms of the natural coordinates ξ η and μ see 1 8 μ ξ η 2 1 3 4 6 5 7 Fig 161 The Linear Brick Solid Element 368 16 The Linear Brick Solid Element 8 μ 2 1 3 4 6 5 7 ξ η Fig 162 The Linear Brick Element with Natural Coordinates N1 1 81 ξ1 η1 μ N2 1 81 ξ1 η1 μ N3 1 81 ξ1 η1 μ N4 1 81 ξ1 η1 μ N5 1 81 ξ1 η1 μ N6 1 81 ξ1 η1 μ N7 1 81 ξ1 η1 μ N8 1 81 ξ1 η1 μ 161 The Jacobian matrix for this element is given by J x ξ y ξ z ξ x η y η z η x μ y μ z μ 162 where x y and z are given by x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 z N1z1 N2z2 N3z3 N4z4 N5z5 N6z6 N7z7 N8z8 163 The B matrix is given as follows for this element The element stiffness matrix for the linear brick element is written in terms of a triple integral as follows where U is the global nodal displacement vector and F is the global nodal force vector At this step the boundary conditions are applied manually to the vectors U and F Then the matrix 1611 is solved by partitioning and Gaussian elimination Finally once the unknown displacements and reactions are found the stress vector is obtained for each element as follows σ DBu where σ is the stress vector in the element of size 6 1 and u is the 24 1 element displacement vector The vector σ is written for each element as σ σxxσyσzzτxyτyzτzxT Finally the element volume is given by the following formula V 1111 Jdξdηdμ 372 16 The Linear Brick Solid Element LinearBrickElementStressesE NU x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 x5 y5 z5 x6 y6 z6 x7 y7 z7 x8 y8 z8 u This function calculates the element stresses using the modulus of elasticity E Poissons ratio NU the coordinates of the first node x1 y1 z1 the coordinates of the second node x2 y2 z2 the coordinates of the third node x3 y3 z3 the coordinates of the fourth node x4 y4 z4 the coordinates of the fifth node x5 y5 z5 the coordinates of the sixth node x6 y6 z6 the coordinates of the seventh node x7 y7 z7 and the coordinates of the eighth node x8 y8 z8 It returns the stress vector for the element LinearBrickElementPStressessigma This function calculates the element principal stresses using the element stress vector sigma It returns a 3 1 vector in the form sigma1 sigma2 thetaT where sigma1 and sigma2 are the principal stresses for the element and theta is the principal angle The following is a listing of the MATLAB source code for each function function w LinearBrickElementVolumex1y1z1x2y2z2x3y3z3x4y4z4 x5y5z5x6y6z6x7y7z7x8y8z8 LinearBrickElementVolume This function returns the volume of the linear brick element whose first node has coordinates x1y1z1 second node has coordinates x2y2z2 third node has coordinates x3y3z3 fourth node has coordiantes x4y4z4 fifth node has coordiantes x5y5z5 sixth node has coordiantes x6y6z6 seventh node has coordiantes x7y7z7 and eighth node has coordiantes x8y8z8 syms s t u N1 1s1t1u8 N2 1s1t1u8 N3 1s1t1u8 N4 1s1t1u8 N5 1s1t1u8 N6 1s1t1u8 N7 1s1t1u8 N8 1s1t1u8 x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 z N1z1 N2z2 N3z3 N4z4 N5z5 N6z6 N7z7 N8z8 xs diffxs xt diffxt xu diffxu ys diffys yt diffyt yu diffyu 162 MATLAB Functions Used 373 zs diffzs zt diffzt zu diffzu J xsytzu ztyu ysxtzu ztxu zsxtyu ytxu Jnew simplifyJ r intintintJnew u 1 1 t 1 1 s 1 1 w doubler function w LinearBrickElementStiffnessENUx1y1z1x2y2z2x3y3z3x4y4z4 x5y5z5x6y6z6x7y7z7x8y8z8 LinearBrickElementStiffness This function returns the element stiffness matrix for a linear brick element with modulus of elasticity E Poissons ratio NU coordinates of node 1 x1y1z1 coordinates of node 2 x2y2z2 coordinates of node 3 x3y3z3 coordinates of node 4 x4y4z4 coordinates of node 5 x5y5z5 coordinates of node 6 x6y6z6 coordinates of node 7 x7y7z7 and coordinates of node 8 x8y8z8 The size of the element stiffness matrix is 24 x 24 syms s t u N1 1s1t1u8 N2 1s1t1u8 N3 1s1t1u8 N4 1s1t1u8 N5 1s1t1u8 N6 1s1t1u8 N7 1s1t1u8 N8 1s1t1u8 x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 z N1z1 N2z2 N3z3 N4z4 N5z5 N6z6 N7z7 N8z8 xs diffxs xt diffxt xu diffxu ys diffys yt diffyt yu diffyu zs diffzs zt diffzt zu diffzu J xsytzu ztyu ysxtzu ztxu zsxtyu ytxu N1s diffN1s N2s diffN2s N3s diffN3s 374 16 The Linear Brick Solid Element N4s diffN4s N5s diffN5s N6s diffN6s N7s diffN7s N8s diffN8s N1t diffN1t N2t diffN2t N3t diffN3t N4t diffN4t N5t diffN5t N6t diffN6t N7t diffN7t N8t diffN8t N1u diffN1u N2u diffN2u N3u diffN3u N4u diffN4u N5u diffN5u N6u diffN6u N7u diffN7u N8u diffN8u The expressions below are not divided by J they are adjusted for later in the calculation of BD matrix below N1x N1sytzu ztyu ysN1tzu ztN1u zsN1tyu ytN1u N2x N2sytzu ztyu ysN2tzu ztN2u zsN2tyu ytN2u N3x N3sytzu ztyu ysN3tzu ztN3u zsN3tyu ytN3u N4x N4sytzu ztyu ysN4tzu ztN4u zsN4tyu ytN4u N5x N5sytzu ztyu ysN5tzu ztN5u zsN5tyu ytN5u N6x N6sytzu ztyu ysN6tzu ztN6u zsN6tyu ytN6u N7x N7sytzu ztyu ysN7tzu ztN7u zsN7tyu ytN7u N8x N8sytzu ztyu ysN8tzu ztN8u zsN8tyu ytN8u N1y xsN1tzu ztN1u N1sxtzu ztxu zsxtN1u N1txu N2y xsN2tzu ztN2u N2sxtzu ztxu zsxtN2u N2txu N3y xsN3tzu ztN3u N3sxtzu ztxu zsxtN3u N3txu N4y xsN4tzu ztN4u N4sxtzu ztxu zsxtN4u N4txu N5y xsN5tzu ztN5u N5sxtzu ztxu zsxtN5u N5txu N6y xsN6tzu ztN6u N6sxtzu ztxu zsxtN6u N6txu N7y xsN7tzu ztN7u N7sxtzu ztxu zsxtN7u N7txu N8y xsN8tzu ztN8u N8sxtzu ztxu zsxtN8u N8txu N1z xsytN1u N1tyu ysxtN1u N1txu N1sxtyu ytxu N2z xsytN2u N2tyu ysxtN2u N2txu N2sxtyu ytxu N3z xsytN3u N3tyu ysxtN3u N3txu N3sxtyu ytxu N4z xsytN4u N4tyu ysxtN4u N4txu N4sxtyu ytxu N5z xsytN5u N5tyu ysxtN5u N5txu N5sxtyu ytxu N6z xsytN6u N6tyu ysxtN6u N6txu N6sxtyu ytxu N7z xsytN7u N7tyu ysxtN7u N7txu N7sxtyu ytxu N8z xsytN8u N8tyu ysxtN8u N8txu N8sxtyu ytxu Next the B matrix is calculated explicitly as follows B N1x N2x N3x N4x N5x N6x N7x N8x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 N1y N2y N3y N4y N5y N6y N7y N8y 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 N1z N2z N3z N4z N5z N6z N7z N8z N1y N2y N3y N4y N5y N6y N7y N8y N1x N2x N3x N4x N5x N6x N7x N8x 0 0 0 0 0 0 0 0 162 MATLAB Functions Used 375 0 0 0 0 0 0 0 0 N1z N2z N3z N4z N5z N6z N7z N8z N1y N2y N3y N4y N5y N6y N7y N8y N1z N2z N3z N4z N5z N6z N7z N8z 0 0 0 0 0 0 0 0 N1x N2x N3x N4x N5x N6x N7x N8x Bnew simplifyB Jnew simplifyJ D E1NU12NU1NU NU NU 0 0 0 NU 1NU NU 0 0 0 NU NU 1 NU 0 0 0 0 0 0 12NU2 0 0 0 0 0 0 1 2NU2 0 0 0 0 0 0 1 2NU2 BD transposeBnewDBnewJnew r intintintBD u 1 1 t 1 1 s 1 1 w doubler function y LinearBrickAssembleKkijmnpqrs LinearBrickAssemble This function assembles the element stiffness matrix k of the linear brick solid element with nodes i j m n p q r and s into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled K3i23i2 K3i23i2 k11 K3i23i1 K3i23i1 k12 K3i23i K3i23i k13 K3i23j2 K3i23j2 k14 K3i23j1 K3i23j1 k15 K3i23j K3i23j k16 K3i23m2 K3i23m2 k17 K3i23m1 K3i23m1 k18 K3i23m K3i23m k19 K3i23n2 K3i23n2 k110 K3i23n1 K3i23n1 k111 K3i23n K3i23n k112 K3i23p2 K3i23p2 k113 K3i23p1 K3i23p1 k114 K3i23p K3i23p k115 K3i23q2 K3i23q2 k116 K3i23q1 K3i23q1 k117 K3i23q K3i23q k118 K3i23r2 K3i23r2 k119 K3i23r1 K3i23r1 k120 K3i23r K3i23r k121 K3i23s2 K3i23s2 k122 K3i23s1 K3i23s1 k123 K3i23s K3i23s k124 K3i13i2 K3i13i2 k21 K3i13i1 K3i13i1 k22 K3i13i K3i13i k23 K3i13j2 K3i13j2 k24 K3i13j1 K3i13j1 k25 K3i13j K3i13j k26 K3i13m2 K3i13m2 k27 K3i13m1 K3i13m1 k28 K3i13m K3i13m k29 376 16 The Linear Brick Solid Element K3i13n2 K3i13n2 k210 K3i13n1 K3i13n1 k211 K3i13n K3i13n k212 K3i13p2 K3i13p2 k213 K3i13p1 K3i13p1 k214 K3i13p K3i13p k215 K3i13q2 K3i13q2 k216 K3i13q1 K3i13q1 k217 K3i13q K3i13q k218 K3i13r2 K3i13r2 k219 K3i13r1 K3i13r1 k220 K3i13r K3i13r k221 K3i13s2 K3i13s2 k222 K3i13s1 K3i13s1 k223 K3i13s K3i13s k224 K3i3i2 K3i3i2 k31 K3i3i1 K3i3i1 k32 K3i3i K3i3i k33 K3i3j2 K3i3j2 k34 K3i3j1 K3i3j1 k35 K3i3j K3i3j k36 K3i3m2 K3i3m2 k37 K3i3m1 K3i3m1 k38 K3i3m K3i3m k39 K3i3n2 K3i3n2 k310 K3i3n1 K3i3n1 k311 K3i3n K3i3n k312 K3i3p2 K3i3p2 k313 K3i3p1 K3i3p1 k314 K3i3p K3i3p k315 K3i3q2 K3i3q2 k316 K3i3q1 K3i3q1 k317 K3i3q K3i3q k318 K3i3r2 K3i3r2 k319 K3i3r1 K3i3r1 k320 K3i3r K3i3r k321 K3i3s2 K3i3s2 k322 K3i3s1 K3i3s1 k323 K3i3s K3i3s k324 K3j23i2 K3j23i2 k41 K3j23i1 K3j23i1 k42 K3j23i K3j23i k43 K3j23j2 K3j23j2 k44 K3j23j1 K3j23j1 k45 K3j23j K3j23j k46 K3j23m2 K3j23m2 k47 K3j23m1 K3j23m1 k48 K3j23m K3j23m k49 K3j23n2 K3j23n2 k410 K3j23n1 K3j23n1 k411 K3j23n K3j23n k412 K3j23p2 K3j23p2 k413 K3j23p1 K3j23p1 k414 162 MATLAB Functions Used 377 K3j23p K3j23p k415 K3j23q2 K3j23q2 k416 K3j23q1 K3j23q1 k417 K3j23q K3j23q k418 K3j23r2 K3j23r2 k419 K3j23r1 K3j23r1 k420 K3j23r K3j23r k421 K3j23s2 K3j23s2 k422 K3j23s1 K3j23s1 k423 K3j23s K3j23s k424 K3j13i2 K3j13i2 k51 K3j13i1 K3j13i1 k52 K3j13i K3j13i k53 K3j13j2 K3j13j2 k54 K3j13j1 K3j13j1 k55 K3j13j K3j13j k56 K3j13m2 K3j13m2 k57 K3j13m1 K3j13m1 k58 K3j13m K3j13m k59 K3j13n2 K3j13n2 k510 K3j13n1 K3j13n1 k511 K3j13n K3j13n k512 K3j13p2 K3j13p2 k513 K3j13p1 K3j13p1 k514 K3j13p K3j13p k515 K3j13q2 K3j13q2 k516 K3j13q1 K3j13q1 k517 K3j13q K3j13q k518 K3j13r2 K3j13r2 k519 K3j13r1 K3j13r1 k520 K3j13r K3j13r k521 K3j13s2 K3j13s2 k522 K3j13s1 K3j13s1 k523 K3j13s K3j13s k524 K3j3i2 K3j3i2 k61 K3j3i1 K3j3i1 k62 K3j3i K3j3i k63 K3j3j2 K3j3j2 k64 K3j3j1 K3j3j1 k65 K3j3j K3j3j k66 K3j3m2 K3j3m2 k67 K3j3m1 K3j3m1 k68 K3j3m K3j3m k69 K3j3n2 K3j3n2 k610 K3j3n1 K3j3n1 k611 K3j3n K3j3n k612 K3j3p2 K3j3p2 k613 K3j3p1 K3j3p1 k614 K3j3p K3j3p k615 K3j3q2 K3j3q2 k616 K3j3q1 K3j3q1 k617 K3j3q K3j3q k618 K3j3r2 K3j3r2 k619 378 16 The Linear Brick Solid Element K3j3r1 K3j3r1 k620 K3j3r K3j3r k621 K3j3s2 K3j3s2 k622 K3j3s1 K3j3s1 k623 K3j3s K3j3s k624 K3m23i2 K3m23i2 k71 K3m23i1 K3m23i1 k72 K3m23i K3m23i k73 K3m23j2 K3m23j2 k74 K3m23j1 K3m23j1 k75 K3m23j K3m23j k76 K3m23m2 K3m23m2 k77 K3m23m1 K3m23m1 k78 K3m23m K3m23m k79 K3m23n2 K3m23n2 k710 K3m23n1 K3m23n1 k711 K3m23n K3m23n k712 K3m23p2 K3m23p2 k713 K3m23p1 K3m23p1 k714 K3m23p K3m23p k715 K3m23q2 K3m23q2 k716 K3m23q1 K3m23q1 k717 K3m23q K3m23q k718 K3m23r2 K3m23r2 k719 K3m23r1 K3m23r1 k720 K3m23r K3m23r k721 K3m23s2 K3m23s2 k722 K3m23s1 K3m23s1 k723 K3m23s K3m23s k724 K3m13i2 K3m13i2 k81 K3m13i1 K3m13i1 k82 K3m13i K3m13i k83 K3m13j2 K3m13j2 k84 K3m13j1 K3m13j1 k85 K3m13j K3m13j k86 K3m13m2 K3m13m2 k87 K3m13m1 K3m13m1 k88 K3m13m K3m13m k89 K3m13n2 K3m13n2 k810 K3m13n1 K3m13n1 k811 K3m13n K3m13n k812 K3m13p2 K3m13p2 k813 K3m13p1 K3m13p1 k814 K3m13p K3m13p k815 K3m13q2 K3m13q2 k816 K3m13q1 K3m13q1 k817 K3m13q K3m13q k818 K3m13r2 K3m13r2 k819 K3m13r1 K3m13r1 k820 K3m13r K3m13r k821 K3m13s2 K3m13s2 k822 K3m13s1 K3m13s1 k823 K3m13s K3m13s k824 162 MATLAB Functions Used 379 K3m3i2 K3m3i2 k91 K3m3i1 K3m3i1 k92 K3m3i K3m3i k93 K3m3j2 K3m3j2 k94 K3m3j1 K3m3j1 k95 K3m3j K3m3j k96 K3m3m2 K3m3m2 k97 K3m3m1 K3m3m1 k98 K3m3m K3m3m k99 K3m3n2 K3m3n2 k910 K3m3n1 K3m3n1 k911 K3m3n K3m3n k912 K3m3p2 K3m3p2 k913 K3m3p1 K3m3p1 k914 K3m3p K3m3p k915 K3m3q2 K3m3q2 k916 K3m3q1 K3m3q1 k917 K3m3q K3m3q k918 K3m3r2 K3m3r2 k919 K3m3r1 K3m3r1 k920 K3m3r K3m3r k921 K3m3s2 K3m3s2 k922 K3m3s1 K3m3s1 k923 K3m3s K3m3s k924 K3n23i2 K3n23i2 k101 K3n23i1 K3n23i1 k102 K3n23i K3n23i k103 K3n23j2 K3n23j2 k104 K3n23j1 K3n23j1 k105 K3n23j K3n23j k106 K3n23m2 K3n23m2 k107 K3n23m1 K3n23m1 k108 K3n23m K3n23m k109 K3n23n2 K3n23n2 k1010 K3n23n1 K3n23n1 k1011 K3n23n K3n23n k1012 K3n23p2 K3n23p2 k1013 K3n23p1 K3n23p1 k1014 K3n23p K3n23p k1015 K3n23q2 K3n23q2 k1016 K3n23q1 K3n23q1 k1017 K3n23q K3n23q k1018 K3n23r2 K3n23r2 k1019 K3n23r1 K3n23r1 k1020 K3n23r K3n23r k1021 K3n23s2 K3n23s2 k1022 K3n23s1 K3n23s1 k1023 K3n23s K3n23s k1024 K3n13i2 K3n13i2 k111 K3n13i1 K3n13i1 k112 K3n13i K3n13i k113 K3n13j2 K3n13j2 k114 K3n13j1 K3n13j1 k115 K3n13j K3n13j k116 K3n13m2 K3n13m2 k117 380 16 The Linear Brick Solid Element K3n13m1 K3n13m1 k118 K3n13m K3n13m k119 K3n13n2 K3n13n2 k1110 K3n13n1 K3n13n1 k1111 K3n13n K3n13n k1112 K3n13p2 K3n13p2 k1113 K3n13p1 K3n13p1 k1114 K3n13p K3n13p k1115 K3n13q2 K3n13q2 k1116 K3n13q1 K3n13q1 k1117 K3n13q K3n13q k1118 K3n13r2 K3n13r2 k1119 K3n13r1 K3n13r1 k1120 K3n13r K3n13r k1121 K3n13s2 K3n13s2 k1122 K3n13s1 K3n13s1 k1123 K3n13s K3n13s k1124 K3n3i2 K3n3i2 k121 K3n3i1 K3n3i1 k122 K3n3i K3n3i k123 K3n3j2 K3n3j2 k124 K3n3j1 K3n3j1 k125 K3n3j K3n3j k126 K3n3m2 K3n3m2 k127 K3n3m1 K3n3m1 k128 K3n3m K3n3m k129 K3n3n2 K3n3n2 k1210 K3n3n1 K3n3n1 k1211 K3n3n K3n3n k1212 K3n3p2 K3n3p2 k1213 K3n3p1 K3n3p1 k1214 K3n3p K3n3p k1215 K3n3q2 K3n3q2 k1216 K3n3q1 K3n3q1 k1217 K3n3q K3n3q k1218 K3n3r2 K3n3r2 k1219 K3n3r1 K3n3r1 k1220 K3n3r K3n3r k1221 K3n3s2 K3n3s2 k1222 K3n3s1 K3n3s1 k1223 K3n3s K3n3s k1224 K3p23i2 K3p23i2 k131 K3p23i1 K3p23i1 k132 K3p23i K3p23i k133 K3p23j2 K3p23j2 k134 K3p23j1 K3p23j1 k135 K3p23j K3p23j k136 K3p23m2 K3p23m2 k137 K3p23m1 K3p23m1 k138 K3p23m K3p23m k139 K3p23n2 K3p23n2 k1310 K3p23n1 K3p23n1 k1311 K3p23n K3p23n k1312 K3p23p2 K3p23p2 k1313 162 MATLAB Functions Used 381 K3p23p1 K3p23p1 k1314 K3p23p K3p23p k1315 K3p23q2 K3p23q2 k1316 K3p23q1 K3p23q1 k1317 K3p23q K3p23q k1318 K3p23r2 K3p23r2 k1319 K3p23r1 K3p23r1 k1320 K3p23r K3p23r k1321 K3p23s2 K3p23s2 k1322 K3p23s1 K3p23s1 k1323 K3p23s K3p23s k1324 K3p13i2 K3p13i2 k141 K3p13i1 K3p13i1 k142 K3p13i K3p13i k143 K3p13j2 K3p13j2 k144 K3p13j1 K3p13j1 k145 K3p13j K3p13j k146 K3p13m2 K3p13m2 k147 K3p13m1 K3p13m1 k148 K3p13m K3p13m k149 K3p13n2 K3p13n2 k1410 K3p13n1 K3p13n1 k1411 K3p13n K3p13n k1412 K3p13p2 K3p13p2 k1413 K3p13p1 K3p13p1 k1414 K3p13p K3p13p k1415 K3p13q2 K3p13q2 k1416 K3p13q1 K3p13q1 k1417 K3p13q K3p13q k1418 K3p13r2 K3p13r2 k1419 K3p13r1 K3p13r1 k1420 K3p13r K3p13r k1421 K3p13s2 K3p13s2 k1422 K3p13s1 K3p13s1 k1423 K3p13s K3p13s k1424 K3p3i2 K3p3i2 k151 K3p3i1 K3p3i1 k152 K3p3i K3p3i k153 K3p3j2 K3p3j2 k154 K3p3j1 K3p3j1 k155 K3p3j K3p3j k156 K3p3m2 K3p3m2 k157 K3p3m1 K3p3m1 k158 K3p3m K3p3m k159 K3p3n2 K3p3n2 k1510 K3p3n1 K3p3n1 k1511 K3p3n K3p3n k1512 K3p3p2 K3p3p2 k1513 K3p3p1 K3p3p1 k1514 K3p3p K3p3p k1515 K3p3q2 K3p3q2 k1516 K3p3q1 K3p3q1 k1517 K3p3q K3p3q k1518 K3p3r2 K3p3r2 k1519 382 16 The Linear Brick Solid Element K3p3r1 K3p3r1 k1520 K3p3r K3p3r k1521 K3p3s2 K3p3s2 k1522 K3p3s1 K3p3s1 k1523 K3p3s K3p3s k1524 K3q23i2 K3q23i2 k161 K3q23i1 K3q23i1 k162 K3q23i K3q23i k163 K3q23j2 K3q23j2 k164 K3q23j1 K3q23j1 k165 K3q23j K3q23j k166 K3q23m2 K3q23m2 k167 K3q23m1 K3q23m1 k168 K3q23m K3q23m k169 K3q23n2 K3q23n2 k1610 K3q23n1 K3q23n1 k1611 K3q23n K3q23n k1612 K3q23p2 K3q23p2 k1613 K3q23p1 K3q23p1 k1614 K3q23p K3q23p k1615 K3q23q2 K3q23q2 k1616 K3q23q1 K3q23q1 k1617 K3q23q K3q23q k1618 K3q23r2 K3q23r2 k1619 K3q23r1 K3q23r1 k1620 K3q23r K3q23r k1621 K3q23s2 K3q23s2 k1622 K3q23s1 K3q23s1 k1623 K3q23s K3q23s k1624 K3q13i2 K3q13i2 k171 K3q13i1 K3q13i1 k172 K3q13i K3q13i k173 K3q13j2 K3q13j2 k174 K3q13j1 K3q13j1 k175 K3q13j K3q13j k176 K3q13m2 K3q13m2 k177 K3q13m1 K3q13m1 k178 K3q13m K3q13m k179 K3q13n2 K3q13n2 k1710 K3q13n1 K3q13n1 k1711 K3q13n K3q13n k1712 K3q13p2 K3q13p2 k1713 K3q13p1 K3q13p1 k1714 K3q13p K3q13p k1715 K3q13q2 K3q13q2 k1716 K3q13q1 K3q13q1 k1717 K3q13q K3q13q k1718 K3q13r2 K3q13r2 k1719 K3q13r1 K3q13r1 k1720 K3q13r K3q13r k1721 K3q13s2 K3q13s2 k1722 K3q13s1 K3q13s1 k1723 162 MATLAB Functions Used 383 K3q13s K3q13s k1724 K3q3i2 K3q3i2 k181 K3q3i1 K3q3i1 k182 K3q3i K3q3i k183 K3q3j2 K3q3j2 k184 K3q3j1 K3q3j1 k185 K3q3j K3q3j k186 K3q3m2 K3q3m2 k187 K3q3m1 K3q3m1 k188 K3q3m K3q3m k189 K3q3n2 K3q3n2 k1810 K3q3n1 K3q3n1 k1811 K3q3n K3q3n k1812 K3q3p2 K3q3p2 k1813 K3q3p1 K3q3p1 k1814 K3q3p K3q3p k1815 K3q3q2 K3q3q2 k1816 K3q3q1 K3q3q1 k1817 K3q3q K3q3q k1818 K3q3r2 K3q3r2 k1819 K3q3r1 K3q3r1 k1820 K3q3r K3q3r k1821 K3q3s2 K3q3s2 k1822 K3q3s1 K3q3s1 k1823 K3q3s K3q3s k1824 K3r23i2 K3r23i2 k191 K3r23i1 K3r23i1 k192 K3r23i K3r23i k193 K3r23j2 K3r23j2 k194 K3r23j1 K3r23j1 k195 K3r23j K3r23j k196 K3r23m2 K3r23m2 k197 K3r23m1 K3r23m1 k198 K3r23m K3r23m k199 K3r23n2 K3r23n2 k1910 K3r23n1 K3r23n1 k1911 K3r23n K3r23n k1912 K3r23p2 K3r23p2 k1913 K3r23p1 K3r23p1 k1914 K3r23p K3r23p k1915 K3r23q2 K3r23q2 k1916 K3r23q1 K3r23q1 k1917 K3r23q K3r23q k1918 K3r23r2 K3r23r2 k1919 K3r23r1 K3r23r1 k1920 K3r23r K3r23r k1921 K3r23s2 K3r23s2 k1922 K3r23s1 K3r23s1 k1923 K3r23s K3r23s k1924 K3r13i2 K3r13i2 k201 K3r13i1 K3r13i1 k202 K3r13i K3r13i k203 K3r13j2 K3r13j2 k204 K3r13j1 K3r13j1 k205 384 16 The Linear Brick Solid Element K3r13j K3r13j k206 K3r13m2 K3r13m2 k207 K3r13m1 K3r13m1 k208 K3r13m K3r13m k209 K3r13n2 K3r13n2 k2010 K3r13n1 K3r13n1 k2011 K3r13n K3r13n k2012 K3r13p2 K3r13p2 k2013 K3r13p1 K3r13p1 k2014 K3r13p K3r13p k2015 K3r13q2 K3r13q2 k2016 K3r13q1 K3r13q1 k2017 K3r13q K3r13q k2018 K3r13r2 K3r13r2 k2019 K3r13r1 K3r13r1 k2020 K3r13r K3r13r k2021 K3r13s2 K3r13s2 k2022 K3r13s1 K3r13s1 k2023 K3r13s K3r13s k2024 K3r3i2 K3r3i2 k211 K3r3i1 K3r3i1 k212 K3r3i K3r3i k213 K3r3j2 K3r3j2 k214 K3r3j1 K3r3j1 k215 K3r3j K3r3j k216 K3r3m2 K3r3m2 k217 K3r3m1 K3r3m1 k218 K3r3m K3r3m k219 K3r3n2 K3r3n2 k2110 K3r3n1 K3r3n1 k2111 K3r3n K3r3n k2112 K3r3p2 K3r3p2 k2113 K3r3p1 K3r3p1 k2114 K3r3p K3r3p k2115 K3r3q2 K3r3q2 k2116 K3r3q1 K3r3q1 k2117 K3r3q K3r3q k2118 K3r3r2 K3r3r2 k2119 K3r3r1 K3r3r1 k2120 K3r3r K3r3r k2121 K3r3s2 K3r3s2 k2122 K3r3s1 K3r3s1 k2123 K3r3s K3r3s k2124 K3s23i2 K3s23i2 k221 K3s23i1 K3s23i1 k222 K3s23i K3s23i k223 K3s23j2 K3s23j2 k224 K3s23j1 K3s23j1 k225 K3s23j K3s23j k226 K3s23m2 K3s23m2 k227 K3s23m1 K3s23m1 k228 K3s23m K3s23m k229 K3s23n2 K3s23n2 k2210 K3s23n1 K3s23n1 k2211 162 MATLAB Functions Used 385 K3s23n K3s23n k2212 K3s23p2 K3s23p2 k2213 K3s23p1 K3s23p1 k2214 K3s23p K3s23p k2215 K3s23q2 K3s23q2 k2216 K3s23q1 K3s23q1 k2217 K3s23q K3s23q k2218 K3s23r2 K3s23r2 k2219 K3s23r1 K3s23r1 k2220 K3s23r K3s23r k2221 K3s23s2 K3s23s2 k2222 K3s23s1 K3s23s1 k2223 K3s23s K3s23s k2224 K3s13i2 K3s13i2 k231 K3s13i1 K3s13i1 k232 K3s13i K3s13i k233 K3s13j2 K3s13j2 k234 K3s13j1 K3s13j1 k235 K3s13j K3s13j k236 K3s13m2 K3s13m2 k237 K3s13m1 K3s13m1 k238 K3s13m K3s13m k239 K3s13n2 K3s13n2 k2310 K3s13n1 K3s13n1 k2311 K3s13n K3s13n k2312 K3s13p2 K3s13p2 k2313 K3s13p1 K3s13p1 k2314 K3s13p K3s13p k2315 K3s13q2 K3s13q2 k2316 K3s13q1 K3s13q1 k2317 K3s13q K3s13q k2318 K3s13r2 K3s13r2 k2319 K3s13r1 K3s13r1 k2320 K3s13r K3s13r k2321 K3s13s2 K3s13s2 k2322 K3s13s1 K3s13s1 k2323 K3s13s K3s13s k2324 K3s3i2 K3s3i2 k241 K3s3i1 K3s3i1 k242 K3s3i K3s3i k243 K3s3j2 K3s3j2 k244 K3s3j1 K3s3j1 k245 K3s3j K3s3j k246 K3s3m2 K3s3m2 k247 K3s3m1 K3s3m1 k248 K3s3m K3s3m k249 K3s3n2 K3s3n2 k2410 K3s3n1 K3s3n1 k2411 K3s3n K3s3n k2412 K3s3p2 K3s3p2 k2413 K3s3p1 K3s3p1 k2414 K3s3p K3s3p k2415 K3s3q2 K3s3q2 k2416 386 16 The Linear Brick Solid Element K3s3q1 K3s3q1 k2417 K3s3q K3s3q k2418 K3s3r2 K3s3r2 k2419 K3s3r1 K3s3r1 k2420 K3s3r K3s3r k2421 K3s3s2 K3s3s2 k2422 K3s3s1 K3s3s1 k2423 K3s3s K3s3s k2424 y K function w LinearBrickElementStresses ENUx1y1z1x2y2z2x3y3z3x4y4z4x5y5z5x6y6 z6x7y7z7x8y8z8u LinearBrickElementStresses This function returns the element stress vector for a linear brick solid element with modulus of elasticity E Poissons ratio NU coordinates of node 1 x1y1z1 coordinates of node 2 x2y2z2 coordinates of node 3 x3y3z3 coordinates of node 4 x4y4z4 coordinates of node 5 x5y5z5 coordinates of node 6 x6y6z6 coordinates of node 7 x7y7z7 and coordinates of node 8 x8y8z8 syms s t u N1 1s1t1u8 N2 1s1t1u8 N3 1s1t1u8 N4 1s1t1u8 N5 1s1t1u8 N6 1s1t1u8 N7 1s1t1u8 N8 1s1t1u8 x N1x1 N2x2 N3x3 N4x4 N5x5 N6x6 N7x7 N8x8 y N1y1 N2y2 N3y3 N4y4 N5y5 N6y6 N7y7 N8y8 z N1z1 N2z2 N3z3 N4z4 N5z5 N6z6 N7z7 N8z8 xs diffxs xt diffxt xu diffxu ys diffys yt diffyt yu diffyu zs diffzs zt diffzt zu diffzu J xsytzu ztyu ysxtzu ztxu zsxtyu ytxu N1s diffN1s N2s diffN2s N3s diffN3s N4s diffN4s N5s diffN5s N6s diffN6s 162 MATLAB Functions Used 387 N7s diffN7s N8s diffN8s N1t diffN1t N2t diffN2t N3t diffN3t N4t diffN4t N5t diffN5t N6t diffN6t N7t diffN7t N8t diffN8t N1u diffN1u N2u diffN2u N3u diffN3u N4u diffN4u N5u diffN5u N6u diffN6u N7u diffN7u N8u diffN8u The expressions below are not divided by J they are adjusted for later N1x N1sytzu ztyu ysN1tzu ztN1u zsN1tyu ytN1u N2x N2sytzu ztyu ysN2tzu ztN2u zsN2tyu ytN2u N3x N3sytzu ztyu ysN3tzu ztN3u zsN3tyu ytN3u N4x N4sytzu ztyu ysN4tzu ztN4u zsN4tyu ytN4u N5x N5sytzu ztyu ysN5tzu ztN5u zsN5tyu ytN5u N6x N6sytzu ztyu ysN6tzu ztN6u zsN6tyu ytN6u N7x N7sytzu ztyu ysN7tzu ztN7u zsN7tyu ytN7u N8x N8sytzu ztyu ysN8tzu ztN8u zsN8tyu ytN8u N1y xsN1tzu ztN1u N1sxtzu ztxu zsxtN1u N1txu N2y xsN2tzu ztN2u N2sxtzu ztxu zsxtN2u N2txu N3y xsN3tzu ztN3u N3sxtzu ztxu zsxtN3u N3txu N4y xsN4tzu ztN4u N4sxtzu ztxu zsxtN4u N4txu N5y xsN5tzu ztN5u N5sxtzu ztxu zsxtN5u N5txu N6y xsN6tzu ztN6u N6sxtzu ztxu zsxtN6u N6txu N7y xsN7tzu ztN7u N7sxtzu ztxu zsxtN7u N7txu N8y xsN8tzu ztN8u N8sxtzu ztxu zsxtN8u N8txu N1z xsytN1u N1tyu ysxtN1u N1txu N1sxtyu ytxu N2z xsytN2u N2tyu ysxtN2u N2txu N2sxtyu ytxu N3z xsytN3u N3tyu ysxtN3u N3txu N3sxtyu ytxu N4z xsytN4u N4tyu ysxtN4u N4txu N4sxtyu ytxu N5z xsytN5u N5tyu ysxtN5u N5txu N5sxtyu ytxu N6z xsytN6u N6tyu ysxtN6u N6txu N6sxtyu ytxu N7z xsytN7u N7tyu ysxtN7u N7txu N7sxtyu ytxu N8z xsytN8u N8tyu ysxtN8u N8txu N8sxtyu ytxu Next the B matrix is calculated explicitly as follows B N1x N2x N3x N4x N5x N6x N7x N8x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 N1y N2y N3y N4y N5y N6y N7y N8y 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 N1z N2z N3z N4z N5z N6z N7z N8z N1y N2y N3y N4y N5y N6y N7y N8y N1x N2x N3x N4x N5x N6x N7x N8x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 N1z N2z N3z N4z N5z N6z N7z N8z N1y N2y N3y N4y N5y N6y N7y N8y N1z N2z N3z N4z N5z N6z N7z N8z 0 0 0 0 0 0 0 0 N1x N2x N3x N4x N5x N6x N7x N8x 388 16 The Linear Brick Solid Element Bnew simplifyB Jnew simplifyJ D E1NU12NU1NU NU NU 0 0 0 NU 1NU NU 0 0 0 1 NU 0 0 0 0 0 0 12NU2 0 0 0 0 0 0 12NU2 0 0 0 0 0 0 12NU2 Bfinal BnewJnew w DBfinalu We also calculate the stresses at the centroid of the element wcent subsw stu 000 w doublewcent function y LinearBrickElementPStressessigma LinearBrickElementPStresses This function returns the three principal stresses for the element given the element stress vector The principal angles are not returned s1 sigma1 sigma2 sigma3 s2 sigma1sigma2 sigma1sigma3 sigma2sigma3 sigma4sigma4 sigma5sigma5 sigma6sigma6 ms3 sigma1 sigma4 sigma6 sigma4 sigma2 sigma5 sigma6 sigma5 sigma3 s3 detms3 y s1 s2 s3 Example 161 Consider the thin plate subjected to a uniformly distributed load as shown in Fig 163 Use one linear brick element to solve this problem as shown in Fig 164 Given E 210 GPa ν 03 t 0025 m and w 3000 kNm2 determine 1 the global stiffness matrix for the structure 2 the displacements at nodes 5 6 7 and 8 w 025 m 05 m Fig 163 Thin Plate for Example 161 162 MATLAB Functions Used 389 8 2 1 6 5 3 4 7 Fig 164 Discretization of Thin Plate into One Linear Brick Solution Use the six steps outlined in Chap 1 to solve this problem using the linear brick element Step 1 Discretizing the Domain We subdivide the plate into one linear brick element only for illustration purposes More elements must be used in order to obtain reliable results Thus the domain is subdivided into one element and eight nodes as shown in Fig 164 The total force due to the distributed load is divided equally between nodes 5 6 7 and 8 The units used in the MATLAB calculations are kN and meter Table 161 shows the element connectivity for this example Table 161 Element Connectivity for Example 161 Element Number Node i Node j Node m Node n Node p Node q Node r Node s 1 1 2 3 4 5 6 7 8 Step 2 Writing the Element Stiffness Matrices The element stiffness matrix k1 is obtained by making a call to the MATLAB function LinearBrickElementStiffness This matrix has size 24 24 k1 LinearBrickElementStiffness 210e6030000250000025000250025 05000250500050250050250025 k1 10e008 390 16 The Linear Brick Solid Element Columns 1 through 10 04571 04445 02256 02218 02227 02252 01143 01080 00042 00021 04445 04571 02218 02256 02252 02227 01080 01143 00021 00042 02256 02218 04571 04445 01143 01080 02227 02252 00004 00008 02218 02256 04445 04571 01080 01143 02252 02227 00008 00004 02227 02252 01143 01080 04571 04445 02256 02218 00008 00004 02252 02227 01080 01143 04445 04571 02218 02256 00004 00008 01143 01080 02227 02252 02256 02218 04571 04445 00021 00042 01080 01143 02252 02227 02218 02256 04445 04571 00042 00021 00042 00021 00004 00008 00008 00004 00021 00042 04655 04403 00021 00042 00008 00004 00004 00008 00042 00021 04403 04655 00004 00008 00042 00021 00021 00042 00008 00004 02319 02092 00008 00004 00021 00042 00042 00021 00004 00008 02092 02319 00008 00004 00021 00042 00042 00021 00004 00008 02311 02210 00004 00008 00042 00021 00021 00042 00008 00004 02210 02311 00021 00042 00008 00004 00004 00008 00042 00021 01164 01038 00042 00021 00004 00008 00008 00004 00021 00042 01038 01164 00421 00084 00042 00210 00084 00421 00210 00042 00841 00168 00084 00421 00210 00042 00421 00084 00042 00210 00168 00841 00042 00210 00421 00084 00210 00042 00084 00421 00841 00168 00210 00042 00084 00421 00042 00210 00421 00084 00168 00841 00084 00421 00210 00042 00421 00084 00042 00210 00421 00084 00421 00084 00042 00210 00084 00421 00210 00042 00084 00421 00210 00042 00084 00421 00042 00210 00421 00084 00421 00084 00042 00210 00421 00084 00210 00042 00084 00421 00084 00421 Columns 11 through 20 00004 00008 00008 00004 00021 00042 00421 00084 00042 00210 00008 00004 00004 00008 00042 00021 00084 00421 00210 00042 00042 00021 00021 00042 00008 00004 00042 00210 00421 00084 00021 00042 00042 00021 00004 00008 00210 00042 00084 00421 00021 00042 00042 00021 00004 00008 00084 00421 00210 00042 00042 00021 00021 00042 00008 00004 00421 00084 00042 00210 00008 00004 00004 00008 00042 00021 00210 00042 00084 00421 00004 00008 00008 00004 00021 00042 00042 00210 00421 00084 02319 02092 02311 02210 01164 01038 00841 00168 00841 00168 02092 02319 02210 02311 01038 01164 00168 00841 00168 00841 04655 04403 01164 01038 02311 02210 00841 00168 00841 00168 04403 04655 01038 01164 02210 02311 00168 00841 00168 00841 01164 01038 04655 04403 02319 02092 00421 00084 00421 00084 01038 01164 04403 04655 02092 02319 00084 00421 00084 00421 02311 02210 02319 02092 04655 04403 00421 00084 00421 00084 02210 02311 02092 02319 04403 04655 00084 00421 00084 00421 00841 00168 00421 00084 00421 00084 15761 15677 07872 07813 00168 00841 00084 00421 00084 00421 15677 15761 07813 07872 00841 00168 00421 00084 00421 00084 07872 07813 15761 15677 00168 00841 00084 00421 00084 00421 07813 07872 15677 15761 00421 00084 00841 00168 00841 00168 07864 07847 03940 03898 00084 00421 00168 00841 00168 00841 07847 07864 03898 03940 00421 00084 00841 00168 00841 00168 03940 03898 07864 07847 00084 00421 00168 00841 00168 00841 03898 03940 07847 07864 Columns 21 through 24 00084 00421 00210 00042 00421 00084 00042 00210 00210 00042 00084 00421 162 MATLAB Functions Used 391 00042 00210 00421 00084 00421 00084 00042 00210 00084 00421 00210 00042 00042 00210 00421 00084 00210 00042 00084 00421 00421 00084 00421 00084 00084 00421 00084 00421 00421 00084 00421 00084 00084 00421 00084 00421 00841 00168 00841 00168 00168 00841 00168 00841 00841 00168 00841 00168 00168 00841 00168 00841 07864 07847 03940 03898 07847 07864 03898 03940 03940 03898 07864 07847 03898 03940 07847 07864 15761 15677 07872 07813 15677 15761 07813 07872 07872 07813 15761 15677 07813 07872 15677 15761 Step 3 Assembling the Global Stiffness Matrix Since the structure has eight nodes the size of the global stiffness matrix is 24 24 Therefore to obtain K we first set up a zero matrix of size 24 24 then make one call to the MATLAB function LinearBrickAssemble since we have only one element in the structure In this case it is clear that the element stiffness matrix is the same as the global stiffness matrix The following are the MATLAB commands K zeros2424 K LinearBrickAssembleKk112345678 K 10e008 Columns 1 through 10 04571 04445 02256 02218 02227 02252 01143 01080 00042 00021 04445 04571 02218 02256 02252 02227 01080 01143 00021 00042 02256 02218 04571 04445 01143 01080 02227 02252 00004 00008 02218 02256 04445 04571 01080 01143 02252 02227 00008 00004 392 16 The Linear Brick Solid Element 02227 02252 01143 01080 04571 04445 02256 02218 00008 00004 02252 02227 01080 01143 04445 04571 02218 02256 00004 00008 01143 01080 02227 02252 02256 02218 04571 04445 00021 00042 01080 01143 02252 02227 02218 02256 04445 04571 00042 00021 00042 00021 00004 00008 00008 00004 00021 00042 04655 04403 00021 00042 00008 00004 00004 00008 00042 00021 04403 04655 00004 00008 00042 00021 00021 00042 00008 00004 02319 02092 00008 00004 00021 00042 00042 00021 00004 00008 02092 02319 00008 00004 00021 00042 00042 00021 00004 00008 02311 02210 00004 00008 00042 00021 00021 00042 00008 00004 02210 02311 00021 00042 00008 00004 00004 00008 00042 00021 01164 01038 00042 00021 00004 00008 00008 00004 00021 00042 01038 01164 00421 00084 00042 00210 00084 00421 00210 00042 00841 00168 00084 00421 00210 00042 00421 00084 00042 00210 00168 00841 00042 00210 00421 00084 00210 00042 00084 00421 00841 00168 00210 00042 00084 00421 00042 00210 00421 00084 00168 00841 00084 00421 00210 00042 00421 00084 00042 00210 00421 00084 00421 00084 00042 00210 00084 00421 00210 00042 00084 00421 00210 00042 00084 00421 00042 00210 00421 00084 00421 00084 00042 00210 00421 00084 00210 00042 00084 00421 00084 00421 Columns 11 through 20 00004 00008 00008 00004 00021 00042 00421 00084 00042 00210 00008 00004 00004 00008 00042 00021 00084 00421 00210 00042 00042 00021 00021 00042 00008 00004 00042 00210 00421 00084 00021 00042 00042 00021 00004 00008 00210 00042 00084 00421 00021 00042 00042 00021 00004 00008 00084 00421 00210 00042 00042 00021 00021 00042 00008 00004 00421 00084 00042 00210 00008 00004 00004 00008 00042 00021 00210 00042 00084 00421 00004 00008 00008 00004 00021 00042 00042 00210 00421 00084 02319 02092 02311 02210 01164 01038 00841 00168 00841 00168 02092 02319 02210 02311 01038 01164 00168 00841 00168 00841 04655 04403 01164 01038 02311 02210 00841 00168 00841 00168 04403 04655 01038 01164 02210 02311 00168 00841 00168 00841 01164 01038 04655 04403 02319 02092 00421 00084 00421 00084 01038 01164 04403 04655 02092 02319 00084 00421 00084 00421 02311 02210 02319 02092 04655 04403 00421 00084 00421 00084 02210 02311 02092 02319 04403 04655 00084 00421 00084 00421 00841 00168 00421 00084 00421 00084 15761 15677 07872 07813 00168 00841 00084 00421 00084 00421 15677 15761 07813 07872 00841 00168 00421 00084 00421 00084 07872 07813 15761 15677 00168 00841 00084 00421 00084 00421 07813 07872 15677 15761 00421 00084 00841 00168 00841 00168 07864 07847 03940 03898 00084 00421 00168 00841 00168 00841 07847 07864 03898 03940 00421 00084 00841 00168 00841 00168 03940 03898 07864 07847 00084 00421 00168 00841 00168 00841 03898 03940 07847 07864 Columns 21 through 24 00084 00421 00210 00042 00421 00084 00042 00210 00210 00042 00084 00421 00042 00210 00421 00084 00421 00084 00042 00210 00084 00421 00210 00042 00042 00210 00421 00084 00210 00042 00084 00421 162 MATLAB Functions Used 393 00421 00084 00421 00084 00084 00421 00084 00421 00421 00084 00421 00084 00084 00421 00084 00421 00841 00168 00841 00168 00168 00841 00168 00841 00841 00168 00841 00168 00168 00841 00168 00841 07864 07847 03940 03898 07847 07864 03898 03940 03940 03898 07864 07847 03898 03940 07847 07864 15761 15677 07872 07813 15677 15761 07813 07872 07872 07813 15761 15677 07813 07872 15677 15761 Step 4 Applying the Boundary Conditions The matrix 1611 for this structure can be written using the global stiffness matrix obtained in the previous step The boundary conditions for this problem are given as U1x U1y U1z U2x U2y U2z 0 U3x U3y U3z U4x U4y U4z 0 F5x 46875 F5y 0 F5z 0 F6x 46875 F6y 0 F6z 0 F7x 46875 F7y 0 F7z 0 F8x 46875 F8y 0 F8z 0 1614 We next insert the above conditions into the matrix equation for this structure not shown here and proceed to the solution step below Step 5 Solving the Equations Solving the resulting system of equations will be performed by partitioning manually and Gaussian elimination with MATLAB First we partition the re sulting equation by extracting the submatrix in rows 13 to 24 and columns 13 to 24 Therefore we obtain the following equation noting that the numbers are shown to only two decimal places although MATLAB carries out the calculations using at least four decimal places 394 16 The Linear Brick Solid Element 108 047 044 023 021 004 001 004 001 008 002 008 0 002 044 047 021 023 001 004 001 004 002 008 002 008 023 021 047 044 004 001 004 001 008 002 008 002 021 023 044 047 001 004 001 004 002 008 002 008 004 001 004 001 158 157 079 078 079 078 039 039 001 004 001 004 157 158 078 079 078 079 039 039 004 001 004 001 079 078 158 157 039 039 079 078 001 004 001 004 078 079 157 158 039 039 078 079 008 002 008 002 079 078 039 039 158 157 079 078 002 008 002 008 078 079 039 039 157 158 078 079 008 002 008 002 039 039 079 078 079 078 158 157 002 008 002 008 039 039 078 079 078 079 157 158 U5x U5y U5z U6x U6y U6z U7x U7y U7z U8x U8y U8z 46875 0 0 46875 0 0 46875 0 0 46875 0 0 1615 The solution of the above system is obtained using MATLAB as follows Note that the backslash operator is used for Gaussian elimination k K13241324 k 10e008 Columns 1 through 10 04655 04403 02319 02092 00421 00084 00421 00084 00841 00168 04403 04655 02092 02319 00084 00421 00084 00421 00168 00841 02319 02092 04655 04403 00421 00084 00421 00084 00841 00168 02092 02319 04403 04655 00084 00421 00084 00421 00168 00841 00421 00084 00421 00084 15761 15677 07872 07813 07864 07847 00084 00421 00084 00421 15677 15761 07813 07872 07847 07864 00421 00084 00421 00084 07872 07813 15761 15677 03940 03898 00084 00421 00084 00421 07813 07872 15677 15761 03898 03940 00841 00168 00841 00168 07864 07847 03940 03898 15761 15677 00168 00841 00168 00841 07847 07864 03898 03940 15677 15761 00841 00168 00841 00168 03940 03898 07864 07847 07872 07813 00168 00841 00168 00841 03898 03940 07847 07864 07813 07872 162 MATLAB Functions Used 395 Columns 11 through 12 00841 00168 00168 00841 00841 00168 00168 00841 03940 03898 03898 03940 07864 07847 07847 07864 07872 07813 07813 07872 15761 15677 15677 15761 f 46875 0 0 46875 0 0 46875 0 0 46875 0 0 f 46875 0 0 46875 0 0 46875 0 0 46875 0 0 u kf Warning Matrix is close to singular or badly scaled Results may be inaccurate RCOND 7687107e018 u 10e008 00000 00000 396 16 The Linear Brick Solid Element 00000 00000 20972 20972 20972 20972 20972 20972 20972 20972 It is clear that the stiffness matrix is singular or badly scaled This is due to using one element only in this example This is also due to the element having a bad aspect ratio Therefore the results obtained above for the displacements are not reliable even totally wrong It is anticipated that using more elements will result in reliable answers to the displacements This will be done by the reader in Problem 161 Problems Problem 161 Consider the thin plate problem solved in Example 161 Solve the problem again us ing two linear brick elements instead of one element as shown in Fig 165 Compare your answers for the displacements at nodes 9 10 11 and 12 with the answers ob tained in the example Compare also your answers with those obtained in the related examples and problems in Chaps 11 to 15 8 12 2 1 10 9 3 4 11 6 5 7 Fig 165 Discretization of Thin Plate into Two Linear Bricks Hint Table 162 shows the element connectivity for this problem Table 162 Element connectivity for problem 162 Element Number Node i Node j Node m Node n Node p Node q Node r Node s 1 1 2 3 4 5 6 7 8 2 5 6 7 8 9 10 11 12 17 Other Elements In this chapter we review the applications of finite elements in other areas like fluid flow heat transfer electromagnetics etc This is intended to be a concluding chapter to the book The first sixteen chapters were mainly concerned with finite elements in structural analysis and mechanics In this chapter I show how the same methodology in terms of consistency and simplicity can be used to formulate and code other types of elements in MATLAB First we review the applications of finite elements in other areasthenweprovideasampleexamplewithitsMATLABcodenamelythefluidflow onedimensional element The reader may then be able to code other types of elements more complicated or in other areas following the same format and procedure The six steps used in this book can still be used to write the MATLAB code for any other type of element 171 Applications of Finite Elements in Other Areas Finite elements have been used in this book in the sole area of linear elastic struc tural analysis and mechanics However finite elements are also used in other diverse areas like fluid flow heat transfer mass transport electromagnetics geotechnical engineering structural dynamics plasticity and viscoplasticity etc In this section we review the use of finite elements in these areas Finite elements are used to model membrane plate and shell problems in structural mechanics We have shown in this book different types of membrane elements plane stress and plane strain elements but have not shown the plate and shell elements Different types of triangular rectangular and quadrilateral plate bending elements can be formulated using both the Kirchoff and Reissner plate theories Shell elements of different types can also be used For example flat shell elements can be developed by superimposing the stiffness of the membrane element and plate bending element Other types of structural elements can still be developed Axisymmetric elements may be formulated to be used in different types of problems like pressure vessels Finite elements may also be used in fracture mechanics and damage mechanics to simulate cracks microcracks voids and other types of defects The areas of structural 398 17 Other Elements dynamics and earthquake engineering are also important areas for finite element analysis Finally in structural mechanics nonlinear finite elements may be used in problems in plasticity viscoplasticity and stability of structures In geotechnical engineering finite elements are used extensively in solving geotechnical problems They are used in modeling foundations slopes soilstructure interaction consolidation seepage and flow nets excavation earth pressures slope stability and other complex boundary value problems in geotechnical engineering Finite elements are also used in mechanical design especially in machines and components In addition they are used in heat transfer and mass transport to solve problems in conduction radiation etc They can be used to solve both linear and nonlinear problems and both steadystate and transient processesAll types of thermal boundary conditions may be modeled including isotropic and orthotropic properties heat loads etc The area of electrical engineering is also important for finite elements Different types of elements may be used to in electromagnetic analysis They may be used in studying antennas radar microwaves engineering highspeed and highfrequency circuits wireless communications electrooptical engineering remote sensing bio electromagnetics and geoelectromagnetics The finite element method provides a very powerful technique for solving problems in circuits and circuit analysis A very important area for the use of finite elements is the area of water resources and the global atmosphere Finite elements can be used in groundwater hydrology turbulent flow problems fluid mechanics hydrodynamic flows flow separation pat terns incompressible NavierStokes equations in three dimensions oceanic general circulation modeling wave propagation typhoon surge analysis mesh generation of groundwater flow nonsteady seepage coastal aquifers soilmoisture flow contam inant transport and sediment transport Finally the finite element method is a recognized method used in the numerical analysis branch of mathematics and mathematical physics In addition to finite dif ferences finite elements are used extensively in solving partial differential equations of all types In the next two sections we provide as an example the full formulation and MAT LAB code for the onedimensional fluid flow element The MATLAB formulation and code for other elements may be written in a similar fashion 172 Basic Equations of the Fluid Flow 1D Element The fluid flow 1D element is a onedimensional finite element where the local and global coordinates coincide It is characterized by linear shape functions and is iden tical to the spring and linear bar elements The fluid flow 1D element has permeability coefficient Kxx in xdirection crosssectional area A and length L Each fluid flow 1D element has two nodes as shown in Fig 171 In this case the element stiffness matrix is given by see 1 k KxxAKL KxxAKL KxxAKL KxxAKL Fig 171 The Fluid Flow 1D Element Obviously the element stiffness matrix for the fluid flow 1D element is similar to that of the spring element with the stiffness replaced by KxxAL It is clear that the fluid flow 1D element has only two degrees of freedom one at each node Consequently for a system with n nodes the global stiffness matrix K will be of size n n since we have one degree of freedom at each node The global stiffness matrix K is assembled by making calls to the MATLAB function FluidFlow1DAssemble which is written specifically for this purpose Once the global stiffness matrix K is obtained we have the following system equation KP F where P is the global nodal potential fluid head vector and F is the global nodal volumetric flow rate vector At this step the boundary conditions are applied manually to the vectors P and F Then the matrix 172 is solved by partitioning and Gaussian elimination Finally once the unknown potentials are found the element velocities are obtained for each element as follows vx Kxx 1L 1L p where p is the 2 1 element potential fluid head vector and vx is the element velocity The element volumetric flow rate Qf is obtained by multiplying the element velocity by the crosssectional area A as follows Qf vxA 400 17 Other Elements 173 MATLAB Functions Used in the Fluid Flow 1D Element The four MATLAB functions used for the fluid flow 1D element are FluidFlow1DElementStiffnessKxx A L This function calculates the element stiffness matrix for each fluid flow 1D element with permeability coefficient Kxx crosssectional area A and length L It returns the 2 2 element stiffness matrix k FluidFlow1DAssembleK k i j This functions assembles the element stiffness matrix k of the fluid flow 1D joining nodes i at the left end and j at the right end into the global stiffness matrix K It returns the nn global stiffness matrix K every time an element is assembled FluidFlow1DElementVelocitiesKxx L p This function calculates the element velocity vector using the element permeability coefficient Kxx the element length L and the element potential fluid head vector p It returns the element velocity vx as a scalar FluidFlow1DElementVFRKxx L p A This function calculates the element vol umetric flow rate Qf using the element permeability coefficient Kxx the element length L the element potential fluid head vector p and the crosssectional area A It returns the element volumetric flow rate as a scalar The following is a listing of the MATLAB source code for each function function y FluidFlow1DElementStiffnessKxxAL FluidFlow1DElementStiffness This function returns the element stiffness matrix for a fluid flow 1D element with coefficient of permeability Kxx crosssectional area A and length L The size of the element stiffness matrix is 2 x 2 y KxxAL KxxAL KxxAL KxxAL function y FluidFlow1DAssembleKkij FluidFlow1DAssemble This function assembles the element stiffness matrix k of the fluid flow 1D element with nodes i and j into the global stiffness matrix K This function returns the global stiffness matrix K after the element stiffness matrix k is assembled Kii Kii k11 Kij Kij k12 173 MATLAB Functions Used in the Fluid Flow 1D Element 401 Kji Kji k21 Kjj Kjj k22 y K function y FluidFlow1DElementVelocitiesKxxLp FluidFlow1DElementVelocities This function returns the element velocity given the element permeability coefficient Kxx the element length L and the element nodal potential fluid head vector p y Kxx 1L 1L p function y FluidFlow1DElementVFRKxxLpA FluidFlow1DElementVFR This function returns the element volumetric flow rate given the element permeability coefficient Kxx the element length L the element nodal potential fluid head vector p and the element crosssectional area A y Kxx 1L 1L p A In concluding this book we emphasize that the sixstep strategy followed in this book can be used to formulate and code MATLAB functions for any other type of finite element that is formulated References Finite Element Analysis Books 1 Logan D A First Course in the Finite Element Method Second Edition PWS Publishing Company ITP 1993 2 Logan D A First Course in the Finite Element Method Using Algor Second Edition BrooksCole Publishing Company ITP 2001 3 Cook R Malkus D and Plesha M Concepts and Applications of Finite Element Analysis Third Edition John Wiley Sons 1989 4 Cook R Finite Element Modeling for Stress Analysis John Wiley Sons 1995 5 Zienkiewicz O and Taylor R The Finite Element Method Volumes I II and III Fifth Edition ButterworthHeinemann 2000 6 Reddy J An Introduction to the Finite Element Method Second Edition McGrawHill 1993 7 Bathe KJ Finite Element Procedures Prentice Hall 1996 8 Chandrupatla T and BelegunduA Introduction to Finite Elements in Engineering Second Edition Prentice Hall 1997 9 Lewis P and Ward J The Finite Element Method Principles and Applications AddisonWesley 1991 10 Henwood D and Bonet J Finite Elements A Gentle Introduction Macmillan Press 1996 11 Fagan M Finite Element Analysis Theory and Practice Longman 1992 12 Knight C The Finite Element Method in Mechanical Design PWS Publishing Company ITP 1993 13 Burnett D Finite Element Analysis From Concepts to Applications AddisonWesley 1988 14 Bickford W A First Course in the Finite Element Method Second Edition Irwin Publishing 1994 15 Pintur D Finite Element Beginnings Mathcad Electronic Book MathSoft 1994 16 Buchanan G Schaums Outlines Finite Element Analysis Second Edition McGrawHill 1995 17 Kwon Y and Bang H The Finite Element Method Using MATLAB Second Edition CRC Press 2000 18 Sennett R Matrix Analysis of Structures Prentice Hall 1994 MATLAB Books 19 Etter D Engineering Problem Solving with MATLAB Second Edition Prentice Hall 1996 20 PartEnander E and Sjoberg A The MATLAB 5 Handbook AddisonWesley 1999 21 Biran A and Breiner M MATLAB 5 for Engineers AddisonWesley 1999 22 Higham D and Higham N MATLAB Guide SIAM 2000 23 Hanselman D and Littlefield B Mastering MATLAB 6 Prentice Hall 2000 404 References 24 Palm W Introduction to MATLAB 6 for Engineers McGrawHill 2000 25 Chen K Giblin P and IrvingA Mathematical Explorations with MATLAB Cambridge University Press 1999 26 PolkingJandArnoldDOrdinaryDifferentialEquationsUsingMATLABSecondEditionPrentice Hall 1999 27 Fausett L Applied Numerical Analysis Using MATLAB Prentice Hall 1999 MATLAB Tutorials on the Internet 28 Cavers I An Introductory Guide to MATLAB Second Edition 1998 http wwwcsubcca spidercaversMatlabGuideguidehtml 29 Gockenback M A Practical Introduction to MATLAB Updated for MATLAB 5 httpwwwmathmtuedumsgockenintrointrohtml 30 Huber T MATLAB Tutorials EnvisionIt Workshop 1997 httpphysicsgaceduhuberenvision tutor2 31 Maneval J Helpful Information for Using MATLAB httpwwwfacstaffbucknelledumaneval help211helpmainhtml 32 Recktenwald G MATLAB Hypertext Reference 1996 httpwwwmepdxedugerry MATLAB 33 University of Texas MATLAB Online Reference Documentation httpwwwutexasedu ccmathMatlabManualReferenceTOChtml 34 Southern Illinois University at Carbondale MATLAB Tutorials httpwwwmathsiuedumatlab tutorialshtml 35 MATLAB Educational Sites httpwwweecemaineedummmatwebhtml Answers to Problems Answers to all the problems are given below For each problem two results are given the displacements and the reactions Problem 21 u 00222 F 44444 100000 55556 Problem 22 u 01471 02206 03676 F 250000 00000 00000 250000 406 Answers to Problems Problem 31 u 10e003 00143 01000 01429 F 50000 100000 00000 150000 Problem 32 u 10e004 04582 03554 02819 02248 01780 01385 01042 00739 00469 00224 It is clear from the results above that the displacement at the free end is 004582 mm which is very close to that obtained in Example 32 However the result obtained in this problem is more accurate because we have used more elements in the discretization Problem 33 u 24975e005 Answers to Problems 407 F 249750 250000 00250 Problem 41 u 10e004 04211 02782 01353 00677 Thus it is clear that the displacement at the free end is 04211 104 m or 004211 mm which is very close to that obtained in Example 32 which was 004517 mmandthatobtainedinthesolutionofProblem32whichwas004582 mm Problem 42 u 00075 00079 00081 F 150000 00000 100000 50000 Problem 51 u 10e003 02083 00333 00106 00333 408 Answers to Problems 01766 00107 00212 00516 F 88889 93333 200000 00000 00000 0 00000 0 0 00000 111111 93333 Problem 52 u 00000 00000 00034 F 26489 19866 53645 0 19866 19866 00000 00000 100000 Problem 61 u 10e003 Answers to Problems 409 02351 00003 03671 F 00000 166471 99883 64151 106919 00000 00000 166862 100117 85849 107311 00000 150000 00000 200000 Problem 71 u 10e004 02273 04545 02273 F 15584 0 32143 150000 47727 0 Problem 72 u 00006 00012 00020 410 Answers to Problems F 39946 39946 84783 75000 77242 150000 32405 150000 Problem 73 u 00016 00002 00009 F 15225 24913 100000 00000 06920 0 77855 Problem 81 u 01865 00000 00298 01865 00149 F 200000 46875 462501 Answers to Problems 411 00000 0 150000 200000 46875 00000 Problem 82 u 00013 00009 00005 00012 00008 00003 F 20283 84058 80296 200000 125000 104170 00000 125000 104170 220283 165942 151226 Problem 83 u 00001 00056 00021 412 Answers to Problems F 00000 100000 00000 130903 01822 07290 130903 98178 Problem 91 u 00048 00000 00018 F 100000 00000 0 50000 138905 200000 50000 138905 200000 Problem 101 u 00004 00000 00006 00000 00004 00000 00021 00000 00006 Answers to Problems 413 00000 00004 00002 00021 00000 00006 00000 00004 00002 00004 00000 00006 00000 00004 00000 F 11599 25054 10091 26719 03008 32737 63324 57484 10091 26719 03008 176937 63481 57484 10091 26719 03019 177439 11596 25054 10091 26719 03019 32733 0 00000 414 Answers to Problems 0 00000 00000 00000 0 00000 0 00000 00000 00000 150000 00000 00000 00000 00000 00000 0 0 00000 00000 00000 00000 Problem 111 u 10e005 06928 00714 06928 00714 03271 00000 F 93750 37540 93750 00000 Answers to Problems 415 93750 00000 93750 37540 0 00000 Problem 112 u 10e003 00200 00225 00291 00581 00305 00854 00008 00173 00072 00585 00077 00867 00001 00176 00010 00639 00064 00960 00207 00199 00346 00635 00356 01167 F 188054 10788 0 416 Answers to Problems 00000 00000 00000 00000 00000 13366 92538 00000 00000 00000 00000 00000 00000 09105 02247 0 00000 00000 00000 00000 00000 210525 94427 00000 0 0 00000 00000 200000 Problem 113 u 00002 00044 00002 00044 00002 00044 00002 00044 Answers to Problems 417 F 0 175000 0 175000 00000 00000 00000 00000 175000 175000 Problem 121 u 10e005 03500 00590 07006 00415 01653 00172 05286 00288 03454 00000 07080 00000 01653 00172 05286 00288 03500 00590 07006 00415 F 34469 15335 418 Answers to Problems 0 00000 31250 00000 0 00000 00000 00000 118562 00000 00000 00000 125000 00000 00000 00000 00000 0 34469 15335 00000 00000 31250 0 Problem 131 u 10e005 01768 00552 03500 00548 05284 00536 07071 00535 01648 00000 03496 00000 05287 Answers to Problems 419 00000 07071 00000 01768 00552 03500 00548 05284 00536 07071 00535 F 49836 12580 00000 00000 00000 00000 00000 00000 46875 00000 87829 00000 00000 00000 0 00000 00000 00000 93750 00000 49836 12580 00000 0 00000 00000 00000 00000 46875 00000 420 Answers to Problems Problem 132 u 10e003 00299 00284 00402 00753 00386 01102 00015 00203 00068 00800 00123 01088 00021 00185 00023 00824 00047 01224 00307 00260 00489 00758 00565 01589 F 176570 34450 00000 00000 00000 00000 00000 00000 74806 70314 00000 00000 Answers to Problems 421 00000 00000 00000 00000 79321 67416 00000 00000 00000 00000 00000 00000 172054 27819 0 0 00000 00000 00000 200000 Problem 133 u 00003 00029 00003 00029 00003 00029 00003 00029 00003 00029 00003 00029 F 00000 87500 00000 422 Answers to Problems 175000 00000 87500 00000 00000 00000 00000 0 00000 116553 116894 116553 Problem 141 u 00002 00029 00002 00029 00002 00029 00002 00029 00002 00029 00002 00029 00002 00029 00002 00029 F 0 58333 00000 233333 00000 58333 00000 00000 Answers to Problems 423 0 0 00000 00000 00000 00000 00000 00000 116419 117162 116419 Problem 151 u 10e005 00185 06710 01485 00091 06699 01489 00183 05809 00319 00074 05795 00317 F 511925 30565 44842 512090 63185 30368 00000 31250 00000 00000 62500 424 Answers to Problems 00000 292553 63185 46493 292388 30565 28717 00000 62500 0 00000 31250 0 Problem 161 u 10e008 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 15729 15729 15729 15729 15729 15729 15729 15729 Contents of the Accompanying CDROM The accompanying CDROM includes two folders as follows MFiles This folder includes the 84 MATLAB functions written specifically to be used with this book In order to use them they should be copied to the working directory in your MATLAB folder on the hard disk or you can set the MATLAB path to the correct folder that includes these files Solutions Manual This folder includes the Solutions Manual for the book Two ver sions of the Solutions Manual are provided The file Solutions to Problems includes detailed solutions to all the problems in the book and is about 360 pages in length The other file Solutions to Problems2 is a reduced version of the solutions in about 65 pages only The two Solutions Manuals are provided in both DOC and RTF formats Index Area 28 36 46 62 92 195 400 Assembly 1 11 14 27 28 45 46 63 77 92 139 177 194 195 207 219 252 279 299 329 352 400 Axial force 140 143 154 155 166 172 Axial force diagram 140 143 155 156 169 Bar linear 2743 53 quadratic 4560 Beam 109135 173 BeamAssemble 3 109 110 114 123 BeamElementForces 3 110 117 BeamElementMomentDiagram 3 110 118 BeamElementShearDiagram 3 110 118 130 131 132 BeamElementStiffness 3 110 113 122 123 Bending moment 110 112 118 120 130 132 133 140 143 154 158 169 196 203 216 Bending moment diagram 110 112 118 120 130 133 134 158 159 171 Bilinear quadrilateral 275310 BilinearQuadAssemble 4 277 279 286 299 BilinearQuadElementArea 4 275 278 BilinearQuadElementPStresses 4 279 294 307 BilinearQuadElementStiffness 4 277 278 279 284 296 BilinearQuadElementStiffness2 4 278 BilinearQuadElementStresses 4 278 279 292 304 Boundary conditions 2 12 15 22 46 50 126 150 165 186 210 Brick element 367 368 371 CDROM 2 279 Continuous structure 1 Diagram axial force 155 156 169 170 bending moment 120 132 133 158 159 171 172 shear force 119 131 132 156 157 170 171 Discrete structure 1 Discretization 1 2 36 223 232 245 246 259 273 308 326 365 Displacement 2 12 26 28 43 62 71 109 176 194 228 Domain 1 13 18 30 36 48 54 66 260 284 326 347 Elastic 1 27 28 46 63 91 110 175 195 311 Element stiffness matrix 11 12 13 27 28 46 63 92 110 139 177 195 219 278 399 400 Finite element 14 397398 Fluid flow 397 398399 400401 FluidFlow1Dassemble 4 399 400 FluidFlow1DelementStiffness 4 400 FluidFlow1DelementVelocities 4 400 FluidFlow1DElementVFR 4 400 428 Index Force 12 13 16 17 28 34 52 110 117 118 138 154 169 176 190 195 232 296 Frame plane 137174 space 193216 Gaussian elimination 2 7 8 12 15 22 28 32 41 42 46 51 57 62 70 84 92 103 110 115 116 127 138 150 151 165 166 176 187 194 211 219 241 251 266 267 278 289 290 301 314 330 331 355 356 371 393 394 399 Global Stiffness Matrix 1 2 11 12 14 15 17 19 21 26 27 28 3132 3941 43 45 46 4950 5556 60 62 68 89 92 99 114 115 123 138 146 149 162 172 182 207 237 262 299 325 328 399 400 Grid 175191 179 GridAssemble 3 176 177 182 GridElementForces 3 177 189 GridElementLength 3 176 177 GridElementStiffness 3 177 180 Inclined support 62 63 73 139 140 Length 27 28 36 45 61 63 91 93 109 139 140 400 Linear 1 27 43 61 91 217248 249 259 275 278 295 337365 367396 398 Linear bar 2743 Linear tetrahedron 337 340 Linear triangle 217 219 231 232 245 246 251 252 LinearBarAssemble 2 27 28 31 39 LinearBarElementForces 2 28 34 43 LinearBarElementStiffness 2 28 30 37 LinearBarElementStresses 2 28 35 43 LinearBrickAssemble 4 370 371 391 LinearBrickElementPStresses 4 372 388 LinearBrickElementStiffness 4 370 371 389 LinearBrickElementStresses 4 372 LinearBrickElementVolume 4 367 371 LinearTriangleAssemble 3 218 219 225 237 LinearTriangleElementArea 217 219 LinearTriangleElementPStresses 3 219 231 245 LinearTriangleElementStiffness 3 219 223 233 234 235 LinearTriangleElementStresses 3 219 229 230 245 MATLAB 2 4 12 28 46 62 92 110 139 176 195 219 251 278 314 340 371 400 Partitioning 2 12 15 22 32 46 57 70 110 127 187 227 278 Plane Frame 137174 Plane strain 217 218 219 252 275 278 279 Plane stress 217 219 223 252 314 397 Plane truss 6189 139 174 PlaneFrameAssemble 3 138 139 141 146 162 PlaneFrameElementAxialDiagram 3 140 154 155 169 PlaneFrameElementForces 3 140 153 167 PlaneFrameElementLength 3 139 140 161 PlaneFrameElementMomentDiagram 3 140 154 158 159 169 171 PlaneFrameElementShearDiagram 3 140 142 154 157 170 PlaneFrameElementStiffness 3 139 144 161 PlaneFrameInclinedSupport 3 139 140 143 PlaneTrussAssemble 2 61 63 68 77 PlaneTrussElementForce 2 63 PlaneTrussElementLength 2 62 PlaneTrussElementStiffness 2 63 66 74 PlaneTrussElementStress 3 63 71 86 PlaneTrussInclinedSupport 3 62 63 81 Plot 9 110 140 195 196 Postprocessing 2 43 Quadratic Bar 4560 Quadratic quadrilateral 311336 Quadratic triangle 249 259 273 QuadraticBarAssemble 2 45 46 49 55 QuadraticBarElementForces 2 46 47 QuadraticBarElementStiffness 2 46 48 54 QuadraticBarElementStresses 2 46 59 QuadraticQuadAssemble 4 314 315 328 QuadraticQuadElementArea 4 311 314 Index 429 QuadraticQuadElementPStresses 4 315 335 QuadraticQuadElementStiffness 4 313 314 326 QuadraticQuadElementStresses 4 314 315 334 Quadrilateral bilinear 275310 quadratic 311336 QuadTriangleAssemble 4 251 252 262 QuadTriangleElementArea 4 249 251 QuadTriangleElementPStresses 4 252 272 QuadTriangleElementStiffness 4 251 260 QuadTriangleElementStresses 4 251 252 270 Reaction 2 12 13 26 52 71 105 117 189 270 292 Shear force 110 112 118 119 130 131 154 169 Shear force diagram 119 131 156 157 171 Space frame 193216 Space truss 91107 SpaceFrameAssemble 3 194 195 207 SpaceFrameElementAxialDiagram 3 195 SpaceFrameElementForces 3 195 213 SpaceFrameElementLength 3 195 SpaceFrameElementMomentYDiagram 3 196 202 SpaceFrameElementMomentZDiagram 3 196 202 SpaceFrameElementShearYDiagram 3 195 SpaceFrameElementShearZDiagram 3 195 SpaceFrameElementStiffness 3 195 204 SpaceFrameElementTorsionDiagram 3 195 SpaceTrussAssemble 3 92 99 SpaceTrussElementForce 3 93 94 SpaceTrussElementLength 3 92 SpaceTrussElementStiffness 3 92 96 98 SpaceTrussElementStress 3 93 105 Spring 1126 89 174 SpringAssemble 2 11 12 14 19 20 SpringElementForces 2 12 17 23 SpringElementStiffness 2 12 14 18 Stiffness matrix element 11 12 27 28 45 46 63 110 177 195 219 279 340 371 400 global 1 2 11 12 17 26 27 28 45 46 61 63 81 92 109 110 125 139 176 219 251 277 279 391 Strain 217 219 249 252 275 278 279 311 337 Stress 28 35 46 60 62 219 251 279 335 Structure continuous 1 discrete 1 Support inclined 62 63 81 139 140 Symbolic Math Toolbox 249 250 270 275 277 292 311 313 334 367 370 Tetrahedron linear 337 340 TetrahedronAssemble 4 339 340 352 TetrahedronElementPStresses 4 340 363 TetrahedronElementStiffness 4 340 347 TetrahedronElementStresses 4 340 359 TetrahedronElementVolume 4 337 340 Triangle linear 217 219 223 232 245 246 251 252 quadratic 249 259 273 Truss plane 6189 139 174 space 91107 Tutorial 4 Volume 337 340 367 371