ct5123_lecturenotesthe finite element method an introduction

125
The Finite Element Method: An Introduction Dr. Garth N. Wells [email protected] University of Cambridge and Delft University of Technology

Upload: xristoforos-kolomvos

Post on 14-Oct-2014

395 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: CT5123_LectureNotesThe Finite Element Method an Introduction

The Finite Element Method: An Introduction

Dr. Garth N. Wells

[email protected]

University of Cambridge

and

Delft University of Technology

Page 2: CT5123_LectureNotesThe Finite Element Method an Introduction
Page 3: CT5123_LectureNotesThe Finite Element Method an Introduction

c© G. N. Wells [email protected]

Page 4: CT5123_LectureNotesThe Finite Element Method an Introduction
Page 5: CT5123_LectureNotesThe Finite Element Method an Introduction

Contents

1 Introduction 7

1.1 Tensor basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.2 Vector calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131.3 Linear algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151.4 Essentials from continuum mechanics . . . . . . . . . . . . . . . . . . . 161.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

2 Strong and weak forms of the governing equations 21

2.1 One-dimensional bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.2 Continuum elasticity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.3 Poisson equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.4 Minimisation of potential energy . . . . . . . . . . . . . . . . . . . . . . 262.5 Regularity requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.6 Definition of trial and weight function spaces . . . . . . . . . . . . . . . 282.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3 The Galerkin method 31

3.1 Approximate solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.2 Basic error analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.3 Convergence of the Galerkin method . . . . . . . . . . . . . . . . . . . . 333.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

4 Formulation of the finite element method 35

4.1 Finite element method with piecewise linear basis functions . . . . . . 354.2 General finite element basis functions . . . . . . . . . . . . . . . . . . . 374.3 Governing equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494.4 Isoparametric mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504.5 Numerical integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544.6 Imposition of Dirichlet boundary conditions . . . . . . . . . . . . . . . 574.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

5 Implementation of the finite element method 63

5.1 Preprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635.2 Program flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645.3 Local-global . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655.4 Stiffness matrix storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705.5 Post-processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

6 Structural elements for finite element analysis 73

5

Page 6: CT5123_LectureNotesThe Finite Element Method an Introduction

Contents

6.1 Rod elements in space . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736.2 Beams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766.3 Plate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916.4 Shell elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

7 Analysis of the finite element method 105

7.1 A priori error estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . 1057.2 A posteriori error estimation . . . . . . . . . . . . . . . . . . . . . . . . . 1077.3 Adaptivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1087.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

8 Solvers for large linear systems 111

8.1 LU-decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1118.2 Iterative solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

9 Time-dependent problems 113

9.1 Elastodynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1139.2 Heat equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1169.3 Frequency analysis for elastodynamics . . . . . . . . . . . . . . . . . . . 1179.4 Modal analysis for elastodynamics . . . . . . . . . . . . . . . . . . . . . 1189.5 Time stepping algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . 1199.6 Space-time formulations . . . . . . . . . . . . . . . . . . . . . . . . . . . 1249.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

References 125

6 Version 0.2 January 21, 2011

Page 7: CT5123_LectureNotesThe Finite Element Method an Introduction

1 Introduction

This course provides an introduction to the finite element method for linear prob-lems. The underlying mathematics of the method are introduced and details of itscomputer implementation are discussed. Students will develop an understanding ofthe fundamentals underlying the finite element method and commercial finite ele-ment software. This course also provides a foundation to the more advanced courses,such as ‘Finite element methods for nonlinear analysis’ (CT5142).

This chapter establishes the notation used in these notes and reviews the basic toolsneeded to develop and understand the finite element method. The material shouldserve as a review, and possibly an extension of familiar concepts. It also provides areference point for later developments in the text.

What is the finite element method?

The finite element method (FEM) is a numerical method for solving partial differ-ential equations. It is particularly suited for solving partial differential equations oncomplex geometries, as are commonly encountered in solid and structural mechanics.The procedure can be largely automatised, making it well suited to efficient computerimplementation. The application of the finite element method leads to systems (oftenvery large) of linear equations (matrices) which can be solved using a computer.

The finite elementmethod differs from the commonly used finite differencemethodas it is based on a variational formulation. When applied for solving problems in solidand structural mechanics, it is closely related to the concepts of energy and virtualwork.

1.1 Tensor basics

Throughout these notes, a Cartesian, orthonormal basis is assumed. This simplifiesvector and tensor operations considerably as the basis vectors can be ignored andoperations expressed in terms of indices only. Orthonormal basis vectors are shownin Figure 1.1. Scalars are denoted by italic type face,

a, b, s. (1.1)

Vectors involve components and a basis, which for simplicity is assumed to be or-thonormal, and are generally denoted by lowercase bold characters,

a, b, f , u, x. (1.2)

7

Page 8: CT5123_LectureNotesThe Finite Element Method an Introduction

1 Introduction

a

x1

x2

x3

e1 = [1 0 0]

e2 = [0 1 0]

e3 = [0 0 1]

Figure 1.1: Example of orthonormal base vectors.

A vector a in an n-dimensional space Rn can be expressed in terms of its components,

ai where i runs from one to n. In the case n = 2,

a =

[a1a2

]

. (1.3)

Consider the dot product between two vectors a and b, which is denoted a · b, andis defined through the operation which gives the length ‖x‖ of a vector x,

‖x‖ =√x · x. (1.4)

The dot product of two vectors is given by:

a · b = aibi, (1.5)

where repeated indices imply summation:

a · b =n

∑i=1

aibi. (1.6)

For n = 3,

a · b =3

∑i=1

aibi = a1b1 + a2b2 + a3b3. (1.7)

8 Version 0.2 January 21, 2011

Page 9: CT5123_LectureNotesThe Finite Element Method an Introduction

1.1 Tensor basics

For an orthonormal basis, ei · ej = δij, allowing the base vectors to be discarded andthe more familiar notation

a · b = aibjδij = aibi, (1.8)

can be used. At times, the dot product maybe written as aTb, in the vein of matrixmultiplication. The symbol δij is known as the Kronecker delta:

δij =

1 if i = j,

0 if i 6= j.(1.9)

Second-order tensors (which possess some similar properties to matrices) are gen-erally denoted by uppercase bold characters,

A,K,M,R (1.10)

As with vectors, a second-order tensor A can be expressed in terms of components,Aij,

A = Aij. (1.11)

The second-order tensor A in R3 can be expressed as

A = Aij =

A11 A12 A13

A21 A22 A23

A31 A32 A33

. (1.12)

Second-order tensors are linear operators that act upon vectors. A second-ordertensor A takes the vector b and transforms it into the vector a,

a = Ab = Aijbj =n

∑j=1

Aijbj (1.13)

where n is the dimension of the vector b. Consider the case

a = ABc = Dc. (1.14)

Second-order tensors can be multiplied, which is expressed as

D = AB, (1.15)

and in index notation as

Dij = AikBkj. (1.16)

The transpose of a tensor is denoted by the superscript ‘T’. It is defined by:

a · Bc = Bc · a = c · BTa. (1.17)

January 21, 2011 Version 0.2 9

Page 10: CT5123_LectureNotesThe Finite Element Method an Introduction

1 Introduction

In terms of indices:

AijT = Aji. (1.18)

The transpose of a second-order tensor implies interchanging the rows and columnsof its components. A useful identity involving the transpose is:

(AB)T = BTAT . (1.19)

Second-order tensors can be formed through the dyadic production of two vectors,

A = a⊗ b,= aibj, (1.20)

which is equivalent to

Aij = aibj. (1.21)

The trace of a second-order tensor is essentially the summation of its diagonal com-ponents. For example,

tr (a⊗ b) = aibi (1.22)

and

tr (A) = Aii. (1.23)

For a second-order tensor A in R3, this implies:

tr (A) = A11 + A22 + A33. (1.24)

Using the trace, an operation similar to the dot product of two vectors, an inner prod-uct, is provided for two second-order tensors. It also yields a scalar. It is definedby:

A : B = tr(

ATB)

. (1.25)

This is equivalent to

A : B = AijBij. (1.26)

The repeated i and j indices implies:

AijBij =n

∑i=1

n

∑j=1

AijBij. (1.27)

This operation has no equivalent in matrix-vector convention. For two second-ordertensors in R

2,

A : B = A11B11 + A12B12 + A21B21 + A22B22. (1.28)

10 Version 0.2 January 21, 2011

Page 11: CT5123_LectureNotesThe Finite Element Method an Introduction

1.1 Tensor basics

The identity tensor I is defined by:

a = Ia, (1.29)

and is equal to

I = δijei ⊗ ej. (1.30)

A second-order tensor A, multiplied by its inverse A−1, is equal to the identity tensor,

AA−1 = A−1A = I. (1.31)

Second-order tensors are often characterised by their special properties. A matrixA is symmetric if:

AT = A. (1.32)

Using index notation, a tensor Aij is symmetric if:

Aij = Aji. (1.33)

A tensor A is orthogonal if:

AT = A−1. (1.34)

As will be shown in the following section, matrices which rotate the reference frameare orthogonal.Another important operation is the cross, or vector, product. It is defined for a, b ∈

R3 by:

[a× b] =

a2b3 − a3b2a3b1 − a1b3a1b2 − a2b1

. (1.35)

Such a definition however is not convenient for manipulation. A third-order tensorcan be definedwhichwill makemanipulationsmore convenient. A third-order tensormaps a second-order tensor to a first order tensor. A common third-order tensor isthe alternating (or permutation) tensor E . The components of E are given by:

[E ] = Eijk = ei ·(ej × ek

). (1.36)

The expression for E in terms of the basis ei is lengthy and not shown here. The resultof the above equation is rather simple. If any of the indices are repeated, Eijk = 0.If the permutation i, j, k is even, Eijk = 1, and if the permutation i, j, k is odd,Eijk = −1. The cross product of two vectors yields a vector. The cross product can beintroduced via the third-order tensor E ,

E : (a⊗ b) = a× b. (1.37)

January 21, 2011 Version 0.2 11

Page 12: CT5123_LectureNotesThe Finite Element Method an Introduction

1 Introduction

x1

x2

e1 = [1 0]

e2 = [0 1]

e′1 = [cos θ sin θ]

e′2 = [− sin θ cos θ]

θ

Figure 1.2: Rotation between coordinate systems.

This operation is particularly importantwhen consideringmoments. For an orthonor-mal basis, in terms of indices,

A : B = AijkBjk. (1.38)

In elasticity, the stress and strain are second-order tensors. They are related to eachother via a fourth-order tensor, denoted here as C.

C = Cijkl. (1.39)

Fortunately, due to physical symmetries, it will not be necessary tomanipulate fourth-order tensors directly.

Coordinate transformations

For many problems, it is convenient to rotate the coordinate frame. Vector and tensorcomponents can be rotated (change of basis) using a rotation matrix Q, which is or-thogonal. Consider the orthonormal coordinate systems in Figure 1.2. It may proveconvenient to transform vector components relative to the ei system to componentsin the e′i system. Consider that for a vector a, the components in ei system are known,and it would be convenient to have the components in the e′i system.Defining Qij by

Qij = ei · e′j, (1.40)

the components a′i are given by

a′i = Qjiaj, (1.41)

12 Version 0.2 January 21, 2011

Page 13: CT5123_LectureNotesThe Finite Element Method an Introduction

1.2 Vector calculus

which can also be expressed as:

a′ = QTa. (1.42)

Considering the coordinate systems illustrated in Figure 1.2,

Q =

[e1 · e′1 e1 · e′2e2 · e′1 e2 · e′2

]

=

[cos θ − sin θsin θ cos θ

]

, (1.43)

and note that Q is orthogonal,

QQT = QTQ = I. (1.44)

Therefore, components in the rotated reference frame can be transformed back to theoriginal reference frame by:

a = Qa′. (1.45)

At times it is necessary to also rotate the components of a second-order tensor fromone coordinate system to another. This is done by the operation:

A′ = QTAQ, (1.46)

and

A = QA′QT. (1.47)

Often coordinate transforms are used to simplify a problem. An example is a one-dimensional rod element in a three-dimensional space. It is convenient to rotate thereference such such the position along the bar is given by [x]′ =

(x′1, 0, 0

), which

effectively reduces the three-dimensional problem to a one-dimensional problem.

1.2 Vector calculus

Subscripts are commonly used as a short-hand notation for derivatives. Charactersafter a comma in the subscript denote differentiation with respect to that variable.Consider a function u which is dependent on the position x. Some of its derivativescan be written as:

∂u

∂x= u,x,

∂2u

∂x2= u,xx,

∂4u

∂x4= u,xxxx,

∂2u

∂x∂y= u,xy,

∂3u

∂x∂y2= u,xyy. (1.48)

This notation is used commonly throughout these notes.An important operator is the divergence. The divergence of a vector field a yields

a scalar. It is expressed as:

∇ · a. (1.49)

January 21, 2011 Version 0.2 13

Page 14: CT5123_LectureNotesThe Finite Element Method an Introduction

1 Introduction

In terms of indices, ∇ · a is equal to

∇ · a =∂ai∂xi

= ai,i. (1.50)

In a three-dimensional space R3,

∇ · a =∂a1∂x1

+∂a2∂x2

+∂a3∂x3

=∂ax∂x

+∂ay

∂y+

∂az∂z

. (1.51)

The divergence of a second-order tensor is given by:

∇ · A =∂Aij

∂xj= Aij,j. (1.52)

For a two-dimensional tensor A,

∇ · A =

∂A11∂x1

+ ∂A12∂x2

∂A21∂x1

+ ∂A22∂x2

. (1.53)

Another important operator is the gradient. The gradient of a scalar a is given by:

∇a =∂a

∂xi= a,i, (1.54)

which yields a vector. In a three-dimensional space, the components of ∇a are givenby:

∇a =

∂a

∂x

∂a

∂y

∂a

∂z

. (1.55)

The gradient of a vector is given by:

∇a =∂ai∂xj

= ai,j, (1.56)

which yields a second-order tensor. In a three-dimensional space, the components of∇a are given by:

∇a =

∂a1∂x

∂a1∂y

∂a1∂z

∂a2∂x

∂a2∂y

∂a2∂z

∂a3∂x

∂a3∂y

∂a3∂z

. (1.57)

14 Version 0.2 January 21, 2011

Page 15: CT5123_LectureNotesThe Finite Element Method an Introduction

1.3 Linear algebra

n

Ω

Γ

Figure 1.3: Continuous body Ω ⊂ Rn bounded by Γ.

An essential theorem in formulating the finite element method is the divergencetheorem (also known as Gauss’s theorem). It transforms a volume integral to a surfaceintegral. Consider the body Ω in Figure 1.3. The boundary of the body Ω is denotedΓ = ∂Ω. The outward unit normal to the body is denoted n. The divergence theoremstates:

Ω∇ · A dΩ =

∂ΩAn dΓ, (1.58)

where n is the outward normal to the body Ω. The surface of Ω is given by ∂Ω. Fora vector a,

Ω∇ · a dΩ =

∂Ωa · n dΓ. (1.59)

Integration by parts is used frequently in the formulation of the finite elementmethod. It implies that:

Ωa · (∇ · B) dΩ = −

Ω∇a : B dΩ +

∂Ωa · Bn dΓ. (1.60)

The above equation also holds for the case in which a is replaced by a scalar and B isreplaced by a vector. The above formula is simple to derive by using the product rulefor differentiation to expand

Ω∇ · (aB) dΩ =

Ω

∂xj

(aiBij

)dΩ, (1.61)

and then applying the divergence theorem.

1.3 Linear algebra

The eigenvalues and eigenvectors of a matrix provide information as to its properties.For example, the eigenvalues of the stress tensor are the principal stresses, and the

January 21, 2011 Version 0.2 15

Page 16: CT5123_LectureNotesThe Finite Element Method an Introduction

1 Introduction

corresponding eigenvectors are the principal stress directions. Also, the eigenvaluesof a matrix indicates if a matrix has a unique inverse. For a matrix A, vectors b andscalars λ which satisfy

(A− λI) b = 0 (1.62)

are known as eigenvectors and eigenvalues, respectively, of A. For a symmetric matrix,all eigenvalues are real. For a positive definite matrix A, all eigenvalues are positiveand real, which guarantees that the inverse of A exists, and is unique. Equation (1.62)implies that:

det (A− λI) = 0. (1.63)

For a 2× 2 matrix, finding λ requires finding the roots of a quadratic equation. For a3× 3 matrix, the roots of a cubic equation must be found. The polynomial is knownas the characteristic equation of A. For large matrices, special numerical algorithms areused to calculate the eigenvalues. A zero eigenvalue implies that the matrix A has alinearly dependent column. Eigenvalue tests are often used in studying the matricesarising in the finite element method.A system of n linear equations can be expressed as:

Ku = f , (1.64)

where K is an n× n matrix, and u and f are vectors of length n. In the context of thefinite element method, K will often be referred to as the ‘stiffness matrix’ and f the‘right-hand side vector’. The solution u is given by:

u = K−1 f . (1.65)

Typically, the system of equations in a finite element equation will be very large. It isnot practical to compute the inverse of the matrix K as it is computationally expen-sive (both in terms of the number of operations required and the memory required).The system of equations is usually solved using a direct method (such as Gauss elim-ination or LU decomposition) or an approximate iterative method. Solvers for finiteelement problems are discussed in Chapter 8.

1.4 Essentials from continuum mechanics

The finite element method is used in these notes to solve primarily problems in con-tinuum mechanics. This requires some background in continuum mechanics andlinear-elasticity. This section is intended to cover only the important concepts whichare used later in these notes. It is not a comprehensive coverage of the topic.The strain ǫ is defined as the symmetric gradient of the displacement vector:

ǫij =1

2

(ui,j + uj,i

), (1.66)

16 Version 0.2 January 21, 2011

Page 17: CT5123_LectureNotesThe Finite Element Method an Introduction

1.4 Essentials from continuum mechanics

which is clearly a second-order tensor. In compact notation, the above expression canbe written as:

ǫ = ∇su =1

2

(

∇u + (∇u)T)

. (1.67)

For convenience, the symmetric gradient using index notation will be expressed as:

u(i,j) =1

2

(ui,j + uj,i

), (1.68)

where the bracket around the subscript denotes the symmetric gradient. Obviously,the strain tensor is symmetric. The stress tensor is defined through the traction vectort (force per unit area) on a surface,

σn = t (1.69)

where n is the unit normal vector to the surface. Similar to the strain tensor, thestress tensor is symmetric (which can be proved by considering the balance of angularmomentum, as will be shown in the next chapter).A constitutive equation relates the stresses in a material to the strain. For solid,

linear-elastic continua, this can be written as:

σ = CCC : ǫ, (1.70)

or in index notation,

σij = Cijklǫkl (1.71)

where CCC is a fourth-order tensor. For linear elasticity, it is defined by:

Cijkl = µ(

δikδjl + δilδjk

)

+ λδijδkl (1.72)

where

λ =νE

(1+ ν) (1− 2ν)(1.73)

and

µ =E

2 (1+ ν)(1.74)

with E the Young’s modulus and ν Poisson’s ratio. The constants λ and µ are oftenreferred to as Lame constants. In a homogeneous body, Lame constants are indepen-dent of the position.Due to symmetry, in three-dimensions the stress and strain tensors have only six

independent components. In two-dimensions, this reduces to four. For convenience,

January 21, 2011 Version 0.2 17

Page 18: CT5123_LectureNotesThe Finite Element Method an Introduction

1 Introduction

‘engineering’ notation is often adopted, in which the stress and strain are representedas vectors,

ǫ =

ǫ11ǫ22ǫ332ǫ122ǫ132ǫ23

=

ǫ11ǫ22ǫ33γ12

γ13

γ23

=

u,xv,yu,z

u,y + v,xu,z + w,x

v,z + w,y

. (1.75)

The stress tensor is expressed in a vector form, although without the factor ‘2’ on theshear terms.

σ =

σ11σ22σ33σ12σ13σ23

(1.76)

Using the vector format for stress and strain, the constitutive relationship can be writ-ten as:

σ = Dǫ (1.77)

where the matrix D is the constitutive matrix, containing components of the fourth-order tensor CCC. For isotropic linear-elasticity, D has the following form:

D =

λ + 2µ λ λ 0 0 0λ λ + 2µ λ 0 0 0λ λ λ + 2µ 0 0 00 0 0 µ 0 00 0 0 0 µ 00 0 0 0 0 µ

(1.78)

When reducing a three-dimensional problem to two-dimensions, there are threepossibilities. The first is known as plane strain. This assumes that the normal strainin the out-of-plane direction is zero (ǫ33 = 0). It is then likely that the stress in theout-of-plane direction is not equal to zero. This is reasonable for problems which arerelatively thick in the third direction, such as a dam wall. The second possibility isplane stress (σ33 = 0). In this case, the normal stress out-of-plane is assumed to bezero. This approximation is good for very thin members, such as many beams. Thethird possibility is axisymmetric. In this case, the strain in the out-of-plane direction isdependent on the distance from an axis of rotation. An axisymmetric formulation isfor example commonly used when simulating a circular foundation.In these notes, particular attention will be paid to solving elastic continuum prob-

lems. This will require identification of the equations which govern equilibrium of

18 Version 0.2 January 21, 2011

Page 19: CT5123_LectureNotesThe Finite Element Method an Introduction

1.5 Exercises

elastic bodies. In order to derive the governing partial differential equation, considerfirst translational equilibrium (balance of linear momentum) of a body Ω ⊂ R

n withboundary Γ = ∂Ω, which requires that

∂Ωt dΓ +

Ωb dΩ =

∂Ωσn dΓ +

Ωb dΩ = 0 (1.79)

where b is a body force. Application of the divergence theorem to the integral over∂Ω gives:

Ω∇ · σ + b dΩ = 0 (1.80)

Balance of linear momentum should also be satisfied for any subdomain of Ω. There-fore, the integral can be removed from equation(1.80), leading to:

∇ · σ + b = 0 in Ω (1.81)

Consider now moment equilibrium (balance of angular momentum). Moment equi-librium of the body Ω requires that:

∂Ωr × t dΓ +

Ωr × b dΩ =

∂Ωr × σn dΓ +

Ωr × b dΩ = 0 (1.82)

where r is the position vector of a point on ∂Ω. Considering that t = σn, and apply-ing the divergence theorem,

Ωr × (∇ · σ + b) dΩ +

ΩE : σT dΩ = 0 (1.83)

If translational equilibrium (equation (1.80)) is satisfied, the first term in equation(1.83) is zero. Then, moment equilibrium is satisfied if the stress tensor is symmetric,since E : σT = 0, if σ is symmetric. Therefore, the partial differential equation ofequilibrium is given by equation (1.80). This will also be referred to as the ‘strong’governing equation. Note that this equation is general, and not specific to elasticity.

1.5 Exercises

1. For three-dimensions (i = 1 → 3, etc.), expand the terms:

a) aibib) aibjc) AijBij

d) Cijbie) Cijbjf) FikGkj

2. How many independent components does a symmetric second-order tensor inR

n have?

January 21, 2011 Version 0.2 19

Page 20: CT5123_LectureNotesThe Finite Element Method an Introduction

1 Introduction

3. What is the trace of the identity tensor I equal to in Rn?

4. Confirm that the rotation matrix R in equation (1.43) is orthogonal.

5. Using the product rule for differentiation and the divergence theorem, derivethe integration by parts formula in equation (1.60).

6. A common and important operator in applied mathematics (and mechanics)is the Laplace operator ∆ (sometimes denoted ∇2). It is equivalent to ∇ · ∇.Expand ∆u in a three-dimensional space using index notation.

7. Derive the isotropic linear-elastic constitutive matrix D for plane stress andplane strain conditions

20 Version 0.2 January 21, 2011

Page 21: CT5123_LectureNotesThe Finite Element Method an Introduction

2 Strong and weak forms of the governing equations

An essential step in developing the finite element method is the identification of thegoverning equation and casting it in its ‘weak form’. To do this, the strong form ismultiplied by a weight function and integrated by parts. This has the effect of reduc-ing the order of the derivatives appearing in the equation, and leads to a form whichis convenient for later numerical solution. The weak form is also commonly knownas a the ‘variational form’ or a ‘variational equation’. The finite element method is avariational method, addressing the weak (variational) form of the relevant governingequation.

2.1 One-dimensional bar

Consider the one-dimensional bar in Figure 2.1. The governing equation for a one-dimensional rod element with unit cross-sectional area is (see equation (1.81)):

−σ,x = f , (2.1)

where σ,x is the normal stress in the rod and f is a distributed load along the rod.This is complemented by a constitutive relationship which gives the stress in the rodin terms of the strain. For a linear-elastic rod, the normal stress is given by:

σ = Eǫ = Edu

dx, (2.2)

where E is the Young’s modulus. The governing equation can then be expressed as:

−Eu,xx = f . (2.3)

To complete the problem, boundary conditions must be specified. A Dirichlet (essen-tial) boundary condition prescribes the displacement at a point. For example,

u = 0 at x = 0 (2.4)

x = 0

L

fh

x

Figure 2.1: One-dimensional bar.

21

Page 22: CT5123_LectureNotesThe Finite Element Method an Introduction

2 Strong and weak forms of the governing equations

prescribes the displacement at one end of the bar in Figure 2.1 to be equal to zero. ANeumann (natural) boundary condition prescribes the applied traction,

σn = h at x = L, (2.5)

where n is the outward normal to the bar (equal to 1 in this case). The above boundarycondition sets the applied traction at x = L equal to h. Considering that σ = Eu,x , ap-plying a force at the end of the bar is equivalent to prescribing u,x. The mathematicalproblem can now be summarised as: find u such that:

− Eu,xx = f 0 < x < L, (2.6)

u = 0 at x = 0, (2.7)

Eu,xn = h at x = L. (2.8)

To develop the weak form of the governing equation, both sides of equation (2.6)are multiplied by a scalar weight function w ∈ V (w ∈ V means that w comes from theappropriately defined space of functions V , which has an infinite number of mem-bers). An important requirement on the space V is that functions w be zero whereDirichlet boundary conditions are applied. Since both sides of the equation are mul-tiplied by the weight function, the equation must still hold for all admissible weightfunction (this is a technical point which is discussed in section 2.6). Multiplying equa-tion (2.1) by w,

−wσ,x = w f ∀w ∈ V , (2.9)

where ‘∀w ∈ V ’ means ‘for all w ∈ V ’. If equation (2.9) must hold point-wise, then

−∫ L

0wσ,x dx =

∫ L

0w f dx ∀w ∈ V , (2.10)

is also true. Taking guidance from equation (1.60), equation (2.10) can be integratedby parts and the Neumann boundary condition from equation (2.8) inserted, whichyields:

−∫ L

0wσ,x dx =

∫ L

0w,xσ dx− wh|x=L ∀w ∈ V . (2.11)

Note the term wEu,xn|x=0 is not included as by definition the weight function w isequal to zero at x = 0. Inserting now the constitutive relationship σ = Eu,x, solvingthe weak form involves: find u ∈ S such that

∫ L

0w,xEu,x dx =

∫ L

0w f dx + wh|x=L ∀w ∈ V , (2.12)

where S is an appropriately defined space of functions which satisfies the Dirichletboundary conditions. This is the weak form of the governing equation. Note that inthe strong form, after inserting the constitutive relationship (2.3), derivatives of order

22 Version 0.2 January 21, 2011

Page 23: CT5123_LectureNotesThe Finite Element Method an Introduction

2.2 Continuum elasticity

two with respect to x appear. In the weak form (2.12), only first derivatives withrespect to x appear.Since the weak form is derived from the strong form, it follows that a solution of

the strong form is also a solution of the weak form. What remains to be shown is thatthe weak form is equivalent to the strong form (that a solution of the weak form isalso a solution of the strong form, at least in a generalised sense). Assuming that E isconstant and integrating by parts the first term in (2.12) yields

−∫ L

0wEu,xx dx + wEu,xn|x=L =

∫ L

0w f dx + wh|x=L. (2.13)

Note again that no terms at x = 0 appear, as by construction, w(0) = 0. FollowingHughes (1987), consider a weight function w ∈ V which is equal to φ (Eu,xx + f ),where φ is greater than zero over the interval ]0, L[ and zero outside (specifically atx = 0 and x = L). Inserting the weight function into equation (2.13),

−∫ L

0φ (Eu,xx + f ) Eu,xx dx =

∫ L

0φ (Eu,xx + f ) f dx, (2.14)

which can be rearranged to give

∫ L

0φ (Eu,xx + f )2 dx = 0. (2.15)

Since φ > 0 and (Eu,xx + f )2 ≥ 0, the above equation can only hold if −Eu,xx = f ,satisfying the strong governing equation (in a distributional sense). What remainsnow is to ensure that the Neumann boundary condition is satisfied (Dirichlet bound-ary conditions are satisfied by construction). Returning to equation (2.13), it is nowproven that the first term is equal to zero. Hence, for any allowable weight functionat x = L,

Eu,xn = h, (2.16)

proving that the Neumann boundary conditions are satisfied. For a more elaboratemathematical treatment, see Brenner and Scott (1994).

2.2 Continuum elasticity

A more complicated example is continuum elasticity. The basic form of the equa-tions is the same as the one-dimensional bar in the previous section. The complica-tion arises from the three-dimensional setting. Consider now the continuous bodyin Figure 2.2. The strong governing equation for this problem was developed in theprevious chapter. Recall that the governing equation is given by:

∇ · σ + b = 0 in Ω. (2.17)

January 21, 2011 Version 0.2 23

Page 24: CT5123_LectureNotesThe Finite Element Method an Introduction

2 Strong and weak forms of the governing equations

n

Ω

Γg

Γh

h

Figure 2.2: Continuous body Ω ⊂ Rn with boundary Γ (Γ = Γg ∪ Γh, Γg ∩ Γh = ∅).

As in the one-dimensional case, a constitutive relationship is required. For a linear-elastic material,

σ = C : ǫ, (2.18)

where C is a fourth-order tensor. Boundary conditions are still required to completethe problem. On part of the boundary, the displacements are prescribed (Dirichletboundary conditions). In Figure 2.2, the part of the boundary where displacementsare prescribed is denoted Γg,

u = g on Γg. (2.19)

On the remaining boundary, Γh, tractions (potentially zero) are applied (traction ≡force per unit area on a surface),

t = h on Γh. (2.20)

The boundary-value problem is now complete.To derive the weak form, the same steps as in the case of the one-dimensional bar

are followed. First, the governing equation is multiplied by a weight functionw ∈ V ,and integrated over the body. Note that in this case, the weight functionw is a vector.Multiplying equation (2.17) by w ∈ V , where again V is an appropriately definedfunction space (w = 0 on Γg), and integrating over the body Ω yields:

Ωw · (∇ · σ) dΩ +

Ωw · b dΩ = 0 ∀w ∈ V . (2.21)

The first term in equation (2.21) can be integrated by parts (see equation (1.60)), yield-ing:

−∫

Ω∇w : σ dΩ +

Ωw · b dΩ +

Γh

w · h dΓ = 0, (2.22)

24 Version 0.2 January 21, 2011

Page 25: CT5123_LectureNotesThe Finite Element Method an Introduction

2.3 Poisson equation

where σn has been replaced by the prescribed traction h (the Neumann boundarycondition). Inserting now the constitutive relationship from equation (2.18), a solu-tion to the weak form involves: find u ∈ S such that

−∫

Ω∇w : CCC : ǫ dΩ +

Ωw · b dΩ +

Γh

w · h dΓ = 0 ∀w ∈ V , (2.23)

where S is an appropriate space of functions which satisfy the Dirichlet boundaryconditions. This is the weak equilibrium equation for a stationary continuous elas-tic body. Consistency can be proven in the same fashion as was used for the one-dimensional problem.Often the term ∇w is written as ∇sw, the symmetric gradient of w. It is simple to

show that ∇w : σ = ∇sw : σ if σ is symmetric (see exercise 1). Consider now w as a‘virtual displacement’ δu. Therefore∇sw ≡ δǫ. Inserting this into equation (2.23),

Ωδǫ : CCC : ǫ dΩ =

Ωδu · b dΩ +

Γh

δu · h dΓ, (2.24)

which is the equation of virtual work. The equation of virtual work is therefore theweak form of the governing equation. There exists a close link between weak formsand virtual work for a range of problems. However, the variational framework ismore general.

2.3 Poisson equation

An equation which is often solved using the finite element method is the Poissonequation. A wide range of physical phenomena are governed by this equation, in-cluding steady-state heat conduction and flow in permeable media (Darcy’s law).The previous example of continuum elasticity was an example of a system of Poissonequations – one for each spatial direction. Here the Poisson equation is addressed ina more generic fashion.Consider the following equation:

−∇ · q + f = 0 in Ω (2.25)

where q is a flux vector and f is a source term. In the case of heat conductivity, q isthe heat flux vector. In Darcy’s law, q is the flow rate. The constitutive relationship isgiven by:

q = −κ∇u (qi = −κiju,j) (2.26)

where u is a potential. Inserting the constitutive equation into (2.25) yields a Poissonequation. The constitutive relationship depends on the problem being solved. Forlinear heat conduction, the scalar u is the temperature. For an isotropic medium,κ = κI, where κ is the thermal conductivity. For Darcy’s law, u is the hydraulic headand κ is known as the hydraulic conductivity.

January 21, 2011 Version 0.2 25

Page 26: CT5123_LectureNotesThe Finite Element Method an Introduction

2 Strong and weak forms of the governing equations

As for all previous examples, the boundary-value problem requires boundary con-ditions. The Dirichlet conditions impose:

u = g on Γg (2.27)

which prescribes the potential on the boundary. For heat conduction, this is the tem-perature on the boundary Γg. For Darcy flow, it is the hydraulic head. The Neumannboundary condition requires that:

−q · n = h on Γh (2.28)

where n is the outward normal to the surface Γh (see Figure 2.2). In the case ofheat conduction, this imposes the heat flux on Γh, and for Darcy flow is it the in-flow/outflow across a boundary.The weak form of the Poisson equation is derived following the same steps as in

the previous two examples. Multiplying equation (2.25) by a weight function w andintegrating over the body Ω,

−∫

Ωw (∇ · q) dΩ +

Ωw f dΩ = 0 ∀w ∈ V . (2.29)

Integrating the LHS of the above equation by parts yields:∫

Ω∇w · q dΩ −

Γh

wq · n dΓ +∫

Ωw f dΩ = 0 ∀w ∈ V . (2.30)

Inserting now the constitutive relationship and the boundary condition −q · n = hleads to the problem: find u ∈ S such that:

−∫

Ω∇w · κ∇u dΩ +

Γh

wh dΓ +∫

Ωw f dΩ = 0 ∀w ∈ V , (2.31)

which is the weak form of the Poisson equation.

2.4 Minimisation of potential energy

For particular equations, such as equilibrium of an elastic body, there exists a closelink between minimisation of energy and solution of the weak form. For an elasticbody Ω, suppose that u is the solution to the weak problem, and consider the poten-tial energy functional I,

I (u) =1

2

Ω∇su : C : ∇su dΩ −

Ωu · b dΩ −

∂Ωu · h dΩ. (2.32)

The potential energy for another displacement field, w = u + v, is given by

I (u) ≤ I (u + v) =1

2

Ω∇s (u + v) : C : ∇s (u + v) dΩ

−∫

Ω(u + v) · b dΩ −

∂Ω(u + v) · h dΩ, (2.33)

26 Version 0.2 January 21, 2011

Page 27: CT5123_LectureNotesThe Finite Element Method an Introduction

2.5 Regularity requirements

f f,x

xx

Figure 2.3: Example of a C0 function f .

which is equal to

I (u) ≤I (u + v)

=I (u) +

(∫

Ω∇sv : C : ∇su dΩ −

Ωv · b dΩ −

∂Ωv · h dΩ

)

+1

2

Ω∇sv : C : ∇sv dΩ,

(2.34)

in which the terms inside the brackets sum to zero for any v since u is a solution tothe weak form (see equation 2.23), and the last term

Ω ∇sv : C : ∇sv dΩ ≥ 0, whichproves that solution of the weak form corresponds to minimisation of the potentialenergy.

2.5 Regularity requirements

A common topic in finite element analysis is continuity. Functions are often classi-fied as being Cn continuous. Continuity refers to whether or not the derivatives ofa function are continuous. If a function is Cn, this means that its nth derivative iscontinuous. In finite element analysis, functions which are C0 are most commonlyused. This means that the functions are continuous, but their first derivatives are not.A C0 function is shown in Figure 2.3. The function shown in Figure 2.3 is a contin-uous, piecewise linear function. As will be seen in the following chapters, this is acommonly used function in finite element analysis. From Figure 2.3, it is clear that itis simple to take the first derivative of the function f . However, in a classical sense,its second derivative does not exist.Consider now if the function f is a possible solution u of the strong equation for a

bar (equation (2.3)). It is not a possible solution, since for equation (2.3) to make sense,the second derivative of f with respect to x ( f,xx) must exist. Examining now theweakform for the rod (equation (2.12)), it is clear that it involves only first derivatives withrespect to x of u and w. Therefore a function like f is a possible solution of the weakform and a possible weight function.In summary, the weak form allows for more possible solutions. This is a classic

mathematical property of weak forms, and is essential for the finite element method.

January 21, 2011 Version 0.2 27

Page 28: CT5123_LectureNotesThe Finite Element Method an Introduction

2 Strong and weak forms of the governing equations

The theory of which functions are allowed is discussed onmore detail in the followingadvanced section.

2.6 Definition of trial and weight function spaces

There are certain mathematical requirements that must be met by the trial and weightfunctions for the weak form to ‘make sense’. A function u is said to be square inte-grable if:

Ω(u)2 dx < ∞. (2.35)

Functions which are square integrable come from the Hilbert space known as L2 (Ω).Clearly, such functions may be discontinuous. When solving second-order differ-ential equations, functions which have square-integrable derivatives are of interest.Functions for which:

Ω(u)2 + (u,x)

2 dΩ < ∞ (2.36)

are known as members of the Sobolev space on degree one, which is denoted H1 (Ω).The notation u ∈ H1 means that u comes from (is an element of) H1. In physicalterms, the requirement that the trial functions be square-integrable implies that en-ergy must be finite. Note that C0 functions belong to H1. For multiple spatial dimen-sions, there do however exist functions from H1 (Ω) which are not C0 continuous.This can be seen in the well-known Sobolev embedding theorem.Importantly, Sobolev spaces are infinite-dimensional. That is, an infinite number

of different functions belong to a given Sobolev space. This is of crucial importance,since a fundamental step in the finite element method will involve finite-dimensionalfunction spaces.It is useful to define function spaces, fromwhich the trial andweight functions come.

Functions spaces can be considered the ‘family’ of functions from which u and w cancome. Consider first a scalar problem in an n-dimensional domain Ω. Trial functionsu come from the space S (u ∈ S). The function space S is defined by:

S = u | u ∈ H1 (Ω) , u|Γg = g. (2.37)

This says that the S is a collection of functions from H1 (Ω) which satisfy the Dirichletboundary conditions (technically this is not a space if g 6= 0, but this point is notimportant here). The weight functions come from the space V (w ∈ V), which isdefined by:

V = w | w ∈ H1 (Ω) ,w|Γg = 0. (2.38)

This says that V is a collection of functions which come from H1 (Ω) which are equalto zero where Dirichlet boundary conditions are applied.

28 Version 0.2 January 21, 2011

Page 29: CT5123_LectureNotesThe Finite Element Method an Introduction

2.7 Exercises

In multiple dimensions, u ∈ S where

S = ui | ui ∈ H1 (Ω) , ui|Γg = gi (2.39)

and similarly for weight functions w ∈ V ,

V = wi | wi ∈ H1 (Ω) , wi|Γg = 0. (2.40)

Further details can be found in texts on functional analysis and the mathematicalanalysis of the finite element method.

2.7 Exercises

1. For 3× 3 second-order tensors (matrices), prove that ∇w : σ = ∇sw : σ if σ issymmetric. (Hint: use index notation.)

2. Derive the weak equilibrium equation (2.23) for elasticity using index notation.

3. The Helmholtz equation is given by:

∇ · (∇φ) + kφ = 0

and is often used in wave propagation problems. Derive the weak form.

4. Show whether the following functions belong to H1 on the given domain:

a) u = 1/r on 1 < r < 2

b) u = 1/r on 0 < r < 2

c) u = 1/√r on 0 < r < 2

d) u = ax for x < 0 and u = bx for x > 0 on−1 < x < 1 (a and b are arbitraryconstants, a 6= b)

5. Solutions for the displacement field from linear-elastic fracture mechanics ofteninvolve a term

√r, where r is the distance from the crack tip (r ≥ 0). If the

displacement field was of the form u = a√r (all derivatives of a exist and are

well behaved and a is not dependent on r), is u a possible trial solution?

January 21, 2011 Version 0.2 29

Page 30: CT5123_LectureNotesThe Finite Element Method an Introduction
Page 31: CT5123_LectureNotesThe Finite Element Method an Introduction

3 The Galerkin method

The finite element method is one particular Galerkin method, named after the Rus-sian engineer Galerkin. It is a method for finding approximate solutions to partial dif-ferential equations. It is closely related to the Rayleigh-Ritz method which involveschoosing functions (a basis) for the solution and finding the amplitude of each func-tion by minimising the energy. The Galerkin method is however more general, beingable to solve a greater range of problems.The essence of the Galerkinmethod involves taking theweak form of the governing

equation, as developed in the previous chapter, and finding the best solution to aproblem given a collection of functions.

3.1 Approximate solution

First, consider the approximate solution to some problem, uh ∈ Sh, where Sh ⊂ S isa finite-dimensional space. This means that there is a limited number of possibilities.For example, uh could be a combination of low order polynomial functions. TheGalerkin problem for an elastic bar (equation (2.12)) involves: find uh ∈ Sh such that

−∫ L

0wh,xEu

h,x dx + whh|x=L = 0 ∀wh ∈ Vh. (3.1)

where V h ⊂ V is a finite dimensional space. Commonly, the above equation is ex-pressed in the abstract format as: find uh ∈ Sh such that

B(

wh, uh)

= L(

wh)

∀wh ∈ Vh (3.2)

where

B(

wh, uh)

=∫ L

0wh,xEu

h,x dx (3.3)

and

L(

wh)

= whh|x=L. (3.4)

This abstract format is introduced to keep the derivation of some later developmentscompact. Furthermore, it is generic for a range of different problems. In a multi-dimensional context, the finite-dimensional trial and weight functions are denoteduh and wh, respectively. Considering now the elasticity problem in equation (2.23),the Galerkin problem involves: find uh ∈ Sh such that

−∫

Ω∇swh : CCC : ǫh dΩ +

Ωwh · b dΩ +

Γh

wh · h dΓ = 0 ∀wh ∈ Vh (3.5)

31

Page 32: CT5123_LectureNotesThe Finite Element Method an Introduction

3 The Galerkin method

where ǫh = ∇suh. In the abstract notation of equation 3.2,

B(

wh, uh)

=∫

Ω∇swh : CCC : ǫh dΩ (3.6)

and

L(

wh)

=∫

Ωwh · b dΩ +

Γh

wh · h dΓ. (3.7)

The Galerkin method (more specifically, the Bubnov-Galerkin method) requiresthat the weight and trial functions come from the same finite-dimensional space, tak-ing into account the special requirements on the weight and trial functions whereDirichlet boundary conditions are applied. In Petrov-Galerkin method, the weightfunctions come from a different function space than the trial functions. This methodis used for special applications, often in fluid mechanics.Different Galerkin-based methods are defined by how the unknown field uh is rep-

resented. In the finite element method, uh and wh will be simple continuous, piece-wise low-order polynomials defined on ‘finite elements’. Spectral Galerkin meth-ods for example use a truncated Fourier series as the basis. A basic question whicharises when computing an approximate solution is how uh relates to the exact solu-tion u. Given a finite number of possibilities in Sh, which solution does the methodseek? Understanding this requires some basic error analysis. The error analysis willtell how the computed solution uh differs from the actual solution u and why theGalerkin method works (or for problems not considered here, why it doesn’t work).This is examined in the following section.

3.2 Basic error analysis

It is interesting to check how the solution computed using the Galerkin procedurecompares to the exact solution. For the one-dimensional problem, the error in thedisplacement e at a point is defined by:

e = u− uh (3.8)

where u is the exact solution and uh is the solution to equation (3.1). The approximatesolution is therefore equal to:

uh = u− e (3.9)

For generality, this will be investigated using the abstract notation. Inserting equation(3.9) into equation (3.2),

B(

wh, u)

− B(

wh, e)

− L(

wh)

= 0 ∀wh ∈ Vh (3.10)

Since u is the exact solution, B(

wh, u)

− L(

wh)

= 0 ∀wh ∈ Vh, this implies that:

B(

wh, e)

= B(

wh, u)

− B(

wh, uh)

= 0 ∀wh ∈ Vh (3.11)

32 Version 0.2 January 21, 2011

Page 33: CT5123_LectureNotesThe Finite Element Method an Introduction

3.3 Convergence of the Galerkin method

which in mathematical terms means that the error is orthogonal to the function spaceV h with respect to B (·, ·). This important result is commonly known as Galerkin or-thogonality. This means that the approximate solution uh is a projection of the exactsolution u onto the space of the weight functions. In the Bubnov-Galerkin, the weightfunctions wh come form the same space as the trial functions uh, hence the solution uh

is the projection of the exact solution onto the finite dimensional space of trial func-tions. It can be shown that the Galerkin finite element method is optimal in terms ofthe energy. This error analysis tells something of what the Galerkin method calcu-lates. Given some approximate functions, the Galerkin method will yield the best fitto the exact solution in terms of energy. Consider the following:

B(

u− uh + vh, u− uh + vh)

= B(

u− uh, u− uh + vh)

+ B(

vh, u− uh + vh)

= B(

u− uh, u− uh)

+ 2B(

vh, u− uh)

+ B(

vh, vh)

(3.12)

for any vh ∈ Vh, where u is the exact solution and uh is the solution to the Galerkinproblem. From Galerkin orthogonality (equation (3.11)), the term B(u − uh, vh) isequal to zero. Furthermore, B(vh, vh) ≥ 0. Denoting now wh = uh − vh, the aboveresult leads to the conclusion that:

B(

u− uh, u− uh)

≤ B(

u− wh, u− wh)

∀wh ∈ Vh (3.13)

This implies that the solution uh is closer to u than any other element of Vh in termsof B (·, ·). Consider the ‘energy’ norm:

‖v‖2E = 12B (v, v) (3.14)

which for an elastic body is the strain energy for a given displacement field v. Equa-tion (3.13) can then be expressed as:

‖u− uh‖E ≤ ‖u− wh‖E ∀wh ∈ Vh (3.15)

which says that the solution computed using the Galerkin method yields a solu-tion which is optimal in terms of the strain energy. Given a choice of functions, theGalerkin method therefore chooses those which minimise the error in terms of thestrain energy.There is a close relationship between the Rayleigh-Ritz method and the Galerkin

method. It has been shown that the Galerkin method minimises the error in termsof the energy, which is the principle behind the Rayleigh-Ritz method. For manyproblems in solid mechanics, the two are equivalent.

3.3 Convergence of the Galerkin method

It has been shown here that the Galerkin method works. How well it works requiresa priori error estimation. This is reserved for a later section as it relies on some details

January 21, 2011 Version 0.2 33

Page 34: CT5123_LectureNotesThe Finite Element Method an Introduction

3 The Galerkin method

of the finite element method. Crucially, convergence requires that:

limh→0

uh = u (3.16)

For finite element analysis, this corresponds to the exact solution being approachedupon mesh refinement. A major question which arises is how fast the exact solutionis approached as h is reduced.Details of these procedures and more elaborate mathematical analysis of the issue

considered in this chapter can be found in a range of books relating to the mathemat-ics of the finite element method (Braess, 2001; Brenner and Scott, 1994; Reddy, 1998;Strang and Fix, 1973).

3.4 Exercises

1. For elasticity, show that a solution to the Galerkin problem corresponds to aminimisation of the potential energy.

34 Version 0.2 January 21, 2011

Page 35: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

In this chapter, a key component of the finite element method is developed. This isthe discretisation of the governing equations using finite element shape functions. Theunknown field uh (the displacement for elasticity problems) will be described usingbasis functions (the shape functions) and discrete nodal values which represent theamplitude of the basis functions. Discretisation is a step toward computer implemen-tation.

The terminology in this chapter relates primarily to elasticity problems. The de-velopments are however general and the same procedure can be used to solve otherproblems.

4.1 Finite element method with piecewise linear basis functions

The simplest finite element shape functions are continuous, piecewise linear func-tions. Consider the elastic bar in Figure 4.1, which is restrained at both ends andloaded by a distributed force f . Along the bar, a number of ‘nodes’ are located, andthe domain between two nodes is known as an element. Associated with each nodeis a hat-like basis function which has a value of one at the node, and zero at all other

f

L

1 2 3 4 5 6 7 8

Figure 4.1: One-dimensional bar.

35

Page 36: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

nodes. The basis function at node i, is given by

Ni =

x

xi − xi−1− xi−1

xi − xi−1xi−1 < x ≤ xi,

x

xi − xi+1− xi+1

xi − xi+1xi < x < xi+1,

0 otherwise,

(4.1)

where xi is the coordinate of node i. In finite element analysis, these basis functionsare known as ‘shape functions’. For a one-dimensional bar, discretised with n nodalpoints, the approximate displacement field uh is given by

uh =n

∑i=1

Ni (x) ui, (4.2)

where ui is the value of the field uh at node i. Hence, the approximate displacementfield is given in terms of the shape functions and the approximate displacement ata finite number of points (nodes). From this expression, the strain field can be com-puted easily by taking the derivative of the shape functions,

ǫh = uh,x =n

∑i=1

dNi

dxui. (4.3)

To develop the Galerkin problem, an expression is needed for the weight func-tion wh. It is expressed using the same basis functions as the displacement field,hence

wh =n

∑i=1

Niwi. (4.4)

Recalling the weak form for a one-dimensional elastic rod,∫

Ωwh,xEu

h,x dΩ =

Ωwh f dΩ +

Γh

whh dΓ ∀ wh ∈ Vh, (4.5)

and inserting the expression for the expressions for the approximate displacementfield and the weight function,

Ω

(n

∑i=1

Ni,xwi

)

E

(n

∑j=1

Nj,xuj

)

=∫

Ω

(n

∑i=1

Niwi

)

f dΩ +∫

Γh

(n

∑i=1

Ni,xwi

)

h dΓ (4.6)

for all possible values of wi. Given that wi is not a function of spatial position, it canbe taken outside of the integrals,

n

∑i=1

wi

ΩNi,xE

(n

∑j=1

Nj,xuj

)

dΩ =n

∑i=1

wi

ΩNi f dΩ +

n

∑i=1

wi

Γh

Nih dΓ. (4.7)

36 Version 0.2 January 21, 2011

Page 37: CT5123_LectureNotesThe Finite Element Method an Introduction

4.2 General finite element basis functions

Likewise, uj can also be taken outside of the integrals,

n

∑i=1

wi

(n

∑j=1

uj

ΩNi,xE Nj,x dΩ

)

=n

∑i=1

wi

ΩNi f dΩ +

n

∑i=1

wi

Γh

Nih dΓ. (4.8)

This equation must hold for all possible combinations of wi. Consider the case thatall but one wi is equal to zero. Therefore, for each i

n

∑j=1

uj

ΩNi,xE Nj,x dΩ =

ΩNi f dΩ +

Γh

Nih dΓ (4.9)

must hold. This yields n equations (one for each wi, and n unknowns in the form ofui), which can be expressed as the system of equations,

Kijuj = fi, (4.10)

where

Kij =∫

ΩNi,x E Nj,x dΩ (4.11)

and

fi =∫

ΩNj f dΩ +

ΓhNjh dΓ (4.12)

The matrix K = Kij is commonly known as the stiffness matrix, and f = fi as theright-hand side (RHS) vector. Solving this linear system of equations provides uj,and hence an expression for the approximate displacement field along the rod.In order the solve the linear system, Dirichlet boundary conditions must be en-

forced. For the zero Dirichlet conditions, this is relatively simple. If a boundarycondition is applied at node k, then the row and the column k is removed from thestiffness matrix, and the kth term is deleted from the vector f . A discussion of moregeneral boundary conditions is delayed until the end of the chapter.

4.2 General finite element basis functions

The concept introduced in the previous section can be extended to higher spatial di-mensions and more complex shape functions. It is useful to define shape functionson finite elements. Matrices and vectors can be built for each element before beingassembled into global matrices and vectors.A mesh divides a body into a number of elements. A typical finite element mesh

is shown in Figure 4.2. The problem has been divided into many quadrilateral ele-ments. A finite element mesh consists of nodal points and elements. Nodes are pointsin space, while elements are lines (1D), surfaces (2D) or volumes (3D) which are con-structed by joining nodal points. Elements may not overlap. A simple finite element

January 21, 2011 Version 0.2 37

Page 38: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

Figure 4.2: Typical two-dimensional finite element mesh.

1 2

3

4

5

67

8

92

1

3

4

56

8

7

Figure 4.3: Simple two-dimensional finite element mesh.

38 Version 0.2 January 21, 2011

Page 39: CT5123_LectureNotesThe Finite Element Method an Introduction

4.2 General finite element basis functions

1 2L

1 1

x=0

Figure 4.4: One-dimensional linear bar element and associated shape functions.

mesh is shown in Figure 4.3. In Figure 4.3, the mesh is constructed with triangularelements. Both nodes and elements are numbered. Each element has three nodes.

As in the one-dimensional case, the unknown (displacement) field uh is discretisedby developing a method in which the displacement at any point in a body is deter-mined in terms of a discrete number of values which are stored at the nodes (knownas degrees of freedom) and basis functions. The displacement field is given by a linearcombination of a finite number of basis functions (a summation of the basis functions,each multiplied by a nodal value, the amplitude). In the finite element method, thebasis functions are defined on simple geometric elements, known as finite elements.

Finite element shape functions are typically piecewise continuous polynomial func-tions with a ‘compact support’. Each shape function Ni is associated with a node i.They are characterised by being equal to unity at their node, and zero at all othernodes. Having a compact support, shape functions are non-zero only close to theirnode. A finite element shape function is only non-zero on elements to which it isattached. Once the displacement field uh and its derivatives ∇uh can be expressedin terms of nodal unknowns, the discretised field can be inserted into the weak gov-erning equations. Shape functions for various elements are discussed in detail in thefollowing sections.

4.2.1 One-dimensional bar elements

To begin, linear one dimensional elements, as introduced in Section 4.1, are examined.Consider the one-dimensional bar element in Figure 4.4. The bar has two nodes,denoted by the solid circles. For a node i, the shape function associated with thatnode, Ni, is equal to one at the node and zero at all other nodes. The displacementfield inside the bar in terms of discrete nodal values and shape functions is given by:

uh (x) = N1 (x) a1 + N2 (x) a2, (4.13)

January 21, 2011 Version 0.2 39

Page 40: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

where ai is the displacement at node i (it is ‘stored’ at the node). The shape functionscorresponding to each node are given by:

N1 = − x

L+ 1, (4.14)

N2 =x

L. (4.15)

Hence,

uh =(

− x

L+ 1)

a1 +x

La2. (4.16)

This type of element is known as a linear element, as its shape functions are linearpolynomials. The weak form of the governing equations involves derivatives withrespect to the spatial position. Therefore, to solve a problem, the derivative of thedisplacement field with respect to x (the strain) is required. Taking the derivative ofequation (4.16) with respect to x,

ǫh =duh

dx=

dN1

dxa1 +

dN2

dxa2 = − 1

La1 +

1

La2. (4.17)

In the case of a linear displacement interpolation, the derivative of the shape functionwith respect to x is a constant function within an element. Now, in terms of nodaldegrees of freedom ae, the displacement and strain can be calculated in any part ofthe element.In matrix-vector notation, the displacement field is expressed as:

uh = Nae, (4.18)

where

N =[N1 N2

], (4.19)

and

ae =

a1a2

. (4.20)

The strain is given by:

ǫh = Bae, (4.21)

where the matrix B is equal to:

B =

[

dN1

dx

dN2

dx

]

. (4.22)

The shape functions for two linear elements are shown in Figure 4.5. Note also thatthese shape functions posses C0 continuity – they are continuous but their derivativesinvolve jumps across element boundaries.The matrix-vector notation for uh and ǫh may seem trivial for one-dimensional

problems. It does however make the generalisation to multiple dimensions simple.

40 Version 0.2 January 21, 2011

Page 41: CT5123_LectureNotesThe Finite Element Method an Introduction

4.2 General finite element basis functions

L1 L2

1 11

Figure 4.5: Shape functions for two one-dimensional linear bar elements.

Higher-order one-dimensional elements

It is possible to develop one-dimensional elements with higher-order polynomial in-terpolations. Higher-order elements simply have more nodes. More nodes throughwhich the shape function must interpolate naturally means a higher-order polyno-mial is required. Figure 4.6 illustrates shape functions for quadratic and cubic ele-ments. For a one-dimensional quadratic element, the displacement field is given by:

uh =3

∑i=1

Ni (x) ai. (4.23)

Therefore, the N matrix has the form:

N =[N1 N2 N3

], (4.24)

and the B matrix has a similar form. Since the displacement field is quadratic, obvi-ously the strain field is linear.The interpolation basis for higher-order elements is richer since both constant, lin-

ear and quadratic (and even higher) variations in the unknown field can be describedwithin an element.

4.2.2 Two-dimensional continuum elasticity elements

In two or more dimensions, each unknown field (such as displacement in each direc-tion) is interpolated using the polynomial shape functions. The displacement fieldfor an element is given by:

uh = Nae, (4.25)

and the strain field (using engineering notation) is given by:

ǫh = Bae. (4.26)

The matrix N contains the element shape functions. In two dimensions, it has theform:

N =

[N1 0 N2 0 . . . Nnn 00 N1 0 N2 . . . 0 Nnn

]

, (4.27)

January 21, 2011 Version 0.2 41

Page 42: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

1 1 1

1 32quadratic shape functions

1 1 1 1

1 2 3 4

cubic shape functions

Figure 4.6: Higher-order one-dimensional elements.

where nn is the numbers of nodes of the element. For two-dimensional problems, thematrix B has the form:

B =

∂N1

∂x0

∂N2

∂x0 . . .

∂Nnn

∂x0

0∂N1

∂y0

∂N2

∂y. . . 0

∂Nnn

∂y

∂N1

∂y

∂N1

∂x

∂N2

∂y

∂N2

∂x. . .

∂Nnn

∂y

∂Nnn

∂x

. (4.28)

The nodal degrees of freedom (normally one for each spatial dimension at each nodefor elasticity problems) are stored in a vector a. For a two-dimensional problem,

ae =

a1 xa1 ya2 xa2 y...

ann x

ann y

. (4.29)

The simplest element in two-dimensions is the three-node triangle. It is shown inFigure 4.7. Its shape functions are of the form:

42 Version 0.2 January 21, 2011

Page 43: CT5123_LectureNotesThe Finite Element Method an Introduction

4.2 General finite element basis functions

(x1, y1)(x2, y2)

(x3, y3)

1

3

2

Figure 4.7: Three-node triangular element.

Figure 4.8: Shape function for a three-node element.

N = c1x + c2y + c3. (4.30)

The shape function for a node is illustrated in Figure 4.8. Given that a shape functionshould have a value of unity at its node and zero at other nodes, the coefficients c canbe found by solving a linear system of equations. Consider node 1 in Figure 4.7. Itsshape function must satisfy:

N1(x1, y1) = c1x1 + c2y2 + c3 = 1, (4.31)

N1(x2, y2) = c1x2 + c2y2 + c3 = 0, (4.32)

N1(x3, y3) = c1x3 + c2y3 + c3 = 0, (4.33)

where (xi, yi) is the location of the ith node. This can be cast in a matrix form as:

x1 y1 1x2 y2 1x3 y3 1

c1c2c3

=

100

. (4.34)

Solving the above system of equations yields the coefficients for the shape functionof node 1. It is clear from the linear form of the shape functions for the three-nodetriangle that the derivatives are constant, hence the strain in the element is constant.

Example 4.1Consider the element in Figure 4.7. Given the following coordinates of each of

January 21, 2011 Version 0.2 43

Page 44: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

the nodes, find the shape function for node 2.

(x1, y1) = (1, 2)

(x2, y2) = (4, 1)

(x3, y3) = (2, 3)

To find the coefficients, a system of equations (see equation (4.34)) is formed.Since the shape function for node 2 is being calculated, the only non-zero termon the RHS corresponds to node 2.

1 2 14 1 12 3 1

c1c2c3

=

010

Solving this system of equations gives:

N2 = 0.25x− 0.25y + 0.25

Once the shape functions have been computed for each node, the N and B ma-trices can be formed. The N matrix for this element is of the form:

N =

[N1 0 N2 0 N3 00 N1 0 N2 0 N3

]

and the B matrix is of the form:

B =

N1,x 0 N2,x 0 N3,x 00 N1,y 0 N2,y 0 N3,y

N1,y N1,x N2,y N2,x N3,y N3,x

A very commonly used element in finite element analysis is the four-node quadri-lateral. Its shape functions are of the form:

N = c1xy + c2x + c3y + c4. (4.35)

It is also know as a bilinear element, due to the presence of the xy terms in the shapefunctions. A four-node quadrilateral element is shown in Figure 4.9. A shape functionfor a four-node element is shown in Figure 4.10. Unlike the three-node triangle, thestrain in this element is not constant.

Higher-order solid elements

As in one-dimensional problems, plane and three-dimensional elements can havehigher-order interpolations. The shape functions for a six-node triangle are of theform:

N = c1x2 + c2y

2 + c3xy + c4x + c5y + c6 (4.36)

44 Version 0.2 January 21, 2011

Page 45: CT5123_LectureNotesThe Finite Element Method an Introduction

4.2 General finite element basis functions

1

3

2

4

Figure 4.9: Four-node quadrilateral element.

Figure 4.10: A shape function for four-node quadrilateral element.

As with the three-node triangle, the coefficients can be found by solving a linear sys-tem of equations. Solving the below system of equations would yield the coefficientsfor node 1,

x21 y21 x1y1 x1 y1 1

x22 y22 x2y2 x2 y2 1

x23 y23 x3y3 x3 y3 1

x24 y24 x4y4 x4 y4 1

x25 y25 x5y5 x5 y5 1

x26 y26 x6y6 x6 y6 1

c1

c2

c3

c4

c5

c6

=

1

0

0

0

0

0

. (4.37)

Two shape functions for a six-node triangle are shown in Figure 4.11The polynomial terms needed for triangular elements can be taken from a Pascal

triangle (see Figure 4.12). Note that triangular elements are complete – that is theshape functions contain all polynomial terms up to a given order. Each time theorder of a triangle is increased, a new ‘row’ of terms from the Pascal triangle is addedto the shape functions. Linear, quadratic and cubic triangular elements are shown inFigure 4.13.Higher-order quadrilateral elements can also be constructed. They belong to one

of two families: serendipity or Lagrange. Serendipity elements have nodes only onelement boundaries, whereas Lagrange elements have nodes on the element interior.Several serendipity and Lagrange finite elements are shown in Figure 4.14. A Pas-cal triangle for serendipity elements is shown in Figure 4.15. Note that serendipity

January 21, 2011 Version 0.2 45

Page 46: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

Figure 4.11: Two shape functions for a six-node triangular element.

1x y

x2 xy y2

x3 x2y xy2 y3

x4 x3y x2y2 xy3 y4

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

Figure 4.12: Pascal triangle – polynomial terms for triangular elements of order n.

Figure 4.13: Linear, quadratic and cubic triangular elements.

46 Version 0.2 January 21, 2011

Page 47: CT5123_LectureNotesThe Finite Element Method an Introduction

4.2 General finite element basis functions

(a)

(b)

Figure 4.14: Serendipity (a) and Lagrange (b) quadrilateral finite elements.

1x y

x2 xy y2

x3 x2y xy2 y3

x4 x3y xy3 y4

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

Figure 4.15: Pascal triangle for serendipity elements.

elements of order higher than three ’miss’ polynomial terms, and are therefore notrecommended. Internal nodes must be introduced to ensure all polynomial terms areincluded. The Pascal triangle for Lagrange elements is shown in Figure 4.16. Theelements do not suffer from the limitation of missing polynomial terms for any or-der interpolation. Eight- and nine-node quadrilateral elements are commonly usedin finite element analysis. The shape functions for the eight-node serendipity quadri-lateral have the form:

N = c1x2y + c2xy

2 + c3x2 + c4y

2 + c5xy + c6x + c7y + c8, (4.38)

and for the nine-node Lagrange quadrilateral the shape functions have one extra termand are of the form:

N = c1x2y2 + c2x

2y + c3xy2 + c4x

2 + c5y2 + c6xy + c7x + c8y + c9. (4.39)

January 21, 2011 Version 0.2 47

Page 48: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

1x y

x2 xy y2

x3 x2y xy2 y3

. . . x3y x2y2 xy3 . . .

. . . x3y2 x2y3 . . .

. . . x3y3. . .

Figure 4.16: Pascal triangle for Lagrange elements.

Figure 4.17: Tetrahedral and brick three-dimensional finite elements.

4.2.3 Three-dimensional elements

Three-dimensional elements are increasingly used in engineering analysis. They canbe formed in the same fashion as one- and two-dimensional elements. Commonlyused shapes are tetrahedra and bricks. These two elements are shown in Figure 4.17.The computational effort required for three-dimensional analysis can become high.Not only do the elements tend to have more nodes, they often have more degrees offreedom per node.A four-node tetrahedral element has linear shape functions. They are of the form:

N = c1x + c2y + c3z + c4. (4.40)

Similar to the three-node triangle, the derivatives of the shape functions are constantwithin an element. The simplest brick element has eight nodes. Its shape functionsare of the form:

N = c1xyz + c2xy + c3xz + c4yz + c5x + c6y + c7z + c8. (4.41)

This is known as a ‘trilinear element’. Higher-order version of both tetrahedral andbrick elements also exist. The numbers of nodes per element increases rapidly. Also,wedge type elements are often used for generating meshes for complex geometries.

48 Version 0.2 January 21, 2011

Page 49: CT5123_LectureNotesThe Finite Element Method an Introduction

4.3 Governing equations

x = l1 x = l2

x

x = Lx = 0

Figure 4.18: One-dimensional bar showing the element that extends from x = l1 tox = l2.

The three-dimensional equivalent of a Pascal triangle can be used to find the poly-nomial terms for higher-order three-dimensional elements (Zienkiewicz and Taylor,1989)

4.3 Governing equations

At this point, it is known how the displacement and the displacement gradient ata point in space can be expressed in terms of the nodal variables (degrees of free-dom). What remains is the insertion of the discretised field uh into the governingweak equation.The weight (test) functions are discretised in the same fashion as the unknown

field uh. Therefore, for the multi-dimensional case within an element,

wh = Nbe, (4.42)

∇swh = Bbe, (4.43)

where the notation has been ‘abused’ as ∇swh is being expressed as a vector (recallthat this is possible due to symmetry). Now, the one-dimensional governing equationfor an elastic rod (equation (3.1)) is considered. Take a single element (of any order)which extends from l1 to l2 (see Figure 4.18). The discretised governing equation forthe element is expressed as:

∫ l2

l1(Bbe)

TEBae dΩ =∫

Γh,e(Nbe)

Th dΓ, (4.44)

where the integral over Γh,e is only non-zero if the boundary of the element coincideswith the boundary Γh. The discrete nodal values can be removed from the integrals,

which after some rearranging (using (Ac)T = cTAT) leads to:

beT∫ l2

l1BTEB dΩ ae = be

T∫

Γh,e

NTh dΓ. (4.45)

The be terms appear on both sides of the equality, and can therefore be eliminated,

∫ l2

l1BTEB dΩ ae =

Γh,e

NTh dΓ. (4.46)

January 21, 2011 Version 0.2 49

Page 50: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

The term

ke =∫ l2

l1BTEB dΩ (4.47)

is known as the ‘element stiffness matrix’. Once the stiffness matrix has been formedfor an element, its contribution is added to the ‘global’ stiffness matrix K.For a continuum elasticity problem, the discretised displacement and strain fields

are inserted into equation (3.5). This yields:

Ωe

(Bbe)TDBae dΩ =

Γh,e(Nbe)

Th dΓ +∫

Ωe

(Nbe)Tb dΩ (4.48)

(recall that b denotes the body force). Following the same steps as for the one-dimensional problem, the element stiffness matrix is expressed as:

Ωe

BTDB dΩ ae =∫

Γh,eNTh dΓ +

Ωe

NTb dΩ. (4.49)

Once the stiffness matrix has been formed for each element in the problem, it mustbe assembled into the global stiffness matrix. This is denoted symbolically by theoperation:

K = Anee=1ke, (4.50)

f = Anee=1 fe, (4.51)

where A represents the assembly operation and ne is the number of elements in themesh. For an element stiffness matrix, the term kij relates local nodes i and j. Inthe global mesh, local node i has global node number I, and similarly for J. Thecomponent kij is added to the location KI J . The assembly process is discussed inmore detail in Chapter 5.

4.4 Isoparametric mapping

In practice, isoparametric elements are used in finite element software. The shapefunctions are formed for a simple element configuration (typically elements with unitlength side and with sides aligned with the coordinate system and with a convenientorigin). This approach has a number of advantages. From the point of view of im-plementation, it requires the programming of only one function to evaluate the shapefunctions of a type of element, irrespective of the exact shape of the element. It alsoallows the simple application of numerical integration, as is discussed in the follow-ing section. A third advantage is that isoparametric mapping allows higher-orderelements to have curved edges.An isoparametric mapping is defined via a mapping using the nodal shape func-

tions. For a two dimensional problem, the point (x, y) in the ‘physical’ Cartesian

50 Version 0.2 January 21, 2011

Page 51: CT5123_LectureNotesThe Finite Element Method an Introduction

4.4 Isoparametric mapping

η

(1,1)(−1,1)

(1,−1)(−1,−1)

ξ

x

y

1

1

2

3

4

2

34

x

ξ

Figure 4.19: Isoparametric mapping for a bi-unit square.

configuration is given by:

x =nn

∑i=1

Ni (ξ, η) xi,

y =nn

∑i=1

Ni (ξ, η) yi,

(4.52)

where (ξ, η) are known as the ‘natural coordinates’, and nn is number of nodes ofthe element. The mapping for a four-node quadrilateral element is illustrated in Fig-ure 4.19. The map x takes a point within the bi-unit square in the (ξ, η) domain andmaps it to a point in the ‘real’ element in the Cartesian (x, y) system. The positionon the bi-unit square is given by the natural coordinates, ξ and η. The map ξ is theinverse of x, taking a point in the real Cartesian (x, y) system and mapping to a point(ξ, η) in the bi-unit square.

Using an isoparametric mapping, shape functions can be defined on simple shapes,such as the bi-unit square. For example the displacement in the x-direction at a pointis given by:

uh =nn

∑i=1

Ni (ξ, η) aix. (4.53)

The difficulty that arises is when computing derivatives with respect to the real coor-dinates, as the shape functions are defined in terms of the natural coordinates. In thegoverning weak equations, derivatives of the unknown field with respect to x and yare required. To proceed, consider the application of the product rule for differentia-

January 21, 2011 Version 0.2 51

Page 52: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

tion for a function f ,

∂ f

∂ξ=

∂ f

∂x

∂x

∂ξ+

∂ f

∂y

∂y

∂ξ, (4.54)

∂ f

∂η=

∂ f

∂x

∂x

∂η+

∂ f

∂y

∂y

∂η. (4.55)

This can be written in matrix form as:

∂ f

∂ξ

∂ f

∂η

=

∂x

∂ξ

∂y

∂ξ

∂x

∂η

∂y

∂η

︸ ︷︷ ︸

J

∂ f

∂x

∂ f

∂y

, (4.56)

where the matrix J is commonly known as the Jacobian matrix. Taking the inverse ofthe Jacobian,

∂ f

∂x

∂ f

∂y

=1

j

∂y

∂η− ∂y

∂ξ

− ∂x

∂η

∂x

∂ξ

︸ ︷︷ ︸

J

∂ f

∂ξ

∂ f

∂η

, (4.57)

where

j = det J. (4.58)

In light of the isoparametric mapping (equation (4.52)), the terms in the matrix J canbe computed. Using the shape function, defined in terms of ξ and η,

∂x

∂ξ=

nn

∑i=1

∂Ni

∂ξxi,

∂x

∂η=

nn

∑i=1

∂Ni

∂ηxi,

∂y

∂ξ=

nn

∑i=1

∂Ni

∂ξyi,

∂y

∂η=

nn

∑i=1

∂Ni

∂ηyi.

(4.59)

Once terms of the matrix J have been formed, from equation (4.57) the derivatives ofthe shape function of node i with respect to x and y can be computed,

∂Ni

∂x

∂Ni

∂y

=1

j

∑nnj=1 Nj,ηyj − ∑

nnj=1 Nj,ξyj

− ∑nnj=1 Nj,ηxj ∑

nnj=1 Nj,ξxj

∂Ni

∂ξ

∂Ni

∂η

. (4.60)

52 Version 0.2 January 21, 2011

Page 53: CT5123_LectureNotesThe Finite Element Method an Introduction

4.4 Isoparametric mapping

r

s

1

2

3

(1,0)(0,0)

(0,1)

r

s

1

2

3

(1,0)(0,0)

(0,1)

4

56

Figure 4.20: Three-node and six-node triangles using area coordinates.

Now, once the derivatives of the shape functions have been calculated on the simpleisoparametric domain, they can be calculated for the real configuration. While thisprocedure may seen complex, it can be implemented in a computer code in a simpleand compact fashion.

Quadrilateral elements

The shape functions for quadrilateral elements on a bi-unit square is particularly sim-ple. For the bi-unit quadrilateral in Figure 4.19, the shape function of the ith node isgiven by:

Ni (ξ, η) =1

4(1+ ξiξ) (1+ ηiη) . (4.61)

Similar formulae can be found for eight- and nine-node elements (Hughes, 1987).

Triangular elements

Isoparametric mappings are also applied for triangular elements. A popular ap-proach is to ‘degenerate’ a quadrilateral element to a triangular element (Bathe, 1996;Hughes, 1987). This way, a four-node quadrilateral element can be reduced to a three-node triangular element, and an eight-node quadrilateral element can be reduced toa six-node triangular element. Is is also possible to directly address isoparametrictriangular elements. The latter approach is followed here.

Triangular elements are often described using area coordinates. Consider the trianglein Figure 4.20. The position of a point inside the triangle is given by r, s and t, where:

t = 1− r− s. (4.62)

January 21, 2011 Version 0.2 53

Page 54: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

The shape functions for the nodes of the element in Figure 4.20 are then:

N1 = t, (4.63)

N2 = r, (4.64)

N3 = s. (4.65)

Note the numbering of the nodes for the quadratic triangle in Figure 4.20. It is com-mon for higher-order elements that the apexes are first numbered (corner nodes in thecase of quadrilateral elements), then the mid-side nodes. For a quadratic (six-node)triangular element, the shape functions are equal to:

N1 = 2t2 − t, N4 = 4rt,

N2 = 2r2 − r, N5 = 4rs,

N3 = 2s2 − s, N6 = 4st.

(4.66)

There is a formula for the shape functions of arbitrary order in terms of r, s and t ontriangles (Hughes, 1987, p. 166).

4.5 Numerical integration

At this stage, the problem is not yet fully discrete. While the displacement field hasbeen discretised, the element stiffness matrices and RHS vectors still involve integra-tion over volumes and surfaces (see section 4.3). To make the formulation fully dis-crete (and amendable to computer implementation), numerical integration is applied.Before proceeding to the element matrices, numerical integration in one-dimension isconsidered.

For the integration of a function f (ξ) from −1 to 1,

∫ 1

−1f (ξ) dξ ≃

nint

∑i=1

f (ξi)wi, (4.67)

where ξi are discrete points on the integral domain, nint is the number of discretepoints (integration points) at which the function is evaluated and wi is the weight as-signed to each point

(

∑ninti=1 wi = 2

). Numerical integration is illustrated in Figure 4.21.

Different integration schemes specify where the points are located and the weight as-sociated with each point. Two schemes which arise in finite element analysis areNewton-Cotes and Gauss integration.

To evaluate the stiffness matrix of an element, it convenient to integrate in the (ξ, η)domain. To do this, consider in two dimensions that:

Ωe

BTDB dΩ =∫ 1

−1

∫ 1

−1BTDBj dξ dη. (4.68)

54 Version 0.2 January 21, 2011

Page 55: CT5123_LectureNotesThe Finite Element Method an Introduction

4.5 Numerical integration

ξ1 ξ2 ξ3 ξ4

f

ξ1−1

Figure 4.21: Numerical integration of the function f .

Note the appearance of the determinant of the Jacobian, j. This is due to dx dy =j dξ dη (the substitution rule for integration has been applied). Application of nu-merical integration leads to:

∫ 1

−1

∫ 1

−1BTDBj dξ dη ≃

n

∑i

B (ξi, ηi)TDB (ξi, ηi) j (ξi, ηi) wi. (4.69)

Note that B (ξi, ηi) is the usual Bmatrix, containing derivatives of the shape functionswith respect to x and y, evaluated at the point (ξi, ηi). To perform the numericalintegration of the element stiffness matrix, the last remaining issue is the selection ofan appropriate integration scheme.A Newton-Cotes scheme uses equally spaced integration points. The sampling

points and weights are listed in Table 4.1. Importantly, (n + 1) integration points arerequired when using a Newton-Cotes scheme to integrate an nth-order polynomial.Most commonly in finite element analysis, Gauss integration is used. It is also knownas ‘Gauss quadrature’. Gauss quadrature is the optimal numerical integration schemefor polynomials in one dimension. Optimal means that to integrate a polynomialexactly, it requires the least number of points. For a (2n − 1)th-order polynomial,Gauss integration requires n points to integrate the polynomial exactly. The locationand weights for Gauss integration in one dimension for up to three points are givenin Table 4.2. Three points integrate as 5th order polynomial exactly in one dimension.

For multi-dimensional problems, the one-dimensional scheme can be extended ineach spatial direction. This is simple when using isoparametric elements. However,in multiple dimensions Gauss integration is not necessarily the most efficient scheme.The question that arises in finite element analysis is: How many integration points

should be used? Generally, full integration schemes are recommended for their robust-ness. Full integration means that the stiffness matrix is integrated exactly (assumingj = constant). The integrand of the stiffnessmatrix is BTDB, where B contains deriva-tives of the shape functions. Therefore, if the shape functions are linear, the terms in Bare constant and the stiffness matrix is also constant throughout the element. There-fore, one integration point is sufficient (in one, two and three dimensions). If theshape functions are quadratic, B contains linear terms, which when squared give a

January 21, 2011 Version 0.2 55

Page 56: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

n location ξi weight wi

1 0 2

2 1 1

1 1

3 −11

3

04

3

11

3

4 −11

4

−1

3

3

4

1

3

3

4

11

4

Table 4.1: Newton-Cotes integration rules for one dimension on the domain [−1, 1].

n location ξi weight wi

1 0 2

2 − 1√3

1

1√3

1

3 −√

3

5

5

9

08

9√

3

5

5

9

Table 4.2: Gauss integration rules for one dimension on the domain [−1, 1].

56 Version 0.2 January 21, 2011

Page 57: CT5123_LectureNotesThe Finite Element Method an Introduction

4.6 Imposition of Dirichlet boundary conditions

Figure 4.22: Spurious zero energy mode for the eight-node quadrilateral elementwhen using 2× 2 integration.

quadratic variation. To integrate a quadratic function in two dimensions, two pointsare required in each direction.For some applications it may be advantageous to use reduced integration schemes

in combination with particular elements. The four-node quadrilateral element re-quires 2× 2 points for full integration, although it is often integrated with just onepoint. Similarly, the eight-node quadrilateral requires 3× 3 points for full integration,although a 2× 2 scheme is often used. Reduced integration schemes can improvethe performance of some elements for special applications. The danger of under-integrating elements is that spurious modes may arise. This means that a deformationmode exists which does not contribute to the energy. This deformation mode candevelop in an uncontrolled fashion. Figure 4.22 shows the classic ‘hour-glass’ spuri-ous mode for an eight-node quadrilateral when using reduced 2× 2 integration. It isoften argued that a zero energy mode will be restrained by neighbouring elements,although it is safer to use full integration. A test for the element stiffness matrix isto calculate its eigenvalues. The number of zero eigenvalues indicates the number ofrigid body modes - modes which do not contribute to the energy. In one dimension,there should only be one zero eigenvalue which corresponds to translation. In twodimensions, there should be only three zero eigenvalues, two relating the translation(x and y directions) and one for rigid body rotation. If a two-dimensional element hasmore than three zero eigenvalues, there is likely a deficiency in the formulation.In summary, recommended integration schemes for commonly used one- and two-

dimensional elements are shown in Table 4.3.

4.6 Imposition of Dirichlet boundary conditions

The imposition of Neumann (force) boundary conditions in the finite elementmethodis straightforward. They appear naturally in the weak formulation (hence the com-mon name ‘natural boundary conditions’). Non-zero Dirichlet boundary conditionsare more complicated to enforce. In the Galerkin method, the trial functions (uh)must satisfy the Dirichlet boundary conditions. In solid and structural mechanics,

January 21, 2011 Version 0.2 57

Page 58: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

element integration scheme

two-node bar 1

three-node bar 2

three-node triangle (T3) 1

six-node triangle (T6) or 3

four-node quadrilateral (Q4) 2× 2

eight-node quadrilateral(Q8) 3× 3

Table 4.3: Recommended integration schemes for commonly used elements.

58 Version 0.2 January 21, 2011

Page 59: CT5123_LectureNotesThe Finite Element Method an Introduction

4.6 Imposition of Dirichlet boundary conditions

this means that the uh must satisfy the prescribed displacements where they are spec-ified. Classical enforcement of Dirichlet boundary conditions in the finite elementmethod relies on the property of the shape functions that they are non-zero at theirown node and equal to zero at all other nodes. Two common approached are outlinedbelow.

4.6.1 Elimination of ‘Dirichlet’ degrees of freedom

The displacement field can be expressed by:

uh = vh + gh, (4.70)

where uh is the displacement, vh is equal to zero where Dirichlet (displacement)boundary conditions are applied and gh satisfies the Dirichlet boundary conditions.In discretised form at element level,

kea =

[kevv kevgkegv kegg

]avg

=

fvfg

, (4.71)

where av are the nodal unknowns at nodes where no Dirichlet boundary conditionsare applied, and g are the applied Dirichlet boundary conditions. Since the weightfunction is defined to be zero where Dirichlet boundary conditions are applied,

[kevv kevgkegv kegg

]avg

=

fv0

. (4.72)

Since g is known, it is not included in the global system of equations to be solved. Itis possible to write:

kevvav + kevgg = fv, (4.73)

where av is the only unknown. Since g is known, Dirichlet boundary conditions canbe enforced by modifying the RHS vector,

kevvav = f e − kevgg. (4.74)

In terms of indexes, the element RHS vector is modified,

f e,modi = f ei −

nn

∑j=1

keijgej . (4.75)

Once the element stiffness matrix has been formed, the element RHS vector can bemodified to enforce Dirichlet boundary conditions before assembly into the globalRHS vector. The advantages of this approach are that degrees of freedom to whichDirichlet boundary conditions are applied do not appear in the global stiffness matrixand symmetries which may be present in the stiffness matrix are preserved.

January 21, 2011 Version 0.2 59

Page 60: CT5123_LectureNotesThe Finite Element Method an Introduction

4 Formulation of the finite element method

4.6.2 Retention of ‘Dirichlet’ degrees of freedom

A simpler approach to imposing Dirichlet boundary conditions is to set all terms onthe row of the stiffness matrix corresponding to a node where a Dirichlet boundarycondition is applied (row k) equal to zero, except the diagonal termwhich is set equalto one. The value of Dirichlet boundary condition is then inserted into the vector fat position k. The advantage of this scheme is its simplicity, and that the value of theDirichlet boundary condition is returned in the solution vector which simplifies post-processing. A disadvantage is that the size of the system of equations to be solved islarger than when the extra degrees of freedom are eliminated (but only marginally soin a typical simulation) and if the stiffness matrix is symmetric before the impositionof Dirichlet boundary conditions, symmetry is lost. However, modern iterative linearsolvers can deal with the consequences of boundary conditions being applied in thisfashion is a very efficient manner (Ern and Guermond, 2004).

4.7 Exercises

1. For a plane elasticity problem, at which points is the stress from the finite ele-ment solution not uniquely defined when using C0 elements?

2. Form the shape functions for a Lagrange nine-node quadrilateral element

3. The three-node triangle element is often referred to as the ‘constant strain trian-gle’ (CST). Show why this is.

4. Under what conditions the matrix BTDB is symmetric?

5. Consider the Laplace equation, which is given by:

∆u = ∇ · (∇u) = 0

To solve this problem, both the finite element method and the finite differencemethod require the solution of a system of equations Ka = f . In one dimensionand for equally spaced nodal points (nodes are a distance h apart), compare thematrix K for the finite element method with linear elements and for the second-order central finite difference method. The second-order finite difference equa-tion for the second derivative is:

d2u

dx2

∣∣∣∣i

=ui−1 − 2ui + ui+1

h2

For unequally spaced nodes, the difference equation for the second derivativeis:

d2u

dx2

∣∣∣∣i

=2ui−1

hj(hj + hj+1

) − 2uihjhj+1

+2ui+1

hj+1

(hj + hj+1

)

Comment on the symmetry of the operators for finite elements and finite differ-ences on unequally spaced grid.

60 Version 0.2 January 21, 2011

Page 61: CT5123_LectureNotesThe Finite Element Method an Introduction

4.7 Exercises

6. Calculate and plot the shape functions for the eight-node quadrilateral elementon a bi-unit square.

7. Formulate the stiffness matrix for the element in Figure 4.7 using the nodal co-ordinates in Example 4.1 and for E = 1 and ν = 0.2. Calculate the eigenvaluesof the stiffness matrix and comment on their significance.

8. Form the stiffness matrix for a four-node quadrilateral on a bi-unit square. Cal-culate its eigenvalues using one-point and 2× 2 integration.

January 21, 2011 Version 0.2 61

Page 62: CT5123_LectureNotesThe Finite Element Method an Introduction
Page 63: CT5123_LectureNotesThe Finite Element Method an Introduction

5 Implementation of the finite element method

This chapter addresses practical aspects of implementing the finite element method.To this point, the underlying theory has been addressed and the discretised formu-lation for individual elements discussed. One of the strengths of the finite elementmethod is the efficiency with which it can be implemented in a computer code. Thischapter describes how the finite element method can be implemented in a computercode. It is illustrated with schematic extracts of computer code.The notation used in this chapter follows as closely as possible the notation used in

the accompanying Matlab code.Note: Code examples in the chapter does not reflect the structure of the current version of

the Matlab code used in CT5123.

5.1 Preprocessing

The first step in finite element analysis is known as preprocessing. This step involvesgenerating a finite element mesh. For simple problems with only a few elements,this can be done by hand. For problems typically analysed using the finite elementmethod, a mesh is too complicated to produce by hand. Mesh generation programsexist which produce meshes suitable for finite element analysis. In large finite ele-ment software packages, often a mesh generator is included. The generated meshfiles serve as input for a finite element program.A finite element mesh consists of nodal coordinates and a connectivity. Figure 5.1

shows a simple finite element mesh of four-noded quadrilaterals. Both nodes andelements have been numbered. Also shown are the applied boundary conditions(both prescribed displacements and the applied force). A typical input file containing

F= 5.3

1

2

3 4

5

6

7

8

1

23

4

9

Figure 5.1: Finite element mesh with elements and nodes numbered.

63

Page 64: CT5123_LectureNotesThe Finite Element Method an Introduction

5 Implementation of the finite element method

% node x y

1 0.0 0.0

2 0.0 0.8

3 0.0 2.0

4 0.5 2.0

5 0.6 1.0

6 0.76 0.7

7 2.1 0.82

8 2.1 1.5

9 2.1 2.0

Figure 5.2: Nodal coordinates.

% element node1 node 2 node 3 node 4

1 2 1 6 5

2 3 2 5 4

3 9 4 5 8

4 5 6 7 8

Figure 5.3: Element connectivity.

the nodal coordinates is shown in Figure 5.2. For each node, the x and y coordinate isgiven. The connectivity list for Figure 5.1 is given in Figure 5.3. For each element, thenode numbers are listed. The list can begin with any node of the element, althoughthe numbering must process in an anti-clockwise direction (to avoid calculating anegative volume and hence a negative element stiffness).In addition to nodal coordinates and the connectivity, boundary conditionsmust be

specified. The problem in Figure 5.1 involves both Dirichlet (displacement) and Neu-mann (force) boundary conditions. The list in Figure 5.4 gives the applied boundarycondition. First, the node to which a boundary condition is applied is listed. Thesecond column gives the boundary condition type: Dirichlet (displacement) = 1 andNeumann (force) = 0. The third column gives the degree-of-freedom to which theboundary condition is applied (dof=1 represents the x-direction and dof=2 representsthe y-direction). The final column is the value of the applied boundary condition.This is either a prescribed force or the prescribed displacement.The preprocessing is completed by specify the material data. For an isotropic

linear-elastic analysis, the is Young’s modulus, the Poisson’s ratio and the densityof the material. The density is necessary when taking the self-weight into account.

5.2 Program flow

Once the input for a finite element analysis has been prepared, the calculation phasecan begin. The outline of a typical finite element program for linear static problems

64 Version 0.2 January 21, 2011

Page 65: CT5123_LectureNotesThe Finite Element Method an Introduction

5.3 Local-global

% node bc type dof value

1 1 1 0

1 1 2 0

2 1 1 0

3 1 1 0.0

9 0 1 5.3

Figure 5.4: Specification of boundary conditions.

is shown in Figure 5.5. It begins with reading the input data from the preprocess-ing stage. Once the input data has been read, each degree of freedom at which noDirichlet boundary condition is applied is given an equation number. This is stored inan array ID(node#,dof#) (see Figure 5.6). For degrees of freedom where a Dirichletboundarycondition is applied, ID=0. Degrees of freedom where Dirichlet boundaryconditions are applied do not appear in the stiffness matrix. Hence, for the problemin Figure 5.1 the size of stiffness matrix is 14× 14. After the number of equations hasbeen determined, it is then possible to allocate the memory required for the calcula-tion.Once the memory has been allocated, it is possible to start a major element of the

analysis – the calculation of the element stiffness matrix and element RHS. For eachelement, the element stiffness matrix ke is formed and added into the global stiffnessmatrix K. Similarly, the element RHS vector fe for each element is formed and addedinto the global RHS vector f . If a Dirichlet boundary condition is applied to a de-gree of freedom (or degrees of freedom) of the element, the RHS vector is modified toimpose the boundary condition. The element RHS vector is also assembled into theglobal RHS vector. After looping over all the elements and forming the stiffness ma-trix and RHS vector, Neumann boundary conditions are added into the RHS vector.The second major step is the solution of the system of equations:

Ka = f .

Various methods can be used to do this. The best method depends on the natureof the problem and its size. This aspect is discussed in Chapter 8. After the systemof equations has been solved, the displacement can be calculated at any point in thebody. For large problems, the amount of data can be immense. This data requirespost-processing to interpret the data and to extract the desired information.

5.3 Local-global

A key to implementing the finite element method is the local-global relationship be-tween nodes. All nodes in a mesh have a global number. Locally, for each element,each node of the element has a local number. The global node numbers can be seenin Figure 5.1. From the connectivity (Figure 5.3), the relationship between the lo-cal and global node numbers can be inferred for each element. Consider element 3

January 21, 2011 Version 0.2 65

Page 66: CT5123_LectureNotesThe Finite Element Method an Introduction

5 Implementation of the finite element method

% start program

% read input data

read_nodes

read_connectivity

read_boundary_conditions

read_material_data

% number equations

number_equations

% setup memory allocation

memory_allocate

% loop over elements

for i=1:number_elements

local_arrays % copy global to local arrays

element_form % form stiffness matrix k_e and f_e for element

assemble_K % add element stiffness matrix into K

apply_dirichlet_bc % modify f_e for Dirichlet boundary conditions

assemble_f % add element RHS into global RHS

end

% apply Neumann boundary conditions

apply_neumann_bc

% solve system Ku = f

u = K\f

% post-process results

calculate_stress

plot_displacements

% end program

Figure 5.5: Finite element program flow for a linear problem.

66 Version 0.2 January 21, 2011

Page 67: CT5123_LectureNotesThe Finite Element Method an Introduction

5.3 Local-global

ID(1,1) = 0 ID(1,2) = 0

ID(2,1) = 0 ID(2,2) = 1

ID(3,1) = 0 ID(3,2) = 2

ID(4,1) = 3 ID(4,2) = 4

ID(5,1) = 5 ID(5,2) = 6

ID(6,1) = 7 ID(6,2) = 8

ID(7,1) = 9 ID(7,2) = 10

ID(8,1) = 11 ID(8,2) = 12

ID(9,1) = 13 ID(9,2) = 14

Figure 5.6: Equation numbering.

4(8)

1(9)2(4)

3 (5)

Figure 5.7: Global/local numbering of element 3. The global node number is shownin brackets.

in Figure 5.1. For element three, the local and global node numbers are shown inFigure 5.7. An array (matrix) connect(element#,local node#) contains the connec-tivity data which is in Figure 5.3. For example, connect(3,1) = 9, connect(3,2)

= 4, connect(3,3) = 5, connect(3,4) = 8. Before forming the element i, infor-mation specific to that element is copied from the global arrays containing nodal po-sitions, displacements at nodes and any other relevant information to smaller localarrays for the element. An example piece of code is shown in Figure 5.8 for copyelements of the global arrays to the local element arrays.

Once the local arrays have been assembled for element i, its stiffness matrix can beformed. A simple function to form the stiffness matrix and RHS vector of an elementis shown Figure 5.9. The process is repeated for every element in the mesh. Once thestiffness matrix has been calculated for an element, it is possible to impose Dirichletboundary conditions by modifying the element RHS vector fe. The process is shownin Figure 5.10.

After the stiffness matrix and RHS vector has been formed for an element and theRHS vector has been modified for any Dirichlet boundary conditions, the elementstiffness matrix and RHS vector is added into the global stiffness matrix and globalRHS vector. This process relies on indexing between local degrees of freedom andtheir global equation number. An example piece of code is given in Figure 5.11. Notethat degrees of freedom where Dirichlet boundary conditions are applied are not as-sembled into the global arrays.

January 21, 2011 Version 0.2 67

Page 68: CT5123_LectureNotesThe Finite Element Method an Introduction

5 Implementation of the finite element method

% setup local arrays for element i

for j=1:nodes_per_element % loop over each node

x_e(j,:) = x(connect(i,j),:) % copy nodal postions

% copy displacements from global to local array

for k=1:dof_per_node % loop over each degree of freedom

jj = j*dof_per_node - dof_per_node + k

if ID(connect(i,j),k) ~= 0

a_e(jj) = a( ID(connect(i,j), k) )

else

a_e(jj) = g_e(jj) % displacement is prescribed

end

end

end

% return to main program

Figure 5.8: Set-up of local element arrays for element i.

% form element stiffness matrix

ip_scheme % determine integration scheme

for i=1:number_ip_points % loop over integration points

ip_location % calculate position of integration point

shape_function % evaluate shape functions at integration point

form_B_matrix

form_D_matrix

k_e = k_e + B’*D*B*w(i)*xj(i) % add contribution of ip to k_e

f_e = f_e + N’*b*w(i)*xj(i) % add contribution of ip to f_e

if postprocess == true % if stress is required

stress(i) = D*B*a_e

end

end

% return to main program

Figure 5.9: Formation of element stiffness matrix.

68 Version 0.2 January 21, 2011

Page 69: CT5123_LectureNotesThe Finite Element Method an Introduction

5.3 Local-global

% impose Dirichlet boundary conditions

for i=1:nodes_per_element*dof_per_node

f_e(:) = f_e(:) - k_e(:,i)*g_e(i)

end

% return to main program

Figure 5.10: Imposing Dirichlet boundary conditions.

% assemble k_e and f_e for element i into K and f

for j=1:nodes_per_element

for k=1:dof_per_node

ii = ID(connect(i,j), k)

kk = j*dof_per_node - dof_per_node + k

for l=1:nodes_per_element

for m=1:dof_per_node

jj = ID(connect(i,l), m)

ll = l*dof_per_node - dof_per_node + m

if ii~=0 & jj~=0

K(ii,jj) = K(ii,jj) + k_e(kk,ll)

end

end

end

if ii ~= 0

f(ii) = f(ii) + f_e(kk)

end

end

end

% return to main program

Figure 5.11: Assembly of local arrays into global arrays.

January 21, 2011 Version 0.2 69

Page 70: CT5123_LectureNotesThe Finite Element Method an Introduction

5 Implementation of the finite element method

0 500 1000 1500

0

500

1000

1500

Figure 5.12: Graphical representation of a stiffness matrix

5.4 Stiffness matrix storage

A feature of the finite element method is that the stiffness matrix is sparse. This meansthat the stiffness matrix contains many zeros. Taking advantage of the sparse na-ture of the stiffness matrix yields significant computational savings, both in terms ofmemory and computational time. Figure 5.12 represents graphically the structure ofthe stiffness matrix for a problem involving 700 four-noded quadrilateral elements.This is relatively small for a finite element analysis. Non-zero terms are marked bya dot. The dimension of the matrix is 1530 × 1530 (giving a total of 2 340 900 en-tries). However, only 23 638 entries are non-zero (1% of the total matrix elements).Assuming double precision storage, storing the whole matrix would require almost18 megabytes of memory. Storing only the non zero terms requires on 283 kilobytesof memory! In addition, solvers are implemented such that operations are not per-formed on non-zero terms which reduces the number of floating point operationsrequired, and hence the computational time, significantly. Yet further savings can beachieved by taking into account symmetry of the stiffness matrix.

Many finite element programs store the stiffness matrix in a skyline format. Forthis method to be efficient, the mesh must be constructed in an ‘optimal’ fashion tominimise the bandwidth of the stiffness matrix. This essentially requires that thenode numbers of nodes which are close to each should also be close. Typically, meshgeneration programs will label nodes optimally, or have the option to relabel nodesto minimise the stiffness matrix bandwidth. The stiffness matrix in Figure 5.12 iswell-numbered, as all non-zero terms are close to the diagonal which minimises thebandwidth.

70 Version 0.2 January 21, 2011

Page 71: CT5123_LectureNotesThe Finite Element Method an Introduction

5.5 Post-processing

5.5 Post-processing

After a calculation has been completed, post-processing of the data is required. Threequantities of potential interest from a linear-elastic calculation are displacements,stresses and reaction forces.It is important to realise that the stress computed at a point is not always reliable.

More reliable are the reaction forces at nodes where Dirichlet boundary conditionsare applied. Reaction forces can be evaluates by calculating the so-called internal forcevector f int. The internal force vector for an element is given by:

f inte =∫

Ωe

BTσ dΩ +∫

Ωe

NTb dΩ (5.1)

Once assembled for all elements (at all nodes, including where Dirichlet boundaryconditions are applied), it gives the reaction force at each node. For static problems,the internal force vector should be zero where no Dirichlet boundary conditions areapplied. This means that the body is in equilibrium.

January 21, 2011 Version 0.2 71

Page 72: CT5123_LectureNotesThe Finite Element Method an Introduction
Page 73: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

Special finite elements are often used in structural mechanics. Examples are beam,plate and shell elements. They are used in situations where conventional solid el-ements perform poorly with a practicably allowable number of elements, or in sit-uations where they provide a higher degree of accuracy (in terms of the quantityof interest) than plane elements for the same computational effort. These elementsare derived from different governing equations, which are closely related to classi-cal equations from structural mechanics. Their governing equations derive from thegoverning equation of elastostatics, with simplifications and assumptions which areapplicable for common structural problems.The formulation of structural elements tends to be more complex than continuum

elements. A particular problem is that classical thin bending problems in structuralmechanics are governed by fourth-order equations. That is, the strong governingequations involve fourth-order derivatives, in contrast to continuum elasticity prob-lems which involve only second-order derivatives. This has serious consequences forthe shape functions which can be employed.

6.1 Rod elements in space

In Chapter 4, a one-dimensional rod element was developed that could only transmitnormal forces. It is however possible to assemble this element into a truss structurein two or three dimensions. A simple two-dimensional truss structure is shown inFigure 6.1. Joints (nodes) of the truss can translate in both the x- and y-directions.Hence, a finite element model will require two degrees of freedom at each node.The use of truss elements in a two- or three dimensional structure relies upon a

rotation between different coordinate systems. Each element is rotated to a conve-nient coordinate system. The most convenient system is one in which the axis of thetruss element is aligned with the x coordinate axis. Consider the truss element inFigure 6.2, which is oriented in the three-dimensional space. For a truss structure in

F

Figure 6.1: Two-dimensional truss structure.

73

Page 74: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

x

y

z

y*

z*

x*

Fx*

Figure 6.2: Linear truss element in three-dimensional space.

three dimensions, a node will have three degrees of freedom, and in two dimensions,two degrees of freedom. For a two dimensional truss structure, the rotation is partic-ularly simple. Denoting the angle between the x-axis and the x⋆-axis as θ, the rotationmatrix has the form:

QT =

[cos θ sin θ− sin θ cos θ

]

(6.1)

The vector ae holds the displacement components at the nodes of an element. There-fore, the vector ae has four components (a component in the x and y direction at eachnode). The displacement components can be rotated using the matrix Q (see sec-tion 1.1) to give the nodal displacements in terms of the coordinate system alignedwith the axis of the truss element. Since truss elements are based on the assumptionthat only normal forces (σx⋆ ) can be transmitted, displacements in the y⋆-direction arenot resisted by an element. The only displacement of any consequence for an elementis in the x⋆-direction. The displacements at nodes one and two, of a linear bar, in thex⋆- and y⋆-directions are given by:

a1x⋆

a1y⋆

a2x⋆

a2y⋆

=

Q11 Q21 0 0Q12 Q22 0 00 0 Q11 Q21

0 0 Q12 Q22

a1xa1ya2xa2y

, (6.2)

where Qij are components of the matrix Q. Given that the only displacements ofinterest are the in x⋆-direction, the above problem can be reduced to give:

a1x⋆

a2x⋆

=

[Q11 Q21 0 00 0 Q11 Q21

]

a1xa1ya2xa2y

. (6.3)

The following definitions are now adopted:

a⋆

e =

a1x⋆

a2x⋆

, (6.4)

74 Version 0.2 January 21, 2011

Page 75: CT5123_LectureNotesThe Finite Element Method an Introduction

6.1 Rod elements in space

and

q =

[Q11 Q21 0 00 0 Q11 Q21

]

. (6.5)

The displacement in the x⋆-direction along the bar is therefore given by:

uh⋆ = N⋆a⋆

e = N⋆qae, (6.6)

where N⋆ contains the shape functions for a one-dimensional bar (see equation (4.19)for a linear element). The ‘star’ denotes that the shape functions are constructed rel-ative to the coordinate system on the bar. The strain in the x⋆-direction is thereforegiven by:

ǫh⋆ = uh⋆,x⋆ = B⋆qae (6.7)

Similarly, the derivative of a weight function w can be expressed in the local coordi-nate system in terms of the global degrees of freedom,

wh⋆,x⋆ = B⋆qbe (6.8)

(recall that be is a variation).Inserting now the discretised fields into the weak governing equation for a one-

dimensional bar, and eliminating be,

Ωe

(Bbe)TEBae dΩ =

Γh(Nbe)

Th dΓ, (6.9)

where the LHS of equation (6.9) is the stiffness matrix. Inserting the relationships inequations (6.7) and (6.8) into the weak governing equation (2.12), the element stiffnessmatrix is equal to:

ke =∫

Ωe

qTB⋆TEB⋆q dΩ. (6.10)

This is equivalent to ke = qTk⋆

e q, where k⋆

e is the standard one-dimensional stiffnessmatrix for a bar. Clearly, the stiffness matrix for a one-dimensional element can beformed, and with the aid of the matrix q it can be transformed into the global, multi-dimensional coordinate system.It is important to ensure that a truss structure does not form amechanism. A classic

sign of a mechanism is singularity of the global stiffness matrix of the structure.

January 21, 2011 Version 0.2 75

Page 76: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

x

y

fy Fy

T

x = x1 x = x2

Figure 6.3: Plane beam element Ω = (x1, x2).

x

y

v,x

v,x

Figure 6.4: Rotation of a line normal to the axis in a beam segment.

6.2 Beams

Two types of beams are considered in this section. The first is the classic Bernoulli-Euler beam, which is valid for relatively slender beams. The second is the Timo-shenko beam, which takes into account shear deformations. The development ofbeam elements follows the same steps as for continuum elements. The governingequation is identified and then the weak form developed. For simplicity, straight,in-plane beams are considered; there are no out-of plane forces or moments. Such abeam is illustrated in Figure 6.3.Consistentwith previous sections, the ‘domain’ of the beam, is denoted Ω = (x1, x2),

and its ends (the boundary of Ω) are denoted Γ = x1 ∪ x2. The outward normal isdenoted n.

6.2.1 Kinematics of a beam

Beam theory is based upon the assumption that planes which are normal to thebeam’s axis remain plane. For a transverse displacement v, Figure 6.4 shows therotation of the plane due to a rigid body rotation. Consider now a fibre in a beam

76 Version 0.2 January 21, 2011

Page 77: CT5123_LectureNotesThe Finite Element Method an Introduction

6.2 Beams

x

y

v,x

γ

Figure 6.5: Beam segment subjected to pure shear. The fibre is indicated by the heavyline.

which is initially perpendicular to the beam axis. Subjecting a segment from a beamto pure shear, the fibre will not rotate, as illustrated in Figure 6.5. Relative to the fibrewhich has not rotated, a plane which remains perpendicular to the axis undergoes arotation γ.For a beam segment subjected to both rotation and shear deformation, the rotation

θ of a fibre which is initially perpendicular to the beam’s axis is shown in Figure 6.6.It is clear from Figure 6.6 that

θ = v,x − γ. (6.11)

6.2.2 Equilibrium of a beam

The equilibrium equations for a beam can be developed in two ways. The first isto elaborate the kinematics of the beam, which together with some assumptions asto the stress in different directions can be inserted into the elasticity equations fromChapter 1. In the second method, which will be followed here, equilibrium of a beamcan be considered directly.The bending moment m in a beam is defined as

m =∫ h/2

−h/2σxx y dy, (6.12)

and the shear stress q is defined by

q =∫ h/2

−h/2σxy dy, (6.13)

Figure 6.7 show the ‘resultant’ force Q and moment M due to a moment m and ashear force q in a beam. Note that M = mn and Q = q n, where n is the outward unitnormal vector. Considering translational equilibrium of a beam segment Ω, it is clear

January 21, 2011 Version 0.2 77

Page 78: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

x

y

v,x

γ θ

Figure 6.6: Rotation of fibre in a beam.

x

y

+M

+Q

n n

Figure 6.7: Sign conventions for a bending moment and shear force resultant.

78 Version 0.2 January 21, 2011

Page 79: CT5123_LectureNotesThe Finite Element Method an Introduction

6.2 Beams

that:

dΩq n dΓ +

Ωfy dΩ = 0. (6.14)

Noting that∫

dΩ q n dΓ = q|x=L2 − q|x=L1 , it is clear that

Ωq,x dΩ +

Ωfy dΩ = 0. (6.15)

Since equilibrium must hold for an infinitely small segment of a beam, translationalequilibrium requires that

q,x + fy = 0. (6.16)

For rotational equilibrium, it is required that:

dΩmn dΓ −

dΩq nx dΓ −

Ωfyx dΩ = 0. (6.17)

This expression can be rearranged such that

Ωm,x dΩ −

Ωq dΩ −

Ωq,xx dΩ −

Ωfyx dΩ = 0. (6.18)

Satisfaction of the translational equilibrium equation implies that∫

Ω(q,x + fy)x dΩ =0, therefore rotational equilibrium requires that

m,x − q = 0. (6.19)

The boundary Γ of a beam is partitioned such that:

Γv ∪ ΓQ = Γ, Γv ∩ ΓQ = ∅, (6.20a)

Γθ ∪ ΓM = Γ, Γθ ∩ ΓM = ∅ (6.20b)

Denoting applied end forces Fy, distributed loads fy and applied moments T (allshown in Figure 6.3), the boundary conditions are

v = gv on Γv, (6.21a)

θn = gθ on Γθ , (6.21b)

mn = T on ΓM, (6.21c)

q n = Fy on ΓQ, (6.21d)

These equations, and boundary conditions, are valid for both Bernoulli-Euler andTimoshenko beam theories.

January 21, 2011 Version 0.2 79

Page 80: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

6.2.3 Bernoulli-Euler beam

A fundamental assumption in the Bernoulli-Euler theory is that a plane which is ini-tially normal to the longitudinal axis remains a plane and normal to the longitudinalaxis. This assumption implies that the shear rotation γ is equal to zero, so the rotationcan be directly related to the displacement v,

θ =dv

dx, (6.22)

which also implies that

κ =d2v

dx2. (6.23)

The bending moment in the beam is related to the curvature by:

m = −EIκ = −EId2v

dx2, (6.24)

where I is the moment of inertia of the beam. The negative sign is due to the signconvention in which the rotation and the resultant moment are in opposite directions.Taking now the derivative of all terms in equation (6.19) with respect to x, and then

inserting equation (6.16) yields:

d2m

dx2+ fy = 0. (6.25)

Assuming EI to be constant, and inserting the constitutive relationship from equation(6.24),

−EId4v

dx4+ fy = 0, (6.26)

which is the strong equation of equilibrium for a Bernoulli-Euler beam. Being afourth-order equation, two boundary conditions are required at both ends of thebeam. Dirichlet boundary conditions involve the prescription of the displacementor the rotation (equations (6.21a) and (6.21b)), and Neumann involve either the shearforce or moment (equations (6.21c) and (6.21d)). With appropriate boundary condi-tions, the boundary value problem is complete and can be solved.

Weak governing equation

Following the procedures from Chapter 2, the weak form of equilibrium for a beamcan be developed. Multiplying equation (6.25) by a weight function v, from an appro-priately defined space, which is equal to zero where Dirichlet (kinematic) boundaryconditions are applied (the bar is used in this section to denote a weight function) andintegration over the beam Ω yields:

Ωvm,xx dΩ +

Ωv fy dΩ = 0. (6.27)

80 Version 0.2 January 21, 2011

Page 81: CT5123_LectureNotesThe Finite Element Method an Introduction

6.2 Beams

Integrating by parts the term involving the moment M once yields:

−∫

Ωv,xm,x dΩ +

Γvm,xn dΓ +

Ωv fy dΩ = 0. (6.28)

Applying integrating by parts again, this time to the term∫

Ω v,xm,x dΩ,∫

Ωv,xxm dΩ −

Γv,xmn dΓ +

Γvm,xn dΓ +

Ωv fy dΩ = 0. (6.29)

Inserting now the Neumann (natural) boundary conditions from equations (6.21c)and (6.21d), and inserting the constitutive relation in equation (6.24), solving the gov-erning weak equation for a beam involves: find v ∈ S such that

−∫

Ωv,xxEIv,xx dΩ −

ΓMv,xT dΓ +

ΓQvFy dΓ +

Ωv fy dΩ = 0 ∀v ∈ V , (6.30)

where S and V are appropriately defined spaces. The integration domain for theboundary integrals has been changed since v = 0 on Γv, and v,x = 0 on Γθ . Note thata fourth-order problem, after integrating by parts twice, has second-order derivativesin its weak form. Consistency of the above weak form can be proven following thesame procedure as in in Section 2.1.The existence of second-order derivatives in the weak form deserves some special

attention. For the weak form to ‘make sense’, the trial functions (v ∈ S) and theweight (test) functions (v ∈ V) must possess a higher degree of regularity (roughlyspeaking, continuity) than for classical continuum problems. Both S and V must besubspaces of the Sobolev space H2 (Ω), which contains functions satisfying:

Ωv2 + v2,x + v2,xx dx < ∞. (6.31)

In one dimension this is equivalent to the trial and test functions being at least C1

continuous, which means that both their first and second derivatives exist. This is incontrast to second-order problems, which require C0 continuity only. For complete-ness, the spaces S and V are formally defined by:

S =

v | v ∈ H2 (Ω) , v = gv on Γv, v,x = gθ on Γθ

, (6.32a)

V =

v | v ∈ H2 (Ω) , v = 0 on Γv, v,x = 0 on Γθ

. (6.32b)

For the case of an elastic continuum, it was shown that if the weight function couldbe considered as a ‘virtual displacement’, it implies that the weak form of the govern-ing equation is identical to the equation of virtual work. Consider now:

v ≡ δv (6.33)

Inserting this relationship into equation (6.30) gives:∫

Ωδv,xxEIv,xx dΩ = −

ΓMδv,xT dΓ +

ΓQδvFy dΓ +

Ωδv fy dΩ (6.34)

which is the equation of virtual work for a Bernoulli-Euler beam beam.

January 21, 2011 Version 0.2 81

Page 82: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

6.2.4 Timoshenko beam

Timoshenko beams are more general Bernoulli-Euler beams as they allow for sheardeformation, and are hence suitable for relatively short beams. They also provide asolid introduction to moderately thick plate theories where the advantage of sheardeformable theories will become more apparent.

Timoshenko beam theory does not rely on the assumption that a plane which is ini-tially normal to the longitudinal axis remains normal to the longitudinal axis. Planesmust remain plane, but not necessarily normal. This means that shear deformationscan be taken into account. Recall from equation (6.11) that rotation θ of a plane isgiven by

θ =dv

dx− γ, (6.35)

where γ is the rotation due to shear. In terms of the shear force and properties of thebeam, it is related to the shear force by the constitutive relationship:

γ =q

GAS, (6.36)

where G is the shear modulus and As is the effective shear area. Relative to theBernoulli-Euler theory, an additional unknown, the shear strain γ, has been intro-duced. The governing equations are given by the equilibrium conditions in equations(6.19) and (6.16) with the constitutive relationships

m = −EIκ, (6.37)

q = GAsγ = GAs

(dv

dx− θ

)

, (6.38)

and considering v and θ to be the fundamental unknowns. Inserting the constitutiverelationships into the equilibrium equations in (6.19) and (6.16) leads to:

− EId2θ

dx2− GAs

(dv

dx− θ

)

= 0 in Ω, (6.39)

GAs

(d2v

dx2− dθ

dx

)

+ fy = 0 in Ω, (6.40)

which are two coupled second-order equations, the first for the rotation θ, and thesecond for the displacement v. Together with the previously defined boundary con-ditions, the problem is complete.

82 Version 0.2 January 21, 2011

Page 83: CT5123_LectureNotesThe Finite Element Method an Introduction

6.2 Beams

Weak governing equations

Multiplying equations (6.39) and (6.40) by appropriately defined weight functions θand v,

−∫

ΩθEIθ,xx dΩ −

ΩθGAs (v,x − θ) dΩ = 0, (6.41)

ΩvGAs (v,xx − θ,x) dΩ +

Ωv fy dΩ = 0. (6.42)

Applying integration by parts once,

Ωθ,xEIθ,x dΩ −

ΓθEIθ,xn dΓ −

ΩθGAs (v,x − θ) dΩ = 0, (6.43)

−∫

Ωv,xGAs (v,x − θ) dΩ +

ΓvGAs (v,x − θ) nx dΓ +

Ωv fy dΩ = 0, (6.44)

and then inserting the Neumann boundary conditions yields the weak problem for aTimoshenko beam of: find v ∈ Sv and θ ∈ Sθ such that

Ωθ,xEIθ,x dΩ −

ΩθGAs (v,x − θ) dΩ +

ΓMθT dΓ = 0, ∀θ ∈ Vθ (6.45)

−∫

Ωv,xGAs (v,x − θ) dΩ +

ΓQvFy dΓ +

Ωv fy dΩ = 0 ∀v ∈ Vv. (6.46)

A more precise definition of the necessary functions spaces should be provided tocomplete the problem. It is however assumed that θ = 0 on Γθ and that θ satisfiesthe rotation boundary condition, and v = 0 on Γv, and v satisfies the transverse dis-placement boundary condition. The test and trial functions should be at least C0 con-tinuous (in contrast to the C1 continuity for the Bernoulli-Euler theory). As with allproblems, consistency can be proven through the application of integration by parts.As before, considering δθ ≡ θ and δv ≡ v, and using γ = v,x − θ, adding the weak

forms in equations (6.45) and (6.46) is equivalent to the virtual work equation,

−∫

Ωδκ m dΩ +

Ωδγ q dΩ = −

ΓMδθ T dΓ +

ΓQδv Fy dΓ +

Ωδv fy dΩ (6.47)

For many mechanical problems, the weak form or virtual work expressions appearnaturally and can be used as a starting point in developing a finite element model.

6.2.5 Finite element formulations form beams

Euler beams

A Galerkin problem for a Bernoulli-Euler beam involves: find vh ∈ Sh such that:

Ωvh,xxEIv

h,xx dΩ = −

ΓMvh,xT dΓ +

ΓQvhFy dΓ +

Ωvh fy dΩ = 0 ∀vh ∈ Vh (6.48)

January 21, 2011 Version 0.2 83

Page 84: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

where Sh ⊂ S and V h ⊂ V are finite-dimensional spaces. As for continuum elements,we wish to express the displacement field v in terms of shape functions and nodaldegrees of freedom. The problem that arises is that simple C0 finite element shapefunctions are not suitable. The above equation requires the evaluation of the secondderivative of the interpolated displacement field. However, the second derivative ofa C0 continuous function does not exist in a classical sense. The use of C0 interpo-lations for fourth-order problems is not mathematically consistent and can lead tounpredictable results. Crucially, convergence of the solution is not assured for inter-polations with insufficient continuity.The solution is to use C1 shape functions. Such shape functions can be constructed

relatively easily in one dimension (the extension to multiple dimensions is howeverfar from trivial). Hermitian polynomials are C1 functions, and involve both displace-ment and rotational degrees of freedom. A Hermitian beam element with two nodeshas four degrees of freedom (two displacement degrees of freedom and two rotationdegrees of freedom). This results in a cubic interpolation of the displacement alongthe element. The displacement field vh is given by:

vh (x) =2

∑i

(Ni (x) vi + Mi (x) θi) , (6.49)

where vi and θi are degrees of freedom associated with node i, and the shape func-tions are equal to:

N1 =− (x− x2)

2 (−h + 2 (x1 − x))

h3(6.50a)

N2 =(x− x1)

2 (h + 2 (x2 − x))

h3(6.50b)

M1 =(x− x1) (x− x2)

2

h2(6.50c)

M2 =(x− x1)

2 (x− x2)

h2(6.50d)

for an element of length h with ends from x1 to x2 (x2 > x1). The displacement at apoint in the beam is given by:

vh = Nae =[N1 M1 N2 M2

]

v1θ1v2θ2

(6.51)

It is necessary to compute both the first and second derivatives of v with respect to x.The first derivative is given by:

vh,x = N,xae =[N1,x M1,x N2,x M2,x

]

v1θ1v2θ2

(6.52)

84 Version 0.2 January 21, 2011

Page 85: CT5123_LectureNotesThe Finite Element Method an Introduction

6.2 Beams

The second derivative of v is given by:

vh,xx = N,xxae =[N1,xx M1,xx N2,xx M2,xx

]

v1θ1v2θ2

(6.53)

Now that vh, vh,x and vh,xx can be computed given ae, they can be inserted into theGalerkin problem,

Ω(N,xxbe)

TEIN,xxae dΩ = −∫

ΓM(N,xbe)

TT dΓ +∫

ΓQ(Nbe)

TFy dΓ

+∫

Ω(Nbe)

T fy dΩ (6.54)

After some rearranging,

ΩN,xx

TEIN,xx dΩ ae = −∫

ΓMN,x

TT dΓ +∫

ΓQNTFy dΓ

+∫

ΩNT fy dΩ. (6.55)

The element stiffness matrix is given by:

ke =∫

ΩN,xx

TEIN,xx dΩ, (6.56)

and the RHS vector by:

fe =∫

ΓQNTFy dΓ −

ΓMNTT dΓ +

ΩNT fy dΩ. (6.57)

The operation to form the RHS vector essentially translates the applied loads intoequivalent nodal shear forces and moments.

January 21, 2011 Version 0.2 85

Page 86: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

Taking derivatives of the Hermitian shape functions in equation (6.50),

N1,x =2 (x− x2) (3x + h− 2x1 − x2)

h3, (6.58a)

N1,xx =2 (6x + h− 2x1 − 4x2)

h3, (6.58b)

M1,x =(x− x2) (3x− 2x1 − x2)

h2, (6.58c)

M1,xx =2 (3x− x1 − 2x2)

h2, (6.58d)

N2,x = −2 (x− x1) (3x− h− x1 − 2x2)

h3, (6.58e)

N2,xx = −2 (6x− h− 4x1 − 2x2)

h3, (6.58f)

M2,x =(x− x1) (3x− x1 − 2x2)

h2, (6.58g)

M2,xx =2 (3x− 2x1 − x2)

h2. (6.58h)

Assuming the centre of the element is at x = 0 (x2 + x1 = 0, x1 = −h/2), the aboveequations can be simplified significantly. Considering just the second derivativeswith respect to x,

N1,xx =12x

h3, (6.59a)

M1,xx =6x

h2− 1

h, (6.59b)

N2,xx = −12x

h3, (6.59c)

M2,xx =6x

h2+

1

h. (6.59d)

Inserting these terms into equation (6.56), the stiffness matrix is of the form:

ke =∫ h/2

−h/2

12x

h36x

h2− 1

h

−12x

h36x

h2+

1

h

EI

[12x

h36x

h2− 1

h−12x

h36x

h2+

1

h

]

dx. (6.60)

Integrating the terms in the stiffness matrix exactly from −h/2 to h/2 (assuming EI

86 Version 0.2 January 21, 2011

Page 87: CT5123_LectureNotesThe Finite Element Method an Introduction

6.2 Beams

to be constant), the element stiffness matrix is equal to:

ke =

12EIh3

6EIh2

− 12EIh3

6EIh2

6EIh2

4EIh − 6EI

h22EIh

− 12EIh3

− 6EIh2

12EIh3

− 6EIh2

6EIh2

2EIh − 6EI

h24EIh

. (6.61)

Timoshenko beams

The finite element formulation for the Timoshenko beam is relatively simple, due tothe second-order nature of the governing equations. This will allow the use of thestandard shape functions introduced in Chapter 4.TheGalerkin problem for the Timoshenko beam involves: find vh ∈ Sh

v and θh ∈ Shθ

such that∫

Ωθh,xEIθ

h,x dΩ −

ΩθhGAs

(

vh,x − θh)

dΩ = −∫

ΓMθhT dΓ ∀θh ∈ Vh

θ , (6.62)

Ωvh,xGAs

(

vh,x − θh)

dΩ =∫

Ωvh fy dΩ +

ΓQvhFy dΓ ∀vh ∈ Vh

v . (6.63)

Consider the representation of the fields vh and θh, and corresponding derivatives, interms of shape functions and nodal variable,

vh = Nvave , (6.64a)

θh = Nθaθe , (6.64b)

vh = Nvbve , (6.64c)

θh = Nθbθe , (6.64d)

A distinction is made between the shape functions for vh and θh as these may dif-fer. Inserting the expressions for the unknown fields in terms of nodal variables andvariations into equations (6.62) and (6.63) leads to:

Ωe

BθTEIBθ dΩ aθe +

Ωe

NθTGAsNθ dΩ aθ

e −∫

Ωe

NθTGAsBv dΩ ave

= −∫

Γe,MNθTT dΓ. (6.65)

Ωe

BvTGAsBv dΩave −

Ωe

BvTGAsNθ dΩaθ

e

=∫

Γe,QNvTFy dΓ +

Ωe

NvT fy dΩ, (6.66)

January 21, 2011 Version 0.2 87

Page 88: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

The stiffness matrix of an element is of the form[kθθ kθv

kvθ kvv

] [aθ

av

]

=

[fθ

fv

]

(6.67)

where the components of the the element stiffness matrix are given by

kθθ =∫

Ωe

BθTEIBθ + NθTGAsNθ dΩ, (6.68)

kθv = −∫

Ωe

NθTGAsBv dΩ, (6.69)

kvθ = −∫

Ωe

BvTGAsNθ dΩ, (6.70)

kvv =∫

Ωe

BvTGAsBv dΩ, (6.71)

and components of the element RHS vector are given by

f θ = −∫

Γe,MNθTT dΓ, (6.72)

f v =∫

Γe,QNvTFy dΓ +

Ωe

NvT fy dΩ. (6.73)

Note that the stiffness matrix is symmetric (kθv = kvθT).

Locking

Conceptually, Timoshenko beam theory is superior to the Bernoulli-Euler theory inthat it is valid for both short and slender beams. Ideally, only a Timoshenko beamelement would be necessary in practice, and both short and slender beams could beanalysed. This would be advantageous from the point of view of generality, andfor simplicity as the Timoshenko element used C0 shape functions. However, whenapplying Timoshenko elements for thin bending problems, the result are plagued byshear locking. This is the effect in which the shear contribution to the energy does notvanish, resulting in an overly stiff response.Consider a Timoshenko beam element of length L, with linear shape functions for

both the displacement and rotation. The components of the stiffness matrix are givenby:

kθθe =

EI

L+

GAsL

3−EI

L+

GAsL

6

−EI

L+

GAsL

6

EI

L+

GAsL

3

, (6.74)

kθve =

GAs

2−GAs

2

GAs

2−GAs

2

, (6.75)

88 Version 0.2 January 21, 2011

Page 89: CT5123_LectureNotesThe Finite Element Method an Introduction

6.2 Beams

and

kvve =

GAs

L−GAs

L

−GAs

L

GAs

L

(6.76)

Therefore, the stiffness matrix is of the form

ke =

EI

L+

GAsL

3−EI

L+

GAsL

6

GAs

2−GAs

2

−EI

L+

GAsL

6

EI

L+

GAsL

3

GAs

2−GAs

2

GAs

2

GAs

2

GAs

L−GAs

L

−GAs

2−GAs

2−GAs

L

GAs

L

(6.77)

If at one end the beam is clamped, θ1 = v1 = 0, and a shear load P is applied one end,

ke =

EI

L+

GAsL

3−GAs

2

−GAs

2

GAs

L

θ2

v2

=

0

P

(6.78)

Therefore, the displacement v2 is equal to

v2 =P (EI/L + GAsL/3)

EIGAs/L2 + G2A2s/12

(6.79)

If L is large,

v2 ≈4PL

GAs, (6.80)

which is independent of I, will yield a very stiff response. As L → 0,

v2 ≈PL

GAs, (6.81)

which is the correct result. Even with a very fine mesh, this element will exhibit avery stiff response.

If the term∫

ΩeNθTGAsN

θT dΩ is evaluated using one-point numerical integration

January 21, 2011 Version 0.2 89

Page 90: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

(which is reduced for this term), the element stiffness matrix would have the form

ke =

EI

L+

GAsL

4−EI

L+

GAsL

4

GAs

2−GAs

2

−EI

L+

GAsL

4

EI

L+

GAsL

4

GAs

2−GAs

2

GAs

2

GAs

2

GAs

L−GAs

L

−GAs

2−GAs

2−GAs

L

GAs

L

(6.82)

Now, for the one element problem clamped at one end, v2 is equal to

v2 =P (EI/L + GAsL/4)

EIGAs/L2(6.83)

If L is very large,

v2 ≈PL3

4EI(6.84)

which qualitatively the desired response, and as L → 0,

v2 ≈PL

GAs(6.85)

When using reduced integration, this element performs quite well when the mesh issufficiently well-refined. The case is similar for quadratic elements, where selectiveintegration (two-point) leads to a dramatic reduction in locking response.

90 Version 0.2 January 21, 2011

Page 91: CT5123_LectureNotesThe Finite Element Method an Introduction

6.3 Plate

x1

x2

x3p

t

θ2

θ1

Figure 6.8: Coordinate system for a plate.

6.3 Plate

Plates are effectively generalisations of beam elements to two spatial dimensions.They are flat two-dimensional entities, are are typically loaded out of plane.

Plate finite elements can be extremely complex and are an area of ongoing re-search. A serious problem stems from the need for C1 interpolations in the classicthin plate and shell bending theories. Given the enormous number of different plateand shell elements, this section does not provide an exhaustive coverage. The basicgoverning equations of shell and plate elements and the most common finite elementapproaches are discussed. Also, the relevant dangers in analysing plate and shellstructures with the finite element method are presented. More detailed coverage canbe found in a number of books (Zienkiewicz and Taylor, 1991; Hughes, 1987; Bathe,1996). A particularly accessible account can be found in Cook et al. (1989).

6.3.1 Plate kinematics

The adopted coordinate system and sign convention for rotations θα for plates isshown in Figure 6.8. For convenience, the convention differs from the right-handrule. The adopted definitions simplify the formulation as it will avoid the need for a−1 factor on particular terms. The surface of the plate in the x1–x2 plane is denotedΩ, and the boundary is Γ. The three coordinates are denoted x, y and z, or x1, x2and x3. Similarly, displacement may be denoted u, v and w (displacements in the x, yand z directions, respectively), or u1, u2 and u3 when using indexes. It is convenientto express many relationships for plates using index notation. T When using Greeksubscripts, summation is implied from one to two. The plate has a thickness t, andthe coordinate z = 0 corresponds to the mid-surface of the plate.

In plate theory, the displacement of a point is given by:

uα = −zθα (x, y) , (6.86a)

u3 = u3 (x, y) , (6.86b)

where θα is the rotation of a fibre in the plate (see Figure 6.9). The rotation of the

January 21, 2011 Version 0.2 91

Page 92: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

w

x3

w,α

γαθα

1

Figure 6.9: Plate kinematics with shear deformation included.

92 Version 0.2 January 21, 2011

Page 93: CT5123_LectureNotesThe Finite Element Method an Introduction

6.3 Plate

mid-surface of the plate is given by w,α, and the shear strain is given by γα,

γα = w,α − θα. (6.87)

Note that if γα = 0, then θα = w,α. From the displacement field in equations (6.86),the strain field can be calculated at any point (recall ǫ = (1/2)(ui,j + uj,i)).

ǫαβ =−z

2

(θα,β + θβ,α

)(6.88a)

ǫα3 =−θα + w,α

2(6.88b)

A useful quantity is the curvature, which is a second-order tensor and at a point isgiven by:

καβ =1

2

(θα,β + θβ,α

)= θ(α,β). (6.89)

6.3.2 Equilibrium of a plate

The equilibrium equations for a plate are developed here in the same fashion as forplates. The alternative approach would be to insert the plate kinematics into theelasticity equations.

The moment tensor mαβ in a plate is defined as:

∫ t/2

−t/2σαβ z dz (6.90)

From symmetry of the stress tensor, it is clear that the moment tensor is symmetric.The shear force vector qα is defined as:

∫ t/2

−t/2σα3 dz (6.91)

The different resultant moments and transverse forces acting on cross-sections of aplate are shown in Figure 6.10 (‘resultants’ are forces which are equivalent to a mo-ment or shear stress). It is useful to define a vector s which is normal to the vectorn, and lies in the plane of Ω. This allows the definition of following notation for

January 21, 2011 Version 0.2 93

Page 94: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

x1x2

x3

θ1

θ2

q1

q1

q2

q2

m11

m11

m12

m12

m21

m21

m22

m22

Figure 6.10: Moment and transverse shear force resultants acting on cross-sections ofa plate (adapted from Hughes (1987)).

quantities relative to an arbitrarily oriented plate edge:

mnn = mαβnβnα, (6.92a)

mns = mαβnβsα, (6.92b)

mnn,s =∂mnn

∂s, (6.92c)

mns,s =∂mns

∂s, (6.92d)

qn = qαnα, (6.92e)

θn = θαnα, (6.92f)

w,n = w,αnα (6.92g)

w,s = w,αsα (6.92h)

The quantities are illustrated in Figure 6.11.Translation equilibrium of a plate requires that:

∂Ωqα nα dΓ +

Ωpz dΩ = 0. (6.93)

Applying the divergence theorem to the term involving qα leads to

Ωqα,α dΩ +

Ωpz dΩ = 0, (6.94)

which must also hold for an infinitesimally small piece of the plate, therefore

qα,α + pz = 0, (6.95)

94 Version 0.2 January 21, 2011

Page 95: CT5123_LectureNotesThe Finite Element Method an Introduction

6.3 PlatePSfrag

x1x2

x3

θ1

θ2

q1q2m11

m12

m21

m22

n

s

mnn

mns

qn

Figure 6.11: Moment and transverse shear force resultants acting on an edge of a plate(adapted from Hughes (1987)).

is the equation for translational equilibrium. Considering now rotational equilibrium,

∂Ωmαβ nβ dΓ −

∂Ωqβnβ xα dΩ −

Ωpz xα dΩ = 0, (6.96)

which leads to:∫

Ωmαβ,β dΩ −

Ωqα dΩ −

Ωqβ,βxα dΩ −

Ωpz xα dΩ = 0, (6.97)

noting that(qβxα

)

,β= qβxα,β + qβ,αxα = qα + qβ,αxα. Since translation equilibrium

requires that qβ,β + pz = 0, rotational equilibrium requires that

mαβ,β − qα = 0. (6.98)

The boundary conditions for a plate are more complicated that for a beam, andare specific to the considered plate theory, hence boundary conditions are elaboratedupon in the context of a given theory. To complete the problem, constitutive relation-ships are required which relate the moment tensor and the shear force to deforma-tions. These constitutive relationships will also be elaborated upon in the context ofthe different theories.

6.3.3 Thin plates - Kirchhoff theory

The Kirchhoff plate model theory is analogous to the Bernoulli-Euler beam. It is ap-plicable for thin plates where shear deformations are negligible. Ironically, the out-wardly simplest plate theory presents the most problems when formulating the finite

January 21, 2011 Version 0.2 95

Page 96: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

element method. Assuming transverse shear deformations are zero, equation (6.87)reduces to:

θα = w,α (6.99)

which corresponds to the classical theory for beams and plates which assumes fibreswhich are initially normal to the mid-surface remain normal to the mid-surface. Theshear force qα is no longer ‘independent’. The goal is now to eliminate qα from thegoverning equations. This can be done by differentiating equation (6.98) and insert-ing equation (6.95),

mαβ,αβ + pz = 0. (6.100)

Since shear deformations are zero, the curvature κ is equal to:

καβ =1

2

(w,αβ + w,βα

). (6.101)

The moment is related to the curvature by

mαβ = −Cαβγδκγδ, (6.102)

where the constitutive tensor is equal to:

Cαβγδ =t3

12

(µ(δαβδβδ + δαδδβγ

)+ λδαβδγδ

). (6.103)

where λ = 2λµ/ (λ + 2µ).Inserting the constitutive relationship (6.102) into equation (6.100) yields a fourth-

order partial differential equation. After some rearranging, the governing equationcan be expressed in a particularly convenient form:

w,ααββ =12(1− ν2

)

Et3pz. (6.104)

Expanding this equation,

∂4w

∂x4+ 2

∂4w

∂x2y2+

∂4w

∂y4=

12(1− ν2

)

Et3pz. (6.105)

This equation is known as the ‘biharmonic equation’. It is oftenwritten in a shorthandformat using the biharmonic operator ∇4,

∇4w =∂4w

∂x4+ 2

∂4w

∂x2y2+

∂4w

∂y4. (6.106)

As a fourth-order equation, four different types of boundary conditions are pos-sible, and the Kirchhoff plate model requires two boundary conditions at all points

96 Version 0.2 January 21, 2011

Page 97: CT5123_LectureNotesThe Finite Element Method an Introduction

6.3 Plate

on the boundary. Considering the partition of the boundary in equation (6.20), theboundary conditions are given by:

w = gw on Γw (6.107a)

θn = gθ on Γθ (6.107b)

mnn = T on ΓM (6.107c)

qn + mns,s = Q on ΓQ (6.107d)

The first two boundary conditions are Dirichlet boundary conditions, and the lasttwo are Neumann boundary conditions. The last boundary condition is known asthe ‘modified shear’ boundary condition.

Weak form

The weak form of the governing equation for a thin plate is derived using the sameprocesses applied for second-order problems. The governing equation is multipliedby aweight function, then integrated by parts. Rather thanmultiplying the governingequation (6.105) by a weight function w, and integrating over the plate surface Ω, itis convenient to carry out the process on equation (6.100). Multiplying by a weightfunction w, for which w = 0 on Γw and w,n = 0 on Γθ , and integrating over the surfaceof the plate,

Ωwmαβ,αβ dΩ +

Ωwpz dΩ = 0, (6.108)

where Ω is the surface of the plate. Integrating the moment term by parts once,

−∫

Ωw,αmαβ,β dΩ +

Γwmαβ,βnα dΓ +

Ωwpz dΩ = 0. (6.109)

Using integration by parts again on the first term,∫

Ωw,αβmαβ dΩ −

Γw,αmαβnβ dΓ +

Γwmαβ,βnα dΓ +

Ωwpz dΩ = 0, (6.110)

which is the weak form of the governing equation for thin plate bending. The prob-lem here is that too many boundary terms appear in the first boundary integral. Themoment can only be applied normal to the boundary (mαβnβnα),

−∫

Γw,αmαβnβ dΓ = −

Γw,nmnn dΓ −

Γw,smns dΓ

= −∫

Γw,nmnn dΓ +

Γwmns,s dΓ − wmns|BA

(6.111)

The last term will be ignored, and leads to the well known ‘corner forces’ in thinplate theory. Inserting the above relationship into equation (6.110) (ignoring the pointterms), yields

Ωw,αβmαβ dΩ −

Γw,nmnn dΓ +

Γw (mns,s + qn) dΓ +

Ωwpz dΩ = 0. (6.112)

January 21, 2011 Version 0.2 97

Page 98: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

Inserting the Neumann boundary conditions, solving the weak problems then in-volves: find w ∈ S such that

Ωw,αβmαβ dΩ −

ΓMw,nT dΓ +

ΓQwQ dΓ +

Ωwpz dΩ = 0 ∀w ∈ V , (6.113)

where the functions in S satisfy the Dirichlet boundary conditions.Considering w as a virtual displacement δw, w,α as a virtual rotation δθα, and w,αβ

as the virtual curvature, δκαβ, the above equation is the equation of virtual work fora plate:

Ωδκαβmαβ dΩ −

ΓMδθnT dΓ +

ΓQδwQ dΓ +

Ωδwpz dΩ = 0 (6.114)

Recall that the bending moment mαβ is a function of the curvature, which in turninvolves second derivatives of w, hence the highest order derivatives in the weakgoverning equation are order two.For completeness, the spaces S and V for the weak form of Kirchhoff plate theory

are defined as follows:

S =

w | w ∈ H2 (Ω) , w = gw on Γw, w,n = gθ on Γθ

, (6.115a)

V =

w | w ∈ H2 (Ω) , w = 0 on Γw, w,n = 0 on Γθ

. (6.115b)

Consistency can proven through the repeated application of integration by parts.

6.3.4 Moderately thick plates – Reissner-Mindlin theory

The Reissner-Mindlin theory for plates includes shear deformation. It is analogous tothe Timoshenko beam. As such, it is applicable for both thick and thin plates. How-ever, some serious practical problems arise in finite element analysis when applyingReissner-Mindlin elements for the analysis of thin plates.For this theory, the governing equations for equilibrium are the same as for the

Kirchhoff theory. The difference lies in the kinematics and the constitutive model.The rotation of the plate cannot be calculated simply as a derivative of the transversedisplacement. The key to the success of this approach in a finite element context isthat the moment tensor mαβ is calculated from the curvature, which depends on θα

which is no longer calculated directly from w (θα 6= w,α). The problem now involvestwo different unknowns; w and θα.The governing equations for a thick plate are those given in Section 6.3.2. Unlike

for thin plates, the governing equations cannot be further reduced since θα is not adirect function of w. The equations of equilibrium are:

mαβ,β − qα = 0, (6.116a)

qα,α + pz = 0. (6.116b)

98 Version 0.2 January 21, 2011

Page 99: CT5123_LectureNotesThe Finite Element Method an Introduction

6.3 Plate

In addition to the constitutive relationship relating moment and curvature (equation(6.102)), a constitutive relation relating the shear forces to the shear strain is intro-duced,

qα = Cαβγβ = Cαβ

(w,β − θβ

), (6.117)

where

Cαβ = ktµδαβ, (6.118)

and k is a correction factor which is equal to 5/6.This set of equations can be reduced by eliminating qα,

mαβ,β − Cαβ

(w,β − θβ

)= 0 (6.119a)

Cαβ

(w,αβ − θβ,α

)+ pz = 0 (6.119b)

It is these equations which will be solved. This set of equations cannot be reducedfurther. This means than the governing equations are being solved in their irreducibleform.The structure of the governing equations for Mindlin-Reissner plates theory offers

a greater degree of flexibility in applying boundary conditions than the Kirchhofftheory. This is due to θα and w being decoupled. The ‘naturally’ occurring boundaryconditions involve

w = gw on Γw, (6.120a)

θα = gαθ on Γθ , (6.120b)

mαn = Tα on ΓM, (6.120c)

qn = Q on ΓQ. (6.120d)

Given that one of the unknowns, θα, is a vector, three boundary conditions must beapplied at all points on the boundary.

Weak form

To derive the weak form, both equations (6.119a) and (6.119b) are addressed. Firstly,equation (6.119a) is multiplied by a weight function θα,

Ωθαmαβ,β dΩ −

ΩθαCαβ

(w,β − θβ

)dΩ = 0. (6.121)

Integrating the above equation by parts,

−∫

Ωθ(α,β)mαβ dΩ +

Γθαmαβnβ dΓ −

ΩθαCαβ

(w,β − θβ

)dΩ = 0. (6.122)

Inserting now Neumann boundary conditions (θα = 0 where θα is prescribed) yields:

−∫

Ωθα,βmαβ dΩ +

ΓMθαTα dΓ −

ΩθαCαβ

(w,β − θβ

)dΩ = 0, (6.123)

January 21, 2011 Version 0.2 99

Page 100: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

which is the weak form of equation (6.119a). Multiplying now equation (6.119b) by aweight function w,

ΩwCαβ

(

w,αβ − θ(β,α)

)

dΩ +∫

Ωwpz dΩ = 0. (6.124)

Integrating the above equation by parts yields:

−∫

Ωw,αCαβ

(w,β − θβ

)dΩ +

ΓwCαβγβnα dΓ +

Ωwpz dΩ = 0. (6.125)

Inserting again Neumann boundary conditions (w = 0 where w is prescribed),

−∫

Ωw,αCαβ

(w,β − θβ

)dΩ +

ΓQwQ dΓ +

Ωwpz dΩ = 0, (6.126)

which is the weak form of equation (6.119b). The weak problem therefore involves:find θα ∈ Sθ and w ∈ Sw such that:

−∫

Ωθα,βmαβ dΩ +

ΓMθαTα dΓ

−∫

ΩθαCαβ

(w,β − θβ

)dΩ = 0, ∀θα ∈ Vθ (6.127a)

−∫

Ωw,αCαβ

(w,β − θβ

)dΩ +

ΓQwQ dΓ

+∫

Ωwpz dΩ = 0 ∀w ∈ Vw (6.127b)

Note that both weak equations contains derivatives no higher than order one. Itis equations (6.127a) and (6.127b) that are solved using the finite element method.This will require the interpolation of both the transverse displacement w and the ro-tation θα. However, the highest order derivative appearing for both terms is one.Hence, C0 shape functions can be applied.Combining both equations (multiplying equation (6.127b) by minus one), adopting

the notation δw = w, δκαβ = θ(α,β) and δγα = w,α − θα, and taking advantage of thesymmetry of mαβ, yields:

Ω−δκαβmαβ dΩ +

Ωδγαqα dΩ +

ΓMδθαTα dΓ −

ΓQδwQ dΓ

−∫

Ωδwpz dΩ = 0 (6.128)

which is the equation of virtual work for a Reissner-Mindlin plate. Note that differentto the virtual work equation for a Kirchhoff plate (6.114), the above equation includesa contribution to the energy due to shear (

Ω δγαqα dΩ).

100 Version 0.2 January 21, 2011

Page 101: CT5123_LectureNotesThe Finite Element Method an Introduction

6.3 Plate

6.3.5 Plate finite elements

As in elasticity, symmetry of mαβ and καβ allows the use of simplified ‘engineering’notation.

m = −Dbκ (6.129)

where m = (m11,m22,m12)T and κ = (κ11, κ22, 2κ12)

T. The matrix Db has the form:

Db =Et3

12 (1− ν2)

1 ν 0

ν 1 0

0 0(1− ν)

2

. (6.130)

For the shear forces qα,

q = Dsγ, (6.131)

where

Ds =

[tkµ 00 tkµ

]

. (6.132)

Kirchhoff plate elements

There are few reliable, flexible and robust Kirchhoff plate elements. The complica-tions are rooted in the need for C1 continuity. The majority of Kirchhoff plate ele-ments are non-conforming – this means that they do not satisfy C1 continuity. How-ever, some non-conforming elements yield satisfactory results. In place of requiringC1 continuity, a less severe requirement is that elements satisfy a ‘patch test’. A patchtest is a numerical test which tests the ability of an element to reproduce particularresults which provides and indication as to whether or not a particular element issuitable for analysis. In particular, it tests whether an element can represent rigidbody modes and a state of constant strain. In the context of plates, constant strainimplies constant curvature.A common Kirchhoff plate element is rectangular and has four nodes and twelve

degrees of freedom. It does not however satisfy C1 continuity. The element is stilluseful as it passes the patch test. Its shape functions are of the form:

N = c1x3y + c2xy

3 + c3x3 + c4y

3 + c5x2y + c6xy

2 + c7x2 + c8y

2

+ c9xy + c10x + c11y + c12. (6.133)

The applicability of this element is however limited by its inability to satisfy the patchtest as a quadrilateral – the element can only be used as a rectangle.There exists a range of Kirchhoff plate elements, none of which are of general ap-

plicability.

January 21, 2011 Version 0.2 101

Page 102: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

Reissner-Mindlin plate elements

Plate finite elements based on the Reissner-Mindlin principle do not require C1 con-tinuity. Two fields are interpolated (the transverse displacement and the rotation),with derivatives of order no higher than one for both fields appearing in the weakform. This is a significant advantage. It is then possible to form different elementsusing the same procedures as for plane and three-dimensional continuum elements.Isoparametric mappings can be used to construct arbitrary shapes.

The procedures developed in Chapter 4 for continuum elements can be applied todevelop plate elements. When using C0 shape functions with full integration, conver-gence requirements are guaranteed. The unknown fields, wh and θh are interpolatedusing C0 shape functions in terms of nodal unknowns,

wh = Nwaw (6.134)

θh = Nθaθ (6.135)

Taking derivatives,

wh,α = Bwaw (6.136)

κh = Bθaθ (6.137)

Inserting the discretised fields into equations (6.127a) and (6.127b) gives:

Ωe

BθTDbBθ dΩ aθe −

Ωe

NθTCBw dΩawe +∫

Ωe

NθTCNθ dΩaθe

= −∫

ΓMNT

θ T dΓ (6.138a)

Ωe

BwTCBw dΩawe −∫

Ωe

BwTCNθ dΩaθe

=∫

ΓQNwTQ dΓ +

Ωe

NwTpz dΩ (6.138b)

for an element. This can be expressed as:

[kwwe kwθ

e

kθwe kθθ

e

] [aweaθe

]

=

[fwef θe

]

, (6.139)

102 Version 0.2 January 21, 2011

Page 103: CT5123_LectureNotesThe Finite Element Method an Introduction

6.3 Plate

where

kwwe =

Ωe

BwTCBw dΩ (6.140a)

kwθe = −

Ωe

BwTCNθ dΩ (6.140b)

kθwe = −

Ωe

NθTCBw dΩ (6.140c)

kθθe =

Ωe

BθTDbBθ dΩ +∫

Ωe

NθTCNθ dΩ (6.140d)

fwe =∫

ΓQNwTQ dΓ +

Ωe

NwTpz dΩ (6.140e)

f θe = −

ΓMNT

θTT dΓ (6.140f)

Note again that the element stiffness matrix is symmetric. These are the equationsthat are assembled into a global stiffness matrix, and solved.Shape functions of different orders can be formulated (even different orders for

the transverse displacement and the rotation) and numerical integration is applied.While different elements can be used which will result in a consistent formulation,the performance of different elements may vary drastically.It is possible to simulate thin plates using elements based on the Reissner-Mindlin

formulation. It is of course attractive if both thick and thin plates can be analysedusing the same elements. To do this, the response of Reissner-Mindlin elements inthe limit (t → 0) should be studied. The result should converge to the thin platetheory. This is not the case in practice, and is discussed in the following section.

Mindlin-Reissner plate elements for thin plate problems

Ideally, thick plate formulations could be used for analysing thin plates. The problemwhich is confronted is shear locking. As t → 0, Reissner-Mindlin elements typicallyshow an overly stiff response, compared to exact thin plate solutions. The reason forthis is that the contribution of the transverse shear deformation to the energy does notvanish. The locking effect can be so extreme as to render elements unusable. For thisreason, extensive research efforts have been aimed at developing Reissner-Mindlinelements which do not lock in the thin plate limit.The simplest solution to shear locking is to use reduced or selective integration.

This excludes the spurious contribution of the transverse shear deformation to thebending energy. For example, a four-node quadrilateral with 2 × 2 integration forbending terms and one-point integration for transverse shear terms yields good re-sults for thin plate problems. Using full integration for this element results in extremeshear locking. Many Reissner-Mindlin elements involve reduced or selective integra-tion to avoid shear locking.Another possibility to avoid shear locking is to use a mixed formulation. The gov-

erning equations are not reduced to their primal form in terms of w and θα, but three

January 21, 2011 Version 0.2 103

Page 104: CT5123_LectureNotesThe Finite Element Method an Introduction

6 Structural elements for finite element analysis

fields are interpolated: w, θα and qα. It can be shown however that most mixed for-mulations are equivalent to reduced or selective integration (Hughes, 1987).Discrete Kirchhoff elements are based on thick shell formulations. What they re-

quire is that the Kirchhoff thin plate requirement of zero transverse shear strain ismet at a discrete number of points within an element. These elements do not requirereduced integration to avoid shear locking. However, some ambiguities arise whenapplying distributed loads.

6.4 Shell elements

Shells exist in a three-dimensional space. They are essentially curved plates. A simpleapproximation to a shell structure is to use a collection of flat combined plate/membraneelements to approximate the curved surface. Shell elements can also be formulateddirectly. The three-dimensional nature of the element makes them more complicatedthan plates. The direct formulation of shell elements is not addressed here. Detailsof their formulation can be found in numerous references (Bathe, 1996; Hughes, 1987;Cook et al., 1989; Zienkiewicz and Taylor, 1991).

6.5 Exercises

1. For a truss element with ends located at (x1, y1) and (x2, y2), find the rotationmatrix R that rotates from the (x, y) system to the convenient (x′, y′) system.

2. For a two-node Hermitian beam element, how does the bending moment andthe shear forces vary along the length of the element?

3. Sketch the Hermitian shape functions in equation (6.50).

4. Give the stiffness matrix for a two-node beam element in two-dimensions thatallows for axial deformations.

5. Give two examples of when finite element analysis with continuum elements ispreferable and two examples where beam, plate or shell elements is preferable.Provide a short reasoning for each case.

6. What is the danger in applying reduced or selective integration for plate ele-ments?

7. If a constant distributed load is applied normal to a plate surface, pz, calculatethe equivalent nodal forces for an eight-node Reissner-Mindlin element.

104 Version 0.2 January 21, 2011

Page 105: CT5123_LectureNotesThe Finite Element Method an Introduction

7 Analysis of the finite element method

It was shown in Chapter 3 that the finite element method calculates a solution whichis optimal in terms of the energy, given a collection of basis functions. While the solu-tion may be optimal, this does not tell how large the error is. It is of course importantto have some idea of the magnitude of the error and how it can be controlled and re-duced. Also, it is useful to know ‘how accurate’ different elements are. This is knownas the order of convergence – if the size of the element is halved, howmuch smaller willthe error be?

7.1 A priori error estimation

A priori error estimation does not provide quantitative information as to the error ina finite element simulation. What it does provide is the order of convergence. Theorder of convergence indicates how quickly the error reduces upon mesh refinement.The order depends on several factors. One is with which ‘norm’ the error is beingmeasured. For example, is the error in terms of displacements being measured, or theerror in terms of the strain. Another factor is the smoothness of the exact solution.For finite element analysis, the order of convergence depends heavily on the type ofelement. We want to know if we halve the element size (leading to at least a doublingin computational effort), how much smaller will the error be.Recall from Chapter 3 the error e at a point is defined as:

e = u− uh, (7.1)

where u is the exact solution and uh is the approximate solution. To give an indicationof the size of the error, it is necessary to consider a norm of the error, ‖e‖n. Thesubscript n indicates the type of norm. The Sobolev norm, which is the type of normwhich will be used here, is given by:

‖u‖n =

(n

∑α=0

Ω(Dαu)2 dΩ

)1/2

, (7.2)

where Dα denotes the α derivative. For example, setting n = 2, the Sobolev norm isequal to:

‖u‖2 =

(∫

Ω

(uu + u,iu,i + u,iju,ij

)dΩ

)1/2

. (7.3)

This scalar value is a measure of the ‘magnitude’ of a function. The magnitude ofthe error is quantified by calculating a norm of e. Two norms of particular interest

105

Page 106: CT5123_LectureNotesThe Finite Element Method an Introduction

7 Analysis of the finite element method

involve n = 0 and n = 1. For example, setting n = 0 gives:

‖e‖0 =

(∫

Ω(e · e) dΩ

)1/2

, (7.4)

which is a measure of the error in the displacements. Setting n = 1,

‖e‖1 =

(∫

Ω(e · e + ∇e : ∇e) dΩ

)1/2

, (7.5)

which now includes the gradient of e, thereby introducing a measure of the error inthe strain. A Sobolev semi-norm is given by

|u|n =

(∫

Ω(Dnu)2 dΩ

)1/2

, (7.6)

which involves only a particular order derivative. An important semi-norm is theenergy norm. It is defined by:

‖u‖2E = |u|2r =∫

Ω(Dru)2 dΩ, (7.7)

where r is the order of the derivatives appearing in the weak form.Consider the nodal interpolate uI ,

uI = ∑i

NiaIi . (7.8)

The nodal interpolate is equal to the exact solution at the nodes (u − uI = 0 at thenodes), hence it interpolates the exact solution using the provided shape functions.Interpolation theory provides the inequality

‖u− uI‖m ≤ chk+1−m|u|k+1, (7.9)

where k is the polynomial order, c is an unknown constant, and h is a measure ofthe element size. Note that to ensure convergence, k + 1 > m. Given that a finitesolution is known to be the best possible solution from the finite-dimensional spaceSh, it holds that

‖u− uh‖E ≤ ‖u− uI‖E. (7.10)

This means that the finite element solution is at least as accurate as the nodal inter-polate in terms if energy. In this way, the question of determining an error estimateis no longer a finite element question, rather a question which can be answered frominterpolation theory. Inserting now equation (7.10) into the above expression,

‖u− uh‖r ≤ Chk+1−r|u|k+1, (7.11)

106 Version 0.2 January 21, 2011

Page 107: CT5123_LectureNotesThe Finite Element Method an Introduction

7.2 A posteriori error estimation

where C is a constant, independent of h. For an elasticity problem, r = 1, hence

‖u− uh‖1 ≤ Chk|u|k+1. (7.12)

This implies that the solution converges in this norm at a rate equal to the polynomialorder. For practical purposes, this norm is dominated by the error in the strain, henceit represents the error in the energy. This result is however conditional upon the semi-norm |u|k+1 existing. If the exact solution is not sufficiently smooth, there may be nogain in accuracy through increasing the polynomial order.It would be useful to find an estimate in terms of lower norms, such as the error in

the displacement, ‖u− uh‖0. An estimate can be obtained using ‘Nitsche’s trick’ (seeStrang and Fix (1973) for details). It leads to the estimate:

‖u− uh‖s ≤ Chβ|u|k+1. (7.13)

where β = min (k + 1− s, 2(k + 1− r)).In elasticity, the two quantities of special interest are the displacements and the

strains (and hence the stresses). The error in the displacements is given by ‖e‖0,which is equal to

(∫

Ω e · e dΩ)1/2

. For k ≥ 1, the displacement error is:

‖e‖0 ≤ Chk+1|u|k+1. (7.14)

In terms of the strain,

‖e‖1 ≤ Chk|u|k+1, (7.15)

which implies that the approximate strains converge to the exact result slower thanthe approximate displacements. For linear elements, k = 1. Therefore,

‖e‖0 ≤ Ch2|u|2‖e‖1 ≤ Ch|u|2.

(7.16)

Hence linear elements are known as beingO(h2) in terms of displacements, andO(h)in terms of strains. The notation O(ha) means that the error is ‘of the order ha’. Ofcourse as h becomes small, the greater a the smaller the error. Larger a implies fasterconvergence. The convergence order for different polynomial orders is given in Ta-ble 7.1.

7.2 A posteriori error estimation

Once a finite element solution has been calculated, a natural question is how closethe solution is to the exact solution. This is error analysis, which tells ‘how good’ thecalculated solution is. The order of convergence of a particular element type indicateshow quickly the exact solution is approached, but does not tell how far the computedsolution is from the exact solution.

January 21, 2011 Version 0.2 107

Page 108: CT5123_LectureNotesThe Finite Element Method an Introduction

7 Analysis of the finite element method

polynomial order displacements k strains k1 2 12 3 23 4 34 5 4

Table 7.1: Order of convergence O(hk) for commonly used finite elements in termsof displacements and strain, assuming that the exact solution is sufficientlysmooth.

A posteriori error estimators are generally either residual-based or rely on stressrecovery techniques. Fortunately, some relatively simple error estimators exist forlinear problems. The most common is the Zienkiewicz-Zhu (ZZ) (Zienkiewicz andZhu, 1987) stress recovery error estimator. It is based on the property that the stressesat certain points within an element are super-convergent. That is, they converge fastertoward the exact solution than other points. The essence of the error estimator isto take the stresses at the super convergent points and form an interpolation of thestress using these points. Then, by comparing the stresses interpolated from the superconvergent points with the stress computed from the derivative of the displacementfield, the error can be estimated.Error estimation is a rich field of applied mathematical research. Research is ongo-

ing for more sophisticated error estimators for more complicated problems.

7.3 Adaptivity

To improve the accuracy of a finite element solution, adaptivity techniques can beemployed in combination with an error estimator. Based on an analysis of the error,a finite element mesh can be adapted to improve the solution.Two forms of adaptivity are commonly used: p-adaptivity and h-adaptivity. p-

adaptivity involves increasing the polynomial order of elements to reduce the errorin the calculated solution. h-adaptivity uses another technique to reduce the error.It relies upon reducing the size of the element. Hence, a new mesh must be con-structed. It is possible to generate an entirely new mesh, or to devise procedureswhich sub-divide elements where the error is large. Amathematically appealing con-cept is hp-adaptivity. It has an extraordinary rate of convergence, but is challengingto implement.It may be desirable to reduce the error to a specified value throughout a mesh.

Given a estimation of the error, adaptivity can be employed to reduce the error whereneeded. Then, the problem is re-analysed, the error is again estimated, and adaptivityis employed. The process can be repeated until the prescribed error tolerance is met.Given a measure of the error, an adaptive scheme is required to reduce the error tothe prescribed levels. At this point, knowing the order of convergence of an elementmay prove useful. To halve the error in a particular problem using h-adaptivity, it

108 Version 0.2 January 21, 2011

Page 109: CT5123_LectureNotesThe Finite Element Method an Introduction

7.4 Exercises

helps to know how quickly the error reduces for a particular element.

7.4 Exercises

1. Give the order of convergence in terms of the strain for the following element:

a) T3

b) Q4

c) T6

d) Q8

e) Q9

2. When using Q4 elements, how much smaller would you expect the error inthe displacements and the stresses to be if all the elements are made 2.7 timessmaller?

3. List some advantages and disadvantages of p- and h-adaptivity.

January 21, 2011 Version 0.2 109

Page 110: CT5123_LectureNotesThe Finite Element Method an Introduction
Page 111: CT5123_LectureNotesThe Finite Element Method an Introduction

8 Solvers for large linear systems

Note: This chapter is still being developed.The finite element solution of practical problems often leads to very large systems

of equations. Large systems require significant memory to store the matrices andlarge computational effort to solve the system. To find the finite element solution to aproblem, the following system needs to be solved:

Ka = f (8.1)

The stiffness matrix K typically has a number of special properties. Due to the com-pact support of finite element shape functions, the system of equations is sparse. Thismeans that the stiffness matrix contains many zero elements. Furthermore, if nodesare numbered in an efficient manner, the matrix is also banded. This mean that non-zero terms are located close to the diagonal. Another special property is symmetry.For all problems examined in these notes, the stiffness matrix is symmetric. This is aconsequence of using a Galerkin formulation.Storing only non-zero elements in the computer memory leads to enormous sav-

ings in memory. Further savings can be achieved for symmetric matrices by storingonly the diagonal terms and non-zero terms above the diagonal. However, unlikefinite difference methods, the exact structure of the stiffness matrix is not constant.It varies for different meshes. Therefore, a general method is required to solve thesystem of equations.Gauss elimination – number of operationsO

(n3)

In finite element code however, Gauss elimination is rarely used. Typically moreefficient direct or iterative solvers are used. Direct solvers yield a result with a knownnumber of steps. Iterative solvers approach the exact solution. The number of stepsperformed depends on the desired accuracy.

8.1 LU-decomposition

A commonly used direct solution technique is known as LU-decomposition. It isparticularly effective for solving moderately sized problems where the bandwidth ofK is limited (as is the case for a well constructed finite element mesh). The system ofequations Ka = f is rewritten as:

LUa = f (8.2)

where L is a lower triangular matrix with ones on the diagonal and U is an upperdiagonal matrix. The motivation is that it is relatively simple to solve triangular ma-trices.

111

Page 112: CT5123_LectureNotesThe Finite Element Method an Introduction

8 Solvers for large linear systems

The first step is to factorise thematrixK in L andU. In a computer implementation,the factorised matrices can be stored in the memory allocated for K. Then, the systemof equations:

Ly = f (8.3)

is solved (the ‘result’ being y). This is step is known as ‘forward substitution. Thefollowing step, ‘backward substitution’, is then to solve the system:

Ua = y (8.4)

which yields the solution to the original problem, a.The procedure can be implemented in a computer programming surprisingly sim-

ply. The following code extracts for solving a banded system are taken from Goluband Loan (1996).

for k=1:n-1

for i=k+1:min(k+p,n)

K(i,k) = K(i,k)/A(k,k)

end

for j=k+1:min(k+q,n)

for i=k+1:min(k+p,n)

K(i,j) = K(i,j) - K(i,k)*K(k,j)

end

end

end

There are several variations on this procedure to improve its performance. ‘Pivot-ing’ is often used to avoid numerical problems associated with large and small termson the diagonal. Also, for symmetric systems the algorithm can be modified, yieldingconsiderable computational savings.

8.2 Iterative solvers

Direct solvers are relatively simple to program and are robust. However, they canbecome prohibitively expensive for very large problems. An alternative is the use ofiterative solvers. Iterative solvers ‘iterate’ toward the exact solution. The process isstopped when the desired tolerance is reached. For large system of equations, iter-ative solvers are generally faster than direct solvers, although the time required forconvergence depends heavily on the nature of the matrix K. Unlike direct solvers, itis not possible to compute exactly the required computational effort before startingthe computation.To be added:Gauss-SiedelKrylov subspace methodsConjugate-gradientThe efficiency and robustness of iterative solvers can be improved significantly

through the use of preconditioning.

112 Version 0.2 January 21, 2011

Page 113: CT5123_LectureNotesThe Finite Element Method an Introduction

9 Time-dependent problems

Until now, the finite element method has been applied only for time-independentproblems. In this chapter, the unsteady heat equation and elastodynamics are consid-ered in which the time dimension must be addressed.

9.1 Elastodynamics

The majority of this chapter deals with elastodynamics problems. Two approacheswill be elaborated. The first, modal analysis, relies on linearity of the underlyingproblem and is suited to vibration analysis. The second, less subtle, approach is moregeneral and suited to wave propagation problems.

9.1.1 Governing equation and the weak form for elastodynamics

The equation of motion is given by:

ρu = ∇ · σ + b (9.1)

where ρ is the density and u = ∂2u/∂t2 is the acceleration vector. In mathematicalterms, this equation differs significantly from the static case as the governing equa-tion is hyperbolic. Similar to static problems, its is complemented by boundary condi-tions. On parts of the boundary, time-dependent Dirichlet boundary conditions areprescribed,

u = g on Γg. (9.2)

On other parts of the boundary, time-dependent Neumann boundary conditions areapplied,

σn = h on Γh (9.3)

Dynamic problems require some ‘extra’ information compared to their quasi-staticcounterparts. These are initial conditions. Initial conditions correspond to the con-ditions at time zero (t = 0). Elastodynamics involves the second derivative of thedisplacement with respect to time, therefore two initial conditions are required:

u (x, 0) = u0 (x) (9.4a)

u (x, 0) = v0 (x) (9.4b)

where v is the velocity (v = ∂u/∂t).All problems up to this chapter were elliptic. With elliptic problems, information

travels through the domain immediately. For example, when a load is applied at the

113

Page 114: CT5123_LectureNotesThe Finite Element Method an Introduction

9 Time-dependent problems

free end of a restrained rod, a reaction force is felt immediately at the other end. Theequations for elastodynamics are hyperbolic. With hyperbolic problems ‘information’travels at finite speeds. If a bar, restrained at one end, is hit with a hammer at the freeend, a stress wave will travel through the bar and a force at the restrained end willnot be felt until the stress wave arrives.Deriving the weak form for dynamic problems follows the familiar procedure.

Multiplying equation (9.1) by a weight function w, which is independent of time,and integrating gives:

Ωρw · u dΩ =

Ωw · (∇ · σ) dΩ +

Ωw · b dΩ (9.5)

Integrating by parts, using the same steps outlined in Chapter 2, and inserting Neu-mann boundary conditions, solving the weak form involves: for a given t > 0, findu ∈ S such that

Ωρw · u dΩ = −

Ω∇sw : σ dΩ +

Ωw · b dΩ +

Γh

w · h dΓ ∀w ∈ V . (9.6)

9.1.2 Semi-discrete Galerkin form

To reach a finite element formulation, the Galerkin form must be developed. Fromthe weak from in the previous section, the Galerkin problem involves: find uh ∈ Sh

such that∫

Ωρwh · uh dΩ = −

Ω∇swh : σh dΩ +

Ωwh · b dΩ

+∫

Γh

wh · h dΓ ∀wh ∈ Vh, (9.7)

which is known as ‘semi-discrete’. This stems from the fact that the dependence ontime t has not been addressed in the same fashion as the spatial dependency x. Thetime dimension is left continuous.To solve dynamic problems using a computer, like for the static case the governing

equation must be expressed in terms of nodal unknowns and basis functions. Thisis again done using finite element shape functions. The velocity and accelerationfields are represented using the shape functions, which when considering the semi-discrete formulations are constant in time. Therefore, the finite-dimensional velocityand acceleration fields in an element are given by:

uh = Nae, (9.8a)

uh = Nae, (9.8b)

where ae = dae/dt and ae = d2ae/dt2. Inserting the discretised displacement field

and the expression for the acceleration field into equation (9.7) and rearranging, foran element,

Ωe

NTρN dΩ ae = −∫

Ωe

BTDB dΩ ae +∫

Ωe

NTb dΩ +∫

Γh,e

NTh dΓ. (9.9)

114 Version 0.2 January 21, 2011

Page 115: CT5123_LectureNotesThe Finite Element Method an Introduction

9.1 Elastodynamics

This equation is commonly called the ‘semi-discrete’ equation. This equation can bewritten is a shorthand format as:

Me ae + keae = fe (9.10)

where Me is the element mass matrix. Once the element contributions have beenassembled into the global mass and stiffness matrices and the global RHS vector, fora given time tn

Man + Kan = fn. (9.11)

Before this equation can be solved, a strategy is required to deal with the time deriva-tives of a.

9.1.3 Mass matrix

There are several methods to form the mass matrix. The obvious choice from thevariational approach is the consistent mass matrix. This is formed similarly to thestiffness matrix,

Mconse =

Ωe

ρNTN dΩ. (9.12)

This is typically formed by integrating numerically, in the same fashion as for theelement stiffness matrix. As with the element stiffness matrix, the mass matrix issymmetric and will have off-diagonal terms.Before the variational basis of the finite element method was properly understood,

it was not entirely clear how the mass matrix should be formed. A common approachwas to form a lumped mass matrix. This corresponds to having discrete, lumpedmasses at each node. Since finite element shape functions are equal to unity at theirnode and zero at all other nodes, the lumped mass matrix has non-zero terms only onthe diagonal. This property is highly advantageous in combination with some timeintegration schemes, as will be discussed in the following sections.Since lumped schemes do not follow naturally from the variational formulation,

there is some freedom in determining exactly how the lumpedmass matrix should becalculated. Perhaps the simplest procedure to form lumped mass matrices is to formthe matrices using numerical integration, but with integration points located only atelement nodes. Since shape functions are equal to unity at their node and zero at allother nodes, this will yield a diagonal mass matrix. It is however possible that nodeswill have zero or negative masses. Another procedure is based on summing rows ofthe consistent mass matrix.

Mlumpii =

n

∑j=1

Mconsij (9.13)

where n is the dimension of the mass matrix. All off-diagonal terms are equal to zero.This procedure however can lead to negative masses on the diagonal. Other more

January 21, 2011 Version 0.2 115

Page 116: CT5123_LectureNotesThe Finite Element Method an Introduction

9 Time-dependent problems

sophisticated lumping schemes are possible which will avoid negative masses. Thereis no rich theory underlying the choices. The performance of lumped mass matricesis guided primarily by experience. They two key points are that zero and negativemasses on the diagonal should be avoided. It will become clear when addressingparticular time integration schemes why lumped mass matrices are popular.

9.1.4 Damping

Problems in structural dynamics often involve damping. The precise source of damp-ing and its mathematical form is often vague. Damping is often included by addingthe term Ca to the governing equations,

Ma + Ca + Ka = f , (9.14)

where the matrix C represents the sources of damping in the structure. A simplemethod of introducing damping is to say:

C = τM + ψK, (9.15)

where τ and ψ are user chosen parameters. This is known as Rayleigh damping. Thecontribution of the stiffness matrix to the damping matrix increases damping with in-creasing frequency. Conversely, the contribution of the mass matrix increases damp-ing with decreasing frequency. The choice of the parameters τ and ψ is certainlyarbitrary, representing the uncertainty in the source of damping. A discussion can befound in Cook et al. (1989).Damping due to the material response can also be included. It can be included

through the damping matrix C, or through the constitutive model relating stress andstrain. This topic is left to other courses which address non-linear material behaviour.

9.2 Heat equation

The heat equation is introduced here as a step to the problems in elastodynamics.Unlike elastodynamics, it involves first order derivatives with respect to time. Thesteady-state version of the equation was introduced in Section 2.3. In strong form,unsteady heat diffusion is governed by:

ρcu + ∇ · q = f , (9.16)

where in the context of diffusion of heat, c is the ‘capacity’, u is the temperature,q = −κ∇u is the heat flux, kappa is the conductivity. The problem requires boundaryconditions, as outlined in Section 2.3, and initial conditions. Given that only the firstderivative with respect to time is involved, only one type of initial condition may beprovided, namely the temperature at t = 0,

u (x, t) = u0 (x) . (9.17)

116 Version 0.2 January 21, 2011

Page 117: CT5123_LectureNotesThe Finite Element Method an Introduction

9.3 Frequency analysis for elastodynamics

The heat equation is parabolic. If one end of a rod is heated, this is immediately felt(an infinitesimal amount) and increases with time.Following the usual processes in developing theweak form, the semi-discrete Galerkin

problem for the heat equation involves: for a given t > 0, find uh ∈ Sh such that∫

Ωwhρcuh dΩ +

Ω∇wh · κ∇uh dΩ−

Γh

whh dΓ =∫

Ωwh f dΩ ∀wh ∈ Vh (9.18)

In matrix form, this can be expressed at time tn as:

Man + Kan = fn. (9.19)

9.3 Frequency analysis for elastodynamics

If an undamped system is allowed to vibrate freely (no forcing terms), its motion isharmonic. The displacements at the nodes can be described by

a = a cos (ωt− α) , (9.20)

where ω is the frequency (radians per second). The acceleration is therefore given by:

a = −ω2a cos (ωt− α) . (9.21)

Inserting these results into equation (9.11) and rearranging,(

−ω2M + K)

a = 0, (9.22)

which is a matrix eigenvalue problem. Non-trivial solutions (a 6= 0) require that:

det(

K − ω2M)

= 0, (9.23)

where ω are the natural frequencies of the system. If stiffness and mass matrices areof dimension n, there are n eigenvalues λ (λ = ω2). The eigenvectors are a, whichare also known as natural modes.For explicit time integration procedures, it is important to know the highest natural

frequency of the discrete problem. The difficulty is that the size of the problem inequation (9.23) can be very large. An upper bound to the highest frequency can befound by calculating the frequencies for all individual elements.

det(

ke − ω2eme

)

= 0 (9.24)

The highest frequency from all elements provides an upper bound to the highestfrequency of the problem.For a one-dimensional linear element, it is relatively simple to calculate the natural

frequencies. It turns out that for a lumpedmass matrix, the highest frequency is equalto:

ωe =2

L

E

ρ(9.25)

for an element of length L. For the consistent mass matrix, ωe = 2√3/L

√E/ρ.

January 21, 2011 Version 0.2 117

Page 118: CT5123_LectureNotesThe Finite Element Method an Introduction

9 Time-dependent problems

9.4 Modal analysis for elastodynamics

Modal analysis involves the dividing of the response of a structure into a number ofmodes. The sum of the modes gives the total displacement. For linear problems, it isthen possible to treat each mode individually. Consider a solution

a = ψi cos (ωit + θi) . (9.26)

Inserting the above equation into the unforced version ( f = 0) of equation (9.11) ,

(

K− ω2i M)

Ψi = 0, (9.27)

where Ψi are eigenvectors, and are known as vibration modes, and ωi are the naturalfrequencies. The nodal displacements can be expressed as a summation of eigenfunc-tions,

a (t) = ∑i

αi (t) Ψi (9.28)

where αi (t) is the amplitude of the ith eigenmode.A special property of the eigenmodes Ψi is that they are orthogonal. This means that:

ΨiTMΨj =

1 i = j,

0 i 6= j,(9.29)

and

ΨiTKΨj =

ω2i i = j,

0 i 6= j.(9.30)

Orthogonality implies that the vibration modes do not interact with each other. It isthen possible to treat each mode separately.Inserting equation (9.28) into equation (9.11) yields:

M ∑i

αiΨi + K ∑i

αiΨi = f (9.31)

Pre-multiplying both sides of this equation by ΨjT,

ΨjTM ∑

i

αiΨi + ΨjTK∑

i

αiΨi = ΨjT f (9.32)

The orthogonality propertymeans that the equation has been decoupled into nm sim-ple, separate equations,

αi + ω2i αi = Ψi

T f . (9.33)

118 Version 0.2 January 21, 2011

Page 119: CT5123_LectureNotesThe Finite Element Method an Introduction

9.5 Time stepping algorithms

Now, for each mode of interest, the above equation can be solved. Typically, thisequation can be solved analytically. For the unforced case, equation (9.33) is a homo-geneous ordinary partial differential equation, with the solution

αi = c1 sin (ωit) + c2 cos (ωit) . (9.34)

Solutions for forced cases are dependent on the type of loading.In applying modal analysis, the computational effort lies in finding the eigenvec-

tors and eigenvalues. In structural analysis, usually only the low frequency modeshave a significant influence on the structural response. Therefore, equation (9.33) isonly solved for a few modes. Modal analysis relies on the orthogonality property ofthe eigenfunctions. Therefore it is limited to linear analysis. For non-linear problems,the orthogonality property does not hold. Further discussion of modal methods canbe found in Craig (1981) and Cook et al. (1989).

9.5 Time stepping algorithms

Time stepping algorithms involve schemes to increment the time in discrete steps∆t. Given the values of an, an and an at time tn (and perhaps also at earlier timessteps), the values an+1, an+1 and an+1 at time tn+1 = tn + ∆t are needed. To do this,a time stepping scheme is needed. Time is then incremented until the desired time isreached.Time stepping schemes are distinguished by being either explicit or implicit. Ex-

plicit integrators rely only on information at time step n, and perhaps earlier steps(such as n− 1) to compute the solution at time step n + 1. Implicit schemes rely oninformation at time step n + 1, and perhaps information at time step n and earliersteps. This means a system of equations must be solved for implicit schemes. Hence,implicit schemes generally require significantly extra computational effort, comparedto explicit schemes.Accuracy is not the difference between explicit and implicit schemes. Explicit

schemes can be constructed to have a high degree of accuracy (such as the 4th or-der Runge-Kutta method, which is O(∆t4) accurate). Conversely, implicit schemesmay have a low degree of accuracy (such as the backward Euler scheme, which isO(∆t) accurate). The difference between explicit and implicit schemes lies in stabil-ity. Stability means the range of time steps ∆t for which an integrator will calculate astable result (small errors do not grow exponentially). If an integrator is unstable, itwill ‘blow-up’, rapidly diverging from any sensible result. There are known schemesof exceptional accuracy, but due to their extremely poor stability properties they areuseless. There are no known unconditionally stable explicit schemes.

9.5.1 One-step algorithms for the heat equation

To introduce time stepping algorithms, the unsteady heat equation is first consid-ered. It provides a step towards the more complicated schemes for elastodynamics.

January 21, 2011 Version 0.2 119

Page 120: CT5123_LectureNotesThe Finite Element Method an Introduction

9 Time-dependent problems

A popular family of algorithms are ‘generalised trapezoidal’ methods. They involve:

an+1 = an + ∆t ((1− θ) an + θan+1) , (9.35)

where 0 ≤ θ ≤ 1. Well knownmethods are the explicit forward Euler (θ = 0) method,and the implicit trapezoidal (θ = 1/2) and backward Euler (θ = 1) methods. Inpractice, the forward Euler is not particularly useful as its stability properties arepoor. For the problems to be considered here, the trapezoidal method is particularlyattractive as it is unconditionally stable, and is second-order accurate. The backwardEuler method is also unconditionally stable, but only first-order accurate.In matrix form, the heat equation at time tn+1 must satisfy:

Man+1 + Kan+1 = fn+1. (9.36)

Rearranging equation (9.35),

an+1 =1

θ∆tan+1 −

1

θ∆tan −

(1− θ)

θan, (9.37)

and inserting the above result into equation (9.36) gives,

(1

θ∆tM + K

)

an+1 = fn+1 +1

θ∆tMan +

(1− θ)

θMan. (9.38)

In compact notation, the problem to solve an+1 has become

Kan+1 = fn+1, (9.39)

where

K =1

θ∆tM + K (9.40a)

fn+1 = fn+1 +1

θ∆tMan +

(1− θ)

θMan, (9.40b)

and an is computed from equation (9.37).

9.5.2 One-step algorithms for elastodynamics

The most commonly used time integration scheme in solid and structural mechan-ics is the generalised Newmark scheme. Newmark time integrators are a family ofschemes, both explicit and implicit. Choosing parameters appropriately for a New-mark algorithm yields a number of different, well known integrators. The Newmarkalgorithm gives an+1 and an+1 as:

an+1 = an + ∆tan +∆t2

2((1− 2β) an + 2βan+1) (9.41a)

an+1 = an + ∆t ((1− γ) an + γan+1) (9.41b)

120 Version 0.2 January 21, 2011

Page 121: CT5123_LectureNotesThe Finite Element Method an Introduction

9.5 Time stepping algorithms

where β and γ are parameters which define the nature and properties of the algo-rithm. Appropriate choices of β and γ yield well known integration methods. TheNewmark method is unconditionally stale for:

2β ≥ γ ≥ 1

2(9.42)

For γ = 1/2, a Newmark scheme is second-order accurate.A commonly used time integrator is the central difference method. It is necessary

to express the terms a and a in terms of a. Calculating the necessary terms usingcentral differences,

an =an+1 − an−1

2∆t(9.43a)

an =an−1 − 2an + an+1

∆t2. (9.43b)

It is possible to rearrange these terms and show that they are equivalent to equation(9.41) for β = 0 and γ = 1/2. It is clear that this algorithm is explicit – it is possibleto express an+1 in terms of quantities at n and earlier times (which are known). Thisscheme is O(∆t2) accurate, but it is conditionally stable. It is stable for:

∆t ≤ 2

ωh(9.44)

where ωh is the highest natural frequency (highest value from det(K − ω2M

)= 0.

The term ωh can be estimated for linear elements as 2c/L, where c is the dilatationalwave speed (c =

√E/ρ) and L is the length of an element. Therefore,

∆t ≤ L

c, (9.45)

which is the Courant, Friedrichs and Lewy (CFL) stability condition.Another commonly used time integrator is based on the trapezoidal rule,

an+1 = an +∆t

2(an + an+1) , (9.46a)

an+1 = an +∆t

2(an + an+1) . (9.46b)

Inserting equation (9.46a) into equation (9.46b),

an+1 = an + ∆tan +∆t2

4(an + an+1) (9.47)

This integrator is implicit. It corresponds to β = 1/4 and γ = 1/2 in the New-mark family of integrators. This method is unconditionally stable and the accuracyis O(∆t2). Its stability properties are attractive, but as will be shown later, it requiresthe factorisation of a large matrix. It is also energy conserving.

January 21, 2011 Version 0.2 121

Page 122: CT5123_LectureNotesThe Finite Element Method an Introduction

9 Time-dependent problems

Explicit time integration – central difference approach

The system of equations to be solved, with damping, has the appearance:

Man + Can + Kan = fn. (9.48)

It is assumed that a and its time derivatives are known at time t and unknown attime t+ ∆t (corresponding to n+ 1). Inserting the central difference expressions fromequation (9.43),

Man−1 − 2an + an+1

∆t2+ C

an+1 − an−1

2∆t+ Kan = fn. (9.49)

Rearranging the above equation such that all terms at t + ∆t are on the LHS and allterms at time t are on the RHS,

(1

∆t2M +

1

2∆tC

)

an+1 =1

∆t2M (2an − an−1) +

1

2∆tCan−1 − Kan + fn. (9.50)

Recall that the displacement vector a is known at step n and all previous steps, andunknown at step n + 1. Given an and an−1, it is possible to calculate an+1. The aboveequations can be written in a shorthand format as:

Man+1 = fn, (9.51)

where

M =

(1

∆t2M +

1

2∆tC

)

(9.52)

and

fn =1

∆t2M (2an − an−1) +

1

2∆tCan−1 − Kan + fn. (9.53)

Then, the displacement vector a at step n + 1 is given by:

an+1 = M−1 fn (9.54)

If both M and C are diagonal matrices, an+1 can be calculated without solving asystem of equations (hence the attractiveness of lumped mass matrices when usingexplicit time integrators). In practice, it is not necessary to form the stiffness matrix K.The term Kan is equivalent to:

Kan =∫

ΩBTσn dΩ. (9.55)

A difficulty with explicit central-difference time integration is the need for infor-mation at n − 1 when starting a calculation. A procedure is required to ‘start’ the

122 Version 0.2 January 21, 2011

Page 123: CT5123_LectureNotesThe Finite Element Method an Introduction

9.5 Time stepping algorithms

algorithm at t = 0. Combining equations (9.43) it is possible to express an−1 in termsof quantities at n (time t = 0), which are the initial conditions.

an−1 = an − ∆tan +∆t2

2an (9.56)

The vector an−1 can be used to start the time integration procedure.The central difference procedure is popular in finite element analysis. In combi-

nation with a lumped mass matrix, it is very efficient and suitable for very largeproblems. Furthermore, it is second-order accurate. The significant drawback is theconditional stability. The time step must be chosen carefully for a particular discreti-sation.

Implicit time integration – the Newmark family

Formulation of a Newmark scheme starts by inserting the expressions for the velocityand accelerations into:

Man+1 + Can+1 + Kan+1 = fn+1 (9.57)

Rearranging the expressions in equation (9.41) for β 6= 0 to express the accelerationsand velocity at step n + 1 in terms of step n and earlier,

an+1 =1

β∆t2(an+1 − an)−

1

β∆tan −

1

2βan + an (9.58a)

an+1 = an

+ ∆t

(

(1− γ) an + γ

(1

β∆t2(an+1 − an)−

1

β∆tan −

1

2βan + an

))

(9.58b)

These equations are then inserted into equation (9.57). For simplicity, damping isignored. This yields,

M

(1

β∆t2(an+1 − an) −

1

β∆tan −

1

2βan + an

)

+ Kan+1 = fn+1 (9.59)

Rearranging such that all unknown quantities appear on the LHS, and all knownquantities on the RHS,

(1

β∆t2M + K

)

an+1 = M

(1

β∆t2an +

1

β∆tan +

1

2βan − an

)

+ f (9.60)

which in a short-hand notation can be expressed as:

Kan+1 = fn+1 (9.61)

January 21, 2011 Version 0.2 123

Page 124: CT5123_LectureNotesThe Finite Element Method an Introduction

9 Time-dependent problems

Since the stiffness matrix K is not diagonal, calculating an requires the solution of a

system of equations. At time step n, the vector f can be calculated from an, the termsin f are prescribed and both M and K can be formed. Solving the resulting system ofequations yields an+1. Note that calculating the ‘new’ an+1 introduces a dependencyon the parameter γ.With the Newmark scheme, numerical damping can be introduced by choosing

γ > 1/2. Numerical damping aids in controlling undesirable spurious high fre-quency modes in the solution. However, choosing γ 6= 1/2 reduces the integrationscheme to first order accuracyO(t).

9.5.3 α-Method for elastodynamics

In dynamic simulations, it is usually desirable to introduce some numerical dampingto suppress spurious high-frequencymodes. The problemwith the Newmark schemeis that the introduction of any numerical damping reduces the order of accuracy fromtwo to one. A number of algorithms have been developed to preserve second-orderaccuracy while allowing for the introduction of numerical damping. One such al-gorithm is the α-Method, which is also known as the Hilber-Hughes-Taylor Method(Hughes, 1987). It involves using a Newmark scheme to solve :

Man+1 + (1− α)Kan+1 − αKan = fn+1+α, (9.62)

where fn+1+α = fn+1+θ∆t. If α = 0, the α-Method reduces to the Newmark scheme. If

−1/3 < α < 0, γ = (1− 2α) /2 and β = (1− α)2 /4, the algorithm is unconditionallystable and second-order accurate. Numerical dissipation can be controlled throughthe parameter α. Decreasing α increases the dissipation.

9.6 Space-time formulations

Time as a degree of freedom.

9.7 Exercises

1. Calculate the consistent and lumped mass matrices for the four-noded quadri-lateral element.

2. Derive the mass matrix for a two-noded beam element.

3. Rearrange equation (9.41) to show for β = 0 and γ = 1/2 the scheme is equiva-lent to a central-difference procedure.

124 Version 0.2 January 21, 2011

Page 125: CT5123_LectureNotesThe Finite Element Method an Introduction

References

Bathe, K.-J. (1996). Finite Element Procedures. Prentice-Hall, New Jersey.

Braess, D. (2001). Finite Elements: Theory, fast solvers, and applications in solid mechanics.Cambridge University Press, Cambridge.

Brenner, S. C. and Scott, L. R. (1994). The Mathematical Theory of Finite Elements Meth-ods. Springer-Verlag, New York.

Cook, R. D., Malkus, D. S., and Plesha, M. E. (1989). Concept and Applications of FiniteElement Analysis. John Wiley & Sons, New York, third edition.

Craig, R. R. (1981). Structural Dynamics. John Wiley and Sons, Inc., New York.

Ern, A. and Guermond, J. L. (2004). Theory and Practice of Finite Elements. Springer-Verlag, New York.

Golub, G. H. and Loan, C. F. V. (1996). Matrix Computations. The John Hopkins Uni-versity Press, Baltimore.

Hughes, T. J. R. (1987). The Finite Element Method - Linear Static and Dynamic FiniteElement Analysis. Prentice-Hall, London, England.

Reddy, B. D. (1998). Introductory Functional Analysis. Springer, London.

Strang, G. and Fix, G. (1973). Analysis of the Finite Element Method. Prentice-Hall,Englewood Cliffs, New Jersey.

Zienkiewicz, O. C. and Taylor, R. L. (1989). The Finite Element Method, volume 1.McGraw-Hill Book Company, Berkshire, fourth edition.

Zienkiewicz, O. C. and Taylor, R. L. (1991). The Finite Element Method, volume 2.McGraw-Hill Book Company, Berkshire, fourth edition.

Zienkiewicz, O. C. and Zhu, J. Z. (1987). A simple error estimator and adaptive pro-cedure for practical engineering analysis. International Journal for Numerical Methodsin Engineering, 24:337–357.

125