0% found this document useful (0 votes)
44 views

IntroToFEA Red

Uploaded by

kevin
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)
44 views

IntroToFEA Red

Uploaded by

kevin
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/ 202

Computational Mechanics I:

Introduction to FEA
(Spring 2022)

Prof. Dr. Dennis M. Kochmann


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

Copyright © 2022 by Dennis M. Kochmann


Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.

Especially in times of covid-19, you are strongly recommended to visit the (virtual or
in-person) 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
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Contents

0 Preface 7

1 Review of Mechanics and Thermodynamics 8


1.1 Kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 Kinetics and Constitutive Relations . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 (Initial) Boundary Value Problems . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2 Computational Methods 18
2.1 Why do we need computational methods? . . . . . . . . . . . . . . . . . . . . . . 18
2.2 Dimensionless Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3 Direct Numerical Methods: Finite Differences 22

4 Stability of Finite Difference Schemes 30


4.1 CFL Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.2 Von Neumann Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.3 Phase Error Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.4 Advantages & Disadvantages of Indirect Methods . . . . . . . . . . . . . . . . . . 38

5 Methods of Weighted Residuals 39


5.1 Collocation Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.2 Subdomain Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.3 Method of Least Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.4 Higher Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.5 Galerkin’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

6 Variational Calculus 50
6.1 An introductory example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.2 Functionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.3 Variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.4 A General Variational Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6.5 Rayleigh-Ritz Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

7 Strong form & weak form 60


7.1 Classical and weak solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.2 Equivalence of principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7.3 Approximate solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

8 The mechanical variational problem at small strains 65


8.1 From the strong to the weak form . . . . . . . . . . . . . . . . . . . . . . . . . . 65
8.2 Linear elasticity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

9 Interpolation spaces 70
9.1 Shape functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
9.2 Approximation power and completeness . . . . . . . . . . . . . . . . . . . . . . . 71

3
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

9.3 Completeness in higher dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . 72

10 The Finite Element Method 74

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


11.1 2-node bar element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
11.1.1 2-node bar in 1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
11.1.2 2-node bar in 2D and 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
11.2 Problem assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
11.3 Polynomial interpolation of higher order . . . . . . . . . . . . . . . . . . . . . . . 84
11.3.1 Lagrangian interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
11.3.2 Hierarchical interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
11.4 2-node beam element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
11.5 A note on beam elements and boundary conditions . . . . . . . . . . . . . . . . . 91

12 Shape functions in higher dimensions 93


12.1 Parametric mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
12.2 Shape function derivatives for the isoparametric mapping . . . . . . . . . . . . . 94

13 Simplicial elements 97
13.1 Linear Triangle (T3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
13.2 Extension to 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
13.3 Finite element implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
13.3.1 Special case linear elasticity . . . . . . . . . . . . . . . . . . . . . . . . . . 101
13.3.2 General case of nonlinear elastic materials . . . . . . . . . . . . . . . . . . 102
13.4 Higher-order triangles and tetrahedra . . . . . . . . . . . . . . . . . . . . . . . . 102

14 The bilinear quadrilateral element 104

15 Higher-order and higher-dimensional elements: Q8, Q9, 8-node brick 109

16 Numerical quadrature 111


16.1 Example: Riemann sums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
16.2 Gauss quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
16.2.1 Gauss-Legendre quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . 113
16.2.2 Other Gauss quadrature rules . . . . . . . . . . . . . . . . . . . . . . . . . 114
16.3 Higher dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

17 FEM: which quadrature rule to use? 116


17.1 Integrals in the FE context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
17.2 Which quadrature rule to use? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

18 Element defects: shear locking and hourglassing 119

19 Assembly 122

20 Iterative solvers 123


20.1 Netwon-Raphson (NR) method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
20.2 Damped Newton-Raphson (dNR) method . . . . . . . . . . . . . . . . . . . . . . 125

4
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

20.3 Quasi-Newton (QN) method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125


20.4 Line search method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
20.5 Nonlinear Least Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
20.6 Gradient flow method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
20.7 Conjugate Gradient (CG) method . . . . . . . . . . . . . . . . . . . . . . . . . . 127

21 Boundary conditions 128


21.1 Neumann boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
21.2 Dirichlet boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
21.2.1 Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
21.2.2 Condensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
21.3 Dirichlet boundary conditions and iterative solvers . . . . . . . . . . . . . . . . . 135
21.4 Rigid-body motion & zero-energy modes . . . . . . . . . . . . . . . . . . . . . . . 136
21.5 The patch test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

22 Dynamics 138

23 Vibrations 143
23.1 Free, undamped vibrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
23.2 Forced vibrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
23.3 Modal decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
23.4 Structural damping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

24 Time-dependent transient solutions 151


24.1 Explicit time integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
24.2 A reinterpretation of finite differences . . . . . . . . . . . . . . . . . . . . . . . . 152
24.3 Implicit time integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
24.3.1 Newmark-β method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
24.4 HHT-α method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
24.5 On the use of mass matrices in time integration schemes . . . . . . . . . . . . . . 158

25 Extensions 159
25.1 Finite kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
25.2 Thermal problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

26 Error analysis and adaptivity, common mistakes 165


26.1 Finite element error analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
26.2 Smoothing and adaptivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
26.3 Common errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

27 FEM – Extensions & Applications 171

Appendices 174

A Vector Spaces 175

B Function Spaces 176

C Approximation Theory 180

5
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

D Sobolev spaces 184

E Operators 187

F Uniqueness of solutions 188

G Vainberg’s theorem 189

H Gauss quadrature 190

I Quadrature error estimates 192

J Structural Mechanics Review: Stiffness Matrix Assembly 193

Index 198

6
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 and, in particular, 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
implementations. 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 MATLAB® ), 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 a project on finite differences. Throughout the course, we will
complete a total of five projects that 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 1 (Statics & Kinematics), Mechanics 2 (Mechanics of Mate-
rials), and Dynamics at ETH Zürich) as well as basic knowledge in analysis and linear algebra.
We will begin with a brief review of continuum mechanics and an introduction to the notation
used in this course, after which we will dive into the discussion of numerical methods.

I apologize in advance for any typos that may have found their way into these lecture notes.
This is a truly evolving set of notes, which was started in the spring semester of 2019 and has
evolved significantly over time. Note that this set of notes is not meant as a complete textbook
and you are encouraged to take notes during lectures. Though I made great effort to ensure
these notes are free of essential typos or errors, I cannot rule out that some have remained. If
you spot any mistakes, feel free to send me a highlighted PDF at the end of the semester, so I
can make sure those issues are corrected for the future.

I hope you will find the course interesting and these notes supportive while studying Computa-
tional Mechanics I – Intro to FEA.

Dennis M. Kochmann
Zürich, February 2022

7
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

1 Review of Mechanics and Thermodynamics

We will introduce and discuss numerical methods for solving physical problems such as me-
chanical, thermal, and related initial boundary value problems. To this end, we will 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 hap-
pened 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.

For example, an inner product of two vectors is written as


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

where we exploited the orthogonality of the Cartesian basis, i.e.,


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

and δij is known as Kronecker delta. Likewise, the norm of a vector is defined as
√ √
∥u∥ = u · u = ui ui . (1.4)

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
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

of a vector u (no summation). ∂ui /∂xi is a scalar (the divergence of vector field u). ui vj are
the components of a second-order tensor u ⊗ v, 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
the displacement field x2 y
x
e2
u = u(x, t), (1.5) e3 x1 W
e1 ¶W
which to every undeformed point x ∈ Ω in the reference x3
configuration maps a unique deformed location y ∈ Rd ,
such that the corresponding deformed point (as shown above) is at position
y(x, t) = x + u(x, t). (1.6)

From the above displacement field, we may derive kinematic variables such as the velocity
field
d
v(x, t) = u(x, t) (1.7)
dt
and the acceleration field
d d2
a(x, t) = v(x, t) = 2 u(x, t), (1.8)
dt dt
which describe the motion of point x over time. For convenience, we 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
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 .

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
extension or shrinkage). The off-diagonal components εij with i ̸= j, by contrast, represent
shear strains (implying angle changes). By definition εij = εji or ε = εT , i.e., the strain
tensor is symmetric.

9
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

1.2 Kinetics and Constitutive Relations

x2
In order to deform a body Ω, forces (or displacements) must be
t2 s22
applied. Consider again an infinitesimal cube with (infinitesimal)
force vectors dFi applied to each surface dAi normal to the xi -axis s32 s12
s21
(positive in the +xi -direction, negative in the −xi -direction). We -t1 s23
define the components of the stress tensor σ as s11
s13 s31 x1
dFi s33 t1
σij = . (1.12)
dAj x3 t3
Analogous to the strains, components σ11 , σ22 and σ33 represent nominal stresses (resulting
in extension or compression of the cube along its axes), while components σij (with i ̸= j) imply
shear stresses acting parallel to the surface that it is acting on. The complete (infinitesimal)
force vector (also known as the traction vector) acting on a surface with normal n is given by
 
σ1i
t(n) = σn ⇒ [t(ei )] = [ti ] = σ2i  ,
 (1.13)
σ3i

i.e., the ith column of σ is the traction vector on a surface normal to ei . Here and in the
following, we use brackets to indicate vector (or tensor) components in the Cartesian frame.
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).

The kinetics describe the link between the deformation of a body and the causes of that
deformation (i.e., the forces and stresses). Stresses and strains are linked by constitutive
relations that depend on the material of which body Ω is made. The simplest material model
is linear elasticity, for which stresses and strains are linearly linked via the linear relation

σij = Cijkl εkl ⇔ σ = Cε (1.14)

with a fourth-order elasticity tensor, whose component Cijkl describes the linear dependence
of the stress component σij on the strain component εkl . In principle, C has d4 entries; yet,
the symmetry of both the stress and strain tensors as well as any existing material symmetries
reduce the number of independent 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 Poission’s ratio ν, or the Lamé moduli λ
and µ (µ being the shear modulus).

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
W = ε · Cε ⇔ W = εij Cijkl εkl (1.15)
2 2
The stresses follow from differentiation:
∂W ∂σij ∂2W
σij = , Cijkl = = . (1.16)
∂εij ∂εkl ∂εij ∂εkl

Note that the last identify shows that Cijkl = Cklij has so-called major symmetry. In addition,
since εij = εji and σij = σji for our purposes, we know that Cijkl = Cjikl = Cijlk = Cjilk ,

10
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

which is known as minor symmetry. Tensor (and vector) derivatives of the above type are to be
understood component-wise; i.e., differentiating W with respect to each component of ε yields
nine values, which are the components of σ (for details and a proper tensorial definition see the
Tensor Notes available online).

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 (since we are not relating two scalars, force and extension, but two tensors, stresses and
strains, the stiffness must be expressed as a fourth-order tensor).

In order 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 which, for a macroscopic body Ω
states that
X
Fi = maCM . (1.17)
i

That is, the sum of all forces 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.17) is equivalent to
Z Z Z
σn dS + ρb dV = ρa dV , (1.18)
∂Ω Ω Ω

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.19)
dt dt Ω ρ dV m Ω dt2 m Ω

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


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

which, by the way, defines the divergence of a tensor as a vector with components

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

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

This relation must hold not only for the whole body Ω but also for any sub-body cut free from
Ω (as discussed when talking about free-body diagrams and inner forces in Mechanics 2 and in

11
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Section 5.2 of Dynamics). For the above integral 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.23)

This is the local form of the balance of linear momentum.

Example 1.1. One-dimensional waves in elastic rods


Consider a long and slender rod, which is deforming only along
its x-axis. The displacement field u = u(x, t) describes the axial u(x,t)
+
motion of each point on the rod, so the associated acceleration field
is simply a = a(x, t) = ü(x, t).
x

The only non-zero strain component is the axial strain εxx (x, t) = ε(x, t) = u,x (x, t) and the
only non-zero stress is the axial stress σxx (x, t) = σ(x, t), which for linear elasticity obeys
σ(x, t) = E(x)ε(x, t) with Young’s modulus E(x) that may vary with position x.

Inserting all of this into the local balance law of linear momentum (in the absence of body
forces) gives
 
ρ(x)a(x, t) = div σ(x, t) ⇒ ρ(x)ü(x, t) = σ(x, t) ,x = E(x)u,x (x, t) ,x . (1.24)

For the special case of a homogeneous rod having a constant density ρ(x) = ρ = const. and a
constant 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.25)
ρ

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 in the rod.

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

Consider an elastic rod of uniform mass density ρ, Young’s modulus E, length x0


L, and cross-sectional area A, which is hanging vertically from the ceiling.
What is the extension of the rod under the action of gravity (with a constant g Dx
gravitational acceleration g)?
x
xi-1
This is a slightly modified case compared to Example 1.1. The governing u(x) L ui xi
+

equation, viz. linear momentum balance, is the same except that we must
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.26)
xn
Here, we consider statics, so that we have ü(x, t) = 0 for all x ∈ Ω and we look for a time-
independent displacement field solution u(x). In addition, ρ and E are constant. Therefore,
(1.26) reduces to
ρg ρg 2
u,xx (x) = − ⇒ u(x) = − x + c1 x + c2 , (1.27)
E 2E
whose solution is obtained by integrating twice. The unknown integration constants c1 , c2 ∈ R
are to obtained from boundary conditions. Assuming that coordinate x runs downward, starting

12
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

from the ceiling, the rod’s fixed end at the celining implies that

u(0) = 0 ⇒ c2 = 0. (1.28)

The bottom end of the rod is free, which means that there can be no external force acting at
the bottom end:
ρg
F (L) = Aσ(L) = AEu,x (L) = 0 ⇒ c1 = L. (1.29)
E
Overall, this leads to the displacement field inside the rod as
ρg 2 ρg ρg
u(x) = − x + Lx = − x(x − 2L), (1.30)
2E E 2E
and it is a simple exercise to verify that is satisfies both boundary conditions. Note that, as a
consequence, the strain ε = u,x inside the rod is not constant along its length.

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

ρgL2
∆x = u(L) = . (1.31)
2E

————
Example 1.3. Wave equation in higher dimensions

For the more general case of a body Ω undergoing linear elastic deformation over time, the
balance law of linear momentum (in the absence of body forces) reads

ρ(x)a(x, t) = div σ(x, t) ⇔ ρ(x)üi (x, t) = [Cijkl (x)uk,l (x, t)],j . (1.32)

For the special case of a uniform rod with a constant density ρ(x) = ρ = const. and constant
elastic modulus tensor C(x) = C = const., the above reduces to

ρüi (x, t) = Cijkl (x)uk,jl (x, t) (1.33)

This is sometimes referred to as the Navier equation, governing the deformation and motion
of a linear elastic body in higher dimensions. As before, for the special case of statics we have
ü(x, t) = 0 for all x ∈ Ω, so we must solve Cijkl (x)uk,jl (x) = 0.

————

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., 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.34)
dt Ω ∂Ω

13
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.35)
∂Ω ∂Ω Ω Ω

which, by the way, defines the divergence of a vector as the scalar quantity

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

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 added body has the same
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.37)
Ω 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.38)
Ω Ω dt Ω

Rewriting the balance law of energy, Eq. (1.34), now yields


Z Z Z Z
ė dV = s dV − div q dV + Ẇ dV, (1.39)
Ω Ω Ω Ω

which can be rewritten as


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

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.41)

This is the local (i.e., pointwise) counterpart to the macroscopic energy balance (1.34) 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.4. Heat conduction

Consider a purely thermal problem without mechanical energy (so Ẇ = 0). Thermally stored
energy is given by e = ρcv T with mass density ρ(x), the (constant) specific heat capacity cv (x),
and a generally unknown temperature field T = T (x, t). Let us assume that heat conduction
follows Fourier’s law, viz.

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

14
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

with a heat conductivity κ(x). By the way, the above also introduces the components of the
gradient of a scalar field as
∂T
[grad T ]i = T,i = . (1.43)
∂xi
The local energy balance equation (1.41) now has become
ρ(x)cv (x)Ṫ (x, t) = [κ(x)T,i (x, t)],i + s(x, t). (1.44)
For the special case of a homogeneous body with spatially constant 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.45)


where we used the definition of the Laplacian, viz.
d
X ∂2T
T,ii = ∇2 T = . (1.46)
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

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


Finally, whenever we consider a static problem, we assume that the body is in equilibrium and
the temperature field is constant with time, so T (x, t) = T (x). This simplifies the above to the
Poisson equation
κ ∇2 T = −s, (1.48)
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 the temperature problem can hence be at most
linearly varying across the body.

————

1.3 (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.49)

On the Dirichlet boundary, the primary field is known (e.g., fixing the displacement u(0) =
0 in Example 1.2 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).

15
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

• ∂Ω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.50)

On the Neumann boundary, not the primary fields but their conjugate kinetic variables are
known (e.g., enforcing a zero force F (L) = EAu,x (L) = 0 in Example 1.2 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.51)

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 forces 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 we will discuss beams as a special case later (where
both deflections and rotations imply primary fields), but let us not get into this topic now.

In addition to the above boundary conditions, all time-dependent problems require initial
conditions, e.g.,

T (x, 0) = T0 (x) ∀ x ∈ Ω,
(1.52)
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.53)

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 (1.33) is 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 notational brevity, we point out that any of the aforementioned PDEs can be written in
an operator form. By introducing a differential operator L, we may abbreviate, e.g., the 1D

16
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

wave equation as
∂ ∂
ü − c2 u,xx = 0 ⇔ L[u] = 0 with L= − c2 2 . (1.54)
∂t2 ∂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 . (1.55)

For more information about operators and linear operators see Appendix E. In the following
we will need to be more specific about what we mean by all functions (since we may need to
classify admissible or useful classes of functions), but leave this for later, when we in fact need
these concepts. A few examples involving linear operators are summarized here:

• the 1D wave equation (second order in space and time):

∂ ∂
L[u] = 0 with L= 2
− c2 2 ⇔ ü = c2 u,xx . (1.56)
∂t ∂x

• the 1D heat equation (second order in space, first order in time):

∂ ∂2
L[T ] = s with L = ρcv −κ 2 ⇔ ρcv Ṫ = κT,xx + s. (1.57)
∂t ∂x

• the 1D advection equation (or transport equation) (first order in space and time)
with a scalar flow speed v:
∂ ∂
L[u] = 0 with L= +v ⇔ u̇ + v u,x = 0. (1.58)
∂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̂. (1.59)
∂x

• boundary flux in a 1D bar undergoing Fourier-type heat conduction:



B[T ] = q̂ with B = −κ ⇔ − κT,x = q̂. (1.60)
∂x

This concludes our mathematical detour into the governing equations of mechanical and ther-
modynamic (initial) boundary value problems. We have introduced those fields describing the
deformation, motion and thermodynamics of bodies in space, we have formulated the balance
equations governing their physical behavior, and we have supplemented those with initial and
boundary conditions, as needed to find a solution.

17
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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, for realistic ma-
terials with complex material models going beyond linear elasticity, and/or for general ini-
tial/boundary conditions, one usually cannot find analytical solutions and hence requires nu-
merical techniques to obtain approximate solutions using computers.

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. Therefore,
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 reason, any numerical technique has the objective of turning an infinite-
dimensional problem into a finite-dimensional one2 . For example, the exact solution of
any of the above (I)BVPs lives within an inifinite-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 differentiability properties), so the problem is not to simply 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
the infinite-dimensional problem to an n-dimensional one.

• Any 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
2
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.

18
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 results: solving the numerical problem computation-
ally 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.

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

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.

19
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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
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).

————

20
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Example 2.2. Heat equation

Let us consider the heat equation derived in Eq. 1.45 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

————

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.

21
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

3 Direct Numerical Methods: 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

(∆x)2 ∂ 2 u (∆x)3 ∂ 3 u

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

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

+ 2

∂x
xj ,tα 2 ∂x
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
2

α α α 2 ∂ u
uj+1 + uj−1 = 2uj + (∆x) + 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α ).

22
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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αj+1 − uαj−1

α α ∂u 3 ∂u α
uj+1 − uj−1 = 2∆x + O(∆x ) ⇒ (x j , 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 , tα−1 ) and (xj , tα+1 ). 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α+1 − uα−1

∂u ∂u j 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α+1 − uαj

∂u ∂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αj − uα−1

∂u ∂u 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)

23
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.

24
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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

25
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.2).

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.

————

26
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 is u(x) as a function of the ax-
ial x-coordinate (running downward from the top of the
beam, as shown on the right). Gravity acts downward.
xn
In this case, the governing equation is linear momentum balance (see Example 1.2), 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.2, 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 + 1 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 beam is easily implemented by a Dirichlet boundary condition, enforcing

u0 = 0. (3.22)

The free bottom end of the beam 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.

27
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.

We close by noting that the above finite-difference approximation also admits a physical inter-
pretation. Imagine that we subdivide the bar into n short bars, each of length ∆x = L/n. We
can replace each bar by an elastic spring of effective stiffness k = EA/∆x = nEA/L. At the
same time, each bar has a mass m = ρA∆x = ρAL/n, which we choose to distribute evenly to
its two ends. As a result, we arrive at a chain of n + 1 masses (the inner ones being m as they
are connected to two bars, the first and last ones m/2) connected by identical linear springs of

28
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

effective stiffness k = nEA/L. Static force equilibrium for the jth (inner) mass becomes

nEA nEA gρAL


(uj − uj−1 ) − (uj+1 − uj ) − =0 (3.25)
L L n
or (after some simplification)
 2
ρg L ρg
uj+1 − 2uj + uj−1 =− = (∆x)2 = c, (3.26)
E n E

which is identical to (3.21) for each inner mass. u0 = 0 is also enforced, while the bottom
mass adheres to a different boundary condition, mg/2 = k(un−1 − un ). With grid refinement
(m = ρAL/n → 0 as n → ∞), this is expected to converge to the above finite difference scheme.

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

Note that Appendix J contains a discussion of the structural assembly of spring systems in 1D
and 2D, leading to systems of equations of the above type, which will become helpful later.

29
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 discus:

• 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

30
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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) condition3 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 ⇔ ∆x ≤ 1.
(4.6)
∆t ∆t ∆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 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.
3
The CFL condition is named after mathematicians Richard Courant, Kurt Friedrichs, and Hans Lewy, who
introduced it in a seminal paper in 1928.

31
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

4.2 Von Neumann Analysis

A sufficient condition for stability is obtained by so-called von Neumann analysis4 . As an


illustrative example, let us again consider the stencil (4.1) for the 1D wave equation:

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

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.

Let us assume √that there is a small perturbation to the solution, which at some time tα we
write, with i = −1, as
α −kx)
u(x, tα ) = ûei(ωt , (4.9)

which is of harmonic type. When applied to our finite-difference grid with uniform spacings ∆t
and ∆x, the above yields the grid point values at time tα as
α −kx )
uαj = ûei(ωt j
= ei(ωα ∆t−j ∆x k) . (4.10)

Note that any general noise function can always be decomposed into a Fourier series. Therefore,
if we can show that the above function does not grow over time for arbitrary choices of ω and
k, then any perturbation of the solution should remain stable over time. By contrast, if there
are some values of ω and k, for which we observe exponential growth of this noise, we conclude
instability. As we dealing with linear ODEs and PDEs in this class, we may set û = 1 without
loss of generality (the amplitude does not affect the growth or decay).

Classical von Neumann analysis makes a simplification by defining z = eiω∆t , 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α ) uj

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


harmonic signals propagate from one time step to the next. Stability requires that ∥z∥ ≤ 1, since
otherwise exponential growth occurs over time. If ∥z∥ > 1, then uαj = z uα−1
j and ||uαj || > ||uαj ||,
and the analogous applies to all time steps, thus implying exponential growth over time.

Insertion of (4.11) into the finite-difference approximated wave equation (4.8) 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.13)
(∆x)2
4
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.

32
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.14)
(∆x)2
with
∆t
σ=c . (4.15)
∆x
Multiplying by z turns (4.14) into a quadratic equation in z,

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

(4.16)

whose solution is
q
z = 1 + σ [cos(k ∆x) − 1] ± (1 + σ 2 [cos(k ∆x) − 1])2 − 1
2
p (4.17)
= 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.18)


 
| {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.19)


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

By contrast,
 

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


 
| {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.21)

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.22)

33
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.23)
> 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.15), which allows us to formulate the condition for stability as

∆t
|σ| ≤ 1 ⇔ −1≤c ≤ 1. (4.24)
∆x
Since stability hinges upon this condition (and ∆x and ∆t cannot be chosen arbitrarily), we
say the scheme is conditionally stable. Note that the above condition agress with the CFL
condition for the wave equation (cf. Eq. 4.6), so that in this case CFL and von Neumann anlaysis
yield the same stability condition.

The above example illustrates the general procedure used for von Neumann analysis:
1. Insert ansatz (4.11) into the finite-difference scheme.

2. Simplify as much as possible, e.g., dividing by z α eijk∆x to remove all common terms.

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 stability of a scheme? The Lax-Richtmyer theorem (also known as
the 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)

(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.

34
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Example 4.1. Stability of an implicit scheme for the advection equation

As introduced in Section 1.3, the advection equation governing, e.g., fluid transport processes
governs the field u(x, t) by
u̇(x, t) + v u,x (x, t) = 0, (4.25)
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.26)
∆t 2∆x
Insertion into (4.25) 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.27)
∆t 2∆x 2
where we introduced the dimensionless speed
∆t
c=v . (4.28)
∆x
Note that (4.27) 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.29)
 
Insertion into uαj − ujα−1 = −c uαj+1 − uαj−1 from (4.27) gives
c 
z α e−ikxj − z α−1 e−ikxj = − z α e−ikxj+1 − z α e−ikxj−1 . (4.30)
2
Using that xj±1 = xj ± ∆x and dividing by z α e−ikxj results in
1 c  c
1 − = − e−ik∆x − e+ik∆x = 2i sin(k ∆x) = i c sin(k ∆x). (4.31)
z 2 2
Isolating z ∈ C gives
1 1
= 1 − i c sin(k ∆x) ⇒ = 1 + c2 sin2 (k ∆x) ≥ 1 (4.32)
z ∥z∥2
and thus
1
∥z∥2 = ≤ 1. (4.33)
1+ c2 sin2 (k ∆x)
We conclude that, irrespective of k and ∆x, we have ∥z∥ ≤ 1, so that the scheme is uncondi-
tionally stable (which is also independent of the sign of v).

————

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 Exercises. This may pose severe restrictions on the
admissible choices of ∆x and/or ∆t.

35
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 Fourier 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 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 dis-
cuss what is known as phase error analysis – which, as we will see, is closely tied to the above
von Neumann stability analysis.

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.34)

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.35)

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.35)). 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.

As an instructive example, we consider the same explicit scheme for 1D wave equation introduced
before, viz.

uα+1
j − 2uαj + ujα−1 uαj+1 − 2uαj + uαj−1
= c2 . (4.36)
(∆t)2 (∆x)2
Inserting (4.10) into (4.36) 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.37)
= 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 e−i ∆x k − 2 + e−i ∆x k with σ=c . (4.38)
∆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.39)

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

36
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

wavelength k, then (4.39) defines the frequency (or frequencies) ω at which the signal will prop-
agate. Note that for small values of |ω ∆t| ≪ 1 and |k ∆x| ≪ 1, we may expand (4.39) to
leading order (using cos x = 1 − x2 + O(x4 ), recalling σ = c∆t/∆x, and taking the square root):

c∆t
1 − (ω ∆t)2 − 1 ≈ σ 2 1 − (k ∆x)2 − 1
 
⇔ |ω|∆t = |k|∆x ⇔ |ω| = c|k|,
∆x
(4.40)

which matches the exact dispersion relation (4.34). 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.39) does not agree with the exact relation and hence introduces
errors.

To understand the implications of (4.39), let us consider three cases:

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

cos(ω ∆t) = cos(k ∆x) (4.41)

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

ω ∆t = ±k ∆x ⇒ ω = ±ck, (4.42)

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

• |σ| > 1: in this case we have

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

Now, there are cases of k for which the right-hand side becomes negative, meaning 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 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 Section 4.2).

• |σ| < 1: we showed in Section 4.2 that this case corresponds to a stable finite-difference
scheme. This is indeed confirmed here: to any k ∈ R there corresponds a solution ω ∈ R,
found by solving (4.39). However, we notice that in this case there exist frequencies ω for
which no solution k ∈ R exists according to (4.39) (only solutions k ∈ C). 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 and constant amplitude, since no real wave vector 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 |sigma| < 1 the
scheme is stable but it damps certain frequencies and therefore shows so-called phase
error.

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 damping, while

37
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

|σ| < 1 leads to numerical damping of certain frequencies. Note that this is purely numerical
damping: the elastic wave equation has no intrinsic 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 Indirect 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
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.

As an alternative, indirect methods (to be discussed next) do not solve the ODEs/PDEs
directly but search for “optimal ” approximations. In a nutshell, one reduces the infinite-
dimensional problem 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. Particular
questions to be addressed include:

• 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 piece-constant
functions, or something else? And are these globally or locally defined functions?

• What does “optimal ” 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)?

We need a few more concepts to address these questions, which we will introduce in the following
sections. Note that, for simplicity, we will formulate many concepts in 1D first with analogous
generalizations possible for higher dimensions unless specifically mentioned. In addition, we will
discuss (quasi-)static problems without time dependence first and add dynamics later.

38
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

5 Methods of Weighted Residuals

The objective of all weighted residual methods is to find approximate solutions uh (x, t) that
minimize the total error (which still needs to be defined) when comparing with the exact solution
u(x, t). For simplicity, let us drop the time dependence for now and only consider (quasi)static
problems. Also, let us start with 1D problems, seeking uh (x), and later expand all concepts to
higher dimensions as needed.

We start by defining a solution space of our sought approximation by writing

n
X
uh (x) = ca ϕa (x) (5.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
uh (x) = u∂ΩD (x) + ca ϕa (x) with ϕa (x) = 0 on ∂ΩD (5.2)
a=1

and u∂ΩD (x) satisfying all essential boundary conditions.

As explored in Section 1.3, 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),
(5.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
heat flux on the boundary ∂Ω). Since we may have multiple independent Neumann boundary

39
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 (5.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 . (5.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 (5.5)
Ω j=1 Ω

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.

5.1 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
(5.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
(5.7) +5
r∂Ωi−(n−k) (xi ) = 0 for i = n − k + 1, . . . , n W
Points xi (i = 1, . . . , n) are called collocation points5 . 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
many equations are available (recall that we need n equations to solve for the n unknown
coefficients).
5
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 .

40
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

5.2 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 (5.8) D3
0 else

and
(
1 if x ∈ ∂Ωi−(n−k)
wi = for i = n − k + 1, . . . , n, (5.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 (5.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.

5.3 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 (5.11)
Ω j=1 ∂Ωj

and obtain the coefficients as the minimizers thereof, i.e.,

{c1 , . . . , cn } = arg min E. (5.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, (5.13)
∂ca Ω ∂c ∂Ωj ∂ca
j=1

41
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

from which we realize, by comparing to (5.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 . (5.14)
∂ca ∂ca
Recalling our definitions and exploiting the properties of a linear operator (see Section 1.3 and
Eq. (1.55)), 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 (5.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 . (5.16)
a=1

This shows that


∂rΩ ∂r∂Ωj
Wa = = L[ϕa (x)] in Ω, wa = = Bj [ϕa (x)] on ∂Ωj . (5.17)
∂ca ∂ca
Altogether, this turns the stationarity conditions (5.13) for a = 1, . . . , n into6
n
Z !
X
c L[ϕ (x)] − s L[ϕa (x)] dV
b b
Ω b=1
k Z n
! (5.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 (5.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 , (5.20)
b=1

where we grouped all unknown coefficients into the vector


T
c = c1 , . . . , cn . (5.21)
6
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)].

42
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

The components of matrix K and vector F are, respectively,


Z k Z
X
K ab = L[ϕa (x)]L[ϕb (x)] dV + ξ 2 Bj [ϕa (x)]Bj [ϕb (x)] dS (5.22)
Ω j=1 ∂Ωj

and
Z k Z
X
Fa = sL[ϕa (x)] dV + ξ 2 t̂j Bj [ϕa (x)] dS. (5.23)
Ω j=1 ∂Ωj

Note that both K and F are constant, since all integrals have been evaluated, so (5.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).

For reasons that will become important later, 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 , as
usual). The same applies to the components F a of vector F . The reason is that we will later
need the analogous concepts in higher dimensions, where each coefficient ca ∈ Rd is a vector
having d components, so we need to find all cai with a = 1, . . . , n and i = 1, . . . , d, and we will
need matrices with components Kijab .

Example 5.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, (5.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. (5.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. (5.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
uh (x) = ca xa . (5.27)
a=0

43
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

This defines a polynomial function space of order n, which is often abbreviated as


uh (x) ∈ Pn . (5.28)
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 . (5.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
(5.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. (5.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, (5.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 , (5.33)
EA 2EAL 3EAL2 c3 mω 2 L
whose solution is
mω 2 L ρω 2 L2 ρω 2
c1 = + , c2 = 0, c3 = − . (5.34)
EA 2E 6E
Insertion into (5.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 . (5.35)
EA 2E 6E
This is in fact the exact solution, cf. Eq. (5.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 this case.

44
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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}, (5.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
     
(5.37)
0 L/2

and, as before,

EA(c1 + 2c2 L + 3c3 L2 ) − mω 2 L = 0. (5.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 (5.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 (5.39)
Ω j=1 ∂Ωj

and vector components


Z k Z
X
a a 2
F = sL[ϕ (x)] dV + ξ t̂j Bj [ϕa (x)] dS. (5.40)
Ω j=1 ∂Ωj

For this particular problem, we have defined L[·] and B[·] in (5.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 (5.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 (5.42)
= −ρω EA x 2 dx + ξ 2 mω 2 LEA |x=L
0 ∂x ∂x
= −ρω 2 EA(a − 1)La + ξ 2 mω 2 EAaLa .

45
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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ρ)  , (5.43)
3AE L 12AE 2 L2 21AE 2 L3
2 c3 EL2 ω 2 (3m − 2ALρ)

whose solution, again, recovers the exact solution (5.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.

————

5.4 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), (5.44)
a∈T

where ca ∈ Rd are 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.

5.5 Galerkin’s Method

Before we end our discussion of weighted residuals, let us introduce one more method that is
related to the above and therefore usually counted towards the family of methods of weighted
residuals. The advantage of so-called Galerkin’s method is that it avoids the ambiguity in
all of the above schemes: remember that we had to choose collocation points or subdomains or
ξ 2 , and that the solution in general depends on these choices. Here, we outline an approach to
overcome this ambiguity.

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

46
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

small deformation, the principle of virtual work states that


Z Z Z
∗ ∗
σij ui,j dV = ρbi ui dV + t̂i u∗i dS (5.45)
Ω Ω Ω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.

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


Z Z Z
∗ ∗
σij ui,j dV = σij nj ui dS − σij,j u∗i dV, (5.46)
Ω ∂Ω Ω

so that rewriting (5.45) leads to


Z Z

(σij,j + ρbi )ui dV + (t̂i − σij nj )u∗i dS = 0. (5.47)
Ω ∂Ω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 . (5.48)

These are equivalent to the (static) balance of linear momentum and the associated traction
boundary condition, so that (5.45) – 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 (5.48).

Notice that the form of (5.47) is identical to the total residual (5.5) in the methods of weighted
residuals with the trial or weighting functions now being u∗ (x). Hence, the principle of virtual
work lends itself for a natural way to formulate a total weighted residual, viz. (5.47) in this
example (without the need to introduce a scaling parameter ξ and without having to pay
separate attention to various boundary terms). Note that u∗ (x) is a continuous function, so
we here have, in principle, an infinite-dimensional problem (and infinitely many admissible
weighting functions u∗ ). However, we can (and will) turn this problem into a finite-dimensional
one by introducing approximate forms for both uh (x) ≈ u(x) and v h (x) ≈ u∗ (x), which will
form the basis of the finite element formulation later.

Example 5.2. Hanging bar under its own weight revisited

For instructive purposes, we formulate the principle of virtual work for a 1D bar. We re-visit the
problem of a hanging bar under its own weight, discussed in Example 3.2, but here we attach
a force F̂ to the free of the bar for generality (choosing F̂ = 0 recovers the original problem).
The problem is thus described by

Eu,xx (x) + ρg = 0 with u(0) = 0 and F (L) = EAu,x (L) = F̂ . (5.49)

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

47
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

(5.50)

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). (5.51)
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. (5.52)
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), (5.53)

which in turn confirms that a function u(x) that satisfies (5.50) for all admissible virtual dis-
placements u∗ (x), as well as the essential boundary condition u(0) = 0, is also a solution of
(5.49).

Finally, note that (5.50) can be rewritten as


Z L Z L

R= Eu,x u,x A dx − ρgu∗ A dx − F̂ u∗ (L) = 0, (5.54)
0 0

which is of the form (5.5) of the total residual discussed for the methods of weighted residuals,
with 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 (5.54) is linear in u(x), this again leads to a linear system of
equations to be solved for the unknown coefficients.

————

5.6 Summary

At the end of this section, let us recap the basic principle of weighted residual methods discussed
here. By contrast to direct methods such as finite differences, the goal of this indirect method
is not to solve the governing PDEs directly but instead to minimize the error made by an
approximate solution as follows:

(i ) we first define an approximate solution space and an approximate solution uh (x) defined
up to n unknown coefficients (making sure that uh (x) satisfies all Dirichlet boundary
conditions),

(ii ) we insert the approximate solution uh (x) into the governing equations and define bulk
and boundary residuals (which only vanish for the exact solution),

(iii ) we define n weighting functions Wi , wi , which result in n residuals Ri to be set to zero,


such as to produce n equations to be solved for the n unknown coefficients,

(iv ) we numerically solve the resulting linear system of equations for the coefficients.

48
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Although the methods of weighted residuals are handy, simple and can be applied to, in principle,
any physical problem of interest, the solution in general depends significantly on the choice of
the weights and also on the choice of ξ (and both are hard to judge without knowing the exact
solution). Only the principle of virtual work provided a more intuitive approach, which avoided
those choices. In the following section, we provide a more intuitive approach to arrive at forms
of the type (5.45).

49
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

6 Variational Calculus

For many physical problems, including the classical mechanical, thermal and also electromag-
netic boundary value problems, there is a more intuitive way to arrive at equations of the
type (5.45), viz. by considering the energetic (or so-called variational ) basis of the underlying
problems. In simple terms, we know that any physical system aims to minimize its energy in
a stable equilibrium. We will see that (5.45) (which we previously obtained from the principle
of virtual work) is in fact nothing else but the stationarity equation of such a minimization
problem. To understand what energy must be minimized and, moreover, how to minimize an
energy over a function space, we first need to introduce some of the fundamentals of variational
calculus. This is the objective of this section.

6.1 An introductory example

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.

50
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

6.2 Functionals

Let us first give the normal definition of a functional and then dissect its meaning. A functional
is a special type of mapping which maps from a function space U to R:

I : u ∈ U → I[u] ∈ R. (6.3)

In simple terms, a functional7 I is a “function of functions”, i.e., a function whose argument is


another function: you hand it a function u(x), and it returns a scalar I ∈ R (e.g., the energy
associated with u(x)). Functionals are to be distinguished from functions such as f (x) = x2
with f : R → R+ d
0 . Unlike a function, which is a mapping from R → R, a functional ’s
domain is generally a function space U (e.g., all polynomial functions up to a certain degree
n, abbreviated as Pn , or all continuously differentiable functions, or all piecewise polynomial
functions, etc.). For more information on vector and function spaces, see Appendices A and B.

When seeking 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.4)
0

which defines a functional I requiring that u(x) is differentiable (i.e., possesses a first derivative
u,x ) and that the first derivative squared can be integrated to yield some finite value. As a
counter-example, a piecewise constant function u(x) would not be square-integrable (the first
derivative consists of Dirac delta functions, which, if squared, yield infinity when integrated).
Hence, functional I[u] in (6.4) 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.5)
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 space8

H k (Ω) = u : Ω → R such that ∥u∥H k (Ω) < ∞ ,



(6.6)

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.7)
Ω Ω Ω

In simple terms (and this is all we will need to remember in the following), H k (Ω) denotes 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). The above example in Eq. (6.4), e.g.,
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.)
7
To differentiate functionals from functions, we will write I[u] with brackets instead of parentheses as in u(x).
8
Though not needed for our purposes here, more information on Sobolev norms and spaces is available in
Appendix D.

51
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Example 6.1. 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.8)
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. To replicate Example 5.2 of the hanging bar with an applied end force F̂ , we must
subtract from the above energy the work done by the external force, thus arriving at the total
potential energy functional
Z L
E
I[u] = [u,x (x)]2 A dx − F̂ u(L). (6.9)
0 2

Minimizing this functional with respect to the unknown function u(x) is expected to yield the
sought solution. Unfortunately, we still do not know how to minimize a functional with respect
to a function, which 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.10) + + x
0 L
then the variation must satisfy
n o
δu ∈ U0 = δu ∈ H k (Ω) : δu = 0 on ∂ΩD . (6.11)

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 .

52
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.12)
ϵ→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.13)

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.2. 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.14)
0

We use the definition (6.12) 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.15)
= 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ϵ
(6.16)
d 1
Z Z 1
2
= lim 2(u + ϵ δu) δu dx = 2 (δu) 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.17)

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

————

53
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

The following are helpful relations, which follow directly from the above definition of variations.
For any functions u, v ∈ U, functionals Ii : U → R, and constants αi ∈ R, the following relations
hold:

• δ (α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 quite analogous to those applicable to a differential
du (this analogy often helps).

Furthermore, we can calculate variations for functionals depending on more than one function,
if we define
d
δI[u, v, . . .] = I[u + ϵ δu, v + ϵ δv, . . .]ε→0 . (6.18)

Note that, since a variation is the analog of a derivative, we can use variations to expand any
functional I[u] in a Taylor series as follows:
1 2 1
I[u + δu] = I[u] + δI[u] + δ I[u] + δ 3 I[u] + . . . (6.19)
2! 3!
For example, we may expand the functional of Example 6.2 by factoring out the quadratic term,
which immediately shows that we recover the Taylor expansion.
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.20)
1 2
= I[u] + δI[u] + δ I[u],
2
All higher-order terms vanish (as expected, since the functional involves u only up to quadratic
order).

In most practical problems, the functional will involve both a function u and some if its deriva-
tives. In general, such a functional has the form
Z
I[u] = f (u, ∇u, ∇2 u, . . .) dx. (6.21)

We can use the above relations for variations to derive a practical shortcut for computing
variations of (6.21) as follows. The first variation is obtained as
Z
d
I[u] = lim f (u + ϵ δu, ∇u + ϵ δ∇u, ∇2 u + ϵ δ∇2 u, . . .) dx
ϵ→0 dϵ Ω
Z   (6.22)
∂f ∂f ∂f 2
= δu + δ∇u + δ∇ u + . . . dx.
Ω ∂u ∂∇u ∂∇2 u
The analogous applies in higher dimensions – which will become important in the mechanical
boundary value problems discussed later. For example, if we seek a displacement field u(x) :
Ω → Rd , the functional may involve all components of u and all their partial derivatives, so
Z
I[u] = f (ui , ui,j , ui,jk . . .) dV. (6.23)

54
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Applying (6.22) to this case yields


Z Z  
∂f ∂f
I[u] = f (u, ∇u, . . .) dx ⇒ δI[u] = δui + δui,j . . . dV (6.24)
Ω Ω ∂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 point over
U of a functional I[u]. Let us demonstrate this by the following example.

Example 6.3. Hanging bar under its own weight revisited (again, I know)
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
u(x) L

+
The total potential energy, which is the total strain energy of the elastic bar
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.25)
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.26)

The first variation of (6.25) 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.27)
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.28)

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.29)
0

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

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

55
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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

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

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. (5.49). Therefore, we have shown
that rendering functional (6.25) stationary with respect to u(x) ∈ U is equivalent to solving
(6.31) 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.32)
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.

Finally, notice that the first variation (6.27) is exactly the principle of virtual work discussed
before, cf. Eq. (5.50), if we replace δu by u∗ . Thus, our variations here are the same as virtual
displacements in the principle of virtual work, and we obtain the latter automatically from
the energy functional as the first variation. This admits a re-interpretation of the principle of
virtual work, which is nothing else but the stationarity condition for minimizing the underlying
energy functional.

————

6.4 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 for
short as
1
I[u] = B[u, u] − L[u], (6.33)
2
where we introduced a bilinear form B and a linear form L, defined as
Z Z Z
B[u, v] = E(grad u)(grad v) dV and L[u] = ρgu dV − t̂u dS, (6.34)
Ω Ω ∂ΩD

where we included tractions t̂ applied to the surface ΩD for generality. Note that in 1D we
have grad u = u,x , so (6.33) is nothing but a more abstract re-formulation of (6.25) (with the
exception that we replaced the singular force at the end by a surface traction for generality).

The structure in (6.33) 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

56
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

discussed later – the only difference is the exact form B and L). Let us therefore consider an
energy functional of the general form (6.33). Taking variations shows that
1
δI[u] = δB[u, u] − δL[u]
2 Z Z Z
1
= δ E(grad u)(grad u) dV − δ ρgu dV + δ t̂u dS
2 Ω Ω ∂ΩD (6.35)
Z Z Z
= E(grad u)(grad δu) dV − ρg δu dV + δ t̂ δu dS
Ω Ω ∂ΩD
= 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.36)
2

For example, in the hanging bar problem compare the energy functional (6.25) and the first
variation (6.27) to confirm the above relation.

For convenience, let us adopt the following notation found in various textbooks on finite el-
ements: since the first variation depeds on both u and δu, it is often abbreviated as an op-
erator 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.37)
ϵ→0 dϵ

Without proof, we just note that one of the beauties of the above variational problem (6.36)
(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 F). Recall that for the hang-
ing 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 bound-
ary conditions, have a unique solution and hence a unique minimizer of the potential energy
functional.

6.5 Rayleigh-Ritz Method

One way to exploit the above variational structure right away is the so-called Rayleigh-Ritz
approach, which introduces an approximation based on trial functions ϕa (x), i.e.,
n
X
uh (x) = ca ϕa (x), (6.38)
a=0

e.g., a polynomial series


n
X
uh (x) = ca xa (6.39)
a=0

with unknown coefficients ca ∈ R. Any choice of (linearly independent) ansatz functions is


permissible including, e.g., Fourier series of cosine or sine terms, as long as they satisfy any
existing essential boundary conditions and the differentiability/integrability requirements of

57
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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
c0 = 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 ca 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 ca , giving a system of equations as the stationarity
conditions:

∂I[uh ]
{c0 , . . . , cn } = arg min I[uh ] ⇒ 0= ∀ a = 0, . . . , n (6.40)
∂ca
Recall that we had expressed the energy functional in the general operator form (6.36), so that
" n n
# " n #
1 1 X X X
I[uh ] = B[uh , uh ] − L[uh ] = B ca ϕa (x), cb ϕb (x) − L ca ϕa (x)
2 2
a=0 b=0 a=0
n n n
(6.41)
1 XX a b a b
X
a a
= c c B[ϕ , ϕ ] − c L[ϕ ].
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 (6.39) we find
n n n
1 XX a b X
I[uh ] = c c B[xa , xb ] − ca L[xa ], (6.42)
2
a=0 b=0 a=0

The above leads to


n
∂I[uh ] X b
= c B[ϕa (x), ϕb (x)] − L[ϕa (x)] = 0 ∀ a = 0, . . . , n. (6.43)
∂ca
b=0

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

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


T
K ab = B[ϕa , ϕb ], F a = L[ϕa ] and c = c0 , . . . , cn . (6.45)
Notice that this is fully analogous to (5.20), the linear system of equations found for the least-
squares method of weighted residuals (only that we here do not need to choose a weight param-
eter ξ and that we instead exploit the energetic nature of the underlying variational problem,
which is more physical).

Example 6.4. Hanging bar by Rayleigh-Ritz

Let us demonstrate the Rayleigh-Ritz method, introduced above in a general form, for the spe-
cific problem of the freely hanging bar under gravity (no end force applied here for brevity). The
total energy functional with the polynomial approximate solution uh (x) from (6.39) becomes
Z L Z L n
h E h 2 X
I[u ] = u,x (x) A dx − ρ g uh (x) A dx with uh (x) = ca xa , (6.46)
0 2 0 a=1

58
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

where we used that c0 = 0 because of u(0) = 0. The above energy can be integrated to depend
only on the unknown cofficients ca , and that resulting energy must be minimized with respect
to the coefficients ca . Notice how we have transformed the infinite-dimensional problem to a
finite-dimensional one. As a consequence, minimization now is relatively simple: instead of
performing variations we can simply minimize I[uh ] with respect to the unknown variables ca :

∂I[uh ]
=0 for a = 1, . . . , n (6.47)
∂ca
As we know from (6.43), the resulting system of stationarity equations is Kc = F with
Z L
ab a b a b
K = B[ϕ , ϕ ] = B[x , x ] = E(xa ),x (xb ),x A dx
0
Z L Z L (6.48)
La+b−1
= Eaxa−1 bxb−1 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[ϕ ] = L[x ] = ρ g x A dx = ρgA xa dx = ρgA . (6.49)
0 0 a+1

Solving the linear system Kc = F for any n ≥ 2 (feel free to try this as an exercise at home)
yields
ρg ρg
c1 = L c2 = − , and ca = 0 for all a > 2, (6.50)
E 2E
which is in fact the exact solution, see Eq. (3.19):
ρg
u(x) = (2L − x)x. (6.51)
2E
This could have been expected since we chose polynomial ansatz functions in (6.39), 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.

————

59
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

7 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 sought approximate solution by enforcing the
strong form in some average sense (rather than at every grid point, as in finite differences).
We have also seen how this “average sense” can be defined in various ways, e.g., by enforcing
the governing PDE only at collocation points, on average over subdomains, or by minimizing
the total error made across the entire body. Finally, we have seen how most boundary value
problems can be linked to a variational structure, implying that the strong form is in fact the
stationarity condition of an energy minimization problem. This in turn allowed us to replace
the strong form by an optimization problem, which was exploited, e.g., by the Rayleigh-Ritz
approach. It is important to keep in mind that the variational approach gave us something even
more powerful: it gave us the stationarity conditions of the minimization problem, which we
will call the weak form. Those stationarity conditions, combined with an approximate function
space, where shown to guide us 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
ODEs/PDEs plus boundary conditions into linear systems of equations. Here, we would like to
explore the underlying structure further and, finally, come to the general mechanical boundary
value problem to be solved by methods such as the finite element technique.

7.1 Classical and weak 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 Ω
u = û on ∂ΩD (7.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 represent heat
sources, and t̂ stands for heat fluxes). Various other problems possess the same structure.

In order to describe the restrictions that u(x) must satisfy in order to qualify as a solution to
the above problem, 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). Hence, the
strong form (7.1) imposes the requirement

u ∈ C 2 (Ω). (7.2)

That is, we require the function to be twice continuously differentiable in order for the strong
form to make sense9 .
9
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 here and in the following.

60
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Example 7.1. C k -continuity

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

• 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) = (7.3)
1, if x > 0,

is said to be C −1 (R) since its “zeroth derivative” (i.e., the function itself) is not con-
tinuous.

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.

————

As we showed previously, the function u which solves the strong form (7.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], (7.4)
2
whose stationarity condition is

δI[u] = G[u, δu] = B[u, δu] − L[δu] = 0 for all δu ∈ U0 (Ω). (7.5)

Therefore, we can reformulate the problem (7.1) (without, in principle, knowing anything about
variational calculus) as:

find u ∈ U s.t. G[u, v] = B[u, v] − L[v] = 0 for all v ∈ U0 (Ω) (7.6)

Eq. (7.6) is referred to as Galerkin’s weak form, and the resulting solution u is called weak
solution. This terminology has the following origin. Notice that we no longer seek solutions
u ∈ C 2 (Ω), but instead we seek solutions u within

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

(7.7)

which satisfy (7.6) for all v ∈ U0 (Ω). There is one essential difference between the weak and
strong forms: solutions u of the weak form are required to be u ∈ H 1 (Ω), whereas the strong
form required solutions u to be u ∈ C 2 (Ω). The latter is a considerably stronger constraint.
Thus, we have weakened/relaxed the conditions on the family of solutions, which is why the
above is called the weak form.

To see this, consider, e.g., a functions u that is piecewise-linear (like a zig-zag curve), defined
by
X
u(x) = ai (x − xi )H(x − xi ) with ai , xi ∈ R, xi+1 > xi , (7.8)
i

61
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

which is by definition continuous (or compatible) at all xi , so u ∈ C 0 (R). The first derivative is
piecewise-constant:
du X
u′ (x) = (x) = ai H(x − xi ). (7.9)
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.) This piecewise-constant function u′ is square-integrable,
hence u satisfies u ∈ H 1 (Ω). By contrast, the second derivative,
du′ X
u′′ (x) = (x) = ai δ(x − xi ), (7.10)
dx
i

is a sum of delta functions, so u′′ 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, piecewise-linear functions qualify as approximate
solutions of the weak form but not of the strong form. Thus, we have relaxed the requirements
on our function when replacing the strong form by the weak form.

Recall that, if v is interpreted as a virtual displacement field, then (7.6) is equivalent to the
principle of virtual work and the form agrees with (5.45) (or (5.50) for the 1D bar problem).
This is important because, even if no variational basis exists, we could still formulate the weak
form by starting from the principle of virtual work. Note that there is a general recipe wo
check Whether or not a variational structure exists for a given strong form. This is known as
Vainberg’s theorem, which is summarized in Appendix G.

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).

7.2 Equivalence of principles

Notice that, if we do not want to solve the strong form (7.1) directly, we now have two equivalent
principles for finding the solution by exploiting the variational structure, as follows.

Given a function space


n o
U = u ∈ Hk (Ω) : u = û on ∂ΩD , (7.11)

a functional I : U → R and the associated bilinear form B(·, ·) and linear form L(·), both defined
on functions u ∈ U, we seek to

(A) find u ∈ U s.t. u = arg min I[u], I[u] = 21 B[u, u] − L[u] (7.12)

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

We know that the two 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, i.e.,
(A) ⇔ (B) (7.14)
with a unique solution for this particular type of problem (if it is stable).

62
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

7.3 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, (7.15)
in which we seek a solution uh , where h stands for the discretization size10 .

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 functions
n
X n
X
h a a h
u (x) = u N (x) and v (x) = v a N a (x). (7.16)
a=1 a=1

When we use the same approximation space for uh and v h , we make the so-called the Bubnov-
Galerkin approximation. Alternatively, one can choose different function spaces for the
approximations uh and v h , which leads to the so-called Petrov-Galerkin method. The latter
gains importance when solving over/underconstrained problems since it allows us to control the
number of equations by the choice of the dimension of the space of v h . Note that we should
choose the approximation space wisely, viz. such that the exact solution can be attained with
infinite refinement; i.e., we should ensure that
for all u ∈ U there exists uh (v) ∈ U h such that lim ∥uh (v) − u∥ = 0. (7.17)
h→0

With the approximations (7.16), we can now formulate the discrete problem

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

where we introduced U0h to indicate that v h must satisfy the same admissibility requirements
as our variations δu ∈ U0 (or as the virtual displacements u∗ ). This is nothing but a discretized
version of principle (B) from (7.13). If the approximate function space contains the exact
solution, i.e., if U ⊂ U h , then we may expect to find that solution from (7.18).

It is a relatively simple exercise to verify that the above form reduces again to a linear system
of equations to be solved. To this end, insert the approximations (7.16) into (7.18) to obtain
" n n
# " n #
X X X
a a b b b b
B u N , v N =L v N for all (admissible) v b . (7.19)
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
b a a b b
v u B N ,N − L N = 0 for all (admissible) v b . (7.20)
b=1 a=1

Since this must hold for all (admissible) v b , we conclude that


n
X h i h i
ua B N a , N b = L N b for b = 1, . . . , n. (7.21)
a=1
10
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 to add a superscript h to those quantities referring to numerical approximations
(of functions, function spaces, etc.).

63
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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

(7.22)

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 (7.23)

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. As discussed before, K is symmetric, positive-semi-definite.

The resulting linear system reads

K Uh = F ⇔ K ab ub = F a (7.24)

Comparing (7.23) to (6.43) 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 stationarity equation G[u, v] = 0
from I[u] exactly 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 will become important 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.

64
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

8 The mechanical variational problem at small strains

8.1 From the strong to the weak form

After all those precursors, let us analyze the mechanical variational problem and start with
the simplest problem in general dimensions: (quasi)statics in linearized kinematics. Here, the
strong form is static linear momentum balance along with Dirichlet and Neumann boundary
conditions:

σij,j + ρ bi = 0 in Ω,
ui = ûi on ∂ΩD , (8.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 , (8.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 (7.1), here extended to higher
dimensions.

In the following, let us first treat the general case – based on (8.1) – and then study linear
elasticity – governed by (8.2) – as a special case. The total potential energy functional associated
with (8.1) is
Z Z Z 
I[u] = W (ε) dV − ρb · u dV + t̂ · u dS (8.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 . (8.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 , (8.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 (8.3), defining sym(·) = 12 (· + ·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 (8.6)
= σij δui,j dV − ρbi δui dV − t̂i δui dS = 0 ∀ δu ∈ U0 ,
Ω Ω ∂ΩN

65
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

where we used σij = ∂W/∂εij and σij = σji (by angular momentum balance). This form is
indeed equivalent to the principle of virtual work (5.45), if we replace δui by u∗i .

Application of the divergence theorem to the first term in (8.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 . (8.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 (8.1).

We can use the first variation to define the weak form as

G(u, v) = A(u, v) − L(v) = 0 ∀ v ∈ U0 (8.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 (8.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 . (8.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]. (8.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
uh (x) = ua N a (x) and v h (x) = v a N a (x). (8.12)
a=1 a=1

Insertion into (8.8) yields (using index notation for convenience)


X n Z Z Z 
a h
 a a a
vi σij ∇u N,j dV − ρbi N dV − t̂i N dS = 0 for all adm. v a (8.13)
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 , (8.14)

where we introduced vectors Fint , Fext ∈ Rd·n with components


Z Z Z
a h a a a
Fint,i = σij (∇u )N,j dV and Fext,i = ρbi N dV + t̂i N a dS (8.15)
Ω Ω ∂ΩN

66
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Note that (8.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 (8.10) into (8.15) leads to
Z n Z
X n
X Z
a
Fint,i = Cijkl uhk,l N,ja dV = Cijkl ubk N,lb N,ja dV = ubk Cijkl N,ja N,lb dV
Ω b=1 Ω b=1 Ω
n Z (8.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. (8.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).

For computational purposes, we should revisit our notation here. 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 ] = . . . = 
 
. . . .
 (8.18)
u n  u n  F n  F n 
 1  1
 un  F n 
2 2
un3 F3n

Here, we used 1-index notation like in Matlab (i.e., we sum over a = 1, . . . , n and not a =
0, . . . , n − 1 as, e.g., in C/C++). Therefore, in d dimensions

uai is the (d · (a − 1) + i)th component of vector U h in d dimensions. (8.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. (8.20)

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 5.3 that this would
become important later?

8.2 Linear elasticity

In the simplified framework of linear elasticity (already introduced above), the governing equa-
tions are oftentimes written in a more condensed version that allows for a simple calculation of

67
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

the stiffness matrix K. We here start with the approximate displacement field and the resulting
strain tensor components, respectively:
n n
h
X
a a 1 h  1X
εhij h
 a a
ui N,j (x) + uaj N,ia (x) , (8.21)

u (x) = u N (x) ⇒ = ui,j + uj,i =
2 2
a=1 a=1

For conciseness, let us introduce so-called Voigt notation to condense the strain tensor into
a strain vector with only unique components. Since ε is symmetric, one usually stores only the
six independent components in a vector, which leads to the strain vector in Voigt notation:
 
ε11
 ε22 
 
 ε33 
2ε23  .
[ε̃] =   (8.22)
 
2ε13 
2ε12

The factor 2 in the shear strain components in Voigt notation (which is not found in the Voigt
notation of stresses) is required, so that the energy density is conveniently given by
1 1
W = σij εij = ε̃ · σ̃. (8.23)
2 2

Voigt notation has two main advantages: it reduces data storage (requiring only six instead of
nine components in 3D), and it works with vectors instead of matrices (so that the stiffness
tensor is no longer of fourth-order tensor but simply a matrix linking the stress and strain
vectors).

With this, let us express the strain components in 3D as


  1 
N,1 0 0 N,12 0 0 . . . N,1n 0 0

ε11
1 2 . . . 0 N,2n 0 
  0 N,2 0 0 N,2 0
 ε22   
0 N,31 0 N,32 0 N,3n 

  0 0 ... 0
 ε33    h
[ε̃] = 
2ε23  =  U , (8.24)
   0 N,31 N,21 0 N,32 N,22 n
. . . 0 N,3 N,2 n
2ε13   N,31 0 N,1 N,32
1 0 N,12 . . . N,3n 0 N,1n 

2ε12 N,21 N,11 0 N,22 N,12 0 . . . N,2n N,1n 0
| {z }
B

where we introduced the matrix B ∈ R3n×6 in 3D (and analogously B ∈ R2n·3 in 2D). This
allows us to write for short

ε̃(x) = B(x)U h (8.25)

Consequently, we may define the stress vector σ̃ in Voigt notation and the associated linear
elastic constitutive law as (again in in 3D)

σ̃ = (σ11 , σ22 , σ33 , σ23 , σ13 , σ12 )T ⇒ σ̃ = E ε̃ ⇒ σ̃ = EBU h (8.26)

where E denotes an elastic stiffness matrix whose components are deduced from C and follow
from the definitions of stresses and strains. For example, for an isotropic linear elastic material

68
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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ν
. (8.27)
(1 + ν)(1 − 2ν) 
 0 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:
 
1 ν 0
E 
[Eplane stress ] = ν 1 0 
1 − ν2 1−ν
0 0
2  (8.28)
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).

Altogether, we thus arrive at the stored internal energy


Z Z Z Z
1 1 1
I int = W dV = σ̃ · ε̃ dV = ε̃ · E ε̃ dV = U h · B T EB dV U h . (8.29)
Ω Ω 2 Ω 2 2
|Ω {z }
=K

In the last term we identified the stiffness matrix K because, if

1 ∂I int
I int = U h · K U h then it follows correctly that F int = = KU h , (8.30)
2 ∂U h
Therefore, the linear elastic stiffness matrix K can be computed as
Z
K= B T EB dV (8.31)

with B from (8.24), and E depending on the specific material model (see the examples for linear
elasticity given above). Note that B contains only basis/trial function derivatives, so that –
once a basis N a for a = 1, . . . , n has been chosen – B is known and can be computed.

69
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

9 Interpolation spaces

So far, we have assumed that the approximate solution uh (or uh in higher dimensions) is based
on a choice of basis/shape functions N a (x) with a = 1, . . . , n. Before discussing particular such
basis functions, it is important to consider what conditions those shape functions N a (x) must
satisfy. We have seen already that polynomial or Fourier series may lead to simpler integrals
when computing matrix K and right-hand-side vector F . Yet, this is only an observation and no
rigorous constraint on the basis functions. Let us here discuss the requirements of appropriate
interpolation spaces.

9.1 Shape functions

We consider approximations uh ∈ U h of the type


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

which are defined through a set of shape functions N a (x) for a = 1, . . . , n.

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

supp f = x ∈ Ω : f (x) ̸= 0 (9.2)
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.

Na
Na
... x

x
suppNa suppNa
local shape functions global shape functions

Irrespective of their global or local definitions, 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.
11
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.

70
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

(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 form
a practical perspective.
(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.3)
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
h
u (x) = ua N a (x) ∀ x ∈ Ω. (9.4)
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
h a a a a a a
u = u N + α N = u N = (ua + αa )N a a, (9.5)
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 7). For example, for mechanical problems we had
seen that the weak form requires uh ∈ H 1 (Ω).
(V) The shape functions must possess “sufficient approximation power”. In other words,
consider uh ∈ U h ⊂ U: we should ensure that uh = na=1 ua N a → u as n → ∞. This
P
important requirement ensures convergence and will be discussed below in Sections 9.2
and 9.3.

9.2 Approximation power and 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

71
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

example, assume you aim to approximate a high-order polynomial u ∈ Pn (with n ≫ 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 following theorem.

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]. (9.6)

This means every continuous function u can be approximated by a polynomial approximiation


uh ∈ Pn to within any level of accuracy. Therefore, {N i } = {1, x, x2 , x3 , . . .}, i.e., the polyno-
mials 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.7)

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 is also expected to
converge to the exact solution, if not a single term in the Fourier series is missing.

9.3 Completeness in higher dimensions

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
uh = cα xα . (9.8)
β=0 |α|=β

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

What does this mean in practice and in simple terms? Let us check the specific cases of 1D, 2D
and 3D.

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


q X
X q
X
h α1
u = cα1 x = cβ xβ . (9.9)
β=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.2.

72
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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

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.11)
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.12)
β=0 α1 +α2 +α3 =β

Analogous to the 2D case, this leads to the following complete bases:

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.13)
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 }
...

This completes our discussion of required shape function properties. They should (I) cover the
entire domain, (II) allow us to easily imposed Dirichlet boundary conditions, (III) be linearly
independent, (IV) be sufficiently square-integrable/differentiable, and (V) have sufficient ap-
proximation power (i.e., be complete and converge to the exact solution). This still does not
tell us how too choose shape functions {N 1 (x), . . . , N n (x)} – and this takes us directly to the
finite element method.

73
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 a , xN,x
b dx.
R

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)

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 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

74
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.

Let us check if FE shape functions satisfying (10.3) also satisfy the requirements for shape
functions introduced in Section 9.1:

(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.5)
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).
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) to 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.

75
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.6)
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.7)

Let p denote the highest derivative in the weak form. Differentiating the equation in (10.7)
yields

dp u dp uh
p
= + O(hq+1−p ). (10.8)
dx 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.9)

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.

76
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 by introducing our first finite element, which has such piecewise-linear interpolation.

11.1.1 2-node bar in 1D

The simplest example for our discussion of shape functions is the


2-node bar element in 1D. Since the element has only two nodes
(which we call nodes 1 and 2), we need two shape functions for the Ne1 Ne2
interpolation of the element dofs Ue = {u1e , u2e }, so that
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 Dx
defined on x ∈ [0, ∆x], as shown on the right.
Here and in the following, we add a subscript e to all quantities being specific to an element.
Here, 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 − c1 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 − ue + u . (11.3)
∆x ∆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.

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 8.

Differentiating the above linear shape functions yields

1 d  x  1 2 d x 1
Ne,x (x) = 1− =− , Ne,x (x) = = , (11.5)
dx ∆x ∆x dx ∆x ∆x

77
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.6)
∆x
i=1

The result in (11.6) 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.

If we assume a linear elastic bar, then the axial stress component σ = E ε allows us to calculate
the force onto node a, cf. (8.15), as
Z ∆x Z ∆x
u2 − u1e a
Z
EA 2
a
Fint,e = σxx (εhxx )N,x
a
dV = E e N,x A dx = (ue − u1e ) a
N,x dx. (11.7)
Ω 0 ∆x ∆x 0

Inserting the constant shape function derivatives from (11.5) yields


 
1 EA 2 1 EA 2
Fint,e = (ue − u1e ) − ∆x = − (u − u1e ) and 2
Fint 1
= −Fint . (11.8)
∆x ∆x ∆x e

Again, this is not surprising but intuitively correct: if the bar is strained by ε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.8) 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.

For completeness, let us also calculate the components of the element stiffness matrix Ke as
i
   
∂Fint EA 1 −1
[Ke ] = = (11.9)
∂uje ∆x −1 1

which has the typical form known from 1D assemblies of linear springs of effective stiffness
k = EA/∆x. We could alternatively have used our definition obtained from the linear elastic
mechanical weak form:
Z Z ∆x (
ab a b a b a b EA 1, if a = b
K = B[N , N ] dV = ENe,x Ne,x A dx = EA ∆xNe,x Ne,x = ,
Ωe 0 ∆x −1, else
(11.10)

where inserting the constant shape function derivatives again leads to (11.9).
1
Note that the two nodal forces Fint,e 2
and Fint,e depend linearly on the nodal displacements (as
can be expected from a linear elastic bar), so that
 1     1
Fint EA 1 −1 ue
[Fint,e ] = 2 = , (11.11)
Fint ∆x −1 1 u2e
which confirms

Fint,e = Ke Ue . (11.12)

Further, we verify that the stored strain energy stored in the bar is
Z ∆x  
E h 2 1 ∂Ie
Ie (Ue ) = εxx A dx = Ue · Ke Ue , so Fint,e = . (11.13)
0 2 2 ∂Ue

78
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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
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 4 nodes 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.14)

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 u in u (x) = na=1 ua N a (x) defines the function
a h

value uh (xa ) at the location of node a, while using a piecewise-linear interpolation in between.

uh(x)
u1
x
N1 u2
N2 u3
u4
u1 ž + u2 ž + u3 ž N3 + u4 ž 4
+ ... = .:
N

un

79
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

11.1.2 2-node bar in 2D and 3D

So far we have only considered axial (i.e., 1D) deformation of the bar element. 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 the bar element are in general


T T
Ue = u1e , u2e with uae = uae,1 , . . . , uae,d . (11.15)

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).
We obtain the (initial) orientation of the bar element in space
u2e,2 u~e
2
from its nodal coordinates in the reference configuration, Xe = 2 2
T (xe,1,x e,2)
u2e,1

x1e , x2e such that ∆xe = x2e − x1e . In 2D the angle with the


x1 -axis is obtained from geometry as ~1


ue,2 ue
1

! j Dxe
x2e,2 − x1e,2 1
(11.16) (xe,1,x e,2) ue,1
1 1
φe = arctan .
x2e,1 − x1e,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
u1e,2 
 1  
ũe cos φe sin φe 0 0
=   ⇔ Ũe = R(φe )Ue . (11.17)
ũ2e 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 , (11.18)

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 . (11.19)
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
(11.17) and (11.19) 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

80
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.9). Therefore, we must have
 
EA 1 −1
[K̃e ] = (11.20)
∆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 ) (11.21)

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 (11.20) and
(11.21) still apply but with the 3D rotation matrix
 
l m n 0 0 0
R= , (11.22)
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 11.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 individu- ƒ ‚
ally, accounting for two displacement dofs per node. By reusing the
stiffness matrix derived in (11.20) and (11.21), 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) =

(11.23)
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 (11.24)

√ 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 = √
  
 . (11.25)
4L  −1√ − 3 √1 3 
− 3 −3 3 3

81
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.

————

11.2 Problem assembly

In order to find the nodal displacements in above truss problem, we need to formulate the system
of equations to be solved. This requires an important step known as 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 need to differentiate between local and global dofs: e.g., beam
element 2 (on the right) 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 have analogously u1e = u1 and u2e = u3 , etc.

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

Let us continue Problem 11.1 using the above local-to-global map. Now that we have understood
how local nodes (1 and 2 for each beam 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

0 −1 0 0 0
 
1
0 0 0 0 0 0
 
[K1 ]global = −1
EA  0 1 0 0 0. (11.26)
0
L  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 = , (11.27)
0
4L  0 − 3 √3 3 −3 
√ 
0 0 √−1 3 √1 − 3
0 0 3 −3 − 3 3

82
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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


√ √ 
0 0 −1 −

√1 3 √ 3
 3
 3 0 0 − 3 −3  
EA  0 0 0 0 0 0 
[K3 ]global =  . (11.28)
 0
4L  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 the assembly (i.e., from the superpo-
sition) of the local matrices, i.e.,
 √ √ 
5
√ 3 −4 0 −1
√ − 3
 3
 3 0 √0 − 3 √ −3 
 −4
EA  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
(11.29)

In order to solve for the deformation of the truss from Problem 11.1, we may now use the
assembled stiffness matrix (11.29) but we must 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 bearing 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 forces applied to the truss)
hence reads
 
0
 ? 
 
 0 
 ? ,
[Fext ] =   (11.30)
 
 0 
−F

where we left question marks for the two unknown support reactions in the vertical direction of
the two sliders on the ground. The natural boundary conditions (here, the aplied 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 =  . (11.31)
4L  0 0 − 3 3 3 −3 u ?
 
√ √   2 
  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.

83
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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).

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 3  u1   0 
   
 2 = 
, (11.32)
4L  0 0 0 1 0 0  u2   0 

 0 3
u1 0 
√ 0 √0 0 1 0    
3 −F
− 3 −3 3 −3 0 6 u2

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    1  
5 −4 −√ 3 u1 0 u1 −1
EA  u21  = √F L  1  . (11.33)
−4
√ √5 3  u21  =  0  ⇒
4L
− 3 3 6 u3 −F u3 4 3EA −3√3
2 2

This system is well-posed, since it does not contain any rigid-body modes anymore. We see in the
solution that the truss deforms symmetrically (as expected) since u11 = −u21 , and the top node
moves downwards under the applied load, while the bottom nodes move outward. Note that we
can also compute the unknown nodal reactions from the ground by using Fext = Fint = KU ,
so
√ √ 
3 −4 −1 − 3
    
5 0 1 0
 0 1 0 0 0  0   F 
√ √0 

    2 
EA  −4 0 5 − 3 −1 3  FL  1   0 
 √
[Fext ] =    =  F  . (11.34)
 0
4L  0 0 1 0 0  4 3EA  0   2 
   
 0 0 √0 0 1 0   0   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 J contains a discussion
of structural assembly and stiffness matrix properties.

————

11.3 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.

84
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

11.3.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.35)
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.36)

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.37)

The solution to this problem is in fact intuitive:

(x − x1 ) · . . . · (x − xa−1 ) · (x − xa+1 ) · . . . · (x − xq+1 )


Nea (x) = (11.38)
(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, N e

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).

11.3.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.39)
∆x ∆x
Let us enrich the interpolation to reach q = 2 by defining

uhe (x) = Ne1 (x)u1e + Ne2 (x)u2e + N


e 3 (x)αe
e (11.40)

85
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

with a new, yet unknown shape function (with unknown coefficients ai )


e 3 (x) = a0 + a1 x + a2 x2 ,
N (11.41)
e

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.42)
e e

which leads to
ee3 (x) = c x 1 − x
 
N (11.43)
∆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.44)
∆x ∆x ∆x ∆x

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).

11.4 2-node beam element

A practical example of an element with higher-order interpolation are beam elements. Unlike
the 2-node bar element (which only captures stretching of the bar, see Section 11.1), a beam
element accounts for bending and can be superposed with the bar element to result in gen-
eral elements ready for stretching and bending. The linear elastic Euler-Bernoulli beam
is the most common structural element for this purpose, whose deformation is defined by the
deflection w(x). Let us first review the underlying governing equations.

Consider a continuous linear elastic beam of length L (constant Young’s modulus E and area
moment Iy ), loaded by a distributed 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) (11.45) 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
(11.46)
Fz2 = −EIy w,xxx (L), My2 = −EIy w,xx (L).

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), (11.47)
2
0 2
where the plus-signs in the terms involving bending moments result from Mya being against
the rotation direction of w,x . The first variation yields the weak form (which must hold for all
admissible v(x)):
Z L
G[w, v] = [EIy w,xx v,xx − qv] dx − Fz1 v(0) − Fz2 v(L) + My1 v,x (0) + My2 v,x (L) = 0. (11.48)
0

86
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

We hence conclude that we must have q ≥ 2 (at least quadratic shape functions), and

w ∈ U = w ∈ H 2 (0, L) : w = ŵ on ∂ΩD .

(11.49)

Following our definitions from Section 7, we identify from (11.48) the bilinear form
Z L
B[w, v] = EIy w,xx v,xx dx (11.50)
0

and the linear boundary operator


Z L
L[v] = qv dx + Fz1 v(0) + Fz2 v(L) − My1 v,x (0) − My2 v,x (L), (11.51)
0

such that12

∀ v ∈ U0h = v ∈ H 2 (0, L) : v = 0 on ∂ΩD .



G[w, v] = B[w, v] − L[v] = 0 (11.52)

As shown in Section 7.3, introducing an approximate solution


n
X
wh (x) = wa N a (x) (11.53)
a=1

transforms the continuous problem into a linear problem for the n unknown coefficients wa , and
the stiffness matrix associated with the linear problem has components
Z L
ab a b a b
K = B[N , N ] = EIy N,xx N,xx dx. (11.54)
0

To identify suitable shape functions N a (x), we must introduce a specific type of beam element.

As the simplest and most common example, let us turn to the specific case of the 2-node beam
element, which looks like the 2-node bar element but deforms in bending instead of in axial
stretching. We know from the weak form that q ≥ 2, so the simplest admissible interpolation
for the unknown deflection w(x) is based on {1, x, x2 } 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 ]. (11.55)

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 only deflections but
also deflection angles will be continuous across elements (so the beam does not suffer from any
kinks).

Le
x
1
w
e
w2 e

1 2 q2
q
1 e
e

12
The boundary conditions in the definition of U0h are actually not quite correct, as we will discuss in Sec-
tion 11.5.

87
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 . (11.56)

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 ] (11.57)
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 (11.57) into the four conditions (11.5), we obtain four equations 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 3
x 2
    3

x x x
Ne1 (x) =1−3 +2 , Ne2 (x)=3 −2 ,
Le Le Le Le
(11.58)
x 2 x2 x
   
Me1 (x) =x 1− , Me2 (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
(11.57). 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
Me2/Dxe
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 .
T
Let us sort the nodal dofs as Ũe = w̃e1 , θe1 , w̃e2 , θe2 . Using (11.54) with Ne1 , Me1 , Ne2 and Me2

88
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

(in that order to comply with the nodal dof sorting), we obtain from integrating (11.54)
 
6 3Le −6 3Le
2EIy  2 L2e 
[K̃e ] = 3Le 2Le −3Le , (11.59)
3
Le  −6 −3Le 6 −3Le 
3Le L2e −3Le 2L2e

and the nodal reactions (including transverse forces Fza and bending moments Mya conjugate to
the deflections wea and deflection angles θea , respectively) are
 T
1 1 2 2
F̃int,e = K̃e Ũe with F̃int,e = F̃int,e , Mint,e , F̃int,e , Mint,e . (11.60)

Here, forces and moments have the same directions as the conjugate deflections and rotation
angles. In summary, the nodal dofs and the nodal reactions are related linearly via
 
1
F̃int,e
   1
6 3Le −6 3Le w̃e
M 1  2EI 
 int,e  y 3Le 2L2e −3Le L2e   θe1 
 2 =  . (11.61)
 F̃int,e  L3e  −6 −3Le 6 −3Le  w̃e2 
2
Mint,e 3Le L2e −3Le 2L2e θe2

Next, let us generalize the beam element discussed above by considering a beam in 2D, which
T
is still 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. Since the above beam formulation only
considers 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,
yielding

1 0 0 −1 0 0
   
0 0 0 0 0 0
0 6 3L e 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 (11.62)

[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

89
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

and rotation angles for consistency), as defined in (11.16):


 1 
ũ1e ue,1
  
cos φe sin φe 0
w̃e1  − sin φe cos φe 0  u1e,2 
 1   1 
θ   0 0 1  θ 
 =
 2 , (11.63)
 
 ũ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 )] = 
  (11.64)
 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
stiffness matrix of the generally oriented 2-node beam element is 2
u u~2
thus obtained as w~2
e,2
e e

2
Ke = RT (φe )K̃e R(φe ) (11.65) u e,1
L q
2
w~
1
1
e u u~
e,2
1
e
e

with R(φe ) and K̃e from (11.64) and (11.62), respectively. Of j

q
1 1
course, the same can also be extended to beams in 3D, where an e u e,1
appropriate transformation matrix R based on direction cosines is
introduced.
Let us summarize the key difference between bar and beam 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 of the above type can support both axial and
bending deformation, and beam networks are rigidly connected (or welded) at nodes, so that
angles between beams at nodal junctions remain constant. The differences of both types of bar
and beam networks (often referred to as truss and frame, respectively) are illustrated below.

F F

network of bars network of beams


(truss) (frame)

90
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

11.5 A note on beam elements and boundary conditions

For 2-node beam elements of the above type, both deflections and nodal rotations are degrees of
freedom and can therefore be restraint via essential boundary conditions. It is therefore helpful
to review our concept of Dirichlet boundary conditions for beams. We do so by considering
the variational problem and seeking a general way to identify both types of boundary conditions
from the variational structure of the problem.

The potential energy functional for the variational problem of an Euler-Bernoulli beam with
the deflection field w(x) was given by
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), (11.66)
2
0 2

so that the first variation reads (dropping the dependence on x in the integral for brevity)
Z L
δI = [EIy w,xx δw,xx − q δw] dx − Fz1 δw(0) − Fz2 δw(L) + My1 δw,x (0) + My2 δw,x (L). (11.67)
0

In order to recover the strong form (whose PDE is EIy w,xxxx − q = 0), we integrate the first
term 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 (11.68)
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 (11.69)
− 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
(11.70)
− 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 .

We know that δI must vanish for arbitrary (admissible) variations δw. This imples that, first,

EIy w,xxxx − q = 0 for 0 < x < L. (11.71)

Therefore, we recover the exact governing equation (11.46) of the strong form. Furthermore, the
remaining four terms in (11.70) 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, (11.72)

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


 
(11.73)

91
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

means 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 BC). Therefore, the above form of the first
variation (in which the integral term matches the PDE of the strong form) reveals all possible
boundary conditions, both natural and essential (i.e., Neumann and Dirichlet, respectively).

We thus need to revise our definition of a Dirichlet boundary condition: not every
imposed derivative of the primary field u necessarily 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 or the matching order of u and v in the weak form. For example, for a
beam, the PDE is of fourth-order, the matching-order weak form contains second derivatives.
Therefore, essential BCs for a beam include both imposed deflections w and imposed rotations,
i.e., first derivatives of nodal deflections θ = w,x .

This is the reason we warned that the definition of U0h in (11.52) was incorrect. In light of the
above discussion, solutions w(x) of a beam bending problem should be in the space
n o
w ∈ U = w ∈ H 2 (0, L) : w = ŵ on ∂ΩD1 ∧ w,x = θ̂ on ∂ΩD2 , (11.74)

and variations accordingly follow as

δw = U0 = v ∈ H 2 (0, L) : v = 0 on ∂ΩD1 ∧ v,x = 0 on ∂ΩD2 ,



(11.75)

where ∂ΩD1 and ∂ΩD2 are those (possibly overlapping) parts of the boundary on which, respec-
tively, deflections ŵ and rotations θ̂ are being imposed.

92
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

12 Shape functions in higher dimensions

12.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 (ξ, η, ζ). (12.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
displacement field, viz.
n
X
so far we used: uhe = Nei (x)uie
i=1
n m (12.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

93
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 (12.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).

12.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 . (12.3)
a=1

94
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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
uh (ξ, η) = Nea (ξ, η)uae . (12.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. (12.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 (12.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
= = = [J ] (12.5)
uh,η uh,x1 x1,η + uh,x2 x2,η x1,η x2,η uh,x2 uh,x2
| {z }
=[J]

with the Jacobian13 matrix


 
x1,ξ x2,ξ
[J ] = (12.6)
x1,η x2,η

and its determinant


∂x1 ∂x2 ∂x1 ∂x2
J = det J = − . (12.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).

Relation (12.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 (12.4) implies
n
X n
X
uh (ξ, η),ξ = a
Ne,ξ (ξ, η)uae , uh (ξ, η),η = a
Ne,η (ξ, η)uae . (12.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,η

13
The Jacobian in mathematics is usually defined as the transpose of J defined in (12.6). In the FE context,
our definition is chosen for convenience, so that we do not need a transpose in (12.12).

95
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

By substituting the isoparametric mapping (12.3) for x1 and x2 into (12.6), we obtain the
Jacobian of the element as14
 n n

X X
a a a a
N x N x 
 a=1 e,ξ 1,e i=1 e,ξ 2,e 
  
x1,ξ x2,ξ
[Je ] = = n n
, Je = det Je (12.9)
x1,η x2,η X
a a
X
a a 

 N x N x
e,η 1,e e,η 2,e
a=1 i=1

Note that all ingredients in (12.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 (12.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 (12.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 (12.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 a  1
 h   Ne,x1 ue   1 ue
n

u,x1 −1 Ne,x1 · · · Ne,x1  .. 
 
= X a=1
n  = [Je ]  . . (12.11)
 
uh,x2 a a 
1
Ne,x2
n
· · · Ne,x 2
 Ne,x2 ue uen

a=1

But, of course, both (12.10) and (12.11) are valid representations. Therefore, we may equate
these two relations. By comparing the coefficients of uae in (12.10) and (12.11) (e.g., choosing
one non-zero uae and all others zero), we realize that
 a   a 
Ne,x1 −1 Ne,ξ
a = [Je ] a or more generally: ∇x Nea = Je−1 ∇ξ Nea (12.12)
Ne,x2
Ne,η

where for brevity we summarized the reference coordinates into ξ = (ξ, η)T and ∇ξ (·) = (·,ξ , ·,η ),
while ∇x = (·,x1 , ·,x2 ). Relation (12.12) is generally applicable for any isoparametric mapping
and will be valuable in the following sections, when we introduce particular finite element types.

14
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.

96
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

13 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), (13.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 12) to introduce general shape functions whose definition does not depend on the
element geometry. For simplices, one commonly introduces so-called barycentric coordinates.

13.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 − ξ − η (13.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.

97
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

To this end, we may define so-called barycentric coordinates

Aa (x)
3
lea (x) = e for a = 1, 2, 3 (13.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 (13.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 (13.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 − ξ − η. (13.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 (13.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 = . (13.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 , (13.8)
a=1

where xae are the positions of the three undeformed nodes in (real-space) mesh.

98
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

As introduced in Section 12.2, we may invoke the inverse function theorem to compute deriva-
tives. Based on the shape function derivatives in (13.7), the Jacobian matrix (12.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
(13.9)
and
Je = det Je = (x11,e − x31,e )(x22,e − x32,e ) − (x21,e − x31,e )(x12,e − x32,e ) = 2Ae = const., (13.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 (12.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 (13.11)
Ne,x2 Ne,ξ 2Ae x1,e − x1,e x1,e − x1,e Ne,ξ

As we had seen in (13.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η. (13.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. (13.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 (13.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 13.4), the following relation is
helpful for evaluating integrals over the triangular element:
Z Z 1 Z 1−η
α β α! β!
ξ η dA = ξ α η β 2Ae dξ dη = 2Ae . (13.15)
Ωe 0 0 (α + β + 2)!

99
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

13.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 − ξ − η − ζ. (13.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 4
element into four tetrahedra based on the location of point x,
analogous to the above procedure in 2D). Like in 2D, the resulting
interpolated strains are constant in the linear tetrahedron, and
relations (13.9) and (13.11) hold analogously (here extended to
3
n = 4 nodes and using the above shape functions). Further, we
have dV = 6Ve dξ dη dζ. 1
The following relation is analogous to (13.15):
Z
α! β! γ!
2
ξ α η β ζ γ dA = 6Ve . (13.17)
Ωe (α + β + γ + 2)!

13.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 . (13.18)

We further note that, since strains are constant within elements, so are the resulting stresses:

εhij = const. ⇒ σij = σij (εh ) = const. (13.19)

The key integrals to be evaluated (e.g., in 2D with an element out-of-plane thickness t), following
Section 8, now become the nodal forces
Z Z X Je t
a
Fint,e,i = a
σij Ne,xj dV = a
σij Ne,x j
t dA = σij [Je−1 ∇ξ Nea ]j , (13.20)
Ωe Ωe 2
r={ξ,η}

where the classical summation convention (here over j) is implied and not written out for
conciseness. Note that if we pre-compute and store the following constant quantities for each
element e (which only depend on the undeformed element geometry and not on its degrees of
freedom), viz.
Je t
we = = const. and a
Ne,x j
= [Je−1 ∇ξ Nea ]j = const., (13.21)
2
then the calculation of the nodal force vectors reduces to
a
Fint,e,i = σij (εh )Ne,x
a
j
we , (13.22)

100
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

where only the stresses must be recomputed each time for given strains εh from (13.14) (which
do depend on the nodal dofs).

Similarly, we may compute the element energy as


Z Z
Ie = W (εh ) dV = W (εh ) t dA = W (εh )we . (13.23)
Ωe Ωe

The analogous definition of a B-matrix, as introduced in Section 8.2, can be applied here as
follows, leading to a somewhat simpler (yet not necessarily computational beneficial) implemen-
tation. Let us consider the CST (triangular) element in 2D. For this element, the 2D strain
components in Voigt notation, using (13.9), are computed as
Pe
uh1,1 uae,1 Ne,x
a
 h     
ε11 Pe a=1 1
[ε̃h ] =  εh22  =  uh2,2  =  a a
a=1 ue,2 Ne,x2

h h h
Pe  a a a a

2ε12 u1,2 + u2,1 a=1 ue,1 Ne,x2 + ue,2 Ne,x1
xij i j
 23
0 ye31 0 ye12 0

ye e = xe,1 − xe,1 , (13.24)
1  32 13 21 ij i j
= 0 xe 0 xe 0 xe  Ue with ye = xe,2 − xe,2 ,
2Ae
x32
e y 23 x13 y 31 x21 y 12
e e e e e 2A 21 31 31 21
e = xe ye − xe ye ,
| {z }
=[Be ]

so that for the CST element in 2D we identify

ye23 0 ye31 0 ye12 0 xij i j


 
e = xe,1 − xe,1
1 
[Be ] = 0 x32
e 0 x13
e 0 x21
e
 with yeij = xie,2 − xje,2 (13.25)
2Ae 32 23 13 31 21 12 21 31 31 21
x e ye x e ye x e ye 2Ae = xe ye − xe ye

T
Note that we exploited Je = const., and we defined Ue = u1e,1 , u1e,2 , u2e,1 , u2e,2 , u3e,1 , u3e,2 . Fur-
thermore, 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.

13.3.1 Special case linear elasticity

For the special case of linear elasticity, we may write

ε̃h = Be Ue ⇒ σ̃ = E ε̃h = EBe Ue (13.26)

and the same relations apply as in Section 8.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 , (13.27)
Ω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 (13.25), and E was defined for isotropic elasticity in (8.28) 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.

101
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

13.3.2 General case of nonlinear elastic materials

For the more general case of a material wit 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̃(ε̃), (13.28)
∂ ε̃ ∂ ε̃
so that
Z
Ie = W (ε̃h ) dV (13.29)
Ωe

and the internal force vector follows as


∂Ieint
Z
Fint,e = = BeT σ̃ dV = BeT σ̃(ε̃h )tAe , (13.30)
∂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 (13.31)
∂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.

13.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),
(13.32)
Ne4 (ξ, η) = 4ξη, Ne5 (ξ, η) = 4ηθ, Ne6 (ξ, η) = 4ξθ with θ = 1 − ξ − η.

102
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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
constant 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.

103
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

14 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 positioned15 at ξ = ±1 (as shown
above), whose shape functions are
1 1
N̄e1 (ξ) = (1 − ξ), N̄e2 (ξ) = (1 + ξ). (14.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 (14.2)
1
Ne3 (ξ, η) = N̄e2 (ξ)N̄e2 (η) = (1 + ξ)(1 + η),
4
4 1 2 1
Ne (ξ, η) = N̄e (ξ)N̄e (η) = (1 − ξ)(1 + η).
4
15
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.

104
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

P4
One can easily verify that Nea (ξb , ηb ) = δab and a
a=1 Ne (ξ, η) = 1 for all ξ = (ξ, η) in (14.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 . (14.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 ξ, (14.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.2). This means we must be able to exactly
represent linear solutions of the type
uh (x1 , x2 ) = c0 + c1 x1 + c2 x2 . (14.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
(14.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 (14.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 12.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 . (14.7)
Ne,x2
Ne,η

105
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 14.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) = . (14.8)
∆xe ∆xe
For a reference bar element with nodes at ξ = ±1, the analogous shape functions in 1D read
1−ξ 1+ξ
Ne1 (ξ) = , Ne2 (ξ) = . (14.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 = = . (14.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
= , (14.11)
∆xe e,ξ 2 2
so that we obtain correctly (as verified by differentiating (14.8))
1 1 2 1 2 1 2 1
Ne,x =− =− , Ne,x = = . (14.12)
2 ∆xe ∆xe 2 ∆xe ∆xe
Of course, here we could have obtained the derivatives directly from (14.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 (14.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 ] = . (14.14)
Γ21 Γ22

106
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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   . (14.15)
h
 uh2,x1 
2ε12 0 1 1 0
uh2,x2

We further exploit the inverse function theorem by using relation (14.7), which here leads to
 h    h 
u1,x1 Γ11 Γ12 0 0 u1,ξ
h
u1,x  Γ21 Γ22 0  h 
 2
=   u1,η  .
0 
(14.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 (14.7) is applied indepen-
dently to each of the two components, which results in the block matrix in (14.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 (14.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 (14.15), (14.16), and (14.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,η

(14.18)

with Γij from (14.14) and the shape function derivatives computed from (14.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 (14.19)
∂ξ ∂η ∂ξ ∂η
so that

dA = | dA| = J dξ dη (14.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, (14.21)
Ωe

107
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

the internal force vector


∂I int
Z
Fint,e = e = BeT σ̃ t dA, (14.22)
∂Ue Ωe

and the incremental stiffness matrix


∂Feint
Z
Te = = BeT C̃Be t dA. (14.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 , (14.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). Except for undistorted linear
elastic elements, this is unfortunately hardly possible analytically. This will be addressed in
Section 16. Until then, let us quickly introduce higher-order and higher-dimensional elements
based on the Q4.

108
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

15 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 (15.1)
(1 − ξ)(1 + ξ)η(1 − η) ξ(1 + ξ)(1 − η)(1 + η)
Ne5 (ξ, η) = − , Ne6 (ξ, η) = ,
2 2
(1 − ξ)(1 + ξ)η(1 + η) ξ(1 − ξ)(1 − η)(1 + η)
Ne7 (ξ, η) = , Ne8 (ξ, η) = − .
2 2
The resulting interpolation uses the basis (i.e., the above shape functions include these mono-
mials)

{1, ξ, η, ξη, ξ 2 , η 2 , ξ 2 η, ξη 2 , ξ 2 η 2 }, (15.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 examples if 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,
shape functions are constructed in a different way than defined by (15.1). One starts by defining

109
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 (15.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 (15.1). We
now conclude the remaining four shape functions (serendipitously, i.e., as an unplanned lucky
occurrence) as combinations of (15.3) and the bi-linear shape functions of the Q4 element,
(14.2). This leads to
(1 − ξ)(1 − η) 1 (1 + ξ)(1 − η) 1
Ne1 (ξ, η) = − (N5 + N8 ), Ne2 (ξ, η) = − (N5 + N6 ),
4 2 4 2 (15.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 13.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 elementbrick element. Here, the 3D reference
configuration is described by coordinates (ξ, η, ζ), and the shape functions are a direct extension
of (14.2), now written in 3D, which gives
1 1
Ne1 (ξ, η, ζ) = (1 − ξ)(1 − η)(1 − ζ), Ne2 (ξ, η, ζ) = (1 + ξ)(1 − η)(1 − ζ),
8 8 (15.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 (15.6)
and volume integrals make use of
dV = J dξ dη dζ. (15.7)

110
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

16 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, (16.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, (16.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ξ = , (16.3)
b−a b−a
so that (16.2) is turned into
Z 1
b−a 
I[u] = f (ξ) dξ where f (ξ) = u x(ξ) (16.4)
−1 2
with
ξ+1
x= (b − a) + a. (16.5)
2
Instead of considering general integrals of the type (16.2), we concentrate on integrals of the
type (16.4) (and we have seen that we can transform one into the other, so any rules derived
for (16.4) can also be applied to integrals of the general type (16.2)). Our objective is now to
approximate the integral (16.4) numerically in an accurate albeit efficient manner.

16.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. (16.6)

The Riemann sum is probably the simplest approach to computing the integral in (16.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 . (16.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 ].

111
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 for-
mulae are indeed viable schemes to carry out numerical integration, they are rather 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

16.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[u] = f (ξ) dξ ≈ Wi f (ξi ). (16.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 all 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., (16.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 monimials 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.

112
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

16.2.1 Gauss-Legendre quadrature

Gauss-Legendre quadrature selects the nodes and weights such that the first 2nQP moments
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. (16.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 the any constant function, f (ξ) = ξ 0 , and any linear function, f (ξ) = ξ 1 ,
must be integrated exactly. This implies that
Z 1 Z 1
! !
ξ 0 dξ = 2 = W0 ξ00 = W0 and ξ 1 dξ = 0 = W0 ξ01 = W0 ξ0 (16.11)
−1 −1

From these two equations, the first-order quadrature rule fol-


lows with
f(x0)
ξ0 = 0, W0 = 2 (16.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 (16.13)
2 2 ! 2 2 3 ! 3 3
ξ dξ = = W0 ξ0 + W1 ξ1 , ξ dξ = 0 = W0 ξ0 + W1 ξ1 .
−1 3 −1

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. (16.14) x
3 3 -1 x0 x1 +1

Since this quadrature rule integrates cubic polynomials exactly,


it is exact to order q = 3.

113
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

• 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 H.

16.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 (approxiately) 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 ). (16.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 ). (16.16)
−1 nQP (nQP − 1)
i=2

16.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
(16.17)
nQP −1
X
= Wk∗ f (ξk )
k=0

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 (16.18)

Bi-linear functions (at most linear in ξ and η) are integrated exactly with this rule.

114
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

• 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 (16.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 (16.20)

• third-order quadrature (q = 3), now has eight quadrature points (nQP = 23 = 8):
 
1 1 1
(ξi , ηi , ζi ) = ±√ , ±√ , ±√ and Wi = 1. (16.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

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 I 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.

115
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

17 FEM: which quadrature rule to use?

The quadrature rules we introduced in Section 16 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?

17.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
W (εh ) dV = W εh (ξ) Je (ξ)te dξ dη ≈ Wk W εh (ξk ) Je (ξk )te ,
 
Ie =
Ωe −1 −1 k=0

while the nodal force vectors are


Z Z 1 Z 1
a h a
σij εh (ξ) Ne,x
 a
Fint,e,i = σij (ε )Ne,xj dV = j
(ξ)Je (ξ)te dξ dη
Ωe −1 −1
nQP −1 (17.1)
X
h
 a
≈ Wk σij ε (ξk ) Ne,x j
(ξk )Je (ξk )te .
k=0

Further, we compute the element tangent matrix as


Z
ab
Cijkl εh (ξk ) N,x
 a b
(Te )ik = j
N,xl dV
Ωe
Z 1 Z 1
Cijkl εh (ξk ) Ne,x
 a b
= j
(ξ)Ne,x l
(ξ)Je (ξ)te dξ dη (17.2)
−1 −1
nQP −1
X
Wk Cijkl εh (ξk ) Ne,x
 a b
≈ j
(ξk )Ne,x l
(ξk )Je (ξk )te
k=0

Recall that, in those relations, the shape function derivatives and the strains are computed as,
respectively,
1X a a
∇x Nea = Je−1 ∇ξ Nea , εhij (ξ) = ue,i Ne,j (ξ) + uae,j Ne,i
a

and (ξ) . (17.3)
2 a

Of course, the above can also be reformulated in terms of the B-matrix. For example, for a
linear elastic element in 2D we have seen that
Z nQP −1
X
T
Te = Ke = Be (ξ) EBe (ξ) dV ≈ Wk BeT (ξk )EBe (ξk )Je (ξk )te , (17.4)
Ωe k=0

where we assumed that E = const. across the element (otherwise, E also depends on position ξ).

17.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

116
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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
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 as the quadrature order needed to integrate an undis-
torted, homogeneous, linear elastic element exactly. An element is undistorted, if element
angles are preserved between reference and real space or, in other words, if J = const. across
the element.

Example 17.1. Full integration for various element types

Let us determine 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 side lengths a and b), so that

ab
J= = const. (17.5)
4
Then, for a linear elastic Q4 element we have
Z 1 Z 1 Z 1 Z 1
a ab abte
Finte,,i = a
Cijkl εhkl (ξ)N,x j
(ξ) te dξ dη = Cijkl a
εhkl (ξ)N,x j
(ξ) dξ dη,
−1 −1 4 4 −1 −1
(17.6)

where εh = sym(∇x uh ) is at most linear per direction (since the interpolation of uh is


bilinear), ∇x N a is also at most linear for the same reason. Overall, the integrand is at
most a quadratic polynomial, so that we need integration order q ≥ 2. Recall that in 1D
we showed that q = 2nQP − 1, 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: strains and shape functions are at most
quadratic per direction).

• Full integration of the 8-node brick element requires nQP = 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). (17.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.

117
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

————

Note that not only does full integration guarantee that the internal force vector of an undis-
torted, elastic element is integrated exactly. By reviewing the element energy and the element
tangent matrix, we make the same observation (i.e., those are integrated exactly as well). For
example, the energy of a linear elastic Q4 element in 2D reads
Z Z 1Z 1
abte 1
Ie = W dV = Cijkl εhij (ξ)εhkl (ξ) dξ dη, (17.8)
Ωe 4 2 −1 −1

where both N,ja (ξ) and N,lb (ξ) are linear in ξ, so that the resulting integrand is a quadratic
polynomial for the Q4 element, in analogy to the above discussion of the nodal forces, cf. (17.6).
Similarly the tangent/stiffness matrix of the linear elastic element,
Z 1 Z 1
abte
(Te )ab
ij = Cijkl a
Ne,xj
b
(ξ)Ne,x (ξ) dξ dη, (17.9)
4 −1 −1
l

follows the same argument. Hence, full integration implies that the element energy, nodal forces,
and tangent stiffness matrix are integrated exactly for a linear elastic, undistorted 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 εh , ∇x Nea order εh · ∇x Nea 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 18.

118
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

18 Element defects: shear 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, (18.1)
b/2
where σmax is the maximum tensile stress reached on the top and bottom surfaces of the beam
(at x2 = ±b/2). From Hooke’s law in 1D we obtain the strains
σ11 x2 σmax σ11 x2 σmax
ε11 = − =− , ε22 = −ν =ν , ε12 = 0. (18.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 (8.15), which we found for the
externally applied forces, the force on node 1 becomes (with σ11 from (18.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 (18.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. (18.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 3 h 4 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

119
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 = . (18.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 , (18.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 (18.6) into the approximate
element strains, which yields
U U
εh11 = − η, εh22 = 0, εh12 = − ξ. (18.7)
a b
These are to be compared to (18.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. (18.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

120
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

from the above construction), one finds


θapprox 1 − ν2
= !2 . (18.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 locking or,
more specifically, 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 ). (18.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 (18.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 (18.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 (18.7) is a numerical artifact
and often referred to as hourglass mode or chicken-wire mode because of its appearance.

Note that note 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.

121
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

19 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. Recall that shape
functions associated with a node a are non-zero only in elements adjacent to node a in the FE
context. When computing, e.g., the total energy E of a body (not accounting for external work)
discretized into ne non-overlapping elements, we may exploit that
Z ne Z
X ne
X
h
E= W (ε ) dV = W (εh ) dV = Ie , (19.1)
Ω e=1 Ωe e=1
i.e., the total energy is the sum over all element energies. When computing the global force
vectors and incremental stiffness matrices, the situation is more complex, which is why one
commonly introduces an assembly operator A such that
ne ne
Fint = A Fint,e , T = A Te , (19.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 ). (19.3)
e e

For practical purposes, it is helpful to recall that entry Uia (where a = 1, . . . , n is the node
number, and i = 1, . . . , d refers to the coordinate) is located at position (a − 1) · d + i in the
assembled global vector U h (using MATLAB® notation with 1-indexed lists). For example,
consider a 2D problem using 2-node bar elements. If an element connecting nodes 1 and 3
computes the nodal force vectors Fint,e 1 3 , then those are to be added onto the global
and Fint,e
force vector as
 1

. . . + Fint,e,1
. . . + F 1 
 int,e,2 

 · 

·
 
Fint =  (19.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 = · · · · · · · ·
 (19.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
· · · · · · · ·
Note that, because nodes have non-zero FE shape functions only in adjacent elements, the above
matrix is generally sparse (which comes with significant computational advantages).

122
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

20 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 21.4). 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 (20.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 (20.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.

20.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 (20.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 ) (20.4)
∂U
is the tangent matrix. By assuming that the latter is invertible, we arrive at

∆Un = − [T (Un )]−1 f (Un ) (20.5)

123
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Note that we have thus broken the nonlinear problem (20.1) (which is hard to solve) into many
incremental linear problems (20.4) (which are easy to solve).

For the mechanical problem in linearized kinematics, the tangent matrix components are

∂Fia
Z 
ab h ∂ a a
Tik (Un ) = (Un ) = σij N,xj dV − Fext,i
∂ubk ∂ubk Ω
Z a
∂Fext,i
∂σij b a
= h
N,xl N,xj dV − (20.6)
Ω ∂εkl ∂ubk
Z a
∂Fext,i
a b
= Cijkl N,xj N,xl dV − ,
Ω ∂ubk

where Cijkl are the components of the elastic stiffness tensor (and in the above steps we exploited
its symmetry, knowing that Cijkl = Cjikl = Cjilk = Cklij ).

Recall that C = C(ε) in general, i.e., for nonlinear problems the incremental tangent depends
on the current state of deformation and hence on the nodal displacements U . Only for the
special case of linear elasticity is C a constant tensor containing the elastic moduli and being
independent of deformation. As shown before, we can also write for each element e
Z
Te (U ) = BeT CBe dV, (20.7)
Ωe

where C is, again, the incremental stiffness matrix of the Rmaterial model. In the special case of
linear elasticity, we saw that 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 21.4 (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 ]
(20.8)
= 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
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 problems involving mechanical instability.
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.

124
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

20.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) (20.9)

The damping parameter α can be chosen constant or adjusted based on convergence.

20.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 ). (20.10)
∆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.

20.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 , (20.11)

where, unlike in Section 20.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. (20.12)

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 (20.12) is in fact the stationarity condition of the minimization problem

β = arg inf ∥f (Un + β ∆Un )∥2 , (20.13)

which is the motivation for the nonlinear least-squares method described below.

125
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

20.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 (20.14)


U

which results in the stationarity condition


∂r
(U ) = 0. (20.15)
∂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 5.3). 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 (20.16)
∂T T

T ∂f T
= − T (Un ) (Un )f (Un ) + (Un )f (Un ) 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 ). (20.17)

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).

20.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 ) (20.18)

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 , (20.19)

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 ). (20.20)
c

126
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

20.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 (20.21)

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 (20.22)

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 ) . (20.23)

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).

127
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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. In Section 20, we discussed solution strategies for the above
system of equations, 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 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 trivial. However, in reality we often deal with distributed
(and possibly deformation-dependent) loads, which need to be converted into appropriate nodal
forces first.

In Section 8, 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

128
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 19.)

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)

129
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 ) = E(U ) − Wext (U ) → min (21.7)


U

with

E(U ) = Ane=1
e
Ie (Ue ), W (U ) = Ane=1
e
Wext,e (Ue ), (21.8)

such that
∂I ∂E ∂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 using iterative solvers (as discussed in Section 20), those may require the tangent matrix,
which here implies 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
Wext = P · u . b
(21.11) ub
Therefore, the resulting external force vector on any node a is

a ∂Wext
Fext = = P δab , (21.12)
∂ua
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

130
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 = =− = −k(ua · n)n, (21.16)
∂ua ∂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
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.

131
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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
Wext,e = t̂ · uh dS = (−p)n · uae Nea dS = −p uae · 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 a pn pLe t
Fext = −p nNe 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
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.

————

132
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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).

————

133
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 following16 . We will first focus on linear elastic examples and later reconsider
the procedure for nonlinear systems, when discussing iterative solvers in Section 21.3.

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
 · · · · ·   u2   Fext 2 
  3   3 
 0 0 1 0 0    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 11.2).

To understand this, let us re-formulate (21.26) by moving the third column to the right-hand
side and inserting u3 = û3 :
  1   1   
K11 K12 0 K14 · u Fext K13
 · · 0 · ·   2   2   K23 
   u3   Fext    3
 · · · ·    3  
0  u  =  Fext  −  K33  û , (21.27)
 

 · · 0 · 4 4
·   u   Fext   K43 
· · 0 · K55 u5 5
Fext K53

so that we can eliminate the third row and column from the system:
  1   1   
K11 K12 K14 · u Fext K13
 · · · ·   2   2  
  u  =  Fext  −  K23  û3 ,


 · 4 4 (21.28)
· · ·   u   Fext   K43 
· · · K55 u5 5
Fext K53
16
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).

134
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

This reduced (or condensed ) system must be solved for the unknowns (u1 , u2 , u4 , u5 ), so that
the complete solution is U = (u1 , u2 , û3 , u4 , u5 )T .

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 ex-
pensive than the substitution technique when a small number of essential boundary conditions
is being applied to a large system, so the reduction in size is negligible).

21.3 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 (21.29)
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
impose essential boundary conditions. For example, when using a Newton-Raphson solver (see
Section 20.1), we must solve
T (Un )∆Un = −f (Un ), (21.30)
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 ), (21.31)
where we modify both T (Un ) and f (Un ) to enforce
∆uai,n = ûai − uai,n (21.32)
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 ⇒ (21.33)
imposes uai = ûai in a more natural, incremental fashion without modifying the initial guess.

135
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

21.4 Rigid-body motion & zero-energy modes

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 . (21.34)
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. (21.35)

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
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 11.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

136
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.

21.5 The patch test

So far, we have 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).

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

We close this section 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

137
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

22 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 8, 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 (22.1)
σij nj (x, t) = t̂(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 (22.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] (22.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 (22.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. (22.4)
t1 Ω 2 Ω ∂ΩN

Note that, without dynamical effects (u̇ = 0), this action reduces to the negative of the potential
energy functional (8.3), which we used in quasistatic boundary value problem.

138
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

The action principle (also known as the principle of stationary action17 ) states that the
solution u(x, t) renders A stationary under suitable initial conditions, i.e.,

u = arg stat {A[u] : s.t. ICs} (22.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 (22.4) with respect to u (again using the
divergence on the stress-term, as done in quasistatic; cf. (8.7)), 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. (22.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. (22.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 ,



(22.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 (22.9)
t1 Ω Ω ∂ΩN

Note that, without the first term, we recover the quasistatic formulation (cf. Section 8).

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). (22.10)
a=1 a=1
17
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.

139
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 (22.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). (22.11)
a=1 a=1

Insertion into (22.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  (22.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)}, (22.13)
so that solving (22.12) for all v b (t) is equivalent to solving the equation of motion

M Ü + Fint (U ) − Fext (t) = 0 (22.14)

with
Z
Mijab = δij ρ N a N b dV

Z Z Z (22.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 (22.14) is the dynamic governing equation to be used in the
finite-element setting. Of course, for quasistatic problems we have Ü = 0, so (22.14) reduces
to the static version (8.14). Let us look into the new term involving mass matrix M .

Example 22.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 (22.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 = . (22.16)
Ω −1 2 6 1 2

140
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 = . (22.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 (22.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. (22.16)).

————

Example 22.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 . (22.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 . (22.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 ). (22.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, (22.21)
Ω 2 Ω 2 a=1 b=1
2 Ω
a=1 b=1

141
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

which can be conveniently recast into the element kinetic energy


1
T = U̇ · M U̇ (22.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. (22.23)
ne

Example 22.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 = (22.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 = (22.25)
2 4
and
1 me  1 2
(u̇e ) + (u̇2e )2 + u̇1e u̇2e .

Tconsistent = U̇e · Mconsistent,e U̇e = (22.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).

142
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

23 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), (23.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).

23.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 . (23.2)

Next, consider a small time-varying perturbation V (t) of the displacements, such that

U (t) = U0 + V (t) ⇒ Ü (t) = V̈ (t). (23.3)

Insertion into the equations of motion (23.1) leads to

M V̈ + Fint (U0 + V ) = Fext . (23.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 (23.5)
∂U
or, invoking equilibrium (23.2), recalling the definition of the tangent stiffness matrix T =
∂Fint /U , and dropping all higher-order terms,

M V̈ + T (U0 ) V = 0 (23.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 (23.7)

143
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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, (23.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 form18

U = Û ∗ exp(iωt) with ω ∈ R, Û ∗ ∈ Cdn . (23.9)

Insertion into (23.8) leads to (exploiting that the equation must hold for all times t)

T − ω 2 M Û = 0

(23.10)

which is a generalized eigenvalue problem19 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.

(23.11)

Further, Û ∗ = Û ∈ Rnd is real-valued (which is why we omitted the asterisk in (23.10)).


Finally, if ω is a solution of (23.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 (23.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 . (23.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, (23.13)
j=1

18
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.
19
Since M is positive-definite, we may multiply (23.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 Û .

144
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 23.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= . (23.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 (23.10). To this end, we first solve the characteristic equation

det K − ω 2 M = 0.

(23.15)

for the two eigenfrequencies ω0 and ω1 , which we insert into

(K − ω 2 M )Û = 0 (23.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 . (23.17)
mL mL mL

The corresponding eigenvectors follow as 1 ^0


U 2
   
consistent 1 consistent 1
Û0 =
1
, Û1 =
−1
. (23.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 . (23.19)
mL
and
   
1 1
Û0lumped = , Û1lumped = . (23.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.

145
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 = ρü, (23.21)

admits the separable solution

u(x, t) = û(x) exp(iωt) ⇒ E û,xx (x) = −ω 2 ρ û(x) (23.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. (23.23)

Solving the ODE in (23.22) with the above initial conditions yields the mode shape
 nπx 
û(x) = A cos with A ∈ R, n ∈ Z. (23.24)
L
and the associated eigenfrequency
r
EA
ωn = n π . (23.25)
mL
Consequently, the lowest two eigenfrequencies are obtained for n = 0, 1 as
r
EA
ω0 = 0, ω1 = π . (23.26)
mL
Comparison with the above two approximate formulations reveals that

ω1lumped ≤ ω1 ≤ ω1consistent (23.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).

23.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) (23.28)

and now assume a time-harmonic excitation (on top of any static pre-load) of the type

Fext (t) = F̂ext cos(Ωt) (23.29)

146
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

with an excitation frequency Ω ∈ R and a force excitation of amplitude F̂ext ∈ Rdn . (23.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 . (23.30)

The homogeneous solution corresponds to a free vibration (see Section 23.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) (23.31)

into (23.28) leads to

−Ω2 M + T Û = F̂ext ,

(23.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, (23.33)

then
−1 −1
Û = −Ω2 M + T F̂ext ⇒ Upart (t) = −Ω2 M + T F̂ext cos(Ωt) (23.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
(Ω → ωj ), matrix −Ω2 M + T becomes singular and the displacement amplitude vector Û


tends to infinity (which is characteristic of resonant effects).

23.3 Modal decomposition

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
(as discussed next in Section 24). Alternatively, one may find time-continuous solutions by the
method of modal decomposition, which is based on the above eigenfrequency analysis and
has the objective of finding a time-continuous solution.

The starting point of the concept of modal decomposition (also known as modal analysis) 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 (23.35)
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).
This basis representation has significant advantages – for which to understand we need a some-
what longer derivation.

147
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

By considering the 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
T − ω(i) M Û(i) = 0 ⇒ Û(j) · T − ω(i) M Û(i) = 0,
    (23.36)
2 2
T − ω(j) M Û(j) = 0 ⇒ Û(i) · T − ω(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 T is by definition symmetric) results in
2 2
(ω(i) − ω(j) ) Û(i) · M Û(j) = 0 ⇔ ωi = ωj ∨ Ûi · M Ûj = 0. (23.37)

This implies that either ωi = ωj (considering only positive eigenfrequencies) or Ûi · M Ûj . If
we assume that we have only distinct eigenfrequencies20 , then we may conclude that
Ûi · M Ûj = 0 if i ̸= j. (23.38)
Let us normalize the eigenvectors in the following fashion:
Û(i)
Ûi ← q so that Û(i) · M Û(i) = 1. (23.39)
Û(i) · M Û(i)

Combined with (23.38), this leads to


Ûi · M Ûj = δij . (23.40)

That is, eigenvectors Ûi are orthogonal with respect to M .

Next, if we start with


   
2 2
T − ω(i) M Û(i) = 0 ⇒ Ûj · T − ω(i) M Û(i) = 0, (23.41)

then we may also conclude that, by invoking (23.40),


Ûj · T Ûi = 0 if i ̸= j. (23.42)
Similarly, by pre-multiplying by the respective same eigenvector, i.e.,
 
2
Û(i) · T − ω(i) M Û(i) = 0, (23.43)

we solve for ωi2 and obtain Rayleigh’s quotient, which here simplifies due to the normalization
(no summation over i implied):
(
Û (i) · T Û(i) ωi2 , if i = j,
ωi2 = = Û(i) · T Û(i) ⇒ Ûi · T Ûj = (23.44)
Û(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 , (23.45)
i=1
20
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 (23.38).

148
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 (23.45) into the linearized equations of motion with external forces, M Ü +T U =
Fext , so we arrive at
n×d
Xh i
z̈i (t) M Ûi + zi (t)T Ûi = Fext (t). (23.46)
i=1

Pre-multiplying by Ûj gives


n×d
Xh i
z̈i (t) Ûj · M Ûi + zi (t)Ûj · T Ûi = Ûj · Fext (t) (23.47)
i=1

and exploiting the orthogonality relations (23.40) and (23.44) leads to

z̈j (t) + ωj2 zj (t) = Ûj · Fext (t) for j = 1, . . . , n × d (23.48)

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 (23.48) 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 (23.45) 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. (23.49)
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.

23.4 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 (22.14) become

M Ü + C U̇ + Fint (U ) − Fext (t) = 0. (23.50)

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,

149
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

which provides velocity-proportional damping. The most common form of C used in structural
FEA is mass- and stiffness-proportional damping, which assumes

C = αM + βK, α, β ∈ R+ (23.51)

That is, C is a combination of the mass and stiffness matrices, M and K, respectively. The
choice of parameter α ≥ 0 controls low-frequency vibration attenuation, while parameter β ≥ 0
suppresses high-frequency vibrations. 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 , (23.52)

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 (23.34)
now becomes
h −1 i
Upart (t) = Re −Ω2 M + iΩC + T F̂ext cos(Ωt). (23.53)

Analogously, adding structural damping to the modal analysis approach demonstrated above
turns (23.48) into

z̈j (t) + (α + βωj2 )żj (t) + ωj2 zj (t) = Ûj · Fext (t) for j = 1, . . . , n × d. (23.54)

150
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

24 Time-dependent transient solutions

If the time-dependent solution for the nodal variables U (t) cannot be obtained in a continuous
manner (e.g., as discussed above for free vibrations or via modal decomposition), then one usu-
ally seeks 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. Specifically, we define a ua
constant time increment ∆t > 0 and seek solutions at discrete time
intervals, writing 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 integration21 .

24.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 ). (24.1)
2∆t (∆t)2

Insertion into the equations of motion (23.50) (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, (24.2)
(∆t)2 2∆t

which can be reorganized into


   
M C α+1 2M α C M
+ U = U + − U α−1 − Fint (U α ) + Fext (tα ) (24.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 (24.3) for U α+1 may require the solution of a linear system due to the matrix
in brackets in front of U α+1 (unless β = 0 so C = αM and if using the lumped mass matrix,
21
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.

151
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

which is diagonal). Yet, all nonlinearity that is possibly inherent in Fint (U ) is irrelevant to
the solution procedure, as the internal forces in (24.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 = (24.4)
ωmax
with ωmax being the highest eigenfrequency of the FE problem (see Section 23.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 ∝ (24.5)
hmin
For example, we showed pin Example 23.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).

24.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 ]. (24.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) = . (24.7)
2(∆t)2

152
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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, (24.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
(24.9)

is piecewise-constant and recovers the second-order central-difference scheme in time, cf. (24.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 , (24.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 . (24.11)
(∆t)2
a=1

Next, we must insert the discretization into the weak form (22.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α ). (24.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 (22.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, (24.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 (24.14)
Z Z 
α b
+ ρbi (t )N dV + t̂i (t )N dS = 0 ∀ vib
α b
Ω ∂ΩN

153
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 (24.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. (22.15)), the above turns out to be equivalent to

U α+1 − 2U α + U α−1
M + Fint (U α ) − Fext (tα ) = 0. (24.16)
(∆t)2

This is identical to (24.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.

24.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.

24.3.1 Newmark-β method

The most popular time integration scheme for mechanical problems is the so-called Newmark-
β method22 . 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 ) (24.17)

Analogously, we know that


Z t
U̇ (t) = U̇ α + Ü (τ ) dτ for t ∈ (tα , tα+1 ). (24.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 ). (24.19)
2
22
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.

154
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Insertion into (24.18) along with U̇ (tα ) = U̇ α leads to

Ü α+1 + Ü α t  t − tα
Z 
α
U̇ (t) = U̇ + dτ = U̇ α + Ü α+1 + Ü α , (24.20)
2 tα 2
and inserting this into (24.17) with U (tα ) = U α gives
  (t − tα )2
U (t) = U α + U̇ α (t − tα ) + Ü α+1 + Ü α . (24.21)
4
Finally, evaluating (24.20) and (24.21) at time tα+1 yields, respectively,
  ∆t
U̇ α+1 = U̇ α + Ü α+1 + Ü α ,
2
  (∆t)2 (24.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 ). (24.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 (24.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 (24.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 . (24.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β)Ü α (24.26a)
2
h i
U̇ α+1 = U̇ α + ∆t γ Ü α+1 + (1 − γ)Ü α (24.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.

155
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

• β = 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 (24.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 (24.26) into a form that allows us to perform algorithmic time
stepping. To this end, let us first solve (24.26a) for the acceleration at the new time tα+1 :
1   1 − 2β
Ü α+1 = U α+1
− U α
− ∆t U̇ α
− Ü α . (24.27)
β(∆t)2 2β
Insertion into (24.26b) yields
γ  α+1  1 − 2β α
U̇ α+1 = U̇ α + ∆t(1 − γ)Ü α + U − U α + ∆t U̇ α − γ ∆t Ü
β ∆t 2β
    (24.28)
γ γ γ
U̇ α + U α+1 − U α − ∆t − 1 Ü α .

= 1−
β β ∆t 2β
Next, inserting both velocity (24.27) and acceleration (24.28) into the equation of motion at
the new time tα+1 ,
M Ü α+1 + C U̇ α+1 + Fint (U α+1 ) − Fext (tα+1 ) = 0, (24.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 Ü (24.30)
β(∆t)2 β ∆t 2β
     
γ α γ α γ α
+C U + − 1 U̇ + ∆t − 1 Ü .
β ∆t β 2β

The right-hand side of (24.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 20.1. Specifically, we now must solve
f (U α+1 ) = M ∗ U α+1 + Fint (U α+1 ) − Fext

(tα+1 , U α , U̇ α , Ü α ) = 0, (24.31)

156
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

where we simply rewrote (24.30) in a more concise form with the abbreviations
1 γ
M∗ = 2
M+ C = const. (24.32)
β(∆t) β ∆t
and
   
∗ 1 1 1
Fext (tα+1 , U α , U̇ α , Ü α ) α+1
= Fext (t )+M α
U + α
U̇ + − 1 Ü α
β(∆t)2 β ∆t 2β
      (24.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 (24.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 ). (24.34)
β(∆t) β ∆t ∂U
Boundary conditions can be implemented in the same fashion as for the quasistatic solvers
discussed in Section 21.3.

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, (24.35)
so that we must solve the linear problem
(M ∗ + K) U α+1 = Fext

(tα+1 , U α , U̇ α , Ü α ). (24.36)

The algorithmic structure is as follows. At each time step, we solve (24.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 (24.27) and Ü α+1
from (24.28), store all of those vectors and move on to the next time step.

24.4 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 (24.26a) and
(24.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 α )
(24.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≤α≤ , β= , γ = + α, (24.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.

157
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

24.5 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 (24.3) without the need for iterations to solve a system, whereas consistent
mass matrices can be conveniently used in the implicit update rule (24.30), where a system of
equations must be solved anyways.

158
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

25 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.

25.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), (25.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). (25.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 = . (25.3)
∂X ∂Xj
When inserting the relation (25.2), we notice that
∂xi
Fij = = δij + ui,j ⇔ F = I + ∇u. (25.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, (25.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]. (25.6)

159
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 (25.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 = , (25.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 (25.7) looks quite similar to the small-strain version, cf. (8.6). Conse-
quently, applying a finite element discretizatio of Bubnov-Galerkin type leads to an FE govern-
ing equation analogous to (8.15). That is, we again arrive at
Fint (U h ) − Fext = 0, (25.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 (25.10)
Ω Ω ∂ΩN

In a nutshell, the linearized and finite variational problems result in the same system of equa-
tions (25.9). For the special case of linearized kinematics, we have Pij → σij , so that we recover
the small-strain version (8.15). 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 (25.11)

with the consistent mass matrix M now having components


Z
ab
Mij = δij ρ0 N a N b dV. (25.12)

160
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.

25.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 7.1, 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) (25.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 ,
 (25.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,
(25.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. (25.16)
Ω 2 ∂ΩN

161
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 , (25.17)

which is analogous to the mechanical problem (cf. Section 8.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 , (25.18)
Ω ∂ΩN

with

U0 = δT ∈ H 1 (Ω) : δT = 0 on ∂ΩD ,

(25.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 . (25.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 . (25.21)
Ω ∂ΩN

This must hold for all admissible variations δT ∈ U0 . Therefore, (25.21) is equivalent to

κ ∇2 T + ρs = 0 in Ω, −κ ∇T · n = q̂ on ∂ΩN and T = T̂ on ∂ΩD . (25.22)

Ergo, the signs are correct, as we recover the (time-independent) strong form (25.14). We hence
conclude that extremal points T ∈ U of (25.16) are indeed guaranteed to satisfy the governing
equations (25.14) and are thus classical solutions. Differently put, functional (25.16) is the
correct energy functional corresponding to the (static) strong form given by (25.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 . (25.23)
Ω Ω

The energy functional (25.16) and the resulting weak form (25.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 ), (25.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. (25.25)
Ω Ω ∂ΩN

162
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

This form is analogous to, e.g., that of the mechanical problem of a bar whose energy functional
was derived as (6.36).

Consequently, the weak form can be expressed in the compact form

G[T, v] = B[T, v] − L[v] = 0 for all δT ∈ U0 . (25.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). (25.27)
b=1 a=1

Insertion into the weak form (25.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. (25.28)
Ω Ω ∂ΩN
| {z } | {z }
=Qa
int (T ) =Qa
ext

or, for short,

Qint (T ) = Qext (25.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, (25.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 (25.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 (25.31)

with a matrix C that is similar to the mass matrix and has components
Z
C ab = ρcv N a N b dV. (25.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 22.

163
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

We close by pointing out that (25.31) bears great similarity to the dynamic mechanical FE
governing equations of Section 22, 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).

164
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

26 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.

26.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 17 (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 ). (26.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
Wq f (ξq ) ≤ C ∥Ω∥ hk+1 max ∥Dα f (ξ)∥

f (ξ) dξ − (26.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 h = F . In general,
the accuracy of the solution depends on the condition number of the matrix,

−1 λmax
κ = ∥T ∥ · T
= (26.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

165
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 . (26.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
(26.5)
∂x 2 ∂x
Using (26.4), we find that

(xi − z)2 ∂ 2 e
e(z) = − (z) + O(h3 ). (26.6)
2 ∂x2
Note that
2
h2

2 xi+1 − xi
(xi − z) ≤ = , (26.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
2
∂ u
|e(x)|max ≤ max 2 . (26.8)
8 xi ≤x≤xi+1 ∂x

As shown in Appendix C, 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 (Ω) , (26.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).

166
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

(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.

26.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 , (26.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 (26.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. (26.11)
Ωe

167
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Note that this definition is not unique and one could also use the L2 -norm
Z
∥ε − ε∗ ∥2e = ∥ε∗ − ε∥2 dV. (26.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 = , (26.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. (26.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

168
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

26.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 = , (26.15)
minq J(ξq )

i.e., we compare the minimum to the maximum value of the Jacobian within an element e.

169
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 26.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.

170
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

27 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 codes23 .

• 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 ) ≈ , (27.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
23
Studies of significant errors resulting from the improper use of rates can be found, e.g., here and here.

171
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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.

172
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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).

173
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Appendices

174
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

A 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 , (A.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 .

175
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

B 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. (B.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 (Ω) . (B.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), . . . (B.3)
2n n! dxn 2

176
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

are orthogonal on Ω = (−1, 1), since


Z 1
2
pn (x) pm (x) dx = δmn . (B.4)
−1 2n +1

• trigonometric functions:
 πnx 
pn (x) = cos (B.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, (B.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 ⟩ (B.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 (B.8)

The most common norm is the L2 -norm:


Z 1/2
1/2
∥u∥L2 (Ω) = ⟨u, u⟩L2 (Ω) = u2 (x) dx . (B.9)

Furthermore, notice that


∥u∥L∞ (Ω) = ess sup |u(x)| , (B.10)
x∈Ω

177
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

where we introduced the essential supremum

ess sup |u(x)| = M with the smallest M that satisfies |u(x)| ≤ M for a.e. x ∈ Ω. (B.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∥ . (B.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 (B.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 → ∞. (B.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)| . (B.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.

178
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

We can use these norms to define function spaces, e.g., the L2 -space of functions:
Z
u2 dx < ∞

L2 (Ω) = u : Ω → R : (B.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 (Ω) < ∞ . (B.17)

179
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

C 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. (C.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. (C.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]. (C.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). (C.4)

Next, we use inequality (iii),


Z h 2 Z h
u (x) − u′ (x) 2 dx ≤ h u′′ (x) − u′′ (x) 2 dx,

h h (C.5)
0 π2 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 2 Z h
u (x) − u′ (x) 2 dx ≤ h u′′ (x) 2 dx.

h (C.6)
0 π2 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 (C.7)
a i=0 xi

so that
Z b 2 Z b
u′ (x) − u′ (x) 2 dx ≤ h u′′ (x) 2 dx

h (C.8)
a π2 a

180
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Taking square roots, we see that for Ω = (a, b)



u − u′ h
≤ u′′ L2 (Ω)

h L2 (Ω)
(C.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
k 2

|u|H k (Ω) = D u dx or for short |u|k = |u|H k (Ω) (C.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
u′ (x) 2 dx

|u|H 1 (a,b) = (C.11)
a

• analogously:
Z b 1/2
u′′ (x) 2 dx

|u|H 2 (a,b) = (C.12)
a

so that we can write (C.8) as

h2 2 h
|uh − u|2H 1 (a,b) ≤ |u| 2 ⇒ |uh − u|H 1 (a,b) ≤ |u| 2 (C.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) (C.14)

We can extend this to higher-order interpolation. For example, we may use a piecewise
quadratic interpolation uh . From Poincaré:
Z h 2 Z h 4 Z h 4 Z h
u − u′ 2 dx ≤ h u′′ − u′′ 2 dx ≤ h u′′′ − u′′′ 2 dx = h u′′′ 2 dx. (C.15)

h 2 h 4 h 4
0 π 0 π 0 π 0
The extension into a global error estimate shows quadratic h-convergence:
h2
|uh − u|H 1 (a,b) ≤ |u| 3 . (C.16)
π 2 H (a,b)

For a general interpolation of order k we have:

hk
|uh − u|H 1 (a,b) ≤ |u| k+1 (C.17)
π k H (a,b)

181
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 (Ω) . (C.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 (Ω) . (C.19)
Ω Ω

Note that this also shows that, more generally,

∥u∥2H k (Ω) ≥ |u|2H k (Ω) . (C.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 u − u′ 2 dx = ch |uh − u|2 1

∥uh − u∥L2 (a,b) = |uh − u| dx ≤ ch h H (a,b) (C.21)
a a

and from (C.19) arrive at

∥uh − u∥2H 1 (Ω) = ∥uh − u∥2L2 (Ω) + |uh − u|2H 1 (Ω)


(C.22)
≤ (1 + ch ) |uh − u|2H 1 (a,b) ≤ c∗ h |u|2H 2 (a,b) ,

which along with (C.13) gives

∥uh − u∥H 1 (a,b) ≤ ch |u|H 2 (a,b) ≤ ch ∥u∥H 2 (a,b) (C.23)

Summary and extension of norms:


Z 1/p
p
Lp -norm: ∥u∥Lp (Ω) = u dx

Z 1/2
k 2

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
k p

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(·, ·), (C.24)

182
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 ). (C.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 ,

(C.26)

then, for this space, ∥·∥E is indeed a proper norm.

183
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

D Sobolev spaces

The Sobolev norm is used to define a Sobolev space:

H k (Ω) = u : Ω → R such that ∥u∥k < ∞ ,



(D.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. (D.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) . (D.3)

The degree of a multi-index is defined as

|α| = α1 + . . . + αn . (D.4)

This can be used to define a monomial for x ∈ Rn :

xα = xα1 1 · . . . · xαnn . (D.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α (D.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} (D.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 + . . . (D.8)

184
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 (D.9)
∂xα1 1 · . . . · ∂xαnn

A common notation is
X X ∂ |α| u
Dα u = (D.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 (D.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 (Ω)  (D.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 = , (D.13)
∂x1 ∂x2

so that
Z 
∂u ∂v ∂u ∂v
⟨u, v⟩H 1 (R2 ) = uv + + dx1 dx2 (D.14)
R2 ∂x1 ∂x1 ∂x2 ∂x2

and
Z "  2  2 #
∂u ∂u
∥u∥2H 1 (R2 ) = u2 + + dx1 dx2 . (D.15)
R2 ∂x1 ∂x2

Altogether we can now properly define a Sobolev space in arbitrary dimensions:


 
m α
H (Ω) = u : Ω → R : D u ∈ L2 (Ω) ∀ α ≤ m (D.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 (D.15) must be finite.

185
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 (Ω) (D.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 . (D.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 . (D.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 (Ω) (D.20)

and
\
C0∞ (Ω) = C0k (Ω). (D.21)
k≥0

186
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

E Operators

Energies are often defined via operators. Generally, we call A an operator if

A : u ∈ U → A(u) ∈ V, (E.1)

where both U and V are function spaces.

A simple example is

du
A(u) = c , (E.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 ). (E.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 . (E.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. (E.5)

Furthermore, the operator is positive if

⟨A(u), u⟩ ≥ 0 for all u ∈ U. (E.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.

187
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

F Uniqueness of solutions

One of the beauties of variational problems of the type (6.36) 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. (F.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 (Ω) (F.2)

• coercivity of the bilinear form (ellipticity):

B(u, u) ≥ c ∥u∥2 for some c > 0. (F.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 (Ω) . (F.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.36) satisfy the above and hence
have a unique solution.

188
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

G 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 (Ω). (G.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]. (G.2)
ϵ→0 dϵ
Now recall from calculus that for any continuously differentiable function f (x, y) we must have
by Schwartz’ theorem
∂ ∂f ∂ ∂f
= . (G.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 (G.4)

This is known as Vainberg’s theorem.

We can easily verify this for the general form given in (6.36):
Z Z
G(u, δu1 ) = Dδu1 I[u] = [λ grad u grad δu1 − S δu1 ] dx − Q̂ δu1 dx
Ω ∂ΩN
Z (G.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.

189
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

H 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 (H.1)

and obtain the next basis function by starting with the linear monomial ξ and computing
⟨1, ξ⟩
P1 (ξ) = ξ − 1 = ξ, (H.2)
⟨1, 1⟩
where we used the inner product
Z 1
⟨u, v⟩ = u(ξ)v(ξ) dξ. (H.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 − . (H.4)
⟨ξ, ξ⟩ ⟨1, 1⟩ 3
Analogously, one finds
3
P3 (ξ) = ξ 3 − ξ. (H.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. (H.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) (H.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 ⟩ = (H.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,


(H.9)
Pn (ξ) = Pn (−ξ) for even n.

190
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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. (H.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 ). (H.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 ),


(H.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 = − √ . (H.13)
3 3
Using Pn (ξ) = −Pn (−ξ), the above equations reduce to

W0 = W1 = 1. (H.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. (H.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, (H.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 , (H.17)
(1 − ξ02 )[P2′ (ξ0 )]2 (1 − ξ02 )[3ξ0 ]2 3 3

which agrees with the solution we found in Section 16.2.1.

191
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

I 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
2nQP (2nQP )

f (ξ) dξ − W k f (ξ )
k
≤ Ch max f (ξ) (I.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


(2nQP )

e= max f (ξ) . (I.2)
(2nQP + 1)[(2nQP )!]3 ξ∈[−1,1]

192
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

J 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 J.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). (J.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 (J.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). (J.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 , (J.3)
2 2 dt ∂ u̇i ∂ui
i=1 i=2

193
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

which also yields the n equations given by (J.1) and (J.2).

Either way, the obtained equations of motion can be arranged into matrix form, viz.
  
m1 ü1

 m 2   ü2 
 
 ...  · 
  

 m i
  üi 
 
 ...  · 
mn ün
    ext  (J.4)
−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

Writing U = (u1 , . . . , un )T , the above matrix equation can be simplified into

M U + KU = F ext (J.5)

with (only showing the non-zero components)


   ext 
m1 F1
 m2  F ext 
   2 
 . ..   .. 
  ext
 . 
[M ] = 
  and [F ] =  
F ext  (J.6)
 mi 
  i 
 . .   .. 
 .   . 
mn Fnext

as well as
−k1,2
 
k1,2
−k1,2 k1,2 + k2,3 −k2,3 
 
 ... 
[K] =  . (J.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  . (J.8)


 . .. 

 
 −kn−2 kn−2 + kn,n−1 −kn,n−1 
−kn,n−1 kn,n−1

194
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

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 . (J.9)
m2 −k k

Again using the abbreviation M U + 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] = (J.10)
−k k

By inspecting (J.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 (J.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 (J.8).

————

Example J.2. Stiffness matrix components & internal forces

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:
     ext 
k1,2 −k1,2 u1 F1
−k1,2 k1,2 + k2,3 −k ext 
2,3   2  = F2 
u
   
 (J.11)
 −k2,3 k2,3 + k3,4 −k3,4  u3  F3ext 
−k3,4 k3,4 u4 F4ext

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
      ext 
k1,2 −k1,2 0 −k1,2 F1
−k1,2 k1,2 + k2,3 −k2,3 ext 
 1 = k1,2 + k2,3  = F2  .
     
 (J.12)
 −k2,3 k2,3 + k3,4 −k3,4   0   −k2,3   F3ext 
−k3,4 k3,4 0 0 F4ext

This shows that, in order to displace the second particle by u1 = 1 while keeping all other
particles fixed, we must apply the external forces (J.12) to the four particles; a positive force
to the second particle (to move it to the right), negative forces to the first and third particle
(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
(J.13)
without moving any of the other particles.

195
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

We further interpret KU = Fint as 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.

Finally, 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).

————

Example J.3. 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
(J.14)
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.
The equilibrium equations for particle 2 can be formulate in an analogous fashion:
X
Fi,1 = −S1 − S2 cos α = 0,
i
X (J.15)
Fi,2 = S2 sin α + T1 = 0,
i

196
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

where T1 is the vertical reaction force from the ground onto particle 2, and

S2 = k(u21 cos α − u22 sin α − u31 cos α + u32 sin α) (J.16)

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 (J.17)
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,
(J.18)
−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
(J.19)

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] =   2 2
 (J.20)
 −k cos α sin α k sin α k cos α sin α −k sin α 

 2
−k cos α k cos α sin α 2
k cos α −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
particles 2 and 3, which is more involve 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)!

————

197
Index
L2 -norm, 177 central difference, 22, 23
h-refinement, 75 CFL condition, 30, 31
hp-refinement, 75 CFL number, 31
n-dimensional space, 63 characteristic equation, 144
p-refinement, 75 chicken-wire mode, 121
r-refinement, 75 class C k (Ω), 60, 176
(proper) subset, 175 classical solution, 56
2-node bar element, 77 closure, 178
2-node beam element, 87 collocation method, 40
4-node bilinear quadrilateral, 104 collocation points, 40
4-node tetrahedron, 100 commercial codes, 171
8-node brick element, 110 complete polynomial, 185
8-node quadratic quadrilateral, 109 complete space, 178
9-node quadratic quadrilateral, 109 complete up to order q, 72
completeness property, 72
acceleration field, 9 condensation, 134
action, 138 condition number, 165
action principle, 139 conditionally stable, 34
adaptive mesh refinement, 167 conductivity matrix, 163
advection equation, 17, 35 conjugate gradient, 127
amplitude, 147 consistency, 23
approximation error, 166 consistent mass matrix, 140
assembly, 82, 195 constant strain tetrahedron, 100, 103
assembly operator, 122 constant strain triangle, 99
augmented finite elements, 172 constitutive relations, 10
average acceleration, 155 continuous at a point x, 176
average acceleration method, 154 continuous over Ω, 176
convergence, 23, 123, 178
backward-Euler, 23
Courant number, 31
balance of energy, 13
Courant-Friedrichs-Levy, 30
local, 14
Courant-Friedrichs-Levy (CFL) condition, 31
balance of linear momentum, 11
CST, 99, 100
local form, 12
cubature rules, 112
Banach space, 178
barycentric coordinates, 98 damage and failure, 173
basis, 71 damped Newton-Raphson method, 125
basis functions, 39 damping matrix, 149
beam element, 86 deformation, 9
bijective, 175 deformation gradient, 159
bilinear form, 56 deformation mapping, 159
bilinear operator, 187 degrees of freedom, 74
body, 9 differential operator, 16
body force, 128 dimensionless forms, 19
boundary, 175 Direct methods, 22
boundary conditions, 15 Dirichlet boundary, 15
boundary operators, 17 Dirichlet boundary condition, 92
Bubnov-Galerkin approximation, 63 Dirichlet boundary conditions, 91

198
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

Dirichlet-Poincaré inequality, 180 function, 175


discrete problem, 63 function space, 51
discretization error, 165 functional, 51
discretization errors, 19 fundamental frequency, 144
dispersion relation, 36
displacement field, 9, 159 Galerkin’s method, 46
distance, 177, 178 Gauss points, 115
divergence Gauss quadrature, 112
of a tensor, 11 Gauss-Chebyshew, 114
of a vector, 14 Gauss-Hermite, 114
divergence theorem, 11 Gauss-Legendre, 114
domain, 175 Gauss-Legendre quadrature, 113, 191
dummy index, 8 Gauss-Lobatto quadrature, 114
dynamic, 138 Gauss-Newton method, 126
geometric stiffness, 172
eigenfrequency, 144 ghost node, 27
eigenmode, 144 global, 70, 122
elasticity tensor, 10 global error estimate, 180, 181
element defect, 119 global stiffness matrix, 82
element shape functions, 77 gradient
elements, 74 of a scalar, 15
energy norm, 182 of a vector, 9
equation of motion, 140 gradient descent, 126
error estimate, 168 gradient flow method, 126
essential supremum, 178 Gram-Schmidt orthogonalization, 190
Euclidean norm, 177
Euler-Bernoulli beam, 86 heat equation, 15, 17
Eulerian, 172 Hermitian polynomials, 88
excitation frequency, 147 HHT method, 157
explicit, 25 HHT-α, 157
explicit time integration, 151 hierarchical interpolation, 85
extensive, 14 higher-order interpolation, 181
external forces, 129 Hilbert space, 178
hourglass mode, 121
Fast Inertial Relaxation Engine, 127
FE, 74 identity mapping, 175
FEM, 74 implicit, 26, 28
finite element, 74 implicit time integration, 154
Finite Element Method, 74 incompressibility, 172
finite kinematics, 159 incremental stiffness matrix, 102
finite-difference stability, 30 initial boundary value problem, 15
first fundamental error, 165 initial conditions, 15, 16
first variation, 53 injective, 175
forced vibrations, 143, 146 inner product, 176
forward-Euler, 23 inner product space, 176
Fourier series, 72 instability, 173
Fourier’s law, 14 integration point, 112
frame, 90 intensive, 14
free index, 8 internal energy, 13
free vibrations, 143 internal energy density, 14
full integration, 117 internal forces, 196

199
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

inverse function theorem, 95 mathematical domain of dependence, 31


isomorphism, 175 maximizer, 56
isoparametric mapping, 94 mechanical instability, 170
isotropy, 10 mechanisms, 136, 170
mesh, 74
Jacobian, 95 mesh refinement algorithm, 168
Jacobian ratio, 169 mesh refinement criterion, 168
method of weighted residuals, 40
kinematics, 8
minimizer, 56
kinetic energy, 138, 142
mixed finite elements, 172
kinetics, 8, 10
modal analysis, 147
Kronecker delta, 8
modal decomposition, 147
L2 -inner product, 176 modeling errors, 19, 167
L2 -space of functions, 179 monomial, 184
Lp -norm, 177 monomials, 72
Lagrange polynomials, 85 multi-index, 72, 184
Lagrangian, 138
natural frequency, 144
Lagrangian interpolation, 85
Navier equation, 13
Laplace equation, 15
neighborhood, 178
Laplacian, 15
Neumann boundary, 16
large deformation, 159
Neumann-Poincaré, 180
large deformations, 172
Newmark-β, 154, 155
Lax equivalence theorem, 34
Newton-Cotes, 112
Lax-Milgram theorem, 57, 188
Newton-Raphson method, 123
Lax-Richtmyer theorem, 34
nodes, 74
least squares method, 41
nominal strains, 9
Legendre polynomials, 190
nominal stresses, 10
line search method, 125
nonlinear least squares, 126
linear acceleration, 155, 156
norm, 177
linear elasticity, 10, 65, 67
normed linear space, 177
linear form, 56
numerical damping, 156
linear operator, 17, 187
numerical domain of dependence, 30
linear strain triangle, 103
numerical integration, 111
linear subspace, 175
numerical integration error, 165
linear/vector space, 175
linearly independent, 71 one-to-one, 175
local, 70 onto, 175
local error estimate, 180 open, 178
local stiffness matrix, 82 open set, 175
local-to-global map, 82, 122 operator, 187
locking, 121 order of a PDE, 16
longest edge bisection, 168 order reduction, 149
LST, 103 ordered triad, 175
lumped mass matrix, 142 orthogonal, 176
over-integration, 118
mapping, 93, 175
mass matrix PkQl elements, 172
consistent, 140 parasitic shear, 120
lumped, 142 particle-mass lumping, 142
material points, 9 patch test, 137

200
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

period contraction, 158 Sobolev space, 51, 184, 185


period elongation, 158 solution error, 165
Petrov-Galerkin, 63 solution errors, 19
phase error, 37 solver tolerance, 166
phase error analysis, 36 space of all second-order polynomial functions,
Piola-Kirchhoff stress tensor, 160 175
Poincaré inequalities, 180 square-integrable, 51, 179, 184
Poisson equation, 15 static vs. dynamic FEA, 171
polynomial function space, 44 statics, 12
positive, 187 stationarity condition, 52
principle of stationary action, 139 steady state, 147
principle of virtual work, 46, 56, 62 stencil, 23
stiffness matrix, 67, 69, 195
Q4, 104 strain energy density, 10
Q8, 109 strain tensor, 9
Q9, 109 strain vector, 68
quadratic tetrahedron, 103 stress tensor, 10
quadratic triangle, 102 stress vector, 68
quadrature error, 192 strong form, 60, 65
quadrature rules, 112 subdomain method, 41
Quasi-Newton method, 125 subparametric mapping, 94
quasistatics, 138 substitution, 134
summation convention, 8
range, 175
superparametric mapping, 94
Rayleigh’s quotient, 148
support, 70, 186
Rayleigh-Ritz, 57
surface tractions, 129
reduced integration, 118
surjective, 175
reference configuration, 9
symmetric, 187
residual, 40
Riemann sum, 111 T10, 103
rigid-body mode, 144 T4, 100
rigid-body motion, 136 T6, 102
Rolle’s theorem, 180 tangent matrix, 123
temperature field, 161
selective integration, 121
thermal problem, 161
semi-discretization, 139
thermodynamics, 13
semi-norm, 181
time delay, 150
serendipity element, 109
total-Lagrangian, 172
set, 175
traction, 10
shape function properties, 70
transport equation, 17
shape functions, 63, 70
trial functions, 39
shear locking, 121
triangle inequality, 177
shear strains, 9
trigonometric polynomials, 72
shear stresses, 10
truncation error, 166
simplex, 97
truss, 90
simplicial, 97
simplicial quadrature, 117 UEL, 171
singularities, 172 UMAT, 171
smoothing, 167 unconditionally stable, 34
Sobolev norm, 51, 182 unconditionally unstable, 34
Sobolev semi-norm, 181 under-integration, 118

201
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2022 (version February 7, 2022) ETH Zürich

undistorted, 117
units, 165
update rule, 25
updated-Lagrangian, 172

V&V, 19
Vainberg’s theorem, 62, 189
validation, 19
variation, 52
variational calculus, 50
variational structure, 55
velocity field, 9
verification, 19
vibrations, 143
Voigt notation, 68
Von Neumann analysis, 30
von Neumann analysis, 32, 34

wave equation, 12, 17


weak form, 61
dynamic, 139
quasistatic, 66
weak solution, 61
Weierstrass approximation theorem, 72

XFEM, 173

zero-energy mode, 121, 136


zero-energy modes, 136
zeroth derivative, 61, 176
ZZ error estimator, 167

202

You might also like