IntroToFEA Red
IntroToFEA Red
(Spring 2025)
These lecture notes cover the concepts and examples discussed during lectures.
They are not a complete textbook, but they do provide a thorough introduction to all course
topics as well as some extra background reading, extended explanations, and examples beyond
what can be discussed in class.
You are strongly recommended to visit the lectures and to take your own notes, while studying
these lecture notes alongside for support and further reading. The exercise sessions will help
deepen the acquired knowledge and, in particular, apply the concepts through coding projects.
The lecture topics covered during each week are announced at the beginning of the semester in
the course syllabus, so you are welcome to read up on the relevant topics ahead of time.
2
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Contents
0 Preface 7
2 Computational Methods 23
2.1 Why do we need computational methods? . . . . . . . . . . . . . . . . . . . . . . 23
2.2 Dimensionless forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6 Variational Calculus 58
6.1 Variational calculus: an introductory example . . . . . . . . . . . . . . . . . . . . 58
6.2 Functionals and function spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.3 Variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.4 Helpful relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.5 A general variational structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.6 Summary & extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
7 Rayleigh-Ritz Method 70
3
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
9 Interpolation spaces 79
9.1 Approximate solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
9.2 Shape functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
9.3 Approximation power & completeness . . . . . . . . . . . . . . . . . . . . . . . . 82
12 Beam Elements 95
12.1 Review of beam theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
12.2 Euler-Bernoulli beam theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
12.3 Variational formulation of beam theory . . . . . . . . . . . . . . . . . . . . . . . 99
12.4 2-node (Euler-Bernoulli) beam element . . . . . . . . . . . . . . . . . . . . . . . . 102
12.5 Two-node beam element in 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
12.6 Extension to 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
12.7 Timoshenko beam element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
12.8 Bar vs. beam vs. solid elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
14 Assembly 114
4
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
24 Dynamics 161
25 Vibrations 166
25.1 Free, undamped vibrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
25.2 Forced vibrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
25.3 Structural damping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
28 Extensions 183
28.1 Finite kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
5
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Appendices 198
I Operators 226
Index 237
6
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
0 Preface
Finite Element Analysis (FEA) has become a ubiquitous tool used by engineers and scientists
across all disciplines. Whether it is commercial software like Abaqus® , Ansys® and LS-Dyna®
or open-source libraries such as FEniCS or FEAP – FEA tools are available in many different
flavors and have become an essential ingredient for the solution of (among others) mechanical,
thermal, and multi-physics initial boundary value problems.
The availability and ease of use of FEA codes comes with a risk though: the ability to produce
colorful plots by the push of a button does not obviate the user’s expert knowledge in deploy-
ing FEA tools properly and responsibly (ultimately, lives could be endangered and significant
economic losses incurred, if engineering design is flawed). What element types to use, what
quadrature rules to use, what stress components to plot, how to interpolate or extrapolate and
how to present results: these are questions to be answered by the FEA user, and they require
a fundamental knowledge of what the black box called FEA does for us.
To turn the black box into a versatile and understandable toolbox, this course discusses the
fundamentals of numerical methods with a focus on the finite element method. Rather than
studying and using commercial software packages, we study FEA from the basics and with the
goal of understanding the theoretical underpinning as well as the details of numerical imple-
mentations. This, of course, requires us to present the underlying mathematical and mechanical
theories and to discuss the wide variety of finite element types and choices to be made when
using FEA.
To follow the course contents, it is assumed that you have a background in solid and structural
mechanics (equivalent to Mechanics I (Statics & Kinematics), Mechanics II (Mechanics of Ma-
terials), and Mechanics III (Dynamics) at ETH Zurich) as well as basic knowledge in analysis
and linear algebra. We will begin with a brief review of solid mechanics and an introduction to
the notation used in this course, after which we will dive into numerical methods.
This set of notes is not meant to be a complete textbook, and you are encouraged to take your
own notes during lectures (and to ask questions!). Though I made great effort to ensure that
these notes are free of essential typos or errors, I cannot rule out that some have remained and
I apologize in advance for any typos that may have survived. If you spot any mistakes, feel free
to send me a highlighted PDF during or at the end of the semester, so I can make sure those
are corrected. I would like to thank Helen Le Clézio for proof-reading some of the sections.
I hope you will find the course interesting and these notes supportive while studying this Intro-
duction to Finite Element Analysis.
Dennis M. Kochmann
Zurich, February 2025
7
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Throughout this course, we will introduce and discuss numerical methods for solving physical
problems such as mechanical, thermal, and related initial boundary value problems. Therefore,
let us begin by reviewing the basics of continuum mechanics and use this review to also introduce
the notation used throughout the remainder of the course. We describe the deformation and
motion of rigid and deformable bodies as well as their thermodynamics. Let us begin with the
mathematical framework to describe the motion and deformation of bodies (which we call the
kinematics), followed by the connection between deformation and motion, on the one hand,
and those forces and stresses responsible for the latter, on the other hand (these thermodynamic
balance laws are referred to as the kinetics). Of course, this brief introduction cannot replace
a thorough introduction to the mechanics and thermodynamics of solids (which is assumed to
have happened in other classes1 ), so that we here only review the basic principles as needed for
later discussions.
1.1 Kinematics
Every point in space has a position x, which we describe in d dimensions using a Cartesian
coordinate system with basis {x1 , . . . , xd } and origin O. Points are described by vectors with
respect to O, which in turn are defined by components in the Cartesian reference frame with
basis {e1 , . . . , ed }. Therefore, we write
d
X
x= xi ei = xi ei . (1.1)
i=1
Here and in the following, we use Einstein’s summation convention, which implies that any
index appearing twice in a product must be summed over (here, e.g., we drop the explicit
summation in the above equation and simply write xi ei , knowing that we must sum over i from
1 to d). For a thorough review of index notation, see the Tensor Notes available online. Note
that the summed index (i in the above example) is called a dummy index and can be replaced
by any other index.
where we introduced δij , the so-called Kronecker delta. Based on this orthogonality, an inner
product of two vectors u and v can be written as
d
! d
d Xd d
X X X X
u·v = ui ei · vj e j =
ui vj (ei · ej ) = ui vi = ui vi = uk vk , (1.3)
i=1 j=1 i=1 j=1 i=1
where we again dropped the sum symbol, following the summation convention.
Note that an index appearing only once in a term is a free index, which is not to be summed
(the number of free indices reveals the type of quantity). For example, ui are the components
1
See, e.g., the online lecture notes for Dynamics for a review of the kinetic balance laws, the description of
motion of rigid and deformable bodies as well as wave motion in elastic solids.
8
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
of a vector u (no summation). ∂ui /∂xi is a scalar (the divergence of vector field u). Tij are the
components of a second-order tensor T , as we will see further below.
We describe a body as a collection of material points
in space. In mechanical problems, a body usually has a
reference configuration, which describes the initial,
undeformed configuration of the body and which we
call Ω. In the following, we often speak of the body
Ω. The boundary of body Ω is denoted by ∂Ω. For
example, in three dimensions, ∂Ω is the surface of body Ω.
+ u+
The deformation and motion of a body Ω is described by
x2 y
the displacement field x
e2
u = u(x, t), (1.4) e3 x1
e1 ¶W W
x3
which maps every undeformed point x ∈ Ω in the refer-
ence configuration onto a deformed location y ∈ Rd , such
that the corresponding deformed point (as shown above) is at a position
y(x, t) = x + u(x, t). (1.5)
From the displacements, we may derive kinematic variables such as the velocity field
d d
v(x, t) = y(x, t) = u(x, t) (1.6)
dt dt
and the speed v = ∥v∥, defining the norm of a vector as
√ √
∥v∥ = v · v = vi vi . (1.7)
The acceleration field is defined as
d d2
a(x, t) = v(x, t) = 2 u(x, t). (1.8)
dt dt
For convenience, we will also use dots to denote derivatives with respect to time, so that v = u̇
and a = v̇ = ü.
The deformation of a body is best described not by the displacement field (which would also
include rigid-body motion) but by the strain tensor ε, which is a second-order tensor defined
as
1h i
ε= grad u + (grad u)T (1.9)
2
with Cartesian components
1 ∂ui ∂uj 1
εij = + = (ui,j + uj,i ) (1.10)
2 ∂xj ∂xi 2
We here used index notation again and, specifically, the gradient of a vector field, which is
a second-order tensor with components
∂ui
[grad u]ij = = ui,j . (1.11)
∂xj
Here and in the following, we use brackets [...] to indicate vector (or tensor) components in
the Cartesian frame. A comma in an index implies differentiation with respect to those x-
coordinate(s) following the comma. For example, f,i = ∂f /∂xi and ui,j = ∂ui /∂xj as well as
f,jk = ∂ 2 f /∂xj ∂xk .
9
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
L e22 L e12
2
e2 L L
e1 L e22 L e12
L e11 L e11 2
2 2
From undergraduate mechanics we know that the diagonal components ε11 , ε22 and ε33 are the
nominal strains along the three coordinate directions of an infinitesimal cube (implying ex-
tension or shrinkage). The off-diagonal components εij with i ̸= j, by contrast, represent shear
strains (implying angle changes). The effect of the strain components in 2D are schematically
shown above. By definition εij = εji , so that the strain tensor is symmetric: ε = εT .
The below plots illustrate the example of a homogeneous square body Ω = (0, 1)2 deformed
biaxially with the displacement field
u1 0.1x1
u(x) = 0.1x1 e1 − 0.1x2 e2 ⇔ = , (1.12)
u2 −0.1x2
so the body stretches in the x1 -direction with a uniform strain ε11 = u1,1 = 0.1, and it shrinks
in the x2 -direction with a uniform strain ε22 = u2,2 = −0.1. The shear stress component
ε12 = 21 (u1,2 + u2,1 ) is zero.
————
Example 1.2. Plate with a hole
10
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
where (r, θ) are polar coordinates (radius and angle), measured from the center of the plate
and against the horizontal axis, respectively. In this case, the displacement and strain fields are
inhomogeneous, as illustrated below, showing strain maxima at the perimeter of the hole.
————
In order to deform a body Ω, forces (or displacements) must be applied. Like strains being more
appropriate than displacements to measure a body’s deformation (because they set displace-
ments into relation to the body’s dimensions), stresses are more indicative of a body’s loading
than forces (because stresses set the applied forces into relation to the area on which they act).
Consider an infinitesimal cube with (infinitesimal) force vectors x2
Fi applied to the surface of (infinitesimal) area Ai and normal t2 s22
to the xi -axis (positive in the +xi -direction, negative in the −xi - s12
direction). We define the traction vector ti on the ith surface as s32 s21
-t1 s23
s11
σ1i s13 s31 x1
dFi s33 t1
t(ei ) = ⇒ [t(ei )] = [ti ] = σ2i (1.14)
t3
dAj x3
σ3i
which defines the stress components σij in 3D. Repeating the above for all three surface (i.e.,
for surfaces perpendicular to x1 , x2 and x3 ) yields in the components of the stress tensor in
3D as
σ11 σ12 σ13
[σ] = (t1 , t2 , t3 ) = σ21 σ22 σ23 , (1.15)
σ31 σ32 σ33
11
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Analogous to the strains, components σ11 , σ22 , and σ33 represent nominal stresses (loading
of the cube in tension or compression along its axes), while components σij (with i ̸= j) imply
shear stresses acting parallel to the surface that they act on, as schematically shown above.
More generally, the traction vector acting on any surface with normal n is given by
t(n) = σn (1.16)
Note that by angular momentum balance on the cube (and in close analogy to the strain tensor),
we must have σ = σ T (i.e., σ is symmetric).
As a convenient scalar metric to assess the local state of loading of a body and its likelihood to
show plastic yield, the von Mises stress can be computed from the stress tensor components
as
r
2 + σ2 + σ2 )
(σ11 − σ22 )2 + (σ22 − σ33 )2 + (σ33 − σ11 )2 + 6(σ12 23 31
σvM = . (1.17)
2
Shown below is the von Mises stress distribution in the elements of a chain (as obtained from
a finite element simulation). The von Mises stress can be understood as a measure of a ductile
material’s risk of showing plastic yielding (when σvM reaches the yield limit of a ductile material,
it is likely to show the onset of plasticity).
A constitutive relation describes the link between the deformation (the strains) within a
body and the causes of that deformation (the stresses acting within the body). The constitutive
relation depends on the material of which a body is made. The general relation within a time-
independent setting3 is of the form
σ = σ(ε). (1.18)
The simplest material model is linear elasticity, for which stresses and strains are linearly
linked via the relation
σ = C ε, (1.19)
3
In case of more complicated constitutive behavior, e.g., viscoelasticity or viscoplasticity, the stresses may
additionally depend on the strain rate ε̇, which we neglect here and in the following.
12
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
where C is the elasticity tensor or stiffness tensor, containing the elastic constants of the
material. Note that, since both σ and ε are second-order tensors, C (linking each strain com-
ponent to each stress component) is a fourth-order tensor with components Cijkl , such that
σij = Cijkl εkl . In general, C has d4 entries in d dimensions. Yet, the symmetry of both the
stress and strain tensors as well as any existing material symmetries reduce the number of in-
dependent material parameters required to describe C. For the simplest case of isotropy (i.e.,
the material behavior is the same in every direction), C can be described by only two constants,
e.g., Young’s modulus E and Poisson’s ratio ν, or the bulk modulus κ and shear modulus G.
In this case, one can show that
Cijkl = λδij δkl + µ (δik δjl + δil δjk ) , (1.20)
where we again made use of the Kronecker delta and introduced the Lamé moduli
Eν E
λ= , µ=G= . (1.21)
(1 + ν)(1 − 2ν) 2(1 + ν)
You can find convenient tables summarizing the relations between all isotropic elastic moduli
online.
A quick exercise of the summation convention reveals the linear elastic stress-strain relation
σij = Cijkl ϵkl = [λδij δkl + µ (δik δjl + δil δjk )] ϵkl = λ(tr ε)δij + 2µϵij (1.22)
with the trace of a tensor defined as the sum of its diagonal components (which is invariant to
coordinate transformations):
tr ε = εkk = ε11 + ε22 + ε33 . (1.23)
Note that the trace of the strain tensor indicates volumetric change: if tr ε = 0, the volume is
locally conserved. Otherwise, the (infinitesimal) local volume dV changes due to deformation
to dv = (1 + tr ε) dV .
As a convenient alternative to defining the constitutive relation as a link between stresses and
strains, we can encode the constitutive response in a strain energy density W = W (ε),
which, e.g., for the case of linear elasticity reads
1 1 1
W = ε · Cε = ε · σ = (ε11 σ11 + ε12 σ12 + ε13 σ13 + σ21 ε21 + . . .) (1.24)
2 2 2
or, exploiting the symmetry of σ and ε,
1
W = (ε11 σ11 + ε22 σ22 + ε33 σ33 + 2ε12 σ12 + 2ε13 σ13 + 2σ21 ε21 ) . (1.25)
2
Given the above energy density, the stresses and stiffness tensors follow from differentiation4 :
∂W ∂σ
σ= , C= . (1.26)
∂ε ∂ε
Roughly speaking, the above concept of a strain energy density is analogous to the energy stored
in an elastic spring (W = 21 kx2 ), whose force is obtained from differentiation (F = ∂W/∂x = kx)
as well as its stiffness (k = ∂ 2 W/∂x2 ). Here, the energy is the elastic energy stored inside the
elastic body, the analog of the spring force is the stress, and the stiffness becomes the stiffness
tensor. As we are here not simply relating two scalars (spring force and spring) extension but
two tensors (the stress and strain tensors), the stiffness must be expressed as a fourth-order
tensor.
4
Tensor (and vector) derivatives of the shown type are understood component-wise; e.g., differentiating W with
respect to each component of ε yields nine values, which are the components of σ. For example, σ11 = ∂W/∂ε11 ,
σ12 = ∂W/∂ε12 , etc. For details and a proper tensorial definition see the Tensor Notes available online.
13
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Working with the above stress and strain tensors can be tedious at times, which is why an
alternative formulation has gained popularity in the finite element context, known as Voigt
notation. The motivation is two-fold. First, one aims to avoid the use of fourth-order tensors
(like the stiffness tensor C in the constitutive relation σ = Cε, which cannot easily be imple-
mented within common programming languages). Second, strain tensor ε and stress tensor σ
are symmetric, which means that working with and storing the full tensors wastes computational
resources (in 3D each tensor has only six independent components, but 3 × 3 matrices would be
used and stored). Therefore, Voigt notation concatenates the six independent components in a
vector, which leads to the strain vector ε̃ and stress vector σ̃, defined as
ε11 σ11
ε22 σ22
ε33 σ33
2ε23 ,
[ε̃] = [σ̃] =
σ23
(1.27)
2ε13 σ13
2ε12 σ12
The factor 2 in the shear strain components in Voigt notation (which is not found in the stress
vector) is definition, which was introduced so that the energy density (1.25) can conveniently
be written in analogy to (1.24) as
1 1
W = ε̃ · σ̃ = (σ11 ε11 + σ22 ε22 + σ33 ε33 + 2σ23 ε23 + 2σ13 ε13 + 2σ12 ε12 ) , (1.28)
2 2
where the off-diagonal terms are correctly double-counted.
The constitutive relation of linear elasticity, Eq. (1.19), in Voigt notation becomes
σ̃ = E ε̃ (1.29)
or equivalently
1 ∂W ∂ σ̃
W = ε̃ · E ε̃, so that σ̃ = and E = , (1.30)
2 ∂ ε̃ ∂ ε̃
where E is a material stiffness matrix depending on the material’s elastic constants. (This is
the Voigt notation analog to the fourth order tensor C). For example, for an isotropic linear
elastic material characterized by Young’s modulus E and Poisson’s ratio ν, the E-matrix in 3D
reads
1−ν
ν ν 0 0 0
ν
1−ν ν 0 0 0
E ν ν 1−ν 0 0 0
[E3D ] = 1−2ν
. (1.31)
0
(1 + ν)(1 − 2ν) 0 0 2 0 0
0 1−2ν
0 0 0 2 0
1−2ν
0 0 0 0 0 2
The 2D version depends on the assumed scenario, as one must differentiate between states of
plane stress and plane strain:
1 ν 0
E
[Eplane stress ] = ν 1 0 ,
1 − ν2 1−ν
0 0
2 (1.32)
1−ν ν 0
E
[Eplane strain ] = ν 1−ν 0 ,
(1 + ν)(1 − 2ν) 1−2ν
0 0 2
14
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
e1 s31= 0
s33= 0
e3
e2 s32= 0
e33= 0, e31= e32 = 0
Analogous E-matrices can be derived for other elastic constitutive laws (e.g., for general anisotropic
linear elastic media; see, e.g., this summary online).
To solve any mechanical problem, we need governing equations that describe how stresses and
strains vary over time and space. These are given by the conservation or balance laws.
First, we consider the balance of linear momentum (often referred to as Newton’s second
law ). For a macroscopic body Ω, it states that
X
Fi = maCM . (1.34)
i
That is, the sum of all forces Fi applied externally to a body Ω equals the total mass m of the
body times the acceleration of its center of mass, aCM . This product is the change of linear
momentum, assuming that the total mass m remains constant. Let us now consider a body Ω
as a deformable object, for which we can write the above balance law using integrals over Ω
and ∂Ω. Specifically, (1.34) is equivalent to
Z Z Z
σn dS + ρb dV = ρa dV , (1.35)
∂Ω Ω Ω
where the first term represents all external forces applied to the boundary ∂Ω of the body
through tractions t = σn, the second term denotes external forces in the form of distributed
body forces acting across the volume (such as gravity for which b = g), and the right-hand
side stems from applying the definition of the center of mass and its acceleration (assuming a
constant mass density ρ and constant total mass m):
R
d2 d2 Ω ρu dV d2 u
Z Z
1 1
aCM = 2 uCM = 2 R = ρ dV = ρa dV . (1.36)
dt dt Ω ρ dV m Ω dt2 m Ω
15
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Inserting (1.37) into (1.35) and bringing all volume integrals onto the same side of the equation
leads to
Z
(div σ + ρb − ρa) dV = 0. (1.39)
Ω
This relation must hold not only for the whole body Ω but also for any sub-body cut free from
Ω (as discussed in the context of free-body diagrams and inner forces in Mechanics 2 and in
Section 5.2 of Dynamics). For the integral in (1.39) to vanish for any arbitrary subset of Ω, we
must ultimately require that the integrand vanishes pointwise, i.e.,
This is the local form of the balance of linear momentum, which is – roughly speaking –
linear momentum balance formulated for an infinitesimally small material point. Written out
in components, the above balance of linear momentum in 3D turns into the three equations
Note that for static problems the above simplifies as there is no acceleration (ai = 0). Moreover,
in many practical problems we may neglect gravity or any other body force (bi = 0), so that
linear momentum balance becomes div σ = 0.
Inserting all of this into the local balance law of linear momentum (in the absence of body
forces) turns (1.41) into
∂σ11
div σ(x, t) = ρ(x)a(x, t) ⇒ ρ(x)ü(x, t) = (x, t) = [E(x)u,x (x, t)],x . (1.42)
∂x1
16
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
For the special case of a homogeneous rod having a uniform density ρ(x) = ρ = const. and a
uniform modulus E(x) = E = const., the above reduces to
s
E
ρü(x, t) = Eu,xx (x, t) ⇔ ü(x, t) = c2 u,xx (x, t) with c= (1.43)
ρ
This is the one-dimensional wave equation, governing the deformation and motion of the rod
in one dimension, and c is the longitudinal wave speed inside the rod. This partial differential
equation (PDE) can be solved if supplemented with appropriate initial and boundary conditions.
A general solution of traveling waves is of the type
u(x, t) = f1 (x − ct) + f2 (x + ct), (1.44)
where f1 and f2 are smooth, differentiable functions to be determined from the initial conditions.
Specific solutions can be found, e.g., in Example 1.4 below for a static problem, or in Section 5.3
of the Dynamics notes.
————
Example 1.4. Elastic rod hanging from the ceiling
+
The governing equation, viz. linear momentum balance, is the same as in
Example 1.3 above, except that we include the body force due to gravity: xi+1
ρ(x)a(x, t) = div σ(x, t) + ρ(x)g = E(x)u,x (x, t) ,x + ρ(x)g. (1.45)
xn
Here, we consider statics, so that we have ü(x, t) = 0 for all x ∈ Ω. Consequently, we look
for a time-independent displacement field solution u(x). In addition, ρ and E are constant.
Therefore, (1.45) reduces to
ρg ρg 2
u,xx (x) = − ⇒ u(x) = − x + c1 x + c2 , (1.46)
E 2E
whose solution was obtained by integrating twice. The unknown integration constants c1 , c2 ∈ R
are to be obtained from boundary conditions. Assuming that coordinate x runs downward,
starting from the ceiling, the rod’s fixed end at the ceiling implies that
u(0) = 0 ⇒ c2 = 0. (1.47)
The bottom end of the rod is free, which means that there can be no external force acting at
the bottom end. Therefore,
ρg
F (L) = Aσ(L) = AEu,x (L) = 0 ⇒ u,x (L) = 0 ⇔ c1 = L. (1.48)
E
Overall, this leads to the displacement field inside the rod as
ρg 2 ρg ρg
u(x) = − x + Lx = − x(x − 2L), (1.49)
2E E 2E
It is a simple exercise to verify that (1.49) satisfies both boundary conditions. Shown below is
the 1D displacement profile along the length of the beam (we typically plot the displacement
u(x) vertically against x, even though it is a longitudinal displacement field, as indicated by
the arrows).
17
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
x
L DL
Note that, from the above displacement field, we obtain the axial strain inside the rod as
ρg ρg ρg
ε = u,x = − x+ L= (L − x), (1.50)
E E E
which is not constant along its length but varies linearly due to the distributed gravity load.
The maximum strain (and maximum stress) is found at the top of the rod, where the maximum
gravity load acts, while the strain decreases linearly to zero towards its free end.
Finally, the extension of the rod under the action of gravity is obtained from the displacement
of the bottom end of the rod, since the change of length ∆L is nothing but the displacement at
the tip:
ρgL2
∆L = u(L) = . (1.51)
2E
————
1.6 Thermodynamics
The above principles and examples were of purely mechanical nature. When we consider the
wider field of problems arising in thermodynamics (such as thermal problems and heat con-
duction, which are often dealt with by finite elements), we need to include one more balance
law: the balance of energy (often also referred to as conservation of energy). It states that
the change of internal energy E inside a body Ω over time t balances the sum of (i) the energy
being produced inside the body by some heat source density s (e.g., through chemical reactions
or heating due to inelastic deformation processes), (ii) the outward flux q of heat across the
boundary ∂Ω of the body (e.g., heat lost through convection), and (iii) the mechanical power
P provided to the body by performing mechanical work (e.g., by applying forces that deform
the body). Mathematically, this is expressed as the balance law
Z Z
d
E= s dV − q · n dS + P. (1.52)
dt Ω ∂Ω
We can again invoke the divergence theorem to rewrite the heat flux term as
Z Z Z Z
q · n dS = qi ni dS = qi,i dS = div q dS, (1.53)
∂Ω ∂Ω Ω Ω
Energy is an extensive variable (the total energy doubles when adding two bodies of the same
energy). This is in contrast to intensive variables, such as temperature or pressure (when
adding two bodies having the same temperature (or pressure), the combined body has the same
18
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
temperature (or pressure) as the two individual bodies had previously). We can hence think of
extensive variables as quantities which, for a body Ω, are evaluated by some volume integral
over the body. Since energy is an extensive variable, we may introduce an internal energy
density e and write
Z Z
d
E= e dV ⇒ E= ė dV . (1.55)
Ω dt Ω
Analogously, we realize that the mechanical work done on the body implies a change in the
strain energy density:
Z Z Z
d
P = σij ε̇ij dV = Ẇ dV = W dV. (1.56)
Ω Ω dt Ω
Rewriting the balance law of energy, Eq. (1.52), now yields
Z Z Z Z
ė dV = s dV − div q dV + Ẇ dV, (1.57)
Ω Ω Ω Ω
Since the balance of energy does not only have to hold for the whole body Ω but also for any
sub-body ω ⊂ Ω (as previously discussed for linear momentum balance), we may conclude that
the local balance of energy is
ė = Ẇ + s − div q (1.59)
This is the local (i.e., pointwise) counterpart to the macroscopic energy balance (1.52) and
states that, at each point x ∈ Ω, the rate of energy change (ė) is given by the local production
of heat (s) plus the local mechanical power supplied (Ẇ ) minus the heat lost by outward fluxes
q away from the point.
Let us consider a purely thermal problem without mechanical energy (so Ẇ = 0). Thermally
stored energy is typically of the form e = ρcv T with mass density ρ(x), the specific heat capacity
cv (x), and a generally unknown temperature field T = T (x, t). Altogether, these specifications
turn the energy balance law (1.59) into
To make this problem solvable, we need to provide a constitutive law (as in the mechanical
case before). A commonly assumed constitutive relation for heat conduction is Fourier’s law,
which states
with a heat conductivity κ(x). (The minus sign indicates that heat flows from hot to cold, and
not vice-versa.) By the way, the above also introduces the components of the gradient of a
scalar field as
∂T
[grad T ]i = T,i = . (1.62)
∂xi
19
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
For the special case of a homogeneous body with spatially uniform material properties, this
reduces to the well-known heat equation (or the inhomogeneous Laplace equation):
For the special case of a 1D problem (such as heat conduction in a 1D rod), the heat equation
with T = T (x, t) reduces to the 1D heat equation:
Finally, whenever we consider a static problem, we assume that the body is in equilibrium and
the temperature field is constant over time, so T (x, t) = T (x). This simplifies the above to the
so-called Poisson equation
κ ∇2 T = −s, (1.67)
which yields the static temperature distribution T = T (x) for a given heat source density s(x).
If there is no internal heat source (s ≡ 0), then (1.67) implies that the temperature distribution
can vary only linearly across the body.
————
• ∂ΩD ≡ the Dirichlet boundary, prescribing the primary field (e.g., u, T , etc.):
On the Dirichlet boundary, the primary field is known (e.g., fixing the displacement u(0) =
0 in Example 1.4 of the bar hanging from the ceiling; or knowing the temperature T (x) on
some part of the boundary because it is in contact with a body of constant temperature).
Here and in the following, we use that hat (ˆ·) to indicate a known, prescribed function on
the boundary.
20
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
• ∂ΩN ≡ the Neumann boundary, prescribing derivatives of the primary field (e.g., ε,
grad T , etc.):
On the Neumann boundary, not the primary fields but their conjugate kinetic variables are
imposed (e.g., enforcing a zero force F (L) = EAu,x (L) = 0 in Example 1.4 at the bottom
end of the bar hanging from the ceiling; or knowing the heat flux across a boundary).
For most problems, the above differentiation is simple to make, so we can easily define ∂ΩD and
∂ΩN . Note that we may generally assume that
The latter equality implies that one cannot simultaneously impose a primary field and its
conjugate variable, and it holds strictly for problems with scalar primary fields (e.g., in thermal
problems). In mechanical problems one can consider scenarios in which, some displacement
components and some traction components are enforced at the same point (e.g., letting a body
slide frictionlessly on a rigid ground enforces zero displacements perpendicular to the ground
while having zero tractions parallel to the ground); in such cases there can be overlaps of ∂ΩD
and ∂ΩN . But one can never impose the same component of, e.g., displacements and tractions
on a boundary (if one applies a displacement, then the force follows from the body’s constitutive
response and cannot be prescribed; if one applies a force, then the displacement follows naturally
– one cannot impose both). Note that there can be exceptions to the above classification of
BCs. For example, we will discuss beams as a special case later, where both deflections and
rotations are primary fields – but let us not get into this complication now.
In addition to the above boundary conditions, all time-dependent problems require initial
conditions, e.g.,
T (x, 0) = T0 (x) ∀ x ∈ Ω,
(1.71)
or u(x, 0) = u0 (x) and v(x, 0) = v0 (x) ∀ x ∈ Ω.
In a thermal problem, we may start from some known initial temperature distribution T0 (x),
whereas in a mechanical problem the body’s initial displacements u0 (x) and its initial velocity
field v0 (x) may be known.
The number of required BCs/ICs depends on the order of a PDE. For example,
is first-order in time and therefore requires one IC, e.g., T (x, 0) = T0 (x). It is second-order
in space and hence requires BCs along all ∂Ω (e.g., two conditions per xi coordinate). By
contrast, the mechanical problem governed by linear momentum balance (see, e.g., the wave
equation (1.43)) is of second order in both space and time, hence requiring two initial conditions
(e.g., u(x, 0) = u0 (x) and v(x, 0) = v0 (x)) and two boundary conditions per direction (hence
BCs across the entire boundary ∂Ω).
In summary, we will have to solve the governing PDEs supplemented by appropriate ICs and
BCs, as required (quasistatic problems, of course, do not require any initial conditions). Those
systems of equations need to be solved for the primary fields (e.g., the temperature distribution
T or the displacements field u). For brevity, we will abbreviate some of the governing ODEs or
PDEs by differential operators in later sections (see Appendix A).
21
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
This concludes our mathematical detour into the governing equations of mechanical and ther-
modynamical (initial) boundary value problems. We have introduced those fields describing the
deformation, motion, and thermodynamics of bodies in space. We have formulated the con-
stitutive and balance equations governing their physical behavior. And we have supplemented
those with initial and boundary conditions, as needed to find solutions. The remaining question
is how to solve those equations.
22
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
2 Computational Methods
Unfortunately, analytical solutions to (I)BVPs of the above type are hardly ever available –
except for relatively simple problems involving
First, computers do not know any units – they deal with purely numerical values. There-
fore, any numerical technique must cope with the intrinsic units present in physical problems.
This is commonly done in one of two ways: either one defines a set of consistent standard units
to be used (e.g., only SI units) and tacitly implies that those units are being used throughout
(this is common practice in most commercial FEA codes), or one reduces the physical system
to a dimensionless problem. This is a more elegant way and will be discussed in Section 2.2.
Second, computers cannot deal with infinity – they can handle only finite values and
finite-sized arrays. For this reason5 , one may claim:
23
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
• A computer stores and operates rational numbers (in principle having infinite precision)
with a finite number of floating-point digits (defined by the machine precision limits).
• Instead of seeking a solution for the displacement field u(x, t) at every point x ∈ Ω and
for all times, we could set out to find solutions that are known only at certain discrete
points xi and possibly also at discrete time steps tα . This defines the concept of finite
differences, which will be discussed in Section 3.
The general approach taken by computational mechanics includes the following steps:
3. from the numerical model to a numerical solution: solving the numerical problem
computationally generally involves solution errors, which stem from round-off/floating-
point errors, iterative solution approaches, etc.
Ensuring that the obtained numerical results agree with the mathematical model (e.g., by
comparing the numerical solution to an analytical solution where available) is known as the
step of verification, while ensuring that the obtained results properly reflect reality (e.g.,
by comparing the numerical solution to experimental data) is the so-called validation step.
Verification and validation (often referred to as V&V) is an essential part of numerical modeling,
since the best numerical technique can lead to nonsensical results if it is not properly used, if
wrong material or geometric data are used, if inappropriate assumptions or simplifications are
being made, etc. It is the engineer’s job (our job) to make sure that any numerical model we use
is a suitable representation of physical reality – and to understand the intricacies of commonly
used numerical techniques is one of the objectives of this course.
?
=
verification
Before we can talk about specific techniques, let us briefly introduce the concept of dimensionless
forms, which may prove helpful later.
24
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
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.
Let us consider a particle of mass m, which is attached to a linear elastic spring of stiffness k
and subjected to an applied external force F (t). The vibration of the particle is described by
the equation of motion (i.e., linear momentum balance) along with an initial condition. Let
u(t) denote the position of the particle. Further, we assume an initial displacement u0 ̸= 0, zero
initial velocity, and that the spring is unstretched when u = 0.
The governing equations are hence linear momentum balance with the two initial conditions:
mü(t) = −ku + F (t),
(2.1)
u(0) = u0 and u̇(0) = 0.
To arrive at a dimensionless form, we start by making the displacement u dimensionless by the
normalization
u
u= ⇒ u = u0 u. (2.2)
u0
Note that we do not need to use the initial condition u0 (which would not make sense if u0 = 0,
e.g.), but we could use any non-zero length for this normalization. Insertion into the equation
of motion and dividing by the mass m yields
∂2 k F (t)
2
u=− u+ ,
∂t m u0 m (2.3)
u(0) = 1 and u̇(0) = 0.
p
The first equation in (2.3) shows that m/k must have the units of time (because ∂ 2 u/∂t2
must have the same units as −ku/m). Therefore, we may define a dimensionless time as
r r
t m ∂ k ∂
t= p ⇒ t= t ⇒ = , (2.4)
m/k k ∂t m ∂t
which turns the equation of motion in (2.3) into (after dividing by k/m)
∂2 F (t)
2u = −u + (2.5)
∂t ku0
and the initial conditions into
u(0) = 1 and u,t (0) = 0. (2.6)
Finally, we know from (2.5) that F (t)/(ku0 ) must be dimensionless, which allows us to introduce
a dimensionless force, depending on the dimensionless time as follows:
F t m
p
k
f (t) = (2.7)
ku0
25
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
We stress that the above dimensionless problem only depends on the ratio F/(ku0 ), and no
longer on mass m, stiffness k, initial displacement u0 , etc. This is a remarkable benefit of the
dimensionless form: it reduces the problem to a small set of independent parameters and finds
a dimensionless solution that applies to a wide range of parameters of the original problem
(which only enter when turning the dimensionless solution into a dimensional solution but are
not involved when solving the problem).
————
Example 2.2. Heat equation
————
26
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Analogously, any other problem can be made dimensionless by introducing proper normaliza-
tions and rewriting the governing equations and any initial and/or boundary conditions. A more
general protocol for finding dimensionless definitions based on a given set of system parameters
is given by Buckingham’s Π-theorem, which we do not discuss here (but you are welcome to
look it up, if you are interested and have not heard about it).
In the following, we usually assume that any given problem is dimensionless (even though not
showing the normalization specifically) or that standard units are to be used, so that we do not
discuss the issue of units any further.
27
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
While the field is defined at the grid points, its derivatives are not (if the function is known only
at the gradients and not in any small neighborhood near the grid points, we cannot rigorously
define a derivative there). In order to approximate derivatives at the grid points, we use Taylor
expansions. For example, a Taylor expansion in space yields
∂u (∆x)2 ∂ 2 u (∆x)3 ∂ 3 u
u(xj+1 , tα ) = uαj+1 = uαj + ∆x + + + O(∆x4 ),
∂x xj ,tα 2 ∂x2 xj ,tα 3! ∂x3 xj ,tα
(3.2)
∂u (∆x)2 ∂2u (∆x)3 ∂3u
u(xj−1 , tα ) = uαj−1 = uαj − ∆x + − + O(∆x4 ),
∂x xj ,tα 2 ∂x2 xj ,tα 3! ∂x3 xj ,tα
(3.3)
where O(·) denotes on the order of (·) and we arbitrarily truncated after the fourth term.
Addition of the two equations leads to
∂2u
uαj+1 + uαj−1 = 2uαj + (∆x)2 + O(∆x4 ) (3.4)
∂x2 xj ,tα
Re-arranging and dividing by ∆x2 , while noting that O(∆x4 )/∆x2 = O(∆x2 ), yields the finite-
difference approximation
∂2u α
uαj+1 − 2uαj + uαj−1
(xj , t ) = + O(∆x2 ) (3.5)
∂x2 (∆x)2
This is the central difference approximation of the second derivative, which is second-
order accurate as evident from O(∆x2 ). It approximates the spatial derivative of u at grid
point (xj , tα ) by using information from point (xj , tα ) and the two nearby grid points (xj−1 , tα )
and (xj+1 , tα ).
28
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
It is important to note that we must have the error of O(∆xn ) where n ≥ 1; otherwise, the
approximation does not converge as ∆x → 0. This requirement ensures the consistency
of a finite-difference approximation. If n < 1, then errors introduced by the finite-difference
approximation would grow with decreasing grid spacing, which is problematic and ensures no
convergence with grid refinement. In general, the error is controllable by the grid spacing ∆x,
so more accurate approximations can be obtained by decreasing the grid size.
Analogously, subtraction of (3.3) from (3.2) leads to the central difference approximation of
the first derivative in space (which is second-order accurate as well):
∂u ∂u uαj+1 − uαj−1
uαj+1 − uαj−1 = 2∆x + O(∆x3 ) ⇒ (xj , tα ) = + O(∆x2 ) (3.6)
∂x xj ,tα ∂x 2∆x
Here, the first derivative of u at grid point (xj , tα ) by using information from the two nearby
grid points (xj−1 , tα ) and (xj+1 , tα ). Note that no information from point (xj , tα ) is needed.
Of course, the same can be carried out for derivatives in time. Applying Taylor expansions
in the time domain and performing the same algebraic operations yields analogously, e.g.,
∂u ∂u uα+1
j − uα−1
j
uα+1
j −uα−1
j = 2∆t +O(∆t3 ) ⇒ (xj , tα ) = + O(∆t2 ) (3.7)
∂t xj ,tα ∂t 2∆t
∂u ∂u uα+1
j − uαj
uα+1
j − uαj = ∆t + O(∆t2 ) ⇒ (xj , tα ) = + O(∆t) (3.8)
∂t xj ,tα ∂t ∆t
This is known as the (first-order accurate) forward-Euler approximation of the first derivative
in time. It defines the derivative at grid point (xj , tα ) by using information from that grid point
and from (xj , tα+1 ).
Analogously, we can use the second Taylor expansion, Eq. (3.3), and truncate after the linear
term to obtain the backward-Euler approximation of the first derivative (which is first-order
accurate)
∂u ∂u uαj − uα−1
j
uαj − uα−1
j = ∆t + O(∆t2 ) ⇒ (xj , tα ) = + O(∆t) (3.9)
∂t xj ,tα ∂t ∆t
29
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
u u
Dx Dx
j-1 j j+1 j-1 j j+1
exact derivative forward-Euler approximation
u u
Dx Dx
j-1 j j+1 j-1 j j+1
backward-Euler approximation central-difference approximation
We point out that finite-difference approximations like the above can be extended in various
ways:
• By retaining more terms in the Taylor expansions and/or performing other subtrac-
tions/additions of Taylor expansions, one can arrive at higher-order approximations
of the first and second derivatives (involving more grid points) as well as approximations
for higher derivatives. The above presents only a small set of the simplest commonly
used stencils; see, e.g., the finite-difference tables on Wikipedia for various other approx-
imations up to high orders.
• Each of these schemes can be extended to higher dimensions by superimposing the above
approximations for each dimension. For example, if the Laplacian of a scalar function T
α = T (x , x , t), which leads to
is needed, we use a 3D grid (∆x1 , ∆x2 , t) and write Ti,j i j
∂2T ∂2T
∇2 T (xi , xj , tα ) = +
∂x21 ∂x22
(3.10)
uαi+1,j − 2uαi,j + uαi−1,j uαi,j+1 − 2uαi,j + uαi,j−1 2 2
= + + O(∆x1 , ∆x2 ).
(∆x1 )2 (∆x2 )2
Note that in higher dimensions one can also devise more complex approximations, which
do not simply follow from superposition in the different directions; but we will not discuss
those here.
• The extension to non-constant grid spacings ∆tα and ∆xi is possible but can become
cumbersome, since different types of approximations are needed in different grid points.
In order to numerically solve a PDE by finite differences, we choose suitable approximations for
all appearing derivatives appearing in the governing PDE. Let us demonstrate this procedure
by the following examples.
30
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
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.)
31
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
If, e.g., the temperature is known at both ends by Dirichlet BCs, then T1α and Tnα are known at
all times and can be directly enforced without the need to calculate those from finite differences.
If Neumann BCs are to be imposed, then those involve derivatives of the temperature field, which
can – again – be approximated by finite differences (see Example 1.4).
Next, let us slightly modify the above approach and use the backward-Euler approximation
(instead of the forward-Euler approximation) in time. This leads to
Tjα − Tjα−1 α − 2T α + T α
Tj+1 j j−1
=k 2
+ r(xj , tα ) + O(∆t, ∆x2 ). (3.14)
∆t (∆x)
Notice that now the newest time appearing in the above finite-
difference scheme is tα , and both sides of the equation contain Dx
information at time tα . Such a time-dependent finite-difference
Dt
scheme, which has unknown degrees of freedom at the newest time a+1
on both sides of the equation, is called an implicit scheme. Implicit
a
schemes do not allow us to compute the new grid point values
independently, as in the explicit scheme above. This is illustrated a-1
by the stencil on the right, showing that one cannot compute any j -1 j j +1
single grid point value at time tα based on known information.
In fact, (3.14) presents a linear system of equations to be solved for Tjα for j = 1, . . . , n. To see
this, let us rewrite (3.14) as
k ∆t
α
−cTj+1 + (1 + 2c)Tjα − cTj−1
α
≈ ∆t r(xj , tα ) + Tjα−1 with c= . (3.15)
(∆x)2
For a discretization containing n grid spatial points, the solution is hence obtained from solving
α + T α−1
α
.. T ∆t r1
.
1 1
.. ..
.. . .
.
.. ..
−c 1 + 2c −c . .
α−1
α α
−c 1 + 2c −c T j
= ∆t rj + Tj (3.16)
−c 1 + 2c −c . ..
..
.
..
.
.
. .
.
.
.
.. α α α−1
. Tn ∆t rn + Tn
Such a system of equations to be solved is typical for implicit schemes. We cannot directly
update each grid point but must solve for the solution at all grid points j = 1, . . . , n at the
new time simultaneously by solving the (linear) system of equations. Note that this is com-
putationally considerably more expensive than updating all grid points independently and in
parallel.
Further, suitable boundary conditions must be supplied. For example, if we have the essential
boundary condition Tjα = T̂j (tα ), we may replace the equation for Tjα in the above system
(i.e., the jth row in (3.16)) by Tjα = T̂j (tα ). By contrast, if we have a Neumann boundary
condition T,x (xj , tα ) = qj (tα ), then we need to introduce a finite-difference stencil to approx-
imate T,x (xj , tα ) and again replace the respective equation in the above system. This will be
demonstrated in Example 3.2.
————
32
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
+
and length L, which is fixed at its top and stretching in
the vertical direction under its own weight. We seek to xj+1
find the displacement field u(x) as a function of the axial
x-coordinate (running downward from the top of the bar,
as shown on the right). Gravity acts downward.
xn
In this case, the governing equation is linear momentum balance (see Example 1.4), viz.
ρg
div σ(x) + ρg = 0 ⇒ u,xx = − . (3.17)
E
Boundary conditions are (assuming a free end at x = L)
As shown in Example 1.4, the analytical solution is found by integrating (3.17) twice with
respect to x and imposing the boundary conditions, which yields
ρg
u(x) = (2L − x)x. (3.19)
2E
To find an approximate numerical solution, let us discretize the bar into n segments of equal
lengths ∆x = L/(n + 1), as shown above. Consequently, the (n + 1) grid points are located at
xj = jn for j = 0, . . . , n. The governing PDE (3.17) is of second order in space, so we may use
a central-difference approximation for the second derivative with respect to x, leading to the
discrete version of linear momentum balance:
uj+1 − 2uj + uj−1 ρg
2
+ O(∆x2 ) = − , (3.20)
(∆x) E
u0 = 0. (3.22)
The free bottom end of the bar requires imposing the derivative at that grid point. To this end,
we introduced a ghost node at xn+1 = xn + ∆x (which is outside the bar) to enforce the free
traction boundary condition, e.g., via a first-order forward-Euler approximation:
un+1 − un
=0 ⇔ un = un+1 . (3.23)
∆x
This completes the finite-difference formulation: central-difference stencil (3.21) is applied to
all interior nodes j = 1, . . . , n, while nodes 0 and n + 1 are updated by the boundary conditions
u0 = 0 and un+1 = un , respectively.
33
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Notice how we replaced the first and last rows in the above matrix and the respective entries in
the right-hand-side vector in order to enforce the two boundary conditions. This is a convenient
strategy to impose boundary conditions directly within the system to be solved (which we will
also exploit later in the context of finite elements).
Solving the above linear system for vector (u0 , . . . , un+1 ) yields the approximate finite-difference
solution, which is shown below for n = 9, 19, 29, 49, and 99, showing convergence with increasing
number of grid points towards the exact solution u(x) (included as the solid line). The shown
uE
values of (u1 , . . . , un ) are normalized such that ū = ρgL 2 and x̄ = x/L. Note that convergence
is from below, i.e., the discretized bar appears stiffer than it is in reality (a fact that we will get
back to later).
u
0.5 exact sol.
0.4
n = 99
0.3
n = 49
n = 29
0.2 n = 19
n = 9
0.1
x
0.2 0.4 0.6 0.8 1.0
This is not a time-dependent problem, hence our above definition of explicit vs. implicit schemes
does not apply. Yet, we see that solving for the unknowns involves the solution of a (linear)
system of equations. Therefore, one usually refers to an implicit solution scheme here as well,
since one cannot consecutively or independently in parallel solve for each grid point, but we
have to solve for all grid points at once by solving the above system of equations.
34
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
So far, we have derived finite difference approximations for derivatives in space and time, and we
have discussed the explicit and implicit finite-difference schemes resulting from applying those
approximations to PDEs. We still need to discuss the suitability of particular combinations
of finite-difference combinations in space and time for a particular PDE. Unfortunately, not
every choice of finite-difference approximations is a good one, as some schemes are known
to become unstable and produce nonsensical results (as we will see below). This raises the
question of finite-difference stability, which is classically associated with two concepts we
need to discuss:
• 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.
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.
35
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
the type
for some arbitrary (sufficiently smooth) functions f1 and f2 . This implies that
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
The fan enclosed below these two lines is the mathematical domain of dependence (shown
above in red), since any point inside the fan can affect the solution on the bounding curves
of the cone and hence can affect u(xj , tα ). The latter does not apply to points outside the
fan. Physically speaking, if an event occurs outside the red fan, it cannot propagate sufficiently
fast to grid point xj to reach the latter at or before time tα . Mathematically speaking, we
may invoke d’Alembert’s formula: if the initial conditions are supplied as u(x, t0 ) = u0 (x) and
u̇(x, t0 ) = v0 (x), then
α
u0 (xj + ctα ) + u0 (xj − ctα ) 1 xj +ct
Z
α
u(xj , t ) = + v0 (y) dy, (4.5)
2 2c xj −ctα
which again confirms that u(xj , tα ) depends only on information which, at time t0 = 0, is
contained within the range xj − ctα ≤ x ≤ xj + ctα . Anything outside does not affect u(xj , tα ).
The Courant-Friedrichs-Levy (CFL) condition6 now states that convergence, and thus
stability, requires that the mathematical domain of dependence is contained within the numerical
domain of dependence. In other words, to give the numerical scheme a chance to converge to the
correct solution, it must have sufficient information to find the correct solution; this is only the
case of the numerical domain of dependence (which affects the solution at future times) includes
the mathematical domain of dependence (which affects the analytical solution at future times).
For the above example of the 1D wave equation, this implies that the fan of the mathematical
domain of dependence must be enclosed by the fan of the numerical domain of dependence,
which – by comparing the slopes of the bounding lines – is equivalent to requiring that
∆x ∆x c ∆t c ∆t
− ≤c≤ ⇔ −1≤ ≤1 ⇔ ≤ 1. (4.6)
∆t ∆t ∆x ∆x
This is the CFL condition for the 1D wave equation. One often defines
c ∆t
σ= (4.7)
∆x
as the so-called CFL number (or Courant number), so that −1 ≤ σ ≤ 1. We point out
that this is unfortunately only a necessary condition of stability. Mathematically speaking, it
stems from a linear stability analysis only and is not sufficient – though a good indicator – for
guaranteeing the stability of the finite-difference scheme. In order to determine the sufficient
condition(s) of stability, we need to discuss the methods described in the following.
6
The CFL condition is named after mathematicians Richard Courant, Kurt Friedrichs, and Hans Lewy, who
introduced it in a seminal paper in 1928.
36
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Loosely speaking, stability requires that small errors in the numerical solution uαj (which always
exist due to round-off errors and machine precision) remain bounded and do not grow over time,
when the finite-difference scheme is applied time and time again in an iterative fashion. The
latter would imply instability and result in exponential growth of numerical noise over time.
Assume that at any given time there appears a small noise in the solution, which we call u(x).
Recall from
P analysis that any arbitrary function f (x) can be decomposed into a Fourier series:
u(x) ≈ ∞ i=0 uk eikx . Since the PDE and the finite-difference stencils in our case are all linear,
we may consider only a single term in that infinite series and consider its stability in isolation
(if any one of those terms causes instability and hence exponential growth over time, then the
scheme is unstable). For the same reason, the amplitudes uk play no significant role. Therefore,
we consider noise of the type
where 1/k√∈ R is the wavelength of the noise (and the minus sign is only for convenience later)
and i = −1. The question is now: given a finite-difference scheme, what happens to such
noise over time? For example, a moving wave has the form
With the finite-difference approximation, this becomes at some time tα and location xj (assum-
ing uniform spacings ∆t and ∆x)
α −kx )
u(xj , tα ) ∼ ei(ωt j
= ei(ωα ∆t−j ∆x k) . (4.10)
Note that this function maintains a constant amplitude over time. To allow the amplitude
to increase or decrease, the method known as von Neumann analysis7 starts with a more
general ansatz by defining z = eiω∆t ∈ C, which turns (4.10) into
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
Stability requires that ∥z∥ ≤ 1 because, otherwise, exponential growth occurs over time. If
∥z∥ > 1, then uαj = z uα−1
j and ||uα+1
j || > ||uαj ||, and the analogous applies to all time steps,
thus implying exponential growth over time.
7
This method was originally developed at Los Alamos National Laboratory based on 1947 work by John Crank
and Phyllis Nicolson. However, it is named after John von Neumann, who more rigorously studied the concepts
in 1950.
37
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
As an illustrative example, let us consider the advection equation governing, e.g., fluid trans-
port processes, which we introduced in Section 1.7. The unknown field u(x, t) is governed by
Let us perform von Neumann stability analysis, which starts by assuming an error of the type
uαj = z α e−ikxj with z ∈ C. (4.17)
————
38
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Unconditional stability is generally observed only in implicit schemes, never in explicit schemes.
This can be a significant advantage of an implicit finite-difference scheme, as it implies arbitrary
choices of ∆t and ∆x are possible, in principle. Note that, unfortunately, not every implicit
scheme is unconditionally stable. Explicit schemes are usually conditionally stable or uncon-
ditionally unstable, as we explore in the following and in the projects. This may pose severe
restrictions on the admissible choices of ∆x and/or ∆t.
As a more advnaced example, let us again consider the stencil (4.1) for the 1D wave equation:
uα+1
j − 2uαj + ujα−1 uα
2 j+1
− 2uαj + uαj−1
=c . (4.23)
(∆t)2 (∆x)2
c2 (∆t)2 α −i(j+1)∆x k
z α+1 − 2z α + z α−1 e−ijk∆x = −ijk∆x −i(j−1)∆x k
z e − 2e + e . (4.24)
(∆x)2
Dividing by z α e−ijk∆x and noting that e−i ∆x k + e+i ∆x k = 2 cos(k ∆x) leads to
c2 (∆t)2 h −i ∆x k i
z − 2 + z −1 = e − 2 + e +i ∆x k
= 2σ 2 [cos(k ∆x) − 1] (4.25)
(∆x)2
with
∆t
σ=c . (4.26)
∆x
Multiplying by z turns (4.25) into a quadratic equation in z,
z 2 − 2 1 + σ 2 [cos(k ∆x) − 1] z + 1 = 0,
(4.27)
whose solution is
q
z = 1 + σ [cos(k ∆x) − 1] ± (1 + σ 2 [cos(k ∆x) − 1])2 − 1
2
p (4.28)
= 1 + σ 2 [cos(k ∆x) − 1] ± |σ| [cos(k ∆x) − 1] (2 + σ 2 [cos(k ∆x) − 1]).
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]),
Recall that stability requires that ||z|| ≤ 1, which is indeed the case here for all choices of k ∆x.
39
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
By contrast,
so that for some values of k∆x (e.g., the case when cos(k∆x) = −1) the above term is positive
and hence
p
[cos(k ∆x) − 1] (2 + σ 2 [cos(k ∆x) − 1]) ∈ R for some values of k ∆x.
Consequently, for some values of k∆x the norm of z in this case evaluates to
p
∥z∥ = 1 + σ 2 [cos(k ∆x) − 1] ± |σ| [cos(k ∆x) − 1] (2 + σ 2 [cos(k ∆x) − 1]) . (4.32)
Recall that for stability we need to have ∥z∥ ≤ 1 for all possible choices of k ∆x. Now, take,
e.g., the special case cos(k∆x) = −1, for which we conclude
p p
∥z∥± = 1 + σ 2 [−1 − 1] ± |σ| [−1 − 1] (2 + σ 2 [−1 − 1]) = 1 − 2σ 2 ± 2|σ| σ 2 − 1 . (4.33)
This means that, for any possible choice of a disturbance of wavelength k, that disturbance
will not grow over time but remain bounded if |σ| ≤ 1, which implies stability. If, by contrast,
|σ| > 1, there are are certain disturbances that will grow exponentially over time, hence implying
instability.
Recall the definition of σ in (4.26), which allows us to formulate the condition for stability as
∆t
|σ| ≤ 1 ⇔ −1≤c ≤ 1. (4.35)
∆x
Since stability depends on this condition (and ∆x and ∆t cannot be chosen arbitrarily), we say
the scheme is conditionally stable: if (4.35) is satisfied, the scheme is stable. Otherwise, it
is not. This conditional stability is often observed for explicit schemes.
Shown below is an example of the solution obtained from the explicit finite difference scheme
for the wave equation, showing how violation of (4.35) leads to an unstable scheme (the solution
grows beyond bounds after a few time steps if c∆t/∆x > 1).
40
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Let us summarize the general procedure used for von Neumann analysis:
1. Insert the ansatz uαj = z α e−ijk∆x into the finite-difference scheme.
2. Simplify as much as possible, e.g., dividing by z α eijk∆x to remove all common terms.
Recall that eik∆x + e−ik∆x = 2 cos(k ∆x) and eik∆x − e−ik∆x = 2i sin(k∆x).
3. Solve for z.
If ∥z∥ ≤ 1 for all possible choices of ∆x and ∆t, then we say the scheme is unconditionally
stable (this is the best-case scenario). If ∥z∥ ≤ 1 holds only for specific choices of ∆x and/or
∆t, then we say the scheme is conditionally stable (to use the scheme, we must satisfy the
specific conditions). Finally, if ∥z∥ > 1 for all choices of ∆x and ∆t, then we say the scheme
is unconditionally unstable (this is the worst-case scenario: the scheme is useless).
Why do we care about the stability of a scheme? The Lax-Richtmyer theorem (also known
as Lax equivalence theorem) states that a finite-difference scheme converges if and only if
(1) the scheme is consistent (i.e., all truncation errors decay as ∆x, ∆t → 0) and
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.
Any finite-difference scheme introduces errors, since the exact governing PDE/ODE is approxi-
mated by finite differences, which are obtained from truncated Taylor series. Even if an implicit
is shown to be unconditionally stable (thus admitting arbitrary choices of ∆x and ∆t), this does
not imply that all choices of ∆x and ∆t are equally good choices. Aside from the stability of
the scheme, we also need to worry about the accuracy of solutions. Therefore, it makes sense to
briefly discuss what is known as phase error analysis – which, as we will see, is closely tied
to the above von Neumann stability analysis. We will specifically focus on the wave equation.
In phase error analysis, we are interested in how signals propagate by application of a finite-
difference scheme. For example, for the 1D wave equation we know that its exact solution
transports any initial condition u(0, t) at speeds ±c through the 1D bar. Specifically, if we use
the ansatz u(x, t) = ei(ωt−kx) and insert it into the wave equation, we obtain
This is known as the dispersion relation of the 1D wave equation and indicates that, for every
wavelength k of a given signal, there exists a unique frequency ω = ±ck, at which the signal
will propagate.
Now, let us turn to a finite-difference approximation. We assume that at a time tα the grid
point values correspond to a harmonic signal of the form
α −kx )
uαj = ûei(ωt j
= ei(ωα ∆t−j ∆x k) (4.37)
41
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
with frequency ω ∈ R and wavelength k ∈ R. Note that this is identical to how we started
our discussion of von Neumann analysis (cf. Eq. (4.37)). By the same argument made there,
viz. that we are concerned only with linear ODEs/PDEs, we may set û = 1 without loss of
generality and interpret the above as a single term in a Fourier series, so that, in principle,
any arbitrary function can be represented by the above upon superposition of many modes.
The idea of phase-error analysis is to insert (4.37) into a finite-difference scheme and to derive
the relation between ω and k. Ideally it should recover (4.36); however, the finite-difference
approximation introduces errors.
Example 4.3. Phase-error analysis of the explicit scheme for the wave equation
As an instructive example, we consider the same explicit scheme for the 1D wave equation
already introduced in Example 4.2, viz.
uα+1
j − 2uαj + ujα−1 uαj+1 − 2uαj + uαj−1
= c2 . (4.38)
(∆t)2 (∆x)2
For given choices of the grid spacings ∆x and ∆t, the above presents a relation between fre-
quency ω and wavelength k. In other words, if an initial signal is a harmonic function of
wavelength k, then (4.42) defines the frequency (or frequencies) ω at which the signal will prop-
agate. Conversely, if we excited the bar with a signal at frequency ω, (4.42) yields the wave
length k at which the excitation will propagate through the bar.
Note that for small values of |ω ∆t| ≪ 1 and |k ∆x| ≪ 1, we may expand (4.42) to leading order
(using sin x = x + O(x2 ) and recalling σ = c∆t/∆x):
ω ∆t k ∆x c∆t
≈ σ ⇔ |ω∆t| = |k| ∆x ⇔ |ω| = c|k|, (4.43)
2 2 ∆x
which matches the exact dispersion relation (4.36). Hence, in the limit of a very fine grid, the
finite-difference scheme is expected to reproduce the exact behavior. By contrast, for general
values of ω ∆t and k ∆x, (4.42) does not agree with the exact relation and hence introduces an
error, the so-called phase error.
42
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
As shown above, using the explicit finite difference scheme for the wave equation indeed incurs
phase error if |σ| < 1. The below figure shows the results obtained from the finite difference
scheme for σ = 0.7. An initial wave is imposed at the left end, which travels in the positive
x-direction. Though the scheme is stable for σ = c∆t/∆x = 0.7 < 1 (as expected from von
Neumann analysis), it produces significant phase error – see the region highlighted by the dashed
ellipse. Certain frequencies cannot propagate due to numerical damping, so that the wave form
changes and errors grow over time. (For comparison, the same solution for c∆t/∆x = 1 was
shown on page 41.)
u(t)
u(t1) u(t2) u(t3)
To better understand the implications of the numerical dispersion relation (4.42), let us consider
three cases:
which agrees with the exact dispersion relation (4.36). Therefore, if we choose ∆t and ∆x
such that σ = c∆t/∆x = 1, the finite-difference scheme may produce exact results.
Note that the left-hand side varies between [0, 1], whereas the right-hand side covers the
range [0, σ]. Therefore, there are cases of k for which the right-hand side becomes larger
than 1, so that there is no real ω that solves the above equation. Therefore, solutions must
be complex: ω ∈ C. We may also look back at the alternative form (4.41): for some values
of k, the right-hand side of (4.41) becomes negative, so that there are solutions ω ∈ C
(because no real solution x exists for cos x > 1). Further, if ω ∈ C is a solution, then so
is ω † ∈ C (its complex conjugate). In this case either eiωt or e−iωt implies exponential
growth of solutions. Therefore, certain wave vectors k cause instability, and we may
conclude that for |σ| > 1 the scheme is unstable, since some small perturbations will grow
exponentially over time. Note that this agrees with the stability conditions we obtained
from von Neumann analysis (see Example 4.2).
• |σ| < 1: we showed in Section 4.2 that this case corresponds to a stable finite-difference
scheme. This is indeed confirmed here, where (4.46) must again be investigated: now,
since |σ| < 1, to any k ∈ R there exists a solution ω ∈ R, found by solving (4.46).
However, we notice that in this case there exist frequencies ω for which no solution k ∈ R
exists according to (4.46) (only solutions k ∈ C). This is illustrated in the plot below,
43
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
which shows that – for some value of σ < 1 – there are values of ω ∆t (shaded in red in
the plot) for which sin(ω∆t/2) > 1, so that (4.46) offers no real solution for k. Physically,
this implies that waves at those frequencies ω cannot propagate. Imagine, e.g., that one
end of the 1D bar is exciting at one of those “forbidden” frequencies ω by an external
excitation (through an applied Neumann or Dirichlet BC), then no wave inside the bar will
form that propagates the signal at constant amplitude, since no real wave vector k can be
found. (In fact, k ∈ C can be shown to produce damped solutions, i.e., displacement fields
u(x, t) that exponential decay with distance x into the bar). Consequently, for |σ| < 1
the scheme is stable but it damps certain frequencies and therefore shows so-called phase
error.
sin(ω Δt/2)
ω Δt
π 3π 5π
0 π 2π 3π
2 2 2
————
The above finite-difference schemes are powerful direct numerical techniques, which are rela-
tively simple to develop and easy to implement (especially for explicit schemes that do not
require the solution of global systems). These are key advantages of direct methods such as
finite differences.
However, they also come with considerable disadvantages. Problems associated with direct
methods such as finite differences include the following:
• a regular grid is required (which is fine for many fluid mechanics problems but oftentimes
problematic for complex solid geometries, especially when undergoing large deformation).
Adaptive grids or spatially varying grid sizes can be a solution, but they come with
considerable complications compared to the above examples.
• variables are defined only at grid points, hence the error is minimized only at grid points
(and we have no information about what happens between grid points; both the primary
44
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
fields and their errors are undefined between grid points). This can be problematic when
seeking approximate solutions that are “globally optimal ” (i.e., a solution could be correct
at grid points but nonsensical or erroneous in between). Also, one needs to address how
BCs/ICs can be applied in between grid points and how about moving BCs are imposed.
• stability/efficiency issues may arise due to the above stability restrictions. Choices of ∆t
and ∆x are not arbitrary but – aside from accuracy concerns – have strong influence on
the stability of a scheme. Especially for explicit finite-difference schemes (as we discuss
in the Exercises) dictates the maximum grid sizes to be used, which may impose severe
computational costs due to small grid spacings.
Of course, there is no free lunch. Every numerical technique comes with advantages and dis-
advantages, and it is up to the user to choose the right technique with the optimal accuracy
and efficiency for a given application. Given the above limitations, finite differences are un-
fortunately not ideal for simulating problems in solid mechanics, where we typically deal with
complex geometries and intricate loading and boundary conditions. Indirect methods (such as
the Finite Element Method) are therefore the method of choice in many engineering applications
involving solids and structures. Before we turn to the theoretical basis of indirect methods, we
will first introduce a simple tool for structural analysis (with direct relation to finite differences).
45
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Let us recall Example 3.2, where we calculated the deformation of an elastic rod hanging from
the ceiling and stretching under its own weight. The finite-difference approximation that we
derived there also admits a physical interpretation, as schematically shown below.
x0 m/2
m
g Dx m/2 Dx
x Dx =
^ k m
xj-1 m/2 m
k
u(x) L uj xj
+
+
k uj
xj+1
k
+ = m
xn m/2
Imagine that we subdivide the hanging elastic bar into n short bar segments, each of length
∆x = L/n. Let us refer to each segment as a bar element, while we refer to each point
connecting the segments as a node. If we assume that each bar bears a constant strain (but
the strain may, of course, vary from bar element to bar element), then we may replace each bar
element by an elastic spring of effective stiffness (with Young’s modulus E and cross-sectional
area A)
EA nEA
k= = . (5.1)
∆x L
At the same time, each bar element carries a mass m = ρA∆x = ρAL/n (with ρ being the mass
density), which we choose to distribute evenly to its two ends. As a result, we arrive at a chain
of n + 1 nodes (the inner ones having mass m as they are connected to two bars, the first and
last ones m/2) connected by identical linear springs of effective stiffness k = nEA/L. If node j
undergoes a downward displacement8 uj , then static force equilibrium for the jth (inner) node
becomes
nEA j nEA j+1 gρAL
− u − uj−1 + u − uj + =0 (5.2)
L L n
or (after some simplification)
2
j+1 j j−1 ρg L ρg
u − 2u + u =− = − (∆x)2 , (5.3)
E n E
which is identical to (3.21) from Example 3.2 for each inner mass. The corresponding equations
for the first and the last node follow from the boundary conditions: u0 = 0 is enforced at the top,
while the bottom node adheres to a different boundary condition, e.g., mg/2 = k(un−1 − un )
for equilibrium at a free end.
8
Note that we use superscripts j (instead of subscripts) to denote the number of a node here and in the
following for reasons that will become clear soon.
46
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Let us formulate the equilibrium relations in matrix form (analogous to 3.24) and forget about
the boundary conditions for a moment. This leads to
1
.. u 1
. .. 2
.. . 1
.
.. ..
k −2k k .
j
.
k −2k k
u + mg 1 = 0
⇔ KU = Fext (5.4)
k −2k k .
. ..
. .
.. ..
. .
1
1
..
. un | {z 2 }
=[F ]
| {z } | {z }
ext
=[K] =[U ]
Matrix K is referred to as the stiffness matrix, U is the vector of all nodal unknowns, and
Fext is the external force vector, i.e., the vector of all external forces applied to the nodes.
47
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
where we identify the individual contributions of the two springs, each characterized by a
stiffness matrix of the type in (5.7). Note that the springs acting simultaneously simply results
in the contributions of the two springs being summed. In addition, each spring acts on only
two specific nodes, and the components of the spring stiffness matrix of each spring are added
onto those components in (5.8) that correspond to those nodal degrees of freedom. (That is,
the spring with stiffness k1,2 acts on u1 and u2 , which are found in the first and second columns
and rows of [K] in (5.8). By contrast, the spring with stiffness k2,3 acts on u2 and u3 , which
are found in the second and third columns and rows of [K] in (5.8).) This addition of the
individual spring or bar element stiffness matrices into the total stiffness matrix is the process
of assembly.
Imagine that we add a third spring of stiffness k1,3 , which
connects nodes 1 and 3. What would the global stiffness u
1
u2 u3
matrix look like? Exactly:
k 1,2 k 2,3
k1,2 + k1,3 −k1,2 −k1,3
[K] = −k1,2 k1,2 + k2,3 −k2,3 . (5.9)
−k1,3 −k2,3 k2,3 + k1,3
k 1,3
Here and in the following, we must differentiate between the local stiffness matrix Ke of a
single element (which is of size 2 × 2 in 1D) and the global stiffness matrix (which is of size
n × n for a system having n nodes). For the assembly, we must know which spring is connecting
which nodes of the global system. This mapping from local onto global nodes (which reveals the
columns and rows in the global stiffness matrix to which a local contribution must be added)
is often referred to as the local-to-global map.
Let us mention that the specific structure of K that results from the above assembly process
of multiple springs, each having a positive stiffness, ensures that K is positive-semi-definite.
(We will show below that, if we impose suitable boundary conditions, the matrix becomes
positive-definite.)
Let us try to understand the components of K in more detail. To this end, consider the case of
n = 4, i.e., a chain of four particles elastically coupled by springs of uniform stiffness k. For a
static problem (neglecting dynamic effects), the equations of motion reduce to the equilibrium
equations:
1 1
k1,2 −k1,2 u Fext
−k1,2 k1,2 + k2,3 −k 2 2
2,3 = Fext
u
(5.10)
−k2,3 k2,3 + k3,4 −k3,4 u3 Fext 3
−k3,4 k3,4 u4 4
Fext
Let us assume displacements of the following type: we fix all degrees of freedom (dofs) and only
choose one non-zero dof. For example, we may choose u2 = 1 and ui = 0 else (i.e., only the
second particle is moved to the right by a distance 1, while all other particles stay put). As a
consequence, we obtain
1
k1,2 −k1,2 0 −k1,2 Fext
−k1,2 k1,2 + k2,3 −k2,3 2
1 = k1,2 + k2,3 = Fext .
3 (5.11)
−k2,3 k2,3 + k3,4 −k3,4 0 −k2,3 Fext
−k3,4 k3,4 0 0 4
Fext
48
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
0 1 0 0
K 12 K 22 K 32
This shows that, in order to displace the second particle by u2 = 1 while keeping all other
particles fixed (as shown above), we must apply the external forces (5.11) to the four particles;
a positive force to the second particle of magnitude K22 (to move it to the right), negative
forces to the first and third particle of magnitudes K12 and K32 (to keep them fixed), and no
force to the fourth particle. This shows that the second column of [K] represents the external
forces needed to move the second node by 1, while keeping all others fixed. Let us generalize
this observation:
The ith column of [K] contains those forces needed to move particle i by 1
(5.12)
without moving any of the other particles.
We hence recover that KU = Fint are the internal forces counteracting any externally applied
forces. That is, if external forces Fext are applied to the system, and if the particles consequently
displace by U , then KU are the internal forces produced by the system (e.g., through the
springs) to hold the external forces in balance. Equilibrium then requires that the internal force
of each particle equals the external force applied to that particle.
Notice the meaning of the diagonal stiffness component k(ii) : to displace particle i by 1 to the
right (while all other stay put), an external force of k(ii) (to the right) must be applied to particle
i. Since springs always apply a restoring force, we must have k(ii) > 0. k(ii) = 0 would imply
that particle i can be moved without applying any force (this can only be the case if particle i
is not properly connected to the neighboring particles via springs so rigid-body or zero-energy
modes exist).
Finally, we highlight that the above procedure results in a general approach to derive the stiffness
matrix of a given mechanical system: by displacing each degree of freedom by 1 and recording
the resulting forces on the nodes, we can assemble the complete stiffness matrix describing the
system. This is known as the direct stiffness method and will become handy later (e.g.,
when discussing beam elements).
So far we have only considered 1D deformation of bars. In general, the bar may be part of a 2D
or 3D structure and oriented in an arbitrary direction (and its two end points may move in any
direction). Therefore, it is important to generalize the above framework to higher dimensions.
This can be achieved by projecting the 2D or 3D displacements of the element nodes onto the
orientation of the bar element as follows.
That is, in 2D we deal with four nodal dofs (viz., the u1 - and u2 -displacement components of
each of the two nodes in the x1 - and x2 -directions, respectively), while in 3D we have six nodal
dofs (the u1 -, u2 - and u3 -displacement components of each of the two nodes). To make sure that
we do not confuse the two displacement components with the node numbering, we write the
index indicating the displacement component as a subscript, while the node number (here, a)
49
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
is a superscript (now we see why we switched to superscripts earlier). Moreover, we use the
subscript e to indicate a quantity associated with an element e. For example, Ue is the vector
of all nodal displacements of a single bar element e, while the global vector may be significantly
longer, depending on the number of bar elements to be considered in total.
We can obtain the (initial) orientation of an element in
u~
2 2
space from its nodal coordinates in the reference config- u e,2 e
T
uration, Xe = x1e , x2e such that ∆xe = x2e − x1e . In (x2 ,x2 )
e,1 e,2
u2 e,1
2D the angle with the x1 -axis is obtained from geometry
u~
as 1 1
u e,2 e
! j Dxe
x2e,2 − x1e,2 1
φe = arctan
x2e,1 − x1e,1
(5.14) (x1 ,x1 ) u
e,1 e,2 e,1
Since we are assuming small displacements (within the context of linear elasticity), we can find
a simple relation between the 2D (or 3D) displacements of the bar’s end points and the axial
deformation of the bar, as follows. The projection of the nodal displacements uae onto the
bar’s axis identifies the axial displacements Ũe of the two nodes (written with a tilde to avoid
ambiguity) as
1
ue,1
1
1
ũe cos φe sin φe 0 0 ue,2
2 = ⇔ Ũe = R(φe )Ue . (5.15)
ũe 0 0 cos φe sin φe u2e,1
u2e,2
| {z }
=[R(φ )]e
These relations can easily be verified by the help of the above sketch. Notice further that the
1 , F̃ 2 )T , can be decomposed into
resulting axial forces acting at the two nodes, F̃int,e = (F̃int,e int,e
the nodal forces in 2D,
1 1 2 2
T
Fint,e = Fint,e,1 , Fint,e,2 , Fint,e,1 , Fint,e,2 , (5.16)
via the analogous inverse relation
1
Fint,e,1
cos φe 0 !
1
Fint,e,2 sin φe 1
F̃int,e
0
F 2
=
0
2 ⇔ Fint,e = RT (φe )F̃int,e . (5.17)
int,e,1 cos φe F̃int,e
2
Fint,e,2 0 sin φe
Recall that we previously showed for linear elasticity that Fint,e = Ke Ue . Here, combining
(5.15) and (5.17) hence leads to
Fint,e = RT (φe )F̃int,e = Ke Ue = Ke RT (φe )Ũe ⇔ F̃int,e = R(φe )Ke RT (φe ) Ũe .
| {z }
=K̃e
This last equation, however, is the relation between the axial forces and the axial displacements.
The matrix in between must be the stiffness matrix of the bar moving only in 1D, as found in
(11.10). Therefore, we must have
EA 1 −1
[K̃e ] = (5.18)
∆xe −1 1
We have thus found the general 2D stiffness matrix of the bar element as
50
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Without derivation, we mention that the same relations apply in 3D, where each node has three
displacement components (and three force vector components). Here, relations (5.18) and (5.19)
still apply but with the 3D rotation matrix
l m n 0 0 0
R= , (5.21)
0 0 0 l m n
where l, m and n are, respectively, the direction cosines with the x1 -, x2 - and x3 -axes, i.e.,
l = cos ∠(x̃, e1 ) where x̃ is the unit vector pointing along the bar axis, m = cos ∠(x̃, e2 ), etc.
————
51
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
In order to find the nodal displacements in above truss problem, we need to formulate the
system of equations to be solved. This requires, as in the 1D case, the assembly of the global
stiffness matrix. Each of the above stiffness matrices represents a local stiffness matrix,
i.e., each of the matrices K1 , K2 and K3 are each valid only for one particular element, and the
matrices are therefore associated with the displacements of the nodes of the respective elements.
In order to solve the truss problem, we need to formulate the global system of equations for the
unknown displacements U = (u11 , u12 , u21 , u22 , u31 , u32 )T of the three nodes.
Notice that, to this end, we again differentiate between local and global dofs: e.g., bar element 2
(above) locally connects its two nodes with dofs (u1e,1 , u1e,2 ) and (u2e,1 , u2e,2 ). However, taking the
global view, it is linking the global nodes 2 and 3. Hence, local node 1 corresponds to the global
node 2, and local node 2 corresponds to the global node 3. This local-to-global map is an
essential book-keeping task within the FEM. To avoid confusion, we introduced the subscripts e
for local, element-internal quantities. For example, for element 2 we have u1e = u2 and u2e = u3 .
For element 3 we analogously have u1e = u1 and u2e = u3 , etc.
Let us continue Problem 5.1 using the above local-to-global map. Now that we have understood
how local nodes (1 and 2 for each bar element) are linked to global nodes (1, 2 and 3), we can
assemble the global system. All we must do is add the components of the local stiffness matrices
to the right spots in the global stiffness matrix. For example, K1 (linking nodes 1 and 2) in the
global system with U = (u11 , u12 , u21 , u22 , u31 , u32 )T becomes
1 0 −1 0 0 0
0 0 0 0 0 0
EA −1 0 1 0 0 0 .
[K1 ]global = (5.25)
L 0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
Likewise, K2 (linking the dofs of nodes 2 and 3) in the global system becomes
0 0 0 0 0 0
0 0 0 0 0
√ √0
EA
0 0 1
√ − 3 √−1 3
[K2 ]global = , (5.26)
0
4L 0 − 3 √3 3 −3
√
0 0 √−1 3 √1 − 3
0 0 3 −3 − 3 3
Consequently, we obtain the global stiffness matrix from assembly, (i.e., from the superposition
52
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
In order to solve for the deformation of the truss from Problem 5.1, F
we may now use the assembled global stiffness matrix, but we must 3 0
impose proper boundary conditions. First, we have an external
force F applied vertically downwards at node 3. Further, all three
nodes are free to move in the horizontal direction, hence not bear- L L
ing any force components in this direction. The only forces that ƒ ‚
are a-priori unknown are the two vertical reaction forces from the
ground. The global external force vector (collecting all external L 20
01
forces applied to the truss) hence reads
? ?
0
?
0
[Fext ] =
, (5.28)
?
0
−F
where we left question marks for the two unknown support reactions in the vertical direction
of the two sliders on the ground. (Of course, we could calculate the two unknown forces from
equilibrium as F/2, but we rather let our truss analysis yield those a-priori unknown forces as a
result.) The natural boundary conditions (here, the applied force F ) are thus imposed through
the external force vector Fext .
Now we must solve the FE governing equation Fint = Fext with Fint = KU , so
√ √
5 3 −4 0 −1 − 3 u11
√ √ 0
3 3 0 0 − 3 √ −3 1
√ u22 ?
EA −4
0 5 − 3 √ −1 3
u1 = 0 .
√
2 (5.29)
4L 0 0 − 3 √3 3 −3 u2 ?
√ 3
−1 − −1 u1 0
√ 3 √ 3 2 0
− 3 −3 3 −3 0 6 u32 −F
This problem is unfortunately ill-posed, since det K = 0, so we cannot find a solution (besides
not knowing the ?-components on the right-hand side). To render this problem well-posed, we
must impose essential boundary conditions.
In our truss example, we must constrain nodes 1 and 2 from moving off the ground, so we have
u12 = u22 = 0. This alone is insufficient to solve the problem uniquely, since the truss could still
translate freely in the horizontal direction. To remove this rigid-body mode, we further impose
arbitrarily u31 = 0 (which will result in symmetric deformation; we could alternatively have fixed
the horizontal component of any other node as well).
53
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Let us impose the essential BCs by modifying the respective rows and columns in the system,
which leads to
√ √ 1
3 −4 −1 − 3
5 0 u1 0
0 1 0 0 0 1
√ √0 u22 0
EA −4 0 5 − 3 −1 u1 = 0 ,
3
2 (5.30)
4L 0 0 0 1 0 0 u2 0
0
√ 0 √0 0 1 0 u31 0
− 3 −3 3 −3 0 6 u32 −F
where we simply replaced rows 2, 4 and 5 in such a fashion that they impose the conditions
u12 = u22 = 0 and u31 = 0. However, because those components are all zero, we can also zero out
columns 2, 4 and 5 in K without changing the system. Consequently, we only need to retain
rows and columns 1, 3 and 6 to solve the problem. This allows us formulate a reduced problem,
where we only retain rows and columns 1, 3 and 6 of K and Fext . Overall, we hence arrive at
the condensed linear system
√ 1
5 −4 −√ 3 u1 0
EA
−4
√ √5 3 u21 = 0 . (5.31)
4L 3
− 3 3 6 u2 −F
This shows that, as may be expected, the applied vertical load is distributed equally onto the two
sliders and that no horizontal force components are applied. Appendix B contains a discussion
of structural assembly and stiffness matrix properties.
————
Now that we have understood the calculation and assembly of the (local and global) stiffness
matrix of bars and trusses, let us introduce a simple but powerful alternative interpretation that
54
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
will become helpful in the following. A mechanical system composed of linear elastic elements
such as bars is governed by a linear system of equations,
KU = Fext , (5.34)
whose stiffness matrix K we understood (see Section 5.3) to contain columns of reaction forces.
Specifically, if we move the ith degree of freedom by 1, while fixing all remaining degrees of
freedom, then
0 0
.. K11 K12 K13 . . . K1n ..
. . K1i
..
K21 K22 K23 . . . . 0 K2i
0
⇒ ..
K
1
[U ] = [1ei ] = [KU ] = K31 1 = 3i .
K32 K33 . . . .
.
0 .. 0 ..
.. .. .. ..
.. . . . . . .
. .. Kni
Kn1 ... ... ... Knn
0 0
(5.35)
Since KU = Fext , this shows that the ith column of K is nothing but the forces acting on
all degrees of freedom, if the ith degree of freedom is moved by a unit displacement. This is a
powerful concept, which allows us to compute the stiffness matrix of any linear elastic system:
if we know the reaction forces at all nodes in response to moving any of the degrees of freedom,
then we can compute the entire stiffness matrix by the above principle. This is known as the
direct stiffness method. We will leverage it in Section 12 when constructing the stiffness
matrix of beam elements. Note that this method applies to trusses of arbitrary complexity.
Finally, let us make one more important observation that will allow us to re-formulate the
truss problem. As shown above, the governing equation for the linear elastic truss problem is
KU = F ext . It will be helpful to notice that this problem can be recast into an energy-based
formulation as follows. Let us assume in the following that the external forces are constant
(F ext = const.). This allows us to formulate the total potential energy of the truss as
1
I = U · KU − U · Fext (5.36)
2
55
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The first term denotes the elastic energy stored within the elastically deformed bars, while the
second term accounts for the work done by the (constant) external forces. The fact that the
first term indeed corresponds to the elastic energy can be readily verified by considering a single
1D bar with stiffness matrix
k −k
[K] = (5.37)
−k k
EA
with k = ∆x , so that a nodal displacement vector [U ] = (u1 , u2 )T leads to
1
1 1 1 2 k −k u
U · KU = (u , u ) ·
2 2 −k k u2
2 (5.38)
u1 − u2
k EA 1 EA 1
= (u1 − u2 )2 = (u − u2 )2 = ∆x = Eε2 A ∆x.
2 2∆x 2 ∆x 2
Realizing that 12 Eε2 (with ε = (u2 − u1 )/∆x being the constant strain within the bar) amounts
to the strain energy density inside the bar while A · ∆x is the volume of the bar, shows that
the above is indeed the total energy stored within the elastically deformed bar. This derivation
generalizes to more bar assemblies (but the math simply becomes more tedious – you are
welcome to try it out!).
If we now accept (5.36) as the definition of a total potential energy, then notice that differenti-
ating with respect to the vector of unknowns yields
∂I ∂2I
= KU − Fext and = K. (5.39)
∂U ∂U ∂U
This allows us to reformulate the boundary value problem as a minimization problem:
∂I
find U s.t. U = arg min I ⇒ = KU − Fext = 0. (5.40)
∂U
In other words, if U is a minimizer of the total potential energy I, then it must also satisfy
the equilibrium relation KU = Fext . (The fact that we speak about a minimum instead of a
general stationary point stems from the fact that K is positive-definite in well-posed problems.)
The relation (5.40) is often referred to as the principle of minimum potential energy: for
an elastic truss loaded by constant external forces, the actual nodal displacements resulting from
the loads are those that minimize the total potential energy.
Note that this relation provides a convenient shortcut, which we may exploit to derive the
stiffness matrix of an elastic bar (or other object), if only its internally stored potential energy
I is known:
∂2I
K= . (5.41)
∂U ∂U
We have discussed in this section a number of important concepts, which we will revisit later.
We have seen how static equilibrium for a linear elastic truss translates into a linear system
of equations, KU = Fext , which is to be solved for the vector of all nodal unknowns, U . We
have discussed the structure of the stiffness matrix K and its assembly from individual element
stiffness matrices, and we have seen how boundary value problems can be solved by imposing
56
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
boundary conditions and applying external forces. Most of these concepts are general and extend
well beyond the analysis of simple trusses. In fact, we have seen how the same principles can be
applied to finding the deformation of an elastic rod hanging from the ceiling and deforming under
its own weight. We have further extended the approach to simulate complex truss networks.
However, the bar description we used is fairly simplistic and restricted in the deformation modes
that can be simulated: we only considered axial deformation (stretching and compression) of
bars but neglected bending deformation and torsion – which are quite essential deformation
modes in real-world structures. Therefore, in the following we aim to extend our discussion to
beams.
57
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
6 Variational Calculus
All methods discussed so far had one aspect in common: they were based on the definition of
a finite set of discrete degrees of freedom. We began with finite differences, a direct numerical
method that aims to solve the ODEs/PDEs directly by evaluating the latter at discrete grid
points. We then transitioned naturally to bar networks, whose degrees of freedom were the
discrete set of nodal displacements. Yet, all were based on a description that restricted degrees
of freedom to be defined at discrete points. For general problems, we will need to deal with
continuous fields (or distributions) of unknown variables, such as the displacement field u(x, t)
or temperature field T (x, t) in a continuous body Ω. We therefore need a rigorous strategy to
search for fields as the solution to (initial) boundary value problems. Keeping in mind that
the objective of a numerical scheme is to turn continuous (infinite-dimensional) problems into
numerically solvable, discrete (finite-dimensional) problems (see Section 2.1), we must look for
ways to find approximate solutions for continuous fields in a numerically tractable manner.
ui =? u(x)=?
F ii -1 ii ii +1 F F
x
boundary value problem direct method indirect method
(e.g. finite differences) (e.g. finite elements)
This is where so-called indirect methods gain importance. Their strategy is to not solve the
ODEs/PDEs directly but to search for “optimal ” approximations from within a given space
of solutions. In a nutshell, one reduces the infinite-dimensional problem (aiming to find the
solution u(x, t) from the space of all functions) to a finite-dimensional problem by considering
solutions uh (x, t) ≈ u(x, t) that satisfy the BCs and ICs and approximate the exact solution
as well as possible, while being describable by a small set of unknowns. Particular questions to
be addressed include:
1. How do we choose uh (x, t)? For example, shall we approximate our unknown field by
polynomials or a Fourier series, by piecewise-polynomial or maybe even piecewise-constant
functions, or something else?
2. What does “approximating the exact solution as well as possible” mean in this context?
How do we quantify the total error between an approximation solution uh (x, t) and an
exact solution u(x, t) for a complex (initial) boundary value problem (especially if we do
not know the exact solution)?
For many physical problems, including the classical mechanical, thermal and also electromag-
netic boundary value problems, there is an intuitive way to arrive at an “optimal ” approxi-
mation, which is to invoke the principle of minimum potential energy. Recall how in
Section 5.7 we showed that the equilibrium solution of a discrete truss boundary value problem
could be identified as the minimizer of the total potential energy I. Back then, the solution
was simply a vector U of all nodal unknowns. For continuous rods, the sought solution must
be a continuous function, the displacement field u(x). To understand what energy must be
minimized and, moreover, how to minimize an energy over a function space, we first need to
58
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
introduce some of the fundamentals of variational calculus. This is the objective of this section.
Note that, for simplicity, we will formulate many concepts in 1D first with analogous general-
izations possible for higher dimensions, unless specifically stated otherwise. In addition, we will
restrict ourselves to static problems without time dependence (we will add dynamics later).
As a motivational example, let us revisit a simple physics problem. We know
from elementary physics that the energy stored in an elastic spring of stiffness
k, which is stretched by a distance ∆x, is 21 k(∆x)2 . If a spring is hanging
from the ceiling and a weight mg is attached at its free end, then the total
potential energy is k
1
I = kx2 − mgx,
2
(6.1)
m
where x denotes the elongation of the spring, and the second term enters as
the work done by the external force mg (or, alternatively interpreted, the x
potential energy of the attached mass m).
In order to calculate the stretched equilibrium length of the spring, we can apply linear momen-
tum balance (or force balance in the static case), which yields kx = mg and hence x = mg/k.
Alternatively, we may minimize the total energy with respect to x, leading to
∂I mg
= 0 = kx − mg ⇒ x= . (6.2)
∂x k
Note that the stationarity condition, kx = mg, is nothing but the static linear momentum
balance. Hence, as an alternative to formulating the force balance, we may minimize the total
energy I in order to find the equilibrium solution, and that solution is ensured to satisfy linear
momentum balance.
For the general thermo-mechanical continuum problems considered in this course, we would like
to have a similar concept at hand to turn equilibrium equations (such as the governing PDEs
discussed above) into energy minimization problems. Unfortunately, the situation is a bit more
complex than in the above spring example, since we here no longer seek to find equilibria
described by variables (like x above), but the solutions we aim to find are functions (such as
the displacement field u(x) in the previous sections).
We can intuitively imagine how to extend the concept though: we need to define an energy I,
which depends on u(x) and is to be minimized by the exact solution. However, we first need
to introduce some mathematical preliminaries related to the so-called functional I and how to
minimize such a functional with respect to a function (we can no longer take simple derivatives
to arrive at the stationarity conditions, since we are minimizing not with respect to a set of
variables but with respect to a function). The underlying mathematical concepts are known as
variational calculus.
f (x) = x2 . (6.3)
This function is a mapping: it takes as its input a scalar x ∈ R and maps it onto (or returns)
another scalar x2 > 0. We therefore also write f : R → R+ 0 . R is the domain of the function
(defining its input), whereas R+
0 is its range (defining its output).
59
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
x u1(x) energy I
-5 0 5 x
u2(x)
x
2 u3(x)
x
-10 0 10 x 0 u1 u3 u2
2
a function: f(x)=x a functional I [u]
as the space of all polynomial functions of degree up to n (since the coefficients ai can be
zero, Pn also contains all polynomials of degree lower than n; therefore, Pm ⊂ Pn if m < n).
For example, all polynomial functions up to quadratic order form the space P2 .
When looking for solutions u(x), we typically seek solutions within a particular function space U.
For example, a functional may impose constraints on the differentiability or integrability of a
function u(x). As an example, consider
Z 1
I[u] = u2,x (x) dx, (6.6)
0
which defines a functional I, which requires that u(x) is differentiable (i.e., possesses a first
derivative u,x ) and that this first derivative squared can be integrated to yield some finite value.
In this case, we say that u,x must be square-integrable.
60
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
f(x) c3
f,x(x)
c2 ...
c1
c0
x3
x0 x1 x2 x3 x x0 x1 x2 x
Therefore, polynomial functions u(x) ∈ Pn are admissible functions to be fed to the functional
(6.6), while piecewise-constant functions are not (as they do not possess the required differen-
tiability/integrability).
————
Functional I[u] in (6.6) restricts the function u(x) to belong to the function space
Z 1
u2,x (x) dx < ∞ .
U = u : (0, 1) → R such that (6.9)
0
In the following, it will be important to define such spaces U of admissible functions. For
convenience of notation, let us introduce the Sobolev space11
H k (Ω) = u : Ω → R such that ∥u∥H k (Ω) < ∞ ,
(6.10)
with the Sobolev norm (in 1D)
sZ Z Z
2
[u′ (x)]2 dx + . . . +
∥u∥H k (Ω) = u(x)2 dx + u(k) (x) dx. (6.11)
Ω Ω Ω
In simple terms (and this is all we will need to remember in the following),
H k (Ω) is the space of all functions whose derivatives up to kth order are
square-integrable (i.e., squaring and integrating them over Ω yields a finite value).
10
Rb
Recall that the Dirac delta function is characterized by a f (x)δ(x−xi ) dx = f (xi ) for any interval a < xi < b,
Rb
but a f (x)δ 2 (x − xi ) dx → ∞.
11
Though not needed for our purposes here, more information on Sobolev norms and spaces is available in
Appendix H.
61
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
For example, the functional in Eq. (6.6) requires u ∈ U ⊂ H 1 (0, 1); i.e., the first derivative
of functions u(x) must be square-integrable on the interval (0, 1). Of course, in this example
u(x) need not be square-integrable itself (the functional only contains u,x ), yet for our purposes
there exists no function u(x) which is not square-integrable while its first derivative is square-
integrable.
Example 6.2. Energy of a strained bar
Consider a bar of length L with constant Young’s modulus E and cross-sectional area A and
strain energy density W = E2 ε2 . The total energy I of the bar as a function of the 1D displace-
ment field u(x) is
Z L Z L
E
I[u] = W (ε) A dx = [u,x (x)]2 A dx, (6.12)
0 0 2
where we used that ε = u,x . We here must impose the restriction u ∈ H 1 (0, L) (unless when
dealing with discontinuities such as cracks) to ensure that the first derivative u,x is square-
integrable. Let us consider a hanging bar with a force F̂ applied at its free end (i.e., at x = L),
so we must subtract from the above energy the work done by the external force. This leads to
the total potential energy functional
Z L
E
I[u] = [u,x (x)]2 A dx − F̂ u(L) with u ∈ U ⊂ H 1 (0, 1). (6.13)
0 2
Minimizing this functional with respect to the unknown function u(x) is expected to yield the
sought solution. That is, among all possible functions u ∈ U ⊂ H 1 (0, 1), we need to find the
one that minimizes (6.13). Unfortunately, we still do not know how to minimize a functional
with respect to a function – which is what we discuss next.
————
6.3 Variations
62
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
k can be determined from the specific form of I[u] (and δu and u must lie in the same function
space since we want to be able to compute I[u + δu]). The fact that variations δu must vanish
on the Dirichlet boundary ∂ΩD stems from the need for perturbations that allow the perturbed
function u + δu to still satisfy the Dirichlet boundary conditions. Note also that we define U0
as the function space identical to U but with the restriction that δu = 0 on ∂ΩD .
With this we define the first variation of I (i.e., the analog of a first derivative) as
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.
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.
As an example for calculating the first and higher-order variations, let us consider the simple
introductory example of the functional
Z 1
I[u] = u2 dx so that we seek u ∈ U = H 0 (0, 1). (6.18)
0
d 1
Z Z 1
d 2 d
δI = lim I[u + ϵ δu] = lim (u + ϵ δu) dx = lim (u + ϵ δu)2 dx
ϵ→0 dϵ ϵ→0 dϵ 0 ϵ→0 0 dϵ
Z 1 Z 1 (6.19)
= lim 2(u + ϵ δu)δu dx = 2 u δu dx.
ϵ→0 0 0
63
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
since replacing u (which does not appear) by u+ϵδu (which hence also does not appear anywhere)
and then differentiating with respect to ϵ evaluates to zero. We have thus computed the first
and all higher variations of functional (6.18).
Notice that, when we expand the above functional by factoring out the quadratic term, we
arrive at
Z 1 Z 1 Z 1 Z 1
2 2
I[u + δu] = (u + δu) dx = u dx + 2u δu dx + (δu)2 dx
0 0 0 0 (6.22)
1 2
= I[u] + δI[u] + δ I[u],
2
and all higher-order terms vanish (as expected, since the functional involves u only up to
quadratic order). This confirms what can also be shown more generally: since a variation is the
analog of a derivative, we can use variations to expand a functional I[u] in a Taylor series as
1 2 1
I[u + δu] = I[u] + δI[u] + δ I[u] + δ 3 I[u] + . . . (6.23)
2! 3!
————
The following are helpful relations, which follow directly from the above definition of variations.
(Try and prove these using the definition in (6.16)!) For any functions u, v ∈ U, functionals
Ii : U → R, and constants αi ∈ R, the following relations hold – in close analogy to derivatives
of functions f1 , f2 :
• δ (α1 I1 + α2 I2 ) = α1 δI1 + α2 δI2 (due to the linear nature of the variation operator)
du d
• δ = δu (assuming sufficient differentiability of u)
dx dx
Z Z
• δ u dx = δu dx (assuming that the domain Ω is independent of u)
Ω Ω
Notice how the above relations for δu are analogous to those for a differential du. This analogy
often helps, e.g. we may compute (akin to the total differential)
In practical problems, the functional may involve a function u and/or some of its derivatives.
In general, such a functional in 1D has the form
Z
I[u] = f (u, u,x , u,xx , . . .) dx. (6.25)
Ω
With our definition of the first variation in mind, the above form implies that
Z
I[u + ϵ δu] = f (u + ϵδu, u,x + ϵδu,x , u,xx + ϵδu,xx , . . .) dx. (6.26)
Ω
64
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
As we are interested in the limit ϵ → 0, let us assume that ϵ is small, so that we may apply a
Taylor expansion about ϵ = 0 (assuming that Ω is independent of u and hence of ϵ):
Z
I[u + ϵ δu] = f (u, u,x , u,xx , . . .) dx
Ω
(ϵ δu)2 ∂ 2 f
Z
∂f
+ (ϵ δu) (u, u,x , . . .) + (u, u , u
,x ,xx , . . .) + . . . dx
Ω ∂u 2 ∂u2
(ϵ δu,x )2 ∂ 2 f
Z
∂f
+ (ϵ δu,x ) (u, u,x , . . .) + (u, u,x , u,xx , . . .) + . . . dx
Ω ∂u,x 2 ∂u2,x
(ϵ δu,xx )2 ∂ 2 f
Z
∂f
+ (ϵ δu,xx ) (u, u,x , . . .) + (u, u,x , u,xx , . . .) + . . . dx + . . . ,
Ω ∂u,xx 2 ∂u2,xx
(6.27)
which requires expansion in each derivative. Now, applying the definition of the first variation
from (6.16) with (6.27) and (6.25) yields
I[u + ϵ δu] − I[u]
δI[u] = lim
ϵ→0 ϵ
ϵ(δu)2 ∂ 2 f
Z
∂f 2
= lim δu (u, u,x , . . .) + (u, u , u
,x ,xx , . . .) + O(ϵ ) dx
ϵ→0 Ω ∂u 2 ∂u2
ϵ(δu,x )2 ∂ 2 f
Z
∂f 2
+ δu,x (u, u,x , . . .) + (u, u,x , u,xx , . . .) + O(ϵ ) dx
Ω ∂u,x 2 ∂u2,x
ϵ(δu,xx )2 ∂ 2 f
Z
∂f 2
+ δu,xx (u, u,x , . . .) + (u, u,x , u,xx , . . .) + O(ϵ ) dx + . . . ,
Ω ∂u,xx 2 ∂u2,xx
so that taking the limit ϵ → 0 finally leads to
Z
∂f ∂f ∂f
δI[u] = (u, u,x , . . .)δu + (u, u,x , . . .)δu,x + (u, u,x , . . .)δu,xx ] + . . . dx (6.28)
Ω ∂u ∂u,x ∂u,xx
or in short (omitting the dependencies and, again, assuming Ω is independent of u):
Z Z
∂f ∂f ∂f
I[u] = f (u, u,x , u,xx , . . .) dx ⇒ δI[u] = δu + δu,x + δu,xx + . . . dx
Ω Ω ∂u ∂u,x ∂u,xx
(6.29)
Notice the analogy between (6.29) and the total differential of a function f :
∂f ∂f
f = f (x, y, . . .) ⇒ df = dx + dy + . . . , (6.30)
∂x ∂y
or, if the function arguments are vector fields (we usually drop the sum by the summation
convention),
3
X ∂f ∂f
f = f (x, y, . . .) ⇒ df = dxi + dyi + . . . . (6.31)
∂xi ∂yi
i=1
This directly applies in higher dimensions – which will become important in the mechanical
boundary value soon. For example, for a displacement field u(x) : Ω → Rd in d dimensions, the
functional may involve all components of u and all their partial derivatives:
Z
I[u] = f (ui , ui,j , ui,jk . . .) dV. (6.32)
Ω
65
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Applying the definition of the first variation (and assuming Ω is independent of u) yields
Z
d
δI = lim f (ui + ϵδui , ui,j + ϵδui,j , ui,jk + ϵδui,jk , . . .) dV
ϵ→0 Ω dϵ
Z
∂f ∂f
= lim (ui + ϵδui , ui,j + ϵδui,j , . . .)δui + (ui + ϵδui , ui,j + ϵδui,j , . . .)δui,j + . . . dV
ϵ→0 Ω ∂ui ∂ui,j
Z
∂f ∂f
= (ui , ui,j , . . .)δui + (ui , ui,j , . . .)δui,j + . . . dV.
Ω ∂ui ∂ui,j
Now that we have established the basics of variational calculus, let us get back to our original
objective: exploit the variational structure of our boundary value problems to replace solving
the governing PDEs by solving an energy minimization problem. To this end, we need to show
that the solutions u ∈ U of a boundary value problem can be interpreted as extremal points
over U of a functional I[u]. Let us demonstrate this by the following example.
and we seek the displacement field u(x) from the function space
u ∈ U = u ∈ H 1 (0, L) : u(0) = 0 .
(6.35)
Since it is inconvenient to have both δu and δu,x in the above expressions, we apply integration
by parts to the first integral, which leads to
Z L
δI[u] = − [Eu,xx (x) + ρg] δu(x) A dx + EAu,x (L) δu(L) − EAu,x (0) δu(0) − F̂ δu(L).
0
(6.37)
66
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Noting that δu(0) = 0 because of essential boundary condition (we have u(0) = 0 and recall
that variations must vanish at points for essential boundary conditions are imposed), the above
reduces to
Z L h i
δI[u] = − [Eu,xx (x) + ρg] δu(x) A dx − F̂ − EAu,x (L) δu(L). (6.38)
0
δI[u] = 0 ∀ δu ∈ U0 . (6.39)
This implies that (6.38) must vanish for all variations δu ∈ U0 . This can only be true if
We realize that these are exactly the governing equation (linear momentum balance) and trac-
tion boundary condition which the bar needs to satisfy, cf. Eq. (8.25). Therefore, we have shown
that rendering functional (6.34) stationary with respect to u(x) ∈ U is equivalent to solving
(6.40) with u(0) = 0. That is, we have a strategy for replacing the solution of a differential
equation by an optimization problem, and we must in both cases obtain the same exact or
classical solution.
To see if the solution u(x) is a maximizer or minimizer of I, let us compute the second
variation:
Z L Z L
δ 2 I[u] = Eδu,x δu,x A dx = E (δu,x )2 dV ≥ 0 ∀ δu,x . (6.41)
0 0
Hence, δ 2 I[u] > 0 in general (unless for the special case δu ≡ 0). Analogous to classical analysis,
we conclude that the extremum is a minimizer. (If the second variation was negative, we would
have a maximum.) Note that we thereby tacitly assumed that E > 0. E < 0 would lead to
solutions being unstable energy maxima, which implies that E > 0 is a (necessary and sufficient)
stability condition for an elastic bar.
————
Let us revisit the hanging bar problem once more to observe a particular general structure of
the boundary value problem and its variational basis, which will come handy shortly. For the
hanging bar (assuming that E = const.), notice that we can rewrite the energy functional (6.34)
for short as
1
I[u] = B[u, u] − L[u], (6.42)
2
where we introduced a bilinear form B and a linear form L, defined as
Z L Z L
B[u, v] = Eu,x v,x A dx and L[u] = ρguA dx + F̂ u(L), (6.43)
0 0
We say a form B : U × V → R is bilinear if B[u, v] = B[v, u] (which is the case here). L is said
to be linear since it depends linearly on Ru. Note that in 1D we have u,x = grad u = u,x , so we
may also write more generally B[u, v] = Ω E(grad u)(grad v) dV (and the singular force at the
end can be also written in terms of surface tractions).
67
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The structure in (6.42) is in fact a recipe for a more general class of variational problems
(the same structure applies to heat conduction, electrostatics, or mechanical equilibrium, as
discussed later – the only difference is the exact form B and L). Let us therefore consider an
energy functional of the general form (6.42). Taking variations shows that
1
δI[u] = δB[u, u] − δL[u]
2
Z L Z L
1
= δ Eu,x u,x A dx − δ ρguA dx − F̂ δu(L)
2 0 0 (6.44)
Z L Z L
= Eu,x δu,x A dx − ρg δuA dx − F̂ δu(L)
0 0
= B[u, δu] − L[δu]
1
I[u] = B[u, u] − L[u] ⇒ δI[u] = B[u, δu] − L[δu] (6.45)
2
For example, in the hanging bar problem compare the energy functional (6.34) and the first
variation (6.36) with (6.45) to confirm the above relations.
For convenience, let us adopt the following notation found in various textbooks on finite el-
ements: since the first variation depends on both u and δu, it is often abbreviated as an
operator acting on both the unknown field u and its variation δu. To this end, we introduce
G : U × U0 → V ⊂ R such that
d
G[u, δu] = lim I[u + ϵ δu] (6.46)
ϵ→0 dϵ
Without proof, we remark that one of the beauties of the above variational problem (6.45) (based
on a bilinear form B and a linear form L) is that a unique minimizer exists by the Lax-Milgram
theorem (for more information see Appendix J). Recall that for the hanging bar problem above
we already showed that the solution is a unique (global) minimizer if E > 0. This is generally
true for (quasistatic) linear elastic problems, which, for suitable boundary conditions, have a
unique solution and hence a unique minimizer of the potential energy functional.
As a summary of this section on energy methods, we have shown that – in close analogy between
the truss problem in Section 5 – we can formulate boundary value problems involving continuous
fields, such as the displacement field in an elastic rod, as variational problems. For elastic
problems, we can find the unknown displacement field u(x) by minimizing the total potential
energy functional I[u] over all admissible functions u(x) (satisfying the essential boundary
conditions and living in the admissible function space). Given a suitable energy potential
I[u], we can prove that stationarity of I[u] is equivalent to solving the underlying ODE plus
boundary conditions. Moreover, we can judge from the second variation if an equilibrium is
stable or unstable.
The above principles apply generally to all elastic problems (in 1D, 2D, and 3D), in which we can
formulate the total potential energy. In the next section, we will discuss how this energy-based
68
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
framework can be used in the so-called Rayleigh-Ritz method to find approximate numerical
solutions, which minimize the total potential energy.
Even though we limit our discussion here to elastic boundary value problems, many other physi-
cal problems of interest possess a variational structure and can be formulated as an optimization
problem. This includes quasistatic thermal problems and electromagnetism, which all reduce to
the general structure in (6.45). For example,
κ∇2 T + s = 0 in Ω
T = T̂ on ∂ΩD (6.47)
∇T · n = q̂ on ∂ΩN
with temperature field T (x), heat source density s, thermal conductivity κ, surface normal
n, and heat flux q.
ϵ0 ∇2 ϕ + q = 0 in Ω
ϕ = ϕ̂ on ∂ΩD (6.49)
∇ϕ · n = q̂ on ∂ΩN
In each of these problems, the energy functional contains a ‘stored’ energy term (which is a
bilinear form of the primary field) as well as a term representing the ‘work’ done by inter-
nal/external sources or fluxes (which is a linear form). Therefore, all these examples have the
same general structure as in (6.45).
69
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
7 Rayleigh-Ritz Method
One way to exploit the variational structure discussed in Section 6 is the so-called Rayleigh-
Ritz method12 . Its idea is to introduce an approximate solution13 uh (x) based on trial or ansatz
functions N a (x), defining
n
X
h
u (x) = ua N a (x), (7.1)
a=0
where ua ∈ R are n + 1 unknown coefficients, while N a (x) are chosen and hence known ansatz
or base functions. These ansatz functions can, e.g., by of polynomial type, i.e., N a (x) = xa , so
that
n
X
h
u (x) = ua xa . (7.2)
a=0
Any choice of (linearly independent) ansatz functions is permissible including, e.g., Fourier se-
ries of cosine or sine terms. One important constraint is that the above ansatz must be chosen to
satisfy any existing essential boundary conditions and the differentiability/integrability require-
ments of the problem (e.g., a piecewise linear guess for uh (x) would not be permissible if its
derivatives must be square-integrable, etc.). For example, for the hanging bar problem, we need
to enforce u0 = 0 (because of the boundary condition u(0) = 0) and ensure that u ∈ H 1 (0; L).
Next, we insert uh (x) into the total energy functional I which, once all integrals have been
carried out, depends on the coefficients ua as the only unknowns. We know that the exact
equilibrium solution u(x) minimizes the total potential energy I[u]. Therefore, we conclude
that we must minimize I[uh ] with respect to ua , giving a system of equations as the stationarity
conditions:
∂I[uh ]
{u0 , . . . , un } = arg min I[uh ] ⇒ 0= ∀ a = 0, . . . , n (7.3)
∂ua
These are n + 1 equations for the n + 1 unknown coefficients ua .
Recall that we had expressed the energy functional in the general operator form (6.45), so that
" n n
# " n #
1 1 X X X
I[uh ] = B[uh , uh ] − L[uh ] = B ua N a (x), ub N b (x) − L ua N a (x)
2 2
a=0 b=0 a=0
n Xn n
(7.4)
1 X
a b a b
X
a a
= u u B[N , N ] − u L[N ].
2
a=0 b=0 a=0
where we exploited the (bi)linear nature of the two forms B[·, ·] and L[·]. For example, for the
polynomial series in (7.2) we find
n n n
1 XX a b X
I[uh ] = u u B[xa , xb ] − ua L[xa ], (7.5)
2
a=0 b=0 a=0
12
The numerical procedure behind this method was published by Walther Ritz in 1908-1909, though there is
debate about Lord Rayleigh’s previous use of related techniques. Therefore, the method is known both as the
Rayleigh-Ritz method and the Ritz method. For further information see ‘The historical bases of the Rayleigh and
Ritz methods’ .
13
The superscript h is a historical relic, stemming from the mathematical study of numerical approximations,
in which h was typically used to denote the grid spacing or element size. Therefore, here and in the following, we
adopt the common notation and add a superscript h to those quantities referring to numerical approximations
(of functions, function spaces, etc.).
70
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
This is a linear system of equations to be solved for the unknown coefficients ub (with b =
0, . . . , n), which we abbreviate as
n
X
K ab ub = F a for a = 1, . . . , n or KU = F (7.7)
b=0
Of course, the choice of symbols K and F was not random here: we notice the analogy to,
respectively, the stiffness matrix and external force vector in our truss analysis in Section 5. For
the same reasons introduced in Section 5, here and in the following we use the notation K ab for
the matrix component associated with coefficients a and b (instead of writing Kab ). The same
applies to the components F a of vector F . As for trusses, we will later need the analogous
concepts in higher dimensions, where each coefficient ua ∈ Rd is a vector having d components,
so we need to find all uai with a = 1, . . . , n and i = 1, . . . , d, and we will need matrices with
components Kij ab .
+
0 2 0
xi+1
Let us choose the ansatz
n
X
uh (x) = ua xa , (7.10) xn
a=1
Note that we start the summation at a = 1, since we must have u0 = 0 due to the essential
boundary condition u(0) = 0. When inserting (7.10) into (7.9) and carry out the integration
with respect to x, the resulting energy does not depend on x anymore but only on the un-
known coefficients ua , with respect to which it must be minimized. Notice how we thus have
transformed the infinite-dimensional problem (unknown general function u(x)) into a finite-
dimensional one (n unknown coefficients ua ). As a consequence, minimization now is relatively
simple: instead of performing variations we can simply minimize I[uh ] with respect to the scalar
unknowns ua :
∂I[uh ]
=0 for a = 1, . . . , n. (7.11)
∂ua
71
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
and
L L
La+1
Z Z
a a a a
F = L[N ] = L[x ] = ρ g x A dx = ρgA xa dx = ρgA . (7.13)
0 0 a+1
The above expressions allow us to evaluate the components of K and F for all combinations of
a and b (e.g., K 11 = EAL, K 12 = EAL2 , etc. and F 1 = 12 ρgAL2 , F 2 = 13 ρgAL3 , etc.).
ρgAL2 ρgL
K 11 u1 = F 1 ⇔ EALu1 = ⇒ uh (x) = u1 x = x. (7.14)
2 2E
Recalling that the exact solution, computed in (3.19), was quadratic, the above solution is
obviously not correct but an approximation. However, solving the linear system KU = F for
any n ≥ 2 (feel free to try this as an exercise at home) yields
ρg ρg
u1 = L u2 = − , and ua = 0 for all a > 2, (7.15)
E 2E
which is in fact the exact solution, see Eq. (3.19):
ρg
uh (x) = u1 x + u2 x2 = (2L − x)x = u(x). (7.16)
2E
This could have been expected since we chose polynomial ansatz functions in (7.2), taking
uh (x) ∈ Pn . The exact solution is a polynomial of order 2. If we choose uh (x) ∈ Pn with n ≥ 2,
the exact solution is contained in the solution space within which we are looking for the optimal
solution. As a consequence, the Rayleigh-Ritz approach must recover the exact solution as the
energy minimizer. Choosing any Pn with n > 2 does not affect the solution since P2 ⊂ Pn for
n > 2, so the solution is still contained in the solution space and therefore found. Finally, notice
that the linear approximation (7.14) is exact at x = L (the approximation is not bad after all,
it simply has no chance to improve towards the exact solution with only a single, linear term).
————
72
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
In the previous sections, we have seen how indirect methods aim at finding approximate solutions
to boundary value problems by introducing an approximate (finite-dimensional) solution space
and solving for the unknowns describing the approximate solution by enforcing the strong form
in some average sense. Rather than solving an ODE/PDE at every grid point as in finite
differences, we aimed to, e.g., minimize the total potential energy. This seeks optimal solutions
in an average sense: the total energy is minimized, instead of reducing the error locally. We
have also seen how an elastic boundary value problem can be linked to a variational structure,
which allowed us to replace the governing equations by an optimization problem. This in
turn was exploited, e.g., by the Rayleigh-Ritz method, which minimizes the total potential
energy over specific approximate solution spaces. We further showed that this minimization
problem led to a linear system of equations to be solved for the unknown coefficients of the
approximate solution. Hence, we have the tools to turn complex systems of differential equations
plus boundary conditions into linear systems of equations. In the following, we will compare the
different solution approaches we now have at our disposal, and we will discuss their important
differences, which are of importance for numerical techniques such as the finite element method.
Let us consider a general class of physical problems that are governed by a strong form of the
type (written in 1D for simplicity)
(E u,x ),x + s = 0 in Ω
(strong form) u = û on ∂ΩD (8.1)
Eu,x = t̂ on ∂ΩN .
This general description (in 1D) applies to the mechanical problem (where u is the displacement
field, E Young’s modulus, s = ρb body forces, û is a prescribed displacement, and t̂ a prescribed
surface traction) as well as to electrical problems (where u denotes the electric voltage potential,
E is the permittivity, s distributed body charges, and t̂ are surface charges) or the thermal
problem (where u is the temperature field, E is the thermal conductivity, s represents a heat
source density, and t̂ stands for heat fluxes). Various other problems possess the same structure.
To understand what types of solution u(x) qualify as solutions of problem (8.1), let us define
that a function u is of class C k (Ω) (or, in the function space C k (Ω)) with an integer k ≥ 0 if
it is k times continuously differentiable over Ω (i.e., u possesses derivatives up to the kth order,
and these derivatives are continuous functions). In short,
Consequently, the strong form of the form (8.1) imposes the requirement
u ∈ C 2 (Ω) (8.3)
That is, we require u(x) to be twice continuously differentiable in order for the strong form to
make sense14 . Such a solution of (8.1) is called strong solution or classical solution
14
To be exact, the strong form in fact requires that u ∈ C 2 (Ω) ∩ C 0 (Ω), i.e., functions u must be twice
continuously differentiable within Ω and at least continuous up to the boundary ∂Ω. But this detail is of minor
importance for us here and in the following.
73
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
• Any kth-order polynomial u ∈ Pk with k ≥ 0 is generally C ∞ (R). That is, we can take
infinitely many derivatives and those are all continuous (in this case, all derivatives u(n)
of order n > k will vanish). This exploits that C ∞ (Ω) = k≥0 C k (Ω).
T
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 (8.1) can alternatively be
found by using a variational approach, viz. as the minimizer of I[u] within a function space U,
which we write as
1
u = arg min I[u] : u ∈ U with I[u] = B[u, u] − L[u], (8.5)
2
whose stationarity condition is
δI[u] = G[u, δu] = B[u, δu] − L[δu] = 0 for all δu ∈ U0 (Ω). (8.6)
Therefore, we can reformulate the problem (8.1) in one of two ways, given a functional I : U → R
and the associated bilinear form B(·, ·) and linear form L(·), both defined on functions u ∈ U,
and function spaces
n o n o
U = u ∈ Hk (Ω) : u = û on ∂ΩD and U0 = u ∈ Hk (Ω) : u = 0 on ∂ΩD . (8.7)
On the one hand, we seek to
(weak form I) find u ∈ U s.t. u = arg min I[u], I[u] = 12 B[u, u] − L[u] (8.8)
On the other hand, we may
(weak form II) find u ∈ U s.t. G[u, v] = B[u, v] − L[v] = 0 for all v ∈ U0 (Ω) (8.9)
These two versions are known as the weak form, also known as the Galerkin weak form,
(hence the symbol G). The resulting solution u is called weak solution. We know that the
two versions have a unique connection since δI = B[u, δu] − L[δu]. Thus, we also know that
strategies (A) and (B) must be equivalent and lead to the same solution.
For the specific example of the mechanical (or thermal or electrical) boundary value problem
(see Sections 6.5 and 6.6), solutions are sought from the function space
U = u ∈ H1 (Ω) : u = û on ∂ΩD
(8.10)
74
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The terminology “strong” vs. “weak ” has the following origin. As discussed in Section 6, solving
the strong form or the weak form are, in principle, equivalent. In Example 6.4, we showed for
the hanging bar that the variational problem (8.8) is, in principle, equivalent to solving the
strong form (8.1). They are equivalent in principle only, for the following reason. Notice the
different requirements imposed on functions by the two forms for the mechanical problem:
strong form: u ∈ C 2 (Ω),
(8.11)
weak form: u ∈ H1 (Ω).
These two are not the same. To see this, note that, first,
C k (Ω) ⊃ C k−1 (Ω) ⊃ C k−2 (Ω) ⊃ . . . ⊃ C 0 (Ω). (8.12)
In other words, if a function is k times continuously differentiable, then it surely is also k − 1
times, k − 2 times, etc. continuously differentiable. In addition, we have15
C k (Ω) ⊂ H k (Ω) but H k (Ω) ̸⊂ C k (Ω) (8.13)
i.e., functions in C k (Ω) are also in H k (Ω) – but not vice-versa. If a function u has continuous
derivatives up to order k, then those derivatives are all square-integrable and hence u ∈ H k (Ω).
However, the kth derivative being square-integrable does not necessarily imply u ∈ C k (Ω),
since discontinuous functions can be square-integrable. An example is presented in Example 8.2
below.
Considering all of the above, we draw the following conclusions. For the mechanical problem, the
strong form requires u ∈ C 2 (Ω) ⊂ C 1 (Ω) ⊂ H 1 (Ω). Hence, a function that qualifies as a solution
of the strong form can also be a solution of the weak form. However, a solution of the weak
u ∈ H 1 (Ω) ̸⊂ C 2 (Ω) does not necessarily qualify as a solution of the strong form. Therefore,
in going from the strong to the weak form, we have relaxed (or weakened ) the requirements
on function u. This explains the origin of the terms “strong” and “weak ”: the weak form
imposes weaker constraints on the function space of the solution.
75
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The above function u(x) is by definition continuous (or compatible) at all xi . Its first derivative
is piecewise constant:
du X
u,x (x) = (x) = ai H(x − xi ). (8.15)
dx
i
(Note that there is, in principle a second term, ai (x − xi )δ(x − xi ), which however evaluates to
identically zero everywhere on R.) The above shows that u ∈ C 0 (R) (the function is continuous,
but its first derivative is not). Moreover, the piecewise constant function u,x is square-integrable,
hence u ∈ H 1 (Ω). Therefore, this piecewise linear u(x) qualifies as a weak solution.
is a sum of Dirac delta functions, so u,xx is not a continuous function and hence u ∈ / C 2 (Ω).
Such a function does not qualify as a solution to the strong form, as the governing PDE makes
little sense with sums of delta functions. Hence, continuous, piecewise linear functions qualify
as approximate solutions of the weak form but not of the strong form. We have thus relaxed the
requirements on our function when replacing the strong form by the weak form.
which is zero outside (−1, 1) and within this interval first rises from 0 to 1 and then decays back
to 0. This is a continuous, piecewise linear function. It’s first derivative is
This shows that piecewise constant approximations are generally not admissible as solutions –
neither of the strong form nor of the weak form of mechanical boundary value problems.
————
From a computational perspective, solving the weak form is usually preferable over the strong
form for (at least) two reasons. First, u ∈ H 1 (Ω) is simpler to satisfy than u ∈ C 2 (Ω) (e.g.,
piecewise linear interpolation is sufficient in the weak form but not in the strong form). Second,
as we showed already for the Rayleigh-Ritz approach, the weak form boils down to solving a
system of algebraic equations (rather than solving PDEs). This will be exploited in the finite
element method soon.
76
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Recall that the weak form could be formulated in two different ways, Eqs. (8.8) and (8.9).
While those two were shown to be equivalent, leading to the same solution, there is one essential
difference. Version (8.8) requires the formulation of the total potential energy. This is simple
for linear elasticity, but there are many problems for which a variational structure is hard or
impossible to find (e.g., when modeling plasticity or damage). In such cases, (8.8) cannot be
used. However, there is a way to arrive at the Galerkin weak form (8.9) – even without the
existence of a variational structure. This is what we would like to discuss here.
As introduced in basic mechanics and continuum mechanics courses (and therefore not discussed
here in detail), the equilibrium conditions of a mechanical boundary value problem can also be
stated in terms of the principle of virtual work. For example, for a solid body Ω undergoing
small deformation, the principle of virtual work states that
Z Z Z
σij u∗i,j dV = ρbi u∗i dV + t̂i u∗i dS (8.21)
Ω Ω ΩN
for any kinematically admissible virtual displacement field u∗ (x) defined on Ω. In other words,
when undergoing (virtual) displacements u∗ (x), the (virtual) work done by the internal stresses
σij equals the (virtual) work done by the applied body forces bi and surface tractions t̂i . Note
that admissibility in particular requires that u∗ = 0 everywhere on ∂ΩD , since no virtual
displacement can be applied to points on the surface that are restrained from moving.
The validity of (8.21) in our context is easy to prove. We use (σij ui ),j = σij,j ui + σij ui,j or,
equivalently, σij ui,j = (σij ui ),j − σij,j ui . Applying the divergence theorem to the term involving
(σij ui ),j yields
Z Z Z
∗ ∗
σij ui,j dV = σij nj ui dS − σij,j u∗i dV, (8.22)
Ω ∂Ω Ω
Since this equation must hold for all admissible virtual displacements u∗ , it is concluded that
we must have
These are equivalent to the (static) balance of linear momentum and the associated traction
boundary condition, so that (8.21) – when valid for all admissible virtual displacements u∗ –
indeed holds true and is an alternative expression of the balance of linear momentum and the
associated traction BCs, as stated in (8.24).
One may also look at this “backwards”: if σij,j + ρbi = 0 everywhere in Ω and if σij nj = t̂i
everywhere on ∂ΩN , then (8.23) must definitely hold (it is nothing but 0 integrated over Ω
and ∂ΩN ). (This perspective is taken in the so-called method of weighted residuals, see
Appendix D.) If (8.23) is true, then – by going through (8.22) – Eq. (8.21) applies as well. Ergo,
the strong form (8.24) implies the validity of (8.21).
77
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Example 8.3. Hanging bar under its own weight revisited (again, I know)
+
Eu,xx (x) + ρg = 0 (8.25)
Let us quickly show that this is indeed equivalent to the strong form. Integration by parts
applied to the first integral yields
Z L Z L
∗ L ∗
[Eu,x u A]0 − Eu,xx u A dx = ρgu∗ A dx + F̂ u∗ (L). (8.28)
0 0
As we require this equation to hold for any admissible function u∗ (x), we thus conclude that
the two terms in parentheses and brackets must vanish, viz.
Eu,xx + ρg = 0 for x ∈ (0, L), F̂ = EAu,x (L), (8.30)
which in turn confirms that a function u(x) that satisfies (8.27) for all admissible virtual dis-
placements u∗ (x), as well as the essential boundary condition u(0) = 0, is also a solution of
(8.25).
————
The above example admits one important general conclusion: if we interpret the virtual dis-
placement u∗ as a variation δu, then the principle of virtual work (8.27) is identical to
the first variation (6.36). This can be shown in general for elastic problems (and not only for
the hanging bar in 1D). The consequence is that the principle of virtual work allows us to for-
mulate the weak form without requiring a total energy functional. In fact, Eq. (8.27) is nothing
but G[u, u∗ ] = B[u, u∗ ] − L[u∗ ] = 0 for the hanging bar. This is an important observation for
formulating non-elastic problems, in which the total potential energy may not exist or cannot
easily be formulated. By using the principle of virtual work, Eq. (8.21), we may arrive at a
form G[u, u∗ ] = 0 equivalent to the first variation. We hence have a strategy to formulate the
weak form for problems with a variational structures (using the first variation) as well as one
for problems without (using the principle of virtual work) – and in case of variational problems,
the two approaches coincide.
78
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
9 Interpolation spaces
So far, we have assumed that the approximate solution uh (x) is based on a choice of basis
functions N a (x) with a = 1, . . . , n. Before discussing particular basis functions, it is important
to consider what conditions those shape functions N a (x) must satisfy in general and how we may
choose them wisely for numerical purposes. In the following, let us here discuss the requirements
that shape functions have to satisfy and, hence, appropriate interpolation spaces.
The idea of indirect numerical approaches is to find an approximate solution: we replace the
space U by a finite-dimensional subspace
U h ⊂ U, (9.1)
n
X
uh (x) = ua N a (x) (9.2)
a=1
Recall principle (B) in Eq. (8.9), which states the weak form as:
When using the approximation (9.2) in this context, we must also introduce an approximation
v h ∈ U0h ⊂ U0 (which must satisfy the same admissibility requirements as our variations δu ∈ U0
or as the virtual displacements u∗ )
m
X
h
v (x) = v a Ñ a (x) (9.4)
a=1
• We can use the same approximation space for uh and v h (i.e., n = m and N a = Ñ a ). This
is the so-called the Bubnov-Galerkin approximation: both uh and v h use the same
ansatz functions.
• Choosing different function spaces for uh and v h leads to the so-called Petrov-Galerkin
method. This method gains importance, among others, when solving over/underconstrained
problems since it allows us to control the number of equations by the choice of the dimen-
sion of the space of v h .
With the approximations (9.2) and (9.4), we can formulate the discrete problem
79
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
This is nothing but a discretized version of principle (B) from (8.9). If the approximate function
space contains the exact solution, i.e., if U ⊆ U h , then we may expect to find the exact solution
from (9.5).
It is a relatively simple exercise to verify that the discrete problem (9.5) reduces again to a
linear system of equations to be solved. To this end, insert the approximations (9.2) into (9.5)
to obtain
" n n
# " n #
X X X
B ua N a , vb N b = L vb N b for all (admissible) v b . (9.6)
a=1 b=1 b=1
Exploiting that B is bilinear and L is linear lets us transform the above into
n n
!
X X h i h i
vb ua B N a , N b − L N b = 0 for all (admissible) v b . (9.7)
b=1 a=1
This defines a linear system of equations to be solved for ua (a = 1, . . . , n). Let us define a
vector of all unknown coefficients:
T
U h = u1 , . . . , un .
(9.9)
Further, we define a (symmetric) matrix K ∈ Rn×n and vector F ∈ Rn with components
h i h i
K ab = B N a , N b , Fb = L Nb (9.10)
Note that, once shape functions N a (x) have been chosen for a = 1, . . . , n, components K ab
and F b can be uniquely calculated, so K and F are a constant, real-valued matrix and vector,
respectively. For example, for the hanging bar in 1D, using the bilinear and linear forms from
(6.43) yields
Z L
ab a b a b
K = B[N , N ] = EN,x (x)N,x (x)A dx,
0
Z L (9.11)
b b b b
F = L[N ] = ρgN (x)A dx + F̂ N (L).
0
This shows that K is indeed symmetric and, moreover, positive-semi-definite.
Comparing (9.10) to (7.6) shows that the obtained linear system of equations is identical to
that derived for the Rayleigh-Ritz method. This is, in fact, not surprising: for the Rayleigh-
Ritz method we inserted the approximate solution uh directly into I and minimized I[uh ] with
respect to the unknown coefficients ca . Here, we first obtained the exact stationarity equation
G[u, v] = 0 from I[u] and then inserted uh and v h . Yet, if we choose the very same function
space for uh and v h , then both methods should indeed lead to the same system of equations.
Thus, we may also re-interpret the Bubnov-Galerkin scheme as computing the coefficients ua as
the minimizers of I[uh ]. This can be convenient later in the finite element method, as it allows
to compute the system of equations to be solved for the unknown coefficients in two different
ways: from the weak form or from differentiating the total energy.
80
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
which are defined through a set of shape functions N a (x) for a = 1, . . . , n. In the following,
we discuss how to choose such shape functions.
Let us briefly introduce the support of a continuous function f : Ω → R as the set of all
points16 where f (x) ̸= 0, i.e.,
supp f = x ∈ Ω : f (x) ̸= 0 (9.14)
This means that f (x) = 0 for all points outside the support, i.e., for x ∈ Ω\ supp f .
In general, there are two possible choices for the nature of N a (x):
Examples of global (polynomial) shape functions and local shape functions with their supports
are shown below.
N 2(x)
N 1(x) N 2(x)
N 1(x) N 3(x)
x x
a 1 2
supp N supp N supp N
global shape functions local shape functions
Irrespective of their global or local nature, all shape functions should be carefully chosen.
Specifically, the following shape function properties must be satisfied:
(I) At any point x ∈ Ω there must be at least one a with 1 ≤ a ≤ n such that N a (x) ̸= 0
(i.e., the whole domain must be covered by the approximation). Otherwise, no
approximation would exist in certain regions or at certain points inside the body.
(II) The chosen shape functions N a should allow us in some “simple” manner to impose
Dirichlet boundary conditions, where required (recall that uh should satisfy the es-
sential BCs). This is obviously not a clearly defined criterion but an important one from
a practical perspective.
16
To be more specific, the support is the closure in Ω of the set of all points with non-zero f (x). Yet, this is
of minor importance here, so we will not make that differentiation.
81
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
which means both {u1 , . . . , un } and {u1 + α1 , . . . , un + αn } are solutions. In this case, the
problem is not well-posed.
For these reasons, we must define shape functions that are linearly independent. If func-
tions {N 1 , . . . , N n } are indeed linearly independent, then we call them a basis of U h .
(IV) The shape functions N a must satisfy the differentiability/integrability requirements
of the weak form (this depends on the problem to be solved, as discussed before in the
context of the weak form in Section 8). For example, for mechanical problems we had
seen that the weak form requires uh ∈ H 1 (Ω).
(V) The shape functions must possess “sufficient approximation
Pn power”. In other words,
consider u ∈ U ⊂ U: we should ensure that u = a=1 u N a → u as n → ∞ or, in
h h h a
other words,
for all u ∈ U there exists uh (v) ∈ U h such that lim ∥uh (v) − u∥ = 0. (9.18)
h→0
This important requirement ensures convergence and will be discussed in more detail in
Section 9.3 below .
Condition (V) above tells us that, for an approximation uh to converge to u, we must pick
an approximate function space U h which gives the solution uh “a chance to converge” to u.
For example, assume you aim to approximate a high-order polynomial u ∈ Pn (with n ≫
82
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Therefore, {N i } = {1, x, x2 , x3 , . . .}, i.e., the polynomials in R, is a suitable choice for the shape
functions to satisfy the so-called completeness property. Note that, as discussed above, one
cannot omit any intermediate-order terms from the set
If one or more terms are missing, then the set is not complete. As an extension, the Weierstrass
approximation theorem also applies to trigonometric polynomials (i.e., a Fourier series):
taking a Fourier series expansion with an increasing number of terms, e.g.,
{1, sin x, cos x, sin 2x, cos 2x, sin 3x, cos 3x, . . .} (9.20)
is also expected to converge to the exact solution, if no term in the Fourier series is missing.
When going to higher dimensions, we need to specify what complete polynomials are. Let us
first present the definition and then discuss its implications and examples:
Here, the sum over |α| = β implies that we are summing over all possible combinations of
{α1 , . . . , αd } in d dimensions such that |α| = α1 + . . . + αd = β.
Eq. (9.21) defines completeness of polynomial functions in higher dimensions. What does this
mean in practice and in simple terms? Let us check the specific cases of 1D, 2D, and 3D
polynomial functions.
Hence, the shape function basis is {1, x, x2 , x3 , . . . , xq }, and a polynomial of order q con-
tains q + 1 monomials. Thus, this reduces to the 1D case of Section 9.3.
2D: for d = 2 with coordinates x1 and x2 , the above definition of complete polynomials with
α = {α1 , α2 } yields
q
X X
uh = c(α1 ,α2 ) xα1 1 xα2 2 . (9.23)
β=0 α1 +α2 =β
83
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
This results in the following bases for polynomials that are complete up to order q:
q = 0 : {1}
q = 1 : {1, x1 , x2 }
q = 2 : {1, x1 , x2 , x21 , x1 x2 , x22 } (9.24)
q=3: {1, x1 , x2 , x21 , x1 x2 , x22 , x31 , x21 x2 , x1 x22 , x32 }
...
The number of independent monomials in 2D is (q + 1)(q + 2)/2.
Analogous to the 2D case, this leads to the following complete bases in 3D:
q = 0 : {1}
q = 1 : {1, x1 , x2 , x3 }
q = 2 : {1, x1 , x2 , x3 , x21 , x22 , x23 , x1 x2 , x1 x3 , x2 x3 }
(9.26)
q = 3 : {1, x1 , x2 , x3 , x21 , x22 , x23 , x1 x2 , x1 x3 , x2 x3 ,
x31 , x32 , x33 , x21 x2 , x21 x3 , x1 x22 , x22 x3 , x1 x23 , x2 x23 }
...
————
Imagine someone presents you with the following approximations in 2D (with coefficients ci ).
Up to which order are these complete?
————
This completes our discussion of shape function requirements. They should (I) cover the entire
domain, (II) allow us to easily imposed Dirichlet boundary conditions, (III) be linearly indepen-
dent, (IV) be sufficiently square-integrable/differentiable, and (V) have sufficient approximation
power (i.e., be complete and converge to the exact solution). This still does not tell us how to
choose shape functions {N 1 (x), . . . , N n (x)} – and this takes us directly to the finite element
method.
84
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
All of the shape functions introduced in previous examples were global, i.e., they were defined
over the entire body Ω. This has (at least) two major disadvantages.
First, global shape functions such as polynomials xa (for a = 0, . . . , n) are problematic when it
comes to Dirichlet BCs: imagine, e.g., prescribing the displacements at both ends of a 1D bar.
Enforcing uh (0) = 0 is simple, whereas setting uh (0) = 0 and simultaneously uh (L) = ∆u is
more involved as the latter leads to a condition involving all unknown coefficients:
n
X n
X
uh (x) = ua N a (x) ⇒ uh (0) = u0 = 0, uh (L) = ua N a (L) = ∆u. (10.1)
a=0 a=1
Such global coefficient constraints as given by the latter form are especially cumbersome when
dealing with multiple essential BCs in higher dimensions.
Second, global shape functions such as polynomials xa results in a dense stiffness matrix K,
when forming the linear system to be solved for the unknown coefficients by the various methods
introduced before. Recall that K ab depends on integrals of the type B[N a , N b ] = Ω N,x
a N b dx.
R
,x
If N a and N b extend over all of Ω for every combination a and b, then K ab ̸= 0 in general.
By contrast, if N a and N b are non-zero only in small regions of Ω, then most combinations
B[N a , N b ] = 0, leading to a sparse matrix. The dense K-matrix creates high computational
costs, whereas a sparse matrix would admit an efficient solving of the system of equations.
One motivation for the finite element method was hence to construct local shape functions
that admit the relatively easy implementation of essential BCs while also resulting in sparse
matrices.
The main idea is to introduce a discretization Th which splits Ω element
into a finite number of subdomains Ωe , the so-called elements, node
such that
[
Ωe ⊆ Ω, Ω= Ωe . (10.2)
e
(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
This is known as the Kronecker property of FE shape functions. In other words, each shape
function N a is 1 when evaluated at exactly one node a, and it vanishes at all other nodes. This
is the defining relation that determines the shape functions. Notice that if we evaluate the
85
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
That is, the coefficient ub can now be identified as uh (xb ), i.e., as the value of approximate func-
tion uh at node b. This makes for a very beneficial interpretation of the (yet to be determined)
shape function coefficients.
Notice that the Kronecker property 10.3 also allows us to impose an important constraint:
imagine that the solution field is constant, i.e., the exact solution is u(x) = c = const. with
some value c ∈ R. In this case we want the approximate solution to also be uh (x) = c. From
(10.4) we know that this requires that all nodal values are ua = c for all a = 1, . . . , n (i.e., if
every node has the same nodal value c). This leads to
n
X n
X n
X
h a a a
u (x) = u N (x) = c N (x) = c N a (x). (10.5)
a=1 a=1 a=1
Hence, to make sure that uh (x) = c is exact in case of a constant solution u(x), the FE shape
functions must satisfy the additional property that
n
X
N a (x) = 1 for all x ∈ Ω (10.6)
a=1
This condition ensures that constant functions are approximated correctly and is also known as
0th -order consistency.
Now that we have outlined the properties of FE shape functions, let us check if FE shape func-
tions satisfying (10.3) also satisfy the requirements for shape functions introduced in Section 9.2:
which contradicts the assumption that some ua ̸= 0. Thus, (10.3) ensures that we have
linearly independent shape functions.
(IV) Integrability/differentiability requirements depend on the variational problem to be solved
and must be ensured. For example, for the mechanical BVP we have seen that U h ⊂ H 1 ,
i.e., first derivatives must be square-integrable. Note that this guarantees that displace-
ments (0th derivatives) are continuous and thus compatible (no jumps in displacements).
86
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
This requirement is not a-priori satisfied by finite elements but imposes restrictions on the
type of piecewise-polynomial interpolation functions to be used. We will discuss specific
types of interpolation soon, starting in Section 11.
(V) Completeness requires, aside from choosing complete polynomials for the shape functions,
that uh → u (and thus U h → U) within desirable accuracy. In the FE method, one
commonly enriches U h by one of the following methods (shown schematically below):
• h-refinement: refining the discretization Th while keeping the polynomial interpo-
lation order within elements fixed (i.e., decreasing the element size while using the
same type of shape functions).
• p-refinement: increasing the polynomial interpolation order within a fixed dis-
cretization Th (i.e., keeping the elements but using higher-order polynomial shape
functions).
• hp-refinement: a combination of the above two (i.e., increasing the number of
elements while also increasing the polynomial order of shape functions).
• r-refinement: repositioning of nodes while keeping the discretization and interpo-
lation order fixed (e.g., moving nodes into regions requiring higher accuracy).
When using either of these refinement techniques appropriately within the FE context, we may
expect that U h → U and hence that the approximate solution uh converges to the exact, classical
solution u.
Let us add a note on ensuring sufficient approximation power, as required by condition (V):
consider the exact solution u(x) at a point x ∈ Ω so that within a small h-neighborhood of x
(and h being interpretable as the element size) we may expand
1 1
u(x + h) = u(x) + h u′ (x) + h2 u′′ (x) + . . . + hq u(q) (x) + O(hq+1 ). (10.8)
2 q!
Assume that U h contains all polynomials complete up to degree q (i.e., U h = Pq ), then there
exists a “nearby” approximation
uh ∈ U h such that u(x) = uh (x) + O(hq+1 ). (10.9)
Let p denote the highest derivative in the weak form. Differentiating the equation in (10.9)
yields
dp u dp uh
= + O(hq+1−p ). (10.10)
dxp dxp
For the solution to converge as h → 0, we need the errors to be at least of O(h), which implies
that we must have q + 1 − p ≥ 1. Thus we must ensure that
q≥p (10.11)
87
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
This gives us a simple recipe for the choice of the interpolation order q, based on the highest
derivative (of order p) appearing in the weak form. For example, for the mechanical (as well as
thermal and electromagnetic) variational problems discussed previously, we had the requirement
u, uh ∈ H1 (Ω), since the energy and resulting weak form contained first derivatives of u only.
Hence, we have p = 1, so that our finite-element interpolations must satisfy q ≥ p = 1.
Therefore, finite-element shape functions to be used for solving mechanical BVPs require at
least piecewise-linear shape functions.
88
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Let us start with the simplest of all choices: continuous, piecewise-polynomial interpolation func-
tions. As explained above, we need q ≥ 1 since p = 1 for the mechanical/thermal/electromagnetic
variational problems; i.e., we need at least linear interpolation within elements. Here, let us
begin with the simplest example of a 1D bar element having piecewise-linear interpolation –
and we will see that we recover our 2-node bar element from Section 5.
Since the element has only two nodes (which we call nodes 1 and
2), we need two shape functions for the interpolation of the element
dofs Ue = {u1e , u2e }, so that Ne1 Ne2
1
uhe (x) = Ne1 (x)u1e + Ne2 (x)u2e , (11.1) 1 u e 2 u2
e
x
and we must have uhe (0) = u1e and uhe (∆x) = u2e for an element
defined on x ∈ [0, ∆x], as shown on the right. Dx
Here and in the following, we add the subscript e to all quantities being specific to an element
(this includes, e.g., the above shape functions and the nodal dofs are associated with nodes 1
and 2 of this particular element).
By choosing q = 1, the shape functions must be linear polynomials, so that we must have an
interpolation of the type uhe (x) = c1e + c2e x with c1 , c2 ∈ R. As we know that uhe must evaluate
to uae at node a (with a = 1, 2), we may impose
x x
Ne1 (x) = 1 − , Ne2 (x) = (11.4)
∆x ∆x
Notice that these functions automatically satisfy (10.3), i.e., each shape function a is 1 at node
a and 0 at the respective other node. Both vary linearly from 0 to 1, as shown above. This
defines the simplest possible FE interpolation within a 1D element.
If we group the nodal degrees of freedom into the vector Ue , then we can re-write (11.4) in
matrix form by introducing the shape function matrix Ne as
1
ue
uhe (x) x x
= Ne Ue with [Ne ] = 1 − , Ue = (11.5)
∆x ∆x u2e
Next, let us use the above shape functions and see what their use implies in solving a mechanical
BVP. To this end, recall that in linear elasticity we solve a linear system of equations, involving
the vectors and matrices defined in Section 13.
89
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
1 d x 1 2 d x 1
Ne,x (x) = 1− =− , Ne,x (x) = = , (11.6)
dx ∆x ∆x dx ∆x ∆x
so that the (only non-zero) axial strain component inside the bar element is constant since:
n
X u2e − u1e
εhxx = uhe,x (x) = uie Ne,x
i
(x) = u1e Ne,x
1
(x) + u2e Ne,x
2
(x) = = const. (11.7)
∆x
i=1
The result in (11.7) is not surprising but confirms what we have known since first-year mechanics
classes: if a bar of length ∆x is stretched by an amount ∆u = u2e − u1e (which is the relative
displacement of its two end points) and if we assume a linear displacement variation along the
bar, then this implies a constant axial strain of magnitude ∆u/∆x – which is exactly what we
assumed in Section 5 to derive the stiffness matrix.
Note that we can also re-write (11.7) in matrix form by introducing the so-called B-matrix as
u1e
εhxx 1 1
= Be Ue with [Be ] = − ∆x , Ue = (11.8)
∆x u2e
Next, let us derive the stiffness matrix following from the above shape functions. For a linear
elastic bar, we obtained from the linear elastic mechanical weak form (9.10) (see also (9.11))
the stiffness matrix components within a bar element as
Z ∆x (
ab a b a b a b EA 1, if a = b
Ke = B[Ne , Ne ] = ENe,x Ne,x A dx = EA ∆xNe,x Ne,x = , (11.9)
0 ∆x −1, else
This recovers the stiffness matrix previously derived via the Direct Stiffness Method in Section 5,
see (5.18).
1
The two nodal forces Fint,e 2
and Fint,e depend linearly on the nodal displacements:
1 1
Fint EA 1 −1 ue
[Fint,e ] = 2 = ⇔ Fint,e = Ke Ue . (11.11)
Fint ∆x −1 1 u2e
This is not surprising but intuitively correct: if the bar is strained by a constant strain εh =
∆u/∆x, then the stress inside the bar is σ = Eεh and the resulting axial force is F = σA (with
A being the bar’s cross-section). (11.11) simply states that the forces that must be applied to
the elastic bar at both ends to result in a change of length are of opposite direction and equal
magnitude EAεh . The bar hence acts as a linear elastic spring of effective stiffness k = EA/∆x.
It is important to note that the above shape functions were introduced within a single element e,
which is why we use the subscript e on all element quantities, including the shape functions
90
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Nea . In practice, a single rod may be subdivided into multiple bar elements, and we may apply
the above concepts to each bar element. This results in the global definition of shape functions
associated not with particular elements but with specific nodes. Let us consider the following
illustration of a 1D mesh of 2-node bar elements.
For each element e, the shape functions Ne1 and Ne2 are as defined in (11.4), where element
node 1 may be node number 2 in the overall mesh, and element node 2 may fall onto node 3 in
the mesh, as shown above on the left. Similarly, (11.4) defines the shape functions Ne1 and Ne2
within element 3 in the mesh, where element nodes 1 and 2 fall onto the nodes numbered 3 and
4 in the mesh, respectively. If one focuses on the shape function contributions to a particular
node in the global mesh (e.g., those associated with global node 3), then this node has non-zero
shape functions only in the two adjacent elements (here, elements 2 and 3). When plotting (on
the global mesh) the resulting shape function of node 3 (or of node 6), the “hat-like” shapes
shown above arise. Mathematically speaking, the shape function of node 4 in the mesh (where
node i is located at xi ) has become
x−x
∆x ,
2
for x2 ≤ x ≤ x3 ,
3 x−x
N (x) = 1 − ∆x , for x3 ≤ x ≤ x4 ,
3 (11.13)
0, else.
As a general feature of finite elements, such FE shape function are non-zero only in the adjacent
elements while being zero elsewhere. Note that we here omitted subscript e, since N 3 is not
defined within a particular element but on the (overall) mesh.
The solution uh of a finite element problem based on 2-nodeP bar elements may hence be under-
stood, as shown below, where each coefficient ua in uh (x) = na=1 ua N a (x) defines the function
value uh (xa ) at the location of node a, while using a piecewise-linear interpolation in between.
uh(x)
u1
1 x
N u2
N2 u3
u4
u1 ž + u2 ž + u3 ž N3 + u4 ž 4
+ ... = .:
N
un
91
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The extension to 2D and 3D was already discussed in Section 5.4. The stiffness matrix
of each 1D element is rotated according to (5.19) to result in the stiffness matrix in 2D (and
analogously in 3D). Here, we have seen that the same stiffness matrix – derived in Section 5.4
from simple spring considerations – is alternatively obtained from the finite element ansatz with
piecewise-linear shape functions in 1D.
So far we have only considered linear shape functions. When going to higher-order polynomial
interpolation (as required, e.g., for p-refinement but also for BVPs with higher-order derivatives
in the weak form), various choices are possible for the definition of the element shape functions.
We here discuss two such approaches in 1D – leading to bar elements with more than two nodes.
The shape functions of the above 2-node bar are a special case (i.e., the simplest case possible) of
so-called Lagrangian interpolation in 1D, which can be extended to higher orders as follows.
Assume an interpolation up to degree q, i.e., {1, x, x2 , . . . , xq } such that
q+1
X
uhe (x) = Nea (x)uae = a0 + a1 x + a2 x2 + . . . + aq xq . (11.14)
a=1
In general, shape functions Nea (x) for a = 1, . . . , q + 1 can be determined by solving the q + 1
equations
uhe (xb ) = ub for all b = 1, . . . , q + 1 (11.15)
for the q + 1 coefficients ai (i = 0, . . . , q). Then, rearranging the resulting polynomial allows to
extract the shape functions Nea (x) by comparison of the coefficients of uae , as we did in (11.3)
for the 2-node bar element.
Alternatively, we may recall the defining relation for finite-element shape functions, (10.3), and
solve
Nea (xb ) = δab for all nodes b = 1, . . . , q + 1. (11.16)
The solution to this problem is in fact intuitive:
(x − x1 ) · . . . · (x − xa−1 ) · (x − xa+1 ) · . . . · (x − xq+1 )
Nea (x) = (11.17)
(xa − x1 ) · . . . · (xa − xa−1 ) · (xa − xa+1 ) · . . . · (xa − xq+1 )
92
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Notice that the shape functions in this example may be negative in some region of the bar
element. FE shape functions always satisfy P the Kronecker property Nea (xb ) = δab . They also
satisfy the 0 -order consistency condition q+1
th a
a=1 Ne (x) = 1 (as introduced in (10.6); try to
prove it yourself for Langragian shape functions!). However, those constraints do not impose
bounds on the value of Nea (x), so the shape functions can indeed be negative or larger than 1.
Shown below is the example of a four-node bar element in 1D along with its four shape functions,
defined as Lagrange polynomials. You can verify that the shown shape functions satisfy the
Kronecker property.
1.0
N 2(x)
0.8
N 3(x) N 4(x)
0.6
0.4 N 1(x)
0.2
1 2 3 4x
0.5 1.0 1.5 2.0 2.5 3.0
-0.2
which is associated with the newly introduced dof α. To identify the coefficients ai , recall that
we must have
e 3 (0) = N
N e 3 (∆x) = 0, (11.21)
e e
which leads to
e 3 (x) = c x 1 − x
Ne (11.22)
∆x ∆x
with some arbitrary non-zero constant c ̸= 0 (which is to be chosen). The resulting interpolation
is (choosing c = 1)
x x x x
uhe (x) = u1e 1 − + u2e + αe 1 − . (11.23)
∆x ∆x ∆x ∆x
93
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Note that αe is internal to the element and does not have to be continuous across elements. We
can thus determine αe locally within the element (i.e., given u1e and u2e , αe can be determined
for each element, which allows for condensation of the αe -dof with efficiency advantages).
94
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
12 Beam Elements
In the previous section, we introduced higher-order polynomial shape functions, even though
those were not necessary: for the bar problem, we showed that linear interpolation is sufficient,
so that higher-order interpolation may be beneficial for improved accuracy but is not required.
Here, we will introduce a common scenario in structural mechanics that does require higher-
order interpolation – the description of beams that undergo bending.
[ε] = 0 0 0 . (12.2)
1
(w ′ (x) − ψ(x)) 0 0
2
The two non-zero strain components and the resulting stress components, using Hooke’s law of
linear elasticity, are hence
ε11 (x, z) = −ψ ′ (x)z ⇒ σ11 (x, z) = Eε11 (x, z) = −Eψ ′ (x)z,
1 (12.3)
ε13 (x, z) = (w′ (x) − ψ(x)) σ13 (x, z) = 2Gε13 (x, z) = G w′ (x) − ψ(x) ,
⇒
2
where E and G denote Young’s modulus and the shear modulus, respectively.
s11 M(x)
y y
x x N(x)
t12
Q(x)
z z
17
Unlike in the rest of these lecture notes, we here use coordinates (x, y, z) instead of (x1 , x2 , x3 ), since this
is how beam theory is typically taught in undergraduate mechanics and hence to avoid confusion. The two
descriptions are fully analogous and we will return to our usual (x1 , x2 , x3 ) notation later in this chapter.
95
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Finally, integrating over the cross-section of the beam yields the total (or net) normal force
N (x), the transverse force Q(x), and the bending moment M (x), all acting at a position
x along the beam (as schematically shown above), as
Z Z Z
′ ′
N (x) = σ11 (x, z) dA = − Eψ (x)z dA = −Eψ (x) z dA = 0,
ZA Z A A
a constant that depends on the geometry of the cross-section and characterizes the beam’s
stiffness against bending about the y-axis. In the above relations, we must introduce one
correction: the shear force in general is not constant over the cross-section of the beam (it must
be zero at the top and bottom free edges and therefore takes on a nonlinear profile through the
cross-section). Assuming that the beam is slender, one generally introduces a shear correction
factor κ > 0, which accounts for the non-uniform distribution of the shear stresses and the
resulting difference in the net shear force. This results in the following forces and moment
acting on a beam in bending:
The value of κ depends on the cross-section. For a rectangular profiles made of a homogeneous
isotropic material, e.g., it was proposed by Cowper that κ = 10(1+ν)
12+11ν with Poisson’s ratio ν, which
5
is often taken as κ ≈ 6 (which is a good approximation for most materials with 0 ≤ ν ≤ 0.5).
Analogously, for a circular cross-section Cowper reported κ = 6(1+ν) 6
7+6ν ≈ 7 .
Note that replacing M (x) = −EIy ψ ′ (x) in the axial beam stress in (12.3) leads to
M (x)
σ11 (x, z) = z (12.7)
Iy
which is a linear stress profile over the cross-section, being zero in the neutral axis and propor-
tional to the bending moment.
96
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Angular momentum balance applied to the same infinitesimal beam segment with respect to its
center and assuming statics leads to
dx dx
M (x + dx) − M (x) − Q(x + dx) − Q(x) = 0. (12.10)
2 2
Dropping higher terms and approximating [Q(x + dx) + Q(x)] dx = [Q(x) + dQ + Q(x)] dx ≈
2Q(x) dx lets us conclude that
M (x + dx) − M (x) dx→0 dM
Q(x) = → (x). (12.11)
dx dx
Altogether, we thus have arrived at (using primes to denote derivatives with respect to x)
At this point, we have two options. We can either solve the above beam equations (12.6) and
(12.12) for the two independent fields w(x) and ψ(x) – this leads to the so-called Timoshenko
beam model (also known as Timoshenko-Ehrenfest beam theory). Alternatively, we can
simplify the expressions by assuming that the beam is very slender, in which case the transverse
force Q(x) is approximately negligible, which is the basis of the co-called Euler-Bernoulli
beam theory. Let us briefly consider both cases in the following.
which is a differential equation to be solved for ψ(x) (with suitable boundary conditions). In
addition, inserting the expressions for the transverse force Q(x) and moment M (x) from (12.6)
into Q(x) = M ′ (x) yields
′ 1 ′
M ′ (x) = −EIy ψ ′ (x) = κGA w′ (x) − ψ(x) w′ (x) = ψ(x) − EIy ψ ′ (x)
⇒
κGA
(12.14)
which can be solved for the deflection w(x) for given ψ(x) (or both equations (12.13) and
(12.14) can be solved simultaneously, depending on the boundary conditions). This description
of beams is known as Timoshenko beam theory.
We can significantly simplify the above relations by assuming that the beam is very slender,
in which case the transverse force Q(x) is approximately negligible for the following reason: as
the shear stress must vanish at the top and bottom of the beam because of the free surfaces, in
the limit of a very thin beam that shear stress must become negligible in the beam. Revisiting
(12.6), the assumption Q(x) ≈ 0 leads to
This is the basis of the so-called Euler-Bernoulli beam theory. The key difference is whether
or not the beam is sufficiently slender to neglect shear deformation. Geometrically, Euler-
Bernoulli theory assumes that the beam’s cross-section remains straight and perpendicular to
97
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
the beam’s centerline, while Timoshenko theory only assumes straight cross-sections but defines
the angle between the cross-section and the centerline via angle ψ(x).
so that
′′ ′
EIy w′′ (x) = q(x), EIy w′′ (x) = −Q(x) EIy w′′ (x) = −M (x). (12.17)
and
If we further assume that Young’s modulus and the area moment of inertia are constant along
the length of the beam, we arrive at the relations
EIy w′′′′ (x) = q(x), EIy w′′′ (x) = −Q(x) and EIy w′′ (x) = −M (x) (12.18)
These three equations are often used in combination to solve boundary value problems.
From the above Euler-Bernoulli beam theory, we can also derive the energy density of a deformed
beam, combining (12.3) and (12.15), as
1 1
W = ε11 σ11 = E[ψ ′ (x)]2 z 2 ≈ E[w′′ (x)]2 z 2 . (12.19)
2 2
If we further integrate the above across the beam’s cross-section, we arrive at an energy density
per length of the beam (assuming a uniform Young’s modulus within the cross-section:
Z Z Z
′′ ′′
W dA = 2 2
E[w (x)] z dx = E[w (x)] 2
z 2 dx = EIy [w′′ (x)]2 (12.20)
A A A
where wi and θi are known beam end deflections and rotations, respectively. If no distribute
load acts on the beam but only loads and moments at its ends, then (q) = 0, so that
Solving the system of equations arising from the four boundary conditions yields the four con-
stant coefficients ci ∈ R and the resulting deflection as
x 2 x 3
w(x) = w1 +θ1 x+[3(w1 − w2 ) + L(2θ1 + θ2 )] −[2(w1 − w2 ) + L(θ1 + θ2 )] . (12.23)
L L
From (12.18) we obtain the corresponding end loads and moments required to produce the beam
deformation:
6EIy
Q(x) = −EIy w′′′ (x) ⇒ Q(x) = − [2(w1 − w2 ) + L(θ1 + θ2 )] (12.24)
L3
98
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
and
2EIy
M (0) =
[3(w1 − w2 ) + L(2θ1 + θ2 )] ,
M (x) = −EIy w′′ (x) ⇒ L2 (12.25)
M (L) = − 2EIy [3(w1 − w2 ) + L(θ1 + 2θ2 )] .
L2
Note that the beam’s right end presents a positive cut while the left end is a negative cut (with
the given coordinate system). The below schematic shows the resulting definition of positive
inner forces and moments at both positive and negative cuts. We thus identify the transverse
forces and moments applied at the two ends as (see the above sketch of the boundary conditions)
M(x) M(x)
y N(x)
x N(x)
Q(x) Q(x)
z
————
Note that the above relation could be used together with the Direct Stiffness Method (introduced
in Section 5.3) to derive the stiffness of a beam element, as shown in Appendix C. Here, we
prefer to pursue the analogous approach discussed in Section 11 for bar elements, viz. to start
from the variational problem and to consistently derive a beam finite element representation.
Let us revisit the Euler-Bernoulli beam theory discussed above and study its variational struc-
ture with the goal of rigorously deriving beam finite elements. We consider a continuous linear
elastic beam of length L (constant Young’s modulus E and area moment Iy ), loaded by a dis-
tributed transverse load q(x) as well as bending moments My (about the y-axis) and transverse
forces Fz (in the positive z-direction) applied at its two ends, as shown below. The strong form
of this problem (assuming EIy = const.) reads
99
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Boundary conditions here involve both transverse forces Fz and moments My applied at the
ends of the beam.
The potential energy functional for the variational problem with deflection w(x) is
Z L
1
I[w] = EIy w,xx (x) − q(x)w(x) dx − Fz1 w(0) − Fz2 w(L) + My1 w,x (0) + My2 w,x (L)
2
0 2
(12.30)
whose first term is the elastic energy density (12.20) integrated over the length of the beam,
and the second term the work done by the distributed transverse load q(x). Furthermore, we
exploited that the beam rotation (for small deflection angles) is θ ≈ w,x , so that the work done
by a torque M becomes M θ = M w,x . The plus-signs in those terms involving bending moments
result from Mya acting against the rotation direction of w,x .
Let us first confirm that (12.30) is indeed the correct functional to use for modeling Euler-
Bernoulli beams; i.e., we must show that minimizing (12.30) is equivalent to solving the strong
form given by (12.28) and (12.29). We see from (12.30) that w(x) must have square-integrable
second derivatives, so its solution space is given by
n o
w ∈ U = w ∈ H 2 (0, L) : w = ŵ, w,x = δ θ̂ on ∂ΩD . (12.31)
Note that for beams both deflections w(x) and deflection angles θ(x) = w,x (x) imply essen-
tial/Dirichlet boundary conditions, as both are kinematic constraints of the beam (consider,
e.g., a cantilever beam that is clamped at one end, where both w = 0 and θ = w,x = 0). We
will confirm this theoretically later – let us accept it for now as a fact18 .
The first variation of (12.30) (which must hold for all admissible variations δw) is derived as
Z L
δI = [EIy w,xx δw,xx − q δw] dx
0 (12.32)
1 2 1 2
− Fz δw(0) − Fz δw(L) + My δw,x (0) + My δw,x (L) = 0 ∀ δw(x) ∈ U0 .
In order to recover the strong form (whose PDE is EIy w,xxxx − q = 0), we integrate the first
term in (12.32) by parts to obtain
Z L Z L
L
δI = − EIy w,xxx δw,x dx + [EIy w,xx δw,x ]0 − q δw dx
0 0 (12.33)
1 2 1 2
− Fz δw(0) − Fz δw(L) + My δw,x (0) + My δw,x (L).
Integrating the first term by parts once again gives
Z L Z L
L L
δI = EIy w,xxxx δw dx − [EIy w,xxx δw]0 + [EIy w,xx δw,x ]0 − q δw dx
0 0 (12.34)
− Fz1 δw(0) − Fz2 δw(L) + My1 δw,x (0) + My2 δw,x (L).
Re-arranging leads to the stationarity condition
Z L
δI = 0 = (EIy w,xxxx − q) δw dx
0
(12.35)
− Fz1 − EIy w,xxx (0) δw(0) − Fz2 + EIy w,xxx (L) δw(L)
− −My1 + EIy w,xx (0) δw,x (0) + My2 + EIy w,xx (L) δw,x (L)
∀ δw ∈ U0 .
18
Considering the example of a cantilever, clamped beam provides a simple illustration: we know that the
clamped end implies w = 0 (zero deflection) and θ ≈ w,x = 0 (zero deflection angle), so that these two geometric
constraints both imply essential boundary conditions.
100
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
We know that δI must vanish for arbitrary (admissible) variations δw. This imples that, first,
Therefore, we recover the exact governing equation (12.29) of the strong form. Furthermore, the
remaining four terms in (12.35) must also vanish individually (since we can, in principle, choose
the variations at the ends individually, and δI = 0 must hold for all admissible variations). For
example, we must have
1
Fz − EIy w,xxx (0) δw(0) = 0, (12.37)
which means that either Fz1 − EIy w,xxx (0) = 0 (i.e., a transverse force Fz1 is imposed at the end
x = 0) or δw(0) = 0 (which implies that w(0) = ŵ1 must be an essential BC). Likewise,
indicates that either My1 = EIy w,xx (0) (i.e., a bending moment is imposed at x = 0) or δw,x = 0
(which implies that w,x (0) = θ̂1 must be an essential boundary condition). Therefore, the above
form (12.35) of the first variation shows that the potential (12.30) is indeed the correct starting
point for the Euler-Bernoulli beam model: minimizing (12.30) is equivalent to (12.35) for all
admissible variations, which in turn is equivalent to the strong form, (12.28) and boundary
conditions (12.29).
Moreover, we must revise our definition of a Dirichlet boundary condition: not every
imposed derivative of the primary field always implies a Neumann boundary condition. Instead,
we extract the notion of Dirichlet vs. Neumann boundary conditions from the first variation of
a variational problem. As a rule of thumb, essential/Dirichlet BCs impose the function
itself as well as derivatives up to order (p − 1), where p is half the order of the PDE
in the strong form. For example, for our beam the PDE is of fourth-order (p = 2) and, as
a consequence, the (matching-order) weak form (12.32) contains at most second derivatives.
Therefore, essential BCs for a beam include both imposed up to p − 1 = 1st-order derivatives:
deflections w and imposed rotations θ = w,x .
In light of the above discussion, solutions w(x) of a beam bending problem should therefore live
in the space
n o
w ∈ U = w ∈ H 2 (0, L) : w = ŵ on ∂ΩD1 ∧ w,x = θ̂ on ∂ΩD2 , (12.39)
where ∂ΩD1 and ∂ΩD2 are those (possibly overlapping) parts of the boundary on which, respec-
tively, deflections ŵ and rotations θ̂ are being imposed.
Having verified that the potential energy functional governing an Euler-Bernoulli beam is
Z L
1
I[w] = EIy w,xx (x) − q(x)w(x) dx−Fz1 w(0)−Fz2 w(L)+My1 w,x (0)+My2 w,x (L), (12.41)
2
0 2
let us use the Rayleigh-Ritz method of Section 8 to formulate beam elements – analogous to
the bar elements introduced in Section 5. Following our definitions from Section 7, we identify
in (12.41) the bilinear form
Z L
B[w, v] = EIy w,xx v,xx dx (12.42)
0
101
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
so that
1
I[w] = B[w, w] − L[w]. (12.44)
2
This is the variational structure, based on which we will now derive beam finite elements.
and seeking I[wh ] → min (with the potential from (12.44)) leads to a linear system of equations
for the n + 1 unknown coefficients U = (w1 , . . . , wn )T . Following (7.8), that linear system
KU = F . (12.46)
To identify suitable shape functions N a (x), let us aim for a beam element that is similar to our
formulation of the 2-node bar element. To this end, we consider a 2-node Euler-Bernoulli
beam element, which looks like the 2-node bar element but deforms in bending instead of in
axial stretching. We use a polynomial ansatz, for which the above formulation requires at least
quadratic interpolation (to allow for non-vanishing second derivatives). However, this would
introduce only three unknown coefficients (for two nodes), which is why we deliberately go one
order higher and choose the basis {1, x, x2 , x3 }. This leads to the approximate deflection
Since the four coefficients ci are hard to interpret physically in general, we instead assign to
each node a deflection w and a deflection angle θ = w,x , and we use those as the four unknowns
defining the element interpolation. This has the added benefit that only deflections but also
deflection angles will be continuous across elements (so the beam does not suffer from any
kinks).
Le
x
w
1
e
w2 e
1 2 q2
q1 e
e
102
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The four coefficients ci are thus uniquely defined by the nodal conditions (as shown schemati-
cally)
In order to clearly associate the shape functions with the nodal dofs, let us alternatively write
the element interpolation as
2
X
weh (x) = [Nea (x)wea + Mea (x)θea ] (12.50)
a=1
with the four shape functions Ne1 and Ne2 (associated with the nodal deflections) as well as Me1
and Me2 (associated with the nodal rotations).
By inserting the interpolation (12.50) into the four conditions (12.49), we obtain four equa-
tions to solve for the unknown shape functions. The resulting shape functions are known as
Hermitian polynomials, which for a beam with x ∈ [0, Le ] evaluate to
2
x 3 x 2
3
x x
Ne1 (x) =1−3 +2 Ne2 (x)
=3 −2 ,
Le Le Le Le
(12.51)
x 2 x2 x
1 2
Me (x) = x 1 − , Me (x) = −1
Le Le Le
We can easily verify that, e.g., Ne1 (0) = 1 while Ne2 (0) = 0, and analogously Ne1 (Le ) = 0 while
Ne2 (Le ) = 1. Further we must have Ne,x 1 (0) = N 1 (L ) = N 2 (0) = N 2 (L ) = 0 as well
e,x e e,x e,x e
as Me (0) = Me (Le ) = Me (0) = Me (Le ) = 0. Note the difference in units between Nei and
1 1 2 2
Mei because they multiply deflections and deflection angles, respectively, in the interpolation
(12.50). Shown below are the four shape functions.
0.15
1.0
1 Ne2 Me1/Le
Ne 0.10
0.8
0.05
0.6 1 1
0.2 0.4 0.6 0.8 1.0 x/Le
0.4
-0.05
0.2 -0.10 2
Me /Le
x/Le -0.15
0.2 0.4 0.6 0.8 1.0
Note that this approximation is only one possible choice; we could also define alternative nodes
and nodal values. However, the above choice ensures that both deflection and angle are contin-
uous across elements (since nodal values are shared by neighboring elements).
Having established the shape functions, we proceed to deriving the resulting element stiffness
matrix, where we follow the analogous procedure as for the bar element in Section 11.1: we first
compute K̃e , the stiffness matrix for a beam element that is horizontal, and then generalize the
formulation to beam elements of arbitrary orientation in 2D and 3D with stiffness matrix Ke .
103
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
T
Let us sort the nodal dofs as Ũe = w̃e1 , θe1 , w̃e2 , θe2 , so the corresponding shape functions (in
the same order) are Ne1 , Me1 , Ne2 and Me2 . The stiffness matrix (12.47) hence becomes
1 1 1 M1 1 N2 1 M2
N,xx N,xx N,xx ,xx N,xx ,xx N,xx ,xx
ZLe 1 M1 1 N2 1 M2
M ,xx ,xx M ,xx ,xx M ,xx ,xx
[K̃e ] = EIy
2 N2 2 M 2 dx
0
N,xx ,xx N,xx ,xx
sym. 2 M2
M,xx ,xx
(12.52)
6 3Le −6 3Le
2EIy 3L 2L 2 −3L L2e
e e e
= ,
L3e −6 −3Le 6 −3Le
3Le L2e −3Le 2L2e
where we integrated the shape functions (12.51). Sorting the nodal reactions in the correspond-
ing order results in the element ”force” vector
T
1 1 2 2
F̃int,e = F̃int,e , Mint,e , F̃int,e , Mint,e , (12.53)
which includes both (transverse) forces Fza and bending moments Mya . The thus-obtained
stiffness matrix hence connects the dofs and nodal reactions via
Here, forces and moments have the same directions as the conjugate deflections and rotation
angles.
In summary, the nodal dofs (deflections and rotations) and the nodal reactions (forces and
moments) are linearly related via
1
F̃int,e
1
6 3Le −6 3Le w̃e
M 1 2EI
int,e y 3Le 2L2e −3Le L2e θe1
2 = . (12.55)
F̃int,e L3e −6 −3Le 6 −3Le w̃e2
2
Mint,e 3Le L2e −3Le 2L2e θe2
| {z } | {z } | {z }
=F̃int,e =K̃e =Ũe
Note that this matrix is in agreement with the one derived in Appendix C via the direct stiffness
method; see Eq. (C.6).
Let us generalize the beam element discussed above by considering a beam in 2D, which is still
T
oriented horizontal but whose nodal dofs are Ue = u1e,1 , u1e,2 , θ1 , u2e,1 , u2e,2 , θ2 , i.e., each node is
now displacing in two directions and rotating (and we return to indices 1, 2, 3 for the Cartesian
displacement components instead of x, y, z). Since the above beam formulation only considers
104
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
bending, let us superimpose the bar element from Section 11.1, so that the resulting element
can stretch and bend (otherwise, the nodal dofs would not be independent as the length of the
bar would have to remain unchanged without the ability of the element to stretch axially).
T
For such a horizontal 2-node beam with nodal dofs Ũe = ũ1e , w̃e1 , θ1 , ũ2e , w̃e2 , θ2 , w̃ei and θ̃i
describe the beam deflection, while ũ2e − ũ1e defines the change in length of the beam element in
its axial direction. The resulting stiffness matrix (in this horizontal configuration) is obtained
by superposing the stiffness matrices derived independently for the bar and beam elements (and
connecting the corresponding degrees of freedom). This yields
1 0 0 −1 0 0
0 0 0 0 0 0
0 6 3Le 0 −6 3Le 0 0 0 0 0 0
2 2
2EIy 0 3Le 2L e 0 −3Le Le + EA 0 0 0 0 0 0 (12.57)
[K̃e ] =
L3e
0 0 0 0 0 0 Le −1 0 0 1 0 0
0 −6 −3Le 0 6 −3Le 0 0 0 0 0 0
0 3Le L2e 0 −3Le 2L2e 0 0 0 0 0 0
Note that we must carefully associate the stiffness matrix components with the correct nodal
dofs, as done above for the bending and stretching contributions.
Now we can apply a coordinate transformation to generalize the above to beams with arbitrary
orientation in 2D, with φe denoting the angle of the beam element’s reference orientation against
the horizontal axis (see the schematic below where we flipped the directions of both deflections
and rotation angles for consistency), as defined in (5.14):
1
ũ1e ue,1
cos φe sin φe 0
w̃e1 − sin φe cos φe 0 u1e,2
1 1
θ 0 0 1 θ
=
2 , (12.58)
ũ2 cos φe sin φe 0
e ue,1
w̃2 − sin φe cos φe 0 u2e,2
e
2
θ 0 0 1 θ2
| {z }
=R(φe )
By using the same argument as for the 2-node bar element, the 2
u u~2
w~2
e,2
stiffness matrix of the generally oriented 2-node beam element is e e
2
thus obtained as u e,1
L q
2
w~
1
Ke = RT (φe )K̃e R(φe ) (12.60)
1
e u u~1
e,2
e
e
q
1
with R(φe ) and K̃e from (12.59) and (12.57), respectively. e u1 e,1
105
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
12.6 Extension to 3D
Of course, the above can also be extended to beams in 3D, where an appropriate transforma-
tion matrix R based on direction cosines is introduced to account for the beam’s orientation
in 3D space. As an added complication in 3D, beams can also undergo torsion. In this case,
every node of the beam has six degrees of freedom: the three displacement components (u, v, w)
plus two rotational angles (θy , θz ) about the two bending axes perpendicular to the beam’s axis
plus one torsional angle θx about the beam’s axis.
v u qx
x
w
y qy
z qz
Since we are concerned with linear elasticity, the principle of superposition still holds, so that
one can superimpose the stiffness matrices for bending, stretching, and torsion in 3D (analogous
to the 2D superposition of bending and stretching in (12.57)). This leads to the overall stiffness
matrix of a horizontal beam in 3D as
EA
Le
0 12EIz
L3e
sym.
12EIy
0 0
L3e
GIp
0 0 0
Le
6EIy 4EIy
0 0 − 0
L2e Le
4EIy
0 6EIz
L2e
0 0 0 Le
[K̃e ] = EA
− Le EA
0 0 0 0 0
Le
− 12EI − 6EI 12EIz
0 z
0 0 0 z
0
L3 e L2 e L3e
12EIy 6EIy 12EIy
0 0 − 0 0 0 0
L3e L2e L3e
GIp GIp
0
0 0 − Le 0 0 0 0 0 Le
6EIy 2EIy 6EIy 4EIy
0 0 − 0 0 0 0 0
L2e Le L2e Le
6EIz 2EIz
0 L2e
0 0 0 Le 0 − 6EI
L2
z
0 0 0 4EIz
Le
e
with shear modulus G and the polar moment of inertia Ip . The actual stiffness matrix in 3D
follows from a rotation akin to (12.60) with the rotation matrix appropriately modified for
the 3D orientation of the beam (typically described by the three direction cosines of the beam
orientation).
Without derivation, let us mention that the above procedure can analogously be applied to
Timoshenko beam theory, which results in the definition of a 2-node Timoshenko beam
element. Starting point is the variational formulation based on Timoshenko beam theory and
a subsequent approximation of both the deflection w(x) and rotation θ(x) by polynomial shape
functions. After the analogous procedure, one arrives at the stiffness matrix of the 2-node
106
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
ϕ represents a dimensionless ratio of bending vs. shear stiffness of the beam (the “shearability” of
the beam). In the limit of a beam that is rigid with respect to shearing (ϕ → 0), the above stiff-
ness matrix recovers the Euler-Bernoulli stiffness matrix (12.56). (Recall that Euler-Bernoulli
beam theory assumed shear rigidity, resulting in cross-sections remaining perpendicular to the
beam’s center line.) This is illustrated in the below example of a cantilever beam loaded by a
constant tip force, comparing the deflection line w(x) as obtained from Euler-Bernoulli theory
as well as from Timoshenko theory for different values of the shearable ϕ. Euler-Bernoulli works
best for slender (typically w/l ≤ 10) beams, while Timoshenko applies also for moderately thick
beams.
w(x) F
l f=4
Timoshenko
0.6
0.4
f=12
0.3
Euler-Bernoulli
0.2
0.1
Note that, even though the assumptions behind Euler-Bernoulli and Timoshenko beam theory
as well as the resulting systems of equations are different, they have the same general structure;
i.e., both solve (in 1D)
with the only difference being the definition of the stiffness matrix K̃e : (12.56) vs. (12.61).
As for the Euler-Bernoulli beam element, the Timoshenko beam element can be formulated
analogously in 2D and 3D (resulting in appropriately more complex stiffness matrices).
Having introduced both two-node bar and beam elements, let us conclude by highlighting a
key difference between these two types of elements, which stem from the different deformation
modes captured by each. Bars only undergo axial stretching and nodes are free to rotate, so
that bar networks represented hinged connections (bars carry no transverse forces nor bending
moments). Beam elements, irrespective of Euler-Bernoulli or Timoshenko, can support both
axial and bending deformation (and torsion in 3D), so that beam networks are rigidly connected
(or welded) at nodes, as angles between beams at nodal junctions remain constant. (All beams
107
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
connected to a node share the same nodal degrees of freedom at that node, which automatically
implies that each beam must be undergoing the same rotation at that note, hence implying that
engles between beams cannot change.) The differences between a bar network (often referred
to as truss) and a beam network (also known as frame) is illustrated schematically below.
F F
Finally, keep in mind that both bars and beams are simplifications of reality, as they treat
structural members as simplified 1D rods. With increasing rod thickness (compared to its
length), the beam assumptions fail to apply, which is why a full representation of beams as
solid objects may become inevitable (and we will discuss such elements in 2D and 3D next). It
is essential to choose the right element type based on the scenario to be simulated. The below
graphic sketches a possible decision tree.
which element
to use?
l
how slender thick
w
are rods?
slender moderately
(w/L<10) slender
Euler-Bernoulli Timoshenko
beam elements beam elements
108
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
After having derived the finite element formulation of bar and beam elements, we will move
from those structural elements to solid elements – no longer limited to slender structures but
applicable to general 2D and 3D solid bodies. To this end, let us analyze the general mechanical
variational problem and start with the simplest problem in 2D and 3D: statics. The primary
added complexity, compared to the 1D bar problems discussed so far, lies in the displacement
field u : Ω → Rd now being a d-dimensional vector field in d dimensions.
The strong form of the general mechanical problem is given by the (static) balance of linear
momentum along with Dirichlet and Neumann boundary conditions:
σij,j + ρ bi = 0 in Ω,
ui = ûi on ∂ΩD , (13.1)
σij nj = t̂ on ∂ΩN
Note that we re-encounter the general structure of the strong form already introduced in
Eq. (8.1), here extended to higher dimensions. In the special case of linear elasticity (using σij =
Cijkl εkl = Cijkl uk,l ), we notice that linear momentum balance reduces to (Cijkl uk,l ),j + ρ bi = 0,
so that classical solutions must satisfy ui ∈ C 2 (Ω) (as already seen for 1D bars).
Let us show that the strong form (13.1) has a variational structure. We start from the total
potential energy (total stored energy minus work done by external forces), which in higher
dimensions becomes
Z Z Z
I[u] = W (ε) dV − ρb · u dV + t̂ · u dS , (13.2)
| Ω {z } |
Ω
{z
∂ΩN
}
internal stored energy work by external forces
where we assume that ρb and t̂ do not depend on deformation, and the strain energy density is
defined as
∂W
W = W (ε) such that σij = . (13.3)
∂εij
For the special case of linear elasticity, we have W (ε) = 12 εij Cijkl εkl = 12 ui,j Cijkl uk,l , so that
the energy functional (13.2) requires ui ∈ U = {ui ∈ H 1 (Ω) : ui = ûi on ∂ΩD } for each
displacement component, in close analogy to the 1D case.
To show the equivalence between solving (13.1) and minimizing (13.2), we first compute the
variation of (13.2) as
Z Z Z
∂W 1
δI[u] = (δui,j + δuj,i ) dV − ρbi δui dV − t̂i δui dS
∂εij 2
ZΩ Z Ω
Z ∂ΩN
(13.4)
= σij δui,j dV − ρbi δui dV − t̂i δui dS = 0 ∀ δu ∈ U0 ,
Ω Ω ∂ΩN
where we used (13.3) and σij = σji (by angular momentum balance). Notice that (13.4) is
equivalent to the principle of virtual work (8.21), if we replace δui by u∗i , which confirms that
109
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
(as in 1D) the principle of virtual work is a re-statement of the stationarity condition for
minimizing the total potential energy.
which must hold for all (admissible) variations δu ∈ U0 , so that the two terms in parentheses
must vanish. Ergo, (13.5) is equivalent to the strong form (13.1), which proves that minimizing
(13.2) is indeed equivalent to solving (13.1).
From inspecting the first variation in (13.4), we may define the weak form as
Note that the dependence of A on u is not directly obvious, but the stresses depend through
the strains on the displacement field, i.e., σij = σij (ε) and εij = 12 (ui,j + uj,i ). Without further
knowledge about the stress-strain relation, A(·, ·) is in general not a bilinear operator, while
L(·) is a linear operator.
Let us apply the above general formulation of the mechanical boundary value problem to a
numerically discretized problem, which forms the basis of the finite element method. As before,
we assume that the displacement field u is approximated by
n
X
uh (x) = ua N a (x), (13.8)
a=1
where ua ∈ Rd is the d-dimensional nodal displacement vector of node a, and N a (x) is the
associated shape function. Consequently, the strain components εij are approximated by
n
1 h 1X
εhij h
a a
ui N,j (x) + uaj N,ia (x) .
= ui,j + uj,i = (13.9)
2 2
a=1
For computational purposes, we should revisit our notation here. We concatenate all nodal
displacement vectors into one long global displacement vector U ∈ Rd·n , whose components in
3D become
1
u1
u12
1 1
u u
3
.. ..
[U ] = . = . . (13.10)
n
n
u u1
un
2
un3
110
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Be careful when using 0-indexing (as, e.g., in Python, where vector components start with
index 0): here, we must consider node indices a = 0, . . . , n − 1 and displacement components
i = 0, . . . , d − 1 in d dimensions, so that
Here and in the following, we use super- and subscripts, since our unknown coefficients are
vector-valued. A super script a refers to the a-th vector ua , while a subscript i refers to the i-th
component ui of a vector. (Remember how we said in Section 5 that it would become important
later to use superscripts to indicate nodes? Here it does!)
To arrive at a similar relation for the strains, let us exploit Voigt notation (see Section 1.4),
which condenses the strain tensor into a strain vector, containing only its unique components
(since ε is symmetric, it contains only six independent components in 3D, or 3 in 2D). This
reduces data storage (requiring only six instead of nine components in 3D), and it works with
vectors instead of matrices (thus avoiding the use of fourth-order tensors). Writing the six
independent 3D strain components from (13.9) in Voigt notation leads to the strain vector
h Pn
ε11 a=1 ua1 N,1a
Pn a a
εh22 a=1 u2 N,2
h i εh
P n a a
u N
ε̃h = 33 = P a=1 3 ,3 (13.13)
2εh n a N a + ua N a )
(u
23 Pna=1 2 ,3 3 ,2
2εh a a a a
a=1 (u1 N,3 + u3 N,1 )
13
n
2εh12 a a a a
P
a=1 (u1 N,2 + u2 N,1 )
or in short with the so-called B-matrix B ∈ R6×3n in 3D (and analogously B ∈ R3×2n in 2D)
N,11 0 0 N,12 0 0 . . . N,1n 0 0
0 N1 0 2
0 N,2 0 . . . 0 N,2n 0
,2
0 0 N 1 0 0 N,32 ... 0 0 N,3n
ε̃h (x) = B(x)U with B(x) = ,3
0 N,31 N,21 0 N,32 N,22 . . . 0 N,3n N,2n
1
N,3 0 N,1 N,32
1 0 N,12 . . . N,3n 0 N,1n
N,21 N,11 0 N,22 N,12 0 . . . N,2n N,1n 0
(13.14)
111
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
With the above relations, let us now reformulate the weak form in the finite element scenario.
We start from the total energy functional, whose approximate version takes the form
Z Z Z
h h h
I[u ] = W (ε̃ ) dV − ρb · u dV − t̂ · uh dS
Ω Ω ∂ΩN
Z Z Z
= W (ε̃h ) dV − ρb · N U dV − t̂ · N U dS (13.15)
Ω Ω ∂ΩN
Z Z Z
= W (ε̃h ) dV − N T ρb dV + N T t̂ dS U .
Ω Ω ∂ΩN
Minimization of the above energy with respect to the unknown nodal vector U results in
∂I[uh ] ∂W ∂ ε̃h
Z Z Z
T T
0= = ·
h ∂U
dV − N ρb dV + N t̂ dS . (13.16)
∂U Ω ∂ ε̃ Ω ∂ΩN
Exploiting that ε̃h = BU as well as ∂W/∂ ε̃ = σ̃ with the stress vector σ̃ = σ̃(ε̃) in Voigt
notation (recall Section 1.4) turns (13.16) into
Z Z Z
h T T
0= σ̃(ε̃ ) · B dV − N ρb dV + N t̂ dS (13.17)
Ω Ω ∂ΩN
which is nothing but linear momentum balance in the finite element setting:
with the global internal and external force vectors Fint , Fext ∈ Rd·n
Z Z Z
Fint = B T σ̃(ε̃h ) dV and Fext = N T ρb dV + N T t̂ dS (13.20)
Ω Ω ∂ΩN
Subscripts int vs. ext indicate that those vectors stem from, respectively, internal stresses and
strains vs. externally applied loads. Note that (13.19) is in general not a linear system of
equations, since we have not yet assumed a specific constitutive law such as linear elasticity.
In the special case of linear elasticity, stresses and strains are linearly related, which in Voigt
notation implies that (again written in 3D)
where E denotes the elastic stiffness matrix, whose components are deduced from C and follow
from the definitions of stresses and strains in Voigt notation. As discussed in Section 1.4, for
112
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
an isotropic linear elastic material characterized by Young’s modulus E and Poisson’s ratio ν,
the E-matrix in 3D reads
1−ν
ν ν 0 0 0
ν
1−ν ν 0 0 0
E ν ν 1−ν 0 0 0
[E3D ] = 1−2ν
. (13.22)
0
(1 + ν)(1 − 2ν) 0 0 2 0 0
0 1−2ν
0 0 0 2 0
1−2ν
0 0 0 0 0 2
The 2D version depends on the exact scenario, as one must differentiate between states of plane
stress and plane strain (see also the review in Section 1.4):
1 ν 0
E
[Eplane stress ] = ν 1 0
1 − ν2 1−ν
0 0
2 (13.23)
1−ν ν 0
E
[Eplane strain ] = ν 1−ν 0 .
(1 + ν)(1 − 2ν) 1−2ν
0 0 2
Analogous matrices can be derived for other elastic constitutive laws (e.g., for general linear
elastic anisotropic media).
Combining Eqs. (13.14) and (13.21) shows that, in linear elasticity, the stress vector becomes
σ̃ = EBU (13.24)
This confirms that, as in the 1D case, the assumption of linear elasticity makes the internal
forces depend linearly on the nodal displacement vector and, moreover, allows us to define the
linear elastic stiffness matrix:
Z
Fint = K U with K= B T EB dV (13.26)
Ω
so that, as in the case of elastic bars (see Section 5.7), for linear elasticity we conclude
1 ∂I int ∂F int
I int = U · K U ⇒ F int = = KU , K= = const. (13.28)
2 ∂U ∂U
We close by noting that the stiffness matrix K depends only on B and E. For a specific material
and scenario, E is known (see the examples for linear elasticity given above). B contains only
shape function derivatives, so that – once shape functions N 1 , . . . , N n have been chosen – B
can be computed and is known. What is left to be done is finding a suitable definition of FE
shape functions in higher dimensions.
113
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
14 Assembly
Irrespective of the particular finite element type that is being used to solve a boundary value
problem, its solution requires the assembly of global vectors and matrices from element vectors
and matrices – as already discussed in the context of bar and beam elements (see Sections 5.5).
The same applies here in higher dimensions. When computing, e.g., the internal energy of a
body discretized into ne non-overlapping elements, we may exploit that
Z Xne Z ne
X
int h h
I = W (ε̃ ) dV = W (ε̃ ) dV = Ie , (14.1)
Ω e=1 Ωe e=1
which loops over all ne elements e and adds their respective contributions to the global quanti-
ties. This requires careful book-keeping to keep track of the correspondence between local and
global node numbering, the so-called local-to-global map (and it is the reason elements must
have “knowledge” of their node IDs). Similarly, the inverse operator extracts local element
quantities from the global vector, e.g.,
Ue = A−1 (U ), Fint,e = A−1 (Fint ). (14.3)
e e
For example, consider a 2D problem using 2-node bar elements. If an element connecting nodes
1
1 and 3 computes the nodal force vectors Fint,e 3 , then those are to be added onto the
and Fint,e
global force vector as
1
. . . + Fint,e,1
. . . + F 1
int,e,2
·
·
Fint = (14.4)
3
. . . + Fint,e,1
3
. . . + Fint,e,2
·
·
Analogously, if the element connecting nodes 1 and 3 computes a stiffness matrix Ke13 , then its
components must be added onto the global tangent stiffness matrix as
13 . . . + K 13 · · . . . + K 13 . . . + K 13 · ·
. . . + K11 12 13 14
. . . + K2113 . . . + K 13 · · . . . + K 13 . . . + K 13 · ·
22 23 24
· · · · · · · ·
T = · · · · · · · ·
(14.5)
. . . + K 13 . . . + K 13 · · . . . + K 13 . . . + K 13 · ·
31 32 33 34
. . . + K 13 . . . + K 13 · · . . . + K 13 . . . + K 13 · ·
41 42 43 44
· · · · · · · ·
For practical purposes, it is helpful to recall that vector entry Uia (where a = 0, . . . , n − 1 is the
node number, and i = 0, . . . , d − 1 refers to the coordinate) is located at position a · d + i in the
assembled global vector U h (using Python’s 0-indexing).
114
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
We previously derived the general finite element formulation for the mechanical boundary value
problem, but we must still define suitable shape functions. In 1D structural elements such as
bars and beams we could efficiently use low-order polynomial (Lagrangian) shape functions, but
their definition in two and three dimensions can become quite cumbersome. Therefore, we here
introduce a concept known as parametric mappings.
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:
A schematic of the parametric mapping concept is shown below in 2D for a four-node element
in 2D, which we will introduce soon. The mapping links the element in its reference space,
described by coordinates (ξ, η), to the element’s representation in real, physical space, described
by Cartesian coordinates (x1 , x2 ) in 2D. We still need to define a link between (ξ, η) and (x1 , x2 ).
x2 h
4
(x ,x )
e,1
4
e,2
(-1,1) (1,1)
3 3
4 (x ,x ) e,1 e,2
4 3
3
mapping x
We
1
(x1 ,x1 )
e,1 e,2
2
2 2
1 2
(x ,x )
e,1 e,2 (-1,-1) (1,-1)
x1
element in physical space element in its reference space
For simplicity, we reuse the same concepts that we previously introduced for interpolating the
115
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
We here interpolate the positions xi (in the real geometric configuration of the element, which
we call the physical space) of the n positions of the element nodes in order to assign a unique
position x(ξ) to every point with coordinates ξ in the reference configuration. As a consequence,
the point which lies at the center of the element (e.g., at ξ = η = 0 in the above 2D example)
will be mapped onto the center of the element in physical space. A point which lies on one of
the edges of the element will be mapped onto the respective edge of the element. Overall, to
each point ξ in the reference space we assign a unique point x in the real physical space, and
vice-versa. The mapping between nodes in the reference space and in real space is illustrated
schematically below.
h x2
(-1,1) (1,1) 4
(x ,x )
e,1
4
e,2
4 + 3 (x ,x )
3 3
mapping
4
+ e,1 e,2
+ 3
x
+
+ +
+ 1
+
1 2 (x ,x1 )
1
e,1 e,2
2
(-1,-1) (1,-1) (x2 ,x2 )
e,1 e,2
x1
element in its reference space element in physical space
Note that the distinction between “reference” and “physical ” space here has nothing to do with
undeformed vs. deformed configurations. So far, we have not discussed what happens with
these elements when they deform. The key idea here is to define as the “physical ” space the
real (undeformed ) configuration of an element in its mesh in its actual geometric shape. By
contrast, the element in the “reference” space is a fictitious element of idealized geometry, which
is introduced to easily define shape functions. Nothing more or less!
When we introduce interpolations of the type (15.2), we must choose the shape functions Nei
(to interpolate the displacements, as before) and Ñei (to interpolate the positions, introduced
now). Here, we have three general options:
(i) An isoparametric mapping chooses the same number of shape functions for both map-
pings (n = m) and the same shape functions (Nei = Ñei ).
(ii) A subparametric mapping chooses n > m, which implies a lower-order interpolation
of positions than of displacements.
(iii) A superparametric mapping chooses n < m, which implies a higher-order interpolation
of positions than of displacements.
The strategy is now to define Nei (ξ) in the reference configuration, where the element shape
allows for the simple definition of shape functions (and the calculation of their derivatives).
116
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The mappings introduced above, e.g., the interpolation (here written in 2D with reference
coordinates (ξ, η) for simplicity)
n
X
x(ξ, η) = Nea (ξ, η)xae . (15.3)
a=1
provide a link between the reference coordinates ξ and the physical nodal positions x. Given
the nodal locations x1e and x2e in 2D, the above mapping uniquely assigns a point x in real
space to any reference coordinates ξ = (ξ, η). Of course, we may exploit the same interpolation
for any nodal degrees of freedom (thus using an isoparametric mapping), so for any scalar field
uh we write
n
X
h
u (ξ, η) = Nea (ξ, η)uae . (15.4)
a=1
A difficulty arises though when using this interpolation in the finite element context because we
need to compute shape function derivatives N,x a in real space (needed, e.g,. for the calculation
i
of Ke or Fint ). It is easy to compute N,ξa and N,ηa but that is not what we need. (15.3) defines
(x1 , x2 ) in terms of (ξ, η) but not the other way around. Of course, one could first try to
invert this mapping and then take derivatives. Yet, this is cumbersome and, as we will see,
unnecessary.
Instead of inverting (15.3), we will in the following often use a mathematical shortcut known
as the inverse function theorem, which is not specific to any element type but can be
exploited in general. To derive this relation, we begin by formally writing the mapping in 2D
as x1 = x1 (ξ, η) and x2 = x2 (ξ, η) as well as the field of interest (e.g., the displacements) as
uh = uh (x1 , x2 ). Now, the chain rule gives
h h
u,x1 x1,ξ + uh,x2 x2,ξ
h h
u,ξ x1,ξ x2,ξ u,x1 u,x1
= h h = h = [J ] (15.5)
h
u,η u,x1 x1,η + u,x2 x2,η x1,η x2,η u,x2 uh,x2
| {z }
=[J]
Note that, for the isoparametric mapping to be invertible we need to have J > 0 (which is
analogous to the deformation mapping F = ∇φ and its determinant det F = J in continuum
mechanics). This implies in practice that elements must not be distorted (inverted or non-
convex, as we will discuss later for the specific element types).
19
The Jacobian in mathematics is usually defined as the transpose of J defined in (15.6). In the FE context,
our definition is chosen for convenience, so that we do not need a transpose in (15.12).
117
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Relation (15.5) is important, because it links derivatives uh,ξ to derivatives uh,x . The latter are
the ones we need in practice, while the former ones are easy to calculate, since (15.4) implies
n
X n
X
h a
u (ξ, η),ξ = Ne,ξ (ξ, η)uae , h
u (ξ, η),η = a
Ne,η (ξ, η)uae . (15.8)
a=1 a=1
Note that, since we choose a simple reference geometry to define shape functions Nea , derivatives
a and N a are typically simple to calculate (as we will see for specific element types).
Ne,ξ e,η
By substituting the isoparametric mapping (15.3) for x1 and x2 into (15.6), we obtain the
Jacobian of the element as20
n n
X X
a a a a
Ne,ξ x1,e Ne,ξ x2,e
x1,ξ x2,ξ
a=1 a=1
[Je ] = = n n
, Je = det Je (15.9)
x1,η x2,η X
a a
X
a a
N x N x
e,η 1,e e,η 2,e
a=1 a=1
Note that all ingredients in (15.9) are known, once an element is defined: its nodal locations in
real space (in the undeformed configuration) xi,e as well as the shape functions Nea defined in
the reference configuration.
This solves our original problem, as we may now use (15.5) to switch between derivatives in the
reference configuration and in real space. As discussed, we must have Je > 0. Thus, we can
invert Je and turn (15.5) into
n
X
a a
h h Ne,ξ ue
u,x1 −1 u,ξ −1 a=1
h = [Je ] h = [Je ] X n
u,x2 u,η a a
Ne,η ue
a=1 (15.10)
1
1 n
ue
−1 Ne,ξ · · · Ne,ξ ..
= [Je ] 1 n . .
Ne,η · · · Ne,η
une
Note that, if we had instead defined our shape functions in real space, so Nea = Nea (x1 , x2 ), then
we would have had
n
X
a
ua u1e
h Ne,x1 e 1 n
u,x1 = Ne,x1 · · · Ne,x1 .
a=1
h = n 1 n .. . (15.11)
u,x2 X
a
a
Ne,x2 · · · Ne,x2
Ne,x2 ue uen
a=1
But, of course, both (15.10) and (15.11) are valid representations. Therefore, we may equate
these two relations. By comparing the coefficients of uae in (15.10) and (15.11) (e.g., choosing
one non-zero uae and all others zero), we realize that
a a
Ne,x1 −1 Ne,ξ
a = [J e ] a or more generally: ∇x Nea = Je−1 ∇ξ Nea (15.12)
Ne,x2
Ne,η
20
We here unfortunately face a notational dilemma: we need index e to indicate element quantities, but we
also need indices 1, 2, . . . to denote components of vectors – and we also need comma indices ,i to indicate partial
derivatives. In order to not confuse these different types of indices, we will write x1,e for the x1 -component of
a
xe , which does not imply a partial derivative, and Ne,ξ for the derivative of Nea with respect to ξ. We will never
use letter e for a partial derivative but only to indicate element quantities.
118
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
where for brevity we summarized the reference coordinates into ξ = (ξ, η)T and ∇ξ (·) = (·,ξ , ·,η ),
while ∇x = (·,x1 , ·,x2 ). Relation (15.12) is generally applicable for any isoparametric mapping
and will be valuable in the following sections, when we introduce particular finite element types.
119
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
16 Simplicial elements
The probably simplest type of a finite element are so-called simplicial elements (and we have
already seen one). These are characterized by having the minimum number of nodes possible in
a given dimension. Mathematically speaking, a simplex of order k is a k-dimensional polytope
which is the convex hull of its k + 1 vertices.
Overall, this shows that the element interpolation in each case is of degree q = 1 (linear), and
the space of shape functions is complete up to linear order for a simplicial element in every
dimension.
Although one could, in principle, derive the shape functions for any arbitrary element geometry,
this turns out to be cumbersome in general. Consider, e.g., a simplicial element in 2D (a triangle)
whose three nodes are equipped with some nodal dofs u1 , u2 and u3 . One could now write
n
X
h
u (x) = ua N a (x), (16.1)
a=1
and enforce the conditions uh (xa ) = ua to solve the resulting system of equations for the
shape functions N a (x), as done at the beginning of Section 11.1. However, such an approach
is inconvenient as the resulting shape functions will inevitably depend on the nodal locations
xa in a complex manner and therefore vary from element to element based on the element
location and geometry. As a remedy, one resorts to the concept of isoparametric mappings
(see Section 15) to introduce general shape functions whose definition does not depend on the
element geometry. For simplices, one commonly introduces so-called barycentric coordinates.
120
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Aa (x)
3
lea (x) = e for a = 1, 2, 3 (16.3) 2
Ae A1
where Ae = |Ωe | is the total area of the triangular element, and Aae A2 x A3
is the sub-area opposite from node a when splitting the triangle into
three parts by connecting the nodes to point x (see the schematic
on the right). Consequently, we have A1e + A2e + A3e = Ae . For a
general element in 2D, we have two ways to describe the location of
a point in the triangular element: we either use its coordinate x or
the three barycentric coordinates lea to describe the point, and there 1
is a unique relation (a mapping) between (x1 , x2 ) ↔ (la1 , la2 , la3 ).
In general, we need only two coordinates to describe a point in 2D space (e.g., ξ and η, as intro-
duced above), and here we notice that, indeed, we need only two of the barycentric coordinates
to uniquely describe a point in space (if two of the lea are known, then the third is known as
well since le1 + le2 + le3 = 1). For example, we may define
as the two coordinates (ξ, η) to uniquely describe points within the triangle. Furthermore,
notice that the barycentric coordinates also satisfy the relation
(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
The beauty of these shape functions lies in the fact that, in the above form, they are independent
of the element geometry. They are also equivalent to those derived in (16.2). We also note that
computing shape function derivatives with respect to (ξ, η) is trivial:
1 2 3
1 Ne,ξ 1 2 Ne,ξ 0 3 Ne,ξ −1
∇ξ Ne = 1 = , ∇ξ Ne = 2 = , ∇ξ Ne = 3 = . (16.7)
Ne,η 0 Ne,η 1 Ne,η −1
We still need to find the link between the Cartesian coordinates (x1 , x2 ) and the reference
coordinates (ξ, η). To this end, let us exploit that we know N a (xb ) = δab and further the fact
that the shape functions introduced above define a linear interpolation across the element in
2D. The latter is easy to realize when, e.g., moving from one node a to another node b and
realizing that the reference coordinates linearly vary between 0 and 1 between these two nodes
(Nea will decrease from 1 to 0, while Neb will increase from 0 to 1). This holds true for each edge
of the triangle, and it can be extended to show a linear interpolation also within the triangle.
Therefore, we may use the above shape functions readily in an isoparametric mapping:
3
X
x(ξ, η) = Nea (ξ, η)xae = ξx1e + ηx2e + (1 − ξ − η)x3e , (16.8)
a=1
where xae are the positions of the three undeformed nodes in (real-space) mesh.
121
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
As introduced in Section 15.2, we may invoke the inverse function theorem to compute deriva-
tives. Based on the shape function derivatives in (16.7), the Jacobian matrix (15.9) here becomes
3 3
X X
a a a a
Ne,ξ x1,e Ne,ξ x2,e
x11,e − x31,e x12,e − x32,e
x1,ξ x2,ξ
a=1 a=1
[Je ] = = 3
3 = x2 − x3
2 3 = const.
x1,η x2,η X a a X
a a 1,e 1,e x2,e − x2,e
Ne,η x1,e Ne,η x2,e
a=1 a=1
(16.9)
and
Je = det Je = (x11,e − x31,e )(x22,e − x32,e ) − (x21,e − x31,e )(x12,e − x32,e ) = 2Ae = const., (16.10)
which evaluates to twice the element area Ae (in real space).
Notice that Je and hence Je within the element are constant and do not depend on (ξ, η).
Further, recall that we must have J > 0, which here implies that the triangular element must
not be inverted (i.e., the node numbering must be counter-clockwise and not clockwise).
As we had seen in (16.7) that all shape function derivatives N,ξa and N,ηa are constant (−1, +1,
or 0) and, since Je = const. as well, we also conclude that
a a
Ne,x 1
, Ne,x 2
= const. and also dA = dx1 dx2 = Je dξ dη = 2Ae dξ dη. (16.12)
The constant shape function derivatives have an important consequence: they indicate that all
derivatives ∂uh /∂xj within the triangular element are constant.
For example, for a mechanical boundary value problem, we have two nodal dof components in
2D, uae = (uae,1 , uae,2 ), and the interpolation of the displacement field reads
3
X 3
X
uh = uae Nea (ξ) or uhi = uae,i Nea (ξ) for i = 1, 2. (16.13)
a=1 a=1
Consequently, all strain components are constant within the element. This is why the 3-node
triangular element is also called the constant strain triangle or CST element. It also has
the important consequence that integration of force vectors or stiffness matrices can easily be
performed exactly since the integrands (for the element energy, nodal forces, and stiffness) are
constant across the element.
In case of higher-order triangular elements (discussed in Section 16.4), the following relation is
helpful for evaluating integrals over the triangular element:
Z Z 1 Z 1−η
α β α! β!
ξ η dA = ξ α η β 2Ae dξ dη = 2Ae . (16.15)
Ωe 0 0 (α + β + 2)!
122
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
16.2 Extension to 3D
The extension to three dimensions is straight-forward and results in the 4-node tetrahedron
(constant strain tetrahedron, abbreviated as T4 element or, unfortunately, also as CST)
with reference coordinates ξ = (ξ, η, ζ) and shape functions
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
We further note that, since strains are constant within elements, so are the resulting stresses:
The definition of the B-matrix, as introduced in Section 13.2, can be applied here as follows.
Let us consider the CST (triangular) element in 2D. For this element, the 2D strain components
in Voigt notation, using (16.9), are computed as
P3
uh1,1 uae,1 Ne,x
a
h
ε11 a=1 1
P3
[ε̃h ] = εh22 = uh2,2 = uae,2 Ne,x
a
a=1 2
2εh12 uh1,2 + uh2,1 3 a Na a Na
P
a=1 u e,1 e,x2 + u e,2 e,x1
xij i j (16.21)
23 31 12
y 0 ye 0 ye 0 e = xe,1 − xe,1 ,
1 e ij j
= 0 x32
e 0 x13 e 0 x21e
Ue with ye = xie,2 − xe,2 ,
2Ae 32 23 13 31 21 12
x e ye x e ye x e ye 2Ae = x21 31 31 21
e ye − xe ye ,
| {z }
=[Be ]
123
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
xij i j
23
0 ye31 0 ye12 0
y e = xe,1 − xe,1
1 e ij j
[Be ] = 0 x32 e 0 x13 e 0 x21
e
with ye = xie,2 − xe,2 (16.22)
2Ae
x32
e ye23 x13
e ye31 21 12
x e ye 21 31 31
2Ae = xe ye − xe ye 21
T
where we exploited that Je = const., and we defined Ue = u1e,1 , u1e,2 , u2e,1 , u2e,2 , u3e,1 , u3e,2 .
Furthermore, recall that (xae,1 , xae,2 ) denotes the 2D-location of the element’s node a. Analogous
formulations can, of course, be derived for the constant-strain tetrahedron in 3D.
For the more general case of a material with a constitutive law that is not linear elastic (but
assuming that is has a variational basis), we may still write
∂W ∂ σ̃
W = W (ε̃), ⇒ σ̃ = = σ̃(ε̃), C̃ = = C̃(ε̃), (16.25)
∂ ε̃ ∂ ε̃
so that
Z
Ie = W (ε̃h ) dV (16.26)
Ωe
and the internal force vector follows as
∂I int
Z
Fint,e = e = BeT σ̃ dV = BeT σ̃(ε̃h )tAe , (16.27)
∂Ue Ωe
while the incremental stiffness matrix (the nonlinear analog of the linear elastic stiffness
matrix) becomes
∂Feint
Z
Te = = BeT C̃Be dV = BeT C̃(ε̃h )Be tAe (16.28)
∂Ue Ωe
Note that if σ̃ = E ε̃, the above equations recover the linear elastic definitions with C̃ = E =
const. Otherwise, Te depends on deformation through ε̃h = ε̃h (Ue ), so that one cannot pre-
compute the stiffness matrix anymore but must re-evaluate it each time the nodal displacements
Ue change.
124
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Following the above recipe for the simplicial elements, one can also define higher-order triangular
and tetrahedral elements based on the parametric setting and associated reference/barycentric
coordinates introduced here.
For example, the quadratic triangle (T6) element in 2D has six nodes, so that the inter-
polation function space is {1, x1 , x2 , x21 , x1 x2 , x22 } and therefore complete up to second order.
Per convention, nodes 1-3 are the corners while 4-6 are at edge midpoints, and counting is
counter-clockwise as before.
3 3 4 4
2 5 2
10
8
6 4 3 9 3
7
1 1
6
1 1 5
2 2
CST (T3) LST (T6) CST (T4) LST (T10)
With the same barycentric reference coordinates (ξ, η) as for the T3 element, the shape functions
of the T6 element are found as
Ne1 (ξ, η) = ξ(2ξ − 1), Ne2 (ξ, η) = η(2η − 1), Ne3 (ξ, η) = θ(2θ − 1),
(16.29)
Ne4 (ξ, η) = 4ξη, Ne5 (ξ, η) = 4ηθ, Ne6 (ξ, η) = 4ξθ with θ = 1 − ξ − η.
Since derivatives of the above shape functions are linear, strains (and thus stresses) also vary
linearly within the T6 element. It is therefore known as the linear strain triangle (LST).
The quadratic interpolation implies that element edges of isoparametric elements can be curved,
whereas those of the CST element remain straight during deformation due to the linear inter-
polation.
Analogously, the quadratic tetrahedron (T10, also shown above) has four corner nodes and
six nodes at edge midpoints, resulting in linear strains within the element. This makes it a
linear strain tetrahedron.
For convenience, one may use both T6 and T10 elements along with a subparametric map-
ping, i.e., displacements are interpolated based on the above quadratic polynomials, while the
mapping of nodal positions between reference and real space relies on a linear interpolation.
The same concepts can be extended to higher dimensions and to higher-order interpolation, as
needed.
125
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
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
Shape functions must satisfy the FE relation Nea (ξb ) = δab in the reference configuration with
nodal positions ξb (b = 1, . . . , 4). In fact, these shape functions can be obtained from the 2-node
bar (whose shape functions we derived in Section 11.1) by scaling the linear scaling of the shape
functions up to 2D. Consider a 2-node bar whose nodes are positioned21 at ξ = ±1 (as shown
above), whose shape functions are
1 1
N̄e1 (ξ) = (1 − ξ), N̄e2 (ξ) = (1 + ξ). (17.1)
2 2
It can easily be verified that N̄e1 (−1) = 1, N̄e1 (1) = 0, and N̄e2 (−1) = 0, N̄e2 (1) = 1.
The 2D quadrilateral element in its reference configuration is Ωe = [−1, 1]2 , i.e., a square whose
corners are located at ξ = (±1, ±1). The shape functions can thus be obtained by combining
the above 1D bar shape functions independently in the ξ- and η-directions:
1
Ne1 (ξ, η) = N̄e1 (ξ)N̄e1 (η) = (1 − ξ)(1 − η),
4
2 2 1 1
Ne (ξ, η) = N̄e (ξ)N̄e (η) = (1 + ξ)(1 − η),
4 (17.2)
1
Ne3 (ξ, η) = N̄e2 (ξ)N̄e2 (η) = (1 + ξ)(1 + η),
4
4 1 2 1
Ne (ξ, η) = N̄e (ξ)N̄e (η) = (1 − ξ)(1 + η).
4
21
We note that this choice of ξ ∈ [−1, 1] for the bar in the reference configuration is arbitrary, one could also
have chosen, e.g., ξ ∈ [0, 1]. The present choice is convenient for its extension to the Q4 element in 2D.
126
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
P4
One can easily verify that Nea (ξb , ηb ) = δab and a
a=1 Ne (ξ, η) = 1 for all ξ = (ξ, η) in (17.2).
These shape functions are bi-linear.
The isoparametric mapping here implies that the (x1 , x2 )-coordinates are interpolated across the
element using the same shape functions (viz., the above ones) as those used for the interpolation
of the fields of interest. Therefore, we have in close analogy to the CST element
4
X 4
X
x1 = Nea (ξ, η) xae,1 , x2 = Nea (ξ, η) xae,2 . (17.3)
a=1 a=1
Notice that this implies straight edges (in the reference configuration) remain straight (in the
actual mesh). For example, take the bottom edge (characterized by η = −1): the interpolation
along this edge is
4
X 1 − ξ 1 1 + ξ 2 x1e + x2e x2 − x1e
x= Nea (ξ, −1)xae = xe + xe = + e ξ, (17.4)
2 2 2 2
a=1
which is a linear interpolation in ξ. Therefore, the bottom edge in the real mesh in physical
space is a linear interpolation between the two adjacent nodes. Similar arguments hold for all
edges, so that this element has always straight edges in physical space (which, e.g., calls for
finely resolved meshes when simulating curved objects).
Looking at the shape functions, we notice that completeness of the polynomial interpolation
is up to q = 1: even though the interpolation basis {1, ξ, η, ξη} contains the bilinear term, it is
not complete up to quadratic order (see Section 9.3). This means we must be able to exactly
represent linear solutions of the type
uh (x1 , x2 ) = c0 + c1 x1 + c2 x2 . (17.5)
A simple check reveals that this is indeed the case since our interpolation, based on the four
nodal values uae = uh (xae ), recovers the exact solution:
4
X 4
X 4
X
uh (x1 , x2 ) = Nea uae = Nea uh (xae,1 , xae,2 ) = Nea (c0 + c1 xae,1 + c2 xae,2 )
a=1 a=1 a=1
(17.6)
4 4 4
!
X X X
= Nea c0 + c1 Nea xae,1 + c2 Nea xae,2 = c0 + c1 x1 + c2 x2 .
a=1 a=1 a=1
Hence, we know that the chosen isoparametric element interpolation is capable of representing
linear solutions exactly.
Furthermore, notice that this interpolation scheme ensures that uh is continuous across ele-
ments. To see this, recall from (17.4) that on any element edge only those two shape functions
are non-zero whose nodes are adjacent to that edge, while the other shape functions are zero.
This implies that the interpolated field uh on any edge is simply a linear interpolation between
the two nodal values on that edge (and those two nodes are shared by the two adjacent ele-
ments). Hence, the interpolation on the edge must be the same when viewed from both adjacent
elements. As a further consequence, the above interpolation also ensures integrability in the
weak form, because a continuous, piecewise polynomial field uh guarantees that uh ∈ H1 (Ω).
Computing shape function derivatives is conveniently accomplished via the inverse function
theorem introduced in Section 15.2. In analogy to the simplicial element, we use x1 = x1 (ξ, η)
and x2 = x2 (ξ, η) so the inverse function theorem states
a a
Ne,x1 −1 Ne,ξ
a = Je a and more generally: ∇x Nea = Je−1 ∇ξ Nea . (17.7)
Ne,x2
Ne,η
127
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
By contrast to the simplicial elements, we no longer have that Je nor ∇ξ Nea are constant because
of the bilinear term ξη in the shape functions. Therefore, strains and stresses are not constant
within an element.
Example 17.1. 2-node bar revisited
As a simple example (before tackling the full 2D setting), recall the
2-node bar element, whose shape functions we originally computed Dxe
in 11.4 as 1 2
x x -1 x 1
Ne1 (x) = 1 − , Ne2 (x) = . (17.8)
∆xe ∆xe
For a reference bar element with nodes at ξ = ±1, the analogous shape functions in 1D read
1−ξ 1+ξ
Ne1 (ξ) = , Ne2 (ξ) = . (17.9)
2 2
It is simple to verify that these indeed evaluate to 0 and 1 at ξ = ±1. Applying the inverse
function theorem to this 1D problem gives the scalar Jacobian
∂x ∂Ne1 1 ∂Ne2 2 x2e − x1e ∆xe
Je = = xe + xe = = . (17.10)
∂ξ ∂ξ ∂ξ 2 2
The relation between the shape function derivatives in physical and reference space hence follows
as
2 1 1
a
Ne,x = Je−1 Ne,ξ
a
= Na with 1
Ne,ξ = − , Ne,ξ 2
= , (17.11)
∆xe e,ξ 2 2
so that we obtain correctly (as verified by differentiating (17.8))
1 1 2 1 2 1 2 1
Ne,x =− =− , Ne,x = = . (17.12)
2 ∆xe ∆xe 2 ∆xe ∆xe
Of course, here we could have obtained the derivatives directly from (17.8) without the detour
via the inverse function theorem. Yet, for Q4 elements in the following we cannot easily do
so anymore. Therefore, we aimed to illustrate the general procedure here for the simple 1D
setting.
————
When applying the inverse function theorem and the above relations to the bilinear quadrilateral
(Q4) element, we obtain the Jacobian
4 4
X X
N a xa a a
Ne,ξ x2,e
a=1 e,ξ 1,e
x1,ξ x2,ξ i=1
[Je ] = = 4
4
x1,η x2,η X X
a a a a
Ne,η x1,e Ne,η x2,e
a=1 i=1 (17.13)
1
xe,1 x1e,2
2 2
1 −(1 − η) (1 − η) (1 + η) −(1 + η) xe,1 xe,2
=
4 −(1 − ξ) −(1 + ξ) (1 + ξ) (1 − ξ) xe,1 x3e,2
3
x4e,1 x4e,2
and Je = det Je . We notice that Je indeed is not constant across the element but varies with ξ
and η. For convenience, let us define
−1 Γ11 Γ12
[Γe ] = [Je ] = . (17.14)
Γ21 Γ22
128
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Towards the FE implementation, let us also introduce the B-matrix notation. To this end, we
write for the 2D setting in Voigt notation
uh1,x1
h
ε11 1 0 0 0 h
u1,x2
[ε̃] = εh22 = 0 0 0 1 . (17.15)
h
uh2,x1
2ε12 0 1 1 0
uh2,x2
We further exploit the inverse function theorem by using relation (17.7), which here leads to
h h
u1,x1 Γ11 Γ12 0 0 u1,ξ
h
u1,x Γ21 Γ22 0 h
2
= u1,η .
0
(17.16)
uh2,x 0 0 Γ11 Γ12 uh2,ξ
1
uh2,x2 0 0 Γ21 Γ22 uh2,η
Note that here we have two scalar fields, uh1 and uh2 , so that relation (17.7) is applied indepen-
dently to each of the two components, which results in the block matrix in (17.16), containing
the components of Je−1 = Γe twice.
1 2 3 4
Γ11 Γ12 0 0 Ne,ξ 0 Ne,ξ 0 Ne,ξ 0 Ne,ξ 0
1 0 0 0 Γ21 1 2 3 4
Γ22 0 0 Ne,η 0 Ne,η 0 Ne,η 0 Ne,η 0
[Be ] = 0 0 0 1
0
1 2 3 4
0 Γ11 Γ12 0 Ne,ξ 0 Ne,ξ 0 Ne,ξ 0 Ne,ξ
0 1 1 0 1 2 3 4
0 0 Γ21 Γ22 0 Ne,η 0 Ne,η 0 Ne,η 0 Ne,η
(17.18)
with Γij from (17.14) and the shape function derivatives computed from (17.2). This defines
the Be -matrix for the Q4 element. Again, note that Be = Be (ξ), i.e., the Be -matrix is not
constant within an element but depends on ξ and η (through the shape function derivatives as
well as through Γe = Je−1 , which are both not constant).
Analogous to the simplicial element, a useful relation to evaluate area integrals over the
element in the following is (e1 , e2 being reference unit vectors)
∂x ∂x ∂y ∂y
dA = dx× dy = dξ e1 + dη e2 × dξ e1 + dη e2 = J dξ dη e1 ×e2 (17.19)
∂ξ ∂η ∂ξ ∂η
so that
dA = | dA| = J dξ dη (17.20)
Like for the simplicial elements, the above can be used to compute the element energy for a
Q4 element with out-of-plane thickness t and strain energy density W as
Z
Ie = W (ε̃h )t dA, (17.21)
Ωe
129
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
A complication here arises from the fact that Be is not constant, so that the above integrals
must be carried out (for general element shapes in real space). There is one special case, in
which this complication is reduced, which is the case of a so-called undistorted Q4 element.
In an undistorted element, the angles between edges does not change when mapping from the
reference to the real space. For example, an undistorted Q4 element remains a rectangle in the
actual mesh. In this special case, the above derivations simplify as follows. For a rectangular
element, we know that opposite edges have the same lengths. Therefore, let us assume that the
horizontal and vertical side lengths of the rectangular element are a and b, respectively, or
x2e,2 − x1e,2
1 a
[Je ] = . (17.26)
2 x4e,1 − x1e,1 b
Note that (17.25) alone only implies that the Q4 element in real space is a parallelogram. If we
further enforce that the angles are right as must be in rectangle, we know that x2e,2 − x1e,2 = 0
and x4e,1 − x1e,1 = 0. This leads to the Jacobian of an undistorted Q4 element as
1 a 0 ab
[Je ] = and Je = det Je = (17.27)
2 0 b 4
In this special case, Γ = const., so that Be in (17.18) becomes linear in ξ and η, so that the linear
elastic stiffness matrix in (17.24) becomes a polynomial of at most quadratic order in ξ and η.
In such cases, the integration can be carried out analytically. However, in the general case of
distorted elements, this is unfortunately hardly possible analytically. This will be addressed in
Section 19. Until then, let us quickly introduce higher-order and higher-dimensional elements
based on the Q4.
130
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
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
The resulting interpolation uses the basis (i.e., the above shape functions include these mono-
mials)
We notice that the above interpolation apparently includes far more monomials than required
for a quadratic interpolation (specifically, ξ 2 η, ξη 2 and ξ 2 η 2 are not required for a complete
quadratic interpolation). Therefore, one can also construct elements with less nodes that still
provide a complete quadratic interpolation.
h h
(-1,1) (1,1) (-1,1) (1,1)
4 7 3 4 7 3
x x
8 9 6 8 6
1 5 2 1 5 2
(-1,-1) (1,-1) (-1,-1) (1,-1)
Q9 in its reference space Q8 in its reference space
One such example is the 8-node quadratic quadrilateral (Q8) also known as the serendip-
ity element. In this element (shown above), the central node is missing. As a consequence,
131
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
shape functions are constructed in a different way than defined by (18.1). One starts by defining
those shape functions associated with the mid-edge nodes 5, 6, 7 and 8 as
(1 − η)(1 − ξ 2 ) (1 − η 2 )(1 + ξ)
Ne5 (ξ, η) = , Ne6 (ξ, η) = ,
2 2 (18.3)
7 (1 + η)(1 − ξ 2 ) 8 (1 − η 2 )(1 − ξ)
Ne (ξ, η) = , Ne (ξ, η) =
2 2
Notice that these are one polynomial order lower than the shape functions defined in (18.1). We
now conclude the remaining four shape functions (serendipitously, i.e., as an unplanned lucky
occurrence) as combinations of (18.3) and the bi-linear shape functions of the Q4 element,
(17.2). This leads to
(1 − ξ)(1 − η) 1 (1 + ξ)(1 − η) 1
Ne1 (ξ, η) = − (N5 + N8 ), Ne2 (ξ, η) = − (N5 + N6 ),
4 2 4 2 (18.4)
3 (1 + ξ)(1 + η) 1 4 (1 − ξ)(1 + η) 1
Ne (ξ, η) = − (N6 + N7 ), Ne (ξ, η) = − (N7 + N8 ).
4 2 4 2
a
You are invited to verify that these shape functions indeed satisfy Ne (ξb ) = δab . Both the Q8
and Q9 elements are schematically shown above in their reference configurations.
We may also extend the above construction of elements to three dimensions. The simplest
example in 3D was the Constant-Strain Tetrahedron, already discussed in Section 16.4. Here,
we introduce further 3D elements by extending, e.g., the definition of the bilinear quadrilateral
(Q4) element into 3D.
z
8 7 (1,1,1)
5 6
h
1
4
2
3
(1,1,-1)
(-1,-1,-1) (1,-1,-1)
brick element in its reference space
This results in the so-called 8-node brick element. Here, the 3D reference configuration is
described by coordinates (ξ, η, ζ), and the shape functions are a direct extension of (17.2), now
written in 3D, which gives
1 1
Ne1 (ξ, η, ζ) = (1 − ξ)(1 − η)(1 − ζ), Ne2 (ξ, η, ζ) = (1 + ξ)(1 − η)(1 − ζ),
8 8 (18.5)
3 1
Ne (ξ, η, ζ) = (1 + ξ)(1 + η)(1 − ζ), etc.
8
The link between reference and real space is again given by an isoparametric mapping, so that
shape function derivatives again follow from the inverse function theorem as
∇x Nea = Je−1 ∇ξ Nea (18.6)
and volume integrals make use of
dV = J dξ dη dζ. (18.7)
132
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
19 Numerical quadrature
The Q4, Q8, Q9 and brick elements are perfect examples to motivate the concepts discussed in
this section, viz. the use of numerical quadrature. Recall that, in order to perform finite element
simulations, we may need to compute the element energy, nodal forces, and tangent matrix:
Z Z Z
h T
Ie = W (ε̃ ) dV, Fint,e = Be σ̃ dV, Te = BeT C̃Be dV, (19.1)
Ωe Ωe Ωe
each of which requires computing an integral over the element Ωe . In general (unlike for the
special case of simplicial elements), the integrands are not constant but may be complex func-
tions of position (even in the linear elastic case, e.g., because of complex element shapes in real
space). As a consequence the above integrals cannot easily be calculated analytically, which is
why we make use of numerical integration schemes.
As an example for numerical integration, consider a partition of the range from −1 to 1 into n
segments separated by n + 1 nodes. That is, we introduce the partition
P = {[ξ0 , ξ1 ], [ξ1 , ξ2 ], . . . , [ξn−1 , ξn ]} such that −1 = ξ0 < ξ1 < ξ2 < . . . < ξn = 1. (19.6)
The Riemann sum is probably the simplest approach to computing the integral in (19.4)
numerically, by simply summing the contributions from all segments, thus defining the approx-
imate integral S as
n
X
I≈S= f (ξi∗ )(ξi − ξi−1 ) with ξi−1 ≤ ξi∗ ≤ ξi . (19.7)
i=1
Here, the choice of ξi∗ within each interval is, in principle, arbitrary. It should be “somehow
representative” of the function f within the interval [ξi−1 , ξi ].
133
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
More refined formulations can be found in the so-called Newton-Cotes formulae (the trape-
zoidal rule is the Newton-Cotes formula of degree 1). While Riemann and Newton-Cotes formu-
lae are indeed viable schemes for numerical integration, they are inefficient, because, to achieve
good accuracy, they require a partition into many segments in general. The following concept
of so-called Gaussian quadrature aims to circumvent these computational expenses.
f(xi) f(xi)
f(x)
x x x
-1 +1 x0 xi-1 xi xn -1 x0 xi +1
An efficient alternative to the above Riemann sums are quadrature rules (also called cuba-
ture rules in 3D), which are best suited for integrating polynomial functions. The idea is to
approximate the integral by a weighted sum over integration points (as shown in the schematic
above on the right), i.e., we define
Z 1 nQP −1
X
I[f ] = f (ξ) dξ ≈ Wi f (ξi ) (19.8)
−1 i=0
Now, the challenge is to choose the number of integration points, nQP , as well as the weights
{W0 , . . . , WnQP −1 } and locations {ξ0 , . . . , ξnQP −1 } of each integration point. That choice
should depend on the function to be integrated (more specifically, on its smoothness; one can
easily imagine that smooth polynomials require few integration points, while strongly fluctuat-
ing functions require larger numbers of integration points). In the FE context, most functions
of interest will be of polynomial type since our shape functions are commonly defined as poly-
nomials. Any polynomial function is generally written as
f (ξ) = a0 + a1 ξ + a2 ξ 2 + . . . with ai ∈ R const., (19.9)
so that – to integrate a polynomial exactly – we must make sure to integrate exactly all mono-
mials 1, ξ, ξ 2 , etc. up to the required polynomial order.
We say a quadrature rule is “exact of order q”, if it integrates exactly all polynomial functions
g ∈ Pq ([−1, 1]) (or all monomials up to ξ q ). Gauss quadrature generally chooses nQP quadra-
ture points and associated weights such that the quadrature rule is exact of order q = 2nQP − 1.
Let us find the optimal weights and integration points for Gaussian quadrature.
134
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Gauss-Legendre quadrature selects the nodes and weights such that the first 2nQP mono-
mials are computed exactly. In other words, we find the weights and locations by requiring that
Z 1 nQP −1
!
X
k
ξ dξ = Wi ξik , for k = 0, 1, . . . , 2nQP − 1. (19.10)
−1 i=0
These are 2nQP equations for the 2nQP yet unknown parameters (Wi , ξi ) for i = 0, . . . , nQP − 1.
The equations are generally nonlinear and thus hard to solve analytically. Yet, we can find
solutions for the lowest few orders in 1D as follows:
• a single quadrature point, i.e., nQP = 1, approximates the integral by evaluating the
function only at a single location ξ0 ∈ [−1, 1].
The two equations for the two unknowns (the weight W0 and location ξ0 ) are obtained
from requiring that any constant function, f (ξ) = ξ 0 , and any linear function, f (ξ) = ξ 1 ,
must be integrated exactly. This implies that
Z 1 Z 1
0 ! 0 !
ξ dξ = 2 = W0 ξ0 = W0 and ξ 1 dξ = 0 = W0 ξ01 = W0 ξ0 (19.11)
−1 −1
• two quadrature points, i.e., nQP = 2, require the calculation of the two weights and
associated quadrature point locations.
In close analogy to the above case, we now have four unknowns (two weights, W0 and
W1 , and two integration point locations, ξ0 and ξ1 ) and construct the four equations to
solve for those by requiring that any constant, linear, quadratic, or cubic function must
be integrated exactly:
Z 1 Z 1
! !
ξ 0 dξ = 2 = W0 + W1 , ξ 1 dξ = 0 = W0 ξ0 + W1 ξ1 ,
−1 −1
Z 1 Z 1 (19.13)
2 2 ! 2 2 3 ! 3 3
ξ dξ = = W0 ξ0 + W1 ξ1 , ξ dξ = 0 = W0 ξ0 + W1 ξ1 .
−1 3 −1
135
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Note that, for general functions f (which are not necessarily of polynomial type), one can
sometimes find a decomposition f (ξ) = w(ξ)g(ξ) where w(·) is a known weighting function and
g(ξ) is (approximately) polynomial, so that a more suitable quadrature rule may be found via
Z 1 Z 1 nQP −1
X
I[u] = f (ξ) dξ = w(ξ) g(ξ) dξ ≈ w(ξi ) g(ξi ). (19.15)
−1 −1 i=0
Examples of such Gaussian quadrature rules include those of Gauss-Chebyshew type, which
are obtained form a weighting function w(ξ) = (1 − ξ 2 )−1/2 , and the quadrature points are the
roots of Chebyshew polynomials. Gauss-Hermite quadrature uses a weighting function w(ξ) =
exp(−ξ 2 ) (and the integral is taken over the entire real axis). Gauss-Legendre quadrature is
included as a special case.
Another popular alternative (less for FE though) is Gauss-Lobatto quadrature which in-
cludes the interval end points as quadrature points and is accurate for polynomials up to degree
2nQP − 3. It uses the approximation
Z 1 nQP −1
2 X
I[u] = f (ξ) dξ ≈ f (−1) + f (1) + Wi f (ξi ). (19.16)
−1 nQP (nQP − 1)
i=2
The above quadrature rules can easily be extended to 2D and 3D. For example, for 2D elements
such as the Q4, Q8 or Q9 we compute approximate integrals over Ωe = [−1, 1]2 as
−1 −1
Z 1Z 1 Z 1 "NX # N
"N −1 #
X X
f (ξ, η) dξ dη ≈ Wi f (ξi , η) dη ≈ Wj Wi f (ξi , ηj )
−1 −1 −1 i=0 j=0 i=0
(19.17)
nQP −1
X
= Wk∗ f (ξk )
k=0
136
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
with the combined weights Wk∗ = Wi Wj and points ξk = (ξi , ηj ) obtained from the individual
√
quadrature rules in each direction. By symmetry we choose N = nQP so that N 2 = nQP , i.e.,
we have N quadrature points per direction.
• first-order quadrature (q = 1), as in 1D, has only a single quadrature point (nQP = 1):
Bi-linear functions (at most linear in ξ and η) are integrated exactly with this rule.
• third-order quadrature (q = 3), now has four quadrature points in 2D (nQP = 22 = 4):
1 1
(ξi , ηi ) = ± √ , ± √ and W0 = W1 = W2 = W3 = 1 (19.19)
3 3
Bicubic polynomial functions (at most cubic in ξ and η) are integrated exactly.
Similarly in 3D, the brick element defined on Ωe = [−1, 1]3 (and analogous higher-order
elements) may use Gauss-Legendre quadrature, resulting in the following schemes:
• third-order quadrature (q = 3), now has eight quadrature points (nQP = 23 = 8):
1 1 1
(ξi , ηi , ζi ) = ± √ , ± √ , ± √ and Wi = 1. (19.21)
3 3 3
Shown below are schematics of the quadrature point locations for Gauss-Legendre quadrature
of orders q = 1 and q = 3 in 2D. Note that in the FE community one often refers to quadra-
ture points also as Gauss points, since one most commonly uses the above Gauss-Legendre
quadrature rules.
h h
+1 +1
x3 x2
x0
x x
-1 +1 -1 +1
x0 x1
-1 -1
q = 1 in 2D q = 3 in 2D
137
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Ultimately, the choice of a specific quadrature rule in any dimension depends on the function
f (ξ) to be integrated. If the latter is of polynomial type, then we may choose a Gaussian
quadrature rule that leads to exact integration. Else, we may choose a quadrature rule based
on the smoothness of the function (Appendix O shows that the error introduced by a numerical
quadrature rule strongly depends on the smoothness of function f ). In general, the choice of a
quadrature rule is often a compromise between accuracy and efficiency. In the next section, we
look into quadrature rules specifically for finite elements.
138
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The quadrature rules we introduced in Section 19 gives us a palette of tools to numerically inte-
grate functions in arbitrary dimensions. Yet, the open question has remained: which quadrature
rule(s) should we use for evaluating finite element quantities?
Let us first summarize the key integrals to be evaluated numerically within the FE context.
For example for a 2D quadrilateral element with out-of-plane element thickness t, the element
energy is
Z Z 1 Z 1 nQP −1
X
h h
Wk W ε̃h (ξk ) Je (ξk )te ,
Ie = W (ε̃ ) dV = W ε̃ (ξ) Je (ξ)te dξ dη ≈
Ωe −1 −1 k=0
where we assumed that the material stiffness matrix E is constant across the element. (Other-
wise, E also depends on position ξ.)
Recall that in all of the above relations the shape function derivatives ∇x Nea appear (1) in the
Be -matrix, which depends on ∇x Nea , (2) in the strains ε̃h = Be U , and (3) in the Jacobian Je .
When computing the shape function derivatives, we recall
In all of the above integrals, the required quadrature rule depends on the smoothness (or
polynomial order) of the integrands. Since stresses, shape function derivatives, Jacobians, and
B-matrices are not necessarily smooth polynomials, one often cannot (or, due to computational
expenses, is not willing to) achieve exact integration for each element. For example, for the
Q4 element we have seen that Je is linear in ξ, hence Γe = Je−1 is a fractional polynomial,
and Be involves both Γe and ∇ξ Nea . As a consequence, BeT EBe (even if E = const.) is some
139
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
fractional polynomial, which is hard to integrate exactly in general. Therefore, let us introduce
a minimum requirement for the integration order of a particular element type.
Specifically, our minimum requirement is that an undistorted elastic element is integrated ex-
actly. Thus, we define:
An element is undistorted, if all internal element angles are preserved between the reference
configuration and its shape in real/physical space (see the discussion at the end of Section 17).
Mathematically speaking, an element is undistorted if J = const. across the element. The
schematics below show examples of an undistorted and three distorted Q4 elements.
b
a
Let us determine the order of full integration for the element types discussed before:
• The 4-node bilinear quadrilateral (Q4) is undistorted, if the element in real space
has the shape of a rectangle. Consider, e.g., a rectangular element of side lengths a and b
in the x1 - and x2 -directions, respectively. As shown in (17.27), evaluating Je from (17.13)
yields
1 a 0 ab
Je = = const. ⇒ Je = det Je = = const. (20.5)
2 0 b 4
at most bilinear in x, we conclude that ∇x Nea is at most linear in ξ. For the homogeneous
linear elastic Q4 element we thus have
abte 1 1 T
Z Z
Ke = B (ξ) E B̃ T (ξ) dξ dη, (20.6)
4 −1 −1 | e{z } |{z} | e{z }
∈P1 (R) =const. ∈P1 (R)
140
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
• Full integration of the 8-node brick element requires nQP = 23 = 8 quadrature points
by the same argument as for the Q4 element, here extended to 3D.
• For simplicial elements, we showed that strains and stresses are constant across an
element, so that a single quadrature point (nQP = 1) at an arbitrary location inside the
element is sufficient to integrate exactly. Usually, one chooses the element center, which
gives
1 1
W0 = 1, ξ0 = η0 = (in 2D) or ξ0 = η 0 = ζ0 = (in 3D). (20.7)
3 4
• For the quadratic triangle (T6), full integration requires order q = 2, which corre-
sponds to three quadrature points. We note that triangle-based elements require simplicial
quadrature rules (instead of Gaussian quadrature rules), whose weights and quadrature
point locations can be found in look-up tables.
————
Note that not only does full integration guarantee that the stiffness matrix of an undistorted,
homogeneous, elastic element is integrated exactly. By reviewing the element energy and the
element force vector, we make the same observation (i.e., those are integrated exactly as well).
For example, the energy and internal force vector of a linear elastic Q4 element in 2D are
1
Ie = Ue · Ke Ue and Fint,e = Ke Ue (20.8)
2
with
Z 1 Z 1
Ke = BeT (ξ)E B̃eT (ξ)Je (ξ)te dξ dη. (20.9)
−1 −1
follows the same argument. Hence, full integration implies that the element energy, nodal
forces, and stiffness matrix are integrated exactly for any undistorted, homogeneous, linear
elastic element. A summary of full integration for selected element types is given below.
Using an integration rule less than full integration is called under-integration or reduced
integration; the opposite is called over-integration. Which integration order to use depends
on the element type, the material model, etc. As a rule of thumb (and without more knowledge
about the problem at hand), it is generally advised to use full integration. In some special
cases under-integration can indeed be beneficial (e.g., to avoid locking); we will discuss one
such example in Section 22.
141
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
21 Boundary conditions
We recall that solving a mechanical boundary value problem by the finite element method
reduces to solving the global system of equations given by
Fint (U ) = Fext (U ) (21.1)
for the vector of all nodal dofs, U . If the material is linear elastic, then Fint (U ) = KU and
system (21.1) is linear. In general (i.e., for anything but linear elastic behavior), the system
of equations in (21.1) is nonlinear. So far, we have discussed various finite elements types
and the underlying equations to be solved, but we still need to turn our attention to boundary
conditions, which we have not discussed in detail so far. This includes both Neumann boundary
conditions (leading to the specific form of Fext (U )) and Dirichlet boundary conditions (imposing
constraints on the degrees of freedom). These will be discussed in the following.
The right-hand side vector Fext in (21.1) includes the combined effects of externally applied
body forces ρb and surface tractions t̂ in general. Of course, if forces are applied only to FE
nodes, then the components of Fext are trivially identified. However, in reality we often deal
with distributed (and possibly deformation-dependent) loads, which must be converted into
appropriate external nodal forces first.
These integrals can be computed in the same fashion as all other FE quantities (such as,
e.g., nodal forces and stiffness matrices), and it is convenient to use numerical quadrature to
approximate the above integrals in general. For example, for a 2D quadrilateral element (such
as the Q4, Q8 or Q9 of constant thickness t), we may write the contribution from element e to
a
nodal force component Fext,i due to a distributed body force ρb as
Z Z 1 Z 1 nQP −1
X
a
Fext,e,i = ρbi N a dV = ρbi (ξ)Nea (ξ) J(ξ)t dξ dη ≈ Wk ρbi (ξk )Nea (ξk ) tJ(ξk ).
Ωe −1 −1 k=0
(21.3)
If, e.g., a body force such as gravity (ρb = ρg) acts on a body, then the uniformly distributed
gravitational load is distributed into nodal forces, which are computed via (21.3). Here, the
shape functions Nea provide a weighting in the mapping of the distributed load onto the nodes,
as shown schematically for a CST element under constant gravity loading below.
Fext,e,3
g
3 3
rg Fext,e,2
Fext,e,1
2 2
1 1
142
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Analogously, surface tractions result in an external force on node a in direction i, again for
a 2D isoparametric element e, given by
Z Z 1 nQP −1
X
a
Fext,e,i = t̂i N a dS = t̂i (ζ)Nea (ζ) Jζ (ζ)t dζ ≈ Wk t̂i (ζk )Nea (ζk ) tJζ (ζk ). (21.4)
∂Ωe −1 k=0
Note that the surface traction term integrates over the boundary of the element (ζ stands for
either ξ or η, depending on the orientation of the surface on which the tractions are acting), so
in d dimensions we can use a quadrature rule for d − 1 dimensions (e.g., for a 2D element we
use 1D quadrature rule on an element edge). Jζ denotes the Jacobian for the 1D interpolation
along the edge. The lumping of a distributed surface traction t̂ onto the two nodal forces for
2D element is schematically illustrated below.
a a Fext,e,a
t^
e z e
Fext,e,b
b b
Like for internal forces, the global external force vector Fext results from assembling all element
contributions, i.e., from adding the contributions of all external element force vectors onto the
global external force vector (see Section 14.)
When using a variational formulation, we may interpret external forces also in a variational
sense. Specifically, we can formulate the work done by external forces on element e, assuming
that ρb and t̂ do not depend on u, as
∂Wext,e [uh ]
Z Z
a
Wext,e [u] = ρb · u dV + t̂ · u dS ⇒ Fext,e = (21.5)
Ωe ∂Ωe ∂ua
a
The resulting force vector Fext,e acting on node a is exactly the sum of (21.3) and (21.4), if
t̂ and ρb are independent of the nodal displacements, i.e., if Fext does not dependent on U .
Otherwise, caution is required and the representation of Wext,e may be more involved (examples
will be discussed in the following).
Several examples of typical external forces in the FEM context are shown below.
Dx ua n2
P ua pL2/2
L2 p
My l0 pL2/2
P k l pL1/2
L1 p
n n1 pL1/2
constant force/ linear spring linear spring pressure loading
constant moment (linearized deform.) (nonlinear deform.) (Q4 elements)
143
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Before we dive into specific examples, we point out one important aspect of the implementation
and assembly of the overall problem. So far, we have primarily considered problems with context
external forces, so that we had to solve Fint (U ) = Fext . When the external forces also depend
on the nodal unknowns (as, e.g., in Examples 21.2 and 21.3 below), then the problem to be
solved is in fact
with
Iint (U ) = Ane=1
e
Ie (Ue ), W (U ) = Ane=1
e
Wext,e (Ue ), (21.8)
such that
∂I ∂Iint ∂W
f (U ) = (U ) = (U ) − (U ) = Fint (U ) − Fext (U ). (21.9)
∂U |∂U{z } |∂U{z }
Fint Fext
Note that this setup requires that a suitable form of Wext (U ) exists to represent the work done
by the external forces (which can be non-trivial).
When solving equations of the type (21.9), we may need to compute the associated stiffness
matrix T = ∂f /∂U . Since equation (21.9) can be linear or nonlinear in U , we generally refer
to T as the tangent matrix (which in the case of a linear system is identical to the constant
stiffness matrix but in general may depend on U ). We will see in Section 23 that this tangent
matrix can be essential when using numerical solvers. Since both Fint and Fext may depend on
U , we require the complete tangent matrix – including both those contributions from internal
and external forces – so that
∂f ∂Fint ∂Fext
T (U ) = (U ) = (U ) − (U ) = Tint (U ) − Text (U ). (21.10)
∂U | ∂U{z } | ∂U{z }
=Tint =Text
(from before) (new contribution)
Therefore, when discussing the specific examples in the following, we will define the work done by
a , and the associated
the external force, Wext , along with the resulting external nodal forces Fext
external stiffness matrix contribution Text , as introduced above. When assembling the global
system, both contributions – from internal and external forces – must be considered.
a ∂Wext
Fext = = P δab , (21.12)
∂ua
144
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
i.e., the constant external force P is applied only to node b. We note that the associated stiffness
matrix (which would be needed for iterative solution schemes) vanishes, since
a
∂Fext
ab
Text = = 0. (21.13)
∂ub
Wext = My θb ⇒ a
Mext =
∂Wext
= My δab . (21.14) My
∂θa
————
Example 21.2. Linear spring undergoing small deformations
Consider a linear elastic spring (stiffness k) attached to a node a along the
n-direction (with unit vector |n| = 1 pointing in the direction of stretch- Dx
ing the spring), which undergoes only small deformations so that linearized ua
kinematics can be used. Therefore, the change of length ∆x of the spring is
(approximately) given by the projection of the displacement ua onto n. In
this case, the spring energy as a function of the displacement ua is k
k k n
Espring = ∆x2 = (ua · n)2 . (21.15)
2 2
To compute the nodal force vectors, we need to be careful since Espring is the spring energy and
not the work Wext performed by the spring. Therefore, we must add Espring to the potential
energy functional instead of substracting it as external work. Recalling concepts from under-
graduate dynamics, we know that the work done by the spring on the body must equal the
potential difference, so Wext = Espring,0 − Espring where Espring,0 = 0 in our case since the spring
is initially unstretched. Hence, we have Wext = −Espring . The resulting force vector on node a
(all other nodal forces being zero) thus follows as
a ∂Wext ∂Espring
Fext = a
=− = −k(ua · n)n, (21.16)
∂u ∂ua
where the minus sign enters due to the use of E instead of Wext (and it makes sense physically:
if node a is displaced along the positive n direction, the spring is stretched and hence the force
on node a must be acting in the opposite direction, since the spring is pulling node a back).
The spring force is an example where the external force vector depends on the nodal displace-
ment ua . The associated tangent stiffness matrix has component Text aa as its only non-zero
(sub)matrix, since
a
∂Fext
ab
Text = = −kn ⊗ n δab = const. (21.17)
∂ub
————
Example 21.3. Linear spring undergoing large deformations
a
If the linear elastic spring from the previous example undergoes large defor-
xa u
mations, then the elastic energy in the spring – accounting for the nonlinear,
exact change in length of the spring – is l0
2 l
k
E= |xa + ua − x0 | − |xa − x0 | , (21.18)
2 x0
145
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
where xa is the undeformed position of node a (the node to which the spring is attached), x0
is the other end of the spring, i.e., its anchor point, and xa + ua with displacement ua is the
deformed position of node a (so that l0 = |xa − x0 | is the undeformed spring length). External
force vector and stiffness matrix follow, as before, by differentiation.
and the external force contribution from element e (associated with node a) follows as
Z
a ∂Wext,e
Fext,e = = −p nNea dS (21.20)
∂uae ∂Ωe
For example, for a (bi-)linear element in 2D (such as the CST and Q4 elements) element edges
are straight, so that the normal n is constant along each element edge. Further assume that
pressure p acts only on one edge ∂Ω′e of length Le (and an out-of-plane thickness t). In this
special case, the above simplifies to
Z Z
a pn pLe t
Fext = −p nNea dS = − Nea dS = − n, (21.21)
∂Ω′e 2 ∂Ω′e 2
where we exploited that the shape function N a (varying linearly between 0 and 1 on the edge,
if a is a node on the edge) integrates to 1/2. The total external force on node a due to pressure
follows from summing over the force contributions from all elements adjacent to node a, so
X pLe t
a
Fext = (−ne ), (21.22)
2
e∈Na
146
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
considerably more complex, and the work done by a constant external pressure acting on a
body of deformed volume v = v(U ) is Wext = pv.
————
In case of a linearly varying surface traction t(x) acting on the edge of an element e, the
corresponding nodal forces can be obtained form the above equations. Assume, e.g., a (bi-)
linear element in 2D (such as the CST or Q4) with straight edges, for which a linearly varying
pressure p(x) (which varies between pa and pb , as shown below) applied to an edge of length Le
(and out-of-plane thickness t) translates into the two nodal forces
a a
Fext,e Le t 2 1 p
b = . (21.23)
Fext,e 6 1 2 pb
Similarly, having a quadratically varying pressure p(x) applied to the edge of a (bi-)quadratic
element (such as the LST, Q8, Q9) leads to the equivalent nodal forces
a a
Fext,e 4 2 −1 p
b
Fext,e = Le t 2 16 2 pb . (21.24)
30
c
Fext,e −1 2 4 pc
We note that, of course, one can also apply higher-order tractions to lower-order elements (e.g.,
a quadratically varying load to a linearly interpolated edge). In this case, however, the work
done Wext is approximated by the FE discretization. In the above two examples (which are
shown schematically below), the equivalence is exact.
b pb c pc
b c
Fext,e Fext,e
Le Le Leb pb Le b
Fext,e
a pa a
Fext,e a pa a
Fext,e
linearly varying pressure quadratically varying pressure
on a linear element edge on a quadratic element edge
For more complex element types or more complex loading, integration over the element edge
or surface can again be carried out using numerical quadrature over the element boundary or
surface (each element boundary normal ne can be computed from the elements’ nodal locations).
As before, forces and stiffness matrix follow by differentiation (forces are constant, and the
stiffness matrix vanishes).
————
147
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Essential boundary conditions of the type uai = ûai must be imposed onto the system of equa-
tions Fint (U ) = Fext . This is usually accomplished computationally in one of the two ways
discussed in the following22 . We will first focus on linear elastic examples and later reconsider
the procedure for nonlinear systems, when discussing iterative solvers in Section 23.8.
21.2.1 Substitution
Brute-force substitution is a simple method: we replace the respective equation for uai in the
system KU = Fext by uai = ûai . For example, to enforce u3 = û3 (using an example with only
a single dof per node), we replace the corresponding equation (i.e., the entries in the stiffness
matrix and external force vector), resulting in
1 1
K11 K12 . . . · · u Fext
· · · · 2
· u Fext
2
3
0 0 1 0 0 3
u = û . (21.26)
· · · · · u4 4
Fext
· · · · K55 u5 5
Fext
21.2.2 Condensation
To understand this, let us enforce u1 = û1 and u2 = û2 (again, using an example with only a
single dof per node) in the global system KU = Fext . As the two displacements u1 and u2 are
enforced, we do not know the corresponding reaction forces, so the system to the be solved is
1
K11 K12 K13 K14 K15 û ?
K21 K22 K23 K24 K25 û2 ?
K31 K32 K33 K34 K35 u3 = F 3 (21.27)
ext
K41 K42 K43 K44 K45 u4 F 4
ext
K51 K52 K53 K54 K55 u5 5
Fext
Notice that we can partition the system into subsystems (as indicated above by the solid lines
in the matrix equation), separating between dofs that impose a Dirichlet (D) or Neumann (N)
boundary condition. This allows us to rewrite the above system of equations by introducing
22
We mention that similar techniques can also be employed to impose more complex conditions such as con-
straints of the general type
f (ua , ub , . . .) = 0, (21.25)
which become important, e.g., when enforcing rigid links between nodes (|xa + ua − (xb + ub )| = const.), or
systems of bodies including rigid bodies (i.e., rigid links and rigid angles), or imposing deformation/motion of a
node along an inclined surfaces (ua = ua n with fixed, known unit vector n). Such constraints can be implemented
in a similar fashion but are not discussed here further (we refer to the rich FEM literature).
148
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
sub-matrices and sub-vectors, which are associated with each type of boundary condition, as
follows:
KDD KDN UD FD
= . (21.28)
KND KNN UN FN
Note that, for such substructing of the system of equations, the dofs do not necessarily have
to be in order (as in the above example). In general, the dofs associated with D- and N-type
boundary conditions will be distributed all over vector U , but one can still arrive at the above
form by re-grouping or re-sorting vectors and matrices, or by taking the corresponding block
matrices.
Ultimately, the above substructuring admits solving for the unknown displacements UN (in
this case UN = (u3 , u4 , u5 )T ) efficiently as follows. After splitting (21.28) into two systems of
equations, the “bottom” one reads KND UD + KNN UN = FN , which can be solved for
−1
UN = KNN (FN − KND UD ) (21.29)
where UD is known, since it contains only Dirichlet boundary conditions. Finally, the complete
solution is U = (UD , UN ).
The advantage of this method is the reduction in size of the system to be solved. The dis-
advantage is that it is more involved to implement and, if implemented poorly, the matrix
modifications can be computationally expensive as well (in such a case, it can be even more
expensive than the substitution technique when a small number of essential boundary condi-
tions is being applied to a large system, so the reduction in size is negligible). However, with
state-of-the-art implementations this computational overhead should not be significant.
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
149
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
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.
Now, let us approximate the beam as a single Q4 element of dimensions a × b (as shown
above) and try to find the analogous solution. Since we cannot apply a moment, we instead
apply horizontal forces to all four nodes of the element, which are obtained from lumping the
distributed beam stresses to the nodes. According to relation (13.20), which we found for the
externally applied forces, the force on node 1 becomes (with σ11 from (22.1) and shape function
Ne1 of the Q4 element evaluated on the vertical edge)
Z Z Z 1
1 1 x2 b
Fext,1 = t̂Ne dS = (−σ11 )Ne dS = σmax Ne1 (ξ = −1, η) t dη
∂Ωe ∂Ωe −1 b/2 2
Z 1 (22.3)
(1 − (−1))(1 − η) b σmax tb σmax tb
= η σmax t dη = − = −F with F = .
−1 4 2 6 6
Note that the minus in (−σ11 ) is due to the negative cut, so the traction t̂ applied at the left
edge of the element responsible for the forces is in fact −σ11 . Further, dS = tJ dη with J = b/2
for the 1D interpolation along the edge. On the opposite edge, the solution is the same without
the minus sign. Analogously, we obtain
Fext,2 = F, Fext,3 = −F, Fext,4 = F. (22.4)
That is, the bottom edge is stretched, while the top edge is compressed (as in beam bending).
smax smax F F U U
x2 4 h 3 h
x1 x x
1 2
smax smax F F U U
a
stress distribution due to Q4 element with equivalent elastic Q4 element deformed
the applied moments nodal forces by the nodal forces
150
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Solving the problem for the case of linear elasticity reduces to a simple linear system of equations
(which involves the element stiffness matrix Ke of the Q4 element, which is not written out
here for brevity):
−F
0
F
0 σmax tb
Ke Ueh = Fext with [Fext ] =
, F = . (22.5)
−F
6
0
F
0
By removing rigid-body motion, the problem can be solved by inverting Ke , which results in
the solution
−U
0
U
h
0 σmax (1 + ν)(1 − 2ν)
[Ue ] =
−U
with U =a , (22.6)
E 2(1 − ν) + (a/b)2 (1 − 2ν)
0
U
0
where we used the exact element forces and stiffness matrix (since the element is undistorted,
we can easily find the exact solution by full integration using 2 × 2 quadrature points).
The resulting strains within the element are evaluated by inserting (22.6) into the approximate
element strains, which yields
U U
εh11 = − η, εh22 = 0, εh12 = − ξ. (22.7)
a b
These are to be compared to (22.2). While the axial strain component εh11 is physically reason-
able (and the lack of a transverse strain εh22 – worst case – makes the element too soft against
bending), the presence of a non-zero shear stress εh12 is problematic. This so-called parasitic
shear is not physical but a numerical artifact (elastic Euler beams produce no shear stresses,
cf. (22.2)). This parasitic shear contributes to the energy of the element, so that – when min-
imizing the potential energy in a boundary value problem – this shear component introduces
artificial stiffness. This becomes apparent when calculating, e.g., the angle of bending θ of the
beam in the above problem.
F qapprox F qexact
My My
F F
Comparing the exact angle θ (obtained form beam theory) to the approximate one (obtained
151
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
With the objective of finding a remedy to the locking problem, let us use numerical quadrature
to evaluate the element quantities of interest. For example, for the energy we have
Z nQP −1
1 h t X
Ie = ε · C εh dV ≈ Wk εh (ξk ) · C εh (ξk ) J(ξk ). (22.9)
Ωe 2 2
k=0
We showed before that full integration requires nQP = 2 × 2 quadrature points (and we have
demonstrated above that such exact integration leads to element locking under bending).
If instead we use reduced integration with only a single quadrature point (nQP = 1) located
at ξ0 = 0, then notice that the strain fields in (22.7) vanish at the quadrature point location
ξ = η = 0. Therefore, the strains in this case produce no energy. In other words, when using
reduced integration, any strain field of the form (22.7) can appear without causing any energy
and therefore also without causing any resistance from the element in terms of nodal forces.
This is a zero-energy mode of the under-integrated Q4 element and a serious defect. The
resulting deformation of elements undergoing alternating strains (22.7) is a numerical artifact
and often referred to as hourglass mode or chicken-wire mode because of its appearance.
Note that not only the underintegrated Q4 element has such a zero-energy mode. For example,
the Q8/Q9 elements have a similar zero-energy mode with curved element edges (shown below).
+ + + +
+ +
+ + + +
+ +
+ + + +
Finally, we note that it is possible to use selective integration, which applies different quadra-
ture rules for different energy contributions. For example, integrating the Q4 element with a
2 × 2 quadrature rule for the nominal strains εh11 and εh22 while using reduced integration with a
single quadrature point at ξ = 0 for the shear strain εh12 removes the spurious shear contribution
while maintaining the correct stiffness against axial deformation. Unfortunately, selective inte-
gration is harder to implement (since different strain components must be treated differently),
not directly applicable beyond linear elasticity (since there is no superposition of deformation
modes), requires expert knowledge, and should hence be used with caution.
Overall, take-home messages are (i) to not use Q4 elements to simulate beam bending (and
instead chose another type of element) and (ii) to be generally careful with reduced integration
as zero-energy modes can appear as spurious deformation modes in the obtained solution.
152
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
A further type of locking that occurs frequently when simulating, e.g., rubbery materials or
biological tissues is volumetric locking. Those materials are characterized by being incom-
pressible (or close to incompressible). That is, they are extremely stiff against volumetric
deformation. In mechanical terms, this means for a linear elastic material that its Poisson’s
ratio ν → 21 or, equivalently, that the ratio of bulk modulus K to shear modulus G approaches
K/G → ∞. In this particular scenario, classical finite elements behave overly stiff and the
above formulation becomes problematic. Observe, e.g., that all displacements in (22.6) tend
to 0 as ν → 21 . Likewise, the material stiffness matrices (13.22) and (13.23) in 3D and 2D,
respectively, increase beyond bounds if ν → 21 . Therefore, volumetric locking appears in this
limit and elements tend to behave overly stiff. As a more intuitive explanation, think of the
degrees of freedom of a finite element in the case of incompressibility: in an incompressible
material the volume of each element must be conserved, which implies that its nodes cannot
move independently – yet they have independent degrees of freedom. This is a contradiction,
which results in the imposition of a rigid constraint through the exploding stiffness of the el-
ement against volumetric deformation. As a remedy, special incompressible elements have
been introduced, which we will not discuss further here, since we focus on linear elasticity and
such problems typically arise at finite strains (where rubbery materials and biological tissues
operate). Yet, we keep in mind that shear locking and volumetric locking are element defects
that must be considered when conducting FE analyses.
We close by outlining one simple test that one can perform to verify the accuracy of a particular
element type. The so-called patch test: one constructs a mesh of distorted elements (as shown
below) and applies uniform tractions on its boundaries corresponding to a homogeneous state
of stress (such as a uniform pressure p applied to its boundaries). The test is passed, if the FE
solution correctly represents affine deformation (i.e., constant strains within elements), which
is the analytical solution for this scenario.
p p p p
153
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
23 Iterative solvers
The solution of linear elastic problems is easily found by solving a linear system of equations, viz.
Fint = KU = Fext so that U = K −1 Fext (assuming that rigid-body modes have been suppressed
by the application of appropriate essential BCs, as will be discussed in Section 23.9). In case
of nonlinear problems – such as those arising from more complex material models and from
the geometric nonlinearity stemming from large deformations – an iterative solution method is
required to solve the generally nonlinear system Fint (U ) = Fext (U ). Note that the external
forces may or may not depend on the deformation. Here, we discuss a few common examples
of such iterative solvers, the most important one being Newton-Raphson iteration.
All iterative solvers start with an initial guess U0 (e.g., U0 = 0), which is then corrected to find
an improved approximation by the update
Un+1 = Un + ∆Un (23.2)
which is applied repeatedly until convergence is achieved. An iterative scheme converges if
∆Un → 0 as n → ∞, or equivalently f (Un ) → 0 as n → ∞. The various solution methods
discussed in the following differ primarily in the way ∆Un is computed based on a given vector
Un . Importantly, the fact that an iterative solver converges does not necessarily imply that
it converges to the correct equilibrium solution. For the special case of linear elasticity there
exists a unique solution, but that is not generally the case.
154
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
f (`U0) aDU1
aDU2
U3 U2 U U0 U U2 U1 U0 U
... DU 1
2 DU1 DU1
For the mechanical problem in linearized kinematics, the tangent matrix components becomes
(assembling over all elements)
Z
∂Fint ∂Fext ∂ ne ∂Fext
T (U ) = − = A BeT σ̃ dV −
∂U ∂U ∂U e=1 Ωe ∂U
ne
Z (23.6)
T ∂Fext
= A Be C̃Be dV −
e=1 Ωe ∂U
where
∂ σ̃
C̃ = (23.7)
∂ ε̃
is the incremental material stiffness matrix. In general, we have C̃ = C̃(ε̃), i.e., for
nonlinear problems the incremental stiffness depends on the current state of deformation and
hence on the nodal displacements U . Only for the special case of linear elasticity is C̃ = E a
constant matrix containing the elastic moduli and being independent of deformation. As shown
before, we can also write for each element e
Z
Te (U ) = BeT C̃Be dV, (23.8)
Ωe
The Newton-Raphson solver requires that det T ̸= 0 in order to find a solution, which is
guaranteed in linear elasticity if no rigid-body mode exists, as discussed in Section 23.9 (i.e.,
the linearized system has no zero-energy mode so that U · T U ̸= 0 for all admissible U ̸= 0).
For linear elastic problems with constant external forces, the Newton-Raphson solver converges
in only a single step, since Fint = KU and therefore T = K = const., so that
155
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
to compute, it may not always be available analytically, and it may require significant com-
puter memory based on the matrix size (for a mesh having n nodes in d dimensions, we have
T ∈ Rnd×nd ). In addition, the tangent matrix in nonlinear problems is not guaranteed to be
invertible; this is particularly problematic in case of simulations involving mechanical instabil-
ity. On the plus side, the Newton-Raphson method generally displays quadratic convergence
with iterations, which is why it is favorable for the solution of nonlinear problems (and it also
solves linear problems in one step, as shown above). If Newton-Raphson is not a viable option,
then the following techniques offer alternatives.
The iterative scheme is identical to the classical NR method described above, except that
Un+1 = Un + α ∆Un with α ∈ (0, 1) (23.10)
The damping parameter α can be chosen constant or adjusted based on convergence.
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 line search method can be used as an improvement for other nonlinear iterative solvers.
Similar to the damped Newton-Raphson scheme, updates are made according to
Un+1 = Un + β ∆Un , (23.12)
where, unlike in Section 23.2, β is not a constant but chosen such that f (Un+1 ) = 0. For
example, we may find β from solving
∆Un · f (Un + β ∆Un ) = 0. (23.13)
156
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
This is generally a nonlinear but scalar problem to be solved for β ∈ R, which can be solved by
bisection, regula falsi, secant, and other methods.
Notice that (23.13) is in fact the stationarity condition of the minimization problem
β = arg inf ∥f (Un + β ∆Un )∥2 , (23.14)
which is the motivation for the nonlinear least-squares method described below.
Although not necessarily with a proper physical meaning, the gradient flow method (also
known as gradient descent) has become popular as an iterative solver for quasistatic problems.
The idea is to replace the quasistatic equation f (U ) = 0 by the dynamic evolution equation
C U̇ = −f (U ) (23.19)
with, e.g., C = cI and c > 0, and starting from some initial guess for U . It is obvious that,
as f → 0, we have U̇ → 0 and thus the method converges to a solution U which satisfies
f (U ) = 0. Discretizing the above may lead to, e.g.,
C U̇n+1/2 = −f (Un ) and Un+1 = Un + ∆t U̇n+1/2 , (23.20)
157
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
starting from some initial guess U0 . Although there is no guarantee to reach an equilibrium
solution, the method is popular because it does not require a tangent matrix and is quite robust
and trivial to implement. For example, using a simple backward-Euler discretization for the
time derivative and C = cI, we obtain
1
Un+1 = Un − f (Un ). (23.21)
c
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).
Un+1 = Un + αn Sn (23.22)
where both the direction Sn and increment αn are determined in an optimal way as follows.
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
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).
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
where the system of equations is modified such that ∆uai,n = 0 for all iterative steps n. The
latter can be accomplished by the same substitution/condensation techniques we used above to
158
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
impose essential boundary conditions. For example, when using a Newton-Raphson solver (see
Section 23.1), we must solve
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
imposes uai = ûai in a more natural, incremental fashion without modifying the initial guess.
Having discussed solvers that involve the global stiffness (or tangent) matrix, it is important to
remember that those matrices are in general not invertible (i.e., they are singular) unless proper
boundary conditions are applied. Like in a dynamical system (as discussed, e.g., in Dynamics)
any elastic stiffness matrix K (and in the general nonlinear case the tangent matrix T ) has as
many zero eigenvalues as it has zero-energy modes U ∗ . This can be understood by recalling
that the total potential energy of the FE-discretized body with global stiffness matrix K and
in the absence of any external forces is
1
I = U · KU . (23.30)
2
If a particular global vector of the nodal displacements U ∗ ̸= 0 corresponds to rigid-body
motion (i.e., translations ua = u for all a = 1, . . . , n possibly with rigid rotations superim-
posed), then we must have I = 0 since rigid-body motion does not contribute any strain energy.
Consequently, we must have
U ∗ · KU ∗ = 0. (23.31)
159
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
forces, so Fint = KU ∗ = 0. Hence, K has (at least) one zero eigenvalue and is thus not
invertible. Since this holds true for each rigid-body mode U ∗ , K has as many zero eigenvalues
as rigid body modes. If such rigid-body modes exist, then no unique solution can be found,
since both U and U + U ∗ could be a solution (since K(U + U ∗ ) = KU + KU ∗ = KU = Fext ).
This manifests in K not being invertible, so trying to find U = K −1 Fext fails. We saw this
problem arise in Example 5.2.
When considering large, nonlinear deformation, mechanisms in structures may also constitute
zero-energy modes (e.g., a pinned-pinned buckled beam has two stable equilibria, and the dis-
placement from one to the other is a so-called mechanism, i.e., a zero-energy mode). Such a
zero-energy mode, which is not a rigid-body mode, also corresponds to a zero eigenfrequency.
rigid-body modes in 2D
rigid-body modes in 3D
In any FE model, we must suppress each rigid-body mode via appropriate essential boundary
conditions before solving a boundary value problem. In 2D we need three essential bound-
ary conditions to suppress rigid-body translations and rotations, in 3D we need a total of six
(assuming that nodes carry only displacement dofs), as shown above.
Finally, if nodes carry further dofs beyond displacements (e.g., in case of beam elements or
coupled problems), the situation must be reassessed to make sure all possible rigid modes are
suppressed.
160
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
24 Dynamics
Our discussion of mechanical boundary value problems so far has been limited to quasistatics.
The term quasistatics refers to the assumption of negligible inertial effects. This does not
necessary mean that solutions are time-independent, since material behavior can also be time-
dependent. For example, in viscoelasticity or viscoplasticity, we may have constitutive laws of
the type σ = σ(ε, ε̇) which clearly depend on the loading rate and hence on time, irrespective
of the presence of inertial effects. Inertial effects (or, in other words, the dynamic response)
gain importance when the mass of the body affects the dynamics and leads to, e.g., vibrations.
This is intimately tied the boundary conditions of a problem and creates an initial boundary
value problem. Static loading is generally time-independent. Dynamic loads are time-dependent
ones, for which inertial effects are not negligible. Quasistatic loading is time-dependent but is
sufficiently slow such that inertial effects can be safely ignored.
Here, we will consider the extension of the mechanical boundary value problem discussed previ-
ously to dynamic problems, in which inertial effects matter. In an extension of the (quasi-)static
version of Section 13, the strong form of the dynamic problem in linearized kinematics reads
σij,j + ρ bi = ρ üi in Ω
u (x, t) = û (x, t) on ∂ΩD
i i (24.1)
σij nj (x, t) = t̂i (x, t) on ∂ΩN
with suitable initial conditions. Now, we have u : Ω × R → Rd (i.e., the displacement field
u(x, t) varies with position x ∈ Ω and time t ∈ R), and it requires sufficient differentiability
in both space and time. Notice that the quasistatic case is easily recovered by neglecting the
inertial term ρü, i.e., if the mass density ρ or the acceleration a(x, t) = ü(x, t) are negligible
or vanish.
Analogous to the quasistatic case, we can cast the strong form (24.1) into a variational structure
by making use of the so-called action principle. To this end, we define the action of a deforming
and moving body as
Z t2
A[u] = L[u] dt with L[u] = T [u] − I[u] (24.2)
t1
being the Lagrangian. I is the potential energy functional (introduced in Section 6), and T
denotes the kinetic energy functional
Z
ρ 2
T [u] = |u̇| dV (24.3)
Ω 2
For a variational material model with energy density W , and assuming that constant body
forces ρb and surface tractions t̂ are imposed, we thus arrive at the action
Z t2 Z Z Z
ρ 2
A[u] = |u̇| − W (ε) dV + ρb · u dV + t̂ · u dS dt. (24.4)
t1 Ω 2 Ω ∂ΩN
Note that, without dynamical effects (u̇ = 0), this action reduces to the negative of the potential
energy functional (13.2), which we used in quasistatic boundary value problem.
161
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The action principle (also known as the principle of stationary action23 ) states that the
solution u(x, t) renders A stationary under suitable initial conditions, i.e.,
This condition is analogous to rendering the total potential energy stationary, which we used
so far in the quasistatic context. Here, we no longer minimize the total potential energy but we
render the total action stationary with respect to the displacement field.
By taking the first variation of the action A in (24.4) with respect to u (again using the
divergence on the stress-term, as done in quasistatic; cf. (13.5)), we obtain the stationarity
condition
Z t2 Z Z Z
δA[u] = (ρ u̇i δ u̇i − σij δui,j ) dV + ρbi δui dV + t̂i δui dS dt = 0. (24.6)
t1 Ω Ω ∂ΩN
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
where the last two conditions stem from our assumption of u(x, t1 ) = u1 (x) and u(x, t2 ) =
u2 (x) being known, and we need the solution to have square-integrable first derivatives with
respect to both time and space.
To remove the time derivative v̇, we integrate by parts in time (the “boundary term” vanishes
since v = 0 at t = t1 and t = t2 ), which leads to
Z t2 Z Z Z
G[u, v] = − (ρ üi vi + σij vi,j ) dV − ρbi vi dV − t̂i vi dS dt = 0 (24.9)
t1 Ω Ω ∂ΩN
Note that, without the first term, we recover the quasistatic formulation (cf. Section 13).
Since in the dynamic problem the displacement field depends on time, we here introduce a semi-
discretization, i.e., we discretize the solution in space but not (yet) in time. This implies that
we introduce shape functions for the interpolation in space, where – now – the nodal unknowns
ua become functions of time:
n
X n
X
h a a h
u (x, t) = u (t)N (x) and v (x, t) = v a (t)N a (x). (24.10)
a=1 a=1
23
Various references call this dynamic variational principle the “principle of least action”, which is in general
not correct, as the solution must not necessarily be a minimizer of A; it is merely guaranteed to be a stationary
point. For quasistatic problems, the solution is indeed a maximizer, since A[u] = −I[u] in that case.
162
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The shape functions N a (x) can be the same introduced in previous sections (simply imagine
the nodes in a mesh moving over time).
The semi-discretization in (24.10) allows us to calculate time derivatives, e.g., the approximate
velocity and acceleration fields as
n
X n
X
h a a h
u̇ (x, t) = u̇ (t)N (x) and ü (x, t) = üa (t)N a (x). (24.11)
a=1 a=1
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.
with
Z
Mijab = δij ρ N a N b dV
Ω
Z Z Z (24.15)
b
Fint,i = σij N,jb dV, b
Fext,i = b
ρbi N dV + b
t̂i N dS.
Ω Ω ∂ΩN
Matrix M is called the consistent mass matrix, and we write Fext = Fext (t) to indicate
that external forces are likely to depend on time (and they may also depend on displacements,
as discussed before). Relation (24.14) is the dynamic governing equation to be used in the
finite-element setting. Of course, for quasistatic problems we have Ü = 0, so (24.14) reduces
to the static version (13.19). Let us look into the new term involving mass matrix M .
163
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Note that this is the consistent mass matrix for 1D motion, i.e.,
U = (u1 , u2 )T . If each node moves in 2D and hence has two dofs u 2
1
u22
1
per node in the plane, i.e., U = (u11 , u12 , u21 , u22 )T , then each pair of 1 u 1 2 u21
dofs (horizontal and vertical) is linked by the above mass matrix, x
so that the total consistent mass matrix in 2D becomes
2 0 1 0 0 0 0 0 2 0 1 0
me
0 0 0 0 m
+ e 0 2
0 1 m
= e 0
2 0 1
Mbar,2D = . (24.17)
6 1 0 2 0 6 0 0 0 0 6 1 0 2 0
0 0 0 0 0 1 0 2 0 1 0 2
Notice that, unlike for the stiffness matrix K, the mass matrix does not introduce any coupling
between different displacement field components, so – as defined in (24.14) – any components
Mijab with i ̸= j are necessarily zero. This allows us to compute the consistent mass matrix
following the above procedure, i.e., by first computing the mass matrix M ab for only a single
dof and then finding the complete mass matrix by superposition (cf. (24.16)).
————
The consistent mass matrix of the constant-strain triangular element is computed analogously
by integration of the shape functions. Again starting with a single dof per node, i.e., U =
(u1 , u2 , u3 )T , the consistent mass matrix of an element of area Ae , constant thickness te and
mass density ρ is obtained as
2 1 1
me
MCST,1D = 1 2 1 with me = ρAe te . (24.18)
12
1 1 2
The extension to 2D motion with dofs U = (u11 , u12 , u21 , u22 , u31 , u32 )T follows from applying the
1D mass matrix to the horizontal and vertical dofs independently, leading to
2 0 1 0 1 0
0 2 0 1 0 1
me
1 0 2 0 1 0
MCST,2D = with me = ρAe te . (24.19)
12 0 1 0 2 0 1
1 0 1 0 2 0
0 1 0 1 0 2
————
For all other elements, the consistent mass matrix can be evaluated analogously or computed
by numerical quadrature:
Z nQP −1
X
ab a b
M1D = ρN N dV ≈ Wk ρN a (ξk )N b (ξk )J(ξk ). (24.20)
Ωe k=0
We note that, irrespective of the element type, the (approximate) kinetic energy of an element
is computed as follows:
Z Z n n n n Z
ρ h
2 ρX a a X b b 1 XX a b
T = u̇ dV = u̇ N · u̇ N dV = u̇ · u̇ ρN a N b dV, (24.21)
Ω 2 Ω 2 a=1 b=1
2 Ω
a=1 b=1
164
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
From the above examples, we observe that the consistent mass matrix leads to a dynamic cou-
pling between the dofs of different nodes (i.e., the consistent mass matrix is not diagonal but
includes significant off-diagonal terms). From a numerical perspective, this is rather inconve-
nient as it may require inverting M (as will be discussed soon). Therefore, one often resorts to
the so-called lumped mass matrix, which is an approximation that is diagonal.
One such approach is the so-called particle-mass lumping, which aims to
evenly distribute the element mass me onto particles located at the nodes. me/2 me/2
That is, for an arbitrary element having ne nodes with d dofs per node, we
introduce a (much simpler) lumped mass matrix Mlumped ∈ Rne d×ne d , me/3
me/3
which is defined by
me me/3
Mlumped,e = I. (24.23)
ne
For example, by using particle-mass lumping for a 2-node bar element, one distributes the mass
me evenly to the two nodes, resulting in
1 0 0 0
me 1 0 me 0 1 0 0 .
Mlumped,1D,e = , Mlumped,2D,e = (24.24)
2 0 1 2 0 0 1 0
0 0 0 1
Note that a comparison of the kinetic energies (e.g., in 1D) reveals
1 me 1 2
(u̇e ) + (u̇2e )2
Tlumped = U̇e · Mlumped,e U̇e = (24.25)
2 4
and
1 me 1 2
(u̇e ) + (u̇2e )2 + u̇1e u̇2e .
Tconsistent = U̇e · Mconsistent,e U̇e = (24.26)
2 6
Hence, using the lumped mass matrix implies an approximation of the kinetic energy (which is
generally not exact), while producing a simple, diagonal alternative to the consistent one.
————
If defined properly, then the solutions obtained from using either the consistent or lumped
mass matrix in the finite element context converge under h-refinement. (As the element size
decreases, the differences between the two formulations also decrease, so that in the limit of
infinitely small elements one may expect the same solution.)
Note that the structure and size of the mass matrix is identical to that of the stiffness matrix,
both at the element and at the global level. As a consequence, all assembly operations
introduced for stiffness matrices apply equally to (both lumped and consistent) mass matrices.
We close by mentioning that beam elements are a special case, since both translational and
rotational inertia must be considered (which is not discussed here in detail, and no unique
solution exists for the lumped mass matrix but various proposed approximations can be used –
which either approximate the kinetic energy or the mass moments of inertia of the beam).
165
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
25 Vibrations
As shown in the previous section, treating the dynamic mechanical problem in linearized kine-
matics by the finite element method leads to the semi-discretized equations of motion
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).
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
Next, consider a small time-varying perturbation V (t) of the displacements, such that
As the perturbation is small, we may linearize the generally nonlinear equations of motion about
the stable equilibrium configuration U0 . Expanding the above for |V | ≪ |U0 | to leading order
gives the Taylor expansion
∂Fint
M V̈ + Fint (U0 ) + (U0 ) V + O(|V |2 ) = Fext (25.5)
∂U
or, invoking equilibrium (25.2), recalling the definition of the tangent stiffness matrix T =
∂Fint /U , and dropping all higher-order terms,
M V̈ + T (U0 ) V = 0 (25.6)
When considering free vibrations about the undeformed configuration of an elastic body, then
T = K = const., so the above reduces to
M Ü + KU = 0 (25.7)
166
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
When we consider vibrations about the undeformed ground state, then U0 = 0 and U (t) = V (t).
Therefore, the form of the linearized equations of motion for free vibrations (without external
forcing and without damping) is
M Ü + T U = 0, (25.8)
The general type of solution of the above ODE is of the harmonic form24
Insertion into (25.8) leads to (exploiting that the equation must hold for all times t)
T − ω 2 M Û = 0
(25.10)
det T − ω 2 M = 0
(25.11)
For an FE discretization with n×d degrees of freedom (n nodes in d dimensions), the eigenvalue
problem (25.10) has n × d eigenfrequencies ωj and associated eigenmodes Uj . It is common
convention to label the eigenfrequencies (and associated modes) in ascending order:
0 ≤ ω0 ≤ ω1 ≤ . . . ≤ ωn×d−1 . (25.12)
Recall from the dynamics of particle systems (Section 4 in the Dynamics notes) that each
rigid-body mode corresponds to a zero eigenfrequency. Therefore, a 2D (3D) free vibration
problem – without any essential BCs to suppress rigid-body motion – must have three (six)
zero eigenfrequencies. When all zero-energy modes have been removed, the lowest non-zero
eigenfrequency is known as the natural frequency or fundamental frequency.
Due to the linear nature of the ODE system, the complete solution to the free-vibration
problem is a superposition of the type
n×d
X
U (t) = c∗j Ûj exp(iωj t), c∗j ∈ C for j = 1, . . . , n × d, (25.13)
j=1
24
The solution can alternatively be written in terms of trigonometric functions. We here use the exponential
formulation U = Û ∗ exp(iωt) for notational simplicity, which, by Euler’s identity exp(iωt) = cos(ωt) + i sin(ωt),
can be transformed into trigonometric solutions to obtain U = Û1 cos(ωt) + Û2 sin(ωt). To avoid confusion, we
use the asterix ∗ here and in the following to denote complex-valued variables. See Section 4 of the Dynamics
lecture notes for detailed explanations.
25
Since M is positive-definite, we may multiply (25.10) by M −1 , leading to (M −1 T − ω 2 I)Û = 0, which has
the typical form of an eigenvalue problem with eigenvalues ω 2 and eigenvectors Û .
167
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
whose coefficients c∗j we must find for a given set of initial conditions. Recall that, for a
mechanical initial boundary value problem, we have two initial conditions per node and per
degree of freedom (e.g., imposing initial displacement and velocity vectors for each node). This
provides the 2 × n × d equations from which the coefficients c∗j ∈ C can be found (since those
are complex, we have in fact 2 × n × d unknowns, viz. the real and imaginary parts of each of
the n × d coefficients). Roughly speaking, free vibrations are characterized by the superposition
of vibrations at all eigenfrequencies with their respective eigenmodes.
Let us study the example of a freely vibrating linear elastic 2-node bar, which we use to assess
the influence of the different types of mass matrices. Consider a 2-node bar element with only
axial displacements in 1D, so that each node has only a single dof ua . The mass matrices and
the stiffness matrix for this case were derived previously as
m 2 1 m 1 0 EA 1 −1
Mconsistent = , Mlumped = , K= . (25.14)
6 1 2 2 0 1 L −1 1
For each of the two mass matrices, we compute the two eigenfrequencies and eigenmodes by
solving the eigenvalue problem (25.10). To this end, we first solve the characteristic equation
det K − ω 2 M = 0.
(25.15)
(K − ω 2 M )Û = 0 (25.16)
Insertion of the stiffness matrix and the consistent mass matrix results in the two solutions
r r r
consistent consistent EA √ EA EA
ω0 = 0, ω1 = 12 =2 3 ≈ 3.464 . (25.17)
mL mL mL
As expected, we have one zero eigenfrequency associated with rigid body translation, and one
non-zero eigenfrequency associated with a mode that deforms the bar.
When repeating the above procedure with the lumped mass matrix, we instead obtain
r
lumped lumped EA
ω0 = 0, ω1 =2 . (25.19)
mL
and
1 1
Û0lumped = , Û1lumped = . (25.20)
1 −1
Hence, using the consistent vs. lumped mass matrix in this example yields the same eigenmodes
Û0 and Û1 , whereas the fundamental frequencies ω1consistent vs. ω1lumped differ significantly.
168
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
For comparison, let us compute the exact solution by studying the free vibration of a continuous,
homogeneous, linear elastic bar. Linear momentum balance, i.e.,
Free-end boundary conditions imply zero tractions at the two ends at x = 0 and x = L, so that
we must enforce
Solving the ODE in (25.22) with the above initial conditions yields the mode shape
nπx
û(x) = A cos with A ∈ R, n ∈ Z. (25.24)
L
and the associated eigenfrequency
r
EA
ωn = n π . (25.25)
mL
Consequently, the lowest two eigenfrequencies are obtained for n = 0, 1 as
r
EA
ω0 = 0, ω1 = π . (25.26)
mL
Comparison with the above two approximate formulations reveals that
————
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).
and now assume a time-harmonic excitation (on top of any static pre-load) of the type
169
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
with an excitation frequency Ω ∈ R and a force excitation of amplitude F̂ext ∈ Rdn . (25.28)
shows that the solution vector generally consists of a homogeneous solution and a particular
solution, i.e.,
U (t) = Uhom (t) + Upart (t) = Uhom (t) + Û cos(Ωt) where Û ∈ Rdn . (25.30)
The homogeneous solution corresponds to a free vibration (see Section 25.1) and is usually
of little interest (any realistic system has a minimum amount of damping which makes the
homogeneous solution of a free vibration decay over time, while the particular solution of the
forced vibration assumes a steady state). Insertion of the particular solution
−Ω2 M + T Û = F̂ext ,
(25.32)
which is a linear system of equations to be solved for the displacement amplitude vector Û .
Specifically, if
det −Ω2 M + T ̸= 0
⇔ Ω is not an eigenfrequency of the system, (25.33)
then
−1 −1
Û = −Ω2 M + T F̂ext ⇒ Upart (t) = −Ω2 M + T F̂ext cos(Ωt) (25.34)
Hence, the system responds to a harmonic excitation – at steady state – with a harmonic
vibration at the excitation frequency. As the excitation frequency approaches an eigenfrequency
2
(Ω → ωj ), matrix −Ω M + T becomes singular and the displacement amplitude vector Û
tends to infinity (which is characteristic of resonant effects).
Hardly any realistic system has zero damping. In structural dynamics (i.e., in the analysis of
structures involving bars, beams, plates, etc.), one often includes velocity-proportional damping
in an approximate, average sense by the introduction of a damping matrix C such that the
equations of motion (24.14) become
This is the higher-dimensional analog to the classical 1D system consisting of masses, springs
and dashpots as discussed in Dynamics. The C-matrix serves as the analog of the dashpot,
which provides velocity-proportional damping. The most common form of C used in structural
FEA is mass- and stiffness-proportional damping, which assumes26
That is, C is a combination of the mass and stiffness matrices, M and K, respectively. The
choice of parameter a ≥ 0 controls low-frequency vibration attenuation, while parameter b ≥ 0
suppresses high-frequency vibrations.
26
Note that parameters a and b are classically called α and β, respectively. However, since we will need variables
α and β later for the Newmark-β and HHT time integration schemes, we here and in the following use a and b
to avoid confusion.
170
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
k
mü + (am + bk)u̇ + ku = 0 ⇔ ü + (a + bω02 )u̇ + ω02 u = 0 with ω02 = . (25.38)
m
Lehr’s damping ratio (adopting the general form ü + 2δ u̇ + ω02 u = 0) in this case becomes
δ 1 2
1 a
D= = a + bω0 = + bω0 . (25.39)
ω0 2ω0 2 ω0
This shows how damping varies with frequency. If one now characterizes D = D(ω) for some
real-world structure or application (e.g., through experiments), then the strategy is to find
constants a, b from fitting (25.39) to the real-world data (at least over a certain range of fre-
quencies). We skip the detailed derivation here and refer to the FEA literature on structural
damping.
If damping is included in a problem of free or forced vibrations, then the above strategies
and relations – in principle – still apply. As a major difference, solutions U = U (t) will
include a time delay, implying that the energy dissipation due to damping results in forces
and displacements not being “in sync” anymore but the body’s deformation lagging behind any
applied forces that cause the deformation. This is best captured by starting with an ansatz
For example, for a forced vibration with structural damping the steady-state response (25.34)
now becomes
h −1 i
Upart (t) = Re −Ω2 M + iΩC + T F̂ext cos(Ωt). (25.41)
171
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
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,
Insertion into the equations of motion (25.35) (here, including damping for completeness and
dropping higher-order terms) leads to the time-discretized equations of motion
This is an update rule for U α+1 , resulting in a scheme of explicit time integration (i.e.,
vector U α+1 can be computed directly from the known previous solutions U α and U α−1 . We
note that solving (26.3) for U α+1 may require the solution of a linear system due to the matrix
in brackets in front of U α+1 (unless b = 0 so C = aM and if using the lumped mass matrix,
27
We note that similar concepts can also be applied, when the time increment ∆t is not constant or is adaptively
modified during the course of a simulation. However, we here restrict our discussion to constant time steps ∆t.
172
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
which is diagonal). Yet, all nonlinearity that is possibly inherent in Fint (U ) is irrelevant to
the solution procedure, as the internal forces in (26.3) depend only on the previous, known
solution U α .
Stability generally limits the choice of the time step ∆t in explicit schemes, as discussed in
Section 3. This also applies to the dynamic FE formulation described above. Without proof we
mention that stability requires
2
∆t ≤ ∆tmax = (26.4)
ωmax
with ωmax being the highest eigenfrequency of the FE problem (see Section 25.1). It is important
to realize that the highest eigenfrequency generally scales inversely with the size of the smallest
element in the mesh, i.e.,
1
ωmax ∝ (26.5)
hmin
For example, we showed pin Example 25.1 that the fundamental frequency of a two-node bar
1
was of the form ω1 ∝ L E/ρ with L being the element size.
Despite the explicit scheme being straight-forward to implement and inexpensive to solve at
the time-step level, the above stability constraint has unfortunate consequences. The maximum
allowed time step ∆tmax decreases with decreasing mesh size; i.e., dynamic FE problems that
are already expensive because of high mesh resolution are even more expensive when using
explicit time integration due to the required small time step size. Moreover, what matters is
the smallest element size hmin and not the average element size. Therefore, the smallest element
in a FE mesh generally dictates the critical step size ∆tmax (even if the average element size is
considerably larger).
To start, consider a discretization in time which evaluates U at discrete time intervals ∆t and
then uses a quadratic interpolation in time to define U (t) at all times t ≥ 0, i.e., we define
U (t) = U α+1 N α+1 (t) + U α N α (t) + U α−1 N α−1 (t) for t ∈ [tα − ∆t α
2 ,t + ∆t
2 ]. (26.6)
a-1
t a-Dt/2
and t N a-1
(tα+1 − t)(tα − t) Dt
N α−1 (t) = . (26.7)
2(∆t)2
173
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
This piecewise-quadratic interpolation with the above range of validity ensures that U (t) is
twice differentiable (as needed for the acceleration). It further guarantees the continuity of not
only U (t) over time but also of the derivatives
∂ α+1 α ∆t ∂ α−1 α ∆t
N (t − 2 ) =0 and N (t + 2 ) = 0, (26.8)
∂t ∂t
so that U̇ (t) is continuous as well. Consequently, the acceleration
is piecewise-constant and recovers the second-order central-difference scheme in time, cf. (26.1).
The approximate displacement field, now discretized in both space and time, has become
n
X α+1
X
uh (x, t) = ua,γ N γ (t)N a (x) for t ∈ [tα − ∆t α
2 ,t + ∆t
2 ], x ∈ Ωh , (26.10)
a=1 γ=α−1
where ua,γ = uh (xa , tγ ) is the displacement of node a at time tγ . The acceleration field follows
as the (piecewise-constant in time) approximation
n
h
X ua,α+1 − 2ua,α + ua,α−1
ü (x, t) = N a (x) for t ∈ [tα − ∆t α ∆t
2 , t + 2 ], x ∈ Ωh . (26.11)
(∆t)2
a=1
Next, we must insert the discretization into the weak form (24.9), which also requires a choice
for the trial function v h (x, t). We could choose a Bubnov-Galerkin scheme, where v h (x, t)
is discretized in the same fashion as uh (x, t). The consequence would be that we arrive at an
implicit system in time to solve for all nodal unknowns (i.e., one cannot simply march forward in
time but has to solve for the nodal solutions at all times at once). Alternatively, we may choose
a Petrov-Galerkin scheme in time and – having in mind that we wish to evaluate information
only at the discrete time steps – define the trial function (assuming nt time steps) as
n
X nt
n X
X
h b b
v (x, t) = v (t)N (x) = v b,α N b (x)δ(t − tα ). (26.12)
b=1 b=1 α=1
This approximation is of collocation type and only considers the solution at the discrete time
steps. As a consequence, it also reduces the weak form to being evaluated only at discrete time
steps. When this choice of v h along with uh is inserted into the weak form (24.9), viz.,
Z t2 Z Z Z
G[u, v] = (−ρ üi vi − σij vi,j ) dV + ρbi vi dV + t̂i vi dS dt = 0, (26.13)
t1 Ω Ω ∂ΩN
the integration over time reduces the delta functions to the form
nt
"Z !
a,α+1 a,α a,α−1
X u − 2u + u
vib −ρ i i
2
i
N a N b − σij (εh,α )N,jb dV
Ω (∆t)
b=1 (26.14)
Z Z
α b
+ ρbi (t )N dV + t̂i (t )N dS = 0 ∀ vib
α b
Ω ∂ΩN
174
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
for each time step α (0 ≤ tα ≤ nt ∆t) and for all admissible choices of vib . The latter implies
that the above terms in brackets must vanish, or that we must have
When inserting our definitions of the consistent mass matrix and the internal/external force
vectors (cf. (24.15)), the above turns out to be equivalent to
U α+1 − 2U α + U α−1
M + Fint (U α ) − Fext (tα ) = 0. (26.16)
(∆t)2
This is identical to (26.2), which we derived previously for a second-order finite-difference time
discretization. Of course, the same procedure can also be applied to other choices of v h , which
leads to different time discretization schemes.
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.
The most popular time integration scheme for mechanical problems is the so-called Newmark-
β method28 . To motivate its formulation, we start by noting that the solution vector U (t) at
some time t ∈ (tα , tα+1 ) can be obtained from knowledge of U α as well as of U̇ (t) within that
interval by integration:
Z t
α
U (t) = U + U̇ (τ ) dτ for t ∈ (tα , tα+1 ) (26.17)
tα
In practice, we do not know U̇ nor Ü within the interval t ∈ (tα , tα+1 ) but we may define those
at the discrete times tα and tα+1 . Therefore, particular time integration schemes can be devised
by introduction approximations for how Ü (t) is defined during an interval (tα , tα+1 ), so that
the above two equations can be integrated to find U̇ (t) and U (t).
The so-called average acceleration method, e.g., assumes that the acceleration is piecewise
constant and, between two time steps, assumes the average value
Ü α+1 + Ü α
Ü (t) = = const. for t ∈ (tα , tα+1 ). (26.19)
2
28
This method was originally developed in 1959 for problems in structural mechanics by Nathan M. Newmark
of the University of Illinois at Urbana–Champaign, after whom it was later named.
175
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Ü α+1 + Ü α t t − tα
Z
α
U̇ (t) = U̇ + dτ = U̇ α + Ü α+1 + Ü α , (26.20)
2 tα 2
and inserting this into (26.17) with U (tα ) = U α gives
(t − tα )2
U (t) = U α + U̇ α (t − tα ) + Ü α+1 + Ü α . (26.21)
4
Finally, evaluating (26.20) and (26.21) at time tα+1 yields, respectively,
∆t
U̇ α+1 = U̇ α + Ü α+1 + Ü α ,
2
(∆t)2 (26.22)
U α+1 = U α + U̇ α ∆t + Ü α+1 + Ü α .
4
This is apparently an implicit definition of the new velocity and displacement vectors, since
they involve the unknown acceleration Ü α+1 at the new time.
We note that we can also cast our explicit central-difference scheme (26.1) from before
into the above framework, if we assume a piecewise-constant acceleration centered around each
discrete time step:
( α α+1
Ü α , for t ∈ (tα , t +t2 )
Ü (t) = α α+1 . (26.25)
Ü α+1 , for t ∈ ( t +t2 , tα+1 )
The Newmark-β method generalizes all of the above cases into a single framework, which
defines the new displacements and velocities as
(∆t)2 h i
U α+1 = U α + ∆t U̇ α + 2β Ü α+1 + (1 − 2β)Ü α (26.26a)
2
h i
U̇ α+1 = U̇ α + ∆t γ Ü α+1 + (1 − γ)Ü α (26.26b)
where 0 ≤ β ≤ 1 and 0 ≤ γ ≤ 1 are parameters to be chosen. The above schemes are included
as special cases:
• β = 14 , γ = 12 leads to the most popular average acceleration scheme, which turns out
to be unconditionally stable and to have no numerical damping.
176
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
As a major benefit of the Newmark schemes, for linear structural problems the method can
provide unconditional stability. Specifically,
• γ ≥ 1/2 ∧ β < γ/2 leads to conditional stability with, as discussed before, ∆tcr ∝ ωmax
−1 .
For γ = 1/2 the scheme is at least second-order accurate, while being first-order accurate oth-
erwise. It is important to note that the Newmark methods, as most other finite-difference
methods, introduce artificial numerical damping (see the discussion in Section 4.3 on phase
error analysis). Whenever γ > 1/2, the Newmark family of methods produces numerical damp-
ing. The average acceleration scheme (β = 14 , γ = 21 ) does not produce any algorithmic damping,
which further adds to its popularity.
For an implementation of the Newmark-β method, we need to turn the implicit definitions
of velocities and displacements in (26.26) into a form that allows us to perform algorithmic time
stepping. To this end, let us first solve (26.26a) for the acceleration at the new time tα+1 :
1 1 − 2β
Ü α+1 = U α+1
− U α
− ∆t U̇ α
− Ü α . (26.27)
β(∆t)2 2β
Insertion into (26.26b) yields
γ α+1 1 − 2β α
U̇ α+1 = U̇ α + ∆t(1 − γ)Ü α + U − U α + ∆t U̇ α − γ ∆t Ü
β ∆t 2β
(26.28)
γ γ γ
U̇ α + U α+1 − U α − ∆t − 1 Ü α .
= 1−
β β ∆t 2β
Next, inserting both velocity (26.27) and acceleration (26.28) into the equation of motion at
the new time tα+1 ,
M Ü α+1 + C U̇ α+1 + Fint (U α+1 ) − Fext (tα+1 ) = 0, (26.29)
leads – after some rearrangement – to
1 γ
M+ C U α+1 + Fint (U α+1 ) − Fext (tα+1 )
β(∆t)2 β ∆t
1 α 1 α 1 α
=M U + U̇ + − 1 Ü (26.30)
β(∆t)2 β ∆t 2β
γ α γ α γ α
+C U + − 1 U̇ + ∆t − 1 Ü .
β ∆t β 2β
The right-hand side of (26.30) is fully known, since it only involves U α , U̇ α , and Ü α from the
previous time step. The left-hand side is generally nonlinear and requires an iterative solver,
unless the problem is linear elastic, in which case Fint (U α+1 ) = KU α+1 and the above left-hand
side becomes linear in U α+1 .
Note that the implementation is quite similar to that of the quasistatic problem using, e.g.,
the Newton-Raphson solver discussed in Section 23.1. Specifically, we now must solve
f (U α+1 ) = M ∗ U α+1 + Fint (U α+1 ) − Fext
∗
(tα+1 , U α , U̇ α , Ü α ) = 0, (26.31)
177
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
where we simply rewrote (26.30) in a more concise form with the abbreviations
1 γ
M∗ = 2
M+ C = const. (26.32)
β(∆t) β ∆t
and
∗ 1 1 1
Fext (tα+1 , U α , U̇ α , Ü α ) α+1
= Fext (t )+M α
U + α
U̇ + − 1 Ü α
β(∆t)2 β ∆t 2β
(26.33)
γ α γ α γ α
+C U + − 1 U̇ + ∆t − 1 Ü .
β ∆t β 2β
Note that M ∗ is constant, while Fext
∗ is fully known from the previous time step and the applied
external forces. Therefore, the problem (26.31) is quite similar to the quasistatic problem. The
tangent matrix used for iterations is
1 γ ∂Fint
T ∗ = M∗ + T = 2
M+ C +T with T = (U ). (26.34)
β(∆t) β ∆t ∂U
Boundary conditions can be implemented in the same fashion as for the quasistatic solvers
discussed in Section 23.8.
In the special case of a linear elastic problem, the nonlinear system of equations turns into a
linear one, viz.
f (U α+1 ) = M ∗ U α+1 + KU α+1 − Fext
∗
(tα+1 , U α , U̇ α , Ü α ) = 0, (26.35)
so that we must solve the linear problem
(M ∗ + K) U α+1 = Fext
∗
(tα+1 , U α , U̇ α , Ü α ). (26.36)
The algorithmic structure is as follows. At each time step, we solve (26.30) for U α+1 (using
an iterative solver such as Newton-Raphson for nonlinear problems), based on the information
from the previous time step, U α , U̇ α and Ü α , along with information about the applied external
forces Fext (tα+1 ). This implies we must store vectors U α , U̇ α and Ü α after each converged time
step. Once the new solution U α+1 has been found, we compute U̇ α+1 from (26.27) and Ü α+1
from (26.28), store all of those vectors and move on to the next time step.
The HHT method (also known as the HHT-α method) is a modification of the above implicit
Newmark scheme. It is named after its inventors, Hilber, Hughes and Taylor, and has gained
popularity in commercial codes. The idea is to use the same Newmark relations (26.26a) and
(26.26b) but to modify the equations of motion, into which they are inserted, viz. assuming
h i
M Ü α+1 + C (1 − α)U̇ α+1 + α U̇ α + (1 − α)Fint (U α+1 ) + αFint (U α )
(26.37)
= (1 − α)Fext (tα+1 ) + α Fext (tα )
with a newly introduced parameter α (using the over-line to avoid confusion with our time
step α). Notice that α = 0 recovers the Newmark-β scheme. If one chooses
1 (1 + α)2 1
0≤α≤ , β= , γ = + α, (26.38)
3 4 2
then the HHT method is unconditionally stable and at least second-order accurate. Increasing α
decreases the simulated displacements at high frequencies (thus removing high-frequency noise
from dynamics problems), which can be beneficial in structural dynamics.
178
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
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
This choice is also computationally beneficial: lumped mass matrices may allow for solving the
explicit update rule (26.3) without the need for iterations to solve a system, whereas consistent
mass matrices can be conveniently used in the implicit update rule (26.30), where a system of
equations must be solved anyways.
179
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
27 Modal decomposition
The starting point of the concept of modal decomposition is to express the unknown time history
of the vector of nodal dofs in a carefully chosen basis, viz.
n×d
X
U (t) = zi (t) Ûi (27.1)
i=1
where we use the (somehow normalized) eigenvectors Ûi of the system as basis vectors to repre-
sent the unknown function U (t) with unknown scalar time-dependent coefficient functions zi (t),
as illustrated below.
U(t) ^
U ^
U ^
U ^
U
1 2 3 4
This basis representation has significant advantages – for which to understand we need a some-
what longer derivation. By considering the linear elastic eigenvalue problem for two distinct
eigenmodes/eigenfrequencies i and j, we may write (no summations over i or j implied here
and in the following)
2 2
K − ω(i) M Û(i) = 0 ⇒ Û(j) · K − ω(i) M Û(i) = 0,
(27.2)
2 2
K − ω(j) M Û(j) = 0 ⇒ Û(i) · K − ω(j) M Û(j) = 0,
where we pre-multiplied each of the two equations by the respective other eigenvector. Sub-
traction of the two equations (exploiting that K is by definition symmetric) results in
2 2
(ω(i) − ω(j) ) Û(i) · M Û(j) = 0 ⇔ ωi = ωj ∨ Ûi · M Ûj = 0. (27.3)
This implies that either ωi = ωj (considering only positive eigenfrequencies) or Ûi · M Ûj = 0.
If we assume that we have only distinct eigenfrequencies29 , then we may conclude that
Ûi · M Ûj = 0 if i ̸= j. (27.4)
29
Theoretically, we may surely have repeated eigenvalues and hence duplicated eigenfrequencies. However, a
numerical implementation always generates numerical errors so that truly identical eigenvalues occur rarely (and
rigid-body modes are usually removed unless the simulated response requires rigid-body motion). In case of any
duplicated eigenfrequencies, one could still introduce, e.g., Gram-Schmid orthonormalization, to produce a set of
eigenmodes that do satisfy the condition (27.4).
180
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Û(i)
Ûi ← q so that Û(i) · M Û(i) = 1. (27.5)
Û(i) · M Û(i)
we solve for ωi2 and obtain Rayleigh’s quotient, which here simplifies due to the normalization
(no summation over i implied):
(
Û(i) · K Û(i) ωi2 , if i = j
ωi2 = = Û(i) · K Û(i) ⇒ Ûi · K Ûj = (27.10)
Û(i) · M Û(i) 0, else
Let us now return to the modal decomposition of a linearized, elastic system, using the Fourier
representation
n×d
X
U (t) = zi (t) Ûi , (27.11)
i=1
where {Û1 , . . . , Ûn } are the n eigenmodes of the system. That is, we pre-compute the eigenvec-
tors and seek a solution as a linear superposition of all eigenvectors with some unknown scalar
coefficients zi (t), which are continuous functions of time (maintaining the semi -discretization).
181
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Exploiting the orthogonality relations (27.6) and (27.10) transforms the above into
z̈j (t) + (a + bωj2 )żj (t) + ωj2 zj (t) = Ûj · Fext (t) for j = 1, . . . , n × d (27.14)
This equation is quite remarkable, as it presents a scalar, linear ODE for each unknown function
zj (t). Moreover, the system of equations for the n × d unknown functions zi (t) (with i =
1, . . . , n × d) has decoupled into n × d uncoupled scalar ODEs to be solved independently for
the zi (t). The strategy is thus to first pre-compute all eigenfrequencies ωj and all eigenmodes
Ûj , so that the coefficients and right-hand sides in (27.14) are known. The resulting system
of decoupled linear ODEs can relatively inexpensively be solved for the functions zj (t) – either
analytically or numerically, depending on the nature of Fext (t).
For many practical problems, only a limited number of modes are important, so we may restrict
the representation (27.11) to include only the lowest m < n × d modes (corresponding to the m
lowest eigenfrequencies). Therefore, significant numerical efficiency can be gained by truncating
the Fourier sum and only using the m lowest modes, which is referred to as order reduction:
m
X
U (t) = zi (t) Ûi , m < n × d. (27.15)
i=1
For example, if a loading scenario is prone to excite only the lowest few eigenmodes (such as,
e.g., when an earthquake excites a building at low frequencies), then m ≪ n may yield an
accurate and efficient approximation.
182
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
28 Extensions
Many of the finite element tools we have discussed so far (from discretization principles and
function spaces to elements types and quadrature rules and beyond) apply not only to the
framework of small-strain mechanics problems, but they extend to a much broader context,
where they may be conveniently used. In this section, let us briefly summarize two extensions
of the theory developed so far towards common engineering applications.
When going beyond small strains, we need to work with a theory of large (finite) strains, which
is commonly referred to as finite kinematics or (more sloppily) large deformation. Classical
examples are the simulation of rubbery materials or of biological tissue, which generally undergo
large strains. Here, we do not only need to introduce more complex constitutive laws (going
well beyond linear elasticity), but we must also account for the fact that our fundamental small-
deformation measures such as the (infinitesimal) strain tensor ε lose their meaning and are no
longer applicable at large strains. Here, one typically introduces a deformation mapping of
the type
φ(X, t) : Ω × R → Rd such that x = φ(X, t), (28.1)
which assignes to each undeformed point X ∈ Ω in the undeformed body Ω a point x ∈ φ(Ω)
within the deformed body φ(Ω). For simplicity, we assume that the two points are linked in
the same fashion as in small strains, meaning we define a displacement field u : Ω × R → Rd
such that
x(X, t) = X + u(X, t). (28.2)
To describe finite strains inside the deformed body, one usually does not resort to ε but instead
introduces the deformation gradient, which is a second-order tensor:
∂x ∂xi
F = ⇔ Fij = . (28.3)
∂X ∂Xj
When inserting the relation (28.2), we notice that
∂xi
Fij = = δij + ui,j ⇔ F = I + ∇u. (28.4)
∂Xj
This strain measure is frequently used in finite-strain continuum mechanics (besides various
other strain measures, which we do not want to introduce here for brevity). Note that in case
of no deformation, we have x = X and u = 0, so that F = I (unlike ε = 0).
Starting with quasistatics, the variational problem in this finite-deformation setting is analogous
to the small-strain version. The functional of the total potential energy is
Z Z Z
I[u] = W (F ) dV − ρ0 b · u dV − t̂ · u dS, (28.5)
Ω Ω ∂ΩN
where W is still the strain energy density (now depending on F ), ρ0 denotes the mass density in
the undeformed configuration (and we integrate over the undeformed configuration). We seek
solutions
u ∈ U = u ∈ H 1 (Ω) : u = û on ∂ΩD
such that u = arg min I[u]. (28.6)
183
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The first variation in (28.7) looks quite similar to the small-strain version, cf. (13.4). Conse-
quently, applying a finite element discretizatio of Bubnov-Galerkin type leads to an FE governing
equation analogous to (13.20). That is, we again arrive at
Fint (U h ) − Fext = 0, (28.9)
this time with
Z Z Z
a h
Fint,i = Pij (F )N,ja dV and a
Fext,i = a
ρ0 bi N dV + t̂i N a dS (28.10)
Ω Ω ∂ΩN
In a nutshell, the linearized and finite variational problems result in the same system of equa-
tions (28.9). For the special case of linearized kinematics, we have Pij → σij , so that we recover
the small-strain version (13.20). Otherwise, the above problem is generally nonlinear (even
when considering elasticity at large strains) and requires an iterative solution method.
This is especially true at finite strains, since even the external forces can lead to significant
nonlinearity and dependence on U . In the above variational formulation we assumed that t̂ =
const., i.e., that the externally applied forces are constant and do not depend on deformation. As
discussed in Section 21.1, that may not always be the case, and especially in finite deformations
it is oftentimes not the case; e.g., consider pressure loading t̂ = pn where n is the deformed
surface normal depending on the deformation and hence on U . In such cases, one needs to
revise the external force term appropriately (For pressure loading, e.g., we know the work done
by pressure is Wext = pv, which must replace the traction term in the above total potential
energy.)
Despite all the above differences between large and small strains, the key take-home message is
that the general finite element setup is analogous between both formulations. In both cases, we
seek displacement field solutions within the same function space, and the governing equations
are analogous. In fact, the above description of quasistatics can be extended to dynamics, again
arriving at
184
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Since the overall setup is equivalent, this also implies that all finite element concepts discussed
so far can be applied to finite-deformation problems. That is, all element types, quadrature
rules, solvers, etc. are fully applicable here as well.
Of course, this only an extremely condensed description of finite elements for finite kinematics.
The devil is in the detail, and many challenges may arise when dealing with a nonlinear setting
involving, e.g., large strains, high strain rates, complex material behavior including inelasticity,
damage, and failure, etc., which we cannot discuss in this course.
The second extension we would like to discuss aims at solving a thermal problem. To this end,
let us neglect mechanical deformation and motion and instead discuss how temperature evolves
in a body with heat sources and sinks, heat conduction, and heat fluxes across its boundary.
To give the punchline right away: we will, again, observe that we can repurpose all our finite
element tools to this new setting, which admits the numerical solution of thermal problems. The
reason is that, as already mentioned in Section 8, mechanical, thermal and also electromagnetic
variational problems have a common structure of their governing equations.
For a thermal problem in d dimensions, we aim to find the generally time-dependent temper-
ature field
T = T (x, t) (28.13)
by solving the strong form (assuming Fourier’s law for heat conduction with a constant con-
ductivity and neglecting radiation)
κ ∇2 T + ρs = ρcv Ṫ
in Ω,
T = T̂ on ∂ΩD ,
(28.14)
q = −κ ∇T · n = q̂ on ∂ΩN ,
T = T0 at t = 0
Let us first consider the time-independent problem for simplicity (i.e., we take ρcv Ṫ → 0). In
this case, the resulting steady-state problem has a variational structure with the total potential
energy defined by the functional I : U → R with
Z Z
κ 2
I[T ] = ∥∇T ∥ − ρsT dV + q̂ T dS. (28.16)
Ω 2 ∂ΩN
185
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
This functional indicates that we need to seek solutions T = T (x) from within the space
n o
U = T ∈ H 1 (Ω) : T = T̂ on ∂ΩD , (28.17)
which is analogous to the mechanical problem (cf. Section 13.1). That is, we seek solutions from
within the same function space (except that we now look for a scalar-value field T instead of
the vector-valued displacement field u, which simplifies relations even).
We know that the solution must render I[T ] stationary, so we compute the first variation as
Z Z
δI[T ] = (κ T,i δT,i − ρs δT ) dV + q̂ δT dS = 0 for all δT ∈ U0 , (28.18)
Ω ∂ΩN
with
U0 = δT ∈ H 1 (Ω) : δT = 0 on ∂ΩD ,
(28.19)
Notice that the last term (due to the work by external fluxes) has a plus instead of the usual
minus sign in the mechanical problem. This arises because of the minus sign in the definition
of fluxes q = −κ ∇T . To see this, let us apply the divergence theorem to the first term and
rearrange terms (with δT = 0 on ∂ΩD ) to reformulate the first variation as
Z Z
δI[T ] = − (κ T,ii + ρs) δT dV + (κ T,i ni + q̂) δT dS = 0 for all δT ∈ U0 . (28.21)
Ω ∂ΩN
This must hold for all admissible variations δT ∈ U0 . Therefore, (28.21) is equivalent to
Ergo, the signs are correct, as we recover the (time-independent) strong form (28.14). We hence
conclude that extremal points T ∈ U of (28.16) are indeed guaranteed to satisfy the governing
equations (28.14) and are thus classical solutions. Differently put, functional (28.16) is the
correct energy functional corresponding to the (static) strong form given by (28.14). We can
further show that the solution is a minimizer of I, since the second variation is
Z Z
2
δ I[T ] = κδT,i δT,i dV = κ ∥δ∇T ∥2 dV ≥ 0 for all δT ∈ U0 . (28.23)
Ω Ω
The energy functional (28.16) and the resulting weak form (28.20) are quite similar to those
of the mechanical boundary value problem. To visualize this, we rewrite functional I for the
thermal problem for short as
1
I[T ] = B(T, T ) − L(T ), (28.24)
2
with the bilinear form B and the linear form L defined as, respectively,
Z Z Z
B(a, b) = κ ∇a · ∇b dV and L(a) = ρsa dV − q̂ a dS. (28.25)
Ω Ω ∂ΩN
186
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
This form is analogous to, e.g., that of the mechanical problem of a bar whose energy functional
was derived as (6.45).
Insertion into the weak form (28.26), which must hold for all choices of v a , allows us to deduce
the governing equations as
Z Z Z
a b b a a
κN,i N,j dV T − ρsN dV − q̂N dS = 0 for all a = 1, . . . , n. (28.28)
Ω Ω ∂ΩN
| {z } | {z }
=Qa
int (T ) =Qa
ext
This implies a system of equations that is quite similar and analogous in its structure to that
of linear elastic mechanical boundary value problems. Specifically, (28.28) balances the internal
heat flux Qaint (T ) due to heat conduction with the external heat flux Qaext due to heat sources
and due to heat flux across the surface – for each node a. This is, of course, the analog of the
mechanical system Fint (U ) = Fext .
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
with a matrix C that is similar to the mass matrix and has components
Z
C ab = ρcv N a N b dV. (28.32)
Ω
The time derivative can be approximated, e.g., by using finite differences, which leads to a
time-incremental problem as in the dynamic finite-element formulation of Section 24.
187
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
We close by pointing out that (28.31) bears great similarity to the dynamic mechanical FE
governing equations of Section 24, and we seek solutions from within the same function space
(except replacing vector-valued displacements by scalar-valued temperatures). As a conse-
quence, all element types, quadrature rules, solvers, etc. that we derived for mechanical (initial)
boundary value problems are fully applicable here as well. We may thus conveniently re-purpose
our FE tools for the analysis of thermal problems.
Shown below is an example solution of the steady-state heat equation, illustrating the temper-
ature field in a pump casing model (more information can be found online).
188
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
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.
Solving (initial) boundary value problems by the finite element method introduces numerous
sources of error that one should be aware of:
(i) The discretization error (also known as the first fundamental error) arises from
discretizing the domain into elements of finite size h. As a result, the body Ω is not
represented correctly and the model (e.g., the outer boundary) may not match the true
boundary ∂Ω (e.g., think of approximating a circular domain Ω by CST or Q4 elements
with straight edges). This error can be reduced by mesh refinement (and we discussed
r-refinement, h-refinement, p-refinement, and hp-refinement in Section 10).
(ii) The numerical integration error results from the application of numerical quadrature
for the evaluation of element force vectors and stiffness matrices in general, as discussed
in Section 20 (unless in exceptional cases, like for simplicial or undistorted elements,
integration can be carried out exactly). Hence, we approximate
Z nQP
f (ξ) dξ ∼
X
= Wq f (ξq ). (29.1)
Ωe q=1
(iii) The solution error stems from numerically solving linear systems T U = F . In general,
the accuracy of the solution depends on the condition number of the matrix,
λmax
κ = ∥T ∥ · T −1 = (29.3)
λmin
with λmax (λmin ) being the largest (smallest) eigenvalue of T . The higher the condition
number, the larger the numerical error.
A practical consequence is the guideline to choose wisely the units of model parameters
(such as material constants, domain size features, etc.). For example, when performing a
189
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
∂e
(z) = 0 for xi ≤ z ≤ xi+1 . (29.4)
∂x
Consequently, we can expand the error to find the solution at a node as
∂e (xi − z)2 ∂ 2 e
(z) + O (xi − z)3 .
e(xi ) = 0 = e(z) + (xi − z) (z) + 2
(29.5)
∂x 2 ∂x
Using (29.4), we find that
(xi − z)2 ∂ 2 e
e(z) = − (z) + O(h3 ). (29.6)
2 ∂x2
Note that
2
h2
2 xi+1 − xi
(xi − z) ≤ = , (29.7)
2 4
where h denotes the nodal spacing. Altogether, we have thus shown that the maximum
error in an element is bounded by
h2 ∂2u
|e(x)|max ≤ max . (29.8)
8 xi ≤x≤xi+1 ∂x2
As shown in Appendix G, the above error bound can be significantly generalized. For
polynomial shape functions of order k and u ∈ H k+1 (Ω), we have
hk
|uh − u|H 1 (Ω) ≤ |u| k+1 and ∥uh − u∥H 1 (Ω) ≤ c hk |u|H k+1 (Ω) , (29.9)
π k H (Ω)
using Sobolev norms. In simple terms, the error is again determined by the smoothness
of the function to be interpolated; and it is expected to decrease with decreasing element
size (as h → 0), and it decreases faster with increasing interpolation order.
Note that special caution is required if stress concentrations of any kind are to be rep-
resented (e.g., imagine a linear elastic fracture problem and the issues arising from using
polynomial-type elements to capture the stress singularity near the crack tip).
(v) A truncation error is made by every computer when storing and operating numeric
values with only a finite number of digits (e.g., floats, doubles, etc.). This is unavoidable
and one should be aware of what this error is (especially when choosing, e.g., solver
tolerances). Choosing a solver tolerance ϵ in itself produces truncation error, because
we contend with a solution U that satisfies |Fint (U ) − Fext | ≤ ϵ (instead of being zero).
190
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
(vi) Finally, no simulation is free of modeling errors, which refers to the large collection
of errors made by the selection of the analytical model to be solved (before starting any
numerical approximation). For example, we make choices about an appropriate material
model, choose material parameters, boundary conditions, and geometric simplifications
including reductions to lower dimensions (e.g., plane strain or plane stress instead of a 3D
simulation). Any such decision is prone to introducing errors.
All of the above error sources sum up to the total numerical error introduced in every simulation.
Both for postprocessing of approximate solutions and for mesh refinement (to be discussed be-
low) it is helpful to introduce a smoothing scheme that takes piecewise-defined solutions (e.g.,
the stress and strain fields in case of simplicial elements) and computes a smooth approximation
defined by smoothed nodal values of the discontinuous quantities.
In case of simplicial elements, the stresses and strains are con-
stant within elements and therefore jump across element bound-
aries. This becomes obvious when graphically illustrating stress
or strain components, which reveals colors jumping across element
boundaries. Here one can define nodal quantities, e.g., as ee,5
Pnnb +
j=1 εe,j /Ve,j a *
(εa )∗ = Pnnb , (29.10) ee,1 (e ) e+e,4
j=1 1/Ve,j +
where the element quantities εe of all nnb neighboring elements ee,2 ee,3
+
meeting at a node a are weighted by the respective element volume +
Ve . This particular weighting is chosen such that smaller elements
(whose quadrature points are closer to the node) have a larger
weight than large elements (where quadrature points are far from
the node).
In case of higher-order elements such as, e.g., the Q4 element, stresses and strains are not
constant within elements, but they are typically defined only at quadrature points (and not at
the nodes). When one wants to plot smooth fields, one can extrapolate element quantities that
are defined at the quadrature points ξk to the nodes. For example for the Q4 element, there are
four nodes and four quadrature points, so that one can uniquely solve for the four nodal values.
Once the smoothed nodal values are known, one again uses a smoothing relation like (29.10)
with the element quantities εe,j replaced by the nodal value εae from the respective element, and
element volume Ve replaced by the nodal weight (obtained from extrapolating the quadrature
point weights Wk Jk t to the nodes).
Such smoothing procedures are not only helpful for visualizing results, but they also assist in
mesh refinement. When performing adaptive mesh refinement, we need an error norm,
which allows us to locate elements of largest error requiring refinement. As an example, we
discuss the ZZ error estimator named after its inventors, Zienkiewicz and Zhu. If we use a
smoothing scheme like the above, we can define smoothed, continuous strains ε∗ and compare
those to the approximate (un-smoothed) solution εh , so that one may define the error per
element e as the difference between those, e.g., using the energy norm
Z
∗ 2
∥ε − ε ∥e = W (ε∗ − ε) dV (29.11)
Ωe
191
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Note that this definition is not unique and one could also use the L2 -norm
Z
∥ε − ε∗ ∥2e = ∥ε∗ − ε∥2 dV. (29.12)
Ωe
or any other sensible norm. These norms indicate the quality of a solution εh (if the solution
to be found is smooth or if the mesh is very fine, then the piecewise constant solution εh can
be expected to be close to the interpolated, smoothed solution ε∗ ).
In order to define an element-wise error estimate, it
makes sense to introduce the normalization
∥ε − ε∗ ∥e e*
ηe = , (29.13)
∥ε − 0∥e + ∥ε − ε∗ ∥e
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.
192
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
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.
b
a
Q8
CST
highly skewed element near-triangle Q4 strongly curved edge bad element combination
Many codes define the so-called Jacobian ratio j in order to quantify the distortion of
an element. When using numerical quadrature, all fields of interest are only evaluated
at the quadrature points (q = 0, . . . , nQP − 1), which is where one needs to calculate the
Jacobian J(ξq ) = det F (ξq ). The Jacobian ratio of an element e is thus defined as
maxq J(ξq )
je = , (29.15)
minq J(ξq )
i.e., we compare the minimum to the maximum value of the Jacobian within an element e.
193
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Ideally, for an undistorted element we have J(ξq ) = const. and hence maxq J(ξq ) =
minq J(ξq ) or je = 1. If je ̸= 1, then the element is distorted – the more the further je is
away from 1.
• wrong element types are a common reason for trouble
(e.g., using structural vs. solid elements, or using 2D vs.
3D elements). 2D elements can effectively be used only if stress
concentration
the problem is plane-strain or plane-stress (and the element
thickness must be set correctly). Structural elements are sig-
nificantly more efficient than solid elements, but they come
with strong limitations and, e.g., cannot accurately repre- solid model beam model
sent stress concentrations encountered near sharp corners (as
shown on the right).
• linear vs. nonlinear analysis: are deformations expected to be large or small (so that
finite or infinitesimal strains can be used, respectively)? Is the material model linear
elastic, or should a finite-deformation model be used? These questions must be answered
before setting up a simulation.
• boundary conditions must be chosen appropriately (at the right locations, of the right
type and magnitude). If symmetries can be exploited, only a reduced system can be
modeled efficiently, but boundary conditions must be chosen correctly, and it must be
ensured that the solution is indeed symmetric (e.g., when studying buckling problems,
the assumption of symmetry automatically rules out asymmetric buckling modes; the
same applies to vibrational eigenmodes).
• step sizes, i.e., the load step size in quasistatic studies and the time step size ∆t in
dynamic studies, must be chosen to ensure convergence and stability of the solver.
• units must be chosen properly and entered consistently (e.g., always stick to SI units –
but bare in mind the problems associated with large numbers, cf. Section 29.1).
• the interpretation of results requires caution. Are the shown color plots of fields
of interest the raw data or smoothed fields? Are the units correct, are global or local
coordinates being used for, e.g., the definition of tensor components? Can a simple test
case be compared to an analytical or simplified solution? Always make sanity checks!
All commercial FEA codes have internal sanity checks which, e.g., for an implicit analysis
verify that the tangent or stiffness matrix has no zero diagonal entries. The occurrence of such
would imply, e.g., nodes that are not connected to any element, duplicated nodes, or material
moduli being zero. A singular stiffness matrix may also result from mechanical instability
(such as buckling), but this is theoretically correct and more refined solvers are to be used
(e.g., a Riks, path-following, or line-search solver rather than a Newton-Raphson-type solver).
The same applies to structures with mechanisms (i.e., zero-energy modes that are not rigid-
body modes). For example, discretizing a long bar into several 2-node bar elements leads to
mechanisms, since the 2-node bar element has only axial stiffness. To identify the cause of zero
eigenvalues of the stiffness matrix, it may be insightful to visualize the corresponding eigenmode.
194
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
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.
• static vs. dynamic FEA: if at all possible, a quasistatic mechanical boundary value
problem should in general be solved by a static, implicit solver, since this ensures that
an equilibrium solution has been found. However, that may not always be possible, e.g.,
because no consistent tangent T is available (because the material model lacks an analyt-
ical form of Cijkl or because the element implementation does not permit the analytical
calculation of the tangent matrix T ) or because the tangent matrix is so large that its
calculation and storage is disadvantageous computationally, if not impossible. We note
that an approximate tangent matrix can always be compute numerically by employing
finite differences, e.g.,
a
∂Fint,i a (U + δeb ) − F a (U )
Fint,i j int,i
Tijab (U ) = (U ) ≈ , (30.1)
∂ubj δ
with vector ebi = (0, . . . , 0, 1, 0, . . . , 0)T of the length of U with a 1 placed at the location
of component ubj , and 0 < δ ≪ 1. This procedure has the disadvantage that it is compu-
tationally expensive (the numerical calculation of T requires perturbing each and every
entry in U , one at a time, in the above fashion).
Many codes offer an explicit-dynamics option as an alternative. The idea here is to replace
the static simulation to solve for U by a dynamic one to solve for U (t); including sufficient
damping leads to solutions that converge over time to a steady-state U∞ = limt→∞ U (t),
and it is expected that this steady state coincides with the static solution, i.e., U∞ = U .
Such solvers must be used with caution! First, it is important to check if the solution has
indeed converged over time (if vibrations or waves are still present in the solution, those
may over- or under-predict local strains and stresses by considerable amounts). Second,
unless in a static linear elastic study (which surely should not be solved dynamically but
30
Studies of significant errors resulting from the improper use of rates can be found, e.g., here and here.
195
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
statically since an analytical tangent is available), the dynamic solver may converge to
one of many equilibrium solutions and, depending on the initial conditions, may take one
quite far from the sought solution.
196
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
As a remedy, techniques like the eXtended FE Method (XFEM) have been introduced,
which enrich the interpolation space U h by singularities of the expected type. For example,
for fracture problems within linearized kinematics, the stress is expected to diverge as
√
1/ r at the crack tip with r > 0 being the distance from the tip. Hence, including shape
functions of this type allows the interpolation to capture the diverging mechanical fields,
thus removing the singularity and yielding reasonable solutions.
• damage and failure: when a material model includes damage or failure, it generally soft-
ens under increasing loads (as the material suffers from damage, its stiffness ultimately
tends to zero under increased loading). Such behavior causes numerical difficulties, be-
cause the softening branch of the stress-strain response leads to instability (e.g., most
iterative solvers fail when the tangent matrix T is no longer positive-definite, which is
generally the case during mechanical softening). This manifests not only in solver failure
but also in mesh dependence (again, a study of h-convergence should identify such issues).
197
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Appendices
198
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
For notational brevity, any of the ODEs and PDEs introduced in continuum mechanics and
thermodynamics can be written in an operator form. By introducing a differential operator
L, we may abbreviate, e.g., the 1D wave equation as
∂ ∂
ü − c2 u,xx = 0 ⇔ L[u] = 0 with L= 2
− c2 2 . (A.1)
∂t ∂x
One key feature of all PDEs discussed so far (including the heat and wave equations) is that
their operators are linear. A linear operator L is characterized by
For more information about operators and linear operators see Appendix I. A few examples
involving linear operators are summarized here:
∂ ∂
L[u] = 0 with L= 2
− c2 2 ⇔ ü = c2 u,xx . (A.3)
∂t ∂x
• the 1D heat equation (of second order in space, first order in time):
∂ ∂2
L[T ] = s with L = ρcv −κ 2 ⇔ ρcv Ṫ = κT,xx + s. (A.4)
∂t ∂x
• the 1D advection equation (or transport equation) (of first order in space and time)
with a scalar flow speed v:
∂ ∂
L[u] = 0 with L= +v ⇔ u̇ + v u,x = 0. (A.5)
∂t ∂x
Similarly, boundary conditions can also be expressed by linear operators. For example, for we
may define boundary operators B as differential operators for
199
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
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.
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):
The specific forms and signs of the connection terms ki,i−1 (ui − ui−1 ) and ki,i+1 (ui+1 − ui ) can
easily be found by recognizing that the spring forces are linear in the displacements.
Therefore, we may, e.g., assume that ui =
ui-1=0 ui=0 ui+1>1
ui−1 = 0 and only ui+1 > 0, which shows that
the force acting on particle i in this case pulls
to the right with a magnitude kui+1 . Similarly,
if ui = ui+1 = 0 and ui−1 > 0, then particle i
is pushed to the right with a force of magnitude
ui-1>1 ui=0 ui+1=0
kui−1 . Finally, if ui−1 = ui+1 = 0 and ui > 0,
then both springs connected to particle i push
the particle to the left, the right spring with
magnitude kui and the left with magnitude kui . ui-1=0 ui>1 ui+1=0
Summing all these contributions leads exactly
to the spring force terms in (B.1).
The first (i = 1) and the last particle (i = n) are each missing one spring connection. Applying
the same principles as above leads to the equations of motion for those particles as
m1 ü1 = k1,2 (u2 − u1 ) + F1ext (t), mn ün = −kn,n−1 (un − un−1 ) + Fnext (t). (B.2)
Alternatively (and sometimes more conveniently for complex systems), the equations of motion
can also be obtained from the Lagrange equations, using the kinetic energy T and potential
energy V with
n n
X mi 2 X ki,i−1 2 d ∂L ∂L
T = u̇i , V = (ui − ui−1 ) ⇒ − = Fiext , (B.3)
2 2 dt ∂ u̇i ∂ui
i=1 i=2
200
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Either way, the obtained equations of motion can be arranged into matrix form, viz.
m1 ü1
m2 ü2
... ·
mi üi
... ·
mn ün
ext
−k1,2
k1,2 u1 F1
−k1,2 k1,2 + k2,3 −k2,3 u2 F2ext
... · ·
+ =
ui F ext .
−ki−1,i ki−1,i + ki,i+1 −ki,i+1 i
... · ·
−kn,n−1 kn,n−1 un Fnext
(B.4)
M Ü + KU = F ext (B.5)
as well as
−k1,2
k1,2
−k1,2 k1,2 + k2,3 −k2,3
...
[K] = . (B.7)
−ki−1,i ki−1,i + ki,i+1 −ki,i+1
...
−kn,n−1 kn,n−1
Let us expand matrix K a bit more and use color coding for the different spring stiffness
contributions to realize the following structure:
k1,2 −k1,2
−k1,2 k1,2 + k2,3 −k2,3
−k2,3 k2,3 + k3,4 −k3,4
[K] =
−k3,4 k3,4 + k4,5 . (B.8)
. .
.
−kn−2 kn−2 + kn,n−1 −kn,n−1
−kn,n−1 kn,n−1
201
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Again using the abbreviation M Ü + KU = F ext , the above equations allow us to define the
stiffness matrix of a single linear elastic spring in 1D as
k −k
[K] = (B.10)
−k k
By inspecting (B.8), we notice that the stiffness matrix of the chain of n springs is nothing but
the assembly of the stiffness matrices of all springs in the chain, each being added onto those
components in K, which are connected to the spring. For example, the spring with stiffness k2,3
links nodes 2 and 3. Therefore, the stiffness matrix (B.10) with k → k2,3 is added onto those
components in columns and rows 2 and 3 in [K]. Repeating this procedure for each spring leads
to the complete stiffness matrix in (B.8).
————
202
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
where T1 is the vertical reaction force from the ground onto particle 2, and
is the tensile force in the spring connecting particles 2 and 3 (obtained from projecting the
displacement components onto the spring to infer its change of length). Finally, for particle 3
we obtain
X
Fi,1 = S2 cos α + F = 0,
i
X (B.14)
Fi,2 = −S3 − S2 sin α = 0.
i
−k(u21 − u11 ) = R1 ,
−k(u32 − u12 ) = R2 ,
−k(u21 − u11 ) − k(u21 cos α − u22 sin α − u31 cos α + u32 sin α) cos α = 0,
(B.15)
−k(u21 cos α − u22 sin α − u31 cos α + u32 sin α) sin α = T1 ,
−k(u21 cos α − u22 sin α − u31 cos α + u32 sin α) cos α = F,
−k(u32 − u12 ) − k(u21 cos α − u22 sin α − u31 cos α + u32 sin α) sin α = 0.
again follows the general recipe discussed above: we can identify those contributions of the spring
stiffness matrices of the horizontal and vertical springs (see the red and blue contributions,
respectively). All remaining (black) contributions stem from the oblique spring connecting
203
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
particles 2 and 3, which is more involved since it links both horizontal and vertical displacement
components. We further notice that all diagonal components satisfy k(ii) > 0.
As an exercise, try out yourself to insert displacement vectors being 0 with only one component
being 1 to find the forces produced by the springs when activating only one displacement
component (and verify that those forces make sense)!
————
204
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
As discussed in Section 5.3, we may interpret the matrix in (C.3) as the stiffness matrix of
a beam element (compare, e.g., with (5.7) for a bar element): it relates the externally applied
forces and torques to the resulting displacements and rotation angles. If we define the degree
of freedom for this element as
w1
θ1
U = w2
(C.4)
θ2
and the external “force” vector (in an abuse of notation, as it contains both forces and moments)
as
1
Fz
My1
Fext = Fz2 ,
(C.5)
My2
then we conclude for a beam element of length Le undergoing deflection and rotation (and
without a distributed load, so q(x) = 0) that
6 3Le −6 3Le
2EIy 2 L2e
Fext = KU with [K] = 3Le 2Le −3Le (C.6)
L3e −6 −3Le 6 −3Le
3Le L2e −3Le 2L2e
This defines a two-node beam element having degrees of freedom (C.4) and external forces
(and moments) (C.5). This is indeed identical to the stiffness matrix (12.55) derived from
variational principles.
205
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The objective of all weighted residual methods is to find approximate solutions uh (x, t) that
minimize the total error of that approximate solution (which still needs to be defined) when
compared to the exact solution u(x, t). As in the discussion of variational method, let us here
drop the time dependence and only consider (quasi-)static problems. Also, we restrict ourselves
to 1D problems, seeking uh (x), which can be expanded to higher dimensions as needed.
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)).
We have thus reduced the infinite-dimensional problem to a finite-dimensional one (to be solved
for the n coefficients c1 , . . . , cn ). Note that n → ∞ yields the exact solution if a proper orthog-
onal set of basis functions is chosen (e.g., polynomials or a Fourier series). For our purposes, we
deliberately choose n ≪ ∞, so that the resulting finite-dimensional problem is computationally
tractable.
One constraint we would like to impose is that the approximate function uh (x) must satisfy
all Dirichlet (essential) boundary conditions (if a function uh (x) does not satisfy the essential
boundary conditions, then it does not qualify as a solution to the problem). This can be
accomplished in various ways. For example, one can impose the essential boundary conditions
onto the unknown coefficients as a direct constraint to be accounted for while solving (we will use
this latter strategy in most of the below examples). An alternative is to separate the boundary
part from the interior part by defining
n
X
h
u (x) = u∂ΩD (x) + ca ϕa (x) with ϕa (x) = 0 on ∂ΩD (D.2)
a=1
As explored in Section 1.7, the general boundary value problem we aim to solve can be written
in general as
find u(x) s.t. L[u] = s for x ∈ Ω and Bj [u] = t̂j for x ∈ ∂Ωj (j = 1, . . . , k),
(D.3)
where L is a linear differential operator, representing the governing equation inside body Ω
(e.g., linear momentum balance or the heat equation), and Bj is a linear differential boundary
operator, representing natural (Neumann) boundary conditions (e.g., imposing tractions or a
206
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
heat flux on the boundary ∂Ω). Since we may have multiple independent Neumann boundary
conditions, we here account for k different boundary conditions, each defined by a unique
operator Bj (e.g., we may want to apply different tractions to different parts of the boundary).
We now insert our approximate solution uh (x) into the above set of equations (D.3), knowing
that it will in general not satisfy those governing equations (otherwise, we would have found an
exact solution). As a consequence, we obtain residuals defined by
Unless we have found the exact solution, we will have rΩ ̸= 0 and r∂Ωj ̸= 0, and we seek
coefficients ca (a = 1, . . . , n) such that our approximate solution uh (x) satisfies rΩ ≈ 0 and
r∂Ωj ≈ 0 in some sense. In order to find the n coefficients, we need n equations.
To this end, the family of methods summarized under the name method of weighted resid-
uals defines n total residuals as
Z k Z
X
2
Ri = rΩ Wi dV + ξ r∂Ωj wi dS ⇒ Ri = 0 for i = 1, . . . , n (D.5)
Ω j=1 ∂Ωj
where Wi (x) and wi (x) (for i = 1, . . . , n) are weighting functions for, respectively, the bulk and
surface residuals, which define – loosely speaking – the priority of where the residuals are to be
evaluated. ξ 2 > 0 is an, in principle, arbitrary constant introduced for unit compatibility (and
we write ξ 2 instead of ξ to make sure the pre-factor in front of the second integral is positive,
assuming ξ ∈ R). Now there are various ways to define the weights (each of different difficulty
and accuracy levels), and this leads to the following methods of weighted residuals.
A straight-forward approach is to evaluate the residuals only at specific locations, which results
in the so-called collocation method.
To this end, we use Dirac delta functions to define
x
Wi = δ(x − xi ) for xi ∈ Ω, i = 1, . . . , n − k, +1
(D.6)
wi = δ(x − xi ) for xi ∈ ∂Ωi−(n−k) , i = n − k + 1, . . . , n, x
+2
so that the equations to be solved for coefficients ca are x
+3 x6 t
x +
+4
rΩ (xi ) = 0 for i = 1, . . . , n − k x
(D.7) +5
r∂Ωi−(n−k) (xi ) = 0 for i = n − k + 1, . . . , n W
Points xi (i = 1, . . . , n) are called collocation points31 . This method is closest to the finite-
difference techniques discussed before, since it aims at minimizing the error only at discrete
points (much like finite differences aim to solve the PDE exactly only on a discrete grid).
For convenience, we here chose k collocation points on the k boundaries with natural boundary
conditions (one per boundary), while one could also choose this distribution differently and make
informed guesses over where the residuals are ideally to be evaluated – as long as sufficiently
31
R
Recall the delta function property Ω f (x)δ(x−x0 ) dx = f (x0 ) for x0 ∈ Ω. This is exploited here to define the
weights such that the residual integrals are turned into local evaluations of the residuals at the chosen collocation
points xi .
207
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
many equations are available (recall that we need n equations to solve for the n unknown
coefficients).
and
(
1 if x ∈ ∂Ωi−(n−k)
wi = for i = n − k + 1, . . . , n, (D.9)
0 else
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.
The least squares method is probably the most intuitive approach and seeks to determine the
unknown coefficients by minimizing the bulk and boundary residuals. To this end, we introduce
the total error
Z k Z
X
2 2 2
E= rΩ dV +ξ r∂Ωj
dS (D.11)
Ω j=1 ∂Ωj
208
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
from which we realize, by comparing to (D.5), that we have yet another method of weighted
residuals, since we have effectively chosen
∂rΩ ∂r∂Ωj
Wa = inside Ω, wa = on Neumann boundary ∂Ωj . (D.14)
∂ca ∂ca
Recalling our definitions and exploiting the properties of a linear operator (see Section 1.7 and
Eq. (A.2)), we may write the residual when evaluated with the approximate solution uh as
n
X n
X
uh (x) = ca ϕa (x) ⇒ rΩ = L[uh ] − s = ca L[ϕa (x)] − s (D.15)
a=1 a=1
or, after some re-arrangement (separating terms depending on cb from those independent of the
coefficients),
Xn Z k Z
X
L[ϕa (x)]L[ϕb (x)] dV + ξ 2 Bj [ϕa (x)]Bj [ϕb (x)] dS cb
b=1 Ω j=1 ∂Ωj
| {z }
=K ab (D.19)
Z k Z
X
= sL[ϕa (x)] dV + ξ 2 t̂j Bi [ϕa (x)] dS for a = 1, . . . , n.
Ω j=1 ∂Ωj
| {z }
=F a
209
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
and
Z k Z
X
a a 2
F = sL[ϕ (x)] dV + ξ t̂j Bj [ϕa (x)] dS. (D.23)
Ω j=1 ∂Ωj
Note that both K and F are constant, since all integrals have been evaluated, so (D.20) is indeed
a linear system with constant coefficients to be solved for c. Notice that K is by definition
symmetric (K ab = K ba ) and, moreover, positive-semi-definite (since K aa ≥ 0 combined with
the symmetry property). As before, we use symbols K and F by analogy to, respectively, the
stiffness matrix and external force vector in our truss analysis in Section 5.
ρω 2
div σ = ρa ⇒ (Eu,x ),x = −ρω 2 x ⇒ u,xx = − x, (D.24)
E
and the boundary conditions are (the force coming from the centripetal acceleration of the
attached particle)
Integrating the ODE twice for u(x) and obtaining the two integration constants from the two
boundary conditions yields the exact solution
ρω 2 3 mω 2 L ρω 2 L2
u(x) = − x + + x. (D.26)
6E EA 2E
Next let us find approximate solutions by the various methods of weighted residuals. To this
end, let us introduce an approximate solution, e.g., with a polynomial basis ϕa (x) = xa , such
that
n
X
h
u (x) = ca xa . (D.27)
a=0
uh (x) ∈ Pn . (D.28)
210
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The essential boundary condition u(0) = 0 requires that c0 = 0 (recall that we only enforce
Dirichlet and not Neumann boundary conditions from the outset).
For a practical example (which admits simple closed-form solutions), let us pick n = 3 so the
approximate solution is uh (x) ∈ P3 . Hence, we use
3
X
h
u (x) = ca xa = c1 x + c2 x2 + c3 x3 . (D.29)
a=1
The bulk and surface residuals in this problem are written as, respectively,
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
With those collocation points, the collocation method yields the three residuals that we set to
zero:
rΩ (x1 ) = E(2c2 + 2c3 L) + ρω 2 L/3 = 0,
rΩ (x2 ) = E(2c2 + 4c3 L) + 2ρω 2 L/3 = 0, (D.32)
r∂Ω (x3 ) = EA(c1 + 2c2 L + 3c3 L2 ) − mω 2 L = 0.
In matrix form, the above becomes the linear system of equations
1
−ρω 2 L/3
0 2E 2EL c
0 2E 4EL c2 = −2ρω 2 L/3 , (D.33)
EA 2EAL 3EAL2 c3 mω 2 L
whose solution is
mω 2 L ρω 2 L2 ρω 2
c1 = + , c2 = 0, c3 = − . (D.34)
EA 2E 6E
Insertion into (D.29) yields the approximate solution
mω 2 L ρω 2 L2 ρω 2 3
h 1 2 2 3 3
u (x) = c x + c x + c x = + x− x . (D.35)
EA 2E 6E
This is in fact the exact solution, cf. Eq. (D.26). Note that this is coincidental (since rΩ (x) is
linear in x, so any two points inside the bar would have resulted in this solution, given that
u(x) ∈ P3 (x), so the exact solution is contained in the chosen approximate solution space). Yet,
this is not generally the case.
211
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Subdomain Method. Let us repeat the above example using the subdomain method. To
this end, we define two equally-sized subdomains in the bulk of the bar (simply by dividing the
bar into two equal halfs):
and we have x = L as our third “domain” to satisfy the Neumann boundary condition. There-
fore, the three equations to solve are
Z L/2 Z L
E 2c2 + 6c3 x + ρω 2 x dx = 0, E 2c2 + 6c3 x + ρω 2 x dx = 0 (D.37)
0 L/2
and, as before,
Solving the resulting system of equations (try it out yourself as an exercise) again yields the
correct solution uh (x) = u(x).
Least Squares Method. Finally, let us use the method of least squares for which we had
shown that the problem reduces to solving the linear system (D.20) with matrix components
Z k Z
X
K ab = L[ϕa (x)]L[ϕb (x)] dV + ξ 2 Bj [ϕa (x)]Bj [ϕb (x)] dS (D.39)
Ω j=1 ∂Ωj
For this particular problem, we have defined L[·] and B[·] in (D.30), which results in
Z L
ab
L[xa ]L[xb ]A dx + ξ 2 B[xa ]B[xb ] x=L
K = for a, b = 1, 2, 3
0
Z L
∂ 2 xa ∂ 2 xb ∂xa ∂xb
2
= E E A dx + ξ EA EA
0 ∂x2 ∂x2 ∂x ∂x x=L
Z L (D.41)
= E2A a(a − 1)b(b − 1)xa+b−4 dx + ξ 2 E 2 A2 abLa+b−2
0
a(a − 1)b(b − 1) a+b−3
= E2A L + ξ 2 E 2 A2 abLa+b−2
a+b−3
Note that for unit consistency between the two terms we may choose ξ 2 = (LA)−1 (any inverse
volume works in general; here, let us make this specific choice for its simplicity). Inserting
a, b = 1, 2, 3 leads to the coefficients of matrix K.
212
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
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.
————
We point out that Galerkin’s method of formulating the weak form via the principle of virtual
work (see Section 8.4) also classifies as a method of weighted residuals. By inspecting the
hanging bar problem of Example 8.3, note that the principle of virtual work, Eq. (8.27), can be
rewritten as
Z L Z L
R= Eu,x u∗,x A dx − ρgu∗ A dx − F̂ u∗ (L) = 0, (D.44)
0 0
which is of the form (D.5) of the total residual discussed for the methods of weighted residuals,
with the virtual displacement u∗ acting as the weighting function. Moreover, we can, as before,
introduce a finite-dimensional representation for uh (x) ≈ u(x), e.g., in the form of a polynomial
or Fourier series, and solve for the n unknown coefficients ca by introducing n independent
weight functions u∗,a (x). Since the residual R in (D.44) is linear in u(x), this again leads to a
linear system of equations to be solved for the unknown coefficients.
Any of the above methods can be extended to higher spatial dimensions as needed (after all, only
few real-world problems can be reduced to one dimension). In higher dimensions, we generally
seek to find a function u(x) : Ω → Rd and introduce the approximation
X
uh (x) = ca ϕa (x), (D.45)
a∈T
where ∈ca Rdare the unknown, vector-valued coefficients, and ϕa (x) denote the basis functions.
For example, we may again use polynomial or Fourier basis functions; e.g., ϕa (x) = sin(πa · x)
with appropriate choices of the vector set T . Now, we need d×n independent equations to solve
for all components of the n coefficient vectors ca (d equations per any of the n coefficients). It is
simplest to explain these concepts through practical examples, which will follow later. However,
the general concepts are fully analogous to those described above.
213
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
E Vector Spaces
φ : X ∈ Ω → φ(X) ∈ Rd or φ : Ω → Rd , (E.1)
where Ω is the domain and Rd the range of φ. The mapped (current) configuration of Ω is
φ(Ω).
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.
(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:
214
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
F Function Spaces
u is continuous at a point x if, given any scalar ϵ > 0, there is a r(ϵ) ∈ R such that
Examples:
• 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.)
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:
A linear space U endowed with an inner product is called an inner product space.
Examples:
Examples:
• Legendre polynomials:
1 dn 2 1
pn (x) = (x −1)n so that p0 = 1, p1 = x, p2 = (3x2 −1), . . . (F.3)
2n n! dxn 2
215
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
• trigonometric functions:
πnx
pn (x) = cos (F.5)
L
are orthogonal on Ω = (−L, L), since
Z L 2L, if m = n = 0,
pn (x) pm (x) dx = L, if m = n ̸= 0, (F.6)
−L
0, else.
Consider a linear space {U, +; R, ·}. A mapping ∥·∥ : U → R+ is called a norm on U if for all
u, v ∈ U and α ∈ R:
A linear space Ω endowed with a norm is called a normed linear space (NLS).
Examples of norms:
216
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
ess sup |u(x)| = M with the smallest M that satisfies |u(x)| ≤ M for a.e. x ∈ Ω. (F.11)
x∈Ω
Now, that we have norms, we can generalize our definition of the distance. If un , u ∈ U equipped
with a norm ∥·∥ : U → R, then we define the distance as
Examples:
with u ∈ U = P2 (Ω). For example, for d(un − u) < ϵ we need n > N = Ω x2 dx/ϵ.
R
• Fourier series:
∞
X n
X
u(x) = ci xi ⇒ un (x) = ci xi such that un → u as n → ∞. (F.14)
i=0 i=0
Given a point u in a normed linear space U, a neighborhood Nr (u) of radius r > 0 is defined
as the set of points v ∈ U for which d(u, v) < r. Now, we can define sets properly:
A subset V ⊂ U is called open if, for each point u ∈ V, there exists a neighborhood Nr (u)
which is fully contained in V. The complement V e of an open set V is, by definition a closed set.
The closure V of an open set V is the smallest closed set that contains V. In simple terms, a
closed set is defined as a set which contains all its limit points. Therefore, note that
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 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).
217
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
We can use these norms to define function spaces, e.g., the L2 -space of functions:
Z
u2 dx < ∞
L2 (Ω) = u : Ω → R : (F.16)
Ω
Examples:
• Piecewise constant functions u (with ess supx∈Ω |u(x)| < ∞) are square-integrable and
thus in L2 .
218
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
G Approximation Theory
PN
Motivation: in computational mechanics, we seek approximate solutions uh (x) = a=1 ua Na (x),
e.g., a linear combination of basis functions Na (x) with amplitudes ua ∈ R.
Questions: How does uh (x) converge to u(x), if at all? Can we find an error estimate ∥uh − u∥?
What is the rate of convergence (how fast does it converge, cf. the truncation error arguments
for grid-based direct methods)?
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
but since uh (x) is piecewise linear, we have u′′h (x) = 0, so that we arrive at the local error
estimate
Z h
h2 h ′′
Z
′ ′ 2 2
uh (x) − u (x) dx ≤ 2 u (x) dx. (G.6)
0 π 0
so that
b b
h2
Z Z
2 2
u′h (x) ′
− u (x) dx ≤ 2 u′′ (x) dx (G.8)
a π a
219
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
We want to write this a bit more concise. Let us define the Sobolev semi-norm:
Z 1/2
2
|u|H k (Ω) = Dk u dx or for short |u|k = |u|H k (Ω) (G.10)
Ω
Examples in 1D:
• from before:
Z b 1/2
′ 2
|u|H 1 (a,b) = u (x) dx (G.11)
a
• analogously:
Z b 1/2
′′ 2
|u|H 2 (a,b) = u (x) dx (G.12)
a
h2 2 h
|uh − u|2H 1 (a,b) ≤ |u| 2 ⇒ |uh − u|H 1 (a,b) ≤ |u| 2 (G.13)
π 2 H (a,b) π H (a,b)
Hence, the topology of convergence is bounded by the regularity of u. Convergence with
h-refinement is linear.
We can extend this to higher-order interpolation. For example, we may use a piecewise
quadratic interpolation uh . From Poincaré:
Z h
h2 h ′′ h4 h ′′′ h4 h ′′′ 2
Z Z Z
2 2 2
u′h − u′ dx ≤ 2 uh − u′′ dx ≤ 4 uh − u′′′ dx = 4 u dx. (G.15)
0 π 0 π 0 π 0
The extension into a global error estimate shows quadratic h-convergence:
h2
|uh − u|H 1 (a,b) ≤ |u| 3 . (G.16)
π 2 H (a,b)
hk
|uh − u|H 1 (a,b) ≤ |u| k+1 (G.17)
π k H (a,b)
220
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Why is the Sobolev semi-norm not a norm? Simply consider the example u(x) = c > 0. All
higher derivatives vanish on R, so that |u|H k (Ω) = 0 for Ω ⊂ R and k ≥ 1. However, that does
not imply that u = 0 (in fact, it is not).
Let us introduce the Sobolev norm (notice the double norm bars)
k
!1/2
X
∥u∥H k (Ω) = |u|2H m (Ω) or for short ∥u∥k = ∥u∥H k (Ω) . (G.18)
m=0
Let us derive a final global error estimate, one that involves proper norms – here for the example
of a piecewise-linear uh . Start with Poincaré’s inequality (i),
Z b Z b
2 2 2
∥uh − u∥L2 (a,b) = |uh − u| dx ≤ ch u′h − u′ dx = ch |uh − u|2H 1 (a,b) (G.21)
a a
For practical purposes it is convenient to also introduce the so-called energy norm
p
|·|E = B(·, ·), (G.24)
221
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
where B(·, ·) is the bilinear form of the potential energy. This norm is helpful for quantifying
errors. For example, if we find an approximate solution uh for the displacement or temperature
field, then the error can be quantified as
q
u − uh = B(u − uh , u − uh ). (G.25)
E
Notice that, unlike for, e.g., the Euclidean norm, u − uh E does not necessarily imply u−uh = 0
so that, strictly speaking, the above energy norm is only a semi-norm. To turn it into a proper
norm, we need to exclude solutions corresponding to rigid-body motion (i.e., solutions that
imply uniform translations or rotations of the u-field but without producing gradients in u). If
we assume that essential boundary conditions are chosen appropriately to suppress rigid-body
motion by seeking solutions
u ∈ U = u ∈ H 1 : u = û on ∂ΩD ,
(G.26)
222
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
H Sobolev spaces
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).
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
α = (α1 , . . . , αn ) ∈ (Z+ n
0) . (H.3)
|α| = α1 + . . . + αn . (H.4)
For example, we can now extend our definition of polynomials to higher dimensions:
k X
X
2
p(x) ∈ Pk (R ) ⇒ p(x) = aα xα (H.6)
β=0 |α|=β
so that
p(x) = a(0,0) + a(1,0) x1 + a(0,1) x2 + a(2,0) x21 + a(1,1) x1 x2 + a(0,2) x22 + . . . (H.8)
223
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
∂ |α| u
Dα u = and D0 u = u (H.9)
∂xα1 1 · . . . · ∂xαnn
A common notation is
X X ∂ |α| u
Dα u = (H.10)
α1 ,...,αn ∂xα1 1 · . . . · ∂xαnn
|α|=β
s.t. |α|=β
so that
Z
∂u ∂v ∂u ∂v
⟨u, v⟩H 1 (R2 ) = uv + + dx1 dx2 (H.14)
R2 ∂x1 ∂x1 ∂x2 ∂x2
and
Z " 2 2 #
∂u ∂u
∥u∥2H 1 (R2 ) = u2 + + dx1 dx2 . (H.15)
R2 ∂x1 ∂x2
This is the set of all functions whose derivatives up to mth order all exist and are square-
integrable.
As an example, u ∈ H 1 (Ω) implies that u and all its first partial derivatives must be square-
integrable over Ω because (H.15) must be finite.
224
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Let us look at the example u(x) = |x| and take Ω = (−1, 1). Then, we have u′ (x) = H(x) (the
Heaviside jump function) and u′′ (x) = δ(x) (the Dirac delta function). Therefore,
Z b
u2 (x) dx < ∞ ⇒ u ∈ L2 (Ω) = H 0 (Ω)
a
Z b 2 Z b
∂u ∂u
dx = H 2 (x) dx < ∞ ⇒ ∈ L2 (Ω) and u ∈ H 1 (Ω) (H.17)
a ∂x a ∂x
Z b 2 b
∂2u ∂2u
Z
dx = δ 2 (x) dx = ∞ ⇒ ∈
/ L2 (Ω) and / H 2 (Ω)
u∈
a ∂x2 a ∂x2
Note that one usually indicates the highest order k that applies (since this is what matters for
practical purposes), so here we thus conclude that u ∈ H 1 (Ω).
H ∞ ⊂ . . . ⊂ H 2 ⊂ H 1 ⊂ H 0 = L2 . (H.18)
Notice that, even though polynomials u ∈ Pk (Ω) are generally in H ∞ (Ω) for any bounded
Ω ⊂ Rd , they are not square-integrable over Ω = Rd . Luckily, in practical problems we usually
consider only finite bodies Ω. To more properly address this issue, let us introduce the support
of a continuous function u defined on the open set Ω ∈ Rd as the closure in Ω of the set of all
points where u(x) ̸= 0, i.e.,
supp u = x ∈ Ω : u(x) ̸= 0 . (H.19)
This means that u(x) = 0 for x ∈ Ω \ supp u. We may state, e.g., that functions u : Ω → R
with a finite support Ω ⊂ Rd and ess supΩ < ∞ are square-integrable over Ω.
Finally, let us define C0k (Ω) as the set of all functions contained in C k (Ω) whose support is a
bounded subset of Ω. Also, notice that
and
\
C0∞ (Ω) = C0k (Ω). (H.21)
k≥0
225
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
I Operators
A : u ∈ U → A(u) ∈ V, (I.1)
A simple example is
du
A(u) = c , (I.2)
dx
which is a (linear differential) operator requiring u ∈ C 1 .
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
An example of a bilinear operator is the inner product ⟨·, ·⟩ : U × U → R for a Hilbert space U.
226
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
J Uniqueness of solutions
One of the beauties of variational problems of the type (6.45) is that a unique minimizer exists
by the Lax-Milgram theorem. This is grounded in (assuming |Ω| < ∞ and u, v ∈ U with
some Hilbert space U):
For a bilinear form B(u, v) = ⟨grad u, grad v⟩, this is satisfied by the Cauchy-Schwarz
inequality (using L2 -norms):
|B(u, v)| ≤ C ∥grad u∥L2 (Ω) ∥grad v∥L2 (Ω) ≤ C ∥grad u∥H 1 (Ω) ∥grad v∥H 1 (Ω) (J.2)
Again, for a bilinear form B(u, v) = ⟨grad u, grad v⟩ this is satisfied by Poincaré’s inequal-
ity:
These two requirements imply the well-posedness of the variational problem and thus imply the
existence of a unique solution (or, that the potential has a unique global minimizer). In simple
terms, the two conditions that the functional has sufficient growth properties (i.e., the bilinear
form has upper and lower bounds). Functionals of the type (6.45) satisfy the above and hence
have a unique solution.
227
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
K Vainberg’s theorem
We have seen that variational problems are beneficial for numerical solution approaches as
opposed to solving the strong form directly. Whether or not a given strong form possesses a
variational structure is an important question, which may be answered by Vainberg’s theorem.
Consider a weak form
Let us check if G derives from a potential I, i.e., whether G = δI is the first variation of some
potential I. This would imply that
d
G(u, δu) = Dδu I[u] = lim I[u + δu]. (K.2)
ϵ→0 dϵ
Now recall from calculus that for any continuously differentiable function f (x, y) we must have
by Schwartz’ theorem
∂ ∂f ∂ ∂f
= . (K.3)
∂y ∂x ∂x ∂y
We can use the same strategy here to formulate whether or not a weak form derives from a
potential. Specifically, we can take one more variation and state that
Dδu2 G(u, δu1 ) = Dδu1 G(u, δu2 ) if and only if I[u] exists (K.4)
We can easily verify this for the general form given in (6.45):
Z Z
G(u, δu1 ) = Dδu1 I[u] = [λ grad u grad δu1 − S δu1 ] dx − Q̂ δu1 dx
Ω ∂ΩN
Z (K.5)
⇒ Dδu1 G(u, δ2 ) = λ grad δu2 grad δu1 dx = Dδu2 G(u, δu1 )
Ω
In simple terms (and not most generally), Vainberg’s theorem holds if the potential obeys
symmetry. This in turn implies that the governing PDE contains derivatives of even order (such
as linear momentum balance which is second-order in both spatial and temporal derivatives, or
the equilibrium equations of beams which are fourth-order in space and second-order in time). If
the PDEs are of odd order (such as, e.g., the time-dependent diffusion or heat equation), then no
potential I exists, in principle – there are work-arounds using so-called effective potentials, which
gain importance especially for inelastic material models. Of course, knowing that a variational
structure exists is beneficial but it does not reveal anything about the actual solution u.
228
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
The strong form of the general mechanical problem is given by the (static) balance of linear
momentum along with Dirichlet and Neumann boundary conditions:
σij,j + ρ bi = 0 in Ω,
ui = ûi on ∂ΩD , (L.1)
σij nj = t̂ on ∂ΩN
In the special case of linear elasticity (using σij = Cijkl εkl = Cijkl uk,l ), the above strong form
reduces to
From this we see that classical solutions must satisfy u ∈ C 2 (Ω). Note further that we in-
deed re-encounter the general structure of the strong form from (8.1), here extended to higher
dimensions.
In the following, let us first treat the general case – based on (L.1) – and then study linear
elasticity – governed by (L.2) – as a special case. The total potential energy functional associated
with (L.1) is
Z Z Z
I[u] = W (ε) dV − ρb · u dV + t̂ · u dS (L.3)
Ω Ω ∂ΩN
| {z } | {z }
internal stored energy work by external forces
For the example of linear elasticity, we know that the strain energy density takes the form
1 1
W (ε) = εij Cijkl εkl = ui,j Cijkl uk,l , (L.5)
2 2
from which we conclude that the variational problem seeks solutions u ∈ U ⊂ H 1 (Ω). For
other constitutive laws, we may not have the above form of the energy density, yet W = W (ε)
holds more generally (unless when considering rather exotic strain-gradient models), so that we
generally seek u ∈ U ⊂ H 1 (Ω).
where we used σij = ∂W/∂εij and σij = σji (by angular momentum balance). This form is
indeed equivalent to the principle of virtual work (8.21), if we replace δui by u∗i .
229
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Application of the divergence theorem to the first term in (L.6) proves the equivalence the
strong and weak forms, since
Z Z
δI[u] = 0 = (σij nj − t̂i )δui dS − (σij,j + ρbi )δui dV ∀ δu ∈ U0 . (L.7)
∂ΩN Ω
must hold for all (admissible) variations δu ∈ U0 , so that the two terms in parentheses must
vanish. This indeed leads to the strong form (L.1).
From inspecting the first variation in (L.6), we may define the weak form as
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.
σij = Cijkl εkl = Cijkl uk,l ⇒ σij vi,j = Cijkl uk,l vi,j = Cijkl ui,j vk,l . (L.10)
Next, we introduce the discrete weak form G[uh , v h ] = A(uh , v h ) − L(v h ) = 0 with the Bubnov-
Galerkin approximation
n
X n
X
h a a h
u (x) = u N (x) and v (x) = v a N a (x). (L.12)
a=1 a=1
which is equivalent to
230
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Note that (L.14) is not a linear system of equations (as discussed in many sections before), since
we assumed a general constitutive law.
For the special case of linear elasticity the weak form did involve a bilinear operator B.
Therefore, inserting (L.10) into (L.15) leads to
Z n Z
X n
X Z
a h a b b a b
Fint,i = Cijkl uk,l N,j dV = Cijkl uk N,l N,j dV = uk Cijkl N,ja N,lb dV
Ω b=1 Ω b=1 Ω
n Z (L.16)
X
ab b ab
= Kik uk with Kik = Cijkl N,ja N,lb dV,
b=1 Ω
so that we indeed arrive at a linear problem to be solved for the unknown coefficients U h =
{u1 , . . . , un }:
As before, matrix K ∈ Rd·n×d·n , which is also known as the stiffness matrix is by definition
symmetric and positive-semi-definite, as long as the elastic modulus tensor C is strongly elliptic
(i.e., for stable elastic moduli).
Notice that vectors U h ∈ Rd·n and F ∈ Rd·n in 3D are, respectively, composed of the following
components:
1 1
u1 F1
u12 F21
1 1 1 1
u u3 F F3
h
[U ] = . . . = . . . ,
[F ] = . . . =
. . . .
(L.18)
u n u n F n F n
1 1
un F n
2 2
un3 F3n
When using 1-indexing as in the above vectors (which is common, e.g., in Matlab where vector
components start with index 1), we have a = 1, . . . , n and i = 1, . . . , d in d dimensions. This
implies that
Similarly, we apply the same rule to the rows and columns of matrix K, so that
ab
Kik is the component at (d · (a − 1) + i, d · (b − 1) + k) of matrix K in d dimensions. (L.20)
If, by contrast, we use 0-indexing (as, e.g., in Python, where vector components start with
index 0), we have a = 0, . . . , n − 1 and i = 0, . . . , d − 1 in d dimensions, so that
Similarly, we apply the same rule to the rows and columns of matrix K, so that
ab
Kik is the component at (d · a + i, d · b + k) of matrix K in d dimensions. (L.22)
Note that we now use super- and subscripts on K and F , since our unknown coefficients are
vector-valued here. A super script a refers to the a-th coefficient, while a subscript i refers to
the i-th component of the coefficient. Remember how we said in Section D.4 that this would
become important later? Here it does!
231
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
N i , N j = δij (M.1)
with a suitable inner product of U (see the discussion of function spaces in Appendix F). Note
that any non-orthonormal basis can be orthonormalized.
Given such a countably infinite basis, it is possible to approximate any function u to within a
given tolerance, e.g.,
∞
X
u= ua N a ⇔ given any ϵ > 0 ∃N ∈N and ua ∈ R
a=1
m
(M.2)
X
a a
s. t. u− u N < ϵ for all m > N.
a=1
232
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
converges.
pn (x) ∈ P∞ such that |f (x) − pn (x)| < ϵ for all x ∈ [a, b]. (M.7)
233
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
N Gauss quadrature
A systematic way to derive Gaussian quadrature rules involves the use of Legendre polynomials.
We here give a brief overview.
We start by noticing that monomials {1, ξ, ξ 2 , ξ 3 , . . .}, although complete, are not orthogonal
basis functions. We can turn them into orthogonal polynomials Pn (ξ) by, e.g., the Gram-
Schmidt orthogonalization procedure. To this end, let us start with
P0 (ξ) = 1 (N.1)
and obtain the next basis function by starting with the linear monomial ξ and computing
⟨1, ξ⟩
P1 (ξ) = ξ − 1 = ξ, (N.2)
⟨1, 1⟩
where we used the inner product
Z 1
⟨u, v⟩ = u(ξ)v(ξ) dξ. (N.3)
−1
⟨ξ, ξ 2 ⟩ ⟨1, ξ 2 ⟩ 1
P2 (ξ) = ξ 2 − ξ− 1 = ξ2 − . (N.4)
⟨ξ, ξ⟩ ⟨1, 1⟩ 3
Analogously, one finds
3
P3 (ξ) = ξ 3 − ξ. (N.5)
5
By continuing in the same fashion, we create a countably infinite set of orthogonal basis functions
Pn (ξ) such that
Z 1
Pn (ξ)Pm (ξ) dξ = 0 if n ̸= m. (N.6)
−1
These polynomials are known as Legendre polynomials. Note that they are defined only up to
a constant, so one can renormalize them, which is commonly done by enforcing that Pn (1) = 1
for all n. The result are the well known Legendre polynomials, which can alternatively be
defined as
1 dn 2 n
Pn (ξ) = (ξ − 1) (N.7)
2n n! dξ n
These polynomials have another interesting feature, viz. by orthogonality with P0 (ξ) = 1 we
know that
Z 1 (
2, if n = 0,
Pn (ξ) dξ = ⟨1, Pn ⟩ = (N.8)
−1 0, else.
Pn (ξ) has exactly n roots in the interval [−1, 1]. Also, for n ̸= 0 we know that
234
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
With this new set of basis functions, we can define the Gauss-Legendre quadrature rule to
enforce
Z 1 nQP −1
!
X
Pk (ξ) dξ = Wi Pk (ξi ), k = 0, 1, . . . , 2nQP − 1. (N.10)
−1 i=0
If nQP = 1, then the solution is simple because the above equations simplify to
Therefore, the weight is, as before, W0 = 2 and the quadrature point is the root of P1 (ξ), viz.
ξ0 = 0.
W0 = W1 = 1. (N.14)
Further, note that Pn (0) = 0 for odd n. Therefore, the same procedure can be continued as
follows. For an arbitrary number of quadrature points, nQP , the Gauss-Legendre quadrature
points and associated weights are defined by
2
PnQP (ξi ) = 0, wi = i = 0, . . . , nQP − 1. (N.15)
(1 − ξi2 )[Pn′ QP (ξi )]2
As a check, take, e.g., nQP = 1 so that P1 (ξ) = ξ with root ξ0 = 0. The weight is computed as
2
w0 = = 2, (N.16)
(1 − ξ02 )[Pn′ QP (ξ)]2
as determined above. Similarly, for nQP = 2 we have P2 (ξ) = 21 (3ξ 2 − 1) with the above roots
√
of ±1/ 3. The associated weights are computed as
2 2 2
w0 = = = 2 32 = 1 = w1 , (N.17)
(1 − ξ02 )[P2′ (ξ0 )]2 (1 − ξ02 )[3ξ0 ]2 3 3
235
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
Z 1 nQP −1
X
f (ξ) dξ − Wk f (ξk ) ≤ Ch2nQP max f (2nQP ) (ξ) (O.1)
−1 ξ∈[−1,1]
k=0
with a constant C > 0. This shows that, as can be expected, the quadrature error decreases with
decreasing mesh size h and with increasing smoothness of function f . The rate of convergence
under h-refinement also depends on the smoothness of the function.
The exact error depends on the chosen quadrature rule. For example, for Gauss-Legendre
quadrature an error estimate is given by
236
Index
L2 -norm, 216 body force, 142
h-refinement, 87 boundary, 214
hp-refinement, 87 boundary conditions, 20
n-dimensional space, 79 boundary operators, 199
p-refinement, 87 brick element, 132
r-refinement, 87 Bubnov-Galerkin approximation, 79
(proper) subset, 214
2-node Euler-Bernoulli beam element, 102 central difference, 28, 29
2-node Timoshenko beam element, 106 CFL condition, 35, 36
2-node bar element, 89 CFL number, 36
4-node bilinear quadrilateral, 126 characteristic equation, 167
4-node tetrahedron, 123 chicken-wire mode, 152
8-node quadratic quadrilateral, 131 class C k (Ω), 73, 215
9-node quadratic quadrilateral, 131 classical solution, 67, 73
closure, 217
acceleration field, 9 collocation method, 207
action, 161 collocation points, 207
action principle, 162 commercial codes, 195
adaptive mesh refinement, 191 complete polynomial, 224
advection equation, 38, 199 complete space, 217
amplitude, 170 complete up to order q, 83
approximation error, 190 completeness property, 83
area moment of inertia, 96 condensation, 148
assembly, 47, 48, 52, 202 condition number, 189
assembly operator, 114 conditionally stable, 40, 41
augmented finite elements, 196 conductivity matrix, 187
average acceleration, 176 conjugate gradient, 158
average acceleration method, 175 consistency, 29
consistent mass matrix, 163
B-matrix, 90, 111 constant strain tetrahedron, 123
backward-Euler, 29 constant strain triangle, 122
balance of energy, 18 constitutive relation, 12
local, 19 continuous at a point x, 215
balance of linear momentum, 15 continuous over Ω, 215
local form, 16 convergence, 29, 154, 217
Banach space, 217 Courant number, 36
bar element, 46 Courant-Friedrichs-Levy, 35
barycentric coordinates, 121 Courant-Friedrichs-Levy (CFL) condition, 36
basis, 82 CST, 122, 123
basis functions, 206 cubature rules, 134
bending, 95
bending moment, 96 damage and failure, 197
Bessel’s inequality, 232 damped Newton-Raphson method, 156
bijective, 214 damping matrix, 170
bilinear form, 67 deflection, 95
bilinear operator, 226 deformation, 9
body, 9 deformation gradient, 183
237
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
238
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
239
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
240
Introduction to Finite Element Analysis Prof. Dr. Dennis M. Kochmann
Spring 2025 (version February 14, 2025) ETH Zurich
UEL, 195
UMAT, 195
unconditionally stable, 38, 41
unconditionally unstable, 41
under-integration, 141
undistorted, 130, 140
units, 189
update rule, 31
updated-Lagrangian, 196
V&V, 24
Vainberg’s theorem, 228
validation, 24
variation, 62
variational calculus, 59
variational structure, 66
velocity field, 9
241