0% found this document useful (0 votes)
11 views241 pages

IntroToFEA Red

Uploaded by

Pugazh Mech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views241 pages

IntroToFEA Red

Uploaded by

Pugazh Mech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 241

Introduction to Finite Element Analysis

(Spring 2025)

Prof. Dr. Dennis M. Kochmann


Mechanics & Materials Lab
Institute of Mechanical Systems
Department of Mechanical and Process Engineering
ETH Zurich
mm.ethz.ch

Copyright © 2025 by Dennis M. Kochmann


Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

These lecture notes cover the concepts and examples discussed during lectures.

They are not a complete textbook, but they do provide a thorough introduction to all course
topics as well as some extra background reading, extended explanations, and examples beyond
what can be discussed in class.

You are strongly recommended to visit the lectures and to take your own notes, while studying
these lecture notes alongside for support and further reading. The exercise sessions will help
deepen the acquired knowledge and, in particular, apply the concepts through coding projects.

The lecture topics covered during each week are announced at the beginning of the semester in
the course syllabus, so you are welcome to read up on the relevant topics ahead of time.

2
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Contents

0 Preface 7

1 Review of Mechanics and Thermodynamics 8


1.1 Kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 Stresses and tractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3 Constitutive relations and linear elasticity . . . . . . . . . . . . . . . . . . . . . . 12
1.4 Voigt notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5 Kinetics: mechanical balance equations . . . . . . . . . . . . . . . . . . . . . . . . 15
1.6 Thermodynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.7 (Initial) boundary value problems . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

2 Computational Methods 23
2.1 Why do we need computational methods? . . . . . . . . . . . . . . . . . . . . . . 23
2.2 Dimensionless forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3 Method of Finite Differences 28

4 Stability of Finite Difference Schemes 35


4.1 CFL condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2 Von Neumann analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.3 Phase error analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.4 Advantages & disadvantages of direct methods . . . . . . . . . . . . . . . . . . . 44

5 Structural Analysis, Bars & Trusses 46


5.1 From finite differences to bar elements . . . . . . . . . . . . . . . . . . . . . . . . 46
5.2 Assembly operations in 1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.3 Components of the stiffness matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.4 2-node bar element in higher dimensions . . . . . . . . . . . . . . . . . . . . . . . 49
5.5 Assembly operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.6 Direct stiffness method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.7 Principle of minimum potential energy . . . . . . . . . . . . . . . . . . . . . . . . 55
5.8 Limitations & outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6 Variational Calculus 58
6.1 Variational calculus: an introductory example . . . . . . . . . . . . . . . . . . . . 58
6.2 Functionals and function spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.3 Variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.4 Helpful relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.5 A general variational structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.6 Summary & extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

7 Rayleigh-Ritz Method 70

8 Strong form & weak form 73


8.1 Strong form and classical solutions . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.2 Weak form and weak solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

3
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

8.3 Strong vs. weak form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75


8.4 Principle of virtual work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

9 Interpolation spaces 79
9.1 Approximate solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
9.2 Shape functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
9.3 Approximation power & completeness . . . . . . . . . . . . . . . . . . . . . . . . 82

10 The Finite Element Method 85

11 Finite element spaces: polynomial shape functions in 1D 89


11.1 2-node bar element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
11.2 Polynomial interpolation of higher order . . . . . . . . . . . . . . . . . . . . . . . 92
11.2.1 Lagrangian interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
11.2.2 Hierarchical interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

12 Beam Elements 95
12.1 Review of beam theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
12.2 Euler-Bernoulli beam theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
12.3 Variational formulation of beam theory . . . . . . . . . . . . . . . . . . . . . . . 99
12.4 2-node (Euler-Bernoulli) beam element . . . . . . . . . . . . . . . . . . . . . . . . 102
12.5 Two-node beam element in 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
12.6 Extension to 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
12.7 Timoshenko beam element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
12.8 Bar vs. beam vs. solid elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

13 The general mechanical variational problem for 2D/3D solids 109


13.1 Strong, weak form, and variational structure . . . . . . . . . . . . . . . . . . . . . 109
13.2 Discrete problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
13.3 Special case: linear elasticity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

14 Assembly 114

15 Shape functions in higher dimensions 115


15.1 Parametric mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
15.2 Shape function derivatives for the isoparametric mapping . . . . . . . . . . . . . 117

16 Simplicial elements 120


16.1 Linear Triangle (T3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
16.2 Extension to 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
16.3 Finite element implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
16.3.1 Special case linear elasticity . . . . . . . . . . . . . . . . . . . . . . . . . . 124
16.3.2 General case of nonlinear elastic materials . . . . . . . . . . . . . . . . . . 124
16.4 Higher-order triangles and tetrahedra . . . . . . . . . . . . . . . . . . . . . . . . 125

17 The bilinear quadrilateral element 126

18 Higher-order and higher-dimensional elements: Q8, Q9, 8-node brick 131

4
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

19 Numerical quadrature 133


19.1 Example: Riemann sums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
19.2 Gauss quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
19.2.1 Gauss-Legendre quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . 135
19.2.2 Other Gauss quadrature rules . . . . . . . . . . . . . . . . . . . . . . . . . 136
19.3 Higher dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

20 FEM: which quadrature rule to use? 139


20.1 Integrals in the FE context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
20.2 Which quadrature rule to use? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

21 Boundary conditions 142


21.1 External forces & Neumann boundary conditions . . . . . . . . . . . . . . . . . . 142
21.2 Dirichlet boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
21.2.1 Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
21.2.2 Condensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

22 Element defects: locking and hourglassing 150

23 Iterative solvers 154


23.1 Netwon-Raphson (NR) method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
23.2 Damped Newton-Raphson (dNR) method . . . . . . . . . . . . . . . . . . . . . . 156
23.3 Quasi-Newton (QN) method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
23.4 Line search method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
23.5 Nonlinear Least Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
23.6 Gradient flow method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
23.7 Conjugate Gradient (CG) method . . . . . . . . . . . . . . . . . . . . . . . . . . 158
23.8 Dirichlet boundary conditions and iterative solvers . . . . . . . . . . . . . . . . . 158
23.9 Rigid-body motion & zero-energy modes . . . . . . . . . . . . . . . . . . . . . . . 159

24 Dynamics 161

25 Vibrations 166
25.1 Free, undamped vibrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
25.2 Forced vibrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
25.3 Structural damping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

26 Time integration schemes 172


26.1 Explicit time integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
26.2 A reinterpretation of finite differences . . . . . . . . . . . . . . . . . . . . . . . . 173
26.3 Implicit time integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
26.3.1 Newmark’s method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
26.3.2 HHT method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
26.4 On the use of mass matrices in time integration schemes . . . . . . . . . . . . . . 179

27 Modal decomposition 180

28 Extensions 183
28.1 Finite kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

5
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

28.2 Thermal problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

29 Error analysis and adaptivity, common mistakes 189


29.1 Finite element error analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
29.2 Smoothing and adaptivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
29.3 Common errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

30 FEM – Extensions & Applications 195

Appendices 198

A Operator notation for differential equations 199

B Structural Mechanics Review: Stiffness Matrix Assembly 200

C 2-Node Beam Element via the Direct Stiffness Method 205

D Methods of Weighted Residuals 206


D.1 Weighted Residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
D.2 Collocation Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
D.3 Subdomain Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
D.4 Method of Least Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
D.5 Galerkin’s method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
D.6 Higher Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

E Vector Spaces 214

F Function Spaces 215

G Approximation Theory 219

H Sobolev spaces 223

I Operators 226

J Uniqueness of solutions 227

K Vainberg’s theorem 228

L Mechanical variational problem in higher dimensions 229

M Approximation power and completeness 232

N Gauss quadrature 234

O Quadrature error estimates 236

Index 237

6
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

0 Preface

Finite Element Analysis (FEA) has become a ubiquitous tool used by engineers and scientists
across all disciplines. Whether it is commercial software like Abaqus® , Ansys® and LS-Dyna®
or open-source libraries such as FEniCS or FEAP – FEA tools are available in many different
flavors and have become an essential ingredient for the solution of (among others) mechanical,
thermal, and multi-physics initial boundary value problems.

The availability and ease of use of FEA codes comes with a risk though: the ability to produce
colorful plots by the push of a button does not obviate the user’s expert knowledge in deploy-
ing FEA tools properly and responsibly (ultimately, lives could be endangered and significant
economic losses incurred, if engineering design is flawed). What element types to use, what
quadrature rules to use, what stress components to plot, how to interpolate or extrapolate and
how to present results: these are questions to be answered by the FEA user, and they require
a fundamental knowledge of what the black box called FEA does for us.

To turn the black box into a versatile and understandable toolbox, this course discusses the
fundamentals of numerical methods with a focus on the finite element method. Rather than
studying and using commercial software packages, we study FEA from the basics and with the
goal of understanding the theoretical underpinning as well as the details of numerical imple-
mentations. This, of course, requires us to present the underlying mathematical and mechanical
theories and to discuss the wide variety of finite element types and choices to be made when
using FEA.

Since no course in computational methods is effective without a computational component,


we will write our own finite element code (using jupyter notebooks), starting with simple bar
and beam elements for truss and frame problems and advancing to solid elements for static
and dynamic analysis. We will also include finite differences for time-dependent problems.
Throughout the course, we will complete a number of computational projects, which build upon
each other and grow our finite element code over time in a modular fashion – ultimately providing
a simple but versatile FEA code that is no longer a black box but which we will understand
line by line.

To follow the course contents, it is assumed that you have a background in solid and structural
mechanics (equivalent to Mechanics I (Statics & Kinematics), Mechanics II (Mechanics of Ma-
terials), and Mechanics III (Dynamics) at ETH Zurich) as well as basic knowledge in analysis
and linear algebra. We will begin with a brief review of solid mechanics and an introduction to
the notation used in this course, after which we will dive into numerical methods.

This set of notes is not meant to be a complete textbook, and you are encouraged to take your
own notes during lectures (and to ask questions!). Though I made great effort to ensure that
these notes are free of essential typos or errors, I cannot rule out that some have remained and
I apologize in advance for any typos that may have survived. If you spot any mistakes, feel free
to send me a highlighted PDF during or at the end of the semester, so I can make sure those
are corrected. I would like to thank Helen Le Clézio for proof-reading some of the sections.

I hope you will find the course interesting and these notes supportive while studying this Intro-
duction to Finite Element Analysis.

Dennis M. Kochmann
Zurich, February 2025

7
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

1 Review of Mechanics and Thermodynamics

Throughout this course, we will introduce and discuss numerical methods for solving physical
problems such as mechanical, thermal, and related initial boundary value problems. Therefore,
let us begin by reviewing the basics of continuum mechanics and use this review to also introduce
the notation used throughout the remainder of the course. We describe the deformation and
motion of rigid and deformable bodies as well as their thermodynamics. Let us begin with the
mathematical framework to describe the motion and deformation of bodies (which we call the
kinematics), followed by the connection between deformation and motion, on the one hand,
and those forces and stresses responsible for the latter, on the other hand (these thermodynamic
balance laws are referred to as the kinetics). Of course, this brief introduction cannot replace
a thorough introduction to the mechanics and thermodynamics of solids (which is assumed to
have happened in other classes1 ), so that we here only review the basic principles as needed for
later discussions.

1.1 Kinematics

Every point in space has a position x, which we describe in d dimensions using a Cartesian
coordinate system with basis {x1 , . . . , xd } and origin O. Points are described by vectors with
respect to O, which in turn are defined by components in the Cartesian reference frame with
basis {e1 , . . . , ed }. Therefore, we write
d
X
x= xi ei = xi ei . (1.1)
i=1

Here and in the following, we use Einstein’s summation convention, which implies that any
index appearing twice in a product must be summed over (here, e.g., we drop the explicit
summation in the above equation and simply write xi ei , knowing that we must sum over i from
1 to d). For a thorough review of index notation, see the Tensor Notes available online. Note
that the summed index (i in the above example) is called a dummy index and can be replaced
by any other index.

As we are using an orthonormal, Cartesian basis, we must have


(
1, if i = j,
ei · ej = δij = (1.2)
0, if i ̸= j,

where we introduced δij , the so-called Kronecker delta. Based on this orthogonality, an inner
product of two vectors u and v can be written as

d
!  d 
d Xd d
X X X X
u·v = ui ei ·  vj e j =
 ui vj (ei · ej ) = ui vi = ui vi = uk vk , (1.3)
i=1 j=1 i=1 j=1 i=1

where we again dropped the sum symbol, following the summation convention.

Note that an index appearing only once in a term is a free index, which is not to be summed
(the number of free indices reveals the type of quantity). For example, ui are the components
1
See, e.g., the online lecture notes for Dynamics for a review of the kinetic balance laws, the description of
motion of rigid and deformable bodies as well as wave motion in elastic solids.

8
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

of a vector u (no summation). ∂ui /∂xi is a scalar (the divergence of vector field u). Tij are the
components of a second-order tensor T , as we will see further below.
We describe a body as a collection of material points
in space. In mechanical problems, a body usually has a
reference configuration, which describes the initial,
undeformed configuration of the body and which we
call Ω. In the following, we often speak of the body
Ω. The boundary of body Ω is denoted by ∂Ω. For
example, in three dimensions, ∂Ω is the surface of body Ω.
+ u+
The deformation and motion of a body Ω is described by
x2 y
the displacement field x
e2
u = u(x, t), (1.4) e3 x1
e1 ¶W W
x3
which maps every undeformed point x ∈ Ω in the refer-
ence configuration onto a deformed location y ∈ Rd , such
that the corresponding deformed point (as shown above) is at a position
y(x, t) = x + u(x, t). (1.5)
From the displacements, we may derive kinematic variables such as the velocity field
d d
v(x, t) = y(x, t) = u(x, t) (1.6)
dt dt
and the speed v = ∥v∥, defining the norm of a vector as
√ √
∥v∥ = v · v = vi vi . (1.7)
The acceleration field is defined as
d d2
a(x, t) = v(x, t) = 2 u(x, t). (1.8)
dt dt
For convenience, we will also use dots to denote derivatives with respect to time, so that v = u̇
and a = v̇ = ü.

The deformation of a body is best described not by the displacement field (which would also
include rigid-body motion) but by the strain tensor ε, which is a second-order tensor defined
as
1h i
ε= grad u + (grad u)T (1.9)
2
with Cartesian components
 
1 ∂ui ∂uj 1
εij = + = (ui,j + uj,i ) (1.10)
2 ∂xj ∂xi 2
We here used index notation again and, specifically, the gradient of a vector field, which is
a second-order tensor with components
∂ui
[grad u]ij = = ui,j . (1.11)
∂xj
Here and in the following, we use brackets [...] to indicate vector (or tensor) components in
the Cartesian frame. A comma in an index implies differentiation with respect to those x-
coordinate(s) following the comma. For example, f,i = ∂f /∂xi and ui,j = ∂ui /∂xj as well as
f,jk = ∂ 2 f /∂xj ∂xk .

9
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

L e22 L e12
2
e2 L L
e1 L e22 L e12
L e11 L e11 2
2 2

From undergraduate mechanics we know that the diagonal components ε11 , ε22 and ε33 are the
nominal strains along the three coordinate directions of an infinitesimal cube (implying ex-
tension or shrinkage). The off-diagonal components εij with i ̸= j, by contrast, represent shear
strains (implying angle changes). The effect of the strain components in 2D are schematically
shown above. By definition εij = εji , so that the strain tensor is symmetric: ε = εT .

Example 1.1. Biaxial extension

The below plots illustrate the example of a homogeneous square body Ω = (0, 1)2 deformed
biaxially with the displacement field
   
u1 0.1x1
u(x) = 0.1x1 e1 − 0.1x2 e2 ⇔ = , (1.12)
u2 −0.1x2
so the body stretches in the x1 -direction with a uniform strain ε11 = u1,1 = 0.1, and it shrinks
in the x2 -direction with a uniform strain ε22 = u2,2 = −0.1. The shear stress component
ε12 = 21 (u1,2 + u2,1 ) is zero.

————
Example 1.2. Plate with a hole

A more complex example is a homogeneous plate of dimensions 6 × 6 with a circular hole


of radius a = 0.5 at its center, made of a material with Poisson’s ratio ν. When stretched
horizontally in the x1 -direction, the displacement field in the plate can be obtained analytically
as2
a(r2 − a2 )(1 + ν)
  
4a 2r
u1 ∼ a + cos θ + cos(3θ) ,
r a r3
(1.13)
a(r2 − a2 )(1 + ν)
  
2a(1 − ν) 2rν
u2 ∼ a + sin θ − sin(3θ) ,
r a r3
2
Note that the exact solution involves some scaling that depends on the applied load and the material’s
stiffness, which we neglect here, so that we only present the displacement field up to a constant coefficient.

10
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

where (r, θ) are polar coordinates (radius and angle), measured from the center of the plate
and against the horizontal axis, respectively. In this case, the displacement and strain fields are
inhomogeneous, as illustrated below, showing strain maxima at the perimeter of the hole.

————

1.2 Stresses and tractions

In order to deform a body Ω, forces (or displacements) must be applied. Like strains being more
appropriate than displacements to measure a body’s deformation (because they set displace-
ments into relation to the body’s dimensions), stresses are more indicative of a body’s loading
than forces (because stresses set the applied forces into relation to the area on which they act).
Consider an infinitesimal cube with (infinitesimal) force vectors x2
Fi applied to the surface of (infinitesimal) area Ai and normal t2 s22
to the xi -axis (positive in the +xi -direction, negative in the −xi - s12
direction). We define the traction vector ti on the ith surface as s32 s21
-t1 s23
s11
 
σ1i s13 s31 x1
dFi s33 t1
t(ei ) = ⇒ [t(ei )] = [ti ] = σ2i  (1.14)
t3

dAj x3
σ3i
which defines the stress components σij in 3D. Repeating the above for all three surface (i.e.,
for surfaces perpendicular to x1 , x2 and x3 ) yields in the components of the stress tensor in
3D as
 
σ11 σ12 σ13
[σ] = (t1 , t2 , t3 ) = σ21 σ22 σ23  , (1.15)
σ31 σ32 σ33

i.e., the ith column of σ is the traction vector ti on a surface normal to xi .

e2 s12 s32 e2 s22


e3 s11
e1 s13 s33 s31 s23 s21
e1 e3

11
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Analogous to the strains, components σ11 , σ22 , and σ33 represent nominal stresses (loading
of the cube in tension or compression along its axes), while components σij (with i ̸= j) imply
shear stresses acting parallel to the surface that they act on, as schematically shown above.

More generally, the traction vector acting on any surface with normal n is given by

t(n) = σn (1.16)

Note that by angular momentum balance on the cube (and in close analogy to the strain tensor),
we must have σ = σ T (i.e., σ is symmetric).

As a convenient scalar metric to assess the local state of loading of a body and its likelihood to
show plastic yield, the von Mises stress can be computed from the stress tensor components
as
r
2 + σ2 + σ2 )
(σ11 − σ22 )2 + (σ22 − σ33 )2 + (σ33 − σ11 )2 + 6(σ12 23 31
σvM = . (1.17)
2
Shown below is the von Mises stress distribution in the elements of a chain (as obtained from
a finite element simulation). The von Mises stress can be understood as a measure of a ductile
material’s risk of showing plastic yielding (when σvM reaches the yield limit of a ductile material,
it is likely to show the onset of plasticity).

1.3 Constitutive relations and linear elasticity

A constitutive relation describes the link between the deformation (the strains) within a
body and the causes of that deformation (the stresses acting within the body). The constitutive
relation depends on the material of which a body is made. The general relation within a time-
independent setting3 is of the form

σ = σ(ε). (1.18)

The simplest material model is linear elasticity, for which stresses and strains are linearly
linked via the relation

σ = C ε, (1.19)
3
In case of more complicated constitutive behavior, e.g., viscoelasticity or viscoplasticity, the stresses may
additionally depend on the strain rate ε̇, which we neglect here and in the following.

12
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

where C is the elasticity tensor or stiffness tensor, containing the elastic constants of the
material. Note that, since both σ and ε are second-order tensors, C (linking each strain com-
ponent to each stress component) is a fourth-order tensor with components Cijkl , such that
σij = Cijkl εkl . In general, C has d4 entries in d dimensions. Yet, the symmetry of both the
stress and strain tensors as well as any existing material symmetries reduce the number of in-
dependent material parameters required to describe C. For the simplest case of isotropy (i.e.,
the material behavior is the same in every direction), C can be described by only two constants,
e.g., Young’s modulus E and Poisson’s ratio ν, or the bulk modulus κ and shear modulus G.
In this case, one can show that
Cijkl = λδij δkl + µ (δik δjl + δil δjk ) , (1.20)
where we again made use of the Kronecker delta and introduced the Lamé moduli
Eν E
λ= , µ=G= . (1.21)
(1 + ν)(1 − 2ν) 2(1 + ν)
You can find convenient tables summarizing the relations between all isotropic elastic moduli
online.

A quick exercise of the summation convention reveals the linear elastic stress-strain relation
σij = Cijkl ϵkl = [λδij δkl + µ (δik δjl + δil δjk )] ϵkl = λ(tr ε)δij + 2µϵij (1.22)
with the trace of a tensor defined as the sum of its diagonal components (which is invariant to
coordinate transformations):
tr ε = εkk = ε11 + ε22 + ε33 . (1.23)
Note that the trace of the strain tensor indicates volumetric change: if tr ε = 0, the volume is
locally conserved. Otherwise, the (infinitesimal) local volume dV changes due to deformation
to dv = (1 + tr ε) dV .

As a convenient alternative to defining the constitutive relation as a link between stresses and
strains, we can encode the constitutive response in a strain energy density W = W (ε),
which, e.g., for the case of linear elasticity reads
1 1 1
W = ε · Cε = ε · σ = (ε11 σ11 + ε12 σ12 + ε13 σ13 + σ21 ε21 + . . .) (1.24)
2 2 2
or, exploiting the symmetry of σ and ε,
1
W = (ε11 σ11 + ε22 σ22 + ε33 σ33 + 2ε12 σ12 + 2ε13 σ13 + 2σ21 ε21 ) . (1.25)
2

Given the above energy density, the stresses and stiffness tensors follow from differentiation4 :
∂W ∂σ
σ= , C= . (1.26)
∂ε ∂ε
Roughly speaking, the above concept of a strain energy density is analogous to the energy stored
in an elastic spring (W = 21 kx2 ), whose force is obtained from differentiation (F = ∂W/∂x = kx)
as well as its stiffness (k = ∂ 2 W/∂x2 ). Here, the energy is the elastic energy stored inside the
elastic body, the analog of the spring force is the stress, and the stiffness becomes the stiffness
tensor. As we are here not simply relating two scalars (spring force and spring) extension but
two tensors (the stress and strain tensors), the stiffness must be expressed as a fourth-order
tensor.
4
Tensor (and vector) derivatives of the shown type are understood component-wise; e.g., differentiating W with
respect to each component of ε yields nine values, which are the components of σ. For example, σ11 = ∂W/∂ε11 ,
σ12 = ∂W/∂ε12 , etc. For details and a proper tensorial definition see the Tensor Notes available online.

13
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

1.4 Voigt notation

Working with the above stress and strain tensors can be tedious at times, which is why an
alternative formulation has gained popularity in the finite element context, known as Voigt
notation. The motivation is two-fold. First, one aims to avoid the use of fourth-order tensors
(like the stiffness tensor C in the constitutive relation σ = Cε, which cannot easily be imple-
mented within common programming languages). Second, strain tensor ε and stress tensor σ
are symmetric, which means that working with and storing the full tensors wastes computational
resources (in 3D each tensor has only six independent components, but 3 × 3 matrices would be
used and stored). Therefore, Voigt notation concatenates the six independent components in a
vector, which leads to the strain vector ε̃ and stress vector σ̃, defined as
   
ε11 σ11
 ε22  σ22 
   
 ε33  σ33 
2ε23  ,
[ε̃] =   [σ̃] = 
σ23 
 (1.27)
   
2ε13  σ13 
2ε12 σ12

The factor 2 in the shear strain components in Voigt notation (which is not found in the stress
vector) is definition, which was introduced so that the energy density (1.25) can conveniently
be written in analogy to (1.24) as
1 1
W = ε̃ · σ̃ = (σ11 ε11 + σ22 ε22 + σ33 ε33 + 2σ23 ε23 + 2σ13 ε13 + 2σ12 ε12 ) , (1.28)
2 2
where the off-diagonal terms are correctly double-counted.

The constitutive relation of linear elasticity, Eq. (1.19), in Voigt notation becomes
σ̃ = E ε̃ (1.29)
or equivalently
1 ∂W ∂ σ̃
W = ε̃ · E ε̃, so that σ̃ = and E = , (1.30)
2 ∂ ε̃ ∂ ε̃
where E is a material stiffness matrix depending on the material’s elastic constants. (This is
the Voigt notation analog to the fourth order tensor C). For example, for an isotropic linear
elastic material characterized by Young’s modulus E and Poisson’s ratio ν, the E-matrix in 3D
reads
1−ν
 
ν ν 0 0 0
 ν
 1−ν ν 0 0 0  
E  ν ν 1−ν 0 0 0 
[E3D ] =  1−2ν
. (1.31)
 0
(1 + ν)(1 − 2ν)  0 0 2 0 0  
 0 1−2ν
0 0 0 2 0 
1−2ν
0 0 0 0 0 2
The 2D version depends on the assumed scenario, as one must differentiate between states of
plane stress and plane strain:
 
1 ν 0
E 
[Eplane stress ] = ν 1 0 ,
1 − ν2 1−ν
0 0
2  (1.32)
1−ν ν 0
E
[Eplane strain ] =  ν 1−ν 0 ,
(1 + ν)(1 − 2ν) 1−2ν
0 0 2

14
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

in both cases linking the 2D stress and strain components


   
ε11 σ11
[ε̃] = ε22 ,
  [σ̃] = σ22 
 ⇒ σ̃ = Eplane strain/stress ε̃. (1.33)
2ε12 σ12
Note that the 2D assumption does not necessarily imply that all stress or strain components in
the third dimension vanish. In general, plane strain is a good approximation for a body that is
very thick in the out-of-plane direction (assuming that εi3 = 0 but not necessarily σi3 = 0). By
contrast, plane stress approximates the situation in a body that is very thin in the out-of-plane
direction (assuming that σi3 = 0 but not necessarily εi3 = 0).

e1 s31= 0
s33= 0
e3
e2 s32= 0
e33= 0, e31= e32 = 0

plane stress plane strain

Analogous E-matrices can be derived for other elastic constitutive laws (e.g., for general anisotropic
linear elastic media; see, e.g., this summary online).

1.5 Kinetics: mechanical balance equations

To solve any mechanical problem, we need governing equations that describe how stresses and
strains vary over time and space. These are given by the conservation or balance laws.

First, we consider the balance of linear momentum (often referred to as Newton’s second
law ). For a macroscopic body Ω, it states that
X
Fi = maCM . (1.34)
i

That is, the sum of all forces Fi applied externally to a body Ω equals the total mass m of the
body times the acceleration of its center of mass, aCM . This product is the change of linear
momentum, assuming that the total mass m remains constant. Let us now consider a body Ω
as a deformable object, for which we can write the above balance law using integrals over Ω
and ∂Ω. Specifically, (1.34) is equivalent to
Z Z Z
σn dS + ρb dV = ρa dV , (1.35)
∂Ω Ω Ω

where the first term represents all external forces applied to the boundary ∂Ω of the body
through tractions t = σn, the second term denotes external forces in the form of distributed
body forces acting across the volume (such as gravity for which b = g), and the right-hand
side stems from applying the definition of the center of mass and its acceleration (assuming a
constant mass density ρ and constant total mass m):
R
d2 d2 Ω ρu dV d2 u
Z Z
1 1
aCM = 2 uCM = 2 R = ρ dV = ρa dV . (1.36)
dt dt Ω ρ dV m Ω dt2 m Ω

15
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Applying the divergence theorem to the first term in (1.35) yields


Z Z
σij nj dS = σij,j dV , (1.37)
∂Ω Ω

which introduces the divergence of a tensor as a vector with components

[div σ]i = σij,j . (1.38)

Inserting (1.37) into (1.35) and bringing all volume integrals onto the same side of the equation
leads to
Z
(div σ + ρb − ρa) dV = 0. (1.39)

This relation must hold not only for the whole body Ω but also for any sub-body cut free from
Ω (as discussed in the context of free-body diagrams and inner forces in Mechanics 2 and in
Section 5.2 of Dynamics). For the integral in (1.39) to vanish for any arbitrary subset of Ω, we
must ultimately require that the integrand vanishes pointwise, i.e.,

div σ + ρb − ρa = 0 ⇔ div σ + ρb = ρa or σij,j + ρbi = ρai (1.40)

This is the local form of the balance of linear momentum, which is – roughly speaking –
linear momentum balance formulated for an infinitesimally small material point. Written out
in components, the above balance of linear momentum in 3D turns into the three equations

∂σ11 ∂σ12 ∂σ13


+ + + ρb1 = ρa1
∂x1 ∂x2 ∂x3
∂σ21 ∂σ22 ∂σ23
+ + + ρb2 = ρa2 (1.41)
∂x1 ∂x2 ∂x3
∂σ31 ∂σ32 ∂σ33
+ + + ρb3 = ρa3
∂x1 ∂x2 ∂x3

Note that for static problems the above simplifies as there is no acceleration (ai = 0). Moreover,
in many practical problems we may neglect gravity or any other body force (bi = 0), so that
linear momentum balance becomes div σ = 0.

Example 1.3. One-dimensional waves in elastic rods


As a practical example, consider a long and slender rod, which is
deforming only along its x1 =x-axis. The displacement field u = u(x,t)
u(x, t)e1 describes the axial motion of each point on the rod, so the +
associated acceleration field is simply a = a(x, t)e1 = ü(x, t)e1 , and x
we may write all relations in 1D (and drop the subscripts).
The only non-zero strain component is the axial strain ε11 (x, t) = ε(x, t) = u,x (x, t) and the
only non-zero stress is the axial stress σ11 (x, t) = σ(x, t), which for linear elasticity obeys
σ(x, t) = E(x)ε(x, t) with Young’s modulus E(x), which may in general vary with position x.

Inserting all of this into the local balance law of linear momentum (in the absence of body
forces) turns (1.41) into

∂σ11
div σ(x, t) = ρ(x)a(x, t) ⇒ ρ(x)ü(x, t) = (x, t) = [E(x)u,x (x, t)],x . (1.42)
∂x1

16
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

For the special case of a homogeneous rod having a uniform density ρ(x) = ρ = const. and a
uniform modulus E(x) = E = const., the above reduces to
s
E
ρü(x, t) = Eu,xx (x, t) ⇔ ü(x, t) = c2 u,xx (x, t) with c= (1.43)
ρ

This is the one-dimensional wave equation, governing the deformation and motion of the rod
in one dimension, and c is the longitudinal wave speed inside the rod. This partial differential
equation (PDE) can be solved if supplemented with appropriate initial and boundary conditions.
A general solution of traveling waves is of the type
u(x, t) = f1 (x − ct) + f2 (x + ct), (1.44)
where f1 and f2 are smooth, differentiable functions to be determined from the initial conditions.
Specific solutions can be found, e.g., in Example 1.4 below for a static problem, or in Section 5.3
of the Dynamics notes.

————
Example 1.4. Elastic rod hanging from the ceiling

Let us consider an elastic rod of uniform mass density ρ, Young’s modulus x0


E, length L, and cross-sectional area A, which is hanging vertically from Dx
g
the ceiling. What is the extension of the rod under the action of gravity x
(with a constant gravitational acceleration g)? xi-1
u(x) L ui xi

+
The governing equation, viz. linear momentum balance, is the same as in
Example 1.3 above, except that we include the body force due to gravity: xi+1
 
ρ(x)a(x, t) = div σ(x, t) + ρ(x)g = E(x)u,x (x, t) ,x + ρ(x)g. (1.45)
xn
Here, we consider statics, so that we have ü(x, t) = 0 for all x ∈ Ω. Consequently, we look
for a time-independent displacement field solution u(x). In addition, ρ and E are constant.
Therefore, (1.45) reduces to
ρg ρg 2
u,xx (x) = − ⇒ u(x) = − x + c1 x + c2 , (1.46)
E 2E
whose solution was obtained by integrating twice. The unknown integration constants c1 , c2 ∈ R
are to be obtained from boundary conditions. Assuming that coordinate x runs downward,
starting from the ceiling, the rod’s fixed end at the ceiling implies that
u(0) = 0 ⇒ c2 = 0. (1.47)
The bottom end of the rod is free, which means that there can be no external force acting at
the bottom end. Therefore,
ρg
F (L) = Aσ(L) = AEu,x (L) = 0 ⇒ u,x (L) = 0 ⇔ c1 = L. (1.48)
E
Overall, this leads to the displacement field inside the rod as
ρg 2 ρg ρg
u(x) = − x + Lx = − x(x − 2L), (1.49)
2E E 2E
It is a simple exercise to verify that (1.49) satisfies both boundary conditions. Shown below is
the 1D displacement profile along the length of the beam (we typically plot the displacement
u(x) vertically against x, even though it is a longitudinal displacement field, as indicated by
the arrows).

17
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

x
L DL

Note that, from the above displacement field, we obtain the axial strain inside the rod as
ρg ρg ρg
ε = u,x = − x+ L= (L − x), (1.50)
E E E
which is not constant along its length but varies linearly due to the distributed gravity load.
The maximum strain (and maximum stress) is found at the top of the rod, where the maximum
gravity load acts, while the strain decreases linearly to zero towards its free end.

Finally, the extension of the rod under the action of gravity is obtained from the displacement
of the bottom end of the rod, since the change of length ∆L is nothing but the displacement at
the tip:

ρgL2
∆L = u(L) = . (1.51)
2E

————

1.6 Thermodynamics

The above principles and examples were of purely mechanical nature. When we consider the
wider field of problems arising in thermodynamics (such as thermal problems and heat con-
duction, which are often dealt with by finite elements), we need to include one more balance
law: the balance of energy (often also referred to as conservation of energy). It states that
the change of internal energy E inside a body Ω over time t balances the sum of (i) the energy
being produced inside the body by some heat source density s (e.g., through chemical reactions
or heating due to inelastic deformation processes), (ii) the outward flux q of heat across the
boundary ∂Ω of the body (e.g., heat lost through convection), and (iii) the mechanical power
P provided to the body by performing mechanical work (e.g., by applying forces that deform
the body). Mathematically, this is expressed as the balance law
Z Z
d
E= s dV − q · n dS + P. (1.52)
dt Ω ∂Ω

We can again invoke the divergence theorem to rewrite the heat flux term as
Z Z Z Z
q · n dS = qi ni dS = qi,i dS = div q dS, (1.53)
∂Ω ∂Ω Ω Ω

which introduces the divergence of a vector as the scalar quantity

div(·) = (·)i,i . (1.54)

Energy is an extensive variable (the total energy doubles when adding two bodies of the same
energy). This is in contrast to intensive variables, such as temperature or pressure (when
adding two bodies having the same temperature (or pressure), the combined body has the same

18
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

temperature (or pressure) as the two individual bodies had previously). We can hence think of
extensive variables as quantities which, for a body Ω, are evaluated by some volume integral
over the body. Since energy is an extensive variable, we may introduce an internal energy
density e and write
Z Z
d
E= e dV ⇒ E= ė dV . (1.55)
Ω dt Ω

Analogously, we realize that the mechanical work done on the body implies a change in the
strain energy density:
Z Z Z
d
P = σij ε̇ij dV = Ẇ dV = W dV. (1.56)
Ω Ω dt Ω
Rewriting the balance law of energy, Eq. (1.52), now yields
Z Z Z Z
ė dV = s dV − div q dV + Ẇ dV, (1.57)
Ω Ω Ω Ω

which can be rewritten as


Z  
ė − s + div q − Ẇ dV = 0. (1.58)

Since the balance of energy does not only have to hold for the whole body Ω but also for any
sub-body ω ⊂ Ω (as previously discussed for linear momentum balance), we may conclude that
the local balance of energy is

ė = Ẇ + s − div q (1.59)

This is the local (i.e., pointwise) counterpart to the macroscopic energy balance (1.52) and
states that, at each point x ∈ Ω, the rate of energy change (ė) is given by the local production
of heat (s) plus the local mechanical power supplied (Ẇ ) minus the heat lost by outward fluxes
q away from the point.

Example 1.5. Heat conduction

Let us consider a purely thermal problem without mechanical energy (so Ẇ = 0). Thermally
stored energy is typically of the form e = ρcv T with mass density ρ(x), the specific heat capacity
cv (x), and a generally unknown temperature field T = T (x, t). Altogether, these specifications
turn the energy balance law (1.59) into

ρcv Ṫ = s − div q. (1.60)

To make this problem solvable, we need to provide a constitutive law (as in the mechanical
case before). A commonly assumed constitutive relation for heat conduction is Fourier’s law,
which states

q(x, t) = −κ(x) grad T (x, t) ⇔ qi (x, t) = −κ(x)T,i (x, t) (1.61)

with a heat conductivity κ(x). (The minus sign indicates that heat flows from hot to cold, and
not vice-versa.) By the way, the above also introduces the components of the gradient of a
scalar field as
∂T
[grad T ]i = T,i = . (1.62)
∂xi

19
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The local energy balance equation (1.60) now has become

ρ(x)cv (x)Ṫ (x, t) = [κ(x)T,i (x, t)],i + s(x, t). (1.63)

For the special case of a homogeneous body with spatially uniform material properties, this
reduces to the well-known heat equation (or the inhomogeneous Laplace equation):

ρcv Ṫ (x, t) = κ ∇2 T (x, t) + s(x, t) (1.64)

where we used the definition of the Laplacian:


d
X ∂2T
T,ii = ∇2 T = . (1.65)
i=1
∂x2i

For the special case of a 1D problem (such as heat conduction in a 1D rod), the heat equation
with T = T (x, t) reduces to the 1D heat equation:

ρcv Ṫ (x, t) = κ T,xx (x, t) + s(x, t) (1.66)

Finally, whenever we consider a static problem, we assume that the body is in equilibrium and
the temperature field is constant over time, so T (x, t) = T (x). This simplifies the above to the
so-called Poisson equation

κ ∇2 T = −s, (1.67)

which yields the static temperature distribution T = T (x) for a given heat source density s(x).
If there is no internal heat source (s ≡ 0), then (1.67) implies that the temperature distribution
can vary only linearly across the body.

————

1.7 (Initial) boundary value problems

So far, we have seen how partial differential equations, known as


the balance laws, govern the thermal and mechanical behavior of u = ^u
¶WD
solid bodies (and, of course, those two can also be coupled describe
the thermo-mechanically coupled behavior of deformable bodies –
e.g., when heating leads to thermal expansion or plastic deforma-
tion heats the body). In order to solve an actual problem, we t
need to formulate an initial boundary value problem (IBVP),
which furnishes the above equations with appropriate boundary
¶WN W
conditions (BCs) and initial conditions (ICs).
To this end, we subdivide the boundary ∂Ω of a body Ω into

• ∂ΩD ≡ the Dirichlet boundary, prescribing the primary field (e.g., u, T , etc.):

e.g. u(x, t) = û(x, t) on ∂ΩD or T (x, t) = T̂ (x, t) on ∂ΩD . (1.68)

On the Dirichlet boundary, the primary field is known (e.g., fixing the displacement u(0) =
0 in Example 1.4 of the bar hanging from the ceiling; or knowing the temperature T (x) on
some part of the boundary because it is in contact with a body of constant temperature).
Here and in the following, we use that hat (ˆ·) to indicate a known, prescribed function on
the boundary.

20
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

• ∂ΩN ≡ the Neumann boundary, prescribing derivatives of the primary field (e.g., ε,
grad T , etc.):

e.g. t(x, t) = σ(x, t)n(x, t) = t̂(x, t) on ∂ΩN or q(x, t) = q̂(x, t) on ∂ΩN ,


(1.69)

On the Neumann boundary, not the primary fields but their conjugate kinetic variables are
imposed (e.g., enforcing a zero force F (L) = EAu,x (L) = 0 in Example 1.4 at the bottom
end of the bar hanging from the ceiling; or knowing the heat flux across a boundary).

For most problems, the above differentiation is simple to make, so we can easily define ∂ΩD and
∂ΩN . Note that we may generally assume that

∂ΩD ∪ ∂ΩN = ∂Ω and in most problems also ∂ΩD ∩ ∂ΩN = ∅. (1.70)

The latter equality implies that one cannot simultaneously impose a primary field and its
conjugate variable, and it holds strictly for problems with scalar primary fields (e.g., in thermal
problems). In mechanical problems one can consider scenarios in which, some displacement
components and some traction components are enforced at the same point (e.g., letting a body
slide frictionlessly on a rigid ground enforces zero displacements perpendicular to the ground
while having zero tractions parallel to the ground); in such cases there can be overlaps of ∂ΩD
and ∂ΩN . But one can never impose the same component of, e.g., displacements and tractions
on a boundary (if one applies a displacement, then the force follows from the body’s constitutive
response and cannot be prescribed; if one applies a force, then the displacement follows naturally
– one cannot impose both). Note that there can be exceptions to the above classification of
BCs. For example, we will discuss beams as a special case later, where both deflections and
rotations are primary fields – but let us not get into this complication now.

In addition to the above boundary conditions, all time-dependent problems require initial
conditions, e.g.,
T (x, 0) = T0 (x) ∀ x ∈ Ω,
(1.71)
or u(x, 0) = u0 (x) and v(x, 0) = v0 (x) ∀ x ∈ Ω.

In a thermal problem, we may start from some known initial temperature distribution T0 (x),
whereas in a mechanical problem the body’s initial displacements u0 (x) and its initial velocity
field v0 (x) may be known.

The number of required BCs/ICs depends on the order of a PDE. For example,

ρcv Ṫ = κ∇2 T + s (1.72)

is first-order in time and therefore requires one IC, e.g., T (x, 0) = T0 (x). It is second-order
in space and hence requires BCs along all ∂Ω (e.g., two conditions per xi coordinate). By
contrast, the mechanical problem governed by linear momentum balance (see, e.g., the wave
equation (1.43)) is of second order in both space and time, hence requiring two initial conditions
(e.g., u(x, 0) = u0 (x) and v(x, 0) = v0 (x)) and two boundary conditions per direction (hence
BCs across the entire boundary ∂Ω).

In summary, we will have to solve the governing PDEs supplemented by appropriate ICs and
BCs, as required (quasistatic problems, of course, do not require any initial conditions). Those
systems of equations need to be solved for the primary fields (e.g., the temperature distribution
T or the displacements field u). For brevity, we will abbreviate some of the governing ODEs or
PDEs by differential operators in later sections (see Appendix A).

21
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

This concludes our mathematical detour into the governing equations of mechanical and ther-
modynamical (initial) boundary value problems. We have introduced those fields describing the
deformation, motion, and thermodynamics of bodies in space. We have formulated the con-
stitutive and balance equations governing their physical behavior. And we have supplemented
those with initial and boundary conditions, as needed to find solutions. The remaining question
is how to solve those equations.

22
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

2 Computational Methods

2.1 Why do we need computational methods?

Unfortunately, analytical solutions to (I)BVPs of the above type are hardly ever available –
except for relatively simple problems involving

• simple geometries (e.g., square-, cube-, circular or spherically-shaped bodies),

• simple material behavior (such as linear elasticity),

• simple ICs/BCs (like in the hanging-bar problem).


For realistic geometries of arbitrarily shaped bodies or
machine components (such as the gear shown on the
right), for realistic materials with complex material mod-
els going beyond linear elasticity (such as viscoelasticity,
plasticity, or damage and failure), and/or for general ini-
tial/boundary conditions, one usually cannot find analyt-
ical solutions. This is where numerical techniques gain
importance to obtain approximate solutions using com-
puters.
We point out that computers have two main shortcomings that we need to address in the
following.

First, computers do not know any units – they deal with purely numerical values. There-
fore, any numerical technique must cope with the intrinsic units present in physical problems.
This is commonly done in one of two ways: either one defines a set of consistent standard units
to be used (e.g., only SI units) and tacitly implies that those units are being used throughout
(this is common practice in most commercial FEA codes), or one reduces the physical system
to a dimensionless problem. This is a more elegant way and will be discussed in Section 2.2.

Second, computers cannot deal with infinity – they can handle only finite values and
finite-sized arrays. For this reason5 , one may claim:

The goal of any numerical technique is to turn an infinite-dimensional problem


into a finite-dimensional one.
For example, the exact solution of any of the above (I)BVPs lives within an infinite-dimensional
function space. In other words, we do not know much about the sought function fields u(x, t)
or T (x, t) a priori (except for possibly some smoothness requirements), so the problem is not
simply to identify the coefficients of some known type of polynomial but to find an arbitrary
function. Numerical techniques reduce such problems commonly to finite-dimensional ones. Let
us consider a few examples:

• Any function can be expressed as an infinite Fourier series or as a polynomial series


(those series have an infinite number of terms and hence coefficients). We can aim for
approximations by considering, e.g., only the lowest n terms of such a truncated series
and find the respective coefficients by some numerical method. This way we have reduced
5
This may not make a lot of sense to us now, but we will come back to this statement several times throughout
the course – whenever introducing new numerical techniques – and ascertain that their purpose is indeed to reduce
infinite-dimensional problems to finite-dimensional ones.

23
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

the infinite-dimensional problem to an n-dimensional one.

• A computer stores and operates rational numbers (in principle having infinite precision)
with a finite number of floating-point digits (defined by the machine precision limits).

• Instead of seeking a solution for the displacement field u(x, t) at every point x ∈ Ω and
for all times, we could set out to find solutions that are known only at certain discrete
points xi and possibly also at discrete time steps tα . This defines the concept of finite
differences, which will be discussed in Section 3.

The general approach taken by computational mechanics includes the following steps:

1. from reality to a mathematical model: a practical problem is turned into an abstract


problem by making a series of simplifications and assumptions, thus introducing modeling
errors, in order to define a proper mathematical problem.

2. from the mathematical model to a numerical model: if the mathematical model


cannot be solved analytically, the sought infinite-dimensional solution is turned into a
finite-dimensional solution by making approximations. For example, the body Ω is dis-
cretized (by finite differences of finite elements), so that its response is described by a
finite number of unknowns. This incurs discretization errors.

3. from the numerical model to a numerical solution: solving the numerical problem
computationally generally involves solution errors, which stem from round-off/floating-
point errors, iterative solution approaches, etc.

Ensuring that the obtained numerical results agree with the mathematical model (e.g., by
comparing the numerical solution to an analytical solution where available) is known as the
step of verification, while ensuring that the obtained results properly reflect reality (e.g.,
by comparing the numerical solution to experimental data) is the so-called validation step.
Verification and validation (often referred to as V&V) is an essential part of numerical modeling,
since the best numerical technique can lead to nonsensical results if it is not properly used, if
wrong material or geometric data are used, if inappropriate assumptions or simplifications are
being made, etc. It is the engineer’s job (our job) to make sure that any numerical model we use
is a suitable representation of physical reality – and to understand the intricacies of commonly
used numerical techniques is one of the objectives of this course.

?
=
verification

physical reality mathematical model numerical model numerical solution


?
=
validation

Before we can talk about specific techniques, let us briefly introduce the concept of dimensionless
forms, which may prove helpful later.

24
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

2.2 Dimensionless forms

Computer programming languages have no notion of units, which is why one often defines a
set of standard units that are commonly agreed upon or, as an elegant alternative, one in-
troduces dimensionless forms before solving problems numerically. The goal is to replace as
many quantities appearing in the governing equations by dimensionless quantities, by replacing,
e.g., time t, coordinates xi and functions like T (x, t) by a dimensionless time t̄, dimensionless
coordinates x̄i and dimensionless functions such as T̄ (¯(x), t̄). A key advantage is that the di-
mensionless problem generally contains the solution for a wide range of constitutive parameters.
Let us illustrate this procedure and its advantages through two examples.

Example 2.1. Linear elastic spring vibration

Let us consider a particle of mass m, which is attached to a linear elastic spring of stiffness k
and subjected to an applied external force F (t). The vibration of the particle is described by
the equation of motion (i.e., linear momentum balance) along with an initial condition. Let
u(t) denote the position of the particle. Further, we assume an initial displacement u0 ̸= 0, zero
initial velocity, and that the spring is unstretched when u = 0.

The governing equations are hence linear momentum balance with the two initial conditions:
mü(t) = −ku + F (t),
(2.1)
u(0) = u0 and u̇(0) = 0.
To arrive at a dimensionless form, we start by making the displacement u dimensionless by the
normalization
u
u= ⇒ u = u0 u. (2.2)
u0
Note that we do not need to use the initial condition u0 (which would not make sense if u0 = 0,
e.g.), but we could use any non-zero length for this normalization. Insertion into the equation
of motion and dividing by the mass m yields
∂2 k F (t)
2
u=− u+ ,
∂t m u0 m (2.3)
u(0) = 1 and u̇(0) = 0.
p
The first equation in (2.3) shows that m/k must have the units of time (because ∂ 2 u/∂t2
must have the same units as −ku/m). Therefore, we may define a dimensionless time as
r r
t m ∂ k ∂
t= p ⇒ t= t ⇒ = , (2.4)
m/k k ∂t m ∂t
which turns the equation of motion in (2.3) into (after dividing by k/m)
∂2 F (t)
2u = −u + (2.5)
∂t ku0
and the initial conditions into
u(0) = 1 and u,t (0) = 0. (2.6)
Finally, we know from (2.5) that F (t)/(ku0 ) must be dimensionless, which allows us to introduce
a dimensionless force, depending on the dimensionless time as follows:
F t m
p 
k
f (t) = (2.7)
ku0

25
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Altogether, this leads to the dimensionless form of the original problem:



u,tt = −u + f t
(2.8)
u(0) = 1 and u,t (0) = 0.
Solving this problem leads to a dimensionless solution u(t), from which we obtain the real
solution u(t) by inserting the above definitions again.

We stress that the above dimensionless problem only depends on the ratio F/(ku0 ), and no
longer on mass m, stiffness k, initial displacement u0 , etc. This is a remarkable benefit of the
dimensionless form: it reduces the problem to a small set of independent parameters and finds
a dimensionless solution that applies to a wide range of parameters of the original problem
(which only enter when turning the dimensionless solution into a dimensional solution but are
not involved when solving the problem).

————
Example 2.2. Heat equation

Let us consider the heat equation derived in Eq. 1.64 as


ρcv Ṫ = κ∇2 T + s for x∈Ω (2.9)
with some suitable boundary and initial conditions. To render the wave equation dimension-
less, we start by introducing a reference length L (e.g., the size of the body) and a reference
temperature T0 (e.g., the initial temperature of the body), which allows us to define
x ∂ 1 ∂ T
x= ⇒ = and T = . (2.10)
L ∂x L ∂x T0
This turns (2.9) into
 T
T0 2 ∂ ∂
ρcv T0 T˙ = κ 2 ∇ T + s with ∇= ,..., . (2.11)
L ∂x1 ∂xd
Next, we may re-arrange the equation (by dividing by the factor in front of the Laplacian) into
ρcv T0 L2 ˙ 2 sL2
T =∇ T + . (2.12)
κT0 κT0
Obviously, the first term on the right-hand side is dimensionless, which implies that the remain-
ing two terms in the equation must be dimensionless, too. This allows us to make two more
definitions of dimensionless type, viz.
sL2 ρcv T0 L2 ∂ ∂ κT0
s= and = ⇔ t= t. (2.13)
κT0 κT0 ∂t ∂t ρcv T0 L2
This finally leads to the dimensionless heat equation
2
T ,t = ∇ T + s. (2.14)
Note that in an analogous fashion the boundary and initial conditions can also be made dimen-
sionless in terms of the dimesionless variables. Dirichlet boundary conditions use the definition
of the dimensionless temperature directly, using T = T /T0 . Neumann boundary conditions of
the type q = −κ∇T = q̂ can be transformed according to
κT0 L
− ∇ T = q̂ ⇒ −∇ T = q̂ with q̂ = q̂. (2.15)
L κT0

————

26
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Analogously, any other problem can be made dimensionless by introducing proper normaliza-
tions and rewriting the governing equations and any initial and/or boundary conditions. A more
general protocol for finding dimensionless definitions based on a given set of system parameters
is given by Buckingham’s Π-theorem, which we do not discuss here (but you are welcome to
look it up, if you are interested and have not heard about it).

In the following, we usually assume that any given problem is dimensionless (even though not
showing the normalization specifically) or that standard units are to be used, so that we do not
discuss the issue of units any further.

27
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

3 Method of Finite Differences

In order to numerically solve a system of ODEs/PDEs plus ICs/BCs, as discussed before,


we generally differentiate between so-called direct and indirect methods. We here begin by
discussing direct methods, the probably most famous of which is the method of finite differences.
Direct methods aim to solve the governing PDEs directly; for example, by approximating all
spatial and temporal derivatives through information from a discrete grid.
t
Dx
As an introductory example, let us consider an unknown
scalar field u(x, t), whose derivatives appear in the gov-
erning PDEs (e.g., u(x, t) could the displacement field in
a 1D bar, appearing in the 1D wave equation). For sim- Dt
plicity, let us restrict ourselves to a 1D problem for now,
a+1
whose results can later be extended to higher dimensions. t a a
(t,xj)
t
a-1 +
We begin by introducing a regular (∆x, ∆t)-grid with con- t
stant spacings ∆x = xj+1 − xj and ∆t = tα+1 − tα , as
schematically shown on the right. x
xj-1xj xj+1
We define the field u only at the grid points, using the abbreviation

uαj = u(xj , tα ). (3.1)

While the field is defined at the grid points, its derivatives are not (if the function is known only
at the gradients and not in any small neighborhood near the grid points, we cannot rigorously
define a derivative there). In order to approximate derivatives at the grid points, we use Taylor
expansions. For example, a Taylor expansion in space yields

∂u (∆x)2 ∂ 2 u (∆x)3 ∂ 3 u
u(xj+1 , tα ) = uαj+1 = uαj + ∆x + + + O(∆x4 ),
∂x xj ,tα 2 ∂x2 xj ,tα 3! ∂x3 xj ,tα
(3.2)
∂u (∆x)2 ∂2u (∆x)3 ∂3u
u(xj−1 , tα ) = uαj−1 = uαj − ∆x + − + O(∆x4 ),
∂x xj ,tα 2 ∂x2 xj ,tα 3! ∂x3 xj ,tα
(3.3)

where O(·) denotes on the order of (·) and we arbitrarily truncated after the fourth term.
Addition of the two equations leads to

∂2u
uαj+1 + uαj−1 = 2uαj + (∆x)2 + O(∆x4 ) (3.4)
∂x2 xj ,tα

Re-arranging and dividing by ∆x2 , while noting that O(∆x4 )/∆x2 = O(∆x2 ), yields the finite-
difference approximation

∂2u α
uαj+1 − 2uαj + uαj−1
(xj , t ) = + O(∆x2 ) (3.5)
∂x2 (∆x)2

This is the central difference approximation of the second derivative, which is second-
order accurate as evident from O(∆x2 ). It approximates the spatial derivative of u at grid
point (xj , tα ) by using information from point (xj , tα ) and the two nearby grid points (xj−1 , tα )
and (xj+1 , tα ).

28
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

It is important to note that we must have the error of O(∆xn ) where n ≥ 1; otherwise, the
approximation does not converge as ∆x → 0. This requirement ensures the consistency
of a finite-difference approximation. If n < 1, then errors introduced by the finite-difference
approximation would grow with decreasing grid spacing, which is problematic and ensures no
convergence with grid refinement. In general, the error is controllable by the grid spacing ∆x,
so more accurate approximations can be obtained by decreasing the grid size.

Analogously, subtraction of (3.3) from (3.2) leads to the central difference approximation of
the first derivative in space (which is second-order accurate as well):

∂u ∂u uαj+1 − uαj−1
uαj+1 − uαj−1 = 2∆x + O(∆x3 ) ⇒ (xj , tα ) = + O(∆x2 ) (3.6)
∂x xj ,tα ∂x 2∆x

Here, the first derivative of u at grid point (xj , tα ) by using information from the two nearby
grid points (xj−1 , tα ) and (xj+1 , tα ). Note that no information from point (xj , tα ) is needed.

Of course, the same can be carried out for derivatives in time. Applying Taylor expansions
in the time domain and performing the same algebraic operations yields analogously, e.g.,

∂u ∂u uα+1
j − uα−1
j
uα+1
j −uα−1
j = 2∆t +O(∆t3 ) ⇒ (xj , tα ) = + O(∆t2 ) (3.7)
∂t xj ,tα ∂t 2∆t

Many other such finite-difference approximations of derivatives can be obtained in a similar


fashion. For example, a simpler first-derivative approximation is obtained from Eq. (3.2) alone,
if one truncates the Taylor expansion already after the linear term:

∂u ∂u uα+1
j − uαj
uα+1
j − uαj = ∆t + O(∆t2 ) ⇒ (xj , tα ) = + O(∆t) (3.8)
∂t xj ,tα ∂t ∆t

This is known as the (first-order accurate) forward-Euler approximation of the first derivative
in time. It defines the derivative at grid point (xj , tα ) by using information from that grid point
and from (xj , tα+1 ).

Analogously, we can use the second Taylor expansion, Eq. (3.3), and truncate after the linear
term to obtain the backward-Euler approximation of the first derivative (which is first-order
accurate)

∂u ∂u uαj − uα−1
j
uαj − uα−1
j = ∆t + O(∆t2 ) ⇒ (xj , tα ) = + O(∆t) (3.9)
∂t xj ,tα ∂t ∆t

A visualization of the above finite-difference approximations is the so-called stencil. As shown


below, we highlight those grid points that contribute to the approximate derivative at grid point
(xj , tα ), which illustrates all grid points contributing to the finite-difference approximation:
Dx Dx Dx Dx
Dt Dt Dt Dt
a+1 a+1 a+1 a+1
a a a a

a-1 a-1 a-1 a-1


j -1 j j +1 j -1 j j +1 j -1 j j +1 j -1 j j +1
central difference in space central difference in space forward-Euler in time backward Euler in time
(second derivative) (first derivative) (first derivative) (first derivative)

29
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

A comparison of the forward-Euler, backward-Euler and central-difference approximations for


the first derivative of a function u(x) on a grid of uniform spacings ∆x is illustrated below:

u u

Dx Dx
j-1 j j+1 j-1 j j+1
exact derivative forward-Euler approximation

u u

Dx Dx
j-1 j j+1 j-1 j j+1
backward-Euler approximation central-difference approximation

We point out that finite-difference approximations like the above can be extended in various
ways:

• By retaining more terms in the Taylor expansions and/or performing other subtrac-
tions/additions of Taylor expansions, one can arrive at higher-order approximations
of the first and second derivatives (involving more grid points) as well as approximations
for higher derivatives. The above presents only a small set of the simplest commonly
used stencils; see, e.g., the finite-difference tables on Wikipedia for various other approx-
imations up to high orders.

• Each of these schemes can be extended to higher dimensions by superimposing the above
approximations for each dimension. For example, if the Laplacian of a scalar function T
α = T (x , x , t), which leads to
is needed, we use a 3D grid (∆x1 , ∆x2 , t) and write Ti,j i j

∂2T ∂2T
∇2 T (xi , xj , tα ) = +
∂x21 ∂x22
(3.10)
uαi+1,j − 2uαi,j + uαi−1,j uαi,j+1 − 2uαi,j + uαi,j−1 2 2
= + + O(∆x1 , ∆x2 ).
(∆x1 )2 (∆x2 )2

Note that in higher dimensions one can also devise more complex approximations, which
do not simply follow from superposition in the different directions; but we will not discuss
those here.

• The extension to non-constant grid spacings ∆tα and ∆xi is possible but can become
cumbersome, since different types of approximations are needed in different grid points.

In order to numerically solve a PDE by finite differences, we choose suitable approximations for
all appearing derivatives appearing in the governing PDE. Let us demonstrate this procedure
by the following examples.

30
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Example 3.1. Heat equation by finite differences in 1D

Let us consider the general form of the 1D heat equation,

Ṫ (x, t) = k T,xx (x, t) + r(x, t), (3.11)

where for simplicity we defined k = κ/(ρcv ) and r = s/(ρcv ). This PDE is of first order in time
and of second order in space, so we need to use suitable finite-difference approximations for the
derivatives.

For example, we may use the second-derivative central-difference approximation for the spatial
and the forward-Euler approximation for the temporal derivative in the heat equation, so that
(3.11) turns into the discretized governing equation

Tjα+1 − Tjα α − 2T α + T α
Tj+1 j j−1
=k + r(xj , tα ) + O(∆t, ∆x2 ), (3.12)
∆t (∆x)2
which in the limit ∆t, ∆x → 0 is expected to converge towards the same solution as the governing
equation (this ensures the consistency of the discretized equation).

Notice that the right-hand side of (3.12) does not involve Tjα+1 nor Dx
any information at the newest time tα+1 , which is found only on Dt
the left-hand side. Such time-dependent finite-difference schemes, a+1
in which only the left-hand side of the equation (the side approx-
a
imating the time derivatives) contains new information, are called
explicit. The stencil for this particular scheme is shown on the a-1
right, highlighting that Tjα+1 depends only on “old” information. j -1 j j +1

As a key feature of explicit schemes, one can easily solve for Tjα+1 at the newest time tα+1 based
on known values Tjα , Tj±1
α at the previous time tα . Specifically, solving (3.12) for Tjα+1 yields
the update rule
k ∆t
Tjα+1 ≈ Tjα + α
− 2Tjα + Tj−1
α
+ ∆t r(xj , tα ),

2
Tj+1 (3.13)
(∆x)

where we used the approximate symbol (instead of an equality) to drop the O(∆t, ∆x2 )-term.

This scheme can rather easily be implemented numerically: if we know Tj0 = T (xj , t0 ) for all grid
points xj at the initial time t0 from the initial conditions, then we can update the temperature
at each grid point by computing Tj1 from the known values Tj0 . In fact, we can apply (3.13)
independently to each spatial grid point j and hence update all grid points in parallel. This is
one of the key advantages of many explicit schemes: the parallelization of grid point updates
yields a significant computational speed-up. (We will see that this is not possible for other
schemes, as discussed below.)

Note that the above scheme only works for grid t Dx


points that are not on the boundary, as schemat-
ically shown on the right. For n spatial grid
points (j = 1, . . . , n), the scheme cannot be ap-
ta+1
plied to the first node (since this would require ta
T0α , which does not exist) nor to the last node
α
(since Tn+1 does not exist). However, we need Dt
to provide two boundary conditions for the heat
x
equation, which solves our problem. x1 xj xn

31
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

If, e.g., the temperature is known at both ends by Dirichlet BCs, then T1α and Tnα are known at
all times and can be directly enforced without the need to calculate those from finite differences.
If Neumann BCs are to be imposed, then those involve derivatives of the temperature field, which
can – again – be approximated by finite differences (see Example 1.4).

Next, let us slightly modify the above approach and use the backward-Euler approximation
(instead of the forward-Euler approximation) in time. This leads to
Tjα − Tjα−1 α − 2T α + T α
Tj+1 j j−1
=k 2
+ r(xj , tα ) + O(∆t, ∆x2 ). (3.14)
∆t (∆x)

Notice that now the newest time appearing in the above finite-
difference scheme is tα , and both sides of the equation contain Dx
information at time tα . Such a time-dependent finite-difference
Dt
scheme, which has unknown degrees of freedom at the newest time a+1
on both sides of the equation, is called an implicit scheme. Implicit
a
schemes do not allow us to compute the new grid point values
independently, as in the explicit scheme above. This is illustrated a-1
by the stencil on the right, showing that one cannot compute any j -1 j j +1
single grid point value at time tα based on known information.
In fact, (3.14) presents a linear system of equations to be solved for Tjα for j = 1, . . . , n. To see
this, let us rewrite (3.14) as
k ∆t
α
−cTj+1 + (1 + 2c)Tjα − cTj−1
α
≈ ∆t r(xj , tα ) + Tjα−1 with c= . (3.15)
(∆x)2
For a discretization containing n grid spatial points, the solution is hence obtained from solving

α + T α−1
   α  
.. T ∆t r1
 .
1 1
  ..   .. 
 ..  .   . 
.
  ..   ..
     
 
 −c 1 + 2c −c  .   . 
α−1 
   α  α


 −c 1 + 2c −c  T j
  
 = ∆t rj + Tj  (3.16)
−c 1 + 2c −c  .   ..
  ..  
 
 . 
 ..  
.
 
.

 .   .
 .  
  . 
 . 
.. α α α−1
. Tn ∆t rn + Tn

Such a system of equations to be solved is typical for implicit schemes. We cannot directly
update each grid point but must solve for the solution at all grid points j = 1, . . . , n at the
new time simultaneously by solving the (linear) system of equations. Note that this is com-
putationally considerably more expensive than updating all grid points independently and in
parallel.

Further, suitable boundary conditions must be supplied. For example, if we have the essential
boundary condition Tjα = T̂j (tα ), we may replace the equation for Tjα in the above system
(i.e., the jth row in (3.16)) by Tjα = T̂j (tα ). By contrast, if we have a Neumann boundary
condition T,x (xj , tα ) = qj (tα ), then we need to introduce a finite-difference stencil to approx-
imate T,x (xj , tα ) and again replace the respective equation in the above system. This will be
demonstrated in Example 3.2.

————

32
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Example 3.2. Bar under its own weight

Let us show how analogous finite difference approaches x0


can be used to solve static problems, where a time-
independent solution is thought in one or several spatial g Dx
dimensions. For example, consider a vertical elastic bar x
of constant Young’s modulus E, cross-sectional area A,
xj-1
u(x) L uj xj

+
and length L, which is fixed at its top and stretching in
the vertical direction under its own weight. We seek to xj+1
find the displacement field u(x) as a function of the axial
x-coordinate (running downward from the top of the bar,
as shown on the right). Gravity acts downward.
xn
In this case, the governing equation is linear momentum balance (see Example 1.4), viz.
ρg
div σ(x) + ρg = 0 ⇒ u,xx = − . (3.17)
E
Boundary conditions are (assuming a free end at x = L)

u(0) = 0 and F (L) = EAu,x (L) = 0 ⇔ u,x (L) = 0. (3.18)

As shown in Example 1.4, the analytical solution is found by integrating (3.17) twice with
respect to x and imposing the boundary conditions, which yields
ρg
u(x) = (2L − x)x. (3.19)
2E

To find an approximate numerical solution, let us discretize the bar into n segments of equal
lengths ∆x = L/(n + 1), as shown above. Consequently, the (n + 1) grid points are located at
xj = jn for j = 0, . . . , n. The governing PDE (3.17) is of second order in space, so we may use
a central-difference approximation for the second derivative with respect to x, leading to the
discrete version of linear momentum balance:
uj+1 − 2uj + uj−1 ρg
2
+ O(∆x2 ) = − , (3.20)
(∆x) E

which we may rearrange into (abbreviating the constant term by c ∈ R)


ρg
uj+1 − 2uj + uj−1 = − (∆x)2 = c. (3.21)
E
The fixed top of the bar is easily implemented by a Dirichlet boundary condition, enforcing

u0 = 0. (3.22)

The free bottom end of the bar requires imposing the derivative at that grid point. To this end,
we introduced a ghost node at xn+1 = xn + ∆x (which is outside the bar) to enforce the free
traction boundary condition, e.g., via a first-order forward-Euler approximation:
un+1 − un
=0 ⇔ un = un+1 . (3.23)
∆x
This completes the finite-difference formulation: central-difference stencil (3.21) is applied to
all interior nodes j = 1, . . . , n, while nodes 0 and n + 1 are updated by the boundary conditions
u0 = 0 and un+1 = un , respectively.

33
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

This results in a linear system of equations:


    
1 0 0 0 ... u0 0
 ..   ..   .. 
 .   .  .
 .   
  ..   c 


 1 −2 1    
1 −2 1   uj   c  ρg
(∆x)2 .


  ..  =  c 
    with c=− (3.24)

 1 −2 1  .    E
 ..   .   .. 

 .   .  .
 .   
 1 −2 1  un   c 
−1 1 un+1 0

Notice how we replaced the first and last rows in the above matrix and the respective entries in
the right-hand-side vector in order to enforce the two boundary conditions. This is a convenient
strategy to impose boundary conditions directly within the system to be solved (which we will
also exploit later in the context of finite elements).

Solving the above linear system for vector (u0 , . . . , un+1 ) yields the approximate finite-difference
solution, which is shown below for n = 9, 19, 29, 49, and 99, showing convergence with increasing
number of grid points towards the exact solution u(x) (included as the solid line). The shown
uE
values of (u1 , . . . , un ) are normalized such that ū = ρgL 2 and x̄ = x/L. Note that convergence

is from below, i.e., the discretized bar appears stiffer than it is in reality (a fact that we will get
back to later).

u
0.5 exact sol.

0.4

n = 99
0.3
n = 49
n = 29
0.2 n = 19
n = 9
0.1

x
0.2 0.4 0.6 0.8 1.0

This is not a time-dependent problem, hence our above definition of explicit vs. implicit schemes
does not apply. Yet, we see that solving for the unknowns involves the solution of a (linear)
system of equations. Therefore, one usually refers to an implicit solution scheme here as well,
since one cannot consecutively or independently in parallel solve for each grid point, but we
have to solve for all grid points at once by solving the above system of equations.

34
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

4 Stability of Finite Difference Schemes

So far, we have derived finite difference approximations for derivatives in space and time, and we
have discussed the explicit and implicit finite-difference schemes resulting from applying those
approximations to PDEs. We still need to discuss the suitability of particular combinations
of finite-difference combinations in space and time for a particular PDE. Unfortunately, not
every choice of finite-difference approximations is a good one, as some schemes are known
to become unstable and produce nonsensical results (as we will see below). This raises the
question of finite-difference stability, which is classically associated with two concepts we
need to discuss:

• The Courant-Friedrichs-Levy or CFL condition is a necessary condition for the sta-


bility of a finite-difference scheme.

• Von Neumann analysis yields a sufficient condition for the stability of a finite-difference
scheme.

We will discuss the two concepts (along with the related approach of so-called phase error
analysis) in the following at the example of the 1D wave equation. Note that we will not go
deep into the topic but present the methods and concepts needed for subsequent discussions.

4.1 CFL condition

Every finite-difference stencil comes with a so-called numerical domain of dependence, which
describes how information is passed from one time step to the next within the grid. For exam-
ple, consider the 1D wave equation which, when discretized by second-order central-difference
approximations in space and time becomes

uα+1
j − 2uαj + ujα−1 uαj+1 − 2uαj + uαj−1
= c2 . (4.1)
(∆t)2 (∆x)2

Drawing the stencil in the shape of a plus sign indicates that uα+1
j depends on information at
the previous time step, specifically on uj+1 , uj and uj−1 , as well as on uα−1
α α α
j from two time
steps ago. Of course, one could also apply the same stencil at the previous time, which would
reveal that uαj depends on information from uα−1 α−1
j+1 , uj and uα−1 α−2
j−1 , as well as on uj , etc.

When repeatedly applying the stencil to a large t


grid, we may draw the numerical domain of
dependence as all those points whose infor-
mation was affected the value uα+1 . For the Dx
j
above example this turns into a triangular fan Dt
(as shown on the right in blue), as any change to numerical domain
the value of u at a grid point inside the fan af- of dependence
fects the value of uα+1 , whereas points outside 1/c
j
the fan do not affect the value of uα+1 j . The
slope of the two curves limiting this fan in the mathematical domain
x-t-diagram are simply ±∆t/∆x. of dependence x
We may also define a mathematical domain of dependence by studying the exact solution of the
wave equation, which we know from Analysis and Dynamics is composed of characteristics of

35
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

the type

u(x, t) = f1 (x + ct) + f2 (x − ct) (4.2)

for some arbitrary (sufficiently smooth) functions f1 and f2 . This implies that

x + ct = const. and x − ct = const. (4.3)

are so-called characteristics of the solution, i.e., lines in the x-t-diagram along which the solution
u(x, t) is constant. We may also think of these as lines along which information travels at
speed c. Now, consider a grid point (xj , tα ) such that the two characteristics through this point
are defined by

x + ct = xj + ctα and x − ct = xj − ctα . (4.4)

The fan enclosed below these two lines is the mathematical domain of dependence (shown
above in red), since any point inside the fan can affect the solution on the bounding curves
of the cone and hence can affect u(xj , tα ). The latter does not apply to points outside the
fan. Physically speaking, if an event occurs outside the red fan, it cannot propagate sufficiently
fast to grid point xj to reach the latter at or before time tα . Mathematically speaking, we
may invoke d’Alembert’s formula: if the initial conditions are supplied as u(x, t0 ) = u0 (x) and
u̇(x, t0 ) = v0 (x), then
α
u0 (xj + ctα ) + u0 (xj − ctα ) 1 xj +ct
Z
α
u(xj , t ) = + v0 (y) dy, (4.5)
2 2c xj −ctα

which again confirms that u(xj , tα ) depends only on information which, at time t0 = 0, is
contained within the range xj − ctα ≤ x ≤ xj + ctα . Anything outside does not affect u(xj , tα ).

The Courant-Friedrichs-Levy (CFL) condition6 now states that convergence, and thus
stability, requires that the mathematical domain of dependence is contained within the numerical
domain of dependence. In other words, to give the numerical scheme a chance to converge to the
correct solution, it must have sufficient information to find the correct solution; this is only the
case of the numerical domain of dependence (which affects the solution at future times) includes
the mathematical domain of dependence (which affects the analytical solution at future times).

For the above example of the 1D wave equation, this implies that the fan of the mathematical
domain of dependence must be enclosed by the fan of the numerical domain of dependence,
which – by comparing the slopes of the bounding lines – is equivalent to requiring that
∆x ∆x c ∆t c ∆t
− ≤c≤ ⇔ −1≤ ≤1 ⇔ ≤ 1. (4.6)
∆t ∆t ∆x ∆x
This is the CFL condition for the 1D wave equation. One often defines
c ∆t
σ= (4.7)
∆x
as the so-called CFL number (or Courant number), so that −1 ≤ σ ≤ 1. We point out
that this is unfortunately only a necessary condition of stability. Mathematically speaking, it
stems from a linear stability analysis only and is not sufficient – though a good indicator – for
guaranteeing the stability of the finite-difference scheme. In order to determine the sufficient
condition(s) of stability, we need to discuss the methods described in the following.
6
The CFL condition is named after mathematicians Richard Courant, Kurt Friedrichs, and Hans Lewy, who
introduced it in a seminal paper in 1928.

36
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

4.2 Von Neumann analysis

Loosely speaking, stability requires that small errors in the numerical solution uαj (which always
exist due to round-off errors and machine precision) remain bounded and do not grow over time,
when the finite-difference scheme is applied time and time again in an iterative fashion. The
latter would imply instability and result in exponential growth of numerical noise over time.

Assume that at any given time there appears a small noise in the solution, which we call u(x).
Recall from
P analysis that any arbitrary function f (x) can be decomposed into a Fourier series:
u(x) ≈ ∞ i=0 uk eikx . Since the PDE and the finite-difference stencils in our case are all linear,

we may consider only a single term in that infinite series and consider its stability in isolation
(if any one of those terms causes instability and hence exponential growth over time, then the
scheme is unstable). For the same reason, the amplitudes uk play no significant role. Therefore,
we consider noise of the type

u(x) ∼ e−ikx , (4.8)

where 1/k√∈ R is the wavelength of the noise (and the minus sign is only for convenience later)
and i = −1. The question is now: given a finite-difference scheme, what happens to such
noise over time? For example, a moving wave has the form

u(x, t) ∼ ei(ωt−kx) . (4.9)

With the finite-difference approximation, this becomes at some time tα and location xj (assum-
ing uniform spacings ∆t and ∆x)
α −kx )
u(xj , tα ) ∼ ei(ωt j
= ei(ωα ∆t−j ∆x k) . (4.10)

Note that this function maintains a constant amplitude over time. To allow the amplitude
to increase or decrease, the method known as von Neumann analysis7 starts with a more
general ansatz by defining z = eiω∆t ∈ C, which turns (4.10) into

uαj = z α e−ijk∆x with z∈C (4.11)

This implies that for any grid point xj the ratio between the solution at the next time step over
the solution at the current time evaluates to

u(xj , tα+1 ) uα+1


j
= = z. (4.12)
u(xj , tα ) uαj

z can hence be interpreted as a (complex-valued) magnification factor, indicating how small


harmonic signals propagate from one time step to the next. For a traveling wave, we know that
z = 1, so that the amplitude remains constant.

Stability requires that ∥z∥ ≤ 1 because, otherwise, exponential growth occurs over time. If
∥z∥ > 1, then uαj = z uα−1
j and ||uα+1
j || > ||uαj ||, and the analogous applies to all time steps,
thus implying exponential growth over time.

7
This method was originally developed at Los Alamos National Laboratory based on 1947 work by John Crank
and Phyllis Nicolson. However, it is named after John von Neumann, who more rigorously studied the concepts
in 1950.

37
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Example 4.1. Von Neumann analysis of the 1D advection equation

As an illustrative example, let us consider the advection equation governing, e.g., fluid trans-
port processes, which we introduced in Section 1.7. The unknown field u(x, t) is governed by

u̇(x, t) + v u,x (x, t) = 0, (4.13)


here for instructive purposes written in 1D with a known, constant advection speed v ∈ R. Let
us introduce a regular grid in both space and time and discretize the advection equation by
a backward-Euler approximation in time and a first-order central difference approximation in
space, i.e.,
uαj − uα−1
j uαj+1 − uαj−1
u̇(xj , tα ) = + O(∆t), u,x (xj , tα ) = + O(∆x2 ). (4.14)
∆t 2∆x
Insertion into (4.13) leads to
uαj − uα−1
j uαj+1 − uαj−1 c
uαj − uα−1 = − uαj+1 − uαj−1 ,

= −v ⇔ j (4.15)
∆t 2∆x 2
where we introduced the dimensionless speed
∆t
c=v . (4.16)
∆x
Note that (4.15) defines an implicit stencil since it requires solving a system of equations for
the unknown field u at time tα . (Try and draw the stencil!)

Let us perform von Neumann stability analysis, which starts by assuming an error of the type
uαj = z α e−ikxj with z ∈ C. (4.17)

Insertion into uαj − ujα−1 = − 2c (uαj+1 − uαj−1 ) from (4.15) gives


c 
z α e−ikxj − z α−1 e−ikxj = − z α e−ikxj+1 − z α e−ikxj−1 . (4.18)
2
Using that xj±1 = xj ± ∆x transforms the above into
c 
z α e−ikxj − z α−1 e−ikxj = − z α e−ik(j+1)∆x − z α e−ik(j−1)∆x . (4.19)
2
For simplicity, we divide by z α e−ikxj , which leads to
1 c  c
1 − = − e−ik∆x − e+ik∆x = 2i sin(k ∆x) = i c sin(k ∆x), (4.20)
z 2 2
where we used that eik∆x − e−ik∆x = 2i sin(k∆x). Finally, isolating z ∈ C gives
1 1 2 2
= 1 − i c sin(k ∆x) ⇒ 2 = 1 + c sin (k ∆x) ≥ 1 (4.21)
z ∥z∥
and therefore
1
∥z∥2 = ≤ 1. (4.22)
1+ c2 sin2 (k ∆x)
We conclude that, irrespective of k and ∆x, we have ∥z∥ ≤ 1. Therefore, we call this scheme
unconditionally stable: the stability condition is generally satisfied, irrespective of the choice
of ∆x and ∆t (and also of the sign of v as well as of the wave length k). This is the best possible
scenario – the finite difference scheme is expected to show no instability at all.

————

38
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Unconditional stability is generally observed only in implicit schemes, never in explicit schemes.
This can be a significant advantage of an implicit finite-difference scheme, as it implies arbitrary
choices of ∆t and ∆x are possible, in principle. Note that, unfortunately, not every implicit
scheme is unconditionally stable. Explicit schemes are usually conditionally stable or uncon-
ditionally unstable, as we explore in the following and in the projects. This may pose severe
restrictions on the admissible choices of ∆x and/or ∆t.

Example 4.2. Von Neumann analysis of the 1D wave equation

As a more advnaced example, let us again consider the stencil (4.1) for the 1D wave equation:

uα+1
j − 2uαj + ujα−1 uα
2 j+1
− 2uαj + uαj−1
=c . (4.23)
(∆t)2 (∆x)2

Insertion of (4.11) into the finite-difference-approximated wave equation (4.23) yields

c2 (∆t)2 α  −i(j+1)∆x k 
z α+1 − 2z α + z α−1 e−ijk∆x = −ijk∆x −i(j−1)∆x k

z e − 2e + e . (4.24)
(∆x)2

Dividing by z α e−ijk∆x and noting that e−i ∆x k + e+i ∆x k = 2 cos(k ∆x) leads to

c2 (∆t)2 h −i ∆x k i
z − 2 + z −1 = e − 2 + e +i ∆x k
= 2σ 2 [cos(k ∆x) − 1] (4.25)
(∆x)2

with
∆t
σ=c . (4.26)
∆x
Multiplying by z turns (4.25) into a quadratic equation in z,

z 2 − 2 1 + σ 2 [cos(k ∆x) − 1] z + 1 = 0,

(4.27)

whose solution is
q
z = 1 + σ [cos(k ∆x) − 1] ± (1 + σ 2 [cos(k ∆x) − 1])2 − 1
2
p (4.28)
= 1 + σ 2 [cos(k ∆x) − 1] ± |σ| [cos(k ∆x) − 1] (2 + σ 2 [cos(k ∆x) − 1]).

Now, observe that


 

if |σ| ≤ 1 ⇒ [cos(k ∆x) − 1] 2 + σ 2 [cos(k ∆x) − 1] ≤ 0 ∀ k ∆x, (4.29)


 
| {z } | {z }
≤0 ≥−2
| {z }
≥0

so that
p p
[cos(k ∆x) − 1] (2 + σ 2 [cos(k ∆x) − 1]) = i − [cos(k ∆x) − 1] (2 + σ 2 [cos(k ∆x) − 1]),

is purely imaginary. Consequently, the norm of z evaluates to


2
∥z∥2 = 1 + σ 2 [cos(k ∆x) − 1] − σ 2 [cos(k ∆x) − 1] 2 + σ 2 [cos(k ∆x) − 1] = 1. (4.30)


Recall that stability requires that ||z|| ≤ 1, which is indeed the case here for all choices of k ∆x.

39
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

By contrast,
 

if |σ| > 1 ⇒ [cos(k ∆x) − 1] 2 + σ 2 [cos(k ∆x) − 1], (4.31)


 
| {z } | {z }
≤0 ≥−2
| {z }
<0 for some choices of k ∆x

so that for some values of k∆x (e.g., the case when cos(k∆x) = −1) the above term is positive
and hence
p
[cos(k ∆x) − 1] (2 + σ 2 [cos(k ∆x) − 1]) ∈ R for some values of k ∆x.

Consequently, for some values of k∆x the norm of z in this case evaluates to
p
∥z∥ = 1 + σ 2 [cos(k ∆x) − 1] ± |σ| [cos(k ∆x) − 1] (2 + σ 2 [cos(k ∆x) − 1]) . (4.32)

Recall that for stability we need to have ∥z∥ ≤ 1 for all possible choices of k ∆x. Now, take,
e.g., the special case cos(k∆x) = −1, for which we conclude
p p
∥z∥± = 1 + σ 2 [−1 − 1] ± |σ| [−1 − 1] (2 + σ 2 [−1 − 1]) = 1 − 2σ 2 ± 2|σ| σ 2 − 1 . (4.33)

While the +-solution ensures ∥z∥+ ≤ 1, the −-solution reveals


p p
if |σ| > 1 ⇒ ∥z∥− = 1 − 2σ 2 − 2|σ| σ 2 − 1 = 2σ 2 + 2|σ| σ 2 − 1 − 1 > 1.

In summary, we have thus seen that


(
≤ 1 for all k∆x, if |σ| ≤ 1,
∥z∥ (4.34)
> 1 for some k∆x, if |σ| > 1.

This means that, for any possible choice of a disturbance of wavelength k, that disturbance
will not grow over time but remain bounded if |σ| ≤ 1, which implies stability. If, by contrast,
|σ| > 1, there are are certain disturbances that will grow exponentially over time, hence implying
instability.

Recall the definition of σ in (4.26), which allows us to formulate the condition for stability as
∆t
|σ| ≤ 1 ⇔ −1≤c ≤ 1. (4.35)
∆x
Since stability depends on this condition (and ∆x and ∆t cannot be chosen arbitrarily), we say
the scheme is conditionally stable: if (4.35) is satisfied, the scheme is stable. Otherwise, it
is not. This conditional stability is often observed for explicit schemes.

Shown below is an example of the solution obtained from the explicit finite difference scheme
for the wave equation, showing how violation of (4.35) leads to an unstable scheme (the solution
grows beyond bounds after a few time steps if c∆t/∆x > 1).

u(t) u(t) u(t)


u(t1) u(t3)
u(t1) u(t2) u(t3) u(t1) u(t2) u(t3)
t
u(t2)
t t
=0.05 =1.00 =1.01

40
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Let us summarize the general procedure used for von Neumann analysis:
1. Insert the ansatz uαj = z α e−ijk∆x into the finite-difference scheme.

2. Simplify as much as possible, e.g., dividing by z α eijk∆x to remove all common terms.
Recall that eik∆x + e−ik∆x = 2 cos(k ∆x) and eik∆x − e−ik∆x = 2i sin(k∆x).

3. Solve for z.

4. Compute ∥z∥ and check if ∥z∥ ≤ 1, which implies stability.

If ∥z∥ ≤ 1 for all possible choices of ∆x and ∆t, then we say the scheme is unconditionally
stable (this is the best-case scenario). If ∥z∥ ≤ 1 holds only for specific choices of ∆x and/or
∆t, then we say the scheme is conditionally stable (to use the scheme, we must satisfy the
specific conditions). Finally, if ∥z∥ > 1 for all choices of ∆x and ∆t, then we say the scheme
is unconditionally unstable (this is the worst-case scenario: the scheme is useless).

Why do we care about the stability of a scheme? The Lax-Richtmyer theorem (also known
as Lax equivalence theorem) states that a finite-difference scheme converges if and only if

(1) the scheme is consistent (i.e., all truncation errors decay as ∆x, ∆t → 0) and

(2) the scheme is stable.

Therefore, it is essential to verify that any newly devised finite-difference scheme is consistent
and stable. Consistency is verified by the error order, O(∆xn , ∆tm ) in the finite-difference
stencil, whereas stability is checked by von Neumann analysis.

4.3 Phase error analysis

Any finite-difference scheme introduces errors, since the exact governing PDE/ODE is approxi-
mated by finite differences, which are obtained from truncated Taylor series. Even if an implicit
is shown to be unconditionally stable (thus admitting arbitrary choices of ∆x and ∆t), this does
not imply that all choices of ∆x and ∆t are equally good choices. Aside from the stability of
the scheme, we also need to worry about the accuracy of solutions. Therefore, it makes sense to
briefly discuss what is known as phase error analysis – which, as we will see, is closely tied
to the above von Neumann stability analysis. We will specifically focus on the wave equation.

In phase error analysis, we are interested in how signals propagate by application of a finite-
difference scheme. For example, for the 1D wave equation we know that its exact solution
transports any initial condition u(0, t) at speeds ±c through the 1D bar. Specifically, if we use
the ansatz u(x, t) = ei(ωt−kx) and insert it into the wave equation, we obtain

ü = c2 u,xx ⇒ −ω 2 ei(ωt−kx) = c2 (−k 2 )ei(ωt−kx) ⇒ |ω| = c|k|. (4.36)

This is known as the dispersion relation of the 1D wave equation and indicates that, for every
wavelength k of a given signal, there exists a unique frequency ω = ±ck, at which the signal
will propagate.

Now, let us turn to a finite-difference approximation. We assume that at a time tα the grid
point values correspond to a harmonic signal of the form
α −kx )
uαj = ûei(ωt j
= ei(ωα ∆t−j ∆x k) (4.37)

41
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

with frequency ω ∈ R and wavelength k ∈ R. Note that this is identical to how we started
our discussion of von Neumann analysis (cf. Eq. (4.37)). By the same argument made there,
viz. that we are concerned only with linear ODEs/PDEs, we may set û = 1 without loss of
generality and interpret the above as a single term in a Fourier series, so that, in principle,
any arbitrary function can be represented by the above upon superposition of many modes.
The idea of phase-error analysis is to insert (4.37) into a finite-difference scheme and to derive
the relation between ω and k. Ideally it should recover (4.36); however, the finite-difference
approximation introduces errors.

Example 4.3. Phase-error analysis of the explicit scheme for the wave equation

As an instructive example, we consider the same explicit scheme for the 1D wave equation
already introduced in Example 4.2, viz.

uα+1
j − 2uαj + ujα−1 uαj+1 − 2uαj + uαj−1
= c2 . (4.38)
(∆t)2 (∆x)2

Inserting (4.37) into (4.38) results in

ei(ω(α+1) ∆t−j ∆x k) − 2ei(ωα ∆t−j ∆x k) + ei(ω(α−1) ∆t−j ∆x k)


c2 (∆t)2 h i(ωα ∆t−(j+1) ∆x k) i(ωα ∆t−j ∆x k) i(ωα ∆t−(j−1) ∆x k)
i (4.39)
= e − 2e + e .
(∆x)2

Analogous to von Neumann analysis, we divide by uαj = ei(ωα ∆t−j ∆x k) to obtain


h i ∆t
eiω ∆t − 2 + e−iω ∆t = σ 2 ei ∆x k − 2 + e−i ∆x k with σ=c . (4.40)
∆x
Further dividing by 2 and using Euler’s identity on both sides of the equation yields

cos(ω ∆t) − 1 = σ 2 [cos(k ∆x) − 1] . (4.41)


q
1−cos x x

Note that with the identity 2 = sin 2 , (4.42) can also be formulated as
   
ω ∆t k ∆x
sin = σ sin . (4.42)
2 2

For given choices of the grid spacings ∆x and ∆t, the above presents a relation between fre-
quency ω and wavelength k. In other words, if an initial signal is a harmonic function of
wavelength k, then (4.42) defines the frequency (or frequencies) ω at which the signal will prop-
agate. Conversely, if we excited the bar with a signal at frequency ω, (4.42) yields the wave
length k at which the excitation will propagate through the bar.

Note that for small values of |ω ∆t| ≪ 1 and |k ∆x| ≪ 1, we may expand (4.42) to leading order
(using sin x = x + O(x2 ) and recalling σ = c∆t/∆x):

ω ∆t k ∆x c∆t
≈ σ ⇔ |ω∆t| = |k| ∆x ⇔ |ω| = c|k|, (4.43)
2 2 ∆x

which matches the exact dispersion relation (4.36). Hence, in the limit of a very fine grid, the
finite-difference scheme is expected to reproduce the exact behavior. By contrast, for general
values of ω ∆t and k ∆x, (4.42) does not agree with the exact relation and hence introduces an
error, the so-called phase error.

42
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

As shown above, using the explicit finite difference scheme for the wave equation indeed incurs
phase error if |σ| < 1. The below figure shows the results obtained from the finite difference
scheme for σ = 0.7. An initial wave is imposed at the left end, which travels in the positive
x-direction. Though the scheme is stable for σ = c∆t/∆x = 0.7 < 1 (as expected from von
Neumann analysis), it produces significant phase error – see the region highlighted by the dashed
ellipse. Certain frequencies cannot propagate due to numerical damping, so that the wave form
changes and errors grow over time. (For comparison, the same solution for c∆t/∆x = 1 was
shown on page 41.)

u(t)
u(t1) u(t2) u(t3)

To better understand the implications of the numerical dispersion relation (4.42), let us consider
three cases:

• σ = 1: in this case (4.42) simplifies to

| sin(ω ∆t)| = | sin(k ∆x)| (4.44)

and, since σ = 1 implies c∆t/∆x = 1, we may conclude

|ω|∆t = |k|∆x ⇒ |ω| = c|k|, (4.45)

which agrees with the exact dispersion relation (4.36). Therefore, if we choose ∆t and ∆x
such that σ = c∆t/∆x = 1, the finite-difference scheme may produce exact results.

• |σ| > 1: in this case, the numerical dispersion relation is


   
ω ∆t k ∆x
sin = σ sin . (4.46)
2 2

Note that the left-hand side varies between [0, 1], whereas the right-hand side covers the
range [0, σ]. Therefore, there are cases of k for which the right-hand side becomes larger
than 1, so that there is no real ω that solves the above equation. Therefore, solutions must
be complex: ω ∈ C. We may also look back at the alternative form (4.41): for some values
of k, the right-hand side of (4.41) becomes negative, so that there are solutions ω ∈ C
(because no real solution x exists for cos x > 1). Further, if ω ∈ C is a solution, then so
is ω † ∈ C (its complex conjugate). In this case either eiωt or e−iωt implies exponential
growth of solutions. Therefore, certain wave vectors k cause instability, and we may
conclude that for |σ| > 1 the scheme is unstable, since some small perturbations will grow
exponentially over time. Note that this agrees with the stability conditions we obtained
from von Neumann analysis (see Example 4.2).

• |σ| < 1: we showed in Section 4.2 that this case corresponds to a stable finite-difference
scheme. This is indeed confirmed here, where (4.46) must again be investigated: now,
since |σ| < 1, to any k ∈ R there exists a solution ω ∈ R, found by solving (4.46).
However, we notice that in this case there exist frequencies ω for which no solution k ∈ R
exists according to (4.46) (only solutions k ∈ C). This is illustrated in the plot below,

43
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

which shows that – for some value of σ < 1 – there are values of ω ∆t (shaded in red in
the plot) for which sin(ω∆t/2) > 1, so that (4.46) offers no real solution for k. Physically,
this implies that waves at those frequencies ω cannot propagate. Imagine, e.g., that one
end of the 1D bar is exciting at one of those “forbidden” frequencies ω by an external
excitation (through an applied Neumann or Dirichlet BC), then no wave inside the bar will
form that propagates the signal at constant amplitude, since no real wave vector k can be
found. (In fact, k ∈ C can be shown to produce damped solutions, i.e., displacement fields
u(x, t) that exponential decay with distance x into the bar). Consequently, for |σ| < 1
the scheme is stable but it damps certain frequencies and therefore shows so-called phase
error.

sin(ω Δt/2)

ω Δt
π 3π 5π
0 π 2π 3π
2 2 2

In summary, we confirm that |σ| ≤ 1 implies a (conditionally) stable finite-difference scheme.


Moreover, we have seen that, within the stable regime, only σ = 1 leads to no numerical
damping, while |σ| < 1 leads to numerical damping of certain frequencies. Note that this
is purely numerical damping: the linear elastic wave equation has no natural damping. Any
such observed damping is introduced merely by the numerical scheme used to solve it. These
conclusions offer helpful insight into how to choose (and how not to choose) the grid spacings
∆x and ∆t for a given wave speed c.

————

4.4 Advantages & disadvantages of direct methods

The above finite-difference schemes are powerful direct numerical techniques, which are rela-
tively simple to develop and easy to implement (especially for explicit schemes that do not
require the solution of global systems). These are key advantages of direct methods such as
finite differences.

However, they also come with considerable disadvantages. Problems associated with direct
methods such as finite differences include the following:

• a regular grid is required (which is fine for many fluid mechanics problems but oftentimes
problematic for complex solid geometries, especially when undergoing large deformation).
Adaptive grids or spatially varying grid sizes can be a solution, but they come with
considerable complications compared to the above examples.

• variables are defined only at grid points, hence the error is minimized only at grid points
(and we have no information about what happens between grid points; both the primary

44
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

fields and their errors are undefined between grid points). This can be problematic when
seeking approximate solutions that are “globally optimal ” (i.e., a solution could be correct
at grid points but nonsensical or erroneous in between). Also, one needs to address how
BCs/ICs can be applied in between grid points and how about moving BCs are imposed.

• stability/efficiency issues may arise due to the above stability restrictions. Choices of ∆t
and ∆x are not arbitrary but – aside from accuracy concerns – have strong influence on
the stability of a scheme. Especially for explicit finite-difference schemes (as we discuss
in the Exercises) dictates the maximum grid sizes to be used, which may impose severe
computational costs due to small grid spacings.

Of course, there is no free lunch. Every numerical technique comes with advantages and dis-
advantages, and it is up to the user to choose the right technique with the optimal accuracy
and efficiency for a given application. Given the above limitations, finite differences are un-
fortunately not ideal for simulating problems in solid mechanics, where we typically deal with
complex geometries and intricate loading and boundary conditions. Indirect methods (such as
the Finite Element Method) are therefore the method of choice in many engineering applications
involving solids and structures. Before we turn to the theoretical basis of indirect methods, we
will first introduce a simple tool for structural analysis (with direct relation to finite differences).

45
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

5 Structural Analysis, Bars & Trusses

5.1 From finite differences to bar elements

Let us recall Example 3.2, where we calculated the deformation of an elastic rod hanging from
the ceiling and stretching under its own weight. The finite-difference approximation that we
derived there also admits a physical interpretation, as schematically shown below.

x0 m/2
m
g Dx m/2 Dx
x Dx =
^ k m
xj-1 m/2 m
k
u(x) L uj xj
+

+
k uj
xj+1
k
+ = m
xn m/2

Imagine that we subdivide the hanging elastic bar into n short bar segments, each of length
∆x = L/n. Let us refer to each segment as a bar element, while we refer to each point
connecting the segments as a node. If we assume that each bar bears a constant strain (but
the strain may, of course, vary from bar element to bar element), then we may replace each bar
element by an elastic spring of effective stiffness (with Young’s modulus E and cross-sectional
area A)

EA nEA
k= = . (5.1)
∆x L
At the same time, each bar element carries a mass m = ρA∆x = ρAL/n (with ρ being the mass
density), which we choose to distribute evenly to its two ends. As a result, we arrive at a chain
of n + 1 nodes (the inner ones having mass m as they are connected to two bars, the first and
last ones m/2) connected by identical linear springs of effective stiffness k = nEA/L. If node j
undergoes a downward displacement8 uj , then static force equilibrium for the jth (inner) node
becomes
nEA j  nEA j+1  gρAL
− u − uj−1 + u − uj + =0 (5.2)
L L n
or (after some simplification)
 2
j+1 j j−1 ρg L ρg
u − 2u + u =− = − (∆x)2 , (5.3)
E n E

which is identical to (3.21) from Example 3.2 for each inner mass. The corresponding equations
for the first and the last node follow from the boundary conditions: u0 = 0 is enforced at the top,
while the bottom node adheres to a different boundary condition, e.g., mg/2 = k(un−1 − un )
for equilibrium at a free end.
8
Note that we use superscripts j (instead of subscripts) to denote the number of a node here and in the
following for reasons that will become clear soon.

46
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Let us formulate the equilibrium relations in matrix form (analogous to 3.24) and forget about
the boundary conditions for a moment. This leads to
   1
.. u 1
 .   ..  2
 ..  .  1
 .     
   ..   .. 

 k −2k k  . 
 j
.
 

 k −2k k  
 u  + mg 1 = 0
  ⇔ KU = Fext (5.4)
 k −2k k   .
.   .. 
  .  .
 ..   .. 
   
 .  . 
1
1

..
. un | {z 2 }
=[F ]
| {z } | {z }
ext
=[K] =[U ]

Matrix K is referred to as the stiffness matrix, U is the vector of all nodal unknowns, and
Fext is the external force vector, i.e., the vector of all external forces applied to the nodes.

We further define the internal force vector as


Fint = KU (5.5)
such that in equilibrium we must have
Fint = KU = Fext . (5.6)
While Fext is the vector of all externally applied forces, Fint is the vector of all internal forces
generated by the deformed bar, acting against the externally applied loads and being equal to
those in equilibrium.

5.2 Assembly operations in 1D

The structure of matrix K as well as of vector Fext follows from


what is known as the assembly of the stiffness matrices and ex-
u
1
u2
ternal forces of individual bar elements. Let us consider a single
bar element of stiffness k, having nodes 1 and 2, as shown. Fext1 k Fext
2

i act on the two nodes i = 1, 2, then mechanical equilibrium (i.e., static


If external forces Fext
linear momentum balance for each of the two masses) requires
k(u2 − u1 ) + Fext
1
= 0, k −k u1
    1 
Fext
⇒ 2 = F2 . (5.7)
2 1 2
−k(u − u ) + Fext = 0. −k k u ext
| {z } | {z }
=[K] =[Fext ]

For a more detailed derivation and discussion, see Appendix B.


Next, let us consider the analogous example of three par-
1 2 3
u u u ticles connected by elastic springs of stiffnesses ki,j con-
necting nodes i and j, as shown. While the outer two
k 1,2 k 2,3 nodes are connected to only a single spring each, the
inner node is connected to two springs.
The resulting stiffnesses matrix for the three nodes connected by the two springs is derived as
 
k1,2 −k1,2
[K] = −k1,2 k1,2 + k2,3 −k2,3  , (5.8)
−k2,3 k2,3

47
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

where we identify the individual contributions of the two springs, each characterized by a
stiffness matrix of the type in (5.7). Note that the springs acting simultaneously simply results
in the contributions of the two springs being summed. In addition, each spring acts on only
two specific nodes, and the components of the spring stiffness matrix of each spring are added
onto those components in (5.8) that correspond to those nodal degrees of freedom. (That is,
the spring with stiffness k1,2 acts on u1 and u2 , which are found in the first and second columns
and rows of [K] in (5.8). By contrast, the spring with stiffness k2,3 acts on u2 and u3 , which
are found in the second and third columns and rows of [K] in (5.8).) This addition of the
individual spring or bar element stiffness matrices into the total stiffness matrix is the process
of assembly.
Imagine that we add a third spring of stiffness k1,3 , which
connects nodes 1 and 3. What would the global stiffness u
1
u2 u3
matrix look like? Exactly:
  k 1,2 k 2,3
k1,2 + k1,3 −k1,2 −k1,3
[K] =  −k1,2 k1,2 + k2,3 −k2,3  . (5.9)
−k1,3 −k2,3 k2,3 + k1,3
k 1,3

Here and in the following, we must differentiate between the local stiffness matrix Ke of a
single element (which is of size 2 × 2 in 1D) and the global stiffness matrix (which is of size
n × n for a system having n nodes). For the assembly, we must know which spring is connecting
which nodes of the global system. This mapping from local onto global nodes (which reveals the
columns and rows in the global stiffness matrix to which a local contribution must be added)
is often referred to as the local-to-global map.

Let us mention that the specific structure of K that results from the above assembly process
of multiple springs, each having a positive stiffness, ensures that K is positive-semi-definite.
(We will show below that, if we impose suitable boundary conditions, the matrix becomes
positive-definite.)

5.3 Components of the stiffness matrix

Let us try to understand the components of K in more detail. To this end, consider the case of
n = 4, i.e., a chain of four particles elastically coupled by springs of uniform stiffness k. For a
static problem (neglecting dynamic effects), the equations of motion reduce to the equilibrium
equations:
   1  1 
k1,2 −k1,2 u Fext
−k1,2 k1,2 + k2,3 −k 2 2 
2,3    = Fext 
u
  
 (5.10)
 −k2,3 k2,3 + k3,4 −k3,4  u3  Fext 3 

−k3,4 k3,4 u4 4
Fext

Let us assume displacements of the following type: we fix all degrees of freedom (dofs) and only
choose one non-zero dof. For example, we may choose u2 = 1 and ui = 0 else (i.e., only the
second particle is moved to the right by a distance 1, while all other particles stay put). As a
consequence, we obtain
      1 
k1,2 −k1,2 0 −k1,2 Fext
−k1,2 k1,2 + k2,3 −k2,3 2 
 1 = k1,2 + k2,3  = Fext  .
     

3  (5.11)
 −k2,3 k2,3 + k3,4 −k3,4   0   −k2,3   Fext
−k3,4 k3,4 0 0 4
Fext

48
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

0 1 0 0
K 12 K 22 K 32
This shows that, in order to displace the second particle by u2 = 1 while keeping all other
particles fixed (as shown above), we must apply the external forces (5.11) to the four particles;
a positive force to the second particle of magnitude K22 (to move it to the right), negative
forces to the first and third particle of magnitudes K12 and K32 (to keep them fixed), and no
force to the fourth particle. This shows that the second column of [K] represents the external
forces needed to move the second node by 1, while keeping all others fixed. Let us generalize
this observation:

The ith column of [K] contains those forces needed to move particle i by 1
(5.12)
without moving any of the other particles.

We hence recover that KU = Fint are the internal forces counteracting any externally applied
forces. That is, if external forces Fext are applied to the system, and if the particles consequently
displace by U , then KU are the internal forces produced by the system (e.g., through the
springs) to hold the external forces in balance. Equilibrium then requires that the internal force
of each particle equals the external force applied to that particle.

Notice the meaning of the diagonal stiffness component k(ii) : to displace particle i by 1 to the
right (while all other stay put), an external force of k(ii) (to the right) must be applied to particle
i. Since springs always apply a restoring force, we must have k(ii) > 0. k(ii) = 0 would imply
that particle i can be moved without applying any force (this can only be the case if particle i
is not properly connected to the neighboring particles via springs so rigid-body or zero-energy
modes exist).

Finally, we highlight that the above procedure results in a general approach to derive the stiffness
matrix of a given mechanical system: by displacing each degree of freedom by 1 and recording
the resulting forces on the nodes, we can assemble the complete stiffness matrix describing the
system. This is known as the direct stiffness method and will become handy later (e.g.,
when discussing beam elements).

5.4 2-node bar element in higher dimensions

So far we have only considered 1D deformation of bars. In general, the bar may be part of a 2D
or 3D structure and oriented in an arbitrary direction (and its two end points may move in any
direction). Therefore, it is important to generalize the above framework to higher dimensions.
This can be achieved by projecting the 2D or 3D displacements of the element nodes onto the
orientation of the bar element as follows.

In d dimensions, the nodal displacements of a bar element are in general


T T
Ue = u1e , u2e with uae = uae,1 , . . . , uae,d and a = 1, 2. (5.13)

That is, in 2D we deal with four nodal dofs (viz., the u1 - and u2 -displacement components of
each of the two nodes in the x1 - and x2 -directions, respectively), while in 3D we have six nodal
dofs (the u1 -, u2 - and u3 -displacement components of each of the two nodes). To make sure that
we do not confuse the two displacement components with the node numbering, we write the
index indicating the displacement component as a subscript, while the node number (here, a)

49
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

is a superscript (now we see why we switched to superscripts earlier). Moreover, we use the
subscript e to indicate a quantity associated with an element e. For example, Ue is the vector
of all nodal displacements of a single bar element e, while the global vector may be significantly
longer, depending on the number of bar elements to be considered in total.
We can obtain the (initial) orientation of an element in
u~
2 2
space from its nodal coordinates in the reference config- u e,2 e
T
uration, Xe = x1e , x2e such that ∆xe = x2e − x1e . In (x2 ,x2 )
e,1 e,2
u2 e,1
2D the angle with the x1 -axis is obtained from geometry
u~
as 1 1
u e,2 e
! j Dxe
x2e,2 − x1e,2 1
φe = arctan
x2e,1 − x1e,1
(5.14) (x1 ,x1 ) u
e,1 e,2 e,1

Since we are assuming small displacements (within the context of linear elasticity), we can find
a simple relation between the 2D (or 3D) displacements of the bar’s end points and the axial
deformation of the bar, as follows. The projection of the nodal displacements uae onto the
bar’s axis identifies the axial displacements Ũe of the two nodes (written with a tilde to avoid
ambiguity) as
 1 
ue,1
1 
 1  
ũe cos φe sin φe 0 0 ue,2 

2 = ⇔ Ũe = R(φe )Ue . (5.15)
ũe 0 0 cos φe sin φe u2e,1 
u2e,2
| {z }
=[R(φ )]e

These relations can easily be verified by the help of the above sketch. Notice further that the
1 , F̃ 2 )T , can be decomposed into
resulting axial forces acting at the two nodes, F̃int,e = (F̃int,e int,e
the nodal forces in 2D,
1 1 2 2
T
Fint,e = Fint,e,1 , Fint,e,2 , Fint,e,1 , Fint,e,2 , (5.16)
via the analogous inverse relation
 1
Fint,e,1
  
cos φe 0 !
1
Fint,e,2   sin φe 1
 F̃int,e
0

F 2
=
  0

2 ⇔ Fint,e = RT (φe )F̃int,e . (5.17)
int,e,1 cos φe  F̃int,e
2
Fint,e,2 0 sin φe

Recall that we previously showed for linear elasticity that Fint,e = Ke Ue . Here, combining
(5.15) and (5.17) hence leads to
Fint,e = RT (φe )F̃int,e = Ke Ue = Ke RT (φe )Ũe ⇔ F̃int,e = R(φe )Ke RT (φe ) Ũe .
| {z }
=K̃e

This last equation, however, is the relation between the axial forces and the axial displacements.
The matrix in between must be the stiffness matrix of the bar moving only in 1D, as found in
(11.10). Therefore, we must have
 
EA 1 −1
[K̃e ] = (5.18)
∆xe −1 1

We have thus found the general 2D stiffness matrix of the bar element as

R(φe )Ke RT (φe ) = K̃e ⇔ Ke = RT (φe )K̃e R(φe ) (5.19)

50
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

with the rotation matrix introduced above:


 
cos φe sin φe 0 0
R(φe ) = (5.20)
0 0 cos φe sin φe

Without derivation, we mention that the same relations apply in 3D, where each node has three
displacement components (and three force vector components). Here, relations (5.18) and (5.19)
still apply but with the 3D rotation matrix
 
l m n 0 0 0
R= , (5.21)
0 0 0 l m n
where l, m and n are, respectively, the direction cosines with the x1 -, x2 - and x3 -axes, i.e.,
l = cos ∠(x̃, e1 ) where x̃ is the unit vector pointing along the bar axis, m = cos ∠(x̃, e2 ), etc.

Example 5.1. Truss consisting of three bars in 2D


As a first example, consider a truss consisting of three linear elastic
bars connected by hinges and supported by a rigid, impenetrable F
ground, as shown on the right. Loading the truss by a vertical 3
E,A
force F , we seek the displacements of the three nodal hinges.
L L
We first compute the stiffness matrix of each bar element individ- ƒ ‚
ually, accounting for two displacement dofs per node. By reusing
the stiffness matrix derived in (5.18) and (5.19), the horizontal bar 1
L 2

(bar 1, connecting nodes 1 and 2) with φe = 0 and Ue = (u1 , u2 )T
has
 
1 0 −1 0
EA  0 0 0 0 .
[K1 ] = RT (0)K̃e R(0) =

(5.22)
L −1 0 1 0
0 0 0 0

Similarly, bar 2 on the right (connecting nodes 2 and 3) with φe = 2π 2 3 T


3 and Ue = (u , u ) has
√ √ 
− 3 √ −1

1
√ 3
EA − 3 3 3 −3
[K2 ] = RT 2π 2π √ √ .
   
3 K̃e R 3 = 4L  −1 (5.23)

√ 3 √1 − 3
3 −3 − 3 3
Finally, bar 3 on the left (connecting nodes 1 and 3) with φe = π3 and Ue = (u1 , u3 )T has
√ √ 
−1
√ − 3

√1 3
EA  3 3 − 3 √ −3 
[K3 ] = RT π3 K̃e R π3 = √
  
. (5.24)
4L  −1√ − 3 √1 3
− 3 −3 3 3
Note that it is important to choose the rotation angles φe consistent with the order of the
nodes (in the derivation of the rotated stiffness matrix, we assumed that φe is the angle of the
bar’s reference axis with the x1 -axis, with the first node being the center of that rotation). For
example, K3 is computed for Ue = (u1 , u3 )T . If instead one chooses Ue = (u3 , u1 )T for this
element, then we would have φe = − 2π 3 and a different stiffness matrix. This ambiguity will be
resolved in the following section.

————

51
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

5.5 Assembly operations

In order to find the nodal displacements in above truss problem, we need to formulate the
system of equations to be solved. This requires, as in the 1D case, the assembly of the global
stiffness matrix. Each of the above stiffness matrices represents a local stiffness matrix,
i.e., each of the matrices K1 , K2 and K3 are each valid only for one particular element, and the
matrices are therefore associated with the displacements of the nodes of the respective elements.
In order to solve the truss problem, we need to formulate the global system of equations for the
unknown displacements U = (u11 , u12 , u21 , u22 , u31 , u32 )T of the three nodes.

Notice that, to this end, we again differentiate between local and global dofs: e.g., bar element 2
(above) locally connects its two nodes with dofs (u1e,1 , u1e,2 ) and (u2e,1 , u2e,2 ). However, taking the
global view, it is linking the global nodes 2 and 3. Hence, local node 1 corresponds to the global
node 2, and local node 2 corresponds to the global node 3. This local-to-global map is an
essential book-keeping task within the FEM. To avoid confusion, we introduced the subscripts e
for local, element-internal quantities. For example, for element 2 we have u1e = u2 and u2e = u3 .
For element 3 we analogously have u1e = u1 and u2e = u3 , etc.

Example 5.2. Three-bar truss in 2D (continued)

Let us continue Problem 5.1 using the above local-to-global map. Now that we have understood
how local nodes (1 and 2 for each bar element) are linked to global nodes (1, 2 and 3), we can
assemble the global system. All we must do is add the components of the local stiffness matrices
to the right spots in the global stiffness matrix. For example, K1 (linking nodes 1 and 2) in the
global system with U = (u11 , u12 , u21 , u22 , u31 , u32 )T becomes

1 0 −1 0 0 0
 
 0 0 0 0 0 0
 
EA −1 0 1 0 0 0 .

[K1 ]global = (5.25)
L  0 0 0 0 0 0


 0 0 0 0 0 0
0 0 0 0 0 0

Likewise, K2 (linking the dofs of nodes 2 and 3) in the global system becomes

0 0 0 0 0 0
 
0 0 0 0 0
√ √0 


EA 
0 0 1
√ − 3 √−1 3
[K2 ]global = , (5.26)
0
4L  0 − 3 √3 3 −3 
√ 
0 0 √−1 3 √1 − 3
0 0 3 −3 − 3 3

and analogously K3 (linking the dofs of nodes 1 and 3) gives


√ √ 
0 0 −1 √ − 3

√1 3
 3
 3 0 0 − 3 −3  
EA 
 0 0 0 0 0 0 
[K3 ]global = . (5.27)
4L 
 0 0
√ 0 0 0 √0 

 −1 − 3 0 0 √1 3

− 3 −3 0 0 3 3

Consequently, we obtain the global stiffness matrix from assembly, (i.e., from the superposition

52
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

of the three stiffness matrices):


 √ √ 
5 3 −4 0 −1 − 3
 √3 3 0 0 −

3 −3 
 √ √ 
EA  −4

0 5 − 3 √−1 3

[K] = [K1 ]global + [K2 ]global + [K3 ]global = √ .
4L  0 0 − 3 √3 3 −3 


 −1
√ − 3 √ −1
 
3 2 0 
− 3 −3 3 −3 0 6

In order to solve for the deformation of the truss from Problem 5.1, F
we may now use the assembled global stiffness matrix, but we must 3 0
impose proper boundary conditions. First, we have an external
force F applied vertically downwards at node 3. Further, all three
nodes are free to move in the horizontal direction, hence not bear- L L
ing any force components in this direction. The only forces that ƒ ‚
are a-priori unknown are the two vertical reaction forces from the
ground. The global external force vector (collecting all external L 20
01 
forces applied to the truss) hence reads
 
? ?
0
 ? 
 
 0 
[Fext ] = 
 , (5.28)
 ? 

 0 
−F

where we left question marks for the two unknown support reactions in the vertical direction
of the two sliders on the ground. (Of course, we could calculate the two unknown forces from
equilibrium as F/2, but we rather let our truss analysis yield those a-priori unknown forces as a
result.) The natural boundary conditions (here, the applied force F ) are thus imposed through
the external force vector Fext .

Now we must solve the FE governing equation Fint = Fext with Fint = KU , so
 √ √   
5 3 −4 0 −1 − 3 u11

√ √ 0
 3 3 0 0 − 3 √ −3  1
√ u22   ? 
  
EA  −4

0 5 − 3 √ −1 3 

u1  =  0 .

 
 2 (5.29)
4L  0 0 − 3 √3 3 −3  u2   ? 
   
√   3  
 −1 − −1 u1 0 

√ 3 √ 3 2 0 
− 3 −3 3 −3 0 6 u32 −F

This problem is unfortunately ill-posed, since det K = 0, so we cannot find a solution (besides
not knowing the ?-components on the right-hand side). To render this problem well-posed, we
must impose essential boundary conditions.

In our truss example, we must constrain nodes 1 and 2 from moving off the ground, so we have
u12 = u22 = 0. This alone is insufficient to solve the problem uniquely, since the truss could still
translate freely in the horizontal direction. To remove this rigid-body mode, we further impose
arbitrarily u31 = 0 (which will result in symmetric deformation; we could alternatively have fixed
the horizontal component of any other node as well).

53
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Let us impose the essential BCs by modifying the respective rows and columns in the system,
which leads to
√ √   1 
3 −4 −1 − 3
 
5 0 u1 0
 0 1 0 0 0   1 
√ √0  u22   0 


EA  −4 0 5 − 3 −1  u1  =  0  ,
3    
2 (5.30)
4L  0 0 0 1 0 0  u2   0 
   

 0
√ 0 √0 0 1 0  u31   0 
− 3 −3 3 −3 0 6 u32 −F
where we simply replaced rows 2, 4 and 5 in such a fashion that they impose the conditions
u12 = u22 = 0 and u31 = 0. However, because those components are all zero, we can also zero out
columns 2, 4 and 5 in K without changing the system. Consequently, we only need to retain
rows and columns 1, 3 and 6 to solve the problem. This allows us formulate a reduced problem,
where we only retain rows and columns 1, 3 and 6 of K and Fext . Overall, we hence arrive at
the condensed linear system
 √   1  
5 −4 −√ 3 u1 0
EA 
−4
√ √5 3  u21  =  0  . (5.31)
4L 3
− 3 3 6 u2 −F

This system is well-posed, since it does not contain any rigid-body


modes anymore, so that we obtain a unique solution from solving F
the linear system, which leads to
u23
 1  
u1 −1
u21  = √F L  1  (5.32)
3 4 3EA √
u 2 −3 3 -u11 u12
The truss deforms symmetrically (as expected) since u11 = −u21 ,
and the top node moves downwards under the applied load, while F/2 F/2
the bottom nodes move outward.
Note that we can also compute the unknown nodal reactions from the ground by using Fext =
Fint = KU , so
 √ √ 
5 3 −4 0 −1 − 3 −1
   
√ √ 0
 3 3 0 0 − 3 √ −3   0   F 
 √ 
 FL    2 
 −4
EA  0 5
√ − 3 √ −1 3  1   0 
[Fext ] =  √  0  =  F  . (5.33)
   
4L 0 0 − 3 3 3 −3

 √ √  4 3EA    2 
 −1  0   0 
√ − 3 √ −1
 
3 2 0  √
− 3 −3 3 −3 0 6 −3 3 −F

This shows that, as may be expected, the applied vertical load is distributed equally onto the two
sliders and that no horizontal force components are applied. Appendix B contains a discussion
of structural assembly and stiffness matrix properties.

————

5.6 Direct stiffness method

Now that we have understood the calculation and assembly of the (local and global) stiffness
matrix of bars and trusses, let us introduce a simple but powerful alternative interpretation that

54
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

will become helpful in the following. A mechanical system composed of linear elastic elements
such as bars is governed by a linear system of equations,

KU = Fext , (5.34)

whose stiffness matrix K we understood (see Section 5.3) to contain columns of reaction forces.
Specifically, if we move the ith degree of freedom by 1, while fixing all remaining degrees of
freedom, then
   
0   0
 ..  K11 K12 K13 . . . K1n  ..   
. . K1i
 ..    

 K21 K22 K23 . . . .  0  K2i 
 
0  
 
⇒ ..    
K
1
[U ] = [1ei ] =  [KU ] =  K31 1 = 3i .
 
K32 K33 . . . . 
  
   .
0 ..  0  .. 
  
 .. .. .. ..
 
 
 ..   . . . . .  .
.  ..  Kni
Kn1 ... ... ... Knn
0 0
(5.35)

Since KU = Fext , this shows that the ith column of K is nothing but the forces acting on
all degrees of freedom, if the ith degree of freedom is moved by a unit displacement. This is a
powerful concept, which allows us to compute the stiffness matrix of any linear elastic system:
if we know the reaction forces at all nodes in response to moving any of the degrees of freedom,
then we can compute the entire stiffness matrix by the above principle. This is known as the
direct stiffness method. We will leverage it in Section 12 when constructing the stiffness
matrix of beam elements. Note that this method applies to trusses of arbitrary complexity.

5.7 Principle of minimum potential energy

Finally, let us make one more important observation that will allow us to re-formulate the
truss problem. As shown above, the governing equation for the linear elastic truss problem is
KU = F ext . It will be helpful to notice that this problem can be recast into an energy-based
formulation as follows. Let us assume in the following that the external forces are constant
(F ext = const.). This allows us to formulate the total potential energy of the truss as

1
I = U · KU − U · Fext (5.36)
2

55
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The first term denotes the elastic energy stored within the elastically deformed bars, while the
second term accounts for the work done by the (constant) external forces. The fact that the
first term indeed corresponds to the elastic energy can be readily verified by considering a single
1D bar with stiffness matrix
 
k −k
[K] = (5.37)
−k k
EA
with k = ∆x , so that a nodal displacement vector [U ] = (u1 , u2 )T leads to
   1
1 1 1 2 k −k u
U · KU = (u , u ) ·
2 2 −k k u2
2 (5.38)
u1 − u2

k EA 1 EA 1
= (u1 − u2 )2 = (u − u2 )2 = ∆x = Eε2 A ∆x.
2 2∆x 2 ∆x 2

Realizing that 12 Eε2 (with ε = (u2 − u1 )/∆x being the constant strain within the bar) amounts
to the strain energy density inside the bar while A · ∆x is the volume of the bar, shows that
the above is indeed the total energy stored within the elastically deformed bar. This derivation
generalizes to more bar assemblies (but the math simply becomes more tedious – you are
welcome to try it out!).

If we now accept (5.36) as the definition of a total potential energy, then notice that differenti-
ating with respect to the vector of unknowns yields

∂I ∂2I
= KU − Fext and = K. (5.39)
∂U ∂U ∂U
This allows us to reformulate the boundary value problem as a minimization problem:
∂I
find U s.t. U = arg min I ⇒ = KU − Fext = 0. (5.40)
∂U
In other words, if U is a minimizer of the total potential energy I, then it must also satisfy
the equilibrium relation KU = Fext . (The fact that we speak about a minimum instead of a
general stationary point stems from the fact that K is positive-definite in well-posed problems.)
The relation (5.40) is often referred to as the principle of minimum potential energy: for
an elastic truss loaded by constant external forces, the actual nodal displacements resulting from
the loads are those that minimize the total potential energy.

Note that this relation provides a convenient shortcut, which we may exploit to derive the
stiffness matrix of an elastic bar (or other object), if only its internally stored potential energy
I is known:
∂2I
K= . (5.41)
∂U ∂U

5.8 Limitations & outlook

We have discussed in this section a number of important concepts, which we will revisit later.
We have seen how static equilibrium for a linear elastic truss translates into a linear system
of equations, KU = Fext , which is to be solved for the vector of all nodal unknowns, U . We
have discussed the structure of the stiffness matrix K and its assembly from individual element
stiffness matrices, and we have seen how boundary value problems can be solved by imposing

56
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

boundary conditions and applying external forces. Most of these concepts are general and extend
well beyond the analysis of simple trusses. In fact, we have seen how the same principles can be
applied to finding the deformation of an elastic rod hanging from the ceiling and deforming under
its own weight. We have further extended the approach to simulate complex truss networks.
However, the bar description we used is fairly simplistic and restricted in the deformation modes
that can be simulated: we only considered axial deformation (stretching and compression) of
bars but neglected bending deformation and torsion – which are quite essential deformation
modes in real-world structures. Therefore, in the following we aim to extend our discussion to
beams.

57
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

6 Variational Calculus

All methods discussed so far had one aspect in common: they were based on the definition of
a finite set of discrete degrees of freedom. We began with finite differences, a direct numerical
method that aims to solve the ODEs/PDEs directly by evaluating the latter at discrete grid
points. We then transitioned naturally to bar networks, whose degrees of freedom were the
discrete set of nodal displacements. Yet, all were based on a description that restricted degrees
of freedom to be defined at discrete points. For general problems, we will need to deal with
continuous fields (or distributions) of unknown variables, such as the displacement field u(x, t)
or temperature field T (x, t) in a continuous body Ω. We therefore need a rigorous strategy to
search for fields as the solution to (initial) boundary value problems. Keeping in mind that
the objective of a numerical scheme is to turn continuous (infinite-dimensional) problems into
numerically solvable, discrete (finite-dimensional) problems (see Section 2.1), we must look for
ways to find approximate solutions for continuous fields in a numerically tractable manner.

ui =? u(x)=?
F ii -1 ii ii +1 F F
x
boundary value problem direct method indirect method
(e.g. finite differences) (e.g. finite elements)

This is where so-called indirect methods gain importance. Their strategy is to not solve the
ODEs/PDEs directly but to search for “optimal ” approximations from within a given space
of solutions. In a nutshell, one reduces the infinite-dimensional problem (aiming to find the
solution u(x, t) from the space of all functions) to a finite-dimensional problem by considering
solutions uh (x, t) ≈ u(x, t) that satisfy the BCs and ICs and approximate the exact solution
as well as possible, while being describable by a small set of unknowns. Particular questions to
be addressed include:

1. How do we choose uh (x, t)? For example, shall we approximate our unknown field by
polynomials or a Fourier series, by piecewise-polynomial or maybe even piecewise-constant
functions, or something else?

2. What does “approximating the exact solution as well as possible” mean in this context?
How do we quantify the total error between an approximation solution uh (x, t) and an
exact solution u(x, t) for a complex (initial) boundary value problem (especially if we do
not know the exact solution)?

6.1 Variational calculus: an introductory example

For many physical problems, including the classical mechanical, thermal and also electromag-
netic boundary value problems, there is an intuitive way to arrive at an “optimal ” approxi-
mation, which is to invoke the principle of minimum potential energy. Recall how in
Section 5.7 we showed that the equilibrium solution of a discrete truss boundary value problem
could be identified as the minimizer of the total potential energy I. Back then, the solution
was simply a vector U of all nodal unknowns. For continuous rods, the sought solution must
be a continuous function, the displacement field u(x). To understand what energy must be
minimized and, moreover, how to minimize an energy over a function space, we first need to

58
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

introduce some of the fundamentals of variational calculus. This is the objective of this section.
Note that, for simplicity, we will formulate many concepts in 1D first with analogous general-
izations possible for higher dimensions, unless specifically stated otherwise. In addition, we will
restrict ourselves to static problems without time dependence (we will add dynamics later).
As a motivational example, let us revisit a simple physics problem. We know
from elementary physics that the energy stored in an elastic spring of stiffness
k, which is stretched by a distance ∆x, is 21 k(∆x)2 . If a spring is hanging
from the ceiling and a weight mg is attached at its free end, then the total
potential energy is k
1
I = kx2 − mgx,
2
(6.1)
m
where x denotes the elongation of the spring, and the second term enters as
the work done by the external force mg (or, alternatively interpreted, the x
potential energy of the attached mass m).
In order to calculate the stretched equilibrium length of the spring, we can apply linear momen-
tum balance (or force balance in the static case), which yields kx = mg and hence x = mg/k.
Alternatively, we may minimize the total energy with respect to x, leading to
∂I mg
= 0 = kx − mg ⇒ x= . (6.2)
∂x k
Note that the stationarity condition, kx = mg, is nothing but the static linear momentum
balance. Hence, as an alternative to formulating the force balance, we may minimize the total
energy I in order to find the equilibrium solution, and that solution is ensured to satisfy linear
momentum balance.

For the general thermo-mechanical continuum problems considered in this course, we would like
to have a similar concept at hand to turn equilibrium equations (such as the governing PDEs
discussed above) into energy minimization problems. Unfortunately, the situation is a bit more
complex than in the above spring example, since we here no longer seek to find equilibria
described by variables (like x above), but the solutions we aim to find are functions (such as
the displacement field u(x) in the previous sections).

We can intuitively imagine how to extend the concept though: we need to define an energy I,
which depends on u(x) and is to be minimized by the exact solution. However, we first need
to introduce some mathematical preliminaries related to the so-called functional I and how to
minimize such a functional with respect to a function (we can no longer take simple derivatives
to arrive at the stationarity conditions, since we are minimizing not with respect to a set of
variables but with respect to a function). The underlying mathematical concepts are known as
variational calculus.

6.2 Functionals and function spaces

Recall the definition of a function f from analysis, e.g.,

f (x) = x2 . (6.3)

This function is a mapping: it takes as its input a scalar x ∈ R and maps it onto (or returns)
another scalar x2 > 0. We therefore also write f : R → R+ 0 . R is the domain of the function
(defining its input), whereas R+
0 is its range (defining its output).

59
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Analogously, a functional is a mapping which maps from a function space U onto R:


I : U → R. (6.4)
In other words, I[u] takes as its input a function u ∈ U from within the function space9 U (e.g.,
all polynomial functions up to a certain degree n, or all continuously differentiable functions,
or all piecewise polynomial functions, etc.), and it returns a scalar: the energy. To differentiate
functionals from functions, we write I[u] with brackets instead of parentheses as in u(x). In
simple terms, a functional I is a “function of functions”, i.e., a function whose argument is
another function: you hand it a function u(x) (e.g., the displacement field), and it returns a
scalar I ∈ R (e.g., the energy associated with u(x)). Shown below is a schematic illustrating
the difference between a function and a functional.

x u1(x) energy I
-5 0 5 x
u2(x)

x
2 u3(x)
x
-10 0 10 x 0 u1 u3 u2
2
a function: f(x)=x a functional I [u]

As an example of a frequently considered function space, let us define


( n )
X
Pn = ai xi , ai ∈ R (6.5)
i=0

as the space of all polynomial functions of degree up to n (since the coefficients ai can be
zero, Pn also contains all polynomials of degree lower than n; therefore, Pm ⊂ Pn if m < n).
For example, all polynomial functions up to quadratic order form the space P2 .

When looking for solutions u(x), we typically seek solutions within a particular function space U.
For example, a functional may impose constraints on the differentiability or integrability of a
function u(x). As an example, consider
Z 1
I[u] = u2,x (x) dx, (6.6)
0

which defines a functional I, which requires that u(x) is differentiable (i.e., possesses a first
derivative u,x ) and that this first derivative squared can be integrated to yield some finite value.
In this case, we say that u,x must be square-integrable.

Example 6.1. Square-integrability

1. Any polynomial function f (x) ∈ Pn is square-integrable: we can integrate a polynomial on


a finite domain (a, b) and obtain a finite value (polynomials do not have any singularities).
Note that if f (x) ∈ Pn , then we also know that f,x ∈ Pn−1 . Therefore, the first derivative
(and by the same argument also all higher-order derivatives) of f (x) are square-integrable
as well.
9
For more information on vector and function spaces, see Appendices E and F.

60
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

2. Consider a piecewise-constant function (sketched below)




 c0 , x < x0

c1 , x0 ≤ x < x1

f (x) =

 c2 , x1 ≤ x < x2 (6.7)
..


.
= c0 + (c1 − c0 )H(x − x0 ) + (c2 − c1 )H(x − x1 ) + . . . ,
with the Heaviside step function H(·). This function is square-integrable. However, its
derivative
f,x (x) = (c1 − c0 )δ(x − x0 ) + (c2 − c1 )δ(x − x1 ) + . . . (6.8)
with the Dirac delta function 10 δ(·) is not square-integrable, since δ 2 (x − xi ) dx → ∞.
R

f(x) c3
f,x(x)
c2 ...
c1
c0
x3
x0 x1 x2 x3 x x0 x1 x2 x

Therefore, polynomial functions u(x) ∈ Pn are admissible functions to be fed to the functional
(6.6), while piecewise-constant functions are not (as they do not possess the required differen-
tiability/integrability).

————

Functional I[u] in (6.6) restricts the function u(x) to belong to the function space
Z 1
u2,x (x) dx < ∞ .

U = u : (0, 1) → R such that (6.9)
0

In the following, it will be important to define such spaces U of admissible functions. For
convenience of notation, let us introduce the Sobolev space11
H k (Ω) = u : Ω → R such that ∥u∥H k (Ω) < ∞ ,

(6.10)
with the Sobolev norm (in 1D)
sZ Z Z
2
[u′ (x)]2 dx + . . . +

∥u∥H k (Ω) = u(x)2 dx + u(k) (x) dx. (6.11)
Ω Ω Ω

In simple terms (and this is all we will need to remember in the following),

H k (Ω) is the space of all functions whose derivatives up to kth order are
square-integrable (i.e., squaring and integrating them over Ω yields a finite value).
10
Rb
Recall that the Dirac delta function is characterized by a f (x)δ(x−xi ) dx = f (xi ) for any interval a < xi < b,
Rb
but a f (x)δ 2 (x − xi ) dx → ∞.
11
Though not needed for our purposes here, more information on Sobolev norms and spaces is available in
Appendix H.

61
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

For example, the functional in Eq. (6.6) requires u ∈ U ⊂ H 1 (0, 1); i.e., the first derivative
of functions u(x) must be square-integrable on the interval (0, 1). Of course, in this example
u(x) need not be square-integrable itself (the functional only contains u,x ), yet for our purposes
there exists no function u(x) which is not square-integrable while its first derivative is square-
integrable.
Example 6.2. Energy of a strained bar

Consider a bar of length L with constant Young’s modulus E and cross-sectional area A and
strain energy density W = E2 ε2 . The total energy I of the bar as a function of the 1D displace-
ment field u(x) is
Z L Z L
E
I[u] = W (ε) A dx = [u,x (x)]2 A dx, (6.12)
0 0 2

where we used that ε = u,x . We here must impose the restriction u ∈ H 1 (0, L) (unless when
dealing with discontinuities such as cracks) to ensure that the first derivative u,x is square-
integrable. Let us consider a hanging bar with a force F̂ applied at its free end (i.e., at x = L),
so we must subtract from the above energy the work done by the external force. This leads to
the total potential energy functional
Z L
E
I[u] = [u,x (x)]2 A dx − F̂ u(L) with u ∈ U ⊂ H 1 (0, 1). (6.13)
0 2
Minimizing this functional with respect to the unknown function u(x) is expected to yield the
sought solution. That is, among all possible functions u ∈ U ⊂ H 1 (0, 1), we need to find the
one that minimizes (6.13). Unfortunately, we still do not know how to minimize a functional
with respect to a function – which is what we discuss next.

————

6.3 Variations

Consider a functional I : U → R such as the potential energy. Analogous to the stationarity


condition of classical optimization problems, where the first derivative must vanish, a necessary
condition for an extremum of functional I is that its so-called first variation vanishes. We
write this as δI[u] = 0; this is the stationarity condition for a functional. Like in functional
analysis, we will compute the analog of a derivative to identify maxima and minima of the
functional. To this end, we perturb the functional I around a “point” u(x) by a small variation
δu(x) and verify if the functional increases or decreases. Complicating is the fact that a “point”
is now in fact a function, and a perturbation must be a variation of that function. To this end,
we define the following.
u
A variation δu(x) is an arbitrary function that represents admis-
sible changes of u(x). If Ω ⊂ Rd is the domain of u ∈ U with
u+du u
boundary ∂Ω and we seek solutions
n o du
u ∈ U = u ∈ H k (Ω) : u = û on ∂ΩD , (6.14) + + x
0 L
then the variation must satisfy
n o
δu ∈ U0 = δu ∈ H k (Ω) : δu = 0 on ∂ΩD . (6.15)

62
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

k can be determined from the specific form of I[u] (and δu and u must lie in the same function
space since we want to be able to compute I[u + δu]). The fact that variations δu must vanish
on the Dirichlet boundary ∂ΩD stems from the need for perturbations that allow the perturbed
function u + δu to still satisfy the Dirichlet boundary conditions. Note also that we define U0
as the function space identical to U but with the restriction that δu = 0 on ∂ΩD .

With this we define the first variation of I (i.e., the analog of a first derivative) as

I[u + ϵ δu] − I[u] d


δI[u] = lim = lim I[u + ϵ δu] (6.16)
ϵ→0 ϵ ϵ→0 dϵ

Note that we must first take the derivative and then take the limit of ϵ → 0 (otherwise, the
definition would make little sense). The above definition of the first variation is conceptually
analogous to the definition of the derivative of a function in analysis: f ′ (x) = limϵ→0 [f (x + ϵ) −
f (ϵ)]/ϵ. We perturb u(x) by adding the small variation ϵ δu, compute the change from I[u],
divide by ϵ and take the limit ϵ → 0 to arrive at the first variation.

Similarly, higher-order variations are defined recursively via


 
δ k I[u] = δ δ k−1 I for k≥2 (6.17)

That is, like a second derivative f ′′ (x) is the derivative of the first derivative, f ′′ (x) = [f ′ (x)]′ ,
the second variation δ 2 I is the variation of the first variation, i.e., δ 2 I = δ[δI] – using the same
concepts introduced above.

Example 6.3. Variations of a (simple) functional

As an example for calculating the first and higher-order variations, let us consider the simple
introductory example of the functional
Z 1
I[u] = u2 dx so that we seek u ∈ U = H 0 (0, 1). (6.18)
0

We use the definition (6.16) to compute the first variation as follows:

d 1
Z Z 1
d 2 d
δI = lim I[u + ϵ δu] = lim (u + ϵ δu) dx = lim (u + ϵ δu)2 dx
ϵ→0 dϵ ϵ→0 dϵ 0 ϵ→0 0 dϵ
Z 1 Z 1 (6.19)
= lim 2(u + ϵ δu)δu dx = 2 u δu dx.
ϵ→0 0 0

The second variation follows by taking one more variation:


d
δ 2 I = δ[δI] = lim δI[u + ϵ δu]
ϵ→0 dϵ
Z 1 Z 1 (6.20)
d
= lim 2(u + ϵ δu) δu dx = 2 (δu)2 dx.
ϵ→0 dϵ 0 0
R1
Note that, when replacing u by u + ϵ δu in δI = 2 0 u δu dx, we only replace u and not δu (we
must vary the function u and not δu, which is independent of u). Since the final expression
does not depend on u anymore, we conclude that for all higher-order variations we have

δk I = 0 for all k > 2, (6.21)

63
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

since replacing u (which does not appear) by u+ϵδu (which hence also does not appear anywhere)
and then differentiating with respect to ϵ evaluates to zero. We have thus computed the first
and all higher variations of functional (6.18).

Notice that, when we expand the above functional by factoring out the quadratic term, we
arrive at
Z 1 Z 1 Z 1 Z 1
2 2
I[u + δu] = (u + δu) dx = u dx + 2u δu dx + (δu)2 dx
0 0 0 0 (6.22)
1 2
= I[u] + δI[u] + δ I[u],
2
and all higher-order terms vanish (as expected, since the functional involves u only up to
quadratic order). This confirms what can also be shown more generally: since a variation is the
analog of a derivative, we can use variations to expand a functional I[u] in a Taylor series as
1 2 1
I[u + δu] = I[u] + δI[u] + δ I[u] + δ 3 I[u] + . . . (6.23)
2! 3!

————

6.4 Helpful relations

The following are helpful relations, which follow directly from the above definition of variations.
(Try and prove these using the definition in (6.16)!) For any functions u, v ∈ U, functionals
Ii : U → R, and constants αi ∈ R, the following relations hold – in close analogy to derivatives
of functions f1 , f2 :

• δ (α1 I1 + α2 I2 ) = α1 δI1 + α2 δI2 (due to the linear nature of the variation operator)

• δ(I1 I2 ) = (δI1 )I2 + I1 (δI2 ) (product rule, analogous to differentiating functions)

du d
• δ = δu (assuming sufficient differentiability of u)
dx dx
Z Z
• δ u dx = δu dx (assuming that the domain Ω is independent of u)
Ω Ω

Notice how the above relations for δu are analogous to those for a differential du. This analogy
often helps, e.g. we may compute (akin to the total differential)

δ 2u2 − 3 sin(u,x ) = 2δ(u2 ) − 3δ sin(u,x ) = 2 · 2u δu − 3 cos(u,x )δu,x .



(6.24)

In practical problems, the functional may involve a function u and/or some of its derivatives.
In general, such a functional in 1D has the form
Z
I[u] = f (u, u,x , u,xx , . . .) dx. (6.25)

With our definition of the first variation in mind, the above form implies that
Z
I[u + ϵ δu] = f (u + ϵδu, u,x + ϵδu,x , u,xx + ϵδu,xx , . . .) dx. (6.26)

64
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

As we are interested in the limit ϵ → 0, let us assume that ϵ is small, so that we may apply a
Taylor expansion about ϵ = 0 (assuming that Ω is independent of u and hence of ϵ):
Z
I[u + ϵ δu] = f (u, u,x , u,xx , . . .) dx

(ϵ δu)2 ∂ 2 f
Z  
∂f
+ (ϵ δu) (u, u,x , . . .) + (u, u , u
,x ,xx , . . .) + . . . dx
Ω ∂u 2 ∂u2
(ϵ δu,x )2 ∂ 2 f
Z  
∂f
+ (ϵ δu,x ) (u, u,x , . . .) + (u, u,x , u,xx , . . .) + . . . dx
Ω ∂u,x 2 ∂u2,x
(ϵ δu,xx )2 ∂ 2 f
Z  
∂f
+ (ϵ δu,xx ) (u, u,x , . . .) + (u, u,x , u,xx , . . .) + . . . dx + . . . ,
Ω ∂u,xx 2 ∂u2,xx
(6.27)
which requires expansion in each derivative. Now, applying the definition of the first variation
from (6.16) with (6.27) and (6.25) yields
I[u + ϵ δu] − I[u]
δI[u] = lim
ϵ→0 ϵ
ϵ(δu)2 ∂ 2 f
Z  
∂f 2
= lim δu (u, u,x , . . .) + (u, u , u
,x ,xx , . . .) + O(ϵ ) dx
ϵ→0 Ω ∂u 2 ∂u2
ϵ(δu,x )2 ∂ 2 f
Z  
∂f 2
+ δu,x (u, u,x , . . .) + (u, u,x , u,xx , . . .) + O(ϵ ) dx
Ω ∂u,x 2 ∂u2,x
ϵ(δu,xx )2 ∂ 2 f
Z   
∂f 2
+ δu,xx (u, u,x , . . .) + (u, u,x , u,xx , . . .) + O(ϵ ) dx + . . . ,
Ω ∂u,xx 2 ∂u2,xx
so that taking the limit ϵ → 0 finally leads to
Z  
∂f ∂f ∂f
δI[u] = (u, u,x , . . .)δu + (u, u,x , . . .)δu,x + (u, u,x , . . .)δu,xx ] + . . . dx (6.28)
Ω ∂u ∂u,x ∂u,xx
or in short (omitting the dependencies and, again, assuming Ω is independent of u):
Z Z  
∂f ∂f ∂f
I[u] = f (u, u,x , u,xx , . . .) dx ⇒ δI[u] = δu + δu,x + δu,xx + . . . dx
Ω Ω ∂u ∂u,x ∂u,xx
(6.29)

Notice the analogy between (6.29) and the total differential of a function f :
∂f ∂f
f = f (x, y, . . .) ⇒ df = dx + dy + . . . , (6.30)
∂x ∂y
or, if the function arguments are vector fields (we usually drop the sum by the summation
convention),
3  
X ∂f ∂f
f = f (x, y, . . .) ⇒ df = dxi + dyi + . . . . (6.31)
∂xi ∂yi
i=1

This directly applies in higher dimensions – which will become important in the mechanical
boundary value soon. For example, for a displacement field u(x) : Ω → Rd in d dimensions, the
functional may involve all components of u and all their partial derivatives:
Z
I[u] = f (ui , ui,j , ui,jk . . .) dV. (6.32)

65
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Applying the definition of the first variation (and assuming Ω is independent of u) yields
Z
d
δI = lim f (ui + ϵδui , ui,j + ϵδui,j , ui,jk + ϵδui,jk , . . .) dV
ϵ→0 Ω dϵ
Z  
∂f ∂f
= lim (ui + ϵδui , ui,j + ϵδui,j , . . .)δui + (ui + ϵδui , ui,j + ϵδui,j , . . .)δui,j + . . . dV
ϵ→0 Ω ∂ui ∂ui,j
Z  
∂f ∂f
= (ui , ui,j , . . .)δui + (ui , ui,j , . . .)δui,j + . . . dV.
Ω ∂ui ∂ui,j

In short, we have thus shown a general short-cut to calculating a variation:


Z Z  
∂f ∂f
I[u] = f (u, ∇u, . . .) dx ⇒ δI[u] = δui + δui,j + . . . dV (6.33)
Ω Ω ∂ui ∂ui,j

where classical index notation with the summation convention applies.

Now that we have established the basics of variational calculus, let us get back to our original
objective: exploit the variational structure of our boundary value problems to replace solving
the governing PDEs by solving an energy minimization problem. To this end, we need to show
that the solutions u ∈ U of a boundary value problem can be interpreted as extremal points
over U of a functional I[u]. Let us demonstrate this by the following example.

Example 6.4. Hanging bar under its own weight revisited


Once more, we consider a bar of length L (Young’s modulus E, cross-
sectional area A, density ρ) that is hanging from the ceiling and deforming
under its own weight (gravitational acceleration g) with a constant force F̂
applied at its free end at x = L. u(x) denotes the 1D displacement field, g
where x runs from top to bottom of the bar, as shown. x
The total potential energy, which is the total strain energy of the elastic bar u(x) + L
minus the work done by the gravitational body forces and the constant end
force, defines the functional:
Z L Z L
E 2
I[u] = u (x) A dx − ρg u(x) A dx − F̂ u(L) (6.34)
0 2 ,x 0

and we seek the displacement field u(x) from the function space

u ∈ U = u ∈ H 1 (0, L) : u(0) = 0 .

(6.35)

The first variation of (6.34) is derived as


Z L Z L
δI[u] = 0 = Eu,x (x) δu,x (x) A dx − ρg δu(x) A dx − F̂ δu(L). (6.36)
0 0

Since it is inconvenient to have both δu and δu,x in the above expressions, we apply integration
by parts to the first integral, which leads to
Z L
δI[u] = − [Eu,xx (x) + ρg] δu(x) A dx + EAu,x (L) δu(L) − EAu,x (0) δu(0) − F̂ δu(L).
0
(6.37)

66
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Noting that δu(0) = 0 because of essential boundary condition (we have u(0) = 0 and recall
that variations must vanish at points for essential boundary conditions are imposed), the above
reduces to
Z L h i
δI[u] = − [Eu,xx (x) + ρg] δu(x) A dx − F̂ − EAu,x (L) δu(L). (6.38)
0

To find extrema of functional (6.34), we require that

δI[u] = 0 ∀ δu ∈ U0 . (6.39)

This implies that (6.38) must vanish for all variations δu ∈ U0 . This can only be true if

Eu,xx (x) + ρg = 0 ∀x ∈ (0, L) and EAu,x (L) = F̂ . (6.40)

We realize that these are exactly the governing equation (linear momentum balance) and trac-
tion boundary condition which the bar needs to satisfy, cf. Eq. (8.25). Therefore, we have shown
that rendering functional (6.34) stationary with respect to u(x) ∈ U is equivalent to solving
(6.40) with u(0) = 0. That is, we have a strategy for replacing the solution of a differential
equation by an optimization problem, and we must in both cases obtain the same exact or
classical solution.

To see if the solution u(x) is a maximizer or minimizer of I, let us compute the second
variation:
Z L Z L
δ 2 I[u] = Eδu,x δu,x A dx = E (δu,x )2 dV ≥ 0 ∀ δu,x . (6.41)
0 0

Hence, δ 2 I[u] > 0 in general (unless for the special case δu ≡ 0). Analogous to classical analysis,
we conclude that the extremum is a minimizer. (If the second variation was negative, we would
have a maximum.) Note that we thereby tacitly assumed that E > 0. E < 0 would lead to
solutions being unstable energy maxima, which implies that E > 0 is a (necessary and sufficient)
stability condition for an elastic bar.

————

6.5 A general variational structure

Let us revisit the hanging bar problem once more to observe a particular general structure of
the boundary value problem and its variational basis, which will come handy shortly. For the
hanging bar (assuming that E = const.), notice that we can rewrite the energy functional (6.34)
for short as
1
I[u] = B[u, u] − L[u], (6.42)
2
where we introduced a bilinear form B and a linear form L, defined as
Z L Z L
B[u, v] = Eu,x v,x A dx and L[u] = ρguA dx + F̂ u(L), (6.43)
0 0

We say a form B : U × V → R is bilinear if B[u, v] = B[v, u] (which is the case here). L is said
to be linear since it depends linearly on Ru. Note that in 1D we have u,x = grad u = u,x , so we
may also write more generally B[u, v] = Ω E(grad u)(grad v) dV (and the singular force at the
end can be also written in terms of surface tractions).

67
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The structure in (6.42) is in fact a recipe for a more general class of variational problems
(the same structure applies to heat conduction, electrostatics, or mechanical equilibrium, as
discussed later – the only difference is the exact form B and L). Let us therefore consider an
energy functional of the general form (6.42). Taking variations shows that
1
δI[u] = δB[u, u] − δL[u]
2
Z L Z L
1
= δ Eu,x u,x A dx − δ ρguA dx − F̂ δu(L)
2 0 0 (6.44)
Z L Z L
= Eu,x δu,x A dx − ρg δuA dx − F̂ δu(L)
0 0
= B[u, δu] − L[δu]

or, in more compact form,

1
I[u] = B[u, u] − L[u] ⇒ δI[u] = B[u, δu] − L[δu] (6.45)
2

For example, in the hanging bar problem compare the energy functional (6.34) and the first
variation (6.36) with (6.45) to confirm the above relations.

For convenience, let us adopt the following notation found in various textbooks on finite el-
ements: since the first variation depends on both u and δu, it is often abbreviated as an
operator acting on both the unknown field u and its variation δu. To this end, we introduce
G : U × U0 → V ⊂ R such that

d
G[u, δu] = lim I[u + ϵ δu] (6.46)
ϵ→0 dϵ

Without proof, we remark that one of the beauties of the above variational problem (6.45) (based
on a bilinear form B and a linear form L) is that a unique minimizer exists by the Lax-Milgram
theorem (for more information see Appendix J). Recall that for the hanging bar problem above
we already showed that the solution is a unique (global) minimizer if E > 0. This is generally
true for (quasistatic) linear elastic problems, which, for suitable boundary conditions, have a
unique solution and hence a unique minimizer of the potential energy functional.

6.6 Summary & extensions

As a summary of this section on energy methods, we have shown that – in close analogy between
the truss problem in Section 5 – we can formulate boundary value problems involving continuous
fields, such as the displacement field in an elastic rod, as variational problems. For elastic
problems, we can find the unknown displacement field u(x) by minimizing the total potential
energy functional I[u] over all admissible functions u(x) (satisfying the essential boundary
conditions and living in the admissible function space). Given a suitable energy potential
I[u], we can prove that stationarity of I[u] is equivalent to solving the underlying ODE plus
boundary conditions. Moreover, we can judge from the second variation if an equilibrium is
stable or unstable.

The above principles apply generally to all elastic problems (in 1D, 2D, and 3D), in which we can
formulate the total potential energy. In the next section, we will discuss how this energy-based

68
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

framework can be used in the so-called Rayleigh-Ritz method to find approximate numerical
solutions, which minimize the total potential energy.

Even though we limit our discussion here to elastic boundary value problems, many other physi-
cal problems of interest possess a variational structure and can be formulated as an optimization
problem. This includes quasistatic thermal problems and electromagnetism, which all reduce to
the general structure in (6.45). For example,

• the thermal problem with its strong form

κ∇2 T + s = 0 in Ω
T = T̂ on ∂ΩD (6.47)
∇T · n = q̂ on ∂ΩN

corresponds to stationary points of the energy functional


Z Z Z
κ 2
I[T ] = |∇T | dV − ρs T dV − q̂ T dS (6.48)
Ω 2 Ω ∂ΩN

with temperature field T (x), heat source density s, thermal conductivity κ, surface normal
n, and heat flux q.

• the electrical problem with its strong form, Gauss’ law,

ϵ0 ∇2 ϕ + q = 0 in Ω
ϕ = ϕ̂ on ∂ΩD (6.49)
∇ϕ · n = q̂ on ∂ΩN

corresponds to stationary points of the energy functional


Z Z Z
ϵ0 2
I[ϕ] = |∇ϕ| dV − qϕ dV − q̂ϕ dS (6.50)
Ω 2 Ω ∂ΩN

with electric voltage/potential ϕ(x), space charges q, electric permittivity ϵ0 , , surface


normal n, and boundary charges q.

In each of these problems, the energy functional contains a ‘stored’ energy term (which is a
bilinear form of the primary field) as well as a term representing the ‘work’ done by inter-
nal/external sources or fluxes (which is a linear form). Therefore, all these examples have the
same general structure as in (6.45).

69
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

7 Rayleigh-Ritz Method

One way to exploit the variational structure discussed in Section 6 is the so-called Rayleigh-
Ritz method12 . Its idea is to introduce an approximate solution13 uh (x) based on trial or ansatz
functions N a (x), defining
n
X
h
u (x) = ua N a (x), (7.1)
a=0

where ua ∈ R are n + 1 unknown coefficients, while N a (x) are chosen and hence known ansatz
or base functions. These ansatz functions can, e.g., by of polynomial type, i.e., N a (x) = xa , so
that
n
X
h
u (x) = ua xa . (7.2)
a=0

Any choice of (linearly independent) ansatz functions is permissible including, e.g., Fourier se-
ries of cosine or sine terms. One important constraint is that the above ansatz must be chosen to
satisfy any existing essential boundary conditions and the differentiability/integrability require-
ments of the problem (e.g., a piecewise linear guess for uh (x) would not be permissible if its
derivatives must be square-integrable, etc.). For example, for the hanging bar problem, we need
to enforce u0 = 0 (because of the boundary condition u(0) = 0) and ensure that u ∈ H 1 (0; L).

Next, we insert uh (x) into the total energy functional I which, once all integrals have been
carried out, depends on the coefficients ua as the only unknowns. We know that the exact
equilibrium solution u(x) minimizes the total potential energy I[u]. Therefore, we conclude
that we must minimize I[uh ] with respect to ua , giving a system of equations as the stationarity
conditions:
∂I[uh ]
{u0 , . . . , un } = arg min I[uh ] ⇒ 0= ∀ a = 0, . . . , n (7.3)
∂ua
These are n + 1 equations for the n + 1 unknown coefficients ua .

Recall that we had expressed the energy functional in the general operator form (6.45), so that
" n n
# " n #
1 1 X X X
I[uh ] = B[uh , uh ] − L[uh ] = B ua N a (x), ub N b (x) − L ua N a (x)
2 2
a=0 b=0 a=0
n Xn n
(7.4)
1 X
a b a b
X
a a
= u u B[N , N ] − u L[N ].
2
a=0 b=0 a=0

where we exploited the (bi)linear nature of the two forms B[·, ·] and L[·]. For example, for the
polynomial series in (7.2) we find
n n n
1 XX a b X
I[uh ] = u u B[xa , xb ] − ua L[xa ], (7.5)
2
a=0 b=0 a=0
12
The numerical procedure behind this method was published by Walther Ritz in 1908-1909, though there is
debate about Lord Rayleigh’s previous use of related techniques. Therefore, the method is known both as the
Rayleigh-Ritz method and the Ritz method. For further information see ‘The historical bases of the Rayleigh and
Ritz methods’ .
13
The superscript h is a historical relic, stemming from the mathematical study of numerical approximations,
in which h was typically used to denote the grid spacing or element size. Therefore, here and in the following, we
adopt the common notation and add a superscript h to those quantities referring to numerical approximations
(of functions, function spaces, etc.).

70
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The above leads to


n
∂I[uh ] X b
= u B[N a (x), N b (x)] − L[N a (x)] = 0 ∀ a = 0, . . . , n. (7.6)
∂ua
b=0

This is a linear system of equations to be solved for the unknown coefficients ub (with b =
0, . . . , n), which we abbreviate as
n
X
K ab ub = F a for a = 1, . . . , n or KU = F (7.7)
b=0

with K ∈ Rn×n and F , U ∈ Rn having components


T
K ab = B[N a , N b ], F a = L[N a ] and U = u0 , . . . , un . (7.8)

Of course, the choice of symbols K and F was not random here: we notice the analogy to,
respectively, the stiffness matrix and external force vector in our truss analysis in Section 5. For
the same reasons introduced in Section 5, here and in the following we use the notation K ab for
the matrix component associated with coefficients a and b (instead of writing Kab ). The same
applies to the components F a of vector F . As for trusses, we will later need the analogous
concepts in higher dimensions, where each coefficient ua ∈ Rd is a vector having d components,
so we need to find all uai with a = 1, . . . , n and i = 1, . . . , d, and we will need matrices with
components Kij ab .

Example 7.1. Hanging bar by Rayleigh-Ritz


Let us demonstrate the Rayleigh-Ritz method, introduced above in its gen-
eral form, for the specific problem of a freely hanging bar under gravity (no x0
other forces applied here for simplicity). The total energy functional with
the polynomial approximate solution uh (x) from (7.2) becomes g Dx
x
h
Z L
E h 2
Z L xi-1
I[u ] = u,x (x) A dx − ρ g uh (x) A dx. (7.9) u(x) L ui xi
+

+
0 2 0
xi+1
Let us choose the ansatz
n
X
uh (x) = ua xa , (7.10) xn
a=1

Note that we start the summation at a = 1, since we must have u0 = 0 due to the essential
boundary condition u(0) = 0. When inserting (7.10) into (7.9) and carry out the integration
with respect to x, the resulting energy does not depend on x anymore but only on the un-
known coefficients ua , with respect to which it must be minimized. Notice how we thus have
transformed the infinite-dimensional problem (unknown general function u(x)) into a finite-
dimensional one (n unknown coefficients ua ). As a consequence, minimization now is relatively
simple: instead of performing variations we can simply minimize I[uh ] with respect to the scalar
unknowns ua :
∂I[uh ]
=0 for a = 1, . . . , n. (7.11)
∂ua

71
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

As we know from (7.6), the resulting system of stationarity equations is KU = F with


Z L
ab a b a b
K = B[N , N ] = B[x , x ] = E(xa ),x (xb ),x A dx
0
Z L Z L (7.12)
a−1 b−1 La+b−1
= Eax bx A dx = abEA xa+b−2 dx = abEA
0 0 a+b−1

and
L L
La+1
Z Z
a a a a
F = L[N ] = L[x ] = ρ g x A dx = ρgA xa dx = ρgA . (7.13)
0 0 a+1

The above expressions allow us to evaluate the components of K and F for all combinations of
a and b (e.g., K 11 = EAL, K 12 = EAL2 , etc. and F 1 = 12 ρgAL2 , F 2 = 13 ρgAL3 , etc.).

Solving the linear system KU = F for any n = 1 yields a linear solution:

ρgAL2 ρgL
K 11 u1 = F 1 ⇔ EALu1 = ⇒ uh (x) = u1 x = x. (7.14)
2 2E
Recalling that the exact solution, computed in (3.19), was quadratic, the above solution is
obviously not correct but an approximation. However, solving the linear system KU = F for
any n ≥ 2 (feel free to try this as an exercise at home) yields
ρg ρg
u1 = L u2 = − , and ua = 0 for all a > 2, (7.15)
E 2E
which is in fact the exact solution, see Eq. (3.19):
ρg
uh (x) = u1 x + u2 x2 = (2L − x)x = u(x). (7.16)
2E
This could have been expected since we chose polynomial ansatz functions in (7.2), taking
uh (x) ∈ Pn . The exact solution is a polynomial of order 2. If we choose uh (x) ∈ Pn with n ≥ 2,
the exact solution is contained in the solution space within which we are looking for the optimal
solution. As a consequence, the Rayleigh-Ritz approach must recover the exact solution as the
energy minimizer. Choosing any Pn with n > 2 does not affect the solution since P2 ⊂ Pn for
n > 2, so the solution is still contained in the solution space and therefore found. Finally, notice
that the linear approximation (7.14) is exact at x = L (the approximation is not bad after all,
it simply has no chance to improve towards the exact solution with only a single, linear term).

————

72
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

8 Strong form & weak form

In the previous sections, we have seen how indirect methods aim at finding approximate solutions
to boundary value problems by introducing an approximate (finite-dimensional) solution space
and solving for the unknowns describing the approximate solution by enforcing the strong form
in some average sense. Rather than solving an ODE/PDE at every grid point as in finite
differences, we aimed to, e.g., minimize the total potential energy. This seeks optimal solutions
in an average sense: the total energy is minimized, instead of reducing the error locally. We
have also seen how an elastic boundary value problem can be linked to a variational structure,
which allowed us to replace the governing equations by an optimization problem. This in
turn was exploited, e.g., by the Rayleigh-Ritz method, which minimizes the total potential
energy over specific approximate solution spaces. We further showed that this minimization
problem led to a linear system of equations to be solved for the unknown coefficients of the
approximate solution. Hence, we have the tools to turn complex systems of differential equations
plus boundary conditions into linear systems of equations. In the following, we will compare the
different solution approaches we now have at our disposal, and we will discuss their important
differences, which are of importance for numerical techniques such as the finite element method.

8.1 Strong form and classical solutions

Let us consider a general class of physical problems that are governed by a strong form of the
type (written in 1D for simplicity)

(E u,x ),x + s = 0 in Ω
(strong form) u = û on ∂ΩD (8.1)
Eu,x = t̂ on ∂ΩN .

This general description (in 1D) applies to the mechanical problem (where u is the displacement
field, E Young’s modulus, s = ρb body forces, û is a prescribed displacement, and t̂ a prescribed
surface traction) as well as to electrical problems (where u denotes the electric voltage potential,
E is the permittivity, s distributed body charges, and t̂ are surface charges) or the thermal
problem (where u is the temperature field, E is the thermal conductivity, s represents a heat
source density, and t̂ stands for heat fluxes). Various other problems possess the same structure.

To understand what types of solution u(x) qualify as solutions of problem (8.1), let us define
that a function u is of class C k (Ω) (or, in the function space C k (Ω)) with an integer k ≥ 0 if
it is k times continuously differentiable over Ω (i.e., u possesses derivatives up to the kth order,
and these derivatives are continuous functions). In short,

u ∈ C k (Ω) ⇔ u is k times continuously differentiable in Ω (8.2)

Consequently, the strong form of the form (8.1) imposes the requirement

u ∈ C 2 (Ω) (8.3)

That is, we require u(x) to be twice continuously differentiable in order for the strong form to
make sense14 . Such a solution of (8.1) is called strong solution or classical solution
14
To be exact, the strong form in fact requires that u ∈ C 2 (Ω) ∩ C 0 (Ω), i.e., functions u must be twice
continuously differentiable within Ω and at least continuous up to the boundary ∂Ω. But this detail is of minor
importance for us here and in the following.

73
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Example 8.1. C k -continuity

• Any kth-order polynomial u ∈ Pk with k ≥ 0 is generally C ∞ (R). That is, we can take
infinitely many derivatives and those are all continuous (in this case, all derivatives u(n)
of order n > k will vanish). This exploits that C ∞ (Ω) = k≥0 C k (Ω).
T

• Consider a continuous, piecewise-linear function u : Ω → R. Function u is C 0 (Ω) but not


C 1 (Ω), i.e., the function is continuous but it’s first derivative already is not.

• The Heavyside step function H : R → {0, 1}, defined by


(
0, if x ≤ 0,
H(x) = (8.4)
1, if x > 0,
is said to be C −1 (R) since its “zeroth derivative” (i.e., the function itself) is not con-
tinuous. The same is consequently true for piecewise-constant functions.

In mechanical problems, if there are no discontinuities such as cracks or shocks (or discontinuities
in the BCs/ICs), we usually assume that the classical solution fields are C ∞ (Ω), so we may take
derivatives of arbitrary order. Otherwise, derivatives exist almost everywhere (a.e.) but caution
or special treatment may be required near discontinuities.

8.2 Weak form and weak solutions

As we showed previously, the function u which solves the strong form (8.1) can alternatively be
found by using a variational approach, viz. as the minimizer of I[u] within a function space U,
which we write as
 1
u = arg min I[u] : u ∈ U with I[u] = B[u, u] − L[u], (8.5)
2
whose stationarity condition is
δI[u] = G[u, δu] = B[u, δu] − L[δu] = 0 for all δu ∈ U0 (Ω). (8.6)
Therefore, we can reformulate the problem (8.1) in one of two ways, given a functional I : U → R
and the associated bilinear form B(·, ·) and linear form L(·), both defined on functions u ∈ U,
and function spaces
n o n o
U = u ∈ Hk (Ω) : u = û on ∂ΩD and U0 = u ∈ Hk (Ω) : u = 0 on ∂ΩD . (8.7)
On the one hand, we seek to
(weak form I) find u ∈ U s.t. u = arg min I[u], I[u] = 12 B[u, u] − L[u] (8.8)
On the other hand, we may
(weak form II) find u ∈ U s.t. G[u, v] = B[u, v] − L[v] = 0 for all v ∈ U0 (Ω) (8.9)
These two versions are known as the weak form, also known as the Galerkin weak form,
(hence the symbol G). The resulting solution u is called weak solution. We know that the
two versions have a unique connection since δI = B[u, δu] − L[δu]. Thus, we also know that
strategies (A) and (B) must be equivalent and lead to the same solution.

For the specific example of the mechanical (or thermal or electrical) boundary value problem
(see Sections 6.5 and 6.6), solutions are sought from the function space

U = u ∈ H1 (Ω) : u = û on ∂ΩD

(8.10)

74
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

8.3 Strong vs. weak form

The terminology “strong” vs. “weak ” has the following origin. As discussed in Section 6, solving
the strong form or the weak form are, in principle, equivalent. In Example 6.4, we showed for
the hanging bar that the variational problem (8.8) is, in principle, equivalent to solving the
strong form (8.1). They are equivalent in principle only, for the following reason. Notice the
different requirements imposed on functions by the two forms for the mechanical problem:
strong form: u ∈ C 2 (Ω),
(8.11)
weak form: u ∈ H1 (Ω).
These two are not the same. To see this, note that, first,
C k (Ω) ⊃ C k−1 (Ω) ⊃ C k−2 (Ω) ⊃ . . . ⊃ C 0 (Ω). (8.12)
In other words, if a function is k times continuously differentiable, then it surely is also k − 1
times, k − 2 times, etc. continuously differentiable. In addition, we have15
C k (Ω) ⊂ H k (Ω) but H k (Ω) ̸⊂ C k (Ω) (8.13)
i.e., functions in C k (Ω) are also in H k (Ω) – but not vice-versa. If a function u has continuous
derivatives up to order k, then those derivatives are all square-integrable and hence u ∈ H k (Ω).
However, the kth derivative being square-integrable does not necessarily imply u ∈ C k (Ω),
since discontinuous functions can be square-integrable. An example is presented in Example 8.2
below.

Considering all of the above, we draw the following conclusions. For the mechanical problem, the
strong form requires u ∈ C 2 (Ω) ⊂ C 1 (Ω) ⊂ H 1 (Ω). Hence, a function that qualifies as a solution
of the strong form can also be a solution of the weak form. However, a solution of the weak
u ∈ H 1 (Ω) ̸⊂ C 2 (Ω) does not necessarily qualify as a solution of the strong form. Therefore,
in going from the strong to the weak form, we have relaxed (or weakened ) the requirements
on function u. This explains the origin of the terms “strong” and “weak ”: the weak form
imposes weaker constraints on the function space of the solution.

Example 8.2. Continuous, piecewise polynomial approximations

I. Pieceweise linear approximation: as an example of the different differentiability/integrability


requirements of the strong and weak forms, consider, e.g., a functions u that is a continuous,
piecewise linear curve defined by
X
u(x) = ai (x − xi )H(x − xi ) with ai , xi ∈ R, xi+1 > xi , (8.14)
i

and H(·) is the Heavyside step function. An example is shown below.

u(x) u,x(x) u,xx(x)


x1 x2 x3 x4
x0 x
x0 x1 x2 x3 x4 x x0 x1 x2 x3 x4 x
continuous, discontinuous, discontinuous,
square integrable square integrable not square integrable
15
To be exact, it would be required to define by C0k (Ω) the space of all functions contained in C k (Ω) whose
support is a bounded subset of Ω (i.e., u(x) ̸= 0 only on a finite subset of Ω). In this case C0k (Ω) ⊂ H0k (Ω). But
this a detail of minor importance here.

75
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The above function u(x) is by definition continuous (or compatible) at all xi . Its first derivative
is piecewise constant:
du X
u,x (x) = (x) = ai H(x − xi ). (8.15)
dx
i

(Note that there is, in principle a second term, ai (x − xi )δ(x − xi ), which however evaluates to
identically zero everywhere on R.) The above shows that u ∈ C 0 (R) (the function is continuous,
but its first derivative is not). Moreover, the piecewise constant function u,x is square-integrable,
hence u ∈ H 1 (Ω). Therefore, this piecewise linear u(x) qualifies as a weak solution.

By contrast, the second derivative,


du,x X
u,xx (x) = (x) = ai δ(x − xi ), (8.16)
dx
i

is a sum of Dirac delta functions, so u,xx is not a continuous function and hence u ∈ / C 2 (Ω).
Such a function does not qualify as a solution to the strong form, as the governing PDE makes
little sense with sums of delta functions. Hence, continuous, piecewise linear functions qualify
as approximate solutions of the weak form but not of the strong form. We have thus relaxed the
requirements on our function when replacing the strong form by the weak form.

As a concrete example, consider the “hat” function

u(x) = 1 + x − 2xH(x), (8.17)

which is zero outside (−1, 1) and within this interval first rises from 0 to 1 and then decays back
to 0. This is a continuous, piecewise linear function. It’s first derivative is

u,x = 1 − 2H(x) − 2xδ(x), (8.18)

which is indeed square-integrable since


Z 1 Z 1
u2,x dx = 1 − 4H(x) − 4xδ(x) + 4H(x)2 + 8xδ(x)H(x) + 4x2 δ(x)2 dx < ∞. (8.19)
 
−1 −1

II. Piecewise constant approximation: a piecewise constant approximation u(x) is nec-


essarily discontinuous (unless it is constant everywhere), so that u ∈ C −1 (R); i.e., not even
the function itself is continuous. Moreover, the first derivative is not square-integrable. As an
example, consider
Z 1 Z 1
2
u(x) = H(x) ⇒ u,x = δ(x) ⇒ u,x dx = δ(x)2 dx → ∞. (8.20)
−1 −1

This shows that piecewise constant approximations are generally not admissible as solutions –
neither of the strong form nor of the weak form of mechanical boundary value problems.

————

From a computational perspective, solving the weak form is usually preferable over the strong
form for (at least) two reasons. First, u ∈ H 1 (Ω) is simpler to satisfy than u ∈ C 2 (Ω) (e.g.,
piecewise linear interpolation is sufficient in the weak form but not in the strong form). Second,
as we showed already for the Rayleigh-Ritz approach, the weak form boils down to solving a
system of algebraic equations (rather than solving PDEs). This will be exploited in the finite
element method soon.

76
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

8.4 Principle of virtual work

Recall that the weak form could be formulated in two different ways, Eqs. (8.8) and (8.9).
While those two were shown to be equivalent, leading to the same solution, there is one essential
difference. Version (8.8) requires the formulation of the total potential energy. This is simple
for linear elasticity, but there are many problems for which a variational structure is hard or
impossible to find (e.g., when modeling plasticity or damage). In such cases, (8.8) cannot be
used. However, there is a way to arrive at the Galerkin weak form (8.9) – even without the
existence of a variational structure. This is what we would like to discuss here.

As introduced in basic mechanics and continuum mechanics courses (and therefore not discussed
here in detail), the equilibrium conditions of a mechanical boundary value problem can also be
stated in terms of the principle of virtual work. For example, for a solid body Ω undergoing
small deformation, the principle of virtual work states that
Z Z Z
σij u∗i,j dV = ρbi u∗i dV + t̂i u∗i dS (8.21)
Ω Ω ΩN

for any kinematically admissible virtual displacement field u∗ (x) defined on Ω. In other words,
when undergoing (virtual) displacements u∗ (x), the (virtual) work done by the internal stresses
σij equals the (virtual) work done by the applied body forces bi and surface tractions t̂i . Note
that admissibility in particular requires that u∗ = 0 everywhere on ∂ΩD , since no virtual
displacement can be applied to points on the surface that are restrained from moving.

The validity of (8.21) in our context is easy to prove. We use (σij ui ),j = σij,j ui + σij ui,j or,
equivalently, σij ui,j = (σij ui ),j − σij,j ui . Applying the divergence theorem to the term involving
(σij ui ),j yields
Z Z Z
∗ ∗
σij ui,j dV = σij nj ui dS − σij,j u∗i dV, (8.22)
Ω ∂Ω Ω

so that rewriting (8.21) leads to


Z Z
(σij,j + ρbi )u∗i dV + (t̂i − σij nj )u∗i dS = 0. (8.23)
Ω ∂ΩN

Since this equation must hold for all admissible virtual displacements u∗ , it is concluded that
we must have

σij,j + ρbi = 0 in Ω and σij nj = t̂i on ∂ΩN . (8.24)

These are equivalent to the (static) balance of linear momentum and the associated traction
boundary condition, so that (8.21) – when valid for all admissible virtual displacements u∗ –
indeed holds true and is an alternative expression of the balance of linear momentum and the
associated traction BCs, as stated in (8.24).

One may also look at this “backwards”: if σij,j + ρbi = 0 everywhere in Ω and if σij nj = t̂i
everywhere on ∂ΩN , then (8.23) must definitely hold (it is nothing but 0 integrated over Ω
and ∂ΩN ). (This perspective is taken in the so-called method of weighted residuals, see
Appendix D.) If (8.23) is true, then – by going through (8.22) – Eq. (8.21) applies as well. Ergo,
the strong form (8.24) implies the validity of (8.21).

77
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Example 8.3. Hanging bar under its own weight revisited (again, I know)

For instructive purposes, let us apply the principle of virtual work to a 1D


bar. We re-visit the problem of a hanging bar under its own weight, discussed
in Examples 3.2 and 6.4, with a force F̂ applied at its free end. The strong g
form was x
u(x) L

+
Eu,xx (x) + ρg = 0 (8.25)

with boundary conditions

u(0) = 0 and F (L) = EAu,x (L) = F̂ . (8.26) F^


With the constitutive law σ = Eε = Eu,x and the reduction to 1D, the principle of virtual
work (8.21) here becomes
Z L Z L
Eu,x u∗,x A dx = ρgu∗ A dx + F̂ u∗ (L) (8.27)
0 0

Let us quickly show that this is indeed equivalent to the strong form. Integration by parts
applied to the first integral yields
Z L Z L
∗ L ∗
[Eu,x u A]0 − Eu,xx u A dx = ρgu∗ A dx + F̂ u∗ (L). (8.28)
0 0

We exploit that u∗ (0)


= 0 (since u(0) = 0 is fixed, virtual displacements at x = 0 must vanish)
and re-arrange the integrals into
Z L h i
(Eu,xx + ρg) u∗ A dx + F̂ − EAu,x (L) u∗ (L) = 0. (8.29)
0

As we require this equation to hold for any admissible function u∗ (x), we thus conclude that
the two terms in parentheses and brackets must vanish, viz.
Eu,xx + ρg = 0 for x ∈ (0, L), F̂ = EAu,x (L), (8.30)
which in turn confirms that a function u(x) that satisfies (8.27) for all admissible virtual dis-
placements u∗ (x), as well as the essential boundary condition u(0) = 0, is also a solution of
(8.25).

————

The above example admits one important general conclusion: if we interpret the virtual dis-
placement u∗ as a variation δu, then the principle of virtual work (8.27) is identical to
the first variation (6.36). This can be shown in general for elastic problems (and not only for
the hanging bar in 1D). The consequence is that the principle of virtual work allows us to for-
mulate the weak form without requiring a total energy functional. In fact, Eq. (8.27) is nothing
but G[u, u∗ ] = B[u, u∗ ] − L[u∗ ] = 0 for the hanging bar. This is an important observation for
formulating non-elastic problems, in which the total potential energy may not exist or cannot
easily be formulated. By using the principle of virtual work, Eq. (8.21), we may arrive at a
form G[u, u∗ ] = 0 equivalent to the first variation. We hence have a strategy to formulate the
weak form for problems with a variational structures (using the first variation) as well as one
for problems without (using the principle of virtual work) – and in case of variational problems,
the two approaches coincide.

78
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

9 Interpolation spaces

So far, we have assumed that the approximate solution uh (x) is based on a choice of basis
functions N a (x) with a = 1, . . . , n. Before discussing particular basis functions, it is important
to consider what conditions those shape functions N a (x) must satisfy in general and how we may
choose them wisely for numerical purposes. In the following, let us here discuss the requirements
that shape functions have to satisfy and, hence, appropriate interpolation spaces.

9.1 Approximate solutions

The idea of indirect numerical approaches is to find an approximate solution: we replace the
space U by a finite-dimensional subspace

U h ⊂ U, (9.1)

in which we seek a solution uh .

An n-dimensional space U h is defined by a set of n basis or shape functions {N 1 , . . . , N n }


along with the approximate function

n
X
uh (x) = ua N a (x) (9.2)
a=1

Recall principle (B) in Eq. (8.9), which states the weak form as:

find u ∈ U s.t. B[u, v] = L[v] for all v ∈ U0 . (9.3)

When using the approximation (9.2) in this context, we must also introduce an approximation
v h ∈ U0h ⊂ U0 (which must satisfy the same admissibility requirements as our variations δu ∈ U0
or as the virtual displacements u∗ )

m
X
h
v (x) = v a Ñ a (x) (9.4)
a=1

for the approximation of the virtual or variational displacement field v h .

We now have two options:

• We can use the same approximation space for uh and v h (i.e., n = m and N a = Ñ a ). This
is the so-called the Bubnov-Galerkin approximation: both uh and v h use the same
ansatz functions.

• Choosing different function spaces for uh and v h leads to the so-called Petrov-Galerkin
method. This method gains importance, among others, when solving over/underconstrained
problems since it allows us to control the number of equations by the choice of the dimen-
sion of the space of v h .

With the approximations (9.2) and (9.4), we can formulate the discrete problem

(C) find uh ∈ U h s.t. B[uh , v h ] = L[v h ] for all v h ∈ U0h (9.5)

79
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

This is nothing but a discretized version of principle (B) from (8.9). If the approximate function
space contains the exact solution, i.e., if U ⊆ U h , then we may expect to find the exact solution
from (9.5).

It is a relatively simple exercise to verify that the discrete problem (9.5) reduces again to a
linear system of equations to be solved. To this end, insert the approximations (9.2) into (9.5)
to obtain
" n n
# " n #
X X X
B ua N a , vb N b = L vb N b for all (admissible) v b . (9.6)
a=1 b=1 b=1
Exploiting that B is bilinear and L is linear lets us transform the above into
n n
!
X X h i h i
vb ua B N a , N b − L N b = 0 for all (admissible) v b . (9.7)
b=1 a=1

Since this must hold for all admissible values of v b , we that


Xn h i h i
ua B N a , N b = L N b for b = 1, . . . , n. (9.8)
a=1

This defines a linear system of equations to be solved for ua (a = 1, . . . , n). Let us define a
vector of all unknown coefficients:
T
U h = u1 , . . . , un .

(9.9)
Further, we define a (symmetric) matrix K ∈ Rn×n and vector F ∈ Rn with components
h i h i
K ab = B N a , N b , Fb = L Nb (9.10)

Note that, once shape functions N a (x) have been chosen for a = 1, . . . , n, components K ab
and F b can be uniquely calculated, so K and F are a constant, real-valued matrix and vector,
respectively. For example, for the hanging bar in 1D, using the bilinear and linear forms from
(6.43) yields
Z L
ab a b a b
K = B[N , N ] = EN,x (x)N,x (x)A dx,
0
Z L (9.11)
b b b b
F = L[N ] = ρgN (x)A dx + F̂ N (L).
0
This shows that K is indeed symmetric and, moreover, positive-semi-definite.

The resulting linear system reads

K Uh = F ⇔ K ba ua = F b or, equivalently, K ab ub = F a . (9.12)

Comparing (9.10) to (7.6) shows that the obtained linear system of equations is identical to
that derived for the Rayleigh-Ritz method. This is, in fact, not surprising: for the Rayleigh-
Ritz method we inserted the approximate solution uh directly into I and minimized I[uh ] with
respect to the unknown coefficients ca . Here, we first obtained the exact stationarity equation
G[u, v] = 0 from I[u] and then inserted uh and v h . Yet, if we choose the very same function
space for uh and v h , then both methods should indeed lead to the same system of equations.
Thus, we may also re-interpret the Bubnov-Galerkin scheme as computing the coefficients ua as
the minimizers of I[uh ]. This can be convenient later in the finite element method, as it allows
to compute the system of equations to be solved for the unknown coefficients in two different
ways: from the weak form or from differentiating the total energy.

80
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

9.2 Shape functions

In the previous sections, we introduced approximations uh ∈ U h of the type


n
X
h
u (x) = ua N a (x), (9.13)
a=1

which are defined through a set of shape functions N a (x) for a = 1, . . . , n. In the following,
we discuss how to choose such shape functions.

Let us briefly introduce the support of a continuous function f : Ω → R as the set of all
points16 where f (x) ̸= 0, i.e.,

supp f = x ∈ Ω : f (x) ̸= 0 (9.14)

This means that f (x) = 0 for all points outside the support, i.e., for x ∈ Ω\ supp f .

In general, there are two possible choices for the nature of N a (x):

• global shape functions are defined everywhere in Ω, i.e., |supp N a | ∼ |Ω|,


e.g., polynomials N a (x) = xa or trigonometric polynomials N a (x) = cos π(a − 1)x .


• local shape functions are defined only locally: |supp N a | ≪ |Ω|,


e.g., piecewise linear shape functions that are zero in much of Ω.

Examples of global (polynomial) shape functions and local shape functions with their supports
are shown below.

N 2(x)
N 1(x) N 2(x)
N 1(x) N 3(x)

x x
a 1 2
supp N supp N supp N
global shape functions local shape functions

Irrespective of their global or local nature, all shape functions should be carefully chosen.
Specifically, the following shape function properties must be satisfied:

(I) At any point x ∈ Ω there must be at least one a with 1 ≤ a ≤ n such that N a (x) ̸= 0
(i.e., the whole domain must be covered by the approximation). Otherwise, no
approximation would exist in certain regions or at certain points inside the body.
(II) The chosen shape functions N a should allow us in some “simple” manner to impose
Dirichlet boundary conditions, where required (recall that uh should satisfy the es-
sential BCs). This is obviously not a clearly defined criterion but an important one from
a practical perspective.
16
To be more specific, the support is the closure in Ω of the set of all points with non-zero f (x). Yet, this is
of minor importance here, so we will not make that differentiation.

81
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

(III) All shape functions must be linearly independent, i.e., we require


n
X
uh (x) = ua N a (x) = 0 ∀ x ∈ Ω ⇔ ua = 0 for all a = 1, . . . , n. (9.15)
a=1

In other words, no combination of coefficients {u1 , . . . , un } can produce a solution that is


zero everywhere.
Why is this important? Because it avoids ill-posed problems: it ensures that for any
function uh ∈ U h there exists a unique set of parameters {u1 , . . . , un } such that
n
X
uh (x) = ua N a (x) ∀ x ∈ Ω. (9.16)
a=1

As a counterexample, take for simplicity U h = P2 and {N 1 , N 2 , N 3 } = {1, x, x2 } so that


uh = u1 N 1 + u2 N 2 + u3 N 3 . Hence, if, e.g., uh = a + bx then we immediately conclude
that the coefficients must be u1 = a, u2 = b, u3 = 0. This is the unique solution. By
contrast, if we choose the shape functions {N 1 , N 2 , N 3 } = {1, x, 1 + x} (which are not
linearly independent functions), there would be no unique choice of the coefficients, since
uh = a + bx in this case would have the solution u1 = a, u2 = b, u3 = 0 but also u1 = a − b,
u2 = 0, u3 = b — or, more generally, u1 = a − s, u2 = b − s, u3 = s for arbitrary s ∈ R.
̸ 0 such that na=1 αa N a = 0,
Mathematically speaking, if there exists a set {α1 , . . . , αn } =
P
then this set of parameters could be added on top of any solution {u1 , . . . , un } such that
n
X n
X n
X n
X
uh = ua N a + αa N a = ua N a = (ua + αa )N a , (9.17)
a=1 a=1 a=1 a=1

which means both {u1 , . . . , un } and {u1 + α1 , . . . , un + αn } are solutions. In this case, the
problem is not well-posed.
For these reasons, we must define shape functions that are linearly independent. If func-
tions {N 1 , . . . , N n } are indeed linearly independent, then we call them a basis of U h .
(IV) The shape functions N a must satisfy the differentiability/integrability requirements
of the weak form (this depends on the problem to be solved, as discussed before in the
context of the weak form in Section 8). For example, for mechanical problems we had
seen that the weak form requires uh ∈ H 1 (Ω).
(V) The shape functions must possess “sufficient approximation
Pn power”. In other words,
consider u ∈ U ⊂ U: we should ensure that u = a=1 u N a → u as n → ∞ or, in
h h h a

other words,

for all u ∈ U there exists uh (v) ∈ U h such that lim ∥uh (v) − u∥ = 0. (9.18)
h→0

This important requirement ensures convergence and will be discussed in more detail in
Section 9.3 below .

9.3 Approximation power & completeness

Condition (V) above tells us that, for an approximation uh to converge to u, we must pick
an approximate function space U h which gives the solution uh “a chance to converge” to u.
For example, assume you aim to approximate a high-order polynomial u ∈ Pn (with n ≫

82
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

1) by an approximation uh using shape functions {1, x, x2 , x3 , . . . , xn }. This is expected to


converge as n → ∞, because the coefficients of uh will approach the coefficients of u. However,
choosing the basis functions poorly as {1, x, x3 , . . . , xn } (notice the x2 -term is omitted) will
never converge as n → ∞. Only if all terms are present in the polynomial series and none is
omitted, then polynomials are expected to converge by the Weierstrass approximation theorem
(see Appendix M for the mathematical details).

Therefore, {N i } = {1, x, x2 , x3 , . . .}, i.e., the polynomials in R, is a suitable choice for the shape
functions to satisfy the so-called completeness property. Note that, as discussed above, one
cannot omit any intermediate-order terms from the set

{1, x, x2 , x3 , . . .}. (9.19)

If one or more terms are missing, then the set is not complete. As an extension, the Weierstrass
approximation theorem also applies to trigonometric polynomials (i.e., a Fourier series):
taking a Fourier series expansion with an increasing number of terms, e.g.,

{1, sin x, cos x, sin 2x, cos 2x, sin 3x, cos 3x, . . .} (9.20)

is also expected to converge to the exact solution, if no term in the Fourier series is missing.

When going to higher dimensions, we need to specify what complete polynomials are. Let us
first present the definition and then discuss its implications and examples:

A polynomial approximation in Rd is complete up to order q, if it contains independently


all monomials xα with multi-index α = {α1 , . . . , αd } such that |α| = α1 + . . . + αd ≤ q and
xα = xα1 1 x2α2 · · · xαd d in d dimensions. This leads to
q X
X
h
u = cα xα . (9.21)
β=0 |α|=β

Here, the sum over |α| = β implies that we are summing over all possible combinations of
{α1 , . . . , αd } in d dimensions such that |α| = α1 + . . . + αd = β.

Example 9.1. Polynomial completeness in 1D, 2D, and 3D

Eq. (9.21) defines completeness of polynomial functions in higher dimensions. What does this
mean in practice and in simple terms? Let us check the specific cases of 1D, 2D, and 3D
polynomial functions.

1D: For d = 1, the above reduces with α = {α1 } to


q X
X q
X
uh = cα1 xα1 = cβ xβ . (9.22)
β=0 α1 =β β=0

Hence, the shape function basis is {1, x, x2 , x3 , . . . , xq }, and a polynomial of order q con-
tains q + 1 monomials. Thus, this reduces to the 1D case of Section 9.3.

2D: for d = 2 with coordinates x1 and x2 , the above definition of complete polynomials with
α = {α1 , α2 } yields
q
X X
uh = c(α1 ,α2 ) xα1 1 xα2 2 . (9.23)
β=0 α1 +α2 =β

83
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

This results in the following bases for polynomials that are complete up to order q:
q = 0 : {1}
q = 1 : {1, x1 , x2 }
q = 2 : {1, x1 , x2 , x21 , x1 x2 , x22 } (9.24)
q=3: {1, x1 , x2 , x21 , x1 x2 , x22 , x31 , x21 x2 , x1 x22 , x32 }
...
The number of independent monomials in 2D is (q + 1)(q + 2)/2.

3D: for d = 3 with coordinates x1 , x2 , x3 , the definition of complete polynomials with α =


{α1 , α2 , α3 } becomes
q
X X
h
u = c(α1 ,α2 ,α3 ) xα1 1 xα2 2 xα3 3 . (9.25)
β=0 α1 +α2 +α3 =β

Analogous to the 2D case, this leads to the following complete bases in 3D:
q = 0 : {1}
q = 1 : {1, x1 , x2 , x3 }
q = 2 : {1, x1 , x2 , x3 , x21 , x22 , x23 , x1 x2 , x1 x3 , x2 x3 }
(9.26)
q = 3 : {1, x1 , x2 , x3 , x21 , x22 , x23 , x1 x2 , x1 x3 , x2 x3 ,
x31 , x32 , x33 , x21 x2 , x21 x3 , x1 x22 , x22 x3 , x1 x23 , x2 x23 }
...

————

Example 9.2. (In-)completeness examples

Imagine someone presents you with the following approximations in 2D (with coefficients ci ).
Up to which order are these complete?

(a) uh (x) = c0 + c1 x1 + c2 x2 + c3 x21 + c4 x22 : this polynomial is complete up to order q = 1. It


does contain quadratic terms, but is missing the term x1 x2 and hence is not complete up
to q = 2.

(b) uh (x) = c1 x1 + c2 x2 + c3 x21 + c4 x22 + c5 x1 x2 : this polynomial is useless in general. It is


missing the most basic, constant term and hence is not even complete up to the lowest
order.

(c) uh (x) = c0 + c1 x1 + c2 x2 + c3 x21 + c4 x22 + c5 x1 x2 + c6 x31 + c7 x32 + c8 x21 x2 : this polynomial


is complete up to order q = 2. As it is missing the term x1 x22 , it is not complete up to
q = 3.

————

This completes our discussion of shape function requirements. They should (I) cover the entire
domain, (II) allow us to easily imposed Dirichlet boundary conditions, (III) be linearly indepen-
dent, (IV) be sufficiently square-integrable/differentiable, and (V) have sufficient approximation
power (i.e., be complete and converge to the exact solution). This still does not tell us how to
choose shape functions {N 1 (x), . . . , N n (x)} – and this takes us directly to the finite element
method.

84
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

10 The Finite Element Method

All of the shape functions introduced in previous examples were global, i.e., they were defined
over the entire body Ω. This has (at least) two major disadvantages.

First, global shape functions such as polynomials xa (for a = 0, . . . , n) are problematic when it
comes to Dirichlet BCs: imagine, e.g., prescribing the displacements at both ends of a 1D bar.
Enforcing uh (0) = 0 is simple, whereas setting uh (0) = 0 and simultaneously uh (L) = ∆u is
more involved as the latter leads to a condition involving all unknown coefficients:
n
X n
X
uh (x) = ua N a (x) ⇒ uh (0) = u0 = 0, uh (L) = ua N a (L) = ∆u. (10.1)
a=0 a=1

Such global coefficient constraints as given by the latter form are especially cumbersome when
dealing with multiple essential BCs in higher dimensions.

Second, global shape functions such as polynomials xa results in a dense stiffness matrix K,
when forming the linear system to be solved for the unknown coefficients by the various methods
introduced before. Recall that K ab depends on integrals of the type B[N a , N b ] = Ω N,x
a N b dx.
R
,x
If N a and N b extend over all of Ω for every combination a and b, then K ab ̸= 0 in general.
By contrast, if N a and N b are non-zero only in small regions of Ω, then most combinations
B[N a , N b ] = 0, leading to a sparse matrix. The dense K-matrix creates high computational
costs, whereas a sparse matrix would admit an efficient solving of the system of equations.

One motivation for the finite element method was hence to construct local shape functions
that admit the relatively easy implementation of essential BCs while also resulting in sparse
matrices.
The main idea is to introduce a discretization Th which splits Ω element
into a finite number of subdomains Ωe , the so-called elements, node
such that
[
Ωe ⊆ Ω, Ω= Ωe . (10.2)
e

The discretization Th is defined by a collection of nodes and ele- mesh


ments, as shown on the right; it is called a mesh.
Mathematically (and computationally), a finite element (FE) is an object that has

(i) a domain Ωe ⊆ Ω.
(ii) a space of shape functions Nea (defined within Ωe with supp Nea = Ωe ).
(iii) a set of degrees of freedom (dofs), viz. the uae -coefficients associated with those Nea .

Specifically, the Finite Element Method (FEM) defines continuous, piecewise polynomial
shape functions such that

N a (xb ) = δab for all a, b ∈ {1, . . . , n} (10.3)

This is known as the Kronecker property of FE shape functions. In other words, each shape
function N a is 1 when evaluated at exactly one node a, and it vanishes at all other nodes. This
is the defining relation that determines the shape functions. Notice that if we evaluate the

85
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

approximation uh (x) at one of the nodes xb , then


n
X n
X
uh (xb ) = ua N a (xb ) = ua δab = ub . (10.4)
a=1 a=1

That is, the coefficient ub can now be identified as uh (xb ), i.e., as the value of approximate func-
tion uh at node b. This makes for a very beneficial interpretation of the (yet to be determined)
shape function coefficients.

Notice that the Kronecker property 10.3 also allows us to impose an important constraint:
imagine that the solution field is constant, i.e., the exact solution is u(x) = c = const. with
some value c ∈ R. In this case we want the approximate solution to also be uh (x) = c. From
(10.4) we know that this requires that all nodal values are ua = c for all a = 1, . . . , n (i.e., if
every node has the same nodal value c). This leads to
n
X n
X n
X
h a a a
u (x) = u N (x) = c N (x) = c N a (x). (10.5)
a=1 a=1 a=1

Hence, to make sure that uh (x) = c is exact in case of a constant solution u(x), the FE shape
functions must satisfy the additional property that
n
X
N a (x) = 1 for all x ∈ Ω (10.6)
a=1

This condition ensures that constant functions are approximated correctly and is also known as
0th -order consistency.

Now that we have outlined the properties of FE shape functions, let us check if FE shape func-
tions satisfying (10.3) also satisfy the requirements for shape functions introduced in Section 9.2:

(I) is automatically satisfied: if x ∈ Ω, then we must have x ∈ Ωe for some element e by


(10.2). Consequently, there must be element shape functions Nea (x) ̸= 0 at point x.
(II) can be satisfied (approximately) by fixing those degrees of freedom ua associated with the
boundary nodes (since ua = uh (xa ), imposing a value û = uh at certain nodes merely
amounts to fixing the values of ua associated with those nodes). ForPexample, if our 1D
bar is discretized into n nodes and n − 1 elements such that uh (x) = na=1 ua N a (x), then
imposing uh (0) = 0 and uh (L) = ∆u is simply enforced by fixing the coefficients u1 = 0
and un = ∆u.
(III) Linear independence can be shown by contradiction: assume that uh (x) = 0 for all x ∈ Ω
while there is indeed some ua ̸= 0 for 1 ≤ a ≤ n. Now, evaluate uh at any node b:
n
X
0 = uh (xb ) = ua N a (xb ) = ub ⇒ ub = 0 ∀ b = 1, . . . , n, (10.7)
a=1

which contradicts the assumption that some ua ̸= 0. Thus, (10.3) ensures that we have
linearly independent shape functions.
(IV) Integrability/differentiability requirements depend on the variational problem to be solved
and must be ensured. For example, for the mechanical BVP we have seen that U h ⊂ H 1 ,
i.e., first derivatives must be square-integrable. Note that this guarantees that displace-
ments (0th derivatives) are continuous and thus compatible (no jumps in displacements).

86
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

This requirement is not a-priori satisfied by finite elements but imposes restrictions on the
type of piecewise-polynomial interpolation functions to be used. We will discuss specific
types of interpolation soon, starting in Section 11.
(V) Completeness requires, aside from choosing complete polynomials for the shape functions,
that uh → u (and thus U h → U) within desirable accuracy. In the FE method, one
commonly enriches U h by one of the following methods (shown schematically below):
• h-refinement: refining the discretization Th while keeping the polynomial interpo-
lation order within elements fixed (i.e., decreasing the element size while using the
same type of shape functions).
• p-refinement: increasing the polynomial interpolation order within a fixed dis-
cretization Th (i.e., keeping the elements but using higher-order polynomial shape
functions).
• hp-refinement: a combination of the above two (i.e., increasing the number of
elements while also increasing the polynomial order of shape functions).
• r-refinement: repositioning of nodes while keeping the discretization and interpo-
lation order fixed (e.g., moving nodes into regions requiring higher accuracy).

When using either of these refinement techniques appropriately within the FE context, we may
expect that U h → U and hence that the approximate solution uh converges to the exact, classical
solution u.

linear linear quadratic linear


interpol. interpol. interpolation interpol.
... ... ... ...

element element element element


original mesh h-refinement p-refinement r-refinement

Let us add a note on ensuring sufficient approximation power, as required by condition (V):
consider the exact solution u(x) at a point x ∈ Ω so that within a small h-neighborhood of x
(and h being interpretable as the element size) we may expand
1 1
u(x + h) = u(x) + h u′ (x) + h2 u′′ (x) + . . . + hq u(q) (x) + O(hq+1 ). (10.8)
2 q!
Assume that U h contains all polynomials complete up to degree q (i.e., U h = Pq ), then there
exists a “nearby” approximation
uh ∈ U h such that u(x) = uh (x) + O(hq+1 ). (10.9)

Let p denote the highest derivative in the weak form. Differentiating the equation in (10.9)
yields
dp u dp uh
= + O(hq+1−p ). (10.10)
dxp dxp
For the solution to converge as h → 0, we need the errors to be at least of O(h), which implies
that we must have q + 1 − p ≥ 1. Thus we must ensure that
q≥p (10.11)

87
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

This gives us a simple recipe for the choice of the interpolation order q, based on the highest
derivative (of order p) appearing in the weak form. For example, for the mechanical (as well as
thermal and electromagnetic) variational problems discussed previously, we had the requirement
u, uh ∈ H1 (Ω), since the energy and resulting weak form contained first derivatives of u only.
Hence, we have p = 1, so that our finite-element interpolations must satisfy q ≥ p = 1.
Therefore, finite-element shape functions to be used for solving mechanical BVPs require at
least piecewise-linear shape functions.

88
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

11 Finite element spaces: polynomial shape functions in 1D

11.1 2-node bar element

Let us start with the simplest of all choices: continuous, piecewise-polynomial interpolation func-
tions. As explained above, we need q ≥ 1 since p = 1 for the mechanical/thermal/electromagnetic
variational problems; i.e., we need at least linear interpolation within elements. Here, let us
begin with the simplest example of a 1D bar element having piecewise-linear interpolation –
and we will see that we recover our 2-node bar element from Section 5.
Since the element has only two nodes (which we call nodes 1 and
2), we need two shape functions for the interpolation of the element
dofs Ue = {u1e , u2e }, so that Ne1 Ne2
1
uhe (x) = Ne1 (x)u1e + Ne2 (x)u2e , (11.1) 1 u e 2 u2
e

x
and we must have uhe (0) = u1e and uhe (∆x) = u2e for an element
defined on x ∈ [0, ∆x], as shown on the right. Dx

Here and in the following, we add the subscript e to all quantities being specific to an element
(this includes, e.g., the above shape functions and the nodal dofs are associated with nodes 1
and 2 of this particular element).

By choosing q = 1, the shape functions must be linear polynomials, so that we must have an
interpolation of the type uhe (x) = c1e + c2e x with c1 , c2 ∈ R. As we know that uhe must evaluate
to uae at node a (with a = 1, 2), we may impose

u2e − c1e u2 − u1e


u1e = uhe (0) = c1e , u2e = uhe (∆x) = c1e + c2e ∆x ⇔ c2e = = e , (11.2)
∆x ∆x
from which we conclude
 x  1 x 2
uhe (x) = c1e + c2e x = 1− u + u . (11.3)
∆x e ∆x e
Comparison with (11.1) yields the element shape functions (plotted above) as

x x
Ne1 (x) = 1 − , Ne2 (x) = (11.4)
∆x ∆x

Notice that these functions automatically satisfy (10.3), i.e., each shape function a is 1 at node
a and 0 at the respective other node. Both vary linearly from 0 to 1, as shown above. This
defines the simplest possible FE interpolation within a 1D element.

If we group the nodal degrees of freedom into the vector Ue , then we can re-write (11.4) in
matrix form by introducing the shape function matrix Ne as
 1
ue
uhe (x) x x

= Ne Ue with [Ne ] = 1 − , Ue = (11.5)
∆x ∆x u2e

Next, let us use the above shape functions and see what their use implies in solving a mechanical
BVP. To this end, recall that in linear elasticity we solve a linear system of equations, involving
the vectors and matrices defined in Section 13.

89
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Differentiating the above linear shape functions yields

1 d  x  1 2 d x 1
Ne,x (x) = 1− =− , Ne,x (x) = = , (11.6)
dx ∆x ∆x dx ∆x ∆x
so that the (only non-zero) axial strain component inside the bar element is constant since:
n
X u2e − u1e
εhxx = uhe,x (x) = uie Ne,x
i
(x) = u1e Ne,x
1
(x) + u2e Ne,x
2
(x) = = const. (11.7)
∆x
i=1

The result in (11.7) is not surprising but confirms what we have known since first-year mechanics
classes: if a bar of length ∆x is stretched by an amount ∆u = u2e − u1e (which is the relative
displacement of its two end points) and if we assume a linear displacement variation along the
bar, then this implies a constant axial strain of magnitude ∆u/∆x – which is exactly what we
assumed in Section 5 to derive the stiffness matrix.

Note that we can also re-write (11.7) in matrix form by introducing the so-called B-matrix as

u1e
 
εhxx 1 1

= Be Ue with [Be ] = − ∆x , Ue = (11.8)
∆x u2e

Next, let us derive the stiffness matrix following from the above shape functions. For a linear
elastic bar, we obtained from the linear elastic mechanical weak form (9.10) (see also (9.11))
the stiffness matrix components within a bar element as
Z ∆x (
ab a b a b a b EA 1, if a = b
Ke = B[Ne , Ne ] = ENe,x Ne,x A dx = EA ∆xNe,x Ne,x = , (11.9)
0 ∆x −1, else

which leads to the element stiffness matrix


 
EA 1 −1
[Ke ] = (11.10)
∆x −1 1

This recovers the stiffness matrix previously derived via the Direct Stiffness Method in Section 5,
see (5.18).
1
The two nodal forces Fint,e 2
and Fint,e depend linearly on the nodal displacements:
 1     1
Fint EA 1 −1 ue
[Fint,e ] = 2 = ⇔ Fint,e = Ke Ue . (11.11)
Fint ∆x −1 1 u2e

This is not surprising but intuitively correct: if the bar is strained by a constant strain εh =
∆u/∆x, then the stress inside the bar is σ = Eεh and the resulting axial force is F = σA (with
A being the bar’s cross-section). (11.11) simply states that the forces that must be applied to
the elastic bar at both ends to result in a change of length are of opposite direction and equal
magnitude EAεh . The bar hence acts as a linear elastic spring of effective stiffness k = EA/∆x.

Further, we verify that the strain energy stored in the bar is


Z ∆x  
E h 2 1 ∂Ie
Ie (Ue ) = εxx A dx = Ue · Ke Ue ⇒ Fint,e = . (11.12)
0 2 2 ∂Ue

It is important to note that the above shape functions were introduced within a single element e,
which is why we use the subscript e on all element quantities, including the shape functions

90
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Nea . In practice, a single rod may be subdivided into multiple bar elements, and we may apply
the above concepts to each bar element. This results in the global definition of shape functions
associated not with particular elements but with specific nodes. Let us consider the following
illustration of a 1D mesh of 2-node bar elements.

Ne1 Ne2 Ne1 Ne2


element element
shape functions shape functions
1 2 1 2

Ne1 Ne2 Ne1 Ne2 N2e+1 N3 N6


1
Ne+1
node: 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 6 7 8
element: 1 2 3 1 2 3 x
shape functions shape functions resulting (global) shape functions
in element 2 in elements 2 and 3 of nodes 3 and 6

For each element e, the shape functions Ne1 and Ne2 are as defined in (11.4), where element
node 1 may be node number 2 in the overall mesh, and element node 2 may fall onto node 3 in
the mesh, as shown above on the left. Similarly, (11.4) defines the shape functions Ne1 and Ne2
within element 3 in the mesh, where element nodes 1 and 2 fall onto the nodes numbered 3 and
4 in the mesh, respectively. If one focuses on the shape function contributions to a particular
node in the global mesh (e.g., those associated with global node 3), then this node has non-zero
shape functions only in the two adjacent elements (here, elements 2 and 3). When plotting (on
the global mesh) the resulting shape function of node 3 (or of node 6), the “hat-like” shapes
shown above arise. Mathematically speaking, the shape function of node 4 in the mesh (where
node i is located at xi ) has become
 x−x
 ∆x ,
 2
for x2 ≤ x ≤ x3 ,
3 x−x
N (x) = 1 − ∆x , for x3 ≤ x ≤ x4 ,
3 (11.13)

0, else.

As a general feature of finite elements, such FE shape function are non-zero only in the adjacent
elements while being zero elsewhere. Note that we here omitted subscript e, since N 3 is not
defined within a particular element but on the (overall) mesh.

The solution uh of a finite element problem based on 2-nodeP bar elements may hence be under-
stood, as shown below, where each coefficient ua in uh (x) = na=1 ua N a (x) defines the function
value uh (xa ) at the location of node a, while using a piecewise-linear interpolation in between.

uh(x)
u1
1 x
N u2
N2 u3
u4
u1 ž + u2 ž + u3 ž N3 + u4 ž 4
+ ... = .:
N

un

91
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The extension to 2D and 3D was already discussed in Section 5.4. The stiffness matrix
of each 1D element is rotated according to (5.19) to result in the stiffness matrix in 2D (and
analogously in 3D). Here, we have seen that the same stiffness matrix – derived in Section 5.4
from simple spring considerations – is alternatively obtained from the finite element ansatz with
piecewise-linear shape functions in 1D.

11.2 Polynomial interpolation of higher order

So far we have only considered linear shape functions. When going to higher-order polynomial
interpolation (as required, e.g., for p-refinement but also for BVPs with higher-order derivatives
in the weak form), various choices are possible for the definition of the element shape functions.
We here discuss two such approaches in 1D – leading to bar elements with more than two nodes.

11.2.1 Lagrangian interpolation

The shape functions of the above 2-node bar are a special case (i.e., the simplest case possible) of
so-called Lagrangian interpolation in 1D, which can be extended to higher orders as follows.
Assume an interpolation up to degree q, i.e., {1, x, x2 , . . . , xq } such that
q+1
X
uhe (x) = Nea (x)uae = a0 + a1 x + a2 x2 + . . . + aq xq . (11.14)
a=1

In general, shape functions Nea (x) for a = 1, . . . , q + 1 can be determined by solving the q + 1
equations
uhe (xb ) = ub for all b = 1, . . . , q + 1 (11.15)
for the q + 1 coefficients ai (i = 0, . . . , q). Then, rearranging the resulting polynomial allows to
extract the shape functions Nea (x) by comparison of the coefficients of uae , as we did in (11.3)
for the 2-node bar element.

Alternatively, we may recall the defining relation for finite-element shape functions, (10.3), and
solve
Nea (xb ) = δab for all nodes b = 1, . . . , q + 1. (11.16)
The solution to this problem is in fact intuitive:
(x − x1 ) · . . . · (x − xa−1 ) · (x − xa+1 ) · . . . · (x − xq+1 )
Nea (x) = (11.17)
(xa − x1 ) · . . . · (xa − xa−1 ) · (xa − xa+1 ) · . . . · (xa − xq+1 )

so that Nea (x) is by definition 1 if x = xa , and it vanishes at all


other nodes. Hence, one can readily verify that Nea (xb ) = δab .
These shape functions are called Lagrange polynomials. The Ne1 3
Ne2
denominator is known and depends only on the nodal locations, Ne

while the numerator is indeed a polynomial of order q.


1 3
Shown on the right is an example of quadratic shape functions 1 u e 3 ue 2 u2
e

interpolating the displacement field in a bar element with three x


nodes. Note that such elements have nodes not only at the end Dx
points but also within the domain of the element (which must be
considered when creating the finite-element mesh).

92
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Notice that the shape functions in this example may be negative in some region of the bar
element. FE shape functions always satisfy P the Kronecker property Nea (xb ) = δab . They also
satisfy the 0 -order consistency condition q+1
th a
a=1 Ne (x) = 1 (as introduced in (10.6); try to
prove it yourself for Langragian shape functions!). However, those constraints do not impose
bounds on the value of Nea (x), so the shape functions can indeed be negative or larger than 1.

Shown below is the example of a four-node bar element in 1D along with its four shape functions,
defined as Lagrange polynomials. You can verify that the shown shape functions satisfy the
Kronecker property.

1.0
N 2(x)
0.8
N 3(x) N 4(x)
0.6

0.4 N 1(x)
0.2

1 2 3 4x
0.5 1.0 1.5 2.0 2.5 3.0
-0.2

11.2.2 Hierarchical interpolation

An alternative to the above Lagrangian interpolation is known as hierarchical interpola-


tion. Here, we construct higher-order interpolations based on lower-order shape functions. For
example, we start with a 2-node bar element having linear interpolation:
x x
Ne1 (x) = 1 − , Ne2 (x) = . (11.18)
∆x ∆x
Let us enrich the interpolation to reach q = 2 by defining

uhe (x) = Ne1 (x)u1e + Ne2 (x)u2e + N


ee3 (x)αe (11.19)

with a new, yet unknown shape function (with unknown coefficients ai )


ee3 (x) = a0 + a1 x + a2 x2 ,
N (11.20)

which is associated with the newly introduced dof α. To identify the coefficients ai , recall that
we must have
e 3 (0) = N
N e 3 (∆x) = 0, (11.21)
e e

which leads to
e 3 (x) = c x 1 − x
 
Ne (11.22)
∆x ∆x
with some arbitrary non-zero constant c ̸= 0 (which is to be chosen). The resulting interpolation
is (choosing c = 1)
 x  x  x  x
uhe (x) = u1e 1 − + u2e + αe 1 − . (11.23)
∆x ∆x ∆x ∆x

93
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Note that αe is internal to the element and does not have to be continuous across elements. We
can thus determine αe locally within the element (i.e., given u1e and u2e , αe can be determined
for each element, which allows for condensation of the αe -dof with efficiency advantages).

94
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

12 Beam Elements

In the previous section, we introduced higher-order polynomial shape functions, even though
those were not necessary: for the bar problem, we showed that linear interpolation is sufficient,
so that higher-order interpolation may be beneficial for improved accuracy but is not required.
Here, we will introduce a common scenario in structural mechanics that does require higher-
order interpolation – the description of beams that undergo bending.

12.1 Review of beam theory

Let us consider a straight rod that undergoes pure bend-


ing in 2D, as shown on the right. The x-axis is assumed to
y
point along the rod’s axis, while the z-axis points down
w(x) x
(so the y-axis comes out of the plane). Under applied
transverse loads, the beam undergoes bending, which is z
generally described by a beam deflection w = w(x) and
a beam rotation ψ = ψ(x), such that the displacement y(x)
field becomes approximately
 
−ψ(x)z
[u] =  0  . (12.1)
w(x)
Here, we assume that cross-sections of the beam remain straight, such that the horizontal
displacement is given by a rotation, explaining the linear profile −ψ(x)z (the minus sign stems
from the fact that points above the beam’s centerline move to the right, while points below
move to the left). In addition, for small strains the contribution of the rotation to the vertical
displacement is small compared to w(x), which is why we neglect it. The resulting strain
components, using εij = 12 (ui,j + uj,i ), evaluate to17

−ψ ′ (x)z 0 12 (w′ (x) − ψ(x))


 

[ε] =  0 0 0 . (12.2)
1
(w ′ (x) − ψ(x)) 0 0
2

The two non-zero strain components and the resulting stress components, using Hooke’s law of
linear elasticity, are hence
ε11 (x, z) = −ψ ′ (x)z ⇒ σ11 (x, z) = Eε11 (x, z) = −Eψ ′ (x)z,
1  (12.3)
ε13 (x, z) = (w′ (x) − ψ(x)) σ13 (x, z) = 2Gε13 (x, z) = G w′ (x) − ψ(x) ,


2
where E and G denote Young’s modulus and the shear modulus, respectively.

s11 M(x)
y y
x x N(x)
t12
Q(x)
z z
17
Unlike in the rest of these lecture notes, we here use coordinates (x, y, z) instead of (x1 , x2 , x3 ), since this
is how beam theory is typically taught in undergraduate mechanics and hence to avoid confusion. The two
descriptions are fully analogous and we will return to our usual (x1 , x2 , x3 ) notation later in this chapter.

95
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Finally, integrating over the cross-section of the beam yields the total (or net) normal force
N (x), the transverse force Q(x), and the bending moment M (x), all acting at a position
x along the beam (as schematically shown above), as
Z Z Z
′ ′
N (x) = σ11 (x, z) dA = − Eψ (x)z dA = −Eψ (x) z dA = 0,
ZA Z A A

G w′ (x) − ψ(x) dA = GA w′ (x) − ψ(x) ,


   
Q(x) = σ13 (x, z) dA = (12.4)
ZA A Z Z
M (x) = zσ11 (x, z) dA = − z 2 Eψ ′ (x) dA = −Eψ ′ (x) z 2 dA = −EIy ψ ′ (x),
A A A

where we assumed that the the x-axis


R runs through the neutral axis of the beam, having zero
axial stress σ11 = 0 and satisfying A z dA = 0. In addition, we introduced the area moment
of inertia
Z
Iy = z 2 dA, (12.5)
A

a constant that depends on the geometry of the cross-section and characterizes the beam’s
stiffness against bending about the y-axis. In the above relations, we must introduce one
correction: the shear force in general is not constant over the cross-section of the beam (it must
be zero at the top and bottom free edges and therefore takes on a nonlinear profile through the
cross-section). Assuming that the beam is slender, one generally introduces a shear correction
factor κ > 0, which accounts for the non-uniform distribution of the shear stresses and the
resulting difference in the net shear force. This results in the following forces and moment
acting on a beam in bending:

Q(x) = κGA w′ (x) − ψ(x) , M (x) = −EIy ψ ′ (x)


 
N (x) = 0, (12.6)

The value of κ depends on the cross-section. For a rectangular profiles made of a homogeneous
isotropic material, e.g., it was proposed by Cowper that κ = 10(1+ν)
12+11ν with Poisson’s ratio ν, which
5
is often taken as κ ≈ 6 (which is a good approximation for most materials with 0 ≤ ν ≤ 0.5).
Analogously, for a circular cross-section Cowper reported κ = 6(1+ν) 6
7+6ν ≈ 7 .

Note that replacing M (x) = −EIy ψ ′ (x) in the axial beam stress in (12.3) leads to

M (x)
σ11 (x, z) = z (12.7)
Iy

which is a linear stress profile over the cross-section, being zero in the neutral axis and propor-
tional to the bending moment.

When inspecting an infinitesimal beam segment of length q(x)


dx, we find that the transverse force Q(x) and moment
M (x) are not independent. In fact, force equilibrium (as-
suming a distributed force q(x) acting onto the beam, as M(x) M(x + dx)
shown) yields
x
Q(x + dx) − Q(x) + q(x) dx = 0, (12.8) Q(x) Q(x + dx)
which in the limit dx → 0 gives
dx
Q(x + dx) − Q(x) dx→0 dQ
q(x) = − → − (x). (12.9)
dx dx

96
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Angular momentum balance applied to the same infinitesimal beam segment with respect to its
center and assuming statics leads to
dx dx
M (x + dx) − M (x) − Q(x + dx) − Q(x) = 0. (12.10)
2 2
Dropping higher terms and approximating [Q(x + dx) + Q(x)] dx = [Q(x) + dQ + Q(x)] dx ≈
2Q(x) dx lets us conclude that
M (x + dx) − M (x) dx→0 dM
Q(x) = → (x). (12.11)
dx dx
Altogether, we thus have arrived at (using primes to denote derivatives with respect to x)

q(x) = −Q′ (x), Q(x) = M ′ (x) ⇒ M ′′ (x) = −q(x) (12.12)

At this point, we have two options. We can either solve the above beam equations (12.6) and
(12.12) for the two independent fields w(x) and ψ(x) – this leads to the so-called Timoshenko
beam model (also known as Timoshenko-Ehrenfest beam theory). Alternatively, we can
simplify the expressions by assuming that the beam is very slender, in which case the transverse
force Q(x) is approximately negligible, which is the basis of the co-called Euler-Bernoulli
beam theory. Let us briefly consider both cases in the following.

Inserting the moment from (12.6) into (12.12) results in


′′
EIy ψ ′ (x)

= q(x) (12.13)

which is a differential equation to be solved for ψ(x) (with suitable boundary conditions). In
addition, inserting the expressions for the transverse force Q(x) and moment M (x) from (12.6)
into Q(x) = M ′ (x) yields

′ 1  ′
M ′ (x) = −EIy ψ ′ (x) = κGA w′ (x) − ψ(x) w′ (x) = ψ(x) − EIy ψ ′ (x)
  

κGA
(12.14)

which can be solved for the deflection w(x) for given ψ(x) (or both equations (12.13) and
(12.14) can be solved simultaneously, depending on the boundary conditions). This description
of beams is known as Timoshenko beam theory.

12.2 Euler-Bernoulli beam theory

We can significantly simplify the above relations by assuming that the beam is very slender,
in which case the transverse force Q(x) is approximately negligible for the following reason: as
the shear stress must vanish at the top and bottom of the beam because of the free surfaces, in
the limit of a very thin beam that shear stress must become negligible in the beam. Revisiting
(12.6), the assumption Q(x) ≈ 0 leads to

ψ(x) ≈ w′ (x) (12.15)

This is the basis of the so-called Euler-Bernoulli beam theory. The key difference is whether
or not the beam is sufficiently slender to neglect shear deformation. Geometrically, Euler-
Bernoulli theory assumes that the beam’s cross-section remains straight and perpendicular to

97
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

the beam’s centerline, while Timoshenko theory only assumes straight cross-sections but defines
the angle between the cross-section and the centerline via angle ψ(x).

Combining (12.6) and (12.12), Euler-Bernoulli beam theory hence yields


′′
M (x) = −EIy ψ ′ (x) = −EIy w′′ (x) M ′′ (x) = − EIy w′′ (x) = −q(x) (12.16)


so that
′′ ′
EIy w′′ (x) = q(x), EIy w′′ (x) = −Q(x) EIy w′′ (x) = −M (x). (12.17)
 
and

If we further assume that Young’s modulus and the area moment of inertia are constant along
the length of the beam, we arrive at the relations

EIy w′′′′ (x) = q(x), EIy w′′′ (x) = −Q(x) and EIy w′′ (x) = −M (x) (12.18)

These three equations are often used in combination to solve boundary value problems.

From the above Euler-Bernoulli beam theory, we can also derive the energy density of a deformed
beam, combining (12.3) and (12.15), as
1 1
W = ε11 σ11 = E[ψ ′ (x)]2 z 2 ≈ E[w′′ (x)]2 z 2 . (12.19)
2 2
If we further integrate the above across the beam’s cross-section, we arrive at an energy density
per length of the beam (assuming a uniform Young’s modulus within the cross-section:
Z Z Z
′′ ′′
W dA = 2 2
E[w (x)] z dx = E[w (x)] 2
z 2 dx = EIy [w′′ (x)]2 (12.20)
A A A

with the area moment Iy , as introduced in (12.5).

Example 12.1. Doubly-clamped Euler-Bernoulli beam


Let us consider a homogeneous slender beam of length
L, Young’s modulus E, and area moment Iy , whose two Fy1 Fy2
ends are constraint such that My1
w1 w2 My2
q1
w(0) = w1 , w(L) = w2 ,

ψ(0) = w (0) = θ1 , ψ(L) = w′ (L) = θ2 ,
(12.21) q2

where wi and θi are known beam end deflections and rotations, respectively. If no distribute
load acts on the beam but only loads and moments at its ends, then (q) = 0, so that

EIy w′′′′ (x) = 0 ⇒ w(x) = c0 + c1 x + c2 x2 + c3 x3 . (12.22)

Solving the system of equations arising from the four boundary conditions yields the four con-
stant coefficients ci ∈ R and the resulting deflection as
 x 2  x 3
w(x) = w1 +θ1 x+[3(w1 − w2 ) + L(2θ1 + θ2 )] −[2(w1 − w2 ) + L(θ1 + θ2 )] . (12.23)
L L
From (12.18) we obtain the corresponding end loads and moments required to produce the beam
deformation:
6EIy
Q(x) = −EIy w′′′ (x) ⇒ Q(x) = − [2(w1 − w2 ) + L(θ1 + θ2 )] (12.24)
L3

98
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

and
2EIy

 M (0) =
 [3(w1 − w2 ) + L(2θ1 + θ2 )] ,
M (x) = −EIy w′′ (x) ⇒ L2 (12.25)
M (L) = − 2EIy [3(w1 − w2 ) + L(θ1 + 2θ2 )] .

L2
Note that the beam’s right end presents a positive cut while the left end is a negative cut (with
the given coordinate system). The below schematic shows the resulting definition of positive
inner forces and moments at both positive and negative cuts. We thus identify the transverse
forces and moments applied at the two ends as (see the above sketch of the boundary conditions)

Q(0) = −Fz1 , Q(L) = Fz2 , M (0) = −My1 , M (L) = My2 . (12.26)

M(x) M(x)
y N(x)
x N(x)
Q(x) Q(x)
z

Overall, this leads to


 1   
Fz 6 3L −6 3L w1
My1  2EIy  3L 2L2 −3L L2   θ1 
 Fz2  = L3
    . (12.27)
−6 −3L 6 −3L w2 
My2 3L L2 −3L 2L2 θ2

————

Note that the above relation could be used together with the Direct Stiffness Method (introduced
in Section 5.3) to derive the stiffness of a beam element, as shown in Appendix C. Here, we
prefer to pursue the analogous approach discussed in Section 11 for bar elements, viz. to start
from the variational problem and to consistently derive a beam finite element representation.

12.3 Variational formulation of beam theory

Let us revisit the Euler-Bernoulli beam theory discussed above and study its variational struc-
ture with the goal of rigorously deriving beam finite elements. We consider a continuous linear
elastic beam of length L (constant Young’s modulus E and area moment Iy ), loaded by a dis-
tributed transverse load q(x) as well as bending moments My (about the y-axis) and transverse
forces Fz (in the positive z-direction) applied at its two ends, as shown below. The strong form
of this problem (assuming EIy = const.) reads

EIy w,xxxx (x) = q(x) with x ∈ (0, L) (12.28) L


My1 F 1 q My
2

with the boundary conditions (flipped signs at the negative cut) zx


w 2
Fz
−Fz1 = −E Iy w,xxx (0), −My1 = −EIy w,xx (0), z
(12.29)
Fz2 = −EIy w,xxx (L), My2 = −EIy w,xx (L).

99
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Boundary conditions here involve both transverse forces Fz and moments My applied at the
ends of the beam.

The potential energy functional for the variational problem with deflection w(x) is
Z L 
1
I[w] = EIy w,xx (x) − q(x)w(x) dx − Fz1 w(0) − Fz2 w(L) + My1 w,x (0) + My2 w,x (L)
2
0 2
(12.30)
whose first term is the elastic energy density (12.20) integrated over the length of the beam,
and the second term the work done by the distributed transverse load q(x). Furthermore, we
exploited that the beam rotation (for small deflection angles) is θ ≈ w,x , so that the work done
by a torque M becomes M θ = M w,x . The plus-signs in those terms involving bending moments
result from Mya acting against the rotation direction of w,x .

Let us first confirm that (12.30) is indeed the correct functional to use for modeling Euler-
Bernoulli beams; i.e., we must show that minimizing (12.30) is equivalent to solving the strong
form given by (12.28) and (12.29). We see from (12.30) that w(x) must have square-integrable
second derivatives, so its solution space is given by
n o
w ∈ U = w ∈ H 2 (0, L) : w = ŵ, w,x = δ θ̂ on ∂ΩD . (12.31)

Note that for beams both deflections w(x) and deflection angles θ(x) = w,x (x) imply essen-
tial/Dirichlet boundary conditions, as both are kinematic constraints of the beam (consider,
e.g., a cantilever beam that is clamped at one end, where both w = 0 and θ = w,x = 0). We
will confirm this theoretically later – let us accept it for now as a fact18 .

The first variation of (12.30) (which must hold for all admissible variations δw) is derived as
Z L
δI = [EIy w,xx δw,xx − q δw] dx
0 (12.32)
1 2 1 2
− Fz δw(0) − Fz δw(L) + My δw,x (0) + My δw,x (L) = 0 ∀ δw(x) ∈ U0 .
In order to recover the strong form (whose PDE is EIy w,xxxx − q = 0), we integrate the first
term in (12.32) by parts to obtain
Z L Z L
L
δI = − EIy w,xxx δw,x dx + [EIy w,xx δw,x ]0 − q δw dx
0 0 (12.33)
1 2 1 2
− Fz δw(0) − Fz δw(L) + My δw,x (0) + My δw,x (L).
Integrating the first term by parts once again gives
Z L Z L
L L
δI = EIy w,xxxx δw dx − [EIy w,xxx δw]0 + [EIy w,xx δw,x ]0 − q δw dx
0 0 (12.34)
− Fz1 δw(0) − Fz2 δw(L) + My1 δw,x (0) + My2 δw,x (L).
Re-arranging leads to the stationarity condition
Z L
δI = 0 = (EIy w,xxxx − q) δw dx
0
(12.35)
− Fz1 − EIy w,xxx (0) δw(0) − Fz2 + EIy w,xxx (L) δw(L)
   

− −My1 + EIy w,xx (0) δw,x (0) + My2 + EIy w,xx (L) δw,x (L)
   
∀ δw ∈ U0 .
18
Considering the example of a cantilever, clamped beam provides a simple illustration: we know that the
clamped end implies w = 0 (zero deflection) and θ ≈ w,x = 0 (zero deflection angle), so that these two geometric
constraints both imply essential boundary conditions.

100
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

We know that δI must vanish for arbitrary (admissible) variations δw. This imples that, first,

EIy w,xxxx − q = 0 for 0 < x < L. (12.36)

Therefore, we recover the exact governing equation (12.29) of the strong form. Furthermore, the
remaining four terms in (12.35) must also vanish individually (since we can, in principle, choose
the variations at the ends individually, and δI = 0 must hold for all admissible variations). For
example, we must have
 1 
Fz − EIy w,xxx (0) δw(0) = 0, (12.37)

which means that either Fz1 − EIy w,xxx (0) = 0 (i.e., a transverse force Fz1 is imposed at the end
x = 0) or δw(0) = 0 (which implies that w(0) = ŵ1 must be an essential BC). Likewise,

−My1 + EIy w,xx (0) δw,x (0) = 0


 
(12.38)

indicates that either My1 = EIy w,xx (0) (i.e., a bending moment is imposed at x = 0) or δw,x = 0
(which implies that w,x (0) = θ̂1 must be an essential boundary condition). Therefore, the above
form (12.35) of the first variation shows that the potential (12.30) is indeed the correct starting
point for the Euler-Bernoulli beam model: minimizing (12.30) is equivalent to (12.35) for all
admissible variations, which in turn is equivalent to the strong form, (12.28) and boundary
conditions (12.29).

Moreover, we must revise our definition of a Dirichlet boundary condition: not every
imposed derivative of the primary field always implies a Neumann boundary condition. Instead,
we extract the notion of Dirichlet vs. Neumann boundary conditions from the first variation of
a variational problem. As a rule of thumb, essential/Dirichlet BCs impose the function
itself as well as derivatives up to order (p − 1), where p is half the order of the PDE
in the strong form. For example, for our beam the PDE is of fourth-order (p = 2) and, as
a consequence, the (matching-order) weak form (12.32) contains at most second derivatives.
Therefore, essential BCs for a beam include both imposed up to p − 1 = 1st-order derivatives:
deflections w and imposed rotations θ = w,x .

In light of the above discussion, solutions w(x) of a beam bending problem should therefore live
in the space
n o
w ∈ U = w ∈ H 2 (0, L) : w = ŵ on ∂ΩD1 ∧ w,x = θ̂ on ∂ΩD2 , (12.39)

and variations accordingly follow as

δw ∈ U0 = v ∈ H 2 (0, L) : v = 0 on ∂ΩD1 ∧ v,x = 0 on ∂ΩD2 ,



(12.40)

where ∂ΩD1 and ∂ΩD2 are those (possibly overlapping) parts of the boundary on which, respec-
tively, deflections ŵ and rotations θ̂ are being imposed.

Having verified that the potential energy functional governing an Euler-Bernoulli beam is
Z L 
1
I[w] = EIy w,xx (x) − q(x)w(x) dx−Fz1 w(0)−Fz2 w(L)+My1 w,x (0)+My2 w,x (L), (12.41)
2
0 2
let us use the Rayleigh-Ritz method of Section 8 to formulate beam elements – analogous to
the bar elements introduced in Section 5. Following our definitions from Section 7, we identify
in (12.41) the bilinear form
Z L
B[w, v] = EIy w,xx v,xx dx (12.42)
0

101
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

and the linear boundary operator


Z L
L[w] = qw dx + Fz1 w(0) + Fz2 w(L) − My1 w,x (0) − My2 w,x (L), (12.43)
0

so that
1
I[w] = B[w, w] − L[w]. (12.44)
2
This is the variational structure, based on which we will now derive beam finite elements.

12.4 2-node (Euler-Bernoulli) beam element

As shown in Section 9.1, introducing an approximate solution


n
X
wh (x) = wa N a (x) (12.45)
a=1

and seeking I[wh ] → min (with the potential from (12.44)) leads to a linear system of equations
for the n + 1 unknown coefficients U = (w1 , . . . , wn )T . Following (7.8), that linear system

KU = F . (12.46)

has stiffness matrix components


Z L
ab a b a b
K = B[N , N ] = EIy N,xx N,xx dx. (12.47)
0

To identify suitable shape functions N a (x), let us aim for a beam element that is similar to our
formulation of the 2-node bar element. To this end, we consider a 2-node Euler-Bernoulli
beam element, which looks like the 2-node bar element but deforms in bending instead of in
axial stretching. We use a polynomial ansatz, for which the above formulation requires at least
quadratic interpolation (to allow for non-vanishing second derivatives). However, this would
introduce only three unknown coefficients (for two nodes), which is why we deliberately go one
order higher and choose the basis {1, x, x2 , x3 }. This leads to the approximate deflection

weh (x) = c0 + c1 x + c2 x2 + c3 x3 for x ∈ [0, Le ]. (12.48)

Since the four coefficients ci are hard to interpret physically in general, we instead assign to
each node a deflection w and a deflection angle θ = w,x , and we use those as the four unknowns
defining the element interpolation. This has the added benefit that only deflections but also
deflection angles will be continuous across elements (so the beam does not suffer from any
kinks).

Le
x
w
1
e
w2 e

1 2 q2
q1 e
e

102
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The four coefficients ci are thus uniquely defined by the nodal conditions (as shown schemati-
cally)

weh (0) = we1 , weh (Le ) = we2 , h


we,x (0) = θe1 , h
we,x (Le ) = θe2 . (12.49)

In order to clearly associate the shape functions with the nodal dofs, let us alternatively write
the element interpolation as

2
X
weh (x) = [Nea (x)wea + Mea (x)θea ] (12.50)
a=1

with the four shape functions Ne1 and Ne2 (associated with the nodal deflections) as well as Me1
and Me2 (associated with the nodal rotations).

By inserting the interpolation (12.50) into the four conditions (12.49), we obtain four equa-
tions to solve for the unknown shape functions. The resulting shape functions are known as
Hermitian polynomials, which for a beam with x ∈ [0, Le ] evaluate to
2
x 3 x 2
      3
x x
Ne1 (x) =1−3 +2 Ne2 (x)
=3 −2 ,
Le Le Le Le
(12.51)
x 2 x2 x
   
1 2
Me (x) = x 1 − , Me (x) = −1
Le Le Le

We can easily verify that, e.g., Ne1 (0) = 1 while Ne2 (0) = 0, and analogously Ne1 (Le ) = 0 while
Ne2 (Le ) = 1. Further we must have Ne,x 1 (0) = N 1 (L ) = N 2 (0) = N 2 (L ) = 0 as well
e,x e e,x e,x e
as Me (0) = Me (Le ) = Me (0) = Me (Le ) = 0. Note the difference in units between Nei and
1 1 2 2

Mei because they multiply deflections and deflection angles, respectively, in the interpolation
(12.50). Shown below are the four shape functions.

0.15
1.0
1 Ne2 Me1/Le
Ne 0.10
0.8
0.05
0.6 1 1
0.2 0.4 0.6 0.8 1.0 x/Le
0.4
-0.05

0.2 -0.10 2
Me /Le
x/Le -0.15
0.2 0.4 0.6 0.8 1.0

Note that this approximation is only one possible choice; we could also define alternative nodes
and nodal values. However, the above choice ensures that both deflection and angle are contin-
uous across elements (since nodal values are shared by neighboring elements).

Having established the shape functions, we proceed to deriving the resulting element stiffness
matrix, where we follow the analogous procedure as for the bar element in Section 11.1: we first
compute K̃e , the stiffness matrix for a beam element that is horizontal, and then generalize the
formulation to beam elements of arbitrary orientation in 2D and 3D with stiffness matrix Ke .

103
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

T
Let us sort the nodal dofs as Ũe = w̃e1 , θe1 , w̃e2 , θe2 , so the corresponding shape functions (in
the same order) are Ne1 , Me1 , Ne2 and Me2 . The stiffness matrix (12.47) hence becomes
 1 1 1 M1 1 N2 1 M2 
N,xx N,xx N,xx ,xx N,xx ,xx N,xx ,xx
ZLe  1 M1 1 N2 1 M2 
M ,xx ,xx M ,xx ,xx M ,xx ,xx 
[K̃e ] = EIy 
2 N2 2 M 2  dx
0
 N,xx ,xx N,xx ,xx
sym. 2 M2
M,xx ,xx
  (12.52)
6 3Le −6 3Le
2EIy  3L 2L 2 −3L L2e 
e e e
=  ,
L3e  −6 −3Le 6 −3Le 
3Le L2e −3Le 2L2e

where we integrated the shape functions (12.51). Sorting the nodal reactions in the correspond-
ing order results in the element ”force” vector
 T
1 1 2 2
F̃int,e = F̃int,e , Mint,e , F̃int,e , Mint,e , (12.53)

which includes both (transverse) forces Fza and bending moments Mya . The thus-obtained
stiffness matrix hence connects the dofs and nodal reactions via

F̃int,e = K̃e Ũe . (12.54)

Here, forces and moments have the same directions as the conjugate deflections and rotation
angles.

In summary, the nodal dofs (deflections and rotations) and the nodal reactions (forces and
moments) are linearly related via
 
1
F̃int,e
   1
6 3Le −6 3Le w̃e
M 1  2EI 
 int,e  y 3Le 2L2e −3Le L2e   θe1 
 2 =  . (12.55)
 F̃int,e  L3e  −6 −3Le 6 −3Le  w̃e2 
2
Mint,e 3Le L2e −3Le 2L2e θe2
| {z } | {z } | {z }
=F̃int,e =K̃e =Ũe

We have thus derived the stiffness matrix of a 2-node beam element in 1D as


 
6 3Le −6 3Le
2EIy 3Le 2L2e −3Le L2e 
[K̃e ] =   (12.56)
L3e  −6 −3Le 6 −3Le 
3Le L2e −3Le 2L2e

Note that this matrix is in agreement with the one derived in Appendix C via the direct stiffness
method; see Eq. (C.6).

12.5 Two-node beam element in 2D

Let us generalize the beam element discussed above by considering a beam in 2D, which is still
T
oriented horizontal but whose nodal dofs are Ue = u1e,1 , u1e,2 , θ1 , u2e,1 , u2e,2 , θ2 , i.e., each node is
now displacing in two directions and rotating (and we return to indices 1, 2, 3 for the Cartesian
displacement components instead of x, y, z). Since the above beam formulation only considers

104
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

bending, let us superimpose the bar element from Section 11.1, so that the resulting element
can stretch and bend (otherwise, the nodal dofs would not be independent as the length of the
bar would have to remain unchanged without the ability of the element to stretch axially).
T
For such a horizontal 2-node beam with nodal dofs Ũe = ũ1e , w̃e1 , θ1 , ũ2e , w̃e2 , θ2 , w̃ei and θ̃i
describe the beam deflection, while ũ2e − ũ1e defines the change in length of the beam element in
its axial direction. The resulting stiffness matrix (in this horizontal configuration) is obtained
by superposing the stiffness matrices derived independently for the bar and beam elements (and
connecting the corresponding degrees of freedom). This yields

1 0 0 −1 0 0
   
0 0 0 0 0 0
0 6 3Le 0 −6 3Le   0 0 0 0 0 0
2 2
   
2EIy 0 3Le 2L e 0 −3Le Le  + EA  0 0 0 0 0 0 (12.57)
 
[K̃e ] = 
L3e 
0 0 0 0 0 0   Le −1 0 0 1 0 0


0 −6 −3Le 0 6 −3Le   0 0 0 0 0 0
0 3Le L2e 0 −3Le 2L2e 0 0 0 0 0 0

Note that we must carefully associate the stiffness matrix components with the correct nodal
dofs, as done above for the bending and stretching contributions.

Now we can apply a coordinate transformation to generalize the above to beams with arbitrary
orientation in 2D, with φe denoting the angle of the beam element’s reference orientation against
the horizontal axis (see the schematic below where we flipped the directions of both deflections
and rotation angles for consistency), as defined in (5.14):
 1 
ũ1e ue,1
  
cos φe sin φe 0
w̃e1  − sin φe cos φe 0  u1e,2 
 1   1 
θ   0 0 1  θ 
 =
 2 , (12.58)
 
 ũ2   cos φe sin φe 0
 e   ue,1 
w̃2   − sin φe cos φe 0 u2e,2 
e
2
θ 0 0 1 θ2
| {z }
=R(φe )

so that, analogous to the 2-node bar,


 
cos φe sin φe 0
− sin φe cos φe 0 
 
 0 0 1 
Ũe = R(φe )Ue with [R(φe )] = 
  (12.59)
 cos φe sin φe 0 

 − sin φe cos φe 0
0 0 1

By using the same argument as for the 2-node bar element, the 2
u u~2
w~2
e,2
stiffness matrix of the generally oriented 2-node beam element is e e

2
thus obtained as u e,1
L q
2
w~
1
Ke = RT (φe )K̃e R(φe ) (12.60)
1
e u u~1
e,2
e
e

q
1
with R(φe ) and K̃e from (12.59) and (12.57), respectively. e u1 e,1

105
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

12.6 Extension to 3D

Of course, the above can also be extended to beams in 3D, where an appropriate transforma-
tion matrix R based on direction cosines is introduced to account for the beam’s orientation
in 3D space. As an added complication in 3D, beams can also undergo torsion. In this case,
every node of the beam has six degrees of freedom: the three displacement components (u, v, w)
plus two rotational angles (θy , θz ) about the two bending axes perpendicular to the beam’s axis
plus one torsional angle θx about the beam’s axis.

v u qx
x
w
y qy
z qz

Since we are concerned with linear elasticity, the principle of superposition still holds, so that
one can superimpose the stiffness matrices for bending, stretching, and torsion in 3D (analogous
to the 2D superposition of bending and stretching in (12.57)). This leads to the overall stiffness
matrix of a horizontal beam in 3D as
 EA 
Le
 0 12EIz
 L3e
sym. 

12EIy
 0 0
 
L3e

 GIp

 0 0 0 
 Le 
6EIy 4EIy
 0 0 − 0
 
L2e Le

 4EIy

 0 6EIz
L2e
0 0 0 Le

[K̃e ] =  EA
 
− Le EA
0 0 0 0 0

Le

− 12EI − 6EI 12EIz
 
 0 z
0 0 0 z
0 
 L3 e L2 e L3e 
12EIy 6EIy 12EIy
 0 0 − 0 0 0 0
 
L3e L2e L3e 
GIp GIp
 
 0
 0 0 − Le 0 0 0 0 0 Le


6EIy 2EIy 6EIy 4EIy
 0 0 − 0 0 0 0 0
 
L2e Le L2e Le 
6EIz 2EIz
0 L2e
0 0 0 Le 0 − 6EI
L2
z
0 0 0 4EIz
Le
e

with shear modulus G and the polar moment of inertia Ip . The actual stiffness matrix in 3D
follows from a rotation akin to (12.60) with the rotation matrix appropriately modified for
the 3D orientation of the beam (typically described by the three direction cosines of the beam
orientation).

12.7 Timoshenko beam element

Without derivation, let us mention that the above procedure can analogously be applied to
Timoshenko beam theory, which results in the definition of a 2-node Timoshenko beam
element. Starting point is the variational formulation based on Timoshenko beam theory and
a subsequent approximation of both the deflection w(x) and rotation θ(x) by polynomial shape
functions. After the analogous procedure, one arrives at the stiffness matrix of the 2-node

106
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Timoshenko beam element in 1D as


 
12 6Le −12 6Le
EIy  6Le (4 + ϕ)L2e −6Le (2 − ϕ)L2e  12EIy
[K̃e ] = 3   with ϕ= . (12.61)
Le (1 + ϕ) −12 −6Le 12 −6Le  κGAL2e
6Le (2 − ϕ)L2e −6Le (4 + ϕ)L2e

ϕ represents a dimensionless ratio of bending vs. shear stiffness of the beam (the “shearability” of
the beam). In the limit of a beam that is rigid with respect to shearing (ϕ → 0), the above stiff-
ness matrix recovers the Euler-Bernoulli stiffness matrix (12.56). (Recall that Euler-Bernoulli
beam theory assumed shear rigidity, resulting in cross-sections remaining perpendicular to the
beam’s center line.) This is illustrated in the below example of a cantilever beam loaded by a
constant tip force, comparing the deflection line w(x) as obtained from Euler-Bernoulli theory
as well as from Timoshenko theory for different values of the shearable ϕ. Euler-Bernoulli works
best for slender (typically w/l ≤ 10) beams, while Timoshenko applies also for moderately thick
beams.

w(x) F
l f=4

Timoshenko
0.6

0.5 w(x) f=6

0.4
f=12

0.3
Euler-Bernoulli
0.2

0.1

0.2 0.4 0.6 0.8 1.0


x/l

Note that, even though the assumptions behind Euler-Bernoulli and Timoshenko beam theory
as well as the resulting systems of equations are different, they have the same general structure;
i.e., both solve (in 1D)

F̃int,e = K̃e Ũe (12.62)

with the only difference being the definition of the stiffness matrix K̃e : (12.56) vs. (12.61).
As for the Euler-Bernoulli beam element, the Timoshenko beam element can be formulated
analogously in 2D and 3D (resulting in appropriately more complex stiffness matrices).

12.8 Bar vs. beam vs. solid elements

Having introduced both two-node bar and beam elements, let us conclude by highlighting a
key difference between these two types of elements, which stem from the different deformation
modes captured by each. Bars only undergo axial stretching and nodes are free to rotate, so
that bar networks represented hinged connections (bars carry no transverse forces nor bending
moments). Beam elements, irrespective of Euler-Bernoulli or Timoshenko, can support both
axial and bending deformation (and torsion in 3D), so that beam networks are rigidly connected
(or welded) at nodes, as angles between beams at nodal junctions remain constant. (All beams

107
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

connected to a node share the same nodal degrees of freedom at that node, which automatically
implies that each beam must be undergoing the same rotation at that note, hence implying that
engles between beams cannot change.) The differences between a bar network (often referred
to as truss) and a beam network (also known as frame) is illustrated schematically below.

F F

network of bars network of beams


(truss) (frame)

Finally, keep in mind that both bars and beams are simplifications of reality, as they treat
structural members as simplified 1D rods. With increasing rod thickness (compared to its
length), the beam assumptions fail to apply, which is why a full representation of beams as
solid objects may become inevitable (and we will discuss such elements in 2D and 3D next). It
is essential to choose the right element type based on the scenario to be simulated. The below
graphic sketches a possible decision tree.

which element
to use?

do you care about yes


stresses at junctions? solid elements
no

hinged yes bar


connections? elements
no

l
how slender thick
w
are rods?
slender moderately
(w/L<10) slender
Euler-Bernoulli Timoshenko
beam elements beam elements

108
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

13 The general mechanical variational problem for 2D/3D solids

After having derived the finite element formulation of bar and beam elements, we will move
from those structural elements to solid elements – no longer limited to slender structures but
applicable to general 2D and 3D solid bodies. To this end, let us analyze the general mechanical
variational problem and start with the simplest problem in 2D and 3D: statics. The primary
added complexity, compared to the 1D bar problems discussed so far, lies in the displacement
field u : Ω → Rd now being a d-dimensional vector field in d dimensions.

13.1 Strong, weak form, and variational structure

The strong form of the general mechanical problem is given by the (static) balance of linear
momentum along with Dirichlet and Neumann boundary conditions:

σij,j + ρ bi = 0 in Ω,
ui = ûi on ∂ΩD , (13.1)
σij nj = t̂ on ∂ΩN

Note that we re-encounter the general structure of the strong form already introduced in
Eq. (8.1), here extended to higher dimensions. In the special case of linear elasticity (using σij =
Cijkl εkl = Cijkl uk,l ), we notice that linear momentum balance reduces to (Cijkl uk,l ),j + ρ bi = 0,
so that classical solutions must satisfy ui ∈ C 2 (Ω) (as already seen for 1D bars).

Let us show that the strong form (13.1) has a variational structure. We start from the total
potential energy (total stored energy minus work done by external forces), which in higher
dimensions becomes
Z Z Z 
I[u] = W (ε) dV − ρb · u dV + t̂ · u dS , (13.2)
| Ω {z } |

{z
∂ΩN
}
internal stored energy work by external forces

where we assume that ρb and t̂ do not depend on deformation, and the strain energy density is
defined as
∂W
W = W (ε) such that σij = . (13.3)
∂εij

For the special case of linear elasticity, we have W (ε) = 12 εij Cijkl εkl = 12 ui,j Cijkl uk,l , so that
the energy functional (13.2) requires ui ∈ U = {ui ∈ H 1 (Ω) : ui = ûi on ∂ΩD } for each
displacement component, in close analogy to the 1D case.

To show the equivalence between solving (13.1) and minimizing (13.2), we first compute the
variation of (13.2) as
Z Z Z
∂W 1
δI[u] = (δui,j + δuj,i ) dV − ρbi δui dV − t̂i δui dS
∂εij 2
ZΩ Z Ω
Z ∂ΩN
(13.4)
= σij δui,j dV − ρbi δui dV − t̂i δui dS = 0 ∀ δu ∈ U0 ,
Ω Ω ∂ΩN

where we used (13.3) and σij = σji (by angular momentum balance). Notice that (13.4) is
equivalent to the principle of virtual work (8.21), if we replace δui by u∗i , which confirms that

109
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

(as in 1D) the principle of virtual work is a re-statement of the stationarity condition for
minimizing the total potential energy.

Application of the divergence theorem to the first integral in (13.4) gives


Z Z
δI[u] = 0 = (σij nj − t̂i )δui dS − (σij,j + ρbi )δui dV ∀ δu ∈ U0 , (13.5)
∂ΩN Ω

which must hold for all (admissible) variations δu ∈ U0 , so that the two terms in parentheses
must vanish. Ergo, (13.5) is equivalent to the strong form (13.1), which proves that minimizing
(13.2) is indeed equivalent to solving (13.1).

From inspecting the first variation in (13.4), we may define the weak form as

G(u, v) = A(u, v) − L(v) = 0 ∀ v ∈ U0 (13.6)

with the two operators


Z Z Z
A[u, v] = σij vi,j dV and L[v] = ρbi vi dV + t̂i vi dS (13.7)
Ω Ω ∂ΩN

Note that the dependence of A on u is not directly obvious, but the stresses depend through
the strains on the displacement field, i.e., σij = σij (ε) and εij = 12 (ui,j + uj,i ). Without further
knowledge about the stress-strain relation, A(·, ·) is in general not a bilinear operator, while
L(·) is a linear operator.

13.2 Discrete problem

Let us apply the above general formulation of the mechanical boundary value problem to a
numerically discretized problem, which forms the basis of the finite element method. As before,
we assume that the displacement field u is approximated by
n
X
uh (x) = ua N a (x), (13.8)
a=1

where ua ∈ Rd is the d-dimensional nodal displacement vector of node a, and N a (x) is the
associated shape function. Consequently, the strain components εij are approximated by
n
1 h  1X
εhij h
 a a
ui N,j (x) + uaj N,ia (x) .

= ui,j + uj,i = (13.9)
2 2
a=1

For computational purposes, we should revisit our notation here. We concatenate all nodal
displacement vectors into one long global displacement vector U ∈ Rd·n , whose components in
3D become
 1
u1
 u12 
 1  1
u u 
 3
 ..   .. 
[U ] =  .  =  .  . (13.10)
n
 n
u u1 
 
un 
2
un3

110
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Be careful when using 0-indexing (as, e.g., in Python, where vector components start with
index 0): here, we must consider node indices a = 0, . . . , n − 1 and displacement components
i = 0, . . . , d − 1 in d dimensions, so that

uai is the (d · a + i)th component of vector U in d dimensions. (13.11)

Here and in the following, we use super- and subscripts, since our unknown coefficients are
vector-valued. A super script a refers to the a-th vector ua , while a subscript i refers to the i-th
component ui of a vector. (Remember how we said in Section 5 that it would become important
later to use superscripts to indicate nodes? Here it does!)

For computational convenience, let us expand (13.8) as (here, written in 3D)


" n #
X
h a a u11
 
[u (x)] = u N (x)
a=1  u12 
 1
 1 u 
N 2 (x) . . . N n (x)

N (x) 0 0 0 0 0 0  3
= 0 N 1 (x) 0 0 N 2 (x) 0 ... 0 N n (x) 0   ... 
 
0 0 N 1 (x) 0 0 N 2 (x) . . . 0 0 N n (x) un 
 
} 1
| {z un 
=[N (x)] 2
un3
| {z }
=[U ]
or, in short,

uh (x) = N (x)U (13.12)

with the shape function matrix N ∈ Rd×3n defined as above.

To arrive at a similar relation for the strains, let us exploit Voigt notation (see Section 1.4),
which condenses the strain tensor into a strain vector, containing only its unique components
(since ε is symmetric, it contains only six independent components in 3D, or 3 in 2D). This
reduces data storage (requiring only six instead of nine components in 3D), and it works with
vectors instead of matrices (thus avoiding the use of fourth-order tensors). Writing the six
independent 3D strain components from (13.9) in Voigt notation leads to the strain vector
 h   Pn 
ε11 a=1 ua1 N,1a
Pn a a
 εh22    a=1 u2 N,2


h i  εh  
  P n a a
u N 
ε̃h =  33  = P a=1 3 ,3 (13.13)

2εh   n a N a + ua N a )
(u

 23  Pna=1 2 ,3 3 ,2 
2εh   a a a a
a=1 (u1 N,3 + u3 N,1 )

13
n
2εh12 a a a a
P
a=1 (u1 N,2 + u2 N,1 )

or in short with the so-called B-matrix B ∈ R6×3n in 3D (and analogously B ∈ R3×2n in 2D)
 
N,11 0 0 N,12 0 0 . . . N,1n 0 0
 0 N1 0 2
0 N,2 0 . . . 0 N,2n 0 
 ,2 
 0 0 N 1 0 0 N,32 ... 0 0 N,3n 
ε̃h (x) = B(x)U with B(x) =  ,3
 
 0 N,31 N,21 0 N,32 N,22 . . . 0 N,3n N,2n 

 1
N,3 0 N,1 N,32
1 0 N,12 . . . N,3n 0 N,1n 

N,21 N,11 0 N,22 N,12 0 . . . N,2n N,1n 0
(13.14)

111
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

With the above relations, let us now reformulate the weak form in the finite element scenario.
We start from the total energy functional, whose approximate version takes the form
Z Z Z
h h h
I[u ] = W (ε̃ ) dV − ρb · u dV − t̂ · uh dS
Ω Ω ∂ΩN
Z Z Z
= W (ε̃h ) dV − ρb · N U dV − t̂ · N U dS (13.15)
Ω Ω ∂ΩN
Z Z Z 
= W (ε̃h ) dV − N T ρb dV + N T t̂ dS U .
Ω Ω ∂ΩN

Minimization of the above energy with respect to the unknown nodal vector U results in

∂I[uh ] ∂W ∂ ε̃h
Z Z Z 
T T
0= = ·
h ∂U
dV − N ρb dV + N t̂ dS . (13.16)
∂U Ω ∂ ε̃ Ω ∂ΩN

Exploiting that ε̃h = BU as well as ∂W/∂ ε̃ = σ̃ with the stress vector σ̃ = σ̃(ε̃) in Voigt
notation (recall Section 1.4) turns (13.16) into
Z Z Z 
h T T
0= σ̃(ε̃ ) · B dV − N ρb dV + N t̂ dS (13.17)
Ω Ω ∂ΩN

or, after rearrangement,


Z Z Z
T h T
B σ̃(ε̃ ) dV = N ρb dV + N T t̂ dS . (13.18)
Ω Ω ∂ΩN
| {z } | {z }
=[Fint ] =[Fext ]

which is nothing but linear momentum balance in the finite element setting:

Fint (U ) − Fext = 0 (13.19)

with the global internal and external force vectors Fint , Fext ∈ Rd·n
Z Z Z
Fint = B T σ̃(ε̃h ) dV and Fext = N T ρb dV + N T t̂ dS (13.20)
Ω Ω ∂ΩN

Subscripts int vs. ext indicate that those vectors stem from, respectively, internal stresses and
strains vs. externally applied loads. Note that (13.19) is in general not a linear system of
equations, since we have not yet assumed a specific constitutive law such as linear elasticity.

13.3 Special case: linear elasticity

In the special case of linear elasticity, stresses and strains are linearly related, which in Voigt
notation implies that (again written in 3D)

σ̃ = E ε̃ with σ̃ = (σ11 , σ22 , σ33 , σ23 , σ13 , σ12 )T , (13.21)

where E denotes the elastic stiffness matrix, whose components are deduced from C and follow
from the definitions of stresses and strains in Voigt notation. As discussed in Section 1.4, for

112
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

an isotropic linear elastic material characterized by Young’s modulus E and Poisson’s ratio ν,
the E-matrix in 3D reads
1−ν
 
ν ν 0 0 0
 ν
 1−ν ν 0 0 0 
E  ν ν 1−ν 0 0 0 
[E3D ] =  1−2ν
. (13.22)
 0
(1 + ν)(1 − 2ν)  0 0 2 0 0 
 0 1−2ν
0 0 0 2 0 
1−2ν
0 0 0 0 0 2

The 2D version depends on the exact scenario, as one must differentiate between states of plane
stress and plane strain (see also the review in Section 1.4):
 
1 ν 0
E 
[Eplane stress ] = ν 1 0 
1 − ν2 1−ν
0 0
2  (13.23)
1−ν ν 0
E
[Eplane strain ] =  ν 1−ν 0 .
(1 + ν)(1 − 2ν) 1−2ν
0 0 2

Analogous matrices can be derived for other elastic constitutive laws (e.g., for general linear
elastic anisotropic media).

Combining Eqs. (13.14) and (13.21) shows that, in linear elasticity, the stress vector becomes

σ̃ = EBU (13.24)

and the internal force vector from (13.20) simplifies to


Z Z Z
T h T
Fint = B σ̃(ε̃ ) dV = B EBU dV = B T EB dV U . (13.25)
Ω Ω
| Ω {z }
=[K]

This confirms that, as in the 1D case, the assumption of linear elasticity makes the internal
forces depend linearly on the nodal displacement vector and, moreover, allows us to define the
linear elastic stiffness matrix:
Z
Fint = K U with K= B T EB dV (13.26)

The stored internal energy in case of linear elasticity simplifies to


Z Z Z Z
int 1 1 1
I = W dV = σ̃ · ε̃ dV = ε̃ · E ε̃ dV = U · B T EB dV U . (13.27)
Ω Ω 2 Ω 2 2 Ω
| {z }
=K

so that, as in the case of elastic bars (see Section 5.7), for linear elasticity we conclude

1 ∂I int ∂F int
I int = U · K U ⇒ F int = = KU , K= = const. (13.28)
2 ∂U ∂U
We close by noting that the stiffness matrix K depends only on B and E. For a specific material
and scenario, E is known (see the examples for linear elasticity given above). B contains only
shape function derivatives, so that – once shape functions N 1 , . . . , N n have been chosen – B
can be computed and is known. What is left to be done is finding a suitable definition of FE
shape functions in higher dimensions.

113
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

14 Assembly

Irrespective of the particular finite element type that is being used to solve a boundary value
problem, its solution requires the assembly of global vectors and matrices from element vectors
and matrices – as already discussed in the context of bar and beam elements (see Sections 5.5).
The same applies here in higher dimensions. When computing, e.g., the internal energy of a
body discretized into ne non-overlapping elements, we may exploit that
Z Xne Z ne
X
int h h
I = W (ε̃ ) dV = W (ε̃ ) dV = Ie , (14.1)
Ω e=1 Ωe e=1

i.e., the total energy I int


is the sum over all element energies Ie in a mesh of ne elements. When
computing the global force vectors and incremental stiffness matrices, the situation is more
complex, which is why for notational purposes one often introduces an assembly operator A
such that
ne ne
Fint = A Fint,e , T = A Te , (14.2)
e=1 e=1

which loops over all ne elements e and adds their respective contributions to the global quanti-
ties. This requires careful book-keeping to keep track of the correspondence between local and
global node numbering, the so-called local-to-global map (and it is the reason elements must
have “knowledge” of their node IDs). Similarly, the inverse operator extracts local element
quantities from the global vector, e.g.,
Ue = A−1 (U ), Fint,e = A−1 (Fint ). (14.3)
e e

For example, consider a 2D problem using 2-node bar elements. If an element connecting nodes
1
1 and 3 computes the nodal force vectors Fint,e 3 , then those are to be added onto the
and Fint,e
global force vector as
 1

. . . + Fint,e,1
. . . + F 1 
 int,e,2 

 · 

·
 
Fint =  (14.4)
 
3
. . . + Fint,e,1 

 3
. . . + Fint,e,2


 
 · 
·
Analogously, if the element connecting nodes 1 and 3 computes a stiffness matrix Ke13 , then its
components must be added onto the global tangent stiffness matrix as
 13 . . . + K 13 · · . . . + K 13 . . . + K 13 · ·
. . . + K11 12 13 14
. . . + K2113 . . . + K 13 · · . . . + K 13 . . . + K 13 · ·
 22 23 24 

 · · · · · · · ·

T = · · · · · · · ·
 (14.5)
. . . + K 13 . . . + K 13 · · . . . + K 13 . . . + K 13 · ·
 31 32 33 34 
. . . + K 13 . . . + K 13 · · . . . + K 13 . . . + K 13 · ·
41 42 43 44
· · · · · · · ·
For practical purposes, it is helpful to recall that vector entry Uia (where a = 0, . . . , n − 1 is the
node number, and i = 0, . . . , d − 1 refers to the coordinate) is located at position a · d + i in the
assembled global vector U h (using Python’s 0-indexing).

114
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

15 Shape functions in higher dimensions

We previously derived the general finite element formulation for the mechanical boundary value
problem, but we must still define suitable shape functions. In 1D structural elements such as
bars and beams we could efficiently use low-order polynomial (Lagrangian) shape functions, but
their definition in two and three dimensions can become quite cumbersome. Therefore, we here
introduce a concept known as parametric mappings.

15.1 Parametric mappings

So far we have used polynomial shape functions for element interpolations in 1D, and we saw
that the shape functions depend on the element size ∆xe or Le . In higher dimensions it would
be quite cumbersome to define polynomial shape functions on the actual shape of the element,
thus depending on the nodal locations and the geometry of the element in space, unless one
uses regular structured meshes (e.g, grids where all elements have the same shape). In general,
all elements have different shapes and it is beneficial to define shape functions independent of
the specific geometric shape of an element.

A possible remedy of this problem is the definition of all element shape functions on a well-
defined and geometrically simple reference element, along with a mapping that relates shape
functions in the reference configuration to those in real, physical space.

To this end, we introduce a (bijective) mapping ϕ from a reference domain (with reference
coordinates ξ = {ξ, η, ζ}) onto the physical domain (with coordinates x = {x1 , x2 , x3 }) of an
element e:

x = ϕ(ξ), i.e. in 3D for i = 1, 2, 3: xi = xi (ξ, η, ζ). (15.1)

A schematic of the parametric mapping concept is shown below in 2D for a four-node element
in 2D, which we will introduce soon. The mapping links the element in its reference space,
described by coordinates (ξ, η), to the element’s representation in real, physical space, described
by Cartesian coordinates (x1 , x2 ) in 2D. We still need to define a link between (ξ, η) and (x1 , x2 ).

x2 h
4
(x ,x )
e,1
4
e,2
(-1,1) (1,1)
3 3
4 (x ,x ) e,1 e,2
4 3

3
mapping x
We
1

(x1 ,x1 )
e,1 e,2
2
2 2
1 2
(x ,x )
e,1 e,2 (-1,-1) (1,-1)
x1
element in physical space element in its reference space

For simplicity, we reuse the same concepts that we previously introduced for interpolating the

115
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

displacement field, viz.


n
X
so far we used: uhe = Nei (x)uie
i=1
n m (15.2)
X X
now we use: uhe = Nei (ξ)uie and x= Ñei (ξ)xie
i=1 i=1

We here interpolate the positions xi (in the real geometric configuration of the element, which
we call the physical space) of the n positions of the element nodes in order to assign a unique
position x(ξ) to every point with coordinates ξ in the reference configuration. As a consequence,
the point which lies at the center of the element (e.g., at ξ = η = 0 in the above 2D example)
will be mapped onto the center of the element in physical space. A point which lies on one of
the edges of the element will be mapped onto the respective edge of the element. Overall, to
each point ξ in the reference space we assign a unique point x in the real physical space, and
vice-versa. The mapping between nodes in the reference space and in real space is illustrated
schematically below.

h x2
(-1,1) (1,1) 4
(x ,x )
e,1
4
e,2

4 + 3 (x ,x )
3 3
mapping
4
+ e,1 e,2

+ 3
x
+
+ +
+ 1
+
1 2 (x ,x1 )
1
e,1 e,2
2
(-1,-1) (1,-1) (x2 ,x2 )
e,1 e,2

x1
element in its reference space element in physical space

Note that the distinction between “reference” and “physical ” space here has nothing to do with
undeformed vs. deformed configurations. So far, we have not discussed what happens with
these elements when they deform. The key idea here is to define as the “physical ” space the
real (undeformed ) configuration of an element in its mesh in its actual geometric shape. By
contrast, the element in the “reference” space is a fictitious element of idealized geometry, which
is introduced to easily define shape functions. Nothing more or less!

When we introduce interpolations of the type (15.2), we must choose the shape functions Nei
(to interpolate the displacements, as before) and Ñei (to interpolate the positions, introduced
now). Here, we have three general options:

(i) An isoparametric mapping chooses the same number of shape functions for both map-
pings (n = m) and the same shape functions (Nei = Ñei ).
(ii) A subparametric mapping chooses n > m, which implies a lower-order interpolation
of positions than of displacements.
(iii) A superparametric mapping chooses n < m, which implies a higher-order interpolation
of positions than of displacements.

The strategy is now to define Nei (ξ) in the reference configuration, where the element shape
allows for the simple definition of shape functions (and the calculation of their derivatives).

116
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

15.2 Shape function derivatives for the isoparametric mapping

The mappings introduced above, e.g., the interpolation (here written in 2D with reference
coordinates (ξ, η) for simplicity)
n
X
x(ξ, η) = Nea (ξ, η)xae . (15.3)
a=1

provide a link between the reference coordinates ξ and the physical nodal positions x. Given
the nodal locations x1e and x2e in 2D, the above mapping uniquely assigns a point x in real
space to any reference coordinates ξ = (ξ, η). Of course, we may exploit the same interpolation
for any nodal degrees of freedom (thus using an isoparametric mapping), so for any scalar field
uh we write
n
X
h
u (ξ, η) = Nea (ξ, η)uae . (15.4)
a=1

A difficulty arises though when using this interpolation in the finite element context because we
need to compute shape function derivatives N,x a in real space (needed, e.g,. for the calculation
i
of Ke or Fint ). It is easy to compute N,ξa and N,ηa but that is not what we need. (15.3) defines
(x1 , x2 ) in terms of (ξ, η) but not the other way around. Of course, one could first try to
invert this mapping and then take derivatives. Yet, this is cumbersome and, as we will see,
unnecessary.

Instead of inverting (15.3), we will in the following often use a mathematical shortcut known
as the inverse function theorem, which is not specific to any element type but can be
exploited in general. To derive this relation, we begin by formally writing the mapping in 2D
as x1 = x1 (ξ, η) and x2 = x2 (ξ, η) as well as the field of interest (e.g., the displacements) as
uh = uh (x1 , x2 ). Now, the chain rule gives
 h   h
u,x1 x1,ξ + uh,x2 x2,ξ
   h   h 
u,ξ x1,ξ x2,ξ u,x1 u,x1
= h h = h = [J ] (15.5)
h
u,η u,x1 x1,η + u,x2 x2,η x1,η x2,η u,x2 uh,x2
| {z }
=[J]

with the Jacobian19 matrix


 
x1,ξ x2,ξ
[J ] = (15.6)
x1,η x2,η

and its determinant


∂x1 ∂x2 ∂x1 ∂x2
J = det J = − . (15.7)
∂ξ ∂η ∂η ∂ξ

Note that, for the isoparametric mapping to be invertible we need to have J > 0 (which is
analogous to the deformation mapping F = ∇φ and its determinant det F = J in continuum
mechanics). This implies in practice that elements must not be distorted (inverted or non-
convex, as we will discuss later for the specific element types).
19
The Jacobian in mathematics is usually defined as the transpose of J defined in (15.6). In the FE context,
our definition is chosen for convenience, so that we do not need a transpose in (15.12).

117
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Relation (15.5) is important, because it links derivatives uh,ξ to derivatives uh,x . The latter are
the ones we need in practice, while the former ones are easy to calculate, since (15.4) implies
n
X n
X
h a
u (ξ, η),ξ = Ne,ξ (ξ, η)uae , h
u (ξ, η),η = a
Ne,η (ξ, η)uae . (15.8)
a=1 a=1
Note that, since we choose a simple reference geometry to define shape functions Nea , derivatives
a and N a are typically simple to calculate (as we will see for specific element types).
Ne,ξ e,η

By substituting the isoparametric mapping (15.3) for x1 and x2 into (15.6), we obtain the
Jacobian of the element as20
 n n

X X
a a a a
   Ne,ξ x1,e Ne,ξ x2,e 
x1,ξ x2,ξ 
a=1 a=1

[Je ] = = n n
, Je = det Je (15.9)
x1,η x2,η  X
a a
X
a a 

 N x N x
e,η 1,e e,η 2,e
a=1 a=1

Note that all ingredients in (15.9) are known, once an element is defined: its nodal locations in
real space (in the undeformed configuration) xi,e as well as the shape functions Nea defined in
the reference configuration.

This solves our original problem, as we may now use (15.5) to switch between derivatives in the
reference configuration and in real space. As discussed, we must have Je > 0. Thus, we can
invert Je and turn (15.5) into
 n 
X
a a
 h   h   Ne,ξ ue 
u,x1 −1 u,ξ −1  a=1
 
h = [Je ] h = [Je ] X n

u,x2 u,η a a

 Ne,η ue
a=1 (15.10)
 1
 1 n
 ue
−1 Ne,ξ · · · Ne,ξ  .. 
= [Je ] 1 n  . .
Ne,η · · · Ne,η
une

Note that, if we had instead defined our shape functions in real space, so Nea = Nea (x1 , x2 ), then
we would have had
 n 
X
a
ua  u1e
 
 h   Ne,x1 e   1 n
u,x1  = Ne,x1 · · · Ne,x1  . 
 a=1 
h = n 1 n  ..  . (15.11)
u,x2  X
a

a 
Ne,x2 · · · Ne,x2
 Ne,x2 ue uen

a=1

But, of course, both (15.10) and (15.11) are valid representations. Therefore, we may equate
these two relations. By comparing the coefficients of uae in (15.10) and (15.11) (e.g., choosing
one non-zero uae and all others zero), we realize that
 a   a 
Ne,x1 −1 Ne,ξ
a = [J e ] a or more generally: ∇x Nea = Je−1 ∇ξ Nea (15.12)
Ne,x2
Ne,η

20
We here unfortunately face a notational dilemma: we need index e to indicate element quantities, but we
also need indices 1, 2, . . . to denote components of vectors – and we also need comma indices ,i to indicate partial
derivatives. In order to not confuse these different types of indices, we will write x1,e for the x1 -component of
a
xe , which does not imply a partial derivative, and Ne,ξ for the derivative of Nea with respect to ξ. We will never
use letter e for a partial derivative but only to indicate element quantities.

118
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

where for brevity we summarized the reference coordinates into ξ = (ξ, η)T and ∇ξ (·) = (·,ξ , ·,η ),
while ∇x = (·,x1 , ·,x2 ). Relation (15.12) is generally applicable for any isoparametric mapping
and will be valuable in the following sections, when we introduce particular finite element types.

119
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

16 Simplicial elements

The probably simplest type of a finite element are so-called simplicial elements (and we have
already seen one). These are characterized by having the minimum number of nodes possible in
a given dimension. Mathematically speaking, a simplex of order k is a k-dimensional polytope
which is the convex hull of its k + 1 vertices.

In plain English, a simplex in d dimensions is a convex body made up of d + 1 nodes:

• in 1D: a 2-node bar, whose interpolation basis is {1, x}

• in 2D: a 3-node triangle (T3), whose interpolation basis is {1, x1 , x2 }

• in 3D: a 4-node tetrahedron (T4), whose interpolation basis is {1, x1 , x2 , x3 }

Overall, this shows that the element interpolation in each case is of degree q = 1 (linear), and
the space of shape functions is complete up to linear order for a simplicial element in every
dimension.

Although one could, in principle, derive the shape functions for any arbitrary element geometry,
this turns out to be cumbersome in general. Consider, e.g., a simplicial element in 2D (a triangle)
whose three nodes are equipped with some nodal dofs u1 , u2 and u3 . One could now write
n
X
h
u (x) = ua N a (x), (16.1)
a=1

and enforce the conditions uh (xa ) = ua to solve the resulting system of equations for the
shape functions N a (x), as done at the beginning of Section 11.1. However, such an approach
is inconvenient as the resulting shape functions will inevitably depend on the nodal locations
xa in a complex manner and therefore vary from element to element based on the element
location and geometry. As a remedy, one resorts to the concept of isoparametric mappings
(see Section 15) to introduce general shape functions whose definition does not depend on the
element geometry. For simplices, one commonly introduces so-called barycentric coordinates.

16.1 Linear Triangle (T3)

Consider the triangular element shown on the right in its refer-


ence configuration, with nodes 1, 2, and 3 located at, respectively, h
(ξ, η) = (1, 0), (0, 1), and (0, 0). Note that, by finite element con-
1+
vention, we always number the local nodes of an element in 2D 2
counter-clockwise. The shape functions in 2D must have the ba-
sis {1, ξ, η}. It is easy to verify that the following shape functions
satisfy the requirement of being 1 and 0 at the nodes:

N1 (ξ, η) = ξ, N2 (ξ, η) = η, N3 (ξ, η) = 1 − ξ − η (16.2) 3 1+


0 1 x
which also satisfy N1 +N2 +N3 = 1. Note that these shape functions
are linear in both ξ and η.
Note that there is an alternative way to arrive at the same shape functions for a triangular
element, which has a different geometric interpretation.

120
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

To this end, we may define so-called barycentric coordinates

Aa (x)
3
lea (x) = e for a = 1, 2, 3 (16.3) 2
Ae A1
where Ae = |Ωe | is the total area of the triangular element, and Aae A2 x A3
is the sub-area opposite from node a when splitting the triangle into
three parts by connecting the nodes to point x (see the schematic
on the right). Consequently, we have A1e + A2e + A3e = Ae . For a
general element in 2D, we have two ways to describe the location of
a point in the triangular element: we either use its coordinate x or
the three barycentric coordinates lea to describe the point, and there 1
is a unique relation (a mapping) between (x1 , x2 ) ↔ (la1 , la2 , la3 ).
In general, we need only two coordinates to describe a point in 2D space (e.g., ξ and η, as intro-
duced above), and here we notice that, indeed, we need only two of the barycentric coordinates
to uniquely describe a point in space (if two of the lea are known, then the third is known as
well since le1 + le2 + le3 = 1). For example, we may define

ξ = le1 and η = le2 (16.4)

as the two coordinates (ξ, η) to uniquely describe points within the triangle. Furthermore,
notice that the barycentric coordinates also satisfy the relation

lea (xb ) = δab (16.5)

(e.g., if x is one of the nodal locations, then two of the three areas Aae are zero and one area
equals Ae ). This indicates that the three barycentric coordinates also
P3 qualify as shape functions,
a a i i
i.e., we may choose N (x) = le (x). Note that also 0 ≤ le ≤ 1 and i=1 le (x) = 1 for all x ∈ Ωe .
The shape functions associated with the three nodes now become

Ne1 (ξ, η) = ξ, Ne2 (ξ, η) = η, Ne3 (ξ, η) = 1 − ξ − η. (16.6)

The beauty of these shape functions lies in the fact that, in the above form, they are independent
of the element geometry. They are also equivalent to those derived in (16.2). We also note that
computing shape function derivatives with respect to (ξ, η) is trivial:
 1     2     3   
1 Ne,ξ 1 2 Ne,ξ 0 3 Ne,ξ −1
∇ξ Ne = 1 = , ∇ξ Ne = 2 = , ∇ξ Ne = 3 = . (16.7)
Ne,η 0 Ne,η 1 Ne,η −1

We still need to find the link between the Cartesian coordinates (x1 , x2 ) and the reference
coordinates (ξ, η). To this end, let us exploit that we know N a (xb ) = δab and further the fact
that the shape functions introduced above define a linear interpolation across the element in
2D. The latter is easy to realize when, e.g., moving from one node a to another node b and
realizing that the reference coordinates linearly vary between 0 and 1 between these two nodes
(Nea will decrease from 1 to 0, while Neb will increase from 0 to 1). This holds true for each edge
of the triangle, and it can be extended to show a linear interpolation also within the triangle.
Therefore, we may use the above shape functions readily in an isoparametric mapping:
3
X
x(ξ, η) = Nea (ξ, η)xae = ξx1e + ηx2e + (1 − ξ − η)x3e , (16.8)
a=1

where xae are the positions of the three undeformed nodes in (real-space) mesh.

121
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

As introduced in Section 15.2, we may invoke the inverse function theorem to compute deriva-
tives. Based on the shape function derivatives in (16.7), the Jacobian matrix (15.9) here becomes

3 3
 
X X
a a a a
Ne,ξ x1,e Ne,ξ x2,e  
x11,e − x31,e x12,e − x32,e
   
x1,ξ x2,ξ 
a=1 a=1

[Je ] = = 3

3  = x2 − x3

2 3 = const.
x1,η x2,η X a a X
a a  1,e 1,e x2,e − x2,e
Ne,η x1,e Ne,η x2,e
a=1 a=1
(16.9)
and
Je = det Je = (x11,e − x31,e )(x22,e − x32,e ) − (x21,e − x31,e )(x12,e − x32,e ) = 2Ae = const., (16.10)
which evaluates to twice the element area Ae (in real space).

Notice that Je and hence Je within the element are constant and do not depend on (ξ, η).
Further, recall that we must have J > 0, which here implies that the triangular element must
not be inverted (i.e., the node numbering must be counter-clockwise and not clockwise).

Further, the inverse function theorem (15.12) leads to


 a   2  a 
x2,e − x32,e x32,e − x12,e
 a 
Ne,x1 −1 Ne,ξ 1 Ne,ξ
a = [Je ] a = 3 2 1 3 a (16.11)
Ne,x2 Ne,η 2Ae x1,e − x1,e x1,e − x1,e Ne,η

As we had seen in (16.7) that all shape function derivatives N,ξa and N,ηa are constant (−1, +1,
or 0) and, since Je = const. as well, we also conclude that
a a
Ne,x 1
, Ne,x 2
= const. and also dA = dx1 dx2 = Je dξ dη = 2Ae dξ dη. (16.12)
The constant shape function derivatives have an important consequence: they indicate that all
derivatives ∂uh /∂xj within the triangular element are constant.

For example, for a mechanical boundary value problem, we have two nodal dof components in
2D, uae = (uae,1 , uae,2 ), and the interpolation of the displacement field reads
3
X 3
X
uh = uae Nea (ξ) or uhi = uae,i Nea (ξ) for i = 1, 2. (16.13)
a=1 a=1

The resulting strain tensor components are


3
1 h  1 X 
εhij = ui,j + uhj,i = uae,i N,x
a
j
+ ua a
e,j ,xi = const.
N (16.14)
2 2
a=1

Consequently, all strain components are constant within the element. This is why the 3-node
triangular element is also called the constant strain triangle or CST element. It also has
the important consequence that integration of force vectors or stiffness matrices can easily be
performed exactly since the integrands (for the element energy, nodal forces, and stiffness) are
constant across the element.

In case of higher-order triangular elements (discussed in Section 16.4), the following relation is
helpful for evaluating integrals over the triangular element:
Z Z 1 Z 1−η
α β α! β!
ξ η dA = ξ α η β 2Ae dξ dη = 2Ae . (16.15)
Ωe 0 0 (α + β + 2)!

122
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

16.2 Extension to 3D

The extension to three dimensions is straight-forward and results in the 4-node tetrahedron
(constant strain tetrahedron, abbreviated as T4 element or, unfortunately, also as CST)
with reference coordinates ξ = (ξ, η, ζ) and shape functions

Ne1 (ξ, η, ζ) = ξ, Ne2 (ξ, η, ζ) = η, Ne3 (ξ, η, ζ) = ζ, Ne4 (ξ, η, ζ) = 1 − ξ − η − ζ. (16.16)

Note the correct ordering of nodes, shown on the right. Here,


the barycentric coordinates are defined via the ratios of the
partial tetrahedron volumes (obtained by splitting the tetrahedral z
element into four tetrahedra based on the location of point x,
analogous to the above procedure in 2D). Like in 2D, the resulting 1 +3
interpolated strains are constant in the linear tetrahedron, and
relations (16.9) and (16.11) hold analogously (here extended to
n = 4 nodes and using the above shape functions). Further, we 2 h
have dV = 6Ve dξ dη dζ. +
1
4 1
+
The following relation is analogous to (16.15): 0 1 x
Z
α! β! γ!
ξ α η β ζ γ dA = 6Ve . (16.17)
Ωe (α + β + γ + 2)!

16.3 Finite element implementation

When using the above simplicial elements (like any finite element based on an isoparametric
formulation), the finite element implementation can make use of the isoparametric mapping.
Specifically for the CST element in 2D, we showed that

∇x Nea = Je−1 ∇ξ Nea = const. and Je = det Je = 2Ae . (16.18)

We further note that, since strains are constant within elements, so are the resulting stresses:

εhij = const. ⇒ σij = σij (εh ) = const., (16.19)

so that we may conveniently compute the element energy as


Z Z
h Je t
Ie = W (ε ) dV = W (εh ) t dA = W (εh ) . (16.20)
Ωe Ωe 2

The definition of the B-matrix, as introduced in Section 13.2, can be applied here as follows.
Let us consider the CST (triangular) element in 2D. For this element, the 2D strain components
in Voigt notation, using (16.9), are computed as
  P3 
uh1,1 uae,1 Ne,x
a
 h  
ε11 a=1 1
P3
[ε̃h ] =  εh22  =  uh2,2  =  uae,2 Ne,x
a
 
a=1 2 
2εh12 uh1,2 + uh2,1 3 a Na a Na
P  
a=1 u e,1 e,x2 + u e,2 e,x1

xij i j (16.21)
 23 31 12

y 0 ye 0 ye 0 e = xe,1 − xe,1 ,
1  e ij j
= 0 x32
e 0 x13 e 0 x21e
 Ue with ye = xie,2 − xe,2 ,
2Ae 32 23 13 31 21 12
x e ye x e ye x e ye 2Ae = x21 31 31 21
e ye − xe ye ,
| {z }
=[Be ]

123
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

so that for the CST element in 2D we identify

xij i j
 23
0 ye31 0 ye12 0

y e = xe,1 − xe,1
1  e ij j
[Be ] = 0 x32 e 0 x13 e 0 x21
e
 with ye = xie,2 − xe,2 (16.22)
2Ae
x32
e ye23 x13
e ye31 21 12
x e ye 21 31 31
2Ae = xe ye − xe ye 21

T
where we exploited that Je = const., and we defined Ue = u1e,1 , u1e,2 , u2e,1 , u2e,2 , u3e,1 , u3e,2 .
Furthermore, recall that (xae,1 , xae,2 ) denotes the 2D-location of the element’s node a. Analogous
formulations can, of course, be derived for the constant-strain tetrahedron in 3D.

16.3.1 Special case linear elasticity

For the special case of linear elasticity, we may write


ε̃h = Be Ue ⇒ σ̃ = E ε̃h = EBe Ue (16.23)
and the same relations apply as in Section 13.2 (see the definition of the elastic E-matrix there).
Consequently, for the CST element we obtain the element stiffness matrix, nodal internal force
vector, and internal energy of element e as, respectively,
Z
1
Ke = BeT EBe dV = BeT EBe tAe , Fint,e = Ke Ue , Ie = Ue · Ke Ue , (16.24)
Ωe 2
where we exploited that BeT EBe = const. and the volume of element e is |Ωe | = tAe for a
2D CST element. Be is given in (16.22), and E was defined for isotropic elasticity in (13.23)
for the cases of plane strain and plain stress. Even though not necessarily wise for reasons of
memory consumption, the element stiffness matrix Ke can be computed and stored a-priori for
each element for faster calculation of forces and stiffness matrices during simulations.

16.3.2 General case of nonlinear elastic materials

For the more general case of a material with a constitutive law that is not linear elastic (but
assuming that is has a variational basis), we may still write
∂W ∂ σ̃
W = W (ε̃), ⇒ σ̃ = = σ̃(ε̃), C̃ = = C̃(ε̃), (16.25)
∂ ε̃ ∂ ε̃
so that
Z
Ie = W (ε̃h ) dV (16.26)
Ωe
and the internal force vector follows as
∂I int
Z
Fint,e = e = BeT σ̃ dV = BeT σ̃(ε̃h )tAe , (16.27)
∂Ue Ωe
while the incremental stiffness matrix (the nonlinear analog of the linear elastic stiffness
matrix) becomes
∂Feint
Z
Te = = BeT C̃Be dV = BeT C̃(ε̃h )Be tAe (16.28)
∂Ue Ωe

Note that if σ̃ = E ε̃, the above equations recover the linear elastic definitions with C̃ = E =
const. Otherwise, Te depends on deformation through ε̃h = ε̃h (Ue ), so that one cannot pre-
compute the stiffness matrix anymore but must re-evaluate it each time the nodal displacements
Ue change.

124
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

16.4 Higher-order triangles and tetrahedra

Following the above recipe for the simplicial elements, one can also define higher-order triangular
and tetrahedral elements based on the parametric setting and associated reference/barycentric
coordinates introduced here.

For example, the quadratic triangle (T6) element in 2D has six nodes, so that the inter-
polation function space is {1, x1 , x2 , x21 , x1 x2 , x22 } and therefore complete up to second order.
Per convention, nodes 1-3 are the corners while 4-6 are at edge midpoints, and counting is
counter-clockwise as before.

3 3 4 4
2 5 2
10
8
6 4 3 9 3
7
1 1
6
1 1 5
2 2
CST (T3) LST (T6) CST (T4) LST (T10)

With the same barycentric reference coordinates (ξ, η) as for the T3 element, the shape functions
of the T6 element are found as
Ne1 (ξ, η) = ξ(2ξ − 1), Ne2 (ξ, η) = η(2η − 1), Ne3 (ξ, η) = θ(2θ − 1),
(16.29)
Ne4 (ξ, η) = 4ξη, Ne5 (ξ, η) = 4ηθ, Ne6 (ξ, η) = 4ξθ with θ = 1 − ξ − η.

Since derivatives of the above shape functions are linear, strains (and thus stresses) also vary
linearly within the T6 element. It is therefore known as the linear strain triangle (LST).
The quadratic interpolation implies that element edges of isoparametric elements can be curved,
whereas those of the CST element remain straight during deformation due to the linear inter-
polation.

Analogously, the quadratic tetrahedron (T10, also shown above) has four corner nodes and
six nodes at edge midpoints, resulting in linear strains within the element. This makes it a
linear strain tetrahedron.

For convenience, one may use both T6 and T10 elements along with a subparametric map-
ping, i.e., displacements are interpolated based on the above quadratic polynomials, while the
mapping of nodal positions between reference and real space relies on a linear interpolation.

The same concepts can be extended to higher dimensions and to higher-order interpolation, as
needed.

125
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

17 The bilinear quadrilateral element

The above simplicial elements are simple to implement and their constant strains within el-
ements admit an exact integration of the element energy, nodal forces, and stiffness matrix.
However, the constant fields within the simplicial elements may not be ideal, e.g., fine FE
meshes may be required to achieve the sought accuracy especially in regions with spatially
strongly varying stresses and strains. As an alternative in 2D, let us discuss the 4-node bilin-
ear quadrilateral element (also known as Q4), with later extensions to more complex elements
as well as elements in 3D.

For the same reason as for the simplicial elements (where we aimed for shape function definitions
independent of the specific element geometry), we here make use of the concept of an isopara-
metric mapping and again introduce reference coordinates (ξ, η). For the bilinear quadrilateral
element, by definition the reference configuration is Ωe = [−1, 1]2 and node numbering starts in
the bottom left corner and is counterclockwise.

h x2
(-1,1) (1,1) 4
(x ,x )
e,1
4
e,2
3 3
4 3 4 (x ,x )
e,1 e,2

3
1 2 x mapping
-1 x 1 We
1
1 2 (x1 ,x1 )
e,1 e,2
2
(-1,-1) (1,-1) (x2 ,x2 )
e,1 e,2

2-node bar in its x1


reference space Q4 element in its reference space Q4 element in physical space

Shape functions must satisfy the FE relation Nea (ξb ) = δab in the reference configuration with
nodal positions ξb (b = 1, . . . , 4). In fact, these shape functions can be obtained from the 2-node
bar (whose shape functions we derived in Section 11.1) by scaling the linear scaling of the shape
functions up to 2D. Consider a 2-node bar whose nodes are positioned21 at ξ = ±1 (as shown
above), whose shape functions are
1 1
N̄e1 (ξ) = (1 − ξ), N̄e2 (ξ) = (1 + ξ). (17.1)
2 2
It can easily be verified that N̄e1 (−1) = 1, N̄e1 (1) = 0, and N̄e2 (−1) = 0, N̄e2 (1) = 1.

The 2D quadrilateral element in its reference configuration is Ωe = [−1, 1]2 , i.e., a square whose
corners are located at ξ = (±1, ±1). The shape functions can thus be obtained by combining
the above 1D bar shape functions independently in the ξ- and η-directions:

1
Ne1 (ξ, η) = N̄e1 (ξ)N̄e1 (η) = (1 − ξ)(1 − η),
4
2 2 1 1
Ne (ξ, η) = N̄e (ξ)N̄e (η) = (1 + ξ)(1 − η),
4 (17.2)
1
Ne3 (ξ, η) = N̄e2 (ξ)N̄e2 (η) = (1 + ξ)(1 + η),
4
4 1 2 1
Ne (ξ, η) = N̄e (ξ)N̄e (η) = (1 − ξ)(1 + η).
4
21
We note that this choice of ξ ∈ [−1, 1] for the bar in the reference configuration is arbitrary, one could also
have chosen, e.g., ξ ∈ [0, 1]. The present choice is convenient for its extension to the Q4 element in 2D.

126
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

P4
One can easily verify that Nea (ξb , ηb ) = δab and a
a=1 Ne (ξ, η) = 1 for all ξ = (ξ, η) in (17.2).
These shape functions are bi-linear.

The isoparametric mapping here implies that the (x1 , x2 )-coordinates are interpolated across the
element using the same shape functions (viz., the above ones) as those used for the interpolation
of the fields of interest. Therefore, we have in close analogy to the CST element
4
X 4
X
x1 = Nea (ξ, η) xae,1 , x2 = Nea (ξ, η) xae,2 . (17.3)
a=1 a=1

Notice that this implies straight edges (in the reference configuration) remain straight (in the
actual mesh). For example, take the bottom edge (characterized by η = −1): the interpolation
along this edge is
4
X 1 − ξ 1 1 + ξ 2 x1e + x2e x2 − x1e
x= Nea (ξ, −1)xae = xe + xe = + e ξ, (17.4)
2 2 2 2
a=1
which is a linear interpolation in ξ. Therefore, the bottom edge in the real mesh in physical
space is a linear interpolation between the two adjacent nodes. Similar arguments hold for all
edges, so that this element has always straight edges in physical space (which, e.g., calls for
finely resolved meshes when simulating curved objects).

Looking at the shape functions, we notice that completeness of the polynomial interpolation
is up to q = 1: even though the interpolation basis {1, ξ, η, ξη} contains the bilinear term, it is
not complete up to quadratic order (see Section 9.3). This means we must be able to exactly
represent linear solutions of the type
uh (x1 , x2 ) = c0 + c1 x1 + c2 x2 . (17.5)
A simple check reveals that this is indeed the case since our interpolation, based on the four
nodal values uae = uh (xae ), recovers the exact solution:
4
X 4
X 4
X
uh (x1 , x2 ) = Nea uae = Nea uh (xae,1 , xae,2 ) = Nea (c0 + c1 xae,1 + c2 xae,2 )
a=1 a=1 a=1
(17.6)
4 4 4
!
X X X
= Nea c0 + c1 Nea xae,1 + c2 Nea xae,2 = c0 + c1 x1 + c2 x2 .
a=1 a=1 a=1
Hence, we know that the chosen isoparametric element interpolation is capable of representing
linear solutions exactly.

Furthermore, notice that this interpolation scheme ensures that uh is continuous across ele-
ments. To see this, recall from (17.4) that on any element edge only those two shape functions
are non-zero whose nodes are adjacent to that edge, while the other shape functions are zero.
This implies that the interpolated field uh on any edge is simply a linear interpolation between
the two nodal values on that edge (and those two nodes are shared by the two adjacent ele-
ments). Hence, the interpolation on the edge must be the same when viewed from both adjacent
elements. As a further consequence, the above interpolation also ensures integrability in the
weak form, because a continuous, piecewise polynomial field uh guarantees that uh ∈ H1 (Ω).

Computing shape function derivatives is conveniently accomplished via the inverse function
theorem introduced in Section 15.2. In analogy to the simplicial element, we use x1 = x1 (ξ, η)
and x2 = x2 (ξ, η) so the inverse function theorem states
 a   a 
Ne,x1 −1 Ne,ξ
a = Je a and more generally: ∇x Nea = Je−1 ∇ξ Nea . (17.7)
Ne,x2
Ne,η

127
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

By contrast to the simplicial elements, we no longer have that Je nor ∇ξ Nea are constant because
of the bilinear term ξη in the shape functions. Therefore, strains and stresses are not constant
within an element.
Example 17.1. 2-node bar revisited
As a simple example (before tackling the full 2D setting), recall the
2-node bar element, whose shape functions we originally computed Dxe
in 11.4 as 1 2
x x -1 x 1
Ne1 (x) = 1 − , Ne2 (x) = . (17.8)
∆xe ∆xe
For a reference bar element with nodes at ξ = ±1, the analogous shape functions in 1D read
1−ξ 1+ξ
Ne1 (ξ) = , Ne2 (ξ) = . (17.9)
2 2
It is simple to verify that these indeed evaluate to 0 and 1 at ξ = ±1. Applying the inverse
function theorem to this 1D problem gives the scalar Jacobian
∂x ∂Ne1 1 ∂Ne2 2 x2e − x1e ∆xe
Je = = xe + xe = = . (17.10)
∂ξ ∂ξ ∂ξ 2 2
The relation between the shape function derivatives in physical and reference space hence follows
as
2 1 1
a
Ne,x = Je−1 Ne,ξ
a
= Na with 1
Ne,ξ = − , Ne,ξ 2
= , (17.11)
∆xe e,ξ 2 2
so that we obtain correctly (as verified by differentiating (17.8))
1 1 2 1 2 1 2 1
Ne,x =− =− , Ne,x = = . (17.12)
2 ∆xe ∆xe 2 ∆xe ∆xe
Of course, here we could have obtained the derivatives directly from (17.8) without the detour
via the inverse function theorem. Yet, for Q4 elements in the following we cannot easily do
so anymore. Therefore, we aimed to illustrate the general procedure here for the simple 1D
setting.

————

When applying the inverse function theorem and the above relations to the bilinear quadrilateral
(Q4) element, we obtain the Jacobian
 4 4

X X
N a xa a a
Ne,ξ x2,e 
 a=1 e,ξ 1,e
  
x1,ξ x2,ξ i=1

[Je ] = = 4

4

x1,η x2,η X X 
a a a a 
Ne,η x1,e Ne,η x2,e

a=1 i=1 (17.13)
 1
xe,1 x1e,2

2 2 
 
1 −(1 − η) (1 − η) (1 + η) −(1 + η)  xe,1 xe,2 
=
4 −(1 − ξ) −(1 + ξ) (1 + ξ) (1 − ξ) xe,1 x3e,2 
3

x4e,1 x4e,2
and Je = det Je . We notice that Je indeed is not constant across the element but varies with ξ
and η. For convenience, let us define
 
−1 Γ11 Γ12
[Γe ] = [Je ] = . (17.14)
Γ21 Γ22

128
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Towards the FE implementation, let us also introduce the B-matrix notation. To this end, we
write for the 2D setting in Voigt notation
 uh1,x1
 
 h  
ε11 1 0 0 0  h 
u1,x2 
[ε̃] =  εh22  =  0 0 0 1   . (17.15)
h
 uh2,x1 
2ε12 0 1 1 0
uh2,x2

We further exploit the inverse function theorem by using relation (17.7), which here leads to
 h    h 
u1,x1 Γ11 Γ12 0 0 u1,ξ
h
u1,x  Γ21 Γ22 0  h 
 2
=   u1,η  .
0 
(17.16)
uh2,x   0 0 Γ11 Γ12  uh2,ξ 
1
uh2,x2 0 0 Γ21 Γ22 uh2,η

Note that here we have two scalar fields, uh1 and uh2 , so that relation (17.7) is applied indepen-
dently to each of the two components, which results in the block matrix in (17.16), containing
the components of Je−1 = Γe twice.

Finally, we also have


 h   1 2 3 4
u1,ξ Ne,ξ 0 Ne,ξ 0 Ne,ξ 0 Ne,ξ 0

h
u1,η   Ne,η 1 2 3 4
0 Ne,η 0 Ne,η 0 Ne,η 0 
uh  =  0
    Ue (17.17)
1
Ne,ξ 0 2
Ne,ξ 0 3
Ne,ξ 0 4
Ne,ξ 
2,ξ
h
u2,η 0 1
Ne,η 0 2
Ne,η 0 3
Ne,η 0 4
Ne,η
T
with the element dofs Ue = u1e,1 , u1e,2 , . . . , u4e,1 , u4e,2 . Altogether, writing ε̃ = Be Ue in terms
of (17.15), (17.16), and (17.17) lets us identify

1 2 3 4
  
  Γ11 Γ12 0 0 Ne,ξ 0 Ne,ξ 0 Ne,ξ 0 Ne,ξ 0
1 0 0 0 Γ21 1 2 3 4
Γ22 0 0   Ne,η 0 Ne,η 0 Ne,η 0 Ne,η 0 
[Be ] =  0 0 0 1 
 0
 1 2 3 4

0 Γ11 Γ12   0 Ne,ξ 0 Ne,ξ 0 Ne,ξ 0 Ne,ξ 
0 1 1 0 1 2 3 4
0 0 Γ21 Γ22 0 Ne,η 0 Ne,η 0 Ne,η 0 Ne,η

(17.18)

with Γij from (17.14) and the shape function derivatives computed from (17.2). This defines
the Be -matrix for the Q4 element. Again, note that Be = Be (ξ), i.e., the Be -matrix is not
constant within an element but depends on ξ and η (through the shape function derivatives as
well as through Γe = Je−1 , which are both not constant).

Analogous to the simplicial element, a useful relation to evaluate area integrals over the
element in the following is (e1 , e2 being reference unit vectors)
   
∂x ∂x ∂y ∂y
dA = dx× dy = dξ e1 + dη e2 × dξ e1 + dη e2 = J dξ dη e1 ×e2 (17.19)
∂ξ ∂η ∂ξ ∂η
so that

dA = | dA| = J dξ dη (17.20)

Like for the simplicial elements, the above can be used to compute the element energy for a
Q4 element with out-of-plane thickness t and strain energy density W as
Z
Ie = W (ε̃h )t dA, (17.21)
Ωe

129
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

the internal force vector


∂I int
Z
Fint,e = e = BeT σ̃ t dA, (17.22)
∂Ue Ωe

and the incremental stiffness matrix


∂Feint
Z
Te = = BeT C̃Be t dA. (17.23)
∂Ue Ωe

For the special case of linear elasticity, the above reduces to


Z
1
Ke = BeT EBe t dA, Fint,e = Ke Ue , Ie = Ue · Ke Ue , (17.24)
Ωe 2

A complication here arises from the fact that Be is not constant, so that the above integrals
must be carried out (for general element shapes in real space). There is one special case, in
which this complication is reduced, which is the case of a so-called undistorted Q4 element.
In an undistorted element, the angles between edges does not change when mapping from the
reference to the real space. For example, an undistorted Q4 element remains a rectangle in the
actual mesh. In this special case, the above derivations simplify as follows. For a rectangular
element, we know that opposite edges have the same lengths. Therefore, let us assume that the
horizontal and vertical side lengths of the rectangular element are a and b, respectively, or

a = x2e,1 − x1e,1 = x3e,1 − x4e,1 , b = x4e,2 − x1e,2 = x3e,2 − x2e,2 . (17.25)

Inserting these into (17.13) leads to

x2e,2 − x1e,2
 
1 a
[Je ] = . (17.26)
2 x4e,1 − x1e,1 b

Note that (17.25) alone only implies that the Q4 element in real space is a parallelogram. If we
further enforce that the angles are right as must be in rectangle, we know that x2e,2 − x1e,2 = 0
and x4e,1 − x1e,1 = 0. This leads to the Jacobian of an undistorted Q4 element as
 
1 a 0 ab
[Je ] = and Je = det Je = (17.27)
2 0 b 4

In this special case, Γ = const., so that Be in (17.18) becomes linear in ξ and η, so that the linear
elastic stiffness matrix in (17.24) becomes a polynomial of at most quadratic order in ξ and η.
In such cases, the integration can be carried out analytically. However, in the general case of
distorted elements, this is unfortunately hardly possible analytically. This will be addressed in
Section 19. Until then, let us quickly introduce higher-order and higher-dimensional elements
based on the Q4.

130
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

18 Higher-order and higher-dimensional elements:


Q8, Q9, 8-node brick

The bilinear quadrilateral (Q4) element discussed in the previous section was the simplest
example of a (non-simplicial) element in 2D. The same concepts can be extended to more
complex elements using higher-order interpolation as well as to 3D elements. Here, we would
like to briefly summarize a few representative examples of such element definitions.

The 9-node quadratic quadrilateral (Q9) is a direct extension of the Q4 element which
uses bi-quadratic interpolation. It is schematically shown below. Again covering Ωe = [−1, 1]2 ,
it derives its shape functions from applying the 1D shape functions of the 3-node bar (using
Lagrangian interpolation) to the 2D case. The shape functions are defined as

ξ(1 − ξ)η(1 − η) ξ(1 + ξ)η(1 − η)


Ne1 (ξ, η) = , Ne2 (ξ, η) = − ,
4 4
ξ(1 + ξ)η(1 + η) ξ(1 − ξ)η(1 + η)
Ne3 (ξ, η) = , Ne4 (ξ, η) = − ,
4 4
(1 − ξ)(1 + ξ)η(1 − η) ξ(1 + ξ)(1 − η)(1 + η) (18.1)
Ne5 (ξ, η) = − , Ne6 (ξ, η) = ,
2 2
(1 − ξ)(1 + ξ)η(1 + η) ξ(1 − ξ)(1 − η)(1 + η)
Ne7 (ξ, η) = , Ne8 (ξ, η) = − ,
2 2
Ne9 (ξ, η) = (1 − ξ 2 )(1 − η 2 ).

The resulting interpolation uses the basis (i.e., the above shape functions include these mono-
mials)

{1, ξ, η, ξη, ξ 2 , η 2 , ξ 2 η, ξη 2 , ξ 2 η 2 }, (18.2)

which is complete up to order q = 2 (quadratic).

We notice that the above interpolation apparently includes far more monomials than required
for a quadratic interpolation (specifically, ξ 2 η, ξη 2 and ξ 2 η 2 are not required for a complete
quadratic interpolation). Therefore, one can also construct elements with less nodes that still
provide a complete quadratic interpolation.

h h
(-1,1) (1,1) (-1,1) (1,1)
4 7 3 4 7 3

x x
8 9 6 8 6

1 5 2 1 5 2
(-1,-1) (1,-1) (-1,-1) (1,-1)
Q9 in its reference space Q8 in its reference space

One such example is the 8-node quadratic quadrilateral (Q8) also known as the serendip-
ity element. In this element (shown above), the central node is missing. As a consequence,

131
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

shape functions are constructed in a different way than defined by (18.1). One starts by defining
those shape functions associated with the mid-edge nodes 5, 6, 7 and 8 as
(1 − η)(1 − ξ 2 ) (1 − η 2 )(1 + ξ)
Ne5 (ξ, η) = , Ne6 (ξ, η) = ,
2 2 (18.3)
7 (1 + η)(1 − ξ 2 ) 8 (1 − η 2 )(1 − ξ)
Ne (ξ, η) = , Ne (ξ, η) =
2 2
Notice that these are one polynomial order lower than the shape functions defined in (18.1). We
now conclude the remaining four shape functions (serendipitously, i.e., as an unplanned lucky
occurrence) as combinations of (18.3) and the bi-linear shape functions of the Q4 element,
(17.2). This leads to
(1 − ξ)(1 − η) 1 (1 + ξ)(1 − η) 1
Ne1 (ξ, η) = − (N5 + N8 ), Ne2 (ξ, η) = − (N5 + N6 ),
4 2 4 2 (18.4)
3 (1 + ξ)(1 + η) 1 4 (1 − ξ)(1 + η) 1
Ne (ξ, η) = − (N6 + N7 ), Ne (ξ, η) = − (N7 + N8 ).
4 2 4 2
a
You are invited to verify that these shape functions indeed satisfy Ne (ξb ) = δab . Both the Q8
and Q9 elements are schematically shown above in their reference configurations.

We may also extend the above construction of elements to three dimensions. The simplest
example in 3D was the Constant-Strain Tetrahedron, already discussed in Section 16.4. Here,
we introduce further 3D elements by extending, e.g., the definition of the bilinear quadrilateral
(Q4) element into 3D.

z
8 7 (1,1,1)
5 6
h

1
4
2
3
(1,1,-1)
(-1,-1,-1) (1,-1,-1)
brick element in its reference space

This results in the so-called 8-node brick element. Here, the 3D reference configuration is
described by coordinates (ξ, η, ζ), and the shape functions are a direct extension of (17.2), now
written in 3D, which gives
1 1
Ne1 (ξ, η, ζ) = (1 − ξ)(1 − η)(1 − ζ), Ne2 (ξ, η, ζ) = (1 + ξ)(1 − η)(1 − ζ),
8 8 (18.5)
3 1
Ne (ξ, η, ζ) = (1 + ξ)(1 + η)(1 − ζ), etc.
8
The link between reference and real space is again given by an isoparametric mapping, so that
shape function derivatives again follow from the inverse function theorem as
∇x Nea = Je−1 ∇ξ Nea (18.6)
and volume integrals make use of
dV = J dξ dη dζ. (18.7)

132
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

19 Numerical quadrature

The Q4, Q8, Q9 and brick elements are perfect examples to motivate the concepts discussed in
this section, viz. the use of numerical quadrature. Recall that, in order to perform finite element
simulations, we may need to compute the element energy, nodal forces, and tangent matrix:
Z Z Z
h T
Ie = W (ε̃ ) dV, Fint,e = Be σ̃ dV, Te = BeT C̃Be dV, (19.1)
Ωe Ωe Ωe

each of which requires computing an integral over the element Ωe . In general (unlike for the
special case of simplicial elements), the integrands are not constant but may be complex func-
tions of position (even in the linear elastic case, e.g., because of complex element shapes in real
space). As a consequence the above integrals cannot easily be calculated analytically, which is
why we make use of numerical integration schemes.

As a clean mathematical example, we start by considering an integral in 1D, e.g.,


Z b
I[u] = u(x) dx, (19.2)
a
which can later be extended to higher dimensions. For convenience, let us introduce the coor-
dinate transformation
x−a 2 dx
ξ=2 −1 ⇒ ξ(x = a) = −1, ξ(x = b) = 1, dξ = , (19.3)
b−a b−a
so that (19.2) is turned into
Z 1
b−a 
I[u] = f (ξ) dξ where f (ξ) = u x(ξ) (19.4)
−1 2
with
ξ+1
x= (b − a) + a. (19.5)
2
Instead of considering general integrals of the type (19.2), we concentrate on integrals of the
type (19.4) (and we have seen that we can transform one into the other, so any rules derived
for (19.4) can also be applied to integrals of the general type (19.2)). Our objective is now to
approximate the integral (19.4) numerically in an accurate albeit efficient manner.

19.1 Example: Riemann sums

As an example for numerical integration, consider a partition of the range from −1 to 1 into n
segments separated by n + 1 nodes. That is, we introduce the partition
P = {[ξ0 , ξ1 ], [ξ1 , ξ2 ], . . . , [ξn−1 , ξn ]} such that −1 = ξ0 < ξ1 < ξ2 < . . . < ξn = 1. (19.6)

The Riemann sum is probably the simplest approach to computing the integral in (19.4)
numerically, by simply summing the contributions from all segments, thus defining the approx-
imate integral S as
n
X
I≈S= f (ξi∗ )(ξi − ξi−1 ) with ξi−1 ≤ ξi∗ ≤ ξi . (19.7)
i=1

Here, the choice of ξi∗ within each interval is, in principle, arbitrary. It should be “somehow
representative” of the function f within the interval [ξi−1 , ξi ].

133
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Different choices of ξi∗ lead to different definitions of S, including, e.g.,

(i) the left Riemann sum: ξi∗ = ξi−1


(ii) the right Riemann sum: ξi∗ = ξi
(iii) the middle Riemann sum: ξi∗ = 12 (ξi−1 + ξi )
(iv) the trapezoidal sum: average of left and right: f (ξi∗ ) = 12 [f (xi−1 ) + f (xi )]
(v) the upper Riemann sum: ξi∗ s.t. g(ξi∗ ) = supξ∈[ξi−1 ,ξi ] g(ξ)
(vi) the lower Riemann sum: ξi∗ s.t. g(ξi∗ ) = inf ξ∈[ξi−1 ,ξi ] g(ξ)

More refined formulations can be found in the so-called Newton-Cotes formulae (the trape-
zoidal rule is the Newton-Cotes formula of degree 1). While Riemann and Newton-Cotes formu-
lae are indeed viable schemes for numerical integration, they are inefficient, because, to achieve
good accuracy, they require a partition into many segments in general. The following concept
of so-called Gaussian quadrature aims to circumvent these computational expenses.

f(xi) f(xi)
f(x)

x x x
-1 +1 x0 xi-1 xi xn -1 x0 xi +1

exact integral (middle) Riemann sum quadrature rule

19.2 Gauss quadrature

An efficient alternative to the above Riemann sums are quadrature rules (also called cuba-
ture rules in 3D), which are best suited for integrating polynomial functions. The idea is to
approximate the integral by a weighted sum over integration points (as shown in the schematic
above on the right), i.e., we define
Z 1 nQP −1
X
I[f ] = f (ξ) dξ ≈ Wi f (ξi ) (19.8)
−1 i=0

Now, the challenge is to choose the number of integration points, nQP , as well as the weights
{W0 , . . . , WnQP −1 } and locations {ξ0 , . . . , ξnQP −1 } of each integration point. That choice
should depend on the function to be integrated (more specifically, on its smoothness; one can
easily imagine that smooth polynomials require few integration points, while strongly fluctuat-
ing functions require larger numbers of integration points). In the FE context, most functions
of interest will be of polynomial type since our shape functions are commonly defined as poly-
nomials. Any polynomial function is generally written as
f (ξ) = a0 + a1 ξ + a2 ξ 2 + . . . with ai ∈ R const., (19.9)
so that – to integrate a polynomial exactly – we must make sure to integrate exactly all mono-
mials 1, ξ, ξ 2 , etc. up to the required polynomial order.

We say a quadrature rule is “exact of order q”, if it integrates exactly all polynomial functions
g ∈ Pq ([−1, 1]) (or all monomials up to ξ q ). Gauss quadrature generally chooses nQP quadra-
ture points and associated weights such that the quadrature rule is exact of order q = 2nQP − 1.
Let us find the optimal weights and integration points for Gaussian quadrature.

134
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

19.2.1 Gauss-Legendre quadrature

Gauss-Legendre quadrature selects the nodes and weights such that the first 2nQP mono-
mials are computed exactly. In other words, we find the weights and locations by requiring that

Z 1 nQP −1
!
X
k
ξ dξ = Wi ξik , for k = 0, 1, . . . , 2nQP − 1. (19.10)
−1 i=0

These are 2nQP equations for the 2nQP yet unknown parameters (Wi , ξi ) for i = 0, . . . , nQP − 1.
The equations are generally nonlinear and thus hard to solve analytically. Yet, we can find
solutions for the lowest few orders in 1D as follows:

• a single quadrature point, i.e., nQP = 1, approximates the integral by evaluating the
function only at a single location ξ0 ∈ [−1, 1].
The two equations for the two unknowns (the weight W0 and location ξ0 ) are obtained
from requiring that any constant function, f (ξ) = ξ 0 , and any linear function, f (ξ) = ξ 1 ,
must be integrated exactly. This implies that
Z 1 Z 1
0 ! 0 !
ξ dξ = 2 = W0 ξ0 = W0 and ξ 1 dξ = 0 = W0 ξ01 = W0 ξ0 (19.11)
−1 −1

From these two equations, the first-order quadrature rule fol-


lows with
f(x0)
ξ0 = 0, W0 = 2 (19.12)

That is, only a single quadrature point at location ξ0 = 0 is x


required to integrate any linear function exactly. Hence, since -1 x0 +1
linear functions are integrated exactly, this quadrature rule is
exact to order q = 1.

• two quadrature points, i.e., nQP = 2, require the calculation of the two weights and
associated quadrature point locations.
In close analogy to the above case, we now have four unknowns (two weights, W0 and
W1 , and two integration point locations, ξ0 and ξ1 ) and construct the four equations to
solve for those by requiring that any constant, linear, quadratic, or cubic function must
be integrated exactly:
Z 1 Z 1
! !
ξ 0 dξ = 2 = W0 + W1 , ξ 1 dξ = 0 = W0 ξ0 + W1 ξ1 ,
−1 −1
Z 1 Z 1 (19.13)
2 2 ! 2 2 3 ! 3 3
ξ dξ = = W0 ξ0 + W1 ξ1 , ξ dξ = 0 = W0 ξ0 + W1 ξ1 .
−1 3 −1

135
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

While this is a nonlinear system of equations, a simple solution


can be found by assuming symmetric quadrature points with
respect to the origin, i.e., ξ0 = −ξ1 . In this case, we may
conclude that f(x1)
f(x0)
1 1
ξ0 = − √ , ξ1 = √ , W0 = W1 = 1. (19.14) x
3 3 -1 x0 x1 +1

Since this quadrature rule integrates cubic polynomials exactly,


it is exact to order q = 3.
• higher-order quadrature rules:
Quadrature weights and points for arbitrary orders can be obtained in analogous fashion
and, most importantly, can be found in numerous look-up tables (cf. the classical FEM
textbooks or Wikipedia). A more systematic way to compute Gauss-Legendre quadrature
weights and points is outlined in Appendix N.

19.2.2 Other Gauss quadrature rules

Note that, for general functions f (which are not necessarily of polynomial type), one can
sometimes find a decomposition f (ξ) = w(ξ)g(ξ) where w(·) is a known weighting function and
g(ξ) is (approximately) polynomial, so that a more suitable quadrature rule may be found via
Z 1 Z 1 nQP −1
X
I[u] = f (ξ) dξ = w(ξ) g(ξ) dξ ≈ w(ξi ) g(ξi ). (19.15)
−1 −1 i=0

Examples of such Gaussian quadrature rules include those of Gauss-Chebyshew type, which
are obtained form a weighting function w(ξ) = (1 − ξ 2 )−1/2 , and the quadrature points are the
roots of Chebyshew polynomials. Gauss-Hermite quadrature uses a weighting function w(ξ) =
exp(−ξ 2 ) (and the integral is taken over the entire real axis). Gauss-Legendre quadrature is
included as a special case.

Another popular alternative (less for FE though) is Gauss-Lobatto quadrature which in-
cludes the interval end points as quadrature points and is accurate for polynomials up to degree
2nQP − 3. It uses the approximation
Z 1 nQP −1
2   X
I[u] = f (ξ) dξ ≈ f (−1) + f (1) + Wi f (ξi ). (19.16)
−1 nQP (nQP − 1)
i=2

19.3 Higher dimensions

The above quadrature rules can easily be extended to 2D and 3D. For example, for 2D elements
such as the Q4, Q8 or Q9 we compute approximate integrals over Ωe = [−1, 1]2 as
−1 −1
Z 1Z 1 Z 1 "NX # N
"N −1 #
X X
f (ξ, η) dξ dη ≈ Wi f (ξi , η) dη ≈ Wj Wi f (ξi , ηj )
−1 −1 −1 i=0 j=0 i=0
(19.17)
nQP −1
X
= Wk∗ f (ξk )
k=0

136
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

with the combined weights Wk∗ = Wi Wj and points ξk = (ξi , ηj ) obtained from the individual

quadrature rules in each direction. By symmetry we choose N = nQP so that N 2 = nQP , i.e.,
we have N quadrature points per direction.

By using the 1D Gauss-Legendre weights and points, we now have:

• first-order quadrature (q = 1), as in 1D, has only a single quadrature point (nQP = 1):

(ξ0 , η0 ) = (0, 0) and W0 = 22 = 4 (19.18)

Bi-linear functions (at most linear in ξ and η) are integrated exactly with this rule.

• third-order quadrature (q = 3), now has four quadrature points in 2D (nQP = 22 = 4):
 
1 1
(ξi , ηi ) = ± √ , ± √ and W0 = W1 = W2 = W3 = 1 (19.19)
3 3

Bicubic polynomial functions (at most cubic in ξ and η) are integrated exactly.

Similarly in 3D, the brick element defined on Ωe = [−1, 1]3 (and analogous higher-order
elements) may use Gauss-Legendre quadrature, resulting in the following schemes:

• first-order quadrature (q = 1) still has a single quadrature point (nQP = 1):

(ξ0 , η0 , ζ0 ) = (0, 0, 0) and W0 = 23 = 8 (19.20)

• third-order quadrature (q = 3), now has eight quadrature points (nQP = 23 = 8):
 
1 1 1
(ξi , ηi , ζi ) = ± √ , ± √ , ± √ and Wi = 1. (19.21)
3 3 3

• higher-order schemes follow analogously.

Shown below are schematics of the quadrature point locations for Gauss-Legendre quadrature
of orders q = 1 and q = 3 in 2D. Note that in the FE community one often refers to quadra-
ture points also as Gauss points, since one most commonly uses the above Gauss-Legendre
quadrature rules.

h h

+1 +1
x3 x2
x0
x x
-1 +1 -1 +1

x0 x1
-1 -1

q = 1 in 2D q = 3 in 2D

137
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Ultimately, the choice of a specific quadrature rule in any dimension depends on the function
f (ξ) to be integrated. If the latter is of polynomial type, then we may choose a Gaussian
quadrature rule that leads to exact integration. Else, we may choose a quadrature rule based
on the smoothness of the function (Appendix O shows that the error introduced by a numerical
quadrature rule strongly depends on the smoothness of function f ). In general, the choice of a
quadrature rule is often a compromise between accuracy and efficiency. In the next section, we
look into quadrature rules specifically for finite elements.

138
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

20 FEM: which quadrature rule to use?

The quadrature rules we introduced in Section 19 gives us a palette of tools to numerically inte-
grate functions in arbitrary dimensions. Yet, the open question has remained: which quadrature
rule(s) should we use for evaluating finite element quantities?

20.1 Integrals in the FE context

Let us first summarize the key integrals to be evaluated numerically within the FE context.
For example for a 2D quadrilateral element with out-of-plane element thickness t, the element
energy is
Z Z 1 Z 1 nQP −1
X
h h
Wk W ε̃h (ξk ) Je (ξk )te ,
 
Ie = W (ε̃ ) dV = W ε̃ (ξ) Je (ξ)te dξ dη ≈
Ωe −1 −1 k=0

while the nodal force vector of the element is


Z Z 1Z 1
T h
BeT (ξ)σ̃ ε̃h (ξ) Je (ξ)te dξ dη

Fint,e = Be σ̃(ε̃ ) dV =
Ωe −1 −1
nQP −1 (20.1)
X
Wk BeT (ξk )σ̃ h

≈ ε̃ (ξk ) Je (ξk )te .
k=0

Further, we may require the element tangent matrix as


Z nQP −1
X
T
Te = Be (ξ) CBe (ξ) dV ≈ Wk BeT (ξk )CBe (ξk )Je (ξk )te . (20.2)
Ωe k=0

For a linear elastic element, the above simplifies with σ̃ = E ε̃h to


Z 1Z 1
Fint,e = Ke Ue with Ke = BeT (ξ)E B̃eT (ξ)Je (ξ)te dξ dη, (20.3)
−1 −1

where we assumed that the material stiffness matrix E is constant across the element. (Other-
wise, E also depends on position ξ.)

Recall that in all of the above relations the shape function derivatives ∇x Nea appear (1) in the
Be -matrix, which depends on ∇x Nea , (2) in the strains ε̃h = Be U , and (3) in the Jacobian Je .
When computing the shape function derivatives, we recall

∇x Nea = Je−1 ∇ξ Nea . (20.4)

20.2 Which quadrature rule to use?

In all of the above integrals, the required quadrature rule depends on the smoothness (or
polynomial order) of the integrands. Since stresses, shape function derivatives, Jacobians, and
B-matrices are not necessarily smooth polynomials, one often cannot (or, due to computational
expenses, is not willing to) achieve exact integration for each element. For example, for the
Q4 element we have seen that Je is linear in ξ, hence Γe = Je−1 is a fractional polynomial,
and Be involves both Γe and ∇ξ Nea . As a consequence, BeT EBe (even if E = const.) is some

139
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

fractional polynomial, which is hard to integrate exactly in general. Therefore, let us introduce
a minimum requirement for the integration order of a particular element type.

Specifically, our minimum requirement is that an undistorted elastic element is integrated ex-
actly. Thus, we define:

Full integration is the minimum quadrature rule required to integrate an undistorted,


homogeneous, linear elastic element exactly.

An element is undistorted, if all internal element angles are preserved between the reference
configuration and its shape in real/physical space (see the discussion at the end of Section 17).
Mathematically speaking, an element is undistorted if J = const. across the element. The
schematics below show examples of an undistorted and three distorted Q4 elements.

b
a

undistorted element distorted elements

Example 20.1. Full integration for various element types

Let us determine the order of full integration for the element types discussed before:

• The 4-node bilinear quadrilateral (Q4) is undistorted, if the element in real space
has the shape of a rectangle. Consider, e.g., a rectangular element of side lengths a and b
in the x1 - and x2 -directions, respectively. As shown in (17.27), evaluating Je from (17.13)
yields
 
1 a 0 ab
Je = = const. ⇒ Je = det Je = = const. (20.5)
2 0 b 4

In general, we have J = const. within an undistorted element.


From (17.14) it follows that Γ = const. as well. Finally, looking at the definition of Be
a and N a depend on ξ.
in (17.18), we realize that only the shape function derivatives Ne,ξ e,η
a −1
Moreover, since ∇x Ne = Je ∇ξ Ne with a constant Je and shape functions Nea that are
a

at most bilinear in x, we conclude that ∇x Nea is at most linear in ξ. For the homogeneous
linear elastic Q4 element we thus have

abte 1 1 T
Z Z
Ke = B (ξ) E B̃ T (ξ) dξ dη, (20.6)
4 −1 −1 | e{z } |{z} | e{z }
∈P1 (R) =const. ∈P1 (R)

where E is a constant due to the homogeneous material assumption. Therefore, the


term to be integrated is a polynomial of at most quadratic order in ξ and η, so that full
integration of the Q4 element in 2D requires nQP = 2 × 2 = 4 quadrature points.

• Full integration of the quadratic 2D elements Q8/Q9 requires nQP = 32 = 9 quadrature


points (the derivation is analogous to the above: the Be -matrix is at most quadratic per
direction).

140
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

• Full integration of the 8-node brick element requires nQP = 23 = 8 quadrature points
by the same argument as for the Q4 element, here extended to 3D.

• For simplicial elements, we showed that strains and stresses are constant across an
element, so that a single quadrature point (nQP = 1) at an arbitrary location inside the
element is sufficient to integrate exactly. Usually, one chooses the element center, which
gives
1 1
W0 = 1, ξ0 = η0 = (in 2D) or ξ0 = η 0 = ζ0 = (in 3D). (20.7)
3 4

• For the quadratic triangle (T6), full integration requires order q = 2, which corre-
sponds to three quadrature points. We note that triangle-based elements require simplicial
quadrature rules (instead of Gaussian quadrature rules), whose weights and quadrature
point locations can be found in look-up tables.

————

Note that not only does full integration guarantee that the stiffness matrix of an undistorted,
homogeneous, elastic element is integrated exactly. By reviewing the element energy and the
element force vector, we make the same observation (i.e., those are integrated exactly as well).
For example, the energy and internal force vector of a linear elastic Q4 element in 2D are
1
Ie = Ue · Ke Ue and Fint,e = Ke Ue (20.8)
2
with
Z 1 Z 1
Ke = BeT (ξ)E B̃eT (ξ)Je (ξ)te dξ dη. (20.9)
−1 −1

follows the same argument. Hence, full integration implies that the element energy, nodal
forces, and stiffness matrix are integrated exactly for any undistorted, homogeneous, linear
elastic element. A summary of full integration for selected element types is given below.

element dim. max. interpolation max. interpolation quadrature nQP for


type d order of Be order of Ke type full integration
Q4 2D linear quadratic Gauss-Leg. 2×2
Q8,Q9 2D quadratic quartic Gauss-Leg. 3×3
brick 3D linear quadratic Gauss-Leg. 2×2×2
quadr. brick 3D quadratic quartic Gauss-Leg. 3×3×3
2-node bar 1D const. const. simplex 1
CST (T3) 2D const. const. simplex 1
CST (T4) 3D const. const. simplex 1
LST (T6) 2D linear quadratic simplex 3
LST (T10) 3D linear quadratic simplex 4

Using an integration rule less than full integration is called under-integration or reduced
integration; the opposite is called over-integration. Which integration order to use depends
on the element type, the material model, etc. As a rule of thumb (and without more knowledge
about the problem at hand), it is generally advised to use full integration. In some special
cases under-integration can indeed be beneficial (e.g., to avoid locking); we will discuss one
such example in Section 22.

141
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

21 Boundary conditions

We recall that solving a mechanical boundary value problem by the finite element method
reduces to solving the global system of equations given by
Fint (U ) = Fext (U ) (21.1)
for the vector of all nodal dofs, U . If the material is linear elastic, then Fint (U ) = KU and
system (21.1) is linear. In general (i.e., for anything but linear elastic behavior), the system
of equations in (21.1) is nonlinear. So far, we have discussed various finite elements types
and the underlying equations to be solved, but we still need to turn our attention to boundary
conditions, which we have not discussed in detail so far. This includes both Neumann boundary
conditions (leading to the specific form of Fext (U )) and Dirichlet boundary conditions (imposing
constraints on the degrees of freedom). These will be discussed in the following.

21.1 External forces & Neumann boundary conditions

The right-hand side vector Fext in (21.1) includes the combined effects of externally applied
body forces ρb and surface tractions t̂ in general. Of course, if forces are applied only to FE
nodes, then the components of Fext are trivially identified. However, in reality we often deal
with distributed (and possibly deformation-dependent) loads, which must be converted into
appropriate external nodal forces first.

In Section 13, we derived the components of the external force vector as


Z Z X Z Z 
a a a a a
Fext,i = ρbi N dV + t̂i N dS = ρbi N dV + t̂i N dS (21.2)
Ω ∂Ω e Ωe ∂Ωe

These integrals can be computed in the same fashion as all other FE quantities (such as,
e.g., nodal forces and stiffness matrices), and it is convenient to use numerical quadrature to
approximate the above integrals in general. For example, for a 2D quadrilateral element (such
as the Q4, Q8 or Q9 of constant thickness t), we may write the contribution from element e to
a
nodal force component Fext,i due to a distributed body force ρb as
Z Z 1 Z 1 nQP −1
X
a
Fext,e,i = ρbi N a dV = ρbi (ξ)Nea (ξ) J(ξ)t dξ dη ≈ Wk ρbi (ξk )Nea (ξk ) tJ(ξk ).
Ωe −1 −1 k=0
(21.3)

If, e.g., a body force such as gravity (ρb = ρg) acts on a body, then the uniformly distributed
gravitational load is distributed into nodal forces, which are computed via (21.3). Here, the
shape functions Nea provide a weighting in the mapping of the distributed load onto the nodes,
as shown schematically for a CST element under constant gravity loading below.

Fext,e,3
g
3 3
rg Fext,e,2
Fext,e,1

2 2
1 1

142
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Analogously, surface tractions result in an external force on node a in direction i, again for
a 2D isoparametric element e, given by
Z Z 1 nQP −1
X
a
Fext,e,i = t̂i N a dS = t̂i (ζ)Nea (ζ) Jζ (ζ)t dζ ≈ Wk t̂i (ζk )Nea (ζk ) tJζ (ζk ). (21.4)
∂Ωe −1 k=0

Note that the surface traction term integrates over the boundary of the element (ζ stands for
either ξ or η, depending on the orientation of the surface on which the tractions are acting), so
in d dimensions we can use a quadrature rule for d − 1 dimensions (e.g., for a 2D element we
use 1D quadrature rule on an element edge). Jζ denotes the Jacobian for the 1D interpolation
along the edge. The lumping of a distributed surface traction t̂ onto the two nodal forces for
2D element is schematically illustrated below.

a a Fext,e,a
t^
e z e
Fext,e,b
b b

Like for internal forces, the global external force vector Fext results from assembling all element
contributions, i.e., from adding the contributions of all external element force vectors onto the
global external force vector (see Section 14.)

When using a variational formulation, we may interpret external forces also in a variational
sense. Specifically, we can formulate the work done by external forces on element e, assuming
that ρb and t̂ do not depend on u, as

∂Wext,e [uh ]
Z Z
a
Wext,e [u] = ρb · u dV + t̂ · u dS ⇒ Fext,e = (21.5)
Ωe ∂Ωe ∂ua
a
The resulting force vector Fext,e acting on node a is exactly the sum of (21.3) and (21.4), if
t̂ and ρb are independent of the nodal displacements, i.e., if Fext does not dependent on U .
Otherwise, caution is required and the representation of Wext,e may be more involved (examples
will be discussed in the following).

Several examples of typical external forces in the FEM context are shown below.

Dx ua n2
P ua pL2/2
L2 p
My l0 pL2/2
P k l pL1/2
L1 p
n n1 pL1/2
constant force/ linear spring linear spring pressure loading
constant moment (linearized deform.) (nonlinear deform.) (Q4 elements)

143
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Before we dive into specific examples, we point out one important aspect of the implementation
and assembly of the overall problem. So far, we have primarily considered problems with context
external forces, so that we had to solve Fint (U ) = Fext . When the external forces also depend
on the nodal unknowns (as, e.g., in Examples 21.2 and 21.3 below), then the problem to be
solved is in fact

f (U ) = Fint (U ) − Fext (U ) = 0. (21.6)

Here, we can still establish a variational structure, if we can write

I(U ) = Iint (U ) − Wext (U ) → min (21.7)


U

with

Iint (U ) = Ane=1
e
Ie (Ue ), W (U ) = Ane=1
e
Wext,e (Ue ), (21.8)

such that
∂I ∂Iint ∂W
f (U ) = (U ) = (U ) − (U ) = Fint (U ) − Fext (U ). (21.9)
∂U |∂U{z } |∂U{z }
Fint Fext

Note that this setup requires that a suitable form of Wext (U ) exists to represent the work done
by the external forces (which can be non-trivial).

When solving equations of the type (21.9), we may need to compute the associated stiffness
matrix T = ∂f /∂U . Since equation (21.9) can be linear or nonlinear in U , we generally refer
to T as the tangent matrix (which in the case of a linear system is identical to the constant
stiffness matrix but in general may depend on U ). We will see in Section 23 that this tangent
matrix can be essential when using numerical solvers. Since both Fint and Fext may depend on
U , we require the complete tangent matrix – including both those contributions from internal
and external forces – so that
∂f ∂Fint ∂Fext
T (U ) = (U ) = (U ) − (U ) = Tint (U ) − Text (U ). (21.10)
∂U | ∂U{z } | ∂U{z }
=Tint =Text
(from before) (new contribution)

Therefore, when discussing the specific examples in the following, we will define the work done by
a , and the associated
the external force, Wext , along with the resulting external nodal forces Fext
external stiffness matrix contribution Text , as introduced above. When assembling the global
system, both contributions – from internal and external forces – must be considered.

Example 21.1. Constant force (or moment)


Consider a constant force P applied to a particular node b whose position is
displacing with ub . The work done by this external force vector is
P
b
b
Wext = P · u . b
(21.11) u
Therefore, the resulting external force vector on any node a is

a ∂Wext
Fext = = P δab , (21.12)
∂ua

144
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

i.e., the constant external force P is applied only to node b. We note that the associated stiffness
matrix (which would be needed for iterative solution schemes) vanishes, since
a
∂Fext
ab
Text = = 0. (21.13)
∂ub

Finally, the analogous formulation holds for applying a constant external


bending moment My in case of beam elements with rotational dofs, e.g., to P
node b in 2D: b

Wext = My θb ⇒ a
Mext =
∂Wext
= My δab . (21.14) My
∂θa
————
Example 21.2. Linear spring undergoing small deformations
Consider a linear elastic spring (stiffness k) attached to a node a along the
n-direction (with unit vector |n| = 1 pointing in the direction of stretch- Dx
ing the spring), which undergoes only small deformations so that linearized ua
kinematics can be used. Therefore, the change of length ∆x of the spring is
(approximately) given by the projection of the displacement ua onto n. In
this case, the spring energy as a function of the displacement ua is k
k k n
Espring = ∆x2 = (ua · n)2 . (21.15)
2 2
To compute the nodal force vectors, we need to be careful since Espring is the spring energy and
not the work Wext performed by the spring. Therefore, we must add Espring to the potential
energy functional instead of substracting it as external work. Recalling concepts from under-
graduate dynamics, we know that the work done by the spring on the body must equal the
potential difference, so Wext = Espring,0 − Espring where Espring,0 = 0 in our case since the spring
is initially unstretched. Hence, we have Wext = −Espring . The resulting force vector on node a
(all other nodal forces being zero) thus follows as
a ∂Wext ∂Espring
Fext = a
=− = −k(ua · n)n, (21.16)
∂u ∂ua
where the minus sign enters due to the use of E instead of Wext (and it makes sense physically:
if node a is displaced along the positive n direction, the spring is stretched and hence the force
on node a must be acting in the opposite direction, since the spring is pulling node a back).

The spring force is an example where the external force vector depends on the nodal displace-
ment ua . The associated tangent stiffness matrix has component Text aa as its only non-zero

(sub)matrix, since
a
∂Fext
ab
Text = = −kn ⊗ n δab = const. (21.17)
∂ub
————
Example 21.3. Linear spring undergoing large deformations
a
If the linear elastic spring from the previous example undergoes large defor-
xa u
mations, then the elastic energy in the spring – accounting for the nonlinear,
exact change in length of the spring – is l0
 2 l
k
E= |xa + ua − x0 | − |xa − x0 | , (21.18)
2 x0

145
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

where xa is the undeformed position of node a (the node to which the spring is attached), x0
is the other end of the spring, i.e., its anchor point, and xa + ua with displacement ua is the
deformed position of node a (so that l0 = |xa − x0 | is the undeformed spring length). External
force vector and stiffness matrix follow, as before, by differentiation.

Example 21.4. Pressure in linearized kinematics


A uniform pressure p is a common boundary condition in engineer- a p
ing applications (from pressure vessels to structures under snow
loads, etc.). In this case, the pressure p acting on a surface ∂Ω n
within linearized kinematics results in tractions t̂ = −pn, where e
n is the outward surface normal (with |n| = 1). Such a boundary
condition can be implemented directly via (21.4). Specifically, for a b
single element surface ∂Ωe with outward normal n, the work done
by a uniform pressure p is
Z Z Xn Xn Z
h a a a
Wext,e = t̂ · u dS = (−p)n · ue Ne dS = −p ue · n Nea dS, (21.19)
∂Ωe ∂Ωe a=1 a=1 ∂Ωe

and the external force contribution from element e (associated with node a) follows as
Z
a ∂Wext,e
Fext,e = = −p nNea dS (21.20)
∂uae ∂Ωe

For example, for a (bi-)linear element in 2D (such as the CST and Q4 elements) element edges
are straight, so that the normal n is constant along each element edge. Further assume that
pressure p acts only on one edge ∂Ω′e of length Le (and an out-of-plane thickness t). In this
special case, the above simplifies to
Z Z
a pn pLe t
Fext = −p nNea dS = − Nea dS = − n, (21.21)
∂Ω′e 2 ∂Ω′e 2

where we exploited that the shape function N a (varying linearly between 0 and 1 on the edge,
if a is a node on the edge) integrates to 1/2. The total external force on node a due to pressure
follows from summing over the force contributions from all elements adjacent to node a, so
X pLe t
a
Fext = (−ne ), (21.22)
2
e∈Na

where Na denotes the set of all elements adjacent to node


a. pLe t/2 is nothing but the magnitude of the resultant n2 pL2/2
force due to the uniform pressure p over the element edge
L2 p
of length Le , which is evenly distributed to the two nodes pL2/2
on that edge. Note that each edge has its own surface nor- +
mal ne , so that the above implies the net effect summed pL1/2
L1 p
over all adjacent elements to node a. One such example
n1 pL1/2
is shown on the right, where both elements contribute to
the middle node.
We close by noting that the external forces are constant only because of the assumption of
small deformations. If we considered large deformations, then the force on the element edge
would change with deformation (as the surface area increases due to deformation, so does
the resultant force due to a uniform pressure). Therefore, the finite-deformation scenario is

146
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

considerably more complex, and the work done by a constant external pressure acting on a
body of deformed volume v = v(U ) is Wext = pv.

————

Example 21.5. Linearly and quadratically varying surface tractions

In case of a linearly varying surface traction t(x) acting on the edge of an element e, the
corresponding nodal forces can be obtained form the above equations. Assume, e.g., a (bi-)
linear element in 2D (such as the CST or Q4) with straight edges, for which a linearly varying
pressure p(x) (which varies between pa and pb , as shown below) applied to an edge of length Le
(and out-of-plane thickness t) translates into the two nodal forces
 a     a
Fext,e Le t 2 1 p
b = . (21.23)
Fext,e 6 1 2 pb

Similarly, having a quadratically varying pressure p(x) applied to the edge of a (bi-)quadratic
element (such as the LST, Q8, Q9) leads to the equivalent nodal forces
 a     a
Fext,e 4 2 −1 p
b
Fext,e  = Le t  2 16 2   pb  . (21.24)
30
c
Fext,e −1 2 4 pc

We note that, of course, one can also apply higher-order tractions to lower-order elements (e.g.,
a quadratically varying load to a linearly interpolated edge). In this case, however, the work
done Wext is approximated by the FE discretization. In the above two examples (which are
shown schematically below), the equivalence is exact.

b pb c pc
b c
Fext,e Fext,e
Le Le Leb pb Le b
Fext,e
a pa a
Fext,e a pa a
Fext,e
linearly varying pressure quadratically varying pressure
on a linear element edge on a quadratic element edge

For more complex element types or more complex loading, integration over the element edge
or surface can again be carried out using numerical quadrature over the element boundary or
surface (each element boundary normal ne can be computed from the elements’ nodal locations).
As before, forces and stiffness matrix follow by differentiation (forces are constant, and the
stiffness matrix vanishes).

————

147
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

21.2 Dirichlet boundary conditions

Essential boundary conditions of the type uai = ûai must be imposed onto the system of equa-
tions Fint (U ) = Fext . This is usually accomplished computationally in one of the two ways
discussed in the following22 . We will first focus on linear elastic examples and later reconsider
the procedure for nonlinear systems, when discussing iterative solvers in Section 23.8.

21.2.1 Substitution

Brute-force substitution is a simple method: we replace the respective equation for uai in the
system KU = Fext by uai = ûai . For example, to enforce u3 = û3 (using an example with only
a single dof per node), we replace the corresponding equation (i.e., the entries in the stiffness
matrix and external force vector), resulting in
  1   1 
K11 K12 . . . · · u Fext
 · · · · 2
·   u   Fext
    2 
 3

 0 0 1 0 0    3 
  u  =  û  . (21.26)


 · · · · ·   u4   4
Fext 
· · · · K55 u5 5
Fext

21.2.2 Condensation

The above substitution method is simple to implement. However, it can be computationally


expensive, since the number of equations remains the same when imposing essential boundary
conditions (this becomes a concern when a significant fraction of the dofs is constraint by
essential boundary conditions). The condensation method removes from the linear system to
be solved those equations imposing essential BCs (as we already saw in Example 5.2).

To understand this, let us enforce u1 = û1 and u2 = û2 (again, using an example with only a
single dof per node) in the global system KU = Fext . As the two displacements u1 and u2 are
enforced, we do not know the corresponding reaction forces, so the system to the be solved is
  1   
K11 K12 K13 K14 K15 û ?
K21 K22 K23 K24 K25   û2   ? 
    
K31 K32 K33 K34 K35   u3  =  F 3  (21.27)
    ext 
K41 K42 K43 K44 K45   u4   F 4 
ext
K51 K52 K53 K54 K55 u5 5
Fext

Notice that we can partition the system into subsystems (as indicated above by the solid lines
in the matrix equation), separating between dofs that impose a Dirichlet (D) or Neumann (N)
boundary condition. This allows us to rewrite the above system of equations by introducing
22
We mention that similar techniques can also be employed to impose more complex conditions such as con-
straints of the general type

f (ua , ub , . . .) = 0, (21.25)

which become important, e.g., when enforcing rigid links between nodes (|xa + ua − (xb + ub )| = const.), or
systems of bodies including rigid bodies (i.e., rigid links and rigid angles), or imposing deformation/motion of a
node along an inclined surfaces (ua = ua n with fixed, known unit vector n). Such constraints can be implemented
in a similar fashion but are not discussed here further (we refer to the rich FEM literature).

148
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

sub-matrices and sub-vectors, which are associated with each type of boundary condition, as
follows:
    
 KDD KDN   UD   FD 
    
    
  = . (21.28)
    
    
 KND KNN   UN   FN 

Note that, for such substructing of the system of equations, the dofs do not necessarily have
to be in order (as in the above example). In general, the dofs associated with D- and N-type
boundary conditions will be distributed all over vector U , but one can still arrive at the above
form by re-grouping or re-sorting vectors and matrices, or by taking the corresponding block
matrices.

Ultimately, the above substructuring admits solving for the unknown displacements UN (in
this case UN = (u3 , u4 , u5 )T ) efficiently as follows. After splitting (21.28) into two systems of
equations, the “bottom” one reads KND UD + KNN UN = FN , which can be solved for

−1
UN = KNN (FN − KND UD ) (21.29)

where UD is known, since it contains only Dirichlet boundary conditions. Finally, the complete
solution is U = (UD , UN ).

The advantage of this method is the reduction in size of the system to be solved. The dis-
advantage is that it is more involved to implement and, if implemented poorly, the matrix
modifications can be computationally expensive as well (in such a case, it can be even more
expensive than the substitution technique when a small number of essential boundary condi-
tions is being applied to a large system, so the reduction in size is negligible). However, with
state-of-the-art implementations this computational overhead should not be significant.

Overall, we have now discussed how we go from a mathematical model to an FE-discretized


model (based on particular choices of the element type, the quadrature rule, etc.) and to an
FE-discretized boundary value problem (which requires FE-discretized boundary conditions) –
as illustrated below.

g g
F1
u(x) p ua p ua
+ F2
x2 F3
x
e2
e3 x1
e1 ¶W ¶We ¶We
x3 2
P P P1 P

continuous BVP FE-discretized body FE-discretized BVP

149
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

22 Element defects: locking and hourglassing

The bilinear Q4 element is a classical example for an element type which displays a so-called
element defect, i.e., a spurious numerical artifact, when using full integration in certain
scenarios – specifically, when used to simulate beam bending.

To demonstrate this, we consider a rectangular element having side x2


lengths a and b in the x1 - and x2 -directions. If bending moments M M b x1 M
are applied to the two vertical edges, then the element is expected
to undergo pure bending. a
In an actual (slender) Euler-Bernoulli beam, we know from elastic beam theory that the stresses
in the beam vary linearly across the thickness, and that the only non-zero stress component is
the axial stress. Therefore, the stress distribution in a slender beam of thickness b, as shown
below, is
x2
σ11 = − σmax , σ22 = σ12 = 0, (22.1)
b/2
where σmax is the maximum tensile stress reached on the top or bottom surface of the beam (at
x2 = −b/2 in the shown case). From Hooke’s law in 1D we obtain the strains
σ11 x2 σmax σ11 x2 σmax
ε11 = − =− , ε22 = −ν =ν , ε12 = 0. (22.2)
E Eb/2 E Eb/2

Now, let us approximate the beam as a single Q4 element of dimensions a × b (as shown
above) and try to find the analogous solution. Since we cannot apply a moment, we instead
apply horizontal forces to all four nodes of the element, which are obtained from lumping the
distributed beam stresses to the nodes. According to relation (13.20), which we found for the
externally applied forces, the force on node 1 becomes (with σ11 from (22.1) and shape function
Ne1 of the Q4 element evaluated on the vertical edge)
Z Z Z 1
1 1 x2 b
Fext,1 = t̂Ne dS = (−σ11 )Ne dS = σmax Ne1 (ξ = −1, η) t dη
∂Ωe ∂Ωe −1 b/2 2
Z 1 (22.3)
(1 − (−1))(1 − η) b σmax tb σmax tb
= η σmax t dη = − = −F with F = .
−1 4 2 6 6
Note that the minus in (−σ11 ) is due to the negative cut, so the traction t̂ applied at the left
edge of the element responsible for the forces is in fact −σ11 . Further, dS = tJ dη with J = b/2
for the 1D interpolation along the edge. On the opposite edge, the solution is the same without
the minus sign. Analogously, we obtain
Fext,2 = F, Fext,3 = −F, Fext,4 = F. (22.4)
That is, the bottom edge is stretched, while the top edge is compressed (as in beam bending).

smax smax F F U U
x2 4 h 3 h
x1 x x
1 2
smax smax F F U U
a
stress distribution due to Q4 element with equivalent elastic Q4 element deformed
the applied moments nodal forces by the nodal forces

150
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Solving the problem for the case of linear elasticity reduces to a simple linear system of equations
(which involves the element stiffness matrix Ke of the Q4 element, which is not written out
here for brevity):

−F
 
 0 
 
F 
 
 0  σmax tb
Ke Ueh = Fext with [Fext ] = 
 , F = . (22.5)
−F 
 6
 0 
 
F 
0

By removing rigid-body motion, the problem can be solved by inverting Ke , which results in
the solution
−U
 
 0 
 
U 
 
h
 0  σmax (1 + ν)(1 − 2ν)
[Ue ] = 
−U 
 with U =a , (22.6)
  E 2(1 − ν) + (a/b)2 (1 − 2ν)
 0 
 
U 
0

where we used the exact element forces and stiffness matrix (since the element is undistorted,
we can easily find the exact solution by full integration using 2 × 2 quadrature points).

The resulting strains within the element are evaluated by inserting (22.6) into the approximate
element strains, which yields
U U
εh11 = − η, εh22 = 0, εh12 = − ξ. (22.7)
a b
These are to be compared to (22.2). While the axial strain component εh11 is physically reason-
able (and the lack of a transverse strain εh22 – worst case – makes the element too soft against
bending), the presence of a non-zero shear stress εh12 is problematic. This so-called parasitic
shear is not physical but a numerical artifact (elastic Euler beams produce no shear stresses,
cf. (22.2)). This parasitic shear contributes to the energy of the element, so that – when min-
imizing the potential energy in a boundary value problem – this shear component introduces
artificial stiffness. This becomes apparent when calculating, e.g., the angle of bending θ of the
beam in the above problem.

F qapprox F qexact

My My

F F

Comparing the exact angle θ (obtained form beam theory) to the approximate one (obtained

151
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

from the above construction), one finds


θapprox 1 − ν2
= !2 . (22.8)
θexact 1−ν a
1+
2 b
Notice that, as the Q4 element becomes increasingly slender (a/b → ∞), the numerically ob-
tained angle θapprox approaches 0. That is, the element shows what is known as shear locking:
in case of long and slender elements (a/b ≫ 1) the high shear strain and associated elastic
energy prevents the element from deforming, it “locks”.

With the objective of finding a remedy to the locking problem, let us use numerical quadrature
to evaluate the element quantities of interest. For example, for the energy we have
Z nQP −1
1 h t X
Ie = ε · C εh dV ≈ Wk εh (ξk ) · C εh (ξk ) J(ξk ). (22.9)
Ωe 2 2
k=0

We showed before that full integration requires nQP = 2 × 2 quadrature points (and we have
demonstrated above that such exact integration leads to element locking under bending).

If instead we use reduced integration with only a single quadrature point (nQP = 1) located
at ξ0 = 0, then notice that the strain fields in (22.7) vanish at the quadrature point location
ξ = η = 0. Therefore, the strains in this case produce no energy. In other words, when using
reduced integration, any strain field of the form (22.7) can appear without causing any energy
and therefore also without causing any resistance from the element in terms of nodal forces.
This is a zero-energy mode of the under-integrated Q4 element and a serious defect. The
resulting deformation of elements undergoing alternating strains (22.7) is a numerical artifact
and often referred to as hourglass mode or chicken-wire mode because of its appearance.

Note that not only the underintegrated Q4 element has such a zero-energy mode. For example,
the Q8/Q9 elements have a similar zero-energy mode with curved element edges (shown below).

+ + + +
+ +
+ + + +
+ +
+ + + +

underintegrated Q4 mesh showing hourglassing simulation example zero-energy mode of an


with hourglassing underintegrated Q8 element

Finally, we note that it is possible to use selective integration, which applies different quadra-
ture rules for different energy contributions. For example, integrating the Q4 element with a
2 × 2 quadrature rule for the nominal strains εh11 and εh22 while using reduced integration with a
single quadrature point at ξ = 0 for the shear strain εh12 removes the spurious shear contribution
while maintaining the correct stiffness against axial deformation. Unfortunately, selective inte-
gration is harder to implement (since different strain components must be treated differently),
not directly applicable beyond linear elasticity (since there is no superposition of deformation
modes), requires expert knowledge, and should hence be used with caution.

Overall, take-home messages are (i) to not use Q4 elements to simulate beam bending (and
instead chose another type of element) and (ii) to be generally careful with reduced integration
as zero-energy modes can appear as spurious deformation modes in the obtained solution.

152
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

A further type of locking that occurs frequently when simulating, e.g., rubbery materials or
biological tissues is volumetric locking. Those materials are characterized by being incom-
pressible (or close to incompressible). That is, they are extremely stiff against volumetric
deformation. In mechanical terms, this means for a linear elastic material that its Poisson’s
ratio ν → 21 or, equivalently, that the ratio of bulk modulus K to shear modulus G approaches
K/G → ∞. In this particular scenario, classical finite elements behave overly stiff and the
above formulation becomes problematic. Observe, e.g., that all displacements in (22.6) tend
to 0 as ν → 21 . Likewise, the material stiffness matrices (13.22) and (13.23) in 3D and 2D,
respectively, increase beyond bounds if ν → 21 . Therefore, volumetric locking appears in this
limit and elements tend to behave overly stiff. As a more intuitive explanation, think of the
degrees of freedom of a finite element in the case of incompressibility: in an incompressible
material the volume of each element must be conserved, which implies that its nodes cannot
move independently – yet they have independent degrees of freedom. This is a contradiction,
which results in the imposition of a rigid constraint through the exploding stiffness of the el-
ement against volumetric deformation. As a remedy, special incompressible elements have
been introduced, which we will not discuss further here, since we focus on linear elasticity and
such problems typically arise at finite strains (where rubbery materials and biological tissues
operate). Yet, we keep in mind that shear locking and volumetric locking are element defects
that must be considered when conducting FE analyses.

We close by outlining one simple test that one can perform to verify the accuracy of a particular
element type. The so-called patch test: one constructs a mesh of distorted elements (as shown
below) and applies uniform tractions on its boundaries corresponding to a homogeneous state
of stress (such as a uniform pressure p applied to its boundaries). The test is passed, if the FE
solution correctly represents affine deformation (i.e., constant strains within elements), which
is the analytical solution for this scenario.

p p p p

153
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

23 Iterative solvers

The solution of linear elastic problems is easily found by solving a linear system of equations, viz.
Fint = KU = Fext so that U = K −1 Fext (assuming that rigid-body modes have been suppressed
by the application of appropriate essential BCs, as will be discussed in Section 23.9). In case
of nonlinear problems – such as those arising from more complex material models and from
the geometric nonlinearity stemming from large deformations – an iterative solution method is
required to solve the generally nonlinear system Fint (U ) = Fext (U ). Note that the external
forces may or may not depend on the deformation. Here, we discuss a few common examples
of such iterative solvers, the most important one being Newton-Raphson iteration.

The problem to be solved can be written in the general form


f (U ) = Fint (U ) − Fext (U ) = 0 (23.1)
where in many cases we assume that Fext is independent of U . This, however, is not generally
true – consider, e.g., nodes attached to elastic springs so the nodal force depends on the position
of the node, or a so-called follower force whose direction depends on the body’s deformation
(e.g., a force which remains perpendicular to a deforming beam), or pressure loading (e.g., the
inflating of a balloon, where the forces due to the applied pressure depend on the deforming
surface area).

All iterative solvers start with an initial guess U0 (e.g., U0 = 0), which is then corrected to find
an improved approximation by the update
Un+1 = Un + ∆Un (23.2)
which is applied repeatedly until convergence is achieved. An iterative scheme converges if
∆Un → 0 as n → ∞, or equivalently f (Un ) → 0 as n → ∞. The various solution methods
discussed in the following differ primarily in the way ∆Un is computed based on a given vector
Un . Importantly, the fact that an iterative solver converges does not necessarily imply that
it converges to the correct equilibrium solution. For the special case of linear elasticity there
exists a unique solution, but that is not generally the case.

23.1 Netwon-Raphson (NR) method

The Newton-Raphson method (introduced by Newton in 1669 and generalized by Raphson


in 1690) is the most common technique for solving nonlinear systems of the above type. It
starts with a Taylor expansion, assuming a small correction ∆Un , so that
0 = f (Un+1 ) = f (Un + ∆Un )
∂f (23.3)
(Un ) ∆Un + O |∆Un |2 .

= f (Un ) +
∂U
If we neglect the higher-order terms, then the above presents a linear problem
∂f
f (Un ) + T (Un ) ∆Un = 0, where T (Un ) = (Un ) (23.4)
∂U
is the tangent matrix. By assuming that the latter is invertible, we arrive at

∆Un = − [T (Un )]−1 f (Un ) (23.5)


Note that we have thus broken the nonlinear problem (23.1) (which is hard to solve) into many
incremental linear problems (23.4) (which are easy to solve). This is schematically shown below.

154
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Newton-Raphson damped Newton-Raphson


f (U) f (U)
f (U0) f (U0)
f (`U0)

f (`U0) aDU1
aDU2
U3 U2 U U0 U U2 U1 U0 U
... DU 1
2 DU1 DU1

For the mechanical problem in linearized kinematics, the tangent matrix components becomes
(assembling over all elements)
 Z 
∂Fint ∂Fext ∂ ne ∂Fext
T (U ) = − = A BeT σ̃ dV −
∂U ∂U ∂U e=1 Ωe ∂U

ne
Z  (23.6)
T ∂Fext
= A Be C̃Be dV −
e=1 Ωe ∂U

where
∂ σ̃
C̃ = (23.7)
∂ ε̃
is the incremental material stiffness matrix. In general, we have C̃ = C̃(ε̃), i.e., for
nonlinear problems the incremental stiffness depends on the current state of deformation and
hence on the nodal displacements U . Only for the special case of linear elasticity is C̃ = E a
constant matrix containing the elastic moduli and being independent of deformation. As shown
before, we can also write for each element e
Z
Te (U ) = BeT C̃Be dV, (23.8)
Ωe

where C is, again, the incremental stiffness matrix of the


R material model. In the special case
of linear elasticity, we have C̃ = E = const. and Te = Ωe BeT EBe dV = Ke is the constant
element stiffness matrix.

The Newton-Raphson solver requires that det T ̸= 0 in order to find a solution, which is
guaranteed in linear elasticity if no rigid-body mode exists, as discussed in Section 23.9 (i.e.,
the linearized system has no zero-energy mode so that U · T U ̸= 0 for all admissible U ̸= 0).

For linear elastic problems with constant external forces, the Newton-Raphson solver converges
in only a single step, since Fint = KU and therefore T = K = const., so that

Un+1 = Un + ∆Un = Un − T −1 [Fint − Fext ]


= Un − K −1 [KUn − Fext ]
(23.9)
= Un − Un + K −1 Fext
= K −1 Fext .

Let us close by mentioning the (dis)advantages of the Newton-Raphson scheme. On the


downside, the Newton-Raphson method requires the tangent matrix, which may be expensive

155
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

to compute, it may not always be available analytically, and it may require significant com-
puter memory based on the matrix size (for a mesh having n nodes in d dimensions, we have
T ∈ Rnd×nd ). In addition, the tangent matrix in nonlinear problems is not guaranteed to be
invertible; this is particularly problematic in case of simulations involving mechanical instabil-
ity. On the plus side, the Newton-Raphson method generally displays quadratic convergence
with iterations, which is why it is favorable for the solution of nonlinear problems (and it also
solves linear problems in one step, as shown above). If Newton-Raphson is not a viable option,
then the following techniques offer alternatives.

23.2 Damped Newton-Raphson (dNR) method

A slight modification of the Newton-Raphson method, the damped Newton-Raphson method


is beneficial, e.g., when the NR method tends to overshoot (e.g., in case of oscillatory energy
landscapes or multiple minima such as in large-strain elasticity).

The iterative scheme is identical to the classical NR method described above, except that
Un+1 = Un + α ∆Un with α ∈ (0, 1) (23.10)
The damping parameter α can be chosen constant or adjusted based on convergence.

23.3 Quasi-Newton (QN) method

The Quasi-Newton method is the same as the classical NR method with the exception that
one does not use the actual tangent matrix T for computational simplicity or efficiency. Its goal
is hence to avoid the expensive computation of T (U ) and its inversion at each iteration step.
To this end, one introduces a matrix Bn and updates its inverse directly.

The general algorithm is as follows:

(1) start with an initial guess U0 and matrix B0 = T (U0 ),


(2) compute ∆Un = −Bn−1 f (Un ) and Un+1 = Un + ∆Un and
Bn−1 zn − ∆Un ⊗ ∆Un Bn−1

−1 −1
Bn+1 = Bn − with zn = f (Un+1 )−f (Un ). (23.11)
∆Un · Bn−1 zn
−1 −1
We omit the full derivation of the update for Bn+1 here for brevity. The idea is that Bn+1 and
−1
Bn are approximately rank-one-connected using the Sherman-Morrison formula. The added
benefit is that not only does T not have to be recomputed exactly but also can the inversion or
linear solver be skipped since the updated inverse is computed explicitly.

23.4 Line search method

The line search method can be used as an improvement for other nonlinear iterative solvers.
Similar to the damped Newton-Raphson scheme, updates are made according to
Un+1 = Un + β ∆Un , (23.12)
where, unlike in Section 23.2, β is not a constant but chosen such that f (Un+1 ) = 0. For
example, we may find β from solving
∆Un · f (Un + β ∆Un ) = 0. (23.13)

156
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

This is generally a nonlinear but scalar problem to be solved for β ∈ R, which can be solved by
bisection, regula falsi, secant, and other methods.

Notice that (23.13) is in fact the stationarity condition of the minimization problem
β = arg inf ∥f (Un + β ∆Un )∥2 , (23.14)
which is the motivation for the nonlinear least-squares method described below.

23.5 Nonlinear Least Squares

The family of methods based on nonlinear least squares aim to minimize

r(U ) = ∥f (U )∥2 = f (U ) · f (U ) → min (23.15)


U

which results in the stationarity condition


∂r
(U ) = 0. (23.16)
∂U
This approach is helpful, e.g., in case of over-constrained systems, since the formulation of the
residual r does not require as many equations as U has unknowns (analogous to the weighted-
residual method of least squares in Section D.4). Application of the Newton-Raphson technique
to this nonlinear system of stationarity equations leads to
∂ ∂r −1 ∂r
 
∆U = − (Un )
∂U ∂U Un ∂U
−1 (23.17)
T

∂f ∂T
= − T T (Un ) (Un )f (Un ) + (Un )f (Un ) T T (Un ) f (Un ).
∂U ∂U
If updates are small, we can neglect the second term in brackets (which requires higher deriva-
tives than what is commonly computed in FEM), which gives
−1 T
∆U = − T T (Un )T (Un )

T (Un ) f (Un ). (23.18)
This latter form is known as the Gauss-Newton method. Note that this reduces to Newton-
Raphson for standard problems (i.e., those with as many equations as unknowns). However,
Gauss-Newton can also be applied to over-determined systems (i.e., in case of having to solve
more equations than unknowns).

23.6 Gradient flow method

Although not necessarily with a proper physical meaning, the gradient flow method (also
known as gradient descent) has become popular as an iterative solver for quasistatic problems.

The idea is to replace the quasistatic equation f (U ) = 0 by the dynamic evolution equation

C U̇ = −f (U ) (23.19)

with, e.g., C = cI and c > 0, and starting from some initial guess for U . It is obvious that,
as f → 0, we have U̇ → 0 and thus the method converges to a solution U which satisfies
f (U ) = 0. Discretizing the above may lead to, e.g.,
C U̇n+1/2 = −f (Un ) and Un+1 = Un + ∆t U̇n+1/2 , (23.20)

157
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

starting from some initial guess U0 . Although there is no guarantee to reach an equilibrium
solution, the method is popular because it does not require a tangent matrix and is quite robust
and trivial to implement. For example, using a simple backward-Euler discretization for the
time derivative and C = cI, we obtain
1
Un+1 = Un − f (Un ). (23.21)
c

23.7 Conjugate Gradient (CG) method

The conjugate gradient method follows the idea of iterating into the direction of steepest
descent in order to minimize the total potential energy (as a variation, it can also be applied to
the nonlinear least squares problem).

Here, the update is

Un+1 = Un + αn Sn (23.22)

where both the direction Sn and increment αn are determined in an optimal way as follows.

The conjugate direction is updated according to

Sn = −f (Un ) + βn Sn−1 (23.23)

with β computed from the current solution Un and the previous solution Un−1 , according to
one of several options (Polak-Ribière, Fletcher-Reeves, etc.). Then, the scalar increment αn is
obtained from a line search to find

αn = arg min r (Un + α Sn ) . (23.24)

An advantage of the conjugate gradient technique is that, as for gradient flow, no tangent
matrix is required. Yet, it is more robust and converges faster than the latter. A variation
of this scheme, originally developed for atomistics but also applicable to the FE method (and
oftentimes converging faster than CG) is the so-called Fast Inertial Relaxation Engine
(FIRE).

23.8 Dirichlet boundary conditions and iterative solvers

We would like to briefly re-assess the enforcement of essential boundary conditions in the context
of iterative solvers, where we do not solve a simple linear system but we use iterative techniques
to solve a nonlinear system in incremental linear steps. In order to impose uai = ûai , we discuss
two implementation strategies.

Strategy I. To enforce uai = ûai , we can include this Dirichlet boundary condition directly
in the initial guess (i.e., make sure that uai = ûai within vector U0 ) and subsequently iterate
according to

Un+1 = Un + ∆Un (23.25)

where the system of equations is modified such that ∆uai,n = 0 for all iterative steps n. The
latter can be accomplished by the same substitution/condensation techniques we used above to

158
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

impose essential boundary conditions. For example, when using a Newton-Raphson solver (see
Section 23.1), we must solve

T (Un )∆Un = −f (Un ), (23.26)

where we now modify the row of the tangent stiffness matrix T (Un ) and right-hand-side vector
f (Un ) such that ∆uai,n = 0 is enforced (see Section 21.2).

While this procedure is computationally simple (and fully analogous to the imposition of Dirich-
let boundary conditions in the linear elastic problem discussed previously in Section 21.2), it
comes with one disadvantages: when we enforce the boundary condition uai = ûai directly in the
initial guess U0 (while using, e.g., the solution from a previous load step as the initial guess
for all remaining dofs in U0 ), the resulting initial guess U0 may include a rather strong local
deformation surrounding node a. This can lead to large local strains and stresses within adja-
cent elements and possibly lead to nonsensical solutions or a failure of convergence in nonlinear
problems.

Strategy II. As a remedy to the above problems, we may alternatively choose to not set
uai = ûai in the initial guess and simply chose U0 as, e.g., the solution from the previous load
step (or any other more or less sophisticated guess). In subsequent iterations, we then solve

T (Un )∆Un = −f (Un ), (23.27)

where we modify both T (Un ) and f (Un ) to enforce

∆uai,n = ûai − uai,n (23.28)

so that the incremental update at iteration step n,

uai,n+1 = uai,n + ∆uai,n = uai,n + ûai − uai,n = ûai



Un+1 = Un + ∆Un ⇒ (23.29)

imposes uai = ûai in a more natural, incremental fashion without modifying the initial guess.

23.9 Rigid-body motion & zero-energy modes

Having discussed solvers that involve the global stiffness (or tangent) matrix, it is important to
remember that those matrices are in general not invertible (i.e., they are singular) unless proper
boundary conditions are applied. Like in a dynamical system (as discussed, e.g., in Dynamics)
any elastic stiffness matrix K (and in the general nonlinear case the tangent matrix T ) has as
many zero eigenvalues as it has zero-energy modes U ∗ . This can be understood by recalling
that the total potential energy of the FE-discretized body with global stiffness matrix K and
in the absence of any external forces is
1
I = U · KU . (23.30)
2
If a particular global vector of the nodal displacements U ∗ ̸= 0 corresponds to rigid-body
motion (i.e., translations ua = u for all a = 1, . . . , n possibly with rigid rotations superim-
posed), then we must have I = 0 since rigid-body motion does not contribute any strain energy.
Consequently, we must have

U ∗ · KU ∗ = 0. (23.31)

This, in turn, implies that U ∗ is an eigenvector of K with a corresponding zero eigenvalue.


In this case KU ∗ = 0, which makes sense physically, since rigid-body motion causes no nodal

159
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

forces, so Fint = KU ∗ = 0. Hence, K has (at least) one zero eigenvalue and is thus not
invertible. Since this holds true for each rigid-body mode U ∗ , K has as many zero eigenvalues
as rigid body modes. If such rigid-body modes exist, then no unique solution can be found,
since both U and U + U ∗ could be a solution (since K(U + U ∗ ) = KU + KU ∗ = KU = Fext ).
This manifests in K not being invertible, so trying to find U = K −1 Fext fails. We saw this
problem arise in Example 5.2.

When considering large, nonlinear deformation, mechanisms in structures may also constitute
zero-energy modes (e.g., a pinned-pinned buckled beam has two stable equilibria, and the dis-
placement from one to the other is a so-called mechanism, i.e., a zero-energy mode). Such a
zero-energy mode, which is not a rigid-body mode, also corresponds to a zero eigenfrequency.

rigid-body modes in 2D

rigid-body modes in 3D

In any FE model, we must suppress each rigid-body mode via appropriate essential boundary
conditions before solving a boundary value problem. In 2D we need three essential bound-
ary conditions to suppress rigid-body translations and rotations, in 3D we need a total of six
(assuming that nodes carry only displacement dofs), as shown above.

Finally, if nodes carry further dofs beyond displacements (e.g., in case of beam elements or
coupled problems), the situation must be reassessed to make sure all possible rigid modes are
suppressed.

160
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

24 Dynamics

Our discussion of mechanical boundary value problems so far has been limited to quasistatics.
The term quasistatics refers to the assumption of negligible inertial effects. This does not
necessary mean that solutions are time-independent, since material behavior can also be time-
dependent. For example, in viscoelasticity or viscoplasticity, we may have constitutive laws of
the type σ = σ(ε, ε̇) which clearly depend on the loading rate and hence on time, irrespective
of the presence of inertial effects. Inertial effects (or, in other words, the dynamic response)
gain importance when the mass of the body affects the dynamics and leads to, e.g., vibrations.
This is intimately tied the boundary conditions of a problem and creates an initial boundary
value problem. Static loading is generally time-independent. Dynamic loads are time-dependent
ones, for which inertial effects are not negligible. Quasistatic loading is time-dependent but is
sufficiently slow such that inertial effects can be safely ignored.

Here, we will consider the extension of the mechanical boundary value problem discussed previ-
ously to dynamic problems, in which inertial effects matter. In an extension of the (quasi-)static
version of Section 13, the strong form of the dynamic problem in linearized kinematics reads

σij,j + ρ bi = ρ üi in Ω
 u (x, t) = û (x, t) on ∂ΩD
 i i (24.1)
σij nj (x, t) = t̂i (x, t) on ∂ΩN

with suitable initial conditions. Now, we have u : Ω × R → Rd (i.e., the displacement field
u(x, t) varies with position x ∈ Ω and time t ∈ R), and it requires sufficient differentiability
in both space and time. Notice that the quasistatic case is easily recovered by neglecting the
inertial term ρü, i.e., if the mass density ρ or the acceleration a(x, t) = ü(x, t) are negligible
or vanish.

Analogous to the quasistatic case, we can cast the strong form (24.1) into a variational structure
by making use of the so-called action principle. To this end, we define the action of a deforming
and moving body as
Z t2
A[u] = L[u] dt with L[u] = T [u] − I[u] (24.2)
t1

being the Lagrangian. I is the potential energy functional (introduced in Section 6), and T
denotes the kinetic energy functional
Z
ρ 2
T [u] = |u̇| dV (24.3)
Ω 2

For a variational material model with energy density W , and assuming that constant body
forces ρb and surface tractions t̂ are imposed, we thus arrive at the action
Z t2 Z  Z Z 
ρ 2 
A[u] = |u̇| − W (ε) dV + ρb · u dV + t̂ · u dS dt. (24.4)
t1 Ω 2 Ω ∂ΩN

Note that, without dynamical effects (u̇ = 0), this action reduces to the negative of the potential
energy functional (13.2), which we used in quasistatic boundary value problem.

161
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The action principle (also known as the principle of stationary action23 ) states that the
solution u(x, t) renders A stationary under suitable initial conditions, i.e.,

u = arg stat {A[u] : s.t. ICs} (24.5)

This condition is analogous to rendering the total potential energy stationary, which we used
so far in the quasistatic context. Here, we no longer minimize the total potential energy but we
render the total action stationary with respect to the displacement field.

By taking the first variation of the action A in (24.4) with respect to u (again using the
divergence on the stress-term, as done in quasistatic; cf. (13.5)), we obtain the stationarity
condition
Z t2 Z Z Z 
δA[u] = (ρ u̇i δ u̇i − σij δui,j ) dV + ρbi δui dV + t̂i δui dS dt = 0. (24.6)
t1 Ω Ω ∂ΩN

The dynamic weak form is thus given by


Z t2 Z Z Z 
G[u, v] = (ρ u̇i v̇i − σij vi,j ) dV + ρbi vi dV + t̂i vi dS dt = 0. (24.7)
t1 Ω Ω ∂ΩN

Let us, for simplicity of the derivation, assume that, instead of giving two initial conditions
per point (e.g., imposing initial displacements and velocities), we seek a stationary solution
u(x, t) which satisfies the conditions u(x, t1 ) = u1 (x) and u(x, t2 ) = u2 (x) (i.e., we assume
the displacements are known at the initial and final times t1 and t2 , respectively). Of course, this
is hardly ever the case in reality – and the derived concepts apply equally to the case of known
initial displacements and velocities; yet, this assumption simplifies our derivation significantly.

The above weak form indicates the space of solutions, and it particularly lets us conclude that

v ∈ U0 = v ∈ H 1 (Ω) × H 1 (R) : v = 0 on ∂ΩD and at t = t1 or t = t2 ,



(24.8)

where the last two conditions stem from our assumption of u(x, t1 ) = u1 (x) and u(x, t2 ) =
u2 (x) being known, and we need the solution to have square-integrable first derivatives with
respect to both time and space.

To remove the time derivative v̇, we integrate by parts in time (the “boundary term” vanishes
since v = 0 at t = t1 and t = t2 ), which leads to
Z t2 Z Z Z 
G[u, v] = − (ρ üi vi + σij vi,j ) dV − ρbi vi dV − t̂i vi dS dt = 0 (24.9)
t1 Ω Ω ∂ΩN

Note that, without the first term, we recover the quasistatic formulation (cf. Section 13).

Since in the dynamic problem the displacement field depends on time, we here introduce a semi-
discretization, i.e., we discretize the solution in space but not (yet) in time. This implies that
we introduce shape functions for the interpolation in space, where – now – the nodal unknowns
ua become functions of time:
n
X n
X
h a a h
u (x, t) = u (t)N (x) and v (x, t) = v a (t)N a (x). (24.10)
a=1 a=1
23
Various references call this dynamic variational principle the “principle of least action”, which is in general
not correct, as the solution must not necessarily be a minimizer of A; it is merely guaranteed to be a stationary
point. For quasistatic problems, the solution is indeed a maximizer, since A[u] = −I[u] in that case.

162
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The shape functions N a (x) can be the same introduced in previous sections (simply imagine
the nodes in a mesh moving over time).

The semi-discretization in (24.10) allows us to calculate time derivatives, e.g., the approximate
velocity and acceleration fields as
n
X n
X
h a a h
u̇ (x, t) = u̇ (t)N (x) and ü (x, t) = üa (t)N a (x). (24.11)
a=1 a=1

Insertion into (24.9) results in the semi-discrete weak form,


n
Z t2 X " n
X Z Z
h h b
G[u , v ] = − vi üai ρ N a N b dV + σij N,jb dV
t1 b=1 a=1 Ω Ω
Z Z  (24.12)
− ρbi N b dV − t̂i N b dS dt = 0
Ω ∂ΩN

which must hold for all v b (t) histories that vanish at t1 and t2 . Because it must hold for all
v b (t) histories, we may conclude that the term in brackets must vanish for all b = 1, . . . , n and
i = 1, . . . , d (n being the number of nodes, d the number of dimensions). These n × d equations
are the discretized equations of motion.

As before, we collect all (now time-dependent) nodal dofs in the vector


U (t) = {u1 (t), . . . , un (t)}, (24.13)
so that solving (24.12) for all v b (t) is equivalent to solving the equation of motion

M Ü + Fint (U ) − Fext (t) = 0 (24.14)

with
Z
Mijab = δij ρ N a N b dV

Z Z Z (24.15)
b
Fint,i = σij N,jb dV, b
Fext,i = b
ρbi N dV + b
t̂i N dS.
Ω Ω ∂ΩN

Matrix M is called the consistent mass matrix, and we write Fext = Fext (t) to indicate
that external forces are likely to depend on time (and they may also depend on displacements,
as discussed before). Relation (24.14) is the dynamic governing equation to be used in the
finite-element setting. Of course, for quasistatic problems we have Ü = 0, so (24.14) reduces
to the static version (13.19). Let us look into the new term involving mass matrix M .

Example 24.1. Consistent mass matrix of the 2-node bar element


The consistent mass matrix for a 2-node bar element (using the
1
isoparametric formulation) is computed from its shape functions 1 u 2 u2
1−ξ 1+ξ x
N 1 (ξ) = , N 2 (ξ) = with ξ ∈ [−1, 1].
2 2
From the definition (24.15) we obtain for a bar of length Le , constant mass density ρ and
cross-sectional area A, and a total mass me = ρALe
Z Z 1  
ab a b a b Le me 2 1
M = ρN N dV = ρN N A dξ ⇒ Mbar,1D = . (24.16)
Ω −1 2 6 1 2

163
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Note that this is the consistent mass matrix for 1D motion, i.e.,
U = (u1 , u2 )T . If each node moves in 2D and hence has two dofs u 2
1
u22
1
per node in the plane, i.e., U = (u11 , u12 , u21 , u22 )T , then each pair of 1 u 1 2 u21
dofs (horizontal and vertical) is linked by the above mass matrix, x
so that the total consistent mass matrix in 2D becomes
     
2 0 1 0 0 0 0 0 2 0 1 0
me 
0 0 0 0 m
 + e 0 2
 0 1 m
 = e 0
 2 0 1
Mbar,2D = . (24.17)
6 1 0 2 0 6 0 0 0 0 6 1 0 2 0
0 0 0 0 0 1 0 2 0 1 0 2
Notice that, unlike for the stiffness matrix K, the mass matrix does not introduce any coupling
between different displacement field components, so – as defined in (24.14) – any components
Mijab with i ̸= j are necessarily zero. This allows us to compute the consistent mass matrix
following the above procedure, i.e., by first computing the mass matrix M ab for only a single
dof and then finding the complete mass matrix by superposition (cf. (24.16)).

————

Example 24.2. Consistent mass matrix of the CST element

The consistent mass matrix of the constant-strain triangular element is computed analogously
by integration of the shape functions. Again starting with a single dof per node, i.e., U =
(u1 , u2 , u3 )T , the consistent mass matrix of an element of area Ae , constant thickness te and
mass density ρ is obtained as
 
2 1 1
me 
MCST,1D = 1 2 1 with me = ρAe te . (24.18)
12
1 1 2

The extension to 2D motion with dofs U = (u11 , u12 , u21 , u22 , u31 , u32 )T follows from applying the
1D mass matrix to the horizontal and vertical dofs independently, leading to
 
2 0 1 0 1 0
0 2 0 1 0 1
 
me 
1 0 2 0 1 0

MCST,2D = with me = ρAe te . (24.19)
12 0 1 0 2 0 1


1 0 1 0 2 0
0 1 0 1 0 2

————

For all other elements, the consistent mass matrix can be evaluated analogously or computed
by numerical quadrature:
Z nQP −1
X
ab a b
M1D = ρN N dV ≈ Wk ρN a (ξk )N b (ξk )J(ξk ). (24.20)
Ωe k=0

We note that, irrespective of the element type, the (approximate) kinetic energy of an element
is computed as follows:
Z Z n n n n Z
ρ h
2 ρX a a X b b 1 XX a b
T = u̇ dV = u̇ N · u̇ N dV = u̇ · u̇ ρN a N b dV, (24.21)
Ω 2 Ω 2 a=1 b=1
2 Ω
a=1 b=1

164
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

which can be conveniently recast into the element kinetic energy


1
T = U̇ · M U̇ (24.22)
2

From the above examples, we observe that the consistent mass matrix leads to a dynamic cou-
pling between the dofs of different nodes (i.e., the consistent mass matrix is not diagonal but
includes significant off-diagonal terms). From a numerical perspective, this is rather inconve-
nient as it may require inverting M (as will be discussed soon). Therefore, one often resorts to
the so-called lumped mass matrix, which is an approximation that is diagonal.
One such approach is the so-called particle-mass lumping, which aims to
evenly distribute the element mass me onto particles located at the nodes. me/2 me/2
That is, for an arbitrary element having ne nodes with d dofs per node, we
introduce a (much simpler) lumped mass matrix Mlumped ∈ Rne d×ne d , me/3
me/3
which is defined by
me me/3
Mlumped,e = I. (24.23)
ne

Example 24.3. Lumped mass matrix of the 2-node bar element

For example, by using particle-mass lumping for a 2-node bar element, one distributes the mass
me evenly to the two nodes, resulting in
 
  1 0 0 0
me 1 0 me 0 1 0 0 .

Mlumped,1D,e = , Mlumped,2D,e = (24.24)
2 0 1 2 0 0 1 0
0 0 0 1
Note that a comparison of the kinetic energies (e.g., in 1D) reveals
1 me  1 2
(u̇e ) + (u̇2e )2

Tlumped = U̇e · Mlumped,e U̇e = (24.25)
2 4
and
1 me  1 2
(u̇e ) + (u̇2e )2 + u̇1e u̇2e .

Tconsistent = U̇e · Mconsistent,e U̇e = (24.26)
2 6
Hence, using the lumped mass matrix implies an approximation of the kinetic energy (which is
generally not exact), while producing a simple, diagonal alternative to the consistent one.

————

If defined properly, then the solutions obtained from using either the consistent or lumped
mass matrix in the finite element context converge under h-refinement. (As the element size
decreases, the differences between the two formulations also decrease, so that in the limit of
infinitely small elements one may expect the same solution.)

Note that the structure and size of the mass matrix is identical to that of the stiffness matrix,
both at the element and at the global level. As a consequence, all assembly operations
introduced for stiffness matrices apply equally to (both lumped and consistent) mass matrices.

We close by mentioning that beam elements are a special case, since both translational and
rotational inertia must be considered (which is not discussed here in detail, and no unique
solution exists for the lumped mass matrix but various proposed approximations can be used –
which either approximate the kinetic energy or the mass moments of inertia of the beam).

165
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

25 Vibrations

As shown in the previous section, treating the dynamic mechanical problem in linearized kine-
matics by the finite element method leads to the semi-discretized equations of motion

M Ü + Fint (U ) = Fext (t), (25.1)

which are to be solved for the time-dependent vector of nodal dofs U = U (t). This solution is
usually obtained in one of two ways: we either solve for a time-continuous solution U (t), or we
discretize not only in space but also in time and introduce finite differences in time to solve for
U α = U (tα ) at discrete intervals tα = α ∆t. Time-continuous solutions in analytical form can
usually be found only for special cases – vibrations are one such case discussed in the following.

For our purposes, vibrations are small-amplitude oscillations about a stable equilibrium con-
figuration (for a theoretical treatment, see Section 4 in the Dynamics lecture notes). If a body
is freely vibrating without any external excitation, we speak of free vibrations, otherwise
(e.g., if harmonic forces or displacement boundary conditions are applied) we deal with forced
vibrations. In both cases we assume small amplitudes, so that we may assume linear waves,
and we consider oscillations about a stable equilibrium defined by nodal displacements U0 (e.g.,
the undeformed configuration U0 = 0 is usually one such stable equilibrium).

25.1 Free, undamped vibrations

We start by considering a stable, static equilibrium with displacements U0 and with constant
external forces Fext (t) = Fext = const. The equilibrium is governed by

Fint (U0 ) = Fext . (25.2)

Next, consider a small time-varying perturbation V (t) of the displacements, such that

U (t) = U0 + V (t) ⇒ Ü (t) = V̈ (t). (25.3)

Insertion into the equations of motion (25.1) leads to

M V̈ + Fint (U0 + V ) = Fext . (25.4)

As the perturbation is small, we may linearize the generally nonlinear equations of motion about
the stable equilibrium configuration U0 . Expanding the above for |V | ≪ |U0 | to leading order
gives the Taylor expansion
∂Fint
M V̈ + Fint (U0 ) + (U0 ) V + O(|V |2 ) = Fext (25.5)
∂U
or, invoking equilibrium (25.2), recalling the definition of the tangent stiffness matrix T =
∂Fint /U , and dropping all higher-order terms,

M V̈ + T (U0 ) V = 0 (25.6)

When considering free vibrations about the undeformed configuration of an elastic body, then
T = K = const., so the above reduces to

M Ü + KU = 0 (25.7)

166
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

When we consider vibrations about the undeformed ground state, then U0 = 0 and U (t) = V (t).
Therefore, the form of the linearized equations of motion for free vibrations (without external
forcing and without damping) is

M Ü + T U = 0, (25.8)

which is what we use as the starting point for subsequent discussions.

The general type of solution of the above ODE is of the harmonic form24

U = Û ∗ exp(iωt) with ω ∈ R, Û ∗ ∈ Cdn . (25.9)

Insertion into (25.8) leads to (exploiting that the equation must hold for all times t)

T − ω 2 M Û = 0

(25.10)

which is a generalized eigenvalue problem25 to be solved for ω ∈ R, known as the eigen-


frequency, and the corresponding eigenvector Û ∈ R, known as the associated eigenmode.
We point out that M is positive-definite by definition (both for the consistent and lumped
mass matrix) and T = ∂ 2 I/∂U 2 (U0 ) is also positive-semi-definite, because it is the tangent
stiffness matrix associated with a stable equilibrium U0 . As a consequence, M −1 T has only
real eigenvalues ω determined from the characteristic equation

det T − ω 2 M = 0

(25.11)

Further, Û ∗ = Û ∈ Rnd is real-valued (which is why we omitted the asterisk in (25.10)).


Finally, if ω is a solution of (25.10), then so is −ω. Since the sign if of minor importance here,
we consider only the positive frequencies.

For an FE discretization with n×d degrees of freedom (n nodes in d dimensions), the eigenvalue
problem (25.10) has n × d eigenfrequencies ωj and associated eigenmodes Uj . It is common
convention to label the eigenfrequencies (and associated modes) in ascending order:

0 ≤ ω0 ≤ ω1 ≤ . . . ≤ ωn×d−1 . (25.12)

Recall from the dynamics of particle systems (Section 4 in the Dynamics notes) that each
rigid-body mode corresponds to a zero eigenfrequency. Therefore, a 2D (3D) free vibration
problem – without any essential BCs to suppress rigid-body motion – must have three (six)
zero eigenfrequencies. When all zero-energy modes have been removed, the lowest non-zero
eigenfrequency is known as the natural frequency or fundamental frequency.

Due to the linear nature of the ODE system, the complete solution to the free-vibration
problem is a superposition of the type
n×d
X
U (t) = c∗j Ûj exp(iωj t), c∗j ∈ C for j = 1, . . . , n × d, (25.13)
j=1

24
The solution can alternatively be written in terms of trigonometric functions. We here use the exponential
formulation U = Û ∗ exp(iωt) for notational simplicity, which, by Euler’s identity exp(iωt) = cos(ωt) + i sin(ωt),
can be transformed into trigonometric solutions to obtain U = Û1 cos(ωt) + Û2 sin(ωt). To avoid confusion, we
use the asterix ∗ here and in the following to denote complex-valued variables. See Section 4 of the Dynamics
lecture notes for detailed explanations.
25
Since M is positive-definite, we may multiply (25.10) by M −1 , leading to (M −1 T − ω 2 I)Û = 0, which has
the typical form of an eigenvalue problem with eigenvalues ω 2 and eigenvectors Û .

167
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

whose coefficients c∗j we must find for a given set of initial conditions. Recall that, for a
mechanical initial boundary value problem, we have two initial conditions per node and per
degree of freedom (e.g., imposing initial displacement and velocity vectors for each node). This
provides the 2 × n × d equations from which the coefficients c∗j ∈ C can be found (since those
are complex, we have in fact 2 × n × d unknowns, viz. the real and imaginary parts of each of
the n × d coefficients). Roughly speaking, free vibrations are characterized by the superposition
of vibrations at all eigenfrequencies with their respective eigenmodes.

Example 25.1. Free vibration of a 2-node bar

Let us study the example of a freely vibrating linear elastic 2-node bar, which we use to assess
the influence of the different types of mass matrices. Consider a 2-node bar element with only
axial displacements in 1D, so that each node has only a single dof ua . The mass matrices and
the stiffness matrix for this case were derived previously as
     
m 2 1 m 1 0 EA 1 −1
Mconsistent = , Mlumped = , K= . (25.14)
6 1 2 2 0 1 L −1 1

For each of the two mass matrices, we compute the two eigenfrequencies and eigenmodes by
solving the eigenvalue problem (25.10). To this end, we first solve the characteristic equation

det K − ω 2 M = 0.

(25.15)

for the two eigenfrequencies ω0 and ω1 , which we insert into

(K − ω 2 M )Û = 0 (25.16)

to find the associated eigenvectors Û .

Insertion of the stiffness matrix and the consistent mass matrix results in the two solutions
r r r
consistent consistent EA √ EA EA
ω0 = 0, ω1 = 12 =2 3 ≈ 3.464 . (25.17)
mL mL mL

The corresponding eigenvectors follow as 1 ^0


U 2
   
consistent 1 consistent 1
Û0 =
1
, Û1 =
−1
. (25.18)
1 ^1
U 2

As expected, we have one zero eigenfrequency associated with rigid body translation, and one
non-zero eigenfrequency associated with a mode that deforms the bar.

When repeating the above procedure with the lumped mass matrix, we instead obtain
r
lumped lumped EA
ω0 = 0, ω1 =2 . (25.19)
mL
and
   
1 1
Û0lumped = , Û1lumped = . (25.20)
1 −1

Hence, using the consistent vs. lumped mass matrix in this example yields the same eigenmodes
Û0 and Û1 , whereas the fundamental frequencies ω1consistent vs. ω1lumped differ significantly.

168
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

For comparison, let us compute the exact solution by studying the free vibration of a continuous,
homogeneous, linear elastic bar. Linear momentum balance, i.e.,

Eu,xx = ρü, (25.21)

admits the separable solution

u(x, t) = û(x) exp(iωt) ⇒ E û,xx (x) = −ω 2 ρ û(x) (25.22)

Free-end boundary conditions imply zero tractions at the two ends at x = 0 and x = L, so that
we must enforce

û,x (0) = û,x (L) = 0. (25.23)

Solving the ODE in (25.22) with the above initial conditions yields the mode shape
 nπx 
û(x) = A cos with A ∈ R, n ∈ Z. (25.24)
L
and the associated eigenfrequency
r
EA
ωn = n π . (25.25)
mL
Consequently, the lowest two eigenfrequencies are obtained for n = 0, 1 as
r
EA
ω0 = 0, ω1 = π . (25.26)
mL
Comparison with the above two approximate formulations reveals that

ω1lumped ≤ ω1 ≤ ω1consistent (25.27)

————

We can generalize the above observation to vibrational problems (here without proof). The
eigenfrequencies obtained from the consistent mass matrix generally over-estimate the
eigenfrequencies, while the lumped mass matrix usually under-estimates the eigenfrequen-
cies (the latter is not rigorous though, since it depends on the choice of the lumped mass
matrix).

25.2 Forced vibrations

As defined above, forced vibrations result from a small-amplitude harmonic excitation of a


structure or body. We again start with the linearized governing equations

M Ü + T U = Fext (t) (25.28)

and now assume a time-harmonic excitation (on top of any static pre-load) of the type

Fext (t) = F̂ext cos(Ωt) (25.29)

169
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

with an excitation frequency Ω ∈ R and a force excitation of amplitude F̂ext ∈ Rdn . (25.28)
shows that the solution vector generally consists of a homogeneous solution and a particular
solution, i.e.,

U (t) = Uhom (t) + Upart (t) = Uhom (t) + Û cos(Ωt) where Û ∈ Rdn . (25.30)

The homogeneous solution corresponds to a free vibration (see Section 25.1) and is usually
of little interest (any realistic system has a minimum amount of damping which makes the
homogeneous solution of a free vibration decay over time, while the particular solution of the
forced vibration assumes a steady state). Insertion of the particular solution

Upart (t) = Û cos(Ωt) (25.31)

into (25.28) leads to

−Ω2 M + T Û = F̂ext ,

(25.32)

which is a linear system of equations to be solved for the displacement amplitude vector Û .
Specifically, if

det −Ω2 M + T ̸= 0

⇔ Ω is not an eigenfrequency of the system, (25.33)

then
−1 −1
Û = −Ω2 M + T F̂ext ⇒ Upart (t) = −Ω2 M + T F̂ext cos(Ωt) (25.34)

Hence, the system responds to a harmonic excitation – at steady state – with a harmonic
vibration at the excitation frequency. As the excitation frequency approaches an eigenfrequency
2

(Ω → ωj ), matrix −Ω M + T becomes singular and the displacement amplitude vector Û
tends to infinity (which is characteristic of resonant effects).

25.3 Structural damping

Hardly any realistic system has zero damping. In structural dynamics (i.e., in the analysis of
structures involving bars, beams, plates, etc.), one often includes velocity-proportional damping
in an approximate, average sense by the introduction of a damping matrix C such that the
equations of motion (24.14) become

M Ü + C U̇ + Fint (U ) − Fext (t) = 0. (25.35)

This is the higher-dimensional analog to the classical 1D system consisting of masses, springs
and dashpots as discussed in Dynamics. The C-matrix serves as the analog of the dashpot,
which provides velocity-proportional damping. The most common form of C used in structural
FEA is mass- and stiffness-proportional damping, which assumes26

C = aM + bK, a, b ∈ R0+ (25.36)

That is, C is a combination of the mass and stiffness matrices, M and K, respectively. The
choice of parameter a ≥ 0 controls low-frequency vibration attenuation, while parameter b ≥ 0
suppresses high-frequency vibrations.
26
Note that parameters a and b are classically called α and β, respectively. However, since we will need variables
α and β later for the Newmark-β and HHT time integration schemes, we here and in the following use a and b
to avoid confusion.

170
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

As a simplifying example, consider a single mass-spring-dashpot oscillator (i.e., a particle of


mass m attached to a linear elastic spring of stiffness k and a velocity-proportional dashpot
with constant c). The equation of motion for a free vibration of this 1D system with DOF
u = u(t) is

mü + cu̇ + ku = 0. (25.37)

If we substitute the 1D analog of (25.36), i.e., we assume c = am + bk, then we arrive at

k
mü + (am + bk)u̇ + ku = 0 ⇔ ü + (a + bω02 )u̇ + ω02 u = 0 with ω02 = . (25.38)
m
Lehr’s damping ratio (adopting the general form ü + 2δ u̇ + ω02 u = 0) in this case becomes
 
δ 1 2
 1 a
D= = a + bω0 = + bω0 . (25.39)
ω0 2ω0 2 ω0

This shows how damping varies with frequency. If one now characterizes D = D(ω) for some
real-world structure or application (e.g., through experiments), then the strategy is to find
constants a, b from fitting (25.39) to the real-world data (at least over a certain range of fre-
quencies). We skip the detailed derivation here and refer to the FEA literature on structural
damping.

If damping is included in a problem of free or forced vibrations, then the above strategies
and relations – in principle – still apply. As a major difference, solutions U = U (t) will
include a time delay, implying that the energy dissipation due to damping results in forces
and displacements not being “in sync” anymore but the body’s deformation lagging behind any
applied forces that cause the deformation. This is best captured by starting with an ansatz

U (t) = Û ∗ exp(iω ∗ t) with ω∗ ∈ C and Û ∗ ∈ Cdn , (25.40)

then solving for the complex valued


h solutions iand finally extracting the displacement solution
as the real part, i.e., U (t) = Re Û exp(iω ∗ t) .

For example, for a forced vibration with structural damping the steady-state response (25.34)
now becomes
h −1 i
Upart (t) = Re −Ω2 M + iΩC + T F̂ext cos(Ωt). (25.41)

171
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

26 Time integration schemes

If the dynamics of a body or structure cannot be classified as small-amplitude vibrations, then


time-continuous solutions are usually hard to find and one may resort to finite-difference schemes
to obtain solutions in a time-discretized fashion (e.g., by using finite-difference approximations
in time). This turns the previously introduced semi -discretization of our fields of interest into
a proper discretization in both space and time.
As discussed in Section 3 at the beginning of this course, finite
differences are a convenient technique when the discretization is
applied to a regular grid with uncomplicated boundary conditions t
(such as when choosing constant time increments ∆t with known
initial conditions). We here re-use those techniques introduced back
in Section 3 for the discretization in time (while keeping the FE ua
discretization in space). Specifically, we define a constant time
increment ∆t > 0 and seek solutions at discrete time intervals: ua
Dt ua
∆t = tα+1 −tα , ua (tα ) = ua,α , U α = U (tα ) ∀α≥0
ua
and arbitrarily choosing t0 = 0.
In order to solve the equations of motion, we must choose between explicit and implicit inte-
gration schemes – which come with all the advantages and disadvantages discussed in general
in Section 3. Let us first turn to the simpler case of explicit time integration27 .

26.1 Explicit time integration

The most frequent choice, ensuring quadratic convergence while maintaining small finite-difference
stencils, is the use of central-difference approximations in time, which turn the nodal velocity
and acceleration vectors into, respectively,

U α+1 − U α−1 U α+1 − 2U α + U α−1


U̇ (tα ) = + O(∆t2 ), Ü (tα ) = + O(∆t2 ). (26.1)
2∆t (∆t)2

Insertion into the equations of motion (25.35) (here, including damping for completeness and
dropping higher-order terms) leads to the time-discretized equations of motion

U α+1 − 2U α + U α−1 U α+1 − U α−1


M + C + Fint (U α ) − Fext (tα ) = 0, (26.2)
(∆t)2 2∆t

which can be reorganized into


   
M C α+1 2M α C M
+ U = U + − U α−1 − Fint (U α ) + Fext (tα ) (26.3)
(∆t)2 2∆t (∆t)2 2∆t (∆t)2

This is an update rule for U α+1 , resulting in a scheme of explicit time integration (i.e.,
vector U α+1 can be computed directly from the known previous solutions U α and U α−1 . We
note that solving (26.3) for U α+1 may require the solution of a linear system due to the matrix
in brackets in front of U α+1 (unless b = 0 so C = aM and if using the lumped mass matrix,
27
We note that similar concepts can also be applied, when the time increment ∆t is not constant or is adaptively
modified during the course of a simulation. However, we here restrict our discussion to constant time steps ∆t.

172
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

which is diagonal). Yet, all nonlinearity that is possibly inherent in Fint (U ) is irrelevant to
the solution procedure, as the internal forces in (26.3) depend only on the previous, known
solution U α .

Stability generally limits the choice of the time step ∆t in explicit schemes, as discussed in
Section 3. This also applies to the dynamic FE formulation described above. Without proof we
mention that stability requires
2
∆t ≤ ∆tmax = (26.4)
ωmax
with ωmax being the highest eigenfrequency of the FE problem (see Section 25.1). It is important
to realize that the highest eigenfrequency generally scales inversely with the size of the smallest
element in the mesh, i.e.,
1
ωmax ∝ (26.5)
hmin
For example, we showed pin Example 25.1 that the fundamental frequency of a two-node bar
1
was of the form ω1 ∝ L E/ρ with L being the element size.

Despite the explicit scheme being straight-forward to implement and inexpensive to solve at
the time-step level, the above stability constraint has unfortunate consequences. The maximum
allowed time step ∆tmax decreases with decreasing mesh size; i.e., dynamic FE problems that
are already expensive because of high mesh resolution are even more expensive when using
explicit time integration due to the required small time step size. Moreover, what matters is
the smallest element size hmin and not the average element size. Therefore, the smallest element
in a FE mesh generally dictates the critical step size ∆tmax (even if the average element size is
considerably larger).

26.2 A reinterpretation of finite differences

Instead of introducing finite-difference schemes in time, as discussed above, we could alterna-


tively introduce interpolations in time analogous to the interpolation in space introduced within
the FE context based on shape functions and nodal values. We here aim to show that such an
interpolation in time is indeed feasible and that, in fact, the above explicit central-difference
discretization can be re-interpreted as such an interpolation.

To start, consider a discretization in time which evaluates U at discrete time intervals ∆t and
then uses a quadratic interpolation in time to define U (t) at all times t ≥ 0, i.e., we define
U (t) = U α+1 N α+1 (t) + U α N α (t) + U α−1 N α−1 (t) for t ∈ [tα − ∆t α
2 ,t + ∆t
2 ]. (26.6)

Shape functions N α (t) interpolate in time and, analogous to the


spatial discretization of the FE method, we define N α (tβ ) = δαβ .
t
The resulting quadratic shape functions are
t a+1 N a+1
(t − tα )(t
− tα−1 ) (tα+1 − t)(t − tα−1 ) t a+Dt/2
N α+1 (t) = , N α (t) = a
2(∆t)2 (∆t)2 t N a

a-1
t a-Dt/2
and t N a-1

(tα+1 − t)(tα − t) Dt
N α−1 (t) = . (26.7)
2(∆t)2

173
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

This piecewise-quadratic interpolation with the above range of validity ensures that U (t) is
twice differentiable (as needed for the acceleration). It further guarantees the continuity of not
only U (t) over time but also of the derivatives
∂ α+1 α ∆t ∂ α−1 α ∆t
N (t − 2 ) =0 and N (t + 2 ) = 0, (26.8)
∂t ∂t
so that U̇ (t) is continuous as well. Consequently, the acceleration

Ü (t) = U α+1 N̈ α+1 (t) + U α N̈ α (t) + U α−1 N̈ α−1 (t)


U α+1 Uα U α−1 U α+1 − 2U α + U α−1
= − 2 + = for t ∈ [tα − ∆t α
2 ,t + ∆t
2 ]
(∆t)2 (∆t)2 (∆t)2 (∆t)2
(26.9)

is piecewise-constant and recovers the second-order central-difference scheme in time, cf. (26.1).

The approximate displacement field, now discretized in both space and time, has become
n
X α+1
X
uh (x, t) = ua,γ N γ (t)N a (x) for t ∈ [tα − ∆t α
2 ,t + ∆t
2 ], x ∈ Ωh , (26.10)
a=1 γ=α−1

where ua,γ = uh (xa , tγ ) is the displacement of node a at time tγ . The acceleration field follows
as the (piecewise-constant in time) approximation
n
h
X ua,α+1 − 2ua,α + ua,α−1
ü (x, t) = N a (x) for t ∈ [tα − ∆t α ∆t
2 , t + 2 ], x ∈ Ωh . (26.11)
(∆t)2
a=1

Next, we must insert the discretization into the weak form (24.9), which also requires a choice
for the trial function v h (x, t). We could choose a Bubnov-Galerkin scheme, where v h (x, t)
is discretized in the same fashion as uh (x, t). The consequence would be that we arrive at an
implicit system in time to solve for all nodal unknowns (i.e., one cannot simply march forward in
time but has to solve for the nodal solutions at all times at once). Alternatively, we may choose
a Petrov-Galerkin scheme in time and – having in mind that we wish to evaluate information
only at the discrete time steps – define the trial function (assuming nt time steps) as
n
X nt
n X
X
h b b
v (x, t) = v (t)N (x) = v b,α N b (x)δ(t − tα ). (26.12)
b=1 b=1 α=1

This approximation is of collocation type and only considers the solution at the discrete time
steps. As a consequence, it also reduces the weak form to being evaluated only at discrete time
steps. When this choice of v h along with uh is inserted into the weak form (24.9), viz.,
Z t2 Z Z Z 
G[u, v] = (−ρ üi vi − σij vi,j ) dV + ρbi vi dV + t̂i vi dS dt = 0, (26.13)
t1 Ω Ω ∂ΩN

the integration over time reduces the delta functions to the form
nt
"Z !
a,α+1 a,α a,α−1
X u − 2u + u
vib −ρ i i
2
i
N a N b − σij (εh,α )N,jb dV
Ω (∆t)
b=1 (26.14)
Z Z 
α b
+ ρbi (t )N dV + t̂i (t )N dS = 0 ∀ vib
α b
Ω ∂ΩN

174
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

for each time step α (0 ≤ tα ≤ nt ∆t) and for all admissible choices of vib . The latter implies
that the above terms in brackets must vanish, or that we must have

ua,α+1 − 2ua,α + uia,α−1


Z Z
a b
ρN N dV i i
+ σij (εh,α )N,jb dV
Ω (∆t)2
ZΩ Z (26.15)
α b α b
− ρbi (t )N dV − t̂i (t )N dS = 0.
Ω ∂ΩN

When inserting our definitions of the consistent mass matrix and the internal/external force
vectors (cf. (24.15)), the above turns out to be equivalent to

U α+1 − 2U α + U α−1
M + Fint (U α ) − Fext (tα ) = 0. (26.16)
(∆t)2

This is identical to (26.2), which we derived previously for a second-order finite-difference time
discretization. Of course, the same procedure can also be applied to other choices of v h , which
leads to different time discretization schemes.

26.3 Implicit time integration

Following the above explicit schemes, we proceed to discuss implicit time integration, which
requires solving a generally nonlinear system of equations for U α+1 . Various techniques exist,
the most prominent of which we summarize in the following.

26.3.1 Newmark’s method

The most popular time integration scheme for mechanical problems is the so-called Newmark-
β method28 . To motivate its formulation, we start by noting that the solution vector U (t) at
some time t ∈ (tα , tα+1 ) can be obtained from knowledge of U α as well as of U̇ (t) within that
interval by integration:
Z t
α
U (t) = U + U̇ (τ ) dτ for t ∈ (tα , tα+1 ) (26.17)

Analogously, we know that


Z t
U̇ (t) = U̇ α + Ü (τ ) dτ for t ∈ (tα , tα+1 ). (26.18)

In practice, we do not know U̇ nor Ü within the interval t ∈ (tα , tα+1 ) but we may define those
at the discrete times tα and tα+1 . Therefore, particular time integration schemes can be devised
by introduction approximations for how Ü (t) is defined during an interval (tα , tα+1 ), so that
the above two equations can be integrated to find U̇ (t) and U (t).

The so-called average acceleration method, e.g., assumes that the acceleration is piecewise
constant and, between two time steps, assumes the average value

Ü α+1 + Ü α
Ü (t) = = const. for t ∈ (tα , tα+1 ). (26.19)
2
28
This method was originally developed in 1959 for problems in structural mechanics by Nathan M. Newmark
of the University of Illinois at Urbana–Champaign, after whom it was later named.

175
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Insertion into (26.18) along with U̇ (tα ) = U̇ α leads to

Ü α+1 + Ü α t  t − tα
Z 
α
U̇ (t) = U̇ + dτ = U̇ α + Ü α+1 + Ü α , (26.20)
2 tα 2
and inserting this into (26.17) with U (tα ) = U α gives
  (t − tα )2
U (t) = U α + U̇ α (t − tα ) + Ü α+1 + Ü α . (26.21)
4
Finally, evaluating (26.20) and (26.21) at time tα+1 yields, respectively,
  ∆t
U̇ α+1 = U̇ α + Ü α+1 + Ü α ,
2
  (∆t)2 (26.22)
U α+1 = U α + U̇ α ∆t + Ü α+1 + Ü α .
4
This is apparently an implicit definition of the new velocity and displacement vectors, since
they involve the unknown acceleration Ü α+1 at the new time.

As an alternative, the linear acceleration method assumes a linear interpolation instead of a


piecewise-constant one, thus starting with
  t − tα
Ü (t) = Ü α + Ü α+1 − Ü α for t ∈ (tα , tα+1 ). (26.23)
∆t
Carrying out the same substitutions and integrations as above for the average acceleration
scheme, we here arrive at
  ∆t
U̇ α+1 = U̇ α + Ü α+1 + Ü α ,
2
2 (26.24)
α (∆t)
 
α+1 α α α+1
U = U + U̇ ∆t + Ü + 2Ü ,
6
which is yet another implicit definition of the new velocity and displacement vectors.

We note that we can also cast our explicit central-difference scheme (26.1) from before
into the above framework, if we assume a piecewise-constant acceleration centered around each
discrete time step:
( α α+1
Ü α , for t ∈ (tα , t +t2 )
Ü (t) = α α+1 . (26.25)
Ü α+1 , for t ∈ ( t +t2 , tα+1 )

The Newmark-β method generalizes all of the above cases into a single framework, which
defines the new displacements and velocities as

(∆t)2 h i
U α+1 = U α + ∆t U̇ α + 2β Ü α+1 + (1 − 2β)Ü α (26.26a)
2
h i
U̇ α+1 = U̇ α + ∆t γ Ü α+1 + (1 − γ)Ü α (26.26b)

where 0 ≤ β ≤ 1 and 0 ≤ γ ≤ 1 are parameters to be chosen. The above schemes are included
as special cases:

• β = 14 , γ = 12 leads to the most popular average acceleration scheme, which turns out
to be unconditionally stable and to have no numerical damping.

176
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

• β = 16 , γ = 12 is the linear acceleration scheme, which can be shown to be conditionally


stable and introduces numerical damping.

• β = 0, γ = 21 recovers the explicit central-difference scheme (26.1), which is condition-


ally stable and introduces numerical damping.

As a major benefit of the Newmark schemes, for linear structural problems the method can
provide unconditional stability. Specifically,

• γ ≥ 1/2 ∧ β ≥ γ/2 guarantees that the method is unconditionally stable,

• γ ≥ 1/2 ∧ β < γ/2 leads to conditional stability with, as discussed before, ∆tcr ∝ ωmax
−1 .

For γ = 1/2 the scheme is at least second-order accurate, while being first-order accurate oth-
erwise. It is important to note that the Newmark methods, as most other finite-difference
methods, introduce artificial numerical damping (see the discussion in Section 4.3 on phase
error analysis). Whenever γ > 1/2, the Newmark family of methods produces numerical damp-
ing. The average acceleration scheme (β = 14 , γ = 21 ) does not produce any algorithmic damping,
which further adds to its popularity.

For an implementation of the Newmark-β method, we need to turn the implicit definitions
of velocities and displacements in (26.26) into a form that allows us to perform algorithmic time
stepping. To this end, let us first solve (26.26a) for the acceleration at the new time tα+1 :
1   1 − 2β
Ü α+1 = U α+1
− U α
− ∆t U̇ α
− Ü α . (26.27)
β(∆t)2 2β
Insertion into (26.26b) yields
γ  α+1  1 − 2β α
U̇ α+1 = U̇ α + ∆t(1 − γ)Ü α + U − U α + ∆t U̇ α − γ ∆t Ü
β ∆t 2β
    (26.28)
γ γ γ
U̇ α + U α+1 − U α − ∆t − 1 Ü α .

= 1−
β β ∆t 2β
Next, inserting both velocity (26.27) and acceleration (26.28) into the equation of motion at
the new time tα+1 ,
M Ü α+1 + C U̇ α+1 + Fint (U α+1 ) − Fext (tα+1 ) = 0, (26.29)
leads – after some rearrangement – to
 
1 γ
M+ C U α+1 + Fint (U α+1 ) − Fext (tα+1 )
β(∆t)2 β ∆t
   
1 α 1 α 1 α
=M U + U̇ + − 1 Ü (26.30)
β(∆t)2 β ∆t 2β
     
γ α γ α γ α
+C U + − 1 U̇ + ∆t − 1 Ü .
β ∆t β 2β

The right-hand side of (26.30) is fully known, since it only involves U α , U̇ α , and Ü α from the
previous time step. The left-hand side is generally nonlinear and requires an iterative solver,
unless the problem is linear elastic, in which case Fint (U α+1 ) = KU α+1 and the above left-hand
side becomes linear in U α+1 .

Note that the implementation is quite similar to that of the quasistatic problem using, e.g.,
the Newton-Raphson solver discussed in Section 23.1. Specifically, we now must solve
f (U α+1 ) = M ∗ U α+1 + Fint (U α+1 ) − Fext

(tα+1 , U α , U̇ α , Ü α ) = 0, (26.31)

177
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

where we simply rewrote (26.30) in a more concise form with the abbreviations
1 γ
M∗ = 2
M+ C = const. (26.32)
β(∆t) β ∆t
and
   
∗ 1 1 1
Fext (tα+1 , U α , U̇ α , Ü α ) α+1
= Fext (t )+M α
U + α
U̇ + − 1 Ü α
β(∆t)2 β ∆t 2β
      (26.33)
γ α γ α γ α
+C U + − 1 U̇ + ∆t − 1 Ü .
β ∆t β 2β
Note that M ∗ is constant, while Fext
∗ is fully known from the previous time step and the applied

external forces. Therefore, the problem (26.31) is quite similar to the quasistatic problem. The
tangent matrix used for iterations is
1 γ ∂Fint
T ∗ = M∗ + T = 2
M+ C +T with T = (U ). (26.34)
β(∆t) β ∆t ∂U
Boundary conditions can be implemented in the same fashion as for the quasistatic solvers
discussed in Section 23.8.

In the special case of a linear elastic problem, the nonlinear system of equations turns into a
linear one, viz.
f (U α+1 ) = M ∗ U α+1 + KU α+1 − Fext

(tα+1 , U α , U̇ α , Ü α ) = 0, (26.35)
so that we must solve the linear problem
(M ∗ + K) U α+1 = Fext

(tα+1 , U α , U̇ α , Ü α ). (26.36)

The algorithmic structure is as follows. At each time step, we solve (26.30) for U α+1 (using
an iterative solver such as Newton-Raphson for nonlinear problems), based on the information
from the previous time step, U α , U̇ α and Ü α , along with information about the applied external
forces Fext (tα+1 ). This implies we must store vectors U α , U̇ α and Ü α after each converged time
step. Once the new solution U α+1 has been found, we compute U̇ α+1 from (26.27) and Ü α+1
from (26.28), store all of those vectors and move on to the next time step.

26.3.2 HHT method

The HHT method (also known as the HHT-α method) is a modification of the above implicit
Newmark scheme. It is named after its inventors, Hilber, Hughes and Taylor, and has gained
popularity in commercial codes. The idea is to use the same Newmark relations (26.26a) and
(26.26b) but to modify the equations of motion, into which they are inserted, viz. assuming
h i
M Ü α+1 + C (1 − α)U̇ α+1 + α U̇ α + (1 − α)Fint (U α+1 ) + αFint (U α )
(26.37)
= (1 − α)Fext (tα+1 ) + α Fext (tα )

with a newly introduced parameter α (using the over-line to avoid confusion with our time
step α). Notice that α = 0 recovers the Newmark-β scheme. If one chooses
1 (1 + α)2 1
0≤α≤ , β= , γ = + α, (26.38)
3 4 2
then the HHT method is unconditionally stable and at least second-order accurate. Increasing α
decreases the simulated displacements at high frequencies (thus removing high-frequency noise
from dynamics problems), which can be beneficial in structural dynamics.

178
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

26.4 On the use of mass matrices in time integration schemes

Let us close this section by discussing the use of consistent vs. lumped mass matrices in the
context of explicit/implicit time stepping. Recall that, for free vibrations, we had observed
that the consistent mass matrix generally overpredicts eigenfrequencies, while the lumped mass
matrix tends to underpredict those. Unfortunately, we do not have the time here, but we
could do a careful phase error analysis for the explicit and implicit time-stepping schemes
derived above (recall that we discussed phase error analysis in the context of finite differences,
see Section 4.3). The outcome would be that implicit schemes generally introduce numerical
error in the form of so-called period elongation, i.e., using implicit schemes like the average-
acceleration one (although having no numerical damping) leads to vibrational frequencies being
underestimated. Hence, combining implicit schemes with consistent mass matrices compensates
for the errors introduced by the two. Likewise, explicit schemes like the central-difference one
tend to exhibit period contraction, hence compensating for the error introduced by lumped
mass matrices. This shows that it is therefore generally recommended to use

explicit schemes with lumped mass matrices,


implicit schemes with consistent mass matrices.

This choice is also computationally beneficial: lumped mass matrices may allow for solving the
explicit update rule (26.3) without the need for iterations to solve a system, whereas consistent
mass matrices can be conveniently used in the implicit update rule (26.30), where a system of
equations must be solved anyways.

179
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

27 Modal decomposition

If the dynamics of a body or structure cannot be classified as small-amplitude vibrations (as


discussed in Section 25.1) but time integration schemes (presented in Section 26) are too expen-
sive, one may find time-continuous solutions by the method of modal decomposition (also
referred to as modal analysis). This technique is based on eigenfrequency analysis but has
the objective of finding a time-continuous solution for general time-dependent problems.

The starting point of the concept of modal decomposition is to express the unknown time history
of the vector of nodal dofs in a carefully chosen basis, viz.
n×d
X
U (t) = zi (t) Ûi (27.1)
i=1

where we use the (somehow normalized) eigenvectors Ûi of the system as basis vectors to repre-
sent the unknown function U (t) with unknown scalar time-dependent coefficient functions zi (t),
as illustrated below.

= z1(t) . + z2(t) . + z3(t) . + z4(t) . + ...

U(t) ^
U ^
U ^
U ^
U
1 2 3 4

This basis representation has significant advantages – for which to understand we need a some-
what longer derivation. By considering the linear elastic eigenvalue problem for two distinct
eigenmodes/eigenfrequencies i and j, we may write (no summations over i or j implied here
and in the following)
   
2 2
K − ω(i) M Û(i) = 0 ⇒ Û(j) · K − ω(i) M Û(i) = 0,
    (27.2)
2 2
K − ω(j) M Û(j) = 0 ⇒ Û(i) · K − ω(j) M Û(j) = 0,

where we pre-multiplied each of the two equations by the respective other eigenvector. Sub-
traction of the two equations (exploiting that K is by definition symmetric) results in
2 2
(ω(i) − ω(j) ) Û(i) · M Û(j) = 0 ⇔ ωi = ωj ∨ Ûi · M Ûj = 0. (27.3)

This implies that either ωi = ωj (considering only positive eigenfrequencies) or Ûi · M Ûj = 0.
If we assume that we have only distinct eigenfrequencies29 , then we may conclude that
Ûi · M Ûj = 0 if i ̸= j. (27.4)
29
Theoretically, we may surely have repeated eigenvalues and hence duplicated eigenfrequencies. However, a
numerical implementation always generates numerical errors so that truly identical eigenvalues occur rarely (and
rigid-body modes are usually removed unless the simulated response requires rigid-body motion). In case of any
duplicated eigenfrequencies, one could still introduce, e.g., Gram-Schmid orthonormalization, to produce a set of
eigenmodes that do satisfy the condition (27.4).

180
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Let us normalize the eigenvectors in the following fashion:

Û(i)
Ûi ← q so that Û(i) · M Û(i) = 1. (27.5)
Û(i) · M Û(i)

Combined with (27.4), this leads to

Ûi · M Ûj = δij (27.6)

That is, eigenvectors Ûi are orthogonal with respect to M .

Next, if we start with


   
2 2
K − ω(i) M Û(i) = 0 ⇒ Ûj · K − ω(i) M Û(i) = 0, (27.7)

then we may also conclude that, by invoking (27.6),

Ûj · K Ûi = 0 if i ̸= j. (27.8)

Similarly, by pre-multiplying by the respective same eigenvector, i.e.,


 
2
Û(i) · K − ω(i) M Û(i) = 0, (27.9)

we solve for ωi2 and obtain Rayleigh’s quotient, which here simplifies due to the normalization
(no summation over i implied):
(
Û(i) · K Û(i) ωi2 , if i = j
ωi2 = = Û(i) · K Û(i) ⇒ Ûi · K Ûj = (27.10)
Û(i) · M Û(i) 0, else

Let us now return to the modal decomposition of a linearized, elastic system, using the Fourier
representation
n×d
X
U (t) = zi (t) Ûi , (27.11)
i=1

where {Û1 , . . . , Ûn } are the n eigenmodes of the system. That is, we pre-compute the eigenvec-
tors and seek a solution as a linear superposition of all eigenvectors with some unknown scalar
coefficients zi (t), which are continuous functions of time (maintaining the semi -discretization).

We substitute (27.11) into the linearized equations of motion, M Ü + C U̇ + KU = Fext ,


assuming structural damping so that C = aM + bK. This leads to
n×d
Xh i
z̈i (t) M Ûi + żi (t)(aM + bK)Ûi + zi (t)K Ûi = Fext (t). (27.12)
i=1

Pre-multiplying by Ûj and re-arranging the terms gives


n×d
Xh i
 
z̈i (t) + ażi (t) Ûj · M Ûi + bżi (t) + zi (t) Ûj · K Ûi = Ûj · Fext (t). (27.13)
i=1

181
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Exploiting the orthogonality relations (27.6) and (27.10) transforms the above into

z̈j (t) + (a + bωj2 )żj (t) + ωj2 zj (t) = Ûj · Fext (t) for j = 1, . . . , n × d (27.14)

This equation is quite remarkable, as it presents a scalar, linear ODE for each unknown function
zj (t). Moreover, the system of equations for the n × d unknown functions zi (t) (with i =
1, . . . , n × d) has decoupled into n × d uncoupled scalar ODEs to be solved independently for
the zi (t). The strategy is thus to first pre-compute all eigenfrequencies ωj and all eigenmodes
Ûj , so that the coefficients and right-hand sides in (27.14) are known. The resulting system
of decoupled linear ODEs can relatively inexpensively be solved for the functions zj (t) – either
analytically or numerically, depending on the nature of Fext (t).

For many practical problems, only a limited number of modes are important, so we may restrict
the representation (27.11) to include only the lowest m < n × d modes (corresponding to the m
lowest eigenfrequencies). Therefore, significant numerical efficiency can be gained by truncating
the Fourier sum and only using the m lowest modes, which is referred to as order reduction:
m
X
U (t) = zi (t) Ûi , m < n × d. (27.15)
i=1

For example, if a loading scenario is prone to excite only the lowest few eigenmodes (such as,
e.g., when an earthquake excites a building at low frequencies), then m ≪ n may yield an
accurate and efficient approximation.

182
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

28 Extensions

Many of the finite element tools we have discussed so far (from discretization principles and
function spaces to elements types and quadrature rules and beyond) apply not only to the
framework of small-strain mechanics problems, but they extend to a much broader context,
where they may be conveniently used. In this section, let us briefly summarize two extensions
of the theory developed so far towards common engineering applications.

28.1 Finite kinematics

When going beyond small strains, we need to work with a theory of large (finite) strains, which
is commonly referred to as finite kinematics or (more sloppily) large deformation. Classical
examples are the simulation of rubbery materials or of biological tissue, which generally undergo
large strains. Here, we do not only need to introduce more complex constitutive laws (going
well beyond linear elasticity), but we must also account for the fact that our fundamental small-
deformation measures such as the (infinitesimal) strain tensor ε lose their meaning and are no
longer applicable at large strains. Here, one typically introduces a deformation mapping of
the type
φ(X, t) : Ω × R → Rd such that x = φ(X, t), (28.1)
which assignes to each undeformed point X ∈ Ω in the undeformed body Ω a point x ∈ φ(Ω)
within the deformed body φ(Ω). For simplicity, we assume that the two points are linked in
the same fashion as in small strains, meaning we define a displacement field u : Ω × R → Rd
such that
x(X, t) = X + u(X, t). (28.2)

To describe finite strains inside the deformed body, one usually does not resort to ε but instead
introduces the deformation gradient, which is a second-order tensor:
∂x ∂xi
F = ⇔ Fij = . (28.3)
∂X ∂Xj
When inserting the relation (28.2), we notice that
∂xi
Fij = = δij + ui,j ⇔ F = I + ∇u. (28.4)
∂Xj
This strain measure is frequently used in finite-strain continuum mechanics (besides various
other strain measures, which we do not want to introduce here for brevity). Note that in case
of no deformation, we have x = X and u = 0, so that F = I (unlike ε = 0).

Starting with quasistatics, the variational problem in this finite-deformation setting is analogous
to the small-strain version. The functional of the total potential energy is
Z Z Z
I[u] = W (F ) dV − ρ0 b · u dV − t̂ · u dS, (28.5)
Ω Ω ∂ΩN

where W is still the strain energy density (now depending on F ), ρ0 denotes the mass density in
the undeformed configuration (and we integrate over the undeformed configuration). We seek
solutions
u ∈ U = u ∈ H 1 (Ω) : u = û on ∂ΩD

such that u = arg min I[u]. (28.6)

183
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The first variation follows as


Z Z Z
∂W
δI[u] = δui,j dV − ρ0 bi δui dV − t̂i δui dS
Ω ∂Fij Ω ∂ΩN
Z Z Z (28.7)
= Pij δui,j dV − ρ0 bi δui dV − t̂i δui dS = 0,
Ω Ω ∂ΩN

where we introduced the first Piola-Kirchhoff stress tensor with components


∂W
Pij = , (28.8)
∂Fij
which generally differs from the Cauchy stress tensor σ and is furthermore not symmetric. At
finite strains, there exists a variety of stress measures; we here simply make this choice because
it emerges naturally from the variation. Be alerted that commercial FEA software uses all sorts
of strain and stress measures (absolute and incremental ones as well as rates). Only in the limit
of small (infinitesimal) strains, all stress measures tend to coincide and Pij → σij .

The first variation in (28.7) looks quite similar to the small-strain version, cf. (13.4). Conse-
quently, applying a finite element discretizatio of Bubnov-Galerkin type leads to an FE governing
equation analogous to (13.20). That is, we again arrive at
Fint (U h ) − Fext = 0, (28.9)
this time with
Z Z Z
a h
Fint,i = Pij (F )N,ja dV and a
Fext,i = a
ρ0 bi N dV + t̂i N a dS (28.10)
Ω Ω ∂ΩN

In a nutshell, the linearized and finite variational problems result in the same system of equa-
tions (28.9). For the special case of linearized kinematics, we have Pij → σij , so that we recover
the small-strain version (13.20). Otherwise, the above problem is generally nonlinear (even
when considering elasticity at large strains) and requires an iterative solution method.

This is especially true at finite strains, since even the external forces can lead to significant
nonlinearity and dependence on U . In the above variational formulation we assumed that t̂ =
const., i.e., that the externally applied forces are constant and do not depend on deformation. As
discussed in Section 21.1, that may not always be the case, and especially in finite deformations
it is oftentimes not the case; e.g., consider pressure loading t̂ = pn where n is the deformed
surface normal depending on the deformation and hence on U . In such cases, one needs to
revise the external force term appropriately (For pressure loading, e.g., we know the work done
by pressure is Wext = pv, which must replace the traction term in the above total potential
energy.)

Despite all the above differences between large and small strains, the key take-home message is
that the general finite element setup is analogous between both formulations. In both cases, we
seek displacement field solutions within the same function space, and the governing equations
are analogous. In fact, the above description of quasistatics can be extended to dynamics, again
arriving at

M Ü + Fint (U h ) − Fext = 0 (28.11)

with the consistent mass matrix M now having components


Z
ab
Mij = δij ρ0 N a N b dV. (28.12)

184
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Since the overall setup is equivalent, this also implies that all finite element concepts discussed
so far can be applied to finite-deformation problems. That is, all element types, quadrature
rules, solvers, etc. are fully applicable here as well.

Of course, this only an extremely condensed description of finite elements for finite kinematics.
The devil is in the detail, and many challenges may arise when dealing with a nonlinear setting
involving, e.g., large strains, high strain rates, complex material behavior including inelasticity,
damage, and failure, etc., which we cannot discuss in this course.

28.2 Thermal problems

The second extension we would like to discuss aims at solving a thermal problem. To this end,
let us neglect mechanical deformation and motion and instead discuss how temperature evolves
in a body with heat sources and sinks, heat conduction, and heat fluxes across its boundary.
To give the punchline right away: we will, again, observe that we can repurpose all our finite
element tools to this new setting, which admits the numerical solution of thermal problems. The
reason is that, as already mentioned in Section 8, mechanical, thermal and also electromagnetic
variational problems have a common structure of their governing equations.

For a thermal problem in d dimensions, we aim to find the generally time-dependent temper-
ature field

T = T (x, t) (28.13)

by solving the strong form (assuming Fourier’s law for heat conduction with a constant con-
ductivity and neglecting radiation)

κ ∇2 T + ρs = ρcv Ṫ

in Ω,

 T = T̂ on ∂ΩD ,
 (28.14)
 q = −κ ∇T · n = q̂ on ∂ΩN ,

T = T0 at t = 0

with the following variables:

κ ≡ thermal conductivity (assuming Fourier’s law of heat conduction),


ρ ≡ mass density,
s ≡ heat source (or sink) per mass,
cv ≡ specific heat,
(28.15)
T̂ ≡ Dirichlet boundary conditions (imposing a temperature field on the boundary),
q̂ ≡ Neumann boundary conditions (imposing a heat flux across the boundary),
q ≡ outward heat flux,
n ≡ outward unit normal vector on the surface.

Let us first consider the time-independent problem for simplicity (i.e., we take ρcv Ṫ → 0). In
this case, the resulting steady-state problem has a variational structure with the total potential
energy defined by the functional I : U → R with
Z  Z
κ 2

I[T ] = ∥∇T ∥ − ρsT dV + q̂ T dS. (28.16)
Ω 2 ∂ΩN

185
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

This functional indicates that we need to seek solutions T = T (x) from within the space
n o
U = T ∈ H 1 (Ω) : T = T̂ on ∂ΩD , (28.17)

which is analogous to the mechanical problem (cf. Section 13.1). That is, we seek solutions from
within the same function space (except that we now look for a scalar-value field T instead of
the vector-valued displacement field u, which simplifies relations even).

We know that the solution must render I[T ] stationary, so we compute the first variation as
Z Z
δI[T ] = (κ T,i δT,i − ρs δT ) dV + q̂ δT dS = 0 for all δT ∈ U0 , (28.18)
Ω ∂ΩN

with

U0 = δT ∈ H 1 (Ω) : δT = 0 on ∂ΩD ,

(28.19)

and we identify the weak form


Z Z
G[T, v] = (κ T,i v,i − ρs v) dV + q̂ v dS = 0 for all v ∈ U0 . (28.20)
Ω ∂ΩN

Notice that the last term (due to the work by external fluxes) has a plus instead of the usual
minus sign in the mechanical problem. This arises because of the minus sign in the definition
of fluxes q = −κ ∇T . To see this, let us apply the divergence theorem to the first term and
rearrange terms (with δT = 0 on ∂ΩD ) to reformulate the first variation as
Z Z
δI[T ] = − (κ T,ii + ρs) δT dV + (κ T,i ni + q̂) δT dS = 0 for all δT ∈ U0 . (28.21)
Ω ∂ΩN

This must hold for all admissible variations δT ∈ U0 . Therefore, (28.21) is equivalent to

κ ∇2 T + ρs = 0 in Ω, −κ ∇T · n = q̂ on ∂ΩN and T = T̂ on ∂ΩD . (28.22)

Ergo, the signs are correct, as we recover the (time-independent) strong form (28.14). We hence
conclude that extremal points T ∈ U of (28.16) are indeed guaranteed to satisfy the governing
equations (28.14) and are thus classical solutions. Differently put, functional (28.16) is the
correct energy functional corresponding to the (static) strong form given by (28.14). We can
further show that the solution is a minimizer of I, since the second variation is
Z Z
2
δ I[T ] = κδT,i δT,i dV = κ ∥δ∇T ∥2 dV ≥ 0 for all δT ∈ U0 . (28.23)
Ω Ω

The energy functional (28.16) and the resulting weak form (28.20) are quite similar to those
of the mechanical boundary value problem. To visualize this, we rewrite functional I for the
thermal problem for short as
1
I[T ] = B(T, T ) − L(T ), (28.24)
2
with the bilinear form B and the linear form L defined as, respectively,
Z Z Z
B(a, b) = κ ∇a · ∇b dV and L(a) = ρsa dV − q̂ a dS. (28.25)
Ω Ω ∂ΩN

186
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

This form is analogous to, e.g., that of the mechanical problem of a bar whose energy functional
was derived as (6.45).

Consequently, the weak form can be expressed in the compact form

G[T, v] = B[T, v] − L[v] = 0 for all δT ∈ U0 . (28.26)

Let us define a spatial finite element discretization of Bubnov-Galerkin-type, viz.


n
X n
X
T h (x) = T b N b (x), v h (x) = v a N a (x). (28.27)
b=1 a=1

Insertion into the weak form (28.26), which must hold for all choices of v a , allows us to deduce
the governing equations as
Z  Z Z 
a b b a a
κN,i N,j dV T − ρsN dV − q̂N dS = 0 for all a = 1, . . . , n. (28.28)
Ω Ω ∂ΩN
| {z } | {z }
=Qa
int (T ) =Qa
ext

or, for short,

Qint (T ) = Qext (28.29)

This implies a system of equations that is quite similar and analogous in its structure to that
of linear elastic mechanical boundary value problems. Specifically, (28.28) balances the internal
heat flux Qaint (T ) due to heat conduction with the external heat flux Qaext due to heat sources
and due to heat flux across the surface – for each node a. This is, of course, the analog of the
mechanical system Fint (U ) = Fext .

When introducing the global vector of the unknown nodal temperatures as T = T 1 , . . . , T n ,




the above system conveniently shows that


Z
Qint (T ) = KT with K ab = κN,ia N,jb dV (28.30)

denoting the components of a conductivity matrix. Note that, like in linear elasticity, we ob-
serve a linear relation between Qint (T ) and vector T (which is a consequence of the assumption
of Fourier’s law of heat conduction, which is linear, as well of temperature-independent heat
sources and boundary fluxed). This results in a linear system of equations, KT = Qext , to be
solved for the nodal temperatures.

When considering time-dependent thermal problems, we must extend the above to include
time dependence in the temperature field T = T (x, t). Without showing all details (one can
derive this form, e.g., from the principle of virtual work), we arrive at the governing equation

C Ṫ + Qint (T ) − Qext (t) = 0 (28.31)

with a matrix C that is similar to the mass matrix and has components
Z
C ab = ρcv N a N b dV. (28.32)

The time derivative can be approximated, e.g., by using finite differences, which leads to a
time-incremental problem as in the dynamic finite-element formulation of Section 24.

187
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

We close by pointing out that (28.31) bears great similarity to the dynamic mechanical FE
governing equations of Section 24, and we seek solutions from within the same function space
(except replacing vector-valued displacements by scalar-valued temperatures). As a conse-
quence, all element types, quadrature rules, solvers, etc. that we derived for mechanical (initial)
boundary value problems are fully applicable here as well. We may thus conveniently re-purpose
our FE tools for the analysis of thermal problems.

Shown below is an example solution of the steady-state heat equation, illustrating the temper-
ature field in a pump casing model (more information can be found online).

188
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

29 Error analysis and adaptivity, common mistakes

Having discussed the finite element method, the equations to be solved, the ways in which a
continuous problem is turned into a discrete one, and the various choices of element types,
quadrature rules, solvers, etc. to be made, it is important to understand the potential error
sources and ways to reduce errors. In this section, we first discuss the numerical error sources
inherent in the finite element method, then introduce mesh adaptivity and error estimates, and
finally review common pitfalls in FE analysis.

29.1 Finite element error analysis

Solving (initial) boundary value problems by the finite element method introduces numerous
sources of error that one should be aware of:

(i) The discretization error (also known as the first fundamental error) arises from
discretizing the domain into elements of finite size h. As a result, the body Ω is not
represented correctly and the model (e.g., the outer boundary) may not match the true
boundary ∂Ω (e.g., think of approximating a circular domain Ω by CST or Q4 elements
with straight edges). This error can be reduced by mesh refinement (and we discussed
r-refinement, h-refinement, p-refinement, and hp-refinement in Section 10).

(ii) The numerical integration error results from the application of numerical quadrature
for the evaluation of element force vectors and stiffness matrices in general, as discussed
in Section 20 (unless in exceptional cases, like for simplicial or undistorted elements,
integration can be carried out exactly). Hence, we approximate
Z nQP
f (ξ) dξ ∼
X
= Wq f (ξq ). (29.1)
Ωe q=1

For a function f ∈ C k+1 (Ω) to be integrated, the error in 1D is bounded by


Z 1 nQP
X
f (ξ) dξ − Wq f (ξq ) ≤ C ∥Ω∥ hk+1 max ∥Dα f (ξ)∥ (29.2)
−1 ξ∈[−1,1]
q=1 |α|=k+1

with an element-dependent constant C > 0. As a consequence, the error due to numerical


quadrature grows with element size h as hk+1 . Moreover, the error is smaller, the smoother
the function f to be integrated. (The extension to higher dimensions is analogous). Hence,
the numerical integration error depends on the smoothness of the integrand and calls for
a proper choice of the integration order.

(iii) The solution error stems from numerically solving linear systems T U = F . In general,
the accuracy of the solution depends on the condition number of the matrix,
λmax
κ = ∥T ∥ · T −1 = (29.3)
λmin
with λmax (λmin ) being the largest (smallest) eigenvalue of T . The higher the condition
number, the larger the numerical error.
A practical consequence is the guideline to choose wisely the units of model parameters
(such as material constants, domain size features, etc.). For example, when performing a

189
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

linear elastic simulation, it is advisable to normalize elastic constants by 1 GPa instead


of assigning, e.g., E = 210 · 109 (instead, use E = 2.1 and know that your results will be
in 100 GPa’s). Good codes introduce a normalization or use pre-conditioning.

(iv) An approximation error is introduced by approximating the functional space U (in


which to find the solution u(x)) by a finite-dimensional subspace U h ⊂ U.
As an example, consider an exact solution u(x) in 1D which is approximated by a piece-
wise linear polynomial function uh (x). The bar hanging from the ceiling under its own
weight was one such example, for which the solution was found to be exact at the nodes
with an error e(x) = u(x) − uh (x) arising within elements. Therefore, we can find a point
z within each element of maximal error |e|, such that

∂e
(z) = 0 for xi ≤ z ≤ xi+1 . (29.4)
∂x
Consequently, we can expand the error to find the solution at a node as

∂e (xi − z)2 ∂ 2 e
(z) + O (xi − z)3 .

e(xi ) = 0 = e(z) + (xi − z) (z) + 2
(29.5)
∂x 2 ∂x
Using (29.4), we find that

(xi − z)2 ∂ 2 e
e(z) = − (z) + O(h3 ). (29.6)
2 ∂x2
Note that
2
h2

2 xi+1 − xi
(xi − z) ≤ = , (29.7)
2 4

where h denotes the nodal spacing. Altogether, we have thus shown that the maximum
error in an element is bounded by

h2 ∂2u
|e(x)|max ≤ max . (29.8)
8 xi ≤x≤xi+1 ∂x2

As shown in Appendix G, the above error bound can be significantly generalized. For
polynomial shape functions of order k and u ∈ H k+1 (Ω), we have

hk
|uh − u|H 1 (Ω) ≤ |u| k+1 and ∥uh − u∥H 1 (Ω) ≤ c hk |u|H k+1 (Ω) , (29.9)
π k H (Ω)
using Sobolev norms. In simple terms, the error is again determined by the smoothness
of the function to be interpolated; and it is expected to decrease with decreasing element
size (as h → 0), and it decreases faster with increasing interpolation order.
Note that special caution is required if stress concentrations of any kind are to be rep-
resented (e.g., imagine a linear elastic fracture problem and the issues arising from using
polynomial-type elements to capture the stress singularity near the crack tip).

(v) A truncation error is made by every computer when storing and operating numeric
values with only a finite number of digits (e.g., floats, doubles, etc.). This is unavoidable
and one should be aware of what this error is (especially when choosing, e.g., solver
tolerances). Choosing a solver tolerance ϵ in itself produces truncation error, because
we contend with a solution U that satisfies |Fint (U ) − Fext | ≤ ϵ (instead of being zero).

190
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

(vi) Finally, no simulation is free of modeling errors, which refers to the large collection
of errors made by the selection of the analytical model to be solved (before starting any
numerical approximation). For example, we make choices about an appropriate material
model, choose material parameters, boundary conditions, and geometric simplifications
including reductions to lower dimensions (e.g., plane strain or plane stress instead of a 3D
simulation). Any such decision is prone to introducing errors.

All of the above error sources sum up to the total numerical error introduced in every simulation.

29.2 Smoothing and adaptivity

Both for postprocessing of approximate solutions and for mesh refinement (to be discussed be-
low) it is helpful to introduce a smoothing scheme that takes piecewise-defined solutions (e.g.,
the stress and strain fields in case of simplicial elements) and computes a smooth approximation
defined by smoothed nodal values of the discontinuous quantities.
In case of simplicial elements, the stresses and strains are con-
stant within elements and therefore jump across element bound-
aries. This becomes obvious when graphically illustrating stress
or strain components, which reveals colors jumping across element
boundaries. Here one can define nodal quantities, e.g., as ee,5
Pnnb +
j=1 εe,j /Ve,j a *
(εa )∗ = Pnnb , (29.10) ee,1 (e ) e+e,4
j=1 1/Ve,j +
where the element quantities εe of all nnb neighboring elements ee,2 ee,3
+
meeting at a node a are weighted by the respective element volume +
Ve . This particular weighting is chosen such that smaller elements
(whose quadrature points are closer to the node) have a larger
weight than large elements (where quadrature points are far from
the node).
In case of higher-order elements such as, e.g., the Q4 element, stresses and strains are not
constant within elements, but they are typically defined only at quadrature points (and not at
the nodes). When one wants to plot smooth fields, one can extrapolate element quantities that
are defined at the quadrature points ξk to the nodes. For example for the Q4 element, there are
four nodes and four quadrature points, so that one can uniquely solve for the four nodal values.
Once the smoothed nodal values are known, one again uses a smoothing relation like (29.10)
with the element quantities εe,j replaced by the nodal value εae from the respective element, and
element volume Ve replaced by the nodal weight (obtained from extrapolating the quadrature
point weights Wk Jk t to the nodes).

Such smoothing procedures are not only helpful for visualizing results, but they also assist in
mesh refinement. When performing adaptive mesh refinement, we need an error norm,
which allows us to locate elements of largest error requiring refinement. As an example, we
discuss the ZZ error estimator named after its inventors, Zienkiewicz and Zhu. If we use a
smoothing scheme like the above, we can define smoothed, continuous strains ε∗ and compare
those to the approximate (un-smoothed) solution εh , so that one may define the error per
element e as the difference between those, e.g., using the energy norm
Z
∗ 2
∥ε − ε ∥e = W (ε∗ − ε) dV (29.11)
Ωe

191
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Note that this definition is not unique and one could also use the L2 -norm
Z
∥ε − ε∗ ∥2e = ∥ε∗ − ε∥2 dV. (29.12)
Ωe

or any other sensible norm. These norms indicate the quality of a solution εh (if the solution
to be found is smooth or if the mesh is very fine, then the piecewise constant solution εh can
be expected to be close to the interpolated, smoothed solution ε∗ ).
In order to define an element-wise error estimate, it
makes sense to introduce the normalization
∥ε − ε∗ ∥e e*
ηe = , (29.13)
∥ε − 0∥e + ∥ε − ε∗ ∥e

i.e., the error is divided by the energy in the element


so as to not over- or underestimate element errors based eh
on element sizes as well as in case of vast differences in he
element strain energies (the above denominator may be e
interpreted as an expansion for small errors and avoids
division by zero).
The mesh refinement criterion states that an element e is refined if

ηe > ηtol. (29.14)

with some tolerance ηtol. determined as a compromise between accuracy and efficiency. Once an
approximate solution uh has be found, a set of elements to be refined is identified by the above
refinement criterion. The elements of highest error ηe are refined, the problem is re-solved, and
the error estimates are re-evaluated, until sufficiently low element errors have been achieved.

To perform mesh refinement in practice, we also need a mesh refinement algorithm. For
example, a frequent choice for triangular elements is known as longest edge bisection, which
identifies the longest edge in an element to be refined and inserts a new node at this edge’s mid-
point, followed by an update of the element connectivity (thus replacing two existing elements by
four new elements, as schematically shown below). Note that this involves some book-keeping,
since adjacent elements flagged for refinement may interfere (e.g., yielding contradictory infor-
mation about which edge to be refined), so that one needs an algorithmic decision about which
elements to refine first and how to handle adjacent elements identified for refinement, etc.

element to be refined new node inserted at new elements created


longest-edge midpoint by connecting nodes

192
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

29.3 Common errors

As Cook, Malkus, Plesha and Wit summarized in their FEA textbook, man-made errors in FEA
analysis usually result from unfamiliarity of the user with (i) the physics of the problem, (ii) the
element type and its behavior, (iii) the limitations of the chosen analysis method, and (iv) the
software being used. Although it is difficult to list all possible error sources in FE analysis, let
us mention a few common pitfalls to be avoided (especially after having taken this course).

• poor mesh quality is a very frequent error source. The mesh size must be appropriately
fine (e.g., one cannot hope to accurately represent stress concentrations near notches or
corners by a few large elements, as was done in the famous Sleipner A oil platform example,
whose mesh is included in the graphic below). Gradients in mesh size should be smooth
rather than abrupt for improved accuracy of solutions. Caution is required when mixing
element types. While this is generally possible, there must not be any “hanging” or
unconnected nodes or element edges with different numbers of nodes when seen from both
adjacent elements. One should also avoid large element distortions, since this can lead
(through the Jacobian J ) to a considerable loss in accuracy. Distortions include large
aspect ratios, poorly shaped elements, strongly curved or warped elements, etc. For the
same reason one should avoid warping of elements in 3D. Several examples of poor mesh
and element choices are shown below.

poor mesh (strong constrast)

poor mesh used in the


better mesh (smooth gradient) Sleipner A study

b
a

poor aspect ratio near-triangle Q4 off-centered mid-nodes


warped Q8 element

Q8
CST
highly skewed element near-triangle Q4 strongly curved edge bad element combination

Many codes define the so-called Jacobian ratio j in order to quantify the distortion of
an element. When using numerical quadrature, all fields of interest are only evaluated
at the quadrature points (q = 0, . . . , nQP − 1), which is where one needs to calculate the
Jacobian J(ξq ) = det F (ξq ). The Jacobian ratio of an element e is thus defined as

maxq J(ξq )
je = , (29.15)
minq J(ξq )

i.e., we compare the minimum to the maximum value of the Jacobian within an element e.

193
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Ideally, for an undistorted element we have J(ξq ) = const. and hence maxq J(ξq ) =
minq J(ξq ) or je = 1. If je ̸= 1, then the element is distorted – the more the further je is
away from 1.
• wrong element types are a common reason for trouble
(e.g., using structural vs. solid elements, or using 2D vs.
3D elements). 2D elements can effectively be used only if stress
concentration
the problem is plane-strain or plane-stress (and the element
thickness must be set correctly). Structural elements are sig-
nificantly more efficient than solid elements, but they come
with strong limitations and, e.g., cannot accurately repre- solid model beam model
sent stress concentrations encountered near sharp corners (as
shown on the right).

• linear vs. nonlinear analysis: are deformations expected to be large or small (so that
finite or infinitesimal strains can be used, respectively)? Is the material model linear
elastic, or should a finite-deformation model be used? These questions must be answered
before setting up a simulation.

• boundary conditions must be chosen appropriately (at the right locations, of the right
type and magnitude). If symmetries can be exploited, only a reduced system can be
modeled efficiently, but boundary conditions must be chosen correctly, and it must be
ensured that the solution is indeed symmetric (e.g., when studying buckling problems,
the assumption of symmetry automatically rules out asymmetric buckling modes; the
same applies to vibrational eigenmodes).

• step sizes, i.e., the load step size in quasistatic studies and the time step size ∆t in
dynamic studies, must be chosen to ensure convergence and stability of the solver.

• units must be chosen properly and entered consistently (e.g., always stick to SI units –
but bare in mind the problems associated with large numbers, cf. Section 29.1).

• the interpretation of results requires caution. Are the shown color plots of fields
of interest the raw data or smoothed fields? Are the units correct, are global or local
coordinates being used for, e.g., the definition of tensor components? Can a simple test
case be compared to an analytical or simplified solution? Always make sanity checks!

All commercial FEA codes have internal sanity checks which, e.g., for an implicit analysis
verify that the tangent or stiffness matrix has no zero diagonal entries. The occurrence of such
would imply, e.g., nodes that are not connected to any element, duplicated nodes, or material
moduli being zero. A singular stiffness matrix may also result from mechanical instability
(such as buckling), but this is theoretically correct and more refined solvers are to be used
(e.g., a Riks, path-following, or line-search solver rather than a Newton-Raphson-type solver).
The same applies to structures with mechanisms (i.e., zero-energy modes that are not rigid-
body modes). For example, discretizing a long bar into several 2-node bar elements leads to
mechanisms, since the 2-node bar element has only axial stiffness. To identify the cause of zero
eigenvalues of the stiffness matrix, it may be insightful to visualize the corresponding eigenmode.

194
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

30 FEM – Extensions & Applications

Through this Introduction to FEA we have discussed the foundations of the finite element
method and its applications particularly for solid and structural analysis within the framework of
linearized kinematics (small strains) and primarily within linear elasticity. In this final section,
we would like to briefly point out extensions of the basics introduced so far along with practical
hints.

• commercial codes: most commercially available FE codes follow a similar structure to


the one discussed here in class as well as during exercises. The FEM software provides
tools for assembling and solving boundary value problems as well as implementations of
the most common element types and material models. If the user cannot use existing
implementations, then there is the common option to implement one’s own element (so-
called user element, or UEL) or one’s own material model (so-called user material model,
or UMAT). The UMAT is usually the simpler and most frequently used option. It is of
utmost importance to adhere to the exact strain and stress measures used in the code,
since confusion thereof leads to nonsensical results. In addition, most commercial codes do
not have a variational basis and instead define the constitutive law as a relation between
strain and stress rates (σ̇ vs. ε̇) or increments (dσ vs. dε). Especially at large strains, it is
again essential to adhere to the correct rates or increments (there is a myriad of alternate
definitions that can be used); improper use of non-conjugate rates is a common pitfall of
commercial codes30 .

• static vs. dynamic FEA: if at all possible, a quasistatic mechanical boundary value
problem should in general be solved by a static, implicit solver, since this ensures that
an equilibrium solution has been found. However, that may not always be possible, e.g.,
because no consistent tangent T is available (because the material model lacks an analyt-
ical form of Cijkl or because the element implementation does not permit the analytical
calculation of the tangent matrix T ) or because the tangent matrix is so large that its
calculation and storage is disadvantageous computationally, if not impossible. We note
that an approximate tangent matrix can always be compute numerically by employing
finite differences, e.g.,
a
∂Fint,i a (U + δeb ) − F a (U )
Fint,i j int,i
Tijab (U ) = (U ) ≈ , (30.1)
∂ubj δ

with vector ebi = (0, . . . , 0, 1, 0, . . . , 0)T of the length of U with a 1 placed at the location
of component ubj , and 0 < δ ≪ 1. This procedure has the disadvantage that it is compu-
tationally expensive (the numerical calculation of T requires perturbing each and every
entry in U , one at a time, in the above fashion).
Many codes offer an explicit-dynamics option as an alternative. The idea here is to replace
the static simulation to solve for U by a dynamic one to solve for U (t); including sufficient
damping leads to solutions that converge over time to a steady-state U∞ = limt→∞ U (t),
and it is expected that this steady state coincides with the static solution, i.e., U∞ = U .
Such solvers must be used with caution! First, it is important to check if the solution has
indeed converged over time (if vibrations or waves are still present in the solution, those
may over- or under-predict local strains and stresses by considerable amounts). Second,
unless in a static linear elastic study (which surely should not be solved dynamically but
30
Studies of significant errors resulting from the improper use of rates can be found, e.g., here and here.

195
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

statically since an analytical tangent is available), the dynamic solver may converge to
one of many equilibrium solutions and, depending on the initial conditions, may take one
quite far from the sought solution.

• large deformations: in this course we focused on linearized kinematics (commonly re-


ferred to as “small strains” and valid up to, at the very most, a few percent strain). When
larger deformations are to be considered, one must employ a finite-strain formulation (e.g.,
working with deformation and velocity gradients as well as finite-kinematics stress mea-
sures). As a consequence, nodal element forces depend on the current deformed state of
the element in a nonlinear fashion. It further effects that the tangent matrix T contains
both material stiffness and, as a new contribution, geometric stiffness. Therefore, even
when assuming linear elastic material behavior, the resulting problem is not linear and
T is not constant in general. As a further consequence, one may experience mechanical
instability and bifurcation, which is problematic for numerical solvers (as also discussed
further below for damage and failure).

• total-Lagrangian vs. updated-Lagrangian: so far, we only discussed finite elements


whose initial geometry remains unchanged during a simulation. For example, even though
loads vary with time, we always use the same reference configuration of an element. This is
called a total-Lagrangian formulation. By contrast, we could also update the reference
configuration after each solution step; i.e., once U (tα ) has been found, we update all nodal
positions xa (tα ) ← xa (tα )+ua (tα ), recompute the shape functions, and – at the next time
step tα+1 – solve for U (tα+1 ) based on the new reference configuration. This approach
is employed to avoid large mesh distortions and is referred to as updated-Lagrangian.
While both have their advantages and disadvantages, one computational challenge of the
updated-Lagrangian implementation is the accumulation of numerical errors over time.
A further alternative, generally used in fluid mechanics, is the Eulerian formulation, in
which all governing equations are formulated in the current/deformed configuration.

• incompressibility: especially at large strains, the assumption of incompressibility (i.e.,


of zero volume change) is common when modeling, e.g., problems of rubber elasticity
or generally of soft matter such as tissues and polymers but also in metal plasticity.
Modeling incompressibility is not straight-forward, since it imposes a constraint on the
deformation within elements (the nodal dofs of an element are no longer independent, as
the element must maintain a constant volume under incompressible deformation). This
calls for a special type of element that can handle incompressibility, such as the so-called
family of augmented finite elements or mixed finite elements, which have mixed
dofs including both displacements and the pressure inside the element. These elements
are often referred to as PkQl elements, where k denotes the order of interpolation of the
displacement field, while l stands for the polynomial interpolation order of pressure (and
one generally seeks l ≤ k). Common choices of lowest order are, e.g., P1Q0 and P1Q1.

• singularities: the FE method is based on polynomial shape functions to interpolate


all fields of interest. When boundary value problems involve singularities (such as the
mechanical fields around a crack tip or a sharp notch, or the thermal fields around a
point heat source), then the polynomial interpolation inherently cannot lead to a good
approximate solution. As a consequence, results are usually mesh-dependent: the smaller
the elements (e.g., at the crack tip), the higher the calculated stress values within those
elements adjacent to the crack tip. It is for this reason that classical FEM is problematic
when dealing with fracture problems (or, generally, any problem involving singularities),
and results must be interpreted with utmost care. An h-convergence study usually reveals
the diverging solution quickly.

196
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

As a remedy, techniques like the eXtended FE Method (XFEM) have been introduced,
which enrich the interpolation space U h by singularities of the expected type. For example,
for fracture problems within linearized kinematics, the stress is expected to diverge as

1/ r at the crack tip with r > 0 being the distance from the tip. Hence, including shape
functions of this type allows the interpolation to capture the diverging mechanical fields,
thus removing the singularity and yielding reasonable solutions.

• damage and failure: when a material model includes damage or failure, it generally soft-
ens under increasing loads (as the material suffers from damage, its stiffness ultimately
tends to zero under increased loading). Such behavior causes numerical difficulties, be-
cause the softening branch of the stress-strain response leads to instability (e.g., most
iterative solvers fail when the tangent matrix T is no longer positive-definite, which is
generally the case during mechanical softening). This manifests not only in solver failure
but also in mesh dependence (again, a study of h-convergence should identify such issues).

197
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Appendices

198
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

A Operator notation for differential equations

For notational brevity, any of the ODEs and PDEs introduced in continuum mechanics and
thermodynamics can be written in an operator form. By introducing a differential operator
L, we may abbreviate, e.g., the 1D wave equation as
∂ ∂
ü − c2 u,xx = 0 ⇔ L[u] = 0 with L= 2
− c2 2 . (A.1)
∂t ∂x
One key feature of all PDEs discussed so far (including the heat and wave equations) is that
their operators are linear. A linear operator L is characterized by

L[α1 u1 + βu2 ] = α1 L[u1 ] + α2 L[u2 ] ∀ α1 , α2 ∈ R and for all functions u1 , u2 . (A.2)

For more information about operators and linear operators see Appendix I. A few examples
involving linear operators are summarized here:

• the 1D wave equation (of second order in space and time):

∂ ∂
L[u] = 0 with L= 2
− c2 2 ⇔ ü = c2 u,xx . (A.3)
∂t ∂x

• the 1D heat equation (of second order in space, first order in time):

∂ ∂2
L[T ] = s with L = ρcv −κ 2 ⇔ ρcv Ṫ = κT,xx + s. (A.4)
∂t ∂x

• the 1D advection equation (or transport equation) (of first order in space and time)
with a scalar flow speed v:
∂ ∂
L[u] = 0 with L= +v ⇔ u̇ + v u,x = 0. (A.5)
∂t ∂x

Similarly, boundary conditions can also be expressed by linear operators. For example, for we
may define boundary operators B as differential operators for

• boundary tractions applied to a 1D bar:



B[u] = t̂ with B=E ⇔ Eu,x = t̂. (A.6)
∂x

• boundary flux in a 1D bar undergoing Fourier-type heat conduction:



B[T ] = q̂ with B = −κ ⇔ − κT,x = q̂. (A.7)
∂x

199
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

B Structural Mechanics Review: Stiffness Matrix Assembly

Structural mechanics was a fruitful ground for the development of many of the principles nowa-
days exploited within the finite element context. Especially the assembly of large systems of
equations of motion bears many analogies to the assembly operations used for finite elements.
We here summarize a few fundamental principles, which will be helpful in our discussion of
finite elements later. We will mainly do this by examples.

Example B.1. Spring assembly in 1D

As a starting example, let us consider the shown 1D chain of n particles of masses mi (i =


1, . . . , n), which are coupled through elastic springs of stiffnesses ki,j (i, j = 1, . . . , n) and with
an external force Fiext applied to each particle. Let us find the equation of motion for each
particle i, (using the 1D displacements ui measured from the equilibrium position of a particle,
in which the springs are unstretched).

ui-1 ui ui+1
mi-1 ki,i-1 mi ki+1,imi+1
ext
Fi-1 Fi ext ext
Fi+1

From a free-body diagram, we obtain for each particle (except for i = 1 and i = n):

mi üi = −ki,i−1 (ui − ui−1 ) + ki,i+1 (ui+1 − ui ) + Fiext (t). (B.1)

The specific forms and signs of the connection terms ki,i−1 (ui − ui−1 ) and ki,i+1 (ui+1 − ui ) can
easily be found by recognizing that the spring forces are linear in the displacements.
Therefore, we may, e.g., assume that ui =
ui-1=0 ui=0 ui+1>1
ui−1 = 0 and only ui+1 > 0, which shows that
the force acting on particle i in this case pulls
to the right with a magnitude kui+1 . Similarly,
if ui = ui+1 = 0 and ui−1 > 0, then particle i
is pushed to the right with a force of magnitude
ui-1>1 ui=0 ui+1=0
kui−1 . Finally, if ui−1 = ui+1 = 0 and ui > 0,
then both springs connected to particle i push
the particle to the left, the right spring with
magnitude kui and the left with magnitude kui . ui-1=0 ui>1 ui+1=0
Summing all these contributions leads exactly
to the spring force terms in (B.1).
The first (i = 1) and the last particle (i = n) are each missing one spring connection. Applying
the same principles as above leads to the equations of motion for those particles as

m1 ü1 = k1,2 (u2 − u1 ) + F1ext (t), mn ün = −kn,n−1 (un − un−1 ) + Fnext (t). (B.2)

Alternatively (and sometimes more conveniently for complex systems), the equations of motion
can also be obtained from the Lagrange equations, using the kinetic energy T and potential
energy V with
n n  
X mi 2 X ki,i−1 2 d ∂L ∂L
T = u̇i , V = (ui − ui−1 ) ⇒ − = Fiext , (B.3)
2 2 dt ∂ u̇i ∂ui
i=1 i=2

200
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

which also yields the n equations given by (B.1) and (B.2).

Either way, the obtained equations of motion can be arranged into matrix form, viz.
  
m1 ü1

 m2   ü2 
 
 ...  · 
  

 mi   üi 
 
 ...  · 
mn ün
  ext 
−k1,2
 
k1,2 u1 F1
−k1,2 k1,2 + k2,3 −k2,3   u2  F2ext 
    
 ...  ·   · 
+   = 
  ui  F ext  .


 −ki−1,i ki−1,i + ki,i+1 −ki,i+1    i 
 ...  ·   · 
−kn,n−1 kn,n−1 un Fnext
(B.4)

Writing U = (u1 , . . . , un )T , the above matrix equation can be simplified into

M Ü + KU = F ext (B.5)

with (only showing the non-zero components)


   ext 
m1 F1
 m2  F ext 
   2 
 ..   .. 
 .  ext
 . 
[M ] = 
  and [F ] =  
F ext  (B.6)
 m i

  i 
 ..   .. 
 .   . 
mn Fnext

as well as
−k1,2
 
k1,2
−k1,2 k1,2 + k2,3 −k2,3 
 
 ... 
[K] =  . (B.7)

 −ki−1,i ki−1,i + ki,i+1 −ki,i+1 

 ... 
−kn,n−1 kn,n−1

Let us expand matrix K a bit more and use color coding for the different spring stiffness
contributions to realize the following structure:
 
k1,2 −k1,2
−k1,2 k1,2 + k2,3 −k2,3 
 

 −k2,3 k2,3 + k3,4 −k3,4 

[K] = 
 −k3,4 k3,4 + k4,5  . (B.8)

 . . 

 . 

 −kn−2 kn−2 + kn,n−1 −kn,n−1 
−kn,n−1 kn,n−1

201
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

To interpret the above, note that two particles connected by a linear


spring of stiffness k (which is a special case of the above for n = 2) u1 u2
are governed by the equations of motion m1 m2
F1ext k F2
ext
   
m1 k −k
Ü + U = F ext . (B.9)
m2 −k k

Again using the abbreviation M Ü + KU = F ext , the above equations allow us to define the
stiffness matrix of a single linear elastic spring in 1D as
 
k −k
[K] = (B.10)
−k k

By inspecting (B.8), we notice that the stiffness matrix of the chain of n springs is nothing but
the assembly of the stiffness matrices of all springs in the chain, each being added onto those
components in K, which are connected to the spring. For example, the spring with stiffness k2,3
links nodes 2 and 3. Therefore, the stiffness matrix (B.10) with k → k2,3 is added onto those
components in columns and rows 2 and 3 in [K]. Repeating this procedure for each spring leads
to the complete stiffness matrix in (B.8).

————

Example B.2. Spring assembly in 2D


The principles introduced above apply analogously to 3
two-dimensional spring assemblies. Let us consider the u2 3
simple structure shown on the right, which consists of F u1
three particles of masses mi , connected by linear springs
of equal stiffnesses k. Particles 1 and 2 are constrained
m3
by a fixed hinge and a rolling (simple) support, as shown.
The structure is loaded by a horizontal force F at the top, k
while the two supports provide reaction forces from the k
2
ground. In 2D, each particle has two degrees of freedom
ui1 and ui2 , where we use superscript i for the ith parti- u
1
1
u2 2
2
u1 k a u1
cle to avoid confusion with the particle number i and the
displacement components 1 and 2. Let us only consider m1 m2
linearized kinematics and statics.
From Statics, we know how to formulate the governing equations as the equilibrium relations
for each particle: the net/resultant force in each direction must vanish for each particle.
For particle 1, the equilibrium equations in the horizontal
and vertical directions are F
X
Fi,1 = S1 + R1 = 0 with S1 = k(u21 − u11 ) S3 S2
i
X
Fi,2 = S3 + R2 = 0 with S3 = k(u32 − u12 ),
i
(B.11)
S3 S2
S1 a
where R1 and R2 are, respectively, the horizontal and
vertical components of the reaction force from the ground S1
onto particle 1. Forces S1 and S3 are the spring forces, R2 R1 T1
resulting form the stretching of the springs.

202
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The equilibrium equations for particle 2 can be formulate in an analogous fashion:


X
Fi,1 = −S1 − S2 cos α = 0,
i
X (B.12)
Fi,2 = S2 sin α + T1 = 0,
i

where T1 is the vertical reaction force from the ground onto particle 2, and

S2 = k(u21 cos α − u22 sin α − u31 cos α + u32 sin α) (B.13)

is the tensile force in the spring connecting particles 2 and 3 (obtained from projecting the
displacement components onto the spring to infer its change of length). Finally, for particle 3
we obtain
X
Fi,1 = S2 cos α + F = 0,
i
X (B.14)
Fi,2 = −S3 − S2 sin α = 0.
i

Overall, we have thus arrived at the following system of equations:

−k(u21 − u11 ) = R1 ,
−k(u32 − u12 ) = R2 ,
−k(u21 − u11 ) − k(u21 cos α − u22 sin α − u31 cos α + u32 sin α) cos α = 0,
(B.15)
−k(u21 cos α − u22 sin α − u31 cos α + u32 sin α) sin α = T1 ,
−k(u21 cos α − u22 sin α − u31 cos α + u32 sin α) cos α = F,
−k(u32 − u12 ) − k(u21 cos α − u22 sin α − u31 cos α + u32 sin α) sin α = 0.

This may be rewritten in the familiar matrix form KU = Fext , viz.


  1  
−k

k u1 R1
 k −k  u12  R2 
k cos2 α −k cos2 α
   2  
−k k+ −k cos α sin α k cos α sin α 
 u1  =  0  .
   
 2 2
−k cos α sin α k sin α k cos α sin α −k sin α   2
u2   T1 
   

 −k cos2 α k cos α sin α k cos2 α 3
−k cos α sin α u   F 
1
−k k cos α sin α −k sin2 α −k cos α sin α k + k sin2 α u32 0
(B.16)

We notice that the structure of the stiffness matrix


−k
 
k
 k −k 
2 2
 
−k k + k cos α −k cos α sin α −k cos α k cos α sin α 
[K] =    (B.17)
 −k cos α sin α k sin2 α k cos α sin α −k sin2 α  
 −k cos2 α k cos α sin α k cos2 α −k cos α sin α
−k k cos α sin α −k sin2 α −k cos α sin α k + k sin2 α

again follows the general recipe discussed above: we can identify those contributions of the spring
stiffness matrices of the horizontal and vertical springs (see the red and blue contributions,
respectively). All remaining (black) contributions stem from the oblique spring connecting

203
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

particles 2 and 3, which is more involved since it links both horizontal and vertical displacement
components. We further notice that all diagonal components satisfy k(ii) > 0.

As an exercise, try out yourself to insert displacement vectors being 0 with only one component
being 1 to find the forces produced by the springs when activating only one displacement
component (and verify that those forces make sense)!

————

204
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

C 2-Node Beam Element via the Direct Stiffness Method

As shown in Example 12.1, we can analytically calcu-


late the reaction forces and moments on a homogeneous
Fy1 Fy2
slender beam of length L, Young’s modulus E, and area
My1
moment Iy , whose two ends are constraint such that w1 w2 My2
q1
w(0) = w1 , w(L) = w2 ,
(C.1) q2

ψ(0) = w (0) = θ1 , ψ(L) = w′ (L) = θ2 ,
where wi and θi are known beam end deflections and rotations, respectively. For the case of no
distributed transverse load with only deflections and moments imposed at its ends, we found
the deflection w(x) in (12.23) as
 x 2  x 3
w(x) = w1 + θ1 x + [3(w1 − w2 ) + L(2θ1 + θ2 )] − [2(w1 − w2 ) + L(θ1 + θ2 )] . (C.2)
L L
and the corresponding forces and moments at the two end points of the beam as
 1   
Fz 6 3L −6 3L w1
My1  2EIy  3L 2L2 −3L L2   θ1 
 Fz2  = L3 −6 −3L
    . (C.3)
6 −3L w2 
My2 3L L2 −3L 2L2 θ2

As discussed in Section 5.3, we may interpret the matrix in (C.3) as the stiffness matrix of
a beam element (compare, e.g., with (5.7) for a bar element): it relates the externally applied
forces and torques to the resulting displacements and rotation angles. If we define the degree
of freedom for this element as
 
w1
 θ1 
U = w2 
 (C.4)
θ2

and the external “force” vector (in an abuse of notation, as it contains both forces and moments)
as
 1
Fz
My1 
Fext =  Fz2  ,
 (C.5)
My2

then we conclude for a beam element of length Le undergoing deflection and rotation (and
without a distributed load, so q(x) = 0) that
 
6 3Le −6 3Le
2EIy  2 L2e 
Fext = KU with [K] = 3Le 2Le −3Le  (C.6)
L3e  −6 −3Le 6 −3Le 
3Le L2e −3Le 2L2e

This defines a two-node beam element having degrees of freedom (C.4) and external forces
(and moments) (C.5). This is indeed identical to the stiffness matrix (12.55) derived from
variational principles.

205
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

D Methods of Weighted Residuals

D.1 Weighted Residuals

The objective of all weighted residual methods is to find approximate solutions uh (x, t) that
minimize the total error of that approximate solution (which still needs to be defined) when
compared to the exact solution u(x, t). As in the discussion of variational method, let us here
drop the time dependence and only consider (quasi-)static problems. Also, we restrict ourselves
to 1D problems, seeking uh (x), which can be expanded to higher dimensions as needed.

We start by defining a solution space of our sought approximation by writing


n
X
h
u (x) = ca ϕa (x) (D.1)
a=1

where

• ϕa (x) with a = 1, . . . , n are n appropriately chosen basis functions (or trial functions),
which serve as the known basis of the solution space. These functions are chosen a-
priori. Examples are polynomials (e.g., ϕa (x) = xa ) or terms of a Fourier series (e.g.,
ϕa (x) = sin(πax)).

• ca are unknown coefficients to be determined.

We have thus reduced the infinite-dimensional problem to a finite-dimensional one (to be solved
for the n coefficients c1 , . . . , cn ). Note that n → ∞ yields the exact solution if a proper orthog-
onal set of basis functions is chosen (e.g., polynomials or a Fourier series). For our purposes, we
deliberately choose n ≪ ∞, so that the resulting finite-dimensional problem is computationally
tractable.

One constraint we would like to impose is that the approximate function uh (x) must satisfy
all Dirichlet (essential) boundary conditions (if a function uh (x) does not satisfy the essential
boundary conditions, then it does not qualify as a solution to the problem). This can be
accomplished in various ways. For example, one can impose the essential boundary conditions
onto the unknown coefficients as a direct constraint to be accounted for while solving (we will use
this latter strategy in most of the below examples). An alternative is to separate the boundary
part from the interior part by defining
n
X
h
u (x) = u∂ΩD (x) + ca ϕa (x) with ϕa (x) = 0 on ∂ΩD (D.2)
a=1

and u∂ΩD (x) satisfying all essential boundary conditions.

As explored in Section 1.7, the general boundary value problem we aim to solve can be written
in general as

find u(x) s.t. L[u] = s for x ∈ Ω and Bj [u] = t̂j for x ∈ ∂Ωj (j = 1, . . . , k),
(D.3)

where L is a linear differential operator, representing the governing equation inside body Ω
(e.g., linear momentum balance or the heat equation), and Bj is a linear differential boundary
operator, representing natural (Neumann) boundary conditions (e.g., imposing tractions or a

206
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

heat flux on the boundary ∂Ω). Since we may have multiple independent Neumann boundary
conditions, we here account for k different boundary conditions, each defined by a unique
operator Bj (e.g., we may want to apply different tractions to different parts of the boundary).

We now insert our approximate solution uh (x) into the above set of equations (D.3), knowing
that it will in general not satisfy those governing equations (otherwise, we would have found an
exact solution). As a consequence, we obtain residuals defined by

rΩ = L[uh ] − s and r∂Ωj = Bj [uh ] − t̂j . (D.4)

Unless we have found the exact solution, we will have rΩ ̸= 0 and r∂Ωj ̸= 0, and we seek
coefficients ca (a = 1, . . . , n) such that our approximate solution uh (x) satisfies rΩ ≈ 0 and
r∂Ωj ≈ 0 in some sense. In order to find the n coefficients, we need n equations.

To this end, the family of methods summarized under the name method of weighted resid-
uals defines n total residuals as
Z k Z
X
2
Ri = rΩ Wi dV + ξ r∂Ωj wi dS ⇒ Ri = 0 for i = 1, . . . , n (D.5)
Ω j=1 ∂Ωj

where Wi (x) and wi (x) (for i = 1, . . . , n) are weighting functions for, respectively, the bulk and
surface residuals, which define – loosely speaking – the priority of where the residuals are to be
evaluated. ξ 2 > 0 is an, in principle, arbitrary constant introduced for unit compatibility (and
we write ξ 2 instead of ξ to make sure the pre-factor in front of the second integral is positive,
assuming ξ ∈ R). Now there are various ways to define the weights (each of different difficulty
and accuracy levels), and this leads to the following methods of weighted residuals.

D.2 Collocation Method

A straight-forward approach is to evaluate the residuals only at specific locations, which results
in the so-called collocation method.
To this end, we use Dirac delta functions to define
x
Wi = δ(x − xi ) for xi ∈ Ω, i = 1, . . . , n − k, +1
(D.6)
wi = δ(x − xi ) for xi ∈ ∂Ωi−(n−k) , i = n − k + 1, . . . , n, x
+2
so that the equations to be solved for coefficients ca are x
+3 x6 t
x +
+4
rΩ (xi ) = 0 for i = 1, . . . , n − k x
(D.7) +5
r∂Ωi−(n−k) (xi ) = 0 for i = n − k + 1, . . . , n W
Points xi (i = 1, . . . , n) are called collocation points31 . This method is closest to the finite-
difference techniques discussed before, since it aims at minimizing the error only at discrete
points (much like finite differences aim to solve the PDE exactly only on a discrete grid).
For convenience, we here chose k collocation points on the k boundaries with natural boundary
conditions (one per boundary), while one could also choose this distribution differently and make
informed guesses over where the residuals are ideally to be evaluated – as long as sufficiently
31
R
Recall the delta function property Ω f (x)δ(x−x0 ) dx = f (x0 ) for x0 ∈ Ω. This is exploited here to define the
weights such that the residual integrals are turned into local evaluations of the residuals at the chosen collocation
points xi .

207
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

many equations are available (recall that we need n equations to solve for the n unknown
coefficients).

D.3 Subdomain Method

The subdomain method is similar in spirit to the collocation


method but, instead of evaluating the residuals at specific colloca-
tion points, we subdivide the body and its boundary into subdo- D1 W
mains and require the total residual to vanish on average over each
of the subdomains. Therefore, we define
D2 t
(
1 if x ∈ Di
Wi = for i = 1, . . . , n − k (D.8) D3
0 else

and
(
1 if x ∈ ∂Ωi−(n−k)
wi = for i = n − k + 1, . . . , n, (D.9)
0 else

where Di ⊂ Ω for i = 1, . . . , n − k are (possibly overlapping) domains within the body, as


illustrated above, while ∂Ωi ⊂ ∂Ω are the k boundary domains.

Consequently, the n equations to be solved for the n coefficients ca are


Z
rΩ dV = 0 for i = 1, . . . , n − k
Di
Z (D.10)
r∂Ωi dS = 0 for i = 1, . . . , k
∂Ωi

Keep in mind that we here aim to solve the PDE and boundary conditions only on average
across the respective domains. Therefore, there is no guarantee that any of the residuals vanish
anywhere inside the domain or on the boundary.

D.4 Method of Least Squares

The least squares method is probably the most intuitive approach and seeks to determine the
unknown coefficients by minimizing the bulk and boundary residuals. To this end, we introduce
the total error
Z k Z
X
2 2 2
E= rΩ dV +ξ r∂Ωj
dS (D.11)
Ω j=1 ∂Ωj

and obtain the coefficients as the minimizers thereof, i.e.,


{c1 , . . . , cn } = arg min E. (D.12)
As before, ξ 2 > 0 is an arbitrary (positive) parameter introduced for dimensional consistency.
The associated stationarity conditions become
k
∂r∂Ωj
Z Z
∂E ∂rΩ X
=0 ⇔ rΩ a dV +ξ 2 r∂Ωj dS = 0 for a = 1, . . . , n, (D.13)
∂ca Ω ∂c ∂Ωj ∂ca
j=1

208
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

from which we realize, by comparing to (D.5), that we have yet another method of weighted
residuals, since we have effectively chosen

∂rΩ ∂r∂Ωj
Wa = inside Ω, wa = on Neumann boundary ∂Ωj . (D.14)
∂ca ∂ca
Recalling our definitions and exploiting the properties of a linear operator (see Section 1.7 and
Eq. (A.2)), we may write the residual when evaluated with the approximate solution uh as
n
X n
X
uh (x) = ca ϕa (x) ⇒ rΩ = L[uh ] − s = ca L[ϕa (x)] − s (D.15)
a=1 a=1

and the boundary residuals (for j = 1, . . . , k) analogously as


n
X
h
r∂Ωj = Bj [u ] − t̂j = ca Bj [ϕa (x)] − t̂j . (D.16)
a=1

This shows that


∂rΩ ∂r∂Ωj
Wa = = L[ϕa (x)] in Ω, wa = = Bj [ϕa (x)] on ∂Ωj . (D.17)
∂ca ∂ca
Altogether, this turns the stationarity conditions (D.13) for a = 1, . . . , n into32
n
Z !
X
c L[ϕ (x)] − s L[ϕa (x)] dV
b b
Ω b=1
k Z n
! (D.18)
X X
+ ξ2 cb Bj [ϕb (x)] − t̂j Bj [ϕa (x)] dS = 0
j=1 ∂Ωj b=1

or, after some re-arrangement (separating terms depending on cb from those independent of the
coefficients),
 
Xn Z k Z
X
 L[ϕa (x)]L[ϕb (x)] dV + ξ 2 Bj [ϕa (x)]Bj [ϕb (x)] dS  cb
b=1 Ω j=1 ∂Ωj
| {z }
=K ab (D.19)
Z k Z
X
= sL[ϕa (x)] dV + ξ 2 t̂j Bi [ϕa (x)] dS for a = 1, . . . , n.
Ω j=1 ∂Ωj
| {z }
=F a

This is a linear system of n equations, which may be rewritten concisely as


n
X
K ab cb = F a for a = 1, . . . , n or Kc = F , (D.20)
b=1

where we grouped all unknown coefficients into the vector


T
c = c1 , . . . , cn . (D.21)
32
Here and everywhere in the following, we will switch the summationPindex when multiplying two sums
n
involving indices to avoid duplicated indices and ambiguity; e.g., rΩ ∂r b b a

b=1 c L[ϕ (x)] − s L[ϕ (x)], where

∂ca
=
summation index b is used instead of a in parentheses in order to avoid ambiguity when multiplying by L[ϕa (x)].

209
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The components of matrix K and vector F are, respectively,


Z k Z
X
ab a b 2
K = L[ϕ (x)]L[ϕ (x)] dV + ξ Bj [ϕa (x)]Bj [ϕb (x)] dS (D.22)
Ω j=1 ∂Ωj

and
Z k Z
X
a a 2
F = sL[ϕ (x)] dV + ξ t̂j Bj [ϕa (x)] dS. (D.23)
Ω j=1 ∂Ωj

Note that both K and F are constant, since all integrals have been evaluated, so (D.20) is indeed
a linear system with constant coefficients to be solved for c. Notice that K is by definition
symmetric (K ab = K ba ) and, moreover, positive-semi-definite (since K aa ≥ 0 combined with
the symmetry property). As before, we use symbols K and F by analogy to, respectively, the
stiffness matrix and external force vector in our truss analysis in Section 5.

Example D.1. Rotating bar with attached point mass


Consider a bar of length L, constant Young’s modulus E, cross-
sectional area A and mass density ρ, which is hinged at the origin
L
and rotating about this hinge with a constant angular velocity ω. w u(x)
+
x
In addition, a particle of mass m is attached at the free end of the
E,A,r m
rotating bar.
Let us first find the exact solution of the 1D displacement field u(x) inside the bar. We consider
a co-rotating frame of reference with coordinate x running along the bar, starting at the origin.
Linear momentum balance with the centripetal acceleration a = −ω 2 x states that

ρω 2
div σ = ρa ⇒ (Eu,x ),x = −ρω 2 x ⇒ u,xx = − x, (D.24)
E
and the boundary conditions are (the force coming from the centripetal acceleration of the
attached particle)

u(0) = 0 and F (L) = AEu,x (L) = mω 2 L. (D.25)

Integrating the ODE twice for u(x) and obtaining the two integration constants from the two
boundary conditions yields the exact solution

ρω 2 3 mω 2 L ρω 2 L2
 
u(x) = − x + + x. (D.26)
6E EA 2E

Next let us find approximate solutions by the various methods of weighted residuals. To this
end, let us introduce an approximate solution, e.g., with a polynomial basis ϕa (x) = xa , such
that
n
X
h
u (x) = ca xa . (D.27)
a=0

This defines a polynomial function space of order n, which is often abbreviated as

uh (x) ∈ Pn . (D.28)

210
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

The essential boundary condition u(0) = 0 requires that c0 = 0 (recall that we only enforce
Dirichlet and not Neumann boundary conditions from the outset).

For a practical example (which admits simple closed-form solutions), let us pick n = 3 so the
approximate solution is uh (x) ∈ P3 . Hence, we use
3
X
h
u (x) = ca xa = c1 x + c2 x2 + c3 x3 . (D.29)
a=1

The bulk and surface residuals in this problem are written as, respectively,

rΩ (x) = Euh,xx (x) + ρω 2 x = E 2c2 + 6c3 x + ρω 2 x



for 0 ≤ x ≤ L,
| {z } | {z }
=L[uh ] =−s
(D.30)
r∂Ω (x) = EAuh,x (x) − mω 2
L} = EA c1 + 2c2 x + 3c3 x2 − mω 2 L

| {z at x = L.
| {z }
=F
=B[uh ]

Since there is only one Neumann boundary (viz., at the free end of the bar at x = L, there is
only a single boundary residual and k = 1 and no need for index j in the above).

Collocation Method. In order to use the collocation method, we must choose a total of n = 3
collocation points to obtain the same number of equations as we have unknown coefficients in
the approximation, viz. {c1 , c2 , c3 }. Since we have one boundary residual, let us choose two
points along the bar (e.g., equally spaced) and one at the end x = L, overall leading to the
collocation point locations defined as

x1 = L/3, x2 = 2L/3, x3 = L. (D.31)

With those collocation points, the collocation method yields the three residuals that we set to
zero:
rΩ (x1 ) = E(2c2 + 2c3 L) + ρω 2 L/3 = 0,
rΩ (x2 ) = E(2c2 + 4c3 L) + 2ρω 2 L/3 = 0, (D.32)
r∂Ω (x3 ) = EA(c1 + 2c2 L + 3c3 L2 ) − mω 2 L = 0.
In matrix form, the above becomes the linear system of equations
  1 
−ρω 2 L/3
 
0 2E 2EL c
 0 2E 4EL  c2  = −2ρω 2 L/3 , (D.33)
EA 2EAL 3EAL2 c3 mω 2 L
whose solution is
mω 2 L ρω 2 L2 ρω 2
c1 = + , c2 = 0, c3 = − . (D.34)
EA 2E 6E
Insertion into (D.29) yields the approximate solution
mω 2 L ρω 2 L2 ρω 2 3
 
h 1 2 2 3 3
u (x) = c x + c x + c x = + x− x . (D.35)
EA 2E 6E
This is in fact the exact solution, cf. Eq. (D.26). Note that this is coincidental (since rΩ (x) is
linear in x, so any two points inside the bar would have resulted in this solution, given that
u(x) ∈ P3 (x), so the exact solution is contained in the chosen approximate solution space). Yet,
this is not generally the case.

211
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Subdomain Method. Let us repeat the above example using the subdomain method. To
this end, we define two equally-sized subdomains in the bulk of the bar (simply by dividing the
bar into two equal halfs):

D1 = {x : 0 ≤ x ≤ L/2}, D2 = {x : L/2 ≤ x ≤ L}, (D.36)

and we have x = L as our third “domain” to satisfy the Neumann boundary condition. There-
fore, the three equations to solve are
Z L/2 Z L
E 2c2 + 6c3 x + ρω 2 x dx = 0, E 2c2 + 6c3 x + ρω 2 x dx = 0 (D.37)
     
0 L/2

and, as before,

EA(c1 + 2c2 L + 3c3 L2 ) − mω 2 L = 0. (D.38)

Solving the resulting system of equations (try it out yourself as an exercise) again yields the
correct solution uh (x) = u(x).

Least Squares Method. Finally, let us use the method of least squares for which we had
shown that the problem reduces to solving the linear system (D.20) with matrix components
Z k Z
X
K ab = L[ϕa (x)]L[ϕb (x)] dV + ξ 2 Bj [ϕa (x)]Bj [ϕb (x)] dS (D.39)
Ω j=1 ∂Ωj

and vector components


Z k Z
X
a a 2
F = sL[ϕ (x)] dV + ξ t̂j Bj [ϕa (x)] dS. (D.40)
Ω j=1 ∂Ωj

For this particular problem, we have defined L[·] and B[·] in (D.30), which results in
Z L
ab
L[xa ]L[xb ]A dx + ξ 2 B[xa ]B[xb ] x=L
 
K = for a, b = 1, 2, 3
0
Z L
∂ 2 xa ∂ 2 xb ∂xa ∂xb
 
2
= E E A dx + ξ EA EA
0 ∂x2 ∂x2 ∂x ∂x x=L
Z L (D.41)
= E2A a(a − 1)b(b − 1)xa+b−4 dx + ξ 2 E 2 A2 abLa+b−2
0
a(a − 1)b(b − 1) a+b−3
= E2A L + ξ 2 E 2 A2 abLa+b−2
a+b−3
Note that for unit consistency between the two terms we may choose ξ 2 = (LA)−1 (any inverse
volume works in general; here, let us make this specific choice for its simplicity). Inserting
a, b = 1, 2, 3 leads to the coefficients of matrix K.

The components of the right-hand-side vector follow analogously:


Z L
a
F = (−ρω 2 x)L[xa ]A dx + ξ 2 mω 2 LB[xa ]x=L
0
Z L 2 a
2 ∂ x ∂xa (D.42)
= −ρω EA x 2 dx + ξ 2 mω 2 LEA |x=L
0 ∂x ∂x
= −ρω 2 EA(a − 1)La + ξ 2 mω 2 EAaLa .

212
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Overall, this leads to the linear system


 AE 2   1 
Emω 2

L 2AE 2 3AE 2 L c
 2AE 2 8AE 2 L 12AE 2 L2  c2  =  ELω 2 (2m − ALρ)  , (D.43)
3AE L 12AE 2 L2 21AE 2 L3
2 c3 EL2 ω 2 (3m − 2ALρ)
whose solution, again, recovers the exact solution (D.26).

In summary, all methods of weighted residuals led to the exact solution, which should not be
taken as the usual outcome. In fact, we were fortunate since we selected uh ∈ P3 as the function
space for our approximation solution, which contains the exact solution u ∈ P3 . If, by contrast,
we had chosen a truncated Fourier series, e.g., ϕa (x) = sin(2πax) with a = 1, . . . , n, we would
surely not have arrived at the exact solution with a finite value of n but seen convergence towards
the exact solution with increasing n. In addition, the problem was relatively simple, so that
the choice of collocation points, subdomains, or of ξ 2 did not significantly affect the solution.
In real-world problems with complex operators and boundary conditions as well as complex
geometries, we will unlikely find an exact solution, but we can use the methods of weighted
residuals to find approximate solutions that satisfy the governing equations on average.

————

D.5 Galerkin’s method

We point out that Galerkin’s method of formulating the weak form via the principle of virtual
work (see Section 8.4) also classifies as a method of weighted residuals. By inspecting the
hanging bar problem of Example 8.3, note that the principle of virtual work, Eq. (8.27), can be
rewritten as
Z L Z L
R= Eu,x u∗,x A dx − ρgu∗ A dx − F̂ u∗ (L) = 0, (D.44)
0 0
which is of the form (D.5) of the total residual discussed for the methods of weighted residuals,
with the virtual displacement u∗ acting as the weighting function. Moreover, we can, as before,
introduce a finite-dimensional representation for uh (x) ≈ u(x), e.g., in the form of a polynomial
or Fourier series, and solve for the n unknown coefficients ca by introducing n independent
weight functions u∗,a (x). Since the residual R in (D.44) is linear in u(x), this again leads to a
linear system of equations to be solved for the unknown coefficients.

D.6 Higher Dimensions

Any of the above methods can be extended to higher spatial dimensions as needed (after all, only
few real-world problems can be reduced to one dimension). In higher dimensions, we generally
seek to find a function u(x) : Ω → Rd and introduce the approximation
X
uh (x) = ca ϕa (x), (D.45)
a∈T

where ∈ca Rdare the unknown, vector-valued coefficients, and ϕa (x) denote the basis functions.
For example, we may again use polynomial or Fourier basis functions; e.g., ϕa (x) = sin(πa · x)
with appropriate choices of the vector set T . Now, we need d×n independent equations to solve
for all components of the n coefficient vectors ca (d equations per any of the n coefficients). It is
simplest to explain these concepts through practical examples, which will follow later. However,
the general concepts are fully analogous to those described above.

213
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

E Vector Spaces

We define a set Ω as a collection of points X ∈ Ω.

We further say Ω is a (proper) subset of all space if Ω ⊆ Rd in d dimensions (proper if


Ω ⊂ Rd ).

We usually take Ω to be an open set, i.e., Ω ∩ ∂Ω = ∅ with boundary ∂Ω.

Deformation and motion are described by a mapping

φ : X ∈ Ω → φ(X) ∈ Rd or φ : Ω → Rd , (E.1)

where Ω is the domain and Rd the range of φ. The mapped (current) configuration of Ω is
φ(Ω).

Every function f (x) : R → R is a mapping from R to R.

We call a mapping injective (or one-to-one) if for each x ∈ φ(Ω) there is one unique X ∈ Ω
such that x = φ(X). In other words, no two points X ∈ Ω are mapped onto the same position
x. A mapping is surjective (or onto) if the entire set Ω is mapped onto the entire set φ(Ω); i.e.,
for every X ∈ Ω there exists at least one x ∈ φ(Ω) such that x = φ(X). If a mapping is both
injective and surjective (or one-to-one and onto) we say it is bijective. A bijective mapping is
also called an isomorphism. For example, φ : Ω → Rd is injective, whereas φ : Ω → φ(Ω) is
bijective.

For time-dependent problems, we have φ : Ω × R → Rd and x = φ(X, t). This describes a


family of configurations φ(Ω, t), from which we arbitrarily define a reference configuration Ω for
which φ = id (the identity mapping).

A linear/vector space {Ω, +; R, ·} is defined by the following identities. For any u, v, w ∈ Ω


and α, β ∈ R it holds that

(i) closure: α · u + β · v ∈ Ω
(ii) associativity w.r.t. +: (u + v) + w = u + (v + w)
(iii) null element: ∃ 0 ∈ Ω such that u + 0 = u
(iv) negative element: for all u ∈ Ω ∃ − u ∈ Ω such that u + (−u) = 0
(v) commutativity: u + v = v + u
(vi) associativity w.r.t. ·: (αβ) · u = α(β · u)
(vii) distributivity w.r.t. R: (α + β) · u = α · u + β · u
(viii) distributivity w.r.t. Ω: α · (u + v) = α · u + α · v
(ix) identity: 1 · u = u

examples:

• Rd is a vector space. By contrast, Ω ⊂ Rd is not a vector space, since – in general – it


violates, e.g., (i) closure and (iv) null element.

• P2 = {ax2 +bx+c : a, b, c ∈ R} is the space of all second-order polynomial functions,


or an ordered triad (a, b, c) ∈ R3 . More generally, Pk (Ω) is the space of all kth-order
polynomial functions defined on Ω. Pk (Ω) is a linear space.

We call P2 a linear subspace of Pk with k ≥ 2, and we write P2 ⊆ Pk .

214
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

F Function Spaces

Consider a function u(x) : Ω → R and Ω ⊂ R.

u is continuous at a point x if, given any scalar ϵ > 0, there is a r(ϵ) ∈ R such that

|u(y) − u(x)| < ϵ provided that |y − x| < r. (F.1)

A function u is continuous over Ω if it is continuous at all points x ∈ Ω.

u is of class C k (Ω) with an integer k ≥ 0 if it is k times continuously differentiable over Ω (i.e.,


u possesses derivatives up to the kth order and these derivatives are continuous functions).

Examples:

• Functions u(x) ∈ Pk with k ≥ 0 are generally C ∞ (R).

• Consider a continuous, piecewise-linear function u : Ω = (0, 2) → R. Function u is C 0 (Ω)


but not C 1 (Ω).

• The Heavyside function H(x) is said to be C −1 (R) since its “zeroth derivative” (i.e.,
the function itself) is not continuous.

If there are no discontinuities such as cracks, shocks, etc. (or discontinuities in the BCs/ICs) we
usually assume the solution fields are C ∞ (Ω), so we may take derivatives; otherwise, derivatives
exist almost everywhere (a.e.)

To evaluate the global errors of functions, we need norms.

Consider a linear space {U, +; R, ·}. A mapping ⟨·, ·⟩ : U × U → R is called inner product on
U × U if for all u, v, w ∈ U and α ∈ R:

(i) ⟨u + v, w⟩ = ⟨u, w⟩ + ⟨v, w⟩


(ii) ⟨u, v⟩ = ⟨v, u⟩
(iii) ⟨α · u, v⟩ = α ⟨u, v⟩
(iv) ⟨u, u⟩ ≥ 0 and ⟨u, u⟩ = 0 ⇔ u = 0

A linear space U endowed with an inner product is called an inner product space.

Examples:

• ⟨u, v⟩ = ui vi = u · v defines an inner product for u, v ∈ Rd .

• The L2 -inner product for functions u, v ∈ U with domain Ω:


Z
⟨u, v⟩L2 (Ω) = u(x) v(x) dx and often just ⟨u, v⟩ = ⟨u, v⟩L2 (Ω) . (F.2)

Note that if ⟨u, v⟩ = 0 we say u and v are orthogonal.

Examples:

• Legendre polynomials:
1 dn 2 1
pn (x) = (x −1)n so that p0 = 1, p1 = x, p2 = (3x2 −1), . . . (F.3)
2n n! dxn 2

215
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

are orthogonal on Ω = (−1, 1), since


Z 1
2
pn (x) pm (x) dx = δmn . (F.4)
−1 2n +1

• trigonometric functions:
 πnx 
pn (x) = cos (F.5)
L
are orthogonal on Ω = (−L, L), since

Z L 2L, if m = n = 0,

pn (x) pm (x) dx = L, if m = n ̸= 0, (F.6)
−L 
0, else.

Now we are in place to define the distance between x1 and x2 :


p
d(x1 , x2 ) = ⟨x1 − x2 , x1 − x2 ⟩ (F.7)
We need this concept not only for points in space but also to define the closeness or proximity
of functions.

Consider a linear space {U, +; R, ·}. A mapping ∥·∥ : U → R+ is called a norm on U if for all
u, v ∈ U and α ∈ R:

(i) ∥u + v∥ ≤ ∥u∥ + ∥v∥ (triangle inequality)


(ii) ∥α · u∥ = |α| ∥u∥
(iii) ∥u∥ ≥ 0 and ∥u∥ = 0 ⇔ u = 0.

A linear space Ω endowed with a norm is called a normed linear space (NLS).

Examples of norms:

• Consider the d-dimensional Euclidean space, so x = {x1 , . . . , xd }T , for which we define

– the 1-norm: ∥x∥1 = di=1 |xi |


P
P 1/2
d 2
– the 2-norm: ∥x∥2 = i=1 i|x | (Euclidean norm)
P 1/n
d n
– the n-norm: ∥x∥n = i=1 |x i |
– the ∞-norm: ∥x∥∞ = max1≤i≤n |xi |

• Now turning to functions, the Lp -norm of a function u : Ω → R:


Z 1/p
p
∥u∥Lp (Ω) = u dx (F.8)

The most common norm is the L2 -norm:


Z 1/2
1/2
∥u∥L2 (Ω) = ⟨u, u⟩L2 (Ω) = u2 (x) dx . (F.9)

Furthermore, notice that


∥u∥L∞ (Ω) = ess sup |u(x)| , (F.10)
x∈Ω

216
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

where we introduced the essential supremum

ess sup |u(x)| = M with the smallest M that satisfies |u(x)| ≤ M for a.e. x ∈ Ω. (F.11)
x∈Ω

Now, that we have norms, we can generalize our definition of the distance. If un , u ∈ U equipped
with a norm ∥·∥ : U → R, then we define the distance as

d(un , u) = ∥un − u∥ . (F.12)

Now, we are in place to define the convergence of a sequence of functions un to u in U: we


say un → u ∈ U if for all ϵ > 0 there exists N (ϵ) such that d(un , u) < ϵ for all n > N .

Examples:

• Consider un ∈ U = P2 (Ω) with L2 -norm and Ω ⊂ R with


  Z
1 2 2 1
un (x) = 1 + x → u(x) = x since d(un − u) = x2 dx (F.13)
n n

with u ∈ U = P2 (Ω). For example, for d(un − u) < ϵ we need n > N = Ω x2 dx/ϵ.
R

• Fourier series:

X n
X
u(x) = ci xi ⇒ un (x) = ci xi such that un → u as n → ∞. (F.14)
i=0 i=0

Given a point u in a normed linear space U, a neighborhood Nr (u) of radius r > 0 is defined
as the set of points v ∈ U for which d(u, v) < r. Now, we can define sets properly:

A subset V ⊂ U is called open if, for each point u ∈ V, there exists a neighborhood Nr (u)
which is fully contained in V. The complement V e of an open set V is, by definition a closed set.
The closure V of an open set V is the smallest closed set that contains V. In simple terms, a
closed set is defined as a set which contains all its limit points. Therefore, note that

sup |u(x)| = max |u(x)| . (F.15)


x∈Ω x∈Ω

For example, (0, 1) is an open set in R. [0, 1] is a closed set, and [0, 1] is the closure of (0, 1).

A linear space U is a complete space if every sequence un in U converges to u ∈ U. In simple


terms, the space must contain all limit points.

A complete normed linear space is called a Banach space; i.e., {U, +; R, ·} with a norm ∥·∥
and un → u ∈ U. A complete inner product space is called a Hilbert space.

Note that ∥·∥ = ⟨·, ·⟩1/2 defines a norm. Hence, every Hilbert space is also a Banach space (but
not the other way around).

As an example, consider U = Pn (the space of all polynomial functions of order n ∈ N).


This is a linear space which we equip with a norm, e.g., the L2 -norm. It is complete since
R n , bn , cn , . . .) → (a, b, c, . . .) for a, b, c, . . . ∈ R. And an inner product is defined via ⟨u, v⟩ =
(a
Ω uv dx. With all these definitions, U is a Hilbert space.

217
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

We can use these norms to define function spaces, e.g., the L2 -space of functions:
Z
u2 dx < ∞

L2 (Ω) = u : Ω → R : (F.16)

We say L2 (Ω) contains all functions that are square-integrable on Ω.

Examples:

• u : Ω → R with u ∈ Pk (Ω) and ess supx∈Ω |u(x)| < ∞. Then, u ∈ L2 (Ω).

• f : R → R with f (x) = x−2 is not in L2 (Ω) if 0 ∈ Ω.

• Piecewise constant functions u (with ess supx∈Ω |u(x)| < ∞) are square-integrable and
thus in L2 .

Note that we can write alternatively



L2 (Ω) = u : Ω → R : ∥u∥L2 (Ω) < ∞ . (F.17)

218
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

G Approximation Theory
PN
Motivation: in computational mechanics, we seek approximate solutions uh (x) = a=1 ua Na (x),
e.g., a linear combination of basis functions Na (x) with amplitudes ua ∈ R.

Questions: How does uh (x) converge to u(x), if at all? Can we find an error estimate ∥uh − u∥?
What is the rate of convergence (how fast does it converge, cf. the truncation error arguments
for grid-based direct methods)?

Fundamental tools for estimating errors are the Poincaré inequalities:

(i) Dirichlet-Poincaré inequality:


Z h Z h
 ′ 2
|v(x)|2 dx ≤ ch v (x) dx if v(0) = v(h) = 0. (G.1)
0 0

with a constant ch > 0 that depends on the interval size h.


(ii) Neumann-Poincaré (or Poincaré-Wirtinger) inequality:
Z h Z h
1 h
Z
 ′ 2
|v(x) − v|2 dx ≤ ch v (x) dx with v= u(x) dx. (G.2)
0 0 h 0
In 1D an optimal constant can be found: ch = h2 /π 2 .
(iii) extension:
Z h Z h
h2

2
 ′ 2 2
|v(x)| dx ≤ 2 v (x) dx + |v(x0 )| with x0 ∈ [0, h]. (G.3)
0 π 0

Now, let us use those inequalities to find error bounds. Suppose a general function u(x) is
approximated by a piecewise linear approximation uh (x). Let’s first find a local error estimate.

Consider v(x) = u′h (x) − u′ (x) and note that by Rolle’s theorem

u′h (x0 ) − u′ (x0 ) = 0 for some x0 ∈ (0, h). (G.4)

Next, we use inequality (iii),


Z h
h2 h ′′
Z
′ ′ 2 2
uh (x) − u (x) dx ≤ 2 uh (x) − u′′ (x) dx, (G.5)
0 π 0

but since uh (x) is piecewise linear, we have u′′h (x) = 0, so that we arrive at the local error
estimate
Z h
h2 h ′′
Z
′ ′ 2 2
uh (x) − u (x) dx ≤ 2 u (x) dx. (G.6)
0 π 0

Now, let’s seek a global error estimate by using


Z b Xn Z xi+1
(·) dx = (·) dx with x0 = a, xn+1 = b, xi+1 = xi + h (G.7)
a i=0 xi

so that
b b
h2
Z Z
2 2
u′h (x) ′
− u (x) dx ≤ 2 u′′ (x) dx (G.8)
a π a

219
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Taking square roots, we see that for Ω = (a, b)


h ′′
u′h − u′ L2 (Ω)
≤ u L2 (Ω)
(G.9)
π
and hence that ∥u′h − u′ ∥L2 (Ω) → 0 as h → 0 linearly in h.

We want to write this a bit more concise. Let us define the Sobolev semi-norm:
Z 1/2
2
|u|H k (Ω) = Dk u dx or for short |u|k = |u|H k (Ω) (G.10)

where in 1D Dk u = u(k) . A semi-norm in general must satisfy the following conditions:

(i) ∥u + v∥ ≤ ∥u∥ + ∥v∥ (like for a norm)


(ii) ∥α · u∥ = |α| ∥u∥ (like for a norm)
(iii) ∥u∥ ≥ 0 (a norm also requires ∥u∥ = 0 iff u = 0, not so for a semi-norm).

Examples in 1D:

• from before:
Z b 1/2
′ 2
|u|H 1 (a,b) = u (x) dx (G.11)
a

• analogously:
Z b 1/2
′′ 2
|u|H 2 (a,b) = u (x) dx (G.12)
a

so that we can write (G.8) as

h2 2 h
|uh − u|2H 1 (a,b) ≤ |u| 2 ⇒ |uh − u|H 1 (a,b) ≤ |u| 2 (G.13)
π 2 H (a,b) π H (a,b)
Hence, the topology of convergence is bounded by the regularity of u. Convergence with
h-refinement is linear.

• note the special case


Z
2
|u|H 0 = u(x)2 dx = ∥u∥2L2 (L2 -norm) (G.14)

We can extend this to higher-order interpolation. For example, we may use a piecewise
quadratic interpolation uh . From Poincaré:
Z h
h2 h ′′ h4 h ′′′ h4 h ′′′ 2
Z Z Z
2 2 2
u′h − u′ dx ≤ 2 uh − u′′ dx ≤ 4 uh − u′′′ dx = 4 u dx. (G.15)
0 π 0 π 0 π 0
The extension into a global error estimate shows quadratic h-convergence:
h2
|uh − u|H 1 (a,b) ≤ |u| 3 . (G.16)
π 2 H (a,b)

For a general interpolation of order k we have:

hk
|uh − u|H 1 (a,b) ≤ |u| k+1 (G.17)
π k H (a,b)

220
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Why is the Sobolev semi-norm not a norm? Simply consider the example u(x) = c > 0. All
higher derivatives vanish on R, so that |u|H k (Ω) = 0 for Ω ⊂ R and k ≥ 1. However, that does
not imply that u = 0 (in fact, it is not).

Let us introduce the Sobolev norm (notice the double norm bars)

k
!1/2
X
∥u∥H k (Ω) = |u|2H m (Ω) or for short ∥u∥k = ∥u∥H k (Ω) . (G.18)
m=0

For example, in one dimension


Z Z
2 2 2  ′ 2
∥u∥H 1 (Ω) = |u|0 + |u|1 = 2
u(x) dx + u (x) dx = ∥u∥2L2 (Ω) + |u|2H 1 (Ω) . (G.19)
Ω Ω

Note that this also shows that, more generally,

∥u∥2H k (Ω) ≥ |u|2H k (Ω) . (G.20)

Let us derive a final global error estimate, one that involves proper norms – here for the example
of a piecewise-linear uh . Start with Poincaré’s inequality (i),
Z b Z b
2 2 2
∥uh − u∥L2 (a,b) = |uh − u| dx ≤ ch u′h − u′ dx = ch |uh − u|2H 1 (a,b) (G.21)
a a

and from (G.19) arrive at

∥uh − u∥2H 1 (Ω) = ∥uh − u∥2L2 (Ω) + |uh − u|2H 1 (Ω)


(G.22)
≤ (1 + ch ) |uh − u|2H 1 (a,b) ≤ c∗ h |u|2H 2 (a,b) ,

which along with (G.13) gives

∥uh − u∥H 1 (a,b) ≤ ch |u|H 2 (a,b) ≤ ch ∥u∥H 2 (a,b) (G.23)

Summary and extension of norms:


Z 1/p
p
Lp -norm: ∥u∥Lp (Ω) = u dx

Z 1/2
2
k
Sobolev semi-norm : |u|H k (Ω) = D u dx = |u|k

k
!1/2
X
Sobolev norm : ∥u∥H k (Ω) = |u|2H m (Ω) = ∥u∥k
m=0
Z 1/p
p
k
generalization : |u|W k,p (Ω) = D u dx = |u|k,p

k
!1/p
|u|pW m,p (Ω)
X
∥u∥W k,p (Ω) = = ∥u∥k,p
m=0

For practical purposes it is convenient to also introduce the so-called energy norm
p
|·|E = B(·, ·), (G.24)

221
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

where B(·, ·) is the bilinear form of the potential energy. This norm is helpful for quantifying
errors. For example, if we find an approximate solution uh for the displacement or temperature
field, then the error can be quantified as
q
u − uh = B(u − uh , u − uh ). (G.25)
E

Notice that, unlike for, e.g., the Euclidean norm, u − uh E does not necessarily imply u−uh = 0
so that, strictly speaking, the above energy norm is only a semi-norm. To turn it into a proper
norm, we need to exclude solutions corresponding to rigid-body motion (i.e., solutions that
imply uniform translations or rotations of the u-field but without producing gradients in u). If
we assume that essential boundary conditions are chosen appropriately to suppress rigid-body
motion by seeking solutions

u ∈ U = u ∈ H 1 : u = û on ∂ΩD ,

(G.26)

then, for this space, ∥·∥E is indeed a proper norm.

222
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

H Sobolev spaces

The Sobolev norm is used to define a Sobolev space:

H k (Ω) = u : Ω → R such that ∥u∥k < ∞ ,



(H.1)

which includes all functions whose kth-order derivatives are square-integrable.

Examples:

• Consider a piecewise linear function u ∈ C 0 defined on Ω = (0, 2). Then u ∈ H 1 (Ω) since
the first derivative is piecewise-constant and therefore square-integrable.

• Consider the Heavyside step function H(x) ∈ C −1 defined on R. Then, e.g., H ∈ H 0 (Ω)
with Ω = (−1, 1) since the first derivative (the Dirac delta function) is not square-
integrable over (−1, 1).

Overall, note that the above examples imply that

H m (Ω) ⊂ C k (Ω) with m > k. (H.2)

For example, if a function has a kth continuous derivative, then the (k + 1)th derivative is
defined piecewise and therefore square-integrable.

Higher dimensions

To extend the above concepts to higher dimensions, we need multi-indices. A multi-index is


an array of non-negative integers:

α = (α1 , . . . , αn ) ∈ (Z+ n
0) . (H.3)

The degree of a multi-index is defined as

|α| = α1 + . . . + αn . (H.4)

This can be used to define a monomial for x ∈ Rn :

xα = xα1 1 · . . . · xαnn . (H.5)

For example, we can now extend our definition of polynomials to higher dimensions:
k X
X
2
p(x) ∈ Pk (R ) ⇒ p(x) = aα xα (H.6)
β=0 |α|=β

Specifically, the monomials above for x ∈ R2 are

for |α| = 0 : {x0 y 0 } = {1}


for |α| = 1 : {x1 y 0 , x1 y 0 } = {x, y} (H.7)
2 0 1 1 0 2 2 2
for |α| = 2 : {x y , x , y , x y } = {x , xy, y } ...

so that

p(x) = a(0,0) + a(1,0) x1 + a(0,1) x2 + a(2,0) x21 + a(1,1) x1 x2 + a(0,2) x22 + . . . (H.8)

223
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Note that this defines a complete polynomial of degree k.

Now we can use multi-indices to define partial derivatives as

∂ |α| u
Dα u = and D0 u = u (H.9)
∂xα1 1 · . . . · ∂xαnn

A common notation is
X X ∂ |α| u
Dα u = (H.10)
α1 ,...,αn ∂xα1 1 · . . . · ∂xαnn
|α|=β
s.t. |α|=β

With the above derivatives, we may redefine the inner product


m X
Z X
⟨u, v⟩H m (Ω) = Dβ u Dβ u dx (H.11)
Ω β=0 |α|=β

and the Sobolev norm


 1/2  1/2
m X Z m X
1/2
X X
∥u∥H m (Ω) = ⟨u, u⟩H m (Ω) =  (Dα u)2 dx = ∥Dα u∥2L2 (Ω)  (H.12)
β=0 |α|=β Ω β=0 |α|=β

Let’s look at some examples; e.g., consider Ω = R2 and m = 1. Then we have


 
∂u ∂u
D0 u = u and D1 u = , (H.13)
∂x1 ∂x2

so that
Z 
∂u ∂v ∂u ∂v
⟨u, v⟩H 1 (R2 ) = uv + + dx1 dx2 (H.14)
R2 ∂x1 ∂x1 ∂x2 ∂x2

and
Z "  2  2 #
∂u ∂u
∥u∥2H 1 (R2 ) = u2 + + dx1 dx2 . (H.15)
R2 ∂x1 ∂x2

Altogether we can now properly define a Sobolev space in arbitrary dimensions:


 
m α
H (Ω) = u : Ω → R : D u ∈ L2 (Ω) ∀ α ≤ m (H.16)

This is the set of all functions whose derivatives up to mth order all exist and are square-
integrable.

As an example, u ∈ H 1 (Ω) implies that u and all its first partial derivatives must be square-
integrable over Ω because (H.15) must be finite.

224
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Let us look at the example u(x) = |x| and take Ω = (−1, 1). Then, we have u′ (x) = H(x) (the
Heaviside jump function) and u′′ (x) = δ(x) (the Dirac delta function). Therefore,
Z b
u2 (x) dx < ∞ ⇒ u ∈ L2 (Ω) = H 0 (Ω)
a
Z b 2 Z b
∂u ∂u
dx = H 2 (x) dx < ∞ ⇒ ∈ L2 (Ω) and u ∈ H 1 (Ω) (H.17)
a ∂x a ∂x
Z b 2 b
∂2u ∂2u
Z
dx = δ 2 (x) dx = ∞ ⇒ ∈
/ L2 (Ω) and / H 2 (Ω)
u∈
a ∂x2 a ∂x2

Note that one usually indicates the highest order k that applies (since this is what matters for
practical purposes), so here we thus conclude that u ∈ H 1 (Ω).

From the above, we also see that

H ∞ ⊂ . . . ⊂ H 2 ⊂ H 1 ⊂ H 0 = L2 . (H.18)

Notice that, even though polynomials u ∈ Pk (Ω) are generally in H ∞ (Ω) for any bounded
Ω ⊂ Rd , they are not square-integrable over Ω = Rd . Luckily, in practical problems we usually
consider only finite bodies Ω. To more properly address this issue, let us introduce the support
of a continuous function u defined on the open set Ω ∈ Rd as the closure in Ω of the set of all
points where u(x) ̸= 0, i.e.,

supp u = x ∈ Ω : u(x) ̸= 0 . (H.19)

This means that u(x) = 0 for x ∈ Ω \ supp u. We may state, e.g., that functions u : Ω → R
with a finite support Ω ⊂ Rd and ess supΩ < ∞ are square-integrable over Ω.

Finally, let us define C0k (Ω) as the set of all functions contained in C k (Ω) whose support is a
bounded subset of Ω. Also, notice that

C0k (Ω) ⊂ H0k (Ω) (H.20)

and
\
C0∞ (Ω) = C0k (Ω). (H.21)
k≥0

225
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

I Operators

Energies are often defined via operators. Generally, we call A an operator if

A : u ∈ U → A(u) ∈ V, (I.1)

where both U and V are function spaces.

A simple example is

du
A(u) = c , (I.2)
dx
which is a (linear differential) operator requiring u ∈ C 1 .

An operator A : U → V is linear if for all u1 , u2 ∈ U and α, β ∈ R the following holds:

A(α · u1 + β · u2 ) = α · A(u1 ) + β · A(u2 ). (I.3)

For example, L is a linear operator in

a u,xx + b u,x = c ⇔ L(u) = c with L(·) = a(·),xx + b(·),x . (I.4)

Operators (such as the inner product operator) can also act on more than one function. Con-
sider, e.g., an operator B : U × V → R where U, V are Hilbert spaces. B is called a bilinear
operator if for all u, u1 , u2 ∈ U and v, v1 , v2 ∈ V and α, β ∈ R

(i) B(α · u1 + β · u2 , v) = α · B(u1 , v) + β · B(u2 , v),


(ii) B(u, α · v1 + β · v2 ) = α · B(u, v1 ) + β · B(u, v2 ).

An example of a bilinear operator is the inner product ⟨·, ·⟩ : U × U → R for a Hilbert space U.

An operator A : U → V is called symmetric if

⟨A(u), v⟩ = ⟨u, A(v)⟩ for all u, v, ∈ U. (I.5)

Furthermore, the operator is positive if

⟨A(u), u⟩ ≥ 0 for all u ∈ U. (I.6)

An example of a symmetric operator is A(u) = M u with u ∈ Rd and M ∈ Rd×d , which is


positive if M is positive-semidefinite.

226
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

J Uniqueness of solutions

One of the beauties of variational problems of the type (6.45) is that a unique minimizer exists
by the Lax-Milgram theorem. This is grounded in (assuming |Ω| < ∞ and u, v ∈ U with
some Hilbert space U):

• boundedness of the bilinear form:

|B(u, v)| ≤ C ∥u∥ ∥v∥ for some C > 0. (J.1)

For a bilinear form B(u, v) = ⟨grad u, grad v⟩, this is satisfied by the Cauchy-Schwarz
inequality (using L2 -norms):

|B(u, v)| ≤ C ∥grad u∥L2 (Ω) ∥grad v∥L2 (Ω) ≤ C ∥grad u∥H 1 (Ω) ∥grad v∥H 1 (Ω) (J.2)

• coercivity of the bilinear form (ellipticity):

B(u, u) ≥ c ∥u∥2 for some c > 0. (J.3)

Again, for a bilinear form B(u, v) = ⟨grad u, grad v⟩ this is satisfied by Poincaré’s inequal-
ity:

B(u, u) = ∥grad u∥2L2 (Ω) ≥ c ∥u∥2L2 (Ω) . (J.4)

These two requirements imply the well-posedness of the variational problem and thus imply the
existence of a unique solution (or, that the potential has a unique global minimizer). In simple
terms, the two conditions that the functional has sufficient growth properties (i.e., the bilinear
form has upper and lower bounds). Functionals of the type (6.45) satisfy the above and hence
have a unique solution.

227
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

K Vainberg’s theorem

We have seen that variational problems are beneficial for numerical solution approaches as
opposed to solving the strong form directly. Whether or not a given strong form possesses a
variational structure is an important question, which may be answered by Vainberg’s theorem.
Consider a weak form

G[u, v] = 0 ∀ v ∈ U0 (Ω). (K.1)

Let us check if G derives from a potential I, i.e., whether G = δI is the first variation of some
potential I. This would imply that
d
G(u, δu) = Dδu I[u] = lim I[u + δu]. (K.2)
ϵ→0 dϵ
Now recall from calculus that for any continuously differentiable function f (x, y) we must have
by Schwartz’ theorem
∂ ∂f ∂ ∂f
= . (K.3)
∂y ∂x ∂x ∂y
We can use the same strategy here to formulate whether or not a weak form derives from a
potential. Specifically, we can take one more variation and state that

Dδu2 G(u, δu1 ) = Dδu1 G(u, δu2 ) if and only if I[u] exists (K.4)

This is known as Vainberg’s theorem.

We can easily verify this for the general form given in (6.45):
Z Z
G(u, δu1 ) = Dδu1 I[u] = [λ grad u grad δu1 − S δu1 ] dx − Q̂ δu1 dx
Ω ∂ΩN
Z (K.5)
⇒ Dδu1 G(u, δ2 ) = λ grad δu2 grad δu1 dx = Dδu2 G(u, δu1 )

In simple terms (and not most generally), Vainberg’s theorem holds if the potential obeys
symmetry. This in turn implies that the governing PDE contains derivatives of even order (such
as linear momentum balance which is second-order in both spatial and temporal derivatives, or
the equilibrium equations of beams which are fourth-order in space and second-order in time). If
the PDEs are of odd order (such as, e.g., the time-dependent diffusion or heat equation), then no
potential I exists, in principle – there are work-arounds using so-called effective potentials, which
gain importance especially for inelastic material models. Of course, knowing that a variational
structure exists is beneficial but it does not reveal anything about the actual solution u.

228
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

L Mechanical variational problem in higher dimensions

The strong form of the general mechanical problem is given by the (static) balance of linear
momentum along with Dirichlet and Neumann boundary conditions:

σij,j + ρ bi = 0 in Ω,
ui = ûi on ∂ΩD , (L.1)
σij nj = t̂ on ∂ΩN

In the special case of linear elasticity (using σij = Cijkl εkl = Cijkl uk,l ), the above strong form
reduces to

(Cijkl uk,l ),j + ρ bi = 0 in Ω,


ui = ûi on ∂ΩD , (L.2)
σij nj = t̂ on ∂ΩN

From this we see that classical solutions must satisfy u ∈ C 2 (Ω). Note further that we in-
deed re-encounter the general structure of the strong form from (8.1), here extended to higher
dimensions.

In the following, let us first treat the general case – based on (L.1) – and then study linear
elasticity – governed by (L.2) – as a special case. The total potential energy functional associated
with (L.1) is
Z Z Z 
I[u] = W (ε) dV − ρb · u dV + t̂ · u dS (L.3)
Ω Ω ∂ΩN
| {z } | {z }
internal stored energy work by external forces

and we seek the (in general d-dimensional) displacement field solutions



u = arg min I[u] : u = û on ∂ΩD . (L.4)

For the example of linear elasticity, we know that the strain energy density takes the form
1 1
W (ε) = εij Cijkl εkl = ui,j Cijkl uk,l , (L.5)
2 2
from which we conclude that the variational problem seeks solutions u ∈ U ⊂ H 1 (Ω). For
other constitutive laws, we may not have the above form of the energy density, yet W = W (ε)
holds more generally (unless when considering rather exotic strain-gradient models), so that we
generally seek u ∈ U ⊂ H 1 (Ω).

We compute the first variation of (13.2), defining sym(·) = 21 (· + ·T ) to write


Z Z Z
∂W
δI[u] = sym(δui,j ) dV − ρbi δui dV − t̂i δui dS
Ω ∂εij Ω ∂ΩN
Z Z Z (L.6)
= σij δui,j dV − ρbi δui dV − t̂i δui dS = 0 ∀ δu ∈ U0 ,
Ω Ω ∂ΩN

where we used σij = ∂W/∂εij and σij = σji (by angular momentum balance). This form is
indeed equivalent to the principle of virtual work (8.21), if we replace δui by u∗i .

229
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Application of the divergence theorem to the first term in (L.6) proves the equivalence the
strong and weak forms, since
Z Z
δI[u] = 0 = (σij nj − t̂i )δui dS − (σij,j + ρbi )δui dV ∀ δu ∈ U0 . (L.7)
∂ΩN Ω

must hold for all (admissible) variations δu ∈ U0 , so that the two terms in parentheses must
vanish. This indeed leads to the strong form (L.1).

From inspecting the first variation in (L.6), we may define the weak form as

G(u, v) = A(u, v) − L(v) = 0 ∀ v ∈ U0 (L.8)

with the two operators


Z Z Z
A[u, v] = σij vi,j dV and L[v] = ρbi vi dV + t̂i vi dS (L.9)
Ω Ω ∂ΩN

Note that the dependence of A on u is not directly obvious, but the stresses  depend through
the strains on the displacement field, i.e., σij = σij (ε) and εij = sym(ui,j ) . A(·, ·) is therefore
in general not a bilinear operator, while L(·) is a linear operator.

In the special case of linear elasticity, we have

σij = Cijkl εkl = Cijkl uk,l ⇒ σij vi,j = Cijkl uk,l vi,j = Cijkl ui,j vk,l . (L.10)

Exploiting the symmetries Cijkl = Cijlk = Cklij here leads to


Z Z
A[u, v] = σij vi,j dV = Cijkl ui,j vk,l = B[u, v]. (L.11)
Ω Ω

Thus, we see that for linear elasticity A is indeed a bilinear operator.

Next, we introduce the discrete weak form G[uh , v h ] = A(uh , v h ) − L(v h ) = 0 with the Bubnov-
Galerkin approximation
n
X n
X
h a a h
u (x) = u N (x) and v (x) = v a N a (x). (L.12)
a=1 a=1

Insertion into (L.8) yields (using index notation for convenience)


n
X Z Z Z 
via h
N,ja a a
for all adm. v a , (L.13)

σij ∇u dV − ρbi N dV − t̂i N dS = 0
a=1 Ω Ω ∂ΩN
| {z }| {z }
=[F int ]a
i =−[F ext ]a
i

which is equivalent to

Fint (U h ) − Fext = 0 with U h = {u1 , . . . , un }T , (L.14)

where we introduced vectors Fint , Fext ∈ Rd·n with components


Z Z Z
a h
Fint,i = σij (∇u )N,ja dV and a
Fext,i = a
ρbi N dV + t̂i N a dS (L.15)
Ω Ω ∂ΩN

230
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Note that (L.14) is not a linear system of equations (as discussed in many sections before), since
we assumed a general constitutive law.

For the special case of linear elasticity the weak form did involve a bilinear operator B.
Therefore, inserting (L.10) into (L.15) leads to
Z n Z
X n
X Z
a h a b b a b
Fint,i = Cijkl uk,l N,j dV = Cijkl uk N,l N,j dV = uk Cijkl N,ja N,lb dV
Ω b=1 Ω b=1 Ω
n Z (L.16)
X
ab b ab
= Kik uk with Kik = Cijkl N,ja N,lb dV,
b=1 Ω

so that we indeed arrive at a linear problem to be solved for the unknown coefficients U h =
{u1 , . . . , un }:

Fint = K U h ⇒ K U h −Fext = 0 ⇒ U h = K −1 Fext if det K ̸= 0. (L.17)

As before, matrix K ∈ Rd·n×d·n , which is also known as the stiffness matrix is by definition
symmetric and positive-semi-definite, as long as the elastic modulus tensor C is strongly elliptic
(i.e., for stable elastic moduli).

Notice that vectors U h ∈ Rd·n and F ∈ Rd·n in 3D are, respectively, composed of the following
components:
 1  1
u1 F1
 u12   F21 
 1  1   1  1
u  u3  F  F3 
h
   
[U ] = . . . = . . . ,
    [F ] = . . . = 
 
. . . .
 (L.18)
u n  u n  F n  F n 
 1  1
 un  F n 
2 2
un3 F3n

When using 1-indexing as in the above vectors (which is common, e.g., in Matlab where vector
components start with index 1), we have a = 1, . . . , n and i = 1, . . . , d in d dimensions. This
implies that

uai is the (d · (a − 1) + i)th component of vector U h in d dimensions. (L.19)

Similarly, we apply the same rule to the rows and columns of matrix K, so that
ab
Kik is the component at (d · (a − 1) + i, d · (b − 1) + k) of matrix K in d dimensions. (L.20)

If, by contrast, we use 0-indexing (as, e.g., in Python, where vector components start with
index 0), we have a = 0, . . . , n − 1 and i = 0, . . . , d − 1 in d dimensions, so that

uai is the (d · a + i)th component of vector U h in d dimensions. (L.21)

Similarly, we apply the same rule to the rows and columns of matrix K, so that
ab
Kik is the component at (d · a + i, d · b + k) of matrix K in d dimensions. (L.22)

Note that we now use super- and subscripts on K and F , since our unknown coefficients are
vector-valued here. A super script a refers to the a-th coefficient, while a subscript i refers to
the i-th component of the coefficient. Remember how we said in Section D.4 that this would
become important later? Here it does!

231
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

M Approximation power and completeness

If {N 1 , . . . , N n , . . .} is a linearly independent basis of a (Hilbert) space U, we say they form a


countably infinite basis.

They are further orthonormal if

N i , N j = δij (M.1)

with a suitable inner product of U (see the discussion of function spaces in Appendix F). Note
that any non-orthonormal basis can be orthonormalized.

Given such a countably infinite basis, it is possible to approximate any function u to within a
given tolerance, e.g.,

X
u= ua N a ⇔ given any ϵ > 0 ∃N ∈N and ua ∈ R
a=1
m
(M.2)
X
a a
s. t. u− u N < ϵ for all m > N.
a=1

Notice that the so-called Fourier coefficients ui of a function u w.r.t. a basis {N 1 , N 2 , . . . , }


can be computed via
*∞ + ∞ ∞
X X X
i a a i a a i
u, N = u N ,N = u N ,N = ua δai = ui . (M.3)
a=1 a=1 a=1

Thus, the Fourier representation of a function u for a given basis {N 1 , N 2 , . . . , } is



X
u= ⟨u, N a ⟩ N a . (M.4)
a=1

This lets us derive Parseval’s identity:


*∞ ∞
+
2
X X
i i j j
∥u∥ = u, N N , u, N N
i=1 j=1

X ∞
X ∞
X ∞
X
= u, N i u, N j N i, N j = u, N i u, N j δij (M.5)
i=1 j=1 i=1 j=1
∞ ∞ ∞
X 2 X X
= u, N i = (ui )2 ⇒ ∥u∥2 = (ui )2 .
i=1 i=1 i=1

If {N 1 , . . . , N n , . . .} is a countably infinite orthonormal basis, then


n
X n
X n
X
i i 2 i 2 2
0≤ u− N ,u N = ∥u∥ − (u ) ⇒ ∥u∥ ≥ (ui )2 (M.6)
i=1 i=1 i=1

which is Bessel’s inequality for n → ∞.

232
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Bessel’s inequality motivates the following theorem:


Pn Let {N 1 , . . . , N n } be a countably
Pninfinite
orthonormal set in a Hilbert space U. Then i=1 u N converges in U if and only if i=1 (ui )2
i i

converges.

Finally, the Weierstrass approximation theorem is an important ingredient to formulate poly-


nomial approximation spaces.

Weierstrass approximation theorem: Given a continuous function f : [a, b] ⊂ R → R and


any scalar ϵ > 0, then there exists a polynomial

pn (x) ∈ P∞ such that |f (x) − pn (x)| < ϵ for all x ∈ [a, b]. (M.7)

This means every continuous function u can be approximated by a polynomial approximation


uh ∈ Pn to within any level of accuracy. Hence, if uh ∈ Pn , one can find an approximation such
that

X
lim ∥u − uy ∥ = 0 and u= ui N i . (M.8)
n→∞
i=1

233
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

N Gauss quadrature

A systematic way to derive Gaussian quadrature rules involves the use of Legendre polynomials.
We here give a brief overview.

We start by noticing that monomials {1, ξ, ξ 2 , ξ 3 , . . .}, although complete, are not orthogonal
basis functions. We can turn them into orthogonal polynomials Pn (ξ) by, e.g., the Gram-
Schmidt orthogonalization procedure. To this end, let us start with

P0 (ξ) = 1 (N.1)

and obtain the next basis function by starting with the linear monomial ξ and computing
⟨1, ξ⟩
P1 (ξ) = ξ − 1 = ξ, (N.2)
⟨1, 1⟩
where we used the inner product
Z 1
⟨u, v⟩ = u(ξ)v(ξ) dξ. (N.3)
−1

Similarly, the next-higher-order basis function is obtained by starting from ξ 2 , so that

⟨ξ, ξ 2 ⟩ ⟨1, ξ 2 ⟩ 1
P2 (ξ) = ξ 2 − ξ− 1 = ξ2 − . (N.4)
⟨ξ, ξ⟩ ⟨1, 1⟩ 3
Analogously, one finds
3
P3 (ξ) = ξ 3 − ξ. (N.5)
5

By continuing in the same fashion, we create a countably infinite set of orthogonal basis functions
Pn (ξ) such that
Z 1
Pn (ξ)Pm (ξ) dξ = 0 if n ̸= m. (N.6)
−1

These polynomials are known as Legendre polynomials. Note that they are defined only up to
a constant, so one can renormalize them, which is commonly done by enforcing that Pn (1) = 1
for all n. The result are the well known Legendre polynomials, which can alternatively be
defined as

1 dn  2 n

Pn (ξ) = (ξ − 1) (N.7)
2n n! dξ n

These polynomials have another interesting feature, viz. by orthogonality with P0 (ξ) = 1 we
know that
Z 1 (
2, if n = 0,
Pn (ξ) dξ = ⟨1, Pn ⟩ = (N.8)
−1 0, else.

Pn (ξ) has exactly n roots in the interval [−1, 1]. Also, for n ̸= 0 we know that

Pn (ξ) = −Pn (−ξ) for odd n,


(N.9)
Pn (ξ) = Pn (−ξ) for even n.

234
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

Moreover, Pn (0) = 0 for odd n.

With this new set of basis functions, we can define the Gauss-Legendre quadrature rule to
enforce
Z 1 nQP −1
!
X
Pk (ξ) dξ = Wi Pk (ξi ), k = 0, 1, . . . , 2nQP − 1. (N.10)
−1 i=0

If nQP = 1, then the solution is simple because the above equations simplify to

W0 = 2 and 0 = W0 P1 (ξ0 ). (N.11)

Therefore, the weight is, as before, W0 = 2 and the quadrature point is the root of P1 (ξ), viz.
ξ0 = 0.

If nQP = 2, then the four equations to be solved are

W0 + W1 = 2 and 0 = W0 P1 (ξ0 ) + W1 P1 (ξ1 ),


(N.12)
0 = W0 P2 (ξ0 ) + W1 P2 (ξ1 ) and 0 = W0 P3 (ξ0 ) + W1 P3 (ξ1 ).

By analogy, we choose the quadrature points to be the roots of P2 (ξ), so that


1 1
P2 (ξ0 ) = P2 (ξ1 ) = 0 ⇒ ξ0 = √ , ξ1 = − √ . (N.13)
3 3
Using Pn (ξ) = −Pn (−ξ), the above equations reduce to

W0 = W1 = 1. (N.14)

Further, note that Pn (0) = 0 for odd n. Therefore, the same procedure can be continued as
follows. For an arbitrary number of quadrature points, nQP , the Gauss-Legendre quadrature
points and associated weights are defined by

2
PnQP (ξi ) = 0, wi = i = 0, . . . , nQP − 1. (N.15)
(1 − ξi2 )[Pn′ QP (ξi )]2

As a check, take, e.g., nQP = 1 so that P1 (ξ) = ξ with root ξ0 = 0. The weight is computed as

2
w0 = = 2, (N.16)
(1 − ξ02 )[Pn′ QP (ξ)]2

as determined above. Similarly, for nQP = 2 we have P2 (ξ) = 21 (3ξ 2 − 1) with the above roots

of ±1/ 3. The associated weights are computed as
2 2 2
w0 = = = 2 32 = 1 = w1 , (N.17)
(1 − ξ02 )[P2′ (ξ0 )]2 (1 − ξ02 )[3ξ0 ]2 3 3

which agrees with the solution we found in Section 19.2.1.

235
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

O Quadrature error estimates

Using numerical quadrature to approximate an exact integral introduces a quadrature error,


which is bounded as follows. For a function f (ξ) ∈ C 2nQP (Ω) we have (without proof here)

Z 1 nQP −1
X
f (ξ) dξ − Wk f (ξk ) ≤ Ch2nQP max f (2nQP ) (ξ) (O.1)
−1 ξ∈[−1,1]
k=0

with a constant C > 0. This shows that, as can be expected, the quadrature error decreases with
decreasing mesh size h and with increasing smoothness of function f . The rate of convergence
under h-refinement also depends on the smoothness of the function.

The exact error depends on the chosen quadrature rule. For example, for Gauss-Legendre
quadrature an error estimate is given by

22nQP +1 (nQP !)4


e= max f (2nQP ) (ξ) . (O.2)
(2nQP + 1)[(2nQP )!]3 ξ∈[−1,1]

236
Index
L2 -norm, 216 body force, 142
h-refinement, 87 boundary, 214
hp-refinement, 87 boundary conditions, 20
n-dimensional space, 79 boundary operators, 199
p-refinement, 87 brick element, 132
r-refinement, 87 Bubnov-Galerkin approximation, 79
(proper) subset, 214
2-node Euler-Bernoulli beam element, 102 central difference, 28, 29
2-node Timoshenko beam element, 106 CFL condition, 35, 36
2-node bar element, 89 CFL number, 36
4-node bilinear quadrilateral, 126 characteristic equation, 167
4-node tetrahedron, 123 chicken-wire mode, 152
8-node quadratic quadrilateral, 131 class C k (Ω), 73, 215
9-node quadratic quadrilateral, 131 classical solution, 67, 73
closure, 217
acceleration field, 9 collocation method, 207
action, 161 collocation points, 207
action principle, 162 commercial codes, 195
adaptive mesh refinement, 191 complete polynomial, 224
advection equation, 38, 199 complete space, 217
amplitude, 170 complete up to order q, 83
approximation error, 190 completeness property, 83
area moment of inertia, 96 condensation, 148
assembly, 47, 48, 52, 202 condition number, 189
assembly operator, 114 conditionally stable, 40, 41
augmented finite elements, 196 conductivity matrix, 187
average acceleration, 176 conjugate gradient, 158
average acceleration method, 175 consistency, 29
consistent mass matrix, 163
B-matrix, 90, 111 constant strain tetrahedron, 123
backward-Euler, 29 constant strain triangle, 122
balance of energy, 18 constitutive relation, 12
local, 19 continuous at a point x, 215
balance of linear momentum, 15 continuous over Ω, 215
local form, 16 convergence, 29, 154, 217
Banach space, 217 Courant number, 36
bar element, 46 Courant-Friedrichs-Levy, 35
barycentric coordinates, 121 Courant-Friedrichs-Levy (CFL) condition, 36
basis, 82 CST, 122, 123
basis functions, 206 cubature rules, 134
bending, 95
bending moment, 96 damage and failure, 197
Bessel’s inequality, 232 damped Newton-Raphson method, 156
bijective, 214 damping matrix, 170
bilinear form, 67 deflection, 95
bilinear operator, 226 deformation, 9
body, 9 deformation gradient, 183

237
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

deformation mapping, 183 first fundamental error, 189


degrees of freedom, 85 first variation, 63
differential operator, 199 forced vibrations, 166, 169
dimensionless forms, 25 forward-Euler, 29
Direct methods, 28 Fourier coefficients, 232
direct stiffness method, 49, 55 Fourier representation, 232
Dirichlet boundary, 20 Fourier series, 83
Dirichlet boundary condition, 101 Fourier’s law, 19
Dirichlet-Poincaré inequality, 219 frame, 108
discrete problem, 79 free index, 8
discretization error, 189 free vibrations, 166
discretization errors, 24 full integration, 140
dispersion relation, 41 function, 214
displacement field, 9, 183 function space, 60
distance, 216, 217 functional, 60
divergence fundamental frequency, 167
of a tensor, 16
of a vector, 18 Galerkin weak form, 74
divergence theorem, 16 Gauss points, 137
domain, 214 Gauss quadrature, 134
dummy index, 8 Gauss-Chebyshew, 136
dynamic, 161 Gauss-Hermite, 136
Gauss-Legendre, 136
eigenfrequency, 167 Gauss-Legendre quadrature, 135, 235
eigenmode, 167 Gauss-Lobatto quadrature, 136
elasticity tensor, 13 Gauss-Newton method, 157
electrical problem, 69 geometric stiffness, 196
element defect, 150 ghost node, 33
element shape functions, 89 global, 48, 81, 114
elements, 85 global error estimate, 219, 220
energy norm, 221 global stiffness matrix, 52
equation of motion, 163 gradient
error estimate, 192 of a scalar, 19
essential supremum, 217 of a vector, 9
Euclidean norm, 216 gradient descent, 157
Euler-Bernoulli beam, 97 gradient flow method, 157
Eulerian, 196 Gram-Schmidt orthogonalization, 234
excitation frequency, 170
explicit, 31 heat equation, 20, 199
explicit time integration, 172 Hermitian polynomials, 103
extensive, 18 HHT method, 178
external force vector, 47 HHT-α, 178
external forces, 143 hierarchical interpolation, 93
higher-order interpolation, 220
Fast Inertial Relaxation Engine, 158 Hilbert space, 217
FE, 85 hourglass mode, 152
FEM, 85
finite element, 85 identity mapping, 214
Finite Element Method, 85 implicit, 32, 34
finite kinematics, 183 implicit time integration, 175
finite-difference stability, 35 incompressibility, 196

238
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

incompressible elements, 153 linear strain tetrahedron, 125


incremental stiffness matrix, 124 linear strain triangle, 125
indirect methods, 58 linear subspace, 214
initial boundary value problem, 20 linear/vector space, 214
initial conditions, 20, 21 linearly independent, 82
injective, 214 local, 48, 81
inner product, 215 local error estimate, 219
inner product space, 215 local stiffness matrix, 52
instability, 197 local-to-global map, 48, 52, 114
integration point, 134 longest edge bisection, 192
intensive, 18 LST, 125
internal energy, 18 lumped mass matrix, 165
internal energy density, 19
internal force vector, 47 mapping, 115, 214
internal forces, 49 mass matrix
inverse function theorem, 117 consistent, 163
isomorphism, 214 lumped, 165
isoparametric mapping, 116 material points, 9
isotropy, 13 mathematical domain of dependence, 36
maximizer, 67
Jacobian, 117 mechanical instability, 194
Jacobian ratio, 193 mechanisms, 160, 194
mesh, 85
kinematics, 8 mesh refinement algorithm, 192
kinetic energy, 161, 165 mesh refinement criterion, 192
kinetics, 8 method of weighted residuals, 77, 207
Kronecker delta, 8 minimizer, 67
Kronecker property, 85 mixed finite elements, 196
modal analysis, 180
L2 -inner product, 215
modal decomposition, 180
L2 -space of functions, 218
modeling errors, 24, 191
Lp -norm, 216
monomial, 223
Lagrange polynomials, 92
monomials, 83
Lagrangian, 161
multi-index, 83, 223
Lagrangian interpolation, 92
Lamé moduli, 13 natural frequency, 167
Laplace equation, 20 neighborhood, 217
Laplacian, 20 Neumann boundary, 21
large deformation, 183 Neumann-Poincaré, 219
large deformations, 196 neutral axis, 96
Lax equivalence theorem, 41 Newmark-β, 175, 176
Lax-Milgram theorem, 68, 227 Newton-Cotes, 134
Lax-Richtmyer theorem, 41 Newton-Raphson method, 154
least squares method, 208 node, 46
Legendre polynomials, 234 nodes, 85
Lehr’s damping ratio, 171 nominal strains, 10
line search method, 156 nominal stresses, 12
linear acceleration, 176, 177 nonlinear least squares, 157
linear elasticity, 12, 112, 229, 231 norm, 216
linear form, 67 normal force, 96
linear operator, 199, 226 normed linear space, 216

239
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

numerical damping, 44, 177 Rayleigh-Ritz, 70


numerical domain of dependence, 35 reduced integration, 141
numerical integration, 133 reference configuration, 9
numerical integration error, 189 residual, 207
Riemann sum, 133
one-to-one, 214 rigid-body mode, 167
onto, 214 rigid-body motion, 159
open, 217 Rolle’s theorem, 219
open set, 214 rotation, 95
operator, 226
order of a PDE, 21 selective integration, 152
order reduction, 182 semi-discretization, 162
ordered triad, 214 semi-norm, 220
orthogonal, 215 serendipity element, 131
over-integration, 141 set, 214
shape function matrix, 111
PkQl elements, 196 shape function properties, 81
parasitic shear, 151 shape functions, 79, 81
Parseval’s identity, 232 shear correction factor, 96
particle-mass lumping, 165 shear locking, 152
patch test, 153 shear strains, 10
period contraction, 179 shear stresses, 12
period elongation, 179 simplex, 120
Petrov-Galerkin, 79 simplicial, 120
phase error, 42, 44 simplicial quadrature, 141
phase error analysis, 41 singularities, 196
Piola-Kirchhoff stress tensor, 184 smoothing, 191
plane strain, 15 Sobolev norm, 61, 221
plane stress, 15 Sobolev semi-norm, 220
Poincaré inequalities, 219 Sobolev space, 61, 223, 224
Poisson equation, 20 solution error, 189
polynomial function space, 210 solution errors, 24
polynomial functions, 60 solver tolerance, 190
positive, 226 space of all second-order polynomial functions,
principle of minimum potential energy, 56, 58 214
principle of stationary action, 162 speed, 9
principle of virtual work, 77 square-integrable, 60, 61, 218, 223
1D, 78 static vs. dynamic FEA, 195
stationarity condition, 62
Q4, 126
steady state, 170
Q8, 131
stencil, 29
Q9, 131
stiffness matrix, 47, 113, 202
quadratic tetrahedron, 125
stiffness matrix of a 2-node beam element, 104
quadratic triangle, 125
stiffness tensor, 13
quadrature error, 236
strain energy density, 13
quadrature rules, 134
strain tensor, 9
Quasi-Newton method, 156
strain vector, 14
quasistatics, 161
stress tensor, 11
range, 214 stress vector, 14
Rayleigh’s quotient, 181 strong form, 73, 109

240
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich

strong solution, 73 verification, 24


subdomain method, 208 vibrations, 166
subparametric mapping, 116 Voigt notation, 14, 111
substitution, 148 volumetric locking, 153
summation convention, 8 von Mises stress, 12
superparametric mapping, 116 Von Neumann analysis, 35
support, 81, 225 von Neumann analysis, 37, 41
surface tractions, 143
surjective, 214 wave equation, 17, 199
symmetric, 226 weak form, 74
dynamic, 162
T10, 125 quasistatic, 110, 230
T4, 123 weak solution, 74
T6, 125 Weierstrass approximation theorem, 233
tangent matrix, 144, 154, 155
temperature field, 185 XFEM, 197
thermal problem, 69, 185
zero-energy mode, 152, 160
thermodynamics, 18
zero-energy modes, 159
time delay, 171
zeroth derivative, 74, 215
Timoshenko beam, 97
ZZ error estimator, 191
Timoshenko-Ehrenfest beam, 97
torsion, 106
total-Lagrangian, 196
trace, 13
traction, 11, 12
transport equation, 199
transverse force, 96
trial functions, 206
triangle inequality, 216
trigonometric polynomials, 83
truncation error, 190
truss, 108
two-node beam element, 205

UEL, 195
UMAT, 195
unconditionally stable, 38, 41
unconditionally unstable, 41
under-integration, 141
undistorted, 130, 140
units, 189
update rule, 31
updated-Lagrangian, 196

V&V, 24
Vainberg’s theorem, 228
validation, 24
variation, 62
variational calculus, 59
variational structure, 66
velocity field, 9

241

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy