Intro To FEA Notes Zurich
Intro To FEA Notes Zurich
Introduction to FEA
(Spring 2023)
These lecture notes cover the concepts and examples discussed during lectures.
They are not a complete textbook, but they do provide a thorough introduction to all course
topics as well as some extra background reading, extended explanations, and examples beyond
what can be discussed in class.
Especially in times of covid-19, you are strongly recommended to visit the (virtual or
in-person) lectures and to take your own notes, while studying these lecture notes alongside
for support and further reading. The exercise sessions will help deepen the acquired
knowledge and, in particular, apply the concepts through coding projects.
The lecture topics covered during each week are announced at the beginning of the semester in
the course syllabus, so you are welcome to read up on the relevant topics ahead of time.
2
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Contents
0 Preface 7
2 Computational Methods 18
2.1 Why do we need computational methods? . . . . . . . . . . . . . . . . . . . . . . 18
2.2 Dimensionless Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6 Variational Calculus 49
6.1 Direct vs. indirect methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.2 Variational calculus: an introductory example . . . . . . . . . . . . . . . . . . . . 49
6.3 Functionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.4 Variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.5 A General Variational Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6.6 Rayleigh-Ritz Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
10 Interpolation spaces 81
10.1 Shape functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
10.2 Approximation power and completeness . . . . . . . . . . . . . . . . . . . . . . . 82
10.3 Completeness in higher dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . 83
4
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
20 Assembly 128
23 Dynamics 144
24 Vibrations 149
24.1 Free, undamped vibrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
24.2 Forced vibrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
24.3 Modal decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
24.4 Structural damping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
26 Extensions 165
26.1 Finite kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
26.2 Thermal problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
5
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Appendices 180
E Operators 193
Index 204
6
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
0 Preface
Finite Element Analysis (FEA) has become a ubiquitous tool used by engineers and scientists
across all disciplines. Whether it is commercial software like Abaqus® , Ansys® and LS-Dyna®
or open-source libraries such as FEniCS or FEAP – FEA tools are available in many different
flavors and have become an essential ingredient for the solution of (among others) mechanical,
thermal, and multi-physics initial boundary value problems.
The availability and ease of use of FEA codes comes with a risk though: the ability to produce
colorful plots by the push of a button does not obviate the user’s expert knowledge in deploy-
ing FEA tools properly and responsibly (ultimately, lives could be endangered and significant
economic losses incurred, if engineering design is flawed). What element types to use, what
quadrature rules to use, what stress components to plot, how to interpolate or extrapolate and
how to present results: these are questions to be answered by the FEA user, and they require
a fundamental knowledge of what the black box called FEA does for us.
To turn the black box into a versatile and understandable toolbox, this course discusses the
fundamentals of numerical methods and, in particular, the finite element method. Rather
than studying and using commercial software packages, we study FEA from the basics and
with the goal of understanding the theoretical underpinning as well as the details of numerical
implementations. This, of course, requires us to present the underlying mathematical and
mechanical theories and to discuss the wide variety of finite element types and choices to be
made when using FEA.
To follow the course contents, it is assumed that you have a background in solid and structural
mechanics (equivalent to Mechanics 1 (Statics & Kinematics), Mechanics 2 (Mechanics of Mate-
rials), and Dynamics at ETH Zürich) as well as basic knowledge in analysis and linear algebra.
We will begin with a brief review of continuum mechanics and an introduction to the notation
used in this course, after which we will dive into the discussion of numerical methods.
I apologize in advance for any typos that may have found their way into these lecture notes.
This is a truly evolving set of notes, which was started in the spring semester of 2019 and has
evolved significantly over time. Note that this set of notes is not meant as a complete textbook
and you are encouraged to take notes during lectures. Though I made great effort to ensure
these notes are free of essential typos or errors, I cannot rule out that some have remained. If
you spot any mistakes, feel free to send me a highlighted PDF at the end of the semester, so I
can make sure those issues are corrected for the future.
I hope you will find the course interesting and these notes supportive while studying Computa-
tional Mechanics I – Intro to FEA.
Dennis M. Kochmann
Zürich, February 2023
7
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
We will introduce and discuss numerical methods for solving physical problems such as me-
chanical, thermal, and related initial boundary value problems. To this end, we will begin by
reviewing the basics of continuum mechanics and use this review to also introduce the notation
used throughout the remainder of the course. We describe the deformation and motion of rigid
and deformable bodies as well as their thermodynamics. Let us begin with the mathematical
framework to describe the motion and deformation of bodies (which we call the kinematics),
followed by the connection between deformation and motion, on the one hand, and those forces
and stresses responsible for the latter, on the other hand (these thermodynamic balance laws
are referred to as the kinetics). Of course, this brief introduction cannot replace a thorough
introduction to the mechanics and thermodynamics of solids (which is assumed to have hap-
pened in other classes1 ), so that we here only review the basic principles as needed for later
discussions.
1.1 Kinematics
Every point in space has a position x, which we describe in d dimensions using a Cartesian
coordinate system with basis {x1 , . . . , xd } and origin O. Points are described by vectors with
respect to O, which in turn are defined by components in the Cartesian reference frame with
basis {e1 , . . . , ed }. Therefore, we write
d
X
x= xi ei = xi ei . (1.1)
i=1
Here and in the following, we use Einstein’s summation convention, which implies that any
index appearing twice in a product must be summed over (here, e.g., we drop the explicit
summation in the above equation and simply write xi ei , knowing that we must sum over i from
1 to d). For a thorough review of index notation, see the Tensor Notes available online. Note
that the summed index (i in the above example) is called a dummy index and can be replaced
by any other index.
and δij is known as Kronecker delta. Likewise, the norm of a vector is defined as
√ √
∥u∥ = u · u = ui ui . (1.4)
Note that an index appearing only once in a term is a free index, which is not to be summed
(the number of free indices reveals the type of quantity). For example, ui are the components
1
See, e.g., the online lecture notes for Dynamics for a review of the kinetic balance laws, the description of
motion of rigid and deformable bodies as well as wave motion in elastic solids.
8
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
of a vector u (no summation). ∂ui /∂xi is a scalar (the divergence of vector field u). ui vj are
the components of a second-order tensor u ⊗ v, as we will see further below.
We describe a body as a collection of material points
in space. In mechanical problems, a body usually has
a reference configuration, which describes the initial,
undeformed configuration of the body and which we call
Ω. In the following, we often speak of the body Ω. The
boundary of body Ω is denoted by ∂Ω. For example, in
three dimensions, ∂Ω is the surface of body Ω. u+
+
The deformation and motion of a body Ω is described by
the displacement field x2 y
x
e2
u = u(x, t), (1.5) e3 x1 W
e1 ¶W
which to every undeformed point x ∈ Ω in the reference x3
configuration maps a unique deformed location y ∈ Rd ,
such that the corresponding deformed point (as shown above) is at position
y(x, t) = x + u(x, t). (1.6)
From the above displacement field, we may derive kinematic variables such as the velocity
field
d
v(x, t) = u(x, t) (1.7)
dt
and the acceleration field
d d2
a(x, t) = v(x, t) = 2 u(x, t), (1.8)
dt dt
which describe the motion of point x over time. For convenience, we also use dots to denote
derivatives with respect to time, so that v = u̇ and a = v̇ = ü.
The deformation of a body is best described not by the displacement field (which would also
include rigid body motion) but by the strain tensor ε, which is a second-order tensor defined
as
1h i
ε= grad u + (grad u)T (1.9)
2
with Cartesian components
1 ∂ui ∂uj 1
εij = + = (ui,j + uj,i ) . (1.10)
2 ∂xj ∂xi 2
We here used index notation again and, specifically, the gradient of a vector field, which is
a second-order tensor with components
∂ui
[grad u]ij = = ui,j . (1.11)
∂xj
A comma in an index implies differentiation with respect to those x-coordinate(s) following the
comma. For example, f,i = ∂f /∂xi and ui,j = ∂ui /∂xj as well as f,jk = ∂ 2 f /∂xj ∂xk .
From undergraduate mechanics we know that the diagonal components ε11 , ε22 and ε33 are
the nominal strains along the three coordinate directions of an infinitesimal cube (implying
extension or shrinkage). The off-diagonal components εij with i ̸= j, by contrast, represent
shear strains (implying angle changes). By definition εij = εji or ε = εT , i.e., the strain
tensor is symmetric.
9
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
x2
In order to deform a body Ω, forces (or displacements) must be
t2 s22
applied. Consider again an infinitesimal cube with (infinitesimal)
force vectors dFi applied to each surface dAi normal to the xi -axis s32 s12
s21
(positive in the +xi -direction, negative in the −xi -direction). We -t1 s23
define the components of the stress tensor σ as s11
s13 s31 x1
dFi s33 t1
σij = . (1.12)
dAj x3 t3
Analogous to the strains, components σ11 , σ22 and σ33 represent nominal stresses (resulting
in extension or compression of the cube along its axes), while components σij (with i ̸= j) imply
shear stresses acting parallel to the surface that it is acting on. The complete (infinitesimal)
force vector (also known as the traction vector) acting on a surface with normal n is given by
σ1i
t(n) = σn ⇒ [t(ei )] = [ti ] = σ2i ,
(1.13)
σ3i
i.e., the ith column of σ is the traction vector on a surface normal to ei . Here and in the
following, we use brackets to indicate vector (or tensor) components in the Cartesian frame.
Note that by angular momentum balance on the cube (and in close analogy to the strain tensor),
we must have σ = σ T (i.e., σ is symmetric).
The kinetics describe the link between the deformation of a body and the causes of that
deformation (i.e., the forces and stresses). Stresses and strains are linked by constitutive
relations that depend on the material of which body Ω is made. The simplest material model
is linear elasticity, for which stresses and strains are linearly linked via the linear relation
with a fourth-order elasticity tensor, whose component Cijkl describes the linear dependence
of the stress component σij on the strain component εkl . In principle, C has d4 entries; yet,
the symmetry of both the stress and strain tensors as well as any existing material symmetries
reduce the number of independent material parameters required to describe C. For the simplest
case of isotropy (i.e., the material behavior is the same in every direction), C can be described
by only two constants, e.g., Young’s modulus E and Poission’s ratio ν, or the Lamé moduli λ
and µ (µ being the shear modulus).
As a convenient alternative to defining the constitutive relation as a link between stresses and
strains, we can encode the constitutive response in a strain energy density W = W (ε),
which, e.g., for the case of linear elasticity reads
1 1
W = ε · Cε ⇔ W = εij Cijkl εkl (1.15)
2 2
The stresses follow from differentiation:
∂W ∂σij ∂2W
σij = , Cijkl = = . (1.16)
∂εij ∂εkl ∂εij ∂εkl
Note that the last identity shows that Cijkl = Cklij has so-called major symmetry. In addition,
since εij = εji and σij = σji for our purposes, we know that Cijkl = Cjikl = Cijlk = Cjilk ,
10
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
which is known as minor symmetry. Tensor (and vector) derivatives of the above type are to be
understood component-wise; i.e., differentiating W with respect to each component of ε yields
nine values, which are the components of σ (for details and a proper tensorial definition see the
Tensor Notes available online).
Roughly speaking, the above concept of a strain energy density is analogous to the energy stored
in an elastic spring (W = 21 kx2 ), whose force is obtained from differentiation (F = ∂W/∂x = kx)
as well as its stiffness (k = ∂ 2 W/∂x2 ). Here, the energy is the elastic energy stored inside the
elastic body, the analog of the spring force is the stress, and the stiffness becomes the stiffness
tensor (since we are not relating two scalars, force and extension, but two tensors, stresses and
strains, the stiffness must be expressed as a fourth-order tensor).
In order to solve any mechanical problem, we need governing equations that describe how
stresses and strains vary over time and space. These are given by the conservation or balance
laws. First, we consider the balance of linear momentum which, for a macroscopic body Ω
states that
X
Fi = maCM . (1.17)
i
That is, the sum of all forces applied externally to a body Ω equals the total mass m of the
body times the acceleration of its center of mass, aCM . This product is the change of linear
momentum, assuming that the total mass m remains constant. Let us now consider a body Ω
as a deformable object, for which we can write the above balance law using integrals over Ω
and ∂Ω. Specifically, (1.17) is equivalent to
Z Z Z
σn dS + ρb dV = ρa dV , (1.18)
∂Ω Ω Ω
where the first term represents all external forces applied to the boundary ∂Ω of the body
through tractions t = σn, the second term denotes external forces in the form of distributed
body forces acting across the volume (such as gravity for which b = g), and the right-hand
side stems from applying the definition of the center of mass and its acceleration (assuming a
constant mass density ρ and constant total mass m):
R
d2 d2 Ω ρu dV d2 u
Z Z
1 1
aCM = 2 uCM = 2 R = ρ dV = ρa dV . (1.19)
dt dt Ω ρ dV m Ω dt2 m Ω
which, by the way, defines the divergence of a tensor as a vector with components
Inserting (1.20) into (1.18) and bringing all volume integrals onto the same side of the equation
leads to
Z
(div σ + ρb − ρa) dV = 0. (1.22)
Ω
This relation must hold not only for the whole body Ω but also for any sub-body cut free from
Ω (as discussed when talking about free-body diagrams and inner forces in Mechanics 2 and in
11
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Section 5.2 of Dynamics). For the above integral to vanish for any arbitrary subset of Ω, we
must ultimately require that the integrand vanishes pointwise, i.e.,
The only non-zero strain component is the axial strain εxx (x, t) = ε(x, t) = u,x (x, t) and the
only non-zero stress is the axial stress σxx (x, t) = σ(x, t), which for linear elasticity obeys
σ(x, t) = E(x)ε(x, t) with Young’s modulus E(x) that may vary with position x.
Inserting all of this into the local balance law of linear momentum (in the absence of body
forces) gives
ρ(x)a(x, t) = div σ(x, t) ⇒ ρ(x)ü(x, t) = σ(x, t) ,x = E(x)u,x (x, t) ,x . (1.24)
For the special case of a homogeneous rod having a constant density ρ(x) = ρ = const. and a
constant modulus E(x) = E = const., the above reduces to
s
E
ρü(x, t) = Eu,xx (x, t) ⇔ ü(x, t) = c2 u,xx (x, t) with c= (1.25)
ρ
This is the one-dimensional wave equation, governing the deformation and motion of the rod
in one dimension, and c is the longitudinal wave speed in the rod.
————
Example 1.2. Elastic rod hanging from the ceiling
equation, viz. linear momentum balance, is the same except that we must
include the body force due to gravity:
xi+1
ρ(x)a(x, t) = div σ(x, t) + ρ(x)g = E(x)u,x (x, t) ,x + ρ(x)g. (1.26)
xn
Here, we consider statics, so that we have ü(x, t) = 0 for all x ∈ Ω and we look for a time-
independent displacement field solution u(x). In addition, ρ and E are constant. Therefore,
(1.26) reduces to
ρg ρg 2
u,xx (x) = − ⇒ u(x) = − x + c1 x + c2 , (1.27)
E 2E
whose solution is obtained by integrating twice. The unknown integration constants c1 , c2 ∈ R
are to obtained from boundary conditions. Assuming that coordinate x runs downward, starting
12
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
from the ceiling, the rod’s fixed end at the celining implies that
u(0) = 0 ⇒ c2 = 0. (1.28)
The bottom end of the rod is free, which means that there can be no external force acting at
the bottom end:
ρg
F (L) = Aσ(L) = AEu,x (L) = 0 ⇒ c1 = L. (1.29)
E
Overall, this leads to the displacement field inside the rod as
ρg 2 ρg ρg
u(x) = − x + Lx = − x(x − 2L), (1.30)
2E E 2E
and it is a simple exercise to verify that is satisfies both boundary conditions. Note that, as a
consequence, the strain ε = u,x inside the rod is not constant along its length.
Finally, the extension of the rod under action of gravity is obtained from the displacement of
the bottom end of the rod, since the change of length ∆x is nothing but
ρgL2
∆x = u(L) = . (1.31)
2E
————
Example 1.3. Wave equation in higher dimensions
For the more general case of a body Ω undergoing linear elastic deformation over time, the
balance law of linear momentum (in the absence of body forces) reads
ρ(x)a(x, t) = div σ(x, t) ⇔ ρ(x)üi (x, t) = [Cijkl (x)uk,l (x, t)],j . (1.32)
For the special case of a uniform rod with a constant density ρ(x) = ρ = const. and constant
elastic modulus tensor C(x) = C = const., the above reduces to
This is sometimes referred to as the Navier equation, governing the deformation and motion
of a linear elastic body in higher dimensions. As before, for the special case of statics we have
ü(x, t) = 0 for all x ∈ Ω, so we must solve Cijkl (x)uk,jl (x) = 0.
————
The above principles and examples were of purely mechanical nature. When we consider the
wider field of problems arising in thermodynamics (such as thermal problems and heat con-
duction, which are often dealt with by finite elements), we need to include one more balance
law: the balance of energy (often also referred to as conservation of energy). It states that
the change of internal energy E inside a body Ω over time t balances the sum of (i) the energy
being produced inside the body by some heat source density s (e.g., through chemical reactions
or heating due to inelastic deformation processes), (ii) the outward flux q of heat across the
boundary ∂Ω of the body (e.g., through convection), and (iii) the mechanical power P provided
to the body by performing mechanical work (e.g., by applying forces that deform the body).
Mathematically, this is expressed as the balance law
Z Z
d
E= s dV − q · n dS + P. (1.34)
dt Ω ∂Ω
13
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
We can again invoke the divergence theorem to rewrite the heat flux term as
Z Z Z Z
q · n dS = qi ni dS = qi,i dS = div q dS, (1.35)
∂Ω ∂Ω Ω Ω
which, by the way, defines the divergence of a vector as the scalar quantity
Energy is an extensive variable (the total energy doubles when adding two bodies of the same
energy). This is in contrast to intensive variables, such as temperature or pressure (when
adding two bodies having the same temperature (or pressure), the added body has the same
temperature (or pressure) as the two individual bodies had previously). We can hence think
of extensive variables as quantities which, for a body Ω are evaluated by some volume integral
over the body. Since energy is an extensive variable, we may introduce an internal energy
density e and write
Z Z
d
E= e dV ⇒ E= ė dV . (1.37)
Ω dt Ω
Analogously, we realize that the mechanical work done on the body implies a change in the
strain energy density:
Z Z Z
d
P = σij ε̇ij dV = Ẇ dV = W dV. (1.38)
Ω Ω dt Ω
Since the balance of energy does not only have to hold for the whole body Ω but also for any
sub-body ω ⊂ Ω (as previously discussed for linear momentum balance), we may conclude that
the local balance of energy is
ė = Ẇ + s − div q. (1.41)
This is the local (i.e., pointwise) counterpart to the macroscopic energy balance (1.34) and
states that, at each point x ∈ Ω, the rate of energy change (ė) is given by the local production
of heat (ρs) plus the local mechanical power supplied (Ẇ ) minus the heat lost by outward fluxes
q away from the point.
Consider a purely thermal problem without mechanical energy (so Ẇ = 0). Thermally stored
energy is given by e = ρcv T with mass density ρ(x), the (constant) specific heat capacity cv (x),
and a generally unknown temperature field T = T (x, t). Let us assume that heat conduction
follows Fourier’s law, viz.
14
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
with a heat conductivity κ(x). By the way, the above also introduces the components of the
gradient of a scalar field as
∂T
[grad T ]i = T,i = . (1.43)
∂xi
The local energy balance equation (1.41) now has become
ρ(x)cv (x)Ṫ (x, t) = [κ(x)T,i (x, t)],i + s(x, t). (1.44)
For the special case of a homogeneous body with spatially constant material properties, this
reduces to the well-known heat equation (or the inhomogeneous Laplace equation):
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
————
• ∂ΩD ≡ the Dirichlet boundary, prescribing the primary field (e.g., u, T , etc.):
e.g. u(x, t) = û(x, t) on ∂ΩD or T (x, t) = T̂ (x, t) on ∂ΩD . (1.49)
On the Dirichlet boundary, the primary field is known (e.g., fixing the displacement u(0) =
0 in Example 1.2 of the bar hanging from the ceiling; or knowing the temperature T (x) on
some part of the boundary because it is in contact with a body of constant temperature).
15
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
• ∂Ω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
known (e.g., enforcing a zero force F (L) = EAu,x (L) = 0 in Example 1.2 at the bottom
end of the bar hanging from the ceiling; or knowing the heat flux across a boundary).
For most problems, the above differentiation is simple to make, so we can easily define ∂ΩD and
∂ΩN . Note that we may generally assume that
The latter equality implies that one cannot simultaneously impose a primary field and its
conjugate variable, and it holds strictly for problems with scalar primary fields (e.g., in thermal
problems). In mechanical problems one can consider scenarios in which, some displacement
components and some traction components are enforced at the same point (e.g., letting a body
slide frictionlessly on a rigid ground enforces zero displacements perpendicular to the ground
while having zero tractions parallel to the ground); in such cases there can be overlaps of ∂ΩD
and ∂ΩN . But one can never impose the same component of, e.g., displacements and forces on
a boundary (if one applies a displacement, then the force follows from the body’s constitutive
response and cannot be prescribed; if one applies a force, then the displacement follows naturally
– one cannot impose both). Note that we will discuss beams as a special case later (where
both deflections and rotations imply primary fields), but let us not get into this topic now.
In addition to the above boundary conditions, all time-dependent problems require initial
conditions, e.g.,
T (x, 0) = T0 (x) ∀ x ∈ Ω,
(1.52)
or u(x, 0) = u0 (x) and v(x, 0) = v0 (x) ∀ x ∈ Ω.
In a thermal problem, we may start from some known initial temperature distribution T0 (x),
whereas in a mechanical problem the body’s initial displacements u0 (x) and its initial velocity
field v0 (x) may be known.
The number of required BCs/ICs depends on the order of a PDE. For example,
is first-order in time and therefore requires one IC, e.g., T (x, 0) = T0 (x). It is second-order in
space and hence requires BCs along all ∂Ω (e.g., two conditions per xi coordinate). By contrast,
the mechanical problem governed by linear momentum balance (1.33) is second order in both
space and time, hence requiring two initial conditions (e.g., u(x, 0) = u0 (x) and v(x, 0) =
v0 (x)) and two boundary conditions per direction (hence BCs across the entire boundary ∂Ω).
In summary, we will have to solve the governing PDEs supplemented by appropriate ICs and
BCs, as required (quasistatic problems, of course, do not require any initial conditions). Those
systems of equations need to be solved for the primary fields (e.g., the temperature distribution
T or the displacements field u).
For notational brevity, we point out that any of the aforementioned PDEs can be written in
an operator form. By introducing a differential operator L, we may abbreviate, e.g., the 1D
16
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
wave equation as
∂ ∂
ü − c2 u,xx = 0 ⇔ L[u] = 0 with L= − c2 2 . (1.54)
∂t2 ∂x
One key feature of all PDEs discussed so far (including the heat and wave equations) is that
their operators are linear. A linear operator L is characterized by
For more information about operators and linear operators see Appendix E. In the following
we will need to be more specific about what we mean by all functions (since we may need to
classify admissible or useful classes of functions), but leave this for later, when we in fact need
these concepts. A few examples involving linear operators are summarized here:
∂ ∂
L[u] = 0 with L= 2
− c2 2 ⇔ ü = c2 u,xx . (1.56)
∂t ∂x
∂ ∂2
L[T ] = s with L = ρcv −κ 2 ⇔ ρcv Ṫ = κT,xx + s. (1.57)
∂t ∂x
• the 1D advection equation (or transport equation) (first order in space and time)
with a scalar flow speed v:
∂ ∂
L[u] = 0 with L= +v ⇔ u̇ + v u,x = 0. (1.58)
∂t ∂x
Similarly, boundary conditions can also be expressed by linear operators. For example, for we
may define boundary operators B as differential operators for
This concludes our mathematical detour into the governing equations of mechanical and ther-
modynamic (initial) boundary value problems. We have introduced those fields describing the
deformation, motion and thermodynamics of bodies in space, we have formulated the balance
equations governing their physical behavior, and we have supplemented those with initial and
boundary conditions, as needed to find a solution.
17
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
2 Computational Methods
Unfortunately, analytical solutions to (I)BVPs of the above type are hardly ever available –
except for relatively simple problems involving
For realistic geometries of arbitrarily shaped bodies or machine components, for realistic ma-
terials with complex material models going beyond linear elasticity, and/or for general ini-
tial/boundary conditions, one usually cannot find analytical solutions and hence requires nu-
merical techniques to obtain approximate solutions using computers.
We point out that computers have two main shortcomings that we need to address in the
following.
First, computers do not know any units – they deal with purely numerical values. Therefore,
any numerical technique must cope with the intrinsic units present in physical problems. This
is commonly done in one of two ways: either one defines a set of consistent standard units to be
used (e.g., only SI units) and tacitly implies that those units are being used throughout (this
is common practice in most commercial FEA codes), or one reduces the physical system to a
dimensionless problem. This is a more elegant way and will be discussed in Section 2.2.
Second, computers cannot deal with infinity – they can handle only finite values and finite-sized
arrays. For this reason, any numerical technique has the objective of turning an infinite-
dimensional problem into a finite-dimensional one2 . For example, the exact solution of
any of the above (I)BVPs lives within an inifinite-dimensional function space. In other words, we
do not know much about the sought function fields u(x, t) or T (x, t) a priori (except for possibly
some differentiability properties), so the problem is not to simply identify the coefficients of some
known type of polynomial but to find an arbitrary function. Numerical techniques reduce such
problems commonly to finite-dimensional ones. Let us consider a few examples:
• Any computer stores and operates rational numbers (in principle having infinite precision)
with a finite number of floating-point digits (defined by the machine precision limits).
• Instead of seeking a solution for the displacement field u(x, t) at every point x ∈ Ω and
for all times, we could set out to find solutions that are known only at certain discrete
points xi and possibly also at discrete time steps tα . This defines the concept of finite
2
This may not make a lot of sense to us now, but we will come back to this statement several times throughout
the course – whenever introducing new numerical techniques – and ascertain that their purpose is indeed to reduce
infinite-dimensional problems to finite-dimensional ones.
18
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
The general approach taken by computational mechanics includes the following steps:
3. from the numerical model to results: solving the numerical problem computation-
ally generally involves solution errors, which stem from round-off/floating-point errors,
iterative solution approaches, etc.
Ensuring that the obtained numerical results agree with the mathematical model (e.g., by
comparing the numerical solution to an analytical solution where available) is known as the
step of verification, while ensuring that the obtained results properly reflect reality (e.g.,
by comparing the numerical solution to experimental data) is the so-called validation step.
Verification and validation (often referred to as V&V) is an essential part of numerical modeling,
since the best numerical technique can lead to nonsensical results if it is not properly used, if
wrong material or geometric data are used, if inappropriate assumptions or simplifications are
being made, etc. It is the engineer’s job (our job) to make sure that any numerical model we use
is a suitable representation of physical reality – and to understand the intricacies of commonly
used numerical techniques is one of the objectives of this course.
Before we can talk about specific techniques, let us briefly introduce the concept of dimensionless
forms, which may prove helpful later.
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.
19
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
The governing equations are hence linear momentum balance with the two initial conditions:
∂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
Finally, we know from (2.5) that F (t)/(ku0 ) must be dimensionless, which allows us to introduce
a dimensionless force, depending on the dimensionless time as follows:
F t m
p
k
f (t) = (2.7)
ku0
Altogether, this leads to the dimensionless form of the original problem:
u,tt = −u + f t
(2.8)
u(0) = 1 and u,t (0) = 0.
Solving this problem leads to a dimensionless solution u(t), from which we obtain the real
solution u(t) by inserting the above definitions again.
We stress that the above dimensionless problem only depends on the ratio F/(ku0 ), and no
longer on mass m, stiffness k, initial displacement u0 , etc. This is a remarkable benefit of the
dimensionless form: it reduces the problem to a small set of independent parameters and finds
a dimensionless solution that applies to a wide range of parameters of the original problem
(which only enter when turning the dimensionless solution into a dimensional solution but are
not involved when solving the problem).
————
20
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
with some suitable boundary and initial conditions. To render the wave equation dimension-
less, we start by introducing a reference length L (e.g., the size of the body) and a reference
temperature T0 (e.g., the initial temperature of the body), which allows us to define
x ∂ 1 ∂ T
x= ⇒ = and T = . (2.10)
L ∂x L ∂x T0
This turns (2.9) into
T
T0 2 ∂ ∂
ρcv T0 T˙ = κ 2 ∇ T + s with ∇= ,..., . (2.11)
L ∂x1 ∂xd
Next, we may re-arrange the equation (by dividing by the factor in front of the Laplacian) into
ρcv T0 L2 ˙ 2 sL2
T =∇ T + . (2.12)
κT0 κT0
Obviously, the first term on the right-hand side is dimensionless, which implies that the remain-
ing two terms in the equation must be dimensionless, too. This allows us to make two more
definitions of dimensionless type, viz.
Note that in an analogous fashion the boundary and initial conditions can also be made dimen-
sionless in terms of the dimesionless variables. Dirichlet boundary conditions use the definition
of the dimensionless temperature directly, using T = T /T0 . Neumann boundary conditions of
the type q = −κ∇T = q̂ can be transformed according to
κT0 L
− ∇ T = q̂ ⇒ −∇ T = q̂ with q̂ = q̂. (2.15)
L κT0
————
Analogously, any other problem can be made dimensionless by introducing proper normaliza-
tions and rewriting the governing equations and any initial and/or boundary conditions. A more
general protocol for finding dimensionless definitions based on a given set of system parameters
is given by Buckingham’s Π-theorem, which we do not discuss here (but you are welcome to
look it up, if you are interested and have not heard about it).
In the following, we usually assume that any given problem is dimensionless (even though not
showing the normalization specifically) or that standard units are to be used, so that we do not
discuss the issue of units any further.
21
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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α ).
22
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
It is important to note that we must have the error of O(∆xn ) where n ≥ 1; otherwise, the
approximation does not converge as ∆x → 0. This requirement ensures the consistency
of a finite-difference approximation. If n < 1, then errors introduced by the finite-difference
approximation would grow with decreasing grid spacing, which is problematic and ensures no
convergence with grid refinement. In general, the error is controllable by the grid spacing ∆x,
so more accurate approximations can be obtained by decreasing the grid size.
Analogously, subtraction of (3.3) from (3.2) leads to the central difference approximation of
the first derivative in space (which is second-order accurate as well):
∂u ∂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 , tα−1 ) and (xj , tα+1 ). Note that no information from point (xj , tα ) is needed.
Of course, the same can be carried out for derivatives in time. Applying Taylor expansions
in the time domain and performing the same algebraic operations yields analogously, e.g.,
∂u ∂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
23
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
u u
Dx Dx
j-1 j j+1 j-1 j j+1
exact derivative forward-Euler approximation
u u
Dx Dx
j-1 j j+1 j-1 j j+1
backward-Euler approximation central-difference approximation
We point out that finite-difference approximations like the above can be extended in various
ways:
• By retaining more terms in the Taylor expansions and/or performing other subtrac-
tions/additions of Taylor expansions, one can arrive at higher-order approximations
of the first and second derivatives (involving more grid points) as well as approximations
for higher derivatives. The above presents only a small set of the simplest commonly
used stencils; see, e.g., the finite-difference tables on Wikipedia for various other approx-
imations up to high orders.
• Each of these schemes can be extended to higher dimensions by superimposing the above
approximations for each dimension. For example, if the Laplacian of a scalar function T
α = T (x , x , t), which leads to
is needed, we use a 3D grid (∆x1 , ∆x2 , t) and write Ti,j i j
∂2T ∂2T
∇2 T (xi , xj , tα ) = +
∂x21 ∂x22
(3.10)
uαi+1,j − 2uαi,j + uαi−1,j uαi,j+1 − 2uαi,j + uαi,j−1 2 2
= + + O(∆x1 , ∆x2 ).
(∆x1 )2 (∆x2 )2
Note that in higher dimensions one can also devise more complex approximations, which
do not simply follow from superposition in the different directions; but we will not discuss
those here.
• The extension to non-constant grid spacings ∆tα and ∆xi is possible but can become
cumbersome, since different types of approximations are needed in different grid points.
In order to numerically solve a PDE by finite differences, we choose suitable approximations for
all appearing derivatives appearing in the governing PDE. Let us demonstrate this procedure
by the following examples.
24
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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.)
25
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
If, e.g., the temperature is known at both ends by Dirichlet BCs, then T1α and Tnα are known at
all times and can be directly enforced without the need to calculate those from finite differences.
If Neumann BCs are to be imposed, then those involve derivatives of the temperature field, which
can – again – be approximated by finite differences (see Example 1.2).
Next, let us slightly modify the above approach and use the backward-Euler approximation
(instead of the forward-Euler approximation) in time. This leads to
Tjα − Tjα−1 α − 2T α + T α
Tj+1 j j−1
=k 2
+ r(xj , tα ) + O(∆t, ∆x2 ). (3.14)
∆t (∆x)
Notice that now the newest time appearing in the above finite-
difference scheme is tα , and both sides of the equation contain Dx
information at time tα . Such a time-dependent finite-difference
Dt
scheme, which has unknown degrees of freedom at the newest time a+1
on both sides of the equation, is called an implicit scheme. Implicit
a
schemes do not allow us to compute the new grid point values
independently, as in the explicit scheme above. This is illustrated a-1
by the stencil on the right, showing that one cannot compute any j -1 j j +1
single grid point value at time tα based on known information.
In fact, (3.14) presents a linear system of equations to be solved for Tjα for j = 1, . . . , n. To see
this, let us rewrite (3.14) as
k ∆t
α
−cTj+1 + (1 + 2c)Tjα − cTj−1
α
≈ ∆t r(xj , tα ) + Tjα−1 with c= . (3.15)
(∆x)2
For a discretization containing n grid spatial points, the solution is hence obtained from solving
α + T α−1
α
.. T ∆t r1
.
1 1
.. ..
.. . .
.
.. ..
−c 1 + 2c −c . .
α−1
α α
−c 1 + 2c −c T j
= ∆t rj + Tj (3.16)
−c 1 + 2c −c . ..
..
.
..
.
.
. .
.
.
.
.. α α α−1
. Tn ∆t rn + Tn
Such a system of equations to be solved is typical for implicit schemes. We cannot directly
update each grid point but must solve for the solution at all grid points j = 1, . . . , n at the
new time simultaneously by solving the (linear) system of equations. Note that this is com-
putationally considerably more expensive than updating all grid points independently and in
parallel.
Further, suitable boundary conditions must be supplied. For example, if we have the essential
boundary condition Tjα = T̂j (tα ), we may replace the equation for Tjα in the above system
(i.e., the jth row in (3.16)) by Tjα = T̂j (tα ). By contrast, if we have a Neumann boundary
condition T,x (xj , tα ) = qj (tα ), then we need to introduce a finite-difference stencil to approx-
imate T,x (xj , tα ) and again replace the respective equation in the above system. This will be
demonstrated in Example 3.2.
————
26
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
+
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 ax-
ial x-coordinate (running downward from the top of the
beam, as shown on the right). Gravity acts downward.
xn
In this case, the governing equation is linear momentum balance (see Example 1.2), viz.
ρg
div σ(x) + ρg = 0 ⇒ u,xx = − . (3.17)
E
Boundary conditions are (assuming a free end at x = L)
As shown in Example 1.2, the analytical solution is found by integrating (3.17) twice with
respect to x and imposing the boundary conditions, which yields
ρg
u(x) = (2L − x)x. (3.19)
2E
To find an approximate numerical solution, let us discretize the bar into n + 1 segments of equal
lengths ∆x = L/(n + 1), as shown above. Consequently, the (n + 1) grid points are located at
xj = jn for j = 0, . . . , n. The governing PDE (3.17) is of second order in space, so we may use
a central-difference approximation for the second derivative with respect to x, leading to the
discrete version of linear momentum balance:
uj+1 − 2uj + uj−1 ρg
2
+ O(∆x2 ) = − , (3.20)
(∆x) E
u0 = 0. (3.22)
The free bottom end of the beam requires imposing the derivative at that grid point. To this
end, we introduced a ghost node at xn+1 = xn + ∆x (which is outside the bar) to enforce the
free traction boundary condition, e.g., via a first-order forward-Euler approximation:
un+1 − un
=0 ⇔ un = un+1 . (3.23)
∆x
This completes the finite-difference formulation: central-difference stencil (3.21) is applied to
all interior nodes j = 1, . . . , n, while nodes 0 and n + 1 are updated by the boundary conditions
u0 = 0 and un+1 = un , respectively.
27
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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.
28
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
So far, we have derived finite difference approximations for derivatives in space and time, and we
have discussed the explicit and implicit finite-difference schemes resulting from applying those
approximations to PDEs. We still need to discuss the suitability of particular combinations
of finite-difference combinations in space and time for a particular PDE. Unfortunately, not
every choice of finite-difference approximations is a good one, as some schemes are known
to become unstable and produce nonsensical results (as we will see below). This raises the
question of finite-difference stability, which is classically associated with two concepts we
need to discus:
• 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.
29
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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) condition3 now states that convergence, and thus
stability, requires that the mathematical domain of dependence is contained within the numerical
domain of dependence. In other words, to give the numerical scheme a chance to converge to the
correct solution, it must have sufficient information to find the correct solution; this is only the
case of the numerical domain of dependence (which affects the solution at future times) includes
the mathematical domain of dependence (which affects the analytical solution at future times).
For the above example of the 1D wave equation, this implies that the fan of the mathematical
domain of dependence must be enclosed by the fan of the numerical domain of dependence,
which – by comparing the slopes of the bounding lines – is equivalent to requiring that
∆x ∆x c ∆t c ∆t
− ≤c≤ ⇔ −1≤ ≤1 ⇔ ≤ 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.
3
The CFL condition is named after mathematicians Richard Courant, Kurt Friedrichs, and Hans Lewy, who
introduced it in a seminal paper in 1928.
30
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
uα+1
j − 2uαj + ujα−1 uαj+1 − 2uαj + uαj−1
= c2 . (4.8)
(∆t)2 (∆x)2
Loosely speaking, stability requires that small errors in the numerical solution uαj (which always
exist due to round-off errors and machine precision) remain bounded and do not grow over time,
when the finite-difference scheme is applied time and time again in an iterative fashion. The
latter would imply instability and result in exponential growth of numerical noise over time.
Let us assume √that there is a small perturbation to the solution, which at some time tα we
write, with i = −1, as
α −kx)
u(x, tα ) = ûei(ωt , (4.9)
which is of harmonic type. When applied to our finite-difference grid with uniform spacings ∆t
and ∆x, the above yields the grid point values at time tα as
α −kx )
uαj = ûei(ωt j
= ei(ωα ∆t−j ∆x k) . (4.10)
Note that any general noise function can always be decomposed into a Fourier series. Therefore,
if we can show that the above function does not grow over time for arbitrary choices of ω and
k, then any perturbation of the solution should remain stable over time. By contrast, if there
are some values of ω and k, for which we observe exponential growth of this noise, we conclude
instability. As we are dealing with linear ODEs and PDEs in this class, we may set û = 1
without loss of generality (the amplitude does not affect the growth or decay).
Classical von Neumann analysis makes a simplification by defining z = eiω∆t , which turns
(4.10) into
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
Insertion of (4.11) into the finite-difference approximated wave equation (4.8) yields
c2 (∆t)2 α −i(j+1)∆x k
z α+1 − 2z α + z α−1 e−ijk∆x = −ijk∆x −i(j−1)∆x k
z e − 2e + e . (4.13)
(∆x)2
4
This method was originally developed at Los Alamos National Laboratory based on 1947 work by John Crank
and Phyllis Nicolson. However, it is named after John von Neumann, who more rigorously studied the concepts
in 1950.
31
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Dividing by z α e−ijk∆x and noting that e−i ∆x k + e+i ∆x k = 2 cos(k ∆x) leads to
c2 (∆t)2 h −i ∆x k i
z − 2 + z −1 = e − 2 + e +i ∆x k
= 2σ 2 [cos(k ∆x) − 1] (4.14)
(∆x)2
with
∆t
σ=c . (4.15)
∆x
Multiplying by z turns (4.14) into a quadratic equation in z,
z 2 − 2 1 + σ 2 [cos(k ∆x) − 1] z + 1 = 0,
(4.16)
whose solution is
q
z = 1 + σ [cos(k ∆x) − 1] ± (1 + σ 2 [cos(k ∆x) − 1])2 − 1
2
p (4.17)
= 1 + σ 2 [cos(k ∆x) − 1] ± |σ| [cos(k ∆x) − 1] (2 + σ 2 [cos(k ∆x) − 1]).
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.
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.21)
Recall that for stability we need to have ∥z∥ ≤ 1 for all possible choices of k ∆x. Now, take,
e.g., the special case cos(k∆x) = −1, for which we conclude
p p
∥z∥± = 1 + σ 2 [−1 − 1] ± |σ| [−1 − 1] (2 + σ 2 [−1 − 1]) = 1 − 2σ 2 ± 2|σ| σ 2 − 1 . (4.22)
32
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
This means that, for any possible choice of a disturbance of wavelength k, that disturbance
will not grow over time but remain bounded if |σ| ≤ 1, which implies stability. If, by contrast,
|σ| > 1, there are are certain disturbances that will grow exponentially over time, hence implying
instability.
Recall the definition of σ in (4.15), which allows us to formulate the condition for stability as
∆t
|σ| ≤ 1 ⇔ −1≤c ≤ 1. (4.24)
∆x
Since stability hinges upon this condition (and ∆x and ∆t cannot be chosen arbitrarily), we
say the scheme is conditionally stable. Note that the above condition agress with the CFL
condition for the wave equation (cf. Eq. 4.6), so that in this case CFL and von Neumann anlaysis
yield the same stability condition.
The above example illustrates the general procedure used for von Neumann analysis:
1. Insert ansatz (4.11) into the finite-difference scheme.
2. Simplify as much as possible, e.g., dividing by z α eijk∆x to remove all common terms.
3. Solve for z.
If ∥z∥ ≤ 1 for all possible choices of ∆x and ∆t, then we say the scheme is unconditionally
stable (this is the best-case scenario). If ∥z∥ ≤ 1 holds only for specific choices of ∆x and/or
∆t, then we say the scheme is conditionally stable (to use the scheme, we must satisfy the
specific conditions). Finally, if ∥z∥ > 1 for all choices of ∆x and ∆t, then we say the scheme
is unconditionally unstable (this is the worst-case scenario: the scheme is useless).
Why do we care about stability of a scheme? The Lax-Richtmyer theorem (also known as
the Lax equivalence theorem) states that a finite-difference scheme converges if and only if
(1) the scheme is consistent (i.e., all truncation errors decay as ∆x, ∆t → 0)
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.
33
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
As introduced in Section 1.3, the advection equation governing, e.g., fluid transport processes
governs the field u(x, t) by
u̇(x, t) + v u,x (x, t) = 0, (4.25)
here for instructive purposes written in 1D with a known, constant advection speed v ∈ R. Let
us introduce a regular grid in both space and time and discretize the advection equation by
a backward-Euler approximation in time and a first-order central difference approximation in
space, i.e.,
uαj − uα−1
j uαj+1 − uαj−1
u̇(xj , tα ) = + O(∆t), u,x (xj , tα ) = + O(∆x2 ). (4.26)
∆t 2∆x
Insertion into (4.25) leads to
uαj − uα−1
j uαj+1 − uαj−1 c
uαj − uα−1 = − uαj+1 − uαj−1 ,
= −v ⇔ j (4.27)
∆t 2∆x 2
where we introduced the dimensionless speed
∆t
c=v . (4.28)
∆x
Note that (4.27) defines an implicit stencil since it requires solving a system of equations for
the unknown field u at time tα . (Try and draw the stencil!)
Let us perform von Neumann stability analysis, which starts by assuming an error of the type
uαj = z α e−ikxj with z ∈ C. (4.29)
Insertion into uαj − ujα−1 = − 2c (uαj+1 − uαj−1 ) from (4.27) gives
c
z α e−ikxj − z α−1 e−ikxj = − z α e−ikxj+1 − z α e−ikxj−1 . (4.30)
2
Using that xj±1 = xj ± ∆x and dividing by z α e−ikxj results in
1 c c
1 − = − e−ik∆x − e+ik∆x = 2i sin(k ∆x) = i c sin(k ∆x). (4.31)
z 2 2
Isolating z ∈ C gives
1 1
= 1 − i c sin(k ∆x) ⇒ = 1 + c2 sin2 (k ∆x) ≥ 1 (4.32)
z ∥z∥2
and thus
1
∥z∥2 = ≤ 1. (4.33)
1+ c2 sin2 (k ∆x)
We conclude that, irrespective of k and ∆x, we have ∥z∥ ≤ 1, so that the scheme is uncondi-
tionally stable (which is also independent of the sign of v).
————
Unconditional stability is generally observed only in implicit schemes, never in explicit schemes.
This can be a significant advantage of an implicit finite-difference scheme, as it implies arbitrary
choices of ∆t and ∆x are possible, in principle. Note that, unfortunately, not every implicit
scheme is unconditionally stable. Explicit schemes are usually conditionally stable or uncon-
ditionally unstable, as we explore in the Exercises. This may pose severe restrictions on the
admissible choices of ∆x and/or ∆t.
34
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 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.
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.35)
with frequency ω ∈ R and wavelength k ∈ R. Note that this is identical to how we started
our discussion of von Neumann analysis (cf. Eq. (4.35)). By the same argument made there,
viz. that we are concerned only with linear ODEs/PDEs, we may set û = 1 without loss of
generality and interpret the above as a single term in a Fourier series, so that, in principle, any
arbitrary function can be represented by the above upon superposition of many modes.
As an instructive example, we consider the same explicit scheme for 1D wave equation introduced
before, viz.
uα+1
j − 2uαj + ujα−1 uαj+1 − 2uαj + uαj−1
= c2 . (4.36)
(∆t)2 (∆x)2
Inserting (4.10) into (4.36) results in
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
35
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
wavelength k, then (4.39) defines the frequency (or frequencies) ω at which the signal will prop-
agate. Note that for small values of |ω ∆t| ≪ 1 and |k ∆x| ≪ 1, we may expand (4.39) to
leading order (using cos x = 1 − x2 + O(x4 ), recalling σ = c∆t/∆x, and taking the square root):
c∆t
1 − (ω ∆t)2 − 1 ≈ σ 2 1 − (k ∆x)2 − 1
⇔ |ω|∆t = |k|∆x ⇔ |ω| = c|k|,
∆x
(4.40)
which matches the exact dispersion relation (4.34). Hence, in the limit of a very fine grid, the
finite-difference scheme is expected to reproduce the exact behavior. By contrast, for general
values of ω ∆t and k ∆x, (4.39) does not agree with the exact relation and hence introduces
errors.
ω ∆t = ±k ∆x ⇒ ω = ±ck, (4.42)
which agrees with the exact dispersion relation (4.34). Therefore, for if we choose ∆t and
∆x such that σ = c∆t/∆x = 1, the finite-difference scheme may produce exact results.
Now, there are cases of k for which the right-hand side becomes negative, meaning that
there are solutions ω ∈ C (because no real solution x exists for cos x > 1). Further, if
ω ∈ C is a solution, then so is ω † ∈ C (its complex conjugate). In this case either eiωt
or e−iωt implies exponential growth of solutions. Therefore, certain wave vectors k cause
instability, and we may conclude for |σ| > 1 the scheme is unstable, since some small
perturbations will grow exponentially over time. Note that this agrees with the stability
conditions we obtained from von Neumann analysis (see Section 4.2).
• |σ| < 1: we showed in Section 4.2 that this case corresponds to a stable finite-difference
scheme. This is indeed confirmed here: to any k ∈ R there corresponds a solution ω ∈ R,
found by solving (4.39). However, we notice that in this case there exist frequencies ω for
which no solution k ∈ R exists according to (4.39) (only solutions k ∈ C). This implies
that waves at those frequencies ω cannot propagate. Imagine, e.g., that one end of the
1D bar is exciting at one of those “forbidden” frequencies ω by an external excitation
(through an applied Neumann or Dirichlet BC), then no wave inside the bar will form
that propagates the signal and constant amplitude, since no real wave vector can be found.
(In fact, k ∈ C can be shown to produce damped solutions, i.e., displacement fields u(x, t)
that exponential decay with distance x into the bar). Consequently, for |σ| < 1 the scheme
is stable but it damps certain frequencies and therefore shows so-called phase error.
36
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
damping: the elastic wave equation has no intrinsic damping. Any such observed damping is
introduced merely by the numerical scheme used to solve it. These conclusions offer helpful
insight into how to choose (and how not to choose) the grid spacings ∆x and ∆t for a given
wave speed c.
The above finite-difference schemes are powerful direct numerical techniques, which are rela-
tively simple to develop and easy to implement (especially for explicit schemes that do not
require the solution of global systems). These are key advantages of direct methods such as
finite differences.
However, they also come with considerable disadvantages. Problems associated with direct
methods such as finite differences include the following:
• a regular grid is required (which is fine for many fluid mechanics problems but oftentimes
problematic for complex solid geometries, especially when undergoing large deformation).
Adaptive grids or spatially varying grid sizes can be a solution, but they come with
considerable complications compared to the above examples.
• variables are defined only at grid points, hence the error is minimized only at grid points
(and we have no information about what happens between grid points; both the primary
fields and their errors are undefined between grid points). This can be problematic when
seeking approximate solutions that are “globally optimal ” (i.e., a solution could be correct
at grid points but nonsensical or erroneous in between). Also, one needs to address how
BCs/ICs can be applied in between grid points and how about moving BCs are imposed.
• stability/efficiency issues may arise due to the above stability restrictions. Choices of ∆t
and ∆x are not arbitrary but – aside from accuracy concerns – have strong influence on
the stability of a scheme. Especially for explicit finite-difference schemes (as we discuss
in the Exercises) dictates the maximum grid sizes to be used, which may impose severe
computational costs due to small grid spacings.
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).
37
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 displacement5 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.
5
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.
38
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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.
39
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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
40
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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.
Finally, notice the meaning of the diagonal stiffness component k(ii) : to displace particle i by 1
to the right (while all other stay put), an external force of k(ii) (to the right) must be applied
to particle i. Since springs always apply a restoring force, we must have k(ii) > 0. k(ii) = 0
would imply that particle i can be moved without applying any force (this can only be the case
if particle i is not properly connected to the neighboring particles via springs so rigid-body or
zero-energy modes exist).
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)
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.
41
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
u~
We can obtain the (initial) orientation of an element in 2 2
space from its nodal coordinates in the reference config- u e,2 e
(x2 ,x2 )
u2
T e,1 e,2
uration, Xe = x1e , x2e such that ∆xe = x2e − x1e . In e,1
2D the angle with the x1 -axis is obtained from geometry
u~
1 1
as 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
F̃ 2 ⇔ Fint,e = RT (φe )F̃int,e . (5.17)
int,e,1 cos φe 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
(12.9). 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
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.20)
0 0 0 l m n
42
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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.
Note that it is important to choose the rotation angles φe consistent with the order of the
nodes (in the derivation of the rotated stiffness matrix, we assumed that φe is the angle of the
bar’s reference axis with the x1 -axis, with the first node being the center of that rotation). For
example, K3 is computed for Ue = (u1 , u3 )T . If instead one chooses Ue = (u3 , u1 )T for this
element, then we would have φe = − 2π 3 and a different stiffness matrix. This ambiguity will be
resolved in the following section.
————
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.
43
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 beam element) are linked to global nodes (1, 2 and 3), we
can assemble the global system. All we must do is add the components of the local stiffness
matrices to the right spots in the global stiffness matrix. For example, K1 (linking nodes 1
and 2) in the global system with U = (u11 , u12 , u21 , u22 , u31 , u32 )T becomes
1 0 −1 0 0 0
0 0 0 0 0 0
EA −1 0 1 0 0 0
[K1 ]global = . (5.24)
0 0 0 0 0 0
L
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.25)
4L 0 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
of the three stiffness matrices):
√ √
5 3 −4 0 −1 − 3
√3 3 0 0 −
√
3 −3
√ √
EA −4
0 5 − 3 √ −1 3
[K] = [K1 ]global + [K2 ]global + [K3 ]global = √ .
4L 0 0 − 3 √3 3 −3
√
−1
√ − 3 √ −1
3 2 0
− 3 −3 3 −3 0 6
44
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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.27)
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.28)
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).
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.29)
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
45
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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.30)
4L 3
− 3 3 6 u2 −F
————
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.33)
2
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.34)
−k k
46
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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.35)
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 ε = (u1 − u2 )/∆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.33) 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.36)
∂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.37)
∂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.37) 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.38)
∂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 boundary conditions and applying external forces. Most of these concepts are general
and extend well beyond the analysis of simple mass-spring systems. 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. However, the way in which we introduced bar
elements as effective linear elastic springs was ad hoc and may not work in general. What if
the cross-section or modulus of the rod is not constant? What if strains cannot be assumed
constant within the rod, or if the rod is not linear elastic? What if external forces are applied
47
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
not only at nodes but also within the rods? What if we want to extend this approach to 2D
and 3D objects rather than long and slender rods?
To answer these questions, we will return to the continuum description of rods – not as discrete
assemblies of effective springs but as a continuous elastic solid body with a continuous displace-
ment field, stresses, and strains. We will seek to adopt the above principle of the minimum
potential energy (which is a universal physical law that applies in elastic problems), and we will
aim to extend it, so it can also be used to find solutions for continuous elastic rods. To this
end, we will need the concepts of variational calculus (discussed in the next section).
48
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
6 Variational Calculus
As an alternative to the direct numerical methods discussed previously (including finite dif-
ferences), indirect methods do not solve the ODEs/PDEs directly but search for “optimal ”
approximations. 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. 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? And are these globally or locally defined functions?
2. What does “optimal ” mean in this context? How do we quantify the total “error ” between
an approximation solution uh (x, t) and an exact solution u(x, t) for a complex (initial)
boundary value problem (especially if we do not know the exact solution)?
For many physical problems, including the classical mechanical, thermal and also electromag-
netic boundary value problems, there is an intuitive way to arrive at “optimal ” solution, which
is to invoke the principle of minimum potential energy. Recall how in Section 5.6 we
had shown 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 con-
tinuous 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 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 generalizations
possible for higher dimensions, unless specifically stated otherwise. In addition, we will discuss
(quasi-)static problems without time dependence first and 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.
49
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
For the general thermo-mechanical continuum problems considered in this course, we would like
to have a similar concept at hand to turn equilibrium equations (such as the governing PDEs
discussed above) into energy minimization problems. Unfortunately, the situation is a bit more
complex than in the above spring example, since we here no longer seek to find equilibria
described by variables (like x above), but the solutions we aim to find are functions (such as
the displacement field u(x) in the previous sections).
We can intuitively imagine how to extend the concept though: we need to define an energy I,
which depends on u(x) and is to be minimized by the exact solution. However, we first need
to introduce some mathematical preliminaries related to the so-called functional I and how to
minimize such a functional with respect to a function (we can no longer take simple derivatives
to arrive at the stationarity conditions, since we are minimizing not with respect to a set of
variables but with respect to a function). The underlying mathematical concepts are known as
variational calculus.
6.3 Functionals
Let us first give the normal definition of a functional and then dissect its meaning. A functional
is a special type of mapping which maps from a function space U to R:
I : u ∈ U → I[u] ∈ R. (6.3)
When seeking solutions u(x), we typically seek solutions within a particular function space U.
For example, a functional may impose constraints on the differentiability or integrability of a
function u(x). As an example, consider
Z 1
I[u] = u2,x (x) dx, (6.4)
0
which defines a functional I requiring that u(x) is differentiable (i.e., possesses a first derivative
u,x ) and that the first derivative squared can be integrated to yield some finite value. As a
counter-example, a piecewise constant function u(x) would not be square-integrable (the first
6
To differentiate functionals from functions, we will write I[u] with brackets instead of parentheses as in u(x).
50
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
derivative consists of Dirac delta functions, which, if squared, yield infinity when integrated).
Hence, functional I[u] in (6.4) restricts the function u(x) to belong to the function space
Z 1
u2,x (x) dx < ∞ .
U = u : (0, 1) → R such that (6.5)
0
In simple terms (and this is all we will need to remember in the following), H k (Ω) denotes the
space of all functions whose derivatives up to kth order are square-integrable (i.e., squaring
and integrating them over Ω yields a finite value). The above example in Eq. (6.4), e.g.,
requires u ∈ U ⊂ H 1 (0, 1); i.e., the first derivative of functions u(x) must be square-integrable
on the interval (0, 1). (Of course, in this example u(x) need not be square-integrable itself (the
functional only contains u,x ), yet for our purposes there exists no function u(x) which is not
square-integrable while its first derivative is square-integrable.)
Consider a bar of length L with constant Young’s modulus E and cross-sectional area A and
strain energy density W = E2 ε2 . The total energy I of the bar as a function of the 1D displace-
ment field u(x) is
Z L Z L
E
I[u] = W (ε) A dx = [u,x (x)]2 A dx, (6.8)
0 0 2
where we used that ε = u,x . We here must impose the restriction u ∈ H 1 (0, L) (unless when
dealing with discontinuities such as cracks) to ensure that the first derivative u,x is square-
integrable. 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). (6.9)
0 2
Minimizing this functional with respect to the unknown function u(x) is expected to yield the
sought solution. Unfortunately, we still do not know how to minimize a functional with respect
to a function, which we discuss next.
————
7
Though not needed for our purposes here, more information on Sobolev norms and spaces is available in
Appendix D.
51
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
6.4 Variations
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.
Example 6.2. Variations of a (simple) functional
As an example for calculating the first and higher-order variations, let us consider the simple
introductory example of the functional
Z 1
I[u] = u2 dx so that we seek u ∈ U = H 0 (0, 1). (6.14)
0
52
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
d 1
Z Z 1
d 2 d
δI = lim I[u + ϵ δu] = lim (u + ϵ δu) dx = lim (u + ϵ δu)2 dx
ϵ→0 dϵ ϵ→0 dϵ 0 ϵ→0 0 dϵ
Z 1 Z 1 (6.15)
= lim 2(u + ϵ δu)δu dx = 2 u δu dx.
ϵ→0 0 0
since replacing u (which does not appear) by u+ϵδu (which hence also does not appear anywhere)
and then differentiating with respect to ϵ yields zero. We have thus computed the first and all
higher variations of the functional (6.14).
————
The following are helpful relations, which follow directly from the above definition of variations.
For any functions u, v ∈ U, functionals Ii : U → R, and constants αi ∈ R, the following relations
hold:
• δ (α1 I1 + α2 I2 ) = α1 δI1 + α2 δI2 (due to the linear nature of the variation operator)
du d
• δ = δu (assuming sufficient differentiability of u)
dx dx
Z Z
• δ u dx = δu dx (assuming that the domain Ω is independent of u)
Ω Ω
Notice how the above relations for δu are quite analogous to those applicable to a differential
du (this analogy often helps).
Furthermore, we can calculate variations for functionals depending on more than one function,
if we define
d
δI[u, v, . . .] = I[u + ϵ δu, v + ϵ δv, . . .]ε→0 . (6.18)
dϵ
Note that, since a variation is the analog of a derivative, we can use variations to expand any
functional I[u] in a Taylor series as follows:
1 2 1
I[u + δu] = I[u] + δI[u] + δ I[u] + δ 3 I[u] + . . . (6.19)
2! 3!
53
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
For example, we may expand the functional of Example 6.2 by factoring out the quadratic term,
which immediately shows that we recover the Taylor expansion.
Z 1 Z 1 Z 1 Z 1
I[u + δu] = (u + δu)2 dx = u2 dx + 2u δu dx + (δu)2 dx
0 0 0 0 (6.20)
1 2
= I[u] + δI[u] + δ I[u],
2
All higher-order terms vanish (as expected, since the functional involves u only up to quadratic
order).
In most practical problems, the functional will involve both a function u and some if its deriva-
tives. In general, such a functional has the form
Z
I[u] = f (u, ∇u, ∇2 u, . . .) dx. (6.21)
Ω
We can use the above relations for variations to derive a practical shortcut for computing
variations of (6.21) as follows. The first variation is obtained as
Z
d
I[u] = lim f (u + ϵ δu, ∇u + ϵ δ∇u, ∇2 u + ϵ δ∇2 u, . . .) dx
ϵ→0 dϵ Ω
Z (6.22)
∂f ∂f ∂f 2
= δu + δ∇u + δ∇ u + . . . dx.
Ω ∂u ∂∇u ∂∇2 u
The analogous applies in higher dimensions – which will become important in the mechanical
boundary value problems discussed later. For example, if we seek a displacement field u(x) :
Ω → Rd , the functional may involve all components of u and all their partial derivatives, so
Z
I[u] = f (ui , ui,j , ui,jk . . .) dV. (6.23)
Ω
Now that we have established the basics of variational calculus, let us get back to our original
objective: exploit the variational structure of our boundary value problems to replace solving
the governing PDEs by solving an energy minimization problem. To this end, we need to show
that the solutions u ∈ U of a boundary value problem can be interpreted as extremal point over
U of a functional I[u]. Let us demonstrate this by the following example.
54
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
+
The total potential energy, which is the total strain energy of the elastic bar
minus the work done by the gravitational body forces and the constant end
force, defines the functional:
Z L Z L
E 2
I[u] = u (x) A dx − ρg u(x) A dx − F̂ u(L) (6.25)
0 2 ,x 0
and we seek the displacement field u(x) from the function space
u ∈ U = u ∈ H 1 (0, L) : u(0) = 0 .
(6.26)
The first variation of (6.25) is derived as
Z L Z L
δI[u] = 0 = Eu,x (x) δu,x (x) A dx − ρg δu(x) A dx − F̂ δu(L). (6.27)
0 0
Since it is inconvenient to have both δu and δu,x in the above expressions, we apply integration
by parts to the first integral, which leads to
Z L
δI[u] = − [Eu,xx (x) + ρg] δu(x) A dx + EAu,x (L) δu(L) − EAu,x (0) δu(0) − F̂ δu(L).
0
(6.28)
Noting that δu(0) = 0 because of essential boundary condition (we have u(0) = 0 and recall
that variations must vanish at points for essential boundary conditions are imposed), the above
reduces to
Z L h i
δI[u] = − [Eu,xx (x) + ρg] δu(x) A dx − F̂ − EAu,x (L) δu(L). (6.29)
0
To see if the solution u(x) is a maximizer or minimizer of I, let us compute the second
variation:
Z L Z L
2
δ I[u] = Eδu,x δu,x A dx = E (δu,x )2 dV ≥ 0 ∀ δu,x . (6.32)
0 0
55
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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.
We will show in Section 7 that the first variation (6.27) is the so-called principle of virtual
work, if we replace δu by u∗ . Thus, our variations here are the same as virtual displacements in
the principle of virtual work, and we obtain the latter automatically from the energy functional
as the first variation. This admits a re-interpretation of the principle of virtual work, which is
nothing else but the stationarity condition for minimizing the underlying energy functional.
————
Let us revisit the hanging bar problem once more to observe a particular general structure of
the boundary value problem and its variational basis, which will come handy shortly. For the
hanging bar (assuming that E = const.), notice that we can rewrite the energy functional for
short as
1
I[u] = B[u, u] − L[u], (6.33)
2
where we introduced a bilinear form B and a linear form L, defined as
Z Z Z
B[u, v] = E(grad u)(grad v) dV and L[u] = ρgu dV + t̂u dS, (6.34)
Ω Ω ∂ΩD
where we included tractions t̂ applied to the surface ΩD for generality. Note that in 1D we
have grad u = u,x , so (6.33) is nothing but a more abstract re-formulation of (6.25) (with the
exception that we replaced the singular force at the end by a surface traction for generality).
The structure in (6.33) is in fact a recipe for a more general class of variational problems
(the same structure applies to heat conduction, electrostatics, or mechanical equilibrium, as
discussed later – the only difference is the exact form B and L). Let us therefore consider an
energy functional of the general form (6.33). Taking variations shows that
1
δI[u] = δB[u, u] − δL[u]
2 Z Z Z
1
= δ E(grad u)(grad u) dV − δ ρgu dV − δ t̂u dS
2 Ω Ω ∂ΩD (6.35)
Z Z Z
= E(grad u)(grad δu) dV − ρg δu dV − δ t̂ δu dS
Ω Ω ∂ΩD
= B[u, δu] − L[δu]
1
I[u] = B[u, u] − L[u] ⇒ δI[u] = B[u, δu] − L[δu] (6.36)
2
For example, in the hanging bar problem compare the energy functional (6.25) and the first
variation (6.27) to confirm the above relation.
56
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
For convenience, let us adopt the following notation found in various textbooks on finite el-
ements: since the first variation depeds on both u and δu, it is often abbreviated as an op-
erator acting on both the unknown field u and its variation δu. To this end, we introduce
G : U × U0 → V ⊂ R such that
d
G[u, δu] = lim I[u + ϵ δu] (6.37)
ϵ→0 dϵ
Without proof, we just note that one of the beauties of the above variational problem (6.36)
(based on a bilinear form B and a linear form L) is that a unique minimizer exists by the
Lax-Milgram theorem (for more information see Appendix F). Recall that for the hang-
ing bar problem above we already showed that the solution is a unique (global) minimizer if
E > 0. This is generally true for (quasistatic) linear elastic problems, which, for suitable bound-
ary conditions, have a unique solution and hence a unique minimizer of the potential energy
functional.
One way to exploit the above variational structure right away is the so-called Rayleigh-Ritz
approach, which introduces an approximation based on trial functions ϕa (x), i.e.,
n
X
uh (x) = ca ϕa (x), (6.38)
a=0
Next, we insert uh (x) into the total energy functional I which, once all integrals have been
carried out, depends on the coefficients ca as the only unknowns. We know that the exact
equilibrium solution u(x) minimizes the total potential energy I[u]. Therefore, we conclude
that we must minimize I[uh ] with respect to ca , giving a system of equations as the stationarity
conditions:
∂I[uh ]
{c0 , . . . , cn } = arg min I[uh ] ⇒ 0= ∀ a = 0, . . . , n (6.40)
∂ca
Recall that we had expressed the energy functional in the general operator form (6.36), so that
" n n
# " n #
1 1 X X X
I[uh ] = B[uh , uh ] − L[uh ] = B ca ϕa (x), cb ϕb (x) − L ca ϕa (x)
2 2
a=0 b=0 a=0
n Xn n
(6.41)
1 X X
= ca cb B[ϕa , ϕb ] − ca L[ϕa ].
2
a=0 b=0 a=0
57
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
where we exploited the (bi)linear nature of the two forms B[·, ·] and L[·]. For example, for the
polynomial series in (6.39) we find
n n n
h 1 XX a b X
I[u ] = c c B[xa , xb ] − ca L[xa ], (6.42)
2
a=0 b=0 a=0
This is a linear system of equations to be solved for the unknown coefficients cb (with b =
0, . . . , n), which we abbreviate as
n
X
K ab cb = F a for a = 1, . . . , n or Kc = F (6.44)
b=0
Notice that this is fully analogous to (7.20), the linear system of equations found for the least-
squares method of weighted residuals (only that we here do not need to choose a weight param-
eter ξ and that we instead exploit the energetic nature of the underlying variational problem,
which is more physical).
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 ca ∈ Rd is a vector having d components,
so we need to find all cai with a = 1, . . . , n and i = 1, . . . , d, and we will need matrices with
components Kij ab .
Let us demonstrate the Rayleigh-Ritz method, introduced above in a general form, for the spe-
cific problem of the freely hanging bar under gravity (no end force applied here for brevity). The
total energy functional with the polynomial approximate solution uh (x) from (6.39) becomes
Z L Z L n
h E h 2 h h
X
I[u ] = u,x (x) A dx − ρ g u (x) A dx with u (x) = ca xa , (6.46)
0 2 0 a=1
where we used that c0 = 0 because of u(0) = 0. The above energy can be integrated to depend
only on the unknown cofficients ca , and that resulting energy must be minimized with respect
to the coefficients ca . Notice how we have transformed the infinite-dimensional problem to a
finite-dimensional one. As a consequence, minimization now is relatively simple: instead of
performing variations we can simply minimize I[uh ] with respect to the unknown variables ca :
∂I[uh ]
=0 for a = 1, . . . , n. (6.47)
∂ca
58
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
and
L L
La+1
Z Z
a a a a
F = L[ϕ ] = L[x ] = ρ g x A dx = ρgA xa dx = ρgA . (6.49)
0 0 a+1
Solving the linear system Kc = F for any n ≥ 2 (feel free to try this as an exercise at home)
yields
ρg ρg
c1 = L c2 = − , and ca = 0 for all a > 2, (6.50)
E 2E
which is in fact the exact solution, see Eq. (3.19):
ρg
u(x) = (2L − x)x. (6.51)
2E
This could have been expected since we chose polynomial ansatz functions in (6.39), taking
uh (x) ∈ Pn . The exact solution is a polynomial of order 2. If we choose uh (x) ∈ Pn with n ≥ 2,
the exact solution is contained in the solution space within which we are looking for the optimal
solution. As a consequence, the Rayleigh-Ritz approach must recover the exact solution as the
energy minimizer. Choosing any Pn with n > 2 does not affect the solution since P2 ⊂ Pn for
n > 2, so the solution is still contained in the solution space and therefore found.
————
6.7 Summary
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 elastic rods
as variational problems; i.e., 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 appropriate function space). In fact, we have proven that
minimization of I[u] is equivalent to solving the underlying ODE of linear momentum balance,
and we can judge from the second variation if an equilibrium is stable or unstable. Finally,
we have shown how this energy-based approach can be used (in the Rayleigh-Ritz method) to
find approximate solutions, viz. by replacing searching for approximate functions uh (x) from a
finite-dimensional function space, which minimize the total potential energy.
The above principles apply generally to all elastic problems (with extensions to two and three
dimensions), in which we can formulate the total potential energy. In the next section, we will
introduce the family of methods of weighted residuals, which are a bit more general and let
us reinterpret the first variation introduced above. We will again encounter the principle of
virtual work and see how the above framework can be extended to problems that do not have a
variational structure (i.e., for which the potential energy functional cannot be formulated – as
is the case, e.g., in many models of inelastic material behavior such as plasticity or damage).
59
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
The objective of all weighted residual methods is to find approximate solutions uh (x, t) that
minimize the total error (which still needs to be defined), when comparing with the exact
solution u(x, t). As in the previous section, we drop the time dependence and only consider
(quasi)static problems. Also, we restrict ourselves to 1D problems, seeking uh (x), and later
expand all concepts 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 (7.2)
a=1
As explored in Section 1.3, the general boundary value problem we aim to solve can be written
in general as
find u(x) s.t. L[u] = s for x ∈ Ω and Bj [u] = t̂j for x ∈ ∂Ωj (j = 1, . . . , k),
(7.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
60
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 (7.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 (7.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
(7.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
(7.7) +5
r∂Ωi−(n−k) (xi ) = 0 for i = n − k + 1, . . . , n W
Points xi (i = 1, . . . , n) are called collocation points8 . 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
8
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 .
61
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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, (7.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 (7.11)
Ω j=1 ∂Ωj
62
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
from which we realize, by comparing to (7.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 . (7.14)
∂ca ∂ca
Recalling our definitions and exploiting the properties of a linear operator (see Section 1.3 and
Eq. (1.55)), we may write the residual when evaluated with the approximate solution uh as
n
X n
X
uh (x) = ca ϕa (x) ⇒ rΩ = L[uh ] − s = ca L[ϕa (x)] − s (7.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 (7.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
63
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
and
Z k Z
X
a a 2
F = sL[ϕ (x)] dV + ξ t̂j Bj [ϕa (x)] dS. (7.23)
Ω j=1 ∂Ωj
Note that both K and F are constant, since all integrals have been evaluated, so (7.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, (7.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. (7.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 . (7.27)
a=0
uh (x) ∈ Pn . (7.28)
64
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 . (7.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, (7.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 , (7.33)
EA 2EAL 3EAL2 c3 mω 2 L
whose solution is
mω 2 L ρω 2 L2 ρω 2
c1 = + , c2 = 0, c3 = − . (7.34)
EA 2E 6E
Insertion into (7.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 . (7.35)
EA 2E 6E
This is in fact the exact solution, cf. Eq. (7.26). Note that this is coincidental (since rΩ (x) is
linear in x, so any two points inside the bar would have resulted in this solution, given that
u(x) ∈ P3 (x), so the exact solution is contained in the chosen approximate solution space). Yet,
this is not generally this case.
65
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Subdomain Method. Let us repeat the above example using the subdomain method. To
this end, we define two equally-sized subdomains in the bulk of the bar (simply by dividing the
bar into two equal halfs):
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
(7.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 (7.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 (7.39)
Ω j=1 ∂Ωj
For this particular problem, we have defined L[·] and B[·] in (7.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 (7.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.
66
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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.
————
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), (7.44)
a∈T
where ca ∈ Rd are the unknown, vector-valued coefficients, and ϕa (x) denote the basis functions.
For example, we may again use polynomial or Fourier basis functions; e.g., ϕa (x) = sin(πa · x)
with appropriate choices of the vector set T . Now, we need d×n independent equations to solve
for all components of the n coefficient vectors ca (d equations per any of the n coefficients). It is
simplest to explain these concepts through practical examples, which will follow later. However,
the general concepts are fully analogous to those described above.
Before we end our discussion of weighted residuals, let us introduce one more method that is
related to the above and therefore usually counted towards the family of methods of weighted
residuals. The advantage of so-called Galerkin’s method is that it avoids the ambiguity in
all of the above schemes: remember that we had to choose collocation points or subdomains or
ξ 2 , and that the solution in general depends on these choices. Here, we outline an approach to
overcome this ambiguity.
As introduced in basic mechanics and continuum mechanics courses (and therefore not discussed
here in detail), the equilibrium conditions of a mechanical boundary value problem can also be
stated in terms of the principle of virtual work. For example, for a solid body Ω undergoing
67
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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.
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 (7.45) – when valid for all admissible virtual displacements u∗ –
indeed holds true and is an alternative expression of the balance of linear momentum and the
associated traction BCs, as stated in (7.48).
Notice that the form of (7.47) is identical to the total residual (7.5) in the methods of weighted
residuals with the trial or weighting functions now being u∗ (x). Hence, the principle of virtual
work lends itself for a natural way to formulate a total weighted residual, viz. (7.47) in this
example (without the need to introduce a scaling parameter ξ and without having to pay
separate attention to various boundary terms). Note that u∗ (x) is a continuous function, so
we here have, in principle, an infinite-dimensional problem (and infinitely many admissible
weighting functions u∗ ). However, we can (and will) turn this problem into a finite-dimensional
one by introducing approximate forms for both uh (x) ≈ u(x) and v h (x) ≈ u∗ (x), which will
form the basis of the finite element formulation later.
Notice that, when simplified to a 1D linear elastic problem, Eq. (7.45) is equivalent to the first
variation (6.27), which we derived from variational calculus for elastic rods. For a 1D rod
hanging from the ceiling under the action of gravity and with a force F̂ applied at its free end
(at x = L), (7.45) simplifies to
Z L Z L
Eu,x u∗,x A dx = ρgu∗ A dx + F̂ u∗ (L), (7.49)
0 0
68
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
of a first variation – without using the total energy functional. This is an important observation
for formulating inelastic problems, in which the total potential energy may not exist or cannot
easily be formulated. By using the principle of virtual work, Eq. (7.45), we may arrive at a
form analogous to the first variation (and this will become important soon).
Example 7.2. Hanging bar under its own weight revisited (again, I know)
For instructive purposes, let us apply the principle of virtual work to a 1D bar. We re-visit the
problem of a hanging bar under its own weight, discussed in Examples 3.2 and 6.3, with a force
F̂ applied at its free end. The problem is thus described by
With σ = Eε = Eu,x and the reduction to 1D, the principle of virtual work here reads
Z L Z L Z L Z L
σu∗,x A dx = ∗
ρgu A dx + F̂ u (L) ∗
⇒ Eu,x u∗,x A dx = ρgu∗ A dx + F̂ u∗ (L),
0 0 0 0
(7.51)
which is indeed (7.49). Integration by parts applied to the first integral yields
Z L Z L
[Eu,x u∗ A]L
0 − Eu,xx u∗ A dx = ρgu∗ A dx + F̂ u∗ (L). (7.52)
0 0
We exploit that u∗ (0) = 0 (since u(0) = 0 is fixed, virtual displacements at x = 0 must vanish)
and re-arrange the integrals into
Z L h i
(Eu,xx + ρg) u∗ A dx + F̂ − EAu,x (L) u∗ (L) = 0. (7.53)
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.
which in turn confirms that a function u(x) that satisfies (7.51) for all admissible virtual dis-
placements u∗ (x), as well as the essential boundary condition u(0) = 0, is also a solution of
(7.50).
which is of the form (7.5) of the total residual discussed for the methods of weighted residuals,
with u∗ acting as the weighting function. Moreover, we can, as before, introduce a finite-
dimensional representation for uh (x) ≈ u(x), e.g., in the form of a polynomial or Fourier series,
and solve for the n unknown coefficients ca by introducing n independent weight functions
u∗,a (x). Since the residual R in (7.55) is linear in u(x), this again leads to a linear system of
equations to be solved for the unknown coefficients.
————
69
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
7.8 Summary
At the end of this section, let us recap the basic principle of weighted residual methods discussed
here. By contrast to direct methods such as finite differences, the goal of this indirect method
is not to solve the governing PDEs directly but instead to minimize the error made by an
approximate solution as follows:
(i ) we first define an approximate solution space and an approximate solution uh (x) defined
up to n unknown coefficients (making sure that uh (x) satisfies all Dirichlet boundary
conditions),
(ii ) we insert the approximate solution uh (x) into the governing equations and define bulk
and boundary residuals (which only vanish for the exact solution),
(iv ) we numerically solve the resulting linear system of equations for the coefficients.
Although the methods of weighted residuals are handy, simple and can be applied to, in principle,
any physical problem of interest, the solution in general depends significantly on the choice of
the weights and also on the choice of ξ (and both are hard to judge without knowing the exact
solution). Only the principle of virtual work provided a more intuitive approach, which avoided
those choices. Finally, we have seen that the principle of virtual work is equivalent to the
first variation obtained from the total potential energy functional (which admits a convenient
alternative for problems, where the potential energy cannot be used).
70
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
In the previous sections, we have seen how indirect methods aim at finding approximate solutions
to boundary value problems by introducing an approximate (finite-dimensional) solution space
and solving for the unknowns describing the sought approximate solution by enforcing the
strong form in some average sense (rather than at every grid point, as in finite differences).
We have also seen how this “average sense” can be defined in various ways, e.g., by enforcing
the governing PDE only at collocation points, on average over subdomains, or by minimizing
the total error made across the entire body. Finally, we have seen how most boundary value
problems can be linked to a variational structure, implying that the strong form is in fact the
stationarity condition of an energy minimization problem. This in turn allowed us to replace
the strong form by an optimization problem, which was exploited, e.g., by the Rayleigh-Ritz
approach. It is important to keep in mind that the variational approach gave us something even
more powerful: it gave us the stationarity conditions of the minimization problem, which we
will call the weak form. Those stationarity conditions, combined with an approximate function
space, were shown to guide us to a linear system of equations to be solved for the unknown
coefficients of the approximate solution. Hence, we have the tools to turn complex systems of
ODEs/PDEs plus boundary conditions into linear systems of equations. Here, we would like to
explore the underlying structure further and, finally, come to the general mechanical boundary
value problem to be solved by methods such as the finite element technique.
Let us consider a general class of physical problems that are governed by a strong form of the
type (written in 1D for simplicity)
(E u,x ),x + s = 0 in Ω
u = û on ∂ΩD (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 represent heat
sources, and t̂ stands for heat fluxes). Various other problems possess the same structure.
In order to describe the restrictions that u(x) must satisfy in order to qualify as a solution to
the above problem, let us define that a function u is of class C k (Ω) (or, in the function space
C k (Ω)) with an integer k ≥ 0 if it is k times continuously differentiable over Ω (i.e., u possesses
derivatives up to the kth order, and these derivatives are continuous functions). Hence, the
strong form (8.1) imposes the requirement
u ∈ C 2 (Ω). (8.2)
That is, we require the function to be twice continuously differentiable in order for the strong
form to make sense10 .
10
To be exact, the strong form in fact requires that u ∈ C 2 (Ω) ∩ C 0 (Ω), i.e., functions u must be twice
continuously differentiable within Ω and at least continuous up to the boundary ∂Ω. But this detail is of minor
importance here and in the following.
71
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
• 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).
is said to be C −1 (R) since its “zeroth derivative” (i.e., the function itself) is not con-
tinuous.
In mechanical problems, if there are no discontinuities such as cracks or shocks (or discontinuities
in the BCs/ICs), we usually assume that the classical solution fields are C ∞ (Ω), so we may take
derivatives of arbitrary order. Otherwise, derivatives exist almost everywhere (a.e.) but caution
or special treatment may be required near discontinuities.
————
As we showed previously, the function u which solves the strong form (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.4)
2
whose stationarity condition is
δI[u] = G[u, δu] = B[u, δu] − L[δu] = 0 for all δu ∈ U0 (Ω). (8.5)
Therefore, we can reformulate the problem (8.1) (without, in principle, knowing anything about
variational calculus) as:
Eq. (8.6) is referred to as Galerkin’s weak form, and the resulting solution u is called weak
solution. This terminology has the following origin. Notice that we no longer seek solutions
u ∈ C 2 (Ω), but instead we seek solutions u within
U = u ∈ H1 (Ω) : u = û on ∂ΩD
(8.7)
which satisfy (8.6) for all v ∈ U0 (Ω). There is one essential difference between the weak and
strong forms: solutions u of the weak form are required to be u ∈ H 1 (Ω), whereas the strong
form required solutions u to be u ∈ C 2 (Ω). The latter is a considerably stronger constraint.
Thus, we have weakened/relaxed the conditions on the family of solutions, which is why the
above is called the weak form.
To see this, consider, e.g., a functions u that is piecewise-linear (like a zig-zag curve), defined
by
X
u(x) = ai (x − xi )H(x − xi ) with ai , xi ∈ R, xi+1 > xi , (8.8)
i
72
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
which is by definition continuous (or compatible) at all xi , so u ∈ C 0 (R). The first derivative is
piecewise-constant:
du X
u′ (x) = (x) = ai H(x − xi ). (8.9)
dx
i
(Note that there is, in principle a second term, ai (x − xi )δ(x − xi ), which however evaluates
to identically zero everywhere on R.) This piecewise-constant function u′ is square-integrable,
hence u satisfies u ∈ H 1 (Ω). By contrast, the second derivative,
du′ X
u′′ (x) = (x) = ai δ(x − xi ), (8.10)
dx
i
Recall that, if v is interpreted as a virtual displacement field, then (8.6) is equivalent to the
principle of virtual work and the form agrees with (7.45) (or (7.51) for the 1D bar problem).
This is important because, even if no variational basis exists, we could still formulate the weak
form by starting from the principle of virtual work. Note that there is a general recipe to
determine whether or not a variational structure exists for a given strong form. This is known
as Vainberg’s theorem, which is summarized in Appendix G.
From a computational perspective, solving the weak form is usually preferable over the strong
form for (at least) two reasons. First, u ∈ H 1 (Ω) is simpler to satisfy than u ∈ C 2 (Ω) (e.g.,
piecewise linear interpolation is sufficient in the weak form but not in the strong form). Second,
as we showed already for the Rayleigh-Ritz approach, the weak form boils down to solving a
system of algebraic equations (rather than solving PDEs).
Notice that, if we do not want to solve the strong form (8.1) directly, we now have two equivalent
principles for finding the solution by exploiting the variational structure, as follows.
a functional I : U → R and the associated bilinear form B(·, ·) and linear form L(·), both defined
on functions u ∈ U, we seek to
(A) find u ∈ U s.t. u = arg min I[u], I[u] = 21 B[u, u] − L[u] (8.12)
We know that the two have a unique connection since δI = B[u, δu] − L[δu]. Thus, we also
know that strategies (A) and (B) must be equivalent and lead to the same solution, i.e.,
(A) ⇔ (B) (8.14)
with a unique solution for this particular type of problem (if it is stable).
73
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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, (8.15)
in which we seek a solution uh , where h stands for the discretization size11 .
When we use the same approximation space for uh and v h , we make the so-called the Bubnov-
Galerkin approximation. Alternatively, one can choose different function spaces for the
approximations uh and v h , which leads to the so-called Petrov-Galerkin method. The latter
gains importance when solving over/underconstrained problems since it allows us to control the
number of equations by the choice of the dimension of the space of v h . Note that we should
choose the approximation space wisely, viz. such that the exact solution can be attained with
infinite refinement; i.e., we should ensure that
for all u ∈ U there exists uh (v) ∈ U h such that lim ∥uh (v) − u∥ = 0. (8.17)
h→0
With the approximations (8.16), we can now formulate the discrete problem
where we introduced U0h to indicate that v h must satisfy the same admissibility requirements
as our variations δu ∈ U0 (or as the virtual displacements u∗ ). This is nothing but a discretized
version of principle (B) from (8.13). If the approximate function space contains the exact
solution, i.e., if U ⊂ U h , then we may expect to find that solution from (8.18).
It is a relatively simple exercise to verify that the above form reduces again to a linear system
of equations to be solved. To this end, insert the approximations (8.16) into (8.18) to obtain
" n n
# " n #
X X X
a a b b b b
B u N , v N =L v N for all (admissible) v b . (8.19)
a=1 b=1 b=1
Exploiting that B is bilinear and L is linear lets us transform the above into
n n
!
X X h i h i
b a a b b
v u B N ,N − L N = 0 for all (admissible) v b . (8.20)
b=1 a=1
74
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
This defines a linear system to be solved for ua (a = 1, . . . , n). As before, let us define a vector
of all unknown coefficients:
T
U h = u1 , . . . , un .
(8.22)
Note that, once shape functions N a (x) have been chosen for a = 1, . . . , n, components K ab
and F b can be uniquely calculated, so K and F are a constant, real-valued matrix and vector,
respectively. As discussed before, K is symmetric, positive-semi-definite.
K Uh = F ⇔ K ab ub = F a (8.24)
Comparing (8.23) to (6.43) shows that the obtained linear system of equations is identical to
that derived for the Rayleigh-Ritz method. This is, in fact, not surprising: for the Rayleigh-Ritz
method we inserted the approximate solution uh directly into I and minimized I[uh ] with respect
to the unknown coefficients ca . Here, we first obtained the stationarity equation G[u, v] = 0
from I[u] exactly and then inserted uh and v h . Yet, if we choose the very same function space
for uh and v h , then both methods should indeed lead to the same system of equations. Thus,
we may also re-interpret the Bubnov-Galerkin scheme as computing the coefficients ua as the
minimizers of I[uh ]. This will become important later in the finite element method, as it allows
to compute the system of equations to be solved for the unknown coefficients in two different
ways: from the weak form or from differentiating the total energy.
75
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
After all those precursors, let us analyze the mechanical variational problem and start with
the simplest problem in general dimensions: (quasi)statics in linearized kinematics. Here, the
strong form is static linear momentum balance along with Dirichlet and Neumann boundary
conditions:
σij,j + ρ bi = 0 in Ω,
ui = ûi on ∂ΩD , (9.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 (9.1) – and then study linear
elasticity – governed by (9.2) – as a special case. The total potential energy functional associated
with (9.1) is
Z Z Z
I[u] = W (ε) dV − ρb · u dV + t̂ · u dS (9.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 , (9.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 (Ω).
76
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
where we used σij = ∂W/∂εij and σij = σji (by angular momentum balance). This form is
indeed equivalent to the principle of virtual work (7.45), if we replace δui by u∗i .
Application of the divergence theorem to the first term in (9.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 . (9.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 (9.1).
From inspecting the first variation in (9.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 . (9.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). (9.12)
a=1 a=1
which is equivalent to
77
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Note that (9.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 (9.10) into (9.15) leads to
Z n Z
X n
X Z
a
Fint,i = Cijkl uhk,l N,ja dV = Cijkl ubk N,lb N,ja dV = ubk Cijkl N,ja N,lb dV
Ω b=1 Ω b=1 Ω
n Z (9.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).
For computational purposes, we should revisit our notation here. Notice that vectors U h ∈ Rd·n
and F ∈ Rd·n in 3D are, respectively, composed of the following components:
1 1
u1 F1
u12 F21
1 1 1 1
u u3 F F3
h
[U ] = . . . = . . . ,
[F ] = . . . =
. . . .
(9.18)
u n u n F n F n
1 1
un F n
2 2
un3 F3n
Here, we used 1-index notation like in Matlab (i.e., we sum over a = 1, . . . , n and not a =
0, . . . , n − 1 as, e.g., in C/C++). Therefore, in d dimensions
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. (9.20)
Note that we now use super- and subscripts on K and F , since our unknown coefficients are
vector-valued here. A super script a refers to the a-th coefficient, while a subscript i refers to
the i-th component of the coefficient. Remember how we said in Section 7.4 that this would
become important later?
In the simplified framework of linear elasticity (already introduced above), the governing equa-
tions are oftentimes written in a more condensed version that allows for a simple calculation of
78
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
the stiffness matrix K. We here start with the approximate displacement field and the resulting
strain tensor components, respectively:
n n
h
X
a a 1 h 1X
εhij h
a a
ui N,j (x) + uaj N,ia (x) , (9.21)
u (x) = u N (x) ⇒ = ui,j + uj,i =
2 2
a=1 a=1
For conciseness, let us introduce so-called Voigt notation to condense the strain tensor into
a strain vector with only unique components. Since ε is symmetric, one usually stores only the
six independent components in a vector, which leads to the strain vector in Voigt notation:
ε11
ε22
ε33
2ε23 .
[ε̃] = (9.22)
2ε13
2ε12
The factor 2 in the shear strain components in Voigt notation (which is not found in the Voigt
notation of stresses) is required, so that the energy density is conveniently given by
1 1
W = σij εij = ε̃ · σ̃. (9.23)
2 2
Voigt notation has two main advantages: it reduces data storage (requiring only six instead of
nine components in 3D), and it works with vectors instead of matrices (so that the stiffness
tensor is no longer of fourth-order tensor but simply a matrix linking the stress and strain
vectors).
where we introduced the matrix B ∈ R3n×6 in 3D (and analogously B ∈ R2n·3 in 2D). This
allows us to write for short
Consequently, we may define the stress vector σ̃ in Voigt notation and the associated linear
elastic constitutive law as (again in in 3D)
where E denotes an elastic stiffness matrix whose components are deduced from C and follow
from the definitions of stresses and strains. For example, for an isotropic linear elastic material
79
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
1−ν
ν ν 0 0 0
ν
1−ν ν 0 0 0
E ν ν 1 − ν 0 0 0
[E3D ] = 1−2ν
. (9.27)
(1 + ν)(1 − 2ν)
0 0 0 2 0 0
0 1−2ν
0 0 0 2 0
1−2ν
0 0 0 0 0 2
The 2D version depends on the exact scenario, as one must differentiate between states of plane
stress and plane strain:
1 ν 0
E
[Eplane stress ] = ν 1 0
1 − ν2 1−ν
0 0
2 (9.28)
1−ν ν 0
E
[Eplane strain ] = ν 1−ν 0 .
(1 + ν)(1 − 2ν) 1−2ν
0 0 2
Analogous matrices can be derived for other elastic constitutive laws (e.g., for general linear
elastic anisotropic media).
1 ∂I int
I int = U h · K U h then it follows correctly that F int = = KU h , (9.30)
2 ∂U h
Therefore, the linear elastic stiffness matrix K can be computed as
Z
K= B T EB dV (9.31)
Ω
with B from (9.24), and E depending on the specific material model (see the examples for linear
elasticity given above). Note that B contains only basis/trial function derivatives, so that –
once a basis N a for a = 1, . . . , n has been chosen – B is known and can be computed.
80
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
10 Interpolation spaces
So far, we have assumed that the approximate solution uh (or uh in higher dimensions) is based
on a choice of basis/shape functions N a (x) with a = 1, . . . , n. Before discussing particular basis
functions, it is important to consider what conditions those shape functions N a (x) must satisfy.
We have seen already that polynomial or Fourier series may lead to simpler integrals when
computing matrix K and right-hand-side vector F . Yet, this is only an observation and no
rigorous constraint on the basis functions. Let us here discuss the requirements of appropriate
interpolation spaces.
Let us briefly introduce the support of a continuous function f : Ω → R as the set of all
points12 where f (x) ̸= 0, i.e.,
supp f = x ∈ Ω : f (x) ̸= 0 (10.2)
This means that f (x) = 0 for all points outside the support, i.e., for x ∈ Ω\ supp f .
In general, there are two possible choices for the nature of N a (x):
Na a
N
... x
x
suppNa suppNa
local shape functions global shape functions
Irrespective of their global or local definitions, all shape functions should be carefully chosen.
Specifically, the following shape function properties must be satisfied:
(I) At any point x ∈ Ω there must be at least one a with 1 ≤ a ≤ n such that N a (x) ̸= 0
(i.e., the whole domain must be covered by the approximation). Otherwise, no
approximation would exist in certain regions or at certain points inside the body.
12
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
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
(II) The chosen shape functions N a should allow us in some “simple” manner to impose
Dirichlet boundary conditions, where required (recall that uh should satisfy the es-
sential BCs). This is obviously not a clearly defined criterion but an important one form
a practical perspective.
(III) All shape functions must be linearly independent, i.e., we require
n
X
uh (x) = ua N a (x) = 0 ∀ x ∈ Ω ⇔ ua = 0 for all a = 1, . . . , n. (10.3)
a=1
which means both {u1 , . . . , un } and {u1 + α1 , . . . , un + αn } are solutions. In this case, the
problem is not well-posed.
For these reasons, we must define shape functions that are linearly independent. If func-
tions {N 1 , . . . , N n } are indeed linearly independent, then we call them a basis of U h .
(IV) The shape functions N a must satisfy the differentiability/integrability requirements
of the weak form (this depends on the problem to be solved, as discussed before in the
context of the weak form in Section 8). For example, for mechanical problems we had
seen that the weak form requires uh ∈ H 1 (Ω).
(V) The shape functions must possess “sufficient approximation power”. In other words,
consider uh ∈ U h ⊂ U: we should ensure that uh = na=1 ua N a → u as n → ∞. This
P
important requirement ensures convergence and will be discussed below in Sections 10.2
and 10.3.
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
82
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
pn (x) ∈ P∞ such that |f (x) − pn (x)| < ϵ for all x ∈ [a, b]. (10.6)
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 is also expected to
converge to the exact solution, if not a single 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 = β.
What does this mean in practice and in simple terms? Let us check the specific cases of 1D, 2D
and 3D.
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 10.2.
83
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
2D: for d = 2 with coordinates x1 and x2 , the above definition of complete polynomials with
α = {α1 , α2 } yields
q
X X
h
u = c(α1 ,α2 ) xα1 1 xα2 2 . (10.10)
β=0 α1 +α2 =β
This results in the following bases for polynomials that are complete up to order q:
q = 0 : {1}
q = 1 : {1, x1 , x2 }
q = 2 : {1, x1 , x2 , x21 , x1 x2 , x22 } (10.11)
q = 3 : {1, x1 , x2 , x21 , x1 x2 , x22 , x31 , x21 x2 , x1 x22 , x32 }
...
q = 0 : {1}
q = 1 : {1, x1 , x2 , x3 }
q = 2 : {1, x1 , x2 , x3 , x21 , x22 , x23 , x1 x2 , x1 x3 , x2 x3 }
(10.13)
q = 3 : {1, x1 , x2 , x3 , x21 , x22 , x23 , x1 x2 , x1 x3 , x2 x3 ,
x31 , x32 , x33 , x21 x2 , x21 x3 , x1 x22 , x22 x3 , x1 x23 , x2 x23 }
...
This completes our discussion of required shape function properties. They should (I) cover the
entire domain, (II) allow us to easily imposed Dirichlet boundary conditions, (III) be linearly
independent, (IV) be sufficiently square-integrable/differentiable, and (V) have sufficient ap-
proximation power (i.e., be complete and converge to the exact solution). This still does not
tell us how to choose shape functions {N 1 (x), . . . , N n (x)} – and this takes us directly to the
finite element method.
84
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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. (11.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 . (11.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 .
In other words, each shape function N a is 1 when evaluated at exactly one node a, and it
vanishes at all other nodes. This is the defining relation that determines the shape functions.
Notice that if we evaluate the approximation uh (x) at one of the nodes xb , then
n
X n
X
uh (xb ) = ua N a (xb ) = ua δab = ub . (11.4)
a=1 a=1
85
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
That is, the coefficient ub can now be identified as uh (xb ), i.e., as the value of approximate func-
tion uh at node b. This makes for a very beneficial interpretation of the (yet to be determined)
shape function coefficients.
Let us check if FE shape functions satisfying (11.3) also satisfy the requirements for shape
functions introduced in Section 10.1:
which contradicts the assumption that some ua ̸= 0. Thus, (11.3) ensures that we have
linearly independent shape functions.
(IV) Integrability/differentiability requirements depend on the variational problem to be solved
and must be ensured. For example, for the mechanical BVP we have seen that U h ⊂ H 1 ,
i.e., first derivatives must be square-integrable. Note that this guarantees that displace-
ments (0th derivatives) are continuous and thus compatible (no jumps in displacements).
This requirement is not a-priori satisfied by finite elements but imposes restrictions on the
type of piecewise-polynomial interpolation functions to be used. We will discuss specific
types of interpolation soon, starting in Section 12.
(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):
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.
86
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 ). (11.6)
2 q!
Assume that U h contains all polynomials complete up to degree q (i.e., U h = Pq ), then there
exists a “nearby” approximation
Let p denote the highest derivative in the weak form. Differentiating the equation in (11.7)
yields
dp u dp uh
p
= + O(hq+1−p ). (11.8)
dx dxp
For the solution to converge as h → 0, we need the errors to be at least of O(h), which implies
that we must have q + 1 − p ≥ 1. Thus we must ensure that
q≥p (11.9)
This gives us a simple recipe for the choice of the interpolation order q, based on the highest
derivative (of order p) appearing in the weak form. For example, for the mechanical (as well as
thermal and electromagnetic) variational problems discussed previously, we had the requirement
u, uh ∈ H1 (Ω), since the energy and resulting weak form contained first derivatives of u only.
Hence, we have p = 1, so that our finite-element interpolations must satisfy q ≥ p = 1.
Therefore, finite-element shape functions to be used for solving mechanical BVPs require at
least piecewise-linear shape functions.
87
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 , (12.1) 1 u e 2 u2
e
x
and we must have uhe (0) = u1e and uhe (∆x) = u2e for an element
defined on x ∈ [0, ∆x], as shown on the right. Dx
Here and in the following, we add the subscript e to all quantities being specific to an element
(this includes, e.g., the above shape functions and the nodal dofs are associated with nodes 1
and 2 of this particular element).
By choosing q = 1, the shape functions must be linear polynomials, so that we must have an
interpolation of the type uhe (x) = c1e + c2e x with c1 , c2 ∈ R. As we know that uhe must evaluate
to uae at node a (with a = 1, 2), we may impose
u2e − c1 u2 − u1e
u1e = uhe (0) = c1e , u2e = uhe (∆x) = c1e + c2e ∆x ⇔ c2e = = e , (12.2)
∆x ∆x
from which we conclude
x 1 x 2
uhe (x) = c1e + c2e x = 1 − u + u . (12.3)
∆x e ∆x e
Comparison with (12.1) yields the element shape functions (plotted above) as
x x
Ne1 (x) = 1 − , Ne2 (x) = (12.4)
∆x ∆x
Notice that these functions automatically satisfy (11.3), i.e., each shape function a is 1 at node
a and 0 at the respective other node. Both vary linearly from 0 to 1, as shown above. This
defines the simplest possible FE interpolation within a 1D element.
Next, let us use the above shape functions and see what their use implies in solving a mechanical
BVP. To this end, recall that in linear elasticity we solve a linear system of equations, involving
the vectors and matrices defined in Section 9.
1 d x 1 2 d x 1
Ne,x (x) = 1− =− , Ne,x (x) = = , (12.5)
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. (12.6)
∆x
i=1
88
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
The result in (12.6) is not surprising but confirms what we have known since first-year mechanics
classes: if a bar of length ∆x is stretched by an amount ∆u = u2e − u1e (which is the relative
displacement of its two end points) and if we assume a linear displacement variation along the
bar, then this implies a constant axial strain of magnitude ∆u/∆x – which is exactly what we
assumed in Section 5 to derive the stiffness matrix.
If we assume a linear elastic bar, then the axial stress component σ = E ε allows us to calculate
the force onto node a, cf. (9.15), as
Z ∆x Z ∆x
u2e − u1e a
Z
a h a EA 2 1 a
Fint,e = σxx (εxx )N,x dV = E N,x A dx = (u − ue ) N,x dx. (12.7)
Ω 0 ∆x ∆x e 0
Again, this is not surprising but intuitively correct: if the bar is strained by εh = ∆u/∆x, then
the stress inside the bar is σ = Eεh and the resulting axial force is F = σA (with A being
the bar’s cross-section). (12.8) simply states that the forces that must be applied to the elastic
bar at both ends to result in a change of length are of opposite direction and equal magnitude
EAεh . The bar hence acts as a linear elastic spring of effective stiffness k = EA/∆x.
which recovers the stiffness matrix previously derived in Section 5, see (5.18). We could al-
ternatively have used our definition obtained from the linear elastic mechanical weak form:
(
Z Z ∆x
EA 1, if a = b
K ab = B[N a , N b ] dV = a
ENe,x b
Ne,x a
A dx = EA ∆xNe,x b
Ne,x = ,
Ωe 0 ∆x −1, else
(12.10)
where inserting the constant shape function derivatives again leads to (12.9).
1
As seen before, the two nodal forces Fint,e 2
and Fint,e depend linearly on the nodal displacements,
so that
1 1
Fint EA 1 −1 ue
[Fint,e ] = 2 = ⇔ Fint,e = Ke Ue . (12.11)
Fint ∆x −1 1 u2e
Further, we verify that the strain energy stored in the bar is
Z ∆x
E h 2 1 ∂Ie
Ie (Ue ) = εxx A dx = Ue · Ke Ue ⇒ Fint,e = . (12.12)
0 2 2 ∂Ue
It is important to note that the above shape functions were introduced within a single element
e, which is why we use the subscript e on all element quantities, including the shape functions
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.
89
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
For each element e, the shape functions Ne1 and Ne2 are as defined in (12.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, (12.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 (12.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
x
N1 u2
N2 u3
u4
u1 ž + u2 ž + u3 ž N3 + u4 ž 4
+ ... = .:
N
un
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.
90
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 . (12.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 (12.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 (12.3)
for the 2-node bar element.
Alternatively, we may recall the defining relation for finite-element shape functions, (11.3), and
solve
Nea (xb ) = δab for all nodes b = 1, . . . , q + 1. (12.16)
The solution to this problem is in fact intuitive:
91
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
which is associated with the newly introduced dof α. To identify the coefficients ai , recall that
we must have
ee3 (0) = N
N ee3 (∆x) = 0, (12.21)
which leads to
ee3 (x) = c x 1 − x
N (12.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 − . (12.23)
∆x ∆x ∆x ∆x
Note that αe is internal to the element and does not have to be continuous across elements. We
can thus determine αe locally within the element (i.e., given u1e and u2e , αe can be determined
for each element, which allows for condensation of the αe -dof with efficiency advantages).
A practical example of an element with higher-order interpolation are beam elements. Unlike
the 2-node bar element (which only captures stretching of the bar, see Section 12.1), a beam
element accounts for bending and can be superposed with the bar element to result in gen-
eral elements ready for stretching and bending. The linear elastic Euler-Bernoulli beam
is the most common structural element for this purpose, whose deformation is defined by the
deflection w(x). Let us first review the underlying governing equations.
Consider a continuous linear elastic beam of length L (constant Young’s modulus E and area
moment Iy ), loaded by a distributed transverse load q(x) as well as bending moments My
(about the y-axis) and transverse forces Fz (in the positive z-direction) applied at its two ends,
as shown below. The strong form of this problem (assuming EIy = const.) reads
92
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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), (12.26)
2
0 2
where the plus-signs in the terms involving bending moments result from Mya being against
the rotation direction of w,x . The first variation yields the weak form (which must hold for all
admissible v(x)):
Z L
G[w, v] = [EIy w,xx v,xx − qv] dx − Fz1 v(0) − Fz2 v(L) + My1 v,x (0) + My2 v,x (L) = 0. (12.27)
0
We hence conclude that we must have q ≥ 2 (at least quadratic shape functions), and
w ∈ U = w ∈ H 2 (0, L) : w = ŵ on ∂ΩD .
(12.28)
Following our definitions from Section 8, we identify from (12.27) the bilinear form
Z L
B[w, v] = EIy w,xx v,xx dx (12.29)
0
and the linear boundary operator
Z L
L[v] = qv dx + Fz1 v(0) + Fz2 v(L) − My1 v,x (0) − My2 v,x (L), (12.30)
0
such that13
∀ v ∈ U0h = v ∈ H 2 (0, L) : v = 0 on ∂ΩD .
G[w, v] = B[w, v] − L[v] = 0 (12.31)
As shown in Section 8.3, introducing an approximate solution
n
X
wh (x) = wa N a (x) (12.32)
a=1
transforms the continuous problem into a linear problem for the n unknown coefficients wa , and
the stiffness matrix associated with the linear problem has components
Z L
ab a b a b
K = B[N , N ] = EIy N,xx N,xx dx. (12.33)
0
To identify suitable shape functions N a (x), we must introduce a specific type of beam element.
As the simplest and most common example, let us turn to the specific case of the 2-node beam
element, which looks like the 2-node bar element but deforms in bending instead of in axial
stretching. We know from the weak form that q ≥ 2, so the simplest admissible interpolation
for the unknown deflection w(x) is based on {1, x, x2 } However, this would introduce only three
unknown coefficients (for two nodes), which is why we deliberately go one order higher and
choose the basis {1, x, x2 , x3 }. This leads to the approximate deflection
weh (x) = c0 + c1 x + c2 x2 + c3 x3 for x ∈ [0, Le ]. (12.34)
Since the four coefficients ci are hard to interpret physically in general, we instead assign to
each node a deflection w and a deflection angle θ = w,x , and we use those as the four unknowns
defining the element interpolation. This has the added benefit that only only deflections but
also deflection angles will be continuous across elements (so the beam does not suffer from any
kinks).
13
The boundary conditions in the definition of U0h are actually not quite correct, as we will discuss in Sec-
tion 12.35.
93
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Le
x
w
1
e
w2 e
1 2 q2
q 1 e
e
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.36)
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.36) into the four conditions (12.35), 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 3
x 2
3
x x x
Ne1 (x) =1−3 +2 , Ne2 (x)
=3 −2 ,
Le Le Le Le
(12.37)
x 2 x2 x
Me1 (x) =x 1− , 2
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.36). Shown below are the four shape functions.
0.15
1.0
1 Ne2 Me1/Le
Ne 0.10
0.8
0.05
0.6 1 1
0.2 0.4 0.6 0.8 1.0 x/Le
0.4
-0.05
0.2 -0.10
Me2/Dxe
x/Le -0.15
0.2 0.4 0.6 0.8 1.0
Note that this approximation is only one possible choice; we could also define alternative nodes
and nodal values. However, the above choice ensures that both deflection and angle are contin-
uous across elements (since nodal values are shared by neighboring elements).
94
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 12.1: we first
compute K̃e , the stiffness matrix for a beam element that is horizontal, and then generalize the
formulation to beam elements of arbitrary orientation in 2D and 3D with stiffness matrix Ke .
T
Let us sort the nodal dofs as Ũe = w̃e1 , θe1 , w̃e2 , θe2 . Using (12.33) with Ne1 , Me1 , Ne2 and Me2
(in that order to comply with the nodal dof sorting), we obtain from integrating (12.33)
6 3Le −6 3Le
2EIy 2 L2e
[K̃e ] = 3Le 2Le −3Le , (12.38)
L3e −6 −3Le 6 −3Le
3Le L2e −3Le 2L2e
and the nodal reactions (including transverse forces Fza and bending moments Mya conjugate to
the deflections wea and deflection angles θea , respectively) are
T
1 1 2 2
F̃int,e = K̃e Ũe with F̃int,e = F̃int,e , Mint,e , F̃int,e , Mint,e . (12.39)
Here, forces and moments have the same directions as the conjugate deflections and rotation
angles. In summary, the nodal dofs and the nodal reactions are related linearly via
1
F̃int,e
1
6 3Le −6 3Le w̃e
M 1 2EI 2
int,e y 3Le 2Le −3Le Le θe1
2
2 = . (12.40)
F̃int,e Le3 −6 −3Le 6 −3Le w̃e2
2
Mint,e 3Le L2e −3Le 2L2e θe2
Next, let us generalize the beam element discussed above by considering a beam in 2D, which
T
is still oriented horizontal but whose nodal dofs are Ue = u1e,1 , u1e,2 , θ1 , u2e,1 , u2e,2 , θ2 , i.e., each
node is now displacing in two directions and rotating. Since the above beam formulation only
considers bending, let us superimpose the bar element from Section 12.1, so that the resulting
element can stretch and bend (otherwise, the nodal dofs would not be independent as the length
of the bar would have to remain unchanged without the ability of the element to stretch axially).
T
For such a horizontal 2-node beam with nodal dofs Ũe = ũ1e , w̃e1 , θ1 , ũ2e , w̃e2 , θ2 , w̃ei and θ̃i
describe the beam deflection, while ũ2e − ũ1e defines the change in length of the beam element in
its axial direction. The resulting stiffness matrix (in this horizontal configuration) is obtained
by superposing the stiffness matrices derived independently for the bar and beam elements,
yielding
1 0 0 −1 0 0
0 0 0 0 0 0
0 6 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
[K̃e ] = + (12.41)
L3e
0 0 0 0 0 0 −1 0 0 1 0 0
Le
0 −6 −3Le 0 6 −3Le 0 0 0 0 0 0
0 3Le L2e 0 −3Le 2Le2 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
95
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 1
ũe cos φe sin φe 0 ue,1
w̃e1 − sin φe cos φe 0 u1e,2
1 1
θ 0 0 1 θ
=
2 , (12.42)
2
ũ cos φe sin φe 0
e ue,1
w̃2 − sin φe cos φe 0 u2
e e,2
θ2 0 0 1 θ2
| {z }
=R(φe )
By using the same argument as for the 2-node bar element, the
stiffness matrix of the generally oriented 2-node beam element is 2
u u~2
thus obtained as w~2
e,2
e e
2
Ke = RT (φe )K̃e R(φe ) (12.44) u e,1
L q
2
w~
1
1
e u u~
e,2
1
e
e
q
1
course, the same can also be extended to beams in 3D, where an e u1 e,1
appropriate transformation matrix R based on direction cosines is
introduced.
Let us summarize the key difference between bar and beam elements, which stem from the
different deformation modes captured by each. Bars only undergo axial stretching and nodes
are free to rotate, so that bar networks represented hinged connections (bars carry no transverse
forces nor bending moments). Beam elements of the above type can support both axial and
bending deformation, and beam networks are rigidly connected (or welded) at nodes, so that
angles between beams at nodal junctions remain constant. The differences of both types of bar
and beam networks (often referred to as truss and frame, respectively) are illustrated below.
F F
96
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
For 2-node beam elements of the above type, both deflections and nodal rotations are degrees of
freedom and can therefore be restraint via essential boundary conditions. It is therefore helpful
to review our concept of Dirichlet boundary conditions for beams. We do so by considering
the variational problem and seeking a general way to identify both types of boundary conditions
from the variational structure of the problem.
The potential energy functional for the variational problem of an Euler-Bernoulli beam with
the deflection field w(x) was given by
Z L
1
I[w] = EIy w,xx (x) − q(x)w(x) dx−Fz1 w(0)−Fz2 w(L)+My1 w,x (0)+My2 w,x (L), (12.45)
2
0 2
so that the first variation reads (dropping the dependence on x in the integral for brevity)
Z L
δI = [EIy w,xx δw,xx − q δw] dx − Fz1 δw(0) − Fz2 δw(L) + My1 δw,x (0) + My2 δw,x (L). (12.46)
0
In order to recover the strong form (whose PDE is EIy w,xxxx − q = 0), we integrate the first
term by parts to obtain
Z L Z L
L
δI = − EIy w,xxx δw,x dx + [EIy w,xx δw,x ]0 − q δw dx
0 0 (12.47)
1 2 1 2
− Fz δw(0) − Fz δw(L) + My δw,x (0) + My δw,x (L).
− −My1 + EIy w,xx (0) δw,x (0) + My2 + EIy w,xx (L) δw,x (L)
∀ δw ∈ U0 .
We know that δI must vanish for arbitrary (admissible) variations δw. This imples that, first,
Therefore, we recover the exact governing equation (12.25) of the strong form. Furthermore, the
remaining four terms in (12.49) 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.51)
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,
97
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
means that either My1 = EIy w,xx (0) (i.e., a bending moment is imposed at x = 0) or δw,x = 0
(which implies that w,x (0) = θ̂1 must be an essential BC). Therefore, the above form of the first
variation (in which the integral term matches the PDE of the strong form) reveals all possible
boundary conditions, both natural and essential (i.e., Neumann and Dirichlet, respectively).
We thus need to revise our definition of a Dirichlet boundary condition: not every
imposed derivative of the primary field u necessarily implies a Neumann boundary condition.
Instead, we extract the notion of Dirichlet vs. Neumann boundary conditions from the first
variation of a variational problem. As a rule of thumb, essential/Dirichlet BCs impose the
function itself as well as derivatives up to order (p − 1), where p is half the order of the
PDE in the strong form or the matching order of u and v in the weak form. For example, for a
beam, the PDE is of fourth-order, the matching-order weak form contains second derivatives.
Therefore, essential BCs for a beam include both imposed deflections w and imposed rotations,
i.e., first derivatives of nodal deflections θ = w,x .
This is the reason we warned that the definition of U0h in (12.31) was incorrect. In light of the
above discussion, solutions w(x) of a beam bending problem should be in the space
n o
w ∈ U = w ∈ H 2 (0, L) : w = ŵ on ∂ΩD1 ∧ w,x = θ̂ on ∂ΩD2 , (12.53)
where ∂ΩD1 and ∂ΩD2 are those (possibly overlapping) parts of the boundary on which, respec-
tively, deflections ŵ and rotations θ̂ are being imposed.
98
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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
displacement field, viz.
n
X
so far we used: uhe = Nei (x)uie
i=1
n m (13.2)
X X
now we use: uhe = Nei (ξ)uie and x= Ñei (ξ)xie .
i=1 i=1
We here interpolate the positions xi (in the real geometric configuration of the element, which
we call the physical space) of the n positions of the element nodes in order to assign a unique
99
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
position x(ξ) to every point with coordinates ξ in the reference configuration. As a consequence,
the point which lies at the center of the element (e.g., at ξ = η = 0 in the above 2D example)
will be mapped onto the center of the element in physical space. A point which lies on one of
the edges of the element will be mapped onto the respective edge of the element. Overall, to
each point ξ in the reference space we assign a unique point x in the real physical space, and
vice-versa. The mapping between nodes in the reference space and in real space is illustrated
schematically below.
h x2
(-1,1) (1,1) 4
(x ,x )
e,1
4
e,2
4 + 3 (x ,x )
3 3
mapping
4
+ e,1 e,2
+ 3
x
+
+ +
+ 1
+
1 2 (x ,x1 )
1
e,1 e,2
2
(-1,-1) (1,-1) (x2 ,x2 )
e,1 e,2
x1
element in its reference space element in physical space
Note that the distinction between “reference” and “physical ” space here has nothing to do with
undeformed vs. deformed configurations. So far, we have not discussed what happens with
these elements when they deform. The key idea here is to define as the “physical ” space the
real (undeformed ) configuration of an element in its mesh in its actual geometric shape. By
contrast, the element in the “reference” space is a fictitious element of idealized geometry, which
is introduced to easily define shape functions. Nothing more or less!
When we introduce interpolations of the type (13.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).
The mappings introduced above, e.g., the interpolation (here written in 2D with reference
coordinates (ξ, η) for simplicity)
n
X
x(ξ, η) = Nea (ξ, η)xae . (13.3)
a=1
100
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
provide a link between the reference coordinates ξ and the physical nodal positions x. Given
the nodal locations x1e and x2e in 2D, the above mapping uniquely assigns a point x in real
space to any reference coordinates ξ = (ξ, η). Of course, we may exploit the same interpolation
for any nodal degrees of freedom (thus using an isoparametric mapping), so for any scalar field
uh we write
n
X
uh (ξ, η) = Nea (ξ, η)uae . (13.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. (13.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 (13.3), we will in the following often use a mathematical shortcut known
as the inverse function theorem, which is not specific to any element type but can be
exploited in general. To derive this relation, we begin by formally writing the mapping in 2D
as x1 = x1 (ξ, η) and x2 = x2 (ξ, η) as well as the field of interest (e.g., the displacements) as
uh = uh (x1 , x2 ). Now, the chain rule gives
h h
u,x1 x1,ξ + uh,x2 x2,ξ
h h
u,ξ x1,ξ x2,ξ u,x1 u,x1
= = = [J ] (13.5)
uh,η uh,x1 x1,η + uh,x2 x2,η x1,η x2,η uh,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).
Relation (13.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 (13.4) implies
n
X n
X
uh (ξ, η),ξ = a
Ne,ξ (ξ, η)uae , uh (ξ, η),η = a
Ne,η (ξ, η)uae . (13.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,η
14
The Jacobian in mathematics is usually defined as the transpose of J defined in (13.6). In the FE context,
our definition is chosen for convenience, so that we do not need a transpose in (13.12).
101
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
By substituting the isoparametric mapping (13.3) for x1 and x2 into (13.6), we obtain the
Jacobian of the element as15
n n
X X
a a a a
N x Ne,ξ x2,e
a=1 e,ξ 1,e
x1,ξ x2,ξ a=1
[Je ] = = n n
, Je = det Je (13.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 (13.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 (13.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 (13.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 (13.10)
1
1 n
ue
−1 Ne,ξ · · · Ne,ξ ..
= [Je ] 1 n . .
Ne,η · · · Ne,η
une
Note that, if we had instead defined our shape functions in real space, so Nea = Nea (x1 , x2 ), then
we would have had
n
X
a a 1
h Ne,x1 ue ue
1 n
u,x1
a=1
Ne,x · · · Ne,x ..
= X
n = N1
1 1
. . (13.11)
uh,x2 a a
n
e,x2 · · · Ne,x2
Ne,x2 ue ue n
a=1
But, of course, both (13.10) and (13.11) are valid representations. Therefore, we may equate
these two relations. By comparing the coefficients of uae in (13.10) and (13.11) (e.g., choosing
one non-zero uae and all others zero), we realize that
a a
Ne,x1 −1 Ne,ξ
a = [Je ] a or more generally: ∇x Nea = Je−1 ∇ξ Nea (13.12)
Ne,x2
Ne,η
where for brevity we summarized the reference coordinates into ξ = (ξ, η)T and ∇ξ (·) = (·,ξ , ·,η ),
while ∇x = (·,x1 , ·,x2 ). Relation (13.12) is generally applicable for any isoparametric mapping
and will be valuable in the following sections, when we introduce particular finite element types.
15
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.
102
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
14 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), (14.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 12.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 13) to introduce general shape functions whose definition does not depend on the
element geometry. For simplices, one commonly introduces so-called barycentric coordinates.
103
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Aa (x)
3
lea (x) = e for a = 1, 2, 3 (14.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 (14.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 = . (14.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 , (14.8)
a=1
where xae are the positions of the three undeformed nodes in (real-space) mesh.
104
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
As introduced in Section 13.2, we may invoke the inverse function theorem to compute deriva-
tives. Based on the shape function derivatives in (14.7), the Jacobian matrix (13.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
(14.9)
and
Je = det Je = (x11,e − x31,e )(x22,e − x32,e ) − (x21,e − x31,e )(x12,e − x32,e ) = 2Ae = const., (14.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 (14.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η. (14.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. (14.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 14.4), the following relation is
helpful for evaluating integrals over the triangular element:
Z Z 1 Z 1−η
α β α! β!
ξ η dA = ξ α η β 2Ae dξ dη = 2Ae . (14.15)
Ωe 0 0 (α + β + 2)!
105
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
14.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 key integrals to be evaluated (e.g., in 2D with an element out-of-plane thickness t), following
Section 9, now become the nodal forces
Z Z X Je t
a
Fint,e,i = a
σij Ne,xj dV = a
σij Ne,x j
t dA = σij [Je−1 ∇ξ Nea ]j , (14.20)
Ωe Ωe 2
r={ξ,η}
where the classical summation convention (here over j) is implied and not written out for
conciseness. Note that if we pre-compute and store the following constant quantities for each
element e (which only depend on the undeformed element geometry and not on its degrees of
freedom), viz.
Je t
we = = const. and a
Ne,x j
= [Je−1 ∇ξ Nea ]j = const., (14.21)
2
then the calculation of the nodal force vectors reduces to
a
Fint,e,i = σij (εh )Ne,x
a
j
we , (14.22)
106
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
where only the stresses must be recomputed each time for given strains εh from (14.14) (which
do depend on the nodal dofs).
The analogous definition of a B-matrix, as introduced in Section 9.2, can be applied here as
follows, leading to a somewhat simpler (yet not necessarily computational beneficial) implemen-
tation. Let us consider the CST (triangular) element in 2D. For this element, the 2D strain
components in Voigt notation, using (14.9), are computed as
Pe
uh1,1 uae,1 Ne,x
a
h
ε11 Pe a=1 1
[ε̃h ] = εh22 = uh2,2 = a a
a=1 ue,2 Ne,x2
h h h
Pe a a a a
2ε12 u1,2 + u2,1 a=1 ue,1 Ne,x2 + ue,2 Ne,x1
xij i j
23
0 ye31 0 ye12 0
ye e = xe,1 − xe,1 , (14.24)
1 32 13 21 ij i j
= 0 xe 0 xe 0 xe Ue with ye = xe,2 − xe,2 ,
2Ae
x32
e y 23 x13 y 31 x21 y 12
e e e e e 2A 21 31 31 21
e = xe ye − xe ye ,
| {z }
=[Be ]
T
Note that we exploited Je = const., and we defined Ue = u1e,1 , u1e,2 , u2e,1 , u2e,2 , u3e,1 , u3e,2 . Fur-
thermore, recall that (xae,1 , xae,2 ) denotes the 2D-location of the element’s node a. Analogous
formulations can, of course, be derived for the constant-strain tetrahedron in 3D.
and the same relations apply as in Section 9.2 (see the definition of the elastic E-matrix there).
Consequently, for the CST element we obtain the element stiffness matrix, nodal internal force
vector, and internal energy of element e as, respectively,
Z
1
Ke = BeT EBe dV = BeT EBe tAe , Fint,e = Ke Ue , Ie = Ue · Ke Ue , (14.27)
Ωe 2
where we exploited that BeT EBe = const. and the volume of element e is |Ωe | = tAe for a 2D
CST element. Be is given in (14.25), and E was defined for isotropic elasticity in (9.28) for the
cases of plane strain and plain stress. Even though not necessarily wise for reasons of memory
consumption, the element stiffness matrix Ke can be computed and stored a-priori for each
element for faster calculation of forces and stiffness matrices during simulations.
107
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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̃(ε̃), (14.28)
∂ ε̃ ∂ ε̃
so that
Z
Ie = W (ε̃h ) dV (14.29)
Ω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 (14.31)
∂Ue Ωe
Note that if σ̃ = E ε̃, the above equations recover the linear elastic definitions with C̃ = E =
const. Otherwise, Te depends on deformation through ε̃h = ε̃h (Ue ), so that one cannot pre-
compute the stiffness matrix anymore but must re-evaluate it each time the nodal displacements
Ue change.
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),
(14.32)
Ne4 (ξ, η) = 4ξη, Ne5 (ξ, η) = 4ηθ, Ne6 (ξ, η) = 4ξθ with θ = 1 − ξ − η.
108
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Since derivatives of the above shape functions are linear, strains (and thus stresses) also vary
linearly within the T6 element. It is therefore known as the linear strain triangle (LST).
The quadratic interpolation implies that element edges of isoparametric elements can be curved,
whereas those of the CST element remain straight during deformation due to the linear inter-
polation.
Analogously, the quadratic tetrahedron (T10, also shown above) has four corner nodes and
six nodes at edge midpoints, resulting in linear strains within the element. This makes it a
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.
109
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 12.1) by scaling the linear scaling of the shape
functions up to 2D. Consider a 2-node bar whose nodes are positioned16 at ξ = ±1 (as shown
above), whose shape functions are
1 1
N̄e1 (ξ) = (1 − ξ), N̄e2 (ξ) = (1 + ξ). (15.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 (15.2)
1
Ne3 (ξ, η) = N̄e2 (ξ)N̄e2 (η) = (1 + ξ)(1 + η),
4
4 1 2 1
Ne (ξ, η) = N̄e (ξ)N̄e (η) = (1 − ξ)(1 + η).
4
16
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.
110
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
P4
One can easily verify that Nea (ξb , ηb ) = δab and a
a=1 Ne (ξ, η) = 1 for all ξ = (ξ, η) in (15.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 . (15.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 ξ, (15.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 10.2). This means we must be able to exactly
represent linear solutions of the type
uh (x1 , x2 ) = c0 + c1 x1 + c2 x2 . (15.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
(15.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 (15.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 13.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 . (15.7)
Ne,x2
Ne,η
111
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
By contrast to the simplicial elements, we no longer have that Je nor ∇ξ Nea are constant because
of the bilinear term ξη in the shape functions. Therefore, strains and stresses are not constant
within an element.
Example 15.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 12.4 as 1 2
x x -1 x 1
Ne1 (x) = 1 − , Ne2 (x) = . (15.8)
∆xe ∆xe
For a reference bar element with nodes at ξ = ±1, the analogous shape functions in 1D read
1−ξ 1+ξ
Ne1 (ξ) = , Ne2 (ξ) = . (15.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 = = . (15.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
= , (15.11)
∆xe e,ξ 2 2
so that we obtain correctly (as verified by differentiating (15.8))
1 1 2 1 2 1 2 1
Ne,x =− =− , Ne,x = = . (15.12)
2 ∆xe ∆xe 2 ∆xe ∆xe
Of course, here we could have obtained the derivatives directly from (15.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 (15.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 ] = . (15.14)
Γ21 Γ22
112
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Towards the FE implementation, let us also introduce the B-matrix notation. To this end, we
write for the 2D setting in Voigt notation
uh1,x1
h
ε11 1 0 0 0 h
u1,x2
[ε̃] = εh22 = 0 0 0 1 . (15.15)
h
uh2,x1
2ε12 0 1 1 0
uh2,x2
We further exploit the inverse function theorem by using relation (15.7), which here leads to
h h
u1,x1 Γ11 Γ12 0 0 u1,ξ
h
u1,x Γ21 Γ22 0 h
2
= u1,η .
0
(15.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 (15.7) is applied indepen-
dently to each of the two components, which results in the block matrix in (15.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,η
(15.18)
with Γij from (15.14) and the shape function derivatives computed from (15.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 (15.19)
∂ξ ∂η ∂ξ ∂η
so that
dA = | dA| = J dξ dη (15.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, (15.21)
Ωe
113
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
A complication here arises from the fact that Be is not constant, so that the above integrals
must be carried out (for general element shapes in real space). Except for undistorted linear
elastic elements, this is unfortunately hardly possible analytically. This will be addressed in
Section 17. Until then, let us quickly introduce higher-order and higher-dimensional elements
based on the Q4.
114
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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
We notice that the above interpolation apparently includes far more monomials than required
for a quadratic interpolation (specifically, ξ 2 η, ξη 2 and ξ 2 η 2 are not required for a complete
quadratic interpolation). Therefore, one can also construct elements with less nodes that still
provide a complete quadratic interpolation.
h h
(-1,1) (1,1) (-1,1) (1,1)
4 7 3 4 7 3
x x
8 9 6 8 6
1 5 2 1 5 2
(-1,-1) (1,-1) (-1,-1) (1,-1)
Q9 in its reference space Q8 in its reference space
One such examples if the 8-node quadratic quadrilateral (Q8) also known as the serendip-
ity element. In this element (shown above), the central node is missing. As a consequence,
shape functions are constructed in a different way than defined by (16.1). One starts by defining
115
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 14.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 (15.2), now
written in 3D, which gives
1 1
Ne1 (ξ, η, ζ) = (1 − ξ)(1 − η)(1 − ζ), Ne2 (ξ, η, ζ) = (1 + ξ)(1 − η)(1 − ζ),
8 8 (16.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 (16.6)
and volume integrals make use of
dV = J dξ dη dζ. (16.7)
116
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
17 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, (17.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. (17.6)
The Riemann sum is probably the simplest approach to computing the integral in (17.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 . (17.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 ].
117
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
More refined formulations can be found in the so-called Newton-Cotes formulae (the trape-
zoidal rule is the Newton-Cotes formula of degree 1). While Riemann and Newton-Cotes for-
mulae are indeed viable schemes to carry out numerical integration, they are rather inefficient,
because, to achieve good accuracy, they require a partition into many segments in general. The
following concept of so-called Gaussian quadrature aims to circumvent these computational
expenses.
f(xi) f(xi)
f(x)
x x x
-1 +1 x0 xi-1 xi xn -1 x0 xi +1
An efficient alternative to the above Riemann sums are quadrature rules (also called cuba-
ture rules in 3D), which are best suited for integrating polynomial functions. The idea is to
approximate the integral by a weighted sum over integration points (as shown in the schematic
above on the right), i.e., we define
Z 1 nQP −1
X
I[u] = f (ξ) dξ ≈ Wi f (ξi ). (17.8)
−1 i=0
Now, the challenge is to choose the number of integration points, nQP , as well as the weights
{W0 , . . . , WnQP −1 } and locations {ξ0 , . . . , ξnQP −1 } of all each integration point. That choice
should depend on the function to be integrated (more specifically, on its smoothness; one can
easily imagine that smooth polynomials require few integration points, while strongly fluctuat-
ing functions require larger numbers of integration points). In the FE context, most functions
of interest will be of polynomial type since our shape functions are commonly defined as poly-
nomials. Any polynomial function is generally written as
f (ξ) = a0 + a1 ξ + a2 ξ 2 + . . . with ai ∈ R const., (17.9)
so that – to integrate a polynomial exactly – we must make sure to integrate exactly all mono-
mials 1, ξ, ξ 2 , etc. up to the required polynomial order.
We say a quadrature rule is “exact of order q”, if it integrates exactly all polynomial functions
g ∈ Pq ([−1, 1]) (or all monimials up to ξ q ). Gauss quadrature generally chooses nQP quadra-
ture points and associated weights such that the quadrature rule is exact of order q = 2nQP − 1.
Let us find the optimal weights and integration points for Gaussian quadrature.
118
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Gauss-Legendre quadrature selects the nodes and weights such that the first 2nQP moments
are computed exactly. In other words, we find the weights and locations by requiring that
Z 1 nQP −1
!
X
k
ξ dξ = Wi ξik , for k = 0, 1, . . . , 2nQP − 1. (17.10)
−1 i=0
These are 2nQP equations for the 2nQP yet unknown parameters (Wi , ξi ) for i = 0, . . . , nQP − 1.
The equations are generally nonlinear and thus hard to solve analytically. Yet, we can find
solutions for the lowest few orders in 1D as follows:
• a single quadrature point, i.e., nQP = 1, approximates the integral by evaluating the
function only at a single location ξ0 ∈ [−1, 1].
The two equations for the two unknowns (the weight W0 and location ξ0 ) are obtained
from requiring the any constant function, f (ξ) = ξ 0 , and any linear function, f (ξ) = ξ 1 ,
must be integrated exactly. This implies that
Z 1 Z 1
! !
ξ 0 dξ = 2 = W0 ξ00 = W0 and ξ 1 dξ = 0 = W0 ξ01 = W0 ξ0 (17.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 (17.13)
2 2 ! 2 2 3 ! 3 3
ξ dξ = = W0 ξ0 + W1 ξ1 , ξ dξ = 0 = W0 ξ0 + W1 ξ1 .
−1 3 −1
119
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Note that, for general functions f (which are not necessarily of polynomial type), one can
sometimes find a decomposition f (ξ) = w(ξ)g(ξ) where w(·) is a known weighting function and
g(ξ) is (approxiately) polynomial, so that a more suitable quadrature rule may be found via
Z 1 Z 1 nQP −1
X
I[u] = f (ξ) dξ = w(ξ) g(ξ) dξ ≈ w(ξi ) g(ξi ). (17.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 ). (17.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
(17.17)
nQP −1
X
= Wk∗ f (ξk )
k=0
with the combined weights Wk∗ = Wi Wj and points ξk = (ξi , ηj ) obtained from the individual
√
quadrature rules in each direction. By symmetry we choose N = nQP so that N 2 = nQP , i.e.,
we have N quadrature points per direction.
• 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.
120
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
• third-order quadrature (q = 3), now has four quadrature points in 2D (nQP = 22 = 4):
1 1
(ξi , ηi ) = ± √ , ± √ and W0 = W1 = W2 = W3 = 1 (17.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. (17.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
Ultimately, the choice of a specific quadrature rule in any dimension depends on the function
f (ξ) to be integrated. If the latter is of polynomial type, then we may choose a Gaussian
quadrature rule that leads to exact integration. Else, we may choose a quadrature rule based
on the smoothness of the function (Appendix I shows that the error introduced by a numerical
quadrature rule strongly depends on the smoothness of function f ). In general, the choice of a
quadrature rule is often a compromise between accuracy and efficiency. In the next section, we
look into quadrature rules specifically for finite elements.
121
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
The quadrature rules we introduced in Section 17 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
W (εh ) dV = W εh (ξ) Je (ξ)te dξ dη ≈ Wk W εh (ξk ) Je (ξk )te ,
Ie =
Ωe −1 −1 k=0
Recall that, in those relations, the shape function derivatives and the strains are computed as,
respectively,
1X a a
∇x Nea = Je−1 ∇ξ Nea , εhij (ξ) = ue,i Ne,j (ξ) + uae,j Ne,i
a
and (ξ) . (18.3)
2 a
Of course, the above can also be reformulated in terms of the B-matrix. For example, for a
linear elastic element in 2D we have seen that
Z nQP −1
X
T
Te = Ke = Be (ξ) EBe (ξ) dV ≈ Wk BeT (ξk )EBe (ξk )Je (ξk )te , (18.4)
Ωe k=0
where we assumed that E = const. across the element (otherwise, E also depends on position ξ).
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
122
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
B-matrices are not necessarily smooth polynomials, one often cannot (or, due to computational
expenses, is not willing to) achieve exact integration for each element. For example, for the
Q4 element we have seen that Je is linear in ξ, hence Γe = Je−1 is a fractional polynomial,
and Be involves both Γe and ∇ξ Nea . As a consequence, BeT EBe (even if E = const.) is some
fractional polynomial, which is hard to integrate exactly in general. Therefore, let us introduce
a minimum requirement for the integration order of a particular element type.
Specifically, our minimum requirement is that an undistorted elastic element is integrated ex-
actly. Thus, we define full integration as the quadrature order needed to integrate an undis-
torted, homogeneous, linear elastic element exactly. An element is undistorted, if element
angles are preserved between reference and real space or, in other words, if J = const. across
the element. The schematics below shows examples of an undistorted and three distorted Q4
elements.
b
a
Let us determine full integration for the element types discussed before:
• The 4-node bilinear quadrilateral (Q4) is undistorted, if the element in real space
has the shape of a rectangle (consider side lengths a and b), so that
ab
J= = const. (18.5)
4
Then, for a linear elastic Q4 element we have
Z 1 Z 1 Z 1 Z 1
a ab abte
Finte,,i = Cijkl εhkl (ξ)N,x
a
j
(ξ) te dξ dη = Cijkl a
εhkl (ξ)N,x j
(ξ) dξ dη,
−1 −1 4 4 −1 −1
(18.6)
• Full integration of the 8-node brick element requires nQP = 8 quadrature points by
the same argument as for the Q4 element, here extended to 3D.
• For simplicial elements, we showed that strains and stresses are constant across an
element, so that a single quadrature point (nQP = 1) at an arbitrary location inside the
123
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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). (18.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 internal force vector of an undis-
torted, elastic element is integrated exactly. By reviewing the element energy and the element
tangent matrix, we make the same observation (i.e., those are integrated exactly as well). For
example, the energy of a linear elastic Q4 element in 2D reads
Z Z 1Z 1
abte 1
Ie = W dV = Cijkl εhij (ξ)εhkl (ξ) dξ dη, (18.8)
Ωe 4 2 −1 −1
where both N,ja (ξ) and N,lb (ξ) are linear in ξ, so that the resulting integrand is a quadratic
polynomial for the Q4 element, in analogy to the above discussion of the nodal forces, cf. (18.6).
Similarly the tangent/stiffness matrix of the linear elastic element,
Z 1 Z 1
abte
(Te )ab
ij = Cijkl a
Ne,xj
b
(ξ)Ne,x (ξ) dξ dη, (18.9)
4 −1 −1
l
follows the same argument. Hence, full integration implies that the element energy, nodal forces,
and tangent stiffness matrix are integrated exactly for a linear elastic, undistorted element. A
summary of full integration for selected element types is given below.
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 19.
124
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 (9.15), which we found for the
externally applied forces, the force on node 1 becomes (with σ11 from (19.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 (19.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. (19.4)
That is, the bottom edge is stretched, while the top edge is compressed (as in beam bending).
smax smax F F U U
x2 3 h 4 h
x1 x x
1 2
smax smax F F U U
a
stress distribution due to Q4 element with equivalent elastic Q4 element deformed
the applied moments nodal forces by the nodal forces
125
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Solving the problem for the case of linear elasticity reduces to a simple linear system of equations
(which involves the element stiffness matrix Ke of the Q4 element, which is not written out
here for brevity):
−F
0
F
0 σmax tb
Ke Ueh = Fext with [Fext ] =
, F = . (19.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 , (19.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 (19.6) into the approximate
element strains, which yields
U U
εh11 = − η, εh22 = 0, εh12 = − ξ. (19.7)
a b
These are to be compared to (19.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. (19.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
126
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 ). (19.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 (19.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 (19.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 (19.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.
127
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
20 Assembly
Irrespective of the particular finite element type that is being used to solve a boundary value
problem, its solution requires the assembly of global vectors and matrices. Recall that shape
functions associated with a node a are non-zero only in elements adjacent to node a in the FE
context. When computing, e.g., the total energy E of a body (not accounting for external work)
discretized into ne non-overlapping elements, we may exploit that
Z ne Z
X ne
X
h
E= W (ε ) dV = W (εh ) dV = Ie , (20.1)
Ω e=1 Ωe e=1
i.e., the total energy is the sum over all element energies. When computing the global force
vectors and incremental stiffness matrices, the situation is more complex, which is why one
commonly introduces an assembly operator A such that
ne ne
Fint = A Fint,e , T = A Te , (20.2)
e=1 e=1
which loops over all ne elements e and adds their respective contributions to the global quanti-
ties. This requires careful book-keeping to keep track of the correspondence between local and
global node numbering, the so-called local-to-global map (and it is the reason elements must
have “knowledge” of their node IDs). Similarly, the inverse operator extracts local element
quantities from the global vector, e.g.,
Ue = A−1 (U ), Fint,e = A−1 (Fint ). (20.3)
e e
For practical purposes, it is helpful to recall that entry Uia (where a = 1, . . . , n is the node
number, and i = 1, . . . , d refers to the coordinate) is located at position (a − 1) · d + i in the
assembled global vector U h (using MATLAB® notation with 1-indexed lists). For example,
consider a 2D problem using 2-node bar elements. If an element connecting nodes 1 and 3
computes the nodal force vectors Fint,e 1 3 , then those are to be added onto the global
and Fint,e
force vector as
1
. . . + Fint,e,1
. . . + F 1
int,e,2
·
·
Fint = (20.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 = · · · · · · · ·
(20.5)
. . . + K 13 . . . + K 13 · · . . . + K 13 . . . + K 13 · ·
31 32 33 34
. . . + K 13 . . . + K 13 · · . . . + K 13 . . . + K 13 · ·
41 42 43 44
· · · · · · · ·
Note that, because nodes have non-zero FE shape functions only in adjacent elements, the above
matrix is generally sparse (which comes with significant computational advantages).
128
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
21 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 22.4). In case
of nonlinear problems – such as those arising from more complex material models and from
the geometric nonlinearity stemming from large deformations – an iterative solution method is
required to solve the generally nonlinear system Fint (U ) = Fext (U ). Note that the external
forces may or may not depend on the deformation. Here, we discuss a few common examples
of such iterative solvers, the most important one being Newton-Raphson iteration.
where in many cases we assume that Fext is independent of U . This, however, is not generally
true – consider, e.g., nodes attached to elastic springs so the nodal force depends on the position
of the node, or a so-called follower force whose direction depends on the body’s deformation
(e.g., a force which remains perpendicular to a deforming beam), or pressure loading (e.g., the
inflating of a balloon, where the forces due to the applied pressure depend on the deforming
surface area).
All iterative solvers start with an initial guess U0 (e.g., U0 = 0), which is then corrected to find
an improved approximation by the update
129
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Note that we have thus broken the nonlinear problem (21.1) (which is hard to solve) into many
incremental linear problems (21.4) (which are easy to solve).
For the mechanical problem in linearized kinematics, the tangent matrix components are
∂Fia
Z
ab h ∂ a a
Tik (Un ) = (Un ) = σij N,xj dV − Fext,i
∂ubk ∂ubk Ω
Z a
∂Fext,i
∂σij b a
= h
N,xl N,xj dV − (21.6)
Ω ∂εkl ∂ubk
Z a
∂Fext,i
a b
= Cijkl N,xj N,xl dV − ,
Ω ∂ubk
where Cijkl are the components of the elastic stiffness tensor (and in the above steps we exploited
its symmetry, knowing that Cijkl = Cjikl = Cjilk = Cklij ).
Recall that C = C(ε) in general, i.e., for nonlinear problems the incremental tangent depends
on the current state of deformation and hence on the nodal displacements U . Only for the
special case of linear elasticity is C a constant tensor containing the elastic moduli and being
independent of deformation. As shown before, we can also write for each element e
Z
Te (U ) = BeT CBe dV, (21.7)
Ωe
where C is, again, the incremental stiffness matrix of the Rmaterial model. In the special case of
linear elasticity, we saw that C = E = const. and Te = Ωe BeT EBe dV = Ke is the constant
element stiffness matrix.
The Newton-Raphson solver requires that det T ̸= 0 in order to find a solution, which is
guaranteed in linear elasticity if no rigid-body mode exists, as discussed in Section 22.4 (i.e.,
the linearized system has no zero-energy mode so that U · T U ̸= 0 for all admissible U ̸= 0).
For linear elastic problems with constant external forces, the Newton-Raphson solver converges
in only a single step, since Fint = KU and therefore T = K = const., so that
130
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
The iterative scheme is identical to the classical NR method described above, except that
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
where, unlike in Section 21.2, β is not a constant but chosen such that f (Un+1 ) = 0. For
example, we may find β from solving
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 (21.12) is in fact the stationarity condition of the minimization problem
which is the motivation for the nonlinear least-squares method described below.
131
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
∂ ∂r −1 ∂r
∆U = − (Un )
∂U ∂U Un ∂U
−1 (21.16)
∂T T
T ∂f T
= − T (Un ) (Un )f (Un ) + (Un )f (Un ) T (Un ) f (Un ).
∂U ∂U
If updates are small, we can neglect the second term in brackets (which requires higher deriva-
tives than what is commonly computed in FEM), which gives
−1 T
∆U = − T T (Un )T (Un )
T (Un ) f (Un ). (21.17)
This latter form is known as the Gauss-Newton method. Note that this reduces to Newton-
Raphson for standard problems (i.e., those with as many equations as unknowns). However,
Gauss-Newton can also be applied to over-determined systems (i.e., in case of having to solve
more equations than unknowns).
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 ) (21.18)
with, e.g., C = cI and c > 0, and starting from some initial guess for U . It is obvious that,
as f → 0, we have U̇ → 0 and thus the method converges to a solution U which satisfies
f (U ) = 0. Discretizing the above may lead to, e.g.,
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 ). (21.20)
c
132
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 (21.21)
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).
133
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
22 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 ) (22.1)
for the vector of all nodal dofs, U . If the material is linear elastic, then Fint (U ) = KU and
system (22.1) is linear. In general (i.e., for anything but linear elastic behavior), the system of
equations in (22.1) is nonlinear. In Section 21, we discussed solution strategies for the above
system of equations, but we still need to turn our attention to boundary conditions, which we
have not discussed in detail so far. This includes both Neumann boundary conditions (leading
to the specific form of Fext (U )) and Dirichlet boundary conditions (imposing constraints on the
degrees of freedom). These will be discussed in the following.
The right-hand side vector Fext in (22.1) includes the combined effects of externally applied
body forces ρb and surface tractions t̂ in general. Of course, if forces are applied only to FE
nodes, then the components of Fext are trivial. However, in reality we often deal with distributed
(and possibly deformation-dependent) loads, which need to be converted into appropriate nodal
forces first.
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
(22.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 (22.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
134
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Analogously, surface tractions result in an external force on node a in direction i, again for
a 2D isoparametric element e, given by
Z Z 1 nQP −1
X
a
Fext,e,i = t̂i N a dS = t̂i (ζ)Nea (ζ) Jζ (ζ)t dζ ≈ Wk t̂i (ζk )Nea (ζk ) tJζ (ζk ). (22.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 20.)
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 = (22.5)
Ωe ∂Ωe ∂ua
a
The resulting force vector Fext,e acting on node a is exactly the sum of (22.3) and (22.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)
135
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Before we dive into specific examples, we point out one important aspect of the implementation
and assembly of the overall problem. So far, we have primarily considered problems with context
external forces, so that we had to solve Fint (U ) = Fext . When the external forces also depend
on the nodal unknowns (as, e.g., in Examples 22.2 and 22.3 below), then the problem to be
solved is in fact
with
E(U ) = Ane=1
e
Ie (Ue ), W (U ) = Ane=1
e
Wext,e (Ue ), (22.8)
such that
∂I ∂E ∂W
f (U ) = (U ) = (U ) − (U ) = Fint (U ) − Fext (U ). (22.9)
∂U |∂U{z } |∂U{z }
Fint Fext
Note that this setup requires that a suitable form of Wext (U ) exists to represent the work done
by the external forces (which can be non-trivial).
When using iterative solvers (as discussed in Section 21), those may require the tangent matrix,
which here implies the complete tangent matrix – including both those contributions from
internal and external forces – so that
∂f ∂Fint ∂Fext
T (U ) = (U ) = (U ) − (U ) = Tint (U ) − Text (U ). (22.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 , (22.12)
∂ua
i.e., the constant external force P is applied only to node b. We note that the associated stiffness
matrix (which would be needed for iterative solution schemes) vanishes, since
a
∂Fext
ab
Text = = 0. (22.13)
∂ub
136
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Wext = My θb ⇒ a
Mext =
∂Wext
= My δab . (22.14) My
∂θa
————
Example 22.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 . (22.15)
2 2
To compute the nodal force vectors, we need to be careful since Espring is the spring energy and
not the work Wext performed by the spring. Therefore, we must add Espring to the potential
energy functional instead of substracting it as external work. Recalling concepts from under-
graduate dynamics, we know that the work done by the spring on the body must equal the
potential difference, so Wext = Espring,0 − Espring where Espring,0 = 0 in our case since the spring
is initially unstretched. Hence, we have Wext = −Espring . The resulting force vector on node a
(all other nodal forces being zero) thus follows as
a ∂Wext ∂Espring
Fext = =− = −k(ua · n)n, (22.16)
∂ua ∂ua
where the minus sign enters due to the use of E instead of Wext (and it makes sense physically:
if node a is displaced along the positive n direction, the spring is stretched and hence the force
on node a must be acting in the opposite direction, since the spring is pulling node a back).
The spring force is an example where the external force vector depends on the nodal displace-
ment ua . The associated tangent stiffness matrix has component Text aa as its only non-zero
(sub)matrix, since
a
∂Fext
ab
Text = = −kn ⊗ n δab = const. (22.17)
∂ub
————
Example 22.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 | , (22.18)
2 x0
where xa is the undeformed position of node a (the node to which the spring is attached), x0
is the other end of the spring, i.e., its anchor point, and xa + ua with displacement ua is the
deformed position of node a (so that l0 = |xa − x0 | is the undeformed spring length). External
force vector and stiffness matrix follow, as before, by differentiation.
137
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
and the external force contribution from element e (associated with node a) follows as
Z
a ∂Wext,e
Fext,e = = −p nNea dS. (22.20)
∂uae ∂Ωe
For example, for a (bi-)linear element in 2D (such as the CST and Q4 elements) element edges
are straight, so that the normal n is constant along each element edge. Further assume that
pressure p acts only on one edge ∂Ω′e of length Le (and an out-of-plane thickness t). In this
special case, the above simplifies to
Z Z
a a pn pLe t
Fext = −p nNe dS = − Nea dS = − n, (22.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 ), (22.22)
2
e∈Na
————
138
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 = . (22.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 . (22.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).
————
139
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 following17 . We will first focus on linear elastic examples and later reconsider
the procedure for nonlinear systems, when discussing iterative solvers in Section 22.3.
22.2.1 Substitution
Brute-force substitution is a simple method: we replace the respective equation for uai in the
system KU = Fext by uai = ûai . For example, to enforce u3 = û3 (using an example with only
a single dof per node), we replace the corresponding equation (i.e., the entries in the stiffness
matrix and external force vector), resulting in
1 1
K11 K12 . . . · · u Fext
· · · · · u2 Fext 2
3 3
0 0 1 0 0 u = û . (22.26)
· · · · · u4 4
Fext
· · · · K55 u5 5
Fext
22.2.2 Condensation
To understand this, let us re-formulate (22.26) by moving the third column to the right-hand
side and inserting u3 = û3 :
1 1
K11 K12 0 K14 · u Fext K13
· · 0 · · 2 2 K23
u3 Fext 3
· · · · 3
0 u = Fext − K33 û , (22.27)
· · 0 · 4 4
· u Fext K43
· · 0 · K55 u5 5
Fext K53
so that we can eliminate the third row and column from the system:
1 1
K11 K12 K14 · u Fext K13
· · · · 2 2
u = Fext − K23 û3 ,
· 4 4 (22.28)
· · · u Fext K43
· · · K55 u5 5
Fext K53
17
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, (22.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).
140
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
This reduced (or condensed ) system must be solved for the unknowns (u1 , u2 , u4 , u5 ), so that
the complete solution is U = (u1 , u2 , û3 , u4 , u5 )T .
The advantage of this method is the reduction in size of the system to be solved. The dis-
advantage is that it is more involved to implement and, if implemented poorly, the matrix
modifications can be computationally expensive as well (in such a case, it can be even more ex-
pensive than the substitution technique when a small number of essential boundary conditions
is being applied to a large system, so the reduction in size is negligible).
We would like to briefly re-assess the enforcement of essential boundary conditions in the context
of iterative solvers, where we do not solve a simple linear system but we use iterative techniques
to solve a nonlinear system in incremental linear steps. In order to impose uai = ûai , we discuss
two implementation strategies.
Strategy I. To enforce uai = ûai , we can include this Dirichlet boundary condition directly
in the initial guess (i.e., make sure that uai = ûai within vector U0 ) and subsequently iterate
according to
Un+1 = Un + ∆Un (22.29)
where the system of equations is modified such that ∆uai,n = 0 for all iterative steps n. The
latter can be accomplished by the same substitution/condensation techniques we used above to
impose essential boundary conditions. For example, when using a Newton-Raphson solver (see
Section 21.1), we must solve
T (Un )∆Un = −f (Un ), (22.30)
where we now modify the row of the tangent stiffness matrix T (Un ) and right-hand-side vector
f (Un ) such that ∆uai,n = 0 is enforced (see Section 22.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 22.2), it
comes with one disadvantages: when we enforce the boundary condition uai = ûai directly in the
initial guess U0 (while using, e.g., the solution from a previous load step as the initial guess
for all remaining dofs in U0 ), the resulting initial guess U0 may include a rather strong local
deformation surrounding node a. This can lead to large local strains and stresses within adja-
cent elements and possibly lead to nonsensical solutions or a failure of convergence in nonlinear
problems.
Strategy II. As a remedy to the above problems, we may alternatively choose to not set
uai = ûai in the initial guess and simply chose U0 as, e.g., the solution from the previous load
step (or any other more or less sophisticated guess). In subsequent iterations, we then solve
T (Un )∆Un = −f (Un ), (22.31)
where we modify both T (Un ) and f (Un ) to enforce
∆uai,n = ûai − uai,n (22.32)
so that the incremental update at iteration step n,
uai,n+1 = uai,n + ∆uai,n = uai,n + ûai − uai,n = ûai
Un+1 = Un + ∆Un ⇒ (22.33)
imposes uai = ûai in a more natural, incremental fashion without modifying the initial guess.
141
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 . (22.34)
2
If a particular global vector of the nodal displacements U ∗ ̸= 0 corresponds to rigid-body
motion (i.e., translations ua = u for all a = 1, . . . , n possibly with rigid rotations superim-
posed), then we must have I = 0 since rigid-body motion does not contribute any strain energy.
Consequently, we must have
U ∗ · KU ∗ = 0. (22.35)
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
142
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
In any FE model, we must suppress each rigid-body mode via appropriate essential boundary
conditions before solving a boundary value problem. In 2D we need three essential bound-
ary conditions to suppress rigid-body translations and rotations, in 3D we need a total of six
(assuming that nodes carry only displacement dofs), as shown above.
Finally, if nodes carry further dofs beyond displacements (e.g., in case of beam elements or
coupled problems), the situation must be reassessed to make sure all possible rigid modes are
suppressed.
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
We close this section by outlining one simple test that one can perform to verify the accuracy
of a particular element type. The so-called patch test: one constructs a mesh of distorted
elements (as shown below) and applies uniform tractions on its boundaries corresponding to a
homogeneous state of stress (such as a uniform pressure p applied to its boundaries). The test
is passed, if the FE solution correctly represents affine deformation (i.e., constant strains within
elements), which is the analytical solution for this scenario.
p p p p
143
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
23 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 9, 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 (23.1)
σij nj (x, t) = t̂(x, t) on ∂ΩN
with suitable initial conditions. Now, we have u : Ω × R → Rd (i.e., the displacement field
u(x, t) varies with position x ∈ Ω and time t ∈ R), and it requires sufficient differentiability
in both space and time. Notice that the quasistatic case is easily recovered by neglecting the
inertial term ρü, i.e., if the mass density ρ or the acceleration a(x, t) = ü(x, t) are negligible
or vanish.
Analogous to the quasistatic case, we can cast the strong form (23.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] (23.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 (23.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. (23.4)
t1 Ω 2 Ω ∂ΩN
Note that, without dynamical effects (u̇ = 0), this action reduces to the negative of the potential
energy functional (9.3), which we used in quasistatic boundary value problem.
144
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
The action principle (also known as the principle of stationary action18 ) 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 (23.4) with respect to u (again using the
divergence on the stress-term, as done in quasistatic; cf. (9.7)), we obtain the stationarity
condition
Z t2 Z Z Z
δA[u] = (ρ u̇i δ u̇i − σij δui,j ) dV + ρbi δui dV + t̂i δui dS dt = 0. (23.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 (23.9)
t1 Ω Ω ∂ΩN
Note that, without the first term, we recover the quasistatic formulation (cf. Section 9).
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). (23.10)
a=1 a=1
18
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.
145
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
The shape functions N a (x) can be the same introduced in previous sections (simply imagine
the nodes in a mesh moving over time).
The semi-discretization in (23.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). (23.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 (23.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 (23.14) is the dynamic governing equation to be used in the
finite-element setting. Of course, for quasistatic problems we have Ü = 0, so (23.14) reduces
to the static version (9.14). Let us look into the new term involving mass matrix M .
146
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Note that this is the consistent mass matrix for 1D motion, i.e.,
U = (u1 , u2 )T . If each node moves in 2D and hence has two dofs u 2
1
u22
1
per node in the plane, i.e., U = (u11 , u12 , u21 , u22 )T , then each pair of 1 u 1 2 u21
dofs (horizontal and vertical) is linked by the above mass matrix, x
so that the total consistent mass matrix in 2D becomes
2 0 1 0 0 0 0 0 2 0 1 0
me
0 0 0 0 m
+ e 0 2
0 1 m
= e 0
2 0 1
Mbar,2D = . (23.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 (23.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. (23.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 . (23.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 . (23.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 ). (23.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, (23.21)
Ω 2 Ω 2 a=1 b=1
2 Ω
a=1 b=1
147
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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. (23.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 = (23.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 = (23.25)
2 4
and
1 me 1 2
(u̇e ) + (u̇2e )2 + u̇1e u̇2e .
Tconsistent = U̇e · Mconsistent,e U̇e = (23.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).
148
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
24 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 (24.5)
∂U
or, invoking equilibrium (24.2), recalling the definition of the tangent stiffness matrix T =
∂Fint /U , and dropping all higher-order terms,
M V̈ + T (U0 ) V = 0 (24.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 (24.7)
149
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
When we consider vibrations about the undeformed ground state, then U0 = 0 and U (t) = V (t).
Therefore, the form of the linearized equations of motion for free vibrations (without external
forcing and without damping) is
M Ü + T U = 0, (24.8)
The general type of solution of the above ODE is of the harmonic form19
Insertion into (24.8) leads to (exploiting that the equation must hold for all times t)
T − ω 2 M Û = 0
(24.10)
det T − ω 2 M = 0.
(24.11)
For an FE discretization with n×d degrees of freedom (n nodes in d dimensions), the eigenvalue
problem (24.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 . (24.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, (24.13)
j=1
19
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.
20
Since M is positive-definite, we may multiply (24.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 Û .
150
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
whose coefficients c∗j we must find for a given set of initial conditions. Recall that, for a
mechanical initial boundary value problem, we have two initial conditions per node and per
degree of freedom (e.g., imposing initial displacement and velocity vectors for each node). This
provides the 2 × n × d equations from which the coefficients c∗j ∈ C can be found (since those
are complex, we have in fact 2 × n × d unknowns, viz. the real and imaginary parts of each of
the n × d coefficients). Roughly speaking, free vibrations are characterized by the superposition
of vibrations at all eigenfrequencies with their respective eigenmodes.
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= . (24.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 (24.10). To this end, we first solve the characteristic equation
det K − ω 2 M = 0.
(24.15)
(K − ω 2 M )Û = 0 (24.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 . (24.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 . (24.19)
mL
and
1 1
Û0lumped = , Û1lumped = . (24.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.
151
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
For comparison, let us compute the exact solution by studying the free vibration of a continuous,
homogeneous, linear elastic bar. Linear momentum balance, i.e.,
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 (24.22) with the above initial conditions yields the mode shape
nπx
û(x) = A cos with A ∈ R, n ∈ Z. (24.24)
L
and the associated eigenfrequency
r
EA
ωn = n π . (24.25)
mL
Consequently, the lowest two eigenfrequencies are obtained for n = 0, 1 as
r
EA
ω0 = 0, ω1 = π . (24.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
152
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
with an excitation frequency Ω ∈ R and a force excitation of amplitude F̂ext ∈ Rdn . (24.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 . (24.30)
The homogeneous solution corresponds to a free vibration (see Section 24.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 ,
(24.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, (24.33)
then
−1 −1
Û = −Ω2 M + T F̂ext ⇒ Upart (t) = −Ω2 M + T F̂ext cos(Ωt) (24.34)
Hence, the system responds to a harmonic excitation – at steady state – with a harmonic
vibration at the excitation frequency. As the excitation frequency approaches an eigenfrequency
(Ω → ωj ), matrix −Ω2 M + T becomes singular and the displacement amplitude vector Û
The starting point of the concept of modal decomposition (also known as modal analysis) is
to express the unknown time history of the vector of nodal dofs in a carefully chosen basis, viz.
n×d
X
U (t) = zi (t) Ûi (24.35)
i=1
where we use the (somehow normalized) eigenvectors Ûi of the system as basis vectors to repre-
sent the unknown function U (t) with unknown scalar time-dependent coefficient functions zi (t).
This basis representation has significant advantages – for which to understand we need a some-
what longer derivation.
153
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
where we pre-multiplied each of the two equations by the respective other eigenvector. Sub-
traction of the two equations (exploiting that T is by definition symmetric) results in
2 2
(ω(i) − ω(j) ) Û(i) · M Û(j) = 0 ⇔ ωi = ωj ∨ Ûi · M Ûj = 0. (24.37)
This implies that either ωi = ωj (considering only positive eigenfrequencies) or Ûi · M Ûj . If
we assume that we have only distinct eigenfrequencies21 , then we may conclude that
Ûi · M Ûj = 0 if i ̸= j. (24.38)
Let us normalize the eigenvectors in the following fashion:
Û(i)
Ûi ← q so that Û(i) · M Û(i) = 1. (24.39)
Û(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) · T Û(i) ωi2 , if i = j,
ωi2 = = Û(i) · T Û(i) ⇒ Ûi · T Ûj = (24.44)
Û(i) · M Û(i) 0, else.
Let us now return to the modal decomposition of a linearized, elastic system, using the Fourier
representation
n×d
X
U (t) = zi (t) Ûi , (24.45)
i=1
21
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 (24.38).
154
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
where {Û1 , . . . , Ûn } are the n eigenmodes of the system. That is, we pre-compute the eigenvec-
tors and seek a solution as a linear superposition of all eigenvectors with some unknown scalar
coefficients zi (t), which are continuous functions of time (maintaining the semi -discretization).
We substitute (24.45) into the linearized equations of motion with external forces, M Ü +T U =
Fext , so we arrive at
n×d
Xh i
z̈i (t) M Ûi + zi (t)T Ûi = Fext (t). (24.46)
i=1
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 (24.48) are known. The resulting system
of decoupled linear ODEs can relatively inexpensively be solved for the functions zj (t) – either
analytically or numerically, depending on the nature of Fext (t).
For many practical problems, only a limited number of modes are important, so we may restrict
the representation (24.45) to include only the lowest m < n × d modes (corresponding to the m
lowest eigenfrequencies). Therefore, significant numerical efficiency can be gained by truncating
the Fourier sum and only using the m lowest modes, which is referred to as order reduction:
m
X
U (t) = zi (t) Ûi , m < n × d. (24.49)
i=1
For example, if a loading scenario is prone to excite only the lowest few eigenmodes (such as,
e.g., when an earthquake excites a building at low frequencies), then m ≪ n may yield an
accurate and efficient approximation.
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 (23.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,
155
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
which provides velocity-proportional damping. The most common form of C used in structural
FEA is mass- and stiffness-proportional damping, which assumes22
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. 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 (24.34)
now becomes
h −1 i
Upart (t) = Re −Ω2 M + iΩC + T F̂ext cos(Ωt). (24.53)
Analogously, adding structural damping to the modal analysis approach demonstrated above
turns (24.48) into
z̈j (t) + (a + bωj2 )żj (t) + ωj2 zj (t) = Ûj · Fext (t) for j = 1, . . . , n × d. (24.54)
22
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.
156
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
If the time-dependent solution for the nodal variables U (t) cannot be obtained in a continuous
manner (e.g., as discussed above for free vibrations or via modal decomposition), then one usu-
ally seeks solutions in a time-discretized fashion (e.g., by using finite-difference approximations
in time). This turns the previously introduced semi -discretization of our fields of interest into
a proper discretization in both space and time.
As discussed in Section 3 at the beginning of this course, finite
differences are a convenient technique when the discretization is
applied to a regular grid with uncomplicated boundary conditions t
(such as when choosing constant time increments ∆t with known
initial conditions). We here re-use those techniques introduced back
in Section 3 for the discretization in time. Specifically, we define a ua
constant time increment ∆t > 0 and seek solutions at discrete time
intervals, writing ua
Dt ua
∆t = tα+1 −tα , ua (tα ) = ua,α , U α = U (tα ) ∀α≥0
ua
and arbitrarily choosing t0 = 0.
In order to solve the equations of motion, we must choose between explicit and implicit inte-
gration schemes – which come with all the advantages and disadvantages discussed in general
in Section 3. Let us first turn to the simpler case of explicit time integration23 .
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 (24.50) (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 (25.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,
23
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.
157
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
which is diagonal). Yet, all nonlinearity that is possibly inherent in Fint (U ) is irrelevant to
the solution procedure, as the internal forces in (25.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 = (25.4)
ωmax
with ωmax being the highest eigenfrequency of the FE problem (see Section 24.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 ∝ (25.5)
hmin
For example, we showed pin Example 24.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 ]. (25.6)
a-1
t a-Dt/2
and t N a-1
(tα+1 − t)(tα − t) Dt
N α−1 (t) = . (25.7)
2(∆t)2
158
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
This piecewise-quadratic interpolation with the above range of validity ensures that U (t) is
twice differentiable (as needed for the acceleration). It further guarantees the continuity of not
only U (t) over time but also of the derivatives
∂ α+1 α ∆t ∂ α−1 α ∆t
N (t − 2 ) =0 and N (t + 2 ) = 0, (25.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. (25.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 , (25.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 . (25.11)
(∆t)2
a=1
Next, we must insert the discretization into the weak form (23.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α ). (25.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 (23.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, (25.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 (25.14)
Z Z
α b
+ ρbi (t )N dV + t̂i (t )N dS = 0 ∀ vib
α b
Ω ∂ΩN
159
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
for each time step α (0 ≤ tα ≤ nt ∆t) and for all admissible choices of vib . The latter implies
that the above terms in brackets must vanish, or that we must have
When inserting our definitions of the consistent mass matrix and the internal/external force
vectors (cf. (23.15)), the above turns out to be equivalent to
U α+1 − 2U α + U α−1
M + Fint (U α ) − Fext (tα ) = 0. (25.16)
(∆t)2
This is identical to (25.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-
β method24 . 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 ) (25.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 ). (25.19)
2
24
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.
160
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Ü α+1 + Ü α t t − tα
Z
α
U̇ (t) = U̇ + dτ = U̇ α + Ü α+1 + Ü α , (25.20)
2 tα 2
and inserting this into (25.17) with U (tα ) = U α gives
(t − tα )2
U (t) = U α + U̇ α (t − tα ) + Ü α+1 + Ü α . (25.21)
4
Finally, evaluating (25.20) and (25.21) at time tα+1 yields, respectively,
∆t
U̇ α+1 = U̇ α + Ü α+1 + Ü α ,
2
(∆t)2 (25.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 (25.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 . (25.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β)Ü α (25.26a)
2
h i
U̇ α+1 = U̇ α + ∆t γ Ü α+1 + (1 − γ)Ü α (25.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.
161
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 (25.26) into a form that allows us to perform algorithmic time
stepping. To this end, let us first solve (25.26a) for the acceleration at the new time tα+1 :
1 1 − 2β
Ü α+1 = U α+1
− U α
− ∆t U̇ α
− Ü α . (25.27)
β(∆t)2 2β
Insertion into (25.26b) yields
γ α+1 1 − 2β α
U̇ α+1 = U̇ α + ∆t(1 − γ)Ü α + U − U α + ∆t U̇ α − γ ∆t Ü
β ∆t 2β
(25.28)
γ γ γ
U̇ α + U α+1 − U α − ∆t − 1 Ü α .
= 1−
β β ∆t 2β
Next, inserting both velocity (25.27) and acceleration (25.28) into the equation of motion at
the new time tα+1 ,
M Ü α+1 + C U̇ α+1 + Fint (U α+1 ) − Fext (tα+1 ) = 0, (25.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 Ü (25.30)
β(∆t)2 β ∆t 2β
γ α γ α γ α
+C U + − 1 U̇ + ∆t − 1 Ü .
β ∆t β 2β
The right-hand side of (25.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 21.1. Specifically, we now must solve
f (U α+1 ) = M ∗ U α+1 + Fint (U α+1 ) − Fext
∗
(tα+1 , U α , U̇ α , Ü α ) = 0, (25.31)
162
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
where we simply rewrote (25.30) in a more concise form with the abbreviations
1 γ
M∗ = 2
M+ C = const. (25.32)
β(∆t) β ∆t
and
∗ 1 1 1
Fext (tα+1 , U α , U̇ α , Ü α ) α+1
= Fext (t )+M α
U + α
U̇ + − 1 Ü α
β(∆t)2 β ∆t 2β
(25.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 (25.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 ). (25.34)
β(∆t) β ∆t ∂U
Boundary conditions can be implemented in the same fashion as for the quasistatic solvers
discussed in Section 22.3.
In the special case of a linear elastic problem, the nonlinear system of equations turns into a
linear one, viz.
f (U α+1 ) = M ∗ U α+1 + KU α+1 − Fext
∗
(tα+1 , U α , U̇ α , Ü α ) = 0, (25.35)
so that we must solve the linear problem
(M ∗ + K) U α+1 = Fext
∗
(tα+1 , U α , U̇ α , Ü α ). (25.36)
The algorithmic structure is as follows. At each time step, we solve (25.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 (25.27) and Ü α+1
from (25.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 (25.26a) and
(25.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 α )
(25.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≤α≤ , β= , γ = + α, (25.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.
163
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 (25.3) without the need for iterations to solve a system, whereas consistent
mass matrices can be conveniently used in the implicit update rule (25.30), where a system of
equations must be solved anyways.
164
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
26 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), (26.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). (26.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 = . (26.3)
∂X ∂Xj
When inserting the relation (26.2), we notice that
∂xi
Fij = = δij + ui,j ⇔ F = I + ∇u. (26.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, (26.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]. (26.6)
165
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
The first variation in (26.7) looks quite similar to the small-strain version, cf. (9.6). Conse-
quently, applying a finite element discretizatio of Bubnov-Galerkin type leads to an FE govern-
ing equation analogous to (9.15). That is, we again arrive at
Fint (U h ) − Fext = 0, (26.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 (26.10)
Ω Ω ∂ΩN
In a nutshell, the linearized and finite variational problems result in the same system of equa-
tions (26.9). For the special case of linearized kinematics, we have Pij → σij , so that we recover
the small-strain version (9.15). Otherwise, the above problem is generally nonlinear (even when
considering elasticity at large strains) and requires an iterative solution method.
This is especially true at finite strains, since even the external forces can lead to significant
nonlinearity and dependence on U . In the above variational formulation we assumed that t̂ =
const., i.e., that the externally applied forces are constant and do not depend on deformation. As
discussed in Section 22.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
166
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Since the overall setup is equivalent, this also implies that all finite element concepts discussed
so far can be applied to finite-deformation problems. That is, all element types, quadrature
rules, solvers, etc. are fully applicable here as well.
Of course, this only an extremely condensed description of finite elements for finite kinematics.
The devil is in the detail, and many challenges may arise when dealing with a nonlinear setting
involving, e.g., large strains, high strain rates, complex material behavior including inelasticity,
damage, and failure, etc., which we cannot discuss in this course.
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.1, mechanical, thermal and also
electromagnetic variational problems have a common structure of their governing equations.
For a thermal problem in d dimensions, we aim to find the generally time-dependent temper-
ature field
T = T (x, t) (26.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 ,
(26.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. (26.16)
Ω 2 ∂ΩN
167
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
This functional indicates that we need to seek solutions T = T (x) from within the space
n o
U = T ∈ H 1 (Ω) : T = T̂ on ∂ΩD , (26.17)
which is analogous to the mechanical problem (cf. Section 9.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 , (26.18)
Ω ∂ΩN
with
U0 = δT ∈ H 1 (Ω) : δT = 0 on ∂ΩD ,
(26.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 . (26.21)
Ω ∂ΩN
This must hold for all admissible variations δT ∈ U0 . Therefore, (26.21) is equivalent to
Ergo, the signs are correct, as we recover the (time-independent) strong form (26.14). We hence
conclude that extremal points T ∈ U of (26.16) are indeed guaranteed to satisfy the governing
equations (26.14) and are thus classical solutions. Differently put, functional (26.16) is the
correct energy functional corresponding to the (static) strong form given by (26.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 . (26.23)
Ω Ω
The energy functional (26.16) and the resulting weak form (26.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 ), (26.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. (26.25)
Ω Ω ∂ΩN
168
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
This form is analogous to, e.g., that of the mechanical problem of a bar whose energy functional
was derived as (6.36).
Insertion into the weak form (26.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. (26.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, (26.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. (26.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 23.
169
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
We close by pointing out that (26.31) bears great similarity to the dynamic mechanical FE
governing equations of Section 23, 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).
170
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 11).
(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 18 (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 ). (27.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 = (27.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
171
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
∂e
(z) = 0 for xi ≤ z ≤ xi+1 . (27.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
(27.5)
∂x 2 ∂x
Using (27.4), we find that
(xi − z)2 ∂ 2 e
e(z) = − (z) + O(h3 ). (27.6)
2 ∂x2
Note that
2
h2
2 xi+1 − xi
(xi − z) ≤ = , (27.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 . (27.8)
8 xi ≤x≤xi+1 ∂x2
As shown in Appendix C, the above error bound can be significantly generalized. For
polynomial shape functions of order k and u ∈ H k+1 (Ω), we have
hk
|uh − u|H 1 (Ω) ≤ |u| k+1 and ∥uh − u∥H 1 (Ω) ≤ c hk |u|H k+1 (Ω) , (27.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).
172
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
(vi) Finally, no simulation is free of modeling errors, which refers to the large collection
of errors made by the selection of the analytical model to be solved (before starting any
numerical approximation). For example, we make choices about an appropriate material
model, choose material parameters, boundary conditions, and geometric simplifications
including reductions to lower dimensions (e.g., plane strain or plane stress instead of a 3D
simulation). Any such decision is prone to introducing errors.
All of the above error sources sum up to the total numerical error introduced in every simulation.
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 , (27.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 (27.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. (27.11)
Ωe
173
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Note that this definition is not unique and one could also use the L2 -norm
Z
∥ε − ε∗ ∥2e = ∥ε∗ − ε∥2 dV. (27.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 = , (27.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.
174
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 = , (27.15)
minq J(ξq )
i.e., we compare the minimum to the maximum value of the Jacobian within an element e.
175
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Ideally, for an undistorted element we have J(ξq ) = const. and hence maxq J(ξq ) =
minq J(ξq ) or je = 1. If je ̸= 1, then the element is distorted – the more the further je is
away from 1.
• wrong element types are a common reason for trouble
(e.g., using structural vs. solid elements, or using 2D vs.
3D elements). 2D elements can effectively be used only if stress
concentration
the problem is plane-strain or plane-stress (and the element
thickness must be set correctly). Structural elements are sig-
nificantly more efficient than solid elements, but they come
with strong limitations and, e.g., cannot accurately repre- solid model beam model
sent stress concentrations encountered near sharp corners (as
shown on the right).
• linear vs. nonlinear analysis: are deformations expected to be large or small (so that
finite or infinitesimal strains can be used, respectively)? Is the material model linear
elastic, or should a finite-deformation model be used? These questions must be answered
before setting up a simulation.
• boundary conditions must be chosen appropriately (at the right locations, of the right
type and magnitude). If symmetries can be exploited, only a reduced system can be
modeled efficiently, but boundary conditions must be chosen correctly, and it must be
ensured that the solution is indeed symmetric (e.g., when studying buckling problems,
the assumption of symmetry automatically rules out asymmetric buckling modes; the
same applies to vibrational eigenmodes).
• step sizes, i.e., the load step size in quasistatic studies and the time step size ∆t in
dynamic studies, must be chosen to ensure convergence and stability of the solver.
• units must be chosen properly and entered consistently (e.g., always stick to SI units –
but bare in mind the problems associated with large numbers, cf. Section 27.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.
176
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 ) ≈ , (28.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
25
Studies of significant errors resulting from the improper use of rates can be found, e.g., here and here.
177
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
statically since an analytical tangent is available), the dynamic solver may converge to
one of many equilibrium solutions and, depending on the initial conditions, may take one
quite far from the sought solution.
178
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
As a remedy, techniques like the eXtended FE Method (XFEM) have been introduced,
which enrich the interpolation space U h by singularities of the expected type. For example,
for fracture problems within linearized kinematics, the stress is expected to diverge as
√
1/ r at the crack tip with r > 0 being the distance from the tip. Hence, including shape
functions of this type allows the interpolation to capture the diverging mechanical fields,
thus removing the singularity and yielding reasonable solutions.
• damage and failure: when a material model includes damage or failure, it generally soft-
ens under increasing loads (as the material suffers from damage, its stiffness ultimately
tends to zero under increased loading). Such behavior causes numerical difficulties, be-
cause the softening branch of the stress-strain response leads to instability (e.g., most
iterative solvers fail when the tangent matrix T is no longer positive-definite, which is
generally the case during mechanical softening). This manifests not only in solver failure
but also in mesh dependence (again, a study of h-convergence should identify such issues).
179
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Appendices
180
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
A Vector Spaces
φ : X ∈ Ω → φ(X) ∈ Rd or φ : Ω → Rd , (A.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:
181
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
B 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), . . . (B.3)
2n n! dxn 2
182
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
• trigonometric functions:
πnx
pn (x) = cos (B.5)
L
are orthogonal on Ω = (−L, L), since
Z L 2L, if m = n = 0,
pn (x) pm (x) dx = L, if m = n ̸= 0, (B.6)
−L
0, else.
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:
183
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
ess sup |u(x)| = M with the smallest M that satisfies |u(x)| ≤ M for a.e. x ∈ Ω. (B.11)
x∈Ω
Now, that we have norms, we can generalize our definition of the distance. If un , u ∈ U equipped
with a norm ∥·∥ : U → R, then we define the distance as
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 → ∞. (B.14)
i=0 i=0
Given a point u in a normed linear space U, a neighborhood Nr (u) of radius r > 0 is defined
as the set of points v ∈ U for which d(u, v) < r. Now, we can define sets properly:
A subset V ⊂ U is called open if, for each point u ∈ V, there exists a neighborhood Nr (u)
which is fully contained in V. The complement V e of an open set V is, by definition a closed set.
The closure V of an open set V is the smallest closed set that contains V. In simple terms, a
closed set is defined as a set which contains all its limit points. Therefore, note that
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).
184
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
We can use these norms to define function spaces, e.g., the L2 -space of functions:
Z
u2 dx < ∞
L2 (Ω) = u : Ω → R : (B.16)
Ω
Examples:
• Piecewise constant functions u (with ess supx∈Ω |u(x)| < ∞) are square-integrable and
thus in L2 .
185
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
C Approximation Theory
PN
Motivation: in computational mechanics, we seek approximate solutions uh (x) = a=1 ua Na (x),
e.g., a linear combination of basis functions Na (x) with amplitudes ua ∈ R.
Questions: How does uh (x) converge to u(x), if at all? Can we find an error estimate ∥uh − u∥?
What is the rate of convergence (how fast does it converge, cf. the truncation error arguments
for grid-based direct methods)?
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. (C.6)
0 π 0
so that
b b
h2
Z Z
2 2
u′h (x) ′
− u (x) dx ≤ 2 u′′ (x) dx (C.8)
a π a
186
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 (Ω) (C.10)
Ω
Examples in 1D:
• from before:
Z b 1/2
′ 2
|u|H 1 (a,b) = u (x) dx (C.11)
a
• analogously:
Z b 1/2
′′ 2
|u|H 2 (a,b) = u (x) dx (C.12)
a
h2 2 h
|uh − u|2H 1 (a,b) ≤ |u| 2 ⇒ |uh − u|H 1 (a,b) ≤ |u| 2 (C.13)
π 2 H (a,b) π H (a,b)
Hence, the topology of convergence is bounded by the regularity of u. Convergence with
h-refinement is linear.
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. (C.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 . (C.16)
π 2 H (a,b)
hk
|uh − u|H 1 (a,b) ≤ |u| k+1 (C.17)
π k H (a,b)
187
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Why is the Sobolev semi-norm not a norm? Simply consider the example u(x) = c > 0. All
higher derivatives vanish on R, so that |u|H k (Ω) = 0 for Ω ⊂ R and k ≥ 1. However, that does
not imply that u = 0 (in fact, it is not).
Let us introduce the Sobolev norm (notice the double norm bars)
k
!1/2
X
∥u∥H k (Ω) = |u|2H m (Ω) or for short ∥u∥k = ∥u∥H k (Ω) . (C.18)
m=0
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) (C.21)
a a
For practical purposes it is convenient to also introduce the so-called energy norm
p
|·|E = B(·, ·), (C.24)
188
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
where B(·, ·) is the bilinear form of the potential energy. This norm is helpful for quantifying
errors. For example, if we find an approximate solution uh for the displacement or temperature
field, then the error can be quantified as
q
u − uh = B(u − uh , u − uh ). (C.25)
E
Notice that, unlike for, e.g., the Euclidean norm, u − uh E does not necessarily imply u−uh = 0
so that, strictly speaking, the above energy norm is only a semi-norm. To turn it into a proper
norm, we need to exclude solutions corresponding to rigid-body motion (i.e., solutions that
imply uniform translations or rotations of the u-field but without producing gradients in u). If
we assume that essential boundary conditions are chosen appropriately to suppress rigid-body
motion by seeking solutions
u ∈ U = u ∈ H 1 : u = û on ∂ΩD ,
(C.26)
189
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
D 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) . (D.3)
|α| = α1 + . . . + αn . (D.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α (D.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 + . . . (D.8)
190
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
∂ |α| u
Dα u = and D0 u = u (D.9)
∂xα1 1 · . . . · ∂xαnn
A common notation is
X X ∂ |α| u
Dα u = (D.10)
α1 ,...,αn ∂xα1 1 · . . . · ∂xαnn
|α|=β
s.t. |α|=β
so that
Z
∂u ∂v ∂u ∂v
⟨u, v⟩H 1 (R2 ) = uv + + dx1 dx2 (D.14)
R2 ∂x1 ∂x1 ∂x2 ∂x2
and
Z " 2 2 #
∂u ∂u
∥u∥2H 1 (R2 ) = u2 + + dx1 dx2 . (D.15)
R2 ∂x1 ∂x2
This is the set of all functions whose derivatives up to mth order all exist and are square-
integrable.
As an example, u ∈ H 1 (Ω) implies that u and all its first partial derivatives must be square-
integrable over Ω because (D.15) must be finite.
191
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Let us look at the example u(x) = |x| and take Ω = (−1, 1). Then, we have u′ (x) = H(x) (the
Heaviside jump function) and u′′ (x) = δ(x) (the Dirac delta function). Therefore,
Z b
u2 (x) dx < ∞ ⇒ u ∈ L2 (Ω) = H 0 (Ω)
a
Z b 2 Z b
∂u ∂u
dx = H 2 (x) dx < ∞ ⇒ ∈ L2 (Ω) and u ∈ H 1 (Ω) (D.17)
a ∂x a ∂x
Z b 2 b
∂2u ∂2u
Z
dx = δ 2 (x) dx = ∞ ⇒ ∈
/ L2 (Ω) and / H 2 (Ω)
u∈
a ∂x2 a ∂x2
Note that one usually indicates the highest order k that applies (since this is what matters for
practical purposes), so here we thus conclude that u ∈ H 1 (Ω).
H ∞ ⊂ . . . ⊂ H 2 ⊂ H 1 ⊂ H 0 = L2 . (D.18)
Notice that, even though polynomials u ∈ Pk (Ω) are generally in H ∞ (Ω) for any bounded
Ω ⊂ Rd , they are not square-integrable over Ω = Rd . Luckily, in practical problems we usually
consider only finite bodies Ω. To more properly address this issue, let us introduce the support
of a continuous function u defined on the open set Ω ∈ Rd as the closure in Ω of the set of all
points where u(x) ̸= 0, i.e.,
supp u = x ∈ Ω : u(x) ̸= 0 . (D.19)
This means that u(x) = 0 for x ∈ Ω \ supp u. We may state, e.g., that functions u : Ω → R
with a finite support Ω ⊂ Rd and ess supΩ < ∞ are square-integrable over Ω.
Finally, let us define C0k (Ω) as the set of all functions contained in C k (Ω) whose support is a
bounded subset of Ω. Also, notice that
and
\
C0∞ (Ω) = C0k (Ω). (D.21)
k≥0
192
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
E Operators
A : u ∈ U → A(u) ∈ V, (E.1)
A simple example is
du
A(u) = c , (E.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.
193
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
F Uniqueness of solutions
One of the beauties of variational problems of the type (6.36) is that a unique minimizer exists
by the Lax-Milgram theorem. This is grounded in (assuming |Ω| < ∞ and u, v ∈ U with
some Hilbert space U):
For a bilinear form B(u, v) = ⟨grad u, grad v⟩, this is satisfied by the Cauchy-Schwarz
inequality (using L2 -norms):
|B(u, v)| ≤ C ∥grad u∥L2 (Ω) ∥grad v∥L2 (Ω) ≤ C ∥grad u∥H 1 (Ω) ∥grad v∥H 1 (Ω) (F.2)
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.36) satisfy the above and hence
have a unique solution.
194
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
G Vainberg’s theorem
We have seen that variational problems are beneficial for numerical solution approaches as
opposed to solving the strong form directly. Whether or not a given strong form possesses a
variational structure is an important question, which may be answered by Vainberg’s theorem.
Consider a weak form
Let us check if G derives from a potential I, i.e., whether G = δI is the first variation of some
potential I. This would imply that
d
G(u, δu) = Dδu I[u] = lim I[u + δu]. (G.2)
ϵ→0 dϵ
Now recall from calculus that for any continuously differentiable function f (x, y) we must have
by Schwartz’ theorem
∂ ∂f ∂ ∂f
= . (G.3)
∂y ∂x ∂x ∂y
We can use the same strategy here to formulate whether or not a weak form derives from a
potential. Specifically, we can take one more variation and state that
Dδu2 G(u, δu1 ) = Dδu1 G(u, δu2 ) if and only if I[u] exists (G.4)
We can easily verify this for the general form given in (6.36):
Z Z
G(u, δu1 ) = Dδu1 I[u] = [λ grad u grad δu1 − S δu1 ] dx − Q̂ δu1 dx
Ω ∂ΩN
Z (G.5)
⇒ Dδu1 G(u, δ2 ) = λ grad δu2 grad δu1 dx = Dδu2 G(u, δu1 )
Ω
In simple terms (and not most generally), Vainberg’s theorem holds if the potential obeys
symmetry. This in turn implies that the governing PDE contains derivatives of even order (such
as linear momentum balance which is second-order in both spatial and temporal derivatives, or
the equilibrium equations of beams which are fourth-order in space and second-order in time). If
the PDEs are of odd order (such as, e.g., the time-dependent diffusion or heat equation), then no
potential I exists, in principle – there are work-arounds using so-called effective potentials, which
gain importance especially for inelastic material models. Of course, knowing that a variational
structure exists is beneficial but it does not reveal anything about the actual solution u.
195
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
H Gauss quadrature
A systematic way to derive Gaussian quadrature rules involves the use of Legendre polynomials.
We here give a brief overview.
We start by noticing that monomials {1, ξ, ξ 2 , ξ 3 , . . .}, although complete, are not orthogonal
basis functions. We can turn them into orthogonal polynomials Pn (ξ) by, e.g., the Gram-
Schmidt orthogonalization procedure. To this end, let us start with
P0 (ξ) = 1 (H.1)
and obtain the next basis function by starting with the linear monomial ξ and computing
⟨1, ξ⟩
P1 (ξ) = ξ − 1 = ξ, (H.2)
⟨1, 1⟩
where we used the inner product
Z 1
⟨u, v⟩ = u(ξ)v(ξ) dξ. (H.3)
−1
⟨ξ, ξ 2 ⟩ ⟨1, ξ 2 ⟩ 1
P2 (ξ) = ξ 2 − ξ− 1 = ξ2 − . (H.4)
⟨ξ, ξ⟩ ⟨1, 1⟩ 3
Analogously, one finds
3
P3 (ξ) = ξ 3 − ξ. (H.5)
5
By continuing in the same fashion, we create a countably infinite set of orthogonal basis functions
Pn (ξ) such that
Z 1
Pn (ξ)Pm (ξ) dξ = 0 if n ̸= m. (H.6)
−1
These polynomials are known as Legendre polynomials. Note that they are defined only up to
a constant, so one can renormalize them, which is commonly done by enforcing that Pn (1) = 1
for all n. The result are the well known Legendre polynomials, which can alternatively be
defined as
1 dn 2 n
Pn (ξ) = (ξ − 1) (H.7)
2n n! dξ n
These polynomials have another interesting feature, viz. by orthogonality with P0 (ξ) = 1 we
know that
Z 1 (
2, if n = 0,
Pn (ξ) dξ = ⟨1, Pn ⟩ = (H.8)
−1 0, else.
Pn (ξ) has exactly n roots in the interval [−1, 1]. Also, for n ̸= 0 we know that
196
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
With this new set of basis functions, we can define the Gauss-Legendre quadrature rule to
enforce
Z 1 nQP −1
!
X
Pk (ξ) dξ = Wi Pk (ξi ), k = 0, 1, . . . , 2nQP − 1. (H.10)
−1 i=0
If nQP = 1, then the solution is simple because the above equations simplify to
Therefore, the weight is, as before, W0 = 2 and the quadrature point is the root of P1 (ξ), viz.
ξ0 = 0.
W0 = W1 = 1. (H.14)
Further, note that Pn (0) = 0 for odd n. Therefore, the same procedure can be continued as
follows. For an arbitrary number of quadrature points, nQP , the Gauss-Legendre quadrature
points and associated weights are defined by
2
PnQP (ξi ) = 0, wi = i = 0, . . . , nQP − 1. (H.15)
(1 − ξi2 )[Pn′ QP (ξi )]2
As a check, take, e.g., nQP = 1 so that P1 (ξ) = ξ with root ξ0 = 0. The weight is computed as
2
w0 = = 2, (H.16)
(1 − ξ02 )[Pn′ QP (ξ)]2
as determined above. Similarly, for nQP = 2 we have P2 (ξ) = 21 (3ξ 2 − 1) with the above roots
√
of ±1/ 3. The associated weights are computed as
2 2 2
w0 = = = 2 32 = 1 = w1 , (H.17)
(1 − ξ02 )[P2′ (ξ0 )]2 (1 − ξ02 )[3ξ0 ]2 3 3
197
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Z 1 nQP −1
X
f (ξ) dξ − Wk f (ξk ) ≤ Ch2nQP max f (2nQP ) (ξ) (I.1)
−1 ξ∈[−1,1]
k=0
with a constant C > 0. This shows that, as can be expected, the quadrature error decreases with
decreasing mesh size h and with increasing smoothness of function f . The rate of convergence
under h-refinement also depends on the smoothness of the function.
The exact error depends on the chosen quadrature rule. For example, for Gauss-Legendre
quadrature an error estimate is given by
198
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 (J.1).
The first (i = 1) and the last particle (i = n) are each missing one spring connection. Applying
the same principles as above leads to the equations of motion for those particles as
m1 ü1 = k1,2 (u2 − u1 ) + F1ext (t), mn ün = −kn,n−1 (un − un−1 ) + Fnext (t). (J.2)
Alternatively (and sometimes more conveniently for complex systems), the equations of motion
can also be obtained from the Lagrange equations, using the kinetic energy T and potential
energy V with
n n
X mi 2 X ki,i−1 2 d ∂L ∂L
T = u̇i , V = (ui − ui−1 ) ⇒ − = Fiext , (J.3)
2 2 dt ∂ u̇i ∂ui
i=1 i=2
199
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
Either way, the obtained equations of motion can be arranged into matrix form, viz.
m1 ü1
m 2 ü2
... ·
m i
üi
... ·
mn ün
ext (J.4)
−k1,2
k1,2 u1 F1
−k1,2 k1,2 + k2,3 −k2,3 u2 F2ext
. . . · ·
+ =
ui F ext .
−ki−1,i ki−1,i + ki,i+1 −ki,i+1 i
... · ·
−kn,n−1 kn,n−1 un Fnext
M Ü + KU = F ext (J.5)
as well as
−k1,2
k1,2
−k1,2 k1,2 + k2,3 −k2,3
...
[K] = . (J.7)
−ki−1,i ki−1,i + ki,i+1 −ki,i+1
...
−kn,n−1 kn,n−1
Let us expand matrix K a bit more and use color coding for the different spring stiffness
contributions to realize the following structure:
k1,2 −k1,2
−k1,2 k1,2 + k2,3 −k2,3
−k2,3 k2,3 + k3,4 −k3,4
[K] =
−k3,4 k3,4 + k4,5 . (J.8)
. ..
−kn−2 kn−2 + kn,n−1 −kn,n−1
−kn,n−1 kn,n−1
200
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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] = (J.10)
−k k
By inspecting (J.8), we notice that the stiffness matrix of the chain of n springs is nothing but
the assembly of the stiffness matrices of all springs in the chain, each being added onto those
components in K, which are connected to the spring. For example, the spring with stiffness k2,3
links nodes 2 and 3. Therefore, the stiffness matrix (J.10) with k → k2,3 is added onto those
components in columns and rows 2 and 3 in [K]. Repeating this procedure for each spring leads
to the complete stiffness matrix in (J.8).
————
201
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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 (J.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,
(J.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
202
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
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)!
————
203
Index
L2 -norm, 183 Bubnov-Galerkin approximation, 74
h-refinement, 86
hp-refinement, 86 central difference, 22, 23
n-dimensional space, 74 CFL condition, 29, 30
p-refinement, 86 CFL number, 30
r-refinement, 86 characteristic equation, 150
(proper) subset, 181 chicken-wire mode, 127
2-node bar element, 88 class C k (Ω), 71, 182
2-node beam element, 93 classical solution, 55
4-node bilinear quadrilateral, 110 closure, 184
4-node tetrahedron, 106 collocation method, 61
8-node quadratic quadrilateral, 115 collocation points, 61
9-node quadratic quadrilateral, 115 commercial codes, 177
complete polynomial, 191
acceleration field, 9 complete space, 184
action, 144 complete up to order q, 83
action principle, 145 completeness property, 83
adaptive mesh refinement, 173 condensation, 140
advection equation, 17, 34 condition number, 171
amplitude, 153 conditionally stable, 33
approximation error, 172 conductivity matrix, 169
assembly, 39, 40, 43, 201 conjugate gradient, 133
assembly operator, 128 consistency, 23
augmented finite elements, 178 consistent mass matrix, 146
average acceleration, 161 constant strain tetrahedron, 106
average acceleration method, 160 constant strain triangle, 105
constitutive relations, 10
backward-Euler, 23 continuous at a point x, 182
balance of energy, 13 continuous over Ω, 182
local, 14 convergence, 23, 129, 184
balance of linear momentum, 11 Courant number, 30
local form, 12 Courant-Friedrichs-Levy, 29
Banach space, 184 Courant-Friedrichs-Levy (CFL) condition, 30
bar element, 38 CST, 105, 106
barycentric coordinates, 104 cubature rules, 118
basis, 82
basis functions, 60 damage and failure, 179
beam element, 92 damped Newton-Raphson method, 131
bijective, 181 damping matrix, 155
bilinear form, 56 deformation, 9
bilinear operator, 193 deformation gradient, 165
body, 9 deformation mapping, 165
body force, 134 degrees of freedom, 85
boundary, 181 differential operator, 16
boundary conditions, 15 dimensionless forms, 19
boundary operators, 17 Direct methods, 22
brick element, 116 Dirichlet boundary, 15
204
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
205
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
206
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
207
Computational Mechanics I: Intro to FEA Prof. Dr. D.M. Kochmann
Spring 2023 (version February 15, 2023) ETH Zürich
UEL, 177
UMAT, 177
unconditionally stable, 33
unconditionally unstable, 33
under-integration, 124
undistorted, 123
units, 171
update rule, 25
updated-Lagrangian, 178
V&V, 19
Vainberg’s theorem, 73, 195
validation, 19
variation, 52
variational calculus, 50, 68
variational structure, 54
velocity field, 9
verification, 19
vibrations, 149
Voigt notation, 79
Von Neumann analysis, 29
von Neumann analysis, 31, 33
XFEM, 179
208