fe textbook 2013-01-22

115
Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005 Finite Element Concepts and Implementation Written by: Dr. Daniel Swenson Dr. X. J. Xin Dr. Liang-Wu Cai Kansas State University Mechanical and Nuclear Engineering Department Manhattan, KS 66506 1.785.532.5610

Transcript of fe textbook 2013-01-22

Page 1: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 1/115

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Finite Element Conceptsand

Implementation

Written by:

Dr. Daniel Swenson

Dr. X. J. Xin

Dr. Liang-Wu Cai

Kansas State University

Mechanical and Nuclear Engineering Department

Manhattan, KS 66506

1.785.532.5610

Page 2: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 2/115

Table of Contents

ii

Table of Contents

1 A One-Dimensional Example of the Finite Element Method ..................................... 1

1.1 Objective ............................................................................................................. 11.2 One-Dimensional Spring System ........................................................................ 1

1.3 Equations Using Nodal Equilibrium ................................................................... 21.4 Equations Using Spring Element ........................................................................ 3

1.5 Solution Using Gauss Elimination ...................................................................... 61.6 Check Solution .................................................................................................... 7

1.7 Hints to Questions ............................................................................................... 7

2 Solutions Using the Finite Difference Method ........................................................... 82.1 Objective ............................................................................................................. 8

2.2 Differential Equation for Elastic Rod ................................................................. 8

2.3 The Finite Difference Method .......................................................................... 11

3 Weighted Residuals .................................................................................................. 163.1 Objective ........................................................................................................... 16

3.2 Weighted Residual Method............................................................................... 163.3 Solutions Using Weighted Residuals ................................................................ 173.4 Example Using One Term Approximation ....................................................... 18

3.4.1 Callocation Method ................................................................................... 19

3.4.2 Subdomain Method ................................................................................... 20

3.4.3 Least Squares Method ............................................................................... 203.4.4 Galerkin Method ....................................................................................... 21

3.4.5 Comparison of Solutions........................................................................... 22

3.5 Using More Terms in Approximation............................................................... 223.6 Hints to Questions ............................................................................................. 22

4 Strong and Weak Forms of the Differential Equation .............................................. 24

4.1 Purpose .............................................................................................................. 244.2 Weak Form of Differential Equation ................................................................ 244.3 Approximate Solution Using the Weak Formulation ....................................... 26

4.4 Example Solution Using Single Term Approximation ..................................... 28

4.5 Example Solution Using Two Terms ................................................................ 284.6 Hints to Questions ............................................................................................. 30

5 Hat Functions ............................................................................................................ 31

5.1 Objective ........................................................................................................... 315.2 Hat Functions .................................................................................................... 31

5.3 Solution Using Hat Functions ........................................................................... 33

5.4 Hints to Questions ............................................................................................. 37

6 A First Finite Element and Shape Functions ............................................................ 386.1 Objective ........................................................................................................... 38

6.2 Desired Characteristics of an Effective Computational Method ...................... 38

6.3 A Linear Finite Element.................................................................................... 386.4 Equivalence Between Global Integration of Hat Functions and Summing the

Integration of Element Shape Functions ....................................................................... 40

6.5 Hints to Questions ............................................................................................. 43

7 Generalized Matrix Form of the Finite Element Equations ...................................... 44

Page 3: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 3/115

Table of Contents

iii

7.1 Purpose .............................................................................................................. 44

7.2 Matrix Derivation of Equations –  First Approach ............................................ 44

7.3 Matrix Derivation of Equations –  Second Approach ........................................ 467.4 The Element Stiffness Matrix ........................................................................... 49

8 More About Shape Functions ................................................................................... 52

8.1 Purpose .............................................................................................................. 528.2 Shape Functions in Natural Coordinates ........................................................... 528.2.1 Linear Shape Functions............................................................................. 52

8.2.2 Quadratic Shape Functions ....................................................................... 53

8.3 Lagrange Polynomials ...................................................................................... 548.4 Element Formulations in Natural Coordinates ................................................. 56

8.5 Hints to Questions ............................................................................................. 57

9 Numerical Integration in 1D ..................................................................................... 58

9.1 Purpose .............................................................................................................. 589.2 Change of Variables .......................................................................................... 58

9.3 Gauss-Legendre Integration .............................................................................. 59

9.4 Examples ........................................................................................................... 639.5 Higher Order Gauss-Legendre Integration ....................................................... 64

9.6 Application of Numerical Integration to Evaluation of Element Matrices ....... 64

9.7 Hints to Questions ............................................................................................. 66

10 Brief Review of Elasticity ..................................................................................... 6710.1 Purpose .............................................................................................................. 67

10.2 Concept of Stress .............................................................................................. 67

10.3 Relation Between Surface Traction and Stress ................................................. 6810.4 Equilibrium ....................................................................................................... 69

10.5 Strain-Displacement Relations.......................................................................... 70

10.6 Stress-Strain Relations (3D) ............................................................................. 72

10.7 Stress-Strain Relations (Plane Strain) ............................................................... 7310.8 Stress-Strain Relations (Plane Stress) ............................................................... 73

10.9 Hints to Questions ............................................................................................. 74

11 Finite Elements in Elasticity ................................................................................. 7511.1 Purpose .............................................................................................................. 75

11.2 Elastic Finite Element Formulation .................................................................. 75

11.3 Finite Element Statement .................................................................................. 7711.4 Hints to Questions ............................................................................................. 80

12 Element Shape Functions ...................................................................................... 81

12.1 Purpose .............................................................................................................. 81

12.2 Finite Element Families .................................................................................... 8112.3 The Serendipity Element (Q8 or 8-Noded Quadratic Element) ....................... 82

12.4 Details of the Element Matrices ........................................................................ 85

13 2-D Numerical Integration .................................................................................... 88

13.1 Purpose .............................................................................................................. 8813.2 Numerical Integration ....................................................................................... 88

13.3 Implementation ................................................................................................. 89

13.4 Body Forces ...................................................................................................... 9113.5 Point Forces and Surface Tractions .................................................................. 91

Page 4: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 4/115

Table of Contents

iv

13.6 Hints to Questions ............................................................................................. 94

14 Elastic Stress Computations in Finite Element Analysis ...................................... 95

14.1 Background ....................................................................................................... 9514.2 Stresses at Gauss Points .................................................................................... 95

14.3 “Best Fit”: Least Square Errors Method ........................................................... 96

14.4 Calculating Nodal Stress ................................................................................... 9714.5 Averaging Nodal Stresses ................................................................................. 9715 Heat Transfer Using Finite Elements .................................................................... 99

15.1 Purpose .............................................................................................................. 99

15.2 Conservation of Energy .................................................................................... 9915.3 Fourier’s Law of Heat Conduction ................................................................. 100

15.4 Weak Statement of Heat Conduction .............................................................. 100

15.5 Finite Element Approximation ....................................................................... 103

15.6 Point Sources and Surface Fluxes ................................................................... 10416 Dynamic Structural Analysis Using Finite Elements ......................................... 107

16.1 When is Dynamic Analysis Necessary? ......................................................... 107

16.2 Dynamic Solution Methods ............................................................................ 10816.3 Example System.............................................................................................. 109

Page 5: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 5/115

Preface

v

Preface

Approach

The goal of these notes is to provide a complete presentation of the Galerkin weighted

residual approach to the finite element method. Doing this should result in a thorough

understanding of the topics discussed, while not providing a completely general

discussion of all methods. Many excellent books can be used to fill in gaps in the

 presentation. Some recommended texts include:

Hughes, T. J. R., The Finite Element Method: Linear Static and Dynamic Finite

 Element Analysis, Prentice-Hall, Inc., 1987.

Klaus-Jürgen Bathe, Finite Element Procedures, Prentice-Hall, Inc., 1996.

Cook. Robert D., Malkus, David S., and Plesha, Michael E., Concepts and

 Applications of Finite Element Analysis, 3rd Edition, John Wiley & Sons, 1989.

In these notes, our approach is similar to Hughes (1987), but presented at a moreelementary level. After an introduction to the method, we implement two-dimensional

elasticity using the eight-noded quadrilateral element. This introduces the topics of shape

functions, numerical integration, assembly of the global equations, solution, and post-

 processing.

We believe that understanding comes from implementing all fundamental concepts in

code. Therefore, we provide pseudo-coding of all functions, but expect the student to

implement details. In our classes, we provide a banded solver for use by students.

When the student completes the course they should have a thorough understanding of a

finite element program. They should also be in a position to learn additional concepts of

the method from other texts.

In the appendices, we discuss topics that may be of selective interest to students.

Distribution 

These notes are provided free of charge to any reader. Students at Kansas State

University can little afford to pay the high costs of most textbooks. Any reader may use

the notes with two stipulations:

  Please reference these notes whenever they are used. The reference should be, Finite Element Concepts and Implementation, Daniel Swenson, X. J. Xin,

Liang-Wu Cai, 2005, available at http://www.engg.ksu.edu/~swenson/.  The notes must be freely distributed by you if you distribute them further.

Page 6: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 6/115

One-Dimensional Example of the Finite Element Method 1

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

1 A One-Dimensional Example of the Finite ElementMethod 

1.1 Objective

Our objective is to introduce one view of the finite element method using discreteelements. In this view, the finite element method consists of the following steps:

1.  Dividing the problem into elements.

2.  Obtaining a stiffness matrix for each element.

3.  Assembling each element stiffness matrix into a global matrix.

4.  Solving the global matrix equations.

This approach is used for frame analysis by civil engineers. It also is the basis of the

first papers on finite element analysis of a continuum (Clough, 1960). In later lectures

we will develop a more mathematical approach, where the finite element method will be

obtained using weighted residuals.

In this chapter, we will first illustrate the solution of a spring system by writing

equations of equilibrium. We will then write the stiffness matrix for a spring element and

assemble these into a global matrix. Finally, the solution using Gauss elimination

simulates a computer solution.

1.2 One-Dimensional Spring System

The example problem is a system of connected springs. At the left end, the

displacement is known and at the right end a load is applied, Figure 1-1. “Nodes" (points

at which elements are connected) are indicated using circles and "elements" (springs) are

indicated using squares. The displacement of each node is given byi

u , where i   is the

node number.

1

2 3

u1  u

2  u

1 2

3

4

: Node

: Element (spring)

 p  0

Figure 1-1: Spring system

Question 1: How does the numbering of nodes and elements affect the solution?

Page 7: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 7/115

One-Dimensional Example of the Finite Element Method 2

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

1.3 Equations Using Nodal Equilibrium

Recall that the force in a spring is related to the stretching:

 k   f      (1-1)

where k   is the spring stiffness and   is the spring stretching. The free body diagram at

node 1 is:

1 f  2   f  1  

Figure 1-2: FBD at node 11

The equation of equilibrium is:

   0 X  F   

021     f   f    

or 0)()( 122011     uuk uuk    (1-2)

Similarly at node 2 (Figure 1-3):

2 f 4 

f 2 

f 3 

Figure 1-3: FBD at node 2

   0 X 

 F   

0432

    f    f    f    

0)()()( 234023122     uuk uuk uuk    (1-3)

And at node 3 (Figure 1-4):

3  p   f  4 

Figure 1-4: FBD at node 3

   0 X  F   

04

    P  f    

Page 8: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 8/115

One-Dimensional Example of the Finite Element Method 3

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

0)( 234     puuk    (1-4)

Assembling Eq. (1-2), Eq. (1-3), and Eq. (1-4) into matrix form:

  puk uk 

uk uk uk k k uk 

uk uk uk k 

3424

0334243212

0122121

 

or:

 

 p

uk 

uk 

u

u

u

k k 

k k k k k 

k k k 

03

01

3

2

1

44

44322

221

0

0

  (1-5)

or:

f Ku     (1-6)

In finite element terminology, K   is the stiffness matrix, u  is the displacement vector andf   is the load vector. Note: Bold upper case indicates a matrix; bold lower case a vector.

1.4 Equations Using Spring Element

Eq. (1-5) was obtained using equilibrium at each node. We will now show how the

same result can be obtained using the concept of a spring element with an associated

element stiffness matrix. A typical spring is shown in Figure 1-5. It has nodes i and  j ,

associated displacements (or degrees of freedom)i

u  and   ju , and stiffness k  .

i    j  

ui   u j  

e

i f     e

 j f    k  

Figure 1-5: Typical spring element

The stiffness matrix may be thought of as the matrix that relates forces on an element to

displacements of the element.

e

 j

ei

 j

i

 f  

 f  

u

u

??

??  (1-7)

The coefficients of the stiffness matrix are the forces at the nodes that correspond to a

unit displacement at each node, holding all other degrees of freedom (dof's) fixed. For

example, giving node i  a unit displacement, while holding node  j  fixed results in the

forces:

Page 9: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 9/115

One-Dimensional Example of the Finite Element Method 4

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

i

e

i   ku f      

i

e

 j   ku f       (1-8)

This gives the first column of coefficients in the element stiffness matrix. The

superscript indicates the element while the subscripts indicate the nodes.

  e

 j

e

i

 j

i

 f  

 f  

u

u

?

?  (1-9)

Similarly, giving node  j  a unit displacement, while holding node i  fixed results in the

forces:

 j

e

i   ku f      

 j

e

 j   ku f       (1-10)

This completes the element stiffness matrix.

e

 j

e

i

 j

i

 f  

 f  

u

u

k k 

k k   (1-11)

 Note that the element matrix is symmetric.

To assemble the global stiffness matrix using the element approach, we must define a

relationship between the element node numbering scheme and the global numbering

scheme. We will do this for element 2 first, since this element is not associated with a

 boundary condition. Referring to Figure 1-1, we see that for element 2, node i 

corresponds to global node 1, and that node  j  corresponds to global node number 2.

Letting i=1 and  j=2, we can take the associated element stiffness coefficients and placethem in the global matrix.

0000

0

0

2

2

2

1

3

2

1

22

22

 f  

 f  

u

u

u

k k 

k k 

  (1-12)

We now return to element 1. This element is special because element node i 

corresponds to global node 0 (Figure 1-1) which is a boundary condition node and has a

known displacement. There are two consequences:

1.  We do not want to include node 0 in the solution, since we already know itsdisplacement, and

2.  We need to accommodate the general condition where the displacement of global

node 0 is any fixed value, not just zero.

Eq. (1-13) gives the general expression for the element 1 stiffness matrix and nodal

forces.

Page 10: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 10/115

One-Dimensional Example of the Finite Element Method 5

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

1

1

1

0

1

0

11

11

 f  

 f  

u

u

k k 

k k   (1-13)

However, recognizing that0

u  is known, we can rearrange this to be:

01

1

1

0

1

0

10

01

uk  f  u

uu

k   (1-14)

Since we know0

u , we only need the row corresponding to1

u . Therefore, only the  j 

local node contributes to the global matrix

 

0

0

000

000

0001

1

1

3

2

11  uk  f  

u

u

uk 

  (1-15)

Proceeding in the same manner, for element 3 the contributions to the global matrix will

 be:

0

0

000

00

000

03

3

2

3

2

1

3  uk  f  

u

u

u

k    (1-16)

And finally, for element 4 the contributions to the global matrix will be:

4

3

4

2

3

2

1

44

44

0

0

0

000

 f  

 f  

u

u

u

k k 

k k    (1-17)

To obtain the complete global stiffness matrix, we add Eq. (1-12), Eq. (1-15), Eq. (1-16),

and Eq. (1-17) giving:

 

4

3

03

4

2

3

2

1

2

01

2

1

1

1

3

2

1

44

44322

221

0

0

 f  

uk  f   f   f  

uk  f   f  

u

u

u

k k 

k k k k k 

k k k 

  (1-18)

 Now, we can simplify the right hand side by recognizing that the nodal force terms are

simply a statement of static equilibrium at each node and sum to zero. This gives:

 

 p

uk 

uk 

u

u

u

k k 

k k k k k 

k k k 

03

01

3

2

1

44

44322

221

0

0

  (1-19)

Clearly, this is the same as obtained using nodal equilibrium, Eq. (1-5). We have thus

demonstrated how an element approach can be used to obtain the global stiffness matrix.

Page 11: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 11/115

One-Dimensional Example of the Finite Element Method 6

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

The advantage of the element approach is that assembling the matrix can be easily

automated for computer use.

Question 2: The stiffness matrix in FEM usually has a lot of zero elements. How can you

 judge, from the physical structure of the system being studied, whether an element of K  is

 zero or not?

Question 3: The assembly involves putting element stiffnesses together to form the global

 stiffness matrix. Illustrate graphically how to decide the position in the global matrix.

1.5 Solution Using Gauss Elimination

As a simple reminder and to simulate the actual computer solution, we will solve Eq.

(1-5) using Gauss elimination. Assuming that k 1=500 lb/in, k 2=250 lb/in, k 3=2000 lb/in,

k 4=1000 lb/in,0

u =0, and P=1000 lb the global matrix becomes:

 

1000

0

0

100010000

10003250250

0250750

3

2

1

uu

u

  (1-20)

First, normalize row 1:

 

1000

0

0

100010000

10003250250

03333.01

3

2

1

u

u

u

  (1-21)

 Next, zero the remaining coefficients in column 1 by multiplying row 1 by the

appropriate factor and subtracting row 1 from each of the remaining rows.

 

1000

0

0

100010000

10007.31660

03333.01

3

2

1

u

u

u

  (1-22)

 Normalize row 2 and repeat:

 

1000

0

0

2.68400

3158.010

03333.01

3

2

1

u

u

u

  (1-23)

Finally back-substitute to obtain the final answer:

4615.1

4616.0

1538.0

u   (1-24)

Question 4: In what situations, apart from a singular matrix, will the Gauss elimination

method become ill behaved? How to overcome the problem?

Page 12: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 12/115

One-Dimensional Example of the Finite Element Method 7

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Question 5: If a truss member, which has an area A, length L, and Young’s modulus E, is

made equivalent to a spring, what should be the value of k for the spring?

1.6 Check Solution

All analyses should be viewed with skepticism until confidence in the solution can be

 justified. Highest confidence can be obtained by verifying the results using anindependent method; just repeating the same calculation carefully is not an independent

approach. We will check our solution by calculating the forces in the springs. For spring

1, the force is:

lb f  

uk  f  

77

)1538.0(250

)(

1

111

  (1-25)

The other forces are calculated in a similar manner and plotted in Figure 1-6.

1

2 3

77 lb 77 lb

923 lb

1000 lb 1000 lb

Figure 1-6: Forces in springs

As can be seen, the results satisfy equilibrium.

1.7 Hints to Questions Hint 1: The solutions will be the same at the same physical locations.

 Hint 2: Look at the connectivity between two nodes.

 Hint 3: Use the relation between local numbering and global numbering.

 Hint 4:  L AE k    

Page 13: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 13/115

Chapter 2: Finite Difference Solution 8

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

2 Solutions Using the Finite Difference Method 

2.1 Objective

To remind the student of the finite difference method in order to provide a contrast to the

finite element method of solution of differential equations.

We first solve a model problem (an elastic rod with body and end loads) that we will use

to demonstrate the different methods. We will then derive the finite difference

approximation to the differential equation and obtain an approximate solution to the

 problem.

2.2 Differential Equation for Elastic Rod

Let us first derive a differential equation that will provide a model problem with which

we can demonstrate concepts. We will use an elastic rod (Figure 2-1) with constant area,

fixed at one end and loaded with a body load per unit length,  x f    B , and an end load,  P  .

 X     P    f x B 

 A = Area

 E = Young’s modulus 

 L  

Figure 2-1: Schematic of elastic rod

We focus on a differential element of the rod, with the stresses and body loads, Figure2-2.

x  

   x      x x   f x B  

x   

Figure 2-2: Differential element in rod

For static equilibrium, the summation of the forces is zero:

   0 x

 F   

or:

  0)()(     x x

 B

 x  A x x f   A        (2-1)

Page 14: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 14/115

Chapter 2: Finite Difference Solution 9

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Rearranging and assuming constant area:

  0

 x f   x

 A   B X  x x    

  (2-2)

Taking the limit as 0 x ,

  0   x f  dx

d  A   B 

  (2-3)

For an elastic rod with an axial load and no lateral constraints, the stress is related to

the strain by,

     E    (2-4)

where  E   is Young’s modulus. The strain is related to the displacements by: 

dx

du    (2-5)

Substituting Eq. (2-5) and Eq. (2-4) into Eq. (2-3) gives,

  0 

  

  x f  

dx

du E 

dx

d  A   B   (2-6)

Assuming Young’s modulus is constant with   b x  f    B ,

02

2

bdx

ud  AE   for  L x  0   (2-7)

 Note, we have assumed constant area and modulus to obtain a simple differential

equation. As we will see, variable values are easy to include in our future finite

formulation.

Our particular problem is now described by the differential equation (2-7) with

 boundary conditions:

00 

 xu   (2-8)

an essential boundary condition and

 P dx

du AE 

 L x

  (2-9)

a natural boundary condition.

Solving by integrating:

bdx

ud  AE   

2

2

 

1C bx

dx

du AE     

Page 15: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 15/115

Chapter 2: Finite Difference Solution 10

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

21

2

2C  xC 

 xb AEu     (2-10)

Use boundary conditions to solve for the constants, at 0 x ,

00 

 xu  

2000   C   

02  C    (2-11)

and at  L x   ,

 P dx

du AE 

 L x

 

1C bL P     

bL P C    1

 

Giving:

 

  xbL P 

 xb

 EAu

2

1  2

  (2-12)

Evaluating at2

 L x   :

 

  

 

28

31  2

2

 L P 

 Lb

 AE u   L

 x  (2-13)

The solution is plotted in Figure 2-3 for values of 1   b P  L E  A . Note that the

displacement is linear when the only load is the end load. The body load adds a quadratic

displacement to the solution.

Page 16: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 16/115

Chapter 2: Finite Difference Solution 11

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Figure 2-3: Analytic solutions for displacement of rod

2.3 The Finite Difference Method

We derive the finite difference approximation using a Taylor series expansion. The

displacement near any point is given by:

  HOT dx

ud  x

dx

du xu x xu

 x x

 x 

2

22

2  (2-14)

or, using the central difference theorem with   x  a position between  x  and  x x   :

 

 x x

 xdx

ud  x

dx

du

 xu x xu 2

22

2  (2-15)

If we use a mesh as shown below:

 xl 1

   xl 

 

 xl 1

 

 x    x  

Figure 2-4: Finite difference mesh

We can then do a forward difference approximation:

 

l l 

l l dx

ud  x

dx

du xuu

2

22

1

2  (2-16)

or rearranging:

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

1.6

0.0 0.2 0.4 0.6 0.8 1.0

Position

     D     i    s     p  

     l    a     c     e     m    e     n

     t 

Both Loads (P and b)

Only P

Only b

Page 17: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 17/115

Chapter 2: Finite Difference Solution 12

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 

 

l l 

l    dx

ud  x

 x

uu

dx

du2

2

1

2  (2-17)

The last term in Eq. (2-17) is the error term. It has a coefficient of  x , so we say the

error is of order  x :

 xO Error      (2-18)

We don't know the error exactly, but we can bound it:

2

2

, 1max

2   dx

ud  x Error 

l l    x x

  (2-19)

We can also do a similar backward difference approximation.

The accuracy can be improved using a central difference approximation. Again start

with a Taylor's expansion:

1

3

33

2

22

162

 

l l l 

l l 

dx

ud  x

dx

ud  x

dx

du xuu   (2-20)

2

3

33

2

22

162

 

l l l 

l l 

dx

ud  x

dx

ud  x

dx

du xuu   (2-21)

Subtracting Eq. (2-21) from Eq. (2-20) gives:

 

 

 

 

21

3

3

3

33

116

2

     l l l 

l l 

dx

ud 

dx

ud  x

dx

du xuu  

or:

 

 

 

 

21

3

3

3

32

11

122     l l 

l l 

l   dx

ud 

dx

ud  x

 x

uu

dx

du  (2-22)

The error term is now 2 xO  , so that as we make  x   smaller, the error will become

smaller faster for the central difference approximation than for either the forward or

 backward difference approximations. We can also obtain an expression for the second

derivative:

3

4

44

3

33

2

22

12462

 

l l l l 

l l dx

ud  xdxud  x

dxud  x

dxdu xuu   (2-23)

4

4

44

3

33

2

22

12462

 

l l l l 

l l dx

ud  x

dx

ud  x

dx

ud  x

dx

du xuu   (2-24)

Adding equation Eq. (2-23) and Eq. (2-24) gives:

Page 18: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 18/115

Chapter 2: Finite Difference Solution 13

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 

 

 

 

43

4

4

4

44

2

2

2

11

242

     l l l 

l l l 

dx

ud 

dx

ud  x

dx

ud  xuuu  

or:

 

 

 

 

43

4

4

4

42

2

11

2

2

24

2

     l l 

l l 

l   dx

ud 

dx

ud  x

 x

uuu

dx

ud   (2-25)

Again, the error term is 2 xO . Substituting Eq. (2-25) into Eq. (2-7) and dropping the

higher order terms) gives the finite difference approximation for the rod:

  02

2

11  

  

 

   x f   x

uuu AE    Bl l l    (2-26)

Let us now use this approximation to solve our problem. We will use five nodes:

2

0 L

X

1 3 4 5

Figure 2-5: Discretization of rod

Where the finite difference statements of the boundary conditions are:

01  u   (2-27)

 P  x

uu AE   

 

  

 

2

46   (2-28)

where node 6 is a fictitious node used to impose the force boundary condition.

We now develop a global matrix for the solution of the problem. Using the finite

difference approximation of Eq. (2-26) for node 2 gives:

02

22

321  

  

 

  B f   x

uuu AE   

 but 01   u  so,

  B f  T T  x

 AE 2322

  2  

  (2-29)

For node 3:

02

32

432  

  

 

  B f   x

uuu AE   

Page 19: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 19/115

Chapter 2: Finite Difference Solution 14

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

  B f  T T T  x

 AE 34322

  2  

  (2-30)

Similarly for node 4:

02

42

543  

  

 

  B

 f   x

uuu

 AE   

  B f  uuu x

 AE 45432

  2  

  (2-31)

At node 5 we have:

02

52

654  

  

 

  B f   x

uuu AE   

Combining with the boundary condition, Eq. (2-28), gives,

 x F  f  uu

 x AE    B

222 5452   (2-32)

In matrix form, Eq. (2-29), Eq. (2-30), Eq. (2-31), and Eq. (2-32) become:

 x

 F  f  

 f  

 f  

 f  

u

u

u

u

 x

 AE 

 B

 B

 B

 B

22200

1210

0121

0012

5

4

3

2

5

4

3

2

or, assuming   1   x  f   F  L E  A   B :

9

1

1

1

2200

1210

0121

0012

25.0

1

5

4

3

2

2

u

u

u

u

  (2-33)

Solving (2-33) gives,

500.1

219.1

875.0

469.0

u   (2-34)

A comparison of the finite difference and analytic solutions is given in Figure 2-6. Note

that the finite difference solution is exact at the nodes. This can be proved (Hughes), and

the same behavior will be seen for one-dimensional finite element solutions.

Page 20: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 20/115

Chapter 2: Finite Difference Solution 15

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Figure 2-6: Finite difference solution

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

0.0 0.2 0.4 0.6 0.8 1.0

Position

     D     i    s     p  

     l    a     c     e     m    e     n

     t 

Finite Difference

 Analytic

Page 21: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 21/115

Chapter 3: Weighted Residuals 16

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

3 Weighted Residuals 

3.1 Objective

Our objective is to introduce the method of weighted residuals for obtaining

approximate solutions to differential equations.

We then apply the method of weighted residuals using a single term approximation

and show how different weighted residual methods provide different results.

3.2 Weighted Residual Method

Weighted residual methods are another way to develop approximate solutions. Recall

that in the finite difference method we developed an approximation to the differential

equation at a point . In contrast, in weighted residual methods, we assume the form of the

 global   solution and then adjust parameters to obtain the best global fit to the actual

solution.

Let us be more precise in our definitions. We are given a body B

 with boundaryS 

.As shown in Figure 3-1, the boundary is divided into two regions, a region

uS    with

essential (Dirichlet) boundary conditions and a region  f  S    with natural (Neumann)

 boundary conditions. The essential boundary conditions  are specifications of the

solution on the boundary (for example, known boundary displacements), while the

natural boundary conditions  are specifications of derivatives of the solution (for

example, surface tractions).  All points on the boundary must have one or the other type

of specified boundary condition. 

S u  

S   f      B  

Figure 3-1: General body with boundary

In this chapter, we will present the weighted residual methods in ways that require the

approximating function to satisfy both the essential and natural boundary conditions. In

the next lecture, we will show how the weak form of the differential equation can be usedto develop methods that loosen this requirement, so that only the essential boundary

conditions must be satisfied by our approximating function. The basic step in weighted

residual methods is to assume a solution of the form:

n

 j

 j jn   au1

    (3-1)

Page 22: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 22/115

Page 23: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 23/115

Chapter 3: Weighted Residuals 18

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

3.4 Example Using One Term Approximation

To see how this allows us to obtain values for the coefficients, let us complete an

example. We will pick an approximate function that satisfies all boundary conditions:

 

  

    x

 L

a x

 AE 

 P un

2sin

1

   (3-9)

Clearly, this function satisfies the essential boundary condition (Eq. (3-3)). In addition,

the first term satisfies the natural boundary condition ((3-4)). The second term is zero at

the essential condition and has zero slope at the natural condition, so it does not add

additional terms at the boundaries. Taking the derivatives:

 

  

    x

 L La

 AE 

 P 

dx

dun

2cos

21

   

 

 

 

 

 

 

 

    x

 L L

a

dx

ud  n

2

sin

2

2

12

2  

  (3-10)

Substitute Eq. (3-10) into Eq. (3-7) to obtain the residual,

 x Rb x L L

 AEa    

  

  

  

 

2sin

2

2

1

    (3-11)

For simplicity, pick 1   b L P  E  A . Then Eq. (3-11) becomes:

  12

sin4

2

1    

  

    xa x R

      (3-12)

Figure 3-2 plots the residual (Eq. (3-12)) for different values of1

a .

Page 24: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 24/115

Chapter 3: Weighted Residuals 19

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Figure 3-2: Residual plotted over body for different values of a1 

 Now it is clear why we integrate. The error is a function of x. We can weight the error

(residual) in any way we want over the interval and force the integral to zero. Depending

on how we weight the residual, we get different solutions.

3.4.1 Callocation Method

In this case, we force the residual to be zero at a specific location (“nail-down” method).

We accomplish this by selecting the Dirac delta function as the weighting function:

i

i

i x x

 x x x x xw

when0

when   

The integral of the Dirac delta function is one, so for any function )( x f   :

  )()()( ii   x f  dx x x x f        

The weighted residual according to Eq. (3-8) is:

  0

1

0

  Rdx x xi

    (3-13)

or, using the Dirca delta function properties,

  0i

 x R   (3-14)

If we pick 5.0i x , that is, we want the residual to equal zero at the midpoint, then

inspection of Figure 3-2 shows that a value of 60.01  a  satisfies that condition. Solving

exactly,

-1.0

-0.5

0.0

0.5

1.0

1.5

0.0 0.2 0.4 0.6 0.8 1.0

Position

     R    e     s 

     i     d     u     a      l

a1=-0.2

a1=0.0

a1

=0.2

a1=0.4

a1=0.6

a1=0.8

Page 25: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 25/115

Chapter 3: Weighted Residuals 20

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

014

sin4

2

 

  

 

    a  

573.01  a   (3-15)

3.4.2 Subdom ain Method

Alternately, let us weight the residual uniformly over the interval (“glue” method).

That is:

  1 xw  

Then,

0)1(1

0

  Rdx   (3-16)

By inspection, we can again see that a value of 6.01  a   will result in approximately

equal areas above and below the x axis. Let us solve exactly:

012

sin4

1

1

0

2

1  

 

 

 

    dx

 xa

     

02

cos2

1

0

1    

  

   x

 xa

     

02

11

 

 a  

637.02

1  

 a   (3-17)

3.4.3 Least Squares Method

In the least squares method, we require that the squared residual be minimized with

respect to the adjusting parameter, i.e.,

 

 

 

 1

0

2Minimize   dx R  

or

01

0

  dxa

 R R

i

  (3-18)

This is equivalent to selectingia

 R

 as the weighting function. For our particular problem,

there is only one adjusting parameter 1a , and

Page 26: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 26/115

Chapter 3: Weighted Residuals 21

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

2sin

4

2

1

 x

a

 R     

 

02

sin4

12

sin4

1

0

22

1

1

0

 

 

 

 

 

 

 

 

  dx

 x xadx

a

 R R

i

     

02

sin2

sin4

1

0

1

0

22

1    

  

 

 

  

      dx

 xdx

 xa

      

  0cos1

sin2

1

2

1

4

1

0

1

0

2

1    

  

 

 

  

    x x xa    

  

 

  

02

8

2

1  

 

 a  

which leads to:

516.016

31  

 a   (3-19)

3.4.4 Galerkin Method

Finally, if we use the same function for the weighting function as we used for the

approximating function (except that we do not include the term in the approximating

function that satisfies the essential boundary conditions, which does not enter into this

case) then we have:

 

 

 

 

    xd  xw

2sin

1

   (3-20)

solving,

012

sin42

sin

1

0

2

11 

 

  

 

 

  

 

 

  

 

 

  

    dx xa xd 

      

02

sin2

sin4

1

0

1

0

22

1    

  

  

  

 

 

  

  

  

    dx xdx xa

      

  0cos1

sin2

1

2

1

4

1

0

1

0

2

 

 

 

 

 

 

 

    x x xa    

  

 

  

02

8

2

 

 a  

516.016

31    

a   (3-21)

Page 27: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 27/115

Chapter 3: Weighted Residuals 22

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 Note that for our particular example the least-squares method and the Galerkin method

yield identical results. In general, however, the two methods may give different answers.

Question 2: How do you judge whether an approximate method is legitimate or

acceptable? If there are two approximate methods, with what criterion can you say one is

better than the other?

Question 3: Theoretically, how can you obtain an exact solution (or as accurate as you

like) with an approximate method?

3.4.5 Compar ison of Solut ions

Figure 3-3 compares the analytical and approximate solutions. This shows that the

Galerkin (and least squares) methods give the best approximation to the actual solution.

Figure 3-3: Comparison of analytic and approximate weighted residual solutions

3.5 Using More Terms in Approximation

It would be possible to solve this problem using more terms in the approximate

solution, but practically speaking, this is not a good approach if we must satisfy natural

 boundary conditions. It is much better to proceed to the weighted residuals formulation

 based on the weak form of the differential equation. This formulation will automatically

incorporate the natural boundary conditions, making it much simpler to develop the

approximate solution.

3.6 Hints to Questions Hint 1: The weighted residual approach extends the concept of solution which includes

the exact solution.

 Hint 2: The method must not exclude the exact solution if found; the method should

 produce the exact solution for constant function.

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

1.6

1.8

0.0 0.2 0.4 0.6 0.8 1.0

Position

     D     i    s     p  

     l    a     c     e     m    e     n

     t 

 Analytic

Callocation

Subdomain

Galerkin & Least Squares

Page 28: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 28/115

Chapter 3: Weighted Residuals 23

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 Hint 3: The bases for functional space should be complete, and number of terms must be

large enough.

Page 29: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 29/115

Chapter 4: Strong and Weak Forms of the Differential Equation 24

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

4 Strong and Weak Forms of the DifferentialEquation 

4.1 Purpose

The purpose of this chapter is to introduce the weak form of the differential equation.This is used for the basis of our final finite element formulation. It will give us a

symmetric stiffness matrix (for the elasticity problem) and clearly shows the natural

 boundary condition (surface traction) terms.

We will use the one-dimensional elastic rod as our prototype for the derivation.

4.2 Weak Form of Differential Equation

The strong statement of the differential equation is the one we derived using the

differential element (Chapter 2). It is given by:

02

2

bdx

ud 

 AE  , for  L x  0   (4-1)

with the boundary conditions:

00 

 xu   (4-2)

an essential boundary condition, and

 P dx

du AE 

 L x

  (4-3)

a natural boundary condition.

We call the differential equation (4-1) with boundary conditions (4-2) and (4-3) thestrong f orm   of the differential equation. Sometimes this is also called the strong

statement . This is the conventional form of differential equation in almost all calculus

courses.

 Now let us proceed to derive the weak form. Similar to Chapter 3, we multiply (4-1) by a

weighting function   )( xw . This function is chosen to be zero at all essential boundary

conditions (but not zero at the natural boundary conditions). We then integrate over the

 body:

0

0

2

2

 

 

 

 

  dxb

dx

ud  EAw

 L

  (4-4)

 Now separate the integral:

0

00

2

2

 

  

    dxwbdx

dx

ud w EA

 L L

  (4-5)

Recall integration by parts, where:

Page 30: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 30/115

Chapter 4: Strong and Weak Forms of the Differential Equation 25

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

2

2

dx

ud w

dx

du

dx

dw

dx

duw

dx

 

  

  

Rearranging gives:

dx

du

dx

dw

dx

du

wdx

dx

ud 

w    

 

 

 

2

2

  (4-6)

Substitute (4-6) into (4-5) gives:

0

000

 

  

    dxwbdx

dx

du

dx

dw EAdx

dx

duw

dx

d  EA

 L L L

  (4-7)

The first term on the left hand side of (4-7) can be simplified using the fundamental

theorem of calculus:

000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  dx

duw EA

dx

duw EA

dx

duw EAdx

dx

duw

dx

d  EA

 L

 L L

  (4-8)

However, we have specifically chosen )( xw   to be zero at the essential boundary

conditions, that is, 0u  at 0 x . As a result, the second term on the right hand side of

(4-8) is zero, and (4-8) becomes,

 P  Lwdx

du EA Lwdx

dx

dT w

dx

d  EA

 L

 L

 

  

 

 

  

 0

  (4-9)

Substituting into (4-7) gives:

 P  Lwdxwbdxdx

du

dx

dw EA

 L L

00  (4-10)

Equation (4-10) is called the weak form  of the differential equation. Sometimes it is

also called the weak statement . The word weak   here does not imply anything that is

wrong or inadaquate. It means that some requirements might be loosened. The weak

statement is equi valent to the strong statement.  This is carefully discussed in Hughes,

1987.

The advantage of the weak statement is that we have reduced the order of the

differential by one and made possible symmetry of the resulting matrix formulation when

we approximate the true solution. We have also explicitly handled the natural boundary

conditions, so that we can include them in our analysis. Note also that the weak form is

still a weighted residual statement. The weak form does not show the weighted residual

formulation as clearly, but it is there.

Question 1: What are the similarities and differences between the weak form (3.11) and

the weighted residual form in previous lecture?

Page 31: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 31/115

Chapter 4: Strong and Weak Forms of the Differential Equation 26

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Question 2: What is the advantage of reducing the order of the differentiation of the trial

 function u?

Question 3: What is the advantage of having a symmetric stiffness matrix?

4.3 Approximate Solution Using the Weak Formulation

The weak form will be the starting point of our approximate solution. We

approximate the solution using a function in which the first known term (or terms)

satisfies the essential boundary conditions. The rest of the approximate solution consists

of functions that are zero at the essential boundary conditions and are multiplied by

coefficients to be determined.

n

  j

  j  jn  au

1

0       (4-11)

The derivative of the approximate solution is given by:

n

 j

 j j

n

dxd a

dxd 

dxdu

1

0        (4-12)

We will use the Galerkin approach, so the weighting function will be the same as the

approximate function, but without the essential boundary condition terms.

n

i

iin  d w

1

    (4-13)

and the derivatives of the weighing function are:

n

i

i

i

n

dx

d d 

dx

dw

1

   (4-14)

Substituting (4-12) and (4-14) into (4-10):

  P  Ld dxbd dxdx

d a

dx

dx

d d  AE 

n

i

ii

 L   n

i

ii

 L   n

 j

 j

 j

n

i

ii  

 

  

 

 

  

 

 

  

 

 

  

        10   10   1

0

1

     

  (4-15)

Rearranging:

  000   1

0

1

 

  

 

 

  

   

 P  Ldxbdxdx

d a

dx

dx

d  AE d  i

 L

i

 L   n

 j

 j

 ji

n

i

i        

  (4-16)

Since this must hold true for all id  , then:

  000   1

0  

  

 

 

  

   

 P  Ldxbdxdx

d a

dx

dx

d  AE  i

 L

i

 L   n

 j

 j

 ji   

     (4-17)

or

Page 32: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 32/115

Chapter 4: Strong and Weak Forms of the Differential Equation 27

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 P  Ldxbdxdx

d a

dx

dx

d  AE  i

 L

i

 L   n

 j

 j

 ji   

   

 

  

 

 

  

   

  00   1

0 , for ni   ,1   (4-18)

Since the terms satisfying the essential boundary conditions0

   are known, we will move

them to the right hand side also:

 P  Ldxdx

dx

d  AE dxbdx

dx

d a

dx

d  AE  i

 L

i

 L

i

 L   n

 j

 j

 ji  

   

  

 

  

  

  

 

 

  

  

  

   

  0

0

00   1

, for ni   ,1  

(4-19)

The term on the left contains the unknown coefficients. The first term on the right comes

from body loads. The second term is the contribution of the essential boundary

conditions. The third term is the contribution of the natural boundary conditions. Note

that it is not necessary that all these terms appear in every problem.

Question 4: In what aspects are (4-19) and (4-10) different?

Equation (4-19) is really a set of n  equations with n  unknowns. We can expand (4-

19) to see the individual terms.

 

  

  

  

  

  

  

  

  

  

  

  

 

 

  

  

  

  

  

  

  

  

  

  

  

 

 

  

  

  

  

  

  

  

  

  

  

  

 

nn L

nn

 L

n

 L

n

 L

n

 L L

 L

n

 L L

 f  

 f  

 f  

a

a

a

dxdx

dx

d  EAdx

dx

dx

d  EAdx

dx

dx

d  EA

dxdx

dx

d  EAdx

dx

dx

d  EAdx

dx

dx

d  EA

dxdx

dx

d  EAdx

dx

dx

d  EAdx

dx

dx

d  EA

......

...

............

...

...

2

1

2

1

00

2

0

1

0

2

0

22

0

12

0

1

0

21

0

11

      

      

      

 

(4-20)

where:

 

 

 

 

 

 

 

 

 

  

  

  

 

 

  

  

  

 

 L

 N  N 

 L

 N 

 L L

 L L

n

dx

dx

dx

d  P  Ldxb

dxdx

dx

d  P  Ldxb

dxdx

dx

d  P  Ldxb

 f  

 f  

 f  

0

0

0

0

02

20

  2

0

01

10

  1

2

1

......

    

    

    

 

(4-21)

There is beauty and power here. We now have a general method to develop

approximate solutions to differential equations. We must select appropriate shape

functions, but as we will see, we can automate that using finite elements. If we write (4-

20) in matrix form, this will be:

Page 33: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 33/115

Chapter 4: Strong and Weak Forms of the Differential Equation 28

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

f Ka     (4-22)

This is the basis of our future finite element development. As derived, we have

assumed that the shape functions are global functions over the entire body. We will show

that the finite element formulation arises when we use local shape functions.

Question 5: From (4-20), list some reasons that the Galerkin method is better than othermethods such as collocation and sub-domain methods.

4.4 Example Solution Using Single Term Approximation

To illustrate obtaining a solution using the weak formulation, let us solve the same

 problem as done in the previous chapter. This is an elastic rod with body and end forces.

We assume the approximate solution:

11 aun    (4-23)

where:

 L x2

sin1        (4-24)

This function was chosen to be zero at the essential boundary condition. The derivative

is:

 L

 x

 Ldx

2cos

2

1        

Substituting into equations (4-20) and (4-21) (assume 1   b P  L E  A ) gives:

 

  

 1

0

1

1

0

2

12

sin2

cos2

cos4

dx x

adx x x       

  (4-25)

Evaluating the integrals:

 

  

    1

2cos

2sin

2

1

2

1

4

1

0

1

1

0

2 x

a x x   

  

 

  

12

8  1

2

 

 a  

326.11  a   (4-26)

This is a rough approximation, since we only have one term in the approximate solution.

4.5 Example Solution Using Two Terms

We will now do an example solution using two terms in the approximation. We will

add a linear term to our previous solution.

2

1 j

 j jn   au       (4-27)

Page 34: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 34/115

Page 35: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 35/115

Chapter 4: Strong and Weak Forms of the Differential Equation 30

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Figure 4-1: Comparison of one and two term solutions using weak forumulation

4.6 Hints to Questions

 Hint 1:

 Hint 2: Allows for the use of piecewise function; weakens the requirements of

differentiability.

 Hint 3: Increases computational efficiency; reduce storage requirement.

 Hint 4: One is exact, while the other is approximate.

 Hint 5:

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

1.6

0.0 0.2 0.4 0.6 0.8 1.0

Position

Displaceme

nt

 Analytic

One Term

Two Terms

Page 36: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 36/115

Chapter 5: Hat Functions 31

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

5 Hat Functions 

5.1 Objective

Our objective is to use hat functions as a prelude to defining a finite element and its

associated shape functions.

We will first describe hat functions. We will then show that hat functions are

equivalent to defining shape functions over an element. The student will also see that the

global integration is equivalent to the summation of integration over all elements.

5.2 Hat Functions

We are now approaching the final definition of a finite element. Before we get there,

we will first look at special hat functions that are global functions, but only non-zero

locally. We will use these functions in our previously derived Galerkin weighted residual

formulation that we developed from the weak form of the differential equation. Again,

we will be solving the elastic bar. We will define “nodes” on the bar as shown below: 

1

0 L

X

0 3 42

Figure 5-1:Discretization for hat functions

The associated hat functions are shown in Figure 5-2.

Page 37: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 37/115

Chapter 5: Hat Functions 32

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

0

1)(

01

0

0   x x

 x x

 xh   10   x x x    

Otherwise

10   x x x    

Otherwise

21   x x x    

Otherwise

0

)(34

3

4   x x

 x x

 xh  43   x x x    

Otherwise

0 1 2 3 4

X

1

0 1 2 3 4

X

1

0 1 2 3 4

X

1

0 1 2 3 4

X

1

21   x x x    

32   x x x    

0

1)(12

1

01

0

1 x x

 x x

 x x

 x x

 xh

0

1)(23

2

12

1

2 x x

 x x

 x x

 x x

 xh

 

Figure 5-2: Hat functions (function 3 not shown)

Page 38: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 38/115

Chapter 5: Hat Functions 33

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Note that once the hat function for  x = 0 , i.e.,  xh0  for 11   x x x  

 , is defined, the hat

function centered at i x  can be simply expressed by ii   x xh xh   0  

The hat functions can be used to create a multi-linear (piecewise linear) curve by

adding them together and using different coefficients multiplying each hat function, as

illustrated in Figure 5-3:

 xh x f   x f   i

 N 

i

i   (5-1)

 Notice that at the node the approximation is exactly the nodal value, since the hat

function equals 1 at each node. Between nodes, there is a linear interpolation.

0 1 2 3 4

X

2h  

3h  

Sum of and22ha  

33ha  

Figure 5-3: Multi-linear curve generated using hat functions with variable coefficients

Question 1: Compare the hat function  xhi  and the Dirac delta function   :

i N 

iii

 N 

ii   x xh x f   xh x f   x f         0  

         d  x f   x f    

5.3 Solution Using Hat Functions

We will now use the hat functions to solve a problem. We will use the Galerkin

method developed in Chapter 4. The problem we will solve is the same elastic rod

 problem with body and end loads. The rod is divided as shown in Figure 5-1.

The approximate solution is developed using the hat functions shown in Figure 5-2.

 Note that there is an essential boundary condition at node 0 and a natural boundary

condition at node 4. The value of the essential boundary conditions is zero. Recall that

the first term (terms) in the approximate solution satisfy the essential boundary

conditions, the rest are zero at the essential boundary conditions. Because the essential

Page 39: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 39/115

Chapter 5: Hat Functions 34

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 boundary condition is zero, we do not need any special functions to satisfy it. However,

using the function:

000  hu    (5-2)

would satisfy the essential boundary condition and could be used in a problem where the

essential boundary condition is not zero but is equal to some value 0u .

Then, the hat functions associated with nodes 1, 2, 3, and 4 will be the ones we will

use in our approximate solution.

44332211  huhuhuhuu

n    (5-3)

For fitting the approximating function to the matrix form of the Galerkin method derived

using the weak form of the differential equation in Chapter 4, we have:

44332211          aaaaun

    (5-4)

Comparing  (5-3)  and (5-4) , we recognize the correspondence between the nodal

displacementsi

u   and the coefficientsi

a   and between the hat functionsi

h   and the

functionsi

  . That is:

21

12

1

10

01

0

11

for 1

for 

 x x x x x

 x x

 x x x x x

 x x

h    (5-5)

and,

21

12

10

0111

for 1

for 1

 x x x x x

 x x x x x

dx

dh

dx

d    (5-6) 

 Note that if the division is even along the x-axis, we have, 41   L x xii

 

, and,

1

1

for  4

for 4

ii

iii

 x x x L

 x x x L

dx

d    (5-7)

We will now evaluate the first row of the in the Galerkin formulation of Chapter 4,

equation (4-20). The first coefficient is given by (where we have assumed 1  A E  ):

dxdx

dx

d  L

 

  

  

  

    1

0

1    

  (5-8)

Page 40: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 40/115

Chapter 5: Hat Functions 35

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

For1

  , which is zero except for20

  x x x   , we will divide the integral into two parts

as shown below:

dxdx

dx

d dx

dx

dx

d dx

dx

dx

d   x

 x

 x

 x

 L

 

  

  

  

 

 

  

  

  

 

 

  

  

  

    11111

0

1

2

1

1

0

        (5-9)

Substituting (5-6)  into (5-9) and using the values for the positions of the nodes (   1 L ),

gives:

dxdxdxdx

dx

d  L

 

  

    

  

  

 

  

  

  

 

 

  

  

  

 

  25.0

1

25.0

1

25.0

1

25.0

1  5.0

25.0

25.0

0

1

0

1    

  (5-10)

Evaluating the integrals,

  5.0

25.0

25.0

0

1

0

11616   x xdx

dx

dx

d  L

 

  

  

  

 

     

81

0

1  

  

  

  

    dx

dx

dx

d  L

    (5-11)

The second term in the Galerkin formulation of Chapter 4 is given by:

dxdx

dx

d  L

 

  

  

  

    2

0

1    

  (5-12)

Carefully examining Figure 5-2, we see that the only region over the body that the two

approximating functions interact is over the region21

  x x x   . Then the integral

 becomes:

dx x x x x

dxdx

dx

d   x

 x

 L

 

  

 

 

  

 

 

  

 

 

  

 

1212

2

0

1  112

1

    (5-13)

Evaluating:

dxdxdx

dx

d  L

 

  

  

  

  

 

  

  

  

 

  25.0

1

25.0

15.0

25.0

2

0

1    

  (5-14)

or,

5.0

25.0

2

0

116 xdx

dx

dx

 L

  

  

  

         

and,

42

0

1  

  

  

  

    dx

dx

dx

d  L

    (5-15)

Page 41: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 41/115

Chapter 5: Hat Functions 36

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

The third term in the Galerkin formulation of Chapter 4 is given by:

dxdx

dx

d  L

 

  

  

  

    3

0

1    

  (5-16)

Looking again at Figure 5-2, we see that the two shape functions do not interact.

Therefore, the integral is zero.

The remainder of the integrals can be evaluated by the student.

We will also evaluate the right hand side of the Galerkin equation developed in

Chapter 4. The first term to be evaluated is the one that includes the body force:

 L

dx

0

1    (5-17)

where we have assumed 1b . As before, we divide the integral into two parts:

dx x x

 x xdx x x

 x xdx

 x

 x

 L   x

 x

    

  

  

  

2

1

1

0  12

1

0   01

0

1  1    (5-18)

Evaluating:

dx x

dx x

dx

 L

   

  

   

 

  

   

5.0

25.00

25.0

0

125.0

25.01

25.0

0   

Integrating,

  dx x x x

dx L

5.0

25.0

2

0

25.0

0

2

1   22

2

4      

or,

4

1

8

1

8

1

0

 L

dx    (5-19)

The second term on the right hand side is:

 P  L1

    (5-20)

Clearly,   01

   L  , so the natural boundary condition term is zero. For this problem, the

essential boundary conditions are zero, therefore the last term for 1 f    does not contributeanything.

Similar integrations are performed for the other terms. These should be done by the

student. The only row in which the natural boundary condition term contributes is for 4,

where   14

   P  L  . When all integrations are completed, the coefficients obtained using

the hat functions will be those given below:

Page 42: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 42/115

Chapter 5: Hat Functions 37

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

1

8

1

41

41

41

4400

4840

0484

0048

4

3

2

1

a

a

a

a

  (5-21)

Solving gives:

5.1

21875.1

46875.0

0.0

c   (5-22)

The comparison with the analytic solution is given in Figure 5-4. As for the finite

difference solution, the solution is exact at the nodes. This is only true in the one-

dimensional case. The two curves in Figure 5-4 are almost indistinguishable.

Figure 5-4: Comparison of analytic and hat function solutions

We have now obtained a multi-linear approximation to the solution.

Question 2: Compare the hat function approach with the multiple term approach in

Chapter 4. What are the respective advantages and disadvantages?

5.4 Hints to Questions

 Hint 1: Think of computational efficiency and smoothness of the function.

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

1.6

0.0 0.2 0.4 0.6 0.8 1.0

Position

     D     i    s     p  

     l    a     c     e     m    e     n

     t 

 Analytic

Hat Functions

Page 43: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 43/115

Chapter 6: A First Finite Element 38

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

6 A First Finite Element and Shape Functions 

6.1 Objective

Our objective is to develop our first finite element approximation and to demonstrate

a general method of obtaining element shape functions in natural coordinates. This is an

extension of the hat functions developed in Chapter 5.

We first discuss the desirable characteristics of a numerical technique for analysis of

general problems. We then derive the shape functions for an element and show the

equivalence between global integration using hat functions and the summation of

integrals over each element. We also introduce the concept of natural coordinates and

demonstrate how to use Lagrange polynomials to derive the shape functions.

6.2 Desired Characteristics of an Effective Computational Method

As discussed in Reddy ( An  Introduction to the Finite Element Method , 2nd Edition,

1993), “an effective computational method should have the following characteristics:

  It should have a sound mathematical as well as physical basis (i.e., yield

convergent solutions and be applicable to practical problems).

  It should not have limitations with regard to the geometry, the physical

composition of the domain, or the nature of the loading.

  The formulative procedure should be independent of the shape of the domain and

the specific form of the boundary conditions.

  The method should be flexible enough to allow different degrees of

approximation without reformulating the entire problem.

  It should involve a systematic procedure that can be automated for use on digital

computers”. 

These criteria are met by the finite element method.

6.3 A Linear Finite Element

We will now begin our derivation of a simple finite element. Our first element will

 be a linear element with two nodes, Figure 6-1.

I J

LX

xI  xJ 

Figure 6-1: Simple element

We will assume that the displacement in the element is linear:

Page 44: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 44/115

Chapter 6: A First Finite Element 39

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 xccu21

    (6-1)

Then, we can evaluate the displacements at the nodes using the coordinates of the nodes:

 I  I   xccu

21    (6-2)

 J  J   xccu

21

 

  (6-3)We can assemble in matrix form and solve:

 J 

 I 

 J 

 I 

u

u

c

c

 x

 x

2

1

1

1  (6-4)

Solving:

 

  

 

 J 

 I  I  J 

 I  J   u

u x x

 x xc

c

11

1

2

1  (6-5)

Substituting the solution back into (6-1), the displacement is now given by:

 x x x

uu

 x x

u xu xu

 I  J 

 I  J 

 I  J 

 J  I  I  J 

 

  

 

  (6-6)

Rearranging:

 J 

 I  J 

 I  I 

 I  J 

 J  u x x

 x xu

 x x

 x xu

 

  

 

 

  

 

  (6-7)

This is a simple, but important result. Given the nodal displacements (  I u  and

 J u ) and a

 position on the element ( x ), we can interpolate to find the displacement at that point.

The interpolation functions i N   are typically called “shape functions”: 

 J  J  I  I    u N u N u     (6-8)

or

  i

ii   u x N  xu   )(   (6-9)

These are plotted in Figure 6-2. Both are linear and both range from a value of 1 at the

node they are associated with to 0 at the other node. They also sum to 1 at any x.

Page 45: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 45/115

Page 46: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 46/115

Chapter 6: A First Finite Element 41

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 1 

1

1 2 3

1

1 2 3

1

1 2 3

1

1 2 3

 2 

 3 

1 2

I1

  J1

 I2  J2 

a. Global hat functions

b. Element shape functions

1

I N

  1

J N

  2

J N

2

I N

 

Figure 6-4: Global and element shape functions

We have already derived the Galerkin approximation in Chapter 4:

 

  

  

  

  

  

  

  

  

  

  

  

 

 

  

  

  

  

  

  

  

  

  

  

  

 

 

  

  

  

  

  

  

  

  

  

  

  

 

3

2

1

3

2

1

0

33

0

23

0

13

0

32

0

22

0

12

0

31

0

21

0

11

 f  

 f  

 f  

u

u

u

dxdx

dx

d  EAdx

dx

dx

d  EAdx

dx

dx

d  EA

dxdx

dx

d  EAdx

dx

dx

d  EAdx

dx

dx

d  EA

dxdx

dx

d  EAdx

dx

dx

d  EAdx

dx

dx

d  EA

 L L L

 L L L

 L L L

      

      

      

 

(6-10)Our previous work has made us familiar with this approach and has demonstrated how

well it works.

We now show that the same result is obtained by integrating element shape functions

and then summing the integrals. For the element, the form of the integrals is the same as

in (6-10). For element 1 (I=1, J=2) the integral is given by:

Page 47: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 47/115

Chapter 6: A First Finite Element 42

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 

  

 

 

  

 

 

  

 

 

  

 

 

  

 

 

  

 

 

  

 

 

  

 

1

1

1

1

0

11

0

11

0

11

0

11

11

11

 J 

 I 

 J 

 I 

 L

 J  J 

 L

 I  J 

 L

 J  I 

 L

 I  I 

 f  

 f  

u

u

dxdx

dN 

dx

dN  EAdx

dx

dN 

dx

dN  EA

dxdx

dN 

dx

dN  EAdx

dx

dN 

dx

dN  EA

  (6-11)

For element 2 (I=2, J=3) the integral is given by:

 

  

  

  

  

  

  

  

 

 

  

  

  

  

  

  

  

 

2

2

2

2

0

22

0

22

0

22

0

22

22

22

 J 

 I 

 J 

 I 

 L

 J  J 

 L

 I  J 

 L

 J  I 

 L

 I  I 

 f  

 f  

u

u

dxdx

dN 

dx

dN  EAdx

dx

dN 

dx

dN  EA

dxdx

dN 

dx

dN  EAdx

dx

dN 

dx

dN  EA

  (6-12)

Here  x  is understood as measured locally from the left node of each element.

We now add the two element integrals together to assemble a global stiffness matrix.

As this is done we must map from the element nodes (I, J) to the global nodes (1, 2, 3).

For instance, for element 1, I=1 and J=2. Thus the I,I integral term for element 1 will go

in the 1,1 global coefficient, and the I,J integral term will go in the 1,2 global coefficient.

Similarly, for element 2 where I=2 and J=3, the I,I term will go to the 2,2 global

coefficient and the I,J term will go to the 2,3 coefficient. When all terms are summed, we

get the matrix in (6-13). The reader should verify this.

 

  

  

  

  

  

  

  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

  

  

  

  

  

  

 

dxdx

dN 

dx

dN dx

dx

dN 

dx

dN 

dxdx

dN 

dx

dN dx

dx

dN 

dx

dN dx

dx

dN 

dx

dN dx

dx

dN 

dx

dN 

dxdx

dN 

dx

dN dx

dx

dN 

dx

dN 

 L

 J  J 

 L

 I  J 

 L

 J  I 

 L

 I  I 

 L

 J  J 

 L

 I  J 

 L

 J  I 

 L

 I  I 

0

22

0

22

0

22

0

22

0

11

0

11

0

11

0

11

0

0

211

11

 

(6-13)

Again, x is understood as measured from the left node of each element.

 Now, using Figure 6-4, the reader can see that (6-10) and (6-13) are equivalent.

Because the hat and element shape functions are local, we can integrate over each

element and sum the element contributions. Thus, integration using global hat functions

is equivalent to the summing integration performed over each element using the element

shape functions. In the following lectures, we will show how to perform numericalintegration for the integrals in the stiffness matrix and, ultimately, how to solve the

system equations of FEM.

Question 1: What are the advantages of using element shape functions over using the

 global hat functions?

Page 48: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 48/115

Chapter 6: A First Finite Element 43

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

6.5 Hints to Questions

 Hint 1: Unified expression; convenience in developing higher order interpolation.

Page 49: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 49/115

Page 50: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 50/115

Chapter 7: Matrix Formulation of Finite Element Equations 45

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

or:

uBo

nu B

dx

du

0  (7-6)

Where the B  matrix contains the derivatives of the N  matrix.

We will use the Galerkin method, so we use the same functions for the weighting

function as we used to approximate the solution. As before, we do not include the term

that satisfies the essential boundary condition. Then, the weighting function is given by:

dNn

w   (7-7)

 Note that sincen

w  is a scalar, we may also write:

  TT

Ndn

w   (7-8)

The derivative of the weighting function is given by:

  TT

Bd

dx

dwn   (7-9)

Substituting (7-6) and (7-9) into (7-1):

          P  Ldxbdxu B AE 

 L L

TTTTTT

NdNduBBd   )(00

00     (7-10)

Rearranging:

      0)(00

00  

  P  Ldxbdxu B AE 

 L L

TTTT

NNuBBd   (7-11)

Since this must hold true for all d , then:

    0)(00

00  

  P  Ldxbdxu B AE 

 L LTTT

NNuBB   (7-12)

or

    dxu B AE  P  Ldxbdx AE 

 L L L

  0

00

00

)(  TTTT

BNNuBB   (7-13)

With respect to the integration, u is constant, so:

      dxu B AE  P  Ldxbdx AE 

 L L L

  0

00

00

)(  TTTT

BNNuBB   (7-14)

The reader should note that we can still view these shape functions as global, so this

gives us a global set of equations. If we write it in matrix form, this will be:

f uK      (7-15)

Page 51: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 51/115

Chapter 7: Matrix Formulation of Finite Element Equations 46

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Here K   is called the stiffness matrix, u  is the unknown displacement vector, and f   

is the load vector.

In Chapter 6 we showed that, using shape functions that are only locally non-zero, we

could perform the integration over individual elements and then sum the contribution of

each element to obtain the same global matrix as given using global integration. If weuse this approach, (7-14) becomes:

       

u f  e   numel 

e

 Lnumel 

e

numel 

e

 Lnumel 

e

 L

dxu B AE  P  Ldxbdx AE 1   0

00

11   01   0

)(  TTTT

BNNuBB  

(7-16)

 Note that the boundary terms are only included for the elements with boundary

conditions. In addition, there is an implied mapping from the local element numbering

system to the global degrees of freedom.

7.3 Matrix Derivation of Equations – Second Approach

We start from the weak statement of the differential equation (Chapter 4):

 P  Lwdxwbdxdx

du

dx

dw EA

 L L

00

  (7-17)

with the boundary conditions:

00 

 xu   (an essential boundary condition) (7-18)

 P dx

du AE 

 L x

  (a natural boundary condition) (7-19)

As before, we approximate the solution using a function in which the first known

term (or terms) combines to satisfy the essential boundary conditions. The rest of the

approximate solution consists of functions that are zero at the essential boundary

conditions and are multiplied by coefficients whose values are to be determined. In

addition, we have shown that the undetermined coefficients equal the displacements at

the nodal points. That is, the approximate solution is, for a total of m nodes:

mm

m uuuuu            ...221100

)(   (7-20)

Recall that in Chapter 6 we introduced the element  shape functions. For the linear

shape functions, we had shown that they are in fact split expressions of hat functions. For

quadratic and other more general shape functions that we will discuss in Chapter 8, the

analogy remains that shape functions can be considered as split expressions for some

localized functions. Here we consideri

   as hat functions, and each hat function is split

into two halves, each occupying only the region of one element. This way, the

approximate solution in (7-20) can be written as:

Page 52: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 52/115

Chapter 7: Matrix Formulation of Finite Element Equations 47

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

][][

...)()(

233

222

122

11100

23

233

22

1221

1100

)(

 N u N u N u N uu

 N  N u N  N u N uuu  m

 

   (7-21)

where ei

 N   denotes the shape function for element e at node i. In the last equation, we

have reorganized terms by elements. Similar splitting and regrouping can be done for

other shape functions, and the corresponding localized global functionsi

  .

Within an element, the displacement is approximated by shape functions of order n as

ee)(   uNn

i

iiu N  xu   (7-22)

where we use   to denote a row matrix, and {} to denote a column matrix. The

superscript e denotes an element. Equation (7-20) can be re-written as

elm N 

e

eemuuu

1

002211

00)( }{}{}{   u N u N u N           (7-23)

whereelm

 N   denotes the number of elements in the model. (Note: Equation (7-23) is more

general than (7-21). (7-21) should be viewed as a particular example when linear shape

functions are used. Equations (7-22) and (7-23) allow the use of general shape functions.)

We also need the derivative of the displacements:

 

  elm N 

e

eem

dx

d u

dx

dx

du

10

0)(

u N  

  (7-24)

or

e N 

e

em   elm

u Bdx

duu B 

1

00

)(

  (7-25)

where the B   matrix contains the derivatives of the N   matrix.

We will use the Galerkin method, so we use the same functions for the weighting

function as we used to approximate the solution. As before, we do not include the term

that satisfies the essential boundary condition. Then, the weighting function is given by:

e N 

e

em  elm

w   d N 

1

)(   (7-26)

 Note that since )(mw  is a scalar, we may also write:

 

  elm N 

e

T eT emw

1

)(N d    (7-27)

The derivative of the weighting function is given by:

Page 53: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 53/115

Chapter 7: Matrix Formulation of Finite Element Equations 48

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 

  elm N 

e

eem

dx

dw

1

)(T  T  

B d    (7-28)

Substituting (7-25) and (7-28) into (7-17):

          P  Ldxbdxu B AE 

elmelmelmelm   N 

e

ee

 L N 

e

ee

 L N 

e

ee

 N 

e

ee    

 

 

 

 

 

 

 

 

10   10   100

1)(T  T  T  T  T  T  

N d N d u B B d   

(7-29)

or

       

    dxu B AE 

 P  Ldxbdx AE 

 L   N 

e

ee

 N 

e

ee L N 

e

ee L   N 

e

ee N 

e

ee

elm

elmelmelmelm

 

   

 

 

 

 

 

 

 

 

 

 

 

 

0

001

10   10   11

)(

T  T  

T  T  T  T  T  T  

B d 

N d N d u B B d 

 

(7-30)

Recall that in Chapter 6, by using shape functions that are only non-zero within each

element, we have shown that any product of a shape function of one element with any

shape function for a different element is zero. The two summations on the left-hand side

of (7-30) effectively become just one summation:

       

    dxu B AE 

 P  Ldxbdx AE 

 L   N 

e

ee

 N 

e

ee L N 

e

ee L   N 

e

eeee

elm

elmelmelm

 

   

 

 

 

 

 

 

 

 

0

00

1

10   10   1

)(

T  T  

T  T  T  T  T  T  

B d 

N d N d u B B d 

  (7-31)

Also recall that in Chapter 6, by using shape functions that are only non-zero within each

element, we showed that integration over the entire problem domain is equivalent to a

summation of integrations over individual elements. The effectively changes the

integrations in (7-31) to become integrating over individual elements, and the

summations be performed after the integrations:

         

   

   

 

 

 

 

 

  

 

 

 

 

 

 

 

 

 

ue

 f  elme

elme

 N 

e

 L

e

e

 N 

e

eT e N 

e

 LeT e

 N 

e

e L

eeT e

dxu B AE 

 P  Ldxbdx AE 

1   0

00

11   01   0

)(

T  

T  T  T  

B d 

N d N d u B B d 

 (7-32)

where in writing (7-32), we took notice that the boundary conditions (on the right hand

side) only involve the elements that actually contains the boundaries; and different type

of boundary conditions involve different number of elements.

Page 54: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 54/115

Chapter 7: Matrix Formulation of Finite Element Equations 49

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

The primary unknowns for the problem are the nodal displacements. We can arrange

the unknowns into a global matrix. By doing so, the summations in (7-32) also involve

(imply) the assemblage process, and the results can be written as

     

  0)(1   0

001

1   01   0

 

 

 

 

 

   

u f  

elme

elme

 N 

e

 Le

 N 

e

e

 N 

e

 Le

 N 

e

 LeeT 

dxu B AE  P  L

dxbdx AE 

T  T  

T  T  

B N 

N u B B d 

  (7-33)

Since this must hold true for all d  , then:

       

 

 

 

    ue

 f  elmee

elm   N 

e

 Le

 N 

e

e N 

e

 Le

 Lee

 N 

e

dxu B AE  P  Ldxbdx AE 1   0

0011   001

)(T  T  T  T  

B N N u B B   

(7-34)

If we write it in matrix form, this will be:

f  u K       (7-35)

Here K    is called the stiffness matrix, u   is the unknown displacement vector, and f    

is the load vector.

7.4 The Element Stiffness Matrix

Let us now look at an individual element stiffness matrix:

  dx AE 

e L

0

BBK   Te

  (7-36)

In Chapter 6 we derived the 1-D linear element shape functions:

 

 

  

 

 

  

 

 I  J 

 I 

 I  J 

 J 

 x x

 x x

 x x

 x xN   (7-37)

Taking the derivatives:

 

 

  

  

  

  

 L L

11B   (7-38)

where  I  J    x x L   , the length of the element.

 Now, substitute (7-38) into (7-36), to obtain:

  dx L L

 L

 L AE 

e L

 

 

  

  

  

  

 

  

 

 

  

  

0

11

1

1

eK    (7-39)

Page 55: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 55/115

Chapter 7: Matrix Formulation of Finite Element Equations 50

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

multiplying

  dx

 L L

 L L AE 

e L

 

 

 

 

 

 

 

  

 

  

   

  

 

0

22

22

11

11

eK    (7-40)

simplifying

  dx L

 AE   e L

 

0

211

11e

K    (7-41)

and finally, integrating:

 

 L L

 L L

 L

 AE 

2

eK    (7-42)

or:

 

11

11

 L

 AE eK    (7-43)

This is our old friend. Go back to Chapter 1, where we developed the stiffness matrix for

a spring using intuition. That matrix was exactly the same as (7-43). It all makes sense.

We now look at the right hand side of (7-16).

    dxu B AE  P  Ldxb L Le

  0

00

0

)(  TTTe

BNNf    (7-44)

We will look at the first term on the right hand side:

    dxbe L

 BodyLoads   0

TeNf    (7-45)

Substituting for the shape functions gives:

  dxb

 x x

 x x

 x x

 x xe L

 I  J 

 I 

 I  J 

 J 

 BodyLoads  

 

  

 

 

  

 

0

ef   

or,

 

  dx

 x x

 x x

 L

b   e L

 I 

 J 

 BodyLoads  

0

ef    (7-46)

After integrating, we obtain:

Page 56: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 56/115

Chapter 7: Matrix Formulation of Finite Element Equations 51

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 

  

 

 

  

 

2

1

2

1

bL BodyLoads

ef    (7-47)

That is, for a constant body force, the equivalent nodal loads each equal to one-half the

total load. If the body load was not constant, we could use the shape functions to

interpolate the body load and we would obtain different equivalent nodal loads.

The second term of (7-16) is:

    P  L Natura lBC 

TeNf    )(   (7-48)

This term is only active on the boundaries with natural boundary conditions. In addition,

since we are using shape functions that evaluate to 1 at the nodes, (7-48) turns out to be a

statement that the loads at the nodes are directly included in the load vector in the

appropriate global locations.

The last term of (7-16) is:

    dxu B AE  L

C  Essent ialB   0

00

TeBf    (7-49)

This term is just like the element stiffness matrix. In fact, using element shape functions

allows us to evaluate the entire element stiffness matrix and then move the terms

associated with known displacements to the right hand side. In this case, since the

essential boundary condition is zero, this will not contribute to the load vector.

We now have completed a discussion of how we can assemble the global stiffness matrix

 by summing the individual element matrices.

Page 57: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 57/115

Chapter 8: More About Shape Functions 52

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

8 More About Shape Functions 

8.1 Purpose

Our purpose is to demonstrate a general method of obtaining element shape functions

in natural coordinates.

We first derive shape functions directly, then present the general equation for Lagrange

 polynomials.

8.2 Shape Functions in Natural Coordinates

8.2.1 Linear Shape Func tions

In Chapter 6, we derived shape functions for a linear element in the actual element

coordinates:

 

 

 

 

 

 

 

 

 

 I  J 

 I 

 I  J 

 J 

 x x

 x x

 x x

 x xN   (8-1)

We will now introduce the idea of natural coordinates. The natural coordinates will run

from -1 to 1. That is, in the natural coordinate system, 1 I 

   and 1 J 

  .

I J

  I   1   

 I  1  

  

Figure 8-1: Linear element

The natural coordinate system can be understood as a local coordinate system. It is aconvenient way to perform numerical integration. We will use a mapping from the

natural coordinates to the real coordinates for the element. In one-dimensional system,

there is a very simple relation between the actual coordinates and the natural coordinates:

In the natural coordinate system, (8-1) becomes:

 

 

  

     

  

  

2

1

2

1     N   (8-2)

As illustrated in Figure 8-2, these shape functions have a value of 1 at the associated node

and 0 at the other node. They interpolate linearly.

Page 58: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 58/115

Chapter 8: More About Shape Functions 53

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Figure 8-2: Linear shape functions

Question 1: What are the advantages of using the natural coordinates?

8.2.2 Quadratic Shape Func tion s

If we use quadratic interpolation over an element, we have three coefficients to solve

for, so we use three nodes (Figure 8-3).

I K

  I   1   

 I  1  

  

J

Figure 8-3 Quadratic element

As for the linear element (Chapter 6) we assume a quadratic interpolation function:

2

321       cccu     (8-3)

Since the displacements at the three nodes are known, we can write (8-3) at each of the

nodes:

2321

  11     cccu I 

 

2321

  00   cccu J 

   

2

321   11   cccu K     

or in matrix form,

 

 K 

 J 

 I 

u

u

u

c

c

c

3

2

1

111

001

111

  (8-4)

0

0.2

0.4

0.6

0.8

1

1.2

-1 -0.5 0 0.5 1

N1

N2

I J

Page 59: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 59/115

Chapter 8: More About Shape Functions 54

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Solving:

 I  K 

 K  J  I 

 J 

uu

uuu

u

c

c

c

2

1

22

1

3

2

1

  (8-5)

Substituting into (8-3) gives:

 K  J  I  I  K  J 

  uuuuuuu     22

1

2

1  (8-6)

Finally, collecting terms gives:

      K  J  I    uuuu   12

112

2  

  

 

 

  

     

   

   (8-7)

or,

 K  K  J  J  I  I   u N u N u N u     (8-8)

We have now derived the quadratic shape functions. They are plotted in Figure 8-4.

Figure 8-4: Quadratic shape functions

8.3 Lagrange Polynomials

Interpolation functions obtained using the dependent unknown (not its derivatives)

are Lagrange interpolation functions. These are the functions we use for element shape

functions. They have the properties (Reddy) that they have a value of 1 at their

corresponding node and 0 at all other nodes and that they sum to 1 everywhere:

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

-1 -0.5 0 0.5 1

NI

NJ

NK

I   J   K

Page 60: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 60/115

Chapter 8: More About Shape Functions 55

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 jiif  

 jiif   N  ij ji

0

1     (8-9)

  1    i N    (8-10)

We have already observed these same properties in the linear and quadratic shapefunctions we have derived directly. The shape function is equal to 1 at its associated

node and 0 at the other nodes. Thus the coefficient multiplying the shape function is the

actual value at a node. Also, the sum of all the shape functions at any position is 1. As a

result, if the displacements at the nodes are the same, the values between the nodes will

also be constant. These conditions are necessary for convergence. Physically, this means

that if we assign constant values to each of the nodes (for example a uniform rigid body

displacement) then everywhere between the nodes will also have the same displacement.

In general, a series of Lagrange polynomials of order 1n  are derived for n  nodes.

We first define a function that is zero at all nodes except the ith node:

niiii   c N                    

  1121   (8-11)

wherek 

   denotes the value of    at that node k . In addition, we force this function to

equal 1 at node i :

niiiiiiiic                      11211   (8-12)

We then solve (8-12) fori

c  and substitute into (8-11) to get:

niiiiiii

nii

i N           

          

1121

1121   (8-13)

which is the general form of Lagrange polynomial that can be used as shape functions.

As an illustration of the use of (8-13), let us obtain the shape functions for 3n .

Then, for node 1:

 

3121

32

1

    

     

 N    (8-14)

 

  121101

101

 

      

  N    (8-15)

Similarly at node 2:

 

3212

31

2    

     

i

 N    (8-16)

 

  2

2   11010

11 

     

 N    (8-17)

and

Page 61: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 61/115

Chapter 8: More About Shape Functions 56

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

12

3       

  N    (8-18)

As expected, these shape functions are the same as we derived directly.

The method of deriving the shape function from Lagrange polynomials can be extended

to 2 or 3 dimensions. We will work on that in future chapters.

8.4 Element Formulations in Natural Coordinates

In Chapter 6 we derived the element stiffness matrix using shape functions in the true

coordinate system.

  dx AE 

e L

ee

0

eB B K  

T  

  (8-19)

We shall demonstrate how to use natural coordinates in calculating the element stiffness

matrix. The shape functions in the natural coordinate system are:

  )1()1(21

21      N   (8-20) 

we use the shape functions to interpolate both the geometry and the solution. This is

called an isoparametric  element. It is permissible to use different shape functions for

geometry and the solution, but isoparametric elements are the most common approach.

Then:

u N  x    

  J  I 

  x x x          12

11

2

1  (8-21)

and

  J  I 

  x xd 

dx1

2

11

2

1

  

22

1   e I  J 

 L x x

dx

   (8-22)

Since

 

dx

d  B

  N 

We need to obtain the derivatives of the shape functions with respect to the actual

coordinate X. Since the shape functions are functions of the natural coordinate, we must

use the chain rule and then substitute (8-22). We will see that in 2D or 3D, the

relationships between the global and natural coordinates will not be a simple constant, but

will be a matrix. The transformation between coordinate systems is called the Jacobian.

Page 62: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 62/115

Chapter 8: More About Shape Functions 57

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

     d 

dx

dx

d    NN   (8-23)

and

     d 

dx

dx

d    NN  1

 

 d 

 Ldx

e

NN

  2 

 

eee  L L Ldx

d    11

2

1

2

12NB   (8-24) 

Then, changing the bounds of our integration to the natural coordinates bounds and

integrating with respect to the natural coordinates,

       

d  L

 AE d 

dx

 L

 AE dx

 L

 AE 

ee

 L

e

e

1

1

1

1

2

0

2

e

11

11

211

1111

1

1K   

(8-25)

and the integration gives

11

11

22

22

2][

ee

e

 L

 AE 

 L

 AE  K    (8-26) 

which is the same as our previous result. The same results for the load vectors can also be

obtained using the shape functions in terms of natural coordinate.

8.5 Hints to Questions

 Hint 1:Unified expression; convenience in developing higher order interpolation.

Page 63: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 63/115

Chapter 9: Numerical Integration 58

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

9 Numerical Integration in 1D 

9.1 Purpose

Our purpose is to show how we can integrate the element stiffness matrices

numerically. In this chapter we present only 1D integration, but as we will see in the

future, the same approach can be used for 2d and 3D.

In general, we will not integrate element stiffness matrices directly because, in most

cases, there is no simple closed form integral. Since numerical integration formulae are

given in natural coordinates, we need to map our real coordinates to the natural

coordinates. We will then demonstrate integration in the natural coordinate system. We

derive the mapping first, then implement numerical integration.

9.2 Change of Variables

From calculus, the change of variables formula is:

      

 

 

d d  g d  g  f  dx x f  

b

a  

2

1

  (9-1)

where:

  g  x    and b g a g      )(,)(   21       

Here we use our 1-D example as the example to illustrate how the integration is done.

We want to integrate the element stiffness matrix (which was computed analytically

using both the real and natural coordinates at the end of Chapter 7). We want to integrate

the element stiffness matrix. The relation between the stiffness matrix in real coordinates

and the natural coordinates is given by:

          

     d d 

dx AE dx AE 

e L

 

  

 

1

10

BBBBK   TTe

  (9-2)

We have already derived the shape functions and their derivatives in terms of the natural

coordinate, but we still need to define the relationship between  x   and   . We do this

using the same shape functions we used for interpolating the displacement. For a linear

(two-noded) one-dimensional element:

 J  J  I  I   x N  x N  x     (9-3)

where the shape functions are

    12

1 I  N 

 

    12

1 J  N 

 

Then:

Page 64: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 64/115

Chapter 9: Numerical Integration 59

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 J  J 

 I  I   x

dN  x

dN 

dx

       (9-4)

Substituting the shape functions gives

  J  I 

  x

d  x

dx

 

 

 

 

 

 

 

     

 

 

  

1

2

11

2

Simplifying:

2

12

11

2

1  e

 J  I 

 L x x

dx

 

  

 

 

  

 

   (9-5)

To integrate the element stiffness matrix of (9-2), we first need to obtain an

expression for the derivative (with respect to  x ) of the shape functions expressed in

natural coordinates. For example, we will illustrate this using the first shape function:

 

 

 

 

dx

dx

dN 

dN   I  I    (9-6)

We can evaluate the left hand side and the second term on the right hand side of (9-6):

 

21

2

1  e

 I    L

dx

dN     

 

  

   

or:

 

  

  

 

  

  

e

e

 I 

 L

 L

dx

dN    1

2

1

2

1

   (9-7)

We will look at the first term in the matrix:

e

e

ee I  I  L

 AE d 

 L

 L L AE d 

dx B B AE   

 

  

   

  

  

 

  

 

   

  2

111

1

1

1

  (9-8)

This is the same value we calculated in Chapter 8. Although a simple example, the same

concept applies to more complicated integrals.

Question 1: What are the possible advantages of changing variables in calculating an

integral?

9.3 Gauss-Legendre Integration

 Numerical integration involves calculating a function at selected locations,multiplying the value by a weight, and then summing to obtain the integral.

   

1

1   1

)(numgp

i

ii  f  wd  f           (9-9)

Let us illustrate. Figure 9-1 shows a linear function over the interval -1 to 1.

Page 65: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 65/115

Chapter 9: Numerical Integration 60

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

-1 1

  

 f       

Figure 9-1: Integration of a linear function

Clearly, the linear function can be evaluated exactly using one point:

02)(1

1

1

1

 f   f  wd  f  i

ii      

      (9-10)

That is, if we evaluate the function at 0   and multiply that value by 2, we will obtain

the exact integral.

If the function is of higher order than linear, the one-point numerical integration is

only approximate. We can increase the accuracy by selecting more integration points.

Many numerical integration schemes use evenly spaced evaluation locations such as the

Simpson's formula and the Newton-Cotes formula. The Gauss-Legendre integration 

(also called as Gaussian quadrature), however, evaluates the integral at cleverly picked

locations and weights leading to high accuracy at low cost. This is sketched in Figure9-2.

-1 1

  

 f       

Figure 9-2: Sketch showing integration of higher order curve

We will derive the equations for Guass-Legendre integration for a cubic polynomial. To

do this, we let both the weights and the locations at which we will evaluate the function

Page 66: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 66/115

Chapter 9: Numerical Integration 61

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 be unknown. We also want to know how many points we need in order to obtain an

exact integration. Let us assume that our integrand, a cubic polynomial, can be expressed

as

32)(          d cba  f       (9-11)

where a, b, c  and d   are arbitrary constants which in general are non-zero. Assume wewould need n Gauss points to achieve an exact integration. The exact integration would

 be

03

202

4

1

3

1

2

1)(

1

1

41

1

31

1

21

1

1

1

  cad cbad  f              (9-12)

A numerical integration using n  Gauss points, called n-point Gaussian integral, would

give

     

n

i

iiii

n

i

ii

n

i

ii   d cbaw f  w f  wd  f  1

32

1

1

1   1

)(             (9-13)

We require that (9-13) be exact for any polynomial up to degree 3. That is, for any

coefficients a, b, c, and d , (9-11) and (9-13)  should give the same result. This leads to

following requirements for the n pairs of weights (iw ) and the locations (

i  ):

3

1

2

1

1

1

0

3

2

0

2

i

n

i

i

i

n

i

i

i

n

i

i

n

i

i

w

w

w

w

 

 

 

  (9-14)

This is a set of 4 equations for 2n unknowns. Hence, we should be able to solve for

n=2. That is, 2 Gaussian points will be capable of providing exact numerical integration

for any polynomial up to degree 3. The above equations can be explicitly written as

212   ww     (9-15)

22110        ww     (9-16)

2

22

2

113

2     ww     (9-17)

3

22

3

110        ww     (9-18)

We can now solve for the four unknowns. First we use (9-13)  and (9-15). Arranging in

matrix form:

Page 67: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 67/115

Page 68: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 68/115

Chapter 9: Numerical Integration 63

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

9.4 Examples

To illustrate, let us integrate the following function:

  27550100          f     (9-30)

The exact result is:

  250

1

1

    d  f     (9-31)

Using our derived Gauss method:

 

  

 

 

  

 

  3

11

3

11

1

1

 f   f  d  f          (9-32)

Evaluating gives:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  3

1

753

1

5010013

1

753

1

501001

1

1    d  f     (9-33)

or

  2501

1

    d  f     (9-34)

This is the exact integral, as expected, since the order of the function being integrated

was 2.

As stated, if the function is of order 3 N  , the numerical integral will be

approximate. For example, if the function is:

     cos f     (9-35)

the integration will not be exact. We know this because the series expansion of  xcos  is:

  ...!8!6!4!2

1cos8642

  x x x x

 x   (9-36)

where the order of the polynomial is infinite, obviously > 3.

The exact integral from -1 to 1 is:

1

1

682942.1cos       d    (9-37)

While the approximate integral using two Gauss points is:

1

1

675823.1cos       d    (9-38)

Page 69: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 69/115

Chapter 9: Numerical Integration 64

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Thus, the numerical integral is approximate. Using more Gauss points would lead to a

more accurate numerical integral.

Question 3: For one-dimensional, 3-noded quadratic elements, to obtain accurate

element stiffness matrix, how many integration points are needed?

9.5 Higher Order Gauss-Legendre IntegrationTable for higher order integration using more Gauss points are given in many books.

Gives values for up to three Gauss points. A polynomial of order 12     n N  , where n  is

the number of Gauss points will be integrated exactly.

iw  1 0.0 2.0

2 0.577350269189626 (or    31 ) 1.0

30.774596669241483 (or 6.0 )

0.0

0.555555555555555 (or 5/9)

0.888888888888889 (or 8/9)

Table 1: Higher order Gauss-Legendre integration

9.6 Application of Numerical Integration to Evaluation of ElementMatrices

We will now demonstrate how numerical integration can be used to calculate an

element stiffness matrix. We previously changed variables for the element stiffness

matrix in (9-2):

          

     d d dx AE dx AE 

e L

  

  

1

10

BBBBK   TTe   (9-39)

We have also shown how we can implement a numerical integration scheme where we

evaluate the function at a given number of points and multiply the values by a weight and

then sum the results:

   

1

1   1

)(n

i

ii f  wd  f           (9-40)

Applying (9-40) into (9-39) gives:

     

  

  

n

i

i

iiid 

dx AE w

1    

      BBK 

  Te  (9-41)

This maybe looks a bit complicated, but all it means is that we will evaluate the term in

square brackets at however many Gauss points we are using, multiply by the weights, and

then summing the result.

Recall, for a linear element:

n i 

Page 70: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 70/115

Chapter 9: Numerical Integration 65

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 

 

  

  

  

 

dx

dN 

dx

dN   I  I       B   (9-42)

and we have already shown in (9-7) that:

 

  

   e

 I 

 Ldx

dN    1   (9-43)

Similarly:

 

  

 

e

 I 

 Ldx

dN    1   (9-44)

Also, in (9-5) we derived that (for a linear element):

2

e L

dx

   (9-45)

Substituting (9-42) through (9-45) into (9-41), we obtain:

 

 

  

 

 

  

  

  

  

 

  

 

 

  

  

n

i

e

ee

e

e

i

 L

 L L

 L

 L AE w

1   2

11

1

1

eK    (9-46)

or:

 

  

  

  

  

 

  

 

 

  

 

n

ie

i

 L

 AE w

1

2

1

2

1

2

1

2

1

eK    (9-47)

Obviously, this is a simple integral. The function we are integrating is a constant, so we

only need to use one Gauss point to integrate it exactly. In that case, 1n , 2i

w , and

0i

    (not used for constant function). Implementing the Gauss-Legendre integration,

gives:

  

  

  

  

 

  

 

 

  

 

21

21

2

1

2

1

2e

 L

 AE eK    (9-48)

and we finally obtain our old friend:

 

11

11e L

 AE eK    (9-49)

Page 71: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 71/115

Chapter 9: Numerical Integration 66

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

In this case, the integration is exact, but in general, the numerical integration will be

approximate.

9.7 Hints to Questions

Hint 1: Because both the locations and weights are optimized.

Hint 2: 2 integration points.

Hint 3: The change of the integration area from one coordinate system to another.

Page 72: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 72/115

Chapter 10: Review of Elasticity 67

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

10 Brief Review of Elasticity 

10.1 Purpose

Our purpose is to briefly review the basic formulas and equations in the theory of

linear elasticity. This will prepare us for the finite element treatment of elasticity

 problems.

10.2 Concept of Stress

In the following derivations, we assume the stresses on an infinitesimal block are as

shown in Figure 10-1:

Figure 10-1: Stresses on infinitesimal block

We will equivalently either use indices or  x  and  y  to indicate directions. Note that

moment equilibrium of the block implies symmetry of the stress tensor. We can writethe components of the stress tensor either as a matrix or as a vector:

 y xy

 xy x

  

  

  

  

2212

1211  (10-1)

or:

 xy

 y

 x

 

 

 

 

 

 

12

22

11  (10-2)

 Note that the (2,1) element of the matrix in (10-1) is written as12

   rather than21

   .

This is because the stress tensor is symmetric and2112

         as will be indicated later.

Very often, the stress tensor is denoted as ij  , where i and j may assume the value of 1 or

2 in two dimensional problems, or 1, 2, or 3 in three dimensional problems. Note that the

 first index, i, denotes the direction of the outward normal of the plane on which the stress

is defined, while the second index, j, refers to the direction the traction is pointing.  

1 or X 

2 or Y  

  1 

  22 

  1 

  22 

  21 

  1 

  1 

  21 

Page 73: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 73/115

Chapter 10: Review of Elasticity 68

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

10.3 Relation Between Surface Traction and Stress

We first establish a relationship between surface tractions and stress. To do this, we

look at a wedge of unit thickness:

Figure 10-2: Infinitesimal wedge

Equilibrium in the X  direction gives:

0sincos12111

           l l l t   

       sincos12111

  t    (10-3)

and in the Y direction:

0cossin12222

           l l l t   

       cossin12222

  t    (10-4)

Looking at the normal:

 cos1 n  

 sin2  n   (10-5)

Then (10-3) and (10-4) become:

2121̀111  nnt          

1122222   nnt       

  (10-6)or:

  jiji  nt        (10-7)

for short. Repeated index indicates summation from 1 to 2 for 2D, or from 1 to 3 for 3D.

t 1

2

 

 

 22

 12

 11

 12

X

 Y 

1

2

Page 74: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 74/115

Chapter 10: Review of Elasticity 69

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

10.4 Equilibrium

We next look at the stresses on a differential element:

X

 Y

  11  x

 

 x  

 y  

  11  x x

 

  22  y y

 

  11  y

 

  12  y y

 

  12  x x

 

  12  y

 

  12  x

 

b1 

b2 

Figure 10-3: Differential element

Here,i

b  is a body force per unit volume.

Equilibrium in the X direction gives:

   0 x

 F   

0112121111

 

  y xb x x y y y y y x x x

         (10-8)

Rearranging and divide by  y x :

01

12121111

  b y x

 y y y x x x    

  (10-9)

Taking the limit as 0,0     y x :

01

2

12

1

11   b x x    

 

 

   (10-10)

A similar statement of equilibrium in the Y direction gives:

02

1

12

2

22   b

 x x    

 

 

   (10-11)

Equations (10-10) and (10-11 can be combined as:

0,   i jij   b  , i=1, 2 (10-12)

Page 75: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 75/115

Chapter 10: Review of Elasticity 70

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Equilibrium of the moment on the material element leads to2112

       . The stress

tensor is therefore symmetric.

10.5 Strain-Displacement Relations

As for all these relations we are deriving, there are different approaches to the same

end. In this case, we will use a simple derivation assuming small displacements(deformed and original lengths are approximately the same) and small rotations (sin= 

and cos=1).

The displacements are defined as functions of position:

),(

),(

22

11

 y xuu

 y xuu

  (10-13)

 Notation can be equivalently:

 y

 x

u

u

v

u

u

u

2

1

u   (10-14)

shows an element that has first undergone a rigid translation, then a stretching

deformation, a uniform rotation, and a shear.

Figure 10-4: Schematic of deformed element

A normal strain is the stretching, that is, change in length divided by length:

X

 Y   u u

 x y1 2,,

u u x x y1 2,

,

u u x y y

1 2,,  

 y

Page 76: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 76/115

Chapter 10: Review of Elasticity 71

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 

 

 

 

 

 x

uu y x y x x

 x

,1,1

01   lim   

 x

u

 

     1

1    (10-15)

Similarly,

 

 

 

 

 

 y

uu y x x y x

 y

,2,2

02   lim   

 x

u

 

     2

2    (10-16)

 Note that a rigid body displacement does not induce a strain.

The shear strain is measured by the change in angle of the deformed element. In this

case:

 

 

 

 

 

 x

uu y x y x x

 x x

,2,2

0lim   

 x

u

 x

 

     2

  (10-17)

and

 

 

 

 

 

 y

uu y x y y x

 y y

,1,1

0lim   

 y

u y

 

     1   (10-18)

The engineering shear strain is measured using the total change in angle:

 x

v

 y

u xy

 

 

 

       (10-19)

The tensor shear strain is one-half the engineering shear strain:

 

  

   x

v

 y

u xy

 

 

 

  

2

1  (10-20)

or

 

 

 

 

i

 j

 j

i xy

 x

u

 x

u

 

 

 

  

2

1  (10-21)

Page 77: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 77/115

Chapter 10: Review of Elasticity 72

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

or, for all strains:

i j jiij   uu ,,2

1    (10-22)

From the definition of the strain, it is trivial to show that   jiij        . The strain tensor is

therefore also symmetric.

Question 1: i  j  jiij   uu   ,,2

1    represents pure deformation (extension and shear). What

does the displacement (deformation) gradient   jiu  ,

 represent?

10.6 Stress-Strain Relations (3D)

In order to understand properly the stress-strain relations in 2D, it is necessary to start

from the 3D relations. The generalized Hooke's law links the stresses to the strains or the

strains to the stresses as follows:

Stiffness matrix

x x

y y

z z

xy xy

xz xz

yz yz

1 0 0 0

1 0 0 0

1 0 0 0

1 2E 0 0 0 0 02 21 1 2

1 220 0 0 0 0

22

1 20 0 0 0 0

2

  (10-23)

Compliance matrix

x x

y y

z z

xy xy

xz xz

yz yz

1 0 0 0

1 0 0 0

1 0 0 01

2   0 0 0 2 1 0 0E

2   0 0 0 0 2 1 0

2   0 0 0 0 0 2 1

 

  (10-24)

If we define the following Lamé constants:

 

  

  

12

211

 E G

 E 

  (10-25)

we can also write the stress-strain relation as:

Page 78: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 78/115

Chapter 10: Review of Elasticity 73

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

ijkk ijij   G          2   (10-26)

Even though we wish to deal with 2-D elastic problems only, the above expressions

show clearly that, if the Poisson's ratio of the material is non-zero and the stress-strain

state is not trivially zero, it is impossible for both the normal stress and normal strain (

33   and 33 

) to be zero simultaneously. It is therefore necessary to distinguish two typesof plane problems in elasticity: plane strain and plane stress.

In plane strain, the thickness dimension is much larger then the in-plane dimensions

("thick plate"), and all out-of-plane strain components (   13  ,   23  , and 33  ) are zero. For

 plane strain, although the out-of-plane shear stresses (   13   and 23  ) are zero, the normal

stress in the thickness direction (   33  ) is usually non-zero.

In plane stress, the thickness dimension is much smaller then the in-plane dimensions

("thin plate"), and all out-of-plane stress components (   13  ,   23  , and 33  ) are zero. For

 plane stress, although the out-of-plane shear strains (   13    and 23  ) are zero, the normal

strain (   33  ) in the thickness direction is usually non-zero.

In this course, we will focus on the plane strain problems.

10.7 Stress-Strain Relations (Plane Strain)

For plane strain, the Hooke’s law reduces (taking the submatrix from the 3D stiffness

matrix) to the following:

 xy

 y

 x

 xy

 y

 x E 

 

 

 

   

  

  

 

 

 

22

21

00

01

01

211  (10-27)

We must invert (10-27), instead of taking the submatrix of the 3D compliance matrix, to

obtain the expression for the strains in terms of the stresses:

 

 xy

 y

 x

 xy

 y

 x

 E  

 

 

  

   

 

 

 

200

01

011

2

  (10-28)

Question 2: Why is the plane strain compliance matrix not a submatrix of the 3D case?  

10.8 Stress-Strain Relations (Plane Stress)For completeness, the stress-strain relations for plane stress are also given in the

following:

Compliance (taking the submatrix of the 3D compliance matrix):

Page 79: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 79/115

Chapter 10: Review of Elasticity 74

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 

 xy

 y

 x

 xy

 y

 x

 E  

 

 

 

 

 

 

 

 

1200

01

011

2

  (10-29)

Stiffness (the inverse of the above):

 

 xy

 y

 x

 xy

 y

 x E 

 

 

 

  

 

  

 

 

22

100

01

01

1  2

  (10-30)

Question 3: Why is the plane stress stiffness matrix not a submatrix of the 3D case?

10.9 Hints to Questions

 Hint 1: Deformation as well as rigid body rotation.

 Hint 2: Because the normal stress in thickness is non-zero. Hint 3: Because the normal strain in thickness is non-zero. 

Page 80: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 80/115

Chapter 11: Finite Elements in Elasticity 75

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

11 Finite Elements in Elasticity 

11.1 Purpose

Our purpose is to develop a finite element formulation for two-dimensional elasticity.

We first develop the weak for of the elasticity equation. We then develop the matrix

formulation for the finite element method using element shape functions.

11.2 Elastic Finite Element Formulation

Recall the definition of our problem:

Figure 11-1: Problem definition

We start with equilibrium (the strong form of the differential equation, (10-12)):

0,   i jij   b    (11-1)

Again, we multiply by a weighting function that is zero at the essential boundary

conditions. We will call this weighting function u    to emphasize the equivalence between the weak statement and the variational approach:

0,

  ii jij   ub        (11-2)

We then integrate over the volume:

  0,   V 

ii jij   dV ub        (11-3)

or

0,   V 

ii

i jij   dV ubdV u         (11-4)

We integrate the left hand term by parts:

  V 

 jiij

V  jiij

i jij   dV udV udV u,,,

           (11-5)

But we can simplify the term on the right:

S u

 f  

Page 81: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 81/115

Chapter 11: Finite Elements in Elasticity 76

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

22

,,   jiij jiij   uu          (11-6)

By symmetry of stress tensor,

22

,,   ji ji jiij   uu       

  (11-7)

Switching indices:

22

,,   i jij jiij   uu          (11-8)

Summing (11-6) and (11-8):

i j jiij jiij   uuu ,,,2

1          (11-9)

or, using the strain-displacement definition (10-22):

ijij  jiiju      

2

1,     (11-10)

Substituting (11-10) into (11-5) gives:

  V 

ijij

V  jiij

i jij   dV dV udV u         ,

,

  (11-11)

We now use the divergence theorem on the second term of (11-11) to convert the volume

integral to a surface integral:

  V 

ijij

 jiij

i jij   dV dS nudV u         ,

  (11-12)

We use the relationship between surface traction and stress (10-7) to obtain:

  V 

ijij

ii

i jij   dV dS ut dV u         ,   (11-13)

Finally, we substitute (11-13) into (11-4) to obtain:

  V V 

iiijij

ii   dV ubdV dS ut    0       (11-14)

or

V V S 

iiiiijij   dS ut dV ubdV           (11-15)

This is the weak form of the differential equation. Along with the essential boundary

conditions, it describes our problem. Note that the surface integration is only performed

over the surface that has natural boundary conditions. It is also called the “principal of

virtual work.” The left hand side corresponds to internal work, while the right hand side

corresponds to external and body force work. Also note that the strains and

Page 82: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 82/115

Chapter 11: Finite Elements in Elasticity 77

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

displacements are self-consistent, as are the stresses and loads, but that the stress terms do

not need to be consistent with the strain terms.

This forms the basis of our finite element approximation.

Question 1: What is the physical meaning of the left hand side of (11-15)? What is the

 physical meaning of the right hand side of (11-15)? What is the physical meaning of (11-15)?

11.3 Finite Element Statement

For convenience, we now introduce matrix notation where:

31

23

12

33

22

11

  

 

 

 

 

σ   (11-16)

31

23

12

 

 

 

 

 

 

 

δε   (11-17)

3

2

1

u

u

u

 

 

 

u   (11-18)

3

2

1

t   (11-19)

The reader should note that the use of engineering shear strain (twice the tensorial shear

strain) is deliberate. This is because the full stress and strain tensors have nine

components and

Page 83: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 83/115

Chapter 11: Finite Elements in Elasticity 78

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

31

23

12

33

22

11

312312332211

13

32

21

31

23

12

33

22

11

133221312312332211

2

2

2

 

 

 

 

 

 

      

 

 

 

 

 

 

 

 

 

           ijij

 

Substituting into (11-15):

V V S 

dS dV dV    tubu  TTT      (11-20) 

Question 2: Why is it necessary to use the engineering shear strain, 1212   2      , etc., in

expression (11-17)?

Question 3: What is the physical meaning of (11-20)? 

We now use shape functions to interpolate the solution. We will use functions thathave a unit value at nodes, so we indicate the nodal values by au   :

au  Ν u          

 Note that in 3D, each node has three degrees of freedom (u ,v , and w ), and the

expression in the above becomes

2

2

2

1

1

1

21

21

21

0000

0000

0000

w

v

u

w

v

u

 N  N 

 N  N 

 N  N 

w

v

u

  

  

  

  

  

  

  

  

  

  (11-21)

where the subscript denotes node number. Note that the shape functions are functions of

 x, y, and z , but the nodal displacements au    are not.

We can also write:

Page 84: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 84/115

Chapter 11: Finite Elements in Elasticity 79

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

T  T  

T  N u u           (11-22) 

And similarly:

a u B       

T  T  

a   B u 

    T 

 

(11-23) Note here the formulation is in 3D, and the shape function should also be understood as

function of x,  y, and z , i.e. 3D shape function. Later, we will specialize the formulas to

2D problems for simplicity in programming. We will elaborate on 2D shape functions in

later lectures. Substituting (11-22) and (11-23) into 8-20 gives:

Substituting (11-22) and (11-23) into (11-20) gives:

  V V S 

dS dV dV    0t N u b N u B u   T  T  

T  T  

T  T  

a          (11-24) 

Since the nodal displacements associated with the weighting function are constant

with respect to the integration:

0

 

 

 

 

V V S 

dS dV dV    t N b N B u   T  T  T  T  

a       (11-25) 

And since this must hold true for all values of the weighting function constants:

V V S 

dS dV dV    t N b N B   T  T  T  

  (11-26) 

By recognizing that we can integrate over each element and sum the integrals, we

obtain:

         

elm

e

elm

e

elm

et 

 N 

e   V 

 N 

e   V 

 N 

e   S 

dS dV dV 

1 1 1

t N b N B   T  T  T  

  (11-27) 

Although not our final endpoint, (11-27)  is an important finite element statement. It is

used in “explicit” dynamic finite element codes. Such codes are used for problems that

involve large displacements and large strains, such as automobile crash simulation or

weapons simulations. The primary development of explicit codes occurred at the

 National Laboratories by people including Sam Key (HONDO, Sandia) and Hallquist

(DYNA2D/3D, Livermore). These codes have now been commercialized (Livermore

Associates, Hallquist) and Abaqus Explicit (Taylor and Flannegan).

Our path is not quite finished. We will now assume an elastic problem with small

strains. The displacements are interpolated using shape functions:

a 0 0    Nu u N u      (11-28) 

 Note that these are now the real nodal displacements, not a weighting function

(variation). As before, we have included shape functions,0

N , that satisfy the essential

Page 85: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 85/115

Chapter 11: Finite Elements in Elasticity 80

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 boundary conditions. Taking the appropriate derivatives of the shape functions we can

write:

a 0 0    Bu u B      (11-29) 

and:

D    (11-30) 

where the D  matrix defines the elastic relation between strain and stress. Using (11-29) 

and (11-30):

a 0 0    Bu u B D      (11-31) 

Substituting (11-31) into (11-27) gives:

         

elm

e

elm

e

elm

et 

 N 

e   V 

 N 

e   V 

 N 

e   S 

dS dV dV 

1 1 1

t N b N Bu u B D B   T  T  

a 0 0 

T     (11-32) 

and rearranging:

           

  elm

et 

elm

e

elm

e

elm

et 

 N 

e   S 

 N 

e   V 

 N 

e   V 

 N 

e   S 

dV dS dV dV 

11 1 1

0 0 

T  T  T  

T  u DB B t N b N u DB B    (11-33) 

This is our final finite element statement. In the next lecture, we define the shape

functions for our elements.

Question 4: Is the stiffness matrix D   the same as (10-23) in Chapter 10?

11.4 Hints to Questions

 Hint 1: Internal strain energy; work of external forces; energy conservation.

 Hint 2: In expression ijij    , shear terms will appear twice. Using 1212   2       in

expression (11-3) takes care of it.

 Hint 3: Internal virtual energy = external virtual work.

 Hint 4: No, because 1212   2      is used in (8-3). D    should be

2

2100000

02

210000

002

21000

0001

0001

0001

211

E

D

 

Page 86: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 86/115

Chapter 12: Element Shape Functions 81

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

12 Element Shape Functions 

12.1 Purpose

Our purpose is to examine the details of finite element formulation for 2-dimensional

elasticity analyses using an eight-noded quadrilateral element.

Our goal here is not to describe all element shape functions. Instead, we will focus on the

eight-noded element. This element is commonly used for elasticity analysis. We will see

that it performs well. The reader will be referred to other texts for a more complete

discussion of shape functions.

12.2 Finite Element Families

We have already derived one-dimensional elements with linear and quadratic shape

functions (Figure 12-1: One-dimensional elements).

Figure 12-1: One-dimensional elements

Similar elements can be derived in two dimensions. These include triangular elements

(Figure 12-2) and quadrilateral elements (Figure 12-3).

Figure 12-2: Triangular two-dimensional elements

Figure 12-3: Two-dimensional quadratic elements

Finally, the same families of elements can be developed in three-dimensions (Figure

12-4).

Page 87: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 87/115

Chapter 12: Element Shape Functions 82

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Figure 12-4: Some three-dimensional elements

Most commercial finite element codes will include all the above elements (and

others). There is no simple answer to what element is “best.” Large deformation

nonlinear analyses typically use four-noded (2-D) or eight-noded (3-D) elements. This

technology was originally developed at the national laboratories to solve the large

deformation problems associated with weapons. Eight-noded (2-D) and twenty-noded(3-D) elements are often used for elasticity. One advantage of the quadratic elements is

that fewer elements are needed for a given accuracy than using the simpler elements.

Another advantage is the capability to move the side node to the quarter-points to

represent the singularity around a crack tip.

The bottom line is that the analyst has the responsibility to ensure that the mesh being

used to represent a problem is appropriate. This must be done knowing the type of

element being used and intuition into the particular problem being solved. In the future

(and in some current codes) automatic mesh refinement will help ensure a desired

accuracy of solution.

12.3 The Serendipity Element (Q8 or 8-Noded Quadratic Element)

The 2D shape functions   ,i N   are defined by the following relations:

i

ii   u N u          ,,  

i

ii   v N v          ,,  

where iu  and iv  are the x and y displacements of node i. Similar to the one-dimensional

case, the 2D shape functions satisfy the following conditions:

  ij j ji N          ,  

  1,   i

i N        

We will focus on one particular element, the eight-noded quadrilateral (Q8), for two-

dimensional problems. This element is a square in natural coordinates (Figure 12-5).

Page 88: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 88/115

Page 89: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 89/115

Chapter 12: Element Shape Functions 84

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

1114

14

         N   

       112

1   2

5 N   

       112

1   2

6 N   

       112

1   2

7 N   

       112

1   2

8 N    (12-1)

The shape functions are plotted in Figure 12-6 and Figure 12-7. Note that the values are

1.0 at the associated node and 0.0 at all other nodes. The user should verify that along an

edge (   0.1  , etc.) the shape functions simplify to the previously derived one-

dimensional quadratic functions.

Figure 12-6: Corner node shape function

Page 90: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 90/115

Chapter 12: Element Shape Functions 85

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Figure 12-7: Side node shape function

12.4 Details of the Element Matrices

Since we have now selected the particular element we will be using, we can now give

details of the N    and B    matrices defined in the previous chapter. The N    matrix

interpolates the nodal displacements to the interior of the element:

a Nu u    (12-2) 

For two-dimensional elasticity, each node has displacements in the  X   and Y  

directions. The interpolation then is:

8

8

3

3

2

2

1

1

8321

8321

0000

0000

v

u

v

u

v

u

v

u

 N  N  N  N 

 N  N  N  N 

v

u

  (12-3)

 Note that the X  displacement at any point in the element, ),(   y xu , depends on only the X -

components of nodal displacements, while ),(   y xv  depends only on the Y -components.

The B   matrix relates strains to displacements. Since we use the shape functions to

interpolate displacements:

1111111111111111   u N u N u N u N u N u N u N u N u     (12-4)

and then,

Page 91: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 91/115

Chapter 12: Element Shape Functions 86

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

8

8

3

3

2

2

1

1 u x

 N u

 x

 N u

 x

 N u

 x

 N 

 x

u x

 

 

 

 

 

 

 

 

 

       . (12-5)

Similarly,

8

8

3

3

2

2

1

1

v x

 N 

v x

 N 

v x

 N 

v x

 N 

 x

v

 y  

 

 

 

 

 

 

 

 

 

    

  (12-6)

and,

8

8

3

3

2

2

2

2

1

1

1

1 v x

 N u

 y

 N v

 x

 N u

 y

 N v

 x

 N u

 y

 N 

 x

v

 y

u xy

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

         (12-7)

Combined, these define the B   matrix:

8

8

2

2

1

1

8821211

821

821

000

000

v

u

v

u

v

u

 x

 N 

 y

 N 

 x

 N 

 y

 N 

 x

 N 

 y

 N 

 y N 

 y N 

 y N 

 x

 N 

 x

 N 

 x

 N 

 xy

 x

 x

 

 

 

 

 

 

 

 

 

 

 

   

  

  

 

 

 

 

 

 

 

 

 

  (12-8)

or:

a Bu     (12-9) 

So, if we evaluate the B   matrix at any point in the element, we can obtain the strains by

multiplying it by the nodal displacements.

In (12-8), we need the derivatives of the shape functions with respect to the global

coordinates, but the shape functions are given as functions of the natural coordinates. To

obtain the derivatives with respect to global coordinates, we use the chain rule:

 

 

 

 

 

 

 

 

 

    y

 y

 N  x

 x

 N  N 111

 

 

 

 

 

 

 

 

 

 

    y

 y

 N  x

 x

 N  N  111   (12-10)

or:

 y

 N  x

 N 

 y x

 y x

 N 

 N 

 

  

 

 

 

 

  

 

 

 

 

  

 

1

1

1

1

  (12-11)

This defines the  Jacobian  matrix. By using (12-11), it is implied that the relation

 between the real and natural coordinates are known. We can choose to use the shape

Page 92: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 92/115

Chapter 12: Element Shape Functions 87

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

functions that interpolate the displacements to also interpolate the geometry (positions),

that is,

88332211  x N  x N  x N  x N  x       (12-12)

from which

8

8

2

2

1

1 x

 N  x

 N  x

 N  x

 

 

 

 

 

 

 

      (12-13)

with similar expressions for 

  y, 

  x, and

 

  y. Elements that use the same shape

functions to interpolate both the displacements and positions are called isoparametric

elements. We can then invert the Jacobian matrix to obtain the derivatives with respect to

global coordinates:

 

  

 

 

  

 

1

1

1

1

1

 N 

 N 

 J 

 y

 N  x

 N 

  (12-14)

Question 2: Is it necessary to use isoparametric formulation?

Page 93: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 93/115

Chapter 13: 2D Numerical Integration 88

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

13 2-D Numerical Integration 

13.1 Purpose

Our purpose is to describe how the element matrices can be integrated numerically.

Only a brief discussion of numerical integration will be given. The reader can refer to

finite element texts for further details.

13.2 Numerical Integration

In Chapter 11 we derived our finite element statement:

       

numel 

e   S 

numel 

e   V 

numel 

e   V 

numel 

e   S  et e e et  

dV dS dV dV 

11 1 1

00

TTT

a

TuDBBtNbNuDBB   (13-1)

and in Chapter 12 we presented the details of the B , D , and N   matrices. The

integration for each element will be performed numerically.

As for one-dimensional numerical integration, we first transform from realcoordinates to natural coordinates (note that in two dimensions, integration over the

volume corresponds to performing an area integration multiplied by the thickness.) In

two dimensions, we correspondingly need two natural coordinates   , . The change of

variables for integration is:

        

 

 

 

 

d d  g  g  f  dxdy y x f  

 y

 y

 x

 x

J 2

1

2

1

2

1

2

1

,,,),( 21  (13-2)

where:

  ,1 g  x    

  ,2

 g  y    

  

  

  

  

21

21

 g  g 

 g  g 

 y x

 y x

J  =Determinant of Jacobian matrix.

Question 1: What is the physical meaning of the determinant of Jacobian matrix in (9-

46)?

In our case, the element stiffness matrix is then:

  d d t dV 

eV 

e

1

1

1

1

J DB B DB B K     T  T     (13-3) 

or

Page 94: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 94/115

Chapter 13: 2D Numerical Integration 89

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

  

  

  

  

  

  

  

      

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

d d 

 x N 

 y N 

 x N 

 y N 

 x N 

 y N 

 y N  y N  y N 

 x N 

 x N 

 x N 

 x N 

 y N 

 y N 

 x N 

 x N 

 y N 

 y N 

 x N 

 x N 

 y N 

 y N 

 x N 

t e

1

1

1

1

882211

821

821

88

88

22

22

11

11

000

000

0

0

0

0

0

0

J D K  

 

(13-4)

where t  is the thickness of the body. For plane strain this is usually unit thickness.

The material matrix, D  , relates the stresses to the strains:

D    (13-5) 

For elasticity, the D   matrix is given by Hooke’s law. For plain strain: 

 

 xy

 y

 x

 xy

 y

 x E 

 

 

 

   

  

   

 

 

2

2100

01

01

211  (13-6)

and,

 y x z             (13-7)

Similarly, for plane stress:

   

 xy

 y

 x

 xy

 y

 x E 

 

 

 

  

 

  

 

 

2

100

01

01

1  2

  (13-8)

and,

0 z     (13-9)

Question 2: What is the size of the element stiffness matrix for Q8 element?

13.3 Implementation

Similar to the one-dimensional case, in 2-D we integrate numerically by evaluating

the function at selected points in each dimension, multiplying the value by a weight, and

summing over all the integration points. In general this leads:

Page 95: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 95/115

Page 96: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 96/115

Chapter 13: 2D Numerical Integration 91

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

13.4 Body Forces

For the body force term at the element level, the numerical integration formula is:

n

i

n

 j

 ji ji ji ji

wwt d d t dV 

e   1 1

1

1

1

1

,,,              J b N J b N b N   T  T  T     (13-11)

 Note that the body force in 2D is a vector of 2 components,   T  y x   bbb  , while T  N   is

16 by 2, therefore the above expression results in a vector of size 16.

13.5 Point Forces and Surface Tractions

When point forces are present, the mesh is usually generated in such a way that there

will be a node at each loading point. The force vector then is simply the components of

the point force, e.g. in 2D

et S 

 y

 y

 x

 f  

 f  

 f  

dS 

8

1

1

t N 

  (13-12)

For surface tractions in 2D we must integrate along the surface, which is a 1D

integration. Along any edge of the Q8 element (   1    or 1  ) the only non-zero

shape functions will be those associated with the edge and, on the edge, the shape

functions will be identical to the quadratic shape functions derived for a 1D element (see

Chapter 8). For example, for the element in Figure 13-3, along the edge 1  , the shape

functions reduce to:

1

22

   

 

 

 

   

  N 

 

12

3   

  

     

  N   

2

6   1     N   

1 25

347

8 6

  

  

Figure 13-3: Serendipity element

Page 97: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 97/115

Chapter 13: 2D Numerical Integration 92

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

For the surface tractions in 2D, the integration becomes one-dimensional. Depending

on the element orientation, the formula takes slightly different forms. To derive a

generalized formula, let's consider a curved element edge L123  passing 3 nodes (Q8

element) as show in the figure below:

Figure 13-4: Curved element edge

Assuming that the element is traversed in a counter-clockwise direction (i.e. the

material is on the left side of the boundary), then the tangent direction of an arc line

element is

21   e e e ds

dy

dsdx

 s     (13-13)

and the outward normal to the boundary is213

  eeeen

ds

dx

ds

dy s   . 

Assuming the surface traction t   is expressed locally in terms of normal and tangent

components t n and t  s, i.e.

 s sn   t t    e n t      (13-14)

The equivalent nodal forces corresponding to the three nodes on L123 are then

  ds

ds

dydsdx

dsdxds

dy

 N 

 N 

 N 

 N 

 N 

 N 

t dst t t dS 

 f  

 f  

 f  

 f  

 f  

 f  

 sn

 L L

 s snT 

 L

 y

 x

 y

 x

 y

 x

 

 

 

 

123123123

3

3

2

2

1

1

3

3

2

2

1

1

0

0

0

0

0

0

e n N t N    (13-15)

As before, using the chain rule:

     d 

dx

ds

ds

dx  and

     d 

dy

ds

ds

dy  

gives

 d 

dx

 J ds

dx   1  and

 d 

dy

 J ds

dy   1   (13-16)

ne  s 

3

2

1t

 L123 

Page 98: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 98/115

Chapter 13: 2D Numerical Integration 93

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

where

  Jd ds     (13-17)

Integrating using the natural coordinates:

 

 

 

 

  Jd 

dy

 J 

dx

 J t 

dx

 J 

dy

 J t 

 N 

 N 

 N 

 N 

 N 

 N 

 f  

 f  

 f  

 f  

 f  

 f  

 sn

 y

 x

 y

 x

 y

 x

 

 

 

 

  1

1

1

1

0

0

0

0

0

0

1

1

3

3

2

2

1

1

3

3

2

2

1

1

  (13-18)

and simplifying:

 

 

 

 

 d 

dyd dx

dxd dy

 N 

 N 

 N 

 N  N 

 N 

 f  

 f  

 f  

 f   f  

 f  

 sn

 y

 x

 y

 x

 y

 x

 

 

 

 

1

1

3

3

2

2

1

1

3

3

2

2

1

1

0

0

0

0

0

0

  (13-19)

here t   is the element thickness and  N i  are the 1D shape functions for the quadratic

element

1

1

1

2

13

2

2

2

11

   

  

   

 N 

 N 

 N 

  (13-20)

Using the isoparametric formulation

3

1

)(i

ii   x N  x      

3

1

)(i

ii   y N  y       (13-21)

we have

3

1

)(

i

ii  xd 

dN 

dx

 

 

  

3

1

)(

i

ii  yd 

dN 

dy

 

 

   (13-22)

The above integration can be readily evaluated using 3-point Gauss integration in 1D.

Page 99: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 99/115

Chapter 13: 2D Numerical Integration 94

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Question 3: Why is the integration formula of surface tractions different from the others?

13.6 Hints to Questions

Hint 1: Because Q8 is quadratic.

Hint 2: No.

Hint 3: Because its dimensionality is reduced by 1.

Page 100: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 100/115

Chapter 14: Stress Calculation 95

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

14 Elastic Stress Computations in Finite ElementAnalysis

14.1 Background

The displacement-based finite element formulation generates a continuous displacementfield over the discretized problem domain. However, since the derivatives of the shape

functions are not continuous across boundaries, the stresses (and strains) are only

continuous within each element and experience jumps across boundaries of elements.

The magnitude of the jump across an element boundary can be used as a measure of the

accuracy of the solution. As a general rule, a jump of less than 10% of the value of stress

indicates a mesh that is sufficiently refined to provide an accurate solution.

For display purposes, we may need to provide a continuous stress fields. We need to

keep in mind that such stress smoothing is a mere “post - processing” of the computation

results. It makes the data look “nicer”, but does not make it any more accurate.

Let us make some observations first:

  For elastic problems, it can be proved that the stresses computed at the Gauss

 points are “optimum” and more accurate than those calculated at other locations. 

  For a Q8 element, if the element is rectangular (in the physical coordinate

system), the coordinate transformation between the physical and natural

coordinates is linear. In such case, stresses vary linearly with coordinates.

Therefore, the following process of producing continuous stress fields has been proposed:

1.  First, calculate the stresses at all the Gauss points.

2.  Second, smooth the stresses within the element using an appropriate functionto obtain a linear “best-fit” to the stresses. 

3.  Extrapolate to calculate the stresses at the nodes, called nodal stresses.

4.  Finally, the nodal stresses for a given node computed by all elements that

share the node are averaged. This gives the final nodal stress.

5.  (Afterwards, if the stresses for any point are desired, it can be computed using

shape functions to interpolate, just as what we do with displacements. In our

finite element program, this is not needed. We use the post-processor to

display the stresses.)

14.2 Stresses at Gauss Points

Based on the finite element formulation, the stress at any point in an element can be

computed according to

u DB σ           ,,     (14-1)

where u  is the nodal displacement vector. 

Page 101: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 101/115

Chapter 14: Stress Calculation 96

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

For our smoothing function within the element we will use the same function as the shape

functions for a four-noded quadrilateral element.

          DC  B A f     ,   (14-2)

14.3 “Best Fit”: Least Square Errors Method

Consider a field, given as a set of data at discrete points,  jid        , , to be fitted by the

function     , f    given in eqn. (14-2). The sum of square errors over all data points is

2,

,

2

1 1

),(),(),(    

 N  M 

 ji

 ji ji ji

 M 

i

 N 

 j

 ji ji   d  DC  B Ad  f   E                (14-3)

To minimize the square errors E , it is required that

0

 A

 E , 0

 B

 E , 0

 E , and 0

 D

 E   (13-4)

which give

0),(1

),(

,

,

,

,

,

,

,

,

,

,

,

,

 N  M 

 ji

 ji

 N  M 

 ji

 N  M 

 ji

 ji j

 N  M 

 ji

i

 N  M 

 ji

 N  M 

 ji

 ji ji ji

d  DC  B A

d  DC  B A

      

      

 

0),(

),(

,

,

,

,

,

,

2,

,

2,

,

,

,

 N  M 

 ji

 jii

 N  M 

 ji

 N  M 

 ji

 ji ji

 N  M 

 ji

i

 N  M 

 ji

i

 ji ji ji

 N  M 

 ji

i

d  DC  B A

d  DC  B A

         

       

 

0),(

),(

,

,

,

,

2,

,

2,

,

,

,

,

,

 N  M 

 ji

 ji j

 N  M 

 ji

 ji

 N  M 

 ji

i

 N  M 

 ji

 ji

 N  M 

 ji

 j

 ji ji ji

 N  M 

 ji

 j

d  DC  B A

d  DC  B A

         

       

 

0),(

),(

,

,

,

,

22,

,

2,

,

2,

,

,

,

 N  M 

 ji ji ji

 N  M 

 ji ji

 N  M 

 jiii

 N  M 

 ji ji

 N  M 

 ji ji

 ji ji ji

 N  M 

 ji

 ji

d  DC  B A

d  DC  B A

            

        

 

They can be re-written as the following set of linear equation system about A, B, C and D

Page 102: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 102/115

Chapter 14: Stress Calculation 97

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

 N  M 

 ji

 ji ji

 N  M 

 ji

 ji j

 N  M 

 ji

 jii

 N  M 

 ji

 ji

 N  M 

 ji

 ji

 N  M 

 ji

 ji

 N  M 

 ji

 ji

 N  M 

 ji

 ji

 N  M 

 ji

 ji

 N  M 

 ji

i

 N  M 

 ji

 ji

 N  M 

 ji

 j

 N  M 

 ji

 ji

 N  M 

 ji

 ji

 N  M 

 ji

i

 N  M 

 ji

i

 N  M 

 ji

 ji

 N  M 

 ji

 j

 N  M 

 ji

i

 N  M 

 ji

 DC 

 B

 A

,

,

,

,

,

,

,

,

,

,

22,

,

2,

,

2,

,

,

,

2

,

,

2

,

,

,

,

,

,

2,

,

,

,

2,

,

,

,

,

,

,

,

,

,

),(

),(

),(

),(1

    

   

   

  

        

      

      

    

  (14-4)

 Note that the system matrix (the square matrix on the left) depends only on the natural

coordinates of data points, which are the Gauss points for our case. This means the

system matrix may only need to be constructed once and be used for all elements. For

3x3 integration, M=N=3. Also, 6.01

    , 02    , 6.0

3      and 6.0

1    ,

02    , 6.0

3    . Using these definitions, the terms evaluate to:

 N  M 

 ji

 ji ji

 N  M 

 ji

 ji j

 N  M 

 ji

 jii

 N  M 

 ji

 ji

 D

 B

 A

,

,

22

,

,

,

,

,

,

),(

),(

),(

),(

44.1000

06.300

006.30

0009

    

   

   

  

  (14-5)

Since only the diagonal terms are non-zero, all we need to calculate A, B, C, and D isevaluate the right hand side and then divide by the diagonal coefficients. For example, if

we want to smooth the X 

    data in an element, to calculate A we sum the X 

    for all

gauss points and divide by 9. Similar calculations are required for the other terms.

14.4 Calculating Nodal Stress

Once the coefficients in eqn. (14-2) are calculated, the nodal stresses can be obtained

using the natural coordinates for each node.

As mentioned earlier, stresses are discontinuous across elements. There is no guarantee

that nodal stresses for one node calculated for one element, will be the same as calculated

from another element that the same node. Therefore, in finite element code, the nodalstress calculated at this stage is stored within the element object itself, not in the node

objects.

14.5 Averaging Nodal Stresses

After the nodal stresses for every element is computed. We now can start averaging the

nodal stresses. For instance, a corner node is usually shared by 4 adjacent elements. Each

of these 4 elements has its own value for the nodal stress of this node. The average over

Page 103: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 103/115

Chapter 14: Stress Calculation 98

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

all the 4 elements involved will be computed and then stored in the node object. A side

node is usually shared by 2 elements, and the averaging will be performed over these two

elements.

Averaging computation is very simple, if you have all values handy. The challenge is:

for each node, how do we know what elements share it? A “clean” approach to this

 problem is that at the same time we are summing the nodal values we count the number

of times this summation is being performed. The number of appearance simply means

the number of elements share this particular node. As a last step, we then divide the

summation of the stresses at each node by the number of contributing elements to obtain

the average.

Page 104: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 104/115

Heat Transfer 99

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

15 Heat Transfer Using Finite Elements 

15.1 Purpose

Our purpose is to derive the finite element equations for heat transfer.

15.2 Conservation of EnergyFor a differential element with unit thickness:

X

 Y

 x xq  

 x  

 y  

 x x xq  

 y y yq

 

 y yq  

b  

Figure 15-1: Differential element

Where q  are the heat fluxes in the X  and Y  directions and b  is a heat generation per unit

volume.

For steady state problems, the heat flow in equals the heat flow out:

0

  xq yq y xb xq yq y y y x x x y x x x   (15-1)

Rearranging and divide by  y x :

0

 

 

 

 

 

 

 

 

  b y

qq

 x

qq y y y y y

 x x x x x  (15-2)

Taking the limit as 0,0     y x :

0   b y

q

 x

q   y x

 

 

 

   (15-3)

or:

0,   bq ii , i=1, 2 (15-4)

Page 105: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 105/115

Heat Transfer 100

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

All parts of the boundary have either temperature or heat flux specified, that is,t 

T T    on

t S   or h

dndT k     on

hS  , where n  is the outward surface normal.

15.3 Fourier’s Law of Heat Conduction 

The general statement of Fourier’s law of heat conduction is: 

 y

T  x

k k 

k k 

q

q

 yy yx

 xy xx

 y

 x  (15-5)

or

 jiji   T k q,

  (15-6)

where ijk   are the thermal conductivities. For an isotropic material, this reduces to:

 y

T  x

q

q

 y

 x

0

0  (15-7)

and 15-3 becomes:

02

2

2

2

 

  

    b

 y

 x

T k 

 

 

 

   (15-8)

15.4 Weak Statement of Heat Conduction

The weak statement of the problem is developed on the following pages. For interest,

the long form and the indicial notation form will be developed in parallel.

As for elasticity, the weighting function is zero at the essential boundary conditions.

Page 106: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 106/115

Heat Transfer 101

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Strong form: 0   b y

q

 x

q   y x

 

 

 

   0,   bq ii  

BCs: t T T    on

t S   or hnqnq  y y x x    on

hS   

t T T    on

t S   or hnq ii    on

hS   

Multiply by

weighting

function and

integrate

  

 

V V 

 y x wbdV dV  y

q

 x

qw

 

 

 

   0,  

V V 

ii   wbdV dV wq  

Integration by

 parts

   y

qwq

 y

w

 x

qwq

 x

wwq

 ywq

 x

 y

 y

 x

 x y x

 

   

  

 

 

  

 

 y x

 y x y x   q

 y

wq

 x

w

 y

q

 x

qwwq

 ywq

 x 

  iiiiii  wqqwwq

,,,

 

Substitute     0 

  

 

V V 

 y x

 y x   wbdV dV q y

wq

 x

wdV wq

 ywq

 x 

  0,, 

V V 

ii

ii   wbdV dV qwdV wq

 

Recall

divergence

theorem

  dV  y

 f  

 x

 f  dS n f  n f  

 y x

 y y x x      

  

 

  dV  f  dS n f  

ii

ii       ,

 

Substitute   0 

  

 

V V 

 y x

 y y x x   wbdV dV q y

wq

 x

wdS nwqnwq   0,  

V V 

ii

ii   wbdV dV qwdS nwq  

Use natural BC

and 0w  ont 

S   0

 

  

 

V V 

 y x

wbdV dV q y

wq

 x

wwhdS 

  0,   V V 

ii

wbdV dV qwwhdS 

 

Page 107: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 107/115

Heat Transfer 102

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Fourier’s

Law of Heat

Conduction y

T k 

 x

T k q  xy xx x

 and

 y

T k 

 x

T k q  yy yx y

   jiji   T k q ,  

Substitute

 

 

  

 

 

  

 

 

  

 

 

  

 

t S V V 

 yy yx xy xx   whdS wbdV dV  y

T k 

 x

T k 

 y

w

 y

T k 

 x

T k 

 x

or

 

t S V V    yy yx

 xy xxwhdS wbdV dV 

 y

T  x

k k 

k k 

 y

w

 x

  t S V V 

 jiji   whdS wbdV dV T k w ,,  

Page 108: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 108/115

Heat Transfer 103

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

15.5 Finite Element Approximation

We will now give the finite element representation of:

 

t S V V    yy yx

 xy xxwhdS wbdV dV 

 yT 

 x

k k 

k k 

 y

w

 x

w  (15-9)

As before, we approximate the solution using shape functions:

  an

  T  N T  N T    00

  (15-10)

where the first term satisfies the essential boundary conditions and the second term

represents the unknown temperatures.

Similarly for the weighting function, where the weighting functions are zero at the

essential boundary conditions:

ad  N w   (15-11)

The body force and surface heat flux are approximated using the same shape functions

(only over the regions where applicable):

ab N b     (15-12)

ah N h   (15-13)

The derivatives are then given by:

01

01

01

3

2

1

321

321

 y

 N  x

 N 

T T 

 y

 N 

 y

 N 

 y

 N 

 y

 N  x

 N 

 x

 N 

 x

 N 

 x

 N 

 y

T  x

n

n

n

 

  

 

 

 

 

 

 

 

 

  

 

 

 

 

 

 

 

 

  

 

  (15-14)

  aa   T  BT  B

 y

T  x

00

 

  

 

  (15-15)

and

  T T 

a

 Bd 

 y

w x

w

 y

w

 x

w

 

  

 

 

 

 

   (15-16)

Substituting into (15-9) and following the same procedure as in Chapter 11:

Page 109: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 109/115

Heat Transfer 104

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

  V V V S 

a  dV dShdV dV 

h

0a

TT

a

T

a

TTΚΒBNNbNNTΚΒB   (15-17) 

By recognizing that we can integrate over each element and sum the integrals, we

obtain:

   

elmelm

e

elm

e

elm

h

 N 

e   V 

 N 

e   V 

 N 

e   V 

 N 

e   S 

dV dS dV dV 

11 1 1

0a

T

a

T

a

T

a

TTΚΒBhNNbNNTΚΒB   (15-18) 

or

QKT   (15-19)

where K   is the conductivity matrix, T  is the vector of unknown temperatures, and Q  is

the load vector consisting of contributions from the body heat sources, boundary fluxes,

and essential boundary conditions.

The calculation of derivatives using the chain rule and the numerical integration follow

the same procedures as used for elasticity.

15.6 Point Sources and Surface Fluxes

When point sources are present, the mesh is usually generated in such a way that

there will be a node at each source. The load vector then is simply the value of the of the

heat source (sink) at that node

et S 

nh

h

h

dS 

2

1

a

ThNN   (15-20)

As for surface tractions, we integrate the surface fluxes over the edge of an element.

Consider a curved element edge L123 passing 3 nodes (Q8 element) as show in the

figure below:

Figure 15-2: Curved element edge

where the heat flux leaving the surface is  y y x x   nqnqh     nq .

ne  s 

3

2

1q

 L123 

Page 110: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 110/115

Heat Transfer 105

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Assuming that the element is traversed in a counter-clockwise direction (i.e. the

material is on the left side of the boundary), then the tangent direction of an arc line

element is

21   e e e ds

dy

dsdx

 s     (15-21)

and the outward normal to the boundary is213

  eeeen

ds

dx

ds

dy s   . 

The equivalent nodal fluxes corresponding to the three nodes on L123 are then

3

2

1

321

3

2

1

3

2

1

12 312 312 3 h

h

h

ds N  N  N 

 N 

 N 

 N 

t dst dS 

q

q

q

 L L

 L

aa

ThNNhNN   (15-22)

and changing the integration to be over the natural coordinates

3

2

11

1

321

3

2

1

3

2

1

h

hh

 Jd  N  N  N 

 N 

 N  N 

q

qq

    (15-23)

here N i are the 1D shape functions for the quadratic element.

1

1

1

2

13

22

2

11

   

  

   

 N 

 N 

 N 

  (15-24)

and  Jd ds    

Expanding for ds :

   

  

  

d d 

dy

dxd 

dyd 

dxdydxds

2222

22

 

  

 

 

  

 

 

  

 

 

  

   

and

22

 

 

 

 

 

 

 

 

     d 

dy

dx J    (15-25)

Using the isoparametric formulation

3

1

)(i

ii   x N  x      

Page 111: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 111/115

Page 112: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 112/115

Dynamic Analysis 107

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

16 Dynamic Structural Analysis Using FiniteElements 

16.1 When is Dynamic Analysis Necessary?

In reality, all problems are dynamic. For structural problems, a dynamic structuralanalysis is one in which we include inertia terms. That is, for a static analysis

   0f   

While for a dynamic analysis

    af    m  

We need a way to identify which analysis method is appropriate, since a static

analysis usually requires less solution time than a dynamic analysis. We can generally

state that inertia effects become important if the load is applied “rapidly,” where “rapid”

is defined relative to the natural frequency of the response deformation of interest.This can be illustrated using a 1D spring-mass system, Figure 16-1.

Figure 16-1: Simple spring-mass system

The natural frequency is given by

m

k    rad/sec (16-1)

and the period by

 

 2 pt   sec/cycle (16-2)

We will load this system with a ramp loads that ramp linearly to a constant value, varying

the loading time of the ramp with t ramp=instantaneous, 0.5*t p, and 3.0*t p. The results are

shown for both dynamic and static loading in Figure 16-2. As can be seen, for

instantaneous loading, the dynamic response is twice as large as the static response. For

a ramp that rises in a time of 0.75 of the period, the dynamic response is approximately

30% larger, and for a loading of 3.0 times the period, the difference is relatively small

(note that a ramp load that is exactly an integer value of the period is a special case and

gives a steady state response at the end of the ramp).

Page 113: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 113/115

Dynamic Analysis 108

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Figure 16-2: Transient and steady state responses to ramp loads

From the above results, we may conclude that a loading on the order of 3.0 times the

response period of interest can be assumed to be a static load.

It is still necessary to define the response period of interest. ???? shows the natural

frequencies for a cantilevered beam. For a beam, there are an infinite number of

frequencies. In fact, ??? is a simplification of the actual 3D beam response that will

include out-of-plane bending, torsional modes, and high local modes of the flanges and

web. Usually it is the lowest frequencies that are of most concern, for example in the

response of a building to earthquake excitation.

In a situation where it is not clear whether dynamic analysis is required, it is the

responsibility of the engineer to identify the response frequencies of significance. Only

after that determination can the proper decision be made with respect to whether a

loading is dynamic or static. At a minimum, the engineer should determine the lowest

frequency by finite element analysis or hand calculation and use that frequency to

compare with the loading.

16.2 Dynamic Solution Methods

In general, dynamic problems can either be solved in the time domain or in the frequency

domain. Figure 16-3 shows different approaches to dynamic analysis. Each approach

has positive and negative aspects. Time domain methods provide the solution to a

 particular problem; frequency domain methods can provide more general informationabout the system response.

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

1.6

1.8

2.0

0 1 2 3 4 5

Normalized Time (t/t period)

NormalizedDisplacement(u/(p/k))

Transient (tr=0.0 tp)

Transient (tr=0.75 tp)

Transient (tr=3.0 tp)

Stready State (tr=0.0 tp)

Stready State (tr=0.75 tp)

Stready State (tr=3.0 tp)

Page 114: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 114/115

Dynamic Analysis 109

Daniel Swenson, X.J. Xin, Liang-Wu Cai, 1996-2005

Figure 16-3: Dynamic solution methods

16.3 Example System

We now use the simple system in Figure 16-4 to illustrate the basic concepts of dynamic

analysis.

Dynamic SolutionMethods

DirectIntegration

Modal Analysis

FrequencyResponse

Explicit Implicit ModalSuperposition

Time Domain Frequency Domain

Ideal for very

rapid extremeloading.

Stability limit

forces small

time step.Avoids

solution ofsimultaneousset of

equations.

Stable for large

deformation

and plasticity.

Used for

longer loadings(earthquakes).

 No limit on

time step

except asrequired for

accuracy.Requiresassembly and

solution of

simultaneous

equations.

Obtaining mode

shapes is anexpensive

operation.

Usually focuses

on the lowerfrequencies.

Once modes,modalsuperposition a

fast solution

method.

Used for

dynamicresponse to a

steady state

harmonic

loading.

Page 115: fe textbook 2013-01-22

8/12/2019 fe textbook 2013-01-22

http://slidepdf.com/reader/full/fe-textbook-2013-01-22 115/115

Dynamic Analysis 110

Figure 16-4: Dynamic spring-damper-mass system

As in Chapter 1, we write the dynamic equations of equilibrium for each node:

  111

  um f      

and

    222

  um f      

giving

 

 P u

u

k k k 

k k k 

u

u

ccc

ccc

u

u

m

m   0

0

0

2

1

322

221

2

1

322

221

2

1

2

1

 

(16-3)

or

     f  u M u M u M        (16-4)